From 719744e828d439ef71cb0111f37d94a5cc7d86ca Mon Sep 17 00:00:00 2001 From: bherr2 Date: Tue, 25 Jun 2024 11:11:50 +0000 Subject: [PATCH] Production deploy -- d96e129fe0b9b3e9d2eb20dbdbd9c45d62b44ff3 --- assets/pages/about/credits.md | 2 +- main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/pages/about/credits.md b/assets/pages/about/credits.md index 731ee36..8b2fdd8 100644 --- a/assets/pages/about/credits.md +++ b/assets/pages/about/credits.md @@ -1,6 +1,6 @@ Developed as a collaboration between the Cyberinfrastructure for Network Science Center at Indiana University and the Regenstrief Institute as part of Indiana University's Addictions Grand Challenge. -The A2AGC database is generated using code available on GitHub at https://github.com/cns-iu/a2agc-dataset. See the latest changes in the CHANGELOG. +The A2AGC database is generated using code available on GitHub at https://github.com/cns-iu/a2agc-dataset. See the latest changes in the CHANGELOG. Please cite this effort: diff --git a/main.js b/main.js index 99ecfb5..4f19034 100644 --- a/main.js +++ b/main.js @@ -1 +1 @@ -(self.webpackChunka2agc=self.webpackChunka2agc||[]).push([[179],{733:(Ba,Ds,tn)=>{"use strict";var Ct={};tn.r(Ct),tn.d(Ct,{JsonPatchError:()=>Es,_areEquals:()=>E$,applyOperation:()=>aM,applyPatch:()=>cU,applyReducer:()=>dde,deepClone:()=>cde,getValueByPointer:()=>lU,validate:()=>Ate,validator:()=>uU});var re={};tn.r(re),tn.d(re,{compare:()=>bde,generate:()=>YG,observe:()=>yde,unobserve:()=>_de});var Ii={};tn.r(Ii),tn.d(Ii,{carbong10:()=>Afe,carbong100:()=>kfe,carbong90:()=>Tfe,carbonwhite:()=>Mfe,dark:()=>Qde,excel:()=>Jde,fivethirtyeight:()=>nfe,ggplot2:()=>ife,googlecharts:()=>mfe,latimes:()=>afe,powerbi:()=>Cfe,quartz:()=>lfe,urbaninstitute:()=>pfe,version:()=>Ife,vox:()=>cfe});var sn=tn(861);let Zn=null,oi=1;const Rt=Symbol("SIGNAL");function On(e){const n=Zn;return Zn=e,n}function Li(e){if((!Be(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==oi)){if(!e.producerMustRecompute(e)&&!ei(e))return e.dirty=!1,void(e.lastCleanEpoch=oi);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=oi}}function ei(e){Qe(e);for(let n=0;n0}function Qe(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let $t=null;function Jt(e){return"function"==typeof e}function Hi(e){const t=e(r=>{Error.call(r),r.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const hn=Hi(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((r,s)=>`${s+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function io(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class xn{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const c of t)c.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(Jt(r))try{r()}catch(c){n=c instanceof hn?c.errors:[c]}const{_finalizers:s}=this;if(s){this._finalizers=null;for(const c of s)try{Vo(c)}catch(h){n=n??[],h instanceof hn?n=[...n,...h.errors]:n.push(h)}}if(n)throw new hn(n)}}add(n){var t;if(n&&n!==this)if(this.closed)Vo(n);else{if(n instanceof xn){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&io(t,n)}remove(n){const{_finalizers:t}=this;t&&io(t,n),n instanceof xn&&n._removeParent(this)}}xn.EMPTY=(()=>{const e=new xn;return e.closed=!0,e})();const Mo=xn.EMPTY;function Js(e){return e instanceof xn||e&&"closed"in e&&Jt(e.remove)&&Jt(e.add)&&Jt(e.unsubscribe)}function Vo(e){Jt(e)?e():e.unsubscribe()}const Mi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ci={setTimeout(e,n,...t){const{delegate:r}=ci;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){const{delegate:n}=ci;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jo(e){ci.setTimeout(()=>{const{onUnhandledError:n}=Mi;if(!n)throw e;n(e)})}function Si(){}const ro=Ms("C",void 0,void 0);function Ms(e,n,t){return{kind:e,value:n,error:t}}let ls=null;function cs(e){if(Mi.useDeprecatedSynchronousErrorHandling){const n=!ls;if(n&&(ls={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:r}=ls;if(ls=null,t)throw r}}else e()}class $i extends xn{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Js(n)&&n.add(this)):this.destination=Ri}static create(n,t,r){return new Wn(n,t,r)}next(n){this.isStopped?yu(function va(e){return Ms("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?yu(function ui(e){return Ms("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?yu(ro,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const vr=Function.prototype.bind;function po(e,n){return vr.call(e,n)}class xr{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){ea(r)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){ea(r)}else ea(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){ea(t)}}}class Wn extends $i{constructor(n,t,r){let s;if(super(),Jt(n)||!n)s={next:n??void 0,error:t??void 0,complete:r??void 0};else{let c;this&&Mi.useDeprecatedNextContext?(c=Object.create(n),c.unsubscribe=()=>this.unsubscribe(),s={next:n.next&&po(n.next,c),error:n.error&&po(n.error,c),complete:n.complete&&po(n.complete,c)}):s=n}this.destination=new xr(s)}}function ea(e){Mi.useDeprecatedSynchronousErrorHandling?function Uo(e){Mi.useDeprecatedSynchronousErrorHandling&&ls&&(ls.errorThrown=!0,ls.error=e)}(e):jo(e)}function yu(e,n){const{onStoppedNotification:t}=Mi;t&&ci.setTimeout(()=>t(e,n))}const Ri={closed:!0,next:Si,error:function Xl(e){throw e},complete:Si},mo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Wi(e){return e}function Yl(e){return 0===e.length?Wi:1===e.length?e[0]:function(t){return e.reduce((r,s)=>s(r),t)}}let Qn=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,s){const c=function As(e){return e&&e instanceof $i||function ta(e){return e&&Jt(e.next)&&Jt(e.error)&&Jt(e.complete)}(e)&&Js(e)}(t)?t:new Wn(t,r,s);return cs(()=>{const{operator:h,source:y}=this;c.add(h?h.call(c,y):y?this._subscribe(c):this._trySubscribe(c))}),c}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return new(r=Ao(r))((s,c)=>{const h=new Wn({next:y=>{try{t(y)}catch(E){c(E),h.unsubscribe()}},error:c,complete:s});this.subscribe(h)})}_subscribe(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)}[mo](){return this}pipe(...t){return Yl(t)(this)}toPromise(t){return new(t=Ao(t))((r,s)=>{let c;this.subscribe(h=>c=h,h=>s(h),()=>r(c))})}}return e.create=n=>new e(n),e})();function Ao(e){var n;return null!==(n=e??Mi.Promise)&&void 0!==n?n:Promise}const Rc=Hi(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let It=(()=>{class e extends Qn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const r=new Ho(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new Rc}next(t){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(t)}})}error(t){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:r,isStopped:s,observers:c}=this;return r||s?Mo:(this.currentObservers=null,c.push(t),new xn(()=>{this.currentObservers=null,io(c,t)}))}_checkFinalizedStatuses(t){const{hasError:r,thrownError:s,isStopped:c}=this;r?t.error(s):c&&t.complete()}asObservable(){const t=new Qn;return t.source=this,t}}return e.create=(n,t)=>new Ho(n,t),e})();class Ho extends It{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:Mo}}class wr extends It{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){const{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}}function ae(e){return Jt(e?.lift)}function be(e){return n=>{if(ae(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Se(e,n,t,r,s){return new Fe(e,n,t,r,s)}class Fe extends $i{constructor(n,t,r,s,c,h){super(n),this.onFinalize=c,this.shouldUnsubscribe=h,this._next=t?function(y){try{t(y)}catch(E){n.error(E)}}:super._next,this._error=s?function(y){try{s(y)}catch(E){n.error(E)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(y){n.error(y)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function ye(e,n){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>{r.next(e.call(n,c,s++))}))})}const lt="https://g.co/ng/security#xss";class _e extends Error{constructor(n,t){super(function nn(e,n){return`NG0${Math.abs(e)}${n?": "+n:""}`}(n,t)),this.code=n}}function Gi(e){for(let n in e)if(e[n]===Gi)return n;throw Error("Could not find renamed property on target object.")}function O1(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function go(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(go).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function EM(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const D2=Gi({__forward_ref__:Gi});function di(e){return e.__forward_ref__=di,e.toString=function(){return go(this())},e}function Mn(e){return za(e)?e():e}function za(e){return"function"==typeof e&&e.hasOwnProperty(D2)&&e.__forward_ref__===di}function CM(e){return e&&!!e.\u0275providers}const Nc=Gi({\u0275cmp:Gi}),Wh=Gi({\u0275dir:Gi}),Mf=Gi({\u0275pipe:Gi}),Zl=Gi({\u0275mod:Gi}),Va=Gi({\u0275fac:Gi}),Y0=Gi({__NG_ELEMENT_ID__:Gi}),K0=Gi({__NG_ENV_ID__:Gi});function qn(e){return"string"==typeof e?e:null==e?"":String(e)}function Af(e,n){throw new _e(-201,!1)}function Rr(e,n){null==e&&function rn(e,n,t,r){throw new Error(`ASSERTION ERROR: ${e}`+(null==r?"":` [Expected=> ${t} ${r} ${n} <=Actual]`))}(n,e,null,"!=")}function Ue(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Tt(e){return{providers:e.providers||[],imports:e.imports||[]}}function q_(e){return DM(e,kf)||DM(e,Yr)}function DM(e,n){return e.hasOwnProperty(n)?e[n]:null}function $m(e){return e&&(e.hasOwnProperty(Ql)||e.hasOwnProperty(Q0))?e[Ql]:null}const kf=Gi({\u0275prov:Gi}),Ql=Gi({\u0275inj:Gi}),Yr=Gi({ngInjectableDef:Gi}),Q0=Gi({ngInjectorDef:Gi});var fi=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}(fi||{});let If;function G_(){return If}function us(e){const n=If;return If=e,n}function MM(e,n,t){const r=q_(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&fi.Optional?null:void 0!==n?n:void Af()}const Ai=globalThis;class $e{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ue({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const X_={},tv="__NG_DI_FLAG__",Rf="ngTempTokenPath",Y_=/\n/gm,bu="__source";let Ua;function md(e){const n=Ua;return Ua=e,n}function zm(e,n=fi.Default){if(void 0===Ua)throw new _e(-203,!1);return null===Ua?MM(e,void 0,n):Ua.get(e,n&fi.Optional?null:void 0,n)}function pe(e,n=fi.Default){return(G_()||zm)(Mn(e),n)}function Xe(e,n=fi.Default){return pe(e,Z_(n))}function Z_(e){return typeof e>"u"||"number"==typeof e?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function sr(e){const n=[];for(let t=0;tn){h=c-1;break}}}for(;cc?"":s[$+1].toLowerCase();const X=8&r?j:null;if(X&&-1!==IM(X,M,0)||2&r&&M!==j){if(Jl(r))return!1;h=!0}}}}else{if(!h&&!Jl(r)&&!Jl(E))return!1;if(h&&Jl(E))continue;h=!1,r=E|1&r}}return Jl(r)||h}function Jl(e){return 0==(1&e)}function FM(e,n,t,r){if(null===n)return-1;let s=0;if(r||!t){let c=!1;for(;s-1)for(t++;t0?'="'+y+'"':"")+"]"}else 8&r?s+="."+h:4&r&&(s+=" "+h);else""!==s&&!Jl(h)&&(n+=ey(c,s),s=""),r=h,c=c||!Jl(r);t++}return""!==s&&(n+=ey(c,s)),n}function Rn(e){return Ea(()=>{const n=ov(e),t={...n,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===_o.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||pl.Emulated,styles:e.styles||Je,_:null,schemas:e.schemas||null,tView:null,id:""};VM(t);const r=e.dependencies;return t.directiveDefs=jm(r,!1),t.pipeDefs=jm(r,!0),t.id=function UM(e){let n=0;const t=[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 s of t)n=Math.imul(31,n)+s.charCodeAt(0)<<0;return n+=2147483648,"c"+n}(t),t})}function BM(e){return Jn(e)||Wo(e)}function ln(e){return null!==e}function Ft(e){return Ea(()=>({type:e.type,bootstrap:e.bootstrap||Je,declarations:e.declarations||Je,imports:e.imports||Je,exports:e.exports||Je,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function zM(e,n){if(null==e)return ds;const t={};for(const r in e)if(e.hasOwnProperty(r)){const s=e[r];let c,h,y=ht.None;Array.isArray(s)?(y=s[0],c=s[1],h=s[2]??c):(c=s,h=s),n?(t[c]=y!==ht.None?[r,y]:r,n[c]=h):t[c]=r}return t}function Vt(e){return Ea(()=>{const n=ov(e);return VM(n),n})}function fs(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 Jn(e){return e[Nc]||null}function Wo(e){return e[Wh]||null}function ks(e){return e[Mf]||null}function ia(e,n){const t=e[Zl]||null;if(!t&&!0===n)throw new Error(`Type ${go(e)} does not have '\u0275mod' property.`);return t}function ov(e){const n={};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:n,inputTransforms:null,inputConfig:e.inputs||ds,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Je,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:zM(e.inputs,n),outputs:zM(e.outputs),debugInfo:null}}function VM(e){e.features?.forEach(n=>n(e))}function jm(e,n){if(!e)return null;const t=n?ks:BM;return()=>("function"==typeof e?e():e).map(r=>t(r)).filter(ln)}const Tr=0,mt=1,_n=2,yo=3,tc=4,ra=5,nc=6,Um=7,kr=8,Ca=9,wu=10,jn=11,ty=12,P1=13,Hm=14,Kr=15,Wm=16,Xh=17,Eu=18,ny=19,L1=20,Ff=21,sv=22,Yh=23,$n=25,av=1,$c=7,Bc=9,Nr=10;var lv=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(lv||{});function bo(e){return Array.isArray(e)&&"object"==typeof e[av]}function Is(e){return Array.isArray(e)&&!0===e[av]}function $1(e){return 0!=(4&e.flags)}function zc(e){return e.componentOffset>-1}function cv(e){return 1==(1&e.flags)}function ml(e){return!!e.template}function uv(e){return 0!=(512&e[_n])}function Kh(e,n){return e.hasOwnProperty(Va)?e[Va]:null}class j1{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function JM(e,n,t,r){null!==n?n.applyValueToInputSignal(n,r):e[t]=r}function vo(){return ry}function ry(e){return e.type.prototype.ngOnChanges&&(e.setInput=$2),eA}function eA(){const e=pv(this),n=e?.current;if(n){const t=e.previous;if(t===ds)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function $2(e,n,t,r,s){const c=this.declaredInputs[r],h=pv(e)||function Xm(e,n){return e[tA]=n}(e,{previous:ds,current:null}),y=h.current||(h.current={}),E=h.previous,M=E[c];y[c]=new j1(M&&M.currentValue,t,E===ds),JM(e,n,s,t)}vo.ngInherit=!0;const tA="__ngSimpleChanges__";function pv(e){return e[tA]||null}const nt=function(e,n,t){},U1="svg";let gv=!1;function er(e){for(;Array.isArray(e);)e=e[Tr];return e}function sy(e,n){return er(n[e])}function oa(e,n){return er(n[e.index])}function gl(e,n){return e.data[n]}function Zh(e,n){return e[n]}function Wa(e,n){const t=n[e];return bo(t)?t:t[Tr]}function Pf(e){return 128==(128&e[_n])}function qo(e,n){return null==n?null:e[n]}function ay(e){e[Xh]=0}function yv(e){1024&e[_n]||(e[_n]|=1024,Pf(e)&&Qh(e))}function ly(e){return 9216&e[_n]||e[Yh]?.dirty}function Kt(e){ly(e)?Qh(e):64&e[_n]&&(function H1(){return gv}()?(e[_n]|=1024,Qh(e)):e[wu].changeDetectionScheduler?.notify())}function Qh(e){e[wu].changeDetectionScheduler?.notify();let n=Vc(e);for(;null!==n&&!(8192&n[_n])&&(n[_n]|=8192,Pf(n));)n=Vc(n)}function Ti(e,n){if(256==(256&e[_n]))throw new _e(911,!1);null===e[Ff]&&(e[Ff]=[]),e[Ff].push(n)}function Vc(e){const n=e[yo];return Is(n)?n[yo]:n}const An={lFrame:Da(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function q1(){return An.bindingsEnabled}function Km(){return null!==An.skipHydrationRootTNode}function qe(){return An.lFrame.lView}function bi(){return An.lFrame.tView}function hs(e){return An.lFrame.contextLView=e,e[kr]}function so(e){return An.lFrame.contextLView=null,e}function Un(){let e=rA();for(;null!==e&&64===e.type;)e=e.parent;return e}function rA(){return An.lFrame.currentTNode}function ic(e,n){const t=An.lFrame;t.currentTNode=e,t.isParent=n}function K1(){return An.lFrame.isParent}function yd(){An.lFrame.isParent=!1}function Os(){const e=An.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function Sa(){return An.lFrame.bindingIndex++}function bd(e){const n=An.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function Cv(e,n){const t=An.lFrame;t.bindingIndex=t.bindingRootIndex=e,jc(n)}function jc(e){An.lFrame.currentDirectiveIndex=e}function rc(e){const n=An.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}function Q1(){return An.lFrame.currentQueryIndex}function uy(e){An.lFrame.currentQueryIndex=e}function Jh(e){const n=e[mt];return 2===n.type?n.declTNode:1===n.type?e[ra]:null}function J1(e,n,t){if(t&fi.SkipSelf){let s=n,c=e;for(;!(s=s.parent,null!==s||t&fi.Host||(s=Jh(c),null===s||(c=c[Hm],10&s.type))););if(null===s)return!1;n=s,e=c}const r=An.lFrame=ko();return r.currentTNode=n,r.lView=e,!0}function ep(e){const n=ko(),t=e[mt];An.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function ko(){const e=An.lFrame,n=null===e?null:e.child;return null===n?Da(e):n}function Da(e){const n={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=n),n}function Go(){const e=An.lFrame;return An.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const vd=Go;function Sv(){const e=Go();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 Xo(){return An.lFrame.selectedIndex}function tp(e){An.lFrame.selectedIndex=e}function Er(){const e=An.lFrame;return gl(e.tView,e.selectedIndex)}function dy(){An.lFrame.currentNamespace=U1}function sA(){!function Z$(){An.lFrame.currentNamespace=null}()}let j2=!0;function eE(){return j2}function Bf(e){j2=e}function Qm(e,n){for(let t=n.directiveStart,r=n.directiveEnd;t=r)break}else n[E]<0&&(e[Xh]+=65536),(y>14>16&&(3&e[_n])===n&&(e[_n]+=16384,iE(y,c)):iE(y,c)}const _l=-1;class ze{constructor(n,t,r){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function zf(e){return e!==_l}function Vf(e){return 32767&e}function yl(e,n){let t=function Jm(e){return e>>16}(e),r=n;for(;t>0;)r=r[Hm],t--;return r}let ip=!0;function eg(e){const n=ip;return ip=e,n}const W2=255,cA=5;let q2=0;const Mu={};function hy(e,n){const t=rE(e,n);if(-1!==t)return t;const r=n[mt];r.firstCreatePass&&(e.injectorIndex=n.length,py(r.data,e),py(n,null),py(r.blueprint,null));const s=rp(e,n),c=e.injectorIndex;if(zf(s)){const h=Vf(s),y=yl(s,n),E=y[mt].data;for(let M=0;M<8;M++)n[c+M]=y[h+M]|E[h+M]}return n[c+8]=s,c}function py(e,n){e.push(0,0,0,0,0,0,0,0,n)}function rE(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function rp(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,r=null,s=n;for(;null!==s;){if(r=kv(s),null===r)return _l;if(t++,s=s[Hm],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return _l}function Au(e,n,t){!function G2(e,n,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Y0)&&(r=t[Y0]),null==r&&(r=t[Y0]=q2++);const s=r&W2;n.data[e+(s>>cA)]|=1<=0?n&W2:lE:n}(t);if("function"==typeof c){if(!J1(n,e,r))return r&fi.Host?oE(s,0,r):sE(n,t,r,s);try{let h;if(h=c(r),null!=h||r&fi.Optional)return h;Af()}finally{vd()}}else if("number"==typeof c){let h=null,y=rE(e,n),E=_l,M=r&fi.Host?n[Kr][ra]:null;for((-1===y||r&fi.SkipSelf)&&(E=-1===y?rp(e,n):n[y+8],E!==_l&&my(r,!1)?(h=n[mt],y=Vf(E),n=yl(E,n)):y=-1);-1!==y;){const R=n[mt];if(Uf(c,y,R.data)){const $=X2(y,n,t,h,r,M);if($!==Mu)return $}E=n[y+8],E!==_l&&my(r,n[mt].data[y+8]===M)&&Uf(c,y,n)?(h=R,y=Vf(E),n=yl(E,n)):y=-1}}return s}function X2(e,n,t,r,s,c){const h=n[mt],y=h.data[e+8],R=tg(y,h,t,null==r?zc(y)&&ip:r!=h&&0!=(3&y.type),s&fi.Host&&c===y);return null!==R?jf(n,h,R,y):Mu}function tg(e,n,t,r,s){const c=e.providerIndexes,h=n.data,y=1048575&c,E=e.directiveStart,R=c>>20,j=s?y+R:e.directiveEnd;for(let X=r?y:y+R;X=E&&K.type===t)return X}if(s){const X=h[E];if(X&&ml(X)&&X.type===t)return E}return null}function jf(e,n,t,r){let s=e[t];const c=n.data;if(function wd(e){return e instanceof ze}(s)){const h=s;h.resolving&&function VU(e,n){const t=n?`. Dependency path: ${n.join(" > ")} > ${e}`:"";throw new _e(-200,`Circular dependency in DI detected for ${e}${t}`)}(function Bi(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():qn(e)}(c[t]));const y=eg(h.canSeeViewProviders);h.resolving=!0;const M=h.injectImpl?us(h.injectImpl):null;J1(e,r,fi.Default);try{s=e[t]=h.factory(void 0,c,e,r),n.firstCreatePass&&t>=r.directiveStart&&function tE(e,n,t){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:c}=n.type.prototype;if(r){const h=ry(n);(t.preOrderHooks??=[]).push(e,h),(t.preOrderCheckHooks??=[]).push(e,h)}s&&(t.preOrderHooks??=[]).push(0-e,s),c&&((t.preOrderHooks??=[]).push(e,c),(t.preOrderCheckHooks??=[]).push(e,c))}(t,c[t],n)}finally{null!==M&&us(M),eg(y),h.resolving=!1,vd()}}return s}function Uf(e,n,t){return!!(t[n+(e>>cA)]&1<{const n=e.prototype.constructor,t=n[Va]||Uc(n),r=Object.prototype;let s=Object.getPrototypeOf(e.prototype).constructor;for(;s&&s!==r;){const c=s[Va]||Uc(s);if(c&&c!==t)return c;s=Object.getPrototypeOf(s)}return c=>new c})}function Uc(e){return za(e)?()=>{const n=Uc(Mn(e));return n&&n()}:Kh(e)}function kv(e){const n=e[mt],t=n.type;return 2===t?n.declTNode:1===t?e[ra]:null}function Hc(e){return function oc(e,n){if("class"===n)return e.classes;if("style"===n)return e.styles;const t=e.attrs;if(t){const r=t.length;let s=0;for(;s{const r=function op(e){return function(...t){if(e){const r=e(...t);for(const s in r)this[s]=r[s]}}}(n);function s(...c){if(this instanceof s)return r.apply(this,c),this;const h=new s(...c);return y.annotation=h,y;function y(E,M,R){const $=E.hasOwnProperty(Ns)?E[Ns]:Object.defineProperty(E,Ns,{value:[]})[Ns];for(;$.length<=R;)$.push(null);return($[R]=$[R]||[]).push(h),E}}return t&&(s.prototype=Object.create(t.prototype)),s.prototype.ngMetadataName=e,s.annotationCls=s,s})}function Cd(e,n){e.forEach(t=>Array.isArray(t)?Cd(t,n):n(t))}function Tu(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function by(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function bl(e,n,t){let r=Qr(e,n);return r>=0?e[1|r]=t:(r=~r,function qf(e,n,t,r){let s=e.length;if(s==n)e.push(t,r);else if(1===s)e.push(r,e[0]),e[0]=t;else{for(s--,e.push(e[s-1],e[s]);s>n;)e[s]=e[s-2],s--;e[n]=t,e[n+1]=r}}(e,r,n,t)),r}function dt(e,n){const t=Qr(e,n);if(t>=0)return e[1|t]}function Qr(e,n){return function Wc(e,n,t){let r=0,s=e.length>>t;for(;s!==r;){const c=r+(s-r>>1),h=e[c<n?s=c:r=c+1}return~(s<{t.push(h)};return Cd(n,h=>{const y=h;Td(y,c,[],r)&&(s||=[],s.push(y))}),void 0!==s&&_E(s,c),t}function _E(e,n){for(let t=0;t{n(c,r)})}}function Td(e,n,t,r){if(!(e=Mn(e)))return!1;let s=null,c=$m(e);const h=!c&&Jn(e);if(c||h){if(h&&!h.standalone)return!1;s=e}else{const E=e.ngModule;if(c=$m(E),!c)return!1;s=E}const y=r.has(s);if(h){if(y)return!1;if(r.add(s),h.dependencies){const E="function"==typeof h.dependencies?h.dependencies():h.dependencies;for(const M of E)Td(M,n,t,r)}}else{if(!c)return!1;{if(null!=c.imports&&!y){let M;r.add(s);try{Cd(c.imports,R=>{Td(R,n,t,r)&&(M||=[],M.push(R))})}finally{}void 0!==M&&_E(M,n)}if(!y){const M=Kh(s)||(()=>new s);n({provide:s,useFactory:M,deps:Je},s),n({provide:cg,useValue:s,multi:!0},s),n({provide:qc,useValue:()=>pe(s),multi:!0},s)}const E=c.providers;if(null!=E&&!y){const M=e;kd(E,R=>{n(R,M)})}}}return s!==e&&void 0!==e.providers}function kd(e,n){for(let t of e)CM(t)&&(t=t.\u0275providers),Array.isArray(t)?kd(t,n):n(t)}const _A=Gi({provide:String,useValue:Gi});function Xf(e){return null!==e&&"object"==typeof e&&_A in e}function Ou(e){return"function"==typeof e}const wy=new $e(""),bE={},zv={};let vl;function Id(){return void 0===vl&&(vl=new Ad),vl}class xo{}class Yf extends xo{get destroyed(){return this._destroyed}constructor(n,t,r,s){super(),this.parent=t,this.source=r,this.scopes=s,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Uv(n,h=>this.processProvider(h)),this.records.set(gE,ug(void 0,this)),s.has("environment")&&this.records.set(xo,ug(void 0,this));const c=this.records.get(wy);null!=c&&"string"==typeof c.value&&this.scopes.add(c.value),this.injectorDefTypes=new Set(this.get(cg,Je,fi.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const t of n)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const t=md(this),r=us(void 0);try{return n()}finally{md(t),us(r)}}get(n,t=X_,r=fi.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(K0))return n[K0](this);r=Z_(r);const c=md(this),h=us(void 0);try{if(!(r&fi.SkipSelf)){let E=this.records.get(n);if(void 0===E){const M=function Ey(e){return"function"==typeof e||"object"==typeof e&&e instanceof $e}(n)&&q_(n);E=M&&this.injectableDefInScope(M)?ug(dp(n),bE):null,this.records.set(n,E)}if(null!=E)return this.hydrate(n,E)}return(r&fi.Self?Id():this.parent).get(n,t=r&fi.Optional&&t===X_?null:t)}catch(y){if("NullInjectorError"===y.name){if((y[Rf]=y[Rf]||[]).unshift(go(n)),c)throw y;return function Q_(e,n,t,r){const s=e[Rf];throw n[bu]&&s.unshift(n[bu]),e.message=function iv(e,n,t,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let s=go(n);if(Array.isArray(n))s=n.map(go).join(" -> ");else if("object"==typeof n){let c=[];for(let h in n)if(n.hasOwnProperty(h)){let y=n[h];c.push(h+":"+("string"==typeof y?JSON.stringify(y):go(y)))}s=`{${c.join(", ")}}`}return`${t}${r?"("+r+")":""}[${s}]: ${e.replace(Y_,"\n ")}`}("\n"+e.message,s,t,r),e.ngTokenPath=s,e[Rf]=null,e}(y,n,"R3InjectorError",this.source)}throw y}finally{us(h),md(c)}}resolveInjectorInitializers(){const n=md(this),t=us(void 0);try{const s=this.get(qc,Je,fi.Self);for(const c of s)c()}finally{md(n),us(t)}}toString(){const n=[],t=this.records;for(const r of t.keys())n.push(go(r));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new _e(205,!1)}processProvider(n){let t=Ou(n=Mn(n))?n:Mn(n&&n.provide);const r=function Vv(e){return Xf(e)?ug(void 0,e.useValue):ug(yA(e),bE)}(n);if(!Ou(n)&&!0===n.multi){let s=this.records.get(t);s||(s=ug(void 0,bE,!0),s.factory=()=>sr(s.multi),this.records.set(t,s)),t=n,s.multi.push(n)}this.records.set(t,r)}hydrate(n,t){return t.value===bE&&(t.value=zv,t.value=t.factory()),"object"==typeof t.value&&t.value&&function xE(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(n){if(!n.providedIn)return!1;const t=Mn(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){const t=this._onDestroyHooks.indexOf(n);-1!==t&&this._onDestroyHooks.splice(t,1)}}function dp(e){const n=q_(e),t=null!==n?n.factory:Kh(e);if(null!==t)return t;if(e instanceof $e)throw new _e(204,!1);if(e instanceof Function)return function vE(e){if(e.length>0)throw new _e(204,!1);const t=function Z0(e){return e&&(e[kf]||e[Yr])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new _e(204,!1)}function yA(e,n,t){let r;if(Ou(e)){const s=Mn(e);return Kh(s)||dp(s)}if(Xf(e))r=()=>Mn(e.useValue);else if(function $v(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...sr(e.deps||[]));else if(function yE(e){return!(!e||!e.useExisting)}(e))r=()=>pe(Mn(e.useExisting));else{const s=Mn(e&&(e.useClass||e.provide));if(!function jv(e){return!!e.deps}(e))return Kh(s)||dp(s);r=()=>new s(...sr(e.deps))}return r}function ug(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function Uv(e,n){for(const t of e)Array.isArray(t)?Uv(t,n):t&&CM(t)?Uv(t.\u0275providers,n):n(t)}function Od(e,n){e instanceof Yf&&e.assertNotDestroyed();const r=md(e),s=us(void 0);try{return n()}finally{md(r),us(s)}}function wA(e,n=null,t=null,r){const s=wE(e,n,t,r);return s.resolveInjectorInitializers(),s}function wE(e,n=null,t=null,r,s=new Set){const c=[t||Je,Q2(e)];return r=r||("object"==typeof e?void 0:go(e)),new Yf(c,n||Id(),r||null,s)}let Ay,hr=(()=>{class e{static#e=this.THROW_IF_NOT_FOUND=X_;static#t=this.NULL=new Ad;static create(t,r){if(Array.isArray(t))return wA({name:""},r,t,"");{const s=t.name??"";return wA({name:s},t.parent,t.providers,s)}}static#n=this.\u0275prov=Ue({token:e,providedIn:"any",factory:()=>pe(gE)});static#i=this.__NG_ELEMENT_ID__=-1}return e})();const hp=new $e("",{providedIn:"root",factory:()=>SA}),SA="ng",Gv=new $e(""),ps=new $e("",{providedIn:"platform",factory:()=>"unknown"}),Ko=new $e(""),Xv=new $e("",{providedIn:"root",factory:()=>function Rd(){if(void 0!==Ay)return Ay;if(typeof document<"u")return document;throw new _e(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function xl(e){return e instanceof Function?e():e}function Py(e){return 128==(128&e.flags)}var Pd=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pd||{});const tR=/^>|^->||--!>|)/g,IE="\u200b$1\u200b";const RE=new Map;let IA=0;const Qv="__ngContext__";function Ps(e,n){bo(n)?(e[Qv]=n[ny],function RA(e){RE.set(e[ny],e)}(n)):e[Qv]=n}let $y;function yp(e,n){return $y(e,n)}function By(e,n,t,r,s){if(null!=r){let c,h=!1;Is(r)?c=r:bo(r)&&(h=!0,r=r[Tr]);const y=er(r);0===e&&null!==t?null==s?$E(n,t,y):bp(n,t,y,s||null,!0):1===e&&null!==t?bp(n,t,y,s||null,!0):2===e?function jy(e,n,t){const r=sx(e,n);r&&function oR(e,n,t,r){e.removeChild(n,t,r)}(e,r,n,t)}(n,y,h):3===e&&n.destroyNode(y),null!=c&&function YA(e,n,t,r,s){const c=t[$c];c!==er(t)&&By(n,e,r,c,s);for(let y=Nr;yn.replace(kE,IE))}(n))}function zy(e,n,t){return e.createElement(n,t)}function VA(e,n){Qf(e,n,n[jn],2,null,null)}function Vy(e,n){const t=e[Bc],r=t.indexOf(n);t.splice(r,1)}function yg(e,n){if(e.length<=Nr)return;const t=Nr+n,r=e[t];if(r){const s=r[Wm];null!==s&&s!==e&&Vy(s,r),n>0&&(e[t-1][tc]=r[tc]);const c=by(e,Nr+n);!function BA(e,n){VA(e,n),n[Tr]=null,n[ra]=null}(r[mt],r);const h=c[Eu];null!==h&&h.detachView(c[mt]),r[yo]=null,r[tc]=null,r[_n]&=-129}return r}function bg(e,n){if(!(256&n[_n])){const t=n[jn];t.destroyNode&&Qf(e,n,t,3,null,null),function ix(e){let n=e[ty];if(!n)return rx(e[mt],e);for(;n;){let t=null;if(bo(n))t=n[ty];else{const r=n[Nr];r&&(t=r)}if(!t){for(;n&&!n[tc]&&n!==e;)bo(n)&&rx(n[mt],n),n=n[yo];null===n&&(n=e),bo(n)&&rx(n[mt],n),t=n&&n[tc]}n=t}}(n)}}function rx(e,n){if(!(256&n[_n])){n[_n]&=-129,n[_n]|=256,n[Yh]&&function ti(e){if(Qe(e),Be(e))for(let n=0;n=0?r[h]():r[-h].unsubscribe(),c+=2}else t[c].call(r[t[c+1]]);null!==r&&(n[Um]=null);const s=n[Ff];if(null!==s){n[Ff]=null;for(let c=0;c-1){const{encapsulation:c}=e.data[r.directiveStart+s];if(c===pl.None||c===pl.Emulated)return null}return oa(r,t)}}(e,n.parent,t)}function bp(e,n,t,r,s){e.insertBefore(n,t,r,s)}function $E(e,n,t){e.appendChild(n,t)}function HA(e,n,t,r,s){null!==r?bp(e,n,t,r,s):$E(e,n,t)}function sx(e,n){return e.parentNode(n)}function BE(e,n,t){return zE(e,n,t)}let VE,Uy,Ls,zE=function WA(e,n,t){return 40&e.type?oa(e,t):null};function ax(e,n,t,r){const s=LE(e,r,n),c=n[jn],y=BE(r.parent||n[ra],r,n);if(null!=s)if(Array.isArray(t))for(let E=0;Ee,createScript:e=>e,createScriptURL:e=>e})}catch{}return Uy}()?.createHTML(e)||e}function Qa(e){return function co(){if(void 0===Ls&&(Ls=null,Ai.trustedTypes))try{Ls=Ai.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ls}()?.createScriptURL(e)||e}class Gc{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${lt})`}}class ka extends Gc{getTypeName(){return"HTML"}}class Wy extends Gc{getTypeName(){return"Style"}}class ZA extends Gc{getTypeName(){return"Script"}}class Jf extends Gc{getTypeName(){return"URL"}}class QA extends Gc{getTypeName(){return"ResourceURL"}}function Ja(e){return e instanceof Gc?e.changingThisBreaksApplicationSecurity:e}function cc(e,n){const t=function Vr(e){return e instanceof Gc&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${lt})`)}return t===n}class WE{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const t=(new window.DOMParser).parseFromString(Bd(n),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(n):(t.removeChild(t.firstChild),t)}catch{return null}}}class cx{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const t=this.inertDocument.createElement("template");return t.innerHTML=Bd(n),t}}const Lu=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Tn(e){return(e=String(e)).match(Lu)?e:"unsafe:"+e}function jr(e){const n={};for(const t of e.split(","))n[t]=!0;return n}function xp(...e){const n={};for(const t of e)for(const r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}const ux=jr("area,br,col,hr,img,wbr"),el=jr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Xc=jr("rp,rt"),wp=xp(ux,xp(el,jr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),xp(Xc,jr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),xp(Xc,el)),$s=jr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),uc=xp($s,jr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),jr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),dx=jr("script,style,template");class XE{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let t=n.firstChild,r=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=this.checkClobberedElement(t,t.nextSibling);if(s){t=s;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(n){const t=n.nodeName.toLowerCase();if(!wp.hasOwnProperty(t))return this.sanitizedSomething=!0,!dx.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=n.attributes;for(let s=0;s"),!0}endElement(n){const t=n.nodeName.toLowerCase();wp.hasOwnProperty(t)&&!ux.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Cp(n))}checkClobberedElement(n,t){if(t&&(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return t}}const Ep=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qy=/([^\#-~ |!])/g;function Cp(e){return e.replace(/&/g,"&").replace(Ep,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(qy,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Gy;function Xy(e,n){let t=null;try{Gy=Gy||function vg(e){const n=new cx(e);return function qE(){try{return!!(new window.DOMParser).parseFromString(Bd(""),"text/html")}catch{return!1}}()?new WE(n):n}(e);let r=n?String(n):"";t=Gy.getInertBodyElement(r);let s=5,c=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=c,c=t.innerHTML,t=Gy.getInertBodyElement(r)}while(r!==c);return Bd((new XE).sanitizeChildren(YE(t)||t))}finally{if(t){const r=YE(t)||t;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function YE(e){return"content"in e&&function ms(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Ro=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}(Ro||{});function jd(e){const n=Dp();return n?n.sanitize(Ro.URL,e)||"":cc(e,"URL")?Ja(e):Tn(qn(e))}function Yy(e){const n=Dp();if(n)return Qa(n.sanitize(Ro.RESOURCE_URL,e)||"");if(cc(e,"ResourceURL"))return Qa(Ja(e));throw new _e(904,!1)}function Dp(){const e=qe();return e&&e[wu].sanitizer}class th{}let fx=()=>null;function Sg(e,n,t=!1){return fx(e,n,t)}class mx{}class Hd{}class gx{resolveComponentFactory(n){throw function Wd(e){const n=Error(`No component factory found for ${go(e)}.`);return n.ngComponent=e,n}(n)}}let Ag=(()=>{class e{static#e=this.NULL=new gx}return e})();function kp(){return nh(Un(),qe())}function nh(e,n){return new zn(oa(e,n))}let zn=(()=>{class e{constructor(t){this.nativeElement=t}static#e=this.__NG_ELEMENT_ID__=kp}return e})();function rC(e){return e instanceof zn?e.nativeElement:e}class _x{}let tl=(()=>{class e{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function Cl(){const e=qe(),t=Wa(Un().index,e);return(bo(t)?t:e)[jn]}()}return e})(),oC=(()=>{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>null})}return e})();const ib={};function Ip(e){const n=On(null);try{return e()}finally{On(n)}}function Tg(e){return!!function cC(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}class uC{constructor(){}supports(n){return Tg(n)}create(n){return new dC(n)}}const bx=(e,n)=>n;class dC{constructor(n){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=n||bx}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,s=0,c=null;for(;t||r;){const h=!r||t&&t.currentIndex{h=this._trackByFn(s,y),null!==t&&Object.is(t.trackById,h)?(r&&(t=this._verifyReinsertion(t,y,h,s)),Object.is(t.item,y)||this._addIdentityChange(t,y)):(t=this._mismatch(t,y,h,s),r=!0),t=t._next,s++}),this.length=s;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,s){let c;return null===n?c=this._itTail:(c=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,c,s)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(r,s))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,c,s)):n=this._addAfter(new pT(t,r),c,s),n}_verifyReinsertion(n,t,r,s){let c=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==c?n=this._reinsertAfter(c,n._prev,s):n.currentIndex!=s&&(n.currentIndex=s,this._addToMoves(n,s)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}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(n,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const s=n._prevRemoved,c=n._nextRemoved;return null===s?this._removalsHead=c:s._nextRemoved=c,null===c?this._removalsTail=s:c._prevRemoved=s,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){const s=null===t?this._itHead:t._next;return n._next=s,n._prev=t,null===s?this._itTail=n:s._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new xx),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,r=n._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xx),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class pT{constructor(n,t){this.item=n,this.trackById=t,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 vx{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){const t=n._prevDup,r=n._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class xx{constructor(){this.map=new Map}put(n){const t=n.trackById;let r=this.map.get(t);r||(r=new vx,this.map.set(t,r)),r.add(n)}get(n,t){const s=this.map.get(n);return s?s.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ob(e,n,t){const r=e.previousIndex;if(null===r)return r;let s=0;return t&&r{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:Ex});constructor(t){this.factories=t}static create(t,r){if(null!=r){const s=r.factories.slice();t=t.concat(s)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||Ex()),deps:[[e,new pt,new ap]]}}find(t){const r=this.factories.find(s=>s.supports(t));if(null!=r)return r;throw new _e(901,!1)}}return e})();function ih(e,n,t,r,s=!1){for(;null!==t;){const c=n[t.index];null!==c&&r.push(er(c)),Is(c)&&Rp(c,r);const h=t.type;if(8&h)ih(e,n,t.child,r);else if(32&h){const y=yp(t,n);let E;for(;E=y();)r.push(E)}else if(16&h){const y=GA(n,t);if(Array.isArray(y))r.push(...y);else{const E=Vc(n[Kr]);ih(E[mt],E,y,r,!0)}}t=s?t.projectionNext:t.next}return r}function Rp(e,n){for(let t=Nr;t!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{},consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{Qh(e.lView)},consumerOnSignalRead(){this.lView[Yh]=this}};function _C(e){return bC(e[ty])}function yC(e){return bC(e[tc])}function bC(e){for(;null!==e&&!Is(e);)e=e[tc];return e}function Dx(e){return e.ngOriginalError}class nl{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&Dx(n);for(;t&&Dx(t);)t=Dx(t);return t||null}}const ab=new $e("",{providedIn:"root",factory:()=>Xe(nl).handleError.bind(void 0)}),cb=new $e("",{providedIn:"root",factory:()=>!1}),Vn={};function Ze(e=1){fb(bi(),qe(),Xo()+e,!1)}function fb(e,n,t,r){if(!r)if(3==(3&n[_n])){const c=e.preOrderCheckHooks;null!==c&&fy(n,c,t)}else{const c=e.preOrderHooks;null!==c&&Mv(n,c,0,t)}tp(t)}function ue(e,n=fi.Default){const t=qe();return null===t?pe(e,n):aE(Un(),t,Mn(e),n)}function Og(){throw new Error("invalid")}function wC(e,n,t,r,s,c){const h=On(null);try{let y=null;s&ht.SignalBased&&(y=n[r][Rt]),null!==y&&void 0!==y.transformFn&&(c=y.transformFn(c)),s&ht.HasDecoratorInputTransform&&(c=e.inputTransforms[r].call(n,c)),null!==e.setInput?e.setInput(n,y,c,t,r):JM(n,y,r,c)}finally{On(h)}}function hb(e,n,t,r,s,c,h,y,E,M,R){const $=n.blueprint.slice();return $[Tr]=s,$[_n]=204|r,(null!==M||e&&2048&e[_n])&&($[_n]|=2048),ay($),$[yo]=$[Hm]=e,$[kr]=t,$[wu]=h||e&&e[wu],$[jn]=y||e&&e[jn],$[Ca]=E||e&&e[Ca]||null,$[ra]=c,$[ny]=function OA(){return IA++}(),$[nc]=R,$[L1]=M,$[Kr]=2==n.type?e[Kr]:$,$}function Rg(e,n,t,r,s){let c=e.data[n];if(null===c)c=function kx(e,n,t,r,s){const c=rA(),h=K1(),E=e.data[n]=function DC(e,n,t,r,s,c){let h=n?n.injectorIndex:-1,y=0;return Km()&&(y|=128),{type:t,index:r,insertBeforeIndex:null,injectorIndex:h,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:y,providerIndexes:0,value:s,attrs:c,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,h?c:c&&c.parent,t,n,r,s);return null===e.firstChild&&(e.firstChild=E),null!==c&&(h?null==c.child&&null!==E.parent&&(c.child=E):null===c.next&&(c.next=E,E.prev=c)),E}(e,n,t,r,s),function Ga(){return An.lFrame.inI18n}()&&(c.flags|=32);else if(64&c.type){c.type=t,c.value=r,c.attrs=s;const h=function Zm(){const e=An.lFrame,n=e.currentTNode;return e.isParent?n:n.parent}();c.injectorIndex=null===h?-1:h.injectorIndex}return ic(c,!0),c}function Pp(e,n,t,r){if(0===t)return-1;const s=n.length;for(let c=0;c$n&&fb(e,n,$n,!1),nt(h?2:0,s),t(r,s)}finally{tp(c),nt(h?3:1,s)}}function Ng(e,n,t){if($1(n)){const r=On(null);try{const c=n.directiveEnd;for(let h=n.directiveStart;hnull;function wT(e,n,t,r,s){for(let c in n){if(!n.hasOwnProperty(c))continue;const h=n[c];if(void 0===h)continue;r??={};let y,E=ht.None;Array.isArray(h)?(y=h[0],E=h[1]):y=h;let M=c;if(null!==s){if(!s.hasOwnProperty(c))continue;M=s[c]}0===e?rh(r,t,M,y,E):rh(r,t,M,y)}return r}function rh(e,n,t,r,s){let c;e.hasOwnProperty(t)?(c=e[t]).push(n,r):c=e[t]=[n,r],void 0!==s&&c.push(s)}function zs(e,n,t,r,s,c,h,y){const E=oa(n,t);let R,M=n.inputs;!y&&null!=M&&(R=M[r])?($g(e,t,R,r,s),zc(n)&&function mb(e,n){const t=Wa(n,e);16&t[_n]||(t[_n]|=64)}(t,n.index)):3&n.type&&(r=function pb(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),s=null!=h?h(s,n.value||"",r):s,c.setProperty(E,r,s))}function Sl(e,n,t,r){if(q1()){const s=null===r?null:{"":-1},c=function ET(e,n){const t=e.directiveRegistry;let r=null,s=null;if(t)for(let c=0;c0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(h)!=y&&h.push(y),h.push(t,r,c)}}(e,n,r,Pp(e,t,s.hostVars,Vn),s)}function No(e,n,t,r,s,c){const h=oa(e,n);!function oh(e,n,t,r,s,c,h){if(null==c)e.removeAttribute(n,s,t);else{const y=null==h?qn(c):h(c,r||"",s);e.setAttribute(n,s,y,t)}}(n[jn],h,c,e.value,t,r,s)}function Bx(e,n,t,r,s,c){const h=c[n];if(null!==h)for(let y=0;ye.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}(y,h),function Cx(e){e.lView[Yh]!==e&&(e.lView=null,Np.push(e))}(y)),Sv()}}function AT(e,n){for(let t=_C(e);null!==t;t=yC(t))for(let r=Nr;r-1&&(yg(n,r),by(t,r))}this._attachedToViewContainer=!1}bg(this._lView[mt],this._lView)}onDestroy(n){Ti(this._lView,n)}markForCheck(){Bg(this._cdRefInjectingView||this._lView)}detach(){this._lView[_n]&=-129}reattach(){Kt(this._lView),this._lView[_n]|=128}detectChanges(){this._lView[_n]|=1024,function Kc(e,n=!0){const t=e[wu],r=t.rendererFactory;r.begin?.();try{!function AC(e){Vx(e,0);let n=0;for(;ly(e);){if(100===n)throw new _e(103,!1);n++,Vx(e,1)}}(e)}catch(c){throw n&&Lg(e,c),c}finally{r.end?.(),t.inlineEffectRunner?.flush()}}(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new _e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,VA(this._lView[mt],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new _e(902,!1);this._appRef=n,Kt(this._lView)}}let Qo=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=kC}return e})();function kC(e){return function Yd(e,n,t){if(zc(e)&&!t){const r=Wa(e.index,n);return new zu(r,r)}return 47&e.type?new zu(n[Kr],n):null}(Un(),qe(),16==(16&e))}let Hp=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=jg;static#t=this.__NG_ENV_ID__=t=>t}return e})();class Vg extends Hp{constructor(n){super(),this._lView=n}onDestroy(n){return Ti(this._lView,n),()=>function cy(e,n){if(null===e[Ff])return;const t=e[Ff].indexOf(n);-1!==t&&e[Ff].splice(t,1)}(this._lView,n)}}function jg(){return new Vg(qe())}const RC=new Set;function Kd(e){RC.has(e)||(RC.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function jx(e){return n=>{setTimeout(e,void 0,n)}}const cn=class FT extends It{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,t,r){let s=n,c=t||(()=>null),h=r;if(n&&"object"==typeof n){const E=n;s=E.next?.bind(E),c=E.error?.bind(E),h=E.complete?.bind(E)}this.__isAsync&&(c=jx(c),s&&(s=jx(s)),h&&(h=jx(h)));const y=super.subscribe({next:s,error:c,complete:h});return n instanceof xn&&n.add(y),y}};function ju(...e){}class Bt{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new cn(!1),this.onMicrotaskEmpty=new cn(!1),this.onStable=new cn(!1),this.onError=new cn(!1),typeof Zone>"u")throw new _e(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&&t,s.shouldCoalesceRunChangeDetection=r,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function Ux(){const e="function"==typeof Ai.requestAnimationFrame;let n=Ai[e?"requestAnimationFrame":"setTimeout"],t=Ai[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&n&&t){const r=n[Zone.__symbol__("OriginalDelegate")];r&&(n=r);const s=t[Zone.__symbol__("OriginalDelegate")];s&&(t=s)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function NC(e){const n=()=>{!function LT(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Ai,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,Wp(e),e.isCheckStableRunning=!0,yb(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),Wp(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,s,c,h,y)=>{if(function $T(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(y))return t.invokeTask(s,c,h,y);try{return FC(e),t.invokeTask(s,c,h,y)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===c.type||e.shouldCoalesceRunChangeDetection)&&n(),PC(e)}},onInvoke:(t,r,s,c,h,y,E)=>{try{return FC(e),t.invoke(s,c,h,y,E)}finally{e.shouldCoalesceRunChangeDetection&&n(),PC(e)}},onHasTask:(t,r,s,c)=>{t.hasTask(s,c),r===s&&("microTask"==c.change?(e._hasPendingMicrotasks=c.microTask,Wp(e),yb(e)):"macroTask"==c.change&&(e.hasPendingMacrotasks=c.macroTask))},onHandleError:(t,r,s,c)=>(t.handleError(s,c),e.runOutsideAngular(()=>e.onError.emit(c)),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Bt.isInAngularZone())throw new _e(909,!1)}static assertNotInAngularZone(){if(Bt.isInAngularZone())throw new _e(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,s){const c=this._inner,h=c.scheduleEventTask("NgZoneEvent: "+s,n,PT,ju,ju);try{return c.runTask(h,t,r)}finally{c.cancelTask(h)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}}const PT={};function yb(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 Wp(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function FC(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function PC(e){e._nesting--,yb(e)}class LC{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new cn,this.onMicrotaskEmpty=new cn,this.onStable=new cn,this.onError=new cn}run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,s){return n.apply(t,r)}}var lh=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(lh||{});const Hx={destroy(){}};function bb(e,n){!n&&function Hv(e){if(!G_()&&!function K_(){return Ua}())throw new _e(-203,!1)}();const t=n?.injector??Xe(hr);if(!function Kf(e){return"browser"===(e??Xe(hr)).get(ps)}(t))return Hx;Kd("NgAfterNextRender");const r=t.get(qp),s=r.handler??=new hc,c=n?.phase??lh.MixedReadWrite,h=()=>{s.unregister(E),y()},y=t.get(Hp).onDestroy(h),E=new $C(t,c,()=>{h(),e()});return s.register(E),{destroy:h}}class $C{constructor(n,t,r){this.phase=t,this.callbackFn=r,this.zone=n.get(Bt),this.errorHandler=n.get(nl,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(n){this.errorHandler?.handleError(n)}}}class hc{constructor(){this.executingCallbacks=!1,this.buckets={[lh.EarlyRead]:new Set,[lh.Write]:new Set,[lh.MixedReadWrite]:new Set,[lh.Read]:new Set},this.deferredCallbacks=new Set}register(n){(this.executingCallbacks?this.deferredCallbacks:this.buckets[n.phase]).add(n)}unregister(n){this.buckets[n.phase].delete(n),this.deferredCallbacks.delete(n)}execute(){let n=!1;this.executingCallbacks=!0;for(const t of Object.values(this.buckets))for(const r of t)n=!0,r.invoke();this.executingCallbacks=!1;for(const t of this.deferredCallbacks)this.buckets[t.phase].add(t);return this.deferredCallbacks.clear(),n}destroy(){for(const n of Object.values(this.buckets))n.clear();this.deferredCallbacks.clear()}}let qp=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const s of t)s();return!!this.handler?.execute()||t.length>0}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>new e})}return e})();function zT(e,n){const t=Wa(n,e),r=t[mt];!function qx(e,n){for(let t=n.length;t0&&KA(e,t,c.join(" "))}}(j,Et,K,r),void 0!==t&&function HT(e,n,t){const r=e.projection=[];for(let s=0;s=0;r--){const s=e[r];s.hostVars=n+=s.hostVars,s.hostAttrs=gd(s.hostAttrs,t=gd(t,s.hostAttrs))}}(r)}function xR(e,n){for(const t in n.inputs){if(!n.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const r=n.inputs[t];if(void 0!==r&&(e.inputs[t]=r,e.declaredInputs[t]=n.declaredInputs[t],null!==n.inputTransforms)){const s=Array.isArray(r)?r[0]:r;if(!n.inputTransforms.hasOwnProperty(s))continue;e.inputTransforms??={},e.inputTransforms[s]=n.inputTransforms[s]}}}function wb(e){return e===ds?{}:e===Je?[]:e}function qT(e,n){const t=e.viewQuery;e.viewQuery=t?(r,s)=>{n(r,s),t(r,s)}:n}function UC(e,n){const t=e.contentQueries;e.contentQueries=t?(r,s,c)=>{n(r,s,c),t(r,s,c)}:n}function GT(e,n){const t=e.hostBindings;e.hostBindings=t?(r,s)=>{n(r,s),t(r,s)}:n}function Vs(e){const n=e.inputConfig,t={};for(const r in n)if(n.hasOwnProperty(r)){const s=n[r];Array.isArray(s)&&s[3]&&(t[r]=s[3])}e.inputTransforms=t}let Ab=()=>null;function Wu(e,n){return Ab(e,n)}function Dl(e,n,t,r){const s=n.tView,y=hb(e,s,t,4096&e[_n]?4096:16,null,n,null,null,null,r?.injector??null,r?.dehydratedView??null);y[Wm]=e[n.index];const M=e[Eu];return null!==M&&(y[Eu]=M.createEmbeddedView(s)),BC(s,y,t),y}function Kg(e,n){return!n||null===n.firstChild||Py(e)}function uh(e,n,t,r=!0){const s=n[mt];if(function jA(e,n,t,r){const s=Nr+r,c=t.length;r>0&&(t[s-1][tc]=n),r{class e{static#e=this.__NG_ELEMENT_ID__=Qp}return e})();function Qp(){return Jd(Un(),qe())}const YC=Jo,Tb=class extends YC{constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return nh(this._hostTNode,this._hostLView)}get injector(){return new ao(this._hostTNode,this._hostLView)}get parentInjector(){const n=rp(this._hostTNode,this._hostLView);if(zf(n)){const t=yl(n,this._hostLView),r=Vf(n);return new ao(t[mt].data[r+8],t)}return new ao(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=sw(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-Nr}createEmbeddedView(n,t,r){let s,c;"number"==typeof r?s=r:null!=r&&(s=r.index,c=r.injector);const h=Wu(this._lContainer,n.ssrId),y=n.createEmbeddedViewImpl(t||{},c,h);return this.insertImpl(y,s,Kg(this._hostTNode,h)),y}createComponent(n,t,r,s,c){const h=n&&!function yy(e){return"function"==typeof e}(n);let y;if(h)y=t;else{const K=t||{};y=K.index,r=K.injector,s=K.projectableNodes,c=K.environmentInjector||K.ngModuleRef}const E=h?n:new pc(Jn(n)),M=r||this.parentInjector;if(!c&&null==E.ngModule){const ie=(h?M:this.parentInjector).get(xo,null);ie&&(c=ie)}const R=Jn(E.componentType??{}),$=Wu(this._lContainer,R?.id??null),X=E.create(M,s,$?.firstChild??null,c);return this.insertImpl(X.hostView,y,Kg(this._hostTNode,$)),X}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){const s=n._lView;if(function _v(e){return Is(e[yo])}(s)){const y=this.indexOf(n);if(-1!==y)this.detach(y);else{const E=s[yo],M=new Tb(E,E[ra],E[yo]);M.detach(M.indexOf(n))}}const c=this._adjustIndex(t),h=this._lContainer;return uh(h,s,c,r),n.attachToViewContainerRef(),Tu(Jp(h),c,n),n}move(n,t){return this.insert(n,t)}indexOf(n){const t=sw(this._lContainer);return null!==t?t.indexOf(n):-1}remove(n){const t=this._adjustIndex(n,-1),r=yg(this._lContainer,t);r&&(by(Jp(this._lContainer),t),bg(r[mt],r))}detach(n){const t=this._adjustIndex(n,-1),r=yg(this._lContainer,t);return r&&null!=by(Jp(this._lContainer),t)?new zu(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function sw(e){return e[8]}function Jp(e){return e[8]||(e[8]=[])}function Jd(e,n){let t;const r=n[e.index];return Is(r)?t=r:(t=ST(r,n,null,e),n[e.index]=t,zx(n,t)),KC(t,n,e,r),new Tb(t,e,n)}let KC=function fh(e,n,t,r){if(e[$c])return;let s;s=8&t.type?er(r):function aw(e,n){const t=e[jn],r=t.createComment(""),s=oa(n,e);return bp(t,sx(t,s),r,function sR(e,n){return e.nextSibling(n)}(t,s),!1),r}(n,t),e[$c]=s},lw=()=>!1;function qu(e,n,t){return e[n]=t}function Ur(e,n,t){return!Object.is(e[n],t)&&(e[n]=t,!0)}function en(e,n,t,r,s,c,h,y){const E=qe(),M=bi(),R=e+$n,$=M.firstCreatePass?function cw(e,n,t,r,s,c,h,y,E){const M=n.consts,R=Rg(n,e,4,h||null,qo(M,y));Sl(n,t,R,qo(M,E)),Qm(n,R);const $=R.tView=Nx(2,R,r,s,c,n.directiveRegistry,n.pipeRegistry,null,n.schemas,M,null);return null!==n.queries&&(n.queries.template(n,R),$.queries=n.queries.embeddedTView(R)),R}(R,M,E,n,t,r,s,c,h):M.data[R];ic($,!1);const j=JC(M,E,$,e);eE()&&ax(M,E,j,$),Ps(j,E);const X=ST(j,E,j,$);return E[R]=X,zx(E,X),function dh(e,n,t){return lw(e,n,t)}(X,$,E),cv($)&&Lp(M,E,$),null!=h&&Ox(E,$,y),en}let JC=function Ib(e,n,t,r){return Bf(!0),n[jn].createComment("")};function hi(e,n,t,r){const s=qe();return Ur(s,Sa(),n)&&(bi(),No(Er(),s,e,n,t,r)),hi}function mw(e,n,t,r){return Ur(e,Sa(),t)?n+qn(t)+r:Vn}function dk(e,n){return e<<17|n<<2}function o_(e){return e>>17&32767}function fk(e){return 2|e}function s_(e){return(131068&e)>>2}function RR(e,n){return-131069&e|n<<2}function hk(e){return 1|e}function pk(e,n,t,r){const s=e[t+1],c=null===n;let h=r?o_(s):s_(s),y=!1;for(;0!==h&&(!1===y||c);){const M=e[h+1];js(e[h],n)&&(y=!0,e[h+1]=r?hk(M):fk(M)),h=r?o_(M):s_(M)}y&&(e[t+1]=r?fk(s):hk(s))}function js(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&Qr(e,n)>=0}const mr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function NR(e){return e.substring(mr.key,mr.keyEnd)}function rm(e,n){const t=mr.textEnd;return t===n?-1:(n=mr.keyEnd=function e8(e,n,t){for(;n32;)n++;return n}(e,mr.key=n,t),bw(e,n,t))}function bw(e,n,t){for(;n=0;t=rm(n,t))bl(e,NR(n),!0)}function vc(e,n,t,r){const s=qe(),c=bi(),h=bd(2);c.firstUpdatePass&&FR(c,e,h,r),n!==Vn&&Ur(s,h,n)&&M3(c,c.data[Xo()],s,s[jn],e,s[h+1]=function A3(e,n){return null==e||""===e||("string"==typeof n?e+=n:"object"==typeof e&&(e=go(Ja(e)))),e}(n,t),r,h)}function rf(e,n,t,r){const s=bi(),c=bd(2);s.firstUpdatePass&&FR(s,null,c,r);const h=qe();if(t!==Vn&&Ur(h,c,t)){const y=s.data[Xo()];if(T3(y,r)&&!S3(s,c)){let E=r?y.classesWithoutHost:y.stylesWithoutHost;null!==E&&(t=EM(E,t||"")),Bb(s,y,h,t,r)}else!function D3(e,n,t,r,s,c,h,y){s===Vn&&(s=Je);let E=0,M=0,R=0=e.expandoStartIndex}function FR(e,n,t,r){const s=e.data;if(null===s[t+1]){const c=s[Xo()],h=S3(e,t);T3(c,r)&&null===n&&!h&&(n=!1),n=function _k(e,n,t,r){const s=rc(e);let c=r?n.residualClasses:n.residualStyles;if(null===s)0===(r?n.classBindings:n.styleBindings)&&(t=om(t=sS(null,e,n,t,r),n.attrs,r),c=null);else{const h=n.directiveStylingLast;if(-1===h||e[h]!==s)if(t=sS(s,e,n,t,r),null===c){let E=function yk(e,n,t){const r=t?n.classBindings:n.styleBindings;if(0!==s_(r))return e[o_(r)]}(e,n,r);void 0!==E&&Array.isArray(E)&&(E=sS(null,e,n,E[1],r),E=om(E,n.attrs,r),function bk(e,n,t,r){e[o_(t?n.classBindings:n.styleBindings)]=r}(e,n,r,E))}else c=function t8(e,n,t){let r;const s=n.directiveEnd;for(let c=1+n.directiveStylingLast;c0)&&(M=!0)):R=t,s)if(0!==E){const j=o_(e[y+1]);e[r+1]=dk(j,y),0!==j&&(e[j+1]=RR(e[j+1],r)),e[y+1]=function OR(e,n){return 131071&e|n<<17}(e[y+1],r)}else e[r+1]=dk(y,0),0!==y&&(e[y+1]=RR(e[y+1],r)),y=r;else e[r+1]=dk(E,0),0===y?y=r:e[E+1]=RR(e[E+1],r),E=r;M&&(e[r+1]=fk(e[r+1])),pk(e,R,r,!0),pk(e,R,r,!1),function a_(e,n,t,r,s){const c=s?e.residualClasses:e.residualStyles;null!=c&&"string"==typeof n&&Qr(c,n)>=0&&(t[r+1]=hk(t[r+1]))}(n,R,e,r,c),h=dk(y,E),c?n.classBindings=h:n.styleBindings=h}(s,c,n,t,h,r)}}function sS(e,n,t,r,s){let c=null;const h=t.directiveEnd;let y=t.directiveStylingLast;for(-1===y?y=t.directiveStart:y++;y0;){const E=e[s],M=Array.isArray(E),R=M?E[1]:E,$=null===R;let j=t[s+1];j===Vn&&(j=$?Je:void 0);let X=$?dt(j,r):R===r?j:void 0;if(M&&!aS(X)&&(X=dt(E,r)),aS(X)&&(y=X,h))return y;const K=e[s+1];s=h?o_(K):s_(K)}if(null!==n){let E=c?n.residualClasses:n.residualStyles;null!=E&&(y=dt(E,r))}return y}function aS(e){return void 0!==e}function T3(e,n){return 0!=(e.flags&(n?8:16))}function eo(e,n,t){Kd("NgControlFlow");const r=qe(),s=Sa(),c=function WR(e,n){return e[n]}(r,$n+e);if(Ur(r,s,n)){const y=On(null);try{if(function Zg(e,n){const t=yg(e,n);return void 0!==t&&bg(t[mt],t),t}(c,0),-1!==n){const E=function qR(e,n){return gl(e,n)}(r[mt],$n+n),M=Wu(c,E.tView.ssrId);uh(c,Dl(r,E,t,{dehydratedView:M}),0,Kg(E,M))}}finally{On(y)}}else{const y=function JT(e,n){const t=Nr+n;if(t(Bf(!0),zy(r,s,function aA(){return An.lFrame.currentNamespace}()));function es(e,n,t){const r=qe(),s=bi(),c=e+$n,h=s.firstCreatePass?function B3(e,n,t,r,s){const c=n.consts,h=qo(c,r),y=Rg(n,e,8,"ng-container",h);return null!==h&&vb(y,h,!0),Sl(n,t,y,qo(c,s)),null!==n.queries&&n.queries.elementStart(n,y),y}(c,s,r,n,t):s.data[c];ic(h,!0);const y=XR(s,r,h,e);return r[c]=y,eE()&&ax(s,r,y,h),Ps(y,r),cv(h)&&(Lp(s,r,h),Ng(s,h,r)),null!=t&&Ox(r,h),es}function xw(){let e=Un();const n=bi();return K1()?yd():(e=e.parent,ic(e,!1)),n.firstCreatePass&&(Qm(n,e),$1(e)&&n.queries.elementEnd(e)),xw}function zb(e,n,t){return es(e,n,t),xw(),zb}let XR=(e,n,t,r)=>(Bf(!0),nx(n[jn],""));function Oa(){return qe()}function Vb(e,n,t){const r=qe();return Ur(r,Sa(),n)&&zs(bi(),Er(),r,e,n,r[jn],t,!0),Vb}function YR(e,n,t){const r=qe();if(Ur(r,Sa(),n)){const c=bi(),h=Er();zs(c,h,r,e,n,Xd(rc(c.data),h,r),t,!0)}return YR}const Al=void 0;var f8=["en",[["a","p"],["AM","PM"],Al],[["AM","PM"],Al,Al],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Al,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Al,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Al,"{1} 'at' {0}",Al],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function ol(e){const t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===r?1:5}];let bh={};function Po(e){const n=function sf(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=ZR(n);if(t)return t;const r=n.split("-")[0];if(t=ZR(r),t)return t;if("en"===r)return f8;throw new _e(701,!1)}function ZR(e){return e in bh||(bh[e]=Ai.ng&&Ai.ng.common&&Ai.ng.common.locales&&Ai.ng.common.locales[e]),bh[e]}var Hr=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Hr||{});const jb="en-US";let JR=jb;function Cw(e){return!!e&&"function"==typeof e.then}function fB(e){return!!e&&"function"==typeof e.subscribe}function yn(e,n,t,r){const s=qe(),c=bi(),h=Un();return _N(c,s,s[jn],h,e,n,r),yn}function gN(e,n){const t=Un(),r=qe(),s=bi();return _N(s,r,Xd(rc(s.data),t,r),t,e,n),gN}function _N(e,n,t,r,s,c,h){const y=cv(r),M=e.firstCreatePass&&Up(e),R=n[kr],$=Gd(n);let j=!0;if(3&r.type||h){const ie=oa(r,n),me=h?h(ie):ie,Me=$.length,Ce=h?Mt=>h(er(Mt[r.index])):r.index;let rt=null;if(!h&&y&&(rt=function kk(e,n,t,r){const s=e.cleanup;if(null!=s)for(let c=0;cE?y[E]:null}"string"==typeof h&&(c+=2)}return null}(e,n,s,r.index)),null!==rt)(rt.__ngLastListenerFn__||rt).__ngNextListenerFn__=c,rt.__ngLastListenerFn__=c,j=!1;else{c=pB(r,n,R,c,!1);const Mt=t.listen(me,s,c);$.push(c,Mt),M&&M.push(s,Ce,Me,Me+1)}}else c=pB(r,n,R,c,!1);const X=r.outputs;let K;if(j&&null!==X&&(K=X[s])){const ie=K.length;if(ie)for(let me=0;me-1?Wa(e.index,n):n);let E=hB(n,t,r,h),M=c.__ngNextListenerFn__;for(;M;)E=hB(n,t,M,h)&&E,M=M.__ngNextListenerFn__;return s&&!1===E&&h.preventDefault(),E}}function on(e=1){return function Dv(e){return(An.lFrame.contextLView=function iA(e,n){for(;e>0;)n=n[Hm],e--;return n}(e,An.lFrame.contextLView))[kr]}(e)}function T8(e,n){let t=null;const r=function R2(e){const n=e.attrs;if(null!=n){const t=n.indexOf(5);if(!(1&t))return n[t+1]}return null}(e);for(let s=0;s{class e{static#e=this.__NG_ELEMENT_ID__=k8}return e})();const xB=Yu,wB=class extends xB{constructor(n,t,r){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,t){return this.createEmbeddedViewImpl(n,t)}createEmbeddedViewImpl(n,t,r){const s=Dl(this._declarationLView,this._declarationTContainer,n,{injector:t,dehydratedView:r});return new zu(s)}};function k8(){return Ik(Un(),qe())}function Ik(e,n){return 4&e.type?new wB(n,e,nh(e,n)):null}class xN{constructor(n){this.queryList=n,this.matches=null}clone(){return new xN(this.queryList)}setDirty(){this.queryList.setDirty()}}class wN{constructor(n=[]){this.queries=n}createEmbeddedView(n){const t=n.queries;if(null!==t){const r=null!==n.contentQueries?n.contentQueries[0]:t.length,s=[];for(let c=0;c0)r.push(h[y/2]);else{const M=c[y+1],R=n[-E];for(let $=Nr;$(Bf(!0),function Ld(e,n){return e.createText(n)}(n[jn],r));function Pr(e){return lf("",e,""),Pr}function lf(e,n,t){const r=qe(),s=mw(r,e,n,t);return s!==Vn&&function Yn(e,n,t){const r=sy(n,e);!function tx(e,n,t){e.setValue(n,t)}(e[jn],r,t)}(r,Xo(),s),lf}function Sw(e,n,t,r,s){if(e=Mn(e),Array.isArray(e))for(let c=0;c>20;if(Ou(e)||!e.multi){const X=new ze(M,s,ue),K=Dw(E,n,s?R:R+j,$);-1===K?(Au(hy(y,h),c,E),_i(c,e,n.length),n.push(E),y.directiveStart++,y.directiveEnd++,s&&(y.providerIndexes+=1048576),t.push(X),h.push(X)):(t[K]=X,h[K]=X)}else{const X=Dw(E,n,R+j,$),K=Dw(E,n,R,R+j),me=K>=0&&t[K];if(s&&!me||!s&&!(X>=0&&t[X])){Au(hy(y,h),c,E);const Me=function Vi(e,n,t,r,s){const c=new ze(e,t,ue);return c.multi=[],c.index=n,c.componentProviders=0,Eo(c,s,r&&!t),c}(s?ts:Ol,t.length,s,r,M);!s&&me&&(t[K].providerFactory=Me),_i(c,e,n.length,0),n.push(E),y.directiveStart++,y.directiveEnd++,s&&(y.providerIndexes+=1048576),t.push(Me),h.push(Me)}else _i(c,e,X>-1?X:K,Eo(t[s?K:X],M,!s&&r));!s&&r&&me&&t[K].componentProviders++}}}function _i(e,n,t,r){const s=Ou(n),c=function Bv(e){return!!e.useClass}(n);if(s||c){const E=(c?Mn(n.useClass):n).prototype.ngOnDestroy;if(E){const M=e.destroyHooks||(e.destroyHooks=[]);if(!s&&n.multi){const R=M.indexOf(t);-1===R?M.push(t,[r,E]):M[R+1].push(r,E)}else M.push(t,E)}}}function Eo(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Dw(e,n,t,r){for(let s=t;s{t.providersResolver=(r,s)=>function bn(e,n,t){const r=bi();if(r.firstCreatePass){const s=ml(e);Sw(t,r.data,r.blueprint,s,!0),Sw(n,r.data,r.blueprint,s,!1)}}(r,s?s(e):e,n)}}class ma{}class vn{}class IB extends ma{constructor(n,t,r){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new zC(this);const s=ia(n);this._bootstrapComponents=xl(s.bootstrap),this._r3Injector=wE(n,t,[{provide:ma,useValue:this},{provide:Ag,useValue:this.componentFactoryResolver},...r],go(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class gS extends vn{constructor(n){super(),this.moduleType=n}create(n){return new IB(this.moduleType,n,[])}}class Bk extends ma{constructor(n){super(),this.componentFactoryResolver=new zC(this),this.instance=null;const t=new Yf([...n.providers,{provide:ma,useValue:this},{provide:Ag,useValue:this.componentFactoryResolver}],n.parent||Id(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function fn(e,n,t=null){return new Bk({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}let Ku=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const r=up(0,t.type),s=r.length>0?fn([r],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=Ue({token:e,providedIn:"environment",factory:()=>new e(pe(xo))})}return e})();function xi(e){Kd("NgStandalone"),e.getStandaloneInjector=n=>n.get(Ku).getOrCreateStandaloneInjector(e)}function f_(e,n,t){const r=Os()+e,s=qe();return s[r]===Vn?qu(s,r,t?n.call(t):n()):function Qg(e,n){return e[n]}(s,r)}function wc(e,n){const t=e[n];return t===Vn?void 0:t}function cf(e,n,t,r,s,c){const h=n+t;return Ur(e,h,s)?qu(e,h+1,c?r.call(c,s):r(s)):wc(e,h+1)}function Zu(e,n,t,r,s,c,h){const y=n+t;return function hh(e,n,t,r){const s=Ur(e,n,t);return Ur(e,n+1,r)||s}(e,y,s,c)?qu(e,y+2,h?r.call(h,s,c):r(s,c)):wc(e,y+2)}function uf(e,n){const t=bi();let r;const s=e+$n;t.firstCreatePass?(r=function BB(e,n){if(n)for(let t=n.length-1;t>=0;t--){const r=n[t];if(e===r.name)return r}}(n,t.pipeRegistry),t.data[s]=r,r.onDestroy&&(t.destroyHooks??=[]).push(s,r.onDestroy)):r=t.data[s];const c=r.factory||(r.factory=Kh(r.type)),y=us(ue);try{const E=eg(!1),M=c();return eg(E),function F8(e,n,t,r){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=r}(t,qe(),s,M),M}finally{us(y)}}function cm(e,n,t){const r=e+$n,s=qe(),c=Zh(s,r);return Yb(s,r)?cf(s,Os(),n,c.transform,t,c):c.transform(t)}function Wk(e,n,t,r){const s=e+$n,c=qe(),h=Zh(c,s);return Yb(c,s)?Zu(c,Os(),n,h.transform,t,r,h):h.transform(t,r)}function Yb(e,n){return e[mt].data[n].pure}function qk(e,n){return Ik(e,n)}let tF=(()=>{class e{log(t){console.log(t)}warn(t){console.warn(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();class c6{constructor(n,t){this.ngModuleFactory=n,this.componentFactories=t}}let nF=(()=>{class e{compileModuleSync(t){return new gS(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const r=this.compileModuleSync(t),c=xl(ia(t).declarations).reduce((h,y)=>{const E=Jn(y);return E&&h.push(new pc(E)),h},[]);return new c6(r,c)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Fw=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new wr(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const pz=new $e(""),kS=new $e("");let sF,oF=(()=>{class e{constructor(t,r,s){this._ngZone=t,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,sF||(function w6(e){sF=e}(s),s.addToWindow(r)),this._watchAngularEvents(),t.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:()=>{Bt.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,s){let c=-1;r&&r>0&&(c=setTimeout(()=>{this._callbacks=this._callbacks.filter(h=>h.timeoutId!==c),t()},r)),this._callbacks.push({doneCb:t,timeoutId:c,updateCb:s})}whenStable(t,r,s){if(s&&!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(t,r,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,r,s){return[]}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bt),pe(iI),pe(kS))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),iI=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return sF?.findTestabilityInTree(this,t,r)??null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const rI=new $e("");let aF=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),this.appInits=Xe(rI,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const s of this.appInits){const c=s();if(Cw(c))t.push(c);else if(fB(c)){const h=new Promise((y,E)=>{c.subscribe({complete:y,error:E})});t.push(h)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(s=>{this.reject(s)}),0===t.length&&r(),this.initialized=!0}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const $w=new $e("");function S6(e,n){return Array.isArray(n)?n.reduce(S6,e):{...e,...n}}let Kb=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Xe(ab),this.afterRenderEffectManager=Xe(qp),this.componentTypes=[],this.components=[],this.isStable=Xe(Fw).hasPendingTasks.pipe(ye(t=>!t)),this._injector=Xe(xo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,r){const s=t instanceof Hd;if(!this._injector.get(aF).done)throw!s&&function Nf(e){const n=Jn(e)||Wo(e)||ks(e);return null!==n&&n.standalone}(t),new _e(405,!1);let h;h=s?t:this._injector.get(Ag).resolveComponentFactory(t),this.componentTypes.push(h.componentType);const y=function gz(e){return e.isBoundToModule}(h)?void 0:this._injector.get(ma),M=h.create(hr.NULL,[],r||h.selector,y),R=M.location.nativeElement,$=M.injector.get(pz,null);return $?.registerApplication(R),M.onDestroy(()=>{this.detachView(M.hostView),lF(this.components,M),$?.unregisterApplication(R)}),this._loadComponent(M),M}tick(){if(this._runningTick)throw new _e(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this.internalErrorHandler(t)}finally{try{this.afterRenderEffectManager.execute()}catch(t){this.internalErrorHandler(t)}this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;lF(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const r=this._injector.get($w,[]);[...this._bootstrapListeners,...r].forEach(s=>s(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>lF(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new _e(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lF(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}let yz=(()=>{class e{constructor(){this.zone=Xe(Bt),this.applicationRef=Xe(Kb)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rY(){const e=Xe(Bt),n=Xe(nl);return t=>e.runOutsideAngular(()=>n.handleError(t))}let sI=(()=>{class e{constructor(){this.subscription=new xn,this.initialized=!1,this.zone=Xe(Bt),this.pendingTasks=Xe(Fw)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Bt.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Bt.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const df=new $e("",{providedIn:"root",factory:()=>Xe(df,fi.Optional|fi.SkipSelf)||function sY(){return typeof $localize<"u"&&$localize.locale||jb}()}),vz=new $e("");let cF=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const s=function yR(e="zone.js",n){return"noop"===e?new LC:"zone.js"===e?new Bt(n):e}(r?.ngZone,function M6(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing}));return s.run(()=>{const c=function $k(e,n,t){return new IB(e,n,t)}(t.moduleType,this.injector,function D6(e){return[{provide:Bt,useFactory:e},{provide:qc,multi:!0,useFactory:()=>{const n=Xe(yz,{optional:!0});return()=>n.initialize()}},{provide:qc,multi:!0,useFactory:()=>{const n=Xe(sI);return()=>{n.initialize()}}},{provide:ab,useFactory:rY}]}(()=>s)),h=c.injector.get(nl,null);return s.runOutsideAngular(()=>{const y=s.onError.subscribe({next:E=>{h.handleError(E)}});c.onDestroy(()=>{lF(this._modules,c),y.unsubscribe()})}),function _z(e,n,t){try{const r=t();return Cw(r)?r.catch(s=>{throw n.runOutsideAngular(()=>e.handleError(s)),s}):r}catch(r){throw n.runOutsideAngular(()=>e.handleError(r)),r}}(h,s,()=>{const y=c.injector.get(aF);return y.runInitializers(),y.donePromise.then(()=>(function eN(e){Rr(e,"Expected localeId to be defined"),"string"==typeof e&&(JR=e.toLowerCase().replace(/_/g,"-"))}(c.injector.get(df,jb)||jb),this._moduleDoBootstrap(c),c))})})}bootstrapModule(t,r=[]){const s=S6({},r);return function E6(e,n,t){const r=new gS(t);return Promise.resolve(r)}(0,0,t).then(c=>this.bootstrapModuleFactory(c,s))}_moduleDoBootstrap(t){const r=t.injector.get(Kb);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(s=>r.bootstrap(s));else{if(!t.instance.ngDoBootstrap)throw new _e(-403,!1);t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new _e(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const t=this._injector.get(vz,null);t&&(t.forEach(r=>r()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(r){return new(r||e)(pe(hr))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),Qb=null;const A6=new $e("");function T6(e,n,t=[]){const r=`Platform: ${n}`,s=new $e(r);return(c=[])=>{let h=wz();if(!h||h.injector.get(A6,!1)){const y=[...t,...c,{provide:s,useValue:!0}];e?e(y):function cY(e){if(Qb&&!Qb.get(A6,!1))throw new _e(400,!1);(function mz(){!function li(e){$t=e}(()=>{throw new _e(600,!1)})})(),Qb=e;const n=e.get(cF);(function I6(e){e.get(Gv,null)?.forEach(t=>t())})(e)}(function k6(e=[],n){return hr.create({name:n,providers:[{provide:wy,useValue:"platform"},{provide:vz,useValue:new Set([()=>Qb=null])},...e]})}(y,r))}return function xz(e){const n=wz();if(!n)throw new _e(401,!1);return n}()}}function wz(){return Qb?.get(cF)??null}const Mz=T6(null,"core",[]);let gF=(()=>{class e{constructor(t){}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Kb))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();function cr(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function jw(e,n=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?n:Number(e)}let qz=null;function y_(){return qz}class Q6{}const mi=new $e("");let AF=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(J6),providedIn:"platform"})}return e})();const Gz=new $e("");let J6=(()=>{class e extends AF{constructor(){super(),this._doc=Xe(mi),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return y_().getBaseHref(this._doc)}onPopState(t){const r=y_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=y_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,r,s){this._history.pushState(t,r,s)}replaceState(t,r,s){this._history.replaceState(t,r,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function TF(e,n){if(0==e.length)return n;if(0==n.length)return e;let t=0;return e.endsWith("/")&&t++,n.startsWith("/")&&t++,2==t?e+n.substring(1):1==t?e+n:e+"/"+n}function Xz(e){const n=e.match(/#|\?|$/),t=n&&n.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function wh(e){return e&&"?"!==e[0]?"?"+e:e}let hf=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Yz),providedIn:"root"})}return e})();const yI=new $e("");let Yz=(()=>{class e extends hf{constructor(t,r){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??Xe(mi).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return TF(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+wh(this._platformLocation.search),s=this._platformLocation.hash;return s&&t?`${r}${s}`:r}pushState(t,r,s,c){const h=this.prepareExternalUrl(s+wh(c));this._platformLocation.pushState(t,r,h)}replaceState(t,r,s,c){const h=this.prepareExternalUrl(s+wh(c));this._platformLocation.replaceState(t,r,h)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(AF),pe(yI,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Kz=(()=>{class e extends hf{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){const r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=TF(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,s,c){let h=this.prepareExternalUrl(s+wh(c));0==h.length&&(h=this._platformLocation.pathname),this._platformLocation.pushState(t,r,h)}replaceState(t,r,s,c){let h=this.prepareExternalUrl(s+wh(c));0==h.length&&(h=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,h)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(AF),pe(yI,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),mm=(()=>{class e{constructor(t){this._subject=new cn,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const r=this._locationStrategy.getBaseHref();this._basePath=function nH(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(Xz(kF(r))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+wh(r))}normalize(t){return e.stripTrailingSlash(function tH(e,n){if(!e||!n.startsWith(e))return n;const t=n.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:n}(this._basePath,kF(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,r="",s=null){this._locationStrategy.pushState(s,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wh(r)),s)}replaceState(t,r="",s=null){this._locationStrategy.replaceState(s,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wh(r)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{const r=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(s=>s(t,r))}subscribe(t,r,s){return this._subject.subscribe({next:t,error:r,complete:s})}static#e=this.normalizeQueryParams=wh;static#t=this.joinWithSlash=TF;static#n=this.stripTrailingSlash=Xz;static#i=this.\u0275fac=function(r){return new(r||e)(pe(hf))};static#r=this.\u0275prov=Ue({token:e,factory:()=>function eH(){return new mm(pe(hf))}(),providedIn:"root"})}return e})();function kF(e){return e.replace(/\/index.html$/,"")}var Fl=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Fl||{}),Lr=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Lr||{}),tu=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(tu||{}),ns=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e.Infinity=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}(ns||{});function vI(e,n){return Ju(Po(e)[Hr.DateFormat],n)}function xI(e,n){return Ju(Po(e)[Hr.TimeFormat],n)}function Hw(e,n){return Ju(Po(e)[Hr.DateTimeFormat],n)}function Qu(e,n){const t=Po(e),r=t[Hr.NumberSymbols][n];if(typeof r>"u"){if(n===ns.CurrencyDecimal)return t[Hr.NumberSymbols][ns.Decimal];if(n===ns.CurrencyGroup)return t[Hr.NumberSymbols][ns.Group]}return r}function OF(e){if(!e[Hr.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Hr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Ju(e,n){for(let t=n;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function EI(e){const[n,t]=e.split(":");return{hours:+n,minutes:+t}}const UY=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,LS={},hH=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ed=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(ed||{}),nr=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(nr||{}),Yi=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(Yi||{});function pH(e,n,t,r){let s=function yH(e){if(e5(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[s,c=1,h=1]=e.split("-").map(y=>+y);return CI(s,c-1,h)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let r;if(r=e.match(UY))return function Jz(e){const n=new Date(0);let t=0,r=0;const s=e[8]?n.setUTCFullYear:n.setFullYear,c=e[8]?n.setUTCHours:n.setHours;e[9]&&(t=Number(e[9]+e[10]),r=Number(e[9]+e[11])),s.call(n,Number(e[1]),Number(e[2])-1,Number(e[3]));const h=Number(e[4]||0)-t,y=Number(e[5]||0)-r,E=Number(e[6]||0),M=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return c.call(n,h,y,E,M),n}(r)}const n=new Date(e);if(!e5(n))throw new Error(`Unable to convert "${e}" into a date`);return n}(e);n=nu(t,n)||n;let y,h=[];for(;n;){if(y=hH.exec(n),!y){h.push(n);break}{h=h.concat(y.slice(1));const R=h.pop();if(!R)break;n=R}}let E=s.getTimezoneOffset();r&&(E=PF(r,E),s=function _H(e,n,t){const r=t?-1:1,s=e.getTimezoneOffset();return function LF(e,n){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+n),e}(e,r*(PF(n,s)-s))}(s,r,!0));let M="";return h.forEach(R=>{const $=function gH(e){if(FF[e])return FF[e];let n;switch(e){case"G":case"GG":case"GGG":n=$r(Yi.Eras,Lr.Abbreviated);break;case"GGGG":n=$r(Yi.Eras,Lr.Wide);break;case"GGGGG":n=$r(Yi.Eras,Lr.Narrow);break;case"y":n=is(nr.FullYear,1,0,!1,!0);break;case"yy":n=is(nr.FullYear,2,0,!0,!0);break;case"yyy":n=is(nr.FullYear,3,0,!1,!0);break;case"yyyy":n=is(nr.FullYear,4,0,!1,!0);break;case"Y":n=b_(1);break;case"YY":n=b_(2,!0);break;case"YYY":n=b_(3);break;case"YYYY":n=b_(4);break;case"M":case"L":n=is(nr.Month,1,1);break;case"MM":case"LL":n=is(nr.Month,2,1);break;case"MMM":n=$r(Yi.Months,Lr.Abbreviated);break;case"MMMM":n=$r(Yi.Months,Lr.Wide);break;case"MMMMM":n=$r(Yi.Months,Lr.Narrow);break;case"LLL":n=$r(Yi.Months,Lr.Abbreviated,Fl.Standalone);break;case"LLLL":n=$r(Yi.Months,Lr.Wide,Fl.Standalone);break;case"LLLLL":n=$r(Yi.Months,Lr.Narrow,Fl.Standalone);break;case"w":n=MI(1);break;case"ww":n=MI(2);break;case"W":n=MI(1,!0);break;case"d":n=is(nr.Date,1);break;case"dd":n=is(nr.Date,2);break;case"c":case"cc":n=is(nr.Day,1);break;case"ccc":n=$r(Yi.Days,Lr.Abbreviated,Fl.Standalone);break;case"cccc":n=$r(Yi.Days,Lr.Wide,Fl.Standalone);break;case"ccccc":n=$r(Yi.Days,Lr.Narrow,Fl.Standalone);break;case"cccccc":n=$r(Yi.Days,Lr.Short,Fl.Standalone);break;case"E":case"EE":case"EEE":n=$r(Yi.Days,Lr.Abbreviated);break;case"EEEE":n=$r(Yi.Days,Lr.Wide);break;case"EEEEE":n=$r(Yi.Days,Lr.Narrow);break;case"EEEEEE":n=$r(Yi.Days,Lr.Short);break;case"a":case"aa":case"aaa":n=$r(Yi.DayPeriods,Lr.Abbreviated);break;case"aaaa":n=$r(Yi.DayPeriods,Lr.Wide);break;case"aaaaa":n=$r(Yi.DayPeriods,Lr.Narrow);break;case"b":case"bb":case"bbb":n=$r(Yi.DayPeriods,Lr.Abbreviated,Fl.Standalone,!0);break;case"bbbb":n=$r(Yi.DayPeriods,Lr.Wide,Fl.Standalone,!0);break;case"bbbbb":n=$r(Yi.DayPeriods,Lr.Narrow,Fl.Standalone,!0);break;case"B":case"BB":case"BBB":n=$r(Yi.DayPeriods,Lr.Abbreviated,Fl.Format,!0);break;case"BBBB":n=$r(Yi.DayPeriods,Lr.Wide,Fl.Format,!0);break;case"BBBBB":n=$r(Yi.DayPeriods,Lr.Narrow,Fl.Format,!0);break;case"h":n=is(nr.Hours,1,-12);break;case"hh":n=is(nr.Hours,2,-12);break;case"H":n=is(nr.Hours,1);break;case"HH":n=is(nr.Hours,2);break;case"m":n=is(nr.Minutes,1);break;case"mm":n=is(nr.Minutes,2);break;case"s":n=is(nr.Seconds,1);break;case"ss":n=is(nr.Seconds,2);break;case"S":n=is(nr.FractionalSeconds,1);break;case"SS":n=is(nr.FractionalSeconds,2);break;case"SSS":n=is(nr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=DI(ed.Short);break;case"ZZZZZ":n=DI(ed.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=DI(ed.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=DI(ed.Long);break;default:return null}return FF[e]=n,n}(R);M+=$?$(s,t,E):"''"===R?"'":R.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),M}function CI(e,n,t){const r=new Date(0);return r.setFullYear(e,n,t),r.setHours(0,0,0),r}function nu(e,n){const t=function rH(e){return Po(e)[Hr.LocaleId]}(e);if(LS[t]??={},LS[t][n])return LS[t][n];let r="";switch(n){case"shortDate":r=vI(e,tu.Short);break;case"mediumDate":r=vI(e,tu.Medium);break;case"longDate":r=vI(e,tu.Long);break;case"fullDate":r=vI(e,tu.Full);break;case"shortTime":r=xI(e,tu.Short);break;case"mediumTime":r=xI(e,tu.Medium);break;case"longTime":r=xI(e,tu.Long);break;case"fullTime":r=xI(e,tu.Full);break;case"short":const s=nu(e,"shortTime"),c=nu(e,"shortDate");r=$S(Hw(e,tu.Short),[s,c]);break;case"medium":const h=nu(e,"mediumTime"),y=nu(e,"mediumDate");r=$S(Hw(e,tu.Medium),[h,y]);break;case"long":const E=nu(e,"longTime"),M=nu(e,"longDate");r=$S(Hw(e,tu.Long),[E,M]);break;case"full":const R=nu(e,"fullTime"),$=nu(e,"fullDate");r=$S(Hw(e,tu.Full),[R,$])}return r&&(LS[t][n]=r),r}function $S(e,n){return n&&(e=e.replace(/\{([^}]+)}/g,function(t,r){return null!=n&&r in n?n[r]:t})),e}function td(e,n,t="-",r,s){let c="";(e<0||s&&e<=0)&&(s?e=1-e:(e=-e,c=t));let h=String(e);for(;h.length0||y>-t)&&(y+=t),e===nr.Hours)0===y&&-12===t&&(y=12);else if(e===nr.FractionalSeconds)return function Qz(e,n){return td(e,3).substring(0,n)}(y,n);const E=Qu(h,ns.MinusSign);return td(y,n,E,r,s)}}function $r(e,n,t=Fl.Format,r=!1){return function(s,c){return function HY(e,n,t,r,s,c){switch(t){case Yi.Months:return function aH(e,n,t){const r=Po(e),c=Ju([r[Hr.MonthsFormat],r[Hr.MonthsStandalone]],n);return Ju(c,t)}(n,s,r)[e.getMonth()];case Yi.Days:return function sH(e,n,t){const r=Po(e),c=Ju([r[Hr.DaysFormat],r[Hr.DaysStandalone]],n);return Ju(c,t)}(n,s,r)[e.getDay()];case Yi.DayPeriods:const h=e.getHours(),y=e.getMinutes();if(c){const M=function n0(e){const n=Po(e);return OF(n),(n[Hr.ExtraData][2]||[]).map(r=>"string"==typeof r?EI(r):[EI(r[0]),EI(r[1])])}(n),R=function qw(e,n,t){const r=Po(e);OF(r);const c=Ju([r[Hr.ExtraData][0],r[Hr.ExtraData][1]],n)||[];return Ju(c,t)||[]}(n,s,r),$=M.findIndex(j=>{if(Array.isArray(j)){const[X,K]=j,ie=h>=X.hours&&y>=X.minutes,me=h0?Math.floor(s/60):Math.ceil(s/60);switch(e){case ed.Short:return(s>=0?"+":"")+td(h,2,c)+td(Math.abs(s%60),2,c);case ed.ShortGMT:return"GMT"+(s>=0?"+":"")+td(h,1,c);case ed.Long:return"GMT"+(s>=0?"+":"")+td(h,2,c)+":"+td(Math.abs(s%60),2,c);case ed.Extended:return 0===r?"Z":(s>=0?"+":"")+td(h,2,c)+":"+td(Math.abs(s%60),2,c);default:throw new Error(`Unknown zone width "${e}"`)}}}const mH=0,BS=4;function NF(e){const n=e.getDay(),t=0===n?-3:BS-n;return CI(e.getFullYear(),e.getMonth(),e.getDate()+t)}function MI(e,n=!1){return function(t,r){let s;if(n){const c=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,h=t.getDate();s=1+Math.floor((h+c)/7)}else{const c=NF(t),h=function RF(e){const n=CI(e,mH,1).getDay();return CI(e,0,1+(n<=BS?BS:BS+7)-n)}(c.getFullYear()),y=c.getTime()-h.getTime();s=1+Math.round(y/6048e5)}return td(s,e,Qu(r,ns.MinusSign))}}function b_(e,n=!1){return function(t,r){return td(NF(t).getFullYear(),e,Qu(r,ns.MinusSign),n)}}const FF={};function PF(e,n){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?n:t}function e5(e){return e instanceof Date&&!isNaN(e.valueOf())}function HF(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const r=t.indexOf("="),[s,c]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(s.trim()===n)return decodeURIComponent(c)}return null}const OI=/\s+/,WF=[];let qF=(()=>{class e{constructor(t,r){this._ngEl=t,this._renderer=r,this.initialClasses=WF,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(OI):WF}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(OI):t}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const r of t)this._updateState(r,!0);else if(null!=t)for(const r of Object.keys(t))this._updateState(r,!!t[r]);this._applyStateDiff()}_updateState(t,r){const s=this.stateMap.get(t);void 0!==s?(s.enabled!==r&&(s.changed=!0,s.enabled=r),s.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const r=t[0],s=t[1];s.changed?(this._toggleClass(r,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),s.touched=!1}}_toggleClass(t,r){(t=t.trim()).length>0&&t.split(OI).forEach(s=>{r?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(tl))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngClass",""]],inputs:{klass:[ht.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}return e})();class GF{constructor(n,t,r,s){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=s}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 o0=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,r,s){this._viewContainer=t,this._template=r,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((s,c,h)=>{if(null==s.previousIndex)r.createEmbeddedView(this._template,new GF(s.item,this._ngForOf,-1,-1),null===h?void 0:h);else if(null==h)r.remove(null===c?void 0:c);else if(null!==c){const y=r.get(c);r.move(y,h),r5(y,s)}});for(let s=0,c=r.length;s{r5(r.get(s.currentIndex),s)})}static ngTemplateContextGuard(t,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo),ue(Yu),ue(pC))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function r5(e,n){e.context.$implicit=n.item}let x_=(()=>{class e{constructor(t,r){this._viewContainer=t,this._context=new MH,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){o5("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){o5("ngIfElse",t),this._elseTemplateRef=t,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(t,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo),ue(Yu))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class MH{constructor(){this.$implicit=null,this.ngIf=null}}function o5(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${go(n)}'.`)}let jS=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const s=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,s,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,r,s)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,r,s),get:(t,r,s)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,s)}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[vo]})}return e})();function iu(e,n){return new _e(2100,!1)}class TH{createSubscription(n,t){return Ip(()=>n.subscribe({next:t,error:r=>{throw r}}))}dispose(n){Ip(()=>n.unsubscribe())}}class kH{createSubscription(n,t){return n.then(t,r=>{throw r})}dispose(n){}}const QF=new kH,FI=new TH;let PI=(()=>{class e{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,r=>this._updateLatestValue(t,r))}_selectStrategy(t){if(Cw(t))return QF;if(fB(t))return FI;throw iu()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,r){t===this._obj&&(this._latestValue=r,this._ref.markForCheck())}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo,16))};static#t=this.\u0275pipe=fs({name:"async",type:e,pure:!1,standalone:!0})}return e})(),_m=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw iu();return t.toUpperCase()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275pipe=fs({name:"uppercase",type:e,pure:!0,standalone:!0})}return e})();const IH=new $e(""),OH=new $e("");let c5=(()=>{class e{constructor(t,r,s){this.locale=t,this.defaultTimezone=r,this.defaultOptions=s}transform(t,r,s,c){if(null==t||""===t||t!=t)return null;try{return pH(t,r??this.defaultOptions?.dateFormat??"mediumDate",c||this.locale,s??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(h){throw iu()}}static#e=this.\u0275fac=function(r){return new(r||e)(ue(df,16),ue(IH,24),ue(OH,24))};static#t=this.\u0275pipe=fs({name:"date",type:e,pure:!0,standalone:!0})}return e})(),Ir=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const $I="browser",BH="server";function Eh(e){return e===$I}function qS(e){return e===BH}let m5=(()=>{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>Eh(Xe(ps))?new JF(Xe(mi),window):new eP})}return e})();class JF{constructor(n,t){this.document=n,this.window=t,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n){this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){const t=function g5(e,n){const t=e.getElementById(n)||e.getElementsByName(n)[0];if(t)return t;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let s=r.currentNode;for(;s;){const c=s.shadowRoot;if(c){const h=c.getElementById(n)||c.querySelector(`[name="${n}"]`);if(h)return h}s=r.nextNode()}}return null}(this.document,n);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(n){this.window.history.scrollRestoration=n}scrollToElement(n){const t=n.getBoundingClientRect(),r=t.left+this.window.pageXOffset,s=t.top+this.window.pageYOffset,c=this.offset();this.window.scrollTo(r-c[0],s-c[1])}}class eP{setOffset(n){}getScrollPosition(){return[0,0]}scrollToPosition(n){}scrollToAnchor(n){}setHistoryScrollRestoration(n){}}class BI{}class gr extends Q6{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class ir extends gr{static makeCurrent(){!function Z6(e){qz??=e}(new ir)}onAndCancel(n,t,r){return n.addEventListener(t,r),()=>{n.removeEventListener(t,r)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function E_(){return Di=Di||document.querySelector("base"),Di?Di.getAttribute("href"):null}();return null==t?null:function ho(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Di=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return HF(document.cookie,n)}}let Di=null,e1=(()=>{class e{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const JS=new $e("");let to=(()=>{class e{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(s=>{s.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,r,s){return this._findPluginFor(r).addEventListener(t,r,s)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(c=>c.supports(t)),!r)throw new _e(5101,!1);return this._eventNameToPlugin.set(t,r),r}static#e=this.\u0275fac=function(r){return new(r||e)(pe(JS),pe(Bt))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class D5{constructor(n){this._doc=n}}const M5="ng-app-id";let r7=(()=>{class e{constructor(t,r,s,c={}){this.doc=t,this.appId=r,this.nonce=s,this.platformId=c,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=qS(c),this.resetHostNodes()}addStyles(t){for(const r of t)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(t){for(const r of t)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(r=>r.remove()),t.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const r of this.getAllStyles())this.addStyleToHost(t,r)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const r of this.hostNodes)this.addStyleToHost(r,t)}onStyleRemoved(t){const r=this.styleRef;r.get(t)?.elements?.forEach(s=>s.remove()),r.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${M5}="${this.appId}"]`);if(t?.length){const r=new Map;return t.forEach(s=>{null!=s.textContent&&r.set(s.textContent,s)}),r}return null}changeUsageCount(t,r){const s=this.styleRef;if(s.has(t)){const c=s.get(t);return c.usage+=r,c.usage}return s.set(t,{usage:r,elements:[]}),r}getStyleElement(t,r){const s=this.styleNodesInDOM,c=s?.get(r);if(c?.parentNode===t)return s.delete(r),c.removeAttribute(M5),c;{const h=this.doc.createElement("style");return this.nonce&&h.setAttribute("nonce",this.nonce),h.textContent=r,this.platformIsServer&&h.setAttribute(M5,this.appId),t.appendChild(h),h}}addStyleToHost(t,r){const s=this.getStyleElement(t,r),c=this.styleRef,h=c.get(r)?.elements;h?h.push(s):c.set(r,{elements:[s],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(hp),pe(Xv,8),pe(ps))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const cP={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/MathML/"},uP=/%COMP%/g,c0=new $e("",{providedIn:"root",factory:()=>!0});function Sc(e,n){return n.map(t=>t.replace(uP,e))}let wm=(()=>{class e{constructor(t,r,s,c,h,y,E,M=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=c,this.doc=h,this.platformId=y,this.ngZone=E,this.nonce=M,this.rendererByCompId=new Map,this.platformIsServer=qS(y),this.defaultRenderer=new Vl(t,h,E,this.platformIsServer)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===pl.ShadowDom&&(r={...r,encapsulation:pl.Emulated});const s=this.getOrCreateRenderer(t,r);return s instanceof jI?s.applyToHost(t):s instanceof eD&&s.applyStyles(),s}getOrCreateRenderer(t,r){const s=this.rendererByCompId;let c=s.get(r.id);if(!c){const h=this.doc,y=this.ngZone,E=this.eventManager,M=this.sharedStylesHost,R=this.removeStylesOnCompDestroy,$=this.platformIsServer;switch(r.encapsulation){case pl.Emulated:c=new jI(E,M,r,this.appId,R,h,y,$);break;case pl.ShadowDom:return new dP(E,M,t,r,h,y,this.nonce,$);default:c=new eD(E,M,r,R,h,y,$)}s.set(r.id,c)}return c}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(to),pe(r7),pe(hp),pe(c0),pe(mi),pe(ps),pe(Bt),pe(Xv))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class Vl{constructor(n,t,r,s){this.eventManager=n,this.doc=t,this.ngZone=r,this.platformIsServer=s,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,t){return t?this.doc.createElementNS(cP[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(VI(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(VI(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){n&&n.removeChild(t)}selectRootElement(n,t){let r="string"==typeof n?this.doc.querySelector(n):n;if(!r)throw new _e(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,s){if(s){t=s+":"+t;const c=cP[s];c?n.setAttributeNS(c,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){const s=cP[r];s?n.removeAttributeNS(s,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,s){s&(Pd.DashCase|Pd.Important)?n.style.setProperty(t,r,s&Pd.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Pd.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){null!=n&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r){if("string"==typeof n&&!(n=y_().getGlobalEventTarget(this.doc,n)))throw new Error(`Unsupported event target ${n} for event ${t}`);return this.eventManager.addEventListener(n,t,this.decoratePreventDefault(r))}decoratePreventDefault(n){return t=>{if("__ngUnwrap__"===t)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(t)):n(t))&&t.preventDefault()}}}function VI(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class dP extends Vl{constructor(n,t,r,s,c,h,y,E){super(n,c,h,E),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const M=Sc(s.id,s.styles);for(const R of M){const $=document.createElement("style");y&&$.setAttribute("nonce",y),$.textContent=R,this.shadowRoot.appendChild($)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(this.nodeOrShadowRoot(n),t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class eD extends Vl{constructor(n,t,r,s,c,h,y,E){super(n,c,h,y),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=s,this.styles=E?Sc(E,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class jI extends eD{constructor(n,t,r,s,c,h,y,E){const M=s+"-"+r.id;super(n,t,r,c,h,y,E,M),this.contentAttr=function u0(e){return"_ngcontent-%COMP%".replace(uP,e)}(M),this.hostAttr=function au(e){return"_nghost-%COMP%".replace(uP,e)}(M)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){const r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}}let fP=(()=>{class e extends D5{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,s){return t.addEventListener(r,s,!1),()=>this.removeEventListener(t,r,s)}removeEventListener(t,r,s){return t.removeEventListener(r,s)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const UI=["alt","control","meta","shift"],hP={"\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"},pP={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let mP=(()=>{class e extends D5{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,r,s){const c=e.parseEventName(r),h=e.eventCallback(c.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>y_().onAndCancel(t,c.domEventName,h))}static parseEventName(t){const r=t.toLowerCase().split("."),s=r.shift();if(0===r.length||"keydown"!==s&&"keyup"!==s)return null;const c=e._normalizeKey(r.pop());let h="",y=r.indexOf("code");if(y>-1&&(r.splice(y,1),h="code."),UI.forEach(M=>{const R=r.indexOf(M);R>-1&&(r.splice(R,1),h+=M+".")}),h+=c,0!=r.length||0===c.length)return null;const E={};return E.domEventName=s,E.fullKey=h,E}static matchEventFullKeyCode(t,r){let s=hP[t.key]||t.key,c="";return r.indexOf("code.")>-1&&(s=t.code,c="code."),!(null==s||!s)&&(s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),UI.forEach(h=>{h!==s&&(0,pP[h])(t)&&(c+=h+".")}),c+=s,c===r)}static eventCallback(t,r,s){return c=>{e.matchEventFullKeyCode(c,t)&&s.runGuarded(()=>r(c))}}static _normalizeKey(t){return"esc"===t?"escape":t}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const I5=T6(Mz,"browser",[{provide:ps,useValue:$I},{provide:Gv,useValue:function k5(){ir.makeCurrent()},multi:!0},{provide:mi,useFactory:function bP(){return function CE(e){Ay=e}(document),document},deps:[]}]),O5=new $e(""),xP=[{provide:kS,useClass:class Cc{addToWindow(n){Ai.getAngularTestability=(r,s=!0)=>{const c=n.findTestabilityInTree(r,s);if(null==c)throw new _e(5103,!1);return c},Ai.getAllAngularTestabilities=()=>n.getAllTestabilities(),Ai.getAllAngularRootElements=()=>n.getAllRootElements(),Ai.frameworkStabilizers||(Ai.frameworkStabilizers=[]),Ai.frameworkStabilizers.push(r=>{const s=Ai.getAllAngularTestabilities();let c=s.length;const h=function(){c--,0==c&&r()};s.forEach(y=>{y.whenStable(h)})})}findTestabilityInTree(n,t,r){return null==t?null:n.getTestability(t)??(r?y_().isShadowRoot(t)?this.findTestabilityInTree(n,t.host,!0):this.findTestabilityInTree(n,t.parentElement,!0):null)}},deps:[]},{provide:pz,useClass:oF,deps:[Bt,iI,kS]},{provide:oF,useClass:oF,deps:[Bt,iI,kS]}],wP=[{provide:wy,useValue:"root"},{provide:nl,useFactory:function yP(){return new nl},deps:[]},{provide:JS,useClass:fP,multi:!0,deps:[mi,Bt,ps]},{provide:JS,useClass:mP,multi:!0,deps:[mi]},wm,r7,to,{provide:_x,useExisting:wm},{provide:BI,useClass:e1,deps:[]},[]];let R5=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:hp,useValue:t.appId}]}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(O5,12))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[...wP,...xP],imports:[Ir,gF]})}return e})(),CP=(()=>{class e{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),n1=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:function(r){let s=null;return s=r?new(r||e):pe(iK),s},providedIn:"root"})}return e})(),iK=(()=>{class e extends n1{constructor(t){super(),this._doc=t}sanitize(t,r){if(null==r)return null;switch(t){case Ro.NONE:return r;case Ro.HTML:return cc(r,"HTML")?Ja(r):Xy(this._doc,String(r)).toString();case Ro.STYLE:return cc(r,"Style")?Ja(r):r;case Ro.SCRIPT:if(cc(r,"Script"))return Ja(r);throw new _e(5200,!1);case Ro.URL:return cc(r,"URL")?Ja(r):Tn(String(r));case Ro.RESOURCE_URL:if(cc(r,"ResourceURL"))return Ja(r);throw new _e(5201,!1);default:throw new _e(5202,!1)}}bypassSecurityTrustHtml(t){return function HE(e){return new ka(e)}(t)}bypassSecurityTrustStyle(t){return function eh(e){return new Wy(e)}(t)}bypassSecurityTrustScript(t){return function lR(e){return new ZA(e)}(t)}bypassSecurityTrustUrl(t){return function cR(e){return new Jf(e)}(t)}bypassSecurityTrustResourceUrl(t){return function JA(e){return new QA(e)}(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function p0(e){return e&&Jt(e.schedule)}function m0(e){return e[e.length-1]}function P5(e){return Jt(m0(e))?e.pop():void 0}function iD(e){return p0(m0(e))?e.pop():void 0}function Nn(e,n,t,r){var h,s=arguments.length,c=s<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,t,r);else for(var y=e.length-1;y>=0;y--)(h=e[y])&&(c=(s<3?h(c):s>3?h(n,t,c):h(n,t))||c);return s>3&&c&&Object.defineProperty(n,t,c),c}function ga(e,n){return function(t,r){n(t,r,e)}}function gt(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function C_(e){return this instanceof C_?(this.v=e,this):new C_(e)}function V5(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function NP(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(c){t[c]=e[c]&&function(h){return new Promise(function(y,E){!function s(c,h,y,E){Promise.resolve(E).then(function(M){c({value:M,done:y})},h)}(y,E,(h=e[c](h)).done,h.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const _0=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function H5(e){return Jt(e?.then)}function W5(e){return Jt(e[mo])}function oD(e){return Symbol.asyncIterator&&Jt(e?.[Symbol.asyncIterator])}function PP(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 G5=function q5(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function X5(e){return Jt(e?.[G5])}function XI(e){return function z5(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=t.apply(e,n||[]),c=[];return s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s;function h(j){r[j]&&(s[j]=function(X){return new Promise(function(K,ie){c.push([j,X,K,ie])>1||y(j,X)})})}function y(j,X){try{!function E(j){j.value instanceof C_?Promise.resolve(j.value.v).then(M,R):$(c[0][2],j)}(r[j](X))}catch(K){$(c[0][3],K)}}function M(j){y("next",j)}function R(j){y("throw",j)}function $(j,X){j(X),c.shift(),c.length&&y(c[0][0],c[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:r,done:s}=yield C_(t.read());if(s)return yield C_(void 0);yield yield C_(r)}}finally{t.releaseLock()}})}function YI(e){return Jt(e?.getReader)}function Gs(e){if(e instanceof Qn)return e;if(null!=e){if(W5(e))return function y0(e){return new Qn(n=>{const t=e[mo]();if(Jt(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(_0(e))return function v7(e){return new Qn(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,jo)})}(e);if(oD(e))return Y5(e);if(X5(e))return function w7(e){return new Qn(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(YI(e))return function K5(e){return Y5(XI(e))}(e)}throw PP(e)}function Y5(e){return new Qn(n=>{(function E7(e,n){var t,r,s,c;return function B5(e,n,t,r){return new(t||(t=Promise))(function(c,h){function y(R){try{M(r.next(R))}catch($){h($)}}function E(R){try{M(r.throw(R))}catch($){h($)}}function M(R){R.done?c(R.value):function s(c){return c instanceof t?c:new t(function(h){h(c)})}(R.value).then(y,E)}M((r=r.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=V5(e);!(r=yield t.next()).done;)if(n.next(r.value),n.closed)return}catch(h){s={error:h}}finally{try{r&&!r.done&&(c=t.return)&&(yield c.call(t))}finally{if(s)throw s.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function Cm(e,n,t,r=0,s=!1){const c=n.schedule(function(){t(),s?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(c),!s)return c}function Z5(e,n=0){return be((t,r)=>{t.subscribe(Se(r,s=>Cm(r,e,()=>r.next(s),n),()=>Cm(r,e,()=>r.complete(),n),s=>Cm(r,e,()=>r.error(s),n)))})}function Q5(e,n=0){return be((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function Zt(e,n){if(!e)throw new Error("Iterable cannot be null");return new Qn(t=>{Cm(t,n,()=>{const r=e[Symbol.asyncIterator]();Cm(t,n,()=>{r.next().then(s=>{s.done?t.complete():t.next(s.value)})},0,!0)})})}function Cn(e,n){return n?function ll(e,n){if(null!=e){if(W5(e))return function C7(e,n){return Gs(e).pipe(Q5(n),Z5(n))}(e,n);if(_0(e))return function S7(e,n){return new Qn(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}(e,n);if(H5(e))return function mf(e,n){return Gs(e).pipe(Q5(n),Z5(n))}(e,n);if(oD(e))return Zt(e,n);if(X5(e))return function Sh(e,n){return new Qn(t=>{let r;return Cm(t,n,()=>{r=e[G5](),Cm(t,n,()=>{let s,c;try{({value:s,done:c}=r.next())}catch(h){return void t.error(h)}c?t.complete():t.next(s)},0,!0)}),()=>Jt(r?.return)&&r.return()})}(e,n);if(YI(e))return function Ge(e,n){return Zt(XI(e),n)}(e,n)}throw PP(e)}(e,n):Gs(e)}function zt(...e){return Cn(e,iD(e))}function Wr(e,n,t=1/0){return Jt(n)?Wr((r,s)=>ye((c,h)=>n(r,c,s,h))(Gs(e(r,s))),t):("number"==typeof n&&(t=n),be((r,s)=>function sD(e,n,t,r,s,c,h,y){const E=[];let M=0,R=0,$=!1;const j=()=>{$&&!E.length&&!M&&n.complete()},X=ie=>M{c&&n.next(ie),M++;let me=!1;Gs(t(ie,R++)).subscribe(Se(n,Me=>{s?.(Me),c?X(Me):n.next(Me)},()=>{me=!0},void 0,()=>{if(me)try{for(M--;E.length&&MK(Me)):K(Me)}j()}catch(Me){n.error(Me)}}))};return e.subscribe(Se(n,X,()=>{$=!0,j()})),()=>{y?.()}}(r,s,e,t)))}function lu(e,n){return Jt(n)?Wr(e,n,1):Wr(e,1)}function ii(e,n){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>e.call(n,c,s++)&&r.next(c)))})}function nd(e){return be((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}function Sr(e,n){return be((t,r)=>{let s=null,c=0,h=!1;const y=()=>h&&!s&&r.complete();t.subscribe(Se(r,E=>{s?.unsubscribe();let M=0;const R=c++;Gs(e(E,R)).subscribe(s=Se(r,$=>r.next(n?n(E,$,R,M++):$),()=>{s=null,y()}))},()=>{h=!0,y()}))})}class S_{}class KI{}class id{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?"string"==typeof n?this.lazyInit=()=>{this.headers=new Map,n.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const s=t.slice(0,r),c=s.toLowerCase(),h=t.slice(r+1).trim();this.maybeSetNormalizedName(s,c),this.headers.has(c)?this.headers.get(c).push(h):this.headers.set(c,[h])}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.setHeaderEntries(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof id?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){const t=new id;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof id?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){const t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(n.name,t);const s=("a"===n.op?this.headers.get(t):void 0)||[];s.push(...r),this.headers.set(t,s);break;case"d":const c=n.value;if(c){let h=this.headers.get(t);if(!h)return;h=h.filter(y=>-1===c.indexOf(y)),0===h.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,h)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(n,t){const r=(Array.isArray(t)?t:[t]).map(c=>c.toString()),s=n.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(n,s)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}}class D7{encodeKey(n){return eV(n)}encodeValue(n){return eV(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const J5=/%(\d[a-f0-9])/gi,A7={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eV(e){return encodeURIComponent(e).replace(J5,(n,t)=>A7[t]??n)}function ZI(e){return`${e}`}class D_{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new D7,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function M7(e,n){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(s=>{const c=s.indexOf("="),[h,y]=-1==c?[n.decodeKey(s),""]:[n.decodeKey(s.slice(0,c)),n.decodeValue(s.slice(c+1))],E=t.get(h)||[];E.push(y),t.set(h,E)}),t}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{const r=n.fromObject[t],s=Array.isArray(r)?r.map(ZI):[ZI(r)];this.map.set(t,s)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){const t=[];return Object.keys(n).forEach(r=>{const s=n[r];Array.isArray(s)?s.forEach(c=>{t.push({param:r,value:c,op:"a"})}):t.push({param:r,value:s,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const t=new D_({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const t=("a"===n.op?this.map.get(n.param):void 0)||[];t.push(ZI(n.value)),this.map.set(n.param,t);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let r=this.map.get(n.param)||[];const s=r.indexOf(ZI(n.value));-1!==s&&r.splice(s,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class T7{constructor(){this.map=new Map}set(n,t){return this.map.set(n,t),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tV(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function nV(e){return typeof Blob<"u"&&e instanceof Blob}function iV(e){return typeof FormData<"u"&&e instanceof FormData}class aD{constructor(n,t,r,s){let c;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function _a(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==r?r:null,c=s):c=r,c&&(this.reportProgress=!!c.reportProgress,this.withCredentials=!!c.withCredentials,c.responseType&&(this.responseType=c.responseType),c.headers&&(this.headers=c.headers),c.context&&(this.context=c.context),c.params&&(this.params=c.params),this.transferCache=c.transferCache),this.headers??=new id,this.context??=new T7,this.params){const h=this.params.toString();if(0===h.length)this.urlWithParams=t;else{const y=t.indexOf("?");this.urlWithParams=t+(-1===y?"?":y$.set(j,n.setHeaders[j]),E)),n.setParams&&(M=Object.keys(n.setParams).reduce(($,j)=>$.set(j,n.setParams[j]),M)),new aD(t,r,c,{params:M,headers:E,context:R,reportProgress:y,responseType:s,withCredentials:h})}}var Dh=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}(Dh||{});class lD{constructor(n,t=Sm.Ok,r="OK"){this.headers=n.headers||new id,this.status=void 0!==n.status?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class cD extends lD{constructor(n={}){super(n),this.type=Dh.ResponseHeader}clone(n={}){return new cD({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class b0 extends lD{constructor(n={}){super(n),this.type=Dh.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new b0({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Lo extends lD{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}var Sm=function(e){return e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e}(Sm||{});function LP(e,n){return{body:n,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 M_=(()=>{class e{constructor(t){this.handler=t}request(t,r,s={}){let c;if(t instanceof aD)c=t;else{let E,M;E=s.headers instanceof id?s.headers:new id(s.headers),s.params&&(M=s.params instanceof D_?s.params:new D_({fromObject:s.params})),c=new aD(t,r,void 0!==s.body?s.body:null,{headers:E,context:s.context,params:M,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}const h=zt(c).pipe(lu(E=>this.handler.handle(E)));if(t instanceof aD||"events"===s.observe)return h;const y=h.pipe(ii(E=>E instanceof b0));switch(s.observe||"body"){case"body":switch(c.responseType){case"arraybuffer":return y.pipe(ye(E=>{if(null!==E.body&&!(E.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return E.body}));case"blob":return y.pipe(ye(E=>{if(null!==E.body&&!(E.body instanceof Blob))throw new Error("Response is not a Blob.");return E.body}));case"text":return y.pipe(ye(E=>{if(null!==E.body&&"string"!=typeof E.body)throw new Error("Response is not a string.");return E.body}));default:return y.pipe(ye(E=>E.body))}case"response":return y;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new D_).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,s={}){return this.request("PATCH",t,LP(s,r))}post(t,r,s={}){return this.request("POST",t,LP(s,r))}put(t,r,s={}){return this.request("PUT",t,LP(s,r))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(S_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function dD(e,n){return n(e)}function O7(e,n){return(t,r)=>n.intercept(t,{handle:s=>e(s,r)})}const $P=new $e(""),fD=new $e(""),BP=new $e(""),oV=new $e("");function R7(){let e=null;return(n,t)=>{null===e&&(e=(Xe($P,{optional:!0})??[]).reduceRight(O7,dD));const r=Xe(Fw),s=r.add();return e(n,t).pipe(nd(()=>r.remove(s)))}}let sV=(()=>{class e extends S_{constructor(t,r){super(),this.backend=t,this.injector=r,this.chain=null,this.pendingTasks=Xe(Fw);const s=Xe(oV,{optional:!0});this.backend=s??t}handle(t){if(null===this.chain){const s=Array.from(new Set([...this.injector.get(fD),...this.injector.get(BP,[])]));this.chain=s.reduceRight((c,h)=>function rV(e,n,t){return(r,s)=>Od(t,()=>n(r,c=>e(c,s)))}(c,h,this.injector),dD)}const r=this.pendingTasks.add();return this.chain(t,s=>this.backend.handle(s)).pipe(nd(()=>this.pendingTasks.remove(r)))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(KI),pe(xo))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const cV=/^\)\]\}',?\n/;let uV=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new _e(-2800,!1);const r=this.xhrFactory;return(r.\u0275loadImpl?Cn(r.\u0275loadImpl()):zt(null)).pipe(Sr(()=>new Qn(c=>{const h=r.build();if(h.open(t.method,t.urlWithParams),t.withCredentials&&(h.withCredentials=!0),t.headers.forEach((ie,me)=>h.setRequestHeader(ie,me.join(","))),t.headers.has("Accept")||h.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const ie=t.detectContentTypeHeader();null!==ie&&h.setRequestHeader("Content-Type",ie)}if(t.responseType){const ie=t.responseType.toLowerCase();h.responseType="json"!==ie?ie:"text"}const y=t.serializeBody();let E=null;const M=()=>{if(null!==E)return E;const ie=h.statusText||"OK",me=new id(h.getAllResponseHeaders()),Me=function P7(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(h)||t.url;return E=new cD({headers:me,status:h.status,statusText:ie,url:Me}),E},R=()=>{let{headers:ie,status:me,statusText:Me,url:Ce}=M(),rt=null;me!==Sm.NoContent&&(rt=typeof h.response>"u"?h.responseText:h.response),0===me&&(me=rt?Sm.Ok:0);let Mt=me>=200&&me<300;if("json"===t.responseType&&"string"==typeof rt){const Et=rt;rt=rt.replace(cV,"");try{rt=""!==rt?JSON.parse(rt):null}catch(Qt){rt=Et,Mt&&(Mt=!1,rt={error:Qt,text:rt})}}Mt?(c.next(new b0({body:rt,headers:ie,status:me,statusText:Me,url:Ce||void 0})),c.complete()):c.error(new Lo({error:rt,headers:ie,status:me,statusText:Me,url:Ce||void 0}))},$=ie=>{const{url:me}=M(),Me=new Lo({error:ie,status:h.status||0,statusText:h.statusText||"Unknown Error",url:me||void 0});c.error(Me)};let j=!1;const X=ie=>{j||(c.next(M()),j=!0);let me={type:Dh.DownloadProgress,loaded:ie.loaded};ie.lengthComputable&&(me.total=ie.total),"text"===t.responseType&&h.responseText&&(me.partialText=h.responseText),c.next(me)},K=ie=>{let me={type:Dh.UploadProgress,loaded:ie.loaded};ie.lengthComputable&&(me.total=ie.total),c.next(me)};return h.addEventListener("load",R),h.addEventListener("error",$),h.addEventListener("timeout",$),h.addEventListener("abort",$),t.reportProgress&&(h.addEventListener("progress",X),null!==y&&h.upload&&h.upload.addEventListener("progress",K)),h.send(y),c.next({type:Dh.Sent}),()=>{h.removeEventListener("error",$),h.removeEventListener("abort",$),h.removeEventListener("load",R),h.removeEventListener("timeout",$),t.reportProgress&&(h.removeEventListener("progress",X),null!==y&&h.upload&&h.upload.removeEventListener("progress",K)),h.readyState!==h.DONE&&h.abort()}})))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BI))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const hD=new $e(""),VP=new $e("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),jP=new $e("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dV{}let rr=(()=>{class e{constructor(t,r,s){this.doc=t,this.platform=r,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=HF(t,this.cookieName),this.lastCookieString=t),this.lastToken}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(ps),pe(VP))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function eO(e,n){const t=e.url.toLowerCase();if(!Xe(hD)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return n(e);const r=Xe(dV).getToken(),s=Xe(jP);return null!=r&&!e.headers.has(s)&&(e=e.clone({headers:e.headers.set(s,r)})),n(e)}var or=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}(or||{});function $7(...e){const n=[M_,uV,sV,{provide:S_,useExisting:sV},{provide:KI,useExisting:uV},{provide:fD,useValue:eO,multi:!0},{provide:hD,useValue:!0},{provide:dV,useClass:rr}];for(const t of e)n.push(...t.\u0275providers);return function Iu(e){return{\u0275providers:e}}(n)}const fV=new $e("");function z7(){return function Mm(e,n){return{\u0275kind:e,\u0275providers:n}}(or.LegacyInterceptors,[{provide:fV,useFactory:R7},{provide:fD,useExisting:fV,multi:!0}])}let V7=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[$7(z7())]})}return e})();function Mh(e){return null!=e&&"false"!=`${e}`}function r1(e,n=0){return function qP(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}(e)?Number(e):n}function o1(e){return Array.isArray(e)?e:[e]}function Dr(e){return null==e?"":"string"==typeof e?e:`${e}px`}function s1(e){return e instanceof zn?e.nativeElement:e}const{isArray:H7}=Array;function iO(e){return ye(n=>function _V(e,n){return H7(n)?e(...n):e(n)}(e,n))}const So=["addListener","removeListener"],Dc=["addEventListener","removeEventListener"],$o=["on","off"];function Fa(e,n,t,r){if(Jt(t)&&(r=t,t=void 0),r)return Fa(e,n,t).pipe(iO(r));const[s,c]=function a1(e){return Jt(e.addEventListener)&&Jt(e.removeEventListener)}(e)?Dc.map(h=>y=>e[h](n,y,t)):function yV(e){return Jt(e.addListener)&&Jt(e.removeListener)}(e)?So.map(T_(e,n)):function bV(e){return Jt(e.on)&&Jt(e.off)}(e)?$o.map(T_(e,n)):[];if(!s&&_0(e))return Wr(h=>Fa(h,n,t))(Gs(e));if(!s)throw new TypeError("Invalid event target");return new Qn(h=>{const y=(...E)=>h.next(1c(y)})}function T_(e,n){return t=>r=>e[t](n,r)}class _D extends xn{constructor(n,t){super()}schedule(n,t=0){return this}}const gf={setInterval(e,n,...t){const{delegate:r}=gf;return r?.setInterval?r.setInterval(e,n,...t):setInterval(e,n,...t)},clearInterval(e){const{delegate:n}=gf;return(n?.clearInterval||clearInterval)(e)},delegate:void 0};class _f extends _D{constructor(n,t){super(n,t),this.scheduler=n,this.work=t,this.pending=!1}schedule(n,t=0){var r;if(this.closed)return this;this.state=n;const s=this.id,c=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(c,s,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(c,this.id,t),this}requestAsyncId(n,t,r=0){return gf.setInterval(n.flush.bind(n,this),r)}recycleAsyncId(n,t,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&gf.clearInterval(t)}execute(n,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(n,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,t){let s,r=!1;try{this.work(n)}catch(c){r=!0,s=c||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s}unsubscribe(){if(!this.closed){const{id:n,scheduler:t}=this,{actions:r}=t;this.work=this.state=this.scheduler=null,this.pending=!1,io(r,this),null!=n&&(this.id=this.recycleAsyncId(t,n,null)),this.delay=null,super.unsubscribe()}}}const cu={schedule(e){let n=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:r}=cu;r&&(n=r.requestAnimationFrame,t=r.cancelAnimationFrame);const s=n(c=>{t=void 0,e(c)});return new xn(()=>t?.(s))},requestAnimationFrame(...e){const{delegate:n}=cu;return(n?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:n}=cu;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},rO={now:()=>(rO.delegate||Date).now(),delegate:void 0};class l1{constructor(n,t=l1.now){this.schedulerActionCtor=n,this.now=t}schedule(n,t=0,r){return new this.schedulerActionCtor(this,n).schedule(r,t)}}l1.now=rO.now;class oO extends l1{constructor(n,t=l1.now){super(n,t),this.actions=[],this._active=!1}flush(n){const{actions:t}=this;if(this._active)return void t.push(n);let r;this._active=!0;do{if(r=n.execute(n.state,n.delay))break}while(n=t.shift());if(this._active=!1,r){for(;n=t.shift();)n.unsubscribe();throw r}}}new class vV extends oO{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:r}=this;let s;n=n||r.shift();do{if(s=n.execute(n.state,n.delay))break}while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,s){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw s}}}(class GP extends _f{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return null!==r&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=cu.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,t,r=0){var s;if(null!=r?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);const{actions:c}=n;null!=t&&(null===(s=c[c.length-1])||void 0===s?void 0:s.id)!==t&&(cu.cancelAnimationFrame(t),n._scheduled=void 0)}});let XP,uu=1;const yD={};function xV(e){return e in yD&&(delete yD[e],!0)}const bD={setImmediate(e){const n=uu++;return yD[n]=!0,XP||(XP=Promise.resolve()),XP.then(()=>xV(n)&&e()),n},clearImmediate(e){xV(e)}},{setImmediate:sO,clearImmediate:aO}=bD,w0={setImmediate(...e){const{delegate:n}=w0;return(n?.setImmediate||sO)(...e)},clearImmediate(e){const{delegate:n}=w0;return(n?.clearImmediate||aO)(e)},delegate:void 0},c1=(new class cO extends oO{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:r}=this;let s;n=n||r.shift();do{if(s=n.execute(n.state,n.delay))break}while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,s){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw s}}}(class lO extends _f{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return null!==r&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=w0.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,t,r=0){var s;if(null!=r?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);const{actions:c}=n;null!=t&&(null===(s=c[c.length-1])||void 0===s?void 0:s.id)!==t&&(w0.clearImmediate(t),n._scheduled===t&&(n._scheduled=void 0))}}),new oO(_f)),KP=c1;function Pa(e=0,n,t=KP){let r=-1;return null!=n&&(p0(n)?t=n:r=n),new Qn(s=>{let c=function CV(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;c<0&&(c=0);let h=0;return t.schedule(function(){s.closed||(s.next(h++),0<=r?this.schedule(void 0,r):s.complete())},c)})}function cl(e,n=c1){return function EV(e){return be((n,t)=>{let r=!1,s=null,c=null,h=!1;const y=()=>{if(c?.unsubscribe(),c=null,r){r=!1;const M=s;s=null,t.next(M)}h&&t.complete()},E=()=>{c=null,h&&t.complete()};n.subscribe(Se(t,M=>{r=!0,s=M,c||Gs(e(M)).subscribe(c=Se(t,y,E))},()=>{h=!0,(!r||!c||c.closed)&&t.complete()}))})}(()=>Pa(e,n))}function Kn(e){return be((n,t)=>{Gs(e).subscribe(Se(t,()=>t.complete(),Si)),!t.closed&&n.subscribe(t)})}let du;try{du=typeof Intl<"u"&&Intl.v8BreakIterator}catch{du=!1}let u1,Xs=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Eh(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!du)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#e=this.\u0275fac=function(r){return new(r||e)(pe(ps))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function fO(e){return function q7(){if(null==u1&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>u1=!0}))}finally{u1=u1||!1}return u1}()?e:!!e.capture}var Ah=function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e}(Ah||{});let vD,C0,ZP;function DV(){if(null==C0){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return C0=!1,C0;if("scrollBehavior"in document.documentElement.style)C0=!0;else{const e=Element.prototype.scrollTo;C0=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return C0}function xD(){if("object"!=typeof document||!document)return Ah.NORMAL;if(null==vD){const e=document.createElement("div"),n=e.style;e.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";const t=document.createElement("div"),r=t.style;r.width="2px",r.height="1px",e.appendChild(t),document.body.appendChild(e),vD=Ah.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,vD=0===e.scrollLeft?Ah.NEGATED:Ah.INVERTED),e.remove()}return vD}function wD(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function Am(e){return e.composedPath?e.composedPath()[0]:e.target}function QP(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const G7=new $e("cdk-dir-doc",{providedIn:"root",factory:function TV(){return Xe(mi)}}),X7=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let rd=(()=>{class e{constructor(t){this.value="ltr",this.change=new cn,t&&(this.value=function Th(e){const n=e?.toLowerCase()||"";return"auto"===n&&typeof navigator<"u"&&navigator?.language?X7.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(G7,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ED=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})(),hO=(()=>{class e{constructor(t,r,s){this._ngZone=t,this._platform=r,this._scrolled=new It,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const r=this.scrollContainers.get(t);r&&(r.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Qn(r=>{this._globalSubscription||this._addGlobalListener();const s=t>0?this._scrolled.pipe(cl(t)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):zt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(t,r){const s=this.getAncestorScrollContainers(t);return this.scrolled(r).pipe(ii(c=>!c||s.indexOf(c)>-1))}getAncestorScrollContainers(t){const r=[];return this.scrollContainers.forEach((s,c)=>{this._scrollableContainsElement(c,t)&&r.push(c)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,r){let s=s1(r),c=t.getElementRef().nativeElement;do{if(s==c)return!0}while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Fa(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bt),pe(Xs),pe(mi,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),CD=(()=>{class e{constructor(t,r,s,c){this.elementRef=t,this.scrollDispatcher=r,this.ngZone=s,this.dir=c,this._destroyed=new It,this._elementScrolled=new Qn(h=>this.ngZone.runOutsideAngular(()=>Fa(this.elementRef.nativeElement,"scroll").pipe(Kn(this._destroyed)).subscribe(h)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const r=this.elementRef.nativeElement,s=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=s?t.end:t.start),null==t.right&&(t.right=s?t.start:t.end),null!=t.bottom&&(t.top=r.scrollHeight-r.clientHeight-t.bottom),s&&xD()!=Ah.NORMAL?(null!=t.left&&(t.right=r.scrollWidth-r.clientWidth-t.left),xD()==Ah.INVERTED?t.left=t.right:xD()==Ah.NEGATED&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=r.scrollWidth-r.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const r=this.elementRef.nativeElement;DV()?r.scrollTo(t):(null!=t.top&&(r.scrollTop=t.top),null!=t.left&&(r.scrollLeft=t.left))}measureScrollOffset(t){const r="left",s="right",c=this.elementRef.nativeElement;if("top"==t)return c.scrollTop;if("bottom"==t)return c.scrollHeight-c.clientHeight-c.scrollTop;const h=this.dir&&"rtl"==this.dir.value;return"start"==t?t=h?s:r:"end"==t&&(t=h?r:s),h&&xD()==Ah.INVERTED?t==r?c.scrollWidth-c.clientWidth-c.scrollLeft:c.scrollLeft:h&&xD()==Ah.NEGATED?t==r?c.scrollLeft+c.scrollWidth-c.clientWidth:-c.scrollLeft:t==r?c.scrollLeft:c.scrollWidth-c.clientWidth-c.scrollLeft}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(hO),ue(Bt),ue(rd,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}return e})(),pO=(()=>{class e{constructor(t,r,s){this._platform=t,this._change=new It,this._changeListener=c=>{this._change.next(c)},this._document=s,r.runOutsideAngular(()=>{if(t.isBrowser){const c=this._getWindow();c.addEventListener("resize",this._changeListener),c.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:r,height:s}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+s,right:t.left+r,height:s,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,r=this._getWindow(),s=t.documentElement,c=s.getBoundingClientRect();return{top:-c.top||t.body.scrollTop||r.scrollY||s.scrollTop||0,left:-c.left||t.body.scrollLeft||r.scrollX||s.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(cl(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Bt),pe(mi,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Tm=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})(),RV=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[ED,Tm,ED,Tm]})}return e})();function kh(e,...n){return n.length?n.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}function Do(e,n,t){const r=Jt(e)||n||t?{next:e,error:n,complete:t}:e;return r?be((s,c)=>{var h;null===(h=r.subscribe)||void 0===h||h.call(r);let y=!0;s.subscribe(Se(c,E=>{var M;null===(M=r.next)||void 0===M||M.call(r,E),c.next(E)},()=>{var E;y=!1,null===(E=r.complete)||void 0===E||E.call(r),c.complete()},E=>{var M;y=!1,null===(M=r.error)||void 0===M||M.call(r,E),c.error(E)},()=>{var E,M;y&&(null===(E=r.unsubscribe)||void 0===E||E.call(r)),null===(M=r.finalize)||void 0===M||M.call(r)}))}):Wi}function SD(e,n=c1){return be((t,r)=>{let s=null,c=null,h=null;const y=()=>{if(s){s.unsubscribe(),s=null;const M=c;c=null,r.next(M)}};function E(){const M=h+e,R=n.now();if(R{c=M,h=n.now(),s||(s=n.schedule(E,e),r.add(s))},()=>{y(),r.complete()},void 0,()=>{c=s=null}))})}const Hl=new Qn(e=>e.complete());function Bo(e){return e<=0?()=>Hl:be((n,t)=>{let r=0;n.subscribe(Se(t,s=>{++r<=e&&(t.next(s),e<=r&&t.complete())}))})}function DD(e){return ii((n,t)=>e<=t)}function Ih(e,n=Wi){return e=e??C9,be((t,r)=>{let s,c=!0;t.subscribe(Se(r,h=>{const y=n(h);(c||!e(s,y))&&(c=!1,s=y,r.next(h))}))})}function C9(e,n){return e===n}let qV=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),GV=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[qV]})}return e})();const{isArray:D9}=Array,{getPrototypeOf:M9,prototype:XV,keys:A9}=Object;function YV(e){if(1===e.length){const n=e[0];if(D9(n))return{args:n,keys:null};if(function T9(e){return e&&"object"==typeof e&&M9(e)===XV}(n)){const t=A9(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}function KV(e,n){return e.reduce((t,r,s)=>(t[r]=n[s],t),{})}function d1(...e){const n=iD(e),t=P5(e),{args:r,keys:s}=YV(e);if(0===r.length)return Cn([],n);const c=new Qn(function k9(e,n,t=Wi){return r=>{MD(n,()=>{const{length:s}=e,c=new Array(s);let h=s,y=s;for(let E=0;E{const M=Cn(e[E],n);let R=!1;M.subscribe(Se(r,$=>{c[E]=$,R||(R=!0,y--),y||r.next(t(c.slice()))},()=>{--h||r.complete()}))},r)},r)}}(r,n,s?h=>KV(s,h):Wi));return t?c.pipe(iO(t)):c}function MD(e,n,t){e?Cm(t,e,n):n()}function f1(e=1/0){return Wr(Wi,e)}function AD(...e){return function ZV(){return f1(1)}()(Cn(e,iD(e)))}function Wl(...e){const n=iD(e);return be((t,r)=>{(n?AD(e,t,n):AD(e,t)).subscribe(r)})}const QV=new Set;let Ys,I9=(()=>{class e{constructor(t,r){this._platform=t,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):R9}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function O9(e,n){if(!QV.has(e))try{Ys||(Ys=document.createElement("style"),n&&(Ys.nonce=n),Ys.setAttribute("type","text/css"),document.head.appendChild(Ys)),Ys.sheet&&(Ys.sheet.insertRule(`@media ${e} {body{ }}`,0),QV.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Xv,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function R9(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let N9=(()=>{class e{constructor(t,r){this._mediaMatcher=t,this._zone=r,this._queries=new Map,this._destroySubject=new It}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return JV(o1(t)).some(s=>this._registerQuery(s).mql.matches)}observe(t){let c=d1(JV(o1(t)).map(h=>this._registerQuery(h).observable));return c=AD(c.pipe(Bo(1)),c.pipe(DD(1),SD(0))),c.pipe(ye(h=>{const y={matches:!1,breakpoints:{}};return h.forEach(({matches:E,query:M})=>{y.matches=y.matches||E,y.breakpoints[M]=E}),y}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const r=this._mediaMatcher.matchMedia(t),c={observable:new Qn(h=>{const y=E=>this._zone.run(()=>h.next(E));return r.addListener(y),()=>{r.removeListener(y)}}).pipe(Wl(r),ye(({matches:h})=>({query:t,matches:h})),Kn(this._destroySubject)),mql:r};return this._queries.set(t,c),c}static#e=this.\u0275fac=function(r){return new(r||e)(pe(I9),pe(Bt))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function JV(e){return e.map(n=>n.split(",")).reduce((n,t)=>n.concat(t)).map(n=>n.trim())}function tj(e,n,t){const r=nj(e,n);t=t.trim();const s=r.filter(c=>c!==t);s.length?e.setAttribute(n,s.join(" ")):e.removeAttribute(n)}function nj(e,n){return e.getAttribute(n)?.match(/\S+/g)??[]}class wO{constructor(n){this._items=n,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new It,this._typeaheadSubscription=xn.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new It,this.change=new It,n instanceof Xb&&(this._itemChangesSubscription=n.changes.subscribe(t=>{if(this._activeItem){const s=t.toArray().indexOf(this._activeItem);s>-1&&s!==this._activeItemIndex&&(this._activeItemIndex=s)}}))}skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Do(t=>this._pressedLetters.push(t)),SD(n),ii(()=>this._pressedLetters.length>0),ye(()=>this._pressedLetters.join(""))).subscribe(t=>{const r=this._getItemsArray();for(let s=1;s!n[c]||this._allowedModifierKeys.indexOf(c)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&s){this.setNextItemActive();break}return;case 38:if(this._vertical&&s){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&s){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&s){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&s){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&s){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&s){const c=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(c>0?c:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&s){const c=this._activeItemIndex+this._pageUpAndDown.delta,h=this._getItemsArray().length;this._setActiveItemByIndex(c=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],n.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(n){const t=this._getItemsArray(),r="number"==typeof n?n:t.indexOf(n);this._activeItem=t[r]??null,this._activeItemIndex=r}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(n){this._wrap?this._setActiveInWrapMode(n):this._setActiveInDefaultMode(n)}_setActiveInWrapMode(n){const t=this._getItemsArray();for(let r=1;r<=t.length;r++){const s=(this._activeItemIndex+n*r+t.length)%t.length;if(!this._skipPredicateFn(t[s]))return void this.setActiveItem(s)}}_setActiveInDefaultMode(n){this._setActiveItemByIndex(this._activeItemIndex+n,n)}_setActiveItemByIndex(n,t){const r=this._getItemsArray();if(r[n]){for(;this._skipPredicateFn(r[n]);)if(!r[n+=t])return;this.setActiveItem(n)}}_getItemsArray(){return this._items instanceof Xb?this._items.toArray():this._items}}class TD extends wO{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}}class L9 extends wO{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}}let h1=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function B9(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const r=function oL(e){try{return e.frameElement}catch{return null}}(function aj(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(r&&(-1===oj(r)||!this.isVisible(r)))return!1;let s=t.nodeName.toLowerCase(),c=oj(t);return t.hasAttribute("contenteditable")?-1!==c:!("iframe"===s||"object"===s||this._platform.WEBKIT&&this._platform.IOS&&!function U9(e){let n=e.nodeName.toLowerCase(),t="input"===n&&e.type;return"text"===t||"password"===t||"select"===n||"textarea"===n}(t))&&("audio"===s?!!t.hasAttribute("controls")&&-1!==c:"video"===s?-1!==c&&(null!==c||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,r){return function sj(e){return!function z9(e){return function aL(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function sL(e){let n=e.nodeName.toLowerCase();return"input"===n||"select"===n||"button"===n||"textarea"===n}(e)||function V9(e){return function j9(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||EO(e))}(t)&&!this.isDisabled(t)&&(r?.ignoreVisibility||this.isVisible(t))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function EO(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let n=e.getAttribute("tabindex");return!(!n||isNaN(parseInt(n,10)))}function oj(e){if(!EO(e))return null;const n=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}class lL{get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}constructor(n,t,r,s,c=!1){this._element=n,this._checker=t,this._ngZone=r,this._document=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,c||this.attachAnchors()}destroy(){const n=this._startAnchor,t=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){const t=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return"start"==n?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const r=this._getFirstTabbableElement(t);return r?.focus(n),!!r}return t.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){const t=this._getRegionBoundary("start");return t&&t.focus(n),!!t}focusLastTabbableElement(n){const t=this._getRegionBoundary("end");return t&&t.focus(n),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;const t=n.children;for(let r=0;r=0;r--){const s=t[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[r]):null;if(s)return s}return null}_createAnchor(){const n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,t){n?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._ngZone.isStable?n():this._ngZone.onStable.pipe(Bo(1)).subscribe(n)}}let CO=(()=>{class e{constructor(t,r,s){this._checker=t,this._ngZone=r,this._document=s}create(t,r=!1){return new lL(t,this._checker,this._ngZone,this._document,r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(h1),pe(Bt),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lj(e){return 0===e.buttons||0===e.detail}function cj(e){const n=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!n||-1!==n.identifier||null!=n.radiusX&&1!==n.radiusX||null!=n.radiusY&&1!==n.radiusY)}const q9=new $e("cdk-input-modality-detector-options"),G9={ignoreKeys:[18,17,224,91,16]},p1=fO({passive:!0,capture:!0});let dj=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,r,s,c){this._platform=t,this._mostRecentTarget=null,this._modality=new wr(null),this._lastTouchMs=0,this._onKeydown=h=>{this._options?.ignoreKeys?.some(y=>y===h.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Am(h))},this._onMousedown=h=>{Date.now()-this._lastTouchMs<650||(this._modality.next(lj(h)?"keyboard":"mouse"),this._mostRecentTarget=Am(h))},this._onTouchstart=h=>{cj(h)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Am(h))},this._options={...G9,...c},this.modalityDetected=this._modality.pipe(DD(1)),this.modalityChanged=this.modalityDetected.pipe(Ih()),t.isBrowser&&r.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,p1),s.addEventListener("mousedown",this._onMousedown,p1),s.addEventListener("touchstart",this._onTouchstart,p1)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,p1),document.removeEventListener("mousedown",this._onMousedown,p1),document.removeEventListener("touchstart",this._onTouchstart,p1))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Bt),pe(mi),pe(q9,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const fj=new $e("liveAnnouncerElement",{providedIn:"root",factory:function X9(){return null}}),hj=new $e("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let SO=0,pj=(()=>{class e{constructor(t,r,s,c){this._ngZone=r,this._defaultOptions=c,this._document=s,this._liveElement=t||this._createLiveElement()}announce(t,...r){const s=this._defaultOptions;let c,h;return 1===r.length&&"number"==typeof r[0]?h=r[0]:[c,h]=r,this.clear(),clearTimeout(this._previousTimeout),c||(c=s&&s.politeness?s.politeness:"polite"),null==h&&s&&(h=s.duration),this._liveElement.setAttribute("aria-live",c),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(y=>this._currentResolve=y)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof h&&(this._previousTimeout=setTimeout(()=>this.clear(),h)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",r=this._document.getElementsByClassName(t),s=this._document.createElement("div");for(let c=0;c .cdk-overlay-container [aria-modal="true"]');for(let s=0;s{class e{constructor(t,r,s,c,h){this._ngZone=t,this._platform=r,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new It,this._rootNodeFocusAndBlurListener=y=>{for(let M=Am(y);M;M=M.parentElement)"focus"===y.type?this._onFocus(y,M):this._onBlur(y,M)},this._document=c,this._detectionMode=h?.detectionMode||kD.IMMEDIATE}monitor(t,r=!1){const s=s1(t);if(!this._platform.isBrowser||1!==s.nodeType)return zt();const c=function AV(e){if(function MV(){if(null==ZP){const e=typeof document<"u"?document.head:null;ZP=!(!e||!e.createShadowRoot&&!e.attachShadow)}return ZP}()){const n=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}(s)||this._getDocument(),h=this._elementInfo.get(s);if(h)return r&&(h.checkChildren=!0),h.subject;const y={checkChildren:r,subject:new It,rootNode:c};return this._elementInfo.set(s,y),this._registerGlobalListeners(y),y.subject}stopMonitoring(t){const r=s1(t),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(t,r,s){const c=s1(t);c===this._getDocument().activeElement?this._getClosestElementsInfo(c).forEach(([y,E])=>this._originChanged(y,r,E)):(this._setOrigin(r),"function"==typeof c.focus&&c.focus(s))}ngOnDestroy(){this._elementInfo.forEach((t,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===kD.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,r){t.classList.toggle("cdk-focused",!!r),t.classList.toggle("cdk-touch-focused","touch"===r),t.classList.toggle("cdk-keyboard-focused","keyboard"===r),t.classList.toggle("cdk-mouse-focused","mouse"===r),t.classList.toggle("cdk-program-focused","program"===r)}_setOrigin(t,r=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&r,this._detectionMode===kD.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,r){const s=this._elementInfo.get(r),c=Am(t);!s||!s.checkChildren&&r!==c||this._originChanged(r,this._getFocusOrigin(c),s)}_onBlur(t,r){const s=this._elementInfo.get(r);!s||s.checkChildren&&t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(this._setClasses(r),this._emitOrigin(s,null))}_emitOrigin(t,r){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(r))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const r=t.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,D0),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,D0)}),this._rootNodeFocusListenerCount.set(r,s+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Kn(this._stopInputModalityDetector)).subscribe(c=>{this._setOrigin(c,!0)}))}_removeGlobalListeners(t){const r=t.rootNode;if(this._rootNodeFocusListenerCount.has(r)){const s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,D0),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,D0),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,r,s){this._setClasses(t,r),this._emitOrigin(s,r),this._lastFocusOrigin=r}_getClosestElementsInfo(t){const r=[];return this._elementInfo.forEach((s,c)=>{(c===t||s.checkChildren&&c.contains(t))&&r.push([c,s])}),r}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:r,mostRecentModality:s}=this._inputModalityDetector;if("mouse"!==s||!r||r===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const c=t.labels;if(c)for(let h=0;h{class e{constructor(t,r){this._platform=t,this._document=r,this._breakpointSubscription=Xe(N9).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return I_.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const r=this._document.defaultView||window,s=r&&r.getComputedStyle?r.getComputedStyle(t):null,c=(s&&s.backgroundColor||"").replace(/ /g,"");switch(t.remove(),c){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return I_.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return I_.BLACK_ON_WHITE}return I_.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(uL,mj,cL),this._hasCheckedHighContrastMode=!0;const r=this.getHighContrastMode();r===I_.BLACK_ON_WHITE?t.add(uL,mj):r===I_.WHITE_ON_BLACK&&t.add(uL,cL)}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Q9=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gj))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[GV]})}return e})();const yj=["text"];function tW(e,n){if(1&e&&Wt(0,"mat-pseudo-checkbox",6),2&e){const t=on();vt("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function ID(e,n){1&e&&Wt(0,"mat-pseudo-checkbox",7),2&e&&vt("disabled",on().disabled)}function bj(e,n){if(1&e&&(Ae(0,"span",8),wt(1),ke()),2&e){const t=on();Ze(),lf("(",t.group.label,")")}}const dL=[[["mat-icon"]],"*"],nW=["mat-icon","*"],ya=new $e("mat-sanity-checks",{providedIn:"root",factory:function iW(){return!0}});let rs=(()=>{class e{constructor(t,r,s){this._sanityChecks=r,this._document=s,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!QP()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gj),pe(ya,8),pe(mi))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[ED,ED]})}return e})();class Cj{constructor(n,t,r,s,c){this._defaultMatcher=n,this.ngControl=t,this._parentFormGroup=r,this._parentForm=s,this._stateChanges=c,this.errorState=!1}updateErrorState(){const n=this.errorState,t=this._parentFormGroup||this._parentForm,r=this.matcher||this._defaultMatcher,s=this.ngControl?this.ngControl.control:null,c=r?.isErrorState(s,t)??!1;c!==n&&(this.errorState=c,this._stateChanges.next())}}let lW=(()=>{class e{isErrorState(t,r){return!!(t&&t.invalid&&(t.touched||r&&r.submitted))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var od=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(od||{});class uW{constructor(n,t,r,s=!1){this._renderer=n,this.element=t,this.config=r,this._animationForciblyDisabledThroughCss=s,this.state=od.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const ND=fO({passive:!0,capture:!0});class Mj{constructor(){this._events=new Map,this._delegateEventHandler=n=>{const t=Am(n);t&&this._events.get(n.type)?.forEach((r,s)=>{(s===t||s.contains(t))&&r.forEach(c=>c.handleEvent(n))})}}addHandler(n,t,r,s){const c=this._events.get(t);if(c){const h=c.get(r);h?h.add(s):c.set(r,new Set([s]))}else this._events.set(t,new Map([[r,new Set([s])]])),n.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,ND)})}removeHandler(n,t,r){const s=this._events.get(n);if(!s)return;const c=s.get(t);c&&(c.delete(r),0===c.size&&s.delete(t),0===s.size&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,ND)))}}const hL={enterDuration:225,exitDuration:150},Aj=fO({passive:!0,capture:!0}),pL=["mousedown","touchstart"],Tj=["mouseup","mouseleave","touchend","touchcancel"];class MO{static#e=this._eventManager=new Mj;constructor(n,t,r,s){this._target=n,this._ngZone=t,this._platform=s,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,s.isBrowser&&(this._containerElement=s1(r))}fadeInRipple(n,t,r={}){const s=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),c={...hL,...r.animation};r.centered&&(n=s.left+s.width/2,t=s.top+s.height/2);const h=r.radius||function fW(e,n,t){const r=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),s=Math.max(Math.abs(n-t.top),Math.abs(n-t.bottom));return Math.sqrt(r*r+s*s)}(n,t,s),y=n-s.left,E=t-s.top,M=c.enterDuration,R=document.createElement("div");R.classList.add("mat-ripple-element"),R.style.left=y-h+"px",R.style.top=E-h+"px",R.style.height=2*h+"px",R.style.width=2*h+"px",null!=r.color&&(R.style.backgroundColor=r.color),R.style.transitionDuration=`${M}ms`,this._containerElement.appendChild(R);const $=window.getComputedStyle(R),X=$.transitionDuration,K="none"===$.transitionProperty||"0s"===X||"0s, 0s"===X||0===s.width&&0===s.height,ie=new uW(this,R,r,K);R.style.transform="scale3d(1, 1, 1)",ie.state=od.FADING_IN,r.persistent||(this._mostRecentTransientRipple=ie);let me=null;return!K&&(M||c.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Me=()=>this._finishRippleTransition(ie),Ce=()=>this._destroyRipple(ie);R.addEventListener("transitionend",Me),R.addEventListener("transitioncancel",Ce),me={onTransitionEnd:Me,onTransitionCancel:Ce}}),this._activeRipples.set(ie,me),(K||!M)&&this._finishRippleTransition(ie),ie}fadeOutRipple(n){if(n.state===od.FADING_OUT||n.state===od.HIDDEN)return;const t=n.element,r={...hL,...n.config.animation};t.style.transitionDuration=`${r.exitDuration}ms`,t.style.opacity="0",n.state=od.FADING_OUT,(n._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){const t=s1(n);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,pL.forEach(r=>{MO._eventManager.addHandler(this._ngZone,r,t,this)}))}handleEvent(n){"mousedown"===n.type?this._onMousedown(n):"touchstart"===n.type?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Tj.forEach(t=>{this._triggerElement.addEventListener(t,this,Aj)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===od.FADING_IN?this._startFadeOutTransition(n):n.state===od.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){const t=n===this._mostRecentTransientRipple,{persistent:r}=n.config;n.state=od.VISIBLE,!r&&(!t||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){const t=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=od.HIDDEN,null!==t&&(n.element.removeEventListener("transitionend",t.onTransitionEnd),n.element.removeEventListener("transitioncancel",t.onTransitionCancel)),n.element.remove()}_onMousedown(n){const t=lj(n),r=this._lastTouchStartEvent&&Date.now(){!n.config.persistent&&(n.state===od.VISIBLE||n.config.terminateOnPointerUp&&n.state===od.FADING_IN)&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const n=this._triggerElement;n&&(pL.forEach(t=>MO._eventManager.removeHandler(t,n,this)),this._pointerUpEventsRegistered&&Tj.forEach(t=>n.removeEventListener(t,this,Aj)))}}const kj=new $e("mat-ripple-global-options");let Ij=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,r,s,c,h){this._elementRef=t,this._animationMode=h,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=c||{},this._rippleRenderer=new MO(this,r,t,s)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,r=0,s){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,r,{...this.rippleConfig,...s}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt),ue(Xs),ue(kj,8),ue(Ko,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-ripple-unbounded",s.unbounded)},inputs:{color:[ht.None,"matRippleColor","color"],unbounded:[ht.None,"matRippleUnbounded","unbounded"],centered:[ht.None,"matRippleCentered","centered"],radius:[ht.None,"matRippleRadius","radius"],animation:[ht.None,"matRippleAnimation","animation"],disabled:[ht.None,"matRippleDisabled","disabled"],trigger:[ht.None,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}return e})(),mL=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),Oj=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,s){2&r&&In("mat-pseudo-checkbox-indeterminate","indeterminate"===s.state)("mat-pseudo-checkbox-checked","checked"===s.state)("mat-pseudo-checkbox-disabled",s.disabled)("mat-pseudo-checkbox-minimal","minimal"===s.appearance)("mat-pseudo-checkbox-full","full"===s.appearance)("_mat-animation-noopable","NoopAnimations"===s._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[xi],decls:0,vars:0,template:function(r,s){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return e})(),gL=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs]})}return e})();const FD=new $e("MAT_OPTION_PARENT_COMPONENT"),pn=new $e("MatOptgroup");let yL=0;class Rj{constructor(n,t=!1){this.source=n,this.isUserInput=t}}let bL=(()=>{class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,r,s,c){this._element=t,this._changeDetectorRef=r,this._parent=s,this.group=c,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+yL++,this.onSelectionChange=new cn,this._stateChanges=new It}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,r){const s=this._getHostElement();"function"==typeof s.focus&&s.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!kh(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new Rj(this,t))}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Qo),ue(FD,8),ue(pn,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-option"]],viewQuery:function(r,s){if(1&r&&ha(yj,7),2&r){let c;zi(c=Pi())&&(s._text=c.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,s){1&r&&yn("click",function(){return s._selectViaInteraction()})("keydown",function(h){return s._handleKeydown(h)}),2&r&&(Vb("id",s.id),hi("aria-selected",s.selected)("aria-disabled",s.disabled.toString()),In("mdc-list-item--selected",s.selected)("mat-mdc-option-multiple",s.multiple)("mat-mdc-option-active",s.active)("mdc-list-item--disabled",s.disabled))},inputs:{value:"value",id:"id",disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[Vs,xi],ngContentSelectors:nW,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox","aria-hidden","true",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","aria-hidden","true","appearance","minimal",3,"disabled"],["class","cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(r,s){1&r&&(Ra(dL),en(0,tW,1,2,"mat-pseudo-checkbox",0),ki(1),Ae(2,"span",1,2),ki(4,1),ke(),en(5,ID,1,1,"mat-pseudo-checkbox",3)(6,bj,2,1,"span",4),Wt(7,"div",5)),2&r&&(eo(0,s.multiple?0:-1),Ze(5),eo(5,s.multiple||!s.selected||s.hideSingleSelectionIndicator?-1:5),Ze(),eo(6,s.group&&s.group._inert?6:-1),Ze(),vt("matRippleTrigger",s._getHostElement())("matRippleDisabled",s.disabled||s.disableRipple))},dependencies:[Oj,Ij],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})(),Nj=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mL,rs,gL]})}return e})();const PD={capture:!0},TO=["focus","click","mouseenter","touchstart"],LD="mat-ripple-loader-uninitialized",os="mat-ripple-loader-class-name",Fj="mat-ripple-loader-centered",M0="mat-ripple-loader-disabled";let bf=(()=>{class e{constructor(){this._document=Xe(mi,{optional:!0}),this._animationMode=Xe(Ko,{optional:!0}),this._globalRippleOptions=Xe(kj,{optional:!0}),this._platform=Xe(Xs),this._ngZone=Xe(Bt),this._hosts=new Map,this._onInteraction=t=>{if(!(t.target instanceof HTMLElement))return;const s=t.target.closest(`[${LD}]`);s&&this._createRipple(s)},this._ngZone.runOutsideAngular(()=>{for(const t of TO)this._document?.addEventListener(t,this._onInteraction,PD)})}ngOnDestroy(){const t=this._hosts.keys();for(const r of t)this.destroyRipple(r);for(const r of TO)this._document?.removeEventListener(r,this._onInteraction,PD)}configureRipple(t,r){t.setAttribute(LD,""),(r.className||!t.hasAttribute(os))&&t.setAttribute(os,r.className||""),r.centered&&t.setAttribute(Fj,""),r.disabled&&t.setAttribute(M0,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,r){const s=this._hosts.get(t);s?s.disabled=r:r?t.setAttribute(M0,""):t.removeAttribute(M0)}_createRipple(t){if(!this._document)return;const r=this._hosts.get(t);if(r)return r;t.querySelector(".mat-ripple")?.remove();const s=this._document.createElement("span");s.classList.add("mat-ripple",t.getAttribute(os)),t.append(s);const c=new Ij(new zn(s),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return c._isInitialized=!0,c.trigger=t,c.centered=t.hasAttribute(Fj),c.disabled=t.hasAttribute(M0),this.attachRipple(t,c),c}attachRipple(t,r){t.removeAttribute(LD),this._hosts.set(t,r)}destroyRipple(t){const r=this._hosts.get(t);r&&(r.ngOnDestroy(),this._hosts.delete(t))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Oh(...e){const n=iD(e),t=function L5(e,n){return"number"==typeof m0(e)?e.pop():n}(e,1/0),r=e;return r.length?1===r.length?Gs(r[0]):f1(t)(Cn(r,n)):Hl}function R_(e){return ye(()=>e)}var Pn=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}(Pn||{});const Im="*";function A0(e,n){return{type:Pn.Trigger,name:e,definitions:n,options:{}}}function Om(e,n=null){return{type:Pn.Animate,styles:n,timings:e}}function La(e){return{type:Pn.Style,styles:e,offset:null}}function Rh(e,n,t){return{type:Pn.State,name:e,styles:n,options:t}}function Nh(e,n,t=null){return{type:Pn.Transition,expr:e,animation:n,options:t}}function _r(e=null){return{type:Pn.AnimateChild,options:e}}function vL(e,n,t=null){return{type:Pn.Query,selector:e,animation:n,options:t}}class $D{constructor(n=0,t=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=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}class Pj{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let t=0,r=0,s=0;const c=this.players.length;0==c?queueMicrotask(()=>this._onFinish()):this.players.forEach(h=>{h.onDone(()=>{++t==c&&this._onFinish()}),h.onDestroy(()=>{++r==c&&this._onDestroy()}),h.onStart(()=>{++s==c&&this._onStart()})}),this.totalTime=this.players.reduce((h,y)=>Math.max(h,y.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const t=n*this.totalTime;this.players.forEach(r=>{const s=r.totalTime?Math.min(1,t/r.totalTime):1;r.setPosition(s)})}getPosition(){const n=this.players.reduce((t,r)=>null===t||r.totalTime>t.totalTime?r:t,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}const IO=["*"],EW=["content"];function CW(e,n){if(1&e){const t=Oa();Ae(0,"div",1),yn("click",function(){return hs(t),so(on()._onBackdropClicked())}),ke()}2&e&&In("mat-drawer-shown",on()._isShowingBackdrop())}function SW(e,n){1&e&&(Ae(0,"mat-drawer-content"),ki(1,2),ke())}const Lj=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],DW=["mat-drawer","mat-drawer-content","*"];function MW(e,n){if(1&e){const t=Oa();Ae(0,"div",1),yn("click",function(){return hs(t),so(on()._onBackdropClicked())}),ke()}2&e&&In("mat-drawer-shown",on()._isShowingBackdrop())}function AW(e,n){1&e&&(Ae(0,"mat-sidenav-content"),ki(1,2),ke())}const $j=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],TW=["mat-sidenav","mat-sidenav-content","*"],Bj={transformDrawer:A0("transform",[Rh("open, open-instant",La({transform:"none",visibility:"visible"})),Rh("void",La({"box-shadow":"none",visibility:"hidden"})),Nh("void => open-instant",Om("0ms")),Nh("void <=> open, open-instant => void",Om("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},IW=new $e("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function zj(){return!1}}),wL=new $e("MAT_DRAWER_CONTAINER");let OO=(()=>{class e extends CD{constructor(t,r,s,c,h){super(s,c,h),this._changeDetectorRef=t,this._container=r}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue(di(()=>fu)),ue(zn),ue(hO),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(r,s){2&r&&_h("margin-left",s._container._contentMargins.left,"px")("margin-right",s._container._contentMargins.right,"px")},standalone:!0,features:[ni([{provide:CD,useExisting:e}]),wn,xi],ngContentSelectors:IO,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},encapsulation:2,changeDetection:0})}return e})(),Vj=(()=>{class e{get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=Mh(t)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=Mh(t)),this._autoFocus=t}get opened(){return this._opened}set opened(t){this.toggle(Mh(t))}constructor(t,r,s,c,h,y,E,M){this._elementRef=t,this._focusTrapFactory=r,this._focusMonitor=s,this._platform=c,this._ngZone=h,this._interactivityChecker=y,this._doc=E,this._container=M,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new It,this._animationEnd=new It,this._animationState="void",this.openedChange=new cn(!0),this._openedStream=this.openedChange.pipe(ii(R=>R),ye(()=>{})),this.openedStart=this._animationStarted.pipe(ii(R=>R.fromState!==R.toState&&0===R.toState.indexOf("open")),R_(void 0)),this._closedStream=this.openedChange.pipe(ii(R=>!R),ye(()=>{})),this.closedStart=this._animationStarted.pipe(ii(R=>R.fromState!==R.toState&&"void"===R.toState),R_(void 0)),this._destroyed=new It,this.onPositionChanged=new cn,this._modeChanged=new It,this.openedChange.subscribe(R=>{R?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Fa(this._elementRef.nativeElement,"keydown").pipe(ii(R=>27===R.keyCode&&!this.disableClose&&!kh(R)),Kn(this._destroyed)).subscribe(R=>this._ngZone.run(()=>{this.close(),R.stopPropagation(),R.preventDefault()}))}),this._animationEnd.pipe(Ih((R,$)=>R.fromState===$.fromState&&R.toState===$.toState)).subscribe(R=>{const{fromState:$,toState:j}=R;(0===j.indexOf("open")&&"void"===$||"void"===j&&0===$.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(t,r){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const s=()=>{t.removeEventListener("blur",s),t.removeEventListener("mousedown",s),t.removeAttribute("tabindex")};t.addEventListener("blur",s),t.addEventListener("mousedown",s)})),t.focus(r)}_focusByCssSelector(t,r){let s=this._elementRef.nativeElement.querySelector(t);s&&this._forceFocus(s,r)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(r=>{!r&&"function"==typeof this._elementRef.nativeElement.focus&&t.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,r){t&&r&&(this._openedVia=r);const s=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),s}_setOpen(t,r,s){return this._opened=t,t?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",r&&this._restoreFocus(s)),this._updateFocusTrapState(),new Promise(c=>{this.openedChange.pipe(Bo(1)).subscribe(h=>c(h?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const r=this._elementRef.nativeElement,s=r.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),s.insertBefore(this._anchor,r)),s.appendChild(r)):this._anchor&&this._anchor.parentNode.insertBefore(r,this._anchor)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(k_),ue(Xs),ue(Bt),ue(h1),ue(mi,8),ue(wL,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer"]],viewQuery:function(r,s){if(1&r&&ha(EW,5),2&r){let c;zi(c=Pi())&&(s._content=c.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(r,s){1&r&&gN("@transform.start",function(h){return s._animationStarted.next(h)})("@transform.done",function(h){return s._animationEnd.next(h)}),2&r&&(hi("align",null),YR("@transform",s._animationState),In("mat-drawer-end","end"===s.position)("mat-drawer-over","over"===s.mode)("mat-drawer-push","push"===s.mode)("mat-drawer-side","side"===s.mode)("mat-drawer-opened",s.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[xi],ngContentSelectors:IO,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(r,s){1&r&&(Ra(),Ae(0,"div",0,1),ki(2),ke())},dependencies:[CD],encapsulation:2,data:{animation:[Bj.transformDrawer]},changeDetection:0})}return e})(),fu=(()=>{class e{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=Mh(t)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:Mh(t)}get scrollable(){return this._userContent||this._content}constructor(t,r,s,c,h,y=!1,E){this._dir=t,this._element=r,this._ngZone=s,this._changeDetectorRef=c,this._animationMode=E,this._drawers=new Xb,this.backdropClick=new cn,this._destroyed=new It,this._doCheckSubject=new It,this._contentMargins={left:null,right:null},this._contentMarginChanges=new It,t&&t.change.pipe(Kn(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),h.change().pipe(Kn(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=y}ngAfterContentInit(){this._allDrawers.changes.pipe(Wl(this._allDrawers),Kn(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(r=>!r._container||r._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Wl(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(SD(10),Kn(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,r=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const s=this._left._getWidth();t+=s,r-=s}if(this._right&&this._right.opened)if("side"==this._right.mode)r+=this._right._getWidth();else if("push"==this._right.mode){const s=this._right._getWidth();r+=s,t-=s}t=t||null,r=r||null,(t!==this._contentMargins.left||r!==this._contentMargins.right)&&(this._contentMargins={left:t,right:r},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(ii(r=>r.fromState!==r.toState),Kn(this._drawers.changes)).subscribe(r=>{"open-instant"!==r.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Kn(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Kn(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Bo(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Kn(Oh(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const r=this._element.nativeElement.classList,s="mat-drawer-container-has-open";t?r.add(s):r.remove(s)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static#e=this.\u0275fac=function(r){return new(r||e)(ue(rd,8),ue(zn),ue(Bt),ue(Qo),ue(pO),ue(IW),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,OO,5),vs(c,Vj,5)),2&r){let h;zi(h=Pi())&&(s._content=h.first),zi(h=Pi())&&(s._allDrawers=h)}},viewQuery:function(r,s){if(1&r&&ha(OO,5),2&r){let c;zi(c=Pi())&&(s._userContent=c.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-drawer-container-explicit-backdrop",s._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[ni([{provide:wL,useExisting:e}]),xi],ngContentSelectors:DW,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,s){1&r&&(Ra(Lj),en(0,CW,1,2,"div",0),ki(1),ki(2,1),en(3,SW,2,0,"mat-drawer-content")),2&r&&(eo(0,s.hasBackdrop?0:-1),Ze(3),eo(3,s._content?-1:3))},dependencies:[OO],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),g1=(()=>{class e extends OO{constructor(t,r,s,c,h){super(t,r,s,c,h)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue(di(()=>RO)),ue(zn),ue(hO),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(r,s){2&r&&_h("margin-left",s._container._contentMargins.left,"px")("margin-right",s._container._contentMargins.right,"px")},standalone:!0,features:[ni([{provide:CD,useExisting:e}]),wn,xi],ngContentSelectors:IO,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},encapsulation:2,changeDetection:0})}return e})(),BD=(()=>{class e extends Vj{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=Mh(t)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=r1(t)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=r1(t)}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(r,s){2&r&&(hi("align",null),_h("top",s.fixedInViewport?s.fixedTopGap:null,"px")("bottom",s.fixedInViewport?s.fixedBottomGap:null,"px"),In("mat-drawer-end","end"===s.position)("mat-drawer-over","over"===s.mode)("mat-drawer-push","push"===s.mode)("mat-drawer-side","side"===s.mode)("mat-drawer-opened",s.opened)("mat-sidenav-fixed",s.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],standalone:!0,features:[wn,xi],ngContentSelectors:IO,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(r,s){1&r&&(Ra(),Ae(0,"div",0,1),ki(2),ke())},dependencies:[CD],encapsulation:2,data:{animation:[Bj.transformDrawer]},changeDetection:0})}return e})(),RO=(()=>{class e extends fu{constructor(){super(...arguments),this._allDrawers=void 0,this._content=void 0}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav-container"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,g1,5),vs(c,BD,5)),2&r){let h;zi(h=Pi())&&(s._content=h.first),zi(h=Pi())&&(s._allDrawers=h)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-drawer-container-explicit-backdrop",s._backdropOverride)},exportAs:["matSidenavContainer"],standalone:!0,features:[ni([{provide:wL,useExisting:e}]),wn,xi],ngContentSelectors:TW,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,s){1&r&&(Ra($j),en(0,MW,1,2,"div",0),ki(1),ki(2,1),en(3,AW,2,0,"mat-sidenav-content")),2&r&&(eo(0,s.hasBackdrop?0:-1),Ze(3),eo(3,s._content?-1:3))},dependencies:[g1],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),OW=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,Tm,Tm,rs]})}return e})();function jj(e){return new _e(3e3,!1)}function k0(e){switch(e.length){case 0:return new $D;case 1:return e[0];default:return new Pj(e)}}function YW(e,n,t=new Map,r=new Map){const s=[],c=[];let h=-1,y=null;if(n.forEach(E=>{const M=E.get("offset"),R=M==h,$=R&&y||new Map;E.forEach((j,X)=>{let K=X,ie=j;if("offset"!==X)switch(K=e.normalizePropertyName(K,s),ie){case"!":ie=t.get(X);break;case Im:ie=r.get(X);break;default:ie=e.normalizeStyleValue(X,K,ie,s)}$.set(K,ie)}),R||c.push($),y=$,h=M}),s.length)throw function b1(e){return new _e(3502,!1)}();return c}function Yj(e,n,t,r){switch(n){case"start":e.onStart(()=>r(t&&Kj(t,"start",e)));break;case"done":e.onDone(()=>r(t&&Kj(t,"done",e)));break;case"destroy":e.onDestroy(()=>r(t&&Kj(t,"destroy",e)))}}function Kj(e,n,t){const c=VD(e.element,e.triggerName,e.fromState,e.toState,n||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),h=e._data;return null!=h&&(c._data=h),c}function VD(e,n,t,r,s="",c=0,h){return{element:e,triggerName:n,fromState:t,toState:r,phaseName:s,totalTime:c,disabled:!!h}}function $a(e,n,t){let r=e.get(n);return r||e.set(n,r=t),r}function ji(e){const n=e.indexOf(":");return[e.substring(1,n),e.slice(n+1)]}const ad=typeof document>"u"?null:document.documentElement;function v1(e){const n=e.parentNode||e.host||null;return n===ad?null:n}let Rm=null,Qj=!1;function ML(e,n){for(;n;){if(n===e)return!0;n=v1(n)}return!1}function Jj(e,n,t){if(t)return Array.from(e.querySelectorAll(n));const r=e.querySelector(n);return r?[r]:[]}let jD=(()=>{class e{validateStyleProperty(t){return function I0(e){Rm||(Rm=function Mc(){return typeof document<"u"?document.body:null}()||{},Qj=!!Rm.style&&"WebkitAppearance"in Rm.style);let n=!0;return Rm.style&&!function Zj(e){return"ebkit"==e.substring(1,6)}(e)&&(n=e in Rm.style,!n&&Qj&&(n="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Rm.style)),n}(t)}matchesElement(t,r){return!1}containsElement(t,r){return ML(t,r)}getParentElement(t){return v1(t)}query(t,r,s){return Jj(t,r,s)}computeStyle(t,r,s){return s||""}animate(t,r,s,c,h,y=[],E){return new $D(s,c)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class TL{static#e=this.NOOP=new jD}class PO{}const KW=1e3,kL="ng-enter",UD="ng-leave",LO="ng-trigger",$O=".ng-trigger",BO="ng-animating",HD=".ng-animating";function ld(e){if("number"==typeof e)return e;const n=e.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:IL(parseFloat(n[1]),n[2])}function IL(e,n){return"s"===n?e*KW:e}function zO(e,n,t){return e.hasOwnProperty("duration")?e:function QW(e,n,t){let s,c=0,h="";if("string"==typeof e){const y=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===y)return n.push(jj()),{duration:0,delay:0,easing:""};s=IL(parseFloat(y[1]),y[2]);const E=y[3];null!=E&&(c=IL(parseFloat(E),y[4]));const M=y[5];M&&(h=M)}else s=e;if(!t){let y=!1,E=n.length;s<0&&(n.push(function RW(){return new _e(3100,!1)}()),y=!0),c<0&&(n.push(function NW(){return new _e(3101,!1)}()),y=!0),y&&n.splice(E,0,jj())}return{duration:s,delay:c,easing:h}}(e,n,t)}function Ph(e,n,t){n.forEach((r,s)=>{const c=GD(s);t&&!t.has(s)&&t.set(s,e.style[c]),e.style[c]=r})}function O0(e,n){n.forEach((t,r)=>{const s=GD(r);e.style[s]=""})}function WD(e){return Array.isArray(e)?1==e.length?e[0]:function mW(e,n=null){return{type:Pn.Sequence,steps:e,options:n}}(e):e}const VO=new RegExp("{{\\s*(.+?)\\s*}}","g");function OL(e){let n=[];if("string"==typeof e){let t;for(;t=VO.exec(e);)n.push(t[1]);VO.lastIndex=0}return n}function qD(e,n,t){const r=`${e}`,s=r.replace(VO,(c,h)=>{let y=n[h];return null==y&&(t.push(function FW(e){return new _e(3003,!1)}()),y=""),y.toString()});return s==r?e:s}const tq=/-+([a-z0-9])/g;function GD(e){return e.replace(tq,(...n)=>n[1].toUpperCase())}function pu(e,n,t){switch(n.type){case Pn.Trigger:return e.visitTrigger(n,t);case Pn.State:return e.visitState(n,t);case Pn.Transition:return e.visitTransition(n,t);case Pn.Sequence:return e.visitSequence(n,t);case Pn.Group:return e.visitGroup(n,t);case Pn.Animate:return e.visitAnimate(n,t);case Pn.Keyframes:return e.visitKeyframes(n,t);case Pn.Style:return e.visitStyle(n,t);case Pn.Reference:return e.visitReference(n,t);case Pn.AnimateChild:return e.visitAnimateChild(n,t);case Pn.AnimateRef:return e.visitAnimateRef(n,t);case Pn.Query:return e.visitQuery(n,t);case Pn.Stagger:return e.visitStagger(n,t);default:throw function PW(e){return new _e(3004,!1)}()}}function RL(e,n){return window.getComputedStyle(e)[n]}const i4=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 r4 extends PO{normalizePropertyName(n,t){return GD(n)}normalizeStyleValue(n,t,r,s){let c="";const h=r.toString().trim();if(i4.has(t)&&0!==r&&"0"!==r)if("number"==typeof r)c="px";else{const y=r.match(/^[+-]?[\d\.]+([a-z]*)$/);y&&0==y[1].length&&s.push(function LW(e,n){return new _e(3005,!1)}())}return h+c}}const R0="*";const F_=new Set(["true","1"]),jO=new Set(["false","0"]);function l4(e,n){const t=F_.has(e)||jO.has(e),r=F_.has(n)||jO.has(n);return(s,c)=>{let h=e==R0||e==s,y=n==R0||n==c;return!h&&t&&"boolean"==typeof s&&(h=s?F_.has(e):jO.has(e)),!y&&r&&"boolean"==typeof c&&(y=c?F_.has(n):jO.has(n)),h&&y}}const UO=new RegExp("s*:selfs*,?","g");function FL(e,n,t,r){return new sq(e).build(n,t,r)}class sq{constructor(n){this._driver=n}build(n,t,r){const s=new cq(t);return this._resetContextStyleTimingState(s),pu(this,WD(n),s)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,t){let r=t.queryCount=0,s=t.depCount=0;const c=[],h=[];return"@"==n.name.charAt(0)&&t.errors.push(function $W(){return new _e(3006,!1)}()),n.definitions.forEach(y=>{if(this._resetContextStyleTimingState(t),y.type==Pn.State){const E=y,M=E.name;M.toString().split(/\s*,\s*/).forEach(R=>{E.name=R,c.push(this.visitState(E,t))}),E.name=M}else if(y.type==Pn.Transition){const E=this.visitTransition(y,t);r+=E.queryCount,s+=E.depCount,h.push(E)}else t.errors.push(function BW(){return new _e(3007,!1)}())}),{type:Pn.Trigger,name:n.name,states:c,transitions:h,queryCount:r,depCount:s,options:null}}visitState(n,t){const r=this.visitStyle(n.styles,t),s=n.options&&n.options.params||null;if(r.containsDynamicStyles){const c=new Set,h=s||{};r.styles.forEach(y=>{y instanceof Map&&y.forEach(E=>{OL(E).forEach(M=>{h.hasOwnProperty(M)||c.add(M)})})}),c.size&&t.errors.push(function Hj(e,n){return new _e(3008,!1)}(0,c.values()))}return{type:Pn.State,name:n.name,style:r,options:s?{params:s}:null}}visitTransition(n,t){t.queryCount=0,t.depCount=0;const r=pu(this,WD(n.animation),t),s=function N0(e,n){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(r=>function s4(e,n,t){if(":"==e[0]){const E=function a4(e,n){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,r)=>parseFloat(r)>parseFloat(t);case":decrement":return(t,r)=>parseFloat(r) *"}}(e,t);if("function"==typeof E)return void n.push(E);e=E}const r=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return t.push(function UW(e){return new _e(3015,!1)}()),n;const s=r[1],c=r[2],h=r[3];n.push(l4(s,h)),"<"==c[0]&&(s!=R0||h!=R0)&&n.push(l4(h,s))}(r,t,n)):t.push(e),t}(n.expr,t.errors);return{type:Pn.Transition,matchers:s,animation:r,queryCount:t.queryCount,depCount:t.depCount,options:F0(n.options)}}visitSequence(n,t){return{type:Pn.Sequence,steps:n.steps.map(r=>pu(this,r,t)),options:F0(n.options)}}visitGroup(n,t){const r=t.currentTime;let s=0;const c=n.steps.map(h=>{t.currentTime=r;const y=pu(this,h,t);return s=Math.max(s,t.currentTime),y});return t.currentTime=s,{type:Pn.Group,steps:c,options:F0(n.options)}}visitAnimate(n,t){const r=function uq(e,n){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return PL(zO(e,n).duration,0,"");const t=e;if(t.split(/\s+/).some(c=>"{"==c.charAt(0)&&"{"==c.charAt(1))){const c=PL(0,0,"");return c.dynamic=!0,c.strValue=t,c}const s=zO(t,n);return PL(s.duration,s.delay,s.easing)}(n.timings,t.errors);t.currentAnimateTimings=r;let s,c=n.styles?n.styles:La({});if(c.type==Pn.Keyframes)s=this.visitKeyframes(c,t);else{let h=n.styles,y=!1;if(!h){y=!0;const M={};r.easing&&(M.easing=r.easing),h=La(M)}t.currentTime+=r.duration+r.delay;const E=this.visitStyle(h,t);E.isEmptyStep=y,s=E}return t.currentAnimateTimings=null,{type:Pn.Animate,timings:r,style:s,options:null}}visitStyle(n,t){const r=this._makeStyleAst(n,t);return this._validateStyleAst(r,t),r}_makeStyleAst(n,t){const r=[],s=Array.isArray(n.styles)?n.styles:[n.styles];for(let y of s)"string"==typeof y?y===Im?r.push(y):t.errors.push(new _e(3002,!1)):r.push(new Map(Object.entries(y)));let c=!1,h=null;return r.forEach(y=>{if(y instanceof Map&&(y.has("easing")&&(h=y.get("easing"),y.delete("easing")),!c))for(let E of y.values())if(E.toString().indexOf("{{")>=0){c=!0;break}}),{type:Pn.Style,styles:r,easing:h,offset:n.offset,containsDynamicStyles:c,options:null}}_validateStyleAst(n,t){const r=t.currentAnimateTimings;let s=t.currentTime,c=t.currentTime;r&&c>0&&(c-=r.duration+r.delay),n.styles.forEach(h=>{"string"!=typeof h&&h.forEach((y,E)=>{const M=t.collectedStyles.get(t.currentQuerySelector),R=M.get(E);let $=!0;R&&(c!=s&&c>=R.startTime&&s<=R.endTime&&(t.errors.push(function vf(e,n,t,r,s){return new _e(3010,!1)}()),$=!1),c=R.startTime),$&&M.set(E,{startTime:c,endTime:s}),t.options&&function eq(e,n,t){const r=n.params||{},s=OL(e);s.length&&s.forEach(c=>{r.hasOwnProperty(c)||t.push(function Uj(e){return new _e(3001,!1)}())})}(y,t.options,t.errors)})})}visitKeyframes(n,t){const r={type:Pn.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function _1(){return new _e(3011,!1)}()),r;let c=0;const h=[];let y=!1,E=!1,M=0;const R=n.steps.map(Me=>{const Ce=this._makeStyleAst(Me,t);let rt=null!=Ce.offset?Ce.offset:function u4(e){if("string"==typeof e)return null;let n=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const r=t;n=parseFloat(r.get("offset")),r.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;n=parseFloat(t.get("offset")),t.delete("offset")}return n}(Ce.styles),Mt=0;return null!=rt&&(c++,Mt=Ce.offset=rt),E=E||Mt<0||Mt>1,y=y||Mt0&&c<$?t.errors.push(function qj(){return new _e(3202,!1)}()):0==c&&(j=1/($-1));const X=$-1,K=t.currentTime,ie=t.currentAnimateTimings,me=ie.duration;return R.forEach((Me,Ce)=>{const rt=j>0?Ce==X?1:j*Ce:h[Ce],Mt=rt*me;t.currentTime=K+ie.delay+Mt,ie.duration=Mt,this._validateStyleAst(Me,t),Me.offset=rt,r.styles.push(Me)}),r}visitReference(n,t){return{type:Pn.Reference,animation:pu(this,WD(n.animation),t),options:F0(n.options)}}visitAnimateChild(n,t){return t.depCount++,{type:Pn.AnimateChild,options:F0(n.options)}}visitAnimateRef(n,t){return{type:Pn.AnimateRef,animation:this.visitReference(n.animation,t),options:F0(n.options)}}visitQuery(n,t){const r=t.currentQuerySelector,s=n.options||{};t.queryCount++,t.currentQuery=n;const[c,h]=function aq(e){const n=!!e.split(/\s*,\s*/).find(t=>":self"==t);return n&&(e=e.replace(UO,"")),e=e.replace(/@\*/g,$O).replace(/@\w+/g,t=>$O+"-"+t.slice(1)).replace(/:animating/g,HD),[e,n]}(n.selector);t.currentQuerySelector=r.length?r+" "+c:c,$a(t.collectedStyles,t.currentQuerySelector,new Map);const y=pu(this,WD(n.animation),t);return t.currentQuery=null,t.currentQuerySelector=r,{type:Pn.Query,selector:c,limit:s.limit||0,optional:!!s.optional,includeSelf:h,animation:y,originalSelector:n.selector,options:F0(n.options)}}visitStagger(n,t){t.currentQuery||t.errors.push(function VW(){return new _e(3013,!1)}());const r="full"===n.timings?{duration:0,delay:0,easing:"full"}:zO(n.timings,t.errors,!0);return{type:Pn.Stagger,animation:pu(this,WD(n.animation),t),timings:r,options:null}}}class cq{constructor(n){this.errors=n,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 F0(e){return e?(e={...e}).params&&(e.params=function lq(e){return e?{...e}:null}(e.params)):e={},e}function PL(e,n,t){return{duration:e,delay:n,easing:t}}function LL(e,n,t,r,s,c,h=null,y=!1){return{type:1,element:e,keyframes:n,preStyleProps:t,postStyleProps:r,duration:s,delay:c,totalTime:s+c,easing:h,subTimeline:y}}class HO{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,t){let r=this._map.get(n);r||this._map.set(n,r=[]),r.push(...t)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const hq=new RegExp(":enter","g"),P0=new RegExp(":leave","g");function WO(e,n,t,r,s,c=new Map,h=new Map,y,E,M=[]){return(new d4).buildKeyframes(e,n,t,r,s,c,h,y,E,M)}class d4{buildKeyframes(n,t,r,s,c,h,y,E,M,R=[]){M=M||new HO;const $=new ws(n,t,M,s,c,R,[]);$.options=E;const j=E.delay?ld(E.delay):0;$.currentTimeline.delayNextStep(j),$.currentTimeline.setStyles([h],null,$.errors,E),pu(this,r,$);const X=$.timelines.filter(K=>K.containsAnimation());if(X.length&&y.size){let K;for(let ie=X.length-1;ie>=0;ie--){const me=X[ie];if(me.element===t){K=me;break}}K&&!K.allowOnlyTimelineStyles()&&K.setStyles([y],null,$.errors,E)}return X.length?X.map(K=>K.buildKeyframes()):[LL(t,[],[],[],0,j,"",!1)]}visitTrigger(n,t){}visitState(n,t){}visitTransition(n,t){}visitAnimateChild(n,t){const r=t.subInstructions.get(t.element);if(r){const s=t.createSubContext(n.options),c=t.currentTimeline.currentTime,h=this._visitSubInstructions(r,s,s.options);c!=h&&t.transformIntoNewTimeline(h)}t.previousNode=n}visitAnimateRef(n,t){const r=t.createSubContext(n.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],t,r),this.visitReference(n.animation,r),t.transformIntoNewTimeline(r.currentTimeline.currentTime),t.previousNode=n}_applyAnimationRefDelays(n,t,r){for(const s of n){const c=s?.delay;if(c){const h="number"==typeof c?c:ld(qD(c,s?.params??{},t.errors));r.delayNextStep(h)}}}_visitSubInstructions(n,t,r){let c=t.currentTimeline.currentTime;const h=null!=r.duration?ld(r.duration):null,y=null!=r.delay?ld(r.delay):null;return 0!==h&&n.forEach(E=>{const M=t.appendInstructionToTimeline(E,h,y);c=Math.max(c,M.duration+M.delay)}),c}visitReference(n,t){t.updateOptions(n.options,!0),pu(this,n.animation,t),t.previousNode=n}visitSequence(n,t){const r=t.subContextCount;let s=t;const c=n.options;if(c&&(c.params||c.delay)&&(s=t.createSubContext(c),s.transformIntoNewTimeline(),null!=c.delay)){s.previousNode.type==Pn.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=L0);const h=ld(c.delay);s.delayNextStep(h)}n.steps.length&&(n.steps.forEach(h=>pu(this,h,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>r&&s.transformIntoNewTimeline()),t.previousNode=n}visitGroup(n,t){const r=[];let s=t.currentTimeline.currentTime;const c=n.options&&n.options.delay?ld(n.options.delay):0;n.steps.forEach(h=>{const y=t.createSubContext(n.options);c&&y.delayNextStep(c),pu(this,h,y),s=Math.max(s,y.currentTimeline.currentTime),r.push(y.currentTimeline)}),r.forEach(h=>t.currentTimeline.mergeTimelineCollectedStyles(h)),t.transformIntoNewTimeline(s),t.previousNode=n}_visitTiming(n,t){if(n.dynamic){const r=n.strValue;return zO(t.params?qD(r,t.params,t.errors):r,t.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,t){const r=t.currentAnimateTimings=this._visitTiming(n.timings,t),s=t.currentTimeline;r.delay&&(t.incrementTime(r.delay),s.snapshotCurrentStyles());const c=n.style;c.type==Pn.Keyframes?this.visitKeyframes(c,t):(t.incrementTime(r.duration),this.visitStyle(c,t),s.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=n}visitStyle(n,t){const r=t.currentTimeline,s=t.currentAnimateTimings;!s&&r.hasCurrentStyleProperties()&&r.forwardFrame();const c=s&&s.easing||n.easing;n.isEmptyStep?r.applyEmptyStep(c):r.setStyles(n.styles,c,t.errors,t.options),t.previousNode=n}visitKeyframes(n,t){const r=t.currentAnimateTimings,s=t.currentTimeline.duration,c=r.duration,y=t.createSubContext().currentTimeline;y.easing=r.easing,n.styles.forEach(E=>{y.forwardTime((E.offset||0)*c),y.setStyles(E.styles,E.easing,t.errors,t.options),y.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(y),t.transformIntoNewTimeline(s+c),t.previousNode=n}visitQuery(n,t){const r=t.currentTimeline.currentTime,s=n.options||{},c=s.delay?ld(s.delay):0;c&&(t.previousNode.type===Pn.Style||0==r&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=L0);let h=r;const y=t.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!s.optional,t.errors);t.currentQueryTotal=y.length;let E=null;y.forEach((M,R)=>{t.currentQueryIndex=R;const $=t.createSubContext(n.options,M);c&&$.delayNextStep(c),M===t.element&&(E=$.currentTimeline),pu(this,n.animation,$),$.currentTimeline.applyStylesToKeyframe(),h=Math.max(h,$.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(h),E&&(t.currentTimeline.mergeTimelineCollectedStyles(E),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=n}visitStagger(n,t){const r=t.parentContext,s=t.currentTimeline,c=n.timings,h=Math.abs(c.duration),y=h*(t.currentQueryTotal-1);let E=h*t.currentQueryIndex;switch(c.duration<0?"reverse":c.easing){case"reverse":E=y-E;break;case"full":E=r.currentStaggerTime}const R=t.currentTimeline;E&&R.delayNextStep(E);const $=R.currentTime;pu(this,n.animation,t),t.previousNode=n,r.currentStaggerTime=s.currentTime-$+(s.startTime-r.currentTimeline.startTime)}}const L0={};class ws{constructor(n,t,r,s,c,h,y,E){this._driver=n,this.element=t,this.subInstructions=r,this._enterClassName=s,this._leaveClassName=c,this.errors=h,this.timelines=y,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=L0,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=E||new Ac(this._driver,t,0),y.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,t){if(!n)return;const r=n;let s=this.options;null!=r.duration&&(s.duration=ld(r.duration)),null!=r.delay&&(s.delay=ld(r.delay));const c=r.params;if(c){let h=s.params;h||(h=this.options.params={}),Object.keys(c).forEach(y=>{(!t||!h.hasOwnProperty(y))&&(h[y]=qD(c[y],h,this.errors))})}}_copyOptions(){const n={};if(this.options){const t=this.options.params;if(t){const r=n.params={};Object.keys(t).forEach(s=>{r[s]=t[s]})}}return n}createSubContext(n=null,t,r){const s=t||this.element,c=new ws(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,r||0));return c.previousNode=this.previousNode,c.currentAnimateTimings=this.currentAnimateTimings,c.options=this._copyOptions(),c.updateOptions(n),c.currentQueryIndex=this.currentQueryIndex,c.currentQueryTotal=this.currentQueryTotal,c.parentContext=this,this.subContextCount++,c}transformIntoNewTimeline(n){return this.previousNode=L0,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,t,r){const s={duration:t??n.duration,delay:this.currentTimeline.currentTime+(r??0)+n.delay,easing:""},c=new f4(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,s,n.stretchStartingKeyframe);return this.timelines.push(c),s}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,t,r,s,c,h){let y=[];if(s&&y.push(this.element),n.length>0){n=(n=n.replace(hq,"."+this._enterClassName)).replace(P0,"."+this._leaveClassName);let M=this._driver.query(this.element,n,1!=r);0!==r&&(M=r<0?M.slice(M.length+r,M.length):M.slice(0,r)),y.push(...M)}return!c&&0==y.length&&h.push(function jW(e){return new _e(3014,!1)}()),y}}class Ac{constructor(n,t,r,s){this._driver=n,this.element=t,this.startTime=r,this._elementTimelineStylesLookup=s,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(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,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(n){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+n),t&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,t){return this.applyStylesToKeyframe(),new Ac(this._driver,n,t||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(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,t){this._localTimelineStyles.set(n,t),this._globalTimelineStyles.set(n,t),this._styleSummary.set(n,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[t,r]of this._globalTimelineStyles)this._backFill.set(t,r||Im),this._currentKeyframe.set(t,Im);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,t,r,s){t&&this._previousKeyframe.set("easing",t);const c=s&&s.params||{},h=function mq(e,n){const t=new Map;let r;return e.forEach(s=>{if("*"===s){r??=n.keys();for(let c of r)t.set(c,Im)}else for(let[c,h]of s)t.set(c,h)}),t}(n,this._globalTimelineStyles);for(let[y,E]of h){const M=qD(E,c,r);this._pendingStyles.set(y,M),this._localTimelineStyles.has(y)||this._backFill.set(y,this._globalTimelineStyles.get(y)??Im),this._updateStyle(y,M)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,t)=>{this._currentKeyframe.set(t,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,n)}))}snapshotCurrentStyles(){for(let[n,t]of this._localTimelineStyles)this._pendingStyles.set(n,t),this._updateStyle(n,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let t in this._currentKeyframe)n.push(t);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((t,r)=>{const s=this._styleSummary.get(r);(!s||t.time>s.time)&&this._updateStyle(r,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,t=new Set,r=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((y,E)=>{const M=new Map([...this._backFill,...y]);M.forEach((R,$)=>{"!"===R?n.add($):R===Im&&t.add($)}),r||M.set("offset",E/this.duration),s.push(M)});const c=[...n.values()],h=[...t.values()];if(r){const y=s[0],E=new Map(y);y.set("offset",0),E.set("offset",1),s=[y,E]}return LL(this.element,s,c,h,this.duration,this.startTime,this.easing,!1)}}class f4 extends Ac{constructor(n,t,r,s,c,h,y=!1){super(n,t,h.delay),this.keyframes=r,this.preStyleProps=s,this.postStyleProps=c,this._stretchStartingKeyframe=y,this.timings={duration:h.duration,delay:h.delay,easing:h.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:t,duration:r,easing:s}=this.timings;if(this._stretchStartingKeyframe&&t){const c=[],h=r+t,y=t/h,E=new Map(n[0]);E.set("offset",0),c.push(E);const M=new Map(n[0]);M.set("offset",h4(y)),c.push(M);const R=n.length-1;for(let $=1;$<=R;$++){let j=new Map(n[$]);const X=j.get("offset");j.set("offset",h4((t+X*r)/h)),c.push(j)}r=h,t=0,s="",n=c}return LL(this.element,n,this.preStyleProps,this.postStyleProps,r,t,s,!0)}}function h4(e,n=3){const t=Math.pow(10,n-1);return Math.round(e*t)/t}function p4(e,n,t,r,s,c,h,y,E,M,R,$,j){return{type:0,element:e,triggerName:n,isRemovalTransition:s,fromState:t,fromStyles:c,toState:r,toStyles:h,timelines:y,queriedElements:E,preStyleProps:M,postStyleProps:R,totalTime:$,errors:j}}const $L={};class m4{constructor(n,t,r){this._triggerName=n,this.ast=t,this._stateStyles=r}match(n,t,r,s){return function g4(e,n,t,r,s){return e.some(c=>c(n,t,r,s))}(this.ast.matchers,n,t,r,s)}buildStyles(n,t,r){let s=this._stateStyles.get("*");return void 0!==n&&(s=this._stateStyles.get(n?.toString())||s),s?s.buildStyles(t,r):new Map}build(n,t,r,s,c,h,y,E,M,R){const $=[],j=this.ast.options&&this.ast.options.params||$L,K=this.buildStyles(r,y&&y.params||$L,$),ie=E&&E.params||$L,me=this.buildStyles(s,ie,$),Me=new Set,Ce=new Map,rt=new Map,Mt="void"===s,Et={params:BL(ie,j),delay:this.ast.options?.delay},Qt=R?[]:WO(n,t,this.ast.animation,c,h,K,me,Et,M,$);let mn=0;return Qt.forEach(Ei=>{mn=Math.max(Ei.duration+Ei.delay,mn)}),$.length?p4(t,this._triggerName,r,s,Mt,K,me,[],[],Ce,rt,mn,$):(Qt.forEach(Ei=>{const Cs=Ei.element,U_=$a(Ce,Cs,new Set);Ei.preStyleProps.forEach(jh=>U_.add(jh));const S2=$a(rt,Cs,new Set);Ei.postStyleProps.forEach(jh=>S2.add(jh)),Cs!==t&&Me.add(Cs)}),p4(t,this._triggerName,r,s,Mt,K,me,Qt,[...Me.values()],Ce,rt,mn))}}function BL(e,n){const t={...n};return Object.entries(e).forEach(([r,s])=>{null!=s&&(t[r]=s)}),t}class zL{constructor(n,t,r){this.styles=n,this.defaultParams=t,this.normalizer=r}buildStyles(n,t){const r=new Map,s=BL(n,this.defaultParams);return this.styles.styles.forEach(c=>{"string"!=typeof c&&c.forEach((h,y)=>{h&&(h=qD(h,s,t));const E=this.normalizer.normalizePropertyName(y,t);h=this.normalizer.normalizeStyleValue(y,E,h,t),r.set(y,h)})}),r}}class x1{constructor(n,t,r){this.name=n,this.ast=t,this._normalizer=r,this.transitionFactories=[],this.states=new Map,t.states.forEach(s=>{this.states.set(s.name,new zL(s.style,s.options&&s.options.params||{},r))}),$0(this.states,"true","1"),$0(this.states,"false","0"),t.transitions.forEach(s=>{this.transitionFactories.push(new m4(n,s,this.states))}),this.fallbackTransition=function _q(e,n,t){return new m4(e,{type:Pn.Transition,animation:{type:Pn.Sequence,steps:[],options:null},matchers:[(h,y)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,t,r,s){return this.transitionFactories.find(h=>h.match(n,t,r,s))||null}matchStyles(n,t,r){return this.fallbackTransition.buildStyles(n,t,r)}}function $0(e,n,t){e.has(n)?e.has(t)||e.set(t,e.get(n)):e.has(t)&&e.set(n,e.get(t))}const w1=new HO;class _4{constructor(n,t,r){this.bodyNode=n,this._driver=t,this._normalizer=r,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,t){const r=[],c=FL(this._driver,t,r,[]);if(r.length)throw function qW(e){return new _e(3503,!1)}();this._animations.set(n,c)}_buildPlayer(n,t,r){const s=n.element,c=YW(this._normalizer,n.keyframes,t,r);return this._driver.animate(s,c,n.duration,n.delay,n.easing,[],!0)}create(n,t,r={}){const s=[],c=this._animations.get(n);let h;const y=new Map;if(c?(h=WO(this._driver,t,c,kL,UD,new Map,new Map,r,w1,s),h.forEach(R=>{const $=$a(y,R.element,new Map);R.postStyleProps.forEach(j=>$.set(j,null))})):(s.push(function sd(){return new _e(3300,!1)}()),h=[]),s.length)throw function zD(e){return new _e(3504,!1)}();y.forEach((R,$)=>{R.forEach((j,X)=>{R.set(X,this._driver.computeStyle($,X,Im))})});const M=k0(h.map(R=>{const $=y.get(R.element);return this._buildPlayer(R,new Map,$)}));return this._playersById.set(n,M),M.onDestroy(()=>this.destroy(n)),this.players.push(M),M}destroy(n){const t=this._getPlayer(n);t.destroy(),this._playersById.delete(n);const r=this.players.indexOf(t);r>=0&&this.players.splice(r,1)}_getPlayer(n){const t=this._playersById.get(n);if(!t)throw function SL(e){return new _e(3301,!1)}();return t}listen(n,t,r,s){const c=VD(t,"","","");return Yj(this._getPlayer(n),r,c,s),()=>{}}command(n,t,r,s){if("register"==r)return void this.register(n,s[0]);if("create"==r)return void this.create(n,t,s[0]||{});const c=this._getPlayer(n);switch(r){case"play":c.play();break;case"pause":c.pause();break;case"reset":c.reset();break;case"restart":c.restart();break;case"finish":c.finish();break;case"init":c.init();break;case"setPosition":c.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(n)}}}const y4="ng-animate-queued",qO="ng-animate-disabled",VL=[],b4={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},wq={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},xf="__ng_removed";class jL{get params(){return this.options.params}constructor(n,t=""){this.namespaceId=t;const r=n&&n.hasOwnProperty("value");if(this.value=function v4(e){return e??null}(r?n.value:n),r){const{value:c,...h}=n;this.options=h}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const t=n.params;if(t){const r=this.options.params;Object.keys(t).forEach(s=>{null==r[s]&&(r[s]=t[s])})}}}const XD="void",GO=new jL(XD);class Eq{constructor(n,t,r){this.id=n,this.hostElement=t,this._engine=r,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,cd(t,this._hostClassName)}listen(n,t,r,s){if(!this._triggers.has(t))throw function GW(e,n){return new _e(3302,!1)}();if(null==r||0==r.length)throw function XW(e){return new _e(3303,!1)}();if(!function UL(e){return"start"==e||"done"==e}(r))throw function Gj(e,n){return new _e(3400,!1)}();const c=$a(this._elementListeners,n,[]),h={name:t,phase:r,callback:s};c.push(h);const y=$a(this._engine.statesByElement,n,new Map);return y.has(t)||(cd(n,LO),cd(n,LO+"-"+t),y.set(t,GO)),()=>{this._engine.afterFlush(()=>{const E=c.indexOf(h);E>=0&&c.splice(E,1),this._triggers.has(t)||y.delete(t)})}}register(n,t){return!this._triggers.has(n)&&(this._triggers.set(n,t),!0)}_getTrigger(n){const t=this._triggers.get(n);if(!t)throw function NO(e){return new _e(3401,!1)}();return t}trigger(n,t,r,s=!0){const c=this._getTrigger(t),h=new B0(this.id,t,n);let y=this._engine.statesByElement.get(n);y||(cd(n,LO),cd(n,LO+"-"+t),this._engine.statesByElement.set(n,y=new Map));let E=y.get(t);const M=new jL(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&E&&M.absorbOptions(E.options),y.set(t,M),E||(E=GO),M.value!==XD&&E.value===M.value){if(!function l(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!=r.length)return!1;for(let s=0;s{O0(n,me),Ph(n,Me)})}return}const j=$a(this._engine.playersByElement,n,[]);j.forEach(ie=>{ie.namespaceId==this.id&&ie.triggerName==t&&ie.queued&&ie.destroy()});let X=c.matchTransition(E.value,M.value,n,M.params),K=!1;if(!X){if(!s)return;X=c.fallbackTransition,K=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:t,transition:X,fromState:E,toState:M,player:h,isFallbackTransition:K}),K||(cd(n,y4),h.onStart(()=>{E1(n,y4)})),h.onDone(()=>{let ie=this.players.indexOf(h);ie>=0&&this.players.splice(ie,1);const me=this._engine.playersByElement.get(n);if(me){let Me=me.indexOf(h);Me>=0&&me.splice(Me,1)}}),this.players.push(h),j.push(h),h}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(t=>t.delete(n)),this._elementListeners.forEach((t,r)=>{this._elementListeners.set(r,t.filter(s=>s.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const t=this._engine.playersByElement.get(n);t&&(t.forEach(r=>r.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,t){const r=this._engine.driver.query(n,$O,!0);r.forEach(s=>{if(s[xf])return;const c=this._engine.fetchNamespacesByElement(s);c.size?c.forEach(h=>h.triggerLeaveAnimation(s,t,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(n,t,r,s){const c=this._engine.statesByElement.get(n),h=new Map;if(c){const y=[];if(c.forEach((E,M)=>{if(h.set(M,E.value),this._triggers.has(M)){const R=this.trigger(n,M,XD,s);R&&y.push(R)}}),y.length)return this._engine.markElementAsRemoved(this.id,n,!0,t,h),r&&k0(y).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const t=this._elementListeners.get(n),r=this._engine.statesByElement.get(n);if(t&&r){const s=new Set;t.forEach(c=>{const h=c.name;if(s.has(h))return;s.add(h);const E=this._triggers.get(h).fallbackTransition,M=r.get(h)||GO,R=new jL(XD),$=new B0(this.id,h,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:h,transition:E,fromState:M,toState:R,player:$,isFallbackTransition:!0})})}}removeNode(n,t){const r=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,t),this.triggerLeaveAnimation(n,t,!0))return;let s=!1;if(r.totalAnimations){const c=r.players.length?r.playersByQueriedElement.get(n):[];if(c&&c.length)s=!0;else{let h=n;for(;h=h.parentNode;)if(r.statesByElement.get(h)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(n),s)r.markElementAsRemoved(this.id,n,!1,t);else{const c=n[xf];(!c||c===b4)&&(r.afterFlush(()=>this.clearElementCache(n)),r.destroyInnerAnimations(n),r._onRemovalComplete(n,t))}}insertNode(n,t){cd(n,this._hostClassName)}drainQueuedTransitions(n){const t=[];return this._queue.forEach(r=>{const s=r.player;if(s.destroyed)return;const c=r.element,h=this._elementListeners.get(c);h&&h.forEach(y=>{if(y.name==r.triggerName){const E=VD(c,r.triggerName,r.fromState.value,r.toState.value);E._data=n,Yj(r.player,y.phase,E,y.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):t.push(r)}),this._queue=[],t.sort((r,s)=>{const c=r.transition.ast.depCount,h=s.transition.ast.depCount;return 0==c||0==h?c-h:this._engine.driver.containsElement(r.element,s.element)?1:-1})}destroy(n){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}}class Cq{_onRemovalComplete(n,t){this.onRemovalComplete(n,t)}constructor(n,t,r,s){this.bodyNode=n,this.driver=t,this._normalizer=r,this.scheduler=s,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=(c,h)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(t=>{t.players.forEach(r=>{r.queued&&n.push(r)})}),n}createNamespace(n,t){const r=new Eq(n,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(r,t):(this.newHostElements.set(t,r),this.collectEnterElement(t)),this._namespaceLookup[n]=r}_balanceNamespaceList(n,t){const r=this._namespaceList,s=this.namespacesByHostElement;if(r.length-1>=0){let h=!1,y=this.driver.getParentElement(t);for(;y;){const E=s.get(y);if(E){const M=r.indexOf(E);r.splice(M+1,0,n),h=!0;break}y=this.driver.getParentElement(y)}h||r.unshift(n)}else r.push(n);return s.set(t,n),n}register(n,t){let r=this._namespaceLookup[n];return r||(r=this.createNamespace(n,t)),r}registerTrigger(n,t,r){let s=this._namespaceLookup[n];s&&s.register(t,r)&&this.totalAnimations++}destroy(n,t){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const r=this._fetchNamespace(n);this.namespacesByHostElement.delete(r.hostElement);const s=this._namespaceList.indexOf(r);s>=0&&this._namespaceList.splice(s,1),r.destroy(t),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const t=new Set,r=this.statesByElement.get(n);if(r)for(let s of r.values())if(s.namespaceId){const c=this._fetchNamespace(s.namespaceId);c&&t.add(c)}return t}trigger(n,t,r,s){if(YD(t)){const c=this._fetchNamespace(n);if(c)return c.trigger(t,r,s),!0}return!1}insertNode(n,t,r,s){if(!YD(t))return;const c=t[xf];if(c&&c.setForRemoval){c.setForRemoval=!1,c.setForMove=!0;const h=this.collectedLeaveElements.indexOf(t);h>=0&&this.collectedLeaveElements.splice(h,1)}if(n){const h=this._fetchNamespace(n);h&&h.insertNode(t,r)}s&&this.collectEnterElement(t)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,t){t?this.disabledNodes.has(n)||(this.disabledNodes.add(n),cd(n,qO)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),E1(n,qO))}removeNode(n,t,r){if(YD(t)){this.scheduler?.notify();const s=n?this._fetchNamespace(n):null;s?s.removeNode(t,r):this.markElementAsRemoved(n,t,!1,r);const c=this.namespacesByHostElement.get(t);c&&c.id!==n&&c.removeNode(t,r)}else this._onRemovalComplete(t,r)}markElementAsRemoved(n,t,r,s,c){this.collectedLeaveElements.push(t),t[xf]={namespaceId:n,setForRemoval:s,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:c}}listen(n,t,r,s,c){return YD(t)?this._fetchNamespace(n).listen(t,r,s,c):()=>{}}_buildInstruction(n,t,r,s,c){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,r,s,n.fromState.options,n.toState.options,t,c)}destroyInnerAnimations(n){let t=this.driver.query(n,$O,!0);t.forEach(r=>this.destroyActiveAnimationsForElement(r)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(n,HD,!0),t.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(n){const t=this.playersByElement.get(n);t&&t.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(n){const t=this.playersByQueriedElement.get(n);t&&t.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return k0(this.players).onDone(()=>n());n()})}processLeaveNode(n){const t=n[xf];if(t&&t.setForRemoval){if(n[xf]=b4,t.namespaceId){this.destroyInnerAnimations(n);const r=this._fetchNamespace(t.namespaceId);r&&r.clearElementCache(n)}this._onRemovalComplete(n,t.setForRemoval)}n.classList?.contains(qO)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(n=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,s)=>this._balanceNamespaceList(r,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){const r=this._whenQuietFns;this._whenQuietFns=[],t.length?k0(t).onDone(()=>{r.forEach(s=>s())}):r.forEach(s=>s())}}reportError(n){throw function DL(e){return new _e(3402,!1)}()}_flushAnimations(n,t){const r=new HO,s=[],c=new Map,h=[],y=new Map,E=new Map,M=new Map,R=new Set;this.disabledNodes.forEach(et=>{R.add(et);const ut=this.driver.query(et,".ng-animate-queued",!0);for(let at=0;at{const at=kL+ie++;K.set(ut,at),et.forEach(Lt=>cd(Lt,at))});const me=[],Me=new Set,Ce=new Set;for(let et=0;etMe.add(Lt)):Ce.add(ut))}const rt=new Map,Mt=E4(j,Array.from(Me));Mt.forEach((et,ut)=>{const at=UD+ie++;rt.set(ut,at),et.forEach(Lt=>cd(Lt,at))}),n.push(()=>{X.forEach((et,ut)=>{const at=K.get(ut);et.forEach(Lt=>E1(Lt,at))}),Mt.forEach((et,ut)=>{const at=rt.get(ut);et.forEach(Lt=>E1(Lt,at))}),me.forEach(et=>{this.processLeaveNode(et)})});const Et=[],Qt=[];for(let et=this._namespaceList.length-1;et>=0;et--)this._namespaceList[et].drainQueuedTransitions(t).forEach(at=>{const Lt=at.player,Gn=at.element;if(Et.push(Lt),this.collectedEnterElements.length){const Ic=Gn[xf];if(Ic&&Ic.setForMove){if(Ic.previousTriggersValues&&Ic.previousTriggersValues.has(at.triggerName)){const wM=Ic.previousTriggersValues.get(at.triggerName),Uh=this.statesByElement.get(at.element);if(Uh&&Uh.has(at.triggerName)){const PU=Uh.get(at.triggerName);PU.value=wM,Uh.set(at.triggerName,PU)}}return void Lt.destroy()}}const Xn=!$||!this.driver.containsElement($,Gn),Ui=rt.get(Gn),Ss=K.get(Gn),ri=this._buildInstruction(at,r,Ss,Ui,Xn);if(ri.errors&&ri.errors.length)return void Qt.push(ri);if(Xn)return Lt.onStart(()=>O0(Gn,ri.fromStyles)),Lt.onDestroy(()=>Ph(Gn,ri.toStyles)),void s.push(Lt);if(at.isFallbackTransition)return Lt.onStart(()=>O0(Gn,ri.fromStyles)),Lt.onDestroy(()=>Ph(Gn,ri.toStyles)),void s.push(Lt);const k1=[];ri.timelines.forEach(Ic=>{Ic.stretchStartingKeyframe=!0,this.disabledNodes.has(Ic.element)||k1.push(Ic)}),ri.timelines=k1,r.append(Gn,ri.timelines),h.push({instruction:ri,player:Lt,element:Gn}),ri.queriedElements.forEach(Ic=>$a(y,Ic,[]).push(Lt)),ri.preStyleProps.forEach((Ic,wM)=>{if(Ic.size){let Uh=E.get(wM);Uh||E.set(wM,Uh=new Set),Ic.forEach((PU,qX)=>Uh.add(qX))}}),ri.postStyleProps.forEach((Ic,wM)=>{let Uh=M.get(wM);Uh||M.set(wM,Uh=new Set),Ic.forEach((PU,qX)=>Uh.add(qX))})});if(Qt.length){const et=[];Qt.forEach(ut=>{et.push(function TQ(e,n){return new _e(3505,!1)}())}),Et.forEach(ut=>ut.destroy()),this.reportError(et)}const mn=new Map,Ei=new Map;h.forEach(et=>{const ut=et.element;r.has(ut)&&(Ei.set(ut,ut),this._beforeAnimationBuild(et.player.namespaceId,et.instruction,mn))}),s.forEach(et=>{const ut=et.element;this._getPreviousPlayers(ut,!1,et.namespaceId,et.triggerName,null).forEach(Lt=>{$a(mn,ut,[]).push(Lt),Lt.destroy()})});const Cs=me.filter(et=>u(et,E,M)),U_=new Map;w4(U_,this.driver,Ce,M,Im).forEach(et=>{u(et,E,M)&&Cs.push(et)});const jh=new Map;X.forEach((et,ut)=>{w4(jh,this.driver,new Set(et),E,"!")}),Cs.forEach(et=>{const ut=U_.get(et),at=jh.get(et);U_.set(et,new Map([...ut?.entries()??[],...at?.entries()??[]]))});const Ht=[],Pt=[],Hn={};h.forEach(et=>{const{element:ut,player:at,instruction:Lt}=et;if(r.has(ut)){if(R.has(ut))return at.onDestroy(()=>Ph(ut,Lt.toStyles)),at.disabled=!0,at.overrideTotalTime(Lt.totalTime),void s.push(at);let Gn=Hn;if(Ei.size>1){let Ui=ut;const Ss=[];for(;Ui=Ui.parentNode;){const ri=Ei.get(Ui);if(ri){Gn=ri;break}Ss.push(Ui)}Ss.forEach(ri=>Ei.set(ri,Gn))}const Xn=this._buildAnimation(at.namespaceId,Lt,mn,c,jh,U_);if(at.setRealPlayer(Xn),Gn===Hn)Ht.push(at);else{const Ui=this.playersByElement.get(Gn);Ui&&Ui.length&&(at.parentPlayer=k0(Ui)),s.push(at)}}else O0(ut,Lt.fromStyles),at.onDestroy(()=>Ph(ut,Lt.toStyles)),Pt.push(at),R.has(ut)&&s.push(at)}),Pt.forEach(et=>{const ut=c.get(et.element);if(ut&&ut.length){const at=k0(ut);et.setRealPlayer(at)}}),s.forEach(et=>{et.parentPlayer?et.syncPlayerEvents(et.parentPlayer):et.destroy()});for(let et=0;et!Xn.destroyed);Gn.length?i(this,ut,Gn):this.processLeaveNode(ut)}return me.length=0,Ht.forEach(et=>{this.players.push(et),et.onDone(()=>{et.destroy();const ut=this.players.indexOf(et);this.players.splice(ut,1)}),et.play()}),Ht}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,t,r,s,c){let h=[];if(t){const y=this.playersByQueriedElement.get(n);y&&(h=y)}else{const y=this.playersByElement.get(n);if(y){const E=!c||c==XD;y.forEach(M=>{M.queued||!E&&M.triggerName!=s||h.push(M)})}}return(r||s)&&(h=h.filter(y=>!(r&&r!=y.namespaceId||s&&s!=y.triggerName))),h}_beforeAnimationBuild(n,t,r){const c=t.element,h=t.isRemovalTransition?void 0:n,y=t.isRemovalTransition?void 0:t.triggerName;for(const E of t.timelines){const M=E.element,R=M!==c,$=$a(r,M,[]);this._getPreviousPlayers(M,R,h,y,t.toState).forEach(X=>{const K=X.getRealPlayer();K.beforeDestroy&&K.beforeDestroy(),X.destroy(),$.push(X)})}O0(c,t.fromStyles)}_buildAnimation(n,t,r,s,c,h){const y=t.triggerName,E=t.element,M=[],R=new Set,$=new Set,j=t.timelines.map(K=>{const ie=K.element;R.add(ie);const me=ie[xf];if(me&&me.removedBeforeQueried)return new $D(K.duration,K.delay);const Me=ie!==E,Ce=function o(e){const n=[];return a(e,n),n}((r.get(ie)||VL).map(mn=>mn.getRealPlayer())).filter(mn=>!!mn.element&&mn.element===ie),rt=c.get(ie),Mt=h.get(ie),Et=YW(this._normalizer,K.keyframes,rt,Mt),Qt=this._buildPlayer(K,Et,Ce);if(K.subTimeline&&s&&$.add(ie),Me){const mn=new B0(n,y,ie);mn.setRealPlayer(Qt),M.push(mn)}return Qt});M.forEach(K=>{$a(this.playersByQueriedElement,K.element,[]).push(K),K.onDone(()=>function Sq(e,n,t){let r=e.get(n);if(r){if(r.length){const s=r.indexOf(t);r.splice(s,1)}0==r.length&&e.delete(n)}return r}(this.playersByQueriedElement,K.element,K))}),R.forEach(K=>cd(K,BO));const X=k0(j);return X.onDestroy(()=>{R.forEach(K=>E1(K,BO)),Ph(E,t.toStyles)}),$.forEach(K=>{$a(s,K,[]).push(X)}),X}_buildPlayer(n,t,r){return t.length>0?this.driver.animate(n.element,t,n.duration,n.delay,n.easing,r):new $D(n.duration,n.delay)}}class B0{constructor(n,t,r){this.namespaceId=n,this.triggerName=t,this.element=r,this._player=new $D,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(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((t,r)=>{t.forEach(s=>Yj(n,r,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const t=this._player;t.triggerCallback&&n.onStart(()=>t.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,t){$a(this._queuedCallbacks,n,[]).push(t)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}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(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const t=this._player;t.triggerCallback&&t.triggerCallback(n)}}function YD(e){return e&&1===e.nodeType}function x4(e,n){const t=e.style.display;return e.style.display=n??"none",t}function w4(e,n,t,r,s){const c=[];t.forEach(E=>c.push(x4(E)));const h=[];r.forEach((E,M)=>{const R=new Map;E.forEach($=>{const j=n.computeStyle(M,$,s);R.set($,j),(!j||0==j.length)&&(M[xf]=wq,h.push(M))}),e.set(M,R)});let y=0;return t.forEach(E=>x4(E,c[y++])),h}function E4(e,n){const t=new Map;if(e.forEach(y=>t.set(y,[])),0==n.length)return t;const s=new Set(n),c=new Map;function h(y){if(!y)return 1;let E=c.get(y);if(E)return E;const M=y.parentNode;return E=t.has(M)?M:s.has(M)?1:h(M),c.set(y,E),E}return n.forEach(y=>{const E=h(y);1!==E&&t.get(E).push(y)}),t}function cd(e,n){e.classList?.add(n)}function E1(e,n){e.classList?.remove(n)}function i(e,n,t){k0(t).onDone(()=>e.processLeaveNode(n))}function a(e,n){for(let t=0;ts.add(c)):n.set(e,r),t.delete(e),!0}class f{constructor(n,t,r,s){this._driver=t,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(c,h)=>{},this._transitionEngine=new Cq(n.body,t,r,s),this._timelineEngine=new _4(n.body,t,r),this._transitionEngine.onRemovalComplete=(c,h)=>this.onRemovalComplete(c,h)}registerTrigger(n,t,r,s,c){const h=n+"-"+s;let y=this._triggerCache[h];if(!y){const E=[],R=FL(this._driver,c,E,[]);if(E.length)throw function WW(e,n){return new _e(3404,!1)}();y=function gq(e,n,t){return new x1(e,n,t)}(s,R,this._normalizer),this._triggerCache[h]=y}this._transitionEngine.registerTrigger(t,s,y)}register(n,t){this._transitionEngine.register(n,t)}destroy(n,t){this._transitionEngine.destroy(n,t)}onInsert(n,t,r,s){this._transitionEngine.insertNode(n,t,r,s)}onRemove(n,t,r){this._transitionEngine.removeNode(n,t,r)}disableAnimations(n,t){this._transitionEngine.markElementAsDisabled(n,t)}process(n,t,r,s){if("@"==r.charAt(0)){const[c,h]=ji(r);this._timelineEngine.command(c,t,h,s)}else this._transitionEngine.trigger(n,t,r,s)}listen(n,t,r,s,c){if("@"==r.charAt(0)){const[h,y]=ji(r);return this._timelineEngine.listen(h,t,y,c)}return this._transitionEngine.listen(n,t,r,s,c)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}}class g{static#e=this.initialStylesByElement=new WeakMap;constructor(n,t,r){this._element=n,this._startStyles=t,this._endStyles=r,this._state=0;let s=g.initialStylesByElement.get(n);s||g.initialStylesByElement.set(n,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Ph(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ph(this._element,this._initialStyles),this._endStyles&&(Ph(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(g.initialStylesByElement.delete(this._element),this._startStyles&&(O0(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(O0(this._element,this._endStyles),this._endStyles=null),Ph(this._element,this._initialStyles),this._state=3)}}function b(e){let n=null;return e.forEach((t,r)=>{(function v(e){return"display"===e||"position"===e})(r)&&(n=n||new Map,n.set(r,t))}),n}class w{constructor(n,t,r,s){this.element=n,this.keyframes=t,this.options=r,this._specialStyles=s,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=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const t=[];return n.forEach(r=>{t.push(Object.fromEntries(r))}),t}_triggerWebAnimation(n,t,r){return n.animate(this._convertKeyframesToObject(t),r)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),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(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,s)=>{"offset"!==s&&n.set(s,this._finished?r:RL(this.element,s))}),this.currentSnapshot=n}triggerCallback(n){const t="start"===n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}class C{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,t){return!1}containsElement(n,t){return ML(n,t)}getParentElement(n){return v1(n)}query(n,t,r){return Jj(n,t,r)}computeStyle(n,t,r){return RL(n,t)}animate(n,t,r,s,c,h=[]){const E={duration:r,delay:s,fill:0==s?"both":"forwards"};c&&(E.easing=c);const M=new Map,R=h.filter(X=>X instanceof w);(function iq(e,n){return 0===e||0===n})(r,s)&&R.forEach(X=>{X.currentSnapshot.forEach((K,ie)=>M.set(ie,K))});let $=function JW(e){return e.length?e[0]instanceof Map?e:e.map(n=>new Map(Object.entries(n))):[]}(t).map(X=>new Map(X));$=function n4(e,n,t){if(t.size&&n.length){let r=n[0],s=[];if(t.forEach((c,h)=>{r.has(h)||s.push(h),r.set(h,c)}),s.length)for(let c=1;ch.set(y,RL(e,y)))}}return n}(n,$,M);const j=function m(e,n){let t=null,r=null;return Array.isArray(n)&&n.length?(t=b(n[0]),n.length>1&&(r=b(n[n.length-1]))):n instanceof Map&&(t=b(n)),t||r?new g(e,t,r):null}(n,$);return new w(n,$,E,j)}}const I="@",k="@.disabled";class F{constructor(n,t,r,s){this.namespaceId=n,this.delegate=t,this.engine=r,this._onDestroy=s,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,t){return this.delegate.createElement(n,t)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,t){this.delegate.appendChild(n,t),this.engine.onInsert(this.namespaceId,t,n,!1)}insertBefore(n,t,r,s=!0){this.delegate.insertBefore(n,t,r),this.engine.onInsert(this.namespaceId,t,n,s)}removeChild(n,t,r){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(n,t){return this.delegate.selectRootElement(n,t)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,t,r,s){this.delegate.setAttribute(n,t,r,s)}removeAttribute(n,t,r){this.delegate.removeAttribute(n,t,r)}addClass(n,t){this.delegate.addClass(n,t)}removeClass(n,t){this.delegate.removeClass(n,t)}setStyle(n,t,r,s){this.delegate.setStyle(n,t,r,s)}removeStyle(n,t,r){this.delegate.removeStyle(n,t,r)}setProperty(n,t,r){t.charAt(0)==I&&t==k?this.disableAnimations(n,!!r):this.delegate.setProperty(n,t,r)}setValue(n,t){this.delegate.setValue(n,t)}listen(n,t,r){return this.delegate.listen(n,t,r)}disableAnimations(n,t){this.engine.disableAnimations(n,t)}}class L extends F{constructor(n,t,r,s,c){super(t,r,s,c),this.factory=n,this.namespaceId=t}setProperty(n,t,r){t.charAt(0)==I?"."==t.charAt(1)&&t==k?this.disableAnimations(n,r=void 0===r||!!r):this.engine.process(this.namespaceId,n,t.slice(1),r):this.delegate.setProperty(n,t,r)}listen(n,t,r){if(t.charAt(0)==I){const s=function z(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(n);let c=t.slice(1),h="";return c.charAt(0)!=I&&([c,h]=function V(e){const n=e.indexOf(".");return[e.substring(0,n),e.slice(n+1)]}(c)),this.engine.listen(this.namespaceId,s,c,h,y=>{this.factory.scheduleListenerCallback(y._data||-1,r,y)})}return this.delegate.listen(n,t,r)}}class U{constructor(n,t,r){this.delegate=n,this.engine=t,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(s,c)=>{const h=c?.parentNode(s);h&&c.removeChild(h,s)}}createRenderer(n,t){const s=this.delegate.createRenderer(n,t);if(!n||!t?.data?.animation){const M=this._rendererCache;let R=M.get(s);return R||(R=new F("",s,this.engine,()=>M.delete(s)),M.set(s,R)),R}const c=t.id,h=t.id+"-"+this._currentId;this._currentId++,this.engine.register(h,n);const y=M=>{Array.isArray(M)?M.forEach(y):this.engine.registerTrigger(c,h,n,M.name,M)};return t.data.animation.forEach(y),new L(this,h,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,t,r){if(n>=0&&nt(r));const s=this._animationCallbacksBuffer;0==s.length&&queueMicrotask(()=>{this._zone.run(()=>{s.forEach(c=>{const[h,y]=c;h(y)}),this._animationCallbacksBuffer=[]})}),s.push([t,r])}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 Z=[{provide:PO,useFactory:function Y(){return new r4}},{provide:f,useClass:(()=>{class e extends f{constructor(t,r,s){super(t,r,s,Xe(th,{optional:!0}))}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(TL),pe(PO))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})()},{provide:_x,useFactory:function H(e,n,t){return new U(e,n,t)},deps:[wm,f,Bt]}],te=[{provide:TL,useFactory:()=>new C},{provide:Ko,useValue:"BrowserAnimations"},...Z],ce=[{provide:TL,useClass:jD},{provide:Ko,useValue:"NoopAnimations"},...Z];let le=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?ce:te}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:te,imports:[R5]})}return e})();class J extends It{constructor(n=1/0,t=1/0,r=rO){super(),this._bufferSize=n,this._windowTime=t,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,t)}next(n){const{isStopped:t,_buffer:r,_infiniteTimeWindow:s,_timestampProvider:c,_windowTime:h}=this;t||(r.push(n),!s&&r.push(c.now()+h)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(n),{_infiniteTimeWindow:r,_buffer:s}=this,c=s.slice();for(let h=0;hnew It),resetOnError:t=!0,resetOnComplete:r=!0,resetOnRefCountZero:s=!0}=e;return c=>{let h,y,E,M=0,R=!1,$=!1;const j=()=>{y?.unsubscribe(),y=void 0},X=()=>{j(),h=E=void 0,R=$=!1},K=()=>{const ie=h;X(),ie?.unsubscribe()};return be((ie,me)=>{M++,!$&&!R&&j();const Me=E=E??n();me.add(()=>{M--,0===M&&!$&&!R&&(y=we(K,s))}),Me.subscribe(me),!h&&M>0&&(h=new Wn({next:Ce=>Me.next(Ce),error:Ce=>{$=!0,j(),y=we(X,t,Ce),Me.error(Ce)},complete:()=>{R=!0,j(),y=we(X,r),Me.complete()}}),Gs(ie).subscribe(h))})(c)}}function we(e,n,...t){if(!0===n)return void e();if(!1===n)return;const r=new Wn({next:()=>{r.unsubscribe(),e()}});return Gs(n(...t)).subscribe(r)}function ne(e,n,t){let r,s=!1;return e&&"object"==typeof e?({bufferSize:r=1/0,windowTime:n=1/0,refCount:s=!1,scheduler:t}=e):r=e??1/0,oe({connector:()=>new J(r,n,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}const ge=Hi(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function de(e){return be((n,t)=>{let r=!1;n.subscribe(Se(t,s=>{r=!0,t.next(s)},()=>{r||t.next(e),t.complete()}))})}function Te(e=Pe){return be((n,t)=>{let r=!1;n.subscribe(Se(t,s=>{r=!0,t.next(s)},()=>r?t.complete():t.error(e())))})}function Pe(){return new ge}function Ie(e,n){const t=arguments.length>=2;return r=>r.pipe(e?ii((s,c)=>e(s,c,r)):Wi,Bo(1),t?de(n):Te(()=>new ge))}let Ve={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function ft(e){Ve=e}const Ke=/[&<>"']/,Dt=new RegExp(Ke.source,"g"),je=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,tt=new RegExp(je.source,"g"),it={"&":"&","<":"<",">":">",'"':""","'":"'"},Oe=e=>it[e];function _t(e,n){if(n){if(Ke.test(e))return e.replace(Dt,Oe)}else if(je.test(e))return e.replace(tt,Oe);return e}const qt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,un=/(^|[^\[])\^/g;function xt(e,n){e="string"==typeof e?e:e.source,n=n||"";const t={replace:(r,s)=>(s=(s="object"==typeof s&&"source"in s?s.source:s).replace(un,"$1"),e=e.replace(r,s),t),getRegex:()=>new RegExp(e,n)};return t}function ur(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ss={exec:()=>null};function Ks(e,n){const r=e.replace(/\|/g,(c,h,y)=>{let E=!1,M=h;for(;--M>=0&&"\\"===y[M];)E=!E;return E?"|":" |"}).split(/ \|/);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),n)if(r.length>n)r.splice(n);else for(;r.length0)return{type:"space",raw:t[0]}}code(n){const t=this.rules.block.code.exec(n);if(t){const r=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:as(r,"\n")}}}fences(n){const t=this.rules.block.fences.exec(n);if(t){const r=t[0],s=function ud(e,n){const t=e.match(/^(\s+)(?:```)/);if(null===t)return n;const r=t[1];return n.split("\n").map(s=>{const c=s.match(/^\s+/);if(null===c)return s;const[h]=c;return h.length>=r.length?s.slice(r.length):s}).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:s}}}heading(n){const t=this.rules.block.heading.exec(n);if(t){let r=t[2].trim();if(/#$/.test(r)){const s=as(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(n){const t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:t[0]}}blockquote(n){const t=this.rules.block.blockquote.exec(n);if(t){const r=as(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),s=this.lexer.state.top;this.lexer.state.top=!0;const c=this.lexer.blockTokens(r);return this.lexer.state.top=s,{type:"blockquote",raw:t[0],tokens:c,text:r}}}list(n){let t=this.rules.block.list.exec(n);if(t){let r=t[1].trim();const s=r.length>1,c={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");const h=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let y="",E="",M=!1;for(;n;){let R=!1;if(!(t=h.exec(n))||this.rules.block.hr.test(n))break;y=t[0],n=n.substring(y.length);let $=t[2].split("\n",1)[0].replace(/^\t+/,Me=>" ".repeat(3*Me.length)),j=n.split("\n",1)[0],X=0;this.options.pedantic?(X=2,E=$.trimStart()):(X=t[2].search(/[^ ]/),X=X>4?1:X,E=$.slice(X),X+=t[1].length);let K=!1;if(!$&&/^ *$/.test(j)&&(y+=j+"\n",n=n.substring(j.length+1),R=!0),!R){const Me=new RegExp(`^ {0,${Math.min(3,X-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),Ce=new RegExp(`^ {0,${Math.min(3,X-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),rt=new RegExp(`^ {0,${Math.min(3,X-1)}}(?:\`\`\`|~~~)`),Mt=new RegExp(`^ {0,${Math.min(3,X-1)}}#`);for(;n;){const Et=n.split("\n",1)[0];if(j=Et,this.options.pedantic&&(j=j.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),rt.test(j)||Mt.test(j)||Me.test(j)||Ce.test(n))break;if(j.search(/[^ ]/)>=X||!j.trim())E+="\n"+j.slice(X);else{if(K||$.search(/[^ ]/)>=4||rt.test($)||Mt.test($)||Ce.test($))break;E+="\n"+j}!K&&!j.trim()&&(K=!0),y+=Et+"\n",n=n.substring(Et.length+1),$=j.slice(X)}}c.loose||(M?c.loose=!0:/\n *\n *$/.test(y)&&(M=!0));let me,ie=null;this.options.gfm&&(ie=/^\[[ xX]\] /.exec(E),ie&&(me="[ ] "!==ie[0],E=E.replace(/^\[[ xX]\] +/,""))),c.items.push({type:"list_item",raw:y,task:!!ie,checked:me,loose:!1,text:E,tokens:[]}),c.raw+=y}c.items[c.items.length-1].raw=y.trimEnd(),c.items[c.items.length-1].text=E.trimEnd(),c.raw=c.raw.trimEnd();for(let R=0;R"space"===X.type),j=$.length>0&&$.some(X=>/\n.*\n/.test(X.raw));c.loose=j}if(c.loose)for(let R=0;R$/,"$1").replace(this.rules.inline._escapes,"$1"):"",c=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:s,title:c}}}table(n){const t=this.rules.block.table.exec(n);if(t){if(!/[:|]/.test(t[2]))return;const r={type:"table",raw:t[0],header:Ks(t[1]).map(s=>({text:s,tokens:[]})),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(r.header.length===r.align.length){let c,h,y,E,s=r.align.length;for(c=0;c({text:M,tokens:[]}));for(s=r.header.length,h=0;h/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(n){const t=this.rules.inline.link.exec(n);if(t){const r=t[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const h=as(r.slice(0,-1),"\\");if((r.length-h.length)%2==0)return}else{const h=function ba(e,n){if(-1===e.indexOf(n[1]))return-1;let t=0;for(let r=0;r-1){const E=(0===t[0].indexOf("!")?5:4)+t[1].length+h;t[2]=t[2].substring(0,h),t[0]=t[0].substring(0,E).trim(),t[3]=""}}let s=t[2],c="";if(this.options.pedantic){const h=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);h&&(s=h[1],c=h[3])}else c=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(r)?s.slice(1):s.slice(1,-1)),KD(t,{href:s&&s.replace(this.rules.inline._escapes,"$1"),title:c&&c.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(n,t){let r;if((r=this.rules.inline.reflink.exec(n))||(r=this.rules.inline.nolink.exec(n))){let s=(r[2]||r[1]).replace(/\s+/g," ");if(s=t[s.toLowerCase()],!s){const c=r[0].charAt(0);return{type:"text",raw:c,text:c}}return KD(r,s,r[0],this.lexer)}}emStrong(n,t,r=""){let s=this.rules.inline.emStrong.lDelim.exec(n);if(!(!s||s[3]&&r.match(/[\p{L}\p{N}]/u))&&(!s[1]&&!s[2]||!r||this.rules.inline.punctuation.exec(r))){const h=[...s[0]].length-1;let y,E,M=h,R=0;const $="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for($.lastIndex=0,t=t.slice(-1*n.length+h);null!=(s=$.exec(t));){if(y=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!y)continue;if(E=[...y].length,s[3]||s[4]){M+=E;continue}if((s[5]||s[6])&&h%3&&!((h+E)%3)){R+=E;continue}if(M-=E,M>0)continue;E=Math.min(E,E+M+R);const j=[...s[0]][0].length,X=n.slice(0,h+s.index+j+E);if(Math.min(h,E)%2){const ie=X.slice(1,-1);return{type:"em",raw:X,text:ie,tokens:this.lexer.inlineTokens(ie)}}const K=X.slice(2,-2);return{type:"strong",raw:X,text:K,tokens:this.lexer.inlineTokens(K)}}}}codespan(n){const t=this.rules.inline.code.exec(n);if(t){let r=t[2].replace(/\n/g," ");const s=/[^ ]/.test(r),c=/^ /.test(r)&&/ $/.test(r);return s&&c&&(r=r.substring(1,r.length-1)),r=_t(r,!0),{type:"codespan",raw:t[0],text:r}}}br(n){const t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]}}del(n){const t=this.rules.inline.del.exec(n);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(n){const t=this.rules.inline.autolink.exec(n);if(t){let r,s;return"@"===t[2]?(r=_t(t[1]),s="mailto:"+r):(r=_t(t[1]),s=r),{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let r,s;if("@"===t[2])r=_t(t[0]),s="mailto:"+r;else{let c;do{c=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(c!==t[0]);r=_t(t[0]),s="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(n){const t=this.rules.inline.text.exec(n);if(t){let r;return r=this.lexer.state.inRawBlock?t[0]:_t(t[0]),{type:"text",raw:t[0],text:r}}}}const gn={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ss,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};gn.def=xt(gn.def).replace("label",gn._label).replace("title",gn._title).getRegex(),gn.bullet=/(?:[*+-]|\d{1,9}[.)])/,gn.listItemStart=xt(/^( *)(bull) */).replace("bull",gn.bullet).getRegex(),gn.list=xt(gn.list).replace(/bull/g,gn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+gn.def.source+")").getRegex(),gn._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gn._comment=/|$)/,gn.html=xt(gn.html,"i").replace("comment",gn._comment).replace("tag",gn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gn.lheading=xt(gn.lheading).replace(/bull/g,gn.bullet).getRegex(),gn.paragraph=xt(gn._paragraph).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.blockquote=xt(gn.blockquote).replace("paragraph",gn.paragraph).getRegex(),gn.normal={...gn},gn.gfm={...gn.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},gn.gfm.table=xt(gn.gfm.table).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.gfm.paragraph=xt(gn._paragraph).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gn.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.pedantic={...gn.normal,html:xt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",gn._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ss,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(gn.normal._paragraph).replace("hr",gn.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",gn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ss,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ss,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~"};Nt.punctuation=xt(Nt.punctuation,"u").replace(/punctuation/g,Nt._punctuation).getRegex(),Nt.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Nt.anyPunctuation=/\\[punct]/g,Nt._escapes=/\\([punct])/g,Nt._comment=xt(gn._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Nt.emStrong.lDelim=xt(Nt.emStrong.lDelim,"u").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimAst=xt(Nt.emStrong.rDelimAst,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimUnd=xt(Nt.emStrong.rDelimUnd,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt.anyPunctuation=xt(Nt.anyPunctuation,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt._escapes=xt(Nt._escapes,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Nt.autolink=xt(Nt.autolink).replace("scheme",Nt._scheme).replace("email",Nt._email).getRegex(),Nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nt.tag=xt(Nt.tag).replace("comment",Nt._comment).replace("attribute",Nt._attribute).getRegex(),Nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nt.link=xt(Nt.link).replace("label",Nt._label).replace("href",Nt._href).replace("title",Nt._title).getRegex(),Nt.reflink=xt(Nt.reflink).replace("label",Nt._label).replace("ref",gn._label).getRegex(),Nt.nolink=xt(Nt.nolink).replace("ref",gn._label).getRegex(),Nt.reflinkSearch=xt(Nt.reflinkSearch,"g").replace("reflink",Nt.reflink).replace("nolink",Nt.nolink).getRegex(),Nt.normal={...Nt},Nt.pedantic={...Nt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Nt._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nt._label).getRegex()},Nt.gfm={...Nt.normal,escape:xt(Nt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\E+" ".repeat(M.length));n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(y=>!!(r=y.call({lexer:this},n,t))&&(n=n.substring(r.raw.length),t.push(r),!0)))){if(r=this.tokenizer.space(n)){n=n.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(n)){n=n.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(r):(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);continue}if(r=this.tokenizer.fences(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(n)){n=n.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(s.raw+="\n"+r.raw,s.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);continue}if(r=this.tokenizer.table(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(n)){n=n.substring(r.raw.length),t.push(r);continue}if(c=n,this.options.extensions&&this.options.extensions.startBlock){let y=1/0;const E=n.slice(1);let M;this.options.extensions.startBlock.forEach(R=>{M=R.call({lexer:this},E),"number"==typeof M&&M>=0&&(y=Math.min(y,M))}),y<1/0&&y>=0&&(c=n.substring(0,y+1))}if(this.state.top&&(r=this.tokenizer.paragraph(c))){s=t[t.length-1],h&&"paragraph"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r),h=c.length!==n.length,n=n.substring(r.raw.length);continue}if(r=this.tokenizer.text(n)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r);continue}if(n){const y="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(y);break}throw new Error(y)}}return this.state.top=!0,t}inline(n,t=[]){return this.inlineQueue.push({src:n,tokens:t}),t}inlineTokens(n,t=[]){let r,s,c,y,E,M,h=n;if(this.tokens.links){const R=Object.keys(this.tokens.links);if(R.length>0)for(;null!=(y=this.tokenizer.rules.inline.reflinkSearch.exec(h));)R.includes(y[0].slice(y[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,y.index)+"["+"a".repeat(y[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(y=this.tokenizer.rules.inline.blockSkip.exec(h));)h=h.slice(0,y.index)+"["+"a".repeat(y[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(y=this.tokenizer.rules.inline.anyPunctuation.exec(h));)h=h.slice(0,y.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;n;)if(E||(M=""),E=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(R=>!!(r=R.call({lexer:this},n,t))&&(n=n.substring(r.raw.length),t.push(r),!0)))){if(r=this.tokenizer.escape(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(n)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(r=this.tokenizer.link(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(n,h,M)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(n)){n=n.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(n))){n=n.substring(r.raw.length),t.push(r);continue}if(c=n,this.options.extensions&&this.options.extensions.startInline){let R=1/0;const $=n.slice(1);let j;this.options.extensions.startInline.forEach(X=>{j=X.call({lexer:this},$),"number"==typeof j&&j>=0&&(R=Math.min(R,j))}),R<1/0&&R>=0&&(c=n.substring(0,R+1))}if(r=this.tokenizer.inlineText(c)){n=n.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(M=r.raw.slice(-1)),E=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(n){const R="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(R);break}throw new Error(R)}}return t}}class z0{options;constructor(n){this.options=n||Ve}code(n,t,r){const s=(t||"").match(/^\S*/)?.[0];return n=n.replace(/\n$/,"")+"\n",s?'
'+(r?n:_t(n,!0))+"
\n":"
"+(r?n:_t(n,!0))+"
\n"}blockquote(n){return`
\n${n}
\n`}html(n,t){return n}heading(n,t,r){return`${n}\n`}hr(){return"
\n"}list(n,t,r){const s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"\n"}listitem(n,t,r){return`
  • ${n}
  • \n`}checkbox(n){return"'}paragraph(n){return`

    ${n}

    \n`}table(n,t){return t&&(t=`${t}`),"\n\n"+n+"\n"+t+"
    \n"}tablerow(n){return`\n${n}\n`}tablecell(n,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`\n`}strong(n){return`${n}`}em(n){return`${n}`}codespan(n){return`${n}`}br(){return"
    "}del(n){return`${n}`}link(n,t,r){const s=ur(n);if(null===s)return r;let c='",c}image(n,t,r){const s=ur(n);if(null===s)return r;let c=`${r}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":r+=this.renderer.code(c.text,c.lang,!!c.escaped);continue;case"table":{const h=c;let y="",E="";for(let R=0;R0&&"paragraph"===j.tokens[0].type?(j.tokens[0].text=me+" "+j.tokens[0].text,j.tokens[0].tokens&&j.tokens[0].tokens.length>0&&"text"===j.tokens[0].tokens[0].type&&(j.tokens[0].tokens[0].text=me+" "+j.tokens[0].tokens[0].text)):j.tokens.unshift({type:"text",text:me+" "}):ie+=me+" "}ie+=this.parse(j.tokens,M),R+=this.renderer.listitem(ie,K,!!X)}r+=this.renderer.list(R,y,E);continue}case"html":r+=this.renderer.html(c.text,c.block);continue;case"paragraph":r+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":{let h=c,y=h.tokens?this.parseInline(h.tokens):h.text;for(;s+1{r=r.concat(this.walkTokens(c[h],t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...n){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(c=>{if(!c.name)throw new Error("extension name required");if("renderer"in c){const h=t.renderers[c.name];t.renderers[c.name]=h?function(...y){let E=c.renderer.apply(this,y);return!1===E&&(E=h.apply(this,y)),E}:c.renderer}if("tokenizer"in c){if(!c.level||"block"!==c.level&&"inline"!==c.level)throw new Error("extension level must be 'block' or 'inline'");const h=t[c.level];h?h.unshift(c.tokenizer):t[c.level]=[c.tokenizer],c.start&&("block"===c.level?t.startBlock?t.startBlock.push(c.start):t.startBlock=[c.start]:"inline"===c.level&&(t.startInline?t.startInline.push(c.start):t.startInline=[c.start]))}"childTokens"in c&&c.childTokens&&(t.childTokens[c.name]=c.childTokens)}),s.extensions=t),r.renderer){const c=this.defaults.renderer||new z0(this.defaults);for(const h in r.renderer){const y=r.renderer[h],M=c[h];c[h]=(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$||""}}s.renderer=c}if(r.tokenizer){const c=this.defaults.tokenizer||new wf(this.defaults);for(const h in r.tokenizer){const y=r.tokenizer[h],M=c[h];c[h]=(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$}}s.tokenizer=c}if(r.hooks){const c=this.defaults.hooks||new C4;for(const h in r.hooks){const y=r.hooks[h],M=c[h];c[h]=C4.passThroughHooks.has(h)?R=>{if(this.defaults.async)return Promise.resolve(y.call(c,R)).then(j=>M.call(c,j));const $=y.call(c,R);return M.call(c,$)}:(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$}}s.hooks=c}if(r.walkTokens){const c=this.defaults.walkTokens,h=r.walkTokens;s.walkTokens=function(y){let E=[];return E.push(h.call(this,y)),c&&(E=E.concat(c.call(this,y))),E}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,t){return Ef.lex(n,t??this.defaults)}parser(n,t){return Cf.parse(n,t??this.defaults)}#e(n,t){return(r,s)=>{const c={...s},h={...this.defaults,...c};!0===this.defaults.async&&!1===c.async&&(h.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),h.async=!0);const y=this.#t(!!h.silent,!!h.async);if(typeof r>"u"||null===r)return y(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return y(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(h.hooks&&(h.hooks.options=h),h.async)return Promise.resolve(h.hooks?h.hooks.preprocess(r):r).then(E=>n(E,h)).then(E=>h.walkTokens?Promise.all(this.walkTokens(E,h.walkTokens)).then(()=>E):E).then(E=>t(E,h)).then(E=>h.hooks?h.hooks.postprocess(E):E).catch(y);try{h.hooks&&(r=h.hooks.preprocess(r));const E=n(r,h);h.walkTokens&&this.walkTokens(E,h.walkTokens);let M=t(E,h);return h.hooks&&(M=h.hooks.postprocess(M)),M}catch(E){return y(E)}}}#t(n,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",n){const s="

    An error occurred:

    "+_t(r.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(r);throw r}}};function yr(e,n){return ZD.parse(e,n)}yr.options=yr.setOptions=function(e){return ZD.setOptions(e),ft(yr.defaults=ZD.defaults),yr},yr.getDefaults=function Ne(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},yr.defaults=Ve,yr.use=function(...e){return ZD.use(...e),ft(yr.defaults=ZD.defaults),yr},yr.walkTokens=function(e,n){return ZD.walkTokens(e,n)},yr.parseInline=ZD.parseInline,yr.Parser=Cf,yr.parser=Cf.parse,yr.Renderer=z0,yr.TextRenderer=XO,yr.Lexer=Ef,yr.lexer=Ef.lex,yr.Tokenizer=wf,yr.Hooks=C4,yr.parse=yr;const Lre=["*"];let FQ=(()=>{class e{constructor(){this._buttonClick$=new It,this.copied$=this._buttonClick$.pipe(Sr(()=>Oh(zt(!0),Pa(3e3).pipe(R_(!1)))),Ih(),ne(1)),this.copiedText$=this.copied$.pipe(Wl(!1),ye(t=>t?"Copied":"Copy"))}onCopyToClipboardClick(){this._buttonClick$.next()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["markdown-clipboard"]],standalone:!0,features:[xi],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(r,s){1&r&&(Ae(0,"button",0),yn("click",function(){return s.onCopyToClipboardClick()}),uf(1,"async"),wt(2),uf(3,"async"),ke()),2&r&&(In("copied",cm(1,3,s.copied$)),Ze(2),Pr(cm(3,5,s.copiedText$)))},dependencies:[PI],encapsulation:2,changeDetection:0})}return e})();const zre=new $e("CLIPBOARD_OPTIONS");var Dq=function(e){return e.CommandLine="command-line",e.LineHighlight="line-highlight",e.LineNumbers="line-numbers",e}(Dq||{});const PQ=new $e("MARKED_EXTENSIONS"),LQ=new $e("MARKED_OPTIONS"),$Q=new $e("SECURITY_CONTEXT");let Mq=(()=>{class e{get options(){return this._options}set options(t){this._options={...this.DEFAULT_MARKED_OPTIONS,...t}}get renderer(){return this.options.renderer}set renderer(t){this.options.renderer=t}constructor(t,r,s,c,h,y,E){this.clipboardOptions=t,this.extensions=r,this.platform=c,this.securityContext=h,this.http=y,this.sanitizer=E,this.DEFAULT_MARKED_OPTIONS={renderer:new z0},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new It,this.reload$=this._reload$.asObservable(),this.options=s}parse(t,r=this.DEFAULT_PARSE_OPTIONS){const{decodeHtml:s,inline:c,emoji:h,mermaid:y,disableSanitizer:E}=r,M={...this.options,...r.markedOptions},R=M.renderer||this.renderer||new z0;this.extensions&&(this.renderer=this.extendsRendererForExtensions(R)),y&&(this.renderer=this.extendsRendererForMermaid(R));const $=this.trimIndentation(t),j=s?this.decodeHtml($):$,X=h?this.parseEmoji(j):j,K=this.parseMarked(X,M,c);return(E?K:this.sanitizer.sanitize(this.securityContext,K))||""}render(t,r=this.DEFAULT_RENDER_OPTIONS,s){const{clipboard:c,clipboardOptions:h,katex:y,katexOptions:E,mermaid:M,mermaidOptions:R}=r;c&&this.renderClipboard(t,s,{...this.DEFAULT_CLIPBOARD_OPTIONS,...this.clipboardOptions,...h}),y&&this.renderKatex(t,{...this.DEFAULT_KATEX_OPTIONS,...E}),M&&this.renderMermaid(t,{...this.DEFAULT_MERMAID_OPTIONS,...R}),this.highlight(t)}reload(){this._reload$.next()}getSource(t){if(!this.http)throw new Error("[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information");return this.http.get(t,{responseType:"text"}).pipe(ye(r=>this.handleExtension(t,r)))}highlight(t){if(!Eh(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;t||(t=document);const r=t.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(r,s=>s.classList.add("language-none")),Prism.highlightAllUnder(t)}decodeHtml(t){if(!Eh(this.platform))return t;const r=document.createElement("textarea");return r.innerHTML=t,r.value}extendsRendererForExtensions(t){const r=t;return!0===r.\u0275NgxMarkdownRendererExtendedForExtensions||(this.extensions?.length>0&&yr.use(...this.extensions),r.\u0275NgxMarkdownRendererExtendedForExtensions=!0),t}extendsRendererForMermaid(t){const r=t;if(!0===r.\u0275NgxMarkdownRendererExtendedForMermaid)return t;const s=t.code;return t.code=function(c,h,y){return"mermaid"===h?`
    ${c}
    `:s.call(this,c,h,y)},r.\u0275NgxMarkdownRendererExtendedForMermaid=!0,t}handleExtension(t,r){const s=t.lastIndexOf("://"),c=s>-1?t.substring(s+4):t,h=c.lastIndexOf("/"),y=h>-1?c.substring(h+1).split("?")[0]:"",E=y.lastIndexOf("."),M=E>-1?y.substring(E+1):"";return M&&"md"!==M?"```"+M+"\n"+r+"\n```":r}parseMarked(t,r,s=!1){return r.renderer&&(yr.use({renderer:r.renderer}),delete r.renderer),s?yr.parseInline(t,r):yr.parse(t,r)}parseEmoji(t){if(!Eh(this.platform))return t;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error("[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information");return joypixels.shortnameToUnicode(t)}renderKatex(t,r){if(Eh(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error("[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information");renderMathInElement(t,r)}}renderClipboard(t,r,s){if(!Eh(this.platform))return;if(typeof ClipboardJS>"u")throw new Error("[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information");if(!r)throw new Error("[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function");const{buttonComponent:c,buttonTemplate:h}=s,y=t.querySelectorAll("pre");for(let E=0;E$.style.opacity="1",M.onmouseout=()=>$.style.opacity="0",j=c?r.createComponent(c).hostView:h?r.createEmbeddedView(h):r.createComponent(FQ).hostView,j.rootNodes.forEach(K=>{K.onmouseover=()=>$.style.opacity="1",$.appendChild(K),X=new ClipboardJS(K,{text:()=>M.innerText})}),j.onDestroy(()=>X.destroy())}}renderMermaid(t,r=this.DEFAULT_MERMAID_OPTIONS){if(!Eh(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error("[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information");const s=t.querySelectorAll(".mermaid");0!==s.length&&(mermaid.initialize(r),mermaid.run({nodes:s}))}trimIndentation(t){if(!t)return"";let r;return t.split("\n").map(s=>{let c=r;return s.length>0&&(c=isNaN(c)?s.search(/\S|$/):Math.min(s.search(/\S|$/),c)),isNaN(r)&&(r=c),c?s.substring(c):s}).join("\n")}static#e=this.\u0275fac=function(r){return new(r||e)(pe(zre,8),pe(PQ,8),pe(LQ,8),pe(ps),pe($Q),pe(M_,8),pe(n1))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),HL=(()=>{class e{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(t){this._disableSanitizer=this.coerceBooleanProperty(t)}get inline(){return this._inline}set inline(t){this._inline=this.coerceBooleanProperty(t)}get clipboard(){return this._clipboard}set clipboard(t){this._clipboard=this.coerceBooleanProperty(t)}get emoji(){return this._emoji}set emoji(t){this._emoji=this.coerceBooleanProperty(t)}get katex(){return this._katex}set katex(t){this._katex=this.coerceBooleanProperty(t)}get mermaid(){return this._mermaid}set mermaid(t){this._mermaid=this.coerceBooleanProperty(t)}get lineHighlight(){return this._lineHighlight}set lineHighlight(t){this._lineHighlight=this.coerceBooleanProperty(t)}get lineNumbers(){return this._lineNumbers}set lineNumbers(t){this._lineNumbers=this.coerceBooleanProperty(t)}get commandLine(){return this._commandLine}set commandLine(t){this._commandLine=this.coerceBooleanProperty(t)}constructor(t,r,s){this.element=t,this.markdownService=r,this.viewContainerRef=s,this.error=new cn,this.load=new cn,this.ready=new cn,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new It}ngOnChanges(){this.loadContent()}loadContent(){null==this.data?null==this.src||this.handleSrc():this.handleData()}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(Kn(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(t,r=!1){var s=this;return(0,sn.Z)(function*(){const c={decodeHtml:r,inline:s.inline,emoji:s.emoji,mermaid:s.mermaid,disableSanitizer:s.disableSanitizer},h={clipboard:s.clipboard,clipboardOptions:{buttonComponent:s.clipboardButtonComponent,buttonTemplate:s.clipboardButtonTemplate},katex:s.katex,katexOptions:s.katexOptions,mermaid:s.mermaid,mermaidOptions:s.mermaidOptions},y=yield s.markdownService.parse(t,c);s.element.nativeElement.innerHTML=y,s.handlePlugins(),s.markdownService.render(s.element.nativeElement,h,s.viewContainerRef),s.ready.emit()})()}coerceBooleanProperty(t){return null!=t&&"false"!=`${String(t)}`}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:t=>{this.render(t).then(()=>{this.load.emit(t)})},error:t=>this.error.emit(t)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,Dq.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,Dq.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(t,r){const s=t.querySelectorAll("pre");for(let c=0;c{const y=r[h];if(y){const E=this.toLispCase(h);s.item(c).setAttribute(E,y.toString())}})}toLispCase(t){const r=t.match(/([A-Z])/g);if(!r)return t;let s=t.toString();for(let c=0,h=r.length;c{class e{static forRoot(t){return{ngModule:e,providers:[Yre(t)]}}static forChild(){return{ngModule:e}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();var BQ;function YO(e){return!!e&&(e instanceof Qn||Jt(e.lift)&&Jt(e.subscribe))}function qL(e){return new Qn(n=>{Gs(e()).subscribe(n)})}function C1(e,n){const t=Jt(e)?e:()=>e,r=s=>s.error(t());return new Qn(n?s=>n.schedule(r,0,s):r)}function Aq(){return be((e,n)=>{let t=null;e._refCount++;const r=Se(n,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(t=null);const s=e._connection,c=t;t=null,s&&(!c||s===c)&&s.unsubscribe(),n.unsubscribe()});e.subscribe(r),r.closed||(t=e.connect())})}!function(e){let n;var s;let t,r;(s=n=e.SecurityLevel||(e.SecurityLevel={})).Strict="strict",s.Loose="loose",s.Antiscript="antiscript",s.Sandbox="sandbox",function(s){s.Base="base",s.Forest="forest",s.Dark="dark",s.Default="default",s.Neutral="neutral"}(t=e.Theme||(e.Theme={})),function(s){s[s.Debug=1]="Debug",s[s.Info=2]="Info",s[s.Warn=3]="Warn",s[s.Error=4]="Error",s[s.Fatal=5]="Fatal"}(r=e.LogLevel||(e.LogLevel={}))}(BQ||(BQ={}));class zQ extends Qn{constructor(n,t){super(),this.source=n,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,ae(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new xn;const t=this.getSubject();n.add(this.source.subscribe(Se(t,void 0,()=>{this._teardown(),t.complete()},r=>{this._teardown(),t.error(r)},()=>this._teardown()))),n.closed&&(this._connection=null,n=xn.EMPTY)}return n}refCount(){return Aq()(this)}}function Sf(e){return be((n,t)=>{let c,r=null,s=!1;r=n.subscribe(Se(t,void 0,void 0,h=>{c=Gs(e(h,Sf(e)(n))),r?(r.unsubscribe(),r=null,c.subscribe(t)):s=!0})),s&&(r.unsubscribe(),r=null,c.subscribe(t))})}function Tq(e){return e<=0?()=>Hl:be((n,t)=>{let r=[];n.subscribe(Se(t,s=>{r.push(s),e{for(const s of r)t.next(s);t.complete()},void 0,()=>{r=null}))})}const wi="primary",GL=Symbol("RouteTitle");class Jre{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const t=this.params[n];return Array.isArray(t)?t[0]:t}return null}getAll(n){if(this.has(n)){const t=this.params[n];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function KO(e){return new Jre(e)}function eoe(e,n,t){const r=t.path.split("/");if(r.length>e.length||"full"===t.pathMatch&&(n.hasChildren()||r.lengthr[c]===s)}return e===n}function jQ(e){return e.length>0?e[e.length-1]:null}function S1(e){return YO(e)?e:Cw(e)?Cn(Promise.resolve(e)):zt(e)}const noe={exact:function WQ(e,n,t){if(!QD(e.segments,n.segments)||!S4(e.segments,n.segments,t)||e.numberOfChildren!==n.numberOfChildren)return!1;for(const r in n.children)if(!e.children[r]||!WQ(e.children[r],n.children[r],t))return!1;return!0},subset:qQ},UQ={exact:function ioe(e,n){return P_(e,n)},subset:function roe(e,n){return Object.keys(n).length<=Object.keys(e).length&&Object.keys(n).every(t=>VQ(e[t],n[t]))},ignored:()=>!0};function HQ(e,n,t){return noe[t.paths](e.root,n.root,t.matrixParams)&&UQ[t.queryParams](e.queryParams,n.queryParams)&&!("exact"===t.fragment&&e.fragment!==n.fragment)}function qQ(e,n,t){return GQ(e,n,n.segments,t)}function GQ(e,n,t,r){if(e.segments.length>t.length){const s=e.segments.slice(0,t.length);return!(!QD(s,t)||n.hasChildren()||!S4(s,t,r))}if(e.segments.length===t.length){if(!QD(e.segments,t)||!S4(e.segments,t,r))return!1;for(const s in n.children)if(!e.children[s]||!qQ(e.children[s],n.children[s],r))return!1;return!0}{const s=t.slice(0,e.segments.length),c=t.slice(e.segments.length);return!!(QD(e.segments,s)&&S4(e.segments,s,r)&&e.children[wi])&&GQ(e.children[wi],n,c,r)}}function S4(e,n,t){return n.every((r,s)=>UQ[t](e[s].parameters,r.parameters))}class ZO{constructor(n=new qr([],{}),t={},r=null){this.root=n,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap??=KO(this.queryParams),this._queryParamMap}toString(){return aoe.serialize(this)}}class qr{constructor(n,t){this.segments=n,this.children=t,this.parent=null,Object.values(t).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return D4(this)}}class XL{constructor(n,t){this.path=n,this.parameters=t}get parameterMap(){return this._parameterMap??=KO(this.parameters),this._parameterMap}toString(){return KQ(this)}}function QD(e,n){return e.length===n.length&&e.every((t,r)=>t.path===n[r].path)}let QO=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>new Iq,providedIn:"root"})}return e})();class Iq{parse(n){const t=new yoe(n);return new ZO(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(n){const t=`/${YL(n.root,!0)}`,r=function uoe(e){const n=Object.entries(e).map(([t,r])=>Array.isArray(r)?r.map(s=>`${M4(t)}=${M4(s)}`).join("&"):`${M4(t)}=${M4(r)}`).filter(t=>t);return n.length?`?${n.join("&")}`:""}(n.queryParams);return`${t}${r}${"string"==typeof n.fragment?`#${function loe(e){return encodeURI(e)}(n.fragment)}`:""}`}}const aoe=new Iq;function D4(e){return e.segments.map(n=>KQ(n)).join("/")}function YL(e,n){if(!e.hasChildren())return D4(e);if(n){const t=e.children[wi]?YL(e.children[wi],!1):"",r=[];return Object.entries(e.children).forEach(([s,c])=>{s!==wi&&r.push(`${s}:${YL(c,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function soe(e,n){let t=[];return Object.entries(e.children).forEach(([r,s])=>{r===wi&&(t=t.concat(n(s,r)))}),Object.entries(e.children).forEach(([r,s])=>{r!==wi&&(t=t.concat(n(s,r)))}),t}(e,(r,s)=>s===wi?[YL(e.children[wi],!1)]:[`${s}:${YL(r,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[wi]?`${D4(e)}/${t[0]}`:`${D4(e)}/(${t.join("//")})`}}function XQ(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function M4(e){return XQ(e).replace(/%3B/gi,";")}function Oq(e){return XQ(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function A4(e){return decodeURIComponent(e)}function YQ(e){return A4(e.replace(/\+/g,"%20"))}function KQ(e){return`${Oq(e.path)}${function coe(e){return Object.entries(e).map(([n,t])=>`;${Oq(n)}=${Oq(t)}`).join("")}(e.parameters)}`}const doe=/^[^\/()?;#]+/;function Rq(e){const n=e.match(doe);return n?n[0]:""}const foe=/^[^\/()?;=#]+/,poe=/^[^=?&#]+/,goe=/^[^&#]+/;class yoe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new qr([],{}):new qr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(t).length>0)&&(r[wi]=new qr(n,t)),r}parseSegment(){const n=Rq(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new _e(4009,!1);return this.capture(n),new XL(A4(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const t=function hoe(e){const n=e.match(foe);return n?n[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=Rq(this.remaining);s&&(r=s,this.capture(r))}n[A4(t)]=A4(r)}parseQueryParam(n){const t=function moe(e){const n=e.match(poe);return n?n[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const h=function _oe(e){const n=e.match(goe);return n?n[0]:""}(this.remaining);h&&(r=h,this.capture(r))}const s=YQ(t),c=YQ(r);if(n.hasOwnProperty(s)){let h=n[s];Array.isArray(h)||(h=[h],n[s]=h),h.push(c)}else n[s]=c}parseParens(n){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=Rq(this.remaining),s=this.remaining[r.length];if("/"!==s&&")"!==s&&";"!==s)throw new _e(4010,!1);let c;r.indexOf(":")>-1?(c=r.slice(0,r.indexOf(":")),this.capture(c),this.capture(":")):n&&(c=wi);const h=this.parseChildren();t[c]=1===Object.keys(h).length?h[wi]:new qr([],h),this.consumeOptional("//")}return t}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new _e(4011,!1)}}function ZQ(e){return e.segments.length>0?new qr([],{[wi]:e}):e}function QQ(e){const n={};for(const[r,s]of Object.entries(e.children)){const c=QQ(s);if(r===wi&&0===c.segments.length&&c.hasChildren())for(const[h,y]of Object.entries(c.children))n[h]=y;else(c.segments.length>0||c.hasChildren())&&(n[r]=c)}return function boe(e){if(1===e.numberOfChildren&&e.children[wi]){const n=e.children[wi];return new qr(e.segments.concat(n.segments),n.children)}return e}(new qr(e.segments,n))}function JO(e){return e instanceof ZO}function JQ(e){let n;const s=ZQ(function t(c){const h={};for(const E of c.children){const M=t(E);h[E.outlet]=M}const y=new qr(c.url,h);return c===e&&(n=y),y}(e.root));return n??s}function eJ(e,n,t,r){let s=e;for(;s.parent;)s=s.parent;if(0===n.length)return Nq(s,s,s,t,r);const c=function xoe(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new nJ(!0,0,e);let n=0,t=!1;const r=e.reduce((s,c,h)=>{if("object"==typeof c&&null!=c){if(c.outlets){const y={};return Object.entries(c.outlets).forEach(([E,M])=>{y[E]="string"==typeof M?M.split("/"):M}),[...s,{outlets:y}]}if(c.segmentPath)return[...s,c.segmentPath]}return"string"!=typeof c?[...s,c]:0===h?(c.split("/").forEach((y,E)=>{0==E&&"."===y||(0==E&&""===y?t=!0:".."===y?n++:""!=y&&s.push(y))}),s):[...s,c]},[]);return new nJ(t,n,r)}(n);if(c.toRoot())return Nq(s,s,new qr([],{}),t,r);const h=function woe(e,n,t){if(e.isAbsolute)return new k4(n,!0,0);if(!t)return new k4(n,!1,NaN);if(null===t.parent)return new k4(t,!0,0);const r=T4(e.commands[0])?0:1;return function Eoe(e,n,t){let r=e,s=n,c=t;for(;c>s;){if(c-=s,r=r.parent,!r)throw new _e(4005,!1);s=r.segments.length}return new k4(r,!1,s-c)}(t,t.segments.length-1+r,e.numberOfDoubleDots)}(c,s,e),y=h.processChildren?ZL(h.segmentGroup,h.index,c.commands):iJ(h.segmentGroup,h.index,c.commands);return Nq(s,h.segmentGroup,y,t,r)}function T4(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function KL(e){return"object"==typeof e&&null!=e&&e.outlets}function Nq(e,n,t,r,s){let h,c={};r&&Object.entries(r).forEach(([E,M])=>{c[E]=Array.isArray(M)?M.map(R=>`${R}`):`${M}`}),h=e===n?t:tJ(e,n,t);const y=ZQ(QQ(h));return new ZO(y,c,s)}function tJ(e,n,t){const r={};return Object.entries(e.children).forEach(([s,c])=>{r[s]=c===n?t:tJ(c,n,t)}),new qr(e.segments,r)}class nJ{constructor(n,t,r){if(this.isAbsolute=n,this.numberOfDoubleDots=t,this.commands=r,n&&r.length>0&&T4(r[0]))throw new _e(4003,!1);const s=r.find(KL);if(s&&s!==jQ(r))throw new _e(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class k4{constructor(n,t,r){this.segmentGroup=n,this.processChildren=t,this.index=r}}function iJ(e,n,t){if(e??=new qr([],{}),0===e.segments.length&&e.hasChildren())return ZL(e,n,t);const r=function Soe(e,n,t){let r=0,s=n;const c={match:!1,pathIndex:0,commandIndex:0};for(;s=t.length)return c;const h=e.segments[s],y=t[r];if(KL(y))break;const E=`${y}`,M=r0&&void 0===E)break;if(E&&M&&"object"==typeof M&&void 0===M.outlets){if(!oJ(E,M,h))return c;r+=2}else{if(!oJ(E,{},h))return c;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(e,n,t),s=t.slice(r.commandIndex);if(r.match&&r.pathIndexc!==wi)&&e.children[wi]&&1===e.numberOfChildren&&0===e.children[wi].segments.length){const c=ZL(e.children[wi],n,t);return new qr(e.segments,c.children)}return Object.entries(r).forEach(([c,h])=>{"string"==typeof h&&(h=[h]),null!==h&&(s[c]=iJ(e.children[c],n,h))}),Object.entries(e.children).forEach(([c,h])=>{void 0===r[c]&&(s[c]=h)}),new qr(e.segments,s)}}function Fq(e,n,t){const r=e.segments.slice(0,n);let s=0;for(;s{"string"==typeof r&&(r=[r]),null!==r&&(n[t]=Fq(new qr([],{}),0,r))}),n}function rJ(e){const n={};return Object.entries(e).forEach(([t,r])=>n[t]=`${r}`),n}function oJ(e,n,t){return e==t.path&&P_(n,t.parameters)}const QL="imperative";var Ki=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}(Ki||{});class L_{constructor(n,t){this.id=n,this.url=t}}class JD extends L_{constructor(n,t,r="imperative",s=null){super(n,t),this.type=Ki.NavigationStart,this.navigationTrigger=r,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class $_ extends L_{constructor(n,t,r){super(n,t),this.urlAfterRedirects=r,this.type=Ki.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Lh=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Lh||{}),I4=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(I4||{});class eM extends L_{constructor(n,t,r,s){super(n,t),this.reason=r,this.code=s,this.type=Ki.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class e2 extends L_{constructor(n,t,r,s){super(n,t),this.reason=r,this.code=s,this.type=Ki.NavigationSkipped}}class t2 extends L_{constructor(n,t,r,s){super(n,t),this.error=r,this.target=s,this.type=Ki.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class O4 extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Moe extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Aoe extends L_{constructor(n,t,r,s,c){super(n,t),this.urlAfterRedirects=r,this.state=s,this.shouldActivate=c,this.type=Ki.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Toe extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class sJ extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class koe{constructor(n){this.route=n,this.type=Ki.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Ioe{constructor(n){this.route=n,this.type=Ki.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Ooe{constructor(n){this.snapshot=n,this.type=Ki.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Roe{constructor(n){this.snapshot=n,this.type=Ki.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Noe{constructor(n){this.snapshot=n,this.type=Ki.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Foe{constructor(n){this.snapshot=n,this.type=Ki.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class aJ{constructor(n,t,r){this.routerEvent=n,this.position=t,this.anchor=r,this.type=Ki.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Pq{}class Lq{constructor(n){this.url=n}}class Poe{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new JL,this.attachRef=null}}let JL=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(t,r){const s=this.getOrCreateContext(t);s.outlet=r,this.contexts.set(t,s)}onChildOutletDestroyed(t){const r=this.getContext(t);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let r=this.getContext(t);return r||(r=new Poe,this.contexts.set(t,r)),r}getContext(t){return this.contexts.get(t)||null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class lJ{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const t=this.pathFromRoot(n);return t.length>1?t[t.length-2]:null}children(n){const t=$q(n,this._root);return t?t.children.map(r=>r.value):[]}firstChild(n){const t=$q(n,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(n){const t=Bq(n,this._root);return t.length<2?[]:t[t.length-2].children.map(s=>s.value).filter(s=>s!==n)}pathFromRoot(n){return Bq(n,this._root).map(t=>t.value)}}function $q(e,n){if(e===n.value)return n;for(const t of n.children){const r=$q(e,t);if(r)return r}return null}function Bq(e,n){if(e===n.value)return[n];for(const t of n.children){const r=Bq(e,t);if(r.length)return r.unshift(n),r}return[]}class Nm{constructor(n,t){this.value=n,this.children=t}toString(){return`TreeNode(${this.value})`}}function n2(e){const n={};return e&&e.children.forEach(t=>n[t.value.outlet]=t),n}class cJ extends lJ{constructor(n,t){super(n),this.snapshot=t,jq(this,n)}toString(){return this.snapshot.toString()}}function uJ(e){const n=function Loe(e){const c=new Vq([],{},{},"",{},wi,e,null,{});return new dJ("",new Nm(c,[]))}(e),t=new wr([new XL("",{})]),r=new wr({}),s=new wr({}),c=new wr({}),h=new wr(""),y=new tM(t,r,c,h,s,wi,e,n.root);return y.snapshot=n.root,new cJ(new Nm(y,[]),n)}class tM{constructor(n,t,r,s,c,h,y,E){this.urlSubject=n,this.paramsSubject=t,this.queryParamsSubject=r,this.fragmentSubject=s,this.dataSubject=c,this.outlet=h,this.component=y,this._futureSnapshot=E,this.title=this.dataSubject?.pipe(ye(M=>M[GL]))??zt(void 0),this.url=n,this.params=t,this.queryParams=r,this.fragment=s,this.data=c}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(ye(n=>KO(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ye(n=>KO(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function zq(e,n,t="emptyOnly"){let r;const{routeConfig:s}=e;return r=null===n||"always"!==t&&""!==s?.path&&(n.component||n.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.data,...s?.data,...e._resolvedData}},s&&hJ(s)&&(r.resolve[GL]=s.title),r}class Vq{get title(){return this.data?.[GL]}constructor(n,t,r,s,c,h,y,E,M){this.url=n,this.params=t,this.queryParams=r,this.fragment=s,this.data=c,this.outlet=h,this.component=y,this.routeConfig=E,this._resolve=M}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??=KO(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=KO(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class dJ extends lJ{constructor(n,t){super(t),this.url=n,jq(this,t)}toString(){return fJ(this._root)}}function jq(e,n){n.value._routerState=e,n.children.forEach(t=>jq(e,t))}function fJ(e){const n=e.children.length>0?` { ${e.children.map(fJ).join(", ")} } `:"";return`${e.value}${n}`}function Uq(e){if(e.snapshot){const n=e.snapshot,t=e._futureSnapshot;e.snapshot=t,P_(n.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),n.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),P_(n.params,t.params)||e.paramsSubject.next(t.params),function toe(e,n){if(e.length!==n.length)return!1;for(let t=0;tP_(t.parameters,n[r].parameters))}(e.url,n.url);return t&&!(!e.parent!=!n.parent)&&(!e.parent||Hq(e.parent,n.parent))}function hJ(e){return"string"==typeof e.title||null===e.title}let Wq=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=wi,this.activateEvents=new cn,this.deactivateEvents=new cn,this.attachEvents=new cn,this.detachEvents=new cn,this.parentContexts=Xe(JL),this.location=Xe(Jo),this.changeDetector=Xe(Qo),this.environmentInjector=Xe(xo),this.inputBinder=Xe(R4,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(t){if(t.name){const{firstChange:r,previousValue:s}=t.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new _e(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new _e(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new _e(4012,!1);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new _e(4013,!1);this._activatedRoute=t;const s=this.location,h=t.snapshot.component,y=this.parentContexts.getOrCreateContext(this.name).children,E=new $oe(t,y,s.injector);this.activated=s.createComponent(h,{index:s.length,injector:E,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[vo]})}return e})();class $oe{constructor(n,t,r){this.route=n,this.childContexts=t,this.parent=r}get(n,t){return n===tM?this.route:n===JL?this.childContexts:this.parent.get(n,t)}}const R4=new $e("");let pJ=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){const{activatedRoute:r}=t,s=d1([r.queryParams,r.params,r.data]).pipe(Sr(([c,h,y],E)=>(y={...c,...h,...y},0===E?zt(y):Promise.resolve(y)))).subscribe(c=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==r||null===r.component)return void this.unsubscribeFromRouteData(t);const h=function K6(e){const n=Jn(e);if(!n)return null;const t=new pc(n);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}(r.component);if(h)for(const{templateName:y}of h.inputs)t.activatedComponentRef.setInput(y,c[y]);else this.unsubscribeFromRouteData(t)});this.outletDataSubscriptions.set(t,s)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function e$(e,n,t){if(t&&e.shouldReuseRoute(n.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=n.value;const s=function zoe(e,n,t){return n.children.map(r=>{for(const s of t.children)if(e.shouldReuseRoute(r.value,s.value.snapshot))return e$(e,r,s);return e$(e,r)})}(e,n,t);return new Nm(r,s)}{if(e.shouldAttach(n.value)){const c=e.retrieve(n.value);if(null!==c){const h=c.route;return h.value._futureSnapshot=n.value,h.children=n.children.map(y=>e$(e,y)),h}}const r=function Voe(e){return new tM(new wr(e.url),new wr(e.params),new wr(e.queryParams),new wr(e.fragment),new wr(e.data),e.outlet,e.component,e)}(n.value),s=n.children.map(c=>e$(e,c));return new Nm(r,s)}}const mJ="ngNavigationCancelingError";function gJ(e,n){const{redirectTo:t,navigationBehaviorOptions:r}=JO(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,s=_J(!1,Lh.Redirect);return s.url=t,s.navigationBehaviorOptions=r,s}function _J(e,n){const t=new Error(`NavigationCancelingError: ${e||""}`);return t[mJ]=!0,t.cancellationCode=n,t}function yJ(e){return!!e&&e[mJ]}let bJ=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["ng-component"]],standalone:!0,features:[xi],decls:1,vars:0,template:function(r,s){1&r&&Wt(0,"router-outlet")},dependencies:[Wq],encapsulation:2})}return e})();function qq(e){const n=e.children&&e.children.map(qq),t=n?{...e,children:n}:{...e};return!t.component&&!t.loadComponent&&(n||t.loadChildren)&&t.outlet&&t.outlet!==wi&&(t.component=bJ),t}function B_(e){return e.outlet||wi}function t$(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let n=e.parent;n;n=n.parent){const t=n.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class Yoe{constructor(n,t,r,s,c){this.routeReuseStrategy=n,this.futureState=t,this.currState=r,this.forwardEvent=s,this.inputBindingEnabled=c}activate(n){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,n),Uq(this.futureState.root),this.activateChildRoutes(t,r,n)}deactivateChildRoutes(n,t,r){const s=n2(t);n.children.forEach(c=>{const h=c.value.outlet;this.deactivateRoutes(c,s[h],r),delete s[h]}),Object.values(s).forEach(c=>{this.deactivateRouteAndItsChildren(c,r)})}deactivateRoutes(n,t,r){const s=n.value,c=t?t.value:null;if(s===c)if(s.component){const h=r.getContext(s.outlet);h&&this.deactivateChildRoutes(n,t,h.children)}else this.deactivateChildRoutes(n,t,r);else c&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(n,t){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,t):this.deactivateRouteAndOutlet(n,t)}detachAndStoreRouteSubtree(n,t){const r=t.getContext(n.value.outlet),s=r&&n.value.component?r.children:t,c=n2(n);for(const h of Object.values(c))this.deactivateRouteAndItsChildren(h,s);if(r&&r.outlet){const h=r.outlet.detach(),y=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:h,route:n,contexts:y})}}deactivateRouteAndOutlet(n,t){const r=t.getContext(n.value.outlet),s=r&&n.value.component?r.children:t,c=n2(n);for(const h of Object.values(c))this.deactivateRouteAndItsChildren(h,s);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,t,r){const s=n2(t);n.children.forEach(c=>{this.activateRoutes(c,s[c.value.outlet],r),this.forwardEvent(new Foe(c.value.snapshot))}),n.children.length&&this.forwardEvent(new Roe(n.value.snapshot))}activateRoutes(n,t,r){const s=n.value,c=t?t.value:null;if(Uq(s),s===c)if(s.component){const h=r.getOrCreateContext(s.outlet);this.activateChildRoutes(n,t,h.children)}else this.activateChildRoutes(n,t,r);else if(s.component){const h=r.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const y=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),h.children.onOutletReAttached(y.contexts),h.attachRef=y.componentRef,h.route=y.route.value,h.outlet&&h.outlet.attach(y.componentRef,y.route.value),Uq(y.route.value),this.activateChildRoutes(n,null,h.children)}else{const y=t$(s.snapshot);h.attachRef=null,h.route=s,h.injector=y,h.outlet&&h.outlet.activateWith(s,h.injector),this.activateChildRoutes(n,null,h.children)}}else this.activateChildRoutes(n,null,r)}}class vJ{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class N4{constructor(n,t){this.component=n,this.route=t}}function Koe(e,n,t){const r=e._root;return n$(r,n?n._root:null,t,[r.value])}function r2(e,n){const t=Symbol(),r=n.get(e,t);return r===t?"function"!=typeof e||function k2(e){return null!==q_(e)}(e)?n.get(e):e:r}function n$(e,n,t,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const c=n2(n);return e.children.forEach(h=>{(function Qoe(e,n,t,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const c=e.value,h=n?n.value:null,y=t?t.getContext(e.value.outlet):null;if(h&&c.routeConfig===h.routeConfig){const E=function Joe(e,n,t){if("function"==typeof t)return t(e,n);switch(t){case"pathParamsChange":return!QD(e.url,n.url);case"pathParamsOrQueryParamsChange":return!QD(e.url,n.url)||!P_(e.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Hq(e,n)||!P_(e.queryParams,n.queryParams);default:return!Hq(e,n)}}(h,c,c.routeConfig.runGuardsAndResolvers);E?s.canActivateChecks.push(new vJ(r)):(c.data=h.data,c._resolvedData=h._resolvedData),n$(e,n,c.component?y?y.children:null:t,r,s),E&&y&&y.outlet&&y.outlet.isActivated&&s.canDeactivateChecks.push(new N4(y.outlet.component,h))}else h&&i$(n,y,s),s.canActivateChecks.push(new vJ(r)),n$(e,null,c.component?y?y.children:null:t,r,s)})(h,c[h.value.outlet],t,r.concat([h.value]),s),delete c[h.value.outlet]}),Object.entries(c).forEach(([h,y])=>i$(y,t.getContext(h),s)),s}function i$(e,n,t){const r=n2(e),s=e.value;Object.entries(r).forEach(([c,h])=>{i$(h,s.component?n?n.children.getContext(c):null:n,t)}),t.canDeactivateChecks.push(new N4(s.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,s))}function r$(e){return"function"==typeof e}function xJ(e){return e instanceof ge||"EmptyError"===e?.name}const F4=Symbol("INITIAL_VALUE");function o2(){return Sr(e=>d1(e.map(n=>n.pipe(Bo(1),Wl(F4)))).pipe(ye(n=>{for(const t of n)if(!0!==t){if(t===F4)return F4;if(!1===t||t instanceof ZO)return t}return!0}),ii(n=>n!==F4),Bo(1)))}function wJ(e){return function Oc(...e){return Yl(e)}(Do(n=>{if(JO(n))throw gJ(0,n)}),ye(n=>!0===n))}class Gq{constructor(n){this.segmentGroup=n||null}}class Xq extends Error{constructor(n){super(),this.urlTree=n}}function s2(e){return C1(new Gq(e))}class yse{constructor(n,t){this.urlSerializer=n,this.urlTree=t}lineralizeSegments(n,t){let r=[],s=t.root;for(;;){if(r=r.concat(s.segments),0===s.numberOfChildren)return zt(r);if(s.numberOfChildren>1||!s.children[wi])return C1(new _e(4e3,!1));s=s.children[wi]}}applyRedirectCommands(n,t,r){const s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),n,r);if(t.startsWith("/"))throw new Xq(s);return s}applyRedirectCreateUrlTree(n,t,r,s){const c=this.createSegmentGroup(n,t.root,r,s);return new ZO(c,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(n,t){const r={};return Object.entries(n).forEach(([s,c])=>{if("string"==typeof c&&c.startsWith(":")){const y=c.substring(1);r[s]=t[y]}else r[s]=c}),r}createSegmentGroup(n,t,r,s){const c=this.createSegments(n,t.segments,r,s);let h={};return Object.entries(t.children).forEach(([y,E])=>{h[y]=this.createSegmentGroup(n,E,r,s)}),new qr(c,h)}createSegments(n,t,r,s){return t.map(c=>c.path.startsWith(":")?this.findPosParam(n,c,s):this.findOrReturn(c,r))}findPosParam(n,t,r){const s=r[t.path.substring(1)];if(!s)throw new _e(4001,!1);return s}findOrReturn(n,t){let r=0;for(const s of t){if(s.path===n.path)return t.splice(r),s;r++}return n}}const Yq={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bse(e,n,t,r,s){const c=Kq(e,n,t);return c.matched?(r=function Uoe(e,n){return e.providers&&!e._injector&&(e._injector=fn(e.providers,n,`Route: ${e.path}`)),e._injector??n}(n,r),function mse(e,n,t,r){const s=n.canMatch;return s&&0!==s.length?zt(s.map(h=>{const y=r2(h,e);return S1(function ose(e){return e&&r$(e.canMatch)}(y)?y.canMatch(n,t):Od(e,()=>y(n,t)))})).pipe(o2(),wJ()):zt(!0)}(r,n,t).pipe(ye(h=>!0===h?c:{...Yq}))):zt(c)}function Kq(e,n,t){if("**"===n.path)return function vse(e){return{matched:!0,parameters:e.length>0?jQ(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(t);if(""===n.path)return"full"===n.pathMatch&&(e.hasChildren()||t.length>0)?{...Yq}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const s=(n.matcher||eoe)(t,e,n);if(!s)return{...Yq};const c={};Object.entries(s.posParams??{}).forEach(([y,E])=>{c[y]=E.path});const h=s.consumed.length>0?{...c,...s.consumed[s.consumed.length-1].parameters}:c;return{matched:!0,consumedSegments:s.consumed,remainingSegments:t.slice(s.consumed.length),parameters:h,positionalParamSegments:s.posParams??{}}}function EJ(e,n,t,r){return t.length>0&&function Ese(e,n,t){return t.some(r=>P4(e,n,r)&&B_(r)!==wi)}(e,t,r)?{segmentGroup:new qr(n,wse(r,new qr(t,e.children))),slicedSegments:[]}:0===t.length&&function Cse(e,n,t){return t.some(r=>P4(e,n,r))}(e,t,r)?{segmentGroup:new qr(e.segments,xse(e,t,r,e.children)),slicedSegments:t}:{segmentGroup:new qr(e.segments,e.children),slicedSegments:t}}function xse(e,n,t,r){const s={};for(const c of t)if(P4(e,n,c)&&!r[B_(c)]){const h=new qr([],{});s[B_(c)]=h}return{...r,...s}}function wse(e,n){const t={};t[wi]=n;for(const r of e)if(""===r.path&&B_(r)!==wi){const s=new qr([],{});t[B_(r)]=s}return t}function P4(e,n,t){return(!(e.hasChildren()||n.length>0)||"full"!==t.pathMatch)&&""===t.path}class Mse{}class kse{constructor(n,t,r,s,c,h,y){this.injector=n,this.configLoader=t,this.rootComponentType=r,this.config=s,this.urlTree=c,this.paramsInheritanceStrategy=h,this.urlSerializer=y,this.applyRedirects=new yse(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(n){return new _e(4002,`'${n.segmentGroup}'`)}recognize(){const n=EJ(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(ye(t=>{const r=new Vq([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},wi,this.rootComponentType,null,{}),s=new Nm(r,t),c=new dJ("",s),h=function voe(e,n,t=null,r=null){return eJ(JQ(e),n,t,r)}(r,[],this.urlTree.queryParams,this.urlTree.fragment);return h.queryParams=this.urlTree.queryParams,c.url=this.urlSerializer.serialize(h),this.inheritParamsAndData(c._root,null),{state:c,tree:h}}))}match(n){return this.processSegmentGroup(this.injector,this.config,n,wi).pipe(Sf(r=>{if(r instanceof Xq)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Gq?this.noMatchError(r):r}))}inheritParamsAndData(n,t){const r=n.value,s=zq(r,t,this.paramsInheritanceStrategy);r.params=Object.freeze(s.params),r.data=Object.freeze(s.data),n.children.forEach(c=>this.inheritParamsAndData(c,r))}processSegmentGroup(n,t,r,s){return 0===r.segments.length&&r.hasChildren()?this.processChildren(n,t,r):this.processSegment(n,t,r,r.segments,s,!0).pipe(ye(c=>c instanceof Nm?[c]:[]))}processChildren(n,t,r){const s=[];for(const c of Object.keys(r.children))"primary"===c?s.unshift(c):s.push(c);return Cn(s).pipe(lu(c=>{const h=r.children[c],y=function Goe(e,n){const t=e.filter(r=>B_(r)===n);return t.push(...e.filter(r=>B_(r)!==n)),t}(t,c);return this.processSegmentGroup(n,y,h,c)}),function Zre(e,n){return be(function Kre(e,n,t,r,s){return(c,h)=>{let y=t,E=n,M=0;c.subscribe(Se(h,R=>{const $=M++;E=y?e(E,R,$):(y=!0,R),r&&h.next(E)},s&&(()=>{y&&h.next(E),h.complete()})))}}(e,n,arguments.length>=2,!0))}((c,h)=>(c.push(...h),c)),de(null),function Qre(e,n){const t=arguments.length>=2;return r=>r.pipe(e?ii((s,c)=>e(s,c,r)):Wi,Tq(1),t?de(n):Te(()=>new ge))}(),Wr(c=>{if(null===c)return s2(r);const h=CJ(c);return function Ise(e){e.sort((n,t)=>n.value.outlet===wi?-1:t.value.outlet===wi?1:n.value.outlet.localeCompare(t.value.outlet))}(h),zt(h)}))}processSegment(n,t,r,s,c,h){return Cn(t).pipe(lu(y=>this.processSegmentAgainstRoute(y._injector??n,t,y,r,s,c,h).pipe(Sf(E=>{if(E instanceof Gq)return zt(null);throw E}))),Ie(y=>!!y),Sf(y=>{if(xJ(y))return function Dse(e,n,t){return 0===n.length&&!e.children[t]}(r,s,c)?zt(new Mse):s2(r);throw y}))}processSegmentAgainstRoute(n,t,r,s,c,h,y){return function Sse(e,n,t,r){return!!(B_(e)===r||r!==wi&&P4(n,t,e))&&Kq(n,e,t).matched}(r,s,c,h)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,s,r,c,h):this.allowRedirects&&y?this.expandSegmentAgainstRouteUsingRedirect(n,s,t,r,c,h):s2(s):s2(s)}expandSegmentAgainstRouteUsingRedirect(n,t,r,s,c,h){const{matched:y,consumedSegments:E,positionalParamSegments:M,remainingSegments:R}=Kq(t,s,c);if(!y)return s2(t);s.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const $=this.applyRedirects.applyRedirectCommands(E,s.redirectTo,M);return this.applyRedirects.lineralizeSegments(s,$).pipe(Wr(j=>this.processSegment(n,r,t,j.concat(R),h,!1)))}matchSegmentAgainstRoute(n,t,r,s,c){const h=bse(t,r,s,n);return"**"===r.path&&(t.children={}),h.pipe(Sr(y=>y.matched?this.getChildConfig(n=r._injector??n,r,s).pipe(Sr(({routes:E})=>{const M=r._loadedInjector??n,{consumedSegments:R,remainingSegments:$,parameters:j}=y,X=new Vq(R,j,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function Rse(e){return e.data||{}}(r),B_(r),r.component??r._loadedComponent??null,r,function Nse(e){return e.resolve||{}}(r)),{segmentGroup:K,slicedSegments:ie}=EJ(t,R,$,E);if(0===ie.length&&K.hasChildren())return this.processChildren(M,E,K).pipe(ye(Me=>null===Me?null:new Nm(X,Me)));if(0===E.length&&0===ie.length)return zt(new Nm(X,[]));const me=B_(r)===c;return this.processSegment(M,E,K,ie,me?wi:c,!0).pipe(ye(Me=>new Nm(X,Me instanceof Nm?[Me]:[])))})):s2(t)))}getChildConfig(n,t,r){return t.children?zt({routes:t.children,injector:n}):t.loadChildren?void 0!==t._loadedRoutes?zt({routes:t._loadedRoutes,injector:t._loadedInjector}):function pse(e,n,t,r){const s=n.canLoad;return void 0===s||0===s.length?zt(!0):zt(s.map(h=>{const y=r2(h,e);return S1(function tse(e){return e&&r$(e.canLoad)}(y)?y.canLoad(n,t):Od(e,()=>y(n,t)))})).pipe(o2(),wJ())}(n,t,r).pipe(Wr(s=>s?this.configLoader.loadChildren(n,t).pipe(Do(c=>{t._loadedRoutes=c.routes,t._loadedInjector=c.injector})):function _se(e){return C1(_J(!1,Lh.GuardRejected))}())):zt({routes:[],injector:n})}}function Ose(e){const n=e.value.routeConfig;return n&&""===n.path}function CJ(e){const n=[],t=new Set;for(const r of e){if(!Ose(r)){n.push(r);continue}const s=n.find(c=>r.value.routeConfig===c.value.routeConfig);void 0!==s?(s.children.push(...r.children),t.add(s)):n.push(r)}for(const r of t){const s=CJ(r.children);n.push(new Nm(r.value,s))}return n.filter(r=>!t.has(r))}function SJ(e){const n=e.children.map(t=>SJ(t)).flat();return[e,...n]}function Zq(e){return Sr(n=>{const t=e(n);return t?Cn(t).pipe(ye(()=>n)):zt(n)})}let DJ=(()=>{class e{buildTitle(t){let r,s=t.root;for(;void 0!==s;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(c=>c.outlet===wi);return r}getResolvedTitleForRoute(t){return t.data[GL]}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(zse),providedIn:"root"})}return e})(),zse=(()=>{class e extends DJ{constructor(t){super(),this.title=t}updateTitle(t){const r=this.buildTitle(t);void 0!==r&&this.title.setTitle(r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(CP))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const a2=new $e("",{providedIn:"root",factory:()=>({})}),l2=new $e("");let Qq=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Xe(nF)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return zt(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const r=S1(t.loadComponent()).pipe(ye(MJ),Do(c=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=c}),nd(()=>{this.componentLoaders.delete(t)})),s=new zQ(r,()=>new It).pipe(Aq());return this.componentLoaders.set(t,s),s}loadChildren(t,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return zt({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);const c=function Vse(e,n,t,r){return S1(e.loadChildren()).pipe(ye(MJ),Wr(s=>s instanceof vn||Array.isArray(s)?zt(s):Cn(n.compileModuleAsync(s))),ye(s=>{r&&r(e);let c,h,y=!1;return Array.isArray(s)?(h=s,!0):(c=s.create(t).injector,h=c.get(l2,[],{optional:!0,self:!0}).flat()),{routes:h.map(qq),injector:c}}))}(r,this.compiler,t,this.onLoadEndListener).pipe(nd(()=>{this.childrenLoaders.delete(r)})),h=new zQ(c,()=>new It).pipe(Aq());return this.childrenLoaders.set(r,h),h}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function MJ(e){return function jse(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let Jq=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Use),providedIn:"root"})}return e})(),Use=(()=>{class e{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,r){return t}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const AJ=new $e(""),TJ=new $e("");function Hse(e,n,t){const r=e.get(TJ),s=e.get(mi);return e.get(Bt).runOutsideAngular(()=>{if(!s.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,Promise.resolve();let c;const h=new Promise(M=>{c=M}),y=s.startViewTransition(()=>(c(),function Wse(e){return new Promise(n=>{bb(n,{injector:e})})}(e))),{onViewTransitionCreated:E}=r;return E&&Od(e,()=>E({transition:y,from:n,to:t})),h})}let L4=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new It,this.transitionAbortSubject=new It,this.configLoader=Xe(Qq),this.environmentInjector=Xe(xo),this.urlSerializer=Xe(QO),this.rootContexts=Xe(JL),this.location=Xe(mm),this.inputBindingEnabled=null!==Xe(R4,{optional:!0}),this.titleStrategy=Xe(DJ),this.options=Xe(a2,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=Xe(Jq),this.createViewTransition=Xe(AJ,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>zt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new Ioe(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new koe(s))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const r=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:r})}setupNavigations(t,r,s){return this.transitions=new wr({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:QL,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ii(c=>0!==c.id),ye(c=>({...c,extractedUrl:this.urlHandlingStrategy.extract(c.rawUrl)})),Sr(c=>{this.currentTransition=c;let h=!1,y=!1;return zt(c).pipe(Do(E=>{this.currentNavigation={id:E.id,initialUrl:E.rawUrl,extractedUrl:E.extractedUrl,trigger:E.source,extras:E.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Sr(E=>{const M=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!M&&"reload"!==(E.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const $="";return this.events.next(new e2(E.id,this.urlSerializer.serialize(E.rawUrl),$,I4.IgnoredSameUrlNavigation)),E.resolve(null),Hl}if(this.urlHandlingStrategy.shouldProcessUrl(E.rawUrl))return zt(E).pipe(Sr($=>{const j=this.transitions?.getValue();return this.events.next(new JD($.id,this.urlSerializer.serialize($.extractedUrl),$.source,$.restoredState)),j!==this.transitions?.getValue()?Hl:Promise.resolve($)}),function Fse(e,n,t,r,s,c){return Wr(h=>function Ase(e,n,t,r,s,c,h="emptyOnly"){return new kse(e,n,t,r,s,h,c).recognize()}(e,n,t,r,h.extractedUrl,s,c).pipe(ye(({state:y,tree:E})=>({...h,targetSnapshot:y,urlAfterRedirects:E}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),Do($=>{c.targetSnapshot=$.targetSnapshot,c.urlAfterRedirects=$.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:$.urlAfterRedirects};const j=new O4($.id,this.urlSerializer.serialize($.extractedUrl),this.urlSerializer.serialize($.urlAfterRedirects),$.targetSnapshot);this.events.next(j)}));if(M&&this.urlHandlingStrategy.shouldProcessUrl(E.currentRawUrl)){const{id:$,extractedUrl:j,source:X,restoredState:K,extras:ie}=E,me=new JD($,this.urlSerializer.serialize(j),X,K);this.events.next(me);const Me=uJ(this.rootComponentType).snapshot;return this.currentTransition=c={...E,targetSnapshot:Me,urlAfterRedirects:j,extras:{...ie,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=j,zt(c)}{const $="";return this.events.next(new e2(E.id,this.urlSerializer.serialize(E.extractedUrl),$,I4.IgnoredByUrlHandlingStrategy)),E.resolve(null),Hl}}),Do(E=>{const M=new Moe(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(M)}),ye(E=>(this.currentTransition=c={...E,guards:Koe(E.targetSnapshot,E.currentSnapshot,this.rootContexts)},c)),function sse(e,n){return Wr(t=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:c,canDeactivateChecks:h}}=t;return 0===h.length&&0===c.length?zt({...t,guardsResult:!0}):function ase(e,n,t,r){return Cn(e).pipe(Wr(s=>function hse(e,n,t,r,s){const c=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return c&&0!==c.length?zt(c.map(y=>{const E=t$(n)??s,M=r2(y,E);return S1(function rse(e){return e&&r$(e.canDeactivate)}(M)?M.canDeactivate(e,n,t,r):Od(E,()=>M(e,n,t,r))).pipe(Ie())})).pipe(o2()):zt(!0)}(s.component,s.route,t,n,r)),Ie(s=>!0!==s,!0))}(h,r,s,e).pipe(Wr(y=>y&&function ese(e){return"boolean"==typeof e}(y)?function lse(e,n,t,r){return Cn(n).pipe(lu(s=>AD(function use(e,n){return null!==e&&n&&n(new Ooe(e)),zt(!0)}(s.route.parent,r),function cse(e,n){return null!==e&&n&&n(new Noe(e)),zt(!0)}(s.route,r),function fse(e,n,t){const r=n[n.length-1],c=n.slice(0,n.length-1).reverse().map(h=>function Zoe(e){const n=e.routeConfig?e.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:e,guards:n}:null}(h)).filter(h=>null!==h).map(h=>qL(()=>zt(h.guards.map(E=>{const M=t$(h.node)??t,R=r2(E,M);return S1(function ise(e){return e&&r$(e.canActivateChild)}(R)?R.canActivateChild(r,e):Od(M,()=>R(r,e))).pipe(Ie())})).pipe(o2())));return zt(c).pipe(o2())}(e,s.path,t),function dse(e,n,t){const r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||0===r.length)return zt(!0);const s=r.map(c=>qL(()=>{const h=t$(n)??t,y=r2(c,h);return S1(function nse(e){return e&&r$(e.canActivate)}(y)?y.canActivate(n,e):Od(h,()=>y(n,e))).pipe(Ie())}));return zt(s).pipe(o2())}(e,s.route,t))),Ie(s=>!0!==s,!0))}(r,c,e,n):zt(y)),ye(y=>({...t,guardsResult:y})))})}(this.environmentInjector,E=>this.events.next(E)),Do(E=>{if(c.guardsResult=E.guardsResult,JO(E.guardsResult))throw gJ(0,E.guardsResult);const M=new Aoe(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot,!!E.guardsResult);this.events.next(M)}),ii(E=>!!E.guardsResult||(this.cancelNavigationTransition(E,"",Lh.GuardRejected),!1)),Zq(E=>{if(E.guards.canActivateChecks.length)return zt(E).pipe(Do(M=>{const R=new Toe(M.id,this.urlSerializer.serialize(M.extractedUrl),this.urlSerializer.serialize(M.urlAfterRedirects),M.targetSnapshot);this.events.next(R)}),Sr(M=>{let R=!1;return zt(M).pipe(function Pse(e,n){return Wr(t=>{const{targetSnapshot:r,guards:{canActivateChecks:s}}=t;if(!s.length)return zt(t);const c=new Set(s.map(E=>E.route)),h=new Set;for(const E of c)if(!h.has(E))for(const M of SJ(E))h.add(M);let y=0;return Cn(h).pipe(lu(E=>c.has(E)?function Lse(e,n,t,r){const s=e.routeConfig,c=e._resolve;return void 0!==s?.title&&!hJ(s)&&(c[GL]=s.title),function $se(e,n,t,r){const s=kq(e);if(0===s.length)return zt({});const c={};return Cn(s).pipe(Wr(h=>function Bse(e,n,t,r){const s=t$(n)??r,c=r2(e,s);return S1(c.resolve?c.resolve(n,t):Od(s,()=>c(n,t)))}(e[h],n,t,r).pipe(Ie(),Do(y=>{c[h]=y}))),Tq(1),R_(c),Sf(h=>xJ(h)?Hl:C1(h)))}(c,e,n,r).pipe(ye(h=>(e._resolvedData=h,e.data=zq(e,e.parent,t).resolve,null)))}(E,r,e,n):(E.data=zq(E,E.parent,e).resolve,zt(void 0))),Do(()=>y++),Tq(1),Wr(E=>y===h.size?zt(t):Hl))})}(this.paramsInheritanceStrategy,this.environmentInjector),Do({next:()=>R=!0,complete:()=>{R||this.cancelNavigationTransition(M,"",Lh.NoDataFromResolver)}}))}),Do(M=>{const R=new sJ(M.id,this.urlSerializer.serialize(M.extractedUrl),this.urlSerializer.serialize(M.urlAfterRedirects),M.targetSnapshot);this.events.next(R)}))}),Zq(E=>{const M=R=>{const $=[];R.routeConfig?.loadComponent&&!R.routeConfig._loadedComponent&&$.push(this.configLoader.loadComponent(R.routeConfig).pipe(Do(j=>{R.component=j}),ye(()=>{})));for(const j of R.children)$.push(...M(j));return $};return d1(M(E.targetSnapshot.root)).pipe(de(null),Bo(1))}),Zq(()=>this.afterPreactivation()),Sr(()=>{const{currentSnapshot:E,targetSnapshot:M}=c,R=this.createViewTransition?.(this.environmentInjector,E.root,M.root);return R?Cn(R).pipe(ye(()=>c)):zt(c)}),ye(E=>{const M=function Boe(e,n,t){const r=e$(e,n._root,t?t._root:void 0);return new cJ(r,n)}(t.routeReuseStrategy,E.targetSnapshot,E.currentRouterState);return this.currentTransition=c={...E,targetRouterState:M},this.currentNavigation.targetRouterState=M,c}),Do(()=>{this.events.next(new Pq)}),((e,n,t,r)=>ye(s=>(new Yoe(n,s.targetRouterState,s.currentRouterState,t,r).activate(e),s)))(this.rootContexts,t.routeReuseStrategy,E=>this.events.next(E),this.inputBindingEnabled),Bo(1),Do({next:E=>{h=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new $_(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects))),this.titleStrategy?.updateTitle(E.targetRouterState.snapshot),E.resolve(!0)},complete:()=>{h=!0}}),Kn(this.transitionAbortSubject.pipe(Do(E=>{throw E}))),nd(()=>{!h&&!y&&this.cancelNavigationTransition(c,"",Lh.SupersededByNewNavigation),this.currentNavigation?.id===c.id&&(this.currentNavigation=null)}),Sf(E=>{if(y=!0,yJ(E))this.events.next(new eM(c.id,this.urlSerializer.serialize(c.extractedUrl),E.message,E.cancellationCode)),function joe(e){return yJ(e)&&JO(e.url)}(E)?this.events.next(new Lq(E.url)):c.resolve(!1);else{this.events.next(new t2(c.id,this.urlSerializer.serialize(c.extractedUrl),E,c.targetSnapshot??void 0));try{c.resolve(t.errorHandler(E))}catch(M){this.options.resolveNavigationPromiseOnError?c.resolve(!1):c.reject(M)}}return Hl}))}))}cancelNavigationTransition(t,r,s){const c=new eM(t.id,this.urlSerializer.serialize(t.extractedUrl),r,s);this.events.next(c),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qse(e){return e!==QL}let Gse=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Yse),providedIn:"root"})}return e})();class Xse{shouldDetach(n){return!1}store(n,t){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,t){return n.routeConfig===t.routeConfig}}let Yse=(()=>{class e extends Xse{static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),kJ=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Kse),providedIn:"root"})}return e})(),Kse=(()=>{class e extends kJ{constructor(){super(...arguments),this.location=Xe(mm),this.urlSerializer=Xe(QO),this.options=Xe(a2,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=Xe(Jq),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new ZO,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=uJ(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(t){return this.location.subscribe(r=>{"popstate"===r.type&&t(r.url,r.state)})}handleRouterEvent(t,r){if(t instanceof JD)this.stateMemento=this.createStateMemento();else if(t instanceof e2)this.rawUrlTree=r.initialUrl;else if(t instanceof O4){if("eager"===this.urlUpdateStrategy&&!r.extras.skipLocationChange){const s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(s,r)}}else t instanceof Pq?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,"deferred"===this.urlUpdateStrategy&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):t instanceof eM&&(t.code===Lh.GuardRejected||t.code===Lh.NoDataFromResolver)?this.restoreHistory(r):t instanceof t2?this.restoreHistory(r,!0):t instanceof $_&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,r){const s=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){const h={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId)};this.location.replaceState(s,"",h)}else{const c={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId+1)};this.location.go(s,"",c)}}restoreHistory(t,r=!1){if("computed"===this.canceledNavigationResolution){const c=this.currentPageId-this.browserPageId;0!==c?this.location.historyGo(c):this.currentUrlTree===t.finalUrl&&0===c&&(this.resetState(t),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var o$=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(o$||{});function IJ(e,n){e.events.pipe(ii(t=>t instanceof $_||t instanceof eM||t instanceof t2||t instanceof e2),ye(t=>t instanceof $_||t instanceof e2?o$.COMPLETE:t instanceof eM&&(t.code===Lh.Redirect||t.code===Lh.SupersededByNewNavigation)?o$.REDIRECTING:o$.FAILED),ii(t=>t!==o$.REDIRECTING),Bo(1)).subscribe(()=>{n()})}function Zse(e){throw e}const Qse={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Jse={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let dd=(()=>{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.isNgZoneEnabled=!1,this.console=Xe(tF),this.stateManager=Xe(kJ),this.options=Xe(a2,{optional:!0})||{},this.pendingTasks=Xe(Fw),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=Xe(L4),this.urlSerializer=Xe(QO),this.location=Xe(mm),this.urlHandlingStrategy=Xe(Jq),this._events=new It,this.errorHandler=this.options.errorHandler||Zse,this.navigated=!1,this.routeReuseStrategy=Xe(Gse),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=Xe(l2,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!Xe(R4,{optional:!0}),this.eventsSubscription=new xn,this.isNgZoneEnabled=Xe(Bt)instanceof Bt&&Bt.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const t=this.navigationTransitions.events.subscribe(r=>{try{const s=this.navigationTransitions.currentTransition,c=this.navigationTransitions.currentNavigation;if(null!==s&&null!==c)if(this.stateManager.handleRouterEvent(r,c),r instanceof eM&&r.code!==Lh.Redirect&&r.code!==Lh.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof $_)this.navigated=!0;else if(r instanceof Lq){const h=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),y={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||qse(s.source)};this.scheduleNavigation(h,QL,null,y,{resolve:s.resolve,reject:s.reject,promise:s.promise})}(function tae(e){return!(e instanceof Pq||e instanceof Lq)})(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),QL,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(t,"popstate",r)},0)})}navigateToSyncWithBrowser(t,r,s){const c={replaceUrl:!0},h=s?.navigationId?s:null;if(s){const E={...s};delete E.navigationId,delete E.\u0275routerPageId,0!==Object.keys(E).length&&(c.state=E)}const y=this.parseUrl(t);this.scheduleNavigation(y,r,h,c)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(qq),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(t,r={}){const{relativeTo:s,queryParams:c,fragment:h,queryParamsHandling:y,preserveFragment:E}=r,M=E?this.currentUrlTree.fragment:h;let $,R=null;switch(y){case"merge":R={...this.currentUrlTree.queryParams,...c};break;case"preserve":R=this.currentUrlTree.queryParams;break;default:R=c||null}null!==R&&(R=this.removeEmptyProps(R));try{$=JQ(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof t[0]||!t[0].startsWith("/"))&&(t=[]),$=this.currentUrlTree.root}return eJ($,t,R,M??null)}navigateByUrl(t,r={skipLocationChange:!1}){const s=JO(t)?t:this.parseUrl(t),c=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(c,QL,null,r)}navigate(t,r={skipLocationChange:!1}){return function eae(e){for(let n=0;n(null!=c&&(r[s]=c),r),{})}scheduleNavigation(t,r,s,c,h){if(this.disposed)return Promise.resolve(!1);let y,E,M;h?(y=h.resolve,E=h.reject,M=h.promise):M=new Promise(($,j)=>{y=$,E=j});const R=this.pendingTasks.add();return IJ(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(R))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:c,resolve:y,reject:E,promise:M,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),M.catch($=>Promise.reject($))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$4=(()=>{class e{constructor(t,r,s,c,h,y){this.router=t,this.route=r,this.tabIndexAttribute=s,this.renderer=c,this.el=h,this.locationStrategy=y,this.href=null,this.commands=null,this.onChanges=new It,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const E=h.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===E||"area"===E,this.isAnchorElement?this.subscription=t.events.subscribe(M=>{M instanceof $_&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(t){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",t)}ngOnChanges(t){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(t){null!=t?(this.commands=Array.isArray(t)?t:[t],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(t,r,s,c,h){const y=this.urlTree;return!!(null===y||this.isAnchorElement&&(0!==t||r||s||c||h||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(y,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const t=this.urlTree;this.href=null!==t&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(t)):null;const r=null===this.href?null:function dc(e,n,t){return function rT(e,n){return"src"===n&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===n&&("base"===e||"link"===e)?Yy:jd}(n,t)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(t,r){const s=this.renderer,c=this.el.nativeElement;null!==r?s.setAttribute(c,t,r):s.removeAttribute(c,t)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(dd),ue(tM),Hc("tabindex"),ue(tl),ue(zn),ue(hf))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,s){1&r&&yn("click",function(h){return s.onClick(h.button,h.ctrlKey,h.shiftKey,h.altKey,h.metaKey)}),2&r&&hi("target",s.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[ht.HasDecoratorInputTransform,"preserveFragment","preserveFragment",cr],skipLocationChange:[ht.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",cr],replaceUrl:[ht.HasDecoratorInputTransform,"replaceUrl","replaceUrl",cr],routerLink:"routerLink"},standalone:!0,features:[Vs,vo]})}return e})(),OJ=(()=>{class e{get isActive(){return this._isActive}constructor(t,r,s,c,h){this.router=t,this.element=r,this.renderer=s,this.cdr=c,this.link=h,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new cn,this.routerEventsSubscription=t.events.subscribe(y=>{y instanceof $_&&this.update()})}ngAfterContentInit(){zt(this.links.changes,zt(null)).pipe(f1()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const t=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=Cn(t).pipe(f1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(t){const r=Array.isArray(t)?t:t.split(" ");this.classes=r.filter(s=>!!s)}ngOnChanges(t){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const t=this.hasActiveLinks();this._isActive!==t&&(this._isActive=t,this.cdr.markForCheck(),this.classes.forEach(r=>{t?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),t&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(t))})}isLinkActive(t){const r=function nae(e){return!!e.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>{const c=s.urlTree;return!!c&&t.isActive(c,r)}}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.links.some(t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(dd),ue(zn),ue(tl),ue(Qo),ue($4,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(r,s,c){if(1&r&&vs(c,$4,5),2&r){let h;zi(h=Pi())&&(s.links=h)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[vo]})}return e})();class RJ{}let iae=(()=>{class e{constructor(t,r,s,c,h){this.router=t,this.injector=s,this.preloadingStrategy=c,this.loader=h}setUpPreloading(){this.subscription=this.router.events.pipe(ii(t=>t instanceof $_),lu(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const s=[];for(const c of r){c.providers&&!c._injector&&(c._injector=fn(c.providers,t,`Route: ${c.path}`));const h=c._injector??t,y=c._loadedInjector??h;(c.loadChildren&&!c._loadedRoutes&&void 0===c.canLoad||c.loadComponent&&!c._loadedComponent)&&s.push(this.preloadConfig(h,c)),(c.children||c._loadedRoutes)&&s.push(this.processRoutes(y,c.children??c._loadedRoutes))}return Cn(s).pipe(f1())}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>{let s;s=r.loadChildren&&void 0===r.canLoad?this.loader.loadChildren(t,r):zt(null);const c=s.pipe(Wr(h=>null===h?zt(void 0):(r._loadedRoutes=h.routes,r._loadedInjector=h.injector,this.processRoutes(h.injector??t,h.routes))));return r.loadComponent&&!r._loadedComponent?Cn([c,this.loader.loadComponent(r)]).pipe(f1()):c})}static#e=this.\u0275fac=function(r){return new(r||e)(pe(dd),pe(nF),pe(xo),pe(RJ),pe(Qq))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const eG=new $e("");let NJ=(()=>{class e{constructor(t,r,s,c,h={}){this.urlSerializer=t,this.transitions=r,this.viewportScroller=s,this.zone=c,this.options=h,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},h.scrollPositionRestoration||="disabled",h.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(t=>{t instanceof JD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof $_?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof e2&&t.code===I4.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof aJ&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new aJ(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){Og()};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function z_(e,n){return{\u0275kind:e,\u0275providers:n}}function PJ(){const e=Xe(hr);return n=>{const t=e.get(Kb);if(n!==t.components[0])return;const r=e.get(dd),s=e.get(LJ);1===e.get(tG)&&r.initialNavigation(),e.get($J,null,fi.Optional)?.setUpPreloading(),e.get(eG,null,fi.Optional)?.init(),r.resetRootComponentType(t.componentTypes[0]),s.closed||(s.next(),s.complete(),s.unsubscribe())}}const LJ=new $e("",{factory:()=>new It}),tG=new $e("",{providedIn:"root",factory:()=>1}),$J=new $e("");function aae(e){return z_(0,[{provide:$J,useExisting:iae},{provide:RJ,useExisting:e}])}function cae(e){return z_(9,[{provide:AJ,useValue:Hse},{provide:TJ,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const BJ=new $e("ROUTER_FORROOT_GUARD"),uae=[mm,{provide:QO,useClass:Iq},dd,JL,{provide:tM,useFactory:function FJ(e){return e.routerState.root},deps:[dd]},Qq,[]];let mu=(()=>{class e{constructor(t){}static forRoot(t,r){return{ngModule:e,providers:[uae,[],{provide:l2,multi:!0,useValue:t},{provide:BJ,useFactory:pae,deps:[[dd,new ap,new pt]]},{provide:a2,useValue:r||{}},r?.useHash?{provide:hf,useClass:Kz}:{provide:hf,useClass:Yz},{provide:eG,useFactory:()=>{const e=Xe(m5),n=Xe(Bt),t=Xe(a2),r=Xe(L4),s=Xe(QO);return t.scrollOffset&&e.setOffset(t.scrollOffset),new NJ(s,r,e,n,t)}},r?.preloadingStrategy?aae(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?mae(r):[],r?.bindToComponentInputs?z_(8,[pJ,{provide:R4,useExisting:pJ}]).\u0275providers:[],r?.enableViewTransitions?cae().\u0275providers:[],[{provide:zJ,useFactory:PJ},{provide:$w,multi:!0,useExisting:zJ}]]}}static forChild(t){return{ngModule:e,providers:[{provide:l2,multi:!0,useValue:t}]}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BJ,8))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();function pae(e){return"guarded"}function mae(e){return["disabled"===e.initialNavigation?z_(3,[{provide:rI,multi:!0,useFactory:()=>{const n=Xe(dd);return()=>{n.setUpLocationChangeListener()}}},{provide:tG,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?z_(2,[{provide:tG,useValue:0},{provide:rI,multi:!0,deps:[hr],useFactory:n=>{const t=n.get(Gz,Promise.resolve());return()=>t.then(()=>new Promise(r=>{const s=n.get(dd),c=n.get(LJ);IJ(s,()=>{r(!0)}),n.get(L4).afterPreactivation=()=>(r(!0),c.closed?zt(void 0):c),s.initialNavigation()}))}}]).\u0275providers:[]]}const zJ=new $e("");class _ae{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(n=!1,t,r=!0,s){this._multiple=n,this._emitChanges=r,this.compareWith=s,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new It,t&&t.length&&(n?t.forEach(c=>this._markSelected(c)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(r=>this._markSelected(r));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...n){this._verifyValueAssignment(n),n.forEach(r=>this._unmarkSelected(r));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...n){this._verifyValueAssignment(n);const t=this.selected,r=new Set(n);n.forEach(c=>this._markSelected(c)),t.filter(c=>!r.has(this._getConcreteValue(c,r))).forEach(c=>this._unmarkSelected(c));const s=this._hasQueuedChanges();return this._emitChangeEvent(),s}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();const t=this._hasQueuedChanges();return n&&this._emitChangeEvent(),t}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(n,t){if(this.compareWith){t=t??this._selection;for(let r of t)if(this.compareWith(n,r))return r;return n}return n}}let VJ=(()=>{class e{constructor(){this._listeners=[]}notify(t,r){for(let s of this._listeners)s(t,r)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(r=>t!==r)}}ngOnDestroy(){this._listeners=[]}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yae=0;const nG=new $e("CdkAccordion");let bae=(()=>{class e{constructor(){this._stateChanges=new It,this._openCloseAllActions=new It,this.id="cdk-accordion-"+yae++,this.multi=!1}openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[ht.HasDecoratorInputTransform,"multi","multi",cr]},exportAs:["cdkAccordion"],standalone:!0,features:[ni([{provide:nG,useExisting:e}]),Vs,vo]})}return e})(),vae=0,xae=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,r,s){this.accordion=t,this._changeDetectorRef=r,this._expansionDispatcher=s,this._openCloseAllSubscription=xn.EMPTY,this.closed=new cn,this.opened=new cn,this.destroyed=new cn,this.expandedChange=new cn,this.id="cdk-accordion-child-"+vae++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=s.listen((c,h)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===h&&this.id!==c&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(nG,12),ue(Qo),ue(VJ))};static#t=this.\u0275dir=Vt({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[ht.HasDecoratorInputTransform,"expanded","expanded",cr],disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[ni([{provide:nG,useValue:void 0}]),Vs]})}return e})(),wae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();class iG{attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;null!=n&&(this._attachedHost=null,n.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(n){this._attachedHost=n}}class rG extends iG{constructor(n,t,r,s,c){super(),this.component=n,this.viewContainerRef=t,this.injector=r,this.componentFactoryResolver=s,this.projectableNodes=c}}class B4 extends iG{constructor(n,t,r,s){super(),this.templateRef=n,this.viewContainerRef=t,this.context=r,this.injector=s}get origin(){return this.templateRef.elementRef}attach(n,t=this.context){return this.context=t,super.attach(n)}detach(){return this.context=void 0,super.detach()}}class Eae extends iG{constructor(n){super(),this.element=n instanceof zn?n.nativeElement:n}}class oG{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(n){return n instanceof rG?(this._attachedPortal=n,this.attachComponentPortal(n)):n instanceof B4?(this._attachedPortal=n,this.attachTemplatePortal(n)):this.attachDomPortal&&n instanceof Eae?(this._attachedPortal=n,this.attachDomPortal(n)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Cae extends oG{constructor(n,t,r,s,c){super(),this.outletElement=n,this._componentFactoryResolver=t,this._appRef=r,this._defaultInjector=s,this.attachDomPortal=h=>{const y=h.element,E=this._document.createComment("dom-portal");y.parentNode.insertBefore(E,y),this.outletElement.appendChild(y),this._attachedPortal=h,super.setDisposeFn(()=>{E.parentNode&&E.parentNode.replaceChild(y,E)})},this._document=c}attachComponentPortal(n){const r=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let s;return n.viewContainerRef?(s=n.viewContainerRef.createComponent(r,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector,n.projectableNodes||void 0),this.setDisposeFn(()=>s.destroy())):(s=r.create(n.injector||this._defaultInjector||hr.NULL),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(s.hostView),s.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(s)),this._attachedPortal=n,s}attachTemplatePortal(n){let t=n.viewContainerRef,r=t.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return r.rootNodes.forEach(s=>this.outletElement.appendChild(s)),r.detectChanges(),this.setDisposeFn(()=>{let s=t.indexOf(r);-1!==s&&t.remove(s)}),this._attachedPortal=n,r}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}let z4=(()=>{class e extends oG{constructor(t,r,s){super(),this._componentFactoryResolver=t,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new cn,this.attachDomPortal=c=>{const h=c.element,y=this._document.createComment("dom-portal");c.setAttachedHost(this),h.parentNode.insertBefore(y,h),this._getRootNode().appendChild(h),this._attachedPortal=c,super.setDisposeFn(()=>{y.parentNode&&y.parentNode.replaceChild(h,y)})},this._document=s}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const r=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,c=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),h=r.createComponent(c,r.length,t.injector||r.injector,t.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(h.hostView.rootNodes[0]),super.setDisposeFn(()=>h.destroy()),this._attachedPortal=t,this._attachedRef=h,this.attached.emit(h),h}attachTemplatePortal(t){t.setAttachedHost(this);const r=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Ag),ue(Jo),ue(mi))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[ht.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[wn]})}return e})(),s$=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const Sae=["body"];function Dae(e,n){}const Mae=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Aae=["mat-expansion-panel-header","*","mat-action-row"];function Tae(e,n){1&e&&Wt(0,"span",2),2&e&&vt("@indicatorRotate",on()._getExpandedState())}const kae=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Iae=["mat-panel-title","mat-panel-description","*"],sG=new $e("MAT_ACCORDION"),jJ="225ms cubic-bezier(0.4,0.0,0.2,1)",UJ={indicatorRotate:A0("indicatorRotate",[Rh("collapsed, void",La({transform:"rotate(0deg)"})),Rh("expanded",La({transform:"rotate(180deg)"})),Nh("expanded <=> collapsed, void => collapsed",Om(jJ))]),bodyExpansion:A0("bodyExpansion",[Rh("collapsed, void",La({height:"0px",visibility:"hidden"})),Rh("expanded",La({height:"*",visibility:""})),Nh("expanded <=> collapsed, void => collapsed",Om(jJ))])},HJ=new $e("MAT_EXPANSION_PANEL");let Oae=(()=>{class e{constructor(t,r){this._template=t,this._expansionPanel=r}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Yu),ue(HJ,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}return e})(),Rae=0;const WJ=new $e("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let V4=(()=>{class e extends xae{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,r,s,c,h,y,E){super(t,r,s),this._viewContainerRef=c,this._animationMode=y,this._hideToggle=!1,this.afterExpand=new cn,this.afterCollapse=new cn,this._inputChanges=new It,this._headerId="mat-expansion-panel-header-"+Rae++,this._bodyAnimationDone=new It,this.accordion=t,this._document=h,this._bodyAnimationDone.pipe(Ih((M,R)=>M.fromState===R.fromState&&M.toState===R.toState)).subscribe(M=>{"void"!==M.fromState&&("expanded"===M.toState?this.afterExpand.emit():"collapsed"===M.toState&&this.afterCollapse.emit())}),E&&(this.hideToggle=E.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Wl(null),ii(()=>this.expanded&&!this._portal),Bo(1)).subscribe(()=>{this._portal=new B4(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,r=this._body.nativeElement;return t===r||r.contains(t)}return!1}static#e=this.\u0275fac=function(r){return new(r||e)(ue(sG,12),ue(Qo),ue(VJ),ue(Jo),ue(mi),ue(Ko,8),ue(WJ,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(r,s,c){if(1&r&&vs(c,Oae,5),2&r){let h;zi(h=Pi())&&(s._lazyContent=h.first)}},viewQuery:function(r,s){if(1&r&&ha(Sae,5),2&r){let c;zi(c=Pi())&&(s._body=c.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(r,s){2&r&&In("mat-expanded",s.expanded)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-expansion-panel-spacing",s._hasSpacing())},inputs:{hideToggle:[ht.HasDecoratorInputTransform,"hideToggle","hideToggle",cr],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[ni([{provide:sG,useValue:void 0},{provide:HJ,useExisting:e}]),Vs,wn,vo,xi],ngContentSelectors:Aae,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(r,s){1&r&&(Ra(Mae),ki(0),Ae(1,"div",0,1),yn("@bodyExpansion.done",function(h){return s._bodyAnimationDone.next(h)}),Ae(3,"div",2),ki(4,1),en(5,Dae,0,0,"ng-template",3),ke(),ki(6,2),ke()),2&r&&(Ze(),vt("@bodyExpansion",s._getExpandedState())("id",s.id),hi("aria-labelledby",s._headerId),Ze(4),vt("cdkPortalOutlet",s._portal))},dependencies:[z4],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color);color:var(--mat-expansion-container-text-color);border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font);font-size:var(--mat-expansion-container-text-size);font-weight:var(--mat-expansion-container-text-weight);line-height:var(--mat-expansion-container-text-line-height);letter-spacing:var(--mat-expansion-container-text-tracking)}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color)}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[UJ.bodyExpansion]},changeDetection:0})}return e})(),j4=(()=>{class e{constructor(t,r,s,c,h,y,E){this.panel=t,this._element=r,this._focusMonitor=s,this._changeDetectorRef=c,this._animationMode=y,this._parentChangeSubscription=xn.EMPTY,this.tabIndex=0;const M=t.accordion?t.accordion._stateChanges.pipe(ii(R=>!(!R.hideToggle&&!R.togglePosition))):Hl;this.tabIndex=parseInt(E||"")||0,this._parentChangeSubscription=Oh(t.opened,t.closed,M,t._inputChanges.pipe(ii(R=>!!(R.hideToggle||R.disabled||R.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(ii(()=>t._containsFocus())).subscribe(()=>s.focusVia(r,"program")),h&&(this.expandedHeight=h.expandedHeight,this.collapsedHeight=h.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:kh(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,r){t?this._focusMonitor.focusVia(this._element,t,r):this._element.nativeElement.focus(r)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(V4,1),ue(zn),ue(k_),ue(Qo),ue(WJ,8),ue(Ko,8),Hc("tabindex"))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(r,s){1&r&&yn("click",function(){return s._toggle()})("keydown",function(h){return s._keydown(h)}),2&r&&(hi("id",s.panel._headerId)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s._getPanelId())("aria-expanded",s._isExpanded())("aria-disabled",s.panel.disabled),_h("height",s._getHeaderHeight()),In("mat-expanded",s._isExpanded())("mat-expansion-toggle-indicator-after","after"===s._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===s._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===s._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[ht.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jw(t)]},standalone:!0,features:[Vs,xi],ngContentSelectors:Iae,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator"],[1,"mat-expansion-indicator"]],template:function(r,s){1&r&&(Ra(kae),Ae(0,"span",0),ki(1),ki(2,1),ki(3,2),ke(),en(4,Tae,1,1,"span",1)),2&r&&(In("mat-content-hide-toggle",!s._showToggle()),Ze(4),eo(4,s._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font);font-size:var(--mat-expansion-header-text-size);font-weight:var(--mat-expansion-header-text-weight);line-height:var(--mat-expansion-header-text-line-height);letter-spacing:var(--mat-expansion-header-text-tracking)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color)}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color)}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[UJ.indicatorRotate]},changeDetection:0})}return e})(),aG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}return e})(),lG=(()=>{class e extends bae{constructor(){super(...arguments),this._ownHeaders=new Xb,this.hideToggle=!1,this.displayMode="default",this.togglePosition="after"}ngAfterContentInit(){this._headers.changes.pipe(Wl(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(r=>r.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new L9(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-accordion"]],contentQueries:function(r,s,c){if(1&r&&vs(c,j4,5),2&r){let h;zi(h=Pi())&&(s._headers=h)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-accordion-multi",s.multi)},inputs:{hideToggle:[ht.HasDecoratorInputTransform,"hideToggle","hideToggle",cr],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],standalone:!0,features:[ni([{provide:sG,useExisting:e}]),Vs,wn]})}return e})(),cG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,wae,s$]})}return e})();const Nae=[{path:"",component:(()=>{class e{constructor(){this.clsName="agc-about"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-about"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:25,vars:0,consts:[[1,"header"],[1,"content"],["src","assets/pages/about/index.md",1,"index"],["multi","",1,"panels"],["src","assets/pages/about/helping.md"],["src","assets/pages/about/data.md"],["src","assets/pages/about/connect.md"],["src","assets/pages/about/credits.md"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"ADDICTIONS DATA ANALYSES AND VISUALIZATIONS"),ke(),Ae(2,"div",1),Wt(3,"markdown",2),Ae(4,"mat-accordion",3)(5,"mat-expansion-panel")(6,"mat-expansion-panel-header")(7,"mat-panel-title"),wt(8,"HOW WE'RE HELPING"),ke()(),Wt(9,"markdown",4),ke(),Ae(10,"mat-expansion-panel")(11,"mat-expansion-panel-header")(12,"mat-panel-title"),wt(13,"THE DATA"),ke()(),Wt(14,"markdown",5),ke(),Ae(15,"mat-expansion-panel")(16,"mat-expansion-panel-header")(17,"mat-panel-title"),wt(18,"CONNECT WITH US"),ke()(),Wt(19,"markdown",6),ke(),Ae(20,"mat-expansion-panel")(21,"mat-expansion-panel-header")(22,"mat-panel-title"),wt(23,"CREDITS"),ke()(),Wt(24,"markdown",7),ke()()())},dependencies:[lG,V4,j4,aG,HL],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] markdown[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{padding-bottom:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:700}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] markdown[_ngcontent-%COMP%]{padding:1rem .5rem 0}"],changeDetection:0})}return e})()}];let Fae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Nae),mu]})}return e})(),Pae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,cG,WL,Fae]})}return e})();const Lae=[{path:"",component:(()=>{class e{constructor(){this.clsName="change-log"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-change-log"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:4,vars:0,consts:[[1,"header"],[1,"content"],["src","assets/generated/CHANGELOG.md"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),Wt(3,"markdown",2),ke())},dependencies:[HL],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}"],changeDetection:0})}return e})()}];let $ae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Lae),mu]})}return e})(),Bae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,$ae,WL.forChild()]})}return e})();const zae=[{path:"",component:(()=>{class e{constructor(){this.clsName="data-er-diagram"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-er-diagram"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:7,vars:0,consts:[[1,"header"],[1,"title"],[1,"description"],["title","Data ER Diagram","src","assets/schema/relationships.html",1,"schema-frame"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),wt(3,"Data ER Diagram"),ke(),Ae(4,"div",2),wt(5,"Entity-relationship diagram of all data tables and columns in the database"),ke(),Wt(6,"iframe",3))},styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .schema-frame[_ngcontent-%COMP%]{margin-top:2rem;width:100%;height:100vh}"],changeDetection:0})}return e})()}];let Vae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(zae),mu]})}return e})(),jae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vae]})}return e})();const Uae=[{path:"",component:(()=>{class e{constructor(){this.clsName="data-schema-browser"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-schema-browser"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:7,vars:0,consts:[[1,"header"],[1,"title"],[1,"description"],["title","A2AGC Database Schema","src","assets/schema/index.html",1,"schema-frame"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),wt(3,"Data Schema Browser"),ke(),Ae(4,"div",2),wt(5,"Browse the A2AGC Database Schema"),ke(),Wt(6,"iframe",3))},styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .schema-frame[_ngcontent-%COMP%]{margin-top:2rem;width:100%;height:100vh}"],changeDetection:0})}return e})()}];let Hae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Uae),mu]})}return e})(),Wae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Hae]})}return e})();function a$(...e){const n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return ye(t=>{let r=t;for(let s=0;s"u"}function Tc(e){return!ql(e)}function uG(e){return!!e}function KJ(e){return ql(e)?e:JSON.parse(JSON.stringify(e))}function ZJ(e){return Tc(e)&&"object"==typeof e&&function dG(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)}let eee=(()=>{class e{constructor(){this.bootstrap$=new J(1)}get appBootstrapped$(){return this.bootstrap$.asObservable()}bootstrap(){this.bootstrap$.next(!0),this.bootstrap$.complete()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function _le(e,n){return e===n}function fG(e,n=_le){let t=null,r=null;function s(){return function yle(e,n,t){if(null===n||null===t||n.length!==t.length)return!1;const r=n.length;for(let s=0;s{class e{static set(t){this._value=t}static pop(){const t=this._value;return this._value={},t}}return e._value={},e})();const tee=new $e("INITIAL_STATE_TOKEN",{providedIn:"root",factory:()=>ble.pop()}),nee=new $e("\u0275NGXS_STATE_FACTORY"),iee=new $e("\u0275NGXS_STATE_CONTEXT_FACTORY");function c$(...e){const n=P5(e),{args:t,keys:r}=YV(e),s=new Qn(c=>{const{length:h}=t;if(!h)return void c.complete();const y=new Array(h);let E=h,M=h;for(let R=0;R{$||($=!0,M--),y[R]=j},()=>E--,void 0,()=>{(!E||!$)&&(M||c.next(r?KV(r,y):y),c.complete())}))}});return n?s.pipe(iO(n)):s}function ree(e,n){return n?t=>t.pipe(ree((r,s)=>Gs(e(r,s)).pipe(ye((c,h)=>n(r,c,s,h))))):be((t,r)=>{let s=0,c=null,h=!1;t.subscribe(Se(r,y=>{c||(c=Se(r,void 0,()=>{c=null,h&&r.complete()}),Gs(e(y,s++)).subscribe(c))},()=>{h=!0,!c&&r.complete()}))})}function nM(e){return e.constructor&&e.constructor.type?e.constructor.type:e.type}const pG=(e,n,t)=>{e=Object.assign({},e);const r=n.split("."),s=r.length-1;return r.reduce((c,h,y)=>(c[h]=y===s?t:Array.isArray(c[h])?c[h].slice():Object.assign({},c[h]),c&&c[h]),e),e},u$=(e,n)=>n.split(".").reduce((t,r)=>t&&t[r],e),mG=e=>e&&"object"==typeof e&&!Array.isArray(e),gG=(e,...n)=>{if(!n.length)return e;const t=n.shift();if(mG(e)&&mG(t))for(const r in t)mG(t[r])?(e[r]||Object.assign(e,{[r]:{}}),gG(e[r],t[r])):Object.assign(e,{[r]:t[r]});return gG(e,...n)};let cee=(()=>{class e{constructor(t,r){this._ngZone=t,this._platformId=r}enter(t){return qS(this._platformId)?this.runInsideAngular(t):this.runOutsideAngular(t)}leave(t){return this.runInsideAngular(t)}runInsideAngular(t){return Bt.isInAngularZone()?t():this._ngZone.run(t)}runOutsideAngular(t){return Bt.isInAngularZone()?this._ngZone.runOutsideAngular(t):t()}}return e.\u0275fac=function(t){return new(t||e)(pe(Bt),pe(ps))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const uee=new $e("ROOT_OPTIONS"),dee=new $e("ROOT_STATE_TOKEN"),fee=new $e("FEATURE_STATE_TOKEN"),_G=new $e("NGXS_PLUGINS"),V0="NGXS_META",hee="NGXS_OPTIONS_META",yG="NGXS_SELECTOR_META";let X4=(()=>{class e{constructor(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=cee}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:function(t){let r=null;return t?r=new t:(s=pe(uee),r=gG(new e,s)),r;var s},providedIn:"root"}),e})();class kle{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}}let Ile=(()=>{class e{enter(t){return t()}leave(t){return t()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const pee=new $e("USER_PROVIDED_NGXS_EXECUTION_STRATEGY"),Ole=new $e("NGXS_EXECUTION_STRATEGY",{providedIn:"root",factory:()=>{const e=Xe(gE),n=e.get(pee);return e.get(n||(typeof Ai.Zone<"u"?cee:Ile))}});function bG(e){if(!e.hasOwnProperty(V0)){const n={name:null,actions:{},defaults:{},path:null,makeRootSelector:t=>t.getStateGetter(n.name),children:[]};Object.defineProperty(e,V0,{value:n})}return iM(e)}function iM(e){return e[V0]}function vG(e){return e.hasOwnProperty(yG)||Object.defineProperty(e,yG,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:()=>({})}}),Y4(e)}function Y4(e){return e[yG]}function zle(...e){return u2(e,["DISPATCHED"])}function u2(e,n,t=Hle){const r=function Wle(e){return e.reduce((n,t)=>(n[nM(t)]=!0,n),{})}(e),s=n&&function qle(e){return e.reduce((n,t)=>(n[t]=!0,n),{})}(n);return function(c){return c.pipe(function jle(e,n){return ii(t=>{const r=nM(t.action);return e[r]&&(!n||n[t.status])})}(r,s),t())}}function Ule(){return ye(({action:e,status:n,error:t})=>({action:e,result:{successful:"SUCCESSFUL"===n,canceled:"CANCELED"===n,error:t}}))}function Hle(){return ye(e=>e.action)}function d$(e){return n=>new Qn(t=>n.subscribe({next(r){e.leave(()=>t.next(r))},error(r){e.leave(()=>t.error(r))},complete(){e.leave(()=>t.complete())}}))}let xG=(()=>{class e{constructor(t){this._executionStrategy=t}enter(t){return this._executionStrategy.enter(t)}leave(t){return this._executionStrategy.leave(t)}}return e.\u0275fac=function(t){return new(t||e)(pe(Ole))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function gee(e){const n=[];let t=!1;return function(...s){if(t)n.unshift(s);else{for(t=!0,e(...s);n.length>0;){const c=n.pop();c&&e(...c)}t=!1}}}class Gle extends It{constructor(){super(...arguments),this._orderedNext=gee(n=>super.next(n))}next(n){this._orderedNext(n)}}class Xle extends wr{constructor(n){super(n),this._orderedNext=gee(t=>super.next(t)),this._currentValue=n}getValue(){return this._currentValue}next(n){this._currentValue=n,this._orderedNext(n)}}let wG=(()=>{class e extends Gle{ngOnDestroy(){this.complete()}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Yle=(()=>{class e extends Qn{constructor(t,r){const s=t.pipe(d$(r),oe());super(c=>{const h=s.subscribe({next:y=>c.next(y),error:y=>c.error(y),complete:()=>c.complete()});c.add(h)})}}return e.\u0275fac=function(t){return new(t||e)(pe(wG),pe(xG))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const _ee=e=>(...n)=>e.shift()(...n,(...r)=>_ee(e)(...r));let yee=(()=>{class e{constructor(t){this._injector=t,this._errorHandler=null}reportErrorSafely(t){null===this._errorHandler&&(this._errorHandler=this._injector.get(nl));try{this._errorHandler.handleError(t)}catch{}}}return e.\u0275fac=function(t){return new(t||e)(pe(hr))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),EG=(()=>{class e extends Xle{constructor(){super({})}ngOnDestroy(){this.complete()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),CG=(()=>{class e{constructor(t,r){this._parentManager=t,this._pluginHandlers=r,this.plugins=[],this.registerHandlers()}get rootPlugins(){return this._parentManager&&this._parentManager.plugins||this.plugins}registerHandlers(){const t=this.getPluginHandlers();this.rootPlugins.push(...t)}getPluginHandlers(){return(this._pluginHandlers||[]).map(r=>r.handle?r.handle.bind(r):r)}}return e.\u0275fac=function(t){return new(t||e)(pe(e,12),pe(_G,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})(),bee=(()=>{class e extends It{}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Zle=(()=>{class e{constructor(t,r,s,c,h,y){this._actions=t,this._actionResults=r,this._pluginManager=s,this._stateStream=c,this._ngxsExecutionStrategy=h,this._internalErrorReporter=y}dispatch(t){return this._ngxsExecutionStrategy.enter(()=>this.dispatchByEvents(t)).pipe(function Kle(e,n){return t=>{let r=!1;return t.subscribe({error:s=>{n.enter(()=>Promise.resolve().then(()=>{r||n.leave(()=>e.reportErrorSafely(s))}))}}),new Qn(s=>(r=!0,t.pipe(d$(n)).subscribe(s)))}}(this._internalErrorReporter,this._ngxsExecutionStrategy))}dispatchByEvents(t){return Array.isArray(t)?0===t.length?zt(this._stateStream.getValue()):c$(t.map(r=>this.dispatchSingle(r))):this.dispatchSingle(t)}dispatchSingle(t){const r=this._stateStream.getValue();return _ee([...this._pluginManager.plugins,(c,h)=>{c!==r&&this._stateStream.next(c);const y=this.getActionResultStream(h);return y.subscribe(E=>this._actions.next(E)),this._actions.next({action:h,status:"DISPATCHED"}),this.createDispatchObservable(y)}])(r,t).pipe(ne())}getActionResultStream(t){return this._actionResults.pipe(ii(r=>r.action===t&&"DISPATCHED"!==r.status),Bo(1),ne())}createDispatchObservable(t){return t.pipe(ree(r=>{switch(r.status){case"SUCCESSFUL":return zt(this._stateStream.getValue());case"ERRORED":return C1(r.error);default:return Hl}})).pipe(ne())}}return e.\u0275fac=function(t){return new(t||e)(pe(wG),pe(bee),pe(CG),pe(EG),pe(xG),pe(yee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),f$=(()=>{class e{constructor(t,r,s){this._stateStream=t,this._dispatcher=r,this._config=s}getRootStateOperations(){return{getState:()=>this._stateStream.getValue(),setState:r=>this._stateStream.next(r),dispatch:r=>this._dispatcher.dispatch(r)}}setStateToTheCurrentWithNew(t){const r=this.getRootStateOperations(),s=r.getState();r.setState(Object.assign(Object.assign({},s),t.defaults))}}return e.\u0275fac=function(t){return new(t||e)(pe(EG),pe(Zle),pe(X4))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),SG=(()=>{class e{constructor(t){this._internalStateOperations=t}createStateContext(t){const r=this._internalStateOperations.getRootStateOperations();return{getState:()=>Eee(r.getState(),t.path),patchState(s){const c=r.getState(),h=function Qle(e){return n=>{const t=Object.assign({},n);for(const r in e)t[r]=e[r];return t}}(s);return wee(r,c,h,t.path)},setState(s){const c=r.getState();return function G4(e){return"function"==typeof e}(s)?wee(r,c,s,t.path):xee(r,c,s,t.path)},dispatch:s=>r.dispatch(s)}}}return e.\u0275fac=function(t){return new(t||e)(pe(f$))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function xee(e,n,t,r){const s=pG(n,r,t);return e.setState(s),s}function wee(e,n,t,r){return xee(e,n,t(Eee(n,r)),r)}function Eee(e,n){return u$(e,n)}new RegExp("^[a-zA-Z0-9_]+$");let DG=(()=>{class e{}return e.type="@@INIT",e})(),MG=(()=>{class e{constructor(t){this.addedStates=t}}return e.type="@@UPDATE_STATE",e})();new $e("NGXS_DEVELOPMENT_OPTIONS",{providedIn:"root",factory:()=>({warnOnUnhandledActions:!0})});let d2=(()=>{class e{constructor(t,r,s,c,h,y,E){this._injector=t,this._config=r,this._parentFactory=s,this._actions=c,this._actionResults=h,this._stateContextFactory=y,this._initialState=E,this._actionsSubscription=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=fG(()=>{const M=this;function R(j){const X=M.statePaths[j];return X?function mee(e,n){return n&&n.compatibility&&n.compatibility.strictContentSecurityPolicy?function Rle(e){const n=e.slice();return t=>n.reduce((r,s)=>r&&r[s],t)}(e):function Nle(e){const n=e;let t="store."+n[0],r=0;const s=n.length;let c=t;for(;++r(X||(X=R(j)),X?X(...K):void 0))},getSelectorOptions:j=>Object.assign(Object.assign({},M._config.selectorOptions),j||{})}})}get states(){return this._parentFactory?this._parentFactory.states:this._states}get statesByName(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName}get statePaths(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths}static _cloneDefaults(t){let r=t;return Array.isArray(t)?r=t.slice():function Ble(e){return"object"==typeof e&&null!==e||"function"==typeof e}(t)?r=Object.assign({},t):void 0===t&&(r={}),r}ngOnDestroy(){var t;null===(t=this._actionsSubscription)||void 0===t||t.unsubscribe()}add(t){const{newStates:r}=this.addToStatesMap(t);if(!r.length)return[];const s=function Fle(e){const n=t=>e.find(s=>s===t)[V0].name;return e.reduce((t,r)=>{const{name:s,children:c}=r[V0];return t[s]=(c||[]).map(n),t},{})}(r),c=function $le(e){const n=[],t={},r=(s,c=[])=>{Array.isArray(c)||(c=[]),c.push(s),t[s]=!0,e[s].forEach(h=>{t[h]||r(h,c.slice(0))}),n.indexOf(s)<0&&n.push(s)};return Object.keys(e).forEach(s=>r(s)),n.reverse()}(s),h=function Lle(e,n={}){const t=(r,s)=>{for(const c in r)if(r.hasOwnProperty(c)&&r[c].indexOf(s)>=0){const h=t(r,c);return null!==h?`${h}.${c}`:c}return null};for(const r in e)if(e.hasOwnProperty(r)){const s=t(e,r);n[r]=s?`${s}.${r}`:r}return n}(s),y=function Ple(e){return e.reduce((n,t)=>(n[t[V0].name]=t,n),{})}(r),E=[];for(const M of c){const R=y[M],$=h[M],j=R[V0];this.addRuntimeInfoToMeta(j,$);const X={name:M,path:$,isInitialised:!1,actions:j.actions,instance:this._injector.get(R),defaults:e._cloneDefaults(j.defaults)};this.hasBeenMountedAndBootstrapped(M,$)||E.push(X),this.states.push(X)}return E}addAndReturnDefaults(t){const s=this.add(t||[]);return{defaults:s.reduce((h,y)=>pG(h,y.path,y.defaults),{}),states:s}}connectActionHandlers(){if(this._parentFactory||null!==this._actionsSubscription)return;const t=new It;this._actionsSubscription=this._actions.pipe(ii(r=>"DISPATCHED"===r.status),Wr(r=>{t.next(r);const s=r.action;return this.invokeActions(t,s).pipe(ye(()=>({action:s,status:"SUCCESSFUL"})),de({action:s,status:"CANCELED"}),Sf(c=>zt({action:s,status:"ERRORED",error:c})))})).subscribe(r=>this._actionResults.next(r))}invokeActions(t,r){const s=nM(r),c=[];let h=!1;for(const y of this.states){const E=y.actions[s];if(E)for(const M of E){const R=this._stateContextFactory.createStateContext(y);try{let $=y.instance[M.fn](R,r);$ instanceof Promise&&($=Cn($)),YO($)?($=$.pipe(Wr(j=>j instanceof Promise?Cn(j):YO(j)?j:zt(j)),de({})),M.options.cancelUncompleted&&($=$.pipe(Kn(t.pipe(zle(r)))))):$=zt({}).pipe(ne()),c.push($)}catch($){c.push(C1($))}h=!0}}return c.length||c.push(zt({})),c$(c)}addToStatesMap(t){const r=[],s=this.statesByName;for(const c of t){const h=iM(c).name;!s[h]&&(r.push(c),s[h]=c)}return{newStates:r}}addRuntimeInfoToMeta(t,r){this.statePaths[t.name]=r,t.path=r}hasBeenMountedAndBootstrapped(t,r){const s=void 0!==u$(this._initialState,r);return this.statesByName[t]&&s}}return e.\u0275fac=function(t){return new(t||e)(pe(hr),pe(X4),pe(e,12),pe(wG),pe(bee),pe(SG),pe(tee,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();function Cee(e){const n=Y4(e)||iM(e);return n&&n.makeRootSelector||(()=>e)}let j0=(()=>{class e{constructor(t,r,s,c,h,y){this._stateStream=t,this._internalStateOperations=r,this._config=s,this._internalExecutionStrategy=c,this._stateFactory=h,this._selectableStateStream=this._stateStream.pipe(d$(this._internalExecutionStrategy),ne({bufferSize:1,refCount:!0})),this.initStateStream(y)}dispatch(t){return this._internalStateOperations.getRootStateOperations().dispatch(t)}select(t){const r=this.getStoreBoundSelectorFn(t);return this._selectableStateStream.pipe(ye(r),Sf(s=>{const{suppressErrors:c}=this._config.selectorOptions;return s instanceof TypeError&&c?zt(void 0):C1(s)}),Ih(),d$(this._internalExecutionStrategy))}selectOnce(t){return this.select(t).pipe(Bo(1))}selectSnapshot(t){return this.getStoreBoundSelectorFn(t)(this._stateStream.getValue())}subscribe(t){return this._selectableStateStream.pipe(d$(this._internalExecutionStrategy)).subscribe(t)}snapshot(){return this._internalStateOperations.getRootStateOperations().getState()}reset(t){return this._internalStateOperations.getRootStateOperations().setState(t)}getStoreBoundSelectorFn(t){return Cee(t)(this._stateFactory.getRuntimeSelectorContext())}initStateStream(t){const r=this._stateStream.value;if(!r||0===Object.keys(r).length){const h=Object.keys(this._config.defaultsState).length>0?Object.assign(Object.assign({},this._config.defaultsState),t):t;this._stateStream.next(h)}}}return e.\u0275fac=function(t){return new(t||e)(pe(EG),pe(f$),pe(X4),pe(xG),pe(d2),pe(tee,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Z4=(()=>{class e{constructor(t,r){e.store=t,e.config=r}ngOnDestroy(){e.store=null,e.config=null}}return e.store=null,e.config=null,e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(X4))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),See=(()=>{class e{constructor(t,r,s,c,h){this._store=t,this._internalErrorReporter=r,this._internalStateOperations=s,this._stateContextFactory=c,this._bootstrapper=h,this._destroy$=new It}ngOnDestroy(){this._destroy$.next()}ngxsBootstrap(t,r){this._internalStateOperations.getRootStateOperations().dispatch(t).pipe(ii(()=>!!r),Do(()=>this._invokeInitOnStates(r.states)),Wr(()=>this._bootstrapper.appBootstrapped$),ii(s=>!!s),Sf(s=>(this._internalErrorReporter.reportErrorSafely(s),Hl)),Kn(this._destroy$)).subscribe(()=>this._invokeBootstrapOnStates(r.states))}_invokeInitOnStates(t){for(const r of t){const s=r.instance;s.ngxsOnChanges&&this._store.select(c=>u$(c,r.path)).pipe(Wl(void 0),be((e,n)=>{let t,r=!1;e.subscribe(Se(n,s=>{const c=t;t=s,r&&n.next([c,s]),r=!0}))}),Kn(this._destroy$)).subscribe(([c,h])=>{const y=new kle(c,h,!r.isInitialised);s.ngxsOnChanges(y)}),s.ngxsOnInit&&s.ngxsOnInit(this._getStateContext(r)),r.isInitialised=!0}}_invokeBootstrapOnStates(t){for(const r of t){const s=r.instance;s.ngxsAfterBootstrap&&s.ngxsAfterBootstrap(this._getStateContext(r))}}_getStateContext(t){return this._stateContextFactory.createStateContext(t)}}return e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(yee),pe(f$),pe(SG),pe(eee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),dce=(()=>{class e{constructor(t,r,s,c,h=[],y){const E=t.addAndReturnDefaults(h);r.setStateToTheCurrentWithNew(E),t.connectActionHandlers(),y.ngxsBootstrap(new DG,E)}}return e.\u0275fac=function(t){return new(t||e)(pe(d2),pe(f$),pe(j0),pe(Z4),pe(dee,8),pe(See))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})(),fce=(()=>{class e{constructor(t,r,s,c=[],h){const y=e.flattenStates(c),E=s.addAndReturnDefaults(y);E.states.length&&(r.setStateToTheCurrentWithNew(E),h.ngxsBootstrap(new MG(E.defaults),E))}static flattenStates(t=[]){return t.reduce((r,s)=>r.concat(s),[])}}return e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(f$),pe(d2),pe(fee,8),pe(See))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})(),Dee=(()=>{class e{static forRoot(t=[],r={}){return{ngModule:dce,providers:[d2,CG,...t,...e.ngxsTokenProviders(t,r)]}}static forFeature(t=[]){return{ngModule:fce,providers:[d2,CG,...t,{provide:fee,multi:!0,useValue:t}]}}static ngxsTokenProviders(t,r){return[{provide:pee,useValue:r.executionStrategy},{provide:dee,useValue:t},{provide:uee,useValue:r},{provide:$w,useFactory:e.appBootstrapListenerFactory,multi:!0,deps:[eee]},{provide:iee,useExisting:SG},{provide:nee,useExisting:d2}]}static appBootstrapListenerFactory(t){return()=>t.bootstrap()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();function Mee(e,n){return(t,r)=>{const s=bG(t.constructor);Array.isArray(e)||(e=[e]);for(const c of e){const h=c.type;s.actions[h]||(s.actions[h]=[]),s.actions[h].push({fn:r,options:n||{},type:h})}}}function rM(e){return n=>{const t=n,r=bG(t),s=Object.getPrototypeOf(t),c=function hce(e,n){return Object.assign(Object.assign({},e[hee]||{}),n)}(s,e);(function pce(e){const{meta:n,inheritedStateClass:t,optionsWithInheritance:r}=e,{children:s,defaults:c,name:h}=r,y="string"==typeof h?h:h&&h.getName()||null;if(t.hasOwnProperty(V0)){const E=t[V0]||{};n.actions=Object.assign(Object.assign({},n.actions),E.actions)}n.children=s,n.defaults=c,n.name=y})({meta:r,inheritedStateClass:s,optionsWithInheritance:c}),t[hee]=c}}const Aee="NGXS_SELECTOR_OPTIONS_META",Q4={getOptions:e=>e&&e[Aee]||{},defineOptions:(e,n)=>{e&&(e[Aee]=n)}};function h$(e,n,t){const r=function lce(e,n){const t=n&&n.containerClass,s=fG(function(...h){const y=e.apply(t,h);return y instanceof Function?fG.apply(null,[y]):y});return Object.setPrototypeOf(s,e),s}(n,t),s=function bce(e,n){const t=vG(e);t.originalFn=e;let r=()=>({});n&&(t.containerClass=n.containerClass,t.selectorName=n.selectorName||null,r=n.getSelectorOptions||r);const s=Object.assign({},t);return t.getSelectorOptions=()=>function vce(e,n){return Object.assign(Object.assign(Object.assign(Object.assign({},Q4.getOptions(e.containerClass)||{}),Q4.getOptions(e.originalFn)||{}),e.getSelectorOptions()||{}),n)}(s,r()),t}(n,t);return s.makeRootSelector=function ace(e,n,t){return r=>{const{argumentSelectorFunctions:s,selectorOptions:c}=function cce(e,n,t=[]){const r=n.getSelectorOptions(),s=e.getSelectorOptions(r),h=function uce(e=[],n,t){const r=[];return t&&(0===e.length||n.injectContainerState)&&iM(t)&&r.push(t),e&&r.push(...e),r}(t,s,n.containerClass).map(y=>Cee(y)(e));return{selectorOptions:s,argumentSelectorFunctions:h}}(r,e,n);return function(y){const E=s.map(M=>M(y));try{return t(...E)}catch(M){if(M instanceof TypeError&&c.suppressErrors)return;throw M}}}}(s,e,r),r}function Tee(e){return(n,t,r)=>{r||(r=Object.getOwnPropertyDescriptor(n,t));const s=r?.value,c=h$(e,s,{containerClass:n,selectorName:t.toString(),getSelectorOptions:()=>({})}),h={configurable:!0,get:()=>c};return h.originalFn=s,h}}class xce{constructor(n){this.name=n,vG(this).makeRootSelector=r=>r.getStateGetter(this.name)}getName(){return this.name}toString(){return`StateToken[${this.name}]`}}const Ece="NGXS_COMPUTED_OPTION",kee="NGXS_DATA_META",AG="NGXS_META",Iee="NGXS_ARGUMENT_REGISTRY_META";let Oee=(()=>{class e{constructor(t){this.subscription=null,this.sequence$=new wr(0),t&&(this.subscription=t.subscribe(()=>this.updateSequence()))}get sequenceValue(){return this.sequence$.getValue()}ngOnDestroy(){this.sequence$.next(0),this.subscription?.unsubscribe()}updateSequence(){this.sequence$.next(this.sequenceValue+1)}}return e.\u0275fac=function(t){return new(t||e)(pe(j0,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();function p$(e){return e[kee]}let $h=(()=>{class e{constructor(t,r,s){e.store=t.get(j0),e.ngZone=t.get(Bt),e.factory=r,e.context=s,e.computed=t.get(Oee),e.injector=t}}return e.store=null,e.computed=null,e.context=null,e.factory=null,e.ngZone=null,e.injector=null,e.\u0275fac=function(t){return new(t||e)(pe(hr),pe(nee),pe(iee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();class Zs{constructor(){Zs.statesCachedMeta.clear()}static createStateContext(n){return $h.context.createStateContext(n)}static ensureMappedState(n){if(ql($h.factory)||ql(n))throw new Error("Metadata not created \n Maybe you forgot to import the NgxsDataPluginModule\n Also, you cannot use this.ctx.* until the application is fully rendered \n (use by default ngxsOnInit(ctx: StateContext), or ngxsAfterBootstrap(ctx: StateContext) !!!");return(Tc(n.name)?Zs.statesCachedMeta.get(n.name):null)||Zs.ensureMeta(n)}static getRepositoryByInstance(n){const r=p$(Zs.getStateClassByInstance(n))??null;if(ql(r))throw new Error("You forgot add decorator @StateRepository or initialize state!\nExample: NgxsModule.forRoot([ .. ]), or NgxsModule.forFeature([ .. ])");return r}static getStateClassByInstance(n){return(n??{}).constructor}static clearMetaByInstance(n){const t=Zs.getRepositoryByInstance(n);t.stateMeta.actions={},t.operations={}}static createPayload(n,t){const r={},s=Array.from(n);for(const[c,h]of s.entries()){const y=t?.getPayloadTypeByIndex(c);Tc(y)&&(r[y]=h)}return Object.keys(r).length>0?r:null}static createAction(n,t,r){const s=Zs.createPayload(t,r),c=function Mce(e){return class{constructor(t){if(t)for(const r of Object.keys(t))this[r]=t[r]}static get type(){return e}}}(n.type);return new c(s)}static ensureMeta(n){const t=Tc(n.name)?$h.factory.states?.find(r=>r.name===n.name):null;return Tc(t)&&Tc(n.name)&&Zs.statesCachedMeta.set(n.name,t),t}}Zs.statesCachedMeta=new Map,Zs.\u0275fac=function(n){return new(n||Zs)},Zs.\u0275prov=Ue({token:Zs,factory:Zs.\u0275fac}),new class Ace{constructor(){this.subject=new J(1)}init(){this.subject.next()}onInit(n){this.subject.pipe(Ie()).subscribe(n)}reset(){this.subject.complete(),this.subject=new J(1)}};class kce extends Error{constructor(n){super(`Child states can only be added to an object. Cannot convert ${Tc(n?.constructor)?n.constructor.name:n} to PlainObject`)}}function Ree(e){return e.NGXS_OPTIONS_META??{name:""}}function Nee(e){const n=Ree(e),t=n.children??[],s=KJ(void 0===n.defaults?{}:n.defaults);if(t.length>0){if(ZJ(s))return function Ice(e,n){return n.reduce((t,r)=>{const s=Ree(r);if(function l$(e){const n="string"==typeof e?e.trim():e;return[void 0,null,NaN,"",1/0].includes(n)}(s.name))throw new Error("State name not provided in class");return t[s.name.toString()]=Nee(r),t},e??{})}(s,t);throw new kce(s)}return s}function Fee(){return`__${Ece}__`}function Pee(e){return e[Fee()]??null}function Lee(){return $h?.computed?.sequenceValue??0}function Nce(e){let n=!1;return YO(e)&&(n=!0),n}function TG(e){return e[Iee]}class Fce extends Error{constructor(n,t){super(`An argument with the name '${n}' already exists in the method '${t}'`)}}class Pce{constructor(){this.payloadMap=new Map,this.argumentMap=new Map}getPayloadTypeByIndex(n){return this.payloadMap.get(n)??null}getArgumentNameByIndex(n){return this.argumentMap.get(n)??null}createPayloadType(n,t,r){this.checkDuplicateName(n,t),this.payloadMap.set(r,n),this.payloadMap.set(n,n)}createArgumentName(n,t,r){this.checkDuplicateName(n,t),this.argumentMap.set(r,n),this.argumentMap.set(n,n)}checkDuplicateName(n,t){if(uG(this.argumentMap.has(n))||uG(this.payloadMap.has(n)))throw new Fce(n,t)}}function Vce(e){return{enumerable:!0,configurable:!0,get(){const n=p$(e),t=Zs.ensureMappedState(n.stateMeta);return Zs.createStateContext(t)}}}function Bee(e){if(!e)throw new Error("You forgot add decorator @StateRepository or initialize state!\nExample: NgxsModule.forRoot([ .. ]), or NgxsModule.forFeature([ .. ])");return{...e,getState:()=>e.getState(),setState(n){e.setState(n)},patchState(n){e.patchState(n)}}}const qce={dataActionSubscribeRequired:!0},Gce=new $e("NGXS_DATA_CONFIG",{providedIn:"root",factory:()=>qce});let Xce=(()=>{class e{constructor(t,r){this.accessor=t,this.injector=r}static forRoot(t=[]){return{ngModule:e,providers:[Zs,$h,Oee,...t]}}}return e.\u0275fac=function(t){return new(t||e)(pe(Zs,2),pe($h,2))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();function Fm(){return(e,n,t)=>{!function Dce(e,n){if(!function lle(e,n){let t=e,r=!1;if(ZJ(t))for(;null!==t;){if(c2(t?.hasOwnProperty(n))){r=!!Object.getOwnPropertyDescriptor(t,n)?.get;break}t=Object.getPrototypeOf(t)}return r}(e,n?.toString()))throw new Error(`The method must be a getter for the computed decorator to work properly.\nExample: \n@Computed() get ${n.toString()}() { \n\t .. \n}`)}(e,n);const r=t.get;return t.get=function(...s){const c=function Rce(e){return ql(Pee(e))&&Object.defineProperties(e,{[Fee()]:{enumerable:!0,configurable:!0,value:new WeakMap}}),Pee(e)}(this),h=c?.get(r);if(c2(h?.isObservable))return h?.value;if(ql(h)||h.sequenceId!==Lee()){c.delete(r);const E=r.apply(this,s);return c.set(r,{value:E,sequenceId:Lee(),isObservable:Nce(E)}),E}return h?.value},t}}const Yce={cancelUncompleted:!0,insideZone:!1,subscribeRequired:!0};function Qs(e={}){const n=function Kce(e){const n=$h?.injector?.get(Gce,void 0,fi.Optional),t={...Yce};return Tc(n)&&void 0!==n?.dataActionSubscribeRequired&&(t.subscribeRequired=n.dataActionSubscribeRequired),{...t,...e}}(e);return(t,r,s)=>{!function Sce(e,n){if(e.hasOwnProperty("prototype"))throw new Error("Cannot support static methods with @DataAction()");if(void 0===n)throw new Error("@DataAction() can only decorate a method implementation")}(t,s);const c=s.value,h=r.toString();return s.value=function(...y){const E=this;let M=null;const R=Zs.getRepositoryByInstance(E),$=R.operations;let j=$[h];const X=R.stateMeta,K=TG(c);if(ql(j)){const rt=function Wce(e){return String(e).replace(/\/\/.*$/gm,"").replace(/\s+/g,"").replace(/\/\*[^*/]*\*\//g,"").split("){",1)?.[0]?.replace(/^[^(]*\(/,"").replace(/=[^,]+/g,"").split(",").filter(Boolean)??[]}(c),Mt=function Tce(e){const{statePath:n,argumentsNames:t,methodName:r,argumentRegistry:s}=e;let c="";for(let h=0;h(c2(n.insideZone)?$h.ngZone?.run(()=>{M=c.apply(E,y)}):M=c.apply(E,y),YO(M)&&c2(n.subscribeRequired)?zt(null).pipe(ye(()=>M)):M);const Me=Zs.createAction(j,y,K),Ce=$h.store.dispatch(Me);return YO(M)?function Oce(e,n){return c$([e,n]).pipe(ye(t=>t.pop()))}(Ce,M):M},s}}function Gl(e){return(n,t,r)=>{const s=e.trim();if(!s)throw new Error("Payload name should be initialized");(function Lce(e,n){const t=e[n];return ql(TG(t))&&Object.defineProperties(t,{[Iee]:{enumerable:!0,configurable:!0,value:new Pce}}),TG(t)})(n,t).createPayloadType(s,t,r)}}function f2(){return e=>{const n=function Hce(e){if(function Zae(e){return!uG(e)}(e.hasOwnProperty(AG))){const n={name:null,actions:{},defaults:{},path:null,makeRootSelector:t=>t.getStateGetter(n.name),children:[]};Object.defineProperty(e,AG,{value:n})}return function Uce(e){return e?.[AG]}(e)}(e);if(ql(n.name))throw new Error("@StateRepository should be add before decorator @State");!function zce(e,n){(function Bce(e){const n=p$(e)??null;return(ql(n)||n?.stateClass!==e)&&function $ce(e){Object.defineProperty(e,kee,{writable:!0,configurable:!0,enumerable:!0,value:{stateMeta:null,operations:{},stateClass:e}})}(e),p$(e)}(e)).stateMeta=n}(e,n),function Qce(e,n,t){Object.defineProperties(e.prototype,{name:{enumerable:!0,configurable:!0,value:n.name},initialState:{enumerable:!0,configurable:!0,get:()=>KJ(t)},context:Vce(e)})}(e,n,Nee(e)),function jce(e){const t=p$(e)?.stateMeta?.name??null;if(Tc(t)){const r=`__${t}__selector`;Object.defineProperties(e.prototype,{[r]:{writable:!0,enumerable:!1,configurable:!0},state$:{enumerable:!0,configurable:!0,get(){if(Tc(this[r]))return this[r];if(ql($h.store))throw new Error("Metadata not created \n Maybe you forgot to import the NgxsDataPluginModule\n Also, you cannot use this.ctx.* until the application is fully rendered \n (use by default ngxsOnInit(ctx: StateContext), or ngxsAfterBootstrap(ctx: StateContext) !!!");return this[r]=$h.store.select(e).pipe(ye(s=>s),ne({refCount:!0,bufferSize:1})),this[r]}}})}}(e)}}var zee=function(e){return e.ID="id",e}(zee||{}),kG=function(e){return e.ASC="asc",e.DESC="desc",e}(kG||{});let Vee=(()=>{class e{constructor(){this._dirty=!0,this.browserStorageEvents$=new It,this.isInitialised=!1,this.isBootstrapped=!1}get dirty(){return this._dirty}set dirty(t){this._dirty=t}ngxsOnChanges(t){this.dirty&&this.isBootstrapped&&(this.dirty=!1,this.ngxsDataDoCheck?.())}ngxsOnInit(){this.isInitialised=!0}ngxsAfterBootstrap(){this.isBootstrapped=!0,this.dirty&&(this.dirty=!1,this.ngxsDataDoCheck?.())}markAsDirtyAfterReset(){this.dirty=!0,this.ngxsDataAfterReset?.()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})(),IG=(()=>{class e extends Vee{constructor(){super(...arguments),this.primaryKey=zee.ID,this.comparator=null}get snapshot(){return this.getState()}get ids(){return this.snapshot.ids}get entities(){return this.snapshot.entities}get entitiesArray(){const t=this.snapshot;return t.ids.map(r=>t.entities[r])}get ids$(){return this.state$.pipe(ye(t=>t.ids))}get entities$(){return this.state$.pipe(ye(t=>t.entities))}get entitiesArray$(){return this.state$.pipe(ye(t=>t.ids.map(r=>t.entities[r])))}get ctx(){return Bee(this.context)}reset(){this.setEntitiesState(this.initialState),this.markAsDirtyAfterReset()}addOne(t){this.addEntityOne(t)}addMany(t){this.addEntitiesMany(t)}setOne(t){this.setEntityOne(t)}setMany(t){this.setEntitiesMany(t)}setAll(t){this.setEntitiesAll(t)}updateOne(t){this.updateEntitiesMany([t])}updateMany(t){this.updateEntitiesMany(t)}upsertOne(t){this.upsertEntitiesMany([t])}upsertMany(t){this.upsertEntitiesMany(t)}removeOne(t){this.removeEntitiesMany([t])}removeMany(t){this.removeEntitiesMany(t)}removeByEntity(t){const r=this.selectId(t);this.removeEntitiesMany([r])}removeByEntities(t){const r=[];for(const s of t){const c=this.selectId(s);r.push(c)}this.removeEntitiesMany(r)}removeAll(){this.setAll([])}sort(t){this.comparator=t??this.comparator,ql(this.comparator)?console.warn("You must set the compare function before sorting."):this.setEntitiesState(this.getState())}patchState(t){this.ctx.patchState(t)}setComparator(t){return this.comparator=t,this}dispatch(t){return this.ctx.dispatch(t)}getState(){return this.ctx.getState()}selectId(t){return t?.[this.primaryKey]}selectOne(t){return this.snapshot.entities[t]??null}selectAll(){const t=this.getState();return t.ids.map(r=>t.entities[r])}addEntityOne(t){const r=this.getState(),s=this.selectIdValue(t);s in r.entities||this.setEntitiesState({...r,ids:[...r.ids,s],entities:{...r.entities,[s]:t}})}addEntitiesMany(t){const r=this.getState(),s={},c=[];for(const h of t){const y=this.selectIdValue(h);y in r.entities||y in s||(c.push(y),s[y]=h)}c.length>0&&this.setEntitiesState({...r,ids:[...r.ids,...c],entities:{...r.entities,...s}})}setEntitiesAll(t){const r=this.getState(),s={},c=[];for(const h of t){const y=this.selectIdValue(h);y in s||(c.push(y),s[y]=h)}this.setEntitiesState({...r,ids:c,entities:s})}setEntityOne(t){const r=this.getState(),s=this.selectIdValue(t);this.setEntitiesState(s in r.entities?{...r,entities:{...r.entities,[s]:t}}:{...r,ids:[...r.ids,s],entities:{...r.entities,[s]:t}})}setEntitiesMany(t){for(const r of t)this.setEntityOne(r)}updateEntitiesMany(t){const r=this.getState(),s=t.filter(y=>y.id in r.entities);if(0===s.length)return;const c=this.generateKeyMap(r),h={...r.entities};for(const y of s){const E=this.updateOrigin(h,y),M=this.selectIdValue(E);M!==y.id&&(delete c[y.id],delete h[y.id]),c[y.id]=M,h[M]=E}this.setEntitiesState({...r,ids:r.ids.map(y=>c[y]??y),entities:h})}upsertEntitiesMany(t){const r=this.getState(),s=[],c=[];for(const h of t){const y=this.selectIdValue(h);y in r.entities?s.push({id:y,changes:h}):c.push(h)}this.updateMany(s),this.addMany(c)}removeEntitiesMany(t){const r=this.getState(),s=this.generateKeyMap(r),c={...r.entities};for(const h of t)h in c&&(delete s[h],delete c[h]);this.setEntitiesState({...r,ids:r.ids.filter(h=>h in s),entities:c})}setEntitiesState(t){const r=this.sortKeysByComparator(t.ids,t.entities);this.ctx.patchState({...t,ids:r,entities:t.entities})}sortKeysByComparator(t,r){if(ql(this.comparator))return t;const s=t.slice(),c=this.comparator;return"function"==typeof c?s.sort((h,y)=>c(r[h],r[y])):this.sortByComparatorOptions(s,c,r)}sortByComparatorOptions(t,r,s){switch(r?.sortByOrder){case kG.ASC:return t.sort((c,h)=>function dle(e,n,t){return n?.[e]>t?.[e]?1:n?.[e]function fle(e,n,t){return n?.[e]>t?.[e]?-1:n?.[e](r[s]=s,r),{})}updateOrigin(t,r){return{...t[r.id],...r.changes}}selectIdValue(t){const r=this.selectId(t);return ql(r),r}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"snapshot",null),Nn([Fm(),gt("design:type",Array),gt("design:paramtypes",[])],e.prototype,"ids",null),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"entities",null),Nn([Fm(),gt("design:type",Array),gt("design:paramtypes",[])],e.prototype,"entitiesArray",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"ids$",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"entities$",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"entitiesArray$",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"reset",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"addOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"addMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"setOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"setMany",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"setAll",null),Nn([Qs(),ga(0,Gl("update")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"updateOne",null),Nn([Qs(),ga(0,Gl("updates")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"updateMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"upsertOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"upsertMany",null),Nn([Qs(),ga(0,Gl("id")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"removeOne",null),Nn([Qs(),ga(0,Gl("ids")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"removeMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"removeByEntity",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"removeByEntities",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"removeAll",null),Nn([Qs(),ga(0,Gl("comparator")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"sort",null),Nn([Qs(),ga(0,Gl("patchValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"patchState",null),e})(),OG=(()=>{class e extends Vee{get snapshot(){return this.getState()}get ctx(){return Bee(this.context)}patchState(t){this.ctx.patchState(t)}setState(t){this.ctx.setState(t)}reset(){this.ctx.setState(this.initialState),this.markAsDirtyAfterReset()}getState(){return this.ctx.getState()}dispatch(t){return this.ctx.dispatch(t)}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"snapshot",null),Nn([Qs(),ga(0,Gl("patchValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"patchState",null),Nn([Qs(),ga(0,Gl("stateValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"setState",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"reset",null),e})();var gu=tn(104);let RG=(()=>{class e extends gu.View{static#e=this.HANDLER_TYPES=[];static withDataHandlers(t){const r=this.HANDLER_TYPES;return class extends(this){static#t=this.HANDLER_TYPES=r.concat(t)}}constructor(t,r){super(t,r),this.handlers=this.constructor.HANDLER_TYPES.map(h=>new h(this))}finalize(){return this.handlers.forEach(t=>t.finalize?.()),super.finalize()}}return e})();function NG(e){return n=>(function nue(e,n){const t=e.signals??=[],r=e.projections?e.projections[0]:void 0;!r||"albersUsa"===r.type||(t.push({name:"tx",update:"width / 2 - 300"},{name:"ty",update:"height / 2"},{name:"scale",value:n.initialZoom??n.zoomLevels[0],on:[{events:{type:"wheel",consume:!0,filter:"event.shiftKey"},update:["clamp(scale * pow(1.0015, -event.deltaY * pow(48, event.deltaMode)), ",n.zoomLevels[0],", ",n.zoomLevels[1],")"].join("")}]},{name:"angles",value:[0,0],on:[{events:"mousedown",update:"[rotateX, centerY]"}]},{name:"cloned",value:null,on:[{events:"mousedown",update:"copy('"+r.name+"')"}]},{name:"start",value:null,on:[{events:"mousedown",update:"invert(cloned, xy())"}]},{name:"drag",value:null,on:[{events:"[mousedown[event.shiftKey], window:mouseup] > window:mousemove",update:"invert(cloned, xy())"}]},{name:"delta",value:null,on:[{events:{signal:"drag"},update:"[drag[0] - start[0], start[1] - drag[1]]"}]},{name:"rotateX",value:n.center[0],on:[{events:{signal:"delta"},update:"angles[0] + delta[0]"}]},{name:"centerY",value:n.center[1],on:[{events:{signal:"delta"},update:"clamp(angles[1] + delta[1], -60, 60)"}]}),Object.assign(r,{scale:{signal:"scale"},rotate:[{signal:"rotateX"},0,0],center:[0,{signal:"centerY"}],translate:[{signal:"tx"},{signal:"ty"}]}),delete r.size)}(n,e),n)}NG({center:[86.44305475,39.76622477],zoomLevels:[3200,25e4],initialZoom:6400}),NG({center:[96,39],zoomLevels:[10,25e4],initialZoom:600});const iue=[{CASE_NUMBER:"",RANK:0,AGE:0,PERIOD:0,TIME_BEFORE_DEATH:0,ALL_TYPES:0,HEALTH_ENCOUNTERS:0,OPIOID_PRESCRIPTIONS:0,INCARCERATIONS:0,OVERDOSES:0,NUM_ENCOUNTERS_TOTAL:0,NUM_INCARCERATIONS_TOTAL:0,AGE_RANK:0,HEALTH_RANK:0,OVERDOSE_RANK:0,INCARCERATIONS_RANK:0,PRESCRIPTIONS_RANK:0,FINAL_RANK:0,TIME_FIRST_OD:0,TIME_FIRST_RX:0,OD_DIFF:0,RX_DIFF:0},{CASE_NUMBER:"",RANK:0,AGE:0,PERIOD:0,TIME_BEFORE_DEATH:120,ALL_TYPES:0,HEALTH_ENCOUNTERS:0,OPIOID_PRESCRIPTIONS:0,INCARCERATIONS:0,OVERDOSES:0,NUM_ENCOUNTERS_TOTAL:0,NUM_INCARCERATIONS_TOTAL:0,AGE_RANK:0,HEALTH_RANK:0,OVERDOSE_RANK:0,INCARCERATIONS_RANK:0,PRESCRIPTIONS_RANK:0,FINAL_RANK:0,TIME_FIRST_OD:0,TIME_FIRST_RX:0,OD_DIFF:0,RX_DIFF:0}];let FG=(()=>{class e{static#e=this.OPTIONS={};static withOptions(t){return class extends(this){static#t=this.OPTIONS=t}}constructor(t){this.view=t,this.options=this.constructor.OPTIONS,this.sortBy="HEALTH_RANK",this.sortRanks={},t.addDataListener("source",(r,s)=>{this.data=s,this.sortRanks=this.compileSortRanks(s),this.scheduleUpdateCall()}),t.addSignalListener("sort_by__field",(r,s)=>{this.sortBy=s,this.scheduleUpdateCall()}),t.addSignalListener("rank",(r,s)=>{this.ranks=s.RANK,this.ranksLookup=void 0,this.scheduleUpdateCall()}),t.addSignalListener("age",(r,s)=>{this.age=s.AGE,this.scheduleUpdateCall()}),t.addSignalListener("encounters",(r,s)=>{this.numEncounters=s.NUM_ENCOUNTERS_TOTAL,this.scheduleUpdateCall()}),t.addSignalListener("incarcerations",(r,s)=>{this.numIncarcerations=s.NUM_INCARCERATIONS_TOTAL,this.scheduleUpdateCall()})}finalize(){this.clearScheduledUpdateCall(),this.data=void 0,this.sortBy="HEALTH_RANK",this.sortRanks={},this.ranks=void 0,this.ranksLookup=void 0,this.age=void 0,this.numEncounters=void 0}scheduleUpdateCall(){var t=this;this.clearScheduledUpdateCall(),this.scheduledUpdateCall=setTimeout((0,sn.Z)(function*(){t.clearScheduledUpdateCall(),t.updateData(),t.view.resize(),yield t.view.runAsync()}),this.options.debounceTime??500)}clearScheduledUpdateCall(){void 0!==this.scheduledUpdateCall&&(clearTimeout(this.scheduledUpdateCall),this.scheduledUpdateCall=void 0)}updateData(){let{data:t=[]}=this;t=this.filterByRank(t),t=this.filterByAge(t),t=this.filterByEncounters(t),t=this.filterByIncarcerations(t),t=this.sortData(t),t=this.limitData(t),t=this.setRanks(t),0===t.length&&(t=iue),this.view.data("processed_source",t)}compileSortRanks(t){const r={};for(const{CASE_NUMBER:s,AGE_RANK:c,HEALTH_RANK:h,OVERDOSE_RANK:y,TIME_FIRST_OD:E,TIME_FIRST_RX:M,OD_DIFF:R,RX_DIFF:$,INCARCERATIONS_RANK:j,PRESCRIPTIONS_RANK:X}of t)r[s]??={AGE_RANK:c,HEALTH_RANK:h,OVERDOSE_RANK:y,TIME_FIRST_OD:E,TIME_FIRST_RX:M,OD_DIFF:R,RX_DIFF:$,INCARCERATIONS_RANK:j,PRESCRIPTIONS_RANK:X};return r}filterByRank(t){const{ranks:r}=this;if(void 0===r)return t;const s=this.ranksLookup??=new Set(r);return t.filter(({RANK:c})=>s.has(c))}filterByAge(t){const{age:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({AGE:h})=>s<=h&&h<=c)}filterByEncounters(t){const{numEncounters:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({NUM_ENCOUNTERS_TOTAL:h})=>s<=h&&h<=c)}filterByIncarcerations(t){const{numIncarcerations:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({NUM_INCARCERATIONS_TOTAL:h})=>s<=h&&h<=c)}sortData(t){const{sortBy:r,sortRanks:s}=this,c=h=>s[h.CASE_NUMBER][r];return t.sort((h,y)=>c(h)-c(y))}limitData(t){const{options:{maxCasesShown:r=54}}=this,s=new Set,c=[];for(const h of t)s.has(h.CASE_NUMBER)?c.push(h):s.size(c.CASE_NUMBER!==r&&(r=c.CASE_NUMBER,s+=1),{...c,...(0,gu.ingest)({}),FINAL_RANK:s}))}}return e})();const rue={Gender:"SEX",Age:"AGE","Opioid Prescriptions within last year before death":"OPIOID_PRESCRIPTIONS_1YEAR","Any Opioid Prescriptions before death":"ANY_PRESCRIPTIONS","Prescription vs. Illicit Drugs":"ILLICIT_V_PRESCRIPTION"};class oue{constructor(n){this.view=n,this.subsets={},this.setData(),this.view.addSignalListener("data_variable_selection",(t,r)=>this.updateDataVariable(r.LABEL&&r.LABEL.length>0?r.LABEL[0]:void 0))}setData(){var n=this;return(0,sn.Z)(function*(){const t=yield(0,gu.loader)().load("assets/generated/vis-geomap-opioid-deaths.csv").then(r=>(0,gu.read)(r,{type:"csv",parse:{N_OPIOID_PRESCRIPTIONS:"number",LATITUDE:"number",LONGITUDE:"number",PERIOD:"date"}}));Object.entries(rue).forEach(([r,s])=>{n.subsets[r]=t.filter(c=>c.DATA_VARIABLE===s)}),n.updateDataVariable("Age")})()}updateDataVariable(n){var t=this;return(0,sn.Z)(function*(){n&&(yield t.view.runAsync(),t.view.data("source",t.subsets[n]||[]))})()}finalize(){this.subsets={}}}const jee=[{id:"vis1-geomap-of-opioid-deaths",title:"Accidental Drug Overdose Deaths",description:"Marion County by Place of Injury (2010-2018)",spec:"assets/pages/vis1-geomap-of-opioid-deaths/vis.vl.json",options:{renderer:"canvas",actions:!0,patch:e=>((e=NG({center:[87.44305475,38.76622477],zoomLevels:[3200,25e4],initialZoom:6400})(e)).width=941,e.height=941,e),viewClass:class sue extends gu.View{constructor(n,t){super(n,t),this.dataHandler=new oue(this)}finalize(){return this.dataHandler.finalize(),super.finalize()}}},content:"assets/pages/vis1-geomap-of-opioid-deaths/README.md",sql:"assets/pages/vis1-geomap-of-opioid-deaths/data.sql",csv:"assets/generated/vis-geomap-opioid-deaths.csv"},{id:"vis2-age-and-gender",title:"Age Group & Gender of Accidental Drug Overdose",description:"Marion County Deaths & Population (2010-2018)",spec:"assets/pages/vis2-age-and-gender/vis.vl.json",options:{},content:"assets/pages/vis2-age-and-gender/README.md",sql:"assets/pages/vis2-age-and-gender/data.sql",csv:"assets/generated/vis2-data/death-counts.csv"},{id:"vis3-heatmap-of-accidental-overdoses",title:"Age Group & Gender of Accidental Drug Overdose",description:"Marion County by Deaths & Population (2010-2018)",spec:"assets/pages/vis3-heatmap-of-accidental-overdoses/vis.vl.json",options:{},content:"assets/pages/vis3-heatmap-of-accidental-overdoses/README.md",sql:"assets/pages/vis4-combined-visualization/data.sql",csv:"assets/generated/visualization4/data.csv"},{id:"vis4-combined-visualization",title:"Accidental Drug Overdose Deaths",description:"Marion County by Substance, Sex, & Age (2010-2018)",spec:"assets/pages/vis4-combined-visualization/vis.vl.json",options:{},content:"assets/pages/vis4-combined-visualization/README.md",sql:"assets/pages/vis4-combined-visualization/data.sql",csv:"assets/generated/visualization4/data.csv"},{id:"vis5-opioid-trajectories",title:"Opioid Death Datasets",description:"Marion County by History of Opioid Prescription, Previous Overdose, Incarceration, Health Data (2010-2018)",spec:"assets/pages/vis5-opioid-trajectories/vis.vl.json",options:{},content:"assets/pages/vis5-opioid-trajectories/README.md",sql:"assets/pages/vis5-opioid-trajectories/data.sql",csv:"assets/generated/visualization5/data.csv"},{id:"vis6-maps-of-health",title:"Maps of Health #1",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"},{id:"vis6-maps-of-health-v2",title:"Maps of Health #2",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis2.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"},{id:"vis6-maps-of-health-v3",title:"Maps of Health #3",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis3.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"}];let Uee=(()=>{let e=class V$ extends IG{ngxsOnInit(){this.setAll(jee)}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(V$)))(s||V$)}})();static#t=this.\u0275prov=Ue({token:V$,factory:V$.\u0275fac})};return e=Nn([f2(),rM({name:"visualizations"})],e),e})(),aue=(()=>{class e{constructor(t){this.service=t}resolve(t){const r=t.paramMap.get("id");return null===r?Hl:this.service.entities$.pipe(a$(r),Bo(1))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Uee))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Hee=DV();class cue{constructor(n,t){this._viewportRuler=n,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=Dr(-this._previousScrollPosition.left),n.style.top=Dr(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const n=this._document.documentElement,r=n.style,s=this._document.body.style,c=r.scrollBehavior||"",h=s.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),Hee&&(r.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Hee&&(r.scrollBehavior=c,s.scrollBehavior=h)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,r=this._viewportRuler.getViewportSize();return t.scrollHeight>r.height||t.scrollWidth>r.width}}class uue{constructor(n,t,r,s){this._scrollDispatcher=n,this._ngZone=t,this._viewportRuler=r,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(n){this._overlayRef=n}enable(){if(this._scrollSubscription)return;const n=this._scrollDispatcher.scrolled(0).pipe(ii(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class Wee{enable(){}disable(){}attach(){}}function PG(e,n){return n.some(t=>e.bottomt.bottom||e.rightt.right)}function qee(e,n){return n.some(t=>e.topt.bottom||e.leftt.right)}class due{constructor(n,t,r,s){this._scrollDispatcher=n,this._viewportRuler=t,this._ngZone=r,this._config=s,this._scrollSubscription=null}attach(n){this._overlayRef=n}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:s}=this._viewportRuler.getViewportSize();PG(t,[{width:r,height:s,bottom:s,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let fue=(()=>{class e{constructor(t,r,s,c){this._scrollDispatcher=t,this._viewportRuler=r,this._ngZone=s,this.noop=()=>new Wee,this.close=h=>new uue(this._scrollDispatcher,this._ngZone,this._viewportRuler,h),this.block=()=>new cue(this._viewportRuler,this._document),this.reposition=h=>new due(this._scrollDispatcher,this._viewportRuler,this._ngZone,h),this._document=c}static#e=this.\u0275fac=function(r){return new(r||e)(pe(hO),pe(pO),pe(Bt),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class LG{constructor(n){if(this.scrollStrategy=new Wee,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,n){const t=Object.keys(n);for(const r of t)void 0!==n[r]&&(this[r]=n[r])}}}class hue{constructor(n,t){this.connectionPair=n,this.scrollableViewProperties=t}}let Gee=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const r=this._attachedOverlays.indexOf(t);r>-1&&this._attachedOverlays.splice(r,1),0===this._attachedOverlays.length&&this.detach()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pue=(()=>{class e extends Gee{constructor(t,r){super(t),this._ngZone=r,this._keydownListener=s=>{const c=this._attachedOverlays;for(let h=c.length-1;h>-1;h--)if(c[h]._keydownEvents.observers.length>0){const y=c[h]._keydownEvents;this._ngZone?this._ngZone.run(()=>y.next(s)):y.next(s);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(Bt,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mue=(()=>{class e extends Gee{constructor(t,r,s){super(t),this._platform=r,this._ngZone=s,this._cursorStyleIsSet=!1,this._pointerDownListener=c=>{this._pointerDownEventTarget=Am(c)},this._clickListener=c=>{const h=Am(c),y="click"===c.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:h;this._pointerDownEventTarget=null;const E=this._attachedOverlays.slice();for(let M=E.length-1;M>-1;M--){const R=E[M];if(R._outsidePointerEvents.observers.length<1||!R.hasAttached())continue;if(R.overlayElement.contains(h)||R.overlayElement.contains(y))break;const $=R._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>$.next(c)):$.next(c)}}}add(t){if(super.add(t),!this._isAttached){const r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(Xs),pe(Bt,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),m$=(()=>{class e{constructor(t,r){this._platform=r,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||QP()){const s=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let c=0;cthis._backdropClick.next($),this._backdropTransitionendHandler=$=>{this._disposeBackdrop($.target)},this._keydownEvents=new It,this._outsidePointerEvents=new It,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Bo(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const n=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){const n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,n&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config={...this._config,...n},this._updateElementSize()}setDirection(n){this._config={...this._config,direction:n},this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){const n=this._config.direction;return n?"string"==typeof n?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const n=this._pane.style;n.width=Dr(this._config.width),n.height=Dr(this._config.height),n.minWidth=Dr(this._config.minWidth),n.minHeight=Dr(this._config.minHeight),n.maxWidth=Dr(this._config.maxWidth),n.maxHeight=Dr(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){const n="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(n)})}):this._backdropElement.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const n=this._backdropElement;if(n){if(this._animationsDisabled)return void this._disposeBackdrop(n);n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{n.addEventListener("transitionend",this._backdropTransitionendHandler)}),n.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(n)},500))}}_toggleClasses(n,t,r){const s=o1(t||[]).filter(c=>!!c);s.length&&(r?n.classList.add(...s):n.classList.remove(...s))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const n=this._ngZone.onStable.pipe(Kn(Oh(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),n.unsubscribe())})})}_disposeScrollStrategy(){const n=this._scrollStrategy;n&&(n.disable(),n.detach&&n.detach())}_disposeBackdrop(n){n&&(n.removeEventListener("click",this._backdropClickHandler),n.removeEventListener("transitionend",this._backdropTransitionendHandler),n.remove(),this._backdropElement===n&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const Xee="cdk-overlay-connected-position-bounding-box",gue=/([A-Za-z%]+)$/;class _ue{get positions(){return this._preferredPositions}constructor(n,t,r,s,c){this._viewportRuler=t,this._document=r,this._platform=s,this._overlayContainer=c,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new It,this._resizeSubscription=xn.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(n)}attach(n){this._validatePositions(),n.hostElement.classList.add(Xee),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const n=this._originRect,t=this._overlayRect,r=this._viewportRect,s=this._containerRect,c=[];let h;for(let y of this._preferredPositions){let E=this._getOriginPoint(n,s,y),M=this._getOverlayPoint(E,t,y),R=this._getOverlayFit(M,t,r,y);if(R.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(y,E);this._canFitWithFlexibleDimensions(R,M,r)?c.push({position:y,origin:E,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(E,y)}):(!h||h.overlayFit.visibleAreaE&&(E=R,y=M)}return this._isPushed=!1,void this._applyPosition(y.position,y.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(h.position,h.originPoint);this._applyPosition(h.position,h.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&oM(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Xee),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,t)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,-1===n.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,t,r){let s,c;if("center"==r.originX)s=n.left+n.width/2;else{const h=this._isRtl()?n.right:n.left,y=this._isRtl()?n.left:n.right;s="start"==r.originX?h:y}return t.left<0&&(s-=t.left),c="center"==r.originY?n.top+n.height/2:"top"==r.originY?n.top:n.bottom,t.top<0&&(c-=t.top),{x:s,y:c}}_getOverlayPoint(n,t,r){let s,c;return s="center"==r.overlayX?-t.width/2:"start"===r.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,c="center"==r.overlayY?-t.height/2:"top"==r.overlayY?0:-t.height,{x:n.x+s,y:n.y+c}}_getOverlayFit(n,t,r,s){const c=Kee(t);let{x:h,y}=n,E=this._getOffset(s,"x"),M=this._getOffset(s,"y");E&&(h+=E),M&&(y+=M);let j=0-y,X=y+c.height-r.height,K=this._subtractOverflows(c.width,0-h,h+c.width-r.width),ie=this._subtractOverflows(c.height,j,X),me=K*ie;return{visibleArea:me,isCompletelyWithinViewport:c.width*c.height===me,fitsInViewportVertically:ie===c.height,fitsInViewportHorizontally:K==c.width}}_canFitWithFlexibleDimensions(n,t,r){if(this._hasFlexibleDimensions){const s=r.bottom-t.y,c=r.right-t.x,h=Yee(this._overlayRef.getConfig().minHeight),y=Yee(this._overlayRef.getConfig().minWidth);return(n.fitsInViewportVertically||null!=h&&h<=s)&&(n.fitsInViewportHorizontally||null!=y&&y<=c)}return!1}_pushOverlayOnScreen(n,t,r){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};const s=Kee(t),c=this._viewportRect,h=Math.max(n.x+s.width-c.width,0),y=Math.max(n.y+s.height-c.height,0),E=Math.max(c.top-r.top-n.y,0),M=Math.max(c.left-r.left-n.x,0);let R=0,$=0;return R=s.width<=c.width?M||-h:n.xK&&!this._isInitialRender&&!this._growAfterOpen&&(h=n.y-K/2)}if("end"===t.overlayX&&!s||"start"===t.overlayX&&s)j=r.width-n.x+this._viewportMargin,R=n.x-this._viewportMargin;else if("start"===t.overlayX&&!s||"end"===t.overlayX&&s)$=n.x,R=r.right-n.x;else{const X=Math.min(r.right-n.x+r.left,n.x),K=this._lastBoundingBoxSize.width;R=2*X,$=n.x-X,R>K&&!this._isInitialRender&&!this._growAfterOpen&&($=n.x-K/2)}return{top:h,left:$,bottom:y,right:j,width:R,height:c}}_setBoundingBoxStyles(n,t){const r=this._calculateBoundingBoxRect(n,t);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));const s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right=s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{const c=this._overlayRef.getConfig().maxHeight,h=this._overlayRef.getConfig().maxWidth;s.height=Dr(r.height),s.top=Dr(r.top),s.bottom=Dr(r.bottom),s.width=Dr(r.width),s.left=Dr(r.left),s.right=Dr(r.right),s.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",s.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",c&&(s.maxHeight=Dr(c)),h&&(s.maxWidth=Dr(h))}this._lastBoundingBoxSize=r,oM(this._boundingBox.style,s)}_resetBoundingBoxStyles(){oM(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){oM(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,t){const r={},s=this._hasExactPosition(),c=this._hasFlexibleDimensions,h=this._overlayRef.getConfig();if(s){const R=this._viewportRuler.getViewportScrollPosition();oM(r,this._getExactOverlayY(t,n,R)),oM(r,this._getExactOverlayX(t,n,R))}else r.position="static";let y="",E=this._getOffset(t,"x"),M=this._getOffset(t,"y");E&&(y+=`translateX(${E}px) `),M&&(y+=`translateY(${M}px)`),r.transform=y.trim(),h.maxHeight&&(s?r.maxHeight=Dr(h.maxHeight):c&&(r.maxHeight="")),h.maxWidth&&(s?r.maxWidth=Dr(h.maxWidth):c&&(r.maxWidth="")),oM(this._pane.style,r)}_getExactOverlayY(n,t,r){let s={top:"",bottom:""},c=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(c=this._pushOverlayOnScreen(c,this._overlayRect,r)),"bottom"===n.overlayY?s.bottom=this._document.documentElement.clientHeight-(c.y+this._overlayRect.height)+"px":s.top=Dr(c.y),s}_getExactOverlayX(n,t,r){let h,s={left:"",right:""},c=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(c=this._pushOverlayOnScreen(c,this._overlayRect,r)),h=this._isRtl()?"end"===n.overlayX?"left":"right":"end"===n.overlayX?"right":"left","right"===h?s.right=this._document.documentElement.clientWidth-(c.x+this._overlayRect.width)+"px":s.left=Dr(c.x),s}_getScrollVisibility(){const n=this._getOriginRect(),t=this._pane.getBoundingClientRect(),r=this._scrollables.map(s=>s.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:qee(n,r),isOriginOutsideView:PG(n,r),isOverlayClipped:qee(t,r),isOverlayOutsideView:PG(t,r)}}_subtractOverflows(n,...t){return t.reduce((r,s)=>r-Math.max(s,0),n)}_getNarrowedViewportRect(){const n=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+n-this._viewportMargin,bottom:r.top+t-this._viewportMargin,width:n-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,t){return"x"===t?null==n.offsetX?this._offsetX:n.offsetX:null==n.offsetY?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&o1(n).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){const n=this._origin;if(n instanceof zn)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();const t=n.width||0,r=n.height||0;return{top:n.y,bottom:n.y+r,left:n.x,right:n.x+t,height:r,width:t}}}function oM(e,n){for(let t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function Yee(e){if("number"!=typeof e&&null!=e){const[n,t]=e.split(gue);return t&&"px"!==t?null:parseFloat(n)}return e||null}function Kee(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const Zee="cdk-global-overlay-wrapper";class yue{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(n){const t=n.getConfig();this._overlayRef=n,this._width&&!t.width&&n.updateSize({width:this._width}),this._height&&!t.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(Zee),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:s,height:c,maxWidth:h,maxHeight:y}=r,E=!("100%"!==s&&"100vw"!==s||h&&"100%"!==h&&"100vw"!==h),M=!("100%"!==c&&"100vh"!==c||y&&"100%"!==y&&"100vh"!==y),R=this._xPosition,$=this._xOffset,j="rtl"===this._overlayRef.getConfig().direction;let X="",K="",ie="";E?ie="flex-start":"center"===R?(ie="center",j?K=$:X=$):j?"left"===R||"end"===R?(ie="flex-end",X=$):("right"===R||"start"===R)&&(ie="flex-start",K=$):"left"===R||"start"===R?(ie="flex-start",X=$):("right"===R||"end"===R)&&(ie="flex-end",K=$),n.position=this._cssPosition,n.marginLeft=E?"0":X,n.marginTop=M?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=E?"0":K,t.justifyContent=ie,t.alignItems=M?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,r=t.style;t.classList.remove(Zee),r.justifyContent=r.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}}let bue=(()=>{class e{constructor(t,r,s,c){this._viewportRuler=t,this._document=r,this._platform=s,this._overlayContainer=c}global(){return new yue}flexibleConnectedTo(t){return new _ue(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(pO),pe(mi),pe(Xs),pe(m$))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),vue=0,Bh=(()=>{class e{constructor(t,r,s,c,h,y,E,M,R,$,j,X){this.scrollStrategies=t,this._overlayContainer=r,this._componentFactoryResolver=s,this._positionBuilder=c,this._keyboardDispatcher=h,this._injector=y,this._ngZone=E,this._document=M,this._directionality=R,this._location=$,this._outsideClickDispatcher=j,this._animationsModuleType=X}create(t){const r=this._createHostElement(),s=this._createPaneElement(r),c=this._createPortalOutlet(s),h=new LG(t);return h.direction=h.direction||this._directionality.value,new eU(c,r,s,h,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const r=this._document.createElement("div");return r.id="cdk-overlay-"+vue++,r.classList.add("cdk-overlay-pane"),t.appendChild(r),r}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(Kb)),new Cae(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(fue),pe(m$),pe(Ag),pe(bue),pe(pue),pe(hr),pe(Bt),pe(mi),pe(rd),pe(mm),pe(mue),pe(Ko,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const xue=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Qee=new $e("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.reposition()}});let $G=(()=>{class e{constructor(t){this.elementRef=t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}return e})(),Jee=(()=>{class e{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,r,s,c,h){this._overlay=t,this._dir=h,this._backdropSubscription=xn.EMPTY,this._attachSubscription=xn.EMPTY,this._detachSubscription=xn.EMPTY,this._positionSubscription=xn.EMPTY,this._disposeOnNavigation=!1,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new cn,this.positionChange=new cn,this.attach=new cn,this.detach=new cn,this.overlayKeydown=new cn,this.overlayOutsideClick=new cn,this._templatePortal=new B4(r,s),this._scrollStrategyFactory=c,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=xue);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),27===r.keyCode&&!this.disableClose&&!kh(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{this.overlayOutsideClick.next(r)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),r=new LG({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||0===this.width)&&(r.width=this.width),(this.height||0===this.height)&&(r.height=this.height),(this.minWidth||0===this.minWidth)&&(r.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(t){const r=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof $G?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function lue(e,n=!1){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>{const h=e(c,s++);(h||n)&&r.next(c),!h&&r.complete()}))})}(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Bh),ue(Yu),ue(Jo),ue(Qee),ue(rd,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[ht.None,"cdkConnectedOverlayOrigin","origin"],positions:[ht.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[ht.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[ht.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[ht.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[ht.None,"cdkConnectedOverlayWidth","width"],height:[ht.None,"cdkConnectedOverlayHeight","height"],minWidth:[ht.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[ht.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[ht.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[ht.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[ht.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[ht.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[ht.None,"cdkConnectedOverlayOpen","open"],disableClose:[ht.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[ht.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",cr],lockPosition:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",cr],flexibleDimensions:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",cr],growAfterOpen:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",cr],push:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",cr],disposeOnNavigation:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",cr]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[Vs,vo]})}return e})();const Eue={provide:Qee,deps:[Bh],useFactory:function wue(e){return()=>e.scrollStrategies.reposition()}};let BG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[Bh,Eue],imports:[ED,s$,RV,RV]})}return e})();function Cue(e,n){}class tU{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let ete=(()=>{class e extends oG{constructor(t,r,s,c,h,y,E,M){super(),this._elementRef=t,this._focusTrapFactory=r,this._config=c,this._interactivityChecker=h,this._ngZone=y,this._overlayRef=E,this._focusMonitor=M,this._platform=Xe(Xs),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=Xe(Qo),this.attachDomPortal=R=>{this._portalOutlet.hasAttached();const $=this._portalOutlet.attachDomPortal(R);return this._contentAttached(),$},this._document=s,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const r=this._ariaLabelledByQueue.indexOf(t);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const r=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),r}attachTemplatePortal(t){this._portalOutlet.hasAttached();const r=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,r){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const s=()=>{t.removeEventListener("blur",s),t.removeEventListener("mousedown",s),t.removeAttribute("tabindex")};t.addEventListener("blur",s),t.addEventListener("mousedown",s)})),t.focus(r)}_focusByCssSelector(t,r){let s=this._elementRef.nativeElement.querySelector(t);s&&this._forceFocus(s,r)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(r=>{r||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let r=null;if("string"==typeof t?r=this._document.querySelector(t):"boolean"==typeof t?r=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(r=t),this._config.restoreFocus&&r&&"function"==typeof r.focus){const s=wD(),c=this._elementRef.nativeElement;(!s||s===this._document.body||s===c||c.contains(s))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,r=wD();return t===r||t.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=wD()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(mi,8),ue(tU),ue(h1),ue(Bt),ue(eU),ue(k_))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,s){if(1&r&&ha(z4,7),2&r){let c;zi(c=Pi())&&(s._portalOutlet=c.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,s){2&r&&hi("id",s._config.id||null)("role",s._config.role)("aria-modal",s._config.ariaModal)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null)},standalone:!0,features:[wn,xi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,s){1&r&&en(0,Cue,0,0,"ng-template",0)},dependencies:[z4],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return e})();class zG{constructor(n,t){this.overlayRef=n,this.config=t,this.closed=new It,this.disableClose=t.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(r=>{27===r.keyCode&&!this.disableClose&&!kh(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=n.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(n,t){if(this.containerInstance){const r=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(n),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",t=""){return this.overlayRef.updateSize({width:n,height:t}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}}const tte=new $e("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.block()}}),Sue=new $e("DialogData"),Due=new $e("DefaultDialogConfig");let Aue=0,nte=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,r,s,c,h,y){this._overlay=t,this._injector=r,this._defaultOptions=s,this._parentDialog=c,this._overlayContainer=h,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new It,this._afterOpenedAtThisLevel=new It,this._ariaHiddenElements=new Map,this.afterAllClosed=qL(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wl(void 0))),this._scrollStrategy=y}open(t,r){(r={...this._defaultOptions||new tU,...r}).id=r.id||"cdk-dialog-"+Aue++,r.id&&this.getDialogById(r.id);const c=this._getOverlayConfig(r),h=this._overlay.create(c),y=new zG(h,r),E=this._attachContainer(h,y,r);return y.containerInstance=E,this._attachDialogContent(t,y,E,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(y),y.closed.subscribe(()=>this._removeOpenDialog(y,!0)),this.afterOpened.next(y),y}closeAll(){VG(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(r=>r.id===t)}ngOnDestroy(){VG(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),VG(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const r=new LG({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(r.backdropClass=t.backdropClass),r}_attachContainer(t,r,s){const c=s.injector||s.viewContainerRef?.injector,h=[{provide:tU,useValue:s},{provide:zG,useValue:r},{provide:eU,useValue:t}];let y;s.container?"function"==typeof s.container?y=s.container:(y=s.container.type,h.push(...s.container.providers(s))):y=ete;const E=new rG(y,s.viewContainerRef,hr.create({parent:c||this._injector,providers:h}),s.componentFactoryResolver);return t.attach(E).instance}_attachDialogContent(t,r,s,c){if(t instanceof Yu){const h=this._createInjector(c,r,s,void 0);let y={$implicit:c.data,dialogRef:r};c.templateContext&&(y={...y,..."function"==typeof c.templateContext?c.templateContext():c.templateContext}),s.attachTemplatePortal(new B4(t,null,y,h))}else{const h=this._createInjector(c,r,s,this._injector),y=s.attachComponentPortal(new rG(t,c.viewContainerRef,h,c.componentFactoryResolver));r.componentRef=y,r.componentInstance=y.instance}}_createInjector(t,r,s,c){const h=t.injector||t.viewContainerRef?.injector,y=[{provide:Sue,useValue:t.data},{provide:zG,useValue:r}];return t.providers&&("function"==typeof t.providers?y.push(...t.providers(r,t,s)):y.push(...t.providers)),t.direction&&(!h||!h.get(rd,null,{optional:!0}))&&y.push({provide:rd,useValue:{value:t.direction,change:zt()}}),hr.create({parent:h||c,providers:y})}_removeOpenDialog(t,r){const s=this.openDialogs.indexOf(t);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((c,h)=>{c?h.setAttribute("aria-hidden",c):h.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const r=t.parentElement.children;for(let s=r.length-1;s>-1;s--){const c=r[s];c!==t&&"SCRIPT"!==c.nodeName&&"STYLE"!==c.nodeName&&!c.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(c,c.getAttribute("aria-hidden")),c.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bh),pe(hr),pe(Due,8),pe(e,12),pe(m$),pe(tte))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function VG(e,n){let t=e.length;for(;t--;)n(e[t])}let Tue=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[nte],imports:[BG,s$,Q9,s$]})}return e})();function kue(e,n){}class jG{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const UG="mdc-dialog--open",ite="mdc-dialog--opening",rte="mdc-dialog--closing";let ote=(()=>{class e extends ete{constructor(t,r,s,c,h,y,E,M,R){super(t,r,s,c,h,y,E,R),this._animationMode=M,this._animationStateChanged=new cn,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?ate(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?ate(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(ste,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(ite,UG)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(UG),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(UG),this._animationsEnabled?(this._hostElement.style.setProperty(ste,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rte)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(ite,rte)}_waitForAnimationToComplete(t,r){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const r=super.attachComponentPortal(t);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(mi,8),ue(jG),ue(h1),ue(Bt),ue(eU),ue(Ko,8),ue(k_))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(r,s){2&r&&(Vb("id",s._config.id),hi("aria-modal",s._config.ariaModal)("role",s._config.role)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null),In("_mat-animation-noopable",!s._animationsEnabled))},standalone:!0,features:[wn,xi],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1),en(2,kue,0,0,"ng-template",2),ke()())},dependencies:[z4],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0;transform:scale(0.8)}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--closing .mdc-dialog__surface{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{opacity:1}.mdc-dialog--open .mdc-dialog__surface{transform:none}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{width:100%;height:100%}.mat-mdc-dialog-component-host{display:contents}.mat-mdc-dialog-container{--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition:opacity linear var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container .mdc-dialog__surface{transition:transform var(--mat-dialog-transition-duration, 0ms) 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container,.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__surface{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2})}return e})();const ste="--mat-dialog-transition-duration";function ate(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?r1(e.substring(0,e.length-2)):e.endsWith("s")?1e3*r1(e.substring(0,e.length-1)):"0"===e?0:null}var nU=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}(nU||{});class g${constructor(n,t,r){this._ref=n,this._containerInstance=r,this._afterOpened=new It,this._beforeClosed=new It,this._state=nU.OPEN,this.disableClose=t.disableClose,this.id=n.id,r._animationStateChanged.pipe(ii(s=>"opened"===s.state),Bo(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),r._animationStateChanged.pipe(ii(s=>"closed"===s.state),Bo(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Oh(this.backdropClick(),this.keydownEvents().pipe(ii(s=>27===s.keyCode&&!this.disableClose&&!kh(s)))).subscribe(s=>{this.disableClose||(s.preventDefault(),lte(this,"keydown"===s.type?"keyboard":"mouse"))})}close(n){this._result=n,this._containerInstance._animationStateChanged.pipe(ii(t=>"closing"===t.state),Bo(1)).subscribe(t=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=nU.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let t=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?t.left(n.left):t.right(n.right):t.centerHorizontally(),n&&(n.top||n.bottom)?n.top?t.top(n.top):t.bottom(n.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",t=""){return this._ref.updateSize(n,t),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=nU.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function lte(e,n,t){return e._closeInteractionType=n,e.close(t)}const cte=new $e("MatMdcDialogData"),Rue=new $e("mat-mdc-dialog-default-options"),ute=new $e("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.block()}});let Fue=0,_$=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,r,s,c,h,y,E,M){this._overlay=t,this._defaultOptions=c,this._scrollStrategy=h,this._parentDialog=y,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new It,this._afterOpenedAtThisLevel=new It,this.dialogConfigClass=jG,this.afterAllClosed=qL(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wl(void 0))),this._dialog=r.get(nte),this._dialogRefConstructor=g$,this._dialogContainerType=ote,this._dialogDataToken=cte}open(t,r){let s;(r={...this._defaultOptions||new jG,...r}).id=r.id||"mat-mdc-dialog-"+Fue++,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();const c=this._dialog.open(t,{...r,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:tU,useValue:r}]},templateContext:()=>({dialogRef:s}),providers:(h,y,E)=>(s=new this._dialogRefConstructor(h,r,E),s.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:E},{provide:this._dialogDataToken,useValue:y.data},{provide:this._dialogRefConstructor,useValue:s}])});return s.componentRef=c.componentRef,s.componentInstance=c.componentInstance,this.openDialogs.push(s),this.afterOpened.next(s),s.afterClosed().subscribe(()=>{const h=this.openDialogs.indexOf(s);h>-1&&(this.openDialogs.splice(h,1),this.openDialogs.length||this._getAfterAllClosed().next())}),s}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(r=>r.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let r=t.length;for(;r--;)t[r].close()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bh),pe(hr),pe(mm,8),pe(Rue,8),pe(ute),pe(e,12),pe(m$),pe(Ko,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Pue=0,dte=(()=>{class e{constructor(t,r,s){this.dialogRef=t,this._elementRef=r,this._dialog=s,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=fte(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const r=t._matDialogClose||t._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(t){lte(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$,8),ue(zn),ue(_$))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,s){1&r&&yn("click",function(h){return s._onButtonClick(h)}),2&r&&hi("aria-label",s.ariaLabel||null)("type",s.type)},inputs:{ariaLabel:[ht.None,"aria-label","ariaLabel"],type:"type",dialogResult:[ht.None,"mat-dialog-close","dialogResult"],_matDialogClose:[ht.None,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[vo]})}return e})(),iU=(()=>{class e{constructor(t,r,s){this._dialogRef=t,this._elementRef=r,this._dialog=s,this.id="mat-mdc-dialog-title-"+Pue++}ngOnInit(){this._dialogRef||(this._dialogRef=fte(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)})}ngOnDestroy(){const t=this._dialogRef?._containerInstance;t&&Promise.resolve().then(()=>{t._removeAriaLabelledBy?.(this.id)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$,8),ue(zn),ue(_$))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,s){2&r&&Vb("id",s.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0})}return e})(),rU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0})}return e})();function fte(e,n){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?n.find(r=>r.id===t.id):null}let HG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[_$],imports:[Tue,BG,s$,rs,rs]})}return e})();const $ue=["*"];let oU;function y$(e){return function Bue(){if(void 0===oU&&(oU=null,typeof window<"u")){const e=window;void 0!==e.trustedTypes&&(oU=e.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return oU}()?.createHTML(e)||e}function pte(e){return Error(`Unable to find icon with the name "${e}"`)}function mte(e){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${e}".`)}function gte(e){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${e}".`)}class sM{constructor(n,t,r){this.url=n,this.svgText=t,this.options=r}}let b$=(()=>{class e{constructor(t,r,s,c){this._httpClient=t,this._sanitizer=r,this._errorHandler=c,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=s}addSvgIcon(t,r,s){return this.addSvgIconInNamespace("",t,r,s)}addSvgIconLiteral(t,r,s){return this.addSvgIconLiteralInNamespace("",t,r,s)}addSvgIconInNamespace(t,r,s,c){return this._addSvgIconConfig(t,r,new sM(s,null,c))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,r,s,c){const h=this._sanitizer.sanitize(Ro.HTML,s);if(!h)throw gte(s);const y=y$(h);return this._addSvgIconConfig(t,r,new sM("",y,c))}addSvgIconSet(t,r){return this.addSvgIconSetInNamespace("",t,r)}addSvgIconSetLiteral(t,r){return this.addSvgIconSetLiteralInNamespace("",t,r)}addSvgIconSetInNamespace(t,r,s){return this._addSvgIconSetConfig(t,new sM(r,null,s))}addSvgIconSetLiteralInNamespace(t,r,s){const c=this._sanitizer.sanitize(Ro.HTML,r);if(!c)throw gte(r);const h=y$(c);return this._addSvgIconSetConfig(t,new sM("",h,s))}registerFontClassAlias(t,r=t){return this._fontCssClassesByAlias.set(t,r),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const r=this._sanitizer.sanitize(Ro.RESOURCE_URL,t);if(!r)throw mte(t);const s=this._cachedIconsByUrl.get(r);return s?zt(sU(s)):this._loadSvgIconFromConfig(new sM(t,null)).pipe(Do(c=>this._cachedIconsByUrl.set(r,c)),ye(c=>sU(c)))}getNamedSvgIcon(t,r=""){const s=_te(r,t);let c=this._svgIconConfigs.get(s);if(c)return this._getSvgFromConfig(c);if(c=this._getIconConfigFromResolvers(r,t),c)return this._svgIconConfigs.set(s,c),this._getSvgFromConfig(c);const h=this._iconSetConfigs.get(r);return h?this._getSvgFromIconSetConfigs(t,h):C1(pte(s))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?zt(sU(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(ye(r=>sU(r)))}_getSvgFromIconSetConfigs(t,r){const s=this._extractIconWithNameFromAnySet(t,r);return s?zt(s):c$(r.filter(h=>!h.svgText).map(h=>this._loadSvgIconSetFromConfig(h).pipe(Sf(y=>{const M=`Loading icon set URL: ${this._sanitizer.sanitize(Ro.RESOURCE_URL,h.url)} failed: ${y.message}`;return this._errorHandler.handleError(new Error(M)),zt(null)})))).pipe(ye(()=>{const h=this._extractIconWithNameFromAnySet(t,r);if(!h)throw pte(t);return h}))}_extractIconWithNameFromAnySet(t,r){for(let s=r.length-1;s>=0;s--){const c=r[s];if(c.svgText&&c.svgText.toString().indexOf(t)>-1){const h=this._svgElementFromConfig(c),y=this._extractSvgIconFromSet(h,t,c.options);if(y)return y}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Do(r=>t.svgText=r),ye(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?zt(null):this._fetchIcon(t).pipe(Do(r=>t.svgText=r))}_extractSvgIconFromSet(t,r,s){const c=t.querySelector(`[id="${r}"]`);if(!c)return null;const h=c.cloneNode(!0);if(h.removeAttribute("id"),"svg"===h.nodeName.toLowerCase())return this._setSvgAttributes(h,s);if("symbol"===h.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(h),s);const y=this._svgElementFromString(y$(""));return y.appendChild(h),this._setSvgAttributes(y,s)}_svgElementFromString(t){const r=this._document.createElement("DIV");r.innerHTML=t;const s=r.querySelector("svg");if(!s)throw Error(" tag not found");return s}_toSvgElement(t){const r=this._svgElementFromString(y$("")),s=t.attributes;for(let c=0;cy$(M)),nd(()=>this._inProgressUrlFetches.delete(h)),oe());return this._inProgressUrlFetches.set(h,E),E}_addSvgIconConfig(t,r,s){return this._svgIconConfigs.set(_te(t,r),s),this}_addSvgIconSetConfig(t,r){const s=this._iconSetConfigs.get(t);return s?s.push(r):this._iconSetConfigs.set(t,[r]),this}_svgElementFromConfig(t){if(!t.svgElement){const r=this._svgElementFromString(t.svgText);this._setSvgAttributes(r,t.options),t.svgElement=r}return t.svgElement}_getIconConfigFromResolvers(t,r){for(let s=0;sn?n.pathname+n.search:""}}}),yte=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],que=yte.map(e=>`[${e}]`).join(", "),Gue=/^url\(['"]?#(.*?)['"]?\)$/;let v$=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const r=this._cleanupFontValue(t);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const r=this._cleanupFontValue(t);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(t,r,s,c,h,y){this._elementRef=t,this._iconRegistry=r,this._location=c,this._errorHandler=h,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=xn.EMPTY,y&&(y.color&&(this.color=this._defaultColor=y.color),y.fontSet&&(this.fontSet=y.fontSet)),s||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const r=t.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let r=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){const s=t.childNodes[r];(1!==s.nodeType||"svg"===s.nodeName.toLowerCase())&&s.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(s=>s.length>0);this._previousFontSetClass.forEach(s=>t.classList.remove(s)),r.forEach(s=>t.classList.add(s)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const r=this._elementsWithExternalReferences;r&&r.forEach((s,c)=>{s.forEach(h=>{c.setAttribute(h.name,`url('${t}#${h.value}')`)})})}_cacheChildrenWithExternalReferences(t){const r=t.querySelectorAll(que),s=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let c=0;c{const y=r[c],E=y.getAttribute(h),M=E?E.match(Gue):null;if(M){let R=s.get(y);R||(R=[],s.set(y,R)),R.push({name:h,value:M[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[r,s]=this._splitIconName(t);r&&(this._svgNamespace=r),s&&(this._svgName=s),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(s,r).pipe(Bo(1)).subscribe(c=>this._setSvgElement(c),c=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${r}:${s}! ${c.message}`))})}}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(b$),Hc("aria-hidden"),ue(Hue),ue(nl),ue(Uue,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,s){2&r&&(hi("data-mat-icon-type",s._usingFontIcon()?"font":"svg")("data-mat-icon-name",s._svgName||s.fontIcon)("data-mat-icon-namespace",s._svgNamespace||s.fontSet)("fontIcon",s._usingFontIcon()?s.fontIcon:null),wo(s.color?"mat-"+s.color:""),In("mat-icon-inline",s.inline)("mat-icon-no-color","primary"!==s.color&&"accent"!==s.color&&"warn"!==s.color))},inputs:{color:"color",inline:[ht.HasDecoratorInputTransform,"inline","inline",cr],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[Vs,xi],ngContentSelectors:$ue,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}return e})(),h2=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),Xue=(()=>{class e{constructor(t){this.dialogRef=t}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-help-modal"]],decls:42,vars:0,consts:[[1,"agc-about","wrapper"],[1,"container"],[1,"close"],[1,"material-icons","close-icon",3,"click"],[1,"content"],["mat-dialog-title","",1,"title"],[1,"mat-typography"],[1,"help-title"],[1,"help-text"],[1,"gif-container"],["src","assets/images/help-year-range-selector.gif","alt","help-year-range-selector.gif"],["src","assets/images/help-variables-filterby3.gif","alt","help-variables-filterby3.gif"],["src","assets/images/help-filter-controls.gif","alt","help-filter-controls.gif"],["src","assets/images/help-pan-zoom.gif","alt","help-pan-zoom.gif"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon",3),yn("click",function(){return s.close()}),wt(4,"clear"),ke()(),Ae(5,"div",4)(6,"h2",5),wt(7,"Help"),ke(),Ae(8,"mat-dialog-content",6)(9,"mat-accordion")(10,"mat-expansion-panel")(11,"mat-expansion-panel-header")(12,"mat-panel-title",7),wt(13,"SELECT YEAR RANGE"),ke()(),Ae(14,"div",8),wt(15," Set year ranges by clicking with your mouse cursor then dragging and releasing. Click again to reset. "),ke(),Ae(16,"div",9),Wt(17,"img",10),ke()(),Ae(18,"mat-expansion-panel")(19,"mat-expansion-panel-header")(20,"mat-panel-title",7),wt(21,"SELECT VARIABLES & FILTERS"),ke()(),Ae(22,"div",8),wt(23," Click on Variables and filter by items. SHIFT + CLICK to add more items. "),ke(),Ae(24,"div",9),Wt(25,"img",11),ke()(),Ae(26,"mat-expansion-panel")(27,"mat-expansion-panel-header")(28,"mat-panel-title",7),wt(29,"USE CONTROLS TO FILTER"),ke()(),Ae(30,"div",8),wt(31," Click on controls to update visualizations. Use SHIFT + CLICK to add more items. "),ke(),Ae(32,"div",9),Wt(33,"img",12),ke()(),Ae(34,"mat-expansion-panel")(35,"mat-expansion-panel-header")(36,"mat-panel-title",7),wt(37,"PAN AND ZOOM"),ke()(),Ae(38,"div",8),wt(39," Hold down SHIFT key then use the scroll-wheel to zoom. SHIFT + CLICK (Hold) to pan. "),ke(),Ae(40,"div",9),Wt(41,"img",13),ke()()()()()()())},dependencies:[iU,rU,v$,lG,V4,j4,aG],styles:["mat-dialog-container{padding:0;overflow:hidden} .mat-expansion-panel-header{background-color:#fafafa}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:2rem;min-height:43rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{padding:1rem 1.5rem;margin:0 -24px;overflow:hidden;font-family:inherit;line-height:inherit;letter-spacing:inherit;font-size:inherit;color:inherit}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .help-title[_ngcontent-%COMP%]{font-weight:700;font-size:.875rem;line-height:1.5rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .help-text[_ngcontent-%COMP%]{font-size:1rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .gif-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:2rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{float:right;margin-top:1rem;margin-right:1rem;cursor:pointer}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:2.25rem;margin-bottom:.5rem;text-align:left;font-weight:lighter;font-family:inherit;letter-spacing:normal;color:inherit;padding:0;line-height:2rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]:before{height:inherit}"]})}return e})();function Yue(e,n){if(1&e){const t=Oa();Ae(0,"div",17),yn("click",function(){const c=hs(t).index;return so(on().setSlide(c))}),ke()}if(2&e){const t=n.index;In("active",on().currentSlide===t)}}let Kue=(()=>{class e{constructor(t){this.dialogRef=t,this.slides=[{title:"Select year range...",text:"Set year ranges by clicking with your mouse cursor then dragging and releasing. Click again to reset.",img:"assets/images/help-year-range-selector.gif"},{title:"Select variables and filters...",text:"Click on Variables and filter by items. SHIFT + CLICK to add more items.",img:"assets/images/help-variables-filterby3.gif"},{title:"Use controls to filter...",text:"Click on controls to update visualizations. Use SHIFT + CLICK to add more items.",img:"assets/images/help-filter-controls.gif"},{title:"Pan and zoom...",text:"Hold down SHIFT key then use the scroll-wheel to zoom. SHIFT + CLICK (Hold) to pan.",img:"assets/images/help-pan-zoom.gif"}],this.currentSlide=0}close(){this.dialogRef.close()}incrementSlide(){this.currentSlide!==this.slides.length-1&&(this.currentSlide=this.currentSlide+1)}decrementSlide(){0!==this.currentSlide&&(this.currentSlide=this.currentSlide-1)}setSlide(t){t<0||t>=this.slides.length||(this.currentSlide=t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-help-tour-modal"]],decls:24,vars:9,consts:[[1,"agc-tour","wrapper"],[1,"container"],[1,"close"],[1,"material-icons","close-icon",3,"click"],[1,"content"],["mat-dialog-title","",1,"title"],[1,"mat-typography"],[1,"help-text"],[1,"carousel"],[1,"material-icons","chevron-icon",3,"click"],[1,"gif-container"],[3,"src","alt"],[1,"slide-row"],[1,"slide-dots"],["class","slide",3,"active","click",4,"ngFor","ngForOf"],[1,"button-row"],[1,"btn-outline",3,"click"],[1,"slide",3,"click"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon",3),yn("click",function(){return s.close()}),wt(4,"clear"),ke()(),Ae(5,"div",4)(6,"h2",5),wt(7),ke(),Ae(8,"mat-dialog-content",6)(9,"div",7),wt(10),ke(),Ae(11,"div",8)(12,"mat-icon",9),yn("click",function(){return s.decrementSlide()}),wt(13,"chevron_left"),ke(),Ae(14,"div",10),Wt(15,"img",11),ke(),Ae(16,"mat-icon",9),yn("click",function(){return s.incrementSlide()}),wt(17,"chevron_right"),ke()(),Ae(18,"div",12)(19,"div",13),en(20,Yue,1,2,"div",14),ke()(),Ae(21,"div",15)(22,"button",16),yn("click",function(){return s.close()}),wt(23,"Got it!"),ke()()()()()()),2&r&&(Ze(7),Pr(s.slides[s.currentSlide].title),Ze(3),Pr(s.slides[s.currentSlide].text),Ze(2),In("disabled",0===s.currentSlide),Ze(3),vt("src",s.slides[s.currentSlide].img,jd)("alt",s.slides[s.currentSlide].img.split("/")[6]),Ze(),In("disabled",s.currentSlide===s.slides.length-1),Ze(4),vt("ngForOf",s.slides))},dependencies:[o0,iU,rU,v$],styles:["mat-dialog-container{padding:0;overflow:hidden} .mat-expansion-panel-header{background-color:#fafafa}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{overflow:hidden;font-family:inherit;line-height:inherit;letter-spacing:inherit;font-size:inherit;color:inherit;padding:1rem 0}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{float:right;margin-top:1rem;margin-right:1rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:2.25rem;margin-bottom:.5rem;text-align:left;font-weight:lighter;font-family:inherit;letter-spacing:normal;color:inherit;padding:0;line-height:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]:before{height:inherit}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .help-text[_ngcontent-%COMP%]{font-size:1rem}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .gif-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{font-size:4rem;height:4rem;width:4rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .chevron-icon.disabled[_ngcontent-%COMP%]{color:#d3d3d3}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%]{justify-content:space-around;display:flex}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center;width:9rem}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%]{width:1rem;height:1rem;border-radius:50%;border:1px solid darkgray;background-color:#fff;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%] .slide.active[_ngcontent-%COMP%]{background-color:#2a4d87}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%]{justify-content:flex-end;display:flex}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%] .btn-outline[_ngcontent-%COMP%]{border-radius:5px;border:1px solid #6880aa;color:#6880aa;background-color:#fff;width:9rem;height:2.5rem;font-size:1rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%] .btn-outline[_ngcontent-%COMP%]:hover{background-color:#6880aa;color:#fff}"],changeDetection:0})}return e})();const bte="HELP_POPUP_SHOWN";let vte=(()=>{let e=class j$ extends OG{get hasShownHelpModal$(){return this.state$.pipe(a$("hasShownHelpModal"))}ngxsOnInit(){super.ngxsOnInit();const t="true"===localStorage.getItem(bte)?.toLowerCase();this.patchState({hasShownHelpModal:t})}setHasShownHelpModal(t){localStorage.setItem(bte,t.toString()),this.ctx.patchState({hasShownHelpModal:t})}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(j$)))(s||j$)}})();static#t=this.\u0275prov=Ue({token:j$,factory:j$.\u0275fac})};return Nn([Fm()],e.prototype,"hasShownHelpModal$",null),Nn([Qs()],e.prototype,"setHasShownHelpModal",null),e=Nn([f2(),rM({name:"page",defaults:{hasShownHelpModal:!1}})],e),e})();const Zue=["mat-button",""],Que=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],Jue=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],tde=["mat-icon-button",""],nde=["*"],ide=new $e("MAT_BUTTON_CONFIG"),rde=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let xte=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,r,s,c){this._elementRef=t,this._platform=r,this._ngZone=s,this._animationMode=c,this._focusMonitor=Xe(k_),this._rippleLoader=Xe(bf),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const h=Xe(ide,{optional:!0}),y=t.nativeElement,E=y.classList;this.disabledInteractive=h?.disabledInteractive??!1,this._rippleLoader?.configureRipple(y,{className:"mat-mdc-button-ripple"});for(const{attribute:M,mdcClasses:R}of rde)y.hasAttribute(M)&&E.add(...R)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",r){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static#e=this.\u0275fac=function(r){Og()};static#t=this.\u0275dir=Vt({type:e,inputs:{color:"color",disableRipple:[ht.HasDecoratorInputTransform,"disableRipple","disableRipple",cr],disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr],ariaDisabled:[ht.HasDecoratorInputTransform,"aria-disabled","ariaDisabled",cr],disabledInteractive:[ht.HasDecoratorInputTransform,"disabledInteractive","disabledInteractive",cr]},features:[Vs]})}return e})(),wte=(()=>{class e extends xte{constructor(t,r,s,c){super(t,r,s,c)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Xs),ue(Bt),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,s){2&r&&(hi("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),wo(s.color?"mat-"+s.color:""),In("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[wn,xi],attrs:Zue,ngContentSelectors:Jue,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){1&r&&(Ra(Que),Wt(0,"span",0),ki(1),Ae(2,"span",1),ki(3,1),ke(),ki(4,2),Wt(5,"span",2)(6,"span",3)),2&r&&In("mdc-button__ripple",!s._isFab)("mdc-fab__ripple",s._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),Ete=(()=>{class e extends xte{constructor(t,r,s,c){super(t,r,s,c),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Xs),ue(Bt),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,s){2&r&&(hi("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),wo(s.color?"mat-"+s.color:""),In("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[wn,xi],attrs:tde,ngContentSelectors:nde,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){1&r&&(Ra(),Wt(0,"span",0),ki(1),Wt(2,"span",1)(3,"span",2))},styles:['.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size);width:var(--mdc-icon-button-state-layer-size);color:var(--mdc-icon-button-icon-color)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button{padding:12px;border-radius:50%;flex-shrink:0;text-align:center;font-size:var(--mdc-icon-button-icon-size);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),x$=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,mL,rs]})}return e})();var sde=tn(563);function w$(){return Sr(Wi)}var ade=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var c in s)s.hasOwnProperty(c)&&(r[c]=s[c])})(n,t)};return function(n,t){function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),lde=Object.prototype.hasOwnProperty;function aU(e,n){return lde.call(e,n)}function WG(e){if(Array.isArray(e)){for(var n=new Array(e.length),t=0;t=48&&r<=57))return!1;n++}return!0}function U0(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Cte(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function GG(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var n=0,t=e.length;n0&&"constructor"==E[R-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(t&&void 0===j&&(void 0===M[X]?j=E.slice(0,R).join("/"):R==$-1&&(j=n.path),void 0!==j&&K(n,0,e,j)),R++,Array.isArray(M)){if("-"===X)X=M.length;else{if(t&&!qG(X))throw new Es("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",c,n,e);qG(X)&&(X=~~X)}if(R>=$){if(t&&"add"===n.op&&X>M.length)throw new Es("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",c,n,e);if(!1===(h=ude[n.op].call(n,M,X,e)).test)throw new Es("Test operation failed","TEST_OPERATION_FAILED",c,n,e);return h}}else if(R>=$){if(!1===(h=p2[n.op].call(n,M,X,e)).test)throw new Es("Test operation failed","TEST_OPERATION_FAILED",c,n,e);return h}if(M=M[X],t&&R<$&&(!M||"object"!=typeof M))throw new Es("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",c,n,e)}}function cU(e,n,t,r,s){if(void 0===r&&(r=!0),void 0===s&&(s=!0),t&&!Array.isArray(n))throw new Es("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Df(e));for(var c=new Array(n.length),h=0,y=n.length;h0)throw new Es('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,e,t);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new Es("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new Es("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&GG(e.value))throw new Es("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,e,t);if(t)if("add"==e.op){var s=e.path.split("/").length,c=r.split("/").length;if(s!==c+1&&s!==c)throw new Es("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,e,t)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new Es("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,e,t)}else if("move"===e.op||"copy"===e.op){var y=Ate([{op:"_get",path:e.from,value:void 0}],t);if(y&&"OPERATION_PATH_UNRESOLVABLE"===y.name)throw new Es("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,e,t)}}function Ate(e,n,t){try{if(!Array.isArray(e))throw new Es("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)cU(Df(n),Df(e),t||!0);else{t=t||uU;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function KG(e,n,t,r,s){if(n!==e){"function"==typeof n.toJSON&&(n=n.toJSON());for(var c=WG(n),h=WG(e),E=!1,M=h.length-1;M>=0;M--){var $=e[R=h[M]];if(!aU(n,R)||void 0===n[R]&&void 0!==$&&!1===Array.isArray(n))Array.isArray(e)===Array.isArray(n)?(s&&t.push({op:"test",path:r+"/"+U0(R),value:Df($)}),t.push({op:"remove",path:r+"/"+U0(R)}),E=!0):(s&&t.push({op:"test",path:r,value:e}),t.push({op:"replace",path:r,value:n}));else{var j=n[R];"object"==typeof $&&null!=$&&"object"==typeof j&&null!=j&&Array.isArray($)===Array.isArray(j)?KG($,j,t,r+"/"+U0(R),s):$!==j&&(s&&t.push({op:"test",path:r+"/"+U0(R),value:Df($)}),t.push({op:"replace",path:r+"/"+U0(R),value:Df(j)}))}}if(E||c.length!=h.length)for(M=0;Me*n,"+":(e,n)=>e+n,"-":(e,n)=>e-n,"/":(e,n)=>e/n,"%":(e,n)=>e%n,">":(e,n)=>e>n,"<":(e,n)=>ee<=n,">=":(e,n)=>e>=n,"==":(e,n)=>e==n,"!=":(e,n)=>e!=n,"===":(e,n)=>e===n,"!==":(e,n)=>e!==n,"&":(e,n)=>e&n,"|":(e,n)=>e|n,"^":(e,n)=>e^n,"<<":(e,n)=>e<>":(e,n)=>e>>n,">>>":(e,n)=>e>>>n},Cde={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const Sde=Array.prototype.slice,lM=(e,n,t)=>{const r=t?t(n[0]):n[0];return r[e].apply(r,Sde.call(n,1))};var Mde={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,n,t)=>Math.max(n,Math.min(t,e)),now:Date.now,utc:Date.UTC,datetime:(e,n,t,r,s,c,h)=>new Date(e,n||0,t??1,r||0,s||0,c||0,h||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 lM("join",arguments)},indexof:function(){return lM("indexOf",arguments)},lastindexof:function(){return lM("lastIndexOf",arguments)},slice:function(){return lM("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return lM("substring",arguments,String)},split:function(){return lM("split",arguments,String)},replace:function(){return lM("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,n)=>RegExp(e).test(n)};const Ade=["view","item","group","xy","x","y"],QG=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&QG.add(setImmediate);const Tde={Literal:(e,n)=>n.value,Identifier:(e,n)=>{const t=n.name;return e.memberDepth>0?t:"datum"===t?e.datum:"event"===t?e.event:"item"===t?e.item:wde[t]||e.params["$"+t]},MemberExpression:(e,n)=>{const t=!n.computed,r=e(n.object);t&&(e.memberDepth+=1);const s=e(n.property);if(t&&(e.memberDepth-=1),!QG.has(r[s]))return r[s];console.error(`Prevented interpretation of member "${s}" which could lead to insecure code execution`)},CallExpression:(e,n)=>{const t=n.arguments;let r=n.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(t[0])?e(t[1]):e(t[2]):(e.fn[r]||Mde[r]).apply(e.fn,t.map(e))},ArrayExpression:(e,n)=>n.elements.map(e),BinaryExpression:(e,n)=>Ede[n.operator](e(n.left),e(n.right)),UnaryExpression:(e,n)=>Cde[n.operator](e(n.argument)),ConditionalExpression:(e,n)=>e(n.test)?e(n.consequent):e(n.alternate),LogicalExpression:(e,n)=>"&&"===n.operator?e(n.left)&&e(n.right):e(n.left)||e(n.right),ObjectExpression:(e,n)=>n.properties.reduce((t,r)=>{e.memberDepth+=1;const s=e(r.key);return e.memberDepth-=1,QG.has(e(r.value))?console.error(`Prevented interpretation of property "${s}" which could lead to insecure code execution`):t[s]=e(r.value),t},{})};function C$(e,n,t,r,s,c){const h=y=>Tde[y.type](h,y);return h.memberDepth=0,h.fn=Object.create(n),h.params=t,h.datum=r,h.event=s,h.item=c,Ade.forEach(y=>h.fn[y]=function(){return s.vega[y](...arguments)}),h(e)}var kde={operator(e,n){const t=n.ast,r=e.functions;return s=>C$(t,r,s)},parameter(e,n){const t=n.ast,r=e.functions;return(s,c)=>C$(t,r,c,s)},event(e,n){const t=n.ast,r=e.functions;return s=>C$(t,r,void 0,void 0,s)},handler(e,n){const t=n.ast,r=e.functions;return(s,c)=>C$(t,r,s,c.item&&c.item.datum,c)},encode(e,n){const{marktype:t,channels:r}=n,s=e.functions,c="group"===t||"image"===t||"rect"===t;return(h,y)=>{const E=h.datum;let R,M=0;for(const $ in r)R=C$(r[$].ast,s,y,E,void 0,h),h[$]!==R&&(h[$]=R,M=1);return"rule"!==t&&function xde(e,n,t){let r;n.x2&&(n.x?(t&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),n.xc&&(e.x=e.xc-(e.width||0)/2),n.y2&&(n.y?(t&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),n.yc&&(e.y=e.yc-(e.height||0)/2)}(h,r,c),M}}},Ide=tn(998);const Tte=function Ode(e){const[n,t]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:n,version:t}};const m2="#fff",Qde={background:"#333",view:{stroke:"#888"},title:{color:m2,subtitleColor:m2},style:{"guide-label":{fill:m2},"guide-title":{fill:m2}},axis:{domainColor:m2,gridColor:"#888",tickColor:m2}},cM="#4572a7",Jde={background:"#fff",arc:{fill:cM},area:{fill:cM},line:{stroke:cM,strokeWidth:2},path:{stroke:cM},rect:{fill:cM},shape:{stroke:cM},symbol:{fill:cM,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"]}},uM="#30a2da",JG="#cbcbcb",nfe={arc:{fill:uM},area:{fill:uM},axis:{domainColor:JG,grid:!0,gridColor:JG,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:JG,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:uM,strokeWidth:2},path:{stroke:uM,strokeWidth:.5},rect:{fill:uM},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:uM},bar:{binSpacing:2,fill:uM,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},dM="#000",ife={group:{fill:"#e5e5e5"},arc:{fill:dM},area:{fill:dM},line:{stroke:dM},path:{stroke:dM},rect:{fill:dM},shape:{stroke:dM},symbol:{fill:dM,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"]}},Rte="Benton Gothic, sans-serif",fM="#82c6df",eX="Benton Gothic Bold, sans-serif",S$={"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"]},afe={background:"#ffffff",title:{anchor:"start",color:"#000000",font:eX,fontSize:22,fontWeight:"normal"},arc:{fill:fM},area:{fill:fM},line:{stroke:fM,strokeWidth:2},path:{stroke:fM},rect:{fill:fM},shape:{stroke:fM},symbol:{fill:fM,size:30},axis:{labelFont:Rte,labelFontSize:11.5,labelFontWeight:"normal",titleFont:eX,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:Rte,labelFontSize:11.5,symbolType:"square",titleFont:eX,titleFontSize:13,titleFontWeight:"normal"},range:{category:S$["category-6"],diverging:S$["fireandice-6"],heatmap:S$["fire-7"],ordinal:S$["fire-7"],ramp:S$["fire-7"]}},hM="#ab5787",dU="#979797",lfe={background:"#f9f9f9",arc:{fill:hM},area:{fill:hM},line:{stroke:hM},path:{stroke:hM},rect:{fill:hM},shape:{stroke:hM},symbol:{fill:hM,size:30},axis:{domainColor:dU,domainWidth:.5,gridWidth:.2,labelColor:dU,tickColor:dU,tickWidth:.2,titleColor:dU},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"]}},pM="#3e5c69",cfe={background:"#fff",arc:{fill:pM},area:{fill:pM},line:{stroke:pM},path:{stroke:pM},rect:{fill:pM},shape:{stroke:pM},symbol:{fill:pM},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"]}},zh="#1696d2",fU="Lato",tX="Lato",D$={"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"]},pfe={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:fU},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:tX,labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:fU},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:tX,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:fU,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:tX,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:fU,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:D$["six-groups-cat-1"],diverging:D$["diverging-colors"],heatmap:D$["diverging-colors"],ordinal:D$["six-groups-seq"],ramp:D$["shades-blue"]},area:{fill:zh},rect:{fill:zh},line:{color:zh,stroke:zh,strokeWidth:5},trail:{color:zh,stroke:zh,strokeWidth:0,size:1},path:{stroke:zh,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:zh,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:zh,stroke:null}},arc:{fill:zh},shape:{stroke:zh},symbol:{fill:zh,size:30}},mM="#3366CC",hU="Arial, sans-serif",mfe={arc:{fill:mM},area:{fill:mM},path:{stroke:mM},rect:{fill:mM},shape:{stroke:mM},symbol:{stroke:mM},circle:{fill:mM},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:hU,fontSize:12},"guide-title":{font:hU,fontSize:12},"group-title":{font:hU,fontSize:12}},title:{font:hU,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"]}},nX=e=>e*(1/3+1),Bte=nX(9),zte=nX(10),Vte=nX(12),M$="Segoe UI",jte="wf_standard-font, helvetica, arial, sans-serif",A$="#605E5C",Hte="transparent",Pm="#118DFF",Gte=["#DEEFFF",Pm],Cfe={view:{stroke:Hte},background:Hte,font:M$,header:{titleFont:jte,titleFontSize:Vte,titleColor:"#252423",labelFont:M$,labelFontSize:zte,labelColor:A$},axis:{ticks:!1,grid:!1,domain:!1,labelColor:A$,labelFontSize:Bte,titleFont:jte,titleColor:"#252423",titleFontSize:Vte,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:Pm},line:{stroke:Pm,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:M$,fontSize:Bte,fill:A$},arc:{fill:Pm},area:{fill:Pm,line:!0,opacity:.6},path:{stroke:Pm},rect:{fill:Pm},point:{fill:Pm,filled:!0,size:75},shape:{stroke:Pm},symbol:{fill:Pm,strokeWidth:1.5,size:50},legend:{titleFont:M$,titleFontWeight:"bold",titleColor:A$,labelFont:M$,labelFontSize:zte,labelColor:A$,symbolType:"circle",symbolSize:75},range:{category:[Pm,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:Gte,heatmap:Gte,ordinal:["#DEEFFF","#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Pm]}},iX='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',Sfe=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Dfe=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function pU({type:e,background:n}){const t="dark"===e?"#161616":"#ffffff",r="dark"===e?"#f4f4f4":"#161616",c="dark"===e?"#d4bbff":"#6929c4";return{background:n,arc:{fill:c},area:{fill:c},path:{stroke:c},rect:{fill:c},shape:{stroke:c},symbol:{stroke:c},circle:{fill:c},view:{fill:t,stroke:t},group:{fill:t},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:iX,fontWeight:600},axis:{labelColor:r,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:r,labelAngle:0},style:{"guide-label":{font:iX,fill:r,fontWeight:400},"guide-title":{font:iX,fill:r,fontWeight:400}},range:{category:"dark"===e?Sfe:Dfe,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 Mfe=pU({type:"light",background:"#ffffff"}),Afe=pU({type:"light",background:"#f4f4f4"}),Tfe=pU({type:"dark",background:"#262626"}),kfe=pU({type:"dark",background:"#161616"}),Ife="2.14.0";var mU=tn(537);function Yte(e,n){return JSON.stringify(e,function Jfe(e){const n=[];return function(t,r){if("object"!=typeof r||null===r)return r;const s=n.indexOf(this)+1;return n.length=s,n.length>e?"[Object]":n.indexOf(r)>=0?"[Circular]":(n.push(r),r)}}(n))}const Kte="vg-tooltip-element",the={offsetX:10,offsetY:10,id:Kte,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function nhe(e){return String(e).replace(/&/g,"&").replace(/n((0,mU.HD)(s)?s:Yte(s,t))).join(", ")}]`;if((0,mU.Kn)(e)){let s="";const{title:c,image:h,...y}=e;c&&(s+=`

    ${n(c)}

    `),h&&(s+=``);const E=Object.keys(y);if(E.length>0){s+="";for(const M of E){let R=y[M];void 0!==R&&((0,mU.Kn)(R)&&(R=Yte(R,t)),s+=``)}s+="
    ${n(M)}${n(R)}
    "}return s||"{}"}return n(e)},baseURL:""};class Zte{constructor(n){this.options={...the,...n};const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const r=document.createElement("style");r.setAttribute("id",this.options.styleId),r.innerHTML=function ihe(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(Kte,e)}(t);const s=document.head;s.childNodes.length>0?s.insertBefore(r,s.childNodes[0]):s.appendChild(r)}}tooltipHandler(n,t,r,s){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==s||""===s)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(s,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:c,y:h}=function rhe(e,n,t,r){let s=e.clientX+t;s+n.width>window.innerWidth&&(s=+e.clientX-t-n.width);let c=e.clientY+r;return c+n.height>window.innerHeight&&(c=+e.clientY-r-n.height),{x:s,y:c}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${h}px`,this.el.style.left=`${c}px`}}function ohe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rX,Qte,ahe=br;function br(e){var n=this;if(n instanceof br||(n=new br),n.tail=null,n.head=null,n.length=0,e&&"function"==typeof e.forEach)e.forEach(function(s){n.push(s)});else if(arguments.length>0)for(var t=0,r=arguments.length;t1)t=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,t=this.head.value}for(var s=0;null!==r;s++)t=e(t,r.value,s),r=r.next;return t},br.prototype.reduceReverse=function(e,n){var t,r=this.tail;if(arguments.length>1)t=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,t=this.tail.value}for(var s=this.length-1;null!==r;s--)t=e(t,r.value,s),r=r.prev;return t},br.prototype.toArray=function(){for(var e=new Array(this.length),n=0,t=this.head;null!==t;n++)e[n]=t.value,t=t.next;return e},br.prototype.toArrayReverse=function(){for(var e=new Array(this.length),n=0,t=this.tail;null!==t;n++)e[n]=t.value,t=t.prev;return e},br.prototype.slice=function(e,n){(n=n||this.length)<0&&(n+=this.length),(e=e||0)<0&&(e+=this.length);var t=new br;if(nthis.length&&(n=this.length);for(var r=0,s=this.head;null!==s&&rthis.length&&(n=this.length);for(var r=this.length,s=this.tail;null!==s&&r>n;r--)s=s.prev;for(;null!==s&&r>e;r--,s=s.prev)t.push(s.value);return t},br.prototype.splice=function(e,n,...t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,s=this.head;null!==s&&r1,sX=(e,n,t)=>{const r=e[Lm].get(n);if(r){const s=r.value;if(gU(e,s)){if(_2(e,r),!e[T$])return}else t&&(e[ene]&&(r.value.now=Date.now()),e[fl].unshiftNode(r));return s.value}},gU=(e,n)=>{if(!n||!n.maxAge&&!e[yM])return!1;const t=Date.now()-n.now;return n.maxAge?t>n.maxAge:e[yM]&&t>e[yM]},k$=e=>{if(e[H0]>e[_M])for(let n=e[fl].tail;e[H0]>e[_M]&&null!==n;){const t=n.prev;_2(e,n),n=t}},_2=(e,n)=>{if(n){const t=n.value;e[W0]&&e[W0](t.key,t.value),e[H0]-=t.length,e[Lm].delete(t.key),e[fl].removeNode(n)}};class hhe{constructor(n,t,r,s,c){this.key=n,this.value=t,this.length=r,this.now=s,this.maxAge=c||0}}const tne=(e,n,t,r)=>{let s=t.value;gU(e,s)&&(_2(e,t),e[T$]||(s=void 0)),s&&n.call(r,s.value,s.key,e)};var phe=class fhe{constructor(n){if("number"==typeof n&&(n={max:n}),n||(n={}),n.max&&("number"!=typeof n.max||n.max<0))throw new TypeError("max must be a non-negative number");this[_M]=n.max||1/0;const t=n.length||oX;if(this[g2]="function"!=typeof t?oX:t,this[T$]=n.stale||!1,n.maxAge&&"number"!=typeof n.maxAge)throw new TypeError("maxAge must be a number");this[yM]=n.maxAge||0,this[W0]=n.dispose,this[Jte]=n.noDisposeOnSet||!1,this[ene]=n.updateAgeOnGet||!1,this.reset()}set max(n){if("number"!=typeof n||n<0)throw new TypeError("max must be a non-negative number");this[_M]=n||1/0,k$(this)}get max(){return this[_M]}set allowStale(n){this[T$]=!!n}get allowStale(){return this[T$]}set maxAge(n){if("number"!=typeof n)throw new TypeError("maxAge must be a non-negative number");this[yM]=n,k$(this)}get maxAge(){return this[yM]}set lengthCalculator(n){"function"!=typeof n&&(n=oX),n!==this[g2]&&(this[g2]=n,this[H0]=0,this[fl].forEach(t=>{t.length=this[g2](t.value,t.key),this[H0]+=t.length})),k$(this)}get lengthCalculator(){return this[g2]}get length(){return this[H0]}get itemCount(){return this[fl].length}rforEach(n,t){t=t||this;for(let r=this[fl].tail;null!==r;){const s=r.prev;tne(this,n,r,t),r=s}}forEach(n,t){t=t||this;for(let r=this[fl].head;null!==r;){const s=r.next;tne(this,n,r,t),r=s}}keys(){return this[fl].toArray().map(n=>n.key)}values(){return this[fl].toArray().map(n=>n.value)}reset(){this[W0]&&this[fl]&&this[fl].length&&this[fl].forEach(n=>this[W0](n.key,n.value)),this[Lm]=new Map,this[fl]=new dhe,this[H0]=0}dump(){return this[fl].map(n=>!gU(this,n)&&{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}).toArray().filter(n=>n)}dumpLru(){return this[fl]}set(n,t,r){if((r=r||this[yM])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,c=this[g2](t,n);if(this[Lm].has(n)){if(c>this[_M])return _2(this,this[Lm].get(n)),!1;const E=this[Lm].get(n).value;return this[W0]&&(this[Jte]||this[W0](n,E.value)),E.now=s,E.maxAge=r,E.value=t,this[H0]+=c-E.length,E.length=c,this.get(n),k$(this),!0}const h=new hhe(n,t,c,s,r);return h.length>this[_M]?(this[W0]&&this[W0](n,t),!1):(this[H0]+=h.length,this[fl].unshift(h),this[Lm].set(n,this[fl].head),k$(this),!0)}has(n){if(!this[Lm].has(n))return!1;const t=this[Lm].get(n).value;return!gU(this,t)}get(n){return sX(this,n,!0)}peek(n){return sX(this,n,!1)}pop(){const n=this[fl].tail;return n?(_2(this,n),n.value):null}del(n){_2(this,this[Lm].get(n))}load(n){this.reset();const t=Date.now();for(let r=n.length-1;r>=0;r--){const s=n[r],c=s.e||0;if(0===c)this.set(s.k,s.v);else{const h=c-t;h>0&&this.set(s.k,s.v,h)}}}prune(){this[Lm].forEach((n,t)=>sX(this,t,!1))}};const mhe=Object.freeze({loose:!0}),ghe=Object.freeze({});var aX=e=>e?"object"!=typeof e?mhe:e:ghe,lX={exports:{}},cX={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},_U="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,n){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=cX,c=_U,h=(n=e.exports={}).re=[],y=n.safeRe=[],E=n.src=[],M=n.t={};let R=0;const $="[a-zA-Z0-9-]",j=[["\\s",1],["\\d",s],[$,r]],K=(ie,me,Me)=>{const Ce=(ie=>{for(const[me,Me]of j)ie=ie.split(`${me}*`).join(`${me}{0,${Me}}`).split(`${me}+`).join(`${me}{1,${Me}}`);return ie})(me),rt=R++;c(ie,rt,me),M[ie]=rt,E[rt]=me,h[rt]=new RegExp(me,Me?"g":void 0),y[rt]=new RegExp(Ce,Me?"g":void 0)};K("NUMERICIDENTIFIER","0|[1-9]\\d*"),K("NUMERICIDENTIFIERLOOSE","\\d+"),K("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${$}*`),K("MAINVERSION",`(${E[M.NUMERICIDENTIFIER]})\\.(${E[M.NUMERICIDENTIFIER]})\\.(${E[M.NUMERICIDENTIFIER]})`),K("MAINVERSIONLOOSE",`(${E[M.NUMERICIDENTIFIERLOOSE]})\\.(${E[M.NUMERICIDENTIFIERLOOSE]})\\.(${E[M.NUMERICIDENTIFIERLOOSE]})`),K("PRERELEASEIDENTIFIER",`(?:${E[M.NUMERICIDENTIFIER]}|${E[M.NONNUMERICIDENTIFIER]})`),K("PRERELEASEIDENTIFIERLOOSE",`(?:${E[M.NUMERICIDENTIFIERLOOSE]}|${E[M.NONNUMERICIDENTIFIER]})`),K("PRERELEASE",`(?:-(${E[M.PRERELEASEIDENTIFIER]}(?:\\.${E[M.PRERELEASEIDENTIFIER]})*))`),K("PRERELEASELOOSE",`(?:-?(${E[M.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[M.PRERELEASEIDENTIFIERLOOSE]})*))`),K("BUILDIDENTIFIER",`${$}+`),K("BUILD",`(?:\\+(${E[M.BUILDIDENTIFIER]}(?:\\.${E[M.BUILDIDENTIFIER]})*))`),K("FULLPLAIN",`v?${E[M.MAINVERSION]}${E[M.PRERELEASE]}?${E[M.BUILD]}?`),K("FULL",`^${E[M.FULLPLAIN]}$`),K("LOOSEPLAIN",`[v=\\s]*${E[M.MAINVERSIONLOOSE]}${E[M.PRERELEASELOOSE]}?${E[M.BUILD]}?`),K("LOOSE",`^${E[M.LOOSEPLAIN]}$`),K("GTLT","((?:<|>)?=?)"),K("XRANGEIDENTIFIERLOOSE",`${E[M.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),K("XRANGEIDENTIFIER",`${E[M.NUMERICIDENTIFIER]}|x|X|\\*`),K("XRANGEPLAIN",`[v=\\s]*(${E[M.XRANGEIDENTIFIER]})(?:\\.(${E[M.XRANGEIDENTIFIER]})(?:\\.(${E[M.XRANGEIDENTIFIER]})(?:${E[M.PRERELEASE]})?${E[M.BUILD]}?)?)?`),K("XRANGEPLAINLOOSE",`[v=\\s]*(${E[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[M.XRANGEIDENTIFIERLOOSE]})(?:${E[M.PRERELEASELOOSE]})?${E[M.BUILD]}?)?)?`),K("XRANGE",`^${E[M.GTLT]}\\s*${E[M.XRANGEPLAIN]}$`),K("XRANGELOOSE",`^${E[M.GTLT]}\\s*${E[M.XRANGEPLAINLOOSE]}$`),K("COERCE",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?(?:$|[^\\d])`),K("COERCERTL",E[M.COERCE],!0),K("LONETILDE","(?:~>?)"),K("TILDETRIM",`(\\s*)${E[M.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",K("TILDE",`^${E[M.LONETILDE]}${E[M.XRANGEPLAIN]}$`),K("TILDELOOSE",`^${E[M.LONETILDE]}${E[M.XRANGEPLAINLOOSE]}$`),K("LONECARET","(?:\\^)"),K("CARETTRIM",`(\\s*)${E[M.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",K("CARET",`^${E[M.LONECARET]}${E[M.XRANGEPLAIN]}$`),K("CARETLOOSE",`^${E[M.LONECARET]}${E[M.XRANGEPLAINLOOSE]}$`),K("COMPARATORLOOSE",`^${E[M.GTLT]}\\s*(${E[M.LOOSEPLAIN]})$|^$`),K("COMPARATOR",`^${E[M.GTLT]}\\s*(${E[M.FULLPLAIN]})$|^$`),K("COMPARATORTRIM",`(\\s*)${E[M.GTLT]}\\s*(${E[M.LOOSEPLAIN]}|${E[M.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",K("HYPHENRANGE",`^\\s*(${E[M.XRANGEPLAIN]})\\s+-\\s+(${E[M.XRANGEPLAIN]})\\s*$`),K("HYPHENRANGELOOSE",`^\\s*(${E[M.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[M.XRANGEPLAINLOOSE]})\\s*$`),K("STAR","(<|>)?=?\\s*\\*"),K("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),K("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(lX,lX.exports);var uX=lX.exports;const ine=/^[0-9]+$/,rne=(e,n)=>{const t=ine.test(e),r=ine.test(n);return t&&r&&(e=+e,n=+n),e===n?0:t&&!r?-1:r&&!t?1:erne(n,e)};const yU=_U,{MAX_LENGTH:one,MAX_SAFE_INTEGER:bU}=cX,{safeRe:sne,t:ane}=uX,whe=aX,{compareIdentifiers:y2}=xhe;var dX=class H_{constructor(n,t){if(t=whe(t),n instanceof H_){if(n.loose===!!t.loose&&n.includePrerelease===!!t.includePrerelease)return n;n=n.version}else if("string"!=typeof n)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof n}".`);if(n.length>one)throw new TypeError(`version is longer than ${one} characters`);yU("SemVer",n,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=n.trim().match(t.loose?sne[ane.LOOSE]:sne[ane.FULL]);if(!r)throw new TypeError(`Invalid Version: ${n}`);if(this.raw=n,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>bU||this.major<0)throw new TypeError("Invalid major version");if(this.minor>bU||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>bU||this.patch<0)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const c=+s;if(c>=0&&c=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);if(-1===c){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let c=[t,s];!1===r&&(c=[t]),0===y2(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${n}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const lne=dX;var b2=(e,n,t)=>new lne(e,t).compare(new lne(n,t));const Ehe=b2,She=b2,Mhe=b2,The=b2,Ihe=b2,Rhe=b2;var fX,cne,hX,une,Vhe=(e,n,t,r)=>{switch(n){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return((e,n,t)=>0===Ehe(e,n,t))(e,t,r);case"!=":return((e,n,t)=>0!==She(e,n,t))(e,t,r);case">":return((e,n,t)=>Mhe(e,n,t)>0)(e,t,r);case">=":return((e,n,t)=>The(e,n,t)>=0)(e,t,r);case"<":return((e,n,t)=>Ihe(e,n,t)<0)(e,t,r);case"<=":return((e,n,t)=>Rhe(e,n,t)<=0)(e,t,r);default:throw new TypeError(`Invalid operator: ${n}`)}};const Uhe=function dne(){if(une)return hX;une=1;class e{constructor(Pt,Hn){if(Hn=r(Hn),Pt instanceof e)return Pt.loose===!!Hn.loose&&Pt.includePrerelease===!!Hn.includePrerelease?Pt:new e(Pt.raw,Hn);if(Pt instanceof s)return this.raw=Pt.value,this.set=[[Pt]],this.format(),this;if(this.options=Hn,this.loose=!!Hn.loose,this.includePrerelease=!!Hn.includePrerelease,this.raw=Pt.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(et=>this.parseRange(et.trim())).filter(et=>et.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const et=this.set[0];if(this.set=this.set.filter(ut=>!K(ut[0])),0===this.set.length)this.set=[et];else if(this.set.length>1)for(const ut of this.set)if(1===ut.length&&ie(ut[0])){this.set=[ut];break}}this.format()}format(){return this.range=this.set.map(Pt=>Pt.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(Pt){const et=((this.options.includePrerelease&&j)|(this.options.loose&&X))+":"+Pt,ut=t.get(et);if(ut)return ut;const at=this.options.loose;Pt=Pt.replace(at?y[E.HYPHENRANGELOOSE]:y[E.HYPHENRANGE],S2(this.options.includePrerelease)),c("hyphen replace",Pt),Pt=Pt.replace(y[E.COMPARATORTRIM],M),c("comparator trim",Pt),Pt=Pt.replace(y[E.TILDETRIM],R),c("tilde trim",Pt),Pt=Pt.replace(y[E.CARETTRIM],$),c("caret trim",Pt);let Gn=Pt.split(" ").map(ri=>Me(ri,this.options)).join(" ").split(/\s+/).map(ri=>U_(ri,this.options));at&&(Gn=Gn.filter(ri=>(c("loose invalid filter",ri,this.options),!!ri.match(y[E.COMPARATORLOOSE])))),c("range list",Gn);const Xn=new Map,Ui=Gn.map(ri=>new s(ri,this.options));for(const ri of Ui){if(K(ri))return[ri];Xn.set(ri.value,ri)}Xn.size>1&&Xn.has("")&&Xn.delete("");const Ss=[...Xn.values()];return t.set(et,Ss),Ss}intersects(Pt,Hn){if(!(Pt instanceof e))throw new TypeError("a Range is required");return this.set.some(et=>me(et,Hn)&&Pt.set.some(ut=>me(ut,Hn)&&et.every(at=>ut.every(Lt=>at.intersects(Lt,Hn)))))}test(Pt){if(!Pt)return!1;if("string"==typeof Pt)try{Pt=new h(Pt,this.options)}catch{return!1}for(let Hn=0;Hn")&&R.operator.startsWith(">")||this.operator.startsWith("<")&&R.operator.startsWith("<")||this.semver.version===R.semver.version&&this.operator.includes("=")&&R.operator.includes("=")||c(this.semver,"<",R.semver,$)&&this.operator.startsWith(">")&&R.operator.startsWith("<")||c(this.semver,">",R.semver,$)&&this.operator.startsWith("<")&&R.operator.startsWith(">")))}}fX=n;const t=aX,{safeRe:r,t:s}=uX,c=Vhe,h=_U,y=dX,E=dne();return fX}(),c=_U,h=dX,{safeRe:y,t:E,comparatorTrimReplace:M,tildeTrimReplace:R,caretTrimReplace:$}=uX,{FLAG_INCLUDE_PRERELEASE:j,FLAG_LOOSE:X}=cX,K=Ht=>"<0.0.0-0"===Ht.value,ie=Ht=>""===Ht.value,me=(Ht,Pt)=>{let Hn=!0;const et=Ht.slice();let ut=et.pop();for(;Hn&&et.length;)Hn=et.every(at=>ut.intersects(at,Pt)),ut=et.pop();return Hn},Me=(Ht,Pt)=>(c("comp",Ht,Pt),Ht=Et(Ht,Pt),c("caret",Ht),Ht=rt(Ht,Pt),c("tildes",Ht),Ht=mn(Ht,Pt),c("xrange",Ht),Ht=Cs(Ht,Pt),c("stars",Ht),Ht),Ce=Ht=>!Ht||"x"===Ht.toLowerCase()||"*"===Ht,rt=(Ht,Pt)=>Ht.trim().split(/\s+/).map(Hn=>Mt(Hn,Pt)).join(" "),Mt=(Ht,Pt)=>Ht.replace(Pt.loose?y[E.TILDELOOSE]:y[E.TILDE],(et,ut,at,Lt,Gn)=>{let Xn;return c("tilde",Ht,et,ut,at,Lt,Gn),Ce(ut)?Xn="":Ce(at)?Xn=`>=${ut}.0.0 <${+ut+1}.0.0-0`:Ce(Lt)?Xn=`>=${ut}.${at}.0 <${ut}.${+at+1}.0-0`:Gn?(c("replaceTilde pr",Gn),Xn=`>=${ut}.${at}.${Lt}-${Gn} <${ut}.${+at+1}.0-0`):Xn=`>=${ut}.${at}.${Lt} <${ut}.${+at+1}.0-0`,c("tilde return",Xn),Xn}),Et=(Ht,Pt)=>Ht.trim().split(/\s+/).map(Hn=>Qt(Hn,Pt)).join(" "),Qt=(Ht,Pt)=>{c("caret",Ht,Pt);const et=Pt.includePrerelease?"-0":"";return Ht.replace(Pt.loose?y[E.CARETLOOSE]:y[E.CARET],(ut,at,Lt,Gn,Xn)=>{let Ui;return c("caret",Ht,ut,at,Lt,Gn,Xn),Ce(at)?Ui="":Ce(Lt)?Ui=`>=${at}.0.0${et} <${+at+1}.0.0-0`:Ce(Gn)?Ui="0"===at?`>=${at}.${Lt}.0${et} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.0${et} <${+at+1}.0.0-0`:Xn?(c("replaceCaret pr",Xn),Ui="0"===at?"0"===Lt?`>=${at}.${Lt}.${Gn}-${Xn} <${at}.${Lt}.${+Gn+1}-0`:`>=${at}.${Lt}.${Gn}-${Xn} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.${Gn}-${Xn} <${+at+1}.0.0-0`):(c("no pr"),Ui="0"===at?"0"===Lt?`>=${at}.${Lt}.${Gn}${et} <${at}.${Lt}.${+Gn+1}-0`:`>=${at}.${Lt}.${Gn}${et} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.${Gn} <${+at+1}.0.0-0`),c("caret return",Ui),Ui})},mn=(Ht,Pt)=>(c("replaceXRanges",Ht,Pt),Ht.split(/\s+/).map(Hn=>Ei(Hn,Pt)).join(" ")),Ei=(Ht,Pt)=>(Ht=Ht.trim()).replace(Pt.loose?y[E.XRANGELOOSE]:y[E.XRANGE],(et,ut,at,Lt,Gn,Xn)=>{c("xRange",Ht,et,ut,at,Lt,Gn,Xn);const Ui=Ce(at),Ss=Ui||Ce(Lt),ri=Ss||Ce(Gn);return"="===ut&&ri&&(ut=""),Xn=Pt.includePrerelease?"-0":"",Ui?et=">"===ut||"<"===ut?"<0.0.0-0":"*":ut&&ri?(Ss&&(Lt=0),Gn=0,">"===ut?(ut=">=",Ss?(at=+at+1,Lt=0,Gn=0):(Lt=+Lt+1,Gn=0)):"<="===ut&&(ut="<",Ss?at=+at+1:Lt=+Lt+1),"<"===ut&&(Xn="-0"),et=`${ut+at}.${Lt}.${Gn}${Xn}`):Ss?et=`>=${at}.0.0${Xn} <${+at+1}.0.0-0`:ri&&(et=`>=${at}.${Lt}.0${Xn} <${at}.${+Lt+1}.0-0`),c("xRange return",et),et}),Cs=(Ht,Pt)=>(c("replaceStars",Ht,Pt),Ht.trim().replace(y[E.STAR],"")),U_=(Ht,Pt)=>(c("replaceGTE0",Ht,Pt),Ht.trim().replace(y[Pt.includePrerelease?E.GTE0PRE:E.GTE0],"")),S2=Ht=>(Pt,Hn,et,ut,at,Lt,Gn,Xn,Ui,Ss,ri,k1,Are)=>`${Hn=Ce(et)?"":Ce(ut)?`>=${et}.0.0${Ht?"-0":""}`:Ce(at)?`>=${et}.${ut}.0${Ht?"-0":""}`:Lt?`>=${Hn}`:`>=${Hn}${Ht?"-0":""}`} ${Xn=Ce(Ui)?"":Ce(Ss)?`<${+Ui+1}.0.0-0`:Ce(ri)?`<${Ui}.${+Ss+1}.0-0`:k1?`<=${Ui}.${Ss}.${ri}-${k1}`:Ht?`<${Ui}.${Ss}.${+ri+1}-0`:`<=${Xn}`}`.trim(),jh=(Ht,Pt,Hn)=>{for(let et=0;et0){const ut=Ht[et].semver;if(ut.major===Pt.major&&ut.minor===Pt.minor&&ut.patch===Pt.patch)return!0}return!1}return!0};return hX}();var fne=ohe((e,n,t)=>{try{n=new Uhe(n,t)}catch{return!1}return n.test(e)}),qhe='.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 hne(e,...n){for(const t of n)Ghe(e,t);return e}function Ghe(e,n){for(const t of Object.keys(n))(0,gu.writeConfig)(e,t,n[t],!0)}const V_=gu;let I$=Ide;const pne=typeof window<"u"?window:void 0;void 0===I$&&pne?.vl?.compile&&(I$=pne.vl);const gpe={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},_pe={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"},O$={vega:"Vega","vega-lite":"Vega-Lite"},vU={vega:V_.version,"vega-lite":I$?I$.version:"not available"},ype={vega:e=>e,"vega-lite":(e,n)=>I$.compile(e,{config:n}).spec},bpe='\n\n \n \n \n',vpe="chart-wrapper";function mne(e,n,t,r){const s=`${n}
    `,c=`
    ${t}`,h=window.open("");h.document.write(s+e+c),h.document.title=`${O$[r]} JSON Source`}function gne(e){return!(!e||!("load"in e))}function _ne(e){return gne(e)?e:V_.loader(e)}function pX(){return pX=(0,sn.Z)(function*(e,n,t={}){let r,s;(0,gu.isString)(n)?(s=_ne(t.loader),r=JSON.parse(yield s.load(n))):r=n;const c=function Epe(e){const n=e.usermeta?.embedOptions??{};return(0,gu.isString)(n.defaultStyle)&&(n.defaultStyle=!1),n}(r),h=c.loader;(!s||h)&&(s=_ne(t.loader??h));const y=yield yne(c,s),E=yield yne(t,s),M={...hne(E,y),config:(0,gu.mergeConfig)(E.config??{},y.config??{})};return yield function Dpe(e,n){return gX.apply(this,arguments)}(e,r,M,s)}),pX.apply(this,arguments)}function yne(e,n){return mX.apply(this,arguments)}function mX(){return(mX=(0,sn.Z)(function*(e,n){const t=(0,gu.isString)(e.config)?JSON.parse(yield n.load(e.config)):e.config??{},r=(0,gu.isString)(e.patch)?JSON.parse(yield n.load(e.patch)):e.patch;return{...e,...r?{patch:r}:{},...t?{config:t}:{}}})).apply(this,arguments)}function gX(){return gX=(0,sn.Z)(function*(e,n,t={},r){const s=t.theme?(0,gu.mergeConfig)(Ii[t.theme],t.config??{}):t.config,c=(0,gu.isBoolean)(t.actions)?t.actions:hne({},gpe,t.actions??{}),h={..._pe,...t.i18n},y=t.renderer??"canvas",E=t.logLevel??V_.Warn,M=t.downloadFileName??"visualization",R="string"==typeof e?document.querySelector(e):e;if(!R)throw new Error(`${e} does not exist`);if(!1!==t.defaultStyle){const Et="vega-embed-style",{root:Qt,rootContainer:mn}=function Spe(e){const n=e.getRootNode?e.getRootNode():document;return n instanceof ShadowRoot?{root:n,rootContainer:n}:{root:document,rootContainer:document.head??document.body}}(R);if(!Qt.getElementById(Et)){const Ei=document.createElement("style");Ei.id=Et,Ei.innerHTML=void 0===t.defaultStyle||!0===t.defaultStyle?qhe.toString():t.defaultStyle,mn.appendChild(Ei)}}const $=function wpe(e,n){if(e.$schema){const t=Tte(e.$schema);n&&n!==t.library&&console.warn(`The given visualization spec is written in ${O$[t.library]}, but mode argument sets ${O$[n]??n}.`);const r=t.library;return fne(vU[r],`^${t.version.slice(1)}`)||console.warn(`The input spec uses ${O$[r]} ${t.version}, but the current version of ${O$[r]} is v${vU[r]}.`),r}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":n??"vega"}(n,t.mode);let j=ype[$](n,s);if("vega-lite"===$&&j.$schema){const Et=Tte(j.$schema);fne(vU.vega,`^${Et.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${Et.version}, but current version is v${vU.vega}.`)}R.classList.add("vega-embed"),c&&R.classList.add("has-actions"),R.innerHTML="";let X=R;if(c){const Et=document.createElement("div");Et.classList.add(vpe),R.appendChild(Et),X=Et}const K=t.patch;if(K&&(j=K instanceof Function?K(j):cU(j,K,!0,!1).newDocument),t.formatLocale&&V_.formatLocale(t.formatLocale),t.timeFormatLocale&&V_.timeFormatLocale(t.timeFormatLocale),t.expressionFunctions)for(const Et in t.expressionFunctions){const Qt=t.expressionFunctions[Et];"fn"in Qt?V_.expressionFunction(Et,Qt.fn,Qt.visitor):Qt instanceof Function&&V_.expressionFunction(Et,Qt)}const{ast:ie}=t,me=V_.parse(j,"vega-lite"===$?{}:s,{ast:ie}),Me=new(t.viewClass||V_.View)(me,{loader:r,logLevel:E,renderer:y,...ie?{expr:V_.expressionInterpreter??t.expr??kde}:{}});if(Me.addSignalListener("autosize",(Et,Qt)=>{const{type:mn}=Qt;"fit-x"==mn?(X.classList.add("fit-x"),X.classList.remove("fit-y")):"fit-y"==mn?(X.classList.remove("fit-x"),X.classList.add("fit-y")):"fit"==mn?X.classList.add("fit-x","fit-y"):X.classList.remove("fit-x","fit-y")}),!1!==t.tooltip){const{loader:Et,tooltip:Qt}=t,mn=Et&&!gne(Et)?Et?.baseURL:void 0,Ei=function xpe(e){return"function"==typeof e}(Qt)?Qt:new Zte({baseURL:mn,...!0===Qt?{}:Qt}).call;Me.tooltip(Ei)}let rt,{hover:Ce}=t;if(void 0===Ce&&(Ce="vega"===$),Ce){const{hoverSet:Et,updateSet:Qt}="boolean"==typeof Ce?{}:Ce;Me.hover(Et,Qt)}if(t&&(null!=t.width&&Me.width(t.width),null!=t.height&&Me.height(t.height),null!=t.padding&&Me.padding(t.padding)),yield Me.initialize(X,t.bind).runAsync(),!1!==c){let Et=R;if(!1!==t.defaultStyle||t.forceActionsMenu){const mn=document.createElement("details");mn.title=h.CLICK_TO_VIEW_ACTIONS,R.append(mn),Et=mn;const Ei=document.createElement("summary");Ei.innerHTML=bpe,mn.append(Ei),rt=Cs=>{mn.contains(Cs.target)||mn.removeAttribute("open")},document.addEventListener("click",rt)}const Qt=document.createElement("div");if(Et.append(Qt),Qt.classList.add("vega-actions"),!0===c||!1!==c.export)for(const mn of["svg","png"])if(!0===c||!0===c.export||c.export[mn]){const Ei=h[`${mn.toUpperCase()}_ACTION`],Cs=document.createElement("a"),U_=(0,gu.isObject)(t.scaleFactor)?t.scaleFactor[mn]:t.scaleFactor;Cs.text=Ei,Cs.href="#",Cs.target="_blank",Cs.download=`${M}.${mn}`,Cs.addEventListener("mousedown",function(){var S2=(0,sn.Z)(function*(jh){jh.preventDefault();const Ht=yield Me.toImageURL(mn,U_);this.href=Ht});return function(jh){return S2.apply(this,arguments)}}()),Qt.append(Cs)}if(!0===c||!1!==c.source){const mn=document.createElement("a");mn.text=h.SOURCE_ACTION,mn.href="#",mn.addEventListener("click",function(Ei){mne(ZG()(n),t.sourceHeader??"",t.sourceFooter??"",$),Ei.preventDefault()}),Qt.append(mn)}if("vega-lite"===$&&(!0===c||!1!==c.compiled)){const mn=document.createElement("a");mn.text=h.COMPILED_ACTION,mn.href="#",mn.addEventListener("click",function(Ei){mne(ZG()(j),t.sourceHeader??"",t.sourceFooter??"","vega"),Ei.preventDefault()}),Qt.append(mn)}if(!0===c||!1!==c.editor){const mn=t.editorUrl??"https://vega.github.io/editor/",Ei=document.createElement("a");Ei.text=h.EDITOR_ACTION,Ei.href="#",Ei.addEventListener("click",function(Cs){(function Whe(e,n,t){const r=e.open(n),{origin:h}=new URL(n);let y=40;e.addEventListener("message",function E(R){R.source===r&&(y=0,e.removeEventListener("message",E,!1))},!1),setTimeout(function M(){y<=0||(r.postMessage(t,h),setTimeout(M,250),y-=1)},250)})(window,mn,{config:s,mode:$,renderer:y,spec:ZG()(n)}),Cs.preventDefault()}),Qt.append(Ei)}}return{view:Me,spec:n,vgSpec:j,finalize:function Mt(){rt&&document.removeEventListener("click",rt),Me.finalize()},embedOptions:t}}),gX.apply(this,arguments)}let bne=(()=>{class e{constructor(){this.loader$=new J(1),this.subscriptions=new xn,this.event$=this.loader$.pipe(w$(),ne(1)),this.view$=this.event$.pipe(ii(t=>"ready"===t.type),ye(t=>t.view)),this.loading$=this.event$.pipe(ye(t=>"loading"===t.type),Ih()),this.error$=this.event$.pipe(ii(t=>"error"===t.type),ye(t=>t?.error))}ngOnDestroy(){this.loader$.complete(),this.subscriptions.unsubscribe()}create(...t){const r=function Cpe(e,n){return pX.apply(this,arguments)}(...t),s=this.subscriptions,h=new xn(()=>r.then(M=>M.finalize())),y=r.then(M=>M.view),E=Cn(y).pipe(ye(M=>({type:"ready",view:M})),Sf(M=>Cn([{type:"error",error:M}])),Wl({type:"loading",loader:y}));h.add(s),r.finally(()=>s.unsubscribe()),this.subscriptions=h,this.loader$.next(E)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function vne(){}let v2=(()=>{class e{set autosize(t){this._autosize="boolean"==typeof t?{width:t,height:t}:{width:!1,height:!1,...t}}get autosize(){return this._autosize}constructor(t,r,s,c){this.manager=r,this.renderer=s,this.cdr=c,this._autosize={width:!0,height:!0},this.minSizeChange=1,this.viewChange=this.manager.view$,this.viewLoading=this.manager.loading$,this.viewError=this.manager.error$,this.subscriptions=this.manager.event$.subscribe(this.handleEvents.bind(this)),this.detach=vne,this.container=t.nativeElement}ngOnChanges(t){("spec"in t||"options"in t)&&this.create()}ngOnDestroy(){this.subscriptions.unsubscribe(),this.detach()}create(){const{spec:t,options:r,manager:s,renderer:c}=this;if(t){const h=c.createElement("div");s.create(h,t,r)}else this.detach()}handleEvents(t){"ready"===t.type?this.attach(t.view):"error"===t.type&&this.detach()}attach(t){const{cdr:r,container:s,renderer:c}=this;if(t.container()){const h=this.getRoot(t.container()),y=new sde.ResizeSensor(h,({width:E,height:M})=>{this.updateSize(h,t,E,M)});this.detach(),this.detach=()=>{y.detach(),c.removeChild(s,h),r.markForCheck(),this.detach=vne},c.appendChild(s,h)}r.markForCheck()}updateSize(t,r,s,c){const{_autosize:h}=this,y=h.width&&this.updateWidth(t,r,s),E=h.height&&this.updateHeight(t,r,c);(y||E)&&r.runAsync()}updateWidth(t,r,s){const{minSizeChange:c}=this,y=t.classList.contains("has-actions")?38:0;return Math.abs(s-r.width()-y)>=c&&(r.width(s-y),!0)}updateHeight(t,r,s){const{minSizeChange:c}=this;return Math.abs(s-r.height())>=c&&(r.height(s),!0)}getRoot(t){const{renderer:r}=this;let s=r.parentNode(t);for(;s;)t=s,s=r.parentNode(s);return t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(bne),ue(tl),ue(Qo))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["ngx-vega"]],inputs:{spec:"spec",options:"options",autosize:"autosize",minSizeChange:"minSizeChange"},outputs:{viewChange:"viewChange",viewLoading:"viewLoading",viewError:"viewError"},standalone:!0,features:[ni([bne]),vo,xi],decls:0,vars:0,template:function(r,s){},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;height:99%}"],changeDetection:0})}return e})();const Mpe=["determinateSpinner"];function Ape(e,n){if(1&e&&(dy(),Ae(0,"svg",11),Wt(1,"circle",12),ke()),2&e){const t=on();hi("viewBox",t._viewBox()),Ze(),_h("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),hi("r",t._circleRadius())}}const Tpe=new $e("mat-progress-spinner-default-options",{providedIn:"root",factory:function kpe(){return{diameter:xne}}}),xne=100;let Ope=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}constructor(t,r,s){this._elementRef=t,this._defaultColor="primary",this._value=0,this._diameter=xne,this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,this.mode="mat-spinner"===t.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",s&&(s.color&&(this.color=this._defaultColor=s.color),s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Ko,8),ue(Tpe))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,s){if(1&r&&ha(Mpe,5),2&r){let c;zi(c=Pi())&&(s._determinateCircle=c.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,s){2&r&&(hi("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===s.mode?s.value:null)("mode",s.mode),wo("mat-"+s.color),_h("width",s.diameter,"px")("height",s.diameter,"px")("--mdc-circular-progress-size",s.diameter+"px")("--mdc-circular-progress-active-indicator-width",s.diameter+"px"),In("_mat-animation-noopable",s._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===s.mode))},inputs:{color:"color",mode:"mode",value:[ht.HasDecoratorInputTransform,"value","value",jw],diameter:[ht.HasDecoratorInputTransform,"diameter","diameter",jw],strokeWidth:[ht.HasDecoratorInputTransform,"strokeWidth","strokeWidth",jw]},exportAs:["matProgressSpinner"],standalone:!0,features:[Vs,xi],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,s){if(1&r&&(en(0,Ape,2,8,"ng-template",null,0,qk),Ae(2,"div",1,2),dy(),Ae(4,"svg",3),Wt(5,"circle",4),ke()(),sA(),Ae(6,"div",5)(7,"div",6)(8,"div",7),zb(9,8),ke(),Ae(10,"div",9),zb(11,8),ke(),Ae(12,"div",10),zb(13,8),ke()()()),2&r){const c=lm(1);Ze(4),hi("viewBox",s._viewBox()),Ze(),_h("stroke-dasharray",s._strokeCircumference(),"px")("stroke-dashoffset",s._strokeDashOffset(),"px")("stroke-width",s._circleStrokeWidth(),"%"),hi("r",s._circleRadius()),Ze(4),vt("ngTemplateOutlet",c),Ze(2),vt("ngTemplateOutlet",c),Ze(2),vt("ngTemplateOutlet",c)}},dependencies:[jS],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0})}return e})(),Rpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,rs]})}return e})();function Npe(e,n){if(1&e&&(Ae(0,"div",15),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.headline)}}function Fpe(e,n){if(1&e&&(Ae(0,"div",16),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.title)}}function Ppe(e,n){if(1&e&&(Ae(0,"div",17),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.description)}}const Lpe=()=>({width:!0,height:!1});function $pe(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",18),yn("viewLoading",function(s){return hs(t),so(on().loadingVegaVisualization=s)}),ke()}if(2&e){const t=on();vt("spec",t.spec)("options",t.options)("autosize",f_(3,Lpe))}}function Bpe(e,n){1&e&&Wt(0,"markdown",19),2&e&&vt("src",on().content)}function zpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",26),yn("load",function(){return hs(t),so(on(2).disableSpinner("sql"))}),ke()}2&e&&vt("src",on(2).sql)}function Vpe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,21),yn("closed",function(){return hs(t),so(on().enableSpinner("sql"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Data Extraction Source Code (SQL) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,zpe,1,1,"markdown",25),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.sql,jd),Ze(3),In("smooth-hide",!r.spinners.sql),Ze(),vt("ngIf",r.sql&&t.expanded)}}function jpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",29),yn("load",function(){return hs(t),so(on(2).disableSpinner("csv"))}),ke()}2&e&&vt("src",on(2).csv)}function Upe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,27),yn("closed",function(){return hs(t),so(on().enableSpinner("csv"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Extracted Data (CSV) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,jpe,1,1,"markdown",28),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.csv,jd),Ze(3),In("smooth-hide",!r.spinners.csv),Ze(),vt("ngIf",r.csv&&t.expanded)}}function Hpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",26),yn("load",function(){return hs(t),so(on(2).disableSpinner("spec"))}),ke()}2&e&&vt("src",on(2).specString)}function Wpe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,30),yn("closed",function(){return hs(t),so(on().enableSpinner("spec"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Visualization Source Code (Vega Lite Spec) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,Hpe,1,1,"markdown",25),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.specString,jd),Ze(3),In("smooth-hide",!r.spinners.spec),Ze(),vt("ngIf",r.spec&&t.expanded)}}let qpe=(()=>{class e{get specString(){return this.spec}constructor(t,r){this.dialog=t,this.page=r,this.clsName="agc-visualization-page",this.headline="Marion County Opioid Addiction Report",this.options={renderer:"canvas",actions:!0,width:1268},this.spinners={sql:!0,csv:!0,spec:!0},this.loadingVegaVisualization=!0}ngOnInit(){this.page.snapshot.hasShownHelpModal||(this.dialog.open(Kue,{width:"50rem",data:{}}),this.page.setHasShownHelpModal(!0))}disableSpinner(t){this.spinners={...this.spinners,[t]:!1}}enableSpinner(t){this.spinners={...this.spinners,[t]:!0}}launchHelpDialog(){this.dialog.open(Xue,{width:"60rem",data:{}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(_$),ue(vte))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-visualization-page"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{headline:"headline",title:"title",description:"description",spec:"spec",options:"options",content:"content",sql:"sql",csv:"csv"},decls:22,vars:12,consts:[["class","header",4,"ngIf"],[1,"content"],[1,"center-box"],["class","title",4,"ngIf"],["class","description",4,"ngIf"],[1,"loading-message"],[1,"visualization"],[3,"spec","options","autosize","viewLoading",4,"ngIf"],["mat-icon-button","","color","accent","disableRipple","",1,"help",3,"click"],["title","Help",1,"qmark"],["ngClass","info"],["ngClass","storage-icon","svgIcon","menu:data-storage"],[3,"src",4,"ngIf"],["multi",""],[3,"closed",4,"ngIf"],[1,"header"],[1,"title"],[1,"description"],[3,"spec","options","autosize","viewLoading"],[3,"src"],[3,"closed"],["sqlPanel",""],[1,"file-download-area"],["target","_blank","rel","noreferrer noopener",1,"file-download",3,"href"],[1,"spinner"],["lineNumbers","",3,"src","load",4,"ngIf"],["lineNumbers","",3,"src","load"],["csvPanel",""],["class","csvContent","lineNumbers","",3,"src","load",4,"ngIf"],["lineNumbers","",1,"csvContent",3,"src","load"],["specPanel",""]],template:function(r,s){1&r&&(en(0,Npe,2,1,"div",0),Ae(1,"div",1)(2,"div",2),en(3,Fpe,2,1,"div",3)(4,Ppe,2,1,"div",4),Ae(5,"div",5),Wt(6,"mat-spinner"),ke(),Ae(7,"div",6),en(8,$pe,1,4,"ngx-vega",7),Ae(9,"button",8),yn("click",function(){return s.launchHelpDialog()}),Ae(10,"span",9),wt(11,"?"),ke()()(),Ae(12,"mat-expansion-panel",10)(13,"mat-expansion-panel-header")(14,"mat-panel-title"),Wt(15,"mat-icon",11),wt(16," DATA & GRAPHIC VARIABLE EXTRACTION INFORMATION "),ke()(),en(17,Bpe,1,1,"markdown",12),Ae(18,"mat-accordion",13),en(19,Vpe,11,4,"mat-expansion-panel",14)(20,Upe,11,4,"mat-expansion-panel",14)(21,Wpe,11,4,"mat-expansion-panel",14),ke()()()()),2&r&&(vt("ngIf",s.headline),Ze(3),vt("ngIf",s.title),Ze(),vt("ngIf",s.description),Ze(),In("smooth-hide",!s.loadingVegaVisualization),Ze(3),vt("ngIf",s.spec),Ze(4),In("smooth-show",!s.loadingVegaVisualization),Ze(5),vt("ngIf",s.content),Ze(2),vt("ngIf",s.sql),Ze(),vt("ngIf",s.csv),Ze(),vt("ngIf",s.spec))},dependencies:[qF,x_,Ete,lG,V4,j4,aG,v$,HL,v2,Ope],styles:[".mat-expanded .mat-expanded .mat-expansion-panel-content{min-height:13rem}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] markdown[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center;font-weight:300;font-size:2.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{align-items:center;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .center-box[_ngcontent-%COMP%]{display:block;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .loading-message[_ngcontent-%COMP%]{position:fixed;z-index:2;left:50%;top:50%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]{position:relative;padding-right:2.375rem;display:flex;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]:hover ngx-vega[_ngcontent-%COMP%] summary, [_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]:hover .help[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s ease}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%]{position:absolute;top:0;right:0;cursor:pointer;opacity:.2;transition:opacity .4s ease-in;border-width:1px;border-style:solid;border-radius:50%;box-shadow:1px 1px 3px #0000001a;background:#fff;color:#1b1e23}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%], [_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%] .qmark[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;line-height:1.75rem;font-size:1.25rem;vertical-align:baseline;padding:0}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%] .mat-button-focus-overlay{display:none}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{opacity:0;margin-top:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:700;font-size:.875rem;line-height:1.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .file-download-area[_ngcontent-%COMP%]{margin-top:.625rem;margin-bottom:2.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .file-download-area[_ngcontent-%COMP%] .file-download[_ngcontent-%COMP%]{position:absolute;right:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{position:absolute;z-index:1;left:50%;top:8rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] markdown[_ngcontent-%COMP%]{padding:1rem .5rem 0}[_nghost-%COMP%] .smooth-show[_ngcontent-%COMP%]{opacity:1!important;transition:opacity .75s}[_nghost-%COMP%] .smooth-hide[_ngcontent-%COMP%]{opacity:0!important;transition:opacity .5s}"],changeDetection:0})}return e})();function Gpe(e,n){if(1&e&&Wt(0,"agc-visualization-page",1),2&e){const t=on();vt("title",t.visualization.title)("description",t.visualization.description)("spec",t.visualization.spec)("options",t.visualization.options)("content",t.visualization.content)("sql",t.visualization.sql)("csv",t.visualization.csv)}}const Xpe=[{path:"",component:(()=>{class e{constructor(t){this.subscriptions=new xn;const r=t.data.subscribe(s=>{this.visualization=s.visualization});this.subscriptions.add(r)}ngOnDestroy(){this.subscriptions.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(tM))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-visualization"]],decls:1,vars:1,consts:[[3,"title","description","spec","options","content","sql","csv",4,"ngIf"],[3,"title","description","spec","options","content","sql","csv"]],template:function(r,s){1&r&&en(0,Gpe,1,7,"agc-visualization-page",0),2&r&&vt("ngIf",s.visualization)},dependencies:[x_,qpe]})}return e})(),resolve:{visualization:aue}}];let Ype=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Xpe),mu]})}return e})(),Kpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,HG,h2,cG]})}return e})(),Zpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,HG,h2]})}return e})(),_X=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,cG,h2,WL.forChild(),v2,Kpe,Zpe,Rpe]})}return e})(),Qpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Ype,_X]})}return e})(),wne=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();class Jpe{constructor(n){this._box=n,this._destroyed=new It,this._resizeSubject=new It,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(n){return this._elementObservables.has(n)||this._elementObservables.set(n,new Qn(t=>{const r=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(n,{box:this._box}),()=>{this._resizeObserver?.unobserve(n),r.unsubscribe(),this._elementObservables.delete(n)}}).pipe(ii(t=>t.some(r=>r.target===n)),ne({bufferSize:1,refCount:!0}),Kn(this._destroyed))),this._elementObservables.get(n)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let eme=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=Xe(Bt)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,r){const s=r?.box||"content-box";return this._observers.has(s)||this._observers.set(s,new Jpe(s)),this._observers.get(s).observe(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const tme=["notch"],nme=["matFormFieldNotchedOutline",""],ime=["*"],rme=["textField"],ome=["iconPrefixContainer"],sme=["textPrefixContainer"];function ame(e,n){1&e&&Wt(0,"span",16)}function lme(e,n){if(1&e&&(Ae(0,"label",14),ki(1,1),en(2,ame,1,0,"span",15),ke()),2&e){const t=on(2);vt("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),hi("for",t._control.id),Ze(2),eo(2,!t.hideRequiredMarker&&t._control.required?2:-1)}}function cme(e,n){1&e&&en(0,lme,3,5,"label",14),2&e&&eo(0,on()._hasFloatingLabel()?0:-1)}function ume(e,n){1&e&&Wt(0,"div",17)}function dme(e,n){}function fme(e,n){1&e&&en(0,dme,0,0,"ng-template",9),2&e&&(on(2),vt("ngTemplateOutlet",lm(1)))}function hme(e,n){if(1&e&&(Ae(0,"div",5),en(1,fme,1,1,null,9),ke()),2&e){const t=on();vt("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),Ze(),eo(1,t._forceDisplayInfixLabel()?-1:1)}}function pme(e,n){1&e&&(Ae(0,"div",18,19),ki(2,2),ke())}function mme(e,n){1&e&&(Ae(0,"div",20,21),ki(2,3),ke())}function gme(e,n){}function _me(e,n){1&e&&en(0,gme,0,0,"ng-template",9),2&e&&(on(),vt("ngTemplateOutlet",lm(1)))}function yme(e,n){1&e&&(Ae(0,"div",22),ki(1,4),ke())}function bme(e,n){1&e&&(Ae(0,"div",23),ki(1,5),ke())}function vme(e,n){1&e&&Wt(0,"div",12)}function xme(e,n){1&e&&(Ae(0,"div",24),ki(1,6),ke()),2&e&&vt("@transitionMessages",on()._subscriptAnimationState)}function wme(e,n){if(1&e&&(Ae(0,"mat-hint",26),wt(1),ke()),2&e){const t=on(2);vt("id",t._hintLabelId),Ze(),Pr(t.hintLabel)}}function Eme(e,n){if(1&e&&(Ae(0,"div",25),en(1,wme,2,2,"mat-hint",26),ki(2,7),Wt(3,"div",27),ki(4,8),ke()),2&e){const t=on();vt("@transitionMessages",t._subscriptAnimationState),Ze(),eo(1,t.hintLabel?1:-1)}}const Cme=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Sme=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let xU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-label"]],standalone:!0})}return e})();const Dme=new $e("MatError");let Mme=0,Ene=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+Mme++}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,s){2&r&&(Vb("id",s.id),hi("align",null),In("mat-mdc-form-field-hint-end","end"===s.align))},inputs:{align:"align",id:"id"},standalone:!0})}return e})();const Ame=new $e("MatPrefix"),Tme=new $e("MatSuffix"),Cne=new $e("FloatingLabelParent");let Sne=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=Xe(eme),this._ngZone=Xe(Bt),this._parent=Xe(Cne),this._resizeSubscription=new xn}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function kme(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const r=t.scrollWidth;return t.remove(),r}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn))};static#t=this.\u0275dir=Vt({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,s){2&r&&In("mdc-floating-label--float-above",s.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}return e})();const Dne="mdc-line-ripple--active",wU="mdc-line-ripple--deactivating";let Mne=(()=>{class e{constructor(t,r){this._elementRef=t,this._handleTransitionEnd=s=>{const c=this._elementRef.nativeElement.classList,h=c.contains(wU);"opacity"===s.propertyName&&h&&c.remove(Dne,wU)},r.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(wU),t.add(Dne)}deactivate(){this._elementRef.nativeElement.classList.add(wU)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt))};static#t=this.\u0275dir=Vt({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}return e})(),Ane=(()=>{class e{constructor(t,r){this._elementRef=t,this._ngZone=r,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,s){if(1&r&&ha(tme,5),2&r){let c;zi(c=Pi())&&(s._notch=c.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,s){2&r&&In("mdc-notched-outline--notched",s.open)},inputs:{open:[ht.None,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[xi],attrs:nme,ngContentSelectors:ime,decls:5,vars:0,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],["notch",""],[1,"mdc-notched-outline__trailing"]],template:function(r,s){1&r&&(Ra(),Wt(0,"div",0),Ae(1,"div",1,2),ki(3),ke(),Wt(4,"div",3))},encapsulation:2,changeDetection:0})}return e})();const Ime={transitionMessages:A0("transitionMessages",[Rh("enter",La({opacity:1,transform:"translateY(0%)"})),Nh("void => enter",[La({opacity:0,transform:"translateY(-5px)"}),Om("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Tne=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e})}return e})();const kne=new $e("MatFormField"),Ome=new $e("MAT_FORM_FIELD_DEFAULT_OPTIONS");let Ine=0,Nne=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Mh(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const r=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,r,s,c,h,y,E,M){this._elementRef=t,this._changeDetectorRef=r,this._ngZone=s,this._dir=c,this._platform=h,this._defaults=y,this._animationMode=E,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+Ine++,this._hintLabelId="mat-mdc-hint-"+Ine++,this._subscriptAnimationState="",this._destroyed=new It,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,y&&(y.appearance&&(this.appearance=y.appearance),this._hideRequiredMarker=!!y?.hideRequiredMarker,y.color&&(this.color=y.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Kn(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Oh(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Kn(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Kn(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const r=this._control?this._control.ngControl:null;return r&&r[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const r=this._hintChildren?this._hintChildren.find(c=>"start"===c.align):null,s=this._hintChildren?this._hintChildren.find(c=>"end"===c.align):null;r?t.push(r.id):this._hintLabel&&t.push(this._hintLabelId),s&&t.push(s.id)}else this._errorChildren&&t.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const r=this._iconPrefixContainer?.nativeElement,s=this._textPrefixContainer?.nativeElement,c=r?.getBoundingClientRect().width??0,h=s?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${c+h}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const r=t.getRootNode();return r&&r!==t}return document.documentElement.contains(t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Qo),ue(Bt),ue(rd),ue(Xs),ue(Ome,8),ue(Ko,8),ue(mi))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,xU,5),vs(c,xU,7),vs(c,Tne,5),vs(c,Ame,5),vs(c,Tme,5),vs(c,Dme,5),vs(c,Ene,5)),2&r){let h;zi(h=Pi())&&(s._labelChildNonStatic=h.first),zi(h=Pi())&&(s._labelChildStatic=h.first),zi(h=Pi())&&(s._formFieldControl=h.first),zi(h=Pi())&&(s._prefixChildren=h),zi(h=Pi())&&(s._suffixChildren=h),zi(h=Pi())&&(s._errorChildren=h),zi(h=Pi())&&(s._hintChildren=h)}},viewQuery:function(r,s){if(1&r&&(ha(rme,5),ha(ome,5),ha(sme,5),ha(Sne,5),ha(Ane,5),ha(Mne,5)),2&r){let c;zi(c=Pi())&&(s._textField=c.first),zi(c=Pi())&&(s._iconPrefixContainer=c.first),zi(c=Pi())&&(s._textPrefixContainer=c.first),zi(c=Pi())&&(s._floatingLabel=c.first),zi(c=Pi())&&(s._notchedOutline=c.first),zi(c=Pi())&&(s._lineRipple=c.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,s){2&r&&In("mat-mdc-form-field-label-always-float",s._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",s._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",s._hasIconSuffix)("mat-form-field-invalid",s._control.errorState)("mat-form-field-disabled",s._control.disabled)("mat-form-field-autofilled",s._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===s._animationMode)("mat-form-field-appearance-fill","fill"==s.appearance)("mat-form-field-appearance-outline","outline"==s.appearance)("mat-form-field-hide-placeholder",s._hasFloatingLabel()&&!s._shouldLabelFloat())("mat-focused",s._control.focused)("mat-primary","accent"!==s.color&&"warn"!==s.color)("mat-accent","accent"===s.color)("mat-warn","warn"===s.color)("ng-untouched",s._shouldForward("untouched"))("ng-touched",s._shouldForward("touched"))("ng-pristine",s._shouldForward("pristine"))("ng-dirty",s._shouldForward("dirty"))("ng-valid",s._shouldForward("valid"))("ng-invalid",s._shouldForward("invalid"))("ng-pending",s._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[ni([{provide:kne,useExisting:e},{provide:Cne,useExisting:e}]),xi],ngContentSelectors:Sme,decls:18,vars:21,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],["class","mat-mdc-form-field-icon-prefix"],["class","mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],["class","mat-mdc-form-field-text-suffix"],["class","mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,s){if(1&r&&(Ra(Cme),en(0,cme,1,1,"ng-template",null,0,qk),Ae(2,"div",1,2),yn("click",function(h){return s._control.onContainerClick(h)}),en(4,ume,1,0,"div",3),Ae(5,"div",4),en(6,hme,2,2,"div",5)(7,pme,3,0,"div",6)(8,mme,3,0,"div",7),Ae(9,"div",8),en(10,_me,1,1,null,9),ki(11),ke(),en(12,yme,2,0,"div",10)(13,bme,2,0,"div",11),ke(),en(14,vme,1,0,"div",12),ke(),Ae(15,"div",13),en(16,xme,2,1)(17,Eme,5,2),ke()),2&r){let c;Ze(2),In("mdc-text-field--filled",!s._hasOutline())("mdc-text-field--outlined",s._hasOutline())("mdc-text-field--no-label",!s._hasFloatingLabel())("mdc-text-field--disabled",s._control.disabled)("mdc-text-field--invalid",s._control.errorState),Ze(2),eo(4,s._hasOutline()||s._control.disabled?-1:4),Ze(2),eo(6,s._hasOutline()?6:-1),Ze(),eo(7,s._hasIconPrefix?7:-1),Ze(),eo(8,s._hasTextPrefix?8:-1),Ze(2),eo(10,!s._hasOutline()||s._forceDisplayInfixLabel()?10:-1),Ze(2),eo(12,s._hasTextSuffix?12:-1),Ze(),eo(13,s._hasIconSuffix?13:-1),Ze(),eo(14,s._hasOutline()?-1:14),Ze(),In("mat-mdc-form-field-subscript-dynamic-size","dynamic"===s.subscriptSizing),Ze(),eo(16,"error"===(c=s._getDisplayedMessages())?16:"hint"===c?17:-1)}},dependencies:[Sne,Ane,jS,Mne,Ene],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 96px/0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-top:1px solid;border-bottom:1px solid}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{max-width:calc(100% - 12px*2)}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-text-field--filled{border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-text-field--filled .mdc-line-ripple::before{border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(.75*var(--mdc-outlined-text-field-label-text-size))}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mdc-outlined-text-field-label-text-size)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[Ime.transitionMessages]},changeDetection:0})}return e})(),Fme=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,Ir,GV,rs]})}return e})();function M1(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function Lne(e){return null!=e&&"number"==typeof e.length}const kc=new $e(""),A1=new $e(""),zme=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Vme{static min(n){return function $ne(e){return n=>{if(M1(n.value)||M1(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t{if(M1(n.value)||M1(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}(n)}static required(n){return function zne(e){return M1(e.value)?{required:!0}:null}(n)}static requiredTrue(n){return function Vne(e){return!0===e.value?null:{required:!0}}(n)}static email(n){return function jne(e){return M1(e.value)||zme.test(e.value)?null:{email:!0}}(n)}static minLength(n){return function Une(e){return n=>M1(n.value)||!Lne(n.value)?null:n.value.lengthLne(n.value)&&n.value.length>e?{maxlength:{requiredLength:e,actualLength:n.value.length}}:null}(n)}static pattern(n){return function Wne(e){if(!e)return EU;let n,t;return"string"==typeof e?(t="","^"!==e.charAt(0)&&(t+="^"),t+=e,"$"!==e.charAt(e.length-1)&&(t+="$"),n=new RegExp(t)):(t=e.toString(),n=e),r=>{if(M1(r.value))return null;const s=r.value;return n.test(s)?null:{pattern:{requiredPattern:t,actualValue:s}}}}(n)}static nullValidator(n){return null}static compose(n){return Zne(n)}static composeAsync(n){return Qne(n)}}function EU(e){return null}function qne(e){return null!=e}function Gne(e){return Cw(e)?Cn(e):e}function Xne(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function Yne(e,n){return n.map(t=>t(e))}function Kne(e){return e.map(n=>function jme(e){return!e.validate}(n)?n:t=>n.validate(t))}function Zne(e){if(!e)return null;const n=e.filter(qne);return 0==n.length?null:function(t){return Xne(Yne(t,n))}}function bX(e){return null!=e?Zne(Kne(e)):null}function Qne(e){if(!e)return null;const n=e.filter(qne);return 0==n.length?null:function(t){return c$(Yne(t,n).map(Gne)).pipe(ye(Xne))}}function vX(e){return null!=e?Qne(Kne(e)):null}function Jne(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function eie(e){return e._rawValidators}function tie(e){return e._rawAsyncValidators}function xX(e){return e?Array.isArray(e)?e:[e]:[]}function CU(e,n){return Array.isArray(e)?e.includes(n):e===n}function nie(e,n){const t=xX(n);return xX(e).forEach(s=>{CU(t,s)||t.push(s)}),t}function iie(e,n){return xX(n).filter(t=>!CU(e,t))}class rie{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(n){this._rawValidators=n||[],this._composedValidatorFn=bX(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=vX(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class _u extends rie{get formDirective(){return null}get path(){return null}}class q0 extends rie{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}const R$="VALID",DU="INVALID",x2="PENDING",N$="DISABLED";function CX(e){return(MU(e)?e.validators:e)||null}function SX(e,n){return(MU(n)?n.asyncValidators:e)||null}function MU(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class cie{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===R$}get invalid(){return this.status===DU}get pending(){return this.status==x2}get disabled(){return this.status===N$}get enabled(){return this.status!==N$}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(nie(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(nie(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(iie(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(iie(n,this._rawAsyncValidators))}hasValidator(n){return CU(this._rawValidators,n)}hasAsyncValidator(n){return CU(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=x2,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=N$,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=R$,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===R$||this.status===x2)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N$:R$}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=x2,this._hasOwnPendingAsyncValidator=!0;const t=Gne(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,s)=>r&&r._find(s),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new cn,this.statusChanges=new cn}_calculateStatus(){return this._allControlsDisabled()?N$:this.errors?DU:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x2)?x2:this._anyControlsHaveStatus(DU)?DU:R$}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){MU(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function Xme(e){return Array.isArray(e)?bX(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Yme(e){return Array.isArray(e)?vX(e):e||null}(this._rawAsyncValidators)}}class DX extends cie{constructor(n,t,r){super(CX(t),SX(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){(function lie(e,n,t){e._forEachChild((r,s)=>{if(void 0===t[s])throw new _e(1002,"")})})(this,0,n),Object.keys(n).forEach(r=>{(function aie(e,n,t){const r=e.controls;if(!(n?Object.keys(r):r).length)throw new _e(1e3,"");if(!r[t])throw new _e(1001,"")})(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const s=this.controls[r];s&&s.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,s)=>{r.reset(n?n[s]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,s)=>((r.enabled||this.disabled)&&(t[s]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((s,c)=>{r=t(r,s,c)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}const F$=new $e("CallSetDisabledState",{providedIn:"root",factory:()=>MX}),MX="always";function P$(e,n,t=MX){AX(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function Qme(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&uie(e,n)})}(e,n),function ege(e,n){const t=(r,s)=>{n.valueAccessor.writeValue(r),s&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function Jme(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&uie(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function Zme(e,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function TU(e,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),IU(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function kU(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function AX(e,n){const t=eie(e);null!==n.validator?e.setValidators(Jne(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const r=tie(e);null!==n.asyncValidator?e.setAsyncValidators(Jne(r,n.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const s=()=>e.updateValueAndValidity();kU(n._rawValidators,s),kU(n._rawAsyncValidators,s)}function IU(e,n){let t=!1;if(null!==e){if(null!==n.validator){const s=eie(e);if(Array.isArray(s)&&s.length>0){const c=s.filter(h=>h!==n.validator);c.length!==s.length&&(t=!0,e.setValidators(c))}}if(null!==n.asyncValidator){const s=tie(e);if(Array.isArray(s)&&s.length>0){const c=s.filter(h=>h!==n.asyncValidator);c.length!==s.length&&(t=!0,e.setAsyncValidators(c))}}}const r=()=>{};return kU(n._rawValidators,r),kU(n._rawAsyncValidators,r),t}function uie(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function die(e,n){AX(e,n)}function fie(e,n){e._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}const oge={provide:_u,useExisting:di(()=>OU)},L$=Promise.resolve();let OU=(()=>{class e extends _u{constructor(t,r,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new cn,this.form=new DX({},bX(t),vX(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){L$.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),P$(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){L$.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){L$.then(()=>{const r=this._findContainer(t.path),s=new DX({});die(s,t),r.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){L$.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){L$.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,fie(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static#e=this.\u0275fac=function(r){return new(r||e)(ue(kc,10),ue(A1,10),ue(F$,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,s){1&r&&yn("submit",function(h){return s.onSubmit(h)})("reset",function(){return s.onReset()})},inputs:{options:[ht.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ni([oge]),wn]})}return e})();function hie(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function pie(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const mie=class extends cie{constructor(n=null,t,r){super(CX(t),SX(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),MU(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=pie(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){hie(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){hie(this._onDisabledChange,n)}_forEachChild(n){}_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(n){pie(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};Promise.resolve();const mge={provide:_u,useExisting:di(()=>RU)};let RU=(()=>{class e extends _u{constructor(t,r,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new cn,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(IU(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return P$(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){TU(t.control||null,t,!1),function rge(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this.submitted=!0,fie(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,s=this.form.get(t.path);r!==s&&(TU(r||null,t),(e=>e instanceof mie)(s)&&(P$(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);die(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function tge(e,n){return IU(e,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){AX(this.form,this),this._oldForm&&IU(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(r){return new(r||e)(ue(kc,10),ue(A1,10),ue(F$,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){1&r&&yn("submit",function(h){return s.onSubmit(h)})("reset",function(){return s.onReset()})},inputs:{form:[ht.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ni([mge]),wn,vo]})}return e})();const Nge=["trigger"],Fge=["panel"];function Pge(e,n){if(1&e&&(Ae(0,"span",9),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.placeholder)}}function Lge(e,n){1&e&&ki(0)}function $ge(e,n){if(1&e&&(Ae(0,"span",11),wt(1),ke()),2&e){const t=on(2);Ze(),Pr(t.triggerValue)}}function Bge(e,n){if(1&e&&(Ae(0,"span",10),en(1,Lge,1,0)(2,$ge,2,1),ke()),2&e){const t=on();Ze(),eo(1,t.customTrigger?1:2)}}function zge(e,n){if(1&e){const t=Oa();dy(),sA(),Ae(0,"div",12,13),yn("@transformPanel.done",function(s){return hs(t),so(on()._panelDoneAnimatingStream.next(s.toState))})("keydown",function(s){return hs(t),so(on()._handleKeydown(s))}),ki(2,1),ke()}if(2&e){const t=on();(function k3(e,n,t){rf(bl,nf,mw(qe(),e,n,t),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),vt("ngClass",t.panelClass)("@transformPanel","showing"),hi("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const Vge=[[["mat-select-trigger"]],"*"],jge=["mat-select-trigger","*"],Uge={transformPanelWrap:A0("transformPanelWrap",[Nh("* => void",vL("@transformPanel",[_r()],{optional:!0}))]),transformPanel:A0("transformPanel",[Rh("void",La({opacity:0,transform:"scale(1, 0.8)"})),Nh("void => showing",Om("120ms cubic-bezier(0, 0, 0.2, 1)",La({opacity:1,transform:"scale(1, 1)"}))),Nh("* => void",Om("100ms linear",La({opacity:0})))])};let $ie=0;const Bie=new $e("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.reposition()}}),Wge=new $e("MAT_SELECT_CONFIG"),qge={provide:Bie,deps:[Bh],useFactory:function Hge(e){return()=>e.scrollStrategies.reposition()}},Gge=new $e("MatSelectTrigger");class Xge{constructor(n,t){this.source=n,this.value=t}}let zie=(()=>{class e{_scrollOptionIntoView(t){const r=this.options.toArray()[t];if(r){const s=this.panel.nativeElement,c=function hW(e,n,t){if(t.length){let r=n.toArray(),s=t.toArray(),c=0;for(let h=0;ht+r?Math.max(0,e-r+n):t}(h.offsetTop,h.offsetHeight,s.scrollTop,s.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new Xge(this,t)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Vme.required)??!1}set required(t){this._required=t,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=t}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,r,s,c,h,y,E,M,R,$,j,X,K,ie){this._viewportRuler=t,this._changeDetectorRef=r,this._ngZone=s,this._elementRef=h,this._dir=y,this._parentFormField=R,this.ngControl=$,this._liveAnnouncer=K,this._defaultOptions=ie,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(me,Me)=>me===Me,this._uid="mat-select-"+$ie++,this._triggerAriaLabelledBy=null,this._destroy=new It,this.stateChanges=new It,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+$ie++,this._panelDoneAnimatingStream=new It,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=qL(()=>{const me=this.options;return me?me.changes.pipe(Wl(me),Sr(()=>Oh(...me.map(Me=>Me.onSelectionChange)))):this._ngZone.onStable.pipe(Bo(1),Sr(()=>this.optionSelectionChanges))}),this.openedChange=new cn,this._openedStream=this.openedChange.pipe(ii(me=>me),ye(()=>{})),this._closedStream=this.openedChange.pipe(ii(me=>!me),ye(()=>{})),this.selectionChange=new cn,this.valueChange=new cn,this._trackedModal=null,this._skipPredicate=me=>!this.panelOpen&&me.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),null!=ie?.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=ie.typeaheadDebounceInterval),this._errorStateTracker=new Cj(c,$,M,E,this.stateChanges),this._scrollStrategyFactory=X,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(j)||0,this.id=this.id}ngOnInit(){this._selectionModel=new _ae(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ih(),Kn(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Kn(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Kn(this._destroy)).subscribe(t=>{t.added.forEach(r=>r.select()),t.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(Wl(null),Kn(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),r=this.ngControl;if(t!==this._triggerAriaLabelledBy){const s=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?s.setAttribute("aria-labelledby",t):s.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(void 0!==this._previousControl&&null!==r.disabled&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){const t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;const r=`${this.id}-panel`;this._trackedModal&&tj(this._trackedModal,"aria-owns",r),function F9(e,n,t){const r=nj(e,n);t=t.trim(),!r.some(s=>s.trim()===t)&&(r.push(t),e.setAttribute(n,r.join(" ")))}(t,"aria-owns",r),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(tj(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const r=t.keyCode,s=40===r||38===r||37===r||39===r,c=13===r||32===r,h=this._keyManager;if(!h.isTyping()&&c&&!kh(t)||(this.multiple||t.altKey)&&s)t.preventDefault(),this.open();else if(!this.multiple){const y=this.selected;h.onKeydown(t);const E=this.selected;E&&y!==E&&this._liveAnnouncer.announce(E.viewValue,1e4)}}_handleOpenKeydown(t){const r=this._keyManager,s=t.keyCode,c=40===s||38===s,h=r.isTyping();if(c&&t.altKey)t.preventDefault(),this.close();else if(h||13!==s&&32!==s||!r.activeItem||kh(t))if(!h&&this._multiple&&65===s&&t.ctrlKey){t.preventDefault();const y=this.options.some(E=>!E.disabled&&!E.selected);this.options.forEach(E=>{E.disabled||(y?E.select():E.deselect())})}else{const y=r.activeItemIndex;r.onKeydown(t),this._multiple&&c&&t.shiftKey&&r.activeItem&&r.activeItemIndex!==y&&r.activeItem._selectViaInteraction()}else t.preventDefault(),r.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Bo(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{const r=this._selectOptionByValue(t);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const r=this.options.find(s=>{if(this._selectionModel.isSelected(s))return!1;try{return null!=s.value&&this._compareWith(s.value,t)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_getOverlayWidth(t){return"auto"===this.panelWidth?(t instanceof $G?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new TD(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Oh(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Kn(t)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Oh(...this.options.map(r=>r._stateChanges)).pipe(Kn(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,r){const s=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(s!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),r&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),r&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),s!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((r,s)=>this.sortComparator?this.sortComparator(r,s,t):t.indexOf(r)-t.indexOf(s)),this.stateChanges.next()}}_propagateChanges(t){let r;r=this.multiple?this.selected.map(s=>s.value):this.selected?this.selected.value:t,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let r=0;r0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let r=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static#e=this.\u0275fac=function(r){return new(r||e)(ue(pO),ue(Qo),ue(Bt),ue(lW),ue(zn),ue(rd,8),ue(OU,8),ue(RU,8),ue(kne,8),ue(q0,10),Hc("tabindex"),ue(Bie),ue(pj),ue(Wge,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-select"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,Gge,5),vs(c,bL,5),vs(c,pn,5)),2&r){let h;zi(h=Pi())&&(s.customTrigger=h.first),zi(h=Pi())&&(s.options=h),zi(h=Pi())&&(s.optionGroups=h)}},viewQuery:function(r,s){if(1&r&&(ha(Nge,5),ha(Fge,5),ha(Jee,5)),2&r){let c;zi(c=Pi())&&(s.trigger=c.first),zi(c=Pi())&&(s.panel=c.first),zi(c=Pi())&&(s._overlayDir=c.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,s){1&r&&yn("keydown",function(h){return s._handleKeydown(h)})("focus",function(){return s._onFocus()})("blur",function(){return s._onBlur()}),2&r&&(hi("id",s.id)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s.panelOpen?s.id+"-panel":null)("aria-expanded",s.panelOpen)("aria-label",s.ariaLabel||null)("aria-required",s.required.toString())("aria-disabled",s.disabled.toString())("aria-invalid",s.errorState)("aria-activedescendant",s._getAriaActiveDescendant()),In("mat-mdc-select-disabled",s.disabled)("mat-mdc-select-invalid",s.errorState)("mat-mdc-select-required",s.required)("mat-mdc-select-empty",s.empty)("mat-mdc-select-multiple",s.multiple))},inputs:{userAriaDescribedBy:[ht.None,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr],disableRipple:[ht.HasDecoratorInputTransform,"disableRipple","disableRipple",cr],tabIndex:[ht.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jw(t)],hideSingleSelectionIndicator:[ht.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",cr],placeholder:"placeholder",required:[ht.HasDecoratorInputTransform,"required","required",cr],multiple:[ht.HasDecoratorInputTransform,"multiple","multiple",cr],disableOptionCentering:[ht.HasDecoratorInputTransform,"disableOptionCentering","disableOptionCentering",cr],compareWith:"compareWith",value:"value",ariaLabel:[ht.None,"aria-label","ariaLabel"],ariaLabelledby:[ht.None,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[ht.HasDecoratorInputTransform,"typeaheadDebounceInterval","typeaheadDebounceInterval",jw],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[ni([{provide:Tne,useExisting:e},{provide:FD,useExisting:e}]),Vs,vo,xi],ngContentSelectors:jge,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(r,s){if(1&r&&(Ra(Vge),Ae(0,"div",0,1),yn("click",function(){return s.open()}),Ae(3,"div",2),en(4,Pge,2,1,"span",3)(5,Bge,3,1),ke(),Ae(6,"div",4)(7,"div",5),dy(),Ae(8,"svg",6),Wt(9,"path",7),ke()()()(),en(10,zge,3,9,"ng-template",8),yn("backdropClick",function(){return s.close()})("attach",function(){return s._onAttached()})("detach",function(){return s.close()})),2&r){const c=lm(1);Ze(3),hi("id",s._valueId),Ze(),eo(4,s.empty?4:5),Ze(6),vt("cdkConnectedOverlayPanelClass",s._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",s._scrollStrategy)("cdkConnectedOverlayOrigin",s._preferredOverlayOrigin||c)("cdkConnectedOverlayOpen",s.panelOpen)("cdkConnectedOverlayPositions",s._positions)("cdkConnectedOverlayWidth",s._overlayWidth)}},dependencies:[$G,Jee,qF],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Uge.transformPanel]},changeDetection:0})}return e})(),Vie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[qge],imports:[Ir,BG,Nj,rs,Tm,Fme,Nj,rs]})}return e})(),Yge=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vie]})}return e})(),Kge=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vie,Yge]})}return e})(),jie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,HG,h2,WL]})}return e})(),Uie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})(),Hie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,v2,wne]})}return e})(),NU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,jie,Uie,Hie,_X,jie,Uie,Hie,_X]})}return e})();function Wie(e,n,t){return t?Wie(e,n).pipe(iO(t)):new Qn(r=>{const s=(...h)=>r.next(1===h.length?h[0]:h),c=e(s);return Jt(n)?()=>n(s,c):void 0})}const B$={datasetsPath:"assets/generated/aggregate-table-data.json",subLabel:"Drug",subLabelFlag:"Tox lab flag",timeSliderSource:["deaths","DOD"]};var xM=function(e){return e.pie="pie-chart",e.verticalBar="vertical-bar-chart",e.horizontalBar="horizontal-bar-chart",e}(xM||{});const LX={[xM.pie]:{maxDistinctValues:4},[xM.verticalBar]:{maxDistinctValues:50},[xM.horizontalBar]:{maxDistinctValues:500}};function qie(e){return e??{ids:[],entities:{}}}let z$=(()=>{let e=class U$ extends IG{selectId(t){return"string"==typeof t?t:t.name}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(U$)))(s||U$)}})();static#t=this.\u0275prov=Ue({token:U$,factory:U$.\u0275fac})};return e=Nn([f2(),rM({name:"datasets",defaults:qie()})],e),e})();var w2=function(e){return e.all="all",e.sub="sub",e.nonSub="non-sub",e}(w2||{});let E2=(()=>{let e=class LU extends IG{get subLabel$(){return this.state$.pipe(a$("subLabel"),Ih())}get subLabelFlag$(){return this.state$.pipe(a$("subLabelFlag"),Ih())}constructor(t){super(),this.datasetsState=t}selectId(t,r){return"object"==typeof t&&"dataset"in t&&(r=t,t=t.dataset),`${this.datasetsState.selectId(t)}:${"string"==typeof r?r:r.name}`}getVariable(t){return this.entities$.pipe(a$(t),Ih())}getVariables(t,r){const s=this.createVariableSelector(t,r);return this.entitiesArray$.pipe(ye(c=>c.filter(s)))}getSubVariables(t){return this.getVariables(t,w2.sub)}getMetadata(t){return this.getVariable(t).pipe(ye(r=>{if(void 0===r)return[];const s=[{label:"Type",value:r.type},{label:"Description",value:r.description},{label:"Missing values",value:`${r.percentMissing}%`}];if("summary"===r.distribution.type){const{distribution:{summary:{distinct:c,min:h,max:y}}}=r;s.push({label:"Distinct entries",value:""+c},{label:"Minimum value/length",value:""+h},{label:"Maximum value/length",value:""+y})}return s}))}createVariableSelector(t,r){const s=[];if(void 0!==t){const{datasetsState:h}=this,y=h.selectId.bind(h),E=y(t);s.push(M=>y(M.dataset)===E)}const{snapshot:{subLabelFlag:c}}=this;switch(r){case w2.nonSub:s.push(h=>h.description!==c);break;case w2.sub:s.push(h=>h.description===c)}return 0===s.length?()=>!0:1===s.length?s[0]:h=>s.every(y=>y(h))}static#e=this.\u0275fac=function(r){return new(r||LU)(pe(z$))};static#t=this.\u0275prov=Ue({token:LU,factory:LU.\u0275fac})};return Nn([Fm()],e.prototype,"subLabel$",null),Nn([Fm()],e.prototype,"subLabelFlag$",null),e=Nn([f2(),rM({name:"datasetVariables",defaults:{...qie(),subLabel:B$.subLabel,subLabelFlag:B$.subLabelFlag}})],e),e})();function Gie(e,n=c1,t){const r=Pa(e,n);return function Qge(e,n){return be((t,r)=>{const{leading:s=!0,trailing:c=!1}=n??{};let h=!1,y=null,E=null,M=!1;const R=()=>{E?.unsubscribe(),E=null,c&&(X(),M&&r.complete())},$=()=>{E=null,M&&r.complete()},j=K=>E=Gs(e(K)).subscribe(Se(r,R,$)),X=()=>{if(h){h=!1;const K=y;y=null,r.next(K),!M&&j(K)}};t.subscribe(Se(r,K=>{h=!0,y=K,(!E||E.closed)&&(s?X():j(K))},()=>{M=!0,(!(c&&h&&E)||E.closed)&&r.complete()}))})}(()=>r,t)}var T1=function(e){return e.pie="pie-chart",e.histogram="histogram",e.verticalBar="bar-chart",e.horizontalBar="horizontal-bar-chart",e.summary="summary",e}(T1||{});function Xie(e,n=[],t={}){const{flipAxes:r,xLabel:s,yLabel:c}=t;return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",autosize:{resize:!0},width:"container",view:{strokeOpacity:0},data:{name:"distribution",values:n},transform:[{aggregate:[{op:"sum",field:"count",as:"total"}],groupby:["value"]},{calculate:'isDate(datum.value) ? timeFormat(datum.value, "%Y") : toString(datum.value)',as:"label"},{calculate:'format(datum.total, ",")',as:"totalLabel"}],encoding:{x:r?Kie(s):Yie(s,0),y:r?Yie(c):Kie(c)},layer:[{mark:{type:"bar",width:24,color:"#77ACF0",strokeWidth:1,stroke:"white",orient:r?"horizontal":"vertical"}},{mark:{type:"text",align:r?"left":"center",baseline:"middle",dx:r?3:0,dy:r?0:-10},encoding:{text:{field:"totalLabel",type:"nominal"}}}]}}function Yie(e,n){return{field:"label",type:"nominal",axis:{minExtent:0,title:e,titlePadding:10,titleColor:"#212121",titleFontSize:12,titleFontWeight:"bold",labelFlush:!1,labelAngle:n,domainColor:"#757575",grid:!1,tickColor:"#757575"}}}function Kie(e){return{field:"total",type:"quantitative",title:"Count of Records",axis:{title:e,titlePadding:10,titleColor:"#212121",titleFontSize:12,titleFontWeight:"bold",labelFontSize:10,domainColor:"#757575",gridColor:"#e0e0e0",tickColor:"#757575"}}}function Zie(e,n=[]){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:"container",height:350,autosize:{resize:!0},view:{strokeOpacity:0},data:{name:"distribution",values:n},transform:[{aggregate:[{op:"sum",field:"count",as:"count"}],groupby:["value"]},{joinaggregate:[{op:"sum",field:"count",as:"total"}]},{calculate:"datum.count / datum.total",as:"percentage"},{calculate:'isDate(datum.value) ? timeFormat(datum.value, "%Y") : toString(datum.value)',as:"label"},{calculate:'"(" + datum.count + ")"',as:"countLabel"},{calculate:'format(datum.percentage, ",.2%")',as:"percentageLabel"}],encoding:{color:{field:"value",type:"nominal",scale:{scheme:"tableau20"},legend:{title:null,orient:"top-left",symbolType:"square",labelExpr:"datum.label",labelFontWeight:"bold"}},theta:{field:"count",type:"quantitative",stack:!0}},layer:[{mark:{type:"arc",radius:130,stroke:"white",strokeWidth:2}},{mark:{type:"text",radius:160,fill:"black",fontWeight:"bold"},encoding:{text:{field:"percentageLabel",type:"nominal"}}},{mark:{type:"text",radius:160,fill:"black",yOffset:15},encoding:{text:{field:"countLabel",type:"nominal"}}}]}}function Jge(e=[]){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:"container",height:150,title:{text:"Select Date Range to Update Datasets",align:"left",anchor:"start"},view:{strokeOpacity:0},data:{name:"distribution",values:e},mark:"line",params:[{name:"period",select:{type:"interval",encodings:["x"],mark:{fill:"#6ea7ef",fillOpacity:.15}}}],encoding:{color:{value:"#6ea7ef"},x:{field:"period",type:"temporal",title:"Year",axis:{minExtent:0,titlePadding:10,titleFontSize:14,tickColor:"#757575",domainColor:"#757575",labelExpr:'[month(datum.value) === 0 ? timeFormat(datum.value, "%Y") : ""]',labelFlush:!1,gridDash:{condition:{test:{field:"value",timeUnit:"month",equal:7},value:[2,2]},value:[]},gridColor:{condition:{test:{field:"value",timeUnit:"month",equal:1},value:"#bdbdbd"},value:"#e0e0e0"}}},y:{aggregate:"sum",field:"count",type:"quantitative",title:"# Deaths",axis:{titlePadding:10,titleFontSize:14,domainColor:"#757575",labelFontSize:{condition:{test:{field:"index",equal:1},value:0},value:10},gridColor:"#e0e0e0",gridOpacity:{condition:{test:{field:"index",equal:1},value:0},value:1},tickColor:"#757575",tickOpacity:{condition:{test:{field:"index",equal:1},value:0},value:1}}}}}}let $X=(()=>{class e{constructor(){this.createBarChart=Xie,this.createPieChart=Zie,this.createTimeSlider=Jge}createChart(t){const{type:r,distribution:{type:s,summary:{distinct:c}}}=t;if(Object.values(T1).includes(s)&&s!==T1.summary){if(c<=LX[xM.pie].maxDistinctValues)return Zie();switch(s){case T1.pie:case T1.histogram:case T1.verticalBar:if(c<=LX[xM.verticalBar].maxDistinctValues)return this.createBarChart(t,[],{xLabel:t.name,yLabel:"Count of Records"});case T1.horizontalBar:if(c<=LX[xM.horizontalBar].maxDistinctValues||"DATE"===r)return this.createBarChart(t,[],{flipAxes:!0,xLabel:"# Total Deaths",yLabel:t.name});default:return}}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var e_e=tn(316);function Qie(e){const n=new Date(e);return Number.isNaN(+n)?void 0:n}let BX=(()=>{class e{constructor(t){this.http=t}load(t){const{distribution:{url:r}}=t,s=this.getTransformHandlers(t),c={header:!0,delimiter:",",skipEmptyLines:!0,dynamicTyping:this.getDynamicTypingConfig(t),transform:(h,y)=>{const E=s[y];return E?E(h):h}};return this.http.get(r,{responseType:"text"}).pipe(ye(h=>(0,e_e.parse)(h,c)),ye(h=>this.aggregateResult(t,h.data)))}getDynamicTypingConfig(t){return{value:void 0===this.getValueTransform(t)}}getTransformHandlers(t){return{period:Qie,value:this.getValueTransform(t),count:Number}}aggregateResult(t,r){return"DATE"===t.type?this.aggregateByYear(r):r}getValueTransform(t){switch(t.type){case"BOOLEAN":return r=>"0"===r?"False":"True";case"DATE":return Qie;default:return}}aggregateByYear(t){const r=t.reduce((h,{value:y,count:E})=>{const M=y?.getFullYear?.(),R=(h.get(M)??0)+E;return h.set(M,R)},new Map);return Array.from(r.keys()).sort((h,y)=>void 0===h?1:void 0===y?-1:h-y).map(h=>{const y=void 0!==h?new Date(h,0):void 0;return{period:y,value:y??"",count:r.get(h)}})}static#e=this.\u0275fac=function(r){return new(r||e)(pe(M_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),t_e=(()=>{class e{constructor(t,r,s){this.chartFactory=t,this.dataLoader=r,this.variableStore=s,this.visualizations=[],this.filterSources$=new J(1),this.filterSources$.next(zt(void 0))}setVariables(t){this.visualizations=t.map(r=>{const s=this.variableStore.selectId(r),c=this.variableStore.getMetadata(s),h=this.chartFactory.createChart(r);return{variable:r,metadata:c,spec:h,data:h&&this.createDataSource(r)}})}setFilterSource(t){this.filterSources$.next(t)}createDataSource(t){const r=this.filterSources$.pipe(w$(),Wl(void 0));return d1([this.dataLoader.load(t),r]).pipe(Gie(100)).pipe(ye(([h,y])=>this.filterData(h,y)))}filterData(t,r){if(void 0===r)return t;const[s,c]=r;return t.filter(({period:y})=>void 0===y||s<=+y&&+y<=c)}static#e=this.\u0275fac=function(r){return new(r||e)(pe($X),pe(BX),pe(E2))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),Jie=(()=>{class e{get filteredData(){const t=this.createFilterPred();return t?this.data.filter(t):this.data}get hasDataPeriods(){return this.data.some(({period:t})=>!!t)}constructor(t){this.loader=t,this.dataEmitter=new J(1),this.data=[],this.data$=this.dataEmitter.asObservable()}ngOnDestroy(){this.clearData(),this.clearFilter()}load(t){this.clearData(),this.clearFilter();const r=this.loader.load(t);this.dataSub=r.subscribe(this.setData.bind(this))}setData(t){t!==this.data&&(this.clearData(),this.data=t,this.updateFiltering())}setFilterSource(t){t!==this.filterSource&&(this.clearFilter(),this.filterSource=t,this.updateFiltering())}createFilterPred(){if(!this.filter)return;const[t,r]=this.filter;return({period:s})=>!s||t<=+s&&+s<=r}updateFiltering(){if(this.filterSource)if(this.hasDataPeriods){if(!this.filterSub){let t=!1;if(this.filterSub=this.filterSource.subscribe(r=>{t=!0,this.filter=r,this.emitData()}),t)return}}else this.clearFilter();this.emitData()}emitData(){this.dataEmitter.next(this.filteredData)}clearData(){this.dataSub?.unsubscribe?.(),this.data=[]}clearFilter(){this.filterSub?.unsubscribe?.(),this.filterSub=void 0,this.filter=void 0}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BX))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function n_e(e,n){if(1&e&&(Ae(0,"div",3)(1,"div",4),wt(2),ke(),Ae(3,"div",5),wt(4),ke()()),2&e){const t=n.$implicit;Ze(2),lf("",t.label,":"),Ze(2),Pr(t.value)}}let i_e=(()=>{class e{constructor(){this.clsName="dataset-summary",this.summary=[],this.title=""}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-dataset-summary"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{summary:"summary",title:"title"},decls:4,vars:2,consts:[[1,"title"],[1,"summary"],["class","summary-item",4,"ngFor","ngForOf"],[1,"summary-item"],[1,"label"],[1,"value"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1),ke(),Ae(2,"div",1),en(3,n_e,5,2,"div",2),ke()),2&r&&(Ze(),Pr(s.title),Ze(2),vt("ngForOf",s.summary))},dependencies:[o0],styles:["[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;color:#000}[_nghost-%COMP%] .summary[_ngcontent-%COMP%]{padding-top:.5em;padding-left:1rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%]{display:flex;font-size:.8rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:700;color:#000;margin-right:.5rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:lighter}"],changeDetection:0})}return e})();function r_e(e,n){1&e&&(Ae(0,"div",6),wt(1," Loading visualization... "),ke())}function o_e(e,n){1&e&&(Ae(0,"div",7),wt(1," No data available for the selected time period "),ke())}function s_e(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",8),yn("viewChange",function(s){return hs(t),so(on(2).attachView(s))}),ke()}if(2&e){const t=on(2);In("no-data",0===t.data.length),vt("spec",t.spec)("autosize",t.autosize)("options",t.options)}}function a_e(e,n){if(1&e&&(Ae(0,"div",2),en(1,r_e,2,0,"div",3)(2,o_e,2,0,"div",4)(3,s_e,1,5,"ngx-vega",5),ke()),2&e){const t=on();Ze(),vt("ngIf",t.loading),Ze(),vt("ngIf",0===t.data.length&&!t.loading),Ze(),vt("ngIf",t.spec)}}const l_e=100;let c_e=(()=>{class e{get isSummaryOnly(){return this.variable.distribution.type===T1.summary}constructor(t,r,s,c){this.cdr=t,this.chartFactory=r,this.dataManager=s,this.variableState=c,this.autosize=!1,this.loading=!0,this.data=[],this.subscriptions=new xn;const h=s.data$.subscribe(y=>{this.data=y,this.scheduleViewDataUpdate()});this.subscriptions.add(h),this.subscriptions.add(()=>this.clearViewDataUpdate())}ngOnChanges(t){"variable"in t&&this.onVariableChange(),("filterThrottle"in t||"filterSource"in t)&&this.onFilterChange()}ngOnDestroy(){this.subscriptions.unsubscribe()}attachView(t){this.view=t,this.scheduleViewDataUpdate()}resetView(){this.loading=!0,this.spec=void 0,this.metadata=void 0,this.data=[],this.view=void 0}onVariableChange(){this.resetView();const{variable:t,chartFactory:r,dataManager:s,variableState:c}=this,h=c.selectId(t),y=this.spec=r.createChart(t);this.metadata=c.getMetadata(h),y?s.load(t):s.setData([])}onFilterChange(){const{filterSource:t,filterThrottle:r=l_e,dataManager:s}=this,c=t?.pipe?.(Gie(r));s.setFilterSource(c)}scheduleViewDataUpdate(){var t=this;if(void 0!==this.viewDataUpdateTaskId)return;const r=()=>s===this.viewDataUpdateTaskId,s=this.viewDataUpdateTaskId=setTimeout((0,sn.Z)(function*(){if(!r()||!t.view)return;const c=t.getDataBindingName();void 0!==c?(t.view.data(c,t.data),yield t.view.runAsync(),r()&&(t.loading=!1,t.cdr.markForCheck(),t.clearViewDataUpdate())):t.clearViewDataUpdate()}))}clearViewDataUpdate(){const t=this.viewDataUpdateTaskId;void 0!==t&&(clearTimeout(t),this.viewDataUpdateTaskId=void 0)}getDataBindingName(){if(void 0!==this.dataBindingName)return this.dataBindingName;let t;return this.view?.getState({recurse:!1,signals:()=>!1,data:r=>(t=r,!1)}),t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue($X),ue(Jie),ue(E2))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-variable-visualization"]],inputs:{variable:"variable",filterThrottle:"filterThrottle",filterSource:"filterSource",dataBindingName:"dataBindingName",autosize:"autosize",options:"options"},features:[ni([Jie]),vo],decls:3,vars:5,consts:[[1,"summary",3,"title","summary"],["class","visualization-area",4,"ngIf"],[1,"visualization-area"],["class","loading-message",4,"ngIf"],["class","no-data-message",4,"ngIf"],["class","visualization",3,"no-data","spec","autosize","options","viewChange",4,"ngIf"],[1,"loading-message"],[1,"no-data-message"],[1,"visualization",3,"spec","autosize","options","viewChange"]],template:function(r,s){1&r&&(Wt(0,"agc-dataset-summary",0),uf(1,"async"),en(2,a_e,4,3,"div",1)),2&r&&(vt("title",s.variable.name)("summary",cm(1,3,s.metadata)),Ze(2),vt("ngIf",!s.isSummaryOnly))},dependencies:[x_,v2,i_e,PI],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;width:100%}[_nghost-%COMP%] .summary[_ngcontent-%COMP%]{flex-grow:1;margin-right:1rem}[_nghost-%COMP%] .visualization-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:3;flex-shrink:1;min-width:25rem}[_nghost-%COMP%] .visualization-area[_ngcontent-%COMP%] .visualization.no-data[_ngcontent-%COMP%]{display:none}"],changeDetection:0})}return e})();function u_e(e,n){if(1&e&&(Ae(0,"mat-option",6),wt(1),ke()),2&e){const t=n.$implicit;vt("value",t),Ze(),Pr(t)}}function d_e(e,n){if(1&e){const t=Oa();Ae(0,"div",11),yn("click",function(){const c=hs(t).$implicit;return so(on(2).changeSelection(c))}),wt(1),ke()}if(2&e){const t=n.$implicit;In("selected",t===on(2).selection),Ze(),Pr(t)}}function f_e(e,n){if(1&e){const t=Oa();Ae(0,"div",18),yn("click",function(){const c=hs(t).$implicit;return so(on(3).subOptionFilter=c)}),wt(1),ke()}if(2&e){const t=n.$implicit,r=on(3);In("selected",r.subOptionFilter===t)("disabled",!r.validSubOption(t)),Ze(),Pr(t)}}function h_e(e,n){if(1&e){const t=Oa();Ae(0,"div",11),yn("click",function(){const c=hs(t).$implicit;return so(on(3).changeSelection(c))}),wt(1),ke()}if(2&e){const t=n.$implicit;In("selected",t===on(3).selection),Ze(),Pr(t)}}function p_e(e,n){1&e&&(Ae(0,"div",19),wt(1,"No options match the selected filter."),ke())}function m_e(e,n){if(1&e&&(Ae(0,"div",12)(1,"div",13)(2,"div",14),wt(3),ke(),Ae(4,"div",15),en(5,f_e,2,5,"div",16),ke()(),Ae(6,"div",8),en(7,h_e,2,3,"div",9)(8,p_e,2,0,"div",17),ke()()),2&e){const t=on(2);Ze(3),lf("",t.subLabel,":"),Ze(2),vt("ngForOf",t.LETTERS),Ze(2),vt("ngForOf",t.getFilteredSubOptions()),Ze(),vt("ngIf",t.getFilteredSubOptions().length<1)}}function g_e(e,n){if(1&e&&(Ae(0,"div",7)(1,"div",8),en(2,d_e,2,3,"div",9),ke(),en(3,m_e,9,4,"div",10),ke()),2&e){const t=on();Ze(2),vt("ngForOf",t.options),Ze(),vt("ngIf",t.subOptions.length>0)}}let __e=(()=>{class e{constructor(){this.clsName="agc-sub-selector",this.label="",this.selection="",this.options=[],this.subLabel="",this.subOptions=[],this.selectionChange=new cn,this.showMenu=!1,this.subOptionFilter="A",this.LETTERS=[...Array(26)].map((t,r)=>String.fromCharCode(r+65))}ngOnInit(){this.subOptions.length>0&&(this.subOptionFilter=this.subOptions[0].charAt(0))}ngOnChanges(t){"selection"in t&&(this.showMenu=!1)}get allOptions(){return this.subOptions.length<1?this.options:this.options.concat(this.subOptions)}get enabled(){return this.options.length>0}toggleMenu(){this.showMenu=!(!this.options||this.options.length<=0||this.showMenu)}changeSelection(t){this.selection=t===this.selection?"":t,this.showMenu=!1,this.selectionChange.emit(this.selection)}getFilteredSubOptions(){return""===this.subOptionFilter?this.subOptions:this.subOptions.filter(t=>t.charAt(0).toLowerCase()===this.subOptionFilter.toLowerCase())}validSubOption(t){return!(!this.subOptions||this.subOptions.map(s=>s.charAt(0).toLowerCase()).indexOf(t.toLowerCase())<0)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-sub-selector"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{label:"label",selection:"selection",options:"options",subLabel:"subLabel",subOptions:"subOptions"},outputs:{selectionChange:"selectionChange"},features:[vo],decls:8,vars:4,consts:[[1,"select-container"],["id","selection"],["aria-label","selection",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],[1,"select-cover",3,"click"],["class","select-menu mat-elevation-z3",4,"ngIf"],[3,"value"],[1,"select-menu","mat-elevation-z3"],[1,"options"],["class","option",3,"selected","click",4,"ngFor","ngForOf"],["class","sub-options-container",4,"ngIf"],[1,"option",3,"click"],[1,"sub-options-container"],[1,"sub-options-header"],[1,"option"],[1,"sub-options-filters"],["class","letter-filter",3,"selected","disabled","click",4,"ngFor","ngForOf"],["class","empty-message",4,"ngIf"],[1,"letter-filter",3,"click"],[1,"empty-message"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"mat-form-field")(2,"mat-label",1),wt(3),ke(),Ae(4,"mat-select",2),yn("valueChange",function(h){return s.selection=h}),en(5,u_e,2,2,"mat-option",3),ke()(),Ae(6,"div",4),yn("click",function(){return s.toggleMenu()}),ke(),en(7,g_e,4,2,"div",5),ke()),2&r&&(Ze(3),Pr(s.label),Ze(),vt("value",s.selection),Ze(),vt("ngForOf",s.allOptions),Ze(2),vt("ngIf",s.showMenu))},dependencies:[o0,x_,Nne,xU,zie,bL],styles:["[_nghost-%COMP%] .select-container[_ngcontent-%COMP%]{position:relative;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{z-index:1}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-cover[_ngcontent-%COMP%]{width:100%;height:100%;z-index:2;position:absolute;left:0;top:0;cursor:pointer}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-cover.inactive[_ngcontent-%COMP%]{cursor:disabled!important}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%]{width:45rem;min-height:5rem;max-height:45vh;overflow:auto;position:absolute;left:0;display:block;margin-top:-1rem;background-color:#fff;padding:.5rem;z-index:3}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu.hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%]{width:100%;display:flex;padding:.5rem}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%]{width:100%;display:flex;padding:.75rem 0rem;cursor:pointer}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter[_ngcontent-%COMP%]{padding:.25rem;color:#000;border-bottom:1px solid white}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter.selected[_ngcontent-%COMP%]{background-color:#fafafa;font-weight:700;color:#000;border-bottom:1px solid black}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter.disabled[_ngcontent-%COMP%]{color:#d3d3d3;cursor:not-allowed}[_nghost-%COMP%] .options[_ngcontent-%COMP%]{width:100%;height:-moz-fit-content;height:fit-content;display:flex;flex-wrap:wrap;flex-basis:24%}[_nghost-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{background-color:#fafafa;cursor:pointer}[_nghost-%COMP%] .options[_ngcontent-%COMP%] .empty-message[_ngcontent-%COMP%]{width:100%;text-align:center;font-style:italic;padding-bottom:1rem}[_nghost-%COMP%] .option[_ngcontent-%COMP%]{width:11rem;min-width:11rem;padding:1rem 0rem;text-align:center;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%] .option.selected[_ngcontent-%COMP%]{background-color:#fafafa}"],changeDetection:0})}return e})();function y_e(e,n){if(1&e&&(Ae(0,"mat-option",7),wt(1),ke()),2&e){const t=n.$implicit;vt("value",n.index),Ze(),Pr(t.name)}}function b_e(e,n){if(1&e&&(Ae(0,"div",8),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.selectedDataset.description)}}let v_e=(()=>{class e{constructor(){this.clsName="agc-table-data-selector",this.datasets=[],this.variables=[],this.subLabel="",this.subVariables=[],this.datasetChange=new cn,this.dataVariableChange=new cn,this.selectAll=new cn}get variableNames(){return this.variables.map(t=>t.name)}get subVariableNames(){return this.subVariables.map(t=>t.name)}setDataset(t){void 0!==t&&t!==this.selectedDataset&&(this.selectedDataset=t,this.selectedVariable=void 0,this.datasetChange.emit(t))}setVariableFromName(t){if(void 0!==this.selectedDataset){const r=this.variables.find(s=>s.name===t)??this.subVariables.find(s=>s.name===t);r?.dataset===this.selectedDataset.name&&(this.selectedVariable=r,this.dataVariableChange.emit(r))}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-table-data-selector"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{datasets:"datasets",variables:"variables",subLabel:"subLabel",subVariables:"subVariables"},outputs:{datasetChange:"datasetChange",dataVariableChange:"dataVariableChange",selectAll:"selectAll"},decls:10,vars:7,consts:[[1,"selections-container"],["id","datasetLabel"],["aria-label","datasetLabel",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["label","Data Variable",3,"options","subLabel","subOptions","selection","selectionChange"],["mat-raised-button","",1,"all",3,"disabled","click"],["class","description",4,"ngIf"],[3,"value"],[1,"description"]],template:function(r,s){if(1&r&&(Ae(0,"div",0)(1,"mat-form-field")(2,"mat-label",1),wt(3,"Dataset"),ke(),Ae(4,"mat-select",2),yn("selectionChange",function(h){return s.setDataset(s.datasets[h.value])}),en(5,y_e,2,2,"mat-option",3),ke()(),Ae(6,"agc-sub-selector",4),yn("selectionChange",function(h){return s.setVariableFromName(h)}),ke(),Ae(7,"button",5),yn("click",function(){return s.selectAll.emit()}),wt(8," Select All Variables "),ke()(),en(9,b_e,2,1,"div",6)),2&r){let c;Ze(5),vt("ngForOf",s.datasets),Ze(),vt("options",s.variableNames)("subLabel",s.subLabel)("subOptions",s.subVariableNames)("selection",null!==(c=null==s.selectedVariable?null:s.selectedVariable.name)&&void 0!==c?c:""),Ze(),vt("disabled",void 0===s.selectedDataset),Ze(2),vt("ngIf",null==s.selectedDataset?null:s.selectedDataset.description)}},dependencies:[o0,x_,Nne,xU,zie,bL,__e],styles:["[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]:first-of-type{margin-right:2rem}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .mdc-text-field, [_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .mat-mdc-form-field-focus-overlay{background-color:inherit;padding-left:0}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .all[_ngcontent-%COMP%]{margin-left:2rem;margin-bottom:1.25em;cursor:pointer}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{margin-top:3rem}"],changeDetection:0})}return e})();function x_e(e,n){if(1&e&&Wt(0,"agc-variable-visualization",6),2&e){const t=n.$implicit,r=on(2);vt("variable",t)("filterSource",r.filterSource$)("autosize",r.autosize)}}const w_e=()=>({actions:!1});function E_e(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",7),yn("viewChange",function(s){return hs(t),so(on(2).attachFilterView(s))}),ke()}if(2&e){const t=on(2);In("active",t.filterActive)("sticky",t.selectedVariables.length>1),vt("spec",t.filterSpec)("autosize",t.autosize)("options",f_(7,w_e))}}function C_e(e,n){if(1&e&&(Ae(0,"div",3),en(1,x_e,1,3,"agc-variable-visualization",4)(2,E_e,1,8,"ngx-vega",5),ke()),2&e){const t=on();Ze(),vt("ngForOf",t.selectedVariables),Ze(),vt("ngIf",t.filterSpec)}}const zX=()=>[],S_e=[{path:"",component:(()=>{class e{constructor(t,r,s,c,h){this.variablesState=r,this.loader=s,this.chartFactory=c,this.cdr=h,this.clsName="agc-data-distributions",this.autosize={width:!0,height:!1},this.selectedVariables=[],this.filterActive=!1,this.filterSourceObservables$=new J(1),this.variableObservables$=new J(1),this.subVariableObservables$=new J(1),this.datasets$=t.entitiesArray$,this.subLabel$=r.subLabel$,this.variables$=this.variableObservables$.pipe(w$()),this.subVariables$=this.subVariableObservables$.pipe(w$()),this.loadFilterSpec(),this.filterSource$=this.createFilterSource()}hasSpec(t){return"spec"in t&&void 0!==t.spec}setSelectedDataset(t){if(t!==this.selectedDataset){this.selectedDataset=t,this.selectedVariables=[],this.filterActive=!1;const{variablesState:r,variableObservables$:s,subVariableObservables$:c}=this,h=r.getVariables(t,w2.nonSub),y=r.getVariables(t,w2.sub);s.next(h),c.next(y)}}setSelectedVariable(t){const{selectedDataset:r,selectedVariables:s}=this;r&&(1!==s.length||s[0]!==t)&&(this.selectedVariables=[t],this.filterActive=!1)}setSelectAllVariables(){const{selectedDataset:t}=this;if(t){const r=this.variablesState.entitiesArray.filter(s=>s.dataset===t.name);this.selectedVariables=r,this.filterActive=!0}}attachFilterView(t){const s=Wie(c=>t.addSignalListener("period",c),c=>t.removeSignalListener("period",c)).pipe(ye(([c,{period:h}])=>h));this.filterSourceObservables$.next(s)}loadFilterSpec(){const{variablesState:t,loader:r,chartFactory:s,cdr:c}=this,h=t.selectId(...B$.timeSliderSource);t.getVariable(h).pipe(ii(M=>!!M),Sr(M=>r.load(M)),Bo(1)).subscribe(M=>{this.filterSpec=s.createTimeSlider(M),c.markForCheck()})}createFilterSource(){const{filterSourceObservables$:t,cdr:r}=this;return function Zge(e,n){return new Qn(t=>{const r=e(),s=n(r);return(s?Gs(s):Hl).subscribe(t),()=>{r&&r.unsubscribe()}})}(()=>(this.filterActive=!0,r.markForCheck(),new xn(()=>{this.filterActive=!1,r.markForCheck()})),()=>t).pipe(ne(1),w$())}static#e=this.\u0275fac=function(r){return new(r||e)(ue(z$),ue(E2),ue(BX),ue($X),ue(Qo))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-distributions"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},features:[ni([t_e])],decls:8,vars:16,consts:[[1,"header"],[3,"subLabel","datasets","variables","subVariables","datasetChange","dataVariableChange","selectAll"],["class","data-block",4,"ngIf"],[1,"data-block"],["class","visualization","dataBindingName","distribution",3,"variable","filterSource","autosize",4,"ngFor","ngForOf"],["class","time-slider",3,"active","sticky","spec","autosize","options","viewChange",4,"ngIf"],["dataBindingName","distribution",1,"visualization",3,"variable","filterSource","autosize"],[1,"time-slider",3,"spec","autosize","options","viewChange"]],template:function(r,s){if(1&r&&(Ae(0,"div",0),wt(1,"Data Distributions"),ke(),Ae(2,"agc-table-data-selector",1),yn("datasetChange",function(h){return s.setSelectedDataset(h)})("dataVariableChange",function(h){return s.setSelectedVariable(h)})("selectAll",function(){return s.setSelectAllVariables()}),uf(3,"async"),uf(4,"async"),uf(5,"async"),uf(6,"async"),ke(),en(7,C_e,3,2,"div",2)),2&r){let c,h,y,E;Ze(2),vt("subLabel",null!==(c=cm(3,5,s.subLabel$))&&void 0!==c?c:"")("datasets",null!==(h=cm(4,7,s.datasets$))&&void 0!==h?h:f_(13,zX))("variables",null!==(y=cm(5,9,s.variables$))&&void 0!==y?y:f_(14,zX))("subVariables",null!==(E=cm(6,11,s.subVariables$))&&void 0!==E?E:f_(15,zX)),Ze(5),vt("ngIf",s.selectedVariables.length>0)}},dependencies:[o0,x_,v2,c_e,v_e,PI],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%]{width:100%;height:100%;margin-top:2rem}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]{padding-top:2rem;padding-bottom:2rem}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider[_ngcontent-%COMP%]{margin-top:2rem;width:100%}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider[_ngcontent-%COMP%]:not(.active){display:none}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider.sticky[_ngcontent-%COMP%]{position:sticky;bottom:0;z-index:2001}"],changeDetection:0})}return e})()}];let D_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(S_e),mu]})}return e})(),M_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,v2,NU,wne,Kge,D_e]})}return e})();const A_e=[{path:"",pathMatch:"full",redirectTo:"about"},{path:"about",loadChildren:()=>Pae},{path:"change-log",loadChildren:()=>Bae},{path:"data-er-diagram",loadChildren:()=>jae},{path:"data-schema-browser",loadChildren:()=>Wae},{path:"visualization/:id",loadChildren:()=>Qpe},{path:"data-distributions",loadChildren:()=>M_e}];let T_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forRoot(A_e),mu]})}return e})();const k_e={version:"1.0.0",lastCommitDate:new Date(1719263635e3),buildDate:new Date(1719263769945)};let ere=(()=>{class e{constructor(t){this.data=t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(cte))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-markdown-modal"]],decls:10,vars:4,consts:[["mat-dialog-title","",1,"header"],[1,"title"],[1,"filler"],["mat-icon-button","","mat-dialog-close","","tabindex","-1",1,"close"],[3,"src"]],template:function(r,s){1&r&&(Ae(0,"h2",0)(1,"div",1),wt(2),uf(3,"uppercase"),ke(),Wt(4,"div",2),Ae(5,"button",3)(6,"mat-icon"),wt(7,"close"),ke()()(),Ae(8,"mat-dialog-content"),Wt(9,"markdown",4),ke()),2&r&&(Ze(2),Pr(cm(3,2,s.data.title)),Ze(7),vt("src",s.data.src))},dependencies:[Ete,dte,iU,rU,v$,HL,_m],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center}[_nghost-%COMP%] .header[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0})}return e})(),tre=(()=>{class e{constructor(t,r,s){this.path=t,this.queryParams=r,this.extras=s}}return e.type="[Router] Navigate",e})(),nre=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterRequest",e})(),VX=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterNavigation",e})(),ire=(()=>{class e{constructor(t,r,s,c="none"){this.routerState=t,this.storeState=r,this.event=s,this.trigger=c}}return e.type="[Router] RouterCancel",e})(),rre=(()=>{class e{constructor(t,r,s,c="none"){this.routerState=t,this.storeState=r,this.event=s,this.trigger=c}}return e.type="[Router] RouterError",e})(),ore=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterDataResolved",e})(),sre=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterNavigated",e})();class jX{}class I_e{serialize(n){return{root:this.serializeRoute(n.root),url:n.url}}serializeRoute(n){const t=n.children.map(r=>this.serializeRoute(r));return{url:n.url,params:n.params,queryParams:n.queryParams,fragment:n.fragment,data:n.data,outlet:n.outlet,component:null,routeConfig:null,root:null,parent:null,firstChild:t[0],children:t,pathFromRoot:null,paramMap:n.paramMap,queryParamMap:n.queryParamMap,toString:n.toString}}}const are=new $e("USER_OPTIONS",{providedIn:"root",factory:()=>{}}),lre=new $e("NGXS_ROUTER_PLUGIN_OPTIONS",{providedIn:"root",factory:()=>({})});function O_e(e){return{navigationActionTiming:e&&e.navigationActionTiming||1}}var C2;let Vh=C2=class{constructor(n,t,r,s,c){this._store=n,this._router=t,this._serializer=r,this._ngZone=s,this._trigger="none",this._routerState=null,this._storeState=null,this._lastEvent=null,this._subscription=new xn,this._options=null,this._options=c.get(lre,null),this._setUpStoreListener(),this._setUpRouterEventsListener()}static state(n){return n&&n.state}static url(n){return n&&n.state&&n.state.url}ngOnDestroy(){this._subscription.unsubscribe()}navigate(n,t){return this._ngZone.run(()=>this._router.navigate(t.path,Object.assign({queryParams:t.queryParams},t.extras)))}angularRouterAction(n,t){n.setState({trigger:t.trigger,state:t.routerState,navigationId:t.event.id})}_setUpStoreListener(){const n=this._store.select(C2).subscribe(t=>{this._navigateIfNeeded(t)});this._subscription.add(n)}_navigateIfNeeded(n){n&&"devtools"===n.trigger&&(this._storeState=this._store.selectSnapshot(C2)),this._storeState&&this._storeState.state&&n&&"router"!==n.trigger&&this._router.url!==this._storeState.state.url&&!(this._lastEvent instanceof JD)&&(this._storeState=this._store.selectSnapshot(C2),this._trigger="store",this._ngZone.run(()=>this._router.navigateByUrl(this._storeState.state.url)))}_setUpRouterEventsListener(){const n=null!=this._options&&2===this._options.navigationActionTiming;let t;const r=this._router.events.subscribe(s=>{this._lastEvent=s,s instanceof JD?this._navigationStart(s):s instanceof O4?(t=s,!n&&"store"!==this._trigger&&this._dispatchRouterNavigation(t)):s instanceof sJ?this._dispatchRouterDataResolved(s):s instanceof eM?(this._dispatchRouterCancel(s),this._reset()):s instanceof t2?(this._dispatchRouterError(s),this._reset()):s instanceof $_&&("store"!==this._trigger&&(n&&this._dispatchRouterNavigation(t),this._dispatchRouterNavigated(s)),this._reset())});this._subscription.add(r)}_navigationStart(n){this._routerState=this._serializer.serialize(this._router.routerState.snapshot),"none"!==this._trigger&&(this._storeState=this._store.selectSnapshot(C2),this._dispatchRouterAction(new nre(this._routerState,n,this._trigger)))}_dispatchRouterDataResolved(n){const t=this._serializer.serialize(n.state);this._dispatchRouterAction(new ore(t,n,this._trigger))}_dispatchRouterNavigation(n){const t=this._serializer.serialize(n.state);this._dispatchRouterAction(new VX(t,new O4(n.id,n.url,n.urlAfterRedirects,t),this._trigger))}_dispatchRouterCancel(n){this._dispatchRouterAction(new ire(this._routerState,this._storeState,n,this._trigger))}_dispatchRouterError(n){this._dispatchRouterAction(new rre(this._routerState,this._storeState,new t2(n.id,n.url,`${n}`),this._trigger))}_dispatchRouterNavigated(n){const t=this._serializer.serialize(this._router.routerState.snapshot);this._dispatchRouterAction(new sre(t,n,this._trigger))}_dispatchRouterAction(n){this._trigger="router";try{this._store.dispatch(n)}finally{this._trigger="none"}}_reset(){this._trigger="none",this._storeState=null,this._routerState=null}};Vh.\u0275fac=function(n){return new(n||Vh)(pe(j0),pe(dd),pe(jX),pe(Bt),pe(hr))},Vh.\u0275prov=Ue({token:Vh,factory:Vh.\u0275fac}),Nn([Mee(tre),gt("design:type",Function),gt("design:paramtypes",[Object,tre]),gt("design:returntype",void 0)],Vh.prototype,"navigate",null),Nn([Mee([nre,VX,rre,ire,ore,sre]),gt("design:type",Function),gt("design:paramtypes",[Object,Object]),gt("design:returntype",void 0)],Vh.prototype,"angularRouterAction",null),Nn([Tee(),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],Vh,"state",null),Nn([Tee(),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",Object)],Vh,"url",null),Vh=C2=Nn([rM({name:"router",defaults:{state:void 0,navigationId:void 0,trigger:"none"}}),gt("design:paramtypes",[j0,dd,jX,Bt,hr])],Vh);let R_e=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:are,useValue:t},{provide:lre,useFactory:O_e,deps:[are]},{provide:jX,useClass:I_e}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({imports:[[Dee.forFeature([Vh])]]}),e})(),cre=(()=>{let e=class $U extends OG{constructor(t,r){super(),this.actions$=t,this.router=r,this.destroy$=new It,this.navigationStart$=this.router.events.pipe(ii(s=>s instanceof JD),ye(s=>s.url),Kn(this.destroy$)),this.navigationEnd$=this.actions$.pipe(function Vle(...e){return u2(e,["SUCCESSFUL","CANCELED","ERRORED"],Ule)}(VX),ye(s=>s.action.event.url),Kn(this.destroy$))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static#e=this.\u0275fac=function(r){return new(r||$U)(pe(Yle),pe(dd))};static#t=this.\u0275prov=Ue({token:$U,factory:$U.\u0275fac})};return e=Nn([f2(),rM({name:"routerFacade"})],e),e})(),N_e=(()=>{class e{constructor(t){this.http=t}load(t){return this.http.get(t,{responseType:"json"}).pipe(ye(this.parseRawData.bind(this)))}parseRawData(t){if(!t)return{datasets:[],variables:[]};const r=[],s=[];for(const c of Object.values(t))r.push(this.parseRawDataset(c)),s.push(...Object.values(c.columns).map(h=>this.parseRawDatasetVariable(c,h)));return{datasets:r,variables:s}}parseRawDataset(t){return{name:t.name,description:t.remarks,variables:Object.keys(t.columns)}}parseRawDatasetVariable(t,r){return{dataset:t.name,name:r.name,description:r.remarks,type:r.type,nonNullCount:r.n_non_null,percentMissing:r.pct_missing,distribution:{type:r.dist_type,url:r.dist_data.url,summary:{distinct:r.dist_data.distinct,min:r.dist_data.min,max:r.dist_data.max}}}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(M_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ure=(()=>{let e=class BU extends OG{constructor(t,r,s,c){super(),this.datasetLoader=t,this.datasetsState=r,this.variablesState=s,this.http=c}ngxsOnInit(){super.ngxsOnInit(),this.datasetLoader.load(B$.datasetsPath).subscribe(t=>{this.datasetsState.addMany(t.datasets),this.variablesState.addMany(t.variables)})}isPrivate(){return this.http.get(B$.datasetsPath,{responseType:"json"}).pipe(ye(r=>this.isNotEmpty(r)),Sf(this.handleError))}handleError(){return zt(!1)}isNotEmpty(t){return 0!==Object.keys(t).length}static#e=this.\u0275fac=function(r){return new(r||BU)(pe(N_e),pe(z$),pe(E2),pe(M_))};static#t=this.\u0275prov=Ue({token:BU,factory:BU.\u0275fac})};return e=Nn([f2(),rM({name:"data",children:[z$,E2]})],e),e})(),F_e=(()=>{class e{constructor(){this.clsName="agc-banner"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-banner"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:4,vars:0,consts:[[1,"info"],[1,"filler"],["src","assets/images/hero-banner.jpg","alt","Image of a pill bottle",1,"image"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1," Indiana Opioid Dashboard\n"),ke(),Wt(2,"div",1)(3,"img",2))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;height:15rem;align-items:center}[_nghost-%COMP%] .info[_ngcontent-%COMP%]{display:flex;height:4rem;padding-left:2rem;padding-right:1rem;align-items:center}[_nghost-%COMP%] .image[_ngcontent-%COMP%]{height:15rem}[_nghost-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0})}return e})(),P_e=(()=>{class e{constructor(){this.clsName="agc-page-footer",this.buildDate=new Date,this.contactClick=new cn,this.privacyClick=new cn}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-footer"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{buildDate:"buildDate"},outputs:{contactClick:"contactClick",privacyClick:"privacyClick"},decls:12,vars:4,consts:[[1,"resources"],["mat-button","","disableRipple","",1,"contact",3,"click"],["mat-button","","disableRipple","",1,"privacy",3,"click"],[1,"filler"],[1,"build-date"],[1,"copyright"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"button",1),yn("click",function(){return s.contactClick.emit()}),wt(2,"Contact Us"),ke(),Ae(3,"button",2),yn("click",function(){return s.privacyClick.emit()}),wt(4,"Privacy Policy"),ke(),Wt(5,"div",3),Ae(6,"span",4),wt(7),uf(8,"date"),ke()(),Ae(9,"div",5)(10,"span"),wt(11,"Copyright \xa9 2020 Indiana University, Regenstrief Institute - All rights reserved."),ke()()),2&r&&(Ze(7),lf(" This site was last updated on ",Wk(8,1,s.buildDate,"MM/dd/yyyy, h:mm a")," "))},dependencies:[wte,c5],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .resources[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;height:4.5rem;align-items:center;padding-left:1rem;padding-right:1rem}[_nghost-%COMP%] .resources[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%], [_nghost-%COMP%] .resources[_ngcontent-%COMP%] .privacy[_ngcontent-%COMP%]{transition:color .3s}[_nghost-%COMP%] .resources[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;height:3rem;justify-content:center;align-items:center}"],changeDetection:0})}return e})(),L_e=(()=>{class e{constructor(){this.clsName="agc-menu-icon",this.alternateIcon=!1}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-menu-icon"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{alternateIcon:"alternateIcon"},decls:6,vars:2,consts:[[1,"icon"],[1,"bar"],[1,"text"]],template:function(r,s){1&r&&(Ae(0,"div",0),Wt(1,"div",1)(2,"div",1)(3,"div",1),ke(),Ae(4,"div",2),wt(5,"MENU"),ke()),2&r&&In("alternate",s.alternateIcon)},styles:["[_nghost-%COMP%]{display:block;width:2.25rem;height:2.25rem;cursor:pointer}[_nghost-%COMP%] .icon[_ngcontent-%COMP%]{margin-bottom:.25rem}[_nghost-%COMP%] .icon[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:1.875rem;height:.25rem;border-radius:.625rem;transition:.4s}[_nghost-%COMP%] .icon[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(2){width:2.25rem;margin:.25rem 0}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(1){width:1.75rem;transform:translate(.375rem,.5rem) rotate(45deg)}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(2){opacity:0}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(3){width:1.75rem;transform:translate(.375rem,-.5rem) rotate(-45deg)}"],changeDetection:0})}return e})(),$_e=(()=>{class e{constructor(){this.clsName="agc-page-header",this.menuOpen=!1,this.menuOpenChange=new cn}toggleMenuOpen(){this.menuOpen=!this.menuOpen,this.menuOpenChange.emit(this.menuOpen)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-header"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{menuOpen:"menuOpen"},outputs:{menuOpenChange:"menuOpenChange"},decls:7,vars:1,consts:[["mat-flat-button","","color","primary",1,"menu",3,"click"],[3,"alternateIcon"],[1,"logos"],["href","https://cns.iu.edu","target","_blank","rel","noreferrer noopener"],["src","assets/images/iu-white.svg","alt","Indiana University logo"],["href","https://www.regenstrief.org","target","_blank","rel","noreferrer noopener"],["src","assets/images/regenstrief-white.svg","alt","Regenstrief Institute logo"]],template:function(r,s){1&r&&(Ae(0,"button",0),yn("click",function(){return s.toggleMenuOpen()}),Wt(1,"agc-menu-icon",1),ke(),Ae(2,"div",2)(3,"a",3),Wt(4,"img",4),ke(),Ae(5,"a",5),Wt(6,"img",6),ke()()),2&r&&(Ze(),vt("alternateIcon",s.menuOpen))},dependencies:[wte,L_e],styles:["[_nghost-%COMP%]{display:flex;height:3.5rem;align-items:center}[_nghost-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;width:5rem;height:3.5rem;align-items:center;justify-content:center;border-radius:0;border-right-width:1px;border-right-style:solid}[_nghost-%COMP%] .logos[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:100%;justify-content:flex-start;align-items:center;border-radius:0;border-left-width:1px;border-left-style:solid}[_nghost-%COMP%] .logos[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{height:2.25rem;margin-left:1rem}[_nghost-%COMP%] .logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:2.25rem}"],changeDetection:0})}return e})(),B_e=(()=>{class e{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Mh(t)}get inset(){return this._inset}set inset(t){this._inset=Mh(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(r,s){2&r&&(hi("aria-orientation",s.vertical?"vertical":"horizontal"),In("mat-divider-vertical",s.vertical)("mat-divider-horizontal",!s.vertical)("mat-divider-inset",s.inset))},inputs:{vertical:"vertical",inset:"inset"},standalone:!0,features:[xi],decls:0,vars:0,template:function(r,s){},styles:[".mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color);border-top-width:var(--mat-divider-width)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color);border-right-width:var(--mat-divider-width)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0})}return e})(),z_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),V_e=(()=>{class e{constructor(t){this.locale=t}transform(t,r,s,c){if(!t||0===t.length||void 0===r)return t;const h=new Intl.Collator(this.locale||void 0,{usage:"sort",numeric:!0,sensitivity:"nocase"===c?"accent":"variant"});return[...t].sort((E,M)=>{const R=E[r],$=M[r];return null==R?null==$?0:1:null==$?-1:"desc"===s?-h.compare(R,$):h.compare(R,$)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(df,24))};static#t=this.\u0275pipe=fs({name:"orderBy",type:e,pure:!0})}return e})();const j_e=e=>["/visualization",e];function U_e(e,n){if(1&e&&(Ae(0,"a",11)(1,"div",7),wt(2),ke(),Ae(3,"div",12),wt(4),ke(),Wt(5,"mat-divider"),ke()),2&e){const t=n.$implicit;vt("routerLink",function Aw(e,n,t,r){return cf(qe(),Os(),e,n,t,r)}(3,j_e,t.path)),Ze(2),Pr(t.title),Ze(2),Pr(t.description)}}function H_e(e,n){1&e&&(Ae(0,"a",13),Wt(1,"mat-icon",14),Ae(2,"span",7),wt(3,"Data Distributions"),ke()())}function W_e(e,n){1&e&&Wt(0,"mat-divider")}function q_e(e,n){1&e&&Wt(0,"mat-divider")}function G_e(e,n){1&e&&(Ae(0,"a",15),Wt(1,"mat-icon",16),Ae(2,"span",7),wt(3,"Data Schema Browser"),ke()())}function X_e(e,n){1&e&&Wt(0,"mat-divider")}function Y_e(e,n){1&e&&(Ae(0,"a",17)(1,"mat-icon"),wt(2,"bar_chart_outline"),ke(),Ae(3,"span",7),wt(4,"Data ER Diagram"),ke()())}let K_e=(()=>{class e{constructor(){this.clsName="agc-page-menu",this.header="",this.pages=[],this.showData=!0}linkId(t,r){return r.path}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-menu"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{header:"header",pages:"pages",showData:"showData"},decls:24,vars:12,consts:[[1,"header"],[1,"pages"],["class","link","routerLinkActive","active",3,"routerLink",4,"ngFor","ngForOf","ngForTrackBy"],[1,"info"],["class","link distributions","routerLink","/data-distributions","routerLinkActive","active",4,"ngIf"],[4,"ngIf"],["routerLink","/about","routerLinkActive","active",1,"link","about"],[1,"title"],["class","link schema","routerLink","/data-schema-browser","routerLinkActive","active",4,"ngIf"],["class","link er-diagram","routerLink","/data-er-diagram","routerLinkActive","active",4,"ngIf"],["routerLink","/change-log","routerLinkActive","active",1,"link","changelog"],["routerLinkActive","active",1,"link",3,"routerLink"],[1,"description"],["routerLink","/data-distributions","routerLinkActive","active",1,"link","distributions"],["svgIcon","menu:data-distributions"],["routerLink","/data-schema-browser","routerLinkActive","active",1,"link","schema"],["svgIcon","menu:data-storage"],["routerLink","/data-er-diagram","routerLinkActive","active",1,"link","er-diagram"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1),ke(),Ae(2,"nav",1),en(3,U_e,6,5,"a",2),uf(4,"orderBy"),ke(),Ae(5,"div",3),en(6,H_e,4,0,"a",4)(7,W_e,1,0,"mat-divider",5),Ae(8,"a",6)(9,"mat-icon"),wt(10,"info_outlined"),ke(),Ae(11,"span",7),wt(12,"About"),ke()(),en(13,q_e,1,0,"mat-divider",5)(14,G_e,4,0,"a",8)(15,X_e,1,0,"mat-divider",5)(16,Y_e,5,0,"a",9),Wt(17,"mat-divider"),Ae(18,"a",10)(19,"mat-icon"),wt(20,"published_with_changes_outline"),ke(),Ae(21,"span",7),wt(22,"Changelog"),ke()(),Wt(23,"mat-divider"),ke()),2&r&&(Ze(),lf(" ",s.header,"\n"),Ze(2),vt("ngForOf",Wk(4,9,s.pages,"order"))("ngForTrackBy",s.linkId),Ze(3),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(6),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData))},dependencies:[o0,x_,$4,OJ,B_e,v$,V_e],styles:["[_nghost-%COMP%]{display:block;width:30rem;margin-bottom:2rem}[_nghost-%COMP%] .header[_ngcontent-%COMP%], [_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(mat-divider), [_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;align-items:center}[_nghost-%COMP%] .pages[_ngcontent-%COMP%]{padding-top:2rem}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{outline:none;text-decoration:none}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-top:1rem}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding-bottom:1rem}[_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:flex;height:2.25rem;align-items:center;cursor:pointer;outline:none;text-decoration:none;transition:color .3s ease-in-out}[_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}"],changeDetection:0})}return e})(),Z_e=(()=>{class e{constructor(){this.clsName="agc-sub-bar",this.visible=!0}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-sub-bar"]],hostVars:4,hostBindings:function(r,s){2&r&&(wo(s.clsName),In("visible",s.visible))},inputs:{visible:"visible"},decls:0,vars:0,template:function(r,s){},styles:["[_nghost-%COMP%]{display:block;height:2.625rem;transition:height .3s ease-in-out}[_nghost-%COMP%]:not(.visible){height:0}"],changeDetection:0})}return e})(),Q_e=(()=>{class e{constructor(t,r,s,c){this.dialog=s,this.zone=c,this.clsName="agc-root",this.showData=!0,this.menuHeader="Marion County Opioid Addiction Report",this.pages=jee.map(h=>({path:h.id,title:h.title,description:h.description})),this.subBarVisible=!0,this.menuOpen=!1,this.buildDate=k_e.buildDate,t.navigationStart$.subscribe(()=>{this.menuOpen=!1}),r.isPrivate().subscribe(h=>{this.showData=h})}ngAfterViewInit(){this.sidenavContainer.scrollable.elementScrolled().subscribe(()=>{const r=0===this.sidenavContainer.scrollable.measureScrollOffset("top");this.subBarVisible!==r&&this.zone.run(()=>{this.subBarVisible=r})})}openContactUs(){this.dialog.open(ere,{width:"800px",height:"600px",data:{title:"Contact us",src:"assets/footer/contact-us.md"}})}openPrivacyPolicy(){this.dialog.open(ere,{width:"800px",height:"600px",data:{title:"Privacy Policy",src:"assets/footer/privacy-policy.md"}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(cre),ue(ure),ue(_$),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-root"]],viewQuery:function(r,s){if(1&r&&ha(RO,5),2&r){let c;zi(c=Pi())&&(s.sidenavContainer=c.first)}},hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:12,vars:7,consts:[[3,"menuOpen","menuOpenChange"],["mode","over",3,"opened","openedChange","closedStart"],[3,"header","pages","showData"],[3,"visible"],[1,"content"],[1,"outlet-wrapper"],[1,"space-filler"],[3,"buildDate","contactClick","privacyClick"]],template:function(r,s){1&r&&(Ae(0,"agc-page-header",0),yn("menuOpenChange",function(h){return s.menuOpen=h}),ke(),Ae(1,"mat-sidenav-container")(2,"mat-sidenav",1),yn("openedChange",function(h){return s.menuOpen=h})("closedStart",function(){return s.menuOpen=!1}),Wt(3,"agc-page-menu",2),ke(),Ae(4,"mat-sidenav-content"),Wt(5,"agc-sub-bar",3)(6,"agc-banner"),Ae(7,"div",4)(8,"div",5),Wt(9,"router-outlet"),ke(),Wt(10,"div",6),ke(),Ae(11,"agc-page-footer",7),yn("contactClick",function(){return s.openContactUs()})("privacyClick",function(){return s.openPrivacyPolicy()}),ke()()()),2&r&&(vt("menuOpen",s.menuOpen),Ze(2),vt("opened",s.menuOpen),Ze(),vt("header",s.menuHeader)("pages",s.pages)("showData",s.showData),Ze(2),vt("visible",s.subBarVisible),Ze(6),vt("buildDate",s.buildDate))},dependencies:[BD,RO,g1,Wq,F_e,P_e,$_e,K_e,Z_e],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto}[_nghost-%COMP%] agc-page-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:10}[_nghost-%COMP%] mat-sidenav-container[_ngcontent-%COMP%]{height:calc(100% - 3.5rem)}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-flow:column;max-width:1328px;min-height:calc(100% - 25.125rem);padding:4.5rem 4rem;align-items:center;margin:auto}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .outlet-wrapper[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .space-filler[_ngcontent-%COMP%]{flex-grow:1}"]})}return e})(),dre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})(),fre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$]})}return e})(),hre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,h2,NU]})}return e})(),pre=(()=>{class e{constructor(t,r){t.addSvgIconInNamespace("menu","data-storage",r.bypassSecurityTrustResourceUrl("assets/icons/data-storage.svg")),t.addSvgIconInNamespace("menu","data-distributions",r.bypassSecurityTrustResourceUrl("assets/icons/data-distributions.svg"))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(b$),pe(n1))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,mu,z_e,h2,NU]})}return e})(),mre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();const gre=new $e("Theme options");let J_e=(()=>{class e{get theme(){return this.currentTheme}set theme(t){const r=t||this.defaultTheme,s=this.currentTheme;this.currentTheme=r,this.switchTheme(this.elements,r,s)}constructor(t,r){this.elements=[],this.defaultTheme=t.default??"",this.currentTheme=t.theme??this.defaultTheme;const s=r?.getContainerElement();s&&this.addElement(s)}ngOnDestroy(){const t=[...this.elements];for(const r of t)this.removeElement(r)}addBootstrapComponent(t){const r=t.location.nativeElement;r&&(this.addElement(r),t.onDestroy(()=>this.removeElement(r)))}addElement(t){this.switchTheme([t],this.currentTheme,""),this.elements.push(t)}removeElement(t){const r=this.elements.indexOf(t);r>=0&&(this.elements.splice(r,1),this.switchTheme([t],"",this.currentTheme))}switchTheme(t,r,s){this.addClass(t,"color-transitions-disabled"),this.removeClass(t,s),this.addClass(t,r),setTimeout(()=>this.removeClass(t,"color-transitions-disabled"))}addClass(t,r){if(r)for(const s of t)s.classList.add(r)}removeClass(t,r){if(r)for(const s of t)s.classList.remove(r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gre),pe(m$,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eye=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[{provide:$w,useFactory:r=>s=>r.addBootstrapComponent(s),deps:[J_e],multi:!0},{provide:gre,useValue:t}]}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const FU=(e,n)=>((e,n)=>new Array(n+1).join("0"))(0,n-e.toString().length)+e;class iye{constructor(n,t,r){this.action=n,this.store=t,this.logWriter=r}dispatched(n){const t=nM(this.action),r=function nye(e){return FU(e.getHours(),2)+":"+FU(e.getMinutes(),2)+":"+FU(e.getSeconds(),2)+"."+FU(e.getMilliseconds(),3)}(new Date);this.logWriter.startGroup(`action ${t} @ ${r}`),this._hasPayload(this.action)&&this.logWriter.logGrey("payload",Object.assign({},this.action)),this.logWriter.logGrey("prev state",n)}completed(n){this.logWriter.logGreen("next state",n),this.logWriter.endGroup()}errored(n){this.logWriter.logRedish("next state after error",this.store.snapshot()),this.logWriter.logRedish("error",n),this.logWriter.endGroup()}_hasPayload(n){return this._getNonEmptyProperties(n).length>0}_getNonEmptyProperties(n){return Object.keys(n).map(s=>n[s]).filter(s=>void 0!==s)}}class rye{constructor(n){this.options=n,this.options=this.options||{},this.logger=n.logger||console}startGroup(n){const t=this.options.collapsed?this.logger.groupCollapsed:this.logger.group;try{t.call(this.logger,n)}catch{console.log(n)}}endGroup(){try{this.logger.groupEnd()}catch{this.logger.log("\u2014\u2014 log end \u2014\u2014")}}logGrey(n,t){this.log(n,"color: #9E9E9E; font-weight: bold",t)}logGreen(n,t){this.log(n,"color: #4CAF50; font-weight: bold",t)}logRedish(n,t){this.log(n,"color: #FD8182; font-weight: bold",t)}log(n,t,r){this.isIE()?this.logger.log(n,r):this.logger.log("%c "+n,t,r)}isIE(){const n=typeof window<"u"&&window.navigator.userAgent?window.navigator.userAgent:"";let t=!1;const r=n.indexOf("MSIE "),s=n.indexOf("Trident/");return(r>-1||s>-1)&&(t=!0),t}}const _re=new $e("NGXS_LOGGER_PLUGIN_OPTIONS");let oye=(()=>{class e{constructor(t,r){this._options=t,this._injector=r}handle(t,r,s){if(this._options.disabled||!this._options.filter(r,t))return s(t,r);this._logWriter=this._logWriter||new rye(this._options),this._store=this._store||this._injector.get(j0);const c=new iye(r,this._store,this._logWriter);return c.dispatched(t),s(t,r).pipe(Do(h=>{c.completed(h)}),Sf(h=>{throw c.errored(h),h}))}}return e.\u0275fac=function(t){return new(t||e)(pe(_re),pe(hr))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();const yre=new $e("LOGGER_USER_OPTIONS");function sye(e){return Object.assign(Object.assign({},{logger:console,collapsed:!1,disabled:!1,filter:()=>!0}),e)}let aye=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:_G,useClass:oye,multi:!0},{provide:yre,useValue:t},{provide:_re,useFactory:sye,deps:[yre]}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();const UX=new $e(""),vre=new $e(""),HX="@@STATE";function lye(e){return Object.assign({key:[HX],storage:0,serialize:JSON.stringify,deserialize:JSON.parse,beforeSerialize:n=>n,afterDeserialize:n=>n},e)}function cye(e,n){return qS(n)?null:0===e.storage?localStorage:1===e.storage?sessionStorage:null}function xre(e,n){return n&&n.namespace?`${n.namespace}:${e}`:e}function wre(e){return null!=e&&!!e.engine}const Ere="NGXS_OPTIONS_META",Cre=new $e("");function fye(e,n){const r=(Array.isArray(n.key)?n.key:[n.key]).map(s=>{const c=function uye(e){return wre(e)&&(e=e.key),e.hasOwnProperty(Ere)&&(e=e[Ere].name),e instanceof xce?e.getName():e}(s);return{key:c,engine:wre(s)?e.get(s.engine):e.get(vre)}});return Object.assign(Object.assign({},n),{keysWithEngines:r})}let hye=(()=>{class e{constructor(t,r){this._options=t,this._platformId=r,this._keysWithEngines=this._options.keysWithEngines,this._usesDefaultStateKey=1===this._keysWithEngines.length&&this._keysWithEngines[0].key===HX}handle(t,r,s){var c;if(qS(this._platformId))return s(t,r);const h=function wle(e){const n=nM(e);return function(t){return n===nM(t)}}(r),y=h(DG),E=h(MG),M=y||E;let R=!1;if(M){const $=E&&r.addedStates;for(const{key:j,engine:X}of this._keysWithEngines){if(!this._usesDefaultStateKey&&$){const me=j.indexOf(pye),Me=me>-1?j.slice(0,me):j;if(!$.hasOwnProperty(Me))continue}const K=xre(j,this._options);let ie=X.getItem(K);if("undefined"!==ie&&null!=ie){try{const me=this._options.deserialize(ie);ie=this._options.afterDeserialize(me,j)}catch{ie={}}null===(c=this._options.migrations)||void 0===c||c.forEach(me=>{me.version===u$(ie,me.versionKey||"version")&&(!me.key&&this._usesDefaultStateKey||me.key===j)&&(ie=me.migrate(ie),R=!0)}),this._usesDefaultStateKey?(ie&&$&&Object.keys($).length>0&&(ie=Object.keys($).reduce((me,Me)=>(ie.hasOwnProperty(Me)&&(me[Me]=ie[Me]),me),{})),t=Object.assign(Object.assign({},t),ie)):t=pG(t,j,ie)}}}return s(t,r).pipe(Do($=>{if(!M||R)for(const{key:j,engine:X}of this._keysWithEngines){let K=$;const ie=xre(j,this._options);j!==HX&&(K=u$($,j));try{const me=this._options.beforeSerialize(K,j);X.setItem(ie,this._options.serialize(me))}catch(me){}}}))}}return e.\u0275fac=function(t){return new(t||e)(pe(Cre),pe(ps))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();const pye=".",Dre=new $e("");let gye=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:_G,useClass:hye,multi:!0},{provide:Dre,useValue:t},{provide:UX,useFactory:lye,deps:[Dre]},{provide:vre,useFactory:cye,deps:[UX,ps]},{provide:Cre,useFactory:fye,deps:[hr,UX]}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();new $e("",{providedIn:"root",factory:()=>Eh(Xe(ps))?localStorage:null}),new $e("",{providedIn:"root",factory:()=>Eh(Xe(ps))?sessionStorage:null});const _ye=[cre,vte,Uee,ure,z$,E2];let yye=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Xce.forRoot(),Dee.forRoot(_ye,{developmentMode:!1}),gye.forRoot({key:[]}),R_e.forRoot(),aye.forRoot({disabled:true})]})}return e})(),bye=(()=>{class e{constructor(t){if(t)throw new Error("CoreModule should only be imported once in the AppModule!")}static#e=this.\u0275fac=function(r){return new(r||e)(pe(e,12))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[eye.forRoot(),yye,dre,fre,hre,pre,mre,dre,fre,hre,pre,mre]})}return e})(),vye=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e,bootstrap:[Q_e]});static#n=this.\u0275inj=Tt({imports:[R5,le,V7,OW,WL.forRoot({loader:M_,markedOptions:{provide:LQ,useValue:{gfm:!0}}}),T_e,bye,NU]})}return e})();I5().bootstrapModule(vye).catch(e=>console.error(e))},563:(Ba,Ds,tn)=>{Ba.exports={ResizeSensor:tn(884),ElementQueries:tn(381)}},381:function(Ba,Ds,tn){"use strict";var Ct,re,Ii;typeof window<"u"&&window,re=[tn(884)],void 0!==(Ii="function"==typeof(Ct=function(sn){var yi=function(){var Xt,oi={},Rt=[];function On(he){he||(he=document.documentElement);var fe=window.getComputedStyle(he,null).fontSize;return parseFloat(fe)||16}function si(he,fe){var Be=fe.split(/\d/),Qe=Be[Be.length-1];switch(fe=parseFloat(fe),Qe){case"px":default:return fe;case"em":return fe*On(he);case"rem":return fe*On();case"vw":return fe*document.documentElement.clientWidth/100;case"vh":return fe*document.documentElement.clientHeight/100;case"vmin":case"vmax":var ot=document.documentElement.clientWidth/100,At=document.documentElement.clientHeight/100;return fe*(0,Math["vmin"===Qe?"min":"max"])(ot,At)}}function N(he,fe){this.element=he;var Be,Qe,ot,At,st,Fn,Sn,yt,kt=["min-width","min-height","max-width","max-height"];this.call=function(){for(Be in ot=function Ut(he){if(!he.getBoundingClientRect)return{width:he.offsetWidth,height:he.offsetHeight};var fe=he.getBoundingClientRect();return{width:Math.round(fe.width),height:Math.round(fe.height)}}(this.element),Fn={},oi[fe])oi[fe].hasOwnProperty(Be)&&(At=si(this.element,(Qe=oi[fe][Be]).value),st="width"===Qe.property?ot.width:ot.height,Sn="","min"===Qe.mode&&st>=At&&(Sn+=Qe.value),"max"===Qe.mode&&st<=At&&(Sn+=Qe.value),Fn[yt=Qe.mode+"-"+Qe.property]||(Fn[yt]=""),Sn&&-1===(" "+Fn[yt]+" ").indexOf(" "+Sn+" ")&&(Fn[yt]+=" "+Sn));for(var $t in kt)kt.hasOwnProperty($t)&&(Fn[kt[$t]]?this.element.setAttribute(kt[$t],Fn[kt[$t]].substr(1)):this.element.removeAttribute(kt[$t]))}}function ai(he,fe){he.elementQueriesSetupInformation||(he.elementQueriesSetupInformation=new N(he,fe)),he.elementQueriesSensor||(he.elementQueriesSensor=new sn(he,function(){he.elementQueriesSetupInformation.call()}))}function Gr(he,fe,Be,Qe){if(typeof oi[he]>"u"){oi[he]=[];var ot=Rt.length;Xt.innerHTML+="\n"+he+" {animation: 0.1s element-queries;}",Xt.innerHTML+="\n"+he+" > .resize-sensor {min-width: "+ot+"px;}",Rt.push(he)}oi[he].push({mode:fe,property:Be,value:Qe})}function Yt(he){var fe;if(document.querySelectorAll&&(fe=he?he.querySelectorAll.bind(he):document.querySelectorAll.bind(document)),!fe&&typeof $$<"u"&&(fe=$$),!fe&&typeof jQuery<"u"&&(fe=jQuery),!fe)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return fe}function dr(he){var fe=[],Be=[],Qe=[],ot=0,At=-1,st=[];for(var Fn in he.children)if(he.children.hasOwnProperty(Fn)&&he.children[Fn].tagName&&"img"===he.children[Fn].tagName.toLowerCase()){fe.push(he.children[Fn]);var Sn=he.children[Fn].getAttribute("min-width")||he.children[Fn].getAttribute("data-min-width"),yt=he.children[Fn].getAttribute("data-src")||he.children[Fn].getAttribute("url");Qe.push(yt),Be.push({minWidth:Sn}),Sn?he.children[Fn].style.display="none":(ot=fe.length-1,he.children[Fn].style.display="block")}function $t(){var li,St=!1;for(li in fe)fe.hasOwnProperty(li)&&Be[li].minWidth&&he.offsetWidth>Be[li].minWidth&&(St=li);if(St||(St=ot),At!==St)if(st[St])fe[At].style.display="none",fe[St].style.display="block",At=St;else{var Ot=new Image;Ot.onload=function(){fe[St].src=Qe[St],fe[At].style.display="none",fe[St].style.display="block",st[St]=!0,At=St},Ot.src=Qe[St]}else fe[St].src=Qe[St]}At=ot,he.resizeSensorInstance=new sn(he,$t),$t()}var Zi=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,zo=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function Xr(he){var fe,Be,Qe,ot;for(he=he.replace(/'/g,'"');null!==(fe=Zi.exec(he));)for(Be=fe[1]+fe[3],Qe=fe[2];null!==(ot=zo.exec(Qe));)Gr(Be,ot[1],ot[2],ot[3])}function ei(he){var fe="";if(he)if("string"==typeof he)(-1!==(he=he.toLowerCase()).indexOf("min-width")||-1!==he.indexOf("max-width"))&&Xr(he);else for(var Be=0,Qe=he.length;Be img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",Xt.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(Xt),ti=!0);for(var fe=0,Be=document.styleSheets.length;fe"u")return null;var Ii=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),sn=Ii.requestAnimationFrame||Ii.mozRequestAnimationFrame||Ii.webkitRequestAnimationFrame||function(Ut){return Ii.setTimeout(Ut,20)},yi=Ii.cancelAnimationFrame||Ii.mozCancelAnimationFrame||Ii.webkitCancelAnimationFrame||function(Ut){Ii.clearTimeout(Ut)};function Zn(Ut,si){var N=Object.prototype.toString.call(Ut),ai="[object Array]"===N||"[object NodeList]"===N||"[object HTMLCollection]"===N||"[object Object]"===N||typeof jQuery<"u"&&Ut instanceof jQuery||typeof Elements<"u"&&Ut instanceof Elements,Gr=0,Yt=Ut.length;if(ai)for(;Gr=this._config.preview;if(Zn)sn.postMessage({results:At,workerId:Rt.WORKER_ID,finished:Fn});else if(ti(this._config.chunk)&&!Be){if(this._config.chunk(At,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);At=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(At.data),this._completeResults.errors=this._completeResults.errors.concat(At.errors),this._completeResults.meta=At.meta),this._completed||!Fn||!ti(this._config.complete)||At&&At.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Fn||At&&At.meta.paused||this._nextChunk(),At}this._halted=!0},this._sendError=function(fe){ti(this._config.error)?this._config.error(fe):Zn&&this._config.error&&sn.postMessage({workerId:Rt.WORKER_ID,error:fe,finished:!1})}}function si(he){var fe;(he=he||{}).chunkSize||(he.chunkSize=Rt.RemoteChunkSize),Ut.call(this,he),this._nextChunk=yi?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Be){this._input=Be,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(fe=new XMLHttpRequest,this._config.withCredentials&&(fe.withCredentials=this._config.withCredentials),yi||(fe.onload=ei(this._chunkLoaded,this),fe.onerror=ei(this._chunkError,this)),fe.open(this._config.downloadRequestBody?"POST":"GET",this._input,!yi),this._config.downloadRequestHeaders){var Be=this._config.downloadRequestHeaders;for(var Qe in Be)fe.setRequestHeader(Qe,Be[Qe])}this._config.chunkSize&&fe.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{fe.send(this._config.downloadRequestBody)}catch(At){this._chunkError(At.message)}yi&&0===fe.status&&this._chunkError()}},this._chunkLoaded=function(){var Qe;4===fe.readyState&&(fe.status<200||400<=fe.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:fe.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null===(Qe=fe.getResponseHeader("Content-Range"))?-1:parseInt(Qe.substring(Qe.lastIndexOf("/")+1))),this.parseChunk(fe.responseText)))},this._chunkError=function(Be){this._sendError(new Error(fe.statusText||Be))}}function N(he){var fe,Be;(he=he||{}).chunkSize||(he.chunkSize=Rt.LocalChunkSize),Ut.call(this,he);var Qe=typeof FileReader<"u";this.stream=function(ot){this._input=ot,Be=ot.slice||ot.webkitSlice||ot.mozSlice,Qe?((fe=new FileReader).onload=ei(this._chunkLoaded,this),fe.onerror=ei(this._chunkError,this)):fe=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(ot.target.result)},this._chunkError=function(){this._sendError(fe.error)}}function ai(he){var fe;Ut.call(this,he=he||{}),this.stream=function(Be){return fe=Be,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var Be,Qe=this._config.chunkSize;return Qe?(Be=fe.substring(0,Qe),fe=fe.substring(Qe)):(Be=fe,fe=""),this._finished=!fe,this.parseChunk(Be)}}}function Gr(he){Ut.call(this,he=he||{});var fe=[],Be=!0,Qe=!1;this.pause=function(){Ut.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Ut.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(ot){this._input=ot,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Qe&&1===fe.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),fe.length?this.parseChunk(fe.shift()):Be=!0},this._streamData=ei(function(ot){try{fe.push("string"==typeof ot?ot:ot.toString(this._config.encoding)),Be&&(Be=!1,this._checkIsFinished(),this.parseChunk(fe.shift()))}catch(At){this._streamError(At)}},this),this._streamError=ei(function(ot){this._streamCleanUp(),this._sendError(ot)},this),this._streamEnd=ei(function(){this._streamCleanUp(),Qe=!0,this._streamData("")},this),this._streamCleanUp=ei(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Yt(he){var fe,Be,Qe,ot=Math.pow(2,53),At=-ot,st=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Fn=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Sn=this,yt=0,kt=0,$t=!1,St=!1,li=[],Ot={data:[],errors:[],meta:{}};if(ti(he.step)){var qi=he.step;he.step=function(an){if(Ot=an,fr())Ci();else{if(Ci(),0===Ot.data.length)return;yt+=an.data.length,he.preview&&yt>he.preview?Be.abort():(Ot.data=Ot.data[0],qi(Ot,Sn))}}}function zr(an){return"greedy"===he.skipEmptyLines?""===an.join("").trim():1===an.length&&0===an[0].length}function Ci(){return Ot&&Qe&&(Qi("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Rt.DefaultDelimiter+"'"),Qe=!1),he.skipEmptyLines&&(Ot.data=Ot.data.filter(function(an){return!zr(an)})),fr()&&function(){if(Ot)if(Array.isArray(Ot.data[0])){for(var Oi=0;fr()&&Oi=li.length?"__parsed_extra":li[Dn]),he.transform&&(hn=he.transform(hn,Hi)),hn=no(Hi,hn),"__parsed_extra"===Hi?(Jt[Hi]=Jt[Hi]||[],Jt[Hi].push(hn)):Jt[Hi]=hn}return he.header&&(Dn>li.length?Qi("FieldMismatch","TooManyFields","Too many fields: expected "+li.length+" fields but parsed "+Dn,kt+We):Dn=xn.length/2?"\r\n":"\r"}(an,he.quoteChar||'"')),Qe=!1,he.delimiter)ti(he.delimiter)&&(he.delimiter=he.delimiter(an),Ot.meta.delimiter=he.delimiter);else{var Dn=function(Hi,hn,io,xn,Mo){var Js,Vo,Mi,ci;Mo=Mo||[",","\t","|",";",Rt.RECORD_SEP,Rt.UNIT_SEP];for(var jo=0;jo=st)return Uo(!0)}else for(Si=yt,yt++;;){if(-1===(Si=$t.indexOf(fe,Si+1)))return li||Qi.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:no.length,index:yt}),ls();if(Si===Ot-1)return ls($t.substring(yt,Si).replace(jo,fe));if(fe!==Sn||$t[Si+1]!==Sn){if(fe===Sn||0===Si||$t[Si-1]!==Sn){-1!==Mi&&Mi=st)return Uo(!0);break}Qi.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:no.length,index:yt}),Si++}}else Si++}return ls();function va(vr){no.push(vr),Oi=yt}function Ms(vr){var po=0;if(-1!==vr){var xr=$t.substring(Si+1,vr);xr&&""===xr.trim()&&(po=xr.length)}return po}function ls(vr){return li||(void 0===vr&&(vr=$t.substring(yt)),an.push(vr),yt=Ot,va(an),fr&&$i()),Uo()}function cs(vr){yt=vr,va(an),an=[],ci=$t.indexOf(Qe,yt)}function Uo(vr){return{data:no,errors:Qi,meta:{delimiter:Be,linebreak:Qe,aborted:kt,truncated:!!vr,cursor:Oi+(St||0)}}}function $i(){At(Uo()),no=[],Qi=[]}},this.abort=function(){kt=!0},this.getCharIndex=function(){return yt}}function Br(he){var fe=he.data,Be=Xt[fe.workerId],Qe=!1;if(fe.error)Be.userError(fe.error,fe.file);else if(fe.results&&fe.results.data){var ot={abort:function(){Qe=!0,Zi(fe.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:zo,resume:zo};if(ti(Be.userStep)){for(var At=0;AtAt(_,p))}:fe(d)?{or:d.or.map(_=>At(_,p))}:p(d)}const st=structuredClone;function Fn(d){throw new Error(d)}function Sn(d,p){const _={};for(const x of p)re.hasOwnProperty(d,x)&&(_[x]=d[x]);return _}function yt(d,p){const _={...d};for(const x of p)delete _[x];return _}function kt(d){if(re.isNumber(d))return d;const p=re.isString(d)?d:Wn(d);if(p.length<250)return p;let _=0;for(let x=0;x1?p-1:0),x=1;x0===P?O:`[${O}]`),A=S.map((O,P)=>S.slice(0,P+1).join(""));for(const O of A)p.add(O)}return p}function Oi(d,p){return void 0===d||void 0===p||Qi(an(d),an(p))}function Gt(d){return 0===We(d).length}Set.prototype.toJSON=function(){return`Set(${[...this].map(d=>Wn(d)).join(",")})`};const We=Object.keys,Dn=Object.values,Jt=Object.entries;function Hi(d){return!0===d||!1===d}function hn(d){const p=d.replace(/\W/g,"_");return(d.match(/^\d+/)?"_":"")+p}function io(d,p){return Qe(d)?`!(${io(d.not,p)})`:Be(d)?`(${d.and.map(_=>io(_,p)).join(") && (")})`:fe(d)?`(${d.or.map(_=>io(_,p)).join(") || (")})`:p(d)}function xn(d,p){if(0===p.length)return!0;const _=p.shift();return _ in d&&xn(d[_],p)&&delete d[_],Gt(d)}function Mo(d){return d.charAt(0).toUpperCase()+d.substr(1)}function Js(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";const _=re.splitAccessPath(d),x=[];for(let S=1;S<=_.length;S++){const A=`[${_.slice(0,S).map(re.stringValue).join("][")}]`;x.push(`${p}${A}`)}return x.join(" && ")}function Vo(d){return`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum"}[${re.stringValue(re.splitAccessPath(d).join("."))}]`}function Mi(d){return d.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ci(d){return`${re.splitAccessPath(d).map(Mi).join("\\.")}`}function jo(d,p,_){return d.replace(new RegExp(p.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),_)}function Si(d){return`${re.splitAccessPath(d).join(".")}`}function ro(d){return d?re.splitAccessPath(d).length:0}function ui(){for(var d=arguments.length,p=new Array(d),_=0;_Q_(d[p])?hn(`_${p}_${Jt(d[p])}`):hn(`_${p}_${d[p]}`)).join("")}function sr(d){return!0===d||Lc(d)&&!d.binned}function oo(d){return"binned"===d||Lc(d)&&!0===d.binned}function Lc(d){return re.isObject(d)}function Q_(d){return d?.param}function iv(d){switch(d){case ea:case Xl:case He:case be:case Se:case Fe:case Ts:case _e:case nn:case gi:case ye:return 6;case Hh:return 4;default:return 10}}function Ea(d){return!!d?.expr}function _o(d){const p=We(d||{}),_={};for(const x of p)_[x]=Ha(d[x]);return _}function pl(d){const{anchor:p,frame:_,offset:x,orient:S,angle:A,limit:O,color:P,subtitleColor:B,subtitleFont:q,subtitleFontSize:G,subtitleFontStyle:ee,subtitleFontWeight:se,subtitleLineHeight:Ee,subtitlePadding:De,...Re}=d,Ye={...p?{anchor:p}:{},..._?{frame:_}:{},...x?{offset:x}:{},...S?{orient:S}:{},...void 0!==A?{angle:A}:{},...void 0!==O?{limit:O}:{}},bt={...B?{subtitleColor:B}:{},...q?{subtitleFont:q}:{},...G?{subtitleFontSize:G}:{},...ee?{subtitleFontStyle:ee}:{},...se?{subtitleFontWeight:se}:{},...Ee?{subtitleLineHeight:Ee}:{},...De?{subtitlePadding:De}:{}};return{titleMarkConfig:{...Re,...P?{fill:P}:{}},subtitleMarkConfig:Sn(d,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:Ye,subtitle:bt}}function ds(d){return re.isString(d)||re.isArray(d)&&re.isString(d[0])}function Je(d){return!!d?.signal}function ht(d){return!!d.step}function vu(d){return!re.isArray(d)&&"field"in d&&"data"in d}const gd=We({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}),OM={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},rv=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function RM(d){const p=re.isArray(d.condition)?d.condition.map(NM):NM(d.condition);return{...Ha(d),condition:p}}function Ha(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return d}function NM(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return d}function Ar(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return Je(d)?d:void 0!==d?{value:d}:void 0}function Jl(d){return Je(d)?d.signal:re.stringValue(d)}function FM(d){return Je(d)?d.signal:re.stringValue(d.value)}function ec(d){return Je(d)?d.signal:null==d?null:re.stringValue(d)}function R2(d,p,_){for(const x of _){const S=xu(x,p.markDef,p.config);void 0!==S&&(d[x]=Ar(S))}return d}function F1(d){return[].concat(d.type,d.style??[])}function Ji(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{vgChannel:S,ignoreVgConfig:A}=x;return S&&void 0!==p[S]?p[S]:void 0!==p[d]?p[d]:!A||S&&S!==d?xu(d,p,_,x):void 0}function xu(d,p,_){let{vgChannel:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ui(x?ey(d,p,_.style):void 0,ey(d,p,_.style),x?_[p.type][x]:void 0,_[p.type][d],x?_.mark[x]:_.mark[d])}function ey(d,p,_){return PM(d,F1(p),_)}function PM(d,p,_){let x;p=re.array(p);for(const S of p){const A=_[S];A&&void 0!==A[d]&&(x=A[d])}return x}function LM(d,p){return re.array(d).reduce((_,x)=>(_.field.push(pt(x,p)),_.order.push(x.sort??"ascending"),_),{field:[],order:[]})}function $M(d,p){const _=[...d];return p.forEach(x=>{for(const S of _)if(xr(S,x))return;_.push(x)}),_}function Rn(d,p){return xr(d,p)||!p?d:d?[...re.array(d),...re.array(p)].join(", "):p}function BM(d,p){const _=d.value,x=p.value;if(null==_||null===x)return{explicit:d.explicit,value:null};if((ds(_)||Je(_))&&(ds(x)||Je(x)))return{explicit:d.explicit,value:Rn(_,x)};if(ds(_)||Je(_))return{explicit:d.explicit,value:_};if(ds(x)||Je(x))return{explicit:d.explicit,value:x};if(!(ds(_)||Je(_)||ds(x)||Je(x)))return{explicit:d.explicit,value:$M(_,x)};throw new Error("It should never reach here")}function ln(d,p,_){return(p=function zM(d){var p=function Ft(d,p){if("object"!=typeof d||null===d)return d;var _=d[Symbol.toPrimitive];if(void 0!==_){var x=_.call(d,p||"default");if("object"!=typeof x)return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===p?String:Number)(d)}(d,"string");return"symbol"==typeof p?p:String(p)}(p))in d?Object.defineProperty(d,p,{value:_,enumerable:!0,configurable:!0,writable:!0}):d[p]=_,d}function fs(d,p,_){return function ks(d,p,_){if(p.set)p.set.call(d,_);else{if(!p.writable)throw new TypeError("attempted to set read only private field");p.value=_}}(d,Jn(d,p,"set"),_),_}function Jn(d,p,_){if(!p.has(d))throw new TypeError("attempted to "+_+" private field on non-instance");return p.get(d)}function ia(d,p,_){(function Nf(d,p){if(p.has(d))throw new TypeError("Cannot initialize the same private elements twice on an object")})(d,p),p.set(d,_)}function ov(d){return`Invalid specification ${Wn(d)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const VM='Autosize "fit" only works for single views and layered views.';function jm(d){return("width"==d?"Width":"Height")+' "container" only works for single views and layered views.'}function jM(d){return`${"width"==d?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==d?"x":"y"}".`}function UM(d){return d?`Dropping "fit-${d}" because spec has discrete ${Mr(d)}.`:'Dropping "fit" because spec has discrete size.'}function Tr(d){return`Unknown field for ${d}. Cannot calculate view size.`}function mt(d){return`Cannot project a selection on encoding channel "${d}", which has no field.`}function _n(d,p){return`Cannot project a selection on encoding channel "${d}" as it uses an aggregate function ("${p}").`}function tc(d){return`Selection not supported for ${d} yet.`}const wu="The same selection must be used to override scale domains in a layered view.";function P1(d){return`The "columns" property cannot be used when "${d}" has nested row/column.`}function Wm(d,p,_){return`An ancestor parsed field "${d}" as ${_} but a child wants to parse the field as ${p}.`}function Eu(d){return`Ignoring an invalid transform: ${Wn(d)}.`}function L1(d){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${d} are dropped.`}function Yh(d){return`${d}Offset dropped because ${d} is continuous`}function av(d){return`Invalid field type "${d}".`}function Gm(d,p){const{fill:_,stroke:x}=p;return`Dropping color ${d} as the plot also has ${_&&x?"fill and stroke":_?"fill":"stroke"}.`}function Nr(d,p){return`Dropping ${Wn(d)} from channel "${p}" since it does not contain any data field, datum, value, or signal.`}function bo(d,p,_){return`${d} dropped as it is incompatible with "${p}"${_?` when ${_}`:""}.`}function Is(d){return`${d}-encoding is dropped as ${d} is not a valid encoding channel.`}function $1(d){return`${d} encoding should be discrete (ordinal / nominal / binned).`}function zc(d){return`${d} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function ml(d,p){return`Using discrete channel "${d}" to encode "${p}" field can be misleading as it does not encode ${"ordinal"===p?"order":"magnitude"}.`}function WM(d){return`Using unaggregated domain with raw field has no effect (${Wn(d)}).`}function fv(d){return`Unaggregated domain not applicable for "${d}" since it produces values outside the origin domain of the source data.`}function qM(d){return`Unaggregated domain is currently unsupported for log scale (${Wn(d)}).`}function z1(d,p,_){return`${_}-scale's "${p}" is dropped as it does not work with ${d} scale.`}function GM(d){return`The step for "${d}" is dropped because the ${"width"===d?"x":"y"} is continuous.`}const P2="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function V1(d,p){return`Invalid ${d}: ${Wn(p)}.`}function ry(d){return`1D error band does not support ${d}.`}function eA(d){return`Channel ${d} is required for "binned" bin.`}const pv=re.logger(re.Warn);let Xm=pv;function nt(){Xm.warn(...arguments)}function _d(d){if(d&&re.isObject(d))for(const p of Pf)if(p in d)return!0;return!1}const gv=["january","february","march","april","may","june","july","august","september","october","november","december"],H1=gv.map(d=>d.substr(0,3)),B2=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],er=B2.map(d=>d.substr(0,3));function Ym(d,p){const _=[];if(p&&void 0!==d.day&&We(d).length>1&&(nt(function Kh(d){return`Dropping day from datetime ${Wn(d)} as day cannot be combined with other units.`}(d)),delete(d=st(d)).day),_.push(void 0!==d.year?d.year:2012),void 0!==d.month){const x=p?function sy(d){if(vr(d)&&(d=+d),re.isNumber(d))return d-1;{const p=d.toLowerCase(),_=gv.indexOf(p);if(-1!==_)return _;const x=p.substr(0,3),S=H1.indexOf(x);if(-1!==S)return S;throw new Error(V1("month",d))}}(d.month):d.month;_.push(x)}else if(void 0!==d.quarter){const x=p?function W1(d){if(vr(d)&&(d=+d),re.isNumber(d))return d>4&&nt(V1("quarter",d)),d-1;throw new Error(V1("quarter",d))}(d.quarter):d.quarter;_.push(re.isNumber(x)?3*x:`${x}*3`)}else _.push(0);if(void 0!==d.date)_.push(d.date);else if(void 0!==d.day){const x=p?function oa(d){if(vr(d)&&(d=+d),re.isNumber(d))return d%7;{const p=d.toLowerCase(),_=B2.indexOf(p);if(-1!==_)return _;const x=p.substr(0,3),S=er.indexOf(x);if(-1!==S)return S;throw new Error(V1("day",d))}}(d.day):d.day;_.push(re.isNumber(x)?x+1:`${x}+1`)}else _.push(1);for(const x of["hours","minutes","seconds","milliseconds"]){const S=d[x];_.push(typeof S>"u"?0:S)}return _}function gl(d){const _=Ym(d,!0).join(", ");return d.utc?`utc(${_})`:`datetime(${_})`}const nA={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},Pf=We(nA);function qo(d){return re.isObject(d)?d.binned:ay(d)}function ay(d){return d&&d.startsWith("binned")}function yv(d){return d.startsWith("utc")}const ly={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function Kt(d){return Pf.filter(p=>Ti(d,p))}function Qh(d){const p=Kt(d);return p[p.length-1]}function Ti(d,p){const _=d.indexOf(p);return!(_<0||_>0&&"seconds"===p&&"i"===d.charAt(_-1)||d.length>_+3&&"day"===p&&"o"===d.charAt(_+3)||_>0&&"year"===p&&"f"===d.charAt(_-1))}function cy(d,p){let{end:_}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1};const x=Js(p),S=yv(d)?"utc":"";function A(B){return"quarter"===B?`(${S}quarter(${x})-1)`:`${S}${B}(${x})`}let O;const P={};for(const B of Pf)Ti(d,B)&&(P[B]=A(B),O=B);return _&&(P[O]+="+1"),function Zh(d){const _=Ym(d,!1).join(", ");return d.utc?`utc(${_})`:`datetime(${_})`}(P)}function Vc(d){if(d)return`timeUnitSpecifier(${Wn(Kt(d))}, ${Wn(ly)})`}function Fr(d){if(!d)return;let p;return re.isString(d)?p=ay(d)?{unit:d.substring(6),binned:!0}:{unit:d}:re.isObject(d)&&(p={...d,...d.unit?{unit:d.unit}:{}}),yv(p.unit)&&(p.utc=!0,p.unit=function iA(d){return d.substring(3)}(p.unit)),p}function Lf(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S=>S;const _=Fr(d),x=Qh(_.unit);if(x&&"day"!==x){const S={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:A,part:O}=q1(x,_.step);return`${p(gl({...S,[O]:+S[O]+A}))} - ${p(gl(S))}`}}const bv={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function q1(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(function vv(d){return!!bv[d]}(d))return{part:d,step:p};switch(d){case"day":case"dayofyear":return{part:"date",step:p};case"quarter":return{part:"month",step:3*p};case"week":return{part:"date",step:7*p}}}function G1(d){return!!d?.field&&void 0!==d.equal}function X1(d){return!!d?.field&&void 0!==d.lt}function Y1(d){return!!d?.field&&void 0!==d.lte}function ar(d){return!!d?.field&&void 0!==d.gt}function xv(d){return!!d?.field&&void 0!==d.gte}function qe(d){if(d?.field){if(re.isArray(d.range)&&2===d.range.length)return!0;if(Je(d.range))return!0}return!1}function bi(d){return!!d?.field&&(re.isArray(d.oneOf)||re.isArray(d.in))}function so(d){return bi(d)||G1(d)||qe(d)||X1(d)||ar(d)||Y1(d)||xv(d)}function Un(d,p){return Td(d,{timeUnit:p,wrapTime:!0})}function Zm(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{field:_}=d,x=Fr(d.timeUnit),{unit:S,binned:A}=x||{},O=pt(d,{expr:"datum"}),P=S?`time(${A?O:cy(S,_)})`:O;if(G1(d))return`${P}===${Un(d.equal,S)}`;if(X1(d))return`${P}<${Un(d.lt,S)}`;if(ar(d))return`${P}>${Un(d.gt,S)}`;if(Y1(d))return`${P}<=${Un(d.lte,S)}`;if(xv(d))return`${P}>=${Un(d.gte,S)}`;if(bi(d))return`indexof([${function rA(d,p){return d.map(_=>Un(_,p))}(d.oneOf,S).join(",")}], ${P}) !== -1`;if(function hs(d){return!!d?.field&&void 0!==d.valid}(d))return ic(P,d.valid);if(qe(d)){const{range:B}=d,q=Je(B)?{signal:`${B.signal}[0]`}:B[0],G=Je(B)?{signal:`${B.signal}[1]`}:B[1];if(null!==q&&null!==G&&p)return"inrange("+P+", ["+Un(q,S)+", "+Un(G,S)+"])";const ee=[];return null!==q&&ee.push(`${P} >= ${Un(q,S)}`),null!==G&&ee.push(`${P} <= ${Un(G,S)}`),ee.length>0?ee.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Wn(d)}`)}function ic(d){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?`!isValid(${d}) || !isFinite(+${d})`:`isValid(${d}) && isFinite(+${d})`}function K1(d){return so(d)&&d.timeUnit?{...d,timeUnit:Fr(d.timeUnit)}:d}function V2(d){return"quantitative"===d||"temporal"===d}function Z1(d){return"ordinal"===d||"nominal"===d}const $f="quantitative",Os="ordinal",qa="temporal",wv="nominal",Sa="geojson";const Ga={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"},Ev={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 Cv(d,p){const _=Ev[d],x=Ev[p];return _===x||"ordinal-position"===_&&"time"===x||"ordinal-position"===x&&"time"===_}const Cu={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 jc(d){return Cu[d]}const rc=new Set(["linear","log","pow","sqrt","symlog"]),Q1=new Set([...rc,"time","utc"]);function uy(d){return rc.has(d)}const Jh=new Set(["quantile","quantize","threshold"]),J1=new Set([...Q1,...Jh,"sequential","identity"]),ep=new Set(["ordinal","bin-ordinal","point","band"]);function ko(d){return ep.has(d)}function Da(d){return J1.has(d)}function Go(d){return Q1.has(d)}function vd(d){return Jh.has(d)}function Xo(d){return d?.param}const{type:oA,domain:sA,range:Z$,rangeMax:aA,rangeMin:j2,scheme:eE,...Bf}={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},tE=We(Bf);function Qm(d,p){switch(p){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(d);case"bins":return!["point","band","identity","ordinal"].includes(d);case"round":return Go(d)||"band"===d||"point"===d;case"padding":case"rangeMin":case"rangeMax":return Go(d)||["point","band"].includes(d);case"paddingOuter":case"align":return["point","band"].includes(d);case"paddingInner":return"band"===d;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return Go(d);case"nice":return Go(d)||"quantize"===d||"threshold"===d;case"exponent":return"pow"===d;case"base":return"log"===d;case"constant":return"symlog"===d;case"zero":return Da(d)&&!St(["log","time","utc","threshold","quantile"],d)}}function fy(d,p){switch(p){case"interpolate":case"scheme":case"domainMid":return Wh(d)?void 0:function dv(d){return`Cannot use the scale property "${d}" with non-color channel.`}(p);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 Rs={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"},iE=Rs.arc,xd=Rs.area,_l=Rs.bar,ze=Rs.image,wd=Rs.line,np=Rs.point,lA=Rs.rect,Su=Rs.rule,Av=Rs.text,U2=Rs.tick,H2=Rs.trail,zf=Rs.circle,Vf=Rs.square,Jm=Rs.geoshape;function yl(d){return["line","area","trail"].includes(d)}function ip(d){return["rect","bar","image","arc"].includes(d)}const eg=new Set(We(Rs));function Du(d){return d.type}const q2=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],G2=We({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),rp=We({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 Au(d){return d&&null!=d.band}const oc={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},sE={binSpacing:1,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},aE={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5};function tg(d){const{channel:p,channelDef:_,markDef:x,scale:S,config:A}=d,O=lE(d);return dt(_)&&!zm(_.aggregate)&&S&&Go(S.get("type"))?function jf(d){let{fieldDef:p,channel:_,markDef:x,ref:S,config:A}=d;return yl(x.type)?S:null===Ji("invalid",x,A)?[Y2(p,_),S]:S}({fieldDef:_,channel:p,markDef:x,ref:O,config:A}):O}function Y2(d,p){return{test:Uf(d,!0),..."y"===Fc(p)?{field:{group:"height"}}:{value:0}}}function Uf(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ic(re.isString(d)?d:pt(d,{expr:"datum"}),!p)}function Xa(d,p,_,x){const S={};if(p&&(S.scale=p),Sd(d)){const{datum:A}=d;_d(A)?S.signal=gl(A):Je(A)?S.signal=A.signal:Ea(A)?S.signal=A.expr:S.value=A}else S.field=pt(d,_);if(x){const{offset:A,band:O}=x;A&&(S.offset=A),O&&(S.band=O)}return S}function sc(d){let{scaleName:p,fieldOrDatumDef:_,fieldOrDatumDef2:x,offset:S,startSuffix:A,endSuffix:O="end",bandPosition:P=.5}=d;const B=!Je(P)&&01&&void 0!==arguments[1]?arguments[1]:{},_=d.field;const x=p.prefix;let S=p.suffix,A="";if(function xy(d){return"count"===d.aggregate}(d))_=cs("count");else{let O;if(!p.nofn)if(function Z2(d){return"op"in d}(d))O=d.op;else{const{bin:P,aggregate:B,timeUnit:q}=d;sr(P)?(O=Z_(P),S=(p.binSuffix??"")+(p.suffix??"")):B?Ua(B)?(A=`["${_}"]`,_=`argmax_${B.argmax}`):bu(B)?(A=`["${_}"]`,_=`argmin_${B.argmin}`):O=String(B):q&&!qo(q)&&(O=function z2(d){const{utc:p,..._}=Fr(d);return _.unit?(p?"utc":"")+We(_).map(x=>hn(`${"unit"===x?"":`_${x}_`}${_[x]}`)).join(""):(p?"utc":"")+"timeunit"+We(_).map(x=>hn(`_${x}_${_[x]}`)).join("")}(q),S=(!["range","mid"].includes(p.binSuffix)&&p.binSuffix||"")+(p.suffix??""))}O&&(_=_?`${O}_${_}`:O)}return S&&(_=`${_}_${S}`),x&&(_=`${x}_${_}`),p.forAs?Si(_):p.expr?Vo(_,p.expr)+A:ci(_)+A}function Fv(d){switch(d.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return dt(d)&&!!d.bin;case"temporal":return!1}throw new Error(av(d.type))}const fA=(d,p)=>{switch(p.fieldTitle){case"plain":return d.field;case"functional":return function Md(d){const{aggregate:p,bin:_,timeUnit:x,field:S}=d;if(Ua(p))return`${S} for argmax(${p.argmax})`;if(bu(p))return`${S} for argmin(${p.argmin})`;const A=x&&!qo(x)?Fr(x):void 0,O=p||A?.unit||A?.maxbins&&"timeunit"||sr(_)&&"bin";return O?`${O.toUpperCase()}(${S})`:S}(d);default:return function Io(d,p){const{field:_,bin:x,timeUnit:S,aggregate:A}=d;if("count"===A)return p.countTitle;if(sr(x))return`${_} (binned)`;if(S&&!qo(S)){const O=Fr(S)?.unit;if(O)return`${_} (${Kt(O).join("-")})`}else if(A)return Ua(A)?`${_} for max ${A.argmax}`:bu(A)?`${_} for min ${A.argmin}`:`${Mo(A)} of ${_}`;return _}(d,p)}};let Pv=fA;function Gf(d){Pv=d}function cp(d,p,_){let{allowDisabling:x,includeDefault:S=!0}=_;const A=hA(d)?.title;if(!dt(d))return A??d.title;const O=d,P=S?lg(O,p):void 0;return x?ui(A,O.title,P):A??O.title??P}function hA(d){return Dd(d)&&d.axis?d.axis:ag(d)&&d.legend?d.legend:Zr(d)&&d.header?d.header:void 0}function lg(d,p){return Pv(d,p)}function Lv(d){if(dA(d)){const{format:p,formatType:_}=d;return{format:p,formatType:_}}{const p=hA(d)??{},{format:_,formatType:x}=p;return{format:_,formatType:x}}}function ku(d){return dt(d)?d:qf(d)?d.condition:void 0}function Oo(d){return Bn(d)?d:Nv(d)?d.condition:void 0}function mA(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return re.isString(d)||re.isNumber(d)||re.isBoolean(d)?(nt(function $n(d,p,_){return`Channel ${d} is a ${p}. Converted to {value: ${Wn(_)}}.`}(p,re.isString(d)?"string":re.isNumber(d)?"number":"boolean",d)),{value:d}):Bn(d)?qc(d,p,_,x):Nv(d)?{...d,condition:qc(d.condition,p,_,x)}:d}function qc(d,p,_,x){if(dA(d)){const{format:S,formatType:A,...O}=d;if(Uc(A)&&!_.customFormatTypes)return nt(L1(p)),qc(O,p,_,x)}else{const S=Dd(d)?"axis":ag(d)?"legend":Zr(d)?"header":null;if(S&&d[S]){const{format:A,formatType:O,...P}=d[S];if(Uc(O)&&!_.customFormatTypes)return nt(L1(p)),qc({...d,[S]:P},p,_,x)}}return dt(d)?cg(d,p,x):function gE(d){let p=d.type;if(p)return d;const{datum:_}=d;return p=re.isNumber(_)?"quantitative":re.isString(_)?"nominal":_d(_)?"temporal":void 0,{...d,type:p}}(d)}function cg(d,p){let{compositeMark:_=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{aggregate:x,timeUnit:S,bin:A,field:O}=d,P={...d};if(!_&&x&&!K_(x)&&!Ua(x)&&!bu(x)&&(nt(function $c(d){return`Invalid aggregation operator "${d}".`}(x)),delete P.aggregate),S&&(P.timeUnit=Fr(S)),O&&(P.field=`${O}`),sr(A)&&(P.bin=Ad(A,p)),oo(A)&&!Yr(p)&&nt(function $2(d){return`Channel ${d} should not be used with "binned" bin.`}(p)),Yo(P)){const{type:B}=P,q=function bd(d){if(d)switch(d=d.toLowerCase(),d){case"q":case $f:return"quantitative";case"t":case qa:return"temporal";case"o":case Os:return"ordinal";case"n":case wv:return"nominal";case Sa:return"geojson"}}(B);B!==q&&(P.type=q),"quantitative"!==B&&zm(x)&&(nt(function qm(d,p){return`Invalid field type "${d}" for aggregate: "${p}", using "quantitative" instead.`}(B,x)),P.type="quantitative")}else if(!SM(p)){const B=function pA(d,p){switch(p){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(Cd(d)&&re.isArray(d.sort))return"ordinal";const{aggregate:_,bin:x,timeUnit:S}=d;if(S)return"temporal";if(x||_&&!Ua(_)&&!bu(_))return"quantitative";if(sp(d)&&d.scale?.type)switch(Ev[d.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(P,p);P.type=B}if(Yo(P)){const{compatible:B,warning:q}=function Q2(d,p){const _=d.type;if("geojson"===_&&"shape"!==p)return{compatible:!1,warning:`Channel ${p} should not be used with a geojson data.`};switch(p){case ea:case Xl:case yu:return Fv(d)?Iu:{compatible:!1,warning:$1(p)};case Ri:case mo:case Yl:case Qn:case be:case Se:case Fe:case G0:case X0:case I1:case W_:case Gi:case O1:case lt:case As:case Ao:case go:return Iu;case Ho:case ae:case It:case wr:return _!==$f?{compatible:!1,warning:`Channel ${p} should be used with a quantitative field only, not ${d.type} field.`}:Iu;case _e:case nn:case gi:case Ts:case He:case Rc:case ta:case Wi:case Oc:return"nominal"!==_||d.sort?Iu:{compatible:!1,warning:`Channel ${p} should not be used with an unsorted discrete field.`};case ye:case Hh:return Fv(d)||function mE(d){return sp(d)&&vd(d.scale?.type)}(d)?Iu:{compatible:!1,warning:zc(p)};case Kl:return"nominal"!==d.type||"sort"in d?Iu:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(P,p)||{};!1===B&&nt(q)}if(Cd(P)&&re.isString(P.sort)){const{sort:B}=P;if(rg(B))return{...P,sort:{encoding:B}};const q=B.substr(1);if("-"===B.charAt(0)&&rg(q))return{...P,sort:{encoding:q,order:"descending"}}}if(Zr(P)){const{header:B}=P;if(B){const{orient:q,...G}=B;if(q)return{...P,header:{...G,labelOrient:B.labelOrient||q,titleOrient:B.titleOrient||q}}}}return P}function Ad(d,p){return re.isBoolean(d)?{maxbins:iv(p)}:"binned"===d?{binned:!0}:d.maxbins||d.step?d:{...d,maxbins:iv(p)}}const Iu={compatible:!0};function up(d){const{formatType:p}=Lv(d);return"time"===p||!p&&function _E(d){return d&&("temporal"===d.type||dt(d)&&!!d.timeUnit)}(d)}function Td(d,p){let{timeUnit:_,type:x,wrapTime:S,undefinedIfExprNotRequired:A}=p;const O=_&&Fr(_)?.unit;let B,P=O||"temporal"===x;return Ea(d)?B=d.expr:Je(d)?B=d.signal:_d(d)?(P=!0,B=gl(d)):(re.isString(d)||re.isNumber(d))&&P&&(B=`datetime(${Wn(d)})`,function _v(d){return!!nA[d]}(O)&&(re.isNumber(d)&&d<1e4||re.isString(d)&&isNaN(Date.parse(d)))&&(B=gl({[O]:d}))),B?S&&P?`time(${B})`:B:A?void 0:Wn(d)}function gA(d,p){const{type:_}=d;return p.map(x=>{const A=Td(x,{timeUnit:dt(d)&&!qo(d.timeUnit)?d.timeUnit:void 0,type:_,undefinedIfExprNotRequired:!0});return void 0!==A?{signal:A}:x})}function kd(d,p){return sr(d.bin)?pd(p)&&["ordinal","nominal"].includes(d.type):(console.warn("Only call this method for binned field defs."),!1)}const _A={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 Xf(d){return d?.condition}const yE=["domain","grid","labels","ticks","title"],$v={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"},Ou={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},Bv={...Ou,style:1,labelExpr:1,encoding:1};function wy(d){return!!Bv[d]}const zv=We({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 vl(d){return"mark"in d}class Id{constructor(p,_){this.name=p,this.run=_}hasMatchingType(p){return!!vl(p)&&function X2(d){return Du(d)?d.type:d}(p.mark)===this.name}}function xo(d,p){const _=d&&d[p];return!!_&&(re.isArray(_)?li(_,x=>!!x.field):dt(_)||qf(_))}function Yf(d,p){const _=d&&d[p];return!!_&&(re.isArray(_)?li(_,x=>!!x.field):dt(_)||Sd(_)||Nv(_))}function dp(d,p){if(Yr(p)){const _=d[p];if((dt(_)||Sd(_))&&(Z1(_.type)||dt(_)&&_.timeUnit))return Yf(d,To(p))}return!1}function vE(d){return li(Y0,p=>{if(xo(d,p)){const _=d[p];if(re.isArray(_))return li(_,x=>!!x.aggregate);{const x=ku(_);return x&&!!x.aggregate}}return!1})}function Vv(d,p){const _=[],x=[],S=[],A=[],O={};return Ey(d,(P,B)=>{if(dt(P)){const{field:q,aggregate:G,bin:ee,timeUnit:se,...Ee}=P;if(G||se||ee){const Re=hA(P)?.title;let Le=pt(P,{forAs:!0});const Ye={...Re?[]:{title:cp(P,p,{allowDisabling:!0})},...Ee,field:Le};if(G){let bt;if(Ua(G)?(bt="argmax",Le=pt({op:"argmax",field:G.argmax},{forAs:!0}),Ye.field=`${Le}.${q}`):bu(G)?(bt="argmin",Le=pt({op:"argmin",field:G.argmin},{forAs:!0}),Ye.field=`${Le}.${q}`):"boxplot"!==G&&"errorbar"!==G&&"errorband"!==G&&(bt=G),bt){const kn={op:bt,as:Le};q&&(kn.field=q),A.push(kn)}}else if(_.push(Le),Yo(P)&&sr(ee))x.push({bin:ee,field:q,as:Le}),_.push(pt(P,{binSuffix:"end"})),kd(P,B)&&_.push(pt(P,{binSuffix:"range"})),Yr(B)&&(O[`${B}2`]={field:`${Le}_end`}),Ye.bin="binned",SM(B)||(Ye.type=$f);else if(se&&!qo(se)){S.push({timeUnit:se,field:q,as:Le});const bt=Yo(P)&&P.type!==qa&&"time";bt&&(B===G0||B===W_?Ye.formatType=bt:function I2(d){return!!Z0[d]}(B)?Ye.legend={formatType:bt,...Ye.legend}:Yr(B)&&(Ye.axis={formatType:bt,...Ye.axis}))}O[B]=Ye}else _.push(q),O[B]=d[B]}else O[B]=d[B]}),{bins:x,timeUnits:S,aggregate:A,groupby:_,encoding:O}}function yA(d,p,_){const x=O2(p,_);if(!x)return!1;if("binned"===x){const S=d[p===Wi?Ri:mo];return!!(dt(S)&&dt(d[p])&&oo(S.bin))}return!0}function jv(d,p){const _={};for(const x of We(d)){const S=mA(d[x],x,p,{compositeMark:!0});_[x]=S}return _}function xE(d){const p=[];for(const _ of We(d))if(xo(d,_)){const S=re.array(d[_]);for(const A of S)dt(A)?p.push(A):qf(A)&&p.push(A.condition)}return p}function Ey(d,p,_){if(d)for(const x of We(d)){const S=d[x];if(re.isArray(S))for(const A of S)p.call(_,A,x);else p.call(_,S,x)}}function Od(d,p){return We(p).reduce((_,x)=>{switch(x){case Ri:case mo:case Gi:case go:case O1:case Wi:case Oc:case Yl:case Qn:case As:case Rc:case Ao:case ta:case It:case Ho:case wr:case ae:case G0:case ye:case lt:case W_:return _;case Kl:if("line"===d||"trail"===d)return _;case X0:case I1:{const S=p[x];if(re.isArray(S)||dt(S))for(const A of re.array(S))A.aggregate||_.push(pt(A,{}));return _}case He:if("trail"===d)return _;case be:case Se:case Fe:case _e:case nn:case gi:case Hh:case Ts:{const S=ku(p[x]);return S&&!S.aggregate&&_.push(pt(S,{})),_}}},[])}function Wv(d,p,_){let x=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return"tooltip"in _?{tooltip:_.tooltip}:{tooltip:[...d.map(O=>{let{fieldPrefix:P,titlePrefix:B}=O;const q=x?` of ${Cy(p)}`:"";return{field:P+p.field,type:p.type,title:Je(B)?{signal:`${B}"${escape(q)}"`}:B+q}}),...Ci(xE(_).map(ap),kt)]}}function Cy(d){const{title:p,field:_}=d;return ui(p,_)}function Sy(d,p,_,x,S){const{scale:A,axis:O}=_;return P=>{let{partName:B,mark:q,positionPrefix:G,endPositionPrefix:ee,extraEncoding:se={}}=P;const Ee=Cy(_);return qv(d,B,S,{mark:q,encoding:{[p]:{field:`${G}_${_.field}`,type:_.type,...void 0!==Ee?{title:Ee}:{},...void 0!==A?{scale:A}:{},...void 0!==O?{axis:O}:{}},...re.isString(ee)?{[`${p}2`]:{field:`${ee}_${_.field}`}}:{},...x,...se}})}}function qv(d,p,_,x){const{clip:S,color:A,opacity:O}=d,P=d.type;return d[p]||void 0===d[p]&&_[p]?[{...x,mark:{..._[p],...S?{clip:S}:{},...A?{color:A}:{},...O?{opacity:O}:{},...Du(x.mark)?x.mark:{type:x.mark},style:`${P}-${String(p)}`,...re.isBoolean(d[p])?{}:d[p]}}]:[]}function bA(d,p,_){const{encoding:x}=d,S="vertical"===p?"y":"x",O=x[`${S}2`],P=x[`${S}Error`],B=x[`${S}Error2`];return{continuousAxisChannelDef:dg(x[S],_),continuousAxisChannelDef2:dg(O,_),continuousAxisChannelDefError:dg(P,_),continuousAxisChannelDefError2:dg(B,_),continuousAxis:S}}function dg(d,p){if(d?.aggregate){const{aggregate:_,...x}=d;return _!==p&&nt(function vo(d,p){return`Continuous axis should not have customized aggregation function ${d}; ${p} already agregates the axis.`}(_,p)),x}return d}function vA(d,p){const{mark:_,encoding:x}=d,{x:S,y:A}=x;if(Du(_)&&_.orient)return _.orient;if(Wc(S)){if(Wc(A)){const O=dt(S)&&S.aggregate,P=dt(A)&&A.aggregate;if(!O&&P===p)return"vertical";if(!P&&O===p)return"horizontal";if(O===p&&P===p)throw new Error("Both x and y cannot have aggregate");return up(A)&&!up(S)?"horizontal":"vertical"}return"horizontal"}if(Wc(A))return"vertical";throw new Error(`Need a valid continuous axis for ${p}s`)}const Dy="boxplot",wA=new Id(Dy,hr);function wE(d){return re.isNumber(d)?"tukey":d}function hr(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{mark:x,encoding:S,params:A,projection:O,...P}=d,B=Du(x)?x:{type:x};A&&nt(tc("boxplot"));const q=B.extent??_.boxplot.extent,G=Ji("size",B,_),ee=B.invalid,se=wE(q),{bins:Ee,timeUnits:De,transform:Re,continuousAxisChannelDef:Le,continuousAxis:Ye,groupby:bt,aggregate:kn,encodingWithoutContinuousAxis:dn,ticksOrient:vi,boxOrient:lr,customTooltipWithoutAggregatedField:ca}=function Ru(d,p,_){const x=vA(d,Dy),{continuousAxisChannelDef:S,continuousAxis:A}=bA(d,x,Dy),O=S.field,P=wE(p),B=[...My(O),{op:"median",field:O,as:`mid_box_${O}`},{op:"min",field:O,as:("min-max"===P?"lower_whisker_":"min_")+O},{op:"max",field:O,as:("min-max"===P?"upper_whisker_":"max_")+O}],q="min-max"===P||"tukey"===P?[]:[{calculate:`datum["upper_box_${O}"] - datum["lower_box_${O}"]`,as:`iqr_${O}`},{calculate:`min(datum["upper_box_${O}"] + datum["iqr_${O}"] * ${p}, datum["max_${O}"])`,as:`upper_whisker_${O}`},{calculate:`max(datum["lower_box_${O}"] - datum["iqr_${O}"] * ${p}, datum["min_${O}"])`,as:`lower_whisker_${O}`}],{[A]:G,...ee}=d.encoding,{customTooltipWithoutAggregatedField:se,filteredEncoding:Ee}=function Hv(d){const{tooltip:p,..._}=d;if(!p)return{filteredEncoding:_};let x,S;if(re.isArray(p)){for(const A of p)A.aggregate?(x||(x=[]),x.push(A)):(S||(S=[]),S.push(A));x&&(_.tooltip=x)}else p.aggregate?_.tooltip=p:S=p;return re.isArray(S)&&1===S.length&&(S=S[0]),{customTooltipWithoutAggregatedField:S,filteredEncoding:_}}(ee),{bins:De,timeUnits:Re,aggregate:Le,groupby:Ye,encoding:bt}=Vv(Ee,_),kn="vertical"===x?"horizontal":"vertical",dn=x;return{bins:De,timeUnits:Re,transform:[...De,...Re,{aggregate:[...Le,...B],groupby:Ye},...q],groupby:Ye,aggregate:Le,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:bt,ticksOrient:kn,boxOrient:dn,customTooltipWithoutAggregatedField:se}}(d,q,_),{color:ua,size:da,...Ml}=dn,fa=kR=>Sy(B,Ye,Le,kR,_.boxplot),em=fa(Ml),Rb=fa(dn),Nb=fa({...Ml,...da?{size:da}:{}}),Gu=Wv([{fieldPrefix:"min-max"===se?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===se?"lower_whisker_":"min_",titlePrefix:"Min"}],Le,dn),dw={type:"tick",color:"black",opacity:1,orient:vi,invalid:ee,aria:!1},tf="min-max"===se?Gu:Wv([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],Le,dn),tS=[...em({partName:"rule",mark:{type:"rule",invalid:ee,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:tf}),...em({partName:"rule",mark:{type:"rule",invalid:ee,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:tf}),...em({partName:"ticks",mark:dw,positionPrefix:"lower_whisker",extraEncoding:tf}),...em({partName:"ticks",mark:dw,positionPrefix:"upper_whisker",extraEncoding:tf})],ek=[..."tukey"!==se?tS:[],...Rb({partName:"box",mark:{type:"bar",...G?{size:G}:{},orient:lr,invalid:ee,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:Gu}),...Nb({partName:"median",mark:{type:"tick",invalid:ee,...re.isObject(_.boxplot.median)&&_.boxplot.median.color?{color:_.boxplot.median.color}:{},...G?{size:G}:{},orient:vi,aria:!1},positionPrefix:"mid_box",extraEncoding:Gu})];if("min-max"===se)return{...P,transform:(P.transform??[]).concat(Re),layer:ek};const tk=`datum["lower_box_${Le.field}"]`,nk=`datum["upper_box_${Le.field}"]`,nS=`(${nk} - ${tk})`,tm=`${tk} - ${q} * ${nS}`,fw=`${nk} + ${q} * ${nS}`,Fb=`datum["${Le.field}"]`,iS={joinaggregate:My(Le.field),groupby:bt},n_={transform:[{filter:`(${tm} <= ${Fb}) && (${Fb} <= ${fw})`},{aggregate:[{op:"min",field:Le.field,as:`lower_whisker_${Le.field}`},{op:"max",field:Le.field,as:`upper_whisker_${Le.field}`},{op:"min",field:`lower_box_${Le.field}`,as:`lower_box_${Le.field}`},{op:"max",field:`upper_box_${Le.field}`,as:`upper_box_${Le.field}`},...kn],groupby:bt}],layer:tS},{tooltip:Pb,...AR}=Ml,{scale:ik,axis:TR}=Le,rk=Cy(Le),ok=yt(TR,["title"]),sk=qv(B,"outliers",_.boxplot,{transform:[{filter:`(${Fb} < ${tm}) || (${Fb} > ${fw})`}],mark:"point",encoding:{[Ye]:{field:Le.field,type:Le.type,...void 0!==rk?{title:rk}:{},...void 0!==ik?{scale:ik}:{},...Gt(ok)?{}:{axis:ok}},...AR,...ua?{color:ua}:{},...ca?{tooltip:ca}:{}}})[0];let nm;const ak=[...Ee,...De,iS];return sk?nm={transform:ak,layer:[sk,n_]}:(nm=n_,nm.transform.unshift(...ak)),{...P,layer:[nm,{transform:Re,layer:ek}]}}function My(d){return[{op:"q1",field:d,as:`lower_box_${d}`},{op:"q3",field:d,as:`upper_box_${d}`}]}const fg="errorbar",fp=new Id(fg,EA);function EA(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{transform:x,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:O,ticksOrient:P,markDef:B,outerSpec:q,tooltipEncoding:G}=hp(d,fg,_);delete O.size;const ee=Sy(B,A,S,O,_.errorbar),se=B.thickness,Ee=B.size,De={type:"tick",orient:P,aria:!1,...void 0!==se?{thickness:se}:{},...void 0!==Ee?{size:Ee}:{}},Re=[...ee({partName:"ticks",mark:De,positionPrefix:"lower",extraEncoding:G}),...ee({partName:"ticks",mark:De,positionPrefix:"upper",extraEncoding:G}),...ee({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==se?{size:se}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:G})];return{...q,transform:x,...Re.length>1?{layer:Re}:{...Re[0]}}}function CA(d,p){const{encoding:_}=d;if(function Ay(d){return(Bn(d.x)||Bn(d.y))&&!Bn(d.x2)&&!Bn(d.y2)&&!Bn(d.xError)&&!Bn(d.xError2)&&!Bn(d.yError)&&!Bn(d.yError2)}(_))return{orient:vA(d,p),inputType:"raw"};const x=function CE(d){return Bn(d.x2)||Bn(d.y2)}(_),S=function Rd(d){return Bn(d.xError)||Bn(d.xError2)||Bn(d.yError)||Bn(d.yError2)}(_),A=_.x,O=_.y;if(x){if(S)throw new Error(`${p} cannot be both type aggregated-upper-lower and aggregated-error`);const P=_.x2,B=_.y2;if(Bn(P)&&Bn(B))throw new Error(`${p} cannot have both x2 and y2`);if(Bn(P)){if(Wc(A))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${p}`)}if(Bn(B)){if(Wc(O))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${p}`)}throw new Error("No ranged axis")}{const P=_.xError,q=_.yError,G=_.yError2;if(Bn(_.xError2)&&!Bn(P))throw new Error(`${p} cannot have xError2 without xError`);if(Bn(G)&&!Bn(q))throw new Error(`${p} cannot have yError2 without yError`);if(Bn(P)&&Bn(q))throw new Error(`${p} cannot have both xError and yError with both are quantiative`);if(Bn(P)){if(Wc(A))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Bn(q)){if(Wc(O))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function hp(d,p,_){const{mark:x,encoding:S,params:A,projection:O,...P}=d,B=Du(x)?x:{type:x};A&&nt(tc(p));const{orient:q,inputType:G}=CA(d,p),{continuousAxisChannelDef:ee,continuousAxisChannelDef2:se,continuousAxisChannelDefError:Ee,continuousAxisChannelDefError2:De,continuousAxis:Re}=bA(d,q,p),{errorBarSpecificAggregate:Le,postAggregateCalculates:Ye,tooltipSummary:bt,tooltipTitleWithFieldName:kn}=function SA(d,p,_,x,S,A,O,P){let B=[],q=[];const G=p.field;let ee,se=!1;if("raw"===A){const Ee=d.center?d.center:d.extent?"iqr"===d.extent?"median":"mean":P.errorbar.center,De=d.extent?d.extent:"mean"===Ee?"stderr":"iqr";if("median"===Ee!=("iqr"===De)&&nt(function JM(d,p,_){return`${d} is not usually used with ${p} for ${_}.`}(Ee,De,O)),"stderr"===De||"stdev"===De)B=[{op:De,field:G,as:`extent_${G}`},{op:Ee,field:G,as:`center_${G}`}],q=[{calculate:`datum["center_${G}"] + datum["extent_${G}"]`,as:`upper_${G}`},{calculate:`datum["center_${G}"] - datum["extent_${G}"]`,as:`lower_${G}`}],ee=[{fieldPrefix:"center_",titlePrefix:Mo(Ee)},{fieldPrefix:"upper_",titlePrefix:Gv(Ee,De,"+")},{fieldPrefix:"lower_",titlePrefix:Gv(Ee,De,"-")}],se=!0;else{let Re,Le,Ye;"ci"===De?(Re="mean",Le="ci0",Ye="ci1"):(Re="median",Le="q1",Ye="q3"),B=[{op:Le,field:G,as:`lower_${G}`},{op:Ye,field:G,as:`upper_${G}`},{op:Re,field:G,as:`center_${G}`}],ee=[{fieldPrefix:"upper_",titlePrefix:cp({field:G,aggregate:Ye,type:"quantitative"},P,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:cp({field:G,aggregate:Le,type:"quantitative"},P,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:cp({field:G,aggregate:Re,type:"quantitative"},P,{allowDisabling:!1})}]}}else{(d.center||d.extent)&&nt(function j1(d,p){return`${p?"extent ":""}${p&&d?"and ":""}${d?"center ":""}${p&&d?"are ":"is "}not needed when data are aggregated.`}(d.center,d.extent)),"aggregated-upper-lower"===A?(ee=[],q=[{calculate:`datum["${_.field}"]`,as:`upper_${G}`},{calculate:`datum["${G}"]`,as:`lower_${G}`}]):"aggregated-error"===A&&(ee=[{fieldPrefix:"",titlePrefix:G}],q=[{calculate:`datum["${G}"] + datum["${x.field}"]`,as:`upper_${G}`}],q.push(S?{calculate:`datum["${G}"] + datum["${S.field}"]`,as:`lower_${G}`}:{calculate:`datum["${G}"] - datum["${x.field}"]`,as:`lower_${G}`}));for(const Ee of q)ee.push({fieldPrefix:Ee.as.substring(0,6),titlePrefix:jo(jo(Ee.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:q,errorBarSpecificAggregate:B,tooltipSummary:ee,tooltipTitleWithFieldName:se}}(B,ee,se,Ee,De,G,p,_),{[Re]:dn,["x"===Re?"x2":"y2"]:vi,["x"===Re?"xError":"yError"]:lr,["x"===Re?"xError2":"yError2"]:ca,...ua}=S,{bins:da,timeUnits:Ml,aggregate:fa,groupby:em,encoding:Rb}=Vv(ua,_),Nb=[...fa,...Le],Gu="raw"!==G?[]:em,dw=Wv(bt,ee,Rb,kn);return{transform:[...P.transform??[],...da,...Ml,...0===Nb.length?[]:[{aggregate:Nb,groupby:Gu}],...Ye],groupby:Gu,continuousAxisChannelDef:ee,continuousAxis:Re,encodingWithoutContinuousAxis:Rb,ticksOrient:"vertical"===q?"horizontal":"vertical",markDef:B,outerSpec:P,tooltipEncoding:dw}}function Gv(d,p,_){return`${Mo(d)} ${_} ${p}`}const ps="errorband",Ko=new Id(ps,Xv);function Xv(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{transform:x,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:O,markDef:P,outerSpec:B,tooltipEncoding:q}=hp(d,ps,_),G=P,ee=Sy(G,A,S,O,_.errorband),se=void 0!==d.encoding.x&&void 0!==d.encoding.y;let Ee={type:se?"area":"rect"},De={type:se?"line":"rule"};const Re={...G.interpolate?{interpolate:G.interpolate}:{},...G.tension&&G.interpolate?{tension:G.tension}:{}};return se?(Ee={...Ee,...Re,ariaRoleDescription:"errorband"},De={...De,...Re,aria:!1}):G.interpolate?nt(ry("interpolate")):G.tension&&nt(ry("tension")),{...B,transform:x,layer:[...ee({partName:"band",mark:Ee,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:q}),...ee({partName:"borders",mark:De,positionPrefix:"lower",extraEncoding:q}),...ee({partName:"borders",mark:De,positionPrefix:"upper",extraEncoding:q})]}}const DA={};function Yv(d,p,_){const x=new Id(d,p);DA[d]={normalizer:x,parts:_}}Yv(Dy,hr,["box","median","outliers","rule","ticks"]),Yv(fg,EA,["ticks","rule"]),Yv(ps,Xv,["band","borders"]);const J2=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Ty={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"},pp={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"},xl=We(Ty),Kf=We(pp),hg=We({header:1,headerRow:1,headerColumn:1,headerFacet:1}),Nd=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Ya="_vgsid_",SE={point:{on:"click",fields:[Ya],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 DE(d){return"legend"===d||!!d?.legend}function Iy(d){return DE(d)&&re.isObject(d)}function AA(d){return!!d?.select}function pg(d){const p=[];for(const _ of d||[]){if(AA(_))continue;const{expr:x,bind:S,...A}=_;if(S&&x){const O={...A,bind:S,init:x};p.push(O)}else{const O={...A,...x?{update:x}:{},...S?{bind:S}:{}};p.push(O)}}return p}function ME(d){return"concat"in d}function mg(d){return"vconcat"in d}function Oy(d){return"hconcat"in d}function AE(d){let{step:p,offsetIsDiscrete:_}=d;return _?p.for??"offset":"position"}function Fd(d){return re.isObject(d)&&void 0!==d.step}function Ry(d){return d.view||d.width||d.height}const J$=We({align:1,bounds:1,center:1,columns:1,spacing:1});function Aa(d,p){return d[p]??d["width"===p?"continuousWidth":"continuousHeight"]}function pr(d,p){const _=lo(d,p);return Fd(_)?_.step:lc}function lo(d,p){return ui(d[p]??d["width"===p?"discreteWidth":"discreteHeight"],{step:d.step})}const lc=20,gg={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:lc},mark:{color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},arc:{},area:{},bar:sE,circle:{},geoshape:{},image:{},line:{},point:{},rect:aE,rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},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,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,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:SE,style:{},title:{},facet:{spacing:20},concat:{spacing:20},normalizedNumberFormat:".0%"},Nu=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],gp={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Kv={blue:Nu[0],orange:Nu[1],red:Nu[2],teal:Nu[3],green:Nu[4],yellow:Nu[5],purple:Nu[6],pink:Nu[7],brown:Nu[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 Ly(d){const p=We(d||{}),_={};for(const x of p){const S=d[x];_[x]=Xf(S)?RM(S):Ha(S)}return _}const tR=[...rp,...zv,...hg,"background","padding","legend","lineBreak","scale","style","title","view"];function kE(){let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:p,font:_,fontSize:x,selection:S,...A}=d,O=re.mergeConfig({},st(gg),_?function Py(d){return{text:{font:d},style:{"guide-label":{font:d},"guide-title":{font:d},"group-title":{font:d},"group-subtitle":{font:d}}}}(_):{},p?function TE(){let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:re.isObject(d)?{...Kv,...d}:Kv}],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"}]}}}(p):{},x?function kA(d){return{signals:[{name:"fontSize",value:re.isObject(d)?{...gp,...d}:gp}],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"}}}}}(x):{},A||{});S&&re.writeConfig(O,"selection",S,!0);const P=yt(O,tR);for(const B of["background","lineBreak","padding"])O[B]&&(P[B]=Ha(O[B]));for(const B of rp)O[B]&&(P[B]=_o(O[B]));for(const B of zv)O[B]&&(P[B]=Ly(O[B]));for(const B of hg)O[B]&&(P[B]=_o(O[B]));return O.legend&&(P.legend=_o(O.legend)),O.scale&&(P.scale=_o(O.scale)),O.style&&(P.style=function Pd(d){const p=We(d),_={};for(const x of p)_[x]=Ly(d[x]);return _}(O.style)),O.title&&(P.title=_o(O.title)),O.view&&(P.view=_o(O.view)),P}const IE=new Set(["view",...eg]),OE=["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"],RE={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]};function IA(d){d=st(d);for(const p of OE)delete d[p];if(d.axis)for(const p in d.axis)Xf(d.axis[p])&&delete d.axis[p];if(d.legend)for(const p of J2)delete d.legend[p];if(d.mark){for(const p of G2)delete d.mark[p];d.mark.tooltip&&re.isObject(d.mark.tooltip)&&delete d.mark.tooltip}d.params&&(d.signals=(d.signals||[]).concat(pg(d.params)),delete d.params);for(const p of IE){for(const x of G2)delete d[p][x];const _=RE[p];if(_)for(const x of _)delete d[p][x];RA(d,p)}for(const p of function MA(){return We(DA)}())delete d[p];!function OA(d){const{titleMarkConfig:p,subtitleMarkConfig:_,subtitle:x}=pl(d.title);Gt(p)||(d.style["group-title"]={...d.style["group-title"],...p}),Gt(_)||(d.style["group-subtitle"]={...d.style["group-subtitle"],..._}),Gt(x)?delete d.title:d.title=x}(d);for(const p in d)re.isObject(d[p])&&Gt(d[p])&&delete d[p];return Gt(d)?void 0:d}function RA(d,p,_,x){"view"===p&&(_="cell");const A={...x?d[p][x]:d[p],...d.style[_??p]};Gt(A)||(d.style[_??p]=A),x||delete d[p]}function _p(d){return"layer"in d}class Fs{map(p,_){return _y(p)?this.mapFacet(p,_):function Zv(d){return"repeat"in d}(p)?this.mapRepeat(p,_):Oy(p)?this.mapHConcat(p,_):mg(p)?this.mapVConcat(p,_):ME(p)?this.mapConcat(p,_):this.mapLayerOrUnit(p,_)}mapLayerOrUnit(p,_){if(_p(p))return this.mapLayer(p,_);if(vl(p))return this.mapUnit(p,_);throw new Error(ov(p))}mapLayer(p,_){return{...p,layer:p.layer.map(x=>this.mapLayerOrUnit(x,_))}}mapHConcat(p,_){return{...p,hconcat:p.hconcat.map(x=>this.map(x,_))}}mapVConcat(p,_){return{...p,vconcat:p.vconcat.map(x=>this.map(x,_))}}mapConcat(p,_){const{concat:x,...S}=p;return{...S,concat:x.map(A=>this.map(A,_))}}mapFacet(p,_){return{...p,spec:this.map(p.spec,_)}}mapRepeat(p,_){return{...p,spec:this.map(p.spec,_)}}}const NE={zero:1,center:1,normalize:1};const Qv=new Set([iE,_l,xd,Su,np,zf,Vf,wd,Av,U2]),Ps=new Set([_l,xd,iE]);function Fu(d){return dt(d)&&"quantitative"===Qr(d)&&!d.bin}function _g(d,p,_){let{orient:x,type:S}=_;const A="x"===p?"y":"radius",O="x"===p&&["bar","area"].includes(S),P=d[p],B=d[A];if(dt(P)&&dt(B))if(Fu(P)&&Fu(B)){if(P.stack)return p;if(B.stack)return A;const q=dt(P)&&!!P.aggregate;if(q!==(dt(B)&&!!B.aggregate))return q?p:A;if(O){if("vertical"===x)return A;if("horizontal"===x)return p}}else{if(Fu(P))return p;if(Fu(B))return A}else{if(Fu(P))return O&&"vertical"===x?void 0:p;if(Fu(B))return O&&"horizontal"===x?void 0:A}}function LA(d,p){const _=Du(d)?d:{type:d},x=_.type;if(!Qv.has(x))return null;const S=_g(p,"x",_)||_g(p,"theta",_);if(!S)return null;const A=p[S],O=dt(A)?pt(A,{}):void 0,P=function PA(d){switch(d){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(S),B=[],q=new Set;if(p[P]){const Re=p[P],Le=dt(Re)?pt(Re,{}):void 0;Le&&Le!==O&&(B.push(P),q.add(Le))}const G="x"===P?"xOffset":"yOffset",ee=p[G],se=dt(ee)?pt(ee,{}):void 0;se&&se!==O&&(B.push(G),q.add(se));const Ee=$m.reduce((Re,Le)=>{if("tooltip"!==Le&&xo(p,Le)){const Ye=p[Le];for(const bt of re.array(Ye)){const kn=ku(bt);if(kn.aggregate)continue;const dn=pt(kn,{});(!dn||!q.has(dn))&&Re.push({channel:Le,fieldDef:kn})}}return Re},[]);let De;return void 0!==A.stack?De=re.isBoolean(A.stack)?A.stack?"zero":null:A.stack:Ps.has(x)&&(De="zero"),!De||!function FA(d){return d in NE}(De)||vE(p)&&0===Ee.length?null:A?.scale?.type&&A?.scale?.type!==Ga.LINEAR?(A?.stack&&nt(function K$(d){return`Cannot stack non-linear scale (${d}).`}(A.scale.type)),null):Bn(p[Or(S)])?(void 0!==A.stack&&nt(function ZM(d){return`Cannot stack "${d}" if there is already "${d}2".`}(S)),null):(dt(A)&&A.aggregate&&!Vm.has(A.aggregate)&&nt(function QM(d){return`Stacking is applied even though the aggregate function is non-summative ("${d}").`}(A.aggregate)),{groupbyChannels:B,groupbyFields:q,fieldChannel:S,impute:null!==A.impute&&yl(x),stackBy:Ee,offset:De})}function FE(d,p,_){const x=_o(d),S=Ji("orient",x,_);if(x.orient=function Zf(d,p,_){switch(d){case np:case zf:case Vf:case Av:case lA:case ze:return}const{x,y:S,x2:A,y2:O}=p;switch(d){case _l:if(dt(x)&&(oo(x.bin)||dt(S)&&S.aggregate&&!x.aggregate))return"vertical";if(dt(S)&&(oo(S.bin)||dt(x)&&x.aggregate&&!S.aggregate))return"horizontal";if(O||A){if(_)return _;if(!A)return(dt(x)&&x.type===$f&&!sr(x.bin)||sg(x))&&dt(S)&&oo(S.bin)?"horizontal":"vertical";if(!O)return(dt(S)&&S.type===$f&&!sr(S.bin)||sg(S))&&dt(x)&&oo(x.bin)?"vertical":"horizontal"}case Su:if(A&&(!dt(x)||!oo(x.bin))&&O&&(!dt(S)||!oo(S.bin)))return;case xd:if(O)return dt(S)&&oo(S.bin)?"horizontal":"vertical";if(A)return dt(x)&&oo(x.bin)?"vertical":"horizontal";if(d===Su){if(x&&!S)return"vertical";if(S&&!x)return"horizontal"}case wd:case U2:{const P=pE(x),B=pE(S);if(_)return _;if(P&&!B)return"tick"!==d?"horizontal":"vertical";if(!P&&B)return"tick"!==d?"vertical":"horizontal";if(P&&B)return"vertical";{const q=Yo(x)&&x.type===qa,G=Yo(S)&&S.type===qa;if(q&&!G)return"vertical";if(!q&&G)return"horizontal"}return}}return"vertical"}(x.type,p,S),void 0!==S&&S!==x.orient&&nt(function HM(d,p){return`Specified orient "${d}" overridden with "${p}".`}(x.orient,S)),"bar"===x.type&&x.orient){const P=Ji("cornerRadiusEnd",x,_);if(void 0!==P){const B="horizontal"===x.orient&&p.x2||"vertical"===x.orient&&p.y2?["cornerRadius"]:oc[x.orient];for(const q of B)x[q]=P;void 0!==x.cornerRadiusEnd&&delete x.cornerRadiusEnd}}return void 0===Ji("opacity",x,_)&&(x.opacity=function Jv(d,p){if(St([np,U2,zf,Vf],d)&&!vE(p))return.7}(x.type,p)),void 0===Ji("cursor",x,_)&&(x.cursor=function tr(d,p,_){return p.href||d.href||Ji("href",d,_)?"pointer":d.cursor}(x,p,_)),x}function nR(d){const{point:p,line:_,...x}=d;return We(x).length>1?x:x.type}function $A(d){for(const p of["line","area","rule","trail"])d[p]&&(d={...d,[p]:yt(d[p],["point","line"])});return d}function $y(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_=arguments.length>2?arguments[2]:void 0;return"transparent"===d.point?{opacity:0}:d.point?re.isObject(d.point)?d.point:{}:void 0!==d.point?null:p.point||_.shape?re.isObject(p.point)?p.point:{}:void 0}function yp(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.line?!0===d.line?{}:d.line:void 0!==d.line?null:p.line?!0===p.line?{}:p.line:void 0}class ex{constructor(){ln(this,"name","path-overlay")}hasMatchingType(p,_){if(vl(p)){const{mark:x,encoding:S}=p,A=Du(x)?x:{type:x};switch(A.type){case"line":case"rule":case"trail":return!!$y(A,_[A.type],S);case"area":return!!$y(A,_[A.type],S)||!!yp(A,_[A.type])}}return!1}run(p,_,x){const{config:S}=_,{params:A,projection:O,mark:P,name:B,encoding:q,...G}=p,ee=jv(q,S),se=Du(P)?P:{type:P},Ee=$y(se,S[se.type],ee),De="area"===se.type&&yp(se,S[se.type]),Re=[{name:B,...A?{params:A}:{},mark:nR({..."area"===se.type&&void 0===se.opacity&&void 0===se.fillOpacity?{opacity:.7}:{},...se}),encoding:yt(ee,["shape"])}],Le=LA(FE(se,ee,S),ee);let Ye=ee;if(Le){const{fieldChannel:bt,offset:kn}=Le;Ye={...ee,[bt]:{...ee[bt],...kn?{stack:kn}:{}}}}return Ye=yt(Ye,["y2","x2"]),De&&Re.push({...O?{projection:O}:{},mark:{type:"line",...Sn(se,["clip","interpolate","tension","tooltip"]),...De},encoding:Ye}),Ee&&Re.push({...O?{projection:O}:{},mark:{type:"point",opacity:1,filled:!0,...Sn(se,["clip","tooltip"]),...Ee},encoding:Ye}),x({...G,layer:Re},{..._,config:$A(S)})}}function By(d,p){return p?og(d)?zA(d,p):nx(d,p):d}function Ld(d,p){return p?zA(d,p):d}function tx(d,p,_){const x=p[d];return function K2(d){return d&&!re.isString(d)&&"repeat"in d}(x)?x.repeat in _?{...p,[d]:_[x.repeat]}:void nt(function ty(d){return`Unknown repeated value "${d}".`}(x.repeat)):p}function nx(d,p){if(void 0!==(d=tx("field",d,p))){if(null===d)return null;if(Cd(d)&&sa(d.sort)){const _=tx("field",d.sort,p);d={...d,..._?{sort:_}:{}}}return d}}function zy(d,p){if(dt(d))return nx(d,p);{const _=tx("datum",d,p);return _!==d&&!_.type&&(_.type="nominal"),_}}function BA(d,p){if(!Bn(d)){if(Nv(d)){const _=zy(d.condition,p);if(_)return{...d,condition:_};{const{condition:x,...S}=d;return S}}return d}{const _=zy(d,p);if(_)return _;if(hE(d))return{condition:d.condition}}}function zA(d,p){const _={};for(const x in d)if(re.hasOwnProperty(d,x)){const S=d[x];if(re.isArray(S))_[x]=S.map(A=>BA(A,p)).filter(A=>A);else{const A=BA(S,p);void 0!==A&&(_[x]=A)}}return _}class VA{constructor(){ln(this,"name","RuleForRangedLine")}hasMatchingType(p){if(vl(p)){const{encoding:_,mark:x}=p;if("line"===x||Du(x)&&"line"===x.type)for(const S of Tf){const O=_[Fc(S)];if(_[S]&&(dt(O)&&!oo(O.bin)||Sd(O)))return!0}}return!1}run(p,_,x){const{encoding:S,mark:A}=p;return nt(function B1(d,p){return`Line mark is for continuous lines and thus cannot be used with ${d&&p?"x2 and y2":d?"x2":"y2"}. We will use the rule mark (line segments) instead.`}(!!S.x2,!!S.y2)),x({...p,mark:re.isObject(A)?{...A,type:"rule"}:"rule"},_)}}function jA(d){let{parentEncoding:p,encoding:_={},layer:x}=d,S={};if(p){const A=new Set([...We(p),...We(_)]);for(const O of A){const P=_[O],B=p[O];if(Bn(P)){const q={...B,...P};S[O]=q}else Nv(P)?S[O]={...P,condition:{...B,...P.condition}}:P||null===P?S[O]=P:(x||Ma(B)||Je(B)||Bn(B)||re.isArray(B))&&(S[O]=B)}}else S=_;return!S||Gt(S)?void 0:S}function iR(d){const{parentProjection:p,projection:_}=d;return p&&_&&nt(function Ff(d){const{parentProjection:p,projection:_}=d;return`Layer's shared projection ${Wn(p)} is overridden by a child projection ${Wn(_)}.`}({parentProjection:p,projection:_})),_??p}function Vy(d){return"filter"in d}function bg(d){return"lookup"in d}function rR(d){return"pivot"in d}function LE(d){return"density"in d}function ox(d){return"quantile"in d}function bp(d){return"regression"in d}function $E(d){return"loess"in d}function HA(d){return"sample"in d}function oR(d){return"window"in d}function e3(d){return"joinaggregate"in d}function sx(d){return"flatten"in d}function sR(d){return"calculate"in d}function BE(d){return"bin"in d}function WA(d){return"impute"in d}function zE(d){return"timeUnit"in d}function VE(d){return"aggregate"in d}function qA(d){return"stack"in d}function ax(d){return"fold"in d}function vp(d){return"extent"in d&&!("density"in d)}function jy(d,p){const{transform:_,...x}=d;return _?{...x,transform:_.map(A=>{if(Vy(A))return{filter:Qf(A,p)};if(BE(A)&&Lc(A.bin))return{...A,bin:Ta(A.bin)};if(bg(A)){const{selection:O,...P}=A.from;return O?{...A,from:{param:O,...P}}:A}return A})}:d}function Ka(d,p){const _=st(d);if(dt(_)&&Lc(_.bin)&&(_.bin=Ta(_.bin)),sp(_)&&_.scale?.domain?.selection){const{selection:x,...S}=_.scale.domain;_.scale.domain={...S,...x?{param:x}:{}}}if(hE(_))if(re.isArray(_.condition))_.condition=_.condition.map(x=>{const{selection:S,param:A,test:O,...P}=x;return A?x:{...P,test:Qf(x,p)}});else{const{selection:x,param:S,test:A,...O}=Ka(_.condition,p);_.condition=S?_.condition:{...O,test:Qf(_.condition,p)}}return _}function Ta(d){const p=d.extent;if(p?.selection){const{selection:_,...x}=p;return{...d,extent:{...x,param:_}}}return d}function Qf(d,p){const _=x=>At(x,S=>{const O={param:S,empty:p.emptySelections[S]??!0};return p.selectionPredicates[S]??=[],p.selectionPredicates[S].push(O),O});return d.selection?_(d.selection):At(d.test||d.filter,x=>x.selection?_(x.selection):x)}class UE extends Fs{map(p,_){const x=_.selections??[];if(p.params&&!vl(p)){const S=[];for(const A of p.params)AA(A)?x.push(A):S.push(A);p.params=S}return _.selections=x,super.map(p,_)}mapUnit(p,_){const x=_.selections;if(!x||!x.length)return p;const S=(_.path??[]).concat(p.name),A=[];for(const O of x)if(O.views&&O.views.length)for(const P of O.views)(re.isString(P)&&(P===p.name||S.includes(P))||re.isArray(P)&&P.map(B=>S.indexOf(B)).every((B,q,G)=>-1!==B&&(0===q||B>G[q-1])))&&A.push(O);else A.push(O);return A.length&&(p.params=A),p}}for(const d of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const p=UE.prototype[d];UE.prototype[d]=function(_,x){return p.call(this,_,XA(_,x))}}function XA(d,p){return d.name?{...p,path:(p.path??[]).concat(d.name)}:p}function YA(d,p){void 0===p&&(p=kE(d.config));const _=function $d(d){const _={config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}};return KA.map(t3.map(n3.map(d,_),_),_)}(d,p),{width:x,height:S}=d,A=function lx(d,p,_){let{width:x,height:S}=p;const A=vl(d)||_p(d),O={};A?"container"==x&&"container"==S?(O.type="fit",O.contains="padding"):"container"==x?(O.type="fit-x",O.contains="padding"):"container"==S&&(O.type="fit-y",O.contains="padding"):("container"==x&&(nt(jm("width")),x=void 0),"container"==S&&(nt(jm("height")),S=void 0));const P={type:"pad",...O,..._?Uy(_.autosize):{},...Uy(d.autosize)};if("fit"===P.type&&!A&&(nt(VM),P.type="pad"),"container"==x&&!("fit"==P.type||"fit-x"==P.type)&&nt(jM("width")),"container"==S&&!("fit"==P.type||"fit-y"==P.type)&&nt(jM("height")),!xr(P,{type:"pad"}))return P}(_,{width:x,height:S,autosize:d.autosize},p);return{..._,...A?{autosize:A}:{}}}const t3=new class ix extends Fs{constructor(){super(...arguments),ln(this,"nonFacetUnitNormalizers",[wA,fp,Ko,new ex,new VA])}map(p,_){if(vl(p)){const x=xo(p.encoding,ea),S=xo(p.encoding,Xl),A=xo(p.encoding,yu);if(x||S||A)return this.mapFacetedUnit(p,_)}return super.map(p,_)}mapUnit(p,_){const{parentEncoding:x,parentProjection:S}=_,A=Ld(p.encoding,_.repeater),O={...p,...p.name?{name:[_.repeaterPrefix,p.name].filter(B=>B).join("_")}:{},...A?{encoding:A}:{}};if(x||S)return this.mapUnitWithParentEncodingOrProjection(O,_);const P=this.mapLayerOrUnit.bind(this);for(const B of this.nonFacetUnitNormalizers)if(B.hasMatchingType(O,_.config))return B.run(O,_,P);return O}mapRepeat(p,_){return function NA(d){return!re.isArray(d.repeat)&&d.repeat.layer}(p)?this.mapLayerRepeat(p,_):this.mapNonLayerRepeat(p,_)}mapLayerRepeat(p,_){const{repeat:x,spec:S,...A}=p,{row:O,column:P,layer:B}=x,{repeater:q={},repeaterPrefix:G=""}=_;return O||P?this.mapRepeat({...p,repeat:{...O?{row:O}:{},...P?{column:P}:{}},spec:{repeat:{layer:B},spec:S}},_):{...A,layer:B.map(ee=>{const se={...q,layer:ee},Ee=`${(S.name?`${S.name}_`:"")+G}child__layer_${hn(ee)}`,De=this.mapLayerOrUnit(S,{..._,repeater:se,repeaterPrefix:Ee});return De.name=Ee,De})}}mapNonLayerRepeat(p,_){const{repeat:x,spec:S,data:A,...O}=p;!re.isArray(x)&&p.columns&&(p=yt(p,["columns"]),nt(P1("repeat")));const P=[],{repeater:B={},repeaterPrefix:q=""}=_,G=!re.isArray(x)&&x.row||[B?B.row:null],ee=!re.isArray(x)&&x.column||[B?B.column:null],se=re.isArray(x)&&x||[B?B.repeat:null];for(const De of se)for(const Re of G)for(const Le of ee){const Ye={repeat:De,row:Re,column:Le,layer:B.layer},bt=(S.name?`${S.name}_`:"")+q+"child__"+(re.isArray(x)?`${hn(De)}`:(x.row?`row_${hn(Re)}`:"")+(x.column?`column_${hn(Le)}`:"")),kn=this.map(S,{..._,repeater:Ye,repeaterPrefix:bt});kn.name=bt,P.push(yt(kn,["data"]))}const Ee=re.isArray(x)?p.columns:x.column?x.column.length:1;return{data:S.data??A,align:"all",...O,columns:Ee,concat:P}}mapFacet(p,_){const{facet:x}=p;return og(x)&&p.columns&&(p=yt(p,["columns"]),nt(P1("facet"))),super.mapFacet(p,_)}mapUnitWithParentEncodingOrProjection(p,_){const{encoding:x,projection:S}=p,{parentEncoding:A,parentProjection:O,config:P}=_,B=iR({parentProjection:O,projection:S}),q=jA({parentEncoding:A,encoding:Ld(x,_.repeater)});return this.mapUnit({...p,...B?{projection:B}:{},...q?{encoding:q}:{}},{config:P})}mapFacetedUnit(p,_){const{row:x,column:S,facet:A,...O}=p.encoding,{mark:P,width:B,projection:q,height:G,view:ee,params:se,encoding:Ee,...De}=p,{facetMapping:Re,layout:Le}=this.getFacetMappingAndLayout({row:x,column:S,facet:A},_),Ye=Ld(O,_.repeater);return this.mapFacet({...De,...Le,facet:Re,spec:{...B?{width:B}:{},...G?{height:G}:{},...ee?{view:ee}:{},...q?{projection:q}:{},mark:P,encoding:Ye,...se?{params:se}:{}}},_)}getFacetMappingAndLayout(p,_){const{row:x,column:S,facet:A}=p;if(x||S){A&&nt(function cv(d){return`Facet encoding dropped as ${d.join(" and ")} ${d.length>1?"are":"is"} also specified.`}([...x?[ea]:[],...S?[Xl]:[]]));const O={},P={};for(const B of[ea,Xl]){const q=p[B];if(q){const{align:G,center:ee,spacing:se,columns:Ee,...De}=q;O[B]=De;for(const Re of["align","center","spacing"])void 0!==q[Re]&&(P[Re]??={},P[Re][B]=q[Re])}}return{facetMapping:O,layout:P}}{const{align:O,center:P,spacing:B,columns:q,...G}=A;return{facetMapping:By(G,_.repeater),layout:{...O?{align:O}:{},...P?{center:P}:{},...B?{spacing:B}:{},...q?{columns:q}:{}}}}}mapLayer(p,_){let{parentEncoding:x,parentProjection:S,...A}=_;const{encoding:O,projection:P,...B}=p,q={...A,parentEncoding:jA({parentEncoding:x,encoding:O,layer:!0}),parentProjection:iR({parentProjection:S,projection:P})};return super.mapLayer({...B,...p.name?{name:[q.repeaterPrefix,p.name].filter(G=>G).join("_")}:{}},q)}},n3=new class jE extends Fs{map(p,_){return _.emptySelections??={},_.selectionPredicates??={},p=jy(p,_),super.map(p,_)}mapLayerOrUnit(p,_){if((p=jy(p,_)).encoding){const x={};for(const[S,A]of Jt(p.encoding))x[S]=Ka(A,_);p={...p,encoding:x}}return super.mapLayerOrUnit(p,_)}mapUnit(p,_){const{selection:x,...S}=p;return x?{...S,params:Jt(x).map(A=>{let[O,P]=A;const{init:B,bind:q,empty:G,...ee}=P;"single"===ee.type?(ee.type="point",ee.toggle=!1):"multi"===ee.type&&(ee.type="point"),_.emptySelections[O]="none"!==G;for(const se of Dn(_.selectionPredicates[O]??{}))se.empty="none"!==G;return{name:O,value:B,select:ee,bind:q}})}:p}},KA=new UE;function Uy(d){return re.isString(d)?{type:d}:d??{}}const i3=["background","padding"];function Hy(d,p){const _={};for(const x of i3)d&&void 0!==d[x]&&(_[x]=Ha(d[x]));return p&&(_.params=d.params),_}class Za{constructor(){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.explicit=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},this.implicit=_}clone(){return new Za(st(this.explicit),st(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(p){return ui(this.explicit[p],this.implicit[p])}getWithExplicit(p){return void 0!==this.explicit[p]?{explicit:!0,value:this.explicit[p]}:void 0!==this.implicit[p]?{explicit:!1,value:this.implicit[p]}:{explicit:!1,value:void 0}}setWithExplicit(p,_){let{value:x,explicit:S}=_;void 0!==x&&this.set(p,x,S)}set(p,_,x){return delete this[x?"implicit":"explicit"][p],this[x?"explicit":"implicit"][p]=_,this}copyKeyFromSplit(p,_){let{explicit:x,implicit:S}=_;void 0!==x[p]?this.set(p,x[p],!0):void 0!==S[p]&&this.set(p,S[p],!1)}copyKeyFromObject(p,_){void 0!==_[p]&&this.set(p,_[p],!0)}copyAll(p){for(const _ of We(p.combine())){const x=p.getWithExplicit(_);this.setWithExplicit(_,x)}}}function Ls(d){return{explicit:!0,value:d}}function co(d){return{explicit:!1,value:d}}function zd(d){return(p,_,x,S)=>{const A=d(p.value,_.value);return A>0?p:A<0?_:Pu(p,_,x,S)}}function Pu(d,p,_,x){return d.explicit&&p.explicit&&nt(function XM(d,p,_,x){return`Conflicting ${p.toString()} property "${d.toString()}" (${Wn(_)} and ${Wn(x)}). Using ${Wn(_)}.`}(_,x,d.value,p.value)),d}function Qa(d,p,_,x){let S=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Pu;return void 0===d||void 0===d.value?p:d.explicit&&!p.explicit?d:p.explicit&&!d.explicit?p:xr(d.value,p.value)?d:S(d,p,_,x)}class Gc extends Za{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(p,_),this.explicit=p,this.implicit=_,this.parseNothing=x}clone(){const p=super.clone();return p.parseNothing=this.parseNothing,p}}function ka(d){return"url"in d}function Wy(d){return"values"in d}function ZA(d){return"name"in d&&!ka(d)&&!Wy(d)&&!Jf(d)}function Jf(d){return d&&(QA(d)||Ja(d)||cc(d))}function QA(d){return"sequence"in d}function Ja(d){return"sphere"in d}function cc(d){return"graticule"in d}let Vr=function(d){return d[d.Raw=0]="Raw",d[d.Main=1]="Main",d[d.Row=2]="Row",d[d.Column=3]="Column",d[d.Lookup=4]="Lookup",d}({});function HE(d){const{signals:p,hasLegend:_,index:x,...S}=d;return S.field=ci(S.field),S}function eh(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:re.identity;if(re.isArray(d)){const x=d.map(S=>eh(S,p,_));return p?`[${x.join(", ")}]`:x}return _d(d)?_(p?gl(d):function Wa(d){const p=Ym(d,!0);return d.utc?+new Date(Date.UTC(...p)):+new Date(...p)}(d)):p?_(Wn(d)):d}function lR(d,p){for(const _ of Dn(d.component.selection??{})){const x=_.name;let S=`${x}${Wd}, ${"global"===_.resolve?"true":`{unit: ${kp(d)}}`}`;for(const A of gx)A.defined(_)&&(A.signals&&(p=A.signals(d,_,p)),A.modifyExpr&&(S=A.modifyExpr(d,_,S)));p.push({name:x+dT,on:[{events:{signal:_.name+Wd},update:`modify(${re.stringValue(_.name+Hd)}, ${S})`}]})}return Lu(p)}function cR(d,p){if(d.component.selection&&We(d.component.selection).length){const _=re.stringValue(d.getName("cell"));p.unshift({name:"facet",value:{},on:[{events:re.parseSelector("pointermove","scope"),update:`isTuple(facet) ? facet : group(${_}).datum`}]})}return Lu(p)}function WE(d,p){for(const _ of Dn(d.component.selection??{}))for(const x of gx)x.defined(_)&&x.marks&&(p=x.marks(d,_,p));return p}function Lu(d){return d.map(p=>(p.on&&!p.on.length&&delete p.on,p))}class Tn{constructor(p,_){this.debugName=_,ln(this,"_children",[]),ln(this,"_parent",null),ln(this,"_hash",void 0),p&&(this.parent=p)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(p){this._parent=p,p&&p.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(p,_){this._children.includes(p)?nt("Attempt to add the same child twice."):void 0!==_?this._children.splice(_,0,p):this._children.push(p)}removeChild(p){const _=this._children.indexOf(p);return this._children.splice(_,1),_}remove(){let p=this._parent.removeChild(this);for(const _ of this._children)_._parent=this._parent,this._parent.addChild(_,p++)}insertAsParentOf(p){const _=p.parent;_.removeChild(this),this.parent=_,p.parent=this}swapWithParent(){const p=this._parent,_=p.parent;for(const S of this._children)S.parent=p;this._children=[],p.removeChild(this);const x=p.parent.removeChild(p);this._parent=_,_.addChild(this,x),p.parent=this}}class jr extends Tn{clone(){const p=new this.constructor;return p.debugName=`clone_${this.debugName}`,p._source=this._source,p._name=`clone_${this._name}`,p.type=this.type,p.refCounts=this.refCounts,p.refCounts[p._name]=0,p}constructor(p,_,x,S){super(p,_),this.type=x,this.refCounts=S,ln(this,"_source",void 0),ln(this,"_name",void 0),this._source=this._name=_,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 ${Ms()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(p){this._source=p}}function xp(d){return void 0!==d.as}function ux(d){return`${d}_end`}class el extends Tn{clone(){return new el(null,st(this.timeUnits))}constructor(p,_){super(p),this.timeUnits=_}static makeFromEncoding(p,_){const x=_.reduceFieldDef((S,A,O)=>{const{field:P,timeUnit:B}=A;if(B){let q;if(qo(B)){if(uo(_)){const{mark:G,markDef:ee,config:se}=_,Ee=Tu({fieldDef:A,markDef:ee,config:se});(ip(G)||Ee)&&(q={timeUnit:Fr(B),field:P})}}else q={as:pt(A,{forAs:!0}),field:P,timeUnit:B};if(uo(_)){const{mark:G,markDef:ee,config:se}=_,Ee=Tu({fieldDef:A,markDef:ee,config:se});ip(G)&&Yr(O)&&.5!==Ee&&(q.rectBandPosition=Ee)}q&&(S[kt(q)]=q)}return S},{});return Gt(x)?null:new el(p,x)}static makeFromTransform(p,_){const{timeUnit:x,...S}={..._},O={...S,timeUnit:Fr(x)};return new el(p,{[kt(O)]:O})}merge(p){this.timeUnits={...this.timeUnits};for(const _ in p.timeUnits)this.timeUnits[_]||(this.timeUnits[_]=p.timeUnits[_]);for(const _ of p.children)p.removeChild(_),_.parent=this;p.remove()}removeFormulas(p){const _={};for(const[x,S]of Jt(this.timeUnits)){const A=xp(S)?S.as:`${S.field}_end`;p.has(A)||(_[x]=S)}this.timeUnits=_}producedFields(){return new Set(Dn(this.timeUnits).map(p=>xp(p)?p.as:ux(p.field)))}dependentFields(){return new Set(Dn(this.timeUnits).map(p=>p.field))}hash(){return`TimeUnit ${kt(this.timeUnits)}`}assemble(){const p=[];for(const _ of Dn(this.timeUnits)){const{rectBandPosition:x}=_,S=Fr(_.timeUnit);if(xp(_)){const{field:A,as:O}=_,{unit:P,utc:B,...q}=S,G=[O,`${O}_end`];p.push({field:ci(A),type:"timeunit",...P?{units:Kt(P)}:{},...B?{timezone:"utc"}:{},...q,as:G}),p.push(...tT(G,x,S))}else if(_){const{field:A}=_,O=A.replaceAll("\\.","."),P=eT({timeUnit:S,field:O}),B=ux(O);p.push({type:"formula",expr:P,as:B}),p.push(...tT([O,B],x,S))}}return p}}const Xc="offsetted_rect_start",Vd="offsetted_rect_end";function eT(d){let{timeUnit:p,field:_,reverse:x}=d;const{unit:S,utc:A}=p,O=Qh(S),{part:P,step:B}=q1(O,p.step);return`${A?"utcOffset":"timeOffset"}('${P}', datum['${_}'], ${x?-B:B})`}function tT(d,p,_){let[x,S]=d;if(void 0!==p&&.5!==p){const A=`datum['${x}']`,O=`datum['${S}']`;return[{type:"formula",expr:wp([eT({timeUnit:_,field:x,reverse:!0}),A],p+.5),as:`${x}_${Xc}`},{type:"formula",expr:wp([A,O],p+.5),as:`${x}_${Vd}`}]}return[]}function wp(d,p){let[_,x]=d;return`${1-p} * ${_} + ${p} * ${x}`}const $s="_tuple_fields";class uR{constructor(){ln(this,"hasChannel",void 0),ln(this,"hasField",void 0),ln(this,"hasSelectionId",void 0),ln(this,"timeUnit",void 0),ln(this,"items",void 0);for(var p=arguments.length,_=new Array(p),x=0;x!0,parse:(d,p,_)=>{const x=p.name,S=p.project??=new uR,A={},O={},P=new Set,B=(De,Re)=>{const Le="visual"===Re?De.channel:De.field;let Ye=hn(`${x}_${Le}`);for(let bt=1;P.has(Ye);bt++)Ye=hn(`${x}_${Le}_${bt}`);return P.add(Ye),{[Re]:Ye}},q=p.type,G=d.config.selection[q],ee=void 0!==_.value?re.array(_.value):null;let{fields:se,encodings:Ee}=re.isObject(_.select)?_.select:{};if(!se&&!Ee&&ee)for(const De of ee)if(re.isObject(De))for(const Re of We(De))Af(Re)?(Ee||(Ee=[])).push(Re):"interval"===q?(nt('Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.'),Ee=G.encodings):(se??=[]).push(Re);!se&&!Ee&&(Ee=G.encodings,"fields"in G&&(se=G.fields));for(const De of Ee??[]){const Re=d.fieldDef(De);if(Re){let Le=Re.field;if(Re.aggregate){nt(_n(De,Re.aggregate));continue}if(!Le){nt(mt(De));continue}if(Re.timeUnit&&!qo(Re.timeUnit)){Le=d.vgField(De);const Ye={timeUnit:Re.timeUnit,as:Le,field:Re.field};O[kt(Ye)]=Ye}if(!A[Le]){const bt={field:Le,channel:De,type:"interval"===q&&pd(De)&&Da(d.getScaleComponent(De).get("type"))?"R":Re.bin?"R-RE":"E",index:S.items.length};bt.signals={...B(bt,"data"),...B(bt,"visual")},S.items.push(A[Le]=bt),S.hasField[Le]=A[Le],S.hasSelectionId=S.hasSelectionId||Le===Ya,za(De)?(bt.geoChannel=De,bt.channel=Mn(De),S.hasChannel[bt.channel]=A[Le]):S.hasChannel[De]=A[Le]}}else nt(mt(De))}for(const De of se??[]){if(S.hasField[De])continue;const Re={type:"E",field:De,index:S.items.length};Re.signals={...B(Re,"data")},S.items.push(Re),S.hasField[De]=Re,S.hasSelectionId=S.hasSelectionId||De===Ya}ee&&(p.init=ee.map(De=>S.items.map(Re=>re.isObject(De)?void 0!==De[Re.geoChannel||Re.channel]?De[Re.geoChannel||Re.channel]:De[Re.field]:De))),Gt(O)||(S.timeUnit=new el(null,O))},signals:(d,p,_)=>{const x=p.name+$s;return _.filter(A=>A.name===x).length>0||p.project.hasSelectionId?_:_.concat({name:x,value:p.project.items.map(HE)})}},uc={defined:d=>"interval"===d.type&&"global"===d.resolve&&d.bind&&"scales"===d.bind,parse:(d,p)=>{const _=p.scales=[];for(const x of p.project.items){const S=x.channel;if(!pd(S))continue;const A=d.getScaleComponent(S),O=A?A.get("type"):void 0;A&&Da(O)?(A.set("selectionExtent",{param:p.name,field:x.field},!0),_.push(x)):nt("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(d,p,_)=>{const x=p.scales.filter(O=>0===_.filter(P=>P.name===O.signals.data).length);if(!d.parent||XE(d)||0===x.length)return _;const S=_.filter(O=>O.name===p.name)[0];let A=S.update;if(A.indexOf(fR)>=0)S.update=`{${x.map(O=>`${re.stringValue(ci(O.field))}: ${O.signals.data}`).join(", ")}}`;else{for(const O of x){const P=`${re.stringValue(ci(O.field))}: ${O.signals.data}`;A.includes(P)||(A=`${A.substring(0,A.length-1)}, ${P}}`)}S.update=A}return _.concat(x.map(O=>({name:O.signals.data})))},signals:(d,p,_)=>{if(d.parent&&!XE(d))for(const x of p.scales){const S=_.filter(A=>A.name===x.signals.data)[0];S.push="outer",delete S.value,delete S.update}return _}};function dx(d,p){return`domain(${re.stringValue(d.scaleName(p))})`}function XE(d){return d.parent&&Hg(d.parent)&&!d.parent.parent}const Ep="_brush",qy="_scale_trigger",Cp="geo_interval_init_tick",Gy="_init",YE={defined:d=>"interval"===d.type,parse:(d,p,_)=>{if(d.hasProjection){const x={...re.isObject(_.select)?_.select:{}};x.fields=[Ya],x.encodings||(x.encodings=_.value?We(_.value):[Ho,It]),_.select={type:"interval",...x}}if(p.translate&&!uc.defined(p)){const x=`!event.item || event.item.mark.name !== ${re.stringValue(p.name+Ep)}`;for(const S of p.events){if(!S.between){nt(`${S} is not an ordered event stream for interval selections.`);continue}const A=re.array(S.between[0].filter??=[]);A.indexOf(x)<0&&A.push(x)}}},signals:(d,p,_)=>{const x=p.name,S=x+Wd,A=Dn(p.project.hasChannel).filter(P=>P.channel===Ri||P.channel===mo),O=p.init?p.init[0]:null;if(_.push(...A.reduce((P,B)=>P.concat(function ms(d,p,_,x){const S=!d.hasProjection,A=_.channel,O=_.signals.visual,P=re.stringValue(S?d.scaleName(A):d.projectionName()),B=se=>`scale(${P}, ${se})`,q=d.getSizeSignalRef(A===Ri?"width":"height").signal,G=`${A}(unit)`,ee=p.events.reduce((se,Ee)=>[...se,{events:Ee.between[0],update:`[${G}, ${G}]`},{events:Ee,update:`[${O}[0], clamp(${G}, 0, ${q})]`}],[]);if(S){const se=_.signals.data,Ee=uc.defined(p),De=d.getScaleComponent(A),Re=De?De.get("type"):void 0,Le=x?{init:eh(x,!0,B)}:{value:[]};return ee.push({events:{signal:p.name+qy},update:Da(Re)?`[${B(`${se}[0]`)}, ${B(`${se}[1]`)}]`:"[0, 0]"}),Ee?[{name:se,on:[]}]:[{name:O,...Le,on:ee},{name:se,...x?{init:eh(x)}:{},on:[{events:{signal:O},update:`${O}[0] === ${O}[1] ? null : invert(${P}, ${O})`}]}]}{const se=A===Ri?0:1,Ee=p.name+Gy;return[{name:O,...x?{init:`[${Ee}[0][${se}], ${Ee}[1][${se}]]`}:{value:[]},on:ee}]}}(d,p,B,O&&O[B.index])),[])),d.hasProjection){const P=re.stringValue(d.projectionName()),B=d.projectionName()+"_center",{x:q,y:G}=p.project.hasChannel,ee=q&&q.signals.visual,se=G&&G.signals.visual,Ee=q?O&&O[q.index]:`${B}[0]`,De=G?O&&O[G.index]:`${B}[1]`,Re=vi=>d.getSizeSignalRef(vi).signal,Le=`[[${ee?ee+"[0]":"0"}, ${se?se+"[0]":"0"}],[${ee?ee+"[1]":Re("width")}, ${se?se+"[1]":Re("height")}]]`;O&&(_.unshift({name:x+Gy,init:`[scale(${P}, [${q?Ee[0]:Ee}, ${G?De[0]:De}]), scale(${P}, [${q?Ee[1]:Ee}, ${G?De[1]:De}])]`}),(!q||!G)&&(_.find(lr=>lr.name===B)||_.unshift({name:B,update:`invert(${P}, [${Re("width")}/2, ${Re("height")}/2])`})));const kn=`vlSelectionTuples(intersect(${Le}, {markname: ${re.stringValue(d.getName("marks"))}}, unit.mark), {unit: ${kp(d)}})`,dn=A.map(vi=>vi.signals.visual);return _.concat({name:S,on:[{events:[...dn.length?[{signal:dn.join(" || ")}]:[],...O?[{signal:Cp}]:[]],update:kn}]})}{if(!uc.defined(p)){const q=x+qy,G=A.map(ee=>{const se=ee.channel,{data:Ee,visual:De}=ee.signals,Re=re.stringValue(d.scaleName(se)),Ye=Da(d.getScaleComponent(se).get("type"))?"+":"";return`(!isArray(${Ee}) || (${Ye}invert(${Re}, ${De})[0] === ${Ye}${Ee}[0] && ${Ye}invert(${Re}, ${De})[1] === ${Ye}${Ee}[1]))`});G.length&&_.push({name:q,value:{},on:[{events:A.map(ee=>({scale:d.scaleName(ee.channel)})),update:G.join(" && ")+` ? ${q} : {}`}]})}const P=A.map(q=>q.signals.data),B=`unit: ${kp(d)}, fields: ${x+$s}, values`;return _.concat({name:S,...O?{init:`{${B}: ${eh(O)}}`}:{},...P.length?{on:[{events:[{signal:P.join(" || ")}],update:`${P.join(" && ")} ? {${B}: [${P}]} : null`}]}:{}})}},topLevelSignals:(d,p,_)=>(uo(d)&&d.hasProjection&&p.init&&(_.filter(S=>S.name===Cp).length||_.unshift({name:Cp,value:null,on:[{events:"timer{1}",update:`${Cp} === null ? {} : ${Cp}`}]})),_),marks:(d,p,_)=>{const x=p.name,{x:S,y:A}=p.project.hasChannel,O=S?.signals.visual,P=A?.signals.visual,B=`data(${re.stringValue(p.name+Hd)})`;if(uc.defined(p)||!S&&!A)return _;const q={x:void 0!==S?{signal:`${O}[0]`}:{value:0},y:void 0!==A?{signal:`${P}[0]`}:{value:0},x2:void 0!==S?{signal:`${O}[1]`}:{field:{group:"width"}},y2:void 0!==A?{signal:`${P}[1]`}:{field:{group:"height"}}};if("global"===p.resolve)for(const Re of We(q))q[Re]=[{test:`${B}.length && ${B}[0].unit === ${kp(d)}`,...q[Re]},{value:0}];const{fill:G,fillOpacity:ee,cursor:se,...Ee}=p.mark,De=We(Ee).reduce((Re,Le)=>(Re[Le]=[{test:[void 0!==S&&`${O}[0] !== ${O}[1]`,void 0!==A&&`${P}[0] !== ${P}[1]`].filter(Ye=>Ye).join(" && "),value:Ee[Le]},{value:null}],Re),{});return[{name:`${x+Ep}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:G},fillOpacity:{value:ee}},update:q}},..._,{name:x+Ep,type:"rect",clip:!0,encode:{enter:{...se?{cursor:{value:se}}:{},fill:{value:"transparent"}},update:{...q,...De}}}]}};const Ro={defined:d=>"point"===d.type,signals:(d,p,_)=>{const x=p.name,S=x+$s,A=p.project,O="(item().isVoronoi ? datum.datum : datum)",P=Dn(d.component.selection??{}).reduce((ee,se)=>"interval"===se.type?ee.concat(se.name+Ep):ee,[]).map(ee=>`indexof(item().mark.name, '${ee}') < 0`).join(" && "),B="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(P?` && ${P}`:"");let q=`unit: ${kp(d)}, `;q+=p.project.hasSelectionId?`${Ya}: ${O}[${re.stringValue(Ya)}]`:`fields: ${S}, values: [${A.items.map(se=>d.fieldDef(se.channel)?.bin?`[${O}[${re.stringValue(d.vgField(se.channel,{}))}], ${O}[${re.stringValue(d.vgField(se.channel,{binSuffix:"end"}))}]]`:`${O}[${re.stringValue(se.field)}]`).join(", ")}]`;const G=p.events;return _.concat([{name:x+Wd,on:G?[{events:G,update:`${B} ? {${q}} : null`,force:!0}]:[]}])}};function Sp(d,p,_,x){const S=hE(p)&&p.condition,A=x(p);return S?{[_]:[...re.array(S).map(B=>{const q=x(B);if(function yy(d){return d.param}(B)){const{param:G,empty:ee}=B;return{test:ib(d,{param:G,empty:ee}),...q}}return{test:aC(d,B.test),...q}}),...void 0!==A?[A]:[]]}:void 0!==A?{[_]:A}:{}}function KE(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return Sp(d,d.encoding[p],p,x=>jd(x,d.config))}function jd(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(d){if(Ma(d))return Ar(d.value);if(Bn(d)){const{format:x,formatType:S}=Lv(d);return Hc({fieldOrDatumDef:d,format:x,formatType:S,expr:_,config:p})}}}function Yy(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{encoding:_,markDef:x,config:S,stack:A}=d,O=_.tooltip;if(re.isArray(O))return{tooltip:nT({tooltip:O},A,S,p)};{const P=p.reactiveGeom?"datum.datum":"datum";return Sp(d,O,"tooltip",B=>{const q=jd(B,S,P);if(q)return q;if(null===B)return;let G=Ji("tooltip",x,S);return!0===G&&(G={content:"encoding"}),re.isString(G)?{value:G}:re.isObject(G)?Je(G)?G:"encoding"===G.content?nT(_,A,S,p):{signal:P}:void 0})}}function ZE(d,p,_){let{reactiveGeom:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S={..._,..._.tooltipFormat},A={},O=x?"datum.datum":"datum",P=[];function B(G,ee){const se=Fc(ee),Ee=Yo(G)?G:{...G,type:d[se].type},De=Ee.title||lg(Ee,S),Re=re.array(De).join(", ").replaceAll(/"/g,'\\"');let Le;if(Yr(ee)){const Ye="x"===ee?"x2":"y2",bt=ku(d[Ye]);if(oo(Ee.bin)&&bt){const kn=pt(Ee,{expr:O}),dn=pt(bt,{expr:O}),{format:vi,formatType:lr}=Lv(Ee);Le=ng(kn,dn,vi,lr,S),A[Ye]=!0}}if((Yr(ee)||ee===As||ee===Ao)&&p&&p.fieldChannel===ee&&"normalize"===p.offset){const{format:Ye,formatType:bt}=Lv(Ee);Le=Hc({fieldOrDatumDef:Ee,format:Ye,formatType:bt,expr:O,config:S,normalizeStack:!0}).signal}Le??=jd(Ee,S,O).signal,P.push({channel:ee,key:Re,value:Le})}Ey(d,(G,ee)=>{dt(G)?B(G,ee):qf(G)&&B(G.condition,ee)});const q={};for(const{channel:G,key:ee,value:se}of P)!A[G]&&!q[ee]&&(q[ee]=se);return q}function nT(d,p,_){let{reactiveGeom:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=ZE(d,p,_,{reactiveGeom:x}),A=Jt(S).map(O=>{let[P,B]=O;return`"${P}": ${B}`});return A.length>0?{signal:`{${A.join(", ")}}`}:void 0}function iT(d){const{markDef:p,config:_}=d,x=Ji("aria",p,_);return!1===x?{}:{...x?{aria:x}:{},...rT(d),...dc(d)}}function rT(d){const{mark:p,markDef:_,config:x}=d;if(!1===x.aria)return{};const S=Ji("ariaRoleDescription",_,x);return null!=S?{ariaRoleDescription:{value:S}}:p in OM?{}:{ariaRoleDescription:{value:p}}}function dc(d){const{encoding:p,markDef:_,config:x,stack:S}=d,A=p.description;if(A)return Sp(d,A,"description",B=>jd(B,d.config));const O=Ji("description",_,x);if(null!=O)return{description:Ar(O)};if(!1===x.aria)return{};const P=ZE(p,S,x);return Gt(P)?void 0:{description:{signal:Jt(P).map((B,q)=>{let[G,ee]=B;return`"${q>0?"; ":""}${G}: " + (${ee})`}).join(" + ")}}}function gs(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{markDef:x,encoding:S,config:A}=p,{vgChannel:O}=_;let{defaultRef:P,defaultValue:B}=_;return void 0===P&&(B??=Ji(d,x,A,{vgChannel:O,ignoreVgConfig:!0}),void 0!==B&&(P=Ar(B))),Sp(p,S[d],O??d,G=>lE({channel:d,channelDef:G,markDef:x,config:A,scaleName:p.scaleName(d),scale:p.getScaleComponent(d),stack:null,defaultRef:P}))}function QE(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0};const{markDef:_,encoding:x,config:S}=d,{type:A}=_,O=p.filled??Ji("filled",_,S),P=St(["bar","point","circle","square","geoshape"],A)?"transparent":void 0,B=Ji(!0===O?"color":void 0,_,S,{vgChannel:"fill"})??S.mark[!0===O&&"color"]??P,q=Ji(!1===O?"color":void 0,_,S,{vgChannel:"stroke"})??S.mark[!1===O&&"color"],G=O?"fill":"stroke",ee={...B?{fill:Ar(B)}:{},...q?{stroke:Ar(q)}:{}};return _.color&&(O?_.fill:_.stroke)&&nt(Gm("property",{fill:"fill"in _,stroke:"stroke"in _})),{...ee,...gs("color",d,{vgChannel:G,defaultValue:O?B:q}),...gs("fill",d,{defaultValue:x.fill?B:void 0}),...gs("stroke",d,{defaultValue:x.stroke?q:void 0})}}function Dp(d){const{encoding:p,mark:_}=d,x=p.order;return!yl(_)&&Ma(x)?Sp(d,x,"zindex",S=>Ar(S.value)):{}}function th(d){let{channel:p,markDef:_,encoding:x={},model:S,bandPosition:A}=d;const O=`${p}Offset`,P=_[O],B=x[O];if(("xOffset"===O||"yOffset"===O)&&B)return{offsetType:"encoding",offset:lE({channel:O,channelDef:B,markDef:_,config:S?.config,scaleName:S.scaleName(O),scale:S.getScaleComponent(O),stack:null,defaultRef:Ar(P),bandPosition:A})};const q=_[O];return q?{offsetType:"visual",offset:q}:{}}function Ia(d,p,_){let{defaultPos:x,vgChannel:S}=_;const{encoding:A,markDef:O,config:P,stack:B}=p,q=A[d],G=A[Or(d)],ee=p.scaleName(d),se=p.getScaleComponent(d),{offset:Ee,offsetType:De}=th({channel:d,markDef:O,encoding:A,model:p,bandPosition:.5}),Re=wl({model:p,defaultPos:x,channel:d,scaleName:ee,scale:se}),Le=!q&&Yr(d)&&(A.latitude||A.longitude)?{field:p.getName(d)}:function dR(d){const{channel:p,channelDef:_,scaleName:x,stack:S,offset:A,markDef:O}=d;if(Bn(_)&&S&&p===S.fieldChannel){if(dt(_)){let P=_.bandPosition;if(void 0===P&&"text"===O.type&&("radius"===p||"theta"===p)&&(P=.5),void 0!==P)return sc({scaleName:x,fieldOrDatumDef:_,startSuffix:"start",bandPosition:P,offset:A})}return Xa(_,x,{suffix:"end"},{offset:A})}return tg(d)}({channel:d,channelDef:q,channel2Def:G,markDef:O,config:P,scaleName:ee,scale:se,stack:B,offset:Ee,defaultRef:Re,bandPosition:"encoding"===De?0:void 0});return Le?{[S||d]:Le}:void 0}function wl(d){let{model:p,defaultPos:_,channel:x,scaleName:S,scale:A}=d;const{markDef:O,config:P}=p;return()=>{const B=Fc(x),q=xa(x),G=Ji(x,O,P,{vgChannel:q});if(void 0!==G)return Fi(x,G);switch(_){case"zeroOrMin":case"zeroOrMax":if(S){const ee=A.get("type");if(!St([Ga.LOG,Ga.TIME,Ga.UTC],ee)&&A.domainDefinitelyIncludesZero())return{scale:S,value:0}}if("zeroOrMin"===_)return"y"===B?{field:{group:"height"}}:{value:0};switch(B){case"radius":return{signal:`min(${p.width.signal},${p.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...p[Mr(x)],mult:.5}}}}const Ky={left:"x",center:"xc",right:"x2"},JE={top:"y",middle:"yc",bottom:"y2"};function xg(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle";if("radius"===d||"theta"===d)return xa(d);const S="x"===d?"align":"baseline",A=Ji(S,p,_);let O;return Je(A)?(nt(function uv(d){return`The ${d} for range marks cannot be an expression`}(S)),O=void 0):O=A,"x"===d?Ky[O||("top"===x?"left":"center")]:JE[O||x]}function $u(d,p,_){let{defaultPos:x,defaultPos2:S,range:A}=_;return A?Bs(d,p,{defaultPos:x,defaultPos2:S}):Ia(d,p,{defaultPos:x})}function Bs(d,p,_){let{defaultPos:x,defaultPos2:S}=_;const{markDef:A,config:O}=p,P=Or(d),B=Mr(d),q=function Zy(d,p,_){const{encoding:x,mark:S,markDef:A,stack:O,config:P}=d,B=Fc(_),q=Mr(_),G=xa(_),ee=x[B],se=d.scaleName(B),Ee=d.getScaleComponent(B),{offset:De}=th(_ in x||_ in A?{channel:_,markDef:A,encoding:x,model:d}:{channel:B,markDef:A,encoding:x,model:d});if(!ee&&("x2"===_||"y2"===_)&&(x.latitude||x.longitude)){const Le=Mr(_),Ye=d.markDef[Le];return null!=Ye?{[Le]:{value:Ye}}:{[G]:{field:d.getName(_)}}}const Re=function Qy(d){let{channel:p,channelDef:_,channel2Def:x,markDef:S,config:A,scaleName:O,scale:P,stack:B,offset:q,defaultRef:G}=d;return Bn(_)&&B&&p.charAt(0)===B.fieldChannel.charAt(0)?Xa(_,O,{suffix:"start"},{offset:q}):tg({channel:p,channelDef:x,scaleName:O,scale:P,stack:B,markDef:S,config:A,offset:q,defaultRef:G})}({channel:_,channelDef:ee,channel2Def:x[_],markDef:A,config:P,scaleName:se,scale:Ee,stack:O,offset:De,defaultRef:void 0});return void 0!==Re?{[G]:Re}:Mp(_,A)||Mp(_,{[_]:ey(_,A,P.style),[q]:ey(q,A,P.style)})||Mp(_,P[S])||Mp(_,P.mark)||{[G]:wl({model:d,defaultPos:p,channel:_,scaleName:se,scale:Ee})()}}(p,S,P);return{...Ia(d,p,{defaultPos:x,vgChannel:q[B]?xg(d,A,O):xa(d)}),...q}}function Mp(d,p){const _=Mr(d),x=xa(d);if(void 0!==p[x])return{[x]:Fi(d,p[x])};if(void 0!==p[d])return{[x]:Fi(d,p[d])};if(p[_]){const S=p[_];if(!Au(S))return{[_]:Fi(d,S)};nt(function Bc(d){return`Position range does not support relative band size for ${d}.`}(_))}}function El(d,p){const{config:_,encoding:x,markDef:S}=d,A=S.type,O=Or(p),P=Mr(p),B=x[p],q=x[O],G=d.getScaleComponent(p),ee=G?G.get("type"):void 0,se=S.orient,Ee=x[P]??x.size??Ji("size",S,_,{vgChannel:P}),De=na(p),Re="bar"===A&&("x"===p?"vertical"===se:"horizontal"===se);return!dt(B)||!(sr(B.bin)||oo(B.bin)||B.timeUnit&&!q)||Ee&&!Au(Ee)||x[De]||ko(ee)?(Bn(B)&&ko(ee)||Re)&&!q?function wg(d,p,_){const{markDef:x,encoding:S,config:A,stack:O}=_,P=x.orient,B=_.scaleName(p),q=_.getScaleComponent(p),G=Mr(p),ee=Or(p),se=na(p),Ee=_.scaleName(se),De=_.getScaleComponent(To(p)),Re="horizontal"===P&&"y"===p||"vertical"===P&&"x"===p;let Le;(S.size||x.size)&&(Re?Le=gs("size",_,{vgChannel:G,defaultRef:Ar(x.size)}):nt(function N2(d){return`Cannot apply size to non-oriented mark "${d}".`}(x.type)));const Ye=!!Le,bt=by({channel:p,fieldDef:d,markDef:x,config:A,scaleType:(q||De)?.get("type"),useVlSizeChannel:Re});Le=Le||{[G]:Ap(G,Ee||B,De||q,A,bt,!!d,x.type)};const dn=xg(p,x,A,"band"===(q||De)?.get("type")&&Au(bt)&&!Ye?"top":"middle"),vi="xc"===dn||"yc"===dn,{offset:lr,offsetType:ca}=th({channel:p,markDef:x,encoding:S,model:_,bandPosition:vi?.5:0}),ua=tg({channel:p,channelDef:d,markDef:x,config:A,scaleName:B,scale:q,stack:O,offset:lr,defaultRef:wl({model:_,defaultPos:"mid",channel:p,scaleName:B,scale:q}),bandPosition:vi?"encoding"===ca?0:.5:Je(bt)?{signal:`(1-${bt})/2`}:Au(bt)?(1-bt.band)/2:0});if(G)return{[dn]:ua,...Le};{const da=xa(ee),Ml=Le[G],fa=lr?{...Ml,offset:lr}:Ml;return{[dn]:ua,[da]:re.isArray(ua)?[ua[0],{...ua[1],offset:fa}]:{...ua,offset:fa}}}}(B,p,d):Bs(p,d,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function Ud(d){let{fieldDef:p,fieldDef2:_,channel:x,model:S}=d;const{config:A,markDef:O,encoding:P}=S,B=S.getScaleComponent(x),q=S.scaleName(x),G=B?B.get("type"):void 0,ee=B.get("reverse"),se=by({channel:x,fieldDef:p,markDef:O,config:A,scaleType:G}),De=S.component.axes[x]?.[0]?.get("translate")??.5,Re=Yr(x)?Ji("binSpacing",O,A)??0:0,Le=Or(x),Ye=xa(x),bt=xa(Le),kn=xu("minBandSize",O,A),{offset:dn}=th({channel:x,markDef:O,encoding:P,model:S,bandPosition:0}),{offset:vi}=th({channel:Le,markDef:O,encoding:P,model:S,bandPosition:0}),lr=function ao(d){let{scaleName:p,fieldDef:_}=d;const x=pt(_,{expr:"datum"});return`abs(scale("${p}", ${pt(_,{expr:"datum",suffix:"end"})}) - scale("${p}", ${x}))`}({fieldDef:p,scaleName:q}),ca=Eg(x,Re,ee,De,dn,kn,lr),ua=Eg(Le,Re,ee,De,vi??dn,kn,lr),da=Je(se)?{signal:`(1-${se.signal})/2`}:Au(se)?(1-se.band)/2:.5,Ml=Tu({fieldDef:p,fieldDef2:_,markDef:O,config:A});if(sr(p.bin)||p.timeUnit){const fa=p.timeUnit&&.5!==Ml;return{[bt]:Yc({fieldDef:p,scaleName:q,bandPosition:da,offset:ua,useRectOffsetField:fa}),[Ye]:Yc({fieldDef:p,scaleName:q,bandPosition:Je(da)?{signal:`1-${da.signal}`}:1-da,offset:ca,useRectOffsetField:fa})}}if(oo(p.bin)){const fa=Xa(p,q,{},{offset:ua});if(dt(_))return{[bt]:fa,[Ye]:Xa(_,q,{},{offset:ca})};if(Lc(p.bin)&&p.bin.step)return{[bt]:fa,[Ye]:{signal:`scale("${q}", ${pt(p,{expr:"datum"})} + ${p.bin.step})`,offset:ca}}}nt(eA(Le))}({fieldDef:B,fieldDef2:q,channel:p,model:d})}function Ap(d,p,_,x,S,A,O){if(Au(S)){if(!_)return{mult:S.band,field:{group:d}};{const B=_.get("type");if("band"===B){let q=`bandwidth('${p}')`;1!==S.band&&(q=`${S.band} * ${q}`);const G=xu("minBandSize",{type:O},x);return{signal:G?`max(${ec(G)}, ${q})`:q}}1!==S.band&&(nt(function iy(d){return`Cannot use the relative band size with ${d} scale.`}(B)),S=void 0)}}else{if(Je(S))return S;if(S)return{value:S}}if(_){const B=_.get("range");if(ht(B)&&re.isNumber(B.step))return{value:B.step-2}}if(!A){const{bandPaddingInner:B,barBandPaddingInner:q,rectBandPaddingInner:G}=x.scale,ee=ui(B,"bar"===O?q:G);if(Je(ee))return{signal:`(1 - (${ee.signal})) * ${d}`};if(re.isNumber(ee))return{signal:`${1-ee} * ${d}`}}return{value:pr(x.view,d)-2}}function Eg(d,p,_,x,S,A,O){if(D2(d))return 0;const P="x"===d||"y2"===d,B=P?-p/2:p/2;if(Je(_)||Je(S)||Je(x)||A){const q=ec(_),G=ec(S),ee=ec(x),se=ec(A),De=A?`(${O} < ${se} ? ${P?"":"-"}0.5 * (${se} - (${O})) : ${B})`:B;return{signal:(ee?`${ee} + `:"")+(q?`(${q} ? -1 : 1) * `:"")+(G?`(${G} + ${De})`:De)}}return S=S||0,x+(_?-S-B:+S+B)}function Yc(d){let{fieldDef:p,scaleName:_,bandPosition:x,offset:S,useRectOffsetField:A}=d;return sc({scaleName:_,fieldOrDatumDef:p,bandPosition:x,offset:S,...A?{startSuffix:Xc,endSuffix:Vd}:{}})}const Cg=new Set(["aria","width","height"]);function _s(d,p){const{fill:_,stroke:x}="include"===p.color?QE(d):{};return{...oT(d.markDef,p),...fx(d,"fill",_),...fx(d,"stroke",x),...gs("opacity",d),...gs("fillOpacity",d),...gs("strokeOpacity",d),...gs("strokeWidth",d),...gs("strokeDash",d),...Dp(d),...Yy(d),...KE(d,"href"),...iT(d)}}function fx(d,p,_){const{config:x,mark:S,markDef:A}=d;if("hide"===Ji("invalid",A,x)&&_&&!yl(S)){const P=function sT(d,p){let{invalid:_=!1,channels:x}=p;const S=x.reduce((O,P)=>{const B=d.getScaleComponent(P);if(B){const q=B.get("type"),G=d.vgField(P,{expr:"datum"});G&&Da(q)&&(O[G]=!0)}return O},{}),A=We(S);if(A.length>0){const O=_?"||":"&&";return A.map(P=>Uf(P,_)).join(` ${O} `)}}(d,{invalid:!0,channels:ev});if(P)return{[p]:[{test:P,value:null},...re.array(_)]}}return _?{[p]:_}:{}}function oT(d,p){return gd.reduce((_,x)=>(!Cg.has(x)&&void 0!==d[x]&&"ignore"!==p[x]&&(_[x]=Ar(d[x])),_),{})}function Sg(d){const{config:p,markDef:_}=d;if(Ji("invalid",_,p)){const S=function eC(d,p){let{invalid:_=!1,channels:x}=p;const S=x.reduce((O,P)=>{const B=d.getScaleComponent(P);if(B){const q=B.get("type"),G=d.vgField(P,{expr:"datum",binSuffix:d.stack?.impute?"mid":void 0});G&&Da(q)&&(O[G]=!0)}return O},{}),A=We(S);if(A.length>0){const O=_?"||":"&&";return A.map(P=>Uf(P,_)).join(` ${O} `)}}(d,{channels:Ql});if(S)return{defined:{signal:S}}}return{}}function aT(d,p){if(void 0!==p)return{[d]:Ar(p)}}const tC="voronoi",Tp={defined:d=>"point"===d.type&&d.nearest,parse:(d,p)=>{if(p.events)for(const _ of p.events)_.markname=d.getName(tC)},marks:(d,p,_)=>{const{x,y:S}=p.project.hasChannel,A=d.mark;if(yl(A))return nt(function yo(d){return`The "nearest" transform is not supported for ${d} marks.`}(A)),_;const O={name:d.getName(tC),type:"path",interactive:!0,from:{data:d.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...Yy(d,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:x||!S?"datum.datum.x || 0":"0"},y:{expr:S||!x?"datum.datum.y || 0":"0"},size:[d.getSizeSignalRef("width"),d.getSizeSignalRef("height")]}]};let P=0,B=!1;return _.forEach((q,G)=>{const ee=q.name??"";ee===d.component.mark[0].name?P=G:ee.indexOf(tC)>=0&&(B=!0)}),B||_.splice(P+1,0,O),_}},nC={defined:d=>"point"===d.type&&"global"===d.resolve&&d.bind&&"scales"!==d.bind&&!DE(d.bind),parse:(d,p,_)=>zn(p,_),topLevelSignals:(d,p,_)=>{const x=p.name,S=p.project,A=p.bind,O=p.init&&p.init[0],P=Tp.defined(p)?"(item().isVoronoi ? datum.datum : datum)":"datum";return S.items.forEach((B,q)=>{const G=hn(`${x}_${B.field}`);_.filter(se=>se.name===G).length||_.unshift({name:G,...O?{init:eh(O[q])}:{value:null},on:p.events?[{events:p.events,update:`datum && item().mark.marktype !== 'group' ? ${P}[${re.stringValue(B.field)}] : null`}]:[],bind:A[B.field]??A[B.channel]??A})}),_},signals:(d,p,_)=>{const x=p.name,S=p.project,A=_.filter(q=>q.name===x+Wd)[0],O=x+$s,P=S.items.map(q=>hn(`${x}_${q.field}`)),B=P.map(q=>`${q} !== null`).join(" && ");return P.length&&(A.update=`${B} ? {fields: ${O}, values: [${P.join(", ")}]} : null`),delete A.value,delete A.on,_}},Dg="_toggle",hx={defined:d=>"point"===d.type&&!!d.toggle,signals:(d,p,_)=>_.concat({name:p.name+Dg,value:!1,on:[{events:p.events,update:p.toggle}]}),modifyExpr:(d,p)=>{const _=p.name+Wd,x=p.name+Dg;return`${x} ? null : ${_}, `+("global"===p.resolve?`${x} ? null : true, `:`${x} ? null : {unit: ${kp(d)}}, `)+`${x} ? ${_} : null`}},lT={defined:d=>void 0!==d.clear&&!1!==d.clear,parse:(d,p)=>{p.clear&&(p.clear=re.isString(p.clear)?re.parseSelector(p.clear,"view"):p.clear)},topLevelSignals:(d,p,_)=>{if(nC.defined(p))for(const x of p.project.items){const S=_.findIndex(A=>A.name===hn(`${p.name}_${x.field}`));-1!==S&&_[S].on.push({events:p.clear,update:"null"})}return _},signals:(d,p,_)=>{function x(S,A){-1!==S&&_[S].on&&_[S].on.push({events:p.clear,update:A})}if("interval"===p.type)for(const S of p.project.items){const A=_.findIndex(O=>O.name===S.signals.visual);x(A,"[0, 0]"),-1===A&&x(_.findIndex(P=>P.name===S.signals.data),"null")}else{let S=_.findIndex(A=>A.name===p.name+Wd);x(S,"null"),hx.defined(p)&&(S=_.findIndex(A=>A.name===p.name+Dg),x(S,"false"))}return _}},cT={defined:d=>{const p="global"===d.resolve&&d.bind&&DE(d.bind),_=1===d.project.items.length&&d.project.items[0].field!==Ya;return p&&!_&&nt("Legend bindings are only supported for selections over an individual field or encoding channel."),p&&_},parse:(d,p,_)=>{const x=st(_);if(x.select=re.isString(x.select)?{type:x.select,toggle:p.toggle}:{...x.select,toggle:p.toggle},zn(p,x),re.isObject(_.select)&&(_.select.on||_.select.clear)){const O='event.item && indexof(event.item.mark.role, "legend") < 0';for(const P of p.events)P.filter=re.array(P.filter??[]),P.filter.includes(O)||P.filter.push(O)}const S=Iy(p.bind)?p.bind.legend:"click",A=re.isString(S)?re.parseSelector(S,"view"):re.array(S);p.bind={legend:{merge:A}}},topLevelSignals:(d,p,_)=>{const x=p.name,S=Iy(p.bind)&&p.bind.legend,A=O=>P=>{const B=st(P);return B.markname=O,B};for(const O of p.project.items){if(!O.hasLegend)continue;const P=`${hn(O.field)}_legend`,B=`${x}_${P}`;if(0===_.filter(G=>G.name===B).length){const G=S.merge.map(A(`${P}_symbols`)).concat(S.merge.map(A(`${P}_labels`))).concat(S.merge.map(A(`${P}_entries`)));_.unshift({name:B,...p.init?{}:{value:null},on:[{events:G,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:S.merge,update:`!event.item || !datum ? null : ${B}`,force:!0}]})}}return _},signals:(d,p,_)=>{const x=p.name,S=p.project,A=_.find(se=>se.name===x+Wd),O=x+$s,P=S.items.filter(se=>se.hasLegend).map(se=>hn(`${x}_${hn(se.field)}_legend`)),q=`${P.map(se=>`${se} !== null`).join(" && ")} ? {fields: ${O}, values: [${P.join(", ")}]} : null`;p.events&&P.length>0?A.on.push({events:P.map(se=>({signal:se})),update:q}):P.length>0&&(A.update=q,delete A.value,delete A.on);const G=_.find(se=>se.name===x+Dg),ee=Iy(p.bind)&&p.bind.legend;return G&&(p.events?G.on.push({...G.on[0],events:ee}):G.on[0].events=ee),_}};const uT="_translate_anchor",Jy="_translate_delta",eb={defined:d=>"interval"===d.type&&d.translate,signals:(d,p,_)=>{const x=p.name,S=uc.defined(p),A=x+uT,{x:O,y:P}=p.project.hasChannel;let B=re.parseSelector(p.translate,"scope");return S||(B=B.map(q=>(q.between[0].markname=x+Ep,q))),_.push({name:A,value:{},on:[{events:B.map(q=>q.between[0]),update:"{x: x(unit), y: y(unit)"+(void 0!==O?`, extent_x: ${S?dx(d,Ri):`slice(${O.signals.visual})`}`:"")+(void 0!==P?`, extent_y: ${S?dx(d,mo):`slice(${P.signals.visual})`}`:"")+"}"}]},{name:x+Jy,value:{},on:[{events:B,update:`{x: ${A}.x - x(unit), y: ${A}.y - y(unit)}`}]}),void 0!==O&&px(d,p,O,"width",_),void 0!==P&&px(d,p,P,"height",_),_}};function px(d,p,_,x,S){const A=p.name,O=A+uT,P=A+Jy,B=_.channel,q=uc.defined(p),G=S.filter(vi=>vi.name===_.signals[q?"data":"visual"])[0],ee=d.getSizeSignalRef(x).signal,se=d.getScaleComponent(B),Ee=se&&se.get("type"),De=se&&se.get("reverse"),Le=`${O}.extent_${B}`,dn=`${q&&se?"log"===Ee?"panLog":"symlog"===Ee?"panSymlog":"pow"===Ee?"panPow":"panLinear":"panLinear"}(${Le}, ${q?B===Ri?De?"":"-":De?"-":"":""}${P}.${B} / ${q?`${ee}`:`span(${Le})`}${q?"pow"===Ee?`, ${se.get("exponent")??1}`:"symlog"===Ee?`, ${se.get("constant")??1}`:"":""})`;G.on.push({events:{signal:P},update:q?dn:`clampRange(${dn}, 0, ${ee})`})}const iC="_zoom_anchor",tb="_zoom_delta",nb={defined:d=>"interval"===d.type&&d.zoom,signals:(d,p,_)=>{const x=p.name,S=uc.defined(p),A=x+tb,{x:O,y:P}=p.project.hasChannel,B=re.stringValue(d.scaleName(Ri)),q=re.stringValue(d.scaleName(mo));let G=re.parseSelector(p.zoom,"scope");return S||(G=G.map(ee=>(ee.markname=x+Ep,ee))),_.push({name:x+iC,on:[{events:G,update:S?"{"+[B?`x: invert(${B}, x(unit))`:"",q?`y: invert(${q}, y(unit))`:""].filter(ee=>ee).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:A,on:[{events:G,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==O&&mx(d,p,O,"width",_),void 0!==P&&mx(d,p,P,"height",_),_}};function mx(d,p,_,x,S){const A=p.name,O=_.channel,P=uc.defined(p),B=S.filter(bt=>bt.name===_.signals[P?"data":"visual"])[0],q=d.getSizeSignalRef(x).signal,G=d.getScaleComponent(O),ee=G&&G.get("type"),se=P?dx(d,O):B.name,Ee=A+tb,Ye=`${P&&G?"log"===ee?"zoomLog":"symlog"===ee?"zoomSymlog":"pow"===ee?"zoomPow":"zoomLinear":"zoomLinear"}(${se}, ${A}${iC}.${O}, ${Ee}${P?"pow"===ee?`, ${G.get("exponent")??1}`:"symlog"===ee?`, ${G.get("constant")??1}`:"":""})`;B.on.push({events:{signal:Ee},update:P?Ye:`clampRange(${Ye}, 0, ${q})`})}const Hd="_store",Wd="_tuple",dT="_modify",fR="vlSelectionResolve",gx=[Ro,YE,GE,hx,nC,uc,cT,lT,eb,nb,Tp];function kp(d){let{escape:p}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},_=p?re.stringValue(d.name):d.name;const x=function Ag(d){let p=d.parent;for(;p&&!mc(p);)p=p.parent;return p}(d);if(x){const{facet:S}=x;for(const A of Zl)S[A]&&(_+=` + '__facet_${A}_' + (facet[${re.stringValue(x.vgField(A))}])`)}return _}function nh(d){return Dn(d.component.selection??{}).reduce((p,_)=>p||_.project.hasSelectionId,!1)}function zn(d,p){(re.isString(p.select)||!p.select.on)&&delete d.events,(re.isString(p.select)||!p.select.clear)&&delete d.clear,(re.isString(p.select)||!p.select.toggle)&&delete d.toggle}function rC(d){const p=[];return"Identifier"===d.type?[d.name]:"Literal"===d.type?[d.value]:("MemberExpression"===d.type&&(p.push(...rC(d.object)),p.push(...rC(d.property))),p)}function _x(d){return"MemberExpression"===d.object.type?_x(d.object):"datum"===d.object.name}function tl(d){const p=re.parseExpression(d),_=new Set;return p.visit(x=>{"MemberExpression"===x.type&&_x(x)&&_.add(rC(x).slice(1).join("."))}),_}class Cl extends Tn{clone(){return new Cl(null,this.model,st(this.filter))}constructor(p,_,x){super(p),this.model=_,this.filter=x,ln(this,"expr",void 0),ln(this,"_dependentFields",void 0),this.expr=aC(this.model,this.filter,this),this._dependentFields=tl(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function ib(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum";const S=re.isString(p)?p:p.param,A=hn(S),O=re.stringValue(A+Hd);let P;try{P=d.getSelectionComponent(A,S)}catch{return`!!${A}`}if(P.project.timeUnit){const se=_??d.component.data.raw,Ee=P.project.timeUnit.clone();se.parent?Ee.insertAsParentOf(se):se.parent=Ee}const G=`${P.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${O}, ${x}${"global"===P.resolve?")":`, ${re.stringValue(P.resolve)})`}`,ee=`length(data(${O}))`;return!1===p.empty?`${ee} && ${G}`:`!${ee} || ${G}`}function sC(d,p,_){const x=hn(p),S=_.encoding;let O,A=_.field;try{O=d.getSelectionComponent(x,p)}catch{return x}if(S||A){if(S&&!A){const P=O.project.items.filter(B=>B.channel===S);!P.length||P.length>1?(A=O.project.items[0].field,nt((P.length?"Multiple ":"No ")+`matching ${re.stringValue(S)} encoding found for selection ${re.stringValue(_.param)}. Using "field": ${re.stringValue(A)}.`)):A=P[0].field}}else A=O.project.items[0].field,O.project.items.length>1&&nt(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${re.stringValue(A)}.`);return`${O.name}[${re.stringValue(ci(A))}]`}function aC(d,p,_){return io(p,x=>re.isString(x)?x:function Km(d){return d?.param}(x)?ib(d,x,_):Zm(x))}function Ip(d,p,_,x){d.encode??={},d.encode[p]??={},d.encode[p].update??={},d.encode[p].update[_]=x}function rb(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1};const{disable:S,orient:A,scale:O,labelExpr:P,title:B,zindex:q,...G}=d.combine();if(!S){for(const ee in G){const se=$v[ee],Ee=G[ee];if(se&&se!==p&&"both"!==se)delete G[ee];else if(Xf(Ee)){const{condition:De,...Re}=Ee,Le=re.array(De),Ye=_A[ee];if(Ye){const{vgProp:bt,part:kn}=Ye;Ip(G,kn,bt,[...Le.map(vi=>{const{test:lr,...ca}=vi;return{test:aC(null,lr),...ca}}),Re]),delete G[ee]}else if(null===Ye){const bt={signal:Le.map(kn=>{const{test:dn,...vi}=kn;return`${aC(null,dn)} ? ${FM(vi)} : `}).join("")+FM(Re)};G[ee]=bt}}else if(Je(Ee)){const De=_A[ee];if(De){const{vgProp:Re,part:Le}=De;Ip(G,Le,Re,Ee),delete G[ee]}}St(["labelAlign","labelBaseline"],ee)&&null===G[ee]&&delete G[ee]}if("grid"===p){if(!G.grid)return;if(G.encode){const{grid:ee}=G.encode;G.encode={...ee?{grid:ee}:{}},Gt(G.encode)&&delete G.encode}return{scale:O,orient:A,...G,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:ui(q,0)}}{if(!x.header&&d.mainExtracted)return;if(void 0!==P){let se=P;G.encode?.labels?.update&&Je(G.encode.labels.update.text)&&(se=jo(P,"datum.label",G.encode.labels.update.text.signal)),Ip(G,"labels","text",{signal:se})}if(null===G.labelAlign&&delete G.labelAlign,G.encode){for(const se of yE)d.hasAxisPart(se)||delete G.encode[se];Gt(G.encode)&&delete G.encode}const ee=function lC(d,p){if(d)return re.isArray(d)&&!ds(d)?d.map(_=>lg(_,p)).join(", "):d}(B,_);return{scale:O,orient:A,grid:!1,...ee?{title:ee}:{},...G,...!1===_.aria?{aria:!1}:{},zindex:ui(q,0)}}}}function Tg(d){const{axes:p}=d.component,_=[];for(const x of Ql)if(p[x])for(const S of p[x])if(!S.get("disable")&&!S.get("gridScale")){const A="x"===x?"height":"width",O=d.getSizeSignalRef(A).signal;A!==O&&_.push({name:A,update:O})}return _}function yx(d,p,_,x){return Object.assign.apply(null,[{},...d.map(S=>{if("axisOrient"===S){const A="x"===_?"bottom":"left",O=p["x"===_?"axisBottom":"axisLeft"]||{},P=p["x"===_?"axisTop":"axisRight"]||{},B=new Set([...We(O),...We(P)]),q={};for(const G of B.values())q[G]={signal:`${x.signal} === "${A}" ? ${ec(O[G])} : ${ec(P[G])}`};return q}return p[S]})])}function uC(d,p){const _=[{}];for(const x of d){let S=p[x]?.style;if(S){S=re.array(S);for(const A of S)_.push(p.style[A])}}return Object.assign.apply(null,_)}function bx(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=PM(d,_,p);if(void 0!==S)return{configFrom:"style",configValue:S};for(const A of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==x[A]?.[d])return{configFrom:A,configValue:x[A][d]};return{}}const dC={scale:d=>{let{model:p,channel:_}=d;return p.scaleName(_)},format:d=>{let{format:p}=d;return p},formatType:d=>{let{formatType:p}=d;return p},grid:d=>{let{fieldOrDatumDef:p,axis:_,scaleType:x}=d;return _.grid??function pT(d,p){return!ko(d)&&dt(p)&&!sr(p?.bin)&&!oo(p?.bin)}(x,p)},gridScale:d=>{let{model:p,channel:_}=d;return function vx(d,p){const _="x"===p?"y":"x";if(d.getScaleComponent(_))return d.scaleName(_)}(p,_)},labelAlign:d=>{let{axis:p,labelAngle:_,orient:x,channel:S}=d;return p.labelAlign||fC(_,x,S)},labelAngle:d=>{let{labelAngle:p}=d;return p},labelBaseline:d=>{let{axis:p,labelAngle:_,orient:x,channel:S}=d;return p.labelBaseline||wx(_,x,S)},labelFlush:d=>{let{axis:p,fieldOrDatumDef:_,channel:x}=d;return p.labelFlush??function hC(d,p){if("x"===p&&St(["quantitative","temporal"],d))return!0}(_.type,x)},labelOverlap:d=>{let{axis:p,fieldOrDatumDef:_,scaleType:x}=d;return p.labelOverlap??function Ex(d,p,_,x){if(_&&!re.isObject(x)||"nominal"!==d&&"ordinal"!==d)return"log"!==p&&"symlog"!==p||"greedy"}(_.type,x,dt(_)&&!!_.timeUnit,dt(_)?_.sort:void 0)},orient:d=>{let{orient:p}=d;return p},tickCount:d=>{let{channel:p,model:_,axis:x,fieldOrDatumDef:S,scaleType:A}=d;const O="x"===p?"width":"y"===p?"height":void 0,P=O?_.getSizeSignalRef(O):void 0;return x.tickCount??function r3(d){let{fieldOrDatumDef:p,scaleType:_,size:x,values:S}=d;if(!S&&!ko(_)&&"log"!==_){if(dt(p)){if(sr(p.bin))return{signal:`ceil(${x.signal}/10)`};if(p.timeUnit&&St(["month","hours","day","quarter"],Fr(p.timeUnit)?.unit))return}return{signal:`ceil(${x.signal}/40)`}}}({fieldOrDatumDef:S,scaleType:A,size:P,values:x.values})},tickMinStep:function mC(d){let{format:p,fieldOrDatumDef:_}=d;if("d"===p)return 1;if(dt(_)){const{timeUnit:x}=_;if(x){const S=Lf(x);if(S)return{signal:S}}}},title:d=>{let{axis:p,model:_,channel:x}=d;if(void 0!==p.title)return p.title;const S=Op(_,x);if(void 0!==S)return S;const A=_.typedFieldDef(x),P=_.fieldDef("x"===x?"x2":"y2");return $M(A?[aa(A)]:[],dt(P)?[aa(P)]:[])},values:d=>{let{axis:p,fieldOrDatumDef:_}=d;return function mT(d,p){const _=d.values;return re.isArray(_)?gA(p,_):Je(_)?_:void 0}(p,_)},zindex:d=>{let{axis:p,fieldOrDatumDef:_,mark:x}=d;return p.zindex??function ih(d,p){return"rect"===d&&Fv(p)?1:0}(x,_)}};function ob(d){return`(((${d.signal} % 360) + 360) % 360)`}function wx(d,p,_,x){if(void 0!==d){if("x"===_){if(Je(d)){const S=ob(d);return{signal:`(45 < ${S} && ${S} < 135) || (225 < ${S} && ${S} < 315) ? "middle" :(${S} <= 45 || 315 <= ${S}) === ${Je(p)?`(${p.signal} === "top")`:"top"===p} ? "bottom" : "top"`}}return 45{if(sp(x)&&fE(x.sort)){const{field:A,timeUnit:O}=x,P=x.sort,B=P.map((q,G)=>`${Zm({field:A,timeUnit:O,equal:q})} ? ${G} : `).join("")+P.length;p=new Rp(p,{calculate:B,as:Np(x,S,{forAs:!0})})}}),p}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 ${kt(this.transform)}`}}function Np(d,p,_){return pt(d,{prefix:p,suffix:"sort_index",..._??{}})}function sb(d,p){return St(["top","bottom"],p)?"column":St(["left","right"],p)||"row"===d?"row":"column"}function kg(d,p,_,x){return ui((p||{})[d],("row"===x?_.headerRow:"column"===x?_.headerColumn:_.headerFacet)[d],_.header[d])}function Cx(d,p,_,x){const S={};for(const A of d){const O=kg(A,p||{},_,x);void 0!==O&&(S[A]=O)}return S}const gC=["row","column"],Sx=["header","footer"];function hR(d,p){const _=d.component.layoutHeaders[p].title,x=d.config?d.config:void 0,S=d.component.layoutHeaders[p].facetFieldDef?d.component.layoutHeaders[p].facetFieldDef:void 0,{titleAnchor:A,titleAngle:O,titleOrient:P}=Cx(["titleAnchor","titleAngle","titleOrient"],S.header,x,p),B=sb(p,P),q=$i(O);return{name:`${p}-title`,type:"group",role:`${B}-title`,title:{text:_,..."row"===p?{orient:"left"}:{},style:"guide-title",...yC(q,B),..._C(B,q,A),...Mx(x,S,p,xl,Ty)}}}function _C(d,p){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"middle"){case"start":return{align:"left"};case"end":return{align:"right"}}const x=fC(p,"row"===d?"left":"top","row"===d?"y":"x");return x?{align:x}:{}}function yC(d,p){const _=wx(d,"row"===p?"left":"top","row"===p?"y":"x",!0);return _?{baseline:_}:{}}function bC(d,p){const _=d.component.layoutHeaders[p],x=[];for(const S of Sx)if(_[S])for(const A of _[S]){const O=Dx(d,p,S,_,A);null!=O&&x.push(O)}return x}function gT(d,p){const{sort:_}=d;return sa(_)?{field:pt(_,{expr:"datum"}),order:_.order??"ascending"}:re.isArray(_)?{field:Np(d,p,{expr:"datum"}),order:"ascending"}:{field:pt(d,{expr:"datum"}),order:_??"ascending"}}function _T(d,p,_){const{format:x,formatType:S,labelAngle:A,labelAnchor:O,labelOrient:P,labelExpr:B}=Cx(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],d.header,_,p),q=Hc({fieldOrDatumDef:d,format:x,formatType:S,expr:"parent",config:_}).signal,G=sb(p,P);return{text:{signal:B?jo(jo(B,"datum.label",q),"datum.value",pt(d,{expr:"parent"})):q},..."row"===p?{orient:"left"}:{},style:"guide-label",frame:"group",...yC(A,G),..._C(G,A,O),...Mx(_,d,p,Kf,pp)}}function Dx(d,p,_,x,S){if(S){let A=null;const{facetFieldDef:O}=x,P=d.config?d.config:void 0;if(O&&S.labels){const{labelOrient:ee}=Cx(["labelOrient"],O.header,P,p);("row"===p&&!St(["top","bottom"],ee)||"column"===p&&!St(["left","right"],ee))&&(A=_T(O,p,P))}const B=mc(d)&&!og(d.facet),q=S.axes,G=q?.length>0;if(A||G){const ee="row"===p?"height":"width";return{name:d.getName(`${p}_${_}`),type:"group",role:`${p}-${_}`,...x.facetFieldDef?{from:{data:d.getName(`${p}_domain`)},sort:gT(O,p)}:{},...G&&B?{from:{data:d.getName(`facet_domain_${p}`)}}:{},...A?{title:A}:{},...S.sizeSignal?{encode:{update:{[ee]:S.sizeSignal}}}:{},...G?{axes:q}:{}}}}return null}const nl={column:{start:0,end:1},row:{start:1,end:0}};function ab(d,p){return nl[p][d]}function Mx(d,p,_,x,S){const A={};for(const O of x){if(!S[O])continue;const P=kg(O,p?.header,d,_);void 0!==P&&(A[S[O]]=P)}return A}function cb(d){return[...ub(d,"width"),...ub(d,"height"),...ub(d,"childWidth"),...ub(d,"childHeight")]}function ub(d,p){const _="width"===p?"x":"y",x=d.component.layoutSize.get(p);if(!x||"merged"===x)return[];const S=d.getSizeSignalRef(p).signal;if("step"===x){const A=d.getScaleComponent(_);if(A){const O=A.get("type"),P=A.get("range");if(ko(O)&&ht(P)){const B=d.scaleName(_);return mc(d.parent)&&"independent"===d.parent.component.resolve.scale[_]?[Fp(B,P)]:[Fp(B,P),{name:S,update:vC(B,A,`domain('${B}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==x){const A=S.endsWith("width"),O=A?"containerSize()[0]":"containerSize()[1]",B=`isFinite(${O}) ? ${O} : ${Aa(d.config.view,A?"width":"height")}`;return[{name:S,init:B,on:[{update:B,events:"window:resize"}]}]}return[{name:S,value:x}]}function Fp(d,p){const _=`${d}_step`;return Je(p.step)?{name:_,update:p.step.signal}:{name:_,value:p.step}}function vC(d,p,_){const x=p.get("type"),S=p.get("padding"),A=ui(p.get("paddingOuter"),S);let O=p.get("paddingInner");return O="band"===x?void 0!==O?O:S:1,`bandspace(${_}, ${ec(O)}, ${ec(A)}) * ${d}_step`}function yT(d){return"childWidth"===d?"width":"childHeight"===d?"height":d}function Ax(d,p){return We(d).reduce((_,x)=>({..._,...Sp(p,d[x],x,A=>Ar(A.value))}),{})}function o3(d,p){if(mc(p))return"theta"===d?"independent":"shared";if(Hg(p))return"shared";if(Gx(p))return Yr(d)||"theta"===d||"radius"===d?"independent":"shared";throw new Error("invalid model type for resolve")}function Ig(d,p){const _=d.scale[p],x=Yr(p)?"axis":"legend";return"independent"===_?("shared"===d[x][p]&&nt(function X$(d){return`Setting the scale to be independent for "${d}" means we also have to set the guide (axis or legend) to be independent.`}(p)),"independent"):d[x][p]||"shared"}const xC=We({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,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1});class Tx extends Za{}const db={symbols:function bT(d,p){let{fieldOrDatumDef:_,model:x,channel:S,legendCmpt:A,legendType:O}=p;if("symbol"!==O)return;const{markDef:P,encoding:B,config:q,mark:G}=x,ee=P.filled&&"trail"!==G;let se={...R2({},x,q2),...QE(x,{filled:ee})};const Ee=A.get("symbolOpacity")??q.legend.symbolOpacity,De=A.get("symbolFillColor")??q.legend.symbolFillColor,Re=A.get("symbolStrokeColor")??q.legend.symbolStrokeColor,Le=void 0===Ee?ue(B.opacity)??P.opacity:void 0;if(se.fill)if("fill"===S||ee&&S===be)delete se.fill;else if(se.fill.field)De?delete se.fill:(se.fill=Ar(q.legend.symbolBaseFillColor??"black"),se.fillOpacity=Ar(Le??1));else if(re.isArray(se.fill)){const Ye=Og(B.fill??B.color)??P.fill??(ee&&P.color);Ye&&(se.fill=Ar(Ye))}if(se.stroke)if("stroke"===S||!ee&&S===be)delete se.stroke;else if(se.stroke.field||Re)delete se.stroke;else if(re.isArray(se.stroke)){const Ye=ui(Og(B.stroke||B.color),P.stroke,ee?P.color:void 0);Ye&&(se.stroke={value:Ye})}if(S!==_e){const Ye=dt(_)&&EC(0,A,_);Ye?se.opacity=[{test:Ye,...Ar(Le??1)},Ar(q.legend.unselectedOpacity)]:Le&&(se.opacity=Ar(Le))}return se={...se,...d},Gt(se)?void 0:se},gradient:function Vn(d,p){let{model:_,legendType:x,legendCmpt:S}=p;if("gradient"!==x)return;const{config:A,markDef:O,encoding:P}=_;let B={};const G=void 0===(S.get("gradientOpacity")??A.legend.gradientOpacity)?ue(P.opacity)||O.opacity:void 0;return G&&(B.opacity=Ar(G)),B={...B,...d},Gt(B)?void 0:B},labels:function Ze(d,p){let{fieldOrDatumDef:_,model:x,channel:S,legendCmpt:A}=p;const O=x.legend(S)||{},P=x.config,B=dt(_)?EC(0,A,_):void 0,q=B?[{test:B,value:1},{value:P.legend.unselectedOpacity}]:void 0,{format:G,formatType:ee}=O;let se;Uc(ee)?se=Ns({fieldOrDatumDef:_,field:"datum.value",format:G,formatType:ee,config:P}):void 0===G&&void 0===ee&&P.customFormatTypes&&("quantitative"===_.type&&P.numberFormatType?se=Ns({fieldOrDatumDef:_,field:"datum.value",format:P.numberFormat,formatType:P.numberFormatType,config:P}):"temporal"===_.type&&P.timeFormatType&&dt(_)&&void 0===_.timeUnit&&(se=Ns({fieldOrDatumDef:_,field:"datum.value",format:P.timeFormat,formatType:P.timeFormatType,config:P})));const Ee={...q?{opacity:q}:{},...se?{text:se}:{},...d};return Gt(Ee)?void 0:Ee},entries:function fb(d,p){let{legendCmpt:_}=p;return _.get("selections")?.length?{...d,fill:{value:"transparent"}}:d}};function ue(d){return wC(d,(p,_)=>Math.max(p,_.value))}function Og(d){return wC(d,(p,_)=>ui(p,_.value))}function wC(d,p){return function bl(d){const p=d?.condition;return!!p&&(re.isArray(p)||Ma(p))}(d)?re.array(d.condition).reduce(p,d.value):Ma(d)?d.value:void 0}function EC(d,p,_){const x=p.get("selections");if(!x?.length)return;const S=re.stringValue(_.field);return x.map(A=>`(!length(data(${re.stringValue(hn(A)+Hd)})) || (${A}[${S}] && indexof(${A}[${S}], datum.value) >= 0))`).join(" || ")}const hb={direction:d=>{let{direction:p}=d;return p},format:d=>{let{fieldOrDatumDef:p,legend:_,config:x}=d;const{format:S,formatType:A}=_;return Hf(p,p.type,S,A,x,!1)},formatType:d=>{let{legend:p,fieldOrDatumDef:_,scaleType:x}=d;const{formatType:S}=p;return gy(S,_,x)},gradientLength:d=>{const{legend:p,legendConfig:_}=d;return p.gradientLength??_.gradientLength??function Ox(d){let{legendConfig:p,model:_,direction:x,orient:S,scaleType:A}=d;const{gradientHorizontalMaxLength:O,gradientHorizontalMinLength:P,gradientVerticalMaxLength:B,gradientVerticalMinLength:q}=p;if(Go(A))return"horizontal"===x?"top"===S||"bottom"===S?Rx(_,"width",P,O):P:Rx(_,"height",q,B)}(d)},labelOverlap:d=>{let{legend:p,legendConfig:_,scaleType:x}=d;return p.labelOverlap??_.labelOverlap??function Nx(d){if(St(["quantile","threshold","log","symlog"],d))return"greedy"}(x)},symbolType:d=>{let{legend:p,markDef:_,channel:x,encoding:S}=d;return p.symbolType??function kx(d,p,_,x){if("shape"!==p){const S=Og(_)??x;if(S)return S}switch(d){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"}}(_.type,x,S.shape,_.shape)},title:d=>{let{fieldOrDatumDef:p,config:_}=d;return cp(p,_,{allowDisabling:!0})},type:d=>{let{legendType:p,scaleType:_,channel:x}=d;if(Wh(x)&&Go(_)){if("gradient"===p)return}else if("symbol"===p)return;return p},values:d=>{let{fieldOrDatumDef:p,legend:_}=d;return function Rg(d,p){const _=d.values;return re.isArray(_)?gA(p,_):Je(_)?_:void 0}(_,p)}};function Pp(d){const{legend:p}=d;return ui(p.type,function Ix(d){let{channel:p,timeUnit:_,scaleType:x}=d;if(Wh(p)){if(St(["quarter","month","day"],_))return"symbol";if(Go(x))return"gradient"}return"symbol"}(d))}function Ng(d){let{legendConfig:p,legendType:_,orient:x,legend:S}=d;return S.direction??p[_?"gradientDirection":"symbolDirection"]??function Lp(d,p){switch(d){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===p?"horizontal":void 0}}(x,_)}function Rx(d,p,_,x){return{signal:`clamp(${d.getSizeSignalRef(p).signal}, ${_}, ${x})`}}function vT(d){const p=uo(d)?function CC(d){const{encoding:p}=d,_={};for(const x of[be,...Nd]){const S=Oo(p[x]);!S||!d.getScaleComponent(x)||x===ye&&dt(S)&&S.type===Sa||(_[x]=pR(d,x))}return _}(d):function mR(d){const{legends:p,resolve:_}=d.component;for(const x of d.children){vT(x);for(const S of We(x.component.legends))_.legend[S]=Ig(d.component.resolve,S),"shared"===_.legend[S]&&(p[S]=xT(p[S],x.component.legends[S]),p[S]||(_.legend[S]="independent",delete p[S]))}for(const x of We(p))for(const S of d.children)S.component.legends[x]&&"shared"===_.legend[x]&&delete S.component.legends[x];return p}(d);return d.component.legends=p,p}function SC(d,p,_,x){switch(p){case"disable":return void 0!==_;case"values":return!!_?.values;case"title":if("title"===p&&d===x?.title)return!0}return d===(_||{})[p]}function pR(d,p){let _=d.legend(p);const{markDef:x,encoding:S,config:A}=d,O=A.legend,P=new Tx({},function $p(d,p){const _=d.scaleName(p);if("trail"===d.mark){if("color"===p)return{stroke:_};if("size"===p)return{strokeWidth:_}}return"color"===p?d.markDef.filled?{fill:_}:{stroke:_}:{[p]:_}}(d,p));!function Mg(d,p,_){const x=d.fieldDef(p)?.field;for(const S of Dn(d.component.selection??{})){const A=S.project.hasField[x]??S.project.hasChannel[p];if(A&&cT.defined(S)){const O=_.get("selections")??[];O.push(S.name),_.set("selections",O,!1),A.hasLegend=!0}}}(d,p,P);const B=void 0!==_?!_:O.disable;if(P.set("disable",B,void 0!==_),B)return P;_=_||{};const q=d.getScaleComponent(p).get("type"),G=Oo(S[p]),ee=dt(G)?Fr(G.timeUnit)?.unit:void 0,se=_.orient||A.legend.orient||"right",Ee=Pp({legend:_,channel:p,timeUnit:ee,scaleType:q}),Re={legend:_,channel:p,model:d,markDef:x,encoding:S,fieldOrDatumDef:G,legendConfig:O,config:A,scaleType:q,orient:se,legendType:Ee,direction:Ng({legend:_,legendType:Ee,orient:se,legendConfig:O})};for(const dn of xC){if("gradient"===Ee&&dn.startsWith("symbol")||"symbol"===Ee&&dn.startsWith("gradient"))continue;const vi=dn in hb?hb[dn](Re):_[dn];if(void 0!==vi){const lr=SC(vi,dn,_,d.fieldDef(p));(lr||void 0===A.legend[dn])&&P.set(dn,vi,lr)}}const Le=_?.encoding??{},Ye=P.get("selections"),bt={},kn={fieldOrDatumDef:G,model:d,channel:p,legendCmpt:P,legendType:Ee};for(const dn of["labels","legend","title","symbols","gradient","entries"]){const vi=Ax(Le[dn]??{},d),lr=dn in db?db[dn](vi,kn):vi;void 0!==lr&&!Gt(lr)&&(bt[dn]={...Ye?.length&&dt(G)?{name:`${hn(G.field)}_legend_${dn}`}:{},...Ye?.length?{interactive:!!Ye}:{},update:lr})}return Gt(bt)||P.set("encode",bt,!!_?.encoding),P}function xT(d,p){if(!d)return p.clone();const _=d.getWithExplicit("orient"),x=p.getWithExplicit("orient");if(_.explicit&&x.explicit&&_.value!==x.value)return;let S=!1;for(const A of xC){const O=Qa(d.getWithExplicit(A),p.getWithExplicit(A),A,"legend",(P,B)=>{switch(A){case"symbolType":return DC(P,B);case"title":return BM(P,B);case"type":return S=!0,co("symbol")}return Pu(P,B,A,"legend")});d.setWithExplicit(A,O)}return S&&(d.implicit?.encode?.gradient&&xn(d.implicit,["encode","gradient"]),d.explicit?.encode?.gradient&&xn(d.explicit,["encode","gradient"])),d}function DC(d,p){return"circle"===p.value?p:d}function rh(d){const p=d.component.legends,_={};for(const S of We(p)){const O=Wn(d.getScaleComponent(S).get("domains"));if(_[O])for(const P of _[O])xT(P,p[S])||_[O].push(p[S]);else _[O]=[p[S].clone()]}return Dn(_).flat().map(S=>function qd(d,p){const{disable:_,labelExpr:x,selections:S,...A}=d.combine();if(!_){if(!1===p.aria&&null==A.aria&&(A.aria=!1),A.encode?.symbols){const O=A.encode.symbols.update;O.fill&&"transparent"!==O.fill.value&&!O.stroke&&!A.stroke&&(O.stroke={value:"transparent"});for(const P of Nd)A[P]&&delete O[P]}if(A.title||delete A.title,void 0!==x){let O=x;A.encode?.labels?.update&&Je(A.encode.labels.update.text)&&(O=jo(x,"datum.label",A.encode.labels.update.text.signal)),function wT(d,p,_,x){d.encode??={},d.encode[p]??={},d.encode[p].update??={},d.encode[p].update[_]=x}(A,"labels","text",{signal:O})}return A}}(S,d.config)).filter(S=>void 0!==S)}function pb(d){return Hg(d)||Gx(d)?function zs(d){return d.children.reduce((p,_)=>p.concat(_.assembleProjections()),mb(d))}(d):mb(d)}function mb(d){const p=d.component.projection;if(!p||p.merged)return[];const _=p.combine(),{name:x}=_;if(p.data){const S={signal:`[${p.size.map(O=>O.signal).join(", ")}]`},A=p.data.reduce((O,P)=>{const B=Je(P)?P.signal:`data('${d.lookupDataSource(P)}')`;return St(O,B)||O.push(B),O},[]);if(A.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:x,size:S,fit:{signal:A.length>1?`[${A.join(", ")}]`:A[0]},..._}]}return[{name:x,translate:{signal:"[width / 2, height / 2]"},..._}]}const Bp=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class zp extends Za{constructor(p,_,x,S){super({..._},{name:p}),this.specifiedProjection=_,this.size=x,this.data=S,ln(this,"merged",!1)}get isFit(){return!!this.data}}function Sl(d){d.component.projection=uo(d)?function Vp(d){if(d.hasProjection){const p=_o(d.specifiedProjection),_=!(p&&(null!=p.scale||null!=p.translate)),x=_?[d.getSizeSignalRef("width"),d.getSizeSignalRef("height")]:void 0,S=_?function Fg(d){const p=[],{encoding:_}=d;for(const x of[[Ho,It],[ae,wr]])(Oo(_[x[0]])||Oo(_[x[1]]))&&p.push({signal:d.getName(`geojson_${p.length}`)});return d.channelHasField(ye)&&d.typedFieldDef(ye).type===Sa&&p.push({signal:d.getName(`geojson_${p.length}`)}),0===p.length&&p.push(d.requestDataName(Vr.Main)),p}(d):void 0,A=new zp(d.projectionName(!0),{..._o(d.config.projection)??{},...p??{}},x,S);return A.get("type")||A.set("type","equalEarth",!1),A}}(d):function Px(d){if(0===d.children.length)return;let p;for(const x of d.children)Sl(x);const _=Ot(d.children,x=>{const S=x.component.projection;if(S){if(p){const A=function Fx(d,p){const _=Ot(Bp,S=>!!(!re.hasOwnProperty(d.explicit,S)&&!re.hasOwnProperty(p.explicit,S)||re.hasOwnProperty(d.explicit,S)&&re.hasOwnProperty(p.explicit,S)&&xr(d.get(S),p.get(S))));if(xr(d.size,p.size)){if(_)return d;if(xr(d.explicit,{}))return p;if(xr(p.explicit,{}))return d}return null}(p,S);return A&&(p=A),!!A}return p=S,!0}return!0});if(p&&_){const x=d.projectionName(!0),S=new zp(x,p.specifiedProjection,p.size,st(p.data));for(const A of d.children){const O=A.component.projection;O&&(O.isFit&&S.data.push(...A.component.projection.data),A.renameProjection(O.get("name"),x),O.merged=!0)}return S}}(d)}function Lx(d,p,_,x){if(kd(p,_)){const S=uo(d)?d.axis(_)??d.legend(_)??{}:{},A=pt(p,{expr:"datum"}),O=pt(p,{expr:"datum",binSuffix:"end"});return{formulaAs:pt(p,{binSuffix:"range",forAs:!0}),formula:ng(A,O,S.format,S.formatType,x)}}return{}}function $x(d,p){return`${Z_(d)}_${p}`}function jp(d,p,_){const S=$x(Ad(_,void 0)??{},p);return d.getName(`${S}_bins`)}function Pg(d,p,_){let x,S;x=function Zo(d){return"as"in d}(d)?re.isString(d.as)?[d.as,`${d.as}_end`]:[d.as[0],d.as[1]]:[pt(d,{forAs:!0}),pt(d,{binSuffix:"end",forAs:!0})];const A={...Ad(p,void 0)},O=$x(A,d.field),{signal:P,extentSignal:B}=function ET(d,p){return{signal:d.getName(`${p}_bins`),extentSignal:d.getName(`${p}_extent`)}}(_,O);if(Q_(A.extent)){const G=A.extent;S=sC(_,G.param,G),delete A.extent}return{key:O,binComponent:{bin:A,field:d.field,as:[x],...P?{signal:P}:{},...B?{extentSignal:B}:{},...S?{span:S}:{}}}}class il extends Tn{clone(){return new il(null,st(this.bins))}constructor(p,_){super(p),this.bins=_}static makeFromEncoding(p,_){const x=_.reduceFieldDef((S,A,O)=>{if(Yo(A)&&sr(A.bin)){const{key:P,binComponent:B}=Pg(A,A.bin,_);S[P]={...B,...S[P],...Lx(_,A,O,_.config)}}return S},{});return Gt(x)?null:new il(p,x)}static makeFromTransform(p,_,x){const{key:S,binComponent:A}=Pg(_,_.bin,x);return new il(p,{[S]:A})}merge(p,_){for(const x of We(p.bins))x in this.bins?(_(p.bins[x].signal,this.bins[x].signal),this.bins[x].as=Ci([...this.bins[x].as,...p.bins[x].as],kt)):this.bins[x]=p.bins[x];for(const x of p.children)p.removeChild(x),x.parent=this;p.remove()}producedFields(){return new Set(Dn(this.bins).map(p=>p.as).flat(2))}dependentFields(){return new Set(Dn(this.bins).map(p=>p.field))}hash(){return`Bin ${kt(this.bins)}`}assemble(){return Dn(this.bins).flatMap(p=>{const _=[],[x,...S]=p.as,{extent:A,...O}=p.bin,P={type:"bin",field:ci(p.field),as:x,signal:p.signal,...Q_(A)?{extent:null}:{extent:A},...p.span?{span:{signal:`span(${p.span})`}}:{},...O};!A&&p.extentSignal&&(_.push({type:"extent",field:ci(p.field),signal:p.extentSignal}),P.extent={signal:p.extentSignal}),_.push(P);for(const B of S)for(let q=0;q<2;q++)_.push({type:"formula",expr:pt({field:x[q]},{expr:"datum"}),as:B[q]});return p.formula&&_.push({type:"formula",expr:p.formula,as:p.formulaAs}),_})}}function fc(d,p,_,x){const S=uo(x)?x.encoding[Or(p)]:void 0;if(Yo(_)&&uo(x)&&vy(_,S,x.markDef,x.config)){d.add(pt(_,{})),d.add(pt(_,{suffix:"end"}));const{mark:A,markDef:O,config:P}=x,B=Tu({fieldDef:_,markDef:O,config:P});ip(A)&&.5!==B&&Yr(p)&&(d.add(pt(_,{suffix:Xc})),d.add(pt(_,{suffix:Vd}))),_.bin&&kd(_,p)&&d.add(pt(_,{binSuffix:"range"}))}else if(za(p)){const A=Mn(p);d.add(x.getName(A))}else d.add(pt(_));return sp(_)&&function Er(d){return re.isObject(d)&&"field"in d}(_.scale?.range)&&d.add(_.scale.range.field),d}class No extends Tn{clone(){return new No(null,new Set(this.dimensions),st(this.measures))}constructor(p,_,x){super(p),this.dimensions=_,this.measures=x}get groupBy(){return this.dimensions}static makeFromEncoding(p,_){let x=!1;_.forEachFieldDef(O=>{O.aggregate&&(x=!0)});const S={},A=new Set;return x&&(_.forEachFieldDef((O,P)=>{const{aggregate:B,field:q}=O;if(B)if("count"===B)S["*"]??={},S["*"].count=new Set([pt(O,{forAs:!0})]);else{if(bu(B)||Ua(B)){const G=bu(B)?"argmin":"argmax",ee=B[G];S[ee]??={},S[ee][G]=new Set([pt({op:G,field:ee},{forAs:!0})])}else S[q]??={},S[q][B]=new Set([pt(O,{forAs:!0})]);pd(P)&&"unaggregated"===_.scaleDomain(P)&&(S[q]??={},S[q].min=new Set([pt({field:q,aggregate:"min"},{forAs:!0})]),S[q].max=new Set([pt({field:q,aggregate:"max"},{forAs:!0})]))}else fc(A,P,O,_)}),A.size+We(S).length!==0)?new No(p,A,S):null}static makeFromTransform(p,_){const x=new Set,S={};for(const A of _.aggregate){const{op:O,field:P,as:B}=A;O&&("count"===O?(S["*"]??={},S["*"].count=new Set([B||pt(A,{forAs:!0})])):(S[P]??={},S[P][O]=new Set([B||pt(A,{forAs:!0})])))}for(const A of _.groupby??[])x.add(A);return x.size+We(S).length===0?null:new No(p,x,S)}merge(p){return no(this.dimensions,p.dimensions)?(function MC(d,p){for(const _ of We(p)){const x=p[_];for(const S of We(x))_ in d?d[_][S]=new Set([...d[_][S]??[],...x[S]]):d[_]={[S]:x[S]}}}(this.measures,p.measures),!0):(function U1(){Xm.debug(...arguments)}("different dimensions, cannot merge"),!1)}addDimensions(p){p.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...We(this.measures)])}producedFields(){const p=new Set;for(const _ of We(this.measures))for(const x of We(this.measures[_])){const S=this.measures[_][x];0===S.size?p.add(`${x}_${_}`):S.forEach(p.add,p)}return p}hash(){return`Aggregate ${kt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const p=[],_=[],x=[];for(const A of We(this.measures))for(const O of We(this.measures[A]))for(const P of this.measures[A][O])x.push(P),p.push(O),_.push("*"===A?null:ci(A));return{type:"aggregate",groupby:[...this.dimensions].map(ci),ops:p,fields:_,as:x}}}class oh extends Tn{constructor(p,_,x,S){super(p),this.model=_,this.name=x,this.data=S,ln(this,"column",void 0),ln(this,"row",void 0),ln(this,"facet",void 0),ln(this,"childModel",void 0);for(const A of Zl){const O=_.facet[A];if(O){const{bin:P,sort:B}=O;this[A]={name:_.getName(`${A}_domain`),fields:[pt(O),...sr(P)?[pt(O,{binSuffix:"end"})]:[]],...sa(B)?{sortField:B}:re.isArray(B)?{sortIndexField:Np(O,A)}:{}}}}this.childModel=_.child}hash(){let p="Facet";for(const _ of Zl)this[_]&&(p+=` ${_.charAt(0)}:${kt(this[_])}`);return p}get fields(){const p=[];for(const _ of Zl)this[_]?.fields&&p.push(...this[_].fields);return p}dependentFields(){const p=new Set(this.fields);for(const _ of Zl)this[_]&&(this[_].sortField&&p.add(this[_].sortField.field),this[_].sortIndexField&&p.add(this[_].sortIndexField));return p}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const p={};for(const _ of Ql){const x=this.childModel.component.scales[_];if(x&&!x.merged){const S=x.get("type"),A=x.get("range");if(ko(S)&&ht(A)){const P=NC(Wp(this.childModel,_));P?p[_]=P:nt(Tr(_))}}}return p}assembleRowColumnHeaderData(p,_,x){const S={row:"y",column:"x",facet:void 0}[p],A=[],O=[],P=[];S&&x&&x[S]&&(_?(A.push(`distinct_${x[S]}`),O.push("max")):(A.push(x[S]),O.push("distinct")),P.push(`distinct_${x[S]}`));const{sortField:B,sortIndexField:q}=this[p];if(B){const{op:G=ig,field:ee}=B;A.push(ee),O.push(G),P.push(pt(B,{forAs:!0}))}else q&&(A.push(q),O.push("max"),P.push(q));return{name:this[p].name,source:_??this.data,transform:[{type:"aggregate",groupby:this[p].fields,...A.length?{fields:A,ops:O,as:P}:{}}]}}assembleFacetHeaderData(p){const{columns:_}=this.model.layout,{layoutHeaders:x}=this.model.component,S=[],A={};for(const B of gC){for(const q of Sx){const G=(x[B]&&x[B][q])??[];for(const ee of G)if(ee.axes?.length>0){A[B]=!0;break}}if(A[B]){const q=`length(data("${this.facet.name}"))`;S.push({name:`${this.facet.name}_${B}`,transform:[{type:"sequence",start:0,stop:"row"===B?_?{signal:`ceil(${q} / ${_})`}:1:_?{signal:`min(${q}, ${_})`}:{signal:q}}]})}}const{row:O,column:P}=A;return(O||P)&&S.unshift(this.assembleRowColumnHeaderData("facet",null,p)),S}assemble(){const p=[];let _=null;const x=this.getChildIndependentFieldsWithStep(),{column:S,row:A,facet:O}=this;if(S&&A&&(x.x||x.y)){_=`cross_${this.column.name}_${this.row.name}`;const P=[].concat(x.x??[],x.y??[]),B=P.map(()=>"distinct");p.push({name:_,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:P,ops:B}]})}for(const P of[Xl,ea])this[P]&&p.push(this.assembleRowColumnHeaderData(P,_,x));if(O){const P=this.assembleFacetHeaderData(x);P&&p.push(...P)}return p}}function Bx(d){return d.startsWith("'")&&d.endsWith("'")||d.startsWith('"')&&d.endsWith('"')?d.slice(1,-1):d}function ST(d){const p={};return ot(d.filter,_=>{if(so(_)){let x=null;G1(_)?x=Ha(_.equal):Y1(_)?x=Ha(_.lte):X1(_)?x=Ha(_.lt):ar(_)?x=Ha(_.gt):xv(_)?x=Ha(_.gte):qe(_)?x=_.range[0]:bi(_)&&(x=(_.oneOf??_.in)[0]),x&&(_d(x)?p[_.field]="date":re.isNumber(x)?p[_.field]="number":re.isString(x)&&(p[_.field]="string")),_.timeUnit&&(p[_.field]="date")}}),p}function DT(d){const p={};function _(x){up(x)?p[x.field]="date":"quantitative"===x.type&&function pe(d){return re.isString(d)&&St(["min","max"],d)}(x.aggregate)?p[x.field]="number":ro(x.field)>1?x.field in p||(p[x.field]="flatten"):sp(x)&&sa(x.sort)&&ro(x.sort.field)>1&&(x.sort.field in p||(p[x.sort.field]="flatten"))}if((uo(d)||mc(d))&&d.forEachFieldDef((x,S)=>{if(Yo(x))_(x);else{const A=Fc(S),O=d.fieldDef(A);_({...x,type:O.type})}}),uo(d)){const{mark:x,markDef:S,encoding:A}=d;if(yl(x)&&!d.encoding.order){const P=A["horizontal"===S.orient?"y":"x"];dt(P)&&"quantitative"===P.type&&!(P.field in p)&&(p[P.field]="number")}}return p}class ys extends Tn{clone(){return new ys(null,st(this._parse))}constructor(p,_){super(p),ln(this,"_parse",void 0),this._parse=_}hash(){return`Parse ${kt(this._parse)}`}static makeExplicit(p,_,x){let S={};const A=_.data;return!Jf(A)&&A?.format?.parse&&(S=A.format.parse),this.makeWithAncestors(p,S,{},x)}static makeWithAncestors(p,_,x,S){for(const P of We(x)){const B=S.getWithExplicit(P);void 0!==B.value&&(B.explicit||B.value===x[P]||"derived"===B.value||"flatten"===x[P]?delete x[P]:nt(Wm(P,x[P],B.value)))}for(const P of We(_)){const B=S.get(P);void 0!==B&&(B===_[P]?delete _[P]:nt(Wm(P,_[P],B)))}const A=new Za(_,x);S.copyAll(A);const O={};for(const P of We(A.combine())){const B=A.get(P);null!==B&&(O[P]=B)}return 0===We(O).length||S.parseNothing?null:new ys(p,O)}get parse(){return this._parse}merge(p){this._parse={...this._parse,...p.parse},p.remove()}assembleFormatParse(){const p={};for(const _ of We(this._parse)){const x=this._parse[_];1===ro(_)&&(p[_]=x)}return p}producedFields(){return new Set(We(this._parse))}dependentFields(){return new Set(We(this._parse))}assembleTransforms(){let p=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return We(this._parse).filter(_=>!p||ro(_)>1).map(_=>{const x=function CT(d,p){const _=Js(d);return"number"===p?`toNumber(${_})`:"boolean"===p?`toBoolean(${_})`:"string"===p?`toString(${_})`:"date"===p?`toDate(${_})`:"flatten"===p?_:p.startsWith("date:")?`timeParse(${_},'${Bx(p.slice(5,p.length))}')`:p.startsWith("utc:")?`utcParse(${_},'${Bx(p.slice(4,p.length))}')`:(nt(function Kr(d){return`Unrecognized parse "${d}".`}(p)),null)}(_,this._parse[_]);return x?{type:"formula",expr:x,as:Si(_)}:null}).filter(_=>null!==_)}}class sh extends Tn{clone(){return new sh(null)}constructor(p){super(p)}dependentFields(){return new Set}producedFields(){return new Set([Ya])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Ya}}}class Gd extends Tn{clone(){return new Gd(null,this.params)}constructor(p,_){super(p),this.params=_}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${kt(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class Up extends Tn{clone(){return new Up(null,this.params)}constructor(p,_){super(p),this.params=_}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${kt(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class Xd extends Tn{constructor(p){let _;if(super(null),ln(this,"_data",void 0),ln(this,"_name",void 0),ln(this,"_generator",void 0),p??={name:"source"},Jf(p)||(_=p.format?{...yt(p.format,["parse"])}:{}),Wy(p))this._data={values:p.values};else if(ka(p)){if(this._data={url:p.url},!_.type){let x=/(?:\.([^.]+))?$/.exec(p.url)[1];St(["json","csv","tsv","dsv","topojson"],x)||(x="json"),_.type=x}}else Ja(p)?this._data={values:[{type:"Sphere"}]}:(ZA(p)||Jf(p))&&(this._data={});this._generator=Jf(p),p.name&&(this._name=p.name),_&&!Gt(_)&&(this._data.format=_)}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(p){this._name=p}set parent(p){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:[]}}}function Lg(d){return d instanceof Xd||d instanceof Gd||d instanceof Up}var $g=new WeakMap;class Yn{constructor(){ia(this,$g,{writable:!0,value:void 0}),fs(this,$g,!1)}setModified(){fs(this,$g,!0)}get modifiedFlag(){return function Vt(d,p){return function Wo(d,p){return p.get?p.get.call(d):p.value}(d,Jn(d,p,"get"))}(this,$g)}}class ah extends Yn{getNodeDepths(p,_,x){x.set(p,_);for(const S of p.children)this.getNodeDepths(S,_+1,x);return x}optimize(p){const x=[...this.getNodeDepths(p,0,new Map).entries()].sort((S,A)=>A[1]-S[1]);for(const S of x)this.run(S[0]);return this.modifiedFlag}}class Kc extends Yn{optimize(p){this.run(p);for(const _ of p.children)this.optimize(_);return this.modifiedFlag}}class AC extends Kc{mergeNodes(p,_){const x=_.shift();for(const S of _)p.removeChild(S),S.parent=x,S.remove()}run(p){const _=p.children.map(S=>S.hash()),x={};for(let S=0;S<_.length;S++)void 0===x[_[S]]?x[_[S]]=[p.children[S]]:x[_[S]].push(p.children[S]);for(const S of We(x))x[S].length>1&&(this.setModified(),this.mergeNodes(p,x[S]))}}class gb extends Kc{constructor(p){super(),ln(this,"requiresSelectionId",void 0),this.requiresSelectionId=p&&nh(p)}run(p){p instanceof sh&&(this.requiresSelectionId&&(Lg(p.parent)||p.parent instanceof No||p.parent instanceof ys)||(this.setModified(),p.remove()))}}class TC extends Yn{optimize(p){return this.run(p,new Set),this.modifiedFlag}run(p,_){let x=new Set;p instanceof el&&(x=p.producedFields(),Qi(x,_)&&(this.setModified(),p.removeFormulas(_),0===p.producedFields.length&&p.remove()));for(const S of p.children)this.run(S,new Set([..._,...x]))}}class MT extends Kc{constructor(){super()}run(p){p instanceof jr&&!p.isRequired()&&(this.setModified(),p.remove())}}class AT extends ah{run(p){if(!(Lg(p)||p.numChildren()>1))for(const _ of p.children)if(_ instanceof ys)if(p instanceof ys)this.setModified(),p.merge(_);else{if(Oi(p.producedFields(),_.dependentFields()))continue;this.setModified(),_.swapWithParent()}}}class TT extends ah{run(p){const _=[...p.children],x=p.children.filter(S=>S instanceof ys);if(p.numChildren()>1&&x.length>=1){const S={},A=new Set;for(const O of x){const P=O.parse;for(const B of We(P))B in S?S[B]!==P[B]&&A.add(B):S[B]=P[B]}for(const O of A)delete S[O];if(!Gt(S)){this.setModified();const O=new ys(p,S);for(const P of _){if(P instanceof ys)for(const B of We(S))delete P.parse[B];p.removeChild(P),P.parent=O,P instanceof ys&&0===We(P.parse).length&&P.remove()}}}}}class kT extends ah{run(p){p instanceof jr||p.numChildren()>0||p instanceof oh||p instanceof Xd||(this.setModified(),p.remove())}}class IT extends ah{run(p){const _=p.children.filter(S=>S instanceof el),x=_.pop();for(const S of _)this.setModified(),x.merge(S)}}class Vx extends ah{run(p){const _=p.children.filter(S=>S instanceof No),x={};for(const S of _){const A=kt(S.groupBy);A in x||(x[A]=[]),x[A].push(S)}for(const S of We(x)){const A=x[S];if(A.length>1){const O=A.pop();for(const P of A)O.merge(P)&&(p.removeChild(P),P.parent=O,P.remove(),this.setModified())}}}}class _b extends ah{constructor(p){super(),this.model=p}run(p){const _=!(Lg(p)||p instanceof Cl||p instanceof ys||p instanceof sh),x=[],S=[];for(const A of p.children)A instanceof il&&(_&&!Oi(p.producedFields(),A.dependentFields())?x.push(A):S.push(A));if(x.length>0){const A=x.pop();for(const O of x)A.merge(O,this.model.renameSignal.bind(this.model));this.setModified(),p instanceof il?p.merge(A,this.model.renameSignal.bind(this.model)):A.swapWithParent()}if(S.length>1){const A=S.pop();for(const O of S)A.merge(O,this.model.renameSignal.bind(this.model));this.setModified()}}}class Bg extends ah{run(p){const _=[...p.children];if(!li(_,O=>O instanceof jr)||p.numChildren()<=1)return;const S=[];let A;for(const O of _)if(O instanceof jr){let P=O;for(;1===P.numChildren();){const[B]=P.children;if(!(B instanceof jr))break;P=B}S.push(...P.children),A?(p.removeChild(O),O.parent=A.parent,A.parent.removeChild(A),A.parent=P,this.setModified()):A=P}else S.push(O);if(S.length){this.setModified();for(const O of S)O.parent.removeChild(O),O.parent=A}}}class zu extends Tn{clone(){return new zu(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci(this.transform.groupby.concat(p),_=>_)}dependentFields(){const p=new Set;return this.transform.groupby&&this.transform.groupby.forEach(p.add,p),this.transform.joinaggregate.map(_=>_.field).filter(_=>void 0!==_).forEach(p.add,p),p}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(p){return p.as??pt(p)}hash(){return`JoinAggregateTransform ${kt(this.transform)}`}assemble(){const p=[],_=[],x=[];for(const A of this.transform.joinaggregate)_.push(A.op),x.push(this.getDefaultName(A)),p.push(void 0===A.field?null:A.field);const S=this.transform.groupby;return{type:"joinaggregate",as:x,ops:_,fields:p,...void 0!==S?{groupby:S}:{}}}}class Yd extends Tn{clone(){return new Yd(null,st(this._stack))}constructor(p,_){super(p),ln(this,"_stack",void 0),this._stack=_}static makeFromTransform(p,_){const{stack:x,groupby:S,as:A,offset:O="zero"}=_,P=[],B=[];if(void 0!==_.sort)for(const ee of _.sort)P.push(ee.field),B.push(ui(ee.order,"ascending"));const q={field:P,order:B};let G;return G=function kC(d){return re.isArray(d)&&d.every(p=>re.isString(p))&&d.length>1}(A)?A:re.isString(A)?[A,`${A}_end`]:[`${_.stack}_start`,`${_.stack}_end`],new Yd(p,{dimensionFieldDefs:[],stackField:x,groupby:S,offset:O,sort:q,facetby:[],as:G})}static makeFromEncoding(p,_){const x=_.stack,{encoding:S}=_;if(!x)return null;const{groupbyChannels:A,fieldChannel:O,offset:P,impute:B}=x,q=A.map(Ee=>ku(S[Ee])).filter(Ee=>!!Ee),G=function Qo(d){return d.stack.stackBy.reduce((p,_)=>{const S=pt(_.fieldDef);return S&&p.push(S),p},[])}(_),ee=_.encoding.order;let se;if(re.isArray(ee)||dt(ee))se=LM(ee);else{const Ee=Rv(ee)?ee.sort:"y"===O?"descending":"ascending";se=G.reduce((De,Re)=>(De.field.push(Re),De.order.push(Ee),De),{field:[],order:[]})}return new Yd(p,{dimensionFieldDefs:q,stackField:_.vgField(O),facetby:[],stackby:G,sort:se,offset:P,impute:B,as:[_.vgField(O,{suffix:"start",forAs:!0}),_.vgField(O,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(p){this._stack.facetby.push(...p)}dependentFields(){const p=new Set;return p.add(this._stack.stackField),this.getGroupbyFields().forEach(p.add,p),this._stack.facetby.forEach(p.add,p),this._stack.sort.field.forEach(p.add,p),p}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${kt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:p,impute:_,groupby:x}=this._stack;return p.length>0?p.map(S=>S.bin?_?[pt(S,{binSuffix:"mid"})]:[pt(S,{}),pt(S,{binSuffix:"end"})]:[pt(S)]).flat():x??[]}assemble(){const p=[],{facetby:_,dimensionFieldDefs:x,stackField:S,stackby:A,sort:O,offset:P,impute:B,as:q}=this._stack;if(B)for(const G of x){const{bandPosition:ee=.5,bin:se}=G;if(se){const Ee=pt(G,{expr:"datum"}),De=pt(G,{expr:"datum",binSuffix:"end"});p.push({type:"formula",expr:`${ee}*${Ee}+${1-ee}*${De}`,as:pt(G,{binSuffix:"mid",forAs:!0})})}p.push({type:"impute",field:S,groupby:[...A,..._],key:pt(G,{binSuffix:"mid"}),method:"value",value:0})}return p.push({type:"stack",groupby:[...this.getGroupbyFields(),..._],field:S,sort:O,as:q,offset:P}),p}}class zg extends Tn{clone(){return new zg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci(this.transform.groupby.concat(p),_=>_)}dependentFields(){const p=new Set;return(this.transform.groupby??[]).forEach(p.add,p),(this.transform.sort??[]).forEach(_=>p.add(_.field)),this.transform.window.map(_=>_.field).filter(_=>void 0!==_).forEach(p.add,p),p}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(p){return p.as??pt(p)}hash(){return`WindowTransform ${kt(this.transform)}`}assemble(){const p=[],_=[],x=[],S=[];for(const ee of this.transform.window)_.push(ee.op),x.push(this.getDefaultName(ee)),S.push(void 0===ee.param?null:ee.param),p.push(void 0===ee.field?null:ee.field);const A=this.transform.frame,O=this.transform.groupby;if(A&&null===A[0]&&null===A[1]&&_.every(ee=>K_(ee)))return{type:"joinaggregate",as:x,ops:_,fields:p,...void 0!==O?{groupby:O}:{}};const P=[],B=[];if(void 0!==this.transform.sort)for(const ee of this.transform.sort)P.push(ee.field),B.push(ee.order??"ascending");const G=this.transform.ignorePeers;return{type:"window",params:S,as:x,ops:_,fields:p,sort:{field:P,order:B},...void 0!==G?{ignorePeers:G}:{},...void 0!==O?{groupby:O}:{},...void 0!==A?{frame:A}:{}}}}function IC(d){if(d instanceof oh)if(1!==d.numChildren()||d.children[0]instanceof jr){const p=d.model.component.data.main;OT(p);const _=function gR(d){return function p(_){if(!(_ instanceof oh)){const x=_.clone();if(x instanceof jr){const S=Hp+x.getSource();x.setSource(S),d.model.component.data.outputNodes[S]=x}else(x instanceof No||x instanceof Yd||x instanceof zg||x instanceof zu)&&x.addDimensions(d.fields);for(const S of _.children.flatMap(p))S.parent=x;return[x]}return _.children.flatMap(p)}}(d),x=d.children.map(_).flat();for(const S of x)S.parent=p}else{const p=d.children[0];(p instanceof No||p instanceof Yd||p instanceof zg||p instanceof zu)&&p.addDimensions(d.fields),p.swapWithParent(),IC(d)}else d.children.map(IC)}function OT(d){if(d instanceof jr&&d.type===Vr.Main&&1===d.numChildren()){const p=d.children[0];p instanceof oh||(p.swapWithParent(),OT(d))}}const Hp="scale_",Vg=5;function jg(d){for(const p of d){for(const _ of p.children)if(_.parent!==p)return!1;if(!jg(p.children))return!1}return!0}function Vu(d,p){let _=!1;for(const x of p)_=d.optimize(x)||_;return _}function RT(d,p,_){let x=d.sources,S=!1;return S=Vu(new MT,x)||S,S=Vu(new gb(p),x)||S,x=x.filter(A=>A.numChildren()>0),S=Vu(new kT,x)||S,x=x.filter(A=>A.numChildren()>0),_||(S=Vu(new AT,x)||S,S=Vu(new _b(p),x)||S,S=Vu(new TC,x)||S,S=Vu(new TT,x)||S,S=Vu(new Vx,x)||S,S=Vu(new IT,x)||S,S=Vu(new AC,x)||S,S=Vu(new Bg,x)||S),d.sources=x,S}class bs{constructor(p){ln(this,"signal",void 0),Object.defineProperty(this,"signal",{enumerable:!0,get:p})}static fromName(p,_){return new bs(()=>p(_))}}function NT(d){uo(d)?function OC(d){const p=d.component.scales;for(const _ of We(p)){const x=FT(d,_);if(p[_].setWithExplicit("domains",x),s3(d,_),d.component.data.isFaceted){let A=d;for(;!mc(A)&&A.parent;)A=A.parent;if("shared"===A.component.resolve.scale[_])for(const P of x.value)vu(P)&&(P.data=Hp+P.data.replace(Hp,""))}}}(d):function RC(d){for(const _ of d.children)NT(_);const p=d.component.scales;for(const _ of We(p)){let x,S=null;for(const A of d.children){const O=A.component.scales[_];if(O){x=void 0===x?O.getWithExplicit("domains"):Qa(x,O.getWithExplicit("domains"),"domains","scale",yb);const P=O.get("selectionExtent");S&&P&&S.param!==P.param&&nt(wu),S=P}}p[_].setWithExplicit("domains",x),S&&p[_].set("selectionExtent",S,!0)}}(d)}function FT(d,p){const _=d.getScaleComponent(p).get("type"),{encoding:x}=d,S=function Kd(d,p,_,x){if("unaggregated"===d){const{valid:S,reason:A}=PT(p,_);if(!S)return void nt(A)}else if(void 0===d&&x.useUnaggregatedDomain){const{valid:S}=PT(p,_);if(S)return"unaggregated"}return d}(d.scaleDomain(p),d.typedFieldDef(p),_,d.config.scale);return S!==d.scaleDomain(p)&&(d.specifiedScales[p]={...d.specifiedScales[p],domain:S}),"x"===p&&Oo(x.x2)?Oo(x.x)?Qa(ju(_,S,d,"x"),ju(_,S,d,"x2"),"domain","scale",yb):ju(_,S,d,"x2"):"y"===p&&Oo(x.y2)?Oo(x.y)?Qa(ju(_,S,d,"y"),ju(_,S,d,"y2"),"domain","scale",yb):ju(_,S,d,"y2"):ju(_,S,d,p)}function cn(d,p,_){const x=Fr(_)?.unit;return"temporal"===p||x?function jx(d,p,_){return d.map(x=>({signal:`{data: ${Td(x,{timeUnit:_,type:p})}}`}))}(d,p,x):[d]}function ju(d,p,_,x){const{encoding:S,markDef:A,mark:O,config:P,stack:B}=_,q=Oo(S[x]),{type:G}=q,ee=q.timeUnit;if(function tp(d){return d?.unionWith}(p)){const De=ju(d,void 0,_,x);return Ls([...cn(p.unionWith,G,ee),...De.value])}if(Je(p))return Ls([p]);if(p&&"unaggregated"!==p&&!Xo(p))return Ls(cn(p,G,ee));if(B&&x===B.fieldChannel){if("normalize"===B.offset)return co([[0,1]]);const De=_.requestDataName(Vr.Main);return co([{data:De,field:_.vgField(x,{suffix:"start"})},{data:De,field:_.vgField(x,{suffix:"end"})}])}const se=pd(x)&&dt(q)?function Bt(d,p,_){if(!ko(_))return;const x=d.fieldDef(p),S=x.sort;if(fE(S))return{op:"min",field:Np(x,p),order:"ascending"};const{stack:A}=d,O=A?new Set([...A.groupbyFields,...A.stackBy.map(P=>P.fieldDef.field)]):void 0;if(sa(S))return Ux(S,A&&!O.has(S.field));if(dE(S)){const{encoding:P,order:B}=S,q=d.fieldDef(P),{aggregate:G,field:ee}=q,se=A&&!O.has(ee);if(bu(G)||Ua(G))return Ux({field:pt(q),order:B},se);if(K_(G)||!G)return Ux({op:G,field:ee,order:B},se)}else{if("descending"===S)return{op:"min",field:d.vgField(p),order:"descending"};if(St(["ascending",void 0],S))return!0}}(_,x,d):void 0;if(Sd(q))return co(cn([q.datum],G,ee));const Ee=q;if("unaggregated"===p){const De=_.requestDataName(Vr.Main),{field:Re}=q;return co([{data:De,field:pt({field:Re,aggregate:"min"})},{data:De,field:pt({field:Re,aggregate:"max"})}])}if(sr(Ee.bin)){if(ko(d))return co("bin-ordinal"===d?[]:[{data:Hi(se)?_.requestDataName(Vr.Main):_.requestDataName(Vr.Raw),field:_.vgField(x,kd(Ee,x)?{binSuffix:"range"}:{}),sort:!0!==se&&re.isObject(se)?se:{field:_.vgField(x,{}),op:"min"}}]);{const{bin:De}=Ee;if(sr(De)){const Re=jp(_,Ee.field,De);return co([new bs(()=>{const Le=_.getSignalName(Re);return`[${Le}.start, ${Le}.stop]`})])}return co([{data:_.requestDataName(Vr.Main),field:_.vgField(x,{})}])}}if(Ee.timeUnit&&St(["time","utc"],d)){const De=S[Or(x)];if(vy(Ee,De,A,P)){const Re=_.requestDataName(Vr.Main),Le=Tu({fieldDef:Ee,fieldDef2:De,markDef:A,config:P}),Ye=ip(O)&&.5!==Le&&Yr(x);return co([{data:Re,field:_.vgField(x,Ye?{suffix:Xc}:{})},{data:Re,field:_.vgField(x,{suffix:Ye?Vd:"end"})}])}}return co(se?[{data:Hi(se)?_.requestDataName(Vr.Main):_.requestDataName(Vr.Raw),field:_.vgField(x),sort:se}]:[{data:_.requestDataName(Vr.Main),field:_.vgField(x)}])}function Ux(d,p){const{op:_,field:x,order:S}=d;return{op:_??(p?"sum":ig),...x?{field:ci(x)}:{},...S?{order:S}:{}}}function s3(d,p){const _=d.component.scales[p],x=d.specifiedScales[p].domain,S=d.fieldDef(p)?.bin,A=Xo(x)&&x,O=Lc(S)&&Q_(S.extent)&&S.extent;(A||O)&&_.set("selectionExtent",A??O,!0)}function PT(d,p){const{aggregate:_,type:x}=d;return _?re.isString(_)&&!Xe.has(_)?{valid:!1,reason:fv(_)}:"quantitative"===x&&"log"===p?{valid:!1,reason:qM(d)}:{valid:!0}:{valid:!1,reason:WM(d)}}function yb(d,p,_,x){return d.explicit&&p.explicit&&nt(function G$(d,p,_,x){return`Conflicting ${p.toString()} property "${d.toString()}" (${Wn(_)} and ${Wn(x)}). Using the union of the two domains.`}(_,x,d.value,p.value)),{explicit:d.explicit,value:[...d.value,...p.value]}}function LT(d){const p=Ci(d.map(O=>{if(vu(O)){const{sort:P,...B}=O;return B}return O}),kt),_=Ci(d.map(O=>{if(vu(O)){const P=O.sort;return void 0!==P&&!Hi(P)&&("op"in P&&"count"===P.op&&delete P.field,"ascending"===P.order&&delete P.order),P}}).filter(O=>void 0!==O),kt);if(0===p.length)return;if(1===p.length){const O=d[0];if(vu(O)&&_.length>0){let P=_[0];if(_.length>1){nt(P2);const B=_.filter(q=>re.isObject(q)&&"op"in q&&"min"!==q.op);P=!_.every(q=>re.isObject(q)&&"op"in q)||1!==B.length||B[0]}else re.isObject(P)&&"field"in P&&O.field===P.field&&(P=!P.order||{order:P.order});return{...O,sort:P}}return O}const x=Ci(_.map(O=>Hi(O)||!("op"in O)||re.isString(O.op)&&O.op in nv?O:(nt(function Y$(d){return`Dropping sort property ${Wn(d)} as unioned domains only support boolean or op "count", "min", and "max".`}(O)),!0)),kt);let S;1===x.length?S=x[0]:x.length>1&&(nt(P2),S=!0);const A=Ci(d.map(O=>vu(O)?O.data:null),O=>O);return 1===A.length&&null!==A[0]?{data:A[0],fields:p.map(P=>P.field),...S?{sort:S}:{}}:{fields:p,...S?{sort:S}:{}}}function NC(d){if(vu(d)&&re.isString(d.field))return d.field;if(function IM(d){return!re.isArray(d)&&"fields"in d&&!("data"in d)}(d)){let p;for(const _ of d.fields)if(vu(_)&&re.isString(_.field))if(p){if(p!==_.field)return nt("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."),p}else p=_.field;return nt("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."),p}if(function Ni(d){return!re.isArray(d)&&"fields"in d&&"data"in d}(d)){nt("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 p=d.fields[0];return re.isString(p)?p:void 0}}function Wp(d,p){return LT(d.component.scales[p].get("domains").map(S=>(vu(S)&&(S.data=d.lookupDataSource(S.data)),S)))}function FC(d){return Hg(d)||Gx(d)?d.children.reduce((p,_)=>p.concat(FC(_)),PC(d)):PC(d)}function PC(d){return We(d.component.scales).reduce((p,_)=>{const x=d.component.scales[_];if(x.merged)return p;const S=x.combine(),{name:A,type:O,selectionExtent:P,domains:B,range:q,reverse:G,...ee}=S,se=function LC(d,p,_,x){if(Yr(_)){if(ht(d))return{step:{signal:`${p}_step`}}}else if(re.isObject(d)&&vu(d))return{...d,data:x.lookupDataSource(d.data)};return d}(S.range,A,_,d),Ee=Wp(d,_),De=P?function qE(d,p,_,x){const S=sC(d,p.param,p);return{signal:Da(_.get("type"))&&re.isArray(x)&&x[0]>x[1]?`isValid(${S}) && reverse(${S})`:S}}(d,P,x,Ee):null;return p.push({name:A,type:O,...Ee?{domain:Ee}:{},...De?{domainRaw:De}:{},range:se,...void 0!==G?{reverse:G}:{},...ee}),p},[])}class $T extends Za{constructor(p,_){super({},{name:p}),ln(this,"merged",!1),this.setWithExplicit("type",_)}domainDefinitelyIncludesZero(){return!1!==this.get("zero")||li(this.get("domains"),p=>re.isArray(p)&&2===p.length&&re.isNumber(p[0])&&p[0]<=0&&re.isNumber(p[1])&&p[1]>=0)}}const yR=["range","scheme"];function Hx(d,p){const _=d.fieldDef(p);if(_?.bin){const{bin:x,field:S}=_,A=Mr(p),O=d.getName(A);if(re.isObject(x)&&x.binned&&void 0!==x.step)return new bs(()=>{const P=d.scaleName(p),B=`(domain("${P}")[1] - domain("${P}")[0]) / ${x.step}`;return`${d.getSignalName(O)} / (${B})`});if(sr(x)){const P=jp(d,S,x);return new bs(()=>{const B=d.getSignalName(P),q=`(${B}.stop - ${B}.start) / ${B}.step`;return`${d.getSignalName(O)} / (${q})`})}}}function BT(d,p){const _=p.specifiedScales[d],{size:x}=p,A=p.getScaleComponent(d).get("type");for(const ee of yR)if(void 0!==_[ee]){const se=Qm(A,ee),Ee=fy(d,ee);if(se)if(Ee)nt(Ee);else switch(ee){case"range":{const De=_.range;if(re.isArray(De)){if(Yr(d))return Ls(De.map(Re=>{if("width"===Re||"height"===Re){const Le=p.getName(Re),Ye=p.getSignalName.bind(p);return bs.fromName(Ye,Le)}return Re}))}else if(re.isObject(De))return Ls({data:p.requestDataName(Vr.Main),field:De.field,sort:{op:"min",field:p.vgField(d)}});return Ls(De)}case"scheme":return Ls(Wx(_[ee]))}else nt(z1(A,ee,d))}const O=d===Ri||"xOffset"===d?"width":"height",P=x[O];if(Fd(P))if(Yr(d))if(ko(A)){const ee=hc(P,p,d);if(ee)return Ls({step:ee})}else nt(GM(O));else if(us(d)&&"band"===p.getScaleComponent(d===Yl?"x":"y").get("type")){const De=qp(P,A);if(De)return Ls(De)}const{rangeMin:B,rangeMax:q}=_,G=function $C(d,p){const{size:_,config:x,mark:S,encoding:A}=p,{type:O}=Oo(A[d]),B=p.getScaleComponent(d).get("type"),{domain:q,domainMid:G}=p.specifiedScales[d];switch(d){case Ri:case mo:if(St(["point","band"],B)){const ee=qx(d,_,x.view);if(Fd(ee))return{step:hc(ee,p,d)}}return bb(d,p,B);case Yl:case Qn:return function zT(d,p,_){const x=d===Yl?"x":"y",S=p.getScaleComponent(x);if(!S)return bb(x,p,_,{center:!0});const A=S.get("type"),O=p.scaleName(x),{markDef:P,config:B}=p;if("band"===A){const q=qx(x,p.size,p.config.view);if(Fd(q)){const G=qp(q,_);if(G)return G}return[0,{signal:`bandwidth('${O}')`}]}{const q=p.encoding[x];if(dt(q)&&q.timeUnit){const G=Lf(q.timeUnit,De=>`scale('${O}', ${De})`),ee=p.config.scale.bandWithNestedOffsetPaddingInner,se=Tu({fieldDef:q,markDef:P,config:B})-.5,Ee=0!==se?` + ${se}`:"";return ee?[{signal:`${Je(ee)?`${ee.signal}/2`+Ee:`${ee/2+se}`} * (${G})`},{signal:`${Je(ee)?`(1 - ${ee.signal}/2)`+Ee:`${1-ee/2+se}`} * (${G})`}]:[0,{signal:G}]}return Fn(`Cannot use ${d} scale if ${x} scale is not discrete.`)}}(d,p,B);case He:{const se=vb(S,p.component.scales[d].get("zero"),x),Ee=function VT(d,p,_,x){const S={x:Hx(_,"x"),y:Hx(_,"y")};switch(d){case"bar":case"tick":{if(void 0!==x.scale.maxBandSize)return x.scale.maxBandSize;const A=Gp(p,S,x.view);return re.isNumber(A)?A-1:new bs(()=>`${A.signal} - 1`)}case"line":case"trail":case"rule":return x.scale.maxStrokeWidth;case"text":return x.scale.maxFontSize;case"point":case"square":case"circle":{if(x.scale.maxSize)return x.scale.maxSize;const A=Gp(p,S,x.view);return re.isNumber(A)?Math.pow(zC*A,2):new bs(()=>`pow(${zC} * ${A.signal}, 2)`)}}throw new Error(bo("size",d))}(S,_,p,x);return vd(B)?function bR(d,p,_){const x=()=>{const S=ec(p),A=ec(d),O=`(${S} - ${A}) / (${_} - 1)`;return`sequence(${A}, ${S} + ${O}, ${O})`};return Je(p)?new bs(x):{signal:x()}}(se,Ee,function BC(d,p,_,x){switch(d){case"quantile":return p.scale.quantileCount;case"quantize":return p.scale.quantizeCount;case"threshold":return void 0!==_&&re.isArray(_)?_.length+1:(nt(function tA(d){return`Domain for ${d} is required for threshold scale.`}(x)),3)}}(B,x,q,d)):[se,Ee]}case As:return[0,2*Math.PI];case lt:return[0,360];case Ao:return[0,new bs(()=>`min(${p.getSignalName("width")},${p.getSignalName("height")})/2`)];case Ts:return[x.scale.minStrokeWidth,x.scale.maxStrokeWidth];case Hh:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case ye:return"symbol";case be:case Se:case Fe:return"ordinal"===B?"nominal"===O?"category":"ordinal":void 0!==G?"diverging":"rect"===S||"geoshape"===S?"heatmap":"ramp";case _e:case nn:case gi:return[x.scale.minOpacity,x.scale.maxOpacity]}}(d,p);return(void 0!==B||void 0!==q)&&Qm(A,"rangeMin")&&re.isArray(G)&&2===G.length?Ls([B??G[0],q??G[1]]):co(G)}function Wx(d){return function Dv(d){return!re.isString(d)&&!!d.name}(d)?{scheme:d.name,...yt(d,["name"])}:{scheme:d}}function bb(d,p,_){let{center:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=Mr(d),A=p.getName(S),O=p.getSignalName.bind(p);return d===mo&&Da(_)?x?[bs.fromName(P=>`${O(P)}/2`,A),bs.fromName(P=>`-${O(P)}/2`,A)]:[bs.fromName(O,A),0]:x?[bs.fromName(P=>`-${O(P)}/2`,A),bs.fromName(P=>`${O(P)}/2`,A)]:[0,bs.fromName(O,A)]}function hc(d,p,_){const{encoding:x}=p,S=p.getScaleComponent(_),A=To(_),O=x[A];if("offset"===AE({step:d,offsetIsDiscrete:Bn(O)&&Z1(O.type)})&&Yf(x,A)){const B=p.getScaleComponent(A);let G=`domain('${p.scaleName(A)}').length`;"band"===B.get("type")&&(G=`bandspace(${G}, ${B.get("paddingInner")??B.get("padding")??0}, ${B.get("paddingOuter")??B.get("padding")??0})`);const ee=S.get("paddingInner")??S.get("padding");return{signal:`${d.step} * ${G} / (1-${Jl(ee)})`}}return d.step}function qp(d,p){if("offset"===AE({step:d,offsetIsDiscrete:ko(p)}))return{step:d.step}}function qx(d,p,_){const x=d===Ri?"width":"height";return p[x]||lo(_,x)}function vb(d,p,_){if(p)return Je(p)?{signal:`${p.signal} ? 0 : ${vb(d,!1,_)}`}:0;switch(d){case"bar":case"tick":return _.scale.minBandSize;case"line":case"trail":case"rule":return _.scale.minStrokeWidth;case"text":return _.scale.minFontSize;case"point":case"square":case"circle":return _.scale.minSize}throw new Error(bo("size",d))}const zC=.95;function Gp(d,p,_){const x=Fd(d.width)?d.width.step:pr(_,"width"),S=Fd(d.height)?d.height.step:pr(_,"height");return p.x||p.y?new bs(()=>`min(${[p.x?p.x.signal:x,p.y?p.y.signal:S].join(", ")})`):Math.min(x,S)}function jT(d,p){uo(d)?function pc(d,p){const _=d.component.scales,{config:x,encoding:S,markDef:A,specifiedScales:O}=d;for(const P of We(_)){const B=O[P],q=_[P],G=d.getScaleComponent(P),ee=Oo(S[P]),se=B[p],Ee=G.get("type"),De=G.get("padding"),Re=G.get("paddingInner"),Le=Qm(Ee,p),Ye=fy(P,p);if(void 0!==se&&(Le?Ye&&nt(Ye):nt(z1(Ee,p,P))),Le&&void 0===Ye)if(void 0!==se){const bt=ee.timeUnit,kn=ee.type;switch(p){case"domainMax":case"domainMin":_d(B[p])||"temporal"===kn||bt?q.set(p,{signal:Td(B[p],{type:kn,timeUnit:bt})},!0):q.set(p,B[p],!0);break;default:q.copyKeyFromObject(p,B)}}else{const bt=p in UT?UT[p]({model:d,channel:P,fieldOrDatumDef:ee,scaleType:Ee,scalePadding:De,scalePaddingInner:Re,domain:B.domain,domainMin:B.domainMin,domainMax:B.domainMax,markDef:A,config:x,hasNestedOffsetScale:dp(S,P),hasSecondaryRangeChannel:!!S[Or(P)]}):x.scale[p];void 0!==bt&&q.set(p,bt,!1)}}}(d,p):Zc(d,p)}const UT={bins:d=>{let{model:p,fieldOrDatumDef:_}=d;return dt(_)?function Ug(d,p){const _=p.bin;if(sr(_)){const x=jp(d,p.field,_);return new bs(()=>d.getSignalName(x))}if(oo(_)&&Lc(_)&&void 0!==_.step)return{step:_.step}}(p,_):void 0},interpolate:d=>{let{channel:p,fieldOrDatumDef:_}=d;return function VC(d,p){if(St([be,Se,Fe],d)&&"nominal"!==p)return"hcl"}(p,_.type)},nice:d=>{let{scaleType:p,channel:_,domain:x,domainMin:S,domainMax:A,fieldOrDatumDef:O}=d;return function jC(d,p,_,x,S,A){if(!(ku(A)?.bin||re.isArray(_)||null!=S||null!=x||St([Ga.TIME,Ga.UTC],d)))return!!Yr(p)||void 0}(p,_,x,S,A,O)},padding:d=>{let{channel:p,scaleType:_,fieldOrDatumDef:x,markDef:S,config:A}=d;return function HT(d,p,_,x,S,A){if(Yr(d)){if(Go(p)){if(void 0!==_.continuousPadding)return _.continuousPadding;const{type:O,orient:P}=S;if("bar"===O&&(!dt(x)||!x.bin&&!x.timeUnit)&&("vertical"===P&&"x"===d||"horizontal"===P&&"y"===d))return A.continuousBandSize}if(p===Ga.POINT)return _.pointPadding}}(p,_,A.scale,x,S,A.bar)},paddingInner:d=>{let{scalePadding:p,channel:_,markDef:x,scaleType:S,config:A,hasNestedOffsetScale:O}=d;return function vR(d,p,_,x,S){let A=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0===d){if(Yr(p)){const{bandPaddingInner:O,barBandPaddingInner:P,rectBandPaddingInner:B,bandWithNestedOffsetPaddingInner:q}=S;return A?q:ui(O,"bar"===_?P:B)}if(us(p)&&x===Ga.BAND)return S.offsetBandPaddingInner}}(p,_,x.type,S,A.scale,O)},paddingOuter:d=>{let{scalePadding:p,channel:_,scaleType:x,scalePaddingInner:S,config:A,hasNestedOffsetScale:O}=d;return function WT(d,p,_,x,S){let A=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0===d)if(Yr(p)){const{bandPaddingOuter:O,bandWithNestedOffsetPaddingOuter:P}=S;if(A)return P;if(_===Ga.BAND)return ui(O,Je(x)?{signal:`${x.signal}/2`}:x/2)}else if(us(p)){if(_===Ga.POINT)return.5;if(_===Ga.BAND)return S.offsetBandPaddingOuter}}(p,_,x,S,A.scale,O)},reverse:d=>{let{fieldOrDatumDef:p,scaleType:_,channel:x,config:S}=d;return function wn(d,p,_,x){return"x"===_&&void 0!==x.xReverse?Da(d)&&"descending"===p?Je(x.xReverse)?{signal:`!${x.xReverse.signal}`}:!x.xReverse:x.xReverse:!(!Da(d)||"descending"!==p)||void 0}(_,dt(p)?p.sort:void 0,x,S.scale)},zero:d=>{let{channel:p,fieldOrDatumDef:_,domain:x,markDef:S,scaleType:A,config:O,hasSecondaryRangeChannel:P}=d;return function xR(d,p,_,x,S,A,O){if(_&&"unaggregated"!==_&&Da(S)){if(re.isArray(_)){const B=_[0],q=_[_.length-1];if(re.isNumber(B)&&B<=0&&re.isNumber(q)&&q>=0)return!0}return!1}if("size"===d&&"quantitative"===p.type&&!vd(S))return!0;if((!dt(p)||!p.bin)&&St([...Ql,...fi],d)){const{orient:B,type:q}=x;return(!St(["bar","area","line","trail"],q)||!("horizontal"===B&&"y"===d||"vertical"===B&&"x"===d))&&(!(!St(["bar","area"],q)||O)||A?.zero)}return!1}(p,_,x,S,A,O.scale,P)}};function ch(d){uo(d)?function lh(d){const p=d.component.scales;for(const _ of ev){const x=p[_];if(!x)continue;const S=BT(_,d);x.setWithExplicit("range",S)}}(d):Zc(d,"range")}function Zc(d,p){const _=d.component.scales;for(const x of d.children)"range"===p?ch(x):jT(x,p);for(const x of We(_)){let S;for(const A of d.children){const O=A.component.scales[x];O&&(S=Qa(S,O.getWithExplicit(p),p,"scale",zd((B,q)=>"range"===p&&B.step&&q.step?B.step-q.step:0)))}_[x].setWithExplicit(p,S)}}function xb(d,p,_,x){const A=function wb(d,p,_,x){switch(p.type){case"nominal":case"ordinal":if(Wh(d)||"discrete"===Gh(d))return"shape"===d&&"ordinal"===p.type&&nt(ml(d,"ordinal")),"ordinal";if(Yr(d)||us(d)){if(St(["rect","bar","image","rule"],_.type)||x)return"band"}else if("arc"===_.type&&d in Q0)return"band";return Au(_[Mr(d)])||Dd(p)&&p.axis?.tickBand?"band":"point";case"temporal":return Wh(d)?"time":"discrete"===Gh(d)?(nt(ml(d,"temporal")),"ordinal"):dt(p)&&p.timeUnit&&Fr(p.timeUnit).utc?"utc":"time";case"quantitative":return Wh(d)?dt(p)&&sr(p.bin)?"bin-ordinal":"linear":"discrete"===Gh(d)?(nt(ml(d,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(av(p.type))}(p,_,x,arguments.length>4&&void 0!==arguments[4]&&arguments[4]),{type:O}=d;return pd(p)?void 0!==O?function nE(d,p){let _=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!pd(d))return!1;switch(d){case Ri:case mo:case Yl:case Qn:case As:case Ao:return!(!Go(p)&&"band"!==p)||"point"===p&&!_;case He:case Ts:case _e:case nn:case gi:case lt:return Go(p)||vd(p)||St(["band","point","ordinal"],p);case be:case Se:case Fe:return"band"!==p;case Hh:case ye:return"ordinal"===p||vd(p)}}(p,O)?dt(_)&&!function Mv(d,p){return St([Os,wv],p)?void 0===d||ko(d):p===qa?St([Ga.TIME,Ga.UTC,void 0],d):p!==$f||uy(d)||vd(d)||void 0===d}(O,_.type)?(nt(function hv(d,p){return`FieldDef does not work with "${d}" scale. We are using "${p}" scale instead.`}(O,A)),A):O:(nt(function F2(d,p,_){return`Channel "${d}" does not work with "${p}" scale. We are using "${_}" scale instead.`}(p,O,A)),A):A:null}function UC(d){d.component.scales=uo(d)?function GT(d){const{encoding:p,mark:_,markDef:x}=d,S={};for(const A of ev){const O=Oo(p[A]);if(O&&_===Jm&&A===ye&&O.type===Sa)continue;let P=O&&O.scale;if(O&&null!==P&&!1!==P){P??={};const q=xb(P,A,O,x,dp(p,A));S[A]=new $T(d.scaleName(`${A}`,!0),{value:q,explicit:P.type===q})}}return S}(d):function wR(d){const p=d.component.scales={},_={},x=d.component.resolve;for(const S of d.children){UC(S);for(const A of We(S.component.scales))if(x.scale[A]??=o3(A,d),"shared"===x.scale[A]){const O=_[A],P=S.component.scales[A].getWithExplicit("type");O?Cv(O.value,P.value)?_[A]=Qa(O,P,"type","scale",HC):(x.scale[A]="independent",delete _[A]):_[A]=P}}for(const S of We(_)){const A=d.scaleName(S,!0);p[S]=new $T(A,_[S]);for(const P of d.children){const B=P.component.scales[S];B&&(P.renameScale(B.get("name"),A),B.merged=!0)}}return p}(d)}const HC=zd((d,p)=>jc(d)-jc(p));class Uu{constructor(){ln(this,"nameMap",void 0),this.nameMap={}}rename(p,_){this.nameMap[p]=_}has(p){return void 0!==this.nameMap[p]}get(p){for(;this.nameMap[p]&&p!==this.nameMap[p];)p=this.nameMap[p];return p}}function uo(d){return"unit"===d?.type}function mc(d){return"facet"===d?.type}function Gx(d){return"concat"===d?.type}function Hg(d){return"layer"===d?.type}class Hu{constructor(p,_,x,S,A,O,P){this.type=_,this.parent=x,this.config=A,ln(this,"name",void 0),ln(this,"size",void 0),ln(this,"title",void 0),ln(this,"description",void 0),ln(this,"data",void 0),ln(this,"transforms",void 0),ln(this,"layout",void 0),ln(this,"scaleNameMap",void 0),ln(this,"projectionNameMap",void 0),ln(this,"signalNameMap",void 0),ln(this,"component",void 0),ln(this,"view",void 0),ln(this,"children",void 0),ln(this,"correctDataNames",B=>(B.from?.data&&(B.from.data=this.lookupDataSource(B.from.data)),B.from?.facet?.data&&(B.from.facet.data=this.lookupDataSource(B.from.facet.data)),B)),this.parent=x,this.config=A,this.view=_o(P),this.name=p.name??S,this.title=ds(p.title)?{text:p.title}:p.title?_o(p.title):void 0,this.scaleNameMap=x?x.scaleNameMap:new Uu,this.projectionNameMap=x?x.projectionNameMap:new Uu,this.signalNameMap=x?x.signalNameMap:new Uu,this.data=p.data,this.description=p.description,this.transforms=function GA(d){return d.map(p=>Vy(p)?{filter:At(p.filter,K1)}:p)}(p.transform??[]),this.layout="layer"===_||"unit"===_?{}:function Ny(d,p,_){const x=_[p],S={},{spacing:A,columns:O}=x;void 0!==A&&(S.spacing=A),void 0!==O&&(_y(d)&&!og(d.facet)||ME(d))&&(S.columns=O),mg(d)&&(S.columns=1);for(const P of J$)if(void 0!==d[P])if("spacing"===P){const B=d[P];S[P]=re.isNumber(B)?B:{row:B.row??A,column:B.column??A}}else S[P]=d[P];return S}(p,_,A),this.component={data:{sources:x?x.component.data.sources:[],outputNodes:x?x.component.data.outputNodes:{},outputNodeRefCounts:x?x.component.data.outputNodeRefCounts:{},isFaceted:_y(p)||x?.component.data.isFaceted&&void 0===p.data},layoutSize:new Za,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...O?st(O):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function qT(d){let{ignoreRange:p}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};UC(d),NT(d);for(const _ of tE)jT(d,_);p||ch(d)}(this)}parseProjection(){Sl(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){vT(this)}assembleEncodeFromView(p){const{style:_,...x}=p,S={};for(const A of We(x)){const O=x[A];void 0!==O&&(S[A]=Ar(O))}return S}assembleGroupEncodeEntry(p){let _={};return this.view&&(_=this.assembleEncodeFromView(this.view)),p||(this.description&&(_.description=Ar(this.description)),"unit"!==this.type&&"layer"!==this.type)?Gt(_)?void 0:_:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),..._??{}}}assembleLayout(){if(!this.layout)return;const{spacing:p,..._}=this.layout,{component:x,config:S}=this,A=function lb(d,p){const _={};for(const x of Zl){const S=d[x];if(S?.facetFieldDef){const{titleAnchor:A,titleOrient:O}=Cx(["titleAnchor","titleOrient"],S.facetFieldDef.header,p,x),P=sb(x,O),B=ab(A,P);void 0!==B&&(_[P]=B)}}return Gt(_)?void 0:_}(x.layoutHeaders,S);return{padding:p,...this.assembleDefaultLayout(),..._,...A?{titleBand:A}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:p}=this.component;let _=[];for(const x of Zl)p[x].title&&_.push(hR(this,x));for(const x of gC)_=_.concat(bC(this,x));return _}assembleAxes(){return function hT(d,p){const{x:_=[],y:x=[]}=d;return[..._.map(S=>rb(S,"grid",p)),...x.map(S=>rb(S,"grid",p)),..._.map(S=>rb(S,"main",p)),...x.map(S=>rb(S,"main",p))].filter(S=>S)}(this.component.axes,this.config)}assembleLegends(){return rh(this)}assembleProjections(){return pb(this)}assembleTitle(){const{encoding:p,..._}=this.title??{},x={...pl(this.config.title).nonMarkTitleProperties,..._,...p?{encode:{update:p}}:{}};if(x.text)return St(["unit","layer"],this.type)?St(["middle",void 0],x.anchor)&&(x.frame??="group"):x.anchor??="start",Gt(x)?void 0:x}assembleGroup(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const _={};p=p.concat(this.assembleSignals()),p.length>0&&(_.signals=p);const x=this.assembleLayout();x&&(_.layout=x),_.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const S=!this.parent||mc(this.parent)?FC(this):[];S.length>0&&(_.scales=S);const A=this.assembleAxes();A.length>0&&(_.axes=A);const O=this.assembleLegends();return O.length>0&&(_.legends=O),_}getName(p){return hn((this.name?`${this.name}_`:"")+p)}getDataName(p){return this.getName(Vr[p].toLowerCase())}requestDataName(p){const _=this.getDataName(p),x=this.component.data.outputNodeRefCounts;return x[_]=(x[_]||0)+1,_}getSizeSignalRef(p){if(mc(this.parent)){const x=If(yT(p)),S=this.component.scales[x];if(S&&!S.merged){const A=S.get("type"),O=S.get("range");if(ko(A)&&ht(O)){const P=S.get("name"),q=NC(Wp(this,x));return q?{signal:vC(P,S,pt({aggregate:"distinct",field:q},{expr:"datum"}))}:(nt(Tr(x)),null)}}}return{signal:this.signalNameMap.get(this.getName(p))}}lookupDataSource(p){const _=this.component.data.outputNodes[p];return _?_.getSource():p}getSignalName(p){return this.signalNameMap.get(p)}renameSignal(p,_){this.signalNameMap.rename(p,_)}renameScale(p,_){this.scaleNameMap.rename(p,_)}renameProjection(p,_){this.projectionNameMap.rename(p,_)}scaleName(p,_){return _?this.getName(p):hl(p)&&pd(p)&&this.component.scales[p]||this.scaleNameMap.has(this.getName(p))?this.scaleNameMap.get(this.getName(p)):void 0}projectionName(p){return p?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(p){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const _=this.component.scales[p];return _&&!_.merged?_:this.parent?this.parent.getScaleComponent(p):void 0}getSelectionComponent(p,_){let x=this.component.selection[p];if(!x&&this.parent&&(x=this.parent.getSelectionComponent(p,_)),!x)throw new Error(function ra(d){return`Cannot find a selection named "${d}".`}(_));return x}hasAxisOrientSignalRef(){return this.component.axes.x?.some(p=>p.hasOrientSignalRef())||this.component.axes.y?.some(p=>p.hasOrientSignalRef())}}class Wg extends Hu{vgField(p){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const x=this.fieldDef(p);if(x)return pt(x,_)}reduceFieldDef(p,_){return function Uv(d,p,_,x){return d?We(d).reduce((S,A)=>{const O=d[A];return re.isArray(O)?O.reduce((P,B)=>p.call(x,P,B,A),S):p.call(x,S,O,A)},_):_}(this.getMapping(),(x,S,A)=>{const O=ku(S);return O?p(x,O,A):x},_)}forEachFieldDef(p,_){Ey(this.getMapping(),(x,S)=>{const A=ku(x);A&&p(A,S)},_)}}class Vs extends Tn{clone(){return new Vs(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"value",x[1]??"density"]}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${kt(this.transform)}`}assemble(){const{density:p,..._}=this.transform,x={type:"kde",field:p,..._};return this.transform.groupby&&(x.resolve="shared"),x}}class Xp extends Tn{clone(){return new Xp(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${kt(this.transform)}`}assemble(){const{extent:p,param:_}=this.transform;return{type:"extent",field:p,signal:_}}}class Zd extends Tn{clone(){return new Zd(null,{...this.filter})}constructor(p,_){super(p),this.filter=_}static make(p,_){const{config:x,mark:S,markDef:A}=_;if("filter"!==Ji("invalid",A,x))return null;const P=_.reduceFieldDef((B,q,G)=>{const ee=pd(G)&&_.getScaleComponent(G);return ee&&Da(ee.get("type"))&&"count"!==q.aggregate&&!yl(S)&&(B[q.field]=q),B},{});return We(P).length?new Zd(p,P):null}dependentFields(){return new Set(We(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${kt(this.filter)}`}assemble(){const p=We(this.filter).reduce((_,x)=>{const S=this.filter[x],A=pt(S,{expr:"datum"});return null!==S&&("temporal"===S.type?_.push(`(isDate(${A}) || (isValid(${A}) && isFinite(+${A})))`):"quantitative"===S.type&&(_.push(`isValid(${A})`),_.push(`isFinite(+${A})`))),_},[]);return p.length>0?{type:"filter",expr:p.join(" && ")}:null}}class Yp extends Tn{clone(){return new Yp(this.parent,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const{flatten:x,as:S=[]}=this.transform;this.transform.as=x.map((A,O)=>S[O]??A)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${kt(this.transform)}`}assemble(){const{flatten:p,as:_}=this.transform;return{type:"flatten",fields:p,as:_}}}class Kp extends Tn{clone(){return new Kp(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"key",x[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${kt(this.transform)}`}assemble(){const{fold:p,as:_}=this.transform;return{type:"fold",fields:p,as:_}}}class qg extends Tn{clone(){return new qg(null,st(this.fields),this.geojson,this.signal)}static parseAll(p,_){if(_.component.projection&&!_.component.projection.isFit)return p;let x=0;for(const S of[[Ho,It],[ae,wr]]){const A=S.map(O=>{const P=Oo(_.encoding[O]);return dt(P)?P.field:Sd(P)?{expr:`${P.datum}`}:Ma(P)?{expr:`${P.value}`}:void 0});(A[0]||A[1])&&(p=new qg(p,A,null,_.getName("geojson_"+x++)))}if(_.channelHasField(ye)){const S=_.typedFieldDef(ye);S.type===Sa&&(p=new qg(p,null,S.field,_.getName("geojson_"+x++)))}return p}constructor(p,_,x,S){super(p),this.fields=_,this.geojson=x,this.signal=S}dependentFields(){const p=(this.fields??[]).filter(re.isString);return new Set([...this.geojson?[this.geojson]:[],...p])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${kt(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 Eb extends Tn{clone(){return new Eb(null,this.projection,st(this.fields),st(this.as))}constructor(p,_,x,S){super(p),this.projection=_,this.fields=x,this.as=S}static parseAll(p,_){if(!_.projectionName())return p;for(const x of[[Ho,It],[ae,wr]]){const S=x.map(O=>{const P=Oo(_.encoding[O]);return dt(P)?P.field:Sd(P)?{expr:`${P.datum}`}:Ma(P)?{expr:`${P.value}`}:void 0}),A=x[0]===ae?"2":"";(S[0]||S[1])&&(p=new Eb(p,_.projectionName(),S,[_.getName(`x${A}`),_.getName(`y${A}`)]))}return p}dependentFields(){return new Set(this.fields.filter(re.isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${kt(this.fields)} ${kt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Gg extends Tn{clone(){return new Gg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(p){const{start:_=0,stop:x,step:S}=p;return{signal:`sequence(${[_,x,...S?[S]:[]].join(",")})`}}static makeFromTransform(p,_){return new Gg(p,_)}static makeFromEncoding(p,_){const x=_.encoding,S=x.x,A=x.y;if(dt(S)&&dt(A)){const O=S.impute?S:A.impute?A:void 0;if(void 0===O)return;const P=S.impute?A:A.impute?S:void 0,{method:B,value:q,frame:G,keyvals:ee}=O.impute,se=Od(_.mark,x);return new Gg(p,{impute:O.field,key:P.field,...B?{method:B}:{},...void 0!==q?{value:q}:{},...G?{frame:G}:{},...void 0!==ee?{keyvals:ee}:{},...se.length?{groupby:se}:{}})}return null}hash(){return`Impute ${kt(this.transform)}`}assemble(){const{impute:p,key:_,keyvals:x,method:S,groupby:A,value:O,frame:P=[null,null]}=this.transform,B={type:"impute",field:p,key:_,...x?{keyvals:(d=x,void 0!==d?.stop?this.processSequence(x):x)}:{},method:"value",...A?{groupby:A}:{},value:S&&"value"!==S?null:O};var d;return S&&"value"!==S?[B,{type:"window",as:[`imputed_${p}_value`],ops:[S],fields:[p],frame:P,ignorePeers:!1,...A?{groupby:A}:{}},{type:"formula",expr:`datum.${p} === null ? datum.imputed_${p}_value : datum.${p}`,as:p}]:[B]}}class Xx extends Tn{clone(){return new Xx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??_.on,x[1]??_.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${kt(this.transform)}`}assemble(){const{loess:p,on:_,...x}=this.transform;return{type:"loess",x:_,y:p,...x}}}class Yx extends Tn{clone(){return new Yx(null,st(this.transform),this.secondary)}constructor(p,_,x){super(p),this.transform=_,this.secondary=x}static make(p,_,x,S){const A=_.component.data.sources,{from:O}=x;let P=null;if(function rx(d){return"data"in d}(O)){let B=tw(O.data,A);B||(B=new Xd(O.data),A.push(B));const q=_.getName(`lookup_${S}`);P=new jr(B,q,Vr.Lookup,_.component.data.outputNodeRefCounts),_.component.data.outputNodes[q]=P}else if(function UA(d){return"param"in d}(O)){const B=O.param;let q;x={as:B,...x};try{q=_.getSelectionComponent(hn(B),B)}catch{throw new Error(function kr(d){return`Lookups can only be performed on selection parameters. "${d}" is a variable parameter.`}(B))}if(P=q.materialized,!P)throw new Error(function Ca(d){return`Cannot define and lookup the "${d}" selection in the same view. Try moving the lookup into a second, layered view?`}(B))}return new Yx(p,x,P.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?re.array(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${kt({transform:this.transform,secondary:this.secondary})}`}assemble(){let p;if(this.transform.from.fields)p={values:this.transform.from.fields,...this.transform.as?{as:re.array(this.transform.as)}:{}};else{let _=this.transform.as;re.isString(_)||(nt('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.'),_="_lookup"),p={as:[_]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...p,...this.transform.default?{default:this.transform.default}:{}}}}class Kx extends Tn{clone(){return new Kx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"prob",x[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${kt(this.transform)}`}assemble(){const{quantile:p,..._}=this.transform;return{type:"quantile",field:p,..._}}}class Zx extends Tn{clone(){return new Zx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??_.on,x[1]??_.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${kt(this.transform)}`}assemble(){const{regression:p,on:_,...x}=this.transform;return{type:"regression",x:_,y:p,...x}}}class Qx extends Tn{clone(){return new Qx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci((this.transform.groupby??[]).concat(p),_=>_)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${kt(this.transform)}`}assemble(){const{pivot:p,value:_,groupby:x,limit:S,op:A}=this.transform;return{type:"pivot",field:p,value:_,...void 0!==S?{limit:S}:{},...void 0!==A?{op:A}:{},...void 0!==x?{groupby:x}:{}}}}class Xg extends Tn{clone(){return new Xg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${kt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Yg(d){let p=0;return function _(x,S){if(x instanceof Xd&&!x.isGenerator&&!ka(x.data)&&(d.push(S),S={name:null,source:S.name,transform:[]}),x instanceof ys&&(x.parent instanceof Xd&&!S.source?(S.format={...S.format??{},parse:x.assembleFormatParse()},S.transform.push(...x.assembleTransforms(!0))):S.transform.push(...x.assembleTransforms())),x instanceof oh)return S.name||(S.name="data_"+p++),!S.source||S.transform.length>0?(d.push(S),x.data=S.name):x.data=S.source,void d.push(...x.assemble());switch((x instanceof Gd||x instanceof Up||x instanceof Zd||x instanceof Cl||x instanceof Rp||x instanceof Eb||x instanceof No||x instanceof Yx||x instanceof zg||x instanceof zu||x instanceof Kp||x instanceof Yp||x instanceof Vs||x instanceof Xx||x instanceof Kx||x instanceof Zx||x instanceof sh||x instanceof Xg||x instanceof Qx||x instanceof Xp)&&S.transform.push(x.assemble()),(x instanceof il||x instanceof el||x instanceof Gg||x instanceof Yd||x instanceof qg)&&S.transform.push(...x.assemble()),x instanceof jr&&(S.source&&0===S.transform.length?x.setSource(S.source):x.parent instanceof jr?x.setSource(S.name):(S.name||(S.name="data_"+p++),x.setSource(S.name),1===x.numChildren()&&(d.push(S),S={name:null,source:S.name,transform:[]}))),x.numChildren()){case 0:x instanceof jr&&(!S.source||S.transform.length>0)&&d.push(S);break;case 1:_(x.children[0],S);break;default:{S.name||(S.name="data_"+p++);let A=S.name;!S.source||S.transform.length>0?d.push(S):A=S.source;for(const O of x.children)_(O,{name:null,source:A,transform:[]});break}}}}function XT(d){return"top"===d||"left"===d||Je(d)?"header":"footer"}function YT(d,p){const{facet:_,config:x,child:S,component:A}=d;if(d.channelHasField(p)){const O=_[p],P=kg("title",null,x,p);let B=cp(O,x,{allowDisabling:!0,includeDefault:void 0===P||!!P});S.component.layoutHeaders[p].title&&(B=re.isArray(B)?B.join(", "):B,B+=` / ${S.component.layoutHeaders[p].title}`,S.component.layoutHeaders[p].title=null);const q=kg("labelOrient",O.header,x,p),G=null!==O.header&&ui(O.header?.labels,x.header.labels,!0),ee=St(["bottom","right"],q)?"footer":"header";A.layoutHeaders[p]={title:null!==O.header?B:null,facetFieldDef:O,[ee]:"facet"===p?[]:[KT(d,p,G)]}}}function KT(d,p,_){const x="row"===p?"height":"width";return{labels:_,sizeSignal:d.child.component.layoutSize.get(x)?d.child.getSizeSignalRef(x):void 0,axes:[]}}function Qd(d,p){const{child:_}=d;if(_.component.axes[p]){const{layoutHeaders:x,resolve:S}=d.component;if(S.axis[p]=Ig(S,p),"shared"===S.axis[p]){const A="x"===p?"column":"row",O=x[A];for(const P of _.component.axes[p]){const B=XT(P.get("orient"));O[B]??=[KT(d,A,!1)];const q=rb(P,"main",d.config,{header:!0});q&&O[B][0].axes.push(q),P.mainExtracted=!0}}}}function ew(d){for(const p of d.children)p.parseLayoutSize()}function Zp(d,p){const _=yT(p),x=If(_),S=d.component.resolve,A=d.component.layoutSize;let O;for(const P of d.children){const B=P.component.layoutSize.getWithExplicit(_),q=S.scale[x]??o3(x,d);if("independent"===q&&"step"===B.value){O=void 0;break}if(O){if("independent"===q&&O.value!==B.value){O=void 0;break}O=Qa(O,B,_,"")}else O=B}if(O){for(const P of d.children)d.renameSignal(P.getName(_),d.getName(p)),P.component.layoutSize.set(_,"merged",!1);A.setWithExplicit(p,O)}else A.setWithExplicit(p,{explicit:!1,value:void 0})}function SR(d,p){const x=d.config,S=d.getScaleComponent("width"===p?"x":"y");if(S){const A=S.get("type"),O=S.get("range");if(ko(A)){const P=lo(x.view,p);return ht(O)||Fd(P)?"step":P}return Aa(x.view,p)}if(d.hasProjection||"arc"===d.mark)return Aa(x.view,p);{const A=lo(x.view,p);return Fd(A)?A.step:A}}function qC(d,p,_){return pt(p,{suffix:`by_${pt(d)}`,..._??{}})}class Sb extends Wg{constructor(p,_,x,S){super(p,"facet",_,x,S,p.resolve),ln(this,"facet",void 0),ln(this,"child",void 0),ln(this,"children",void 0),this.child=Jr(p.spec,this,this.getName("child"),void 0,S),this.children=[this.child],this.facet=this.initFacet(p.facet)}initFacet(p){if(!og(p))return{facet:this.initFacetFieldDef(p,"facet")};const _=We(p),x={};for(const S of _){if(![ea,Xl].includes(S)){nt(bo(S,"facet"));break}const A=p[S];if(void 0===A.field){nt(Nr(A,S));break}x[S]=this.initFacetFieldDef(A,S)}return x}initFacetFieldDef(p,_){const x=cg(p,_);return x.header?x.header=_o(x.header):null===x.header&&(x.header=null),x}channelHasField(p){return!!this.facet[p]}fieldDef(p){return this.facet[p]}parseData(){this.component.data=gc(this),this.child.parseData()}parseLayoutSize(){ew(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function Cb(d){for(const p of Zl)YT(d,p);Qd(d,"x"),Qd(d,"y")}(this)}assembleSelectionTopLevelSignals(p){return this.child.assembleSelectionTopLevelSignals(p)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(p){return this.child.assembleSelectionData(p)}getHeaderLayoutMixins(){const p={};for(const _ of Zl)for(const x of Sx){const S=this.component.layoutHeaders[_],A=S[x],{facetFieldDef:O}=S;if(O){const P=kg("titleOrient",O.header,this.config,_);if(["right","bottom"].includes(P)){const B=sb(_,P);p.titleAnchor??={},p.titleAnchor[B]="end"}}if(A?.[0]){const B="header"===x?"headerBand":"footerBand";"facet"!==_&&!this.child.component.layoutSize.get("row"===_?"height":"width")&&(p[B]??={},p[B][_]=.5),S.title&&(p.offset??={},p.offset["row"===_?"rowTitle":"columnTitle"]=10)}}return p}assembleDefaultLayout(){const{column:p,row:_}=this.facet,x=p?this.columnDistinctSignal():_?1:void 0;let S="all";return(!_&&"independent"===this.component.resolve.scale.x||!p&&"independent"===this.component.resolve.scale.y)&&(S="none"),{...this.getHeaderLayoutMixins(),...x?{columns:x}:{},bounds:"full",align:S}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Sb))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(p){return this.parent&&this.parent instanceof Sb?{...this.channelHasField("column")?{encode:{update:{columns:{field:pt(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(p)}:super.assembleGroup(p)}getCardinalityAggregateForChild(){const p=[],_=[],x=[];if(this.child instanceof Sb){if(this.child.channelHasField("column")){const S=pt(this.child.facet.column);p.push(S),_.push("distinct"),x.push(`distinct_${S}`)}}else for(const S of Ql){const A=this.child.component.scales[S];if(A&&!A.merged){const O=A.get("type"),P=A.get("range");if(ko(O)&&ht(P)){const q=NC(Wp(this.child,S));q?(p.push(q),_.push("distinct"),x.push(`distinct_${q}`)):nt(Tr(S))}}}return{fields:p,ops:_,as:x}}assembleFacet(){const{name:p,data:_}=this.component.data.facetRoot,{row:x,column:S}=this.facet,{fields:A,ops:O,as:P}=this.getCardinalityAggregateForChild(),B=[];for(const G of Zl){const ee=this.facet[G];if(ee){B.push(pt(ee));const{bin:se,sort:Ee}=ee;if(sr(se)&&B.push(pt(ee,{binSuffix:"end"})),sa(Ee)){const{field:De,op:Re=ig}=Ee,Le=qC(ee,Ee);x&&S?(A.push(Le),O.push("max"),P.push(Le)):(A.push(De),O.push(Re),P.push(Le))}else if(re.isArray(Ee)){const De=Np(ee,G);A.push(De),O.push("max"),P.push(De)}}}const q=!!x&&!!S;return{name:p,data:_,groupby:B,...q||A.length>0?{aggregate:{...q?{cross:q}:{},...A.length?{fields:A,ops:O,as:P}:{}}}:{}}}facetSortFields(p){const{facet:_}=this,x=_[p];return x?sa(x.sort)?[qC(x,x.sort,{expr:"datum"})]:re.isArray(x.sort)?[Np(x,p,{expr:"datum"})]:[pt(x,{expr:"datum"})]:[]}facetSortOrder(p){const{facet:_}=this,x=_[p];if(x){const{sort:S}=x;return[(sa(S)?S.order:!re.isArray(S)&&S)||"ascending"]}return[]}assembleLabelTitle(){const{facet:p,config:_}=this;if(p.facet)return _T(p.facet,"facet",_);const x={row:["top","bottom"],column:["left","right"]};for(const S of gC)if(p[S]){const A=kg("labelOrient",p[S]?.header,_,S);if(x[S].includes(A))return _T(p[S],S,_)}}assembleMarks(){const{child:p}=this,x=function WC(d){const p=[],_=Yg(p);for(const x of d.children)_(x,{source:d.name,name:null,transform:[]});return p}(this.component.data.facetRoot),S=p.assembleGroupEncodeEntry(!1),A=this.assembleLabelTitle()||p.assembleTitle(),O=p.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...A?{title:A}:{},...O?{style:O}:{},from:{facet:this.assembleFacet()},sort:{field:Zl.map(B=>this.facetSortFields(B)).flat(),order:Zl.map(B=>this.facetSortOrder(B)).flat()},...x.length>0?{data:x}:{},...S?{encode:{update:S}}:{},...p.assembleGroup(cR(this,[]))}]}getMapping(){return this.facet}}function tw(d,p){for(const _ of p){const x=_.data;if(d.name&&_.hasName()&&d.name!==_.dataName)continue;const S=d.format?.mesh,A=x.format?.feature;if(S&&A)continue;const O=d.format?.feature;if((O||A)&&O!==A)continue;const P=x.format?.mesh;if(!S&&!P||S===P)if(Wy(d)&&Wy(x)){if(xr(d.values,x.values))return _}else if(ka(d)&&ka(x)){if(d.url===x.url)return _}else if(ZA(d)&&d.name===_.dataName)return _}return null}function gc(d){let p=function Db(d,p){if(d.data||!d.parent){if(null===d.data){const x=new Xd({values:[]});return p.push(x),x}const _=tw(d.data,p);if(_)return Jf(d.data)||(_.data.format=qi({},d.data.format,_.data.format)),!_.hasName()&&d.data.name&&(_.dataName=d.data.name),_;{const x=new Xd(d.data);return p.push(x),x}}return d.parent.component.data.facetRoot?d.parent.component.data.facetRoot:d.parent.component.data.main}(d,d.component.data.sources);const{outputNodes:_,outputNodeRefCounts:x}=d.component.data,S=d.data,O=S&&(Jf(S)||ka(S)||Wy(S))||!d.parent?new Gc:d.parent.component.data.ancestorParse.clone();Jf(S)?(QA(S)?p=new Up(p,S.sequence):cc(S)&&(p=new Gd(p,S.graticule)),O.parseNothing=!0):null===S?.format?.parse&&(O.parseNothing=!0),p=ys.makeExplicit(p,d,O)??p,p=new sh(p);const P=d.parent&&Hg(d.parent);(uo(d)||mc(d))&&P&&(p=il.makeFromEncoding(p,d)??p),d.transforms.length>0&&(p=function nw(d,p,_){let x=0;for(const S of p.transforms){let A,O;if(sR(S))O=d=new Rp(d,S),A="derived";else if(Vy(S)){const P=ST(S);O=d=ys.makeWithAncestors(d,{},P,_)??d,d=new Cl(d,p,S.filter)}else if(BE(S))O=d=il.makeFromTransform(d,S,p),A="number";else if(zE(S))A="date",void 0===_.getWithExplicit(S.field).value&&(d=new ys(d,{[S.field]:A}),_.set(S.field,A,!1)),O=d=el.makeFromTransform(d,S);else if(VE(S))O=d=No.makeFromTransform(d,S),A="number",nh(p)&&(d=new sh(d));else if(bg(S))O=d=Yx.make(d,p,S,x++),A="derived";else if(oR(S))O=d=new zg(d,S),A="number";else if(e3(S))O=d=new zu(d,S),A="number";else if(qA(S))O=d=Yd.makeFromTransform(d,S),A="derived";else if(ax(S))O=d=new Kp(d,S),A="derived";else if(vp(S))O=d=new Xp(d,S),A="derived";else if(sx(S))O=d=new Yp(d,S),A="derived";else if(rR(S))O=d=new Qx(d,S),A="derived";else if(HA(S))d=new Xg(d,S);else if(WA(S))O=d=Gg.makeFromTransform(d,S),A="derived";else if(LE(S))O=d=new Vs(d,S),A="derived";else if(ox(S))O=d=new Kx(d,S),A="derived";else if(bp(S))O=d=new Zx(d,S),A="derived";else{if(!$E(S)){nt(Eu(S));continue}O=d=new Xx(d,S),A="derived"}if(O&&void 0!==A)for(const P of O.producedFields()??[])_.set(P,A,!1)}return d}(p,d,O));const B=function zx(d){const p={};if(uo(d)&&d.component.selection)for(const _ of We(d.component.selection)){const x=d.component.selection[_];for(const S of x.project.items)!S.channel&&ro(S.field)>1&&(p[S.field]="flatten")}return p}(d),q=DT(d);p=ys.makeWithAncestors(p,{},{...B,...q},O)??p,uo(d)&&(p=qg.parseAll(p,d),p=Eb.parseAll(p,d)),(uo(d)||mc(d))&&(P||(p=il.makeFromEncoding(p,d)??p),p=el.makeFromEncoding(p,d)??p,p=Rp.parseAllForSortIndex(p,d));const G=d.getDataName(Vr.Raw),ee=new jr(p,G,Vr.Raw,x);if(_[G]=ee,p=ee,uo(d)){const Re=No.makeFromEncoding(p,d);Re&&(p=Re,nh(d)&&(p=new sh(p))),p=Gg.makeFromEncoding(p,d)??p,p=Yd.makeFromEncoding(p,d)??p}uo(d)&&(p=Zd.make(p,d)??p);const se=d.getDataName(Vr.Main),Ee=new jr(p,se,Vr.Main,x);_[se]=Ee,p=Ee,uo(d)&&function fT(d,p){for(const[_,x]of Jt(d.component.selection??{})){const S=d.getName(`lookup_${_}`);d.component.data.outputNodes[S]=x.materialized=new jr(new Cl(p,d,{param:_}),S,Vr.Lookup,d.component.data.outputNodeRefCounts)}}(d,Ee);let De=null;if(mc(d)){const Re=d.getName("facet");p=function GC(d,p){const{row:_,column:x}=p;if(_&&x){let S=null;for(const A of[_,x])if(sa(A.sort)){const{field:O,op:P=ig}=A.sort;d=S=new zu(d,{joinaggregate:[{op:P,field:O,as:qC(A,A.sort,{forAs:!0})}],groupby:[pt(A)]})}return S}return null}(p,d.facet)??p,De=new oh(p,d,Re,Ee.getSource()),_[Re]=De}return{...d.component.data,outputNodes:_,outputNodeRefCounts:x,raw:ee,main:Ee,facetRoot:De,ancestorParse:O}}class a3 extends Hu{constructor(p,_,x,S){super(p,"concat",_,x,S,p.resolve),ln(this,"children",void 0),("shared"===p.resolve?.axis?.x||"shared"===p.resolve?.axis?.y)&&nt("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(p).map((A,O)=>Jr(A,this,this.getName(`concat_${O}`),void 0,S))}parseData(){this.component.data=gc(this);for(const p of this.children)p.parseData()}parseSelections(){this.component.selection={};for(const p of this.children){p.parseSelections();for(const _ of We(p.component.selection))this.component.selection[_]=p.component.selection[_]}}parseMarkGroup(){for(const p of this.children)p.parseMarkGroup()}parseAxesAndHeaders(){for(const p of this.children)p.parseAxesAndHeaders()}getChildren(p){return mg(p)?p.vconcat:Oy(p)?p.hconcat:p.concat}parseLayoutSize(){!function ER(d){ew(d);const _=void 0===d.layout.columns?"height":"childHeight";Zp(d,1===d.layout.columns?"width":"childWidth"),Zp(d,_)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(p){return this.children.reduce((_,x)=>x.assembleSelectionTopLevelSignals(_),p)}assembleSignals(){return this.children.forEach(p=>p.assembleSignals()),[]}assembleLayoutSignals(){const p=cb(this);for(const _ of this.children)p.push(..._.assembleLayoutSignals());return p}assembleSelectionData(p){return this.children.reduce((_,x)=>x.assembleSelectionData(_),p)}assembleMarks(){return this.children.map(p=>{const _=p.assembleTitle(),x=p.assembleGroupStyle(),S=p.assembleGroupEncodeEntry(!1);return{type:"group",name:p.getName("group"),..._?{title:_}:{},...x?{style:x}:{},...S?{encode:{update:S}}:{},...p.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const p=this.layout.columns;return{...null!=p?{columns:p}:{},bounds:"full",align:"each"}}}const MR={disable:1,gridScale:1,scale:1,...Ou,labelExpr:1,encode:1},Mb=We(MR);class iw extends Za{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(),this.explicit=p,this.implicit=_,this.mainExtracted=x}clone(){return new iw(st(this.explicit),st(this.implicit),this.mainExtracted)}hasAxisPart(p){return"axis"===p||("grid"===p||"title"===p?!!this.get(p):!function DR(d){return!1===d||null===d}(this.get(p)))}hasOrientSignalRef(){return Je(this.explicit.orient)}}const ow={bottom:"top",top:"bottom",left:"right",right:"left"};function XC(d,p){if(!d)return p.map(_=>_.clone());{if(d.length!==p.length)return;const _=d.length;for(let x=0;x<_;x++){const S=d[x],A=p[x];if(!!S!=!!A)return;if(S&&A){const O=S.getWithExplicit("orient"),P=A.getWithExplicit("orient");if(O.explicit&&P.explicit&&O.value!==P.value)return;d[x]=QT(S,A)}}}return d}function QT(d,p){for(const _ of Mb){const x=Qa(d.getWithExplicit(_),p.getWithExplicit(_),_,"axis",(S,A)=>{switch(_){case"title":return BM(S,A);case"gridScale":return{explicit:S.explicit,value:ui(S.value,A.value)}}return Pu(S,A,_,"axis")});d.setWithExplicit(_,x)}return d}function Wu(d,p,_,x,S){if("disable"===p)return void 0!==_;switch(_=_||{},p){case"titleAngle":case"labelAngle":return d===(Je(_.labelAngle)?_.labelAngle:$i(_.labelAngle));case"values":return!!_.values;case"encode":return!!_.encoding||!!_.labelAngle;case"title":if(d===Op(x,S))return!0}return d===_[p]}const Dl=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function JT(d,p){let _=p.axis(d);const x=new iw,S=Oo(p.encoding[d]),{mark:A,config:O}=p,P=_?.orient||O["x"===d?"axisX":"axisY"]?.orient||O.axis?.orient||function pC(d){return"x"===d?"bottom":"left"}(d),B=p.getScaleComponent(d).get("type"),q=function cC(d,p,_,x){const S="band"===p?["axisDiscrete","axisBand"]:"point"===p?["axisDiscrete","axisPoint"]:uy(p)?["axisQuantitative"]:"time"===p||"utc"===p?["axisTemporal"]:[],A="x"===d?"axisX":"axisY",O=Je(_)?"axisOrient":`axis${Mo(_)}`,P=[...S,...S.map(q=>A+q.substr(4))],B=["axis",O,A];return{vlOnlyAxisConfig:yx(P,x,d,_),vgAxisConfig:yx(B,x,d,_),axisConfigStyle:uC([...B,...P],x)}}(d,B,P,p.config),G=void 0!==_?!_:bx("disable",O.style,_?.style,q).configValue;if(x.set("disable",G,void 0!==_),G)return x;_=_||{};const ee=function xx(d,p,_,x,S){const A=p?.labelAngle;if(void 0!==A)return Je(A)?A:$i(A);{const{configValue:O}=bx("labelAngle",x,p?.style,S);return void 0!==O?$i(O):_!==Ri||!St([wv,Os],d.type)||dt(d)&&d.timeUnit?void 0:270}}(S,_,d,O.style,q),se=gy(_.formatType,S,B),Ee=Hf(S,S.type,_.format,_.formatType,O,!0),De={fieldOrDatumDef:S,axis:_,channel:d,model:p,scaleType:B,orient:P,labelAngle:ee,format:Ee,formatType:se,mark:A,config:O};for(const Ye of Mb){const bt=Ye in dC?dC[Ye](De):wy(Ye)?_[Ye]:void 0,kn=void 0!==bt,dn=Wu(bt,Ye,_,p,d);if(kn&&dn)x.set(Ye,bt,dn);else{const{configValue:vi,configFrom:lr}=wy(Ye)&&"values"!==Ye?bx(Ye,O.style,_.style,q):{},ca=void 0!==vi;kn&&!ca?x.set(Ye,bt,dn):("vgAxisConfig"!==lr||Dl.has(Ye)&&ca||Xf(vi)||Je(vi))&&x.set(Ye,vi,!1)}}const Re=_.encoding??{},Le=yE.reduce((Ye,bt)=>{if(!x.hasAxisPart(bt))return Ye;const kn=Ax(Re[bt]??{},p),dn="labels"===bt?function rw(d,p,_){const{encoding:x,config:S}=d,A=Oo(x[p])??Oo(x[Or(p)]),O=d.axis(p)||{},{format:P,formatType:B}=O;if(Uc(B))return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:P,formatType:B,config:S}),..._};if(void 0===P&&void 0===B&&S.customFormatTypes){if("quantitative"===Qr(A)){if(Dd(A)&&"normalize"===A.stack&&S.normalizedNumberFormatType)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.normalizedNumberFormat,formatType:S.normalizedNumberFormatType,config:S}),..._};if(S.numberFormatType)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.numberFormat,formatType:S.numberFormatType,config:S}),..._}}if("temporal"===Qr(A)&&S.timeFormatType&&dt(A)&&!A.timeUnit)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.timeFormat,formatType:S.timeFormatType,config:S}),..._}}return _}(p,d,kn):kn;return void 0!==dn&&!Gt(dn)&&(Ye[bt]={update:dn}),Ye},{});return Gt(Le)||x.set("encode",Le,!!_.encoding||void 0!==_.labelAngle),x}function Jp(d,p){const{config:_}=d;return{..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d),...gs("angle",d),...Jd(d,0,p)}}function Jd(d,p,_){return _?{shape:{value:_}}:gs("shape",d)}function QC(d,p,_){if(void 0===Ji("align",d,_))return"center"}function kb(d,p,_){if(void 0===Ji("baseline",d,_))return"middle"}function Qg(d){const{config:p,markDef:_}=d,{orient:x}=_,S="horizontal"===x?"width":"height",A=d.getScaleComponent("horizontal"===x?"x":"y"),O=Ji("size",_,p,{vgChannel:S})??p.tick.bandSize;if(void 0!==O)return O;{const P=A?A.get("range"):void 0;return P&&ht(P)&&re.isNumber(P.step)?3*P.step/4:3*pr(p.view,S)/4}}const Ur={arc:{vgMark:"arc",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...El(d,"radius"),...El(d,"theta")})},area:{vgMark:"area",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...$u("x",d,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===d.markDef.orient}),...$u("y",d,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===d.markDef.orient}),...Sg(d)})},bar:{vgMark:"rect",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y")})},circle:{vgMark:"symbol",encodeEntry:d=>Jp(d,"circle")},geoshape:{vgMark:"shape",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:d=>{const{encoding:p}=d,_=p.shape;return[{type:"geoshape",projection:d.projectionName(),..._&&dt(_)&&_.type===Sa?{field:pt(_,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y"),...KE(d,"url")})},line:{vgMark:"line",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d,{vgChannel:"strokeWidth"}),...Sg(d)})},point:{vgMark:"symbol",encodeEntry:d=>Jp(d)},rect:{vgMark:"rect",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y")})},rule:{vgMark:"rule",encodeEntry:d=>{const{markDef:p}=d,_=p.orient;return d.encoding.x||d.encoding.y||d.encoding.latitude||d.encoding.longitude?{..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...$u("x",d,{defaultPos:"horizontal"===_?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==_}),...$u("y",d,{defaultPos:"vertical"===_?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==_}),...gs("size",d,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:d=>Jp(d,"square")},text:{vgMark:"text",encodeEntry:d=>{const{config:p,encoding:_}=d;return{..._s(d,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...KE(d),...gs("size",d,{vgChannel:"fontSize"}),...gs("angle",d),...aT("align",QC(d.markDef,0,p)),...aT("baseline",kb(d.markDef,0,p)),...Ia("radius",d,{defaultPos:null}),...Ia("theta",d,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:d=>{const{config:p,markDef:_}=d,x=_.orient,S="horizontal"===x?"width":"height",A="horizontal"===x?"height":"width";return{..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid",vgChannel:"xc"}),...Ia("y",d,{defaultPos:"mid",vgChannel:"yc"}),...gs("size",d,{defaultValue:Qg(d),vgChannel:S}),[A]:Ar(Ji("thickness",_,p))}}},trail:{vgMark:"trail",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d),...Sg(d)})}};function hh(d){if(St([wd,xd,H2],d.mark)){const p=Od(d.mark,d.encoding);if(p.length>0)return function rl(d,p){return[{name:d.getName("pathgroup"),type:"group",from:{facet:{name:_c+d.requestDataName(Vr.Main),data:d.requestDataName(Vr.Main),groupby:p}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Ib(d,{fromPrefix:_c})}]}(d,p)}else if(d.mark===_l){const p=rv.some(_=>Ji(_,d.markDef,d.config));if(d.stack&&!d.fieldDef("size")&&p)return function en(d){const[p]=Ib(d,{fromPrefix:cw}),_=d.scaleName(d.stack.fieldChannel),x=function(){return d.vgField(d.stack.fieldChannel,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},S=(q,G)=>`${q}(${[x({prefix:"min",suffix:"start",expr:G}),x({prefix:"max",suffix:"start",expr:G}),x({prefix:"min",suffix:"end",expr:G}),x({prefix:"max",suffix:"end",expr:G})].map(se=>`scale('${_}',${se})`).join(",")})`;let A,O;"x"===d.stack.fieldChannel?(A={...Sn(p.encode.update,["y","yc","y2","height",...rv]),x:{signal:S("min","datum")},x2:{signal:S("max","datum")},clip:{value:!0}},O={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},p.encode.update={...yt(p.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(A={...Sn(p.encode.update,["x","xc","x2","width"]),y:{signal:S("min","datum")},y2:{signal:S("max","datum")},clip:{value:!0}},O={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},p.encode.update={...yt(p.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const q of rv){const G=xu(q,d.markDef,d.config);p.encode.update[q]?(A[q]=p.encode.update[q],delete p.encode.update[q]):G&&(A[q]=Ar(G)),G&&(p.encode.update[q]={value:0})}const P=[];if(d.stack.groupbyChannels?.length>0)for(const q of d.stack.groupbyChannels){const G=d.fieldDef(q),ee=pt(G);ee&&P.push(ee),(G?.bin||G?.timeUnit)&&P.push(pt(G,{binSuffix:"end"}))}return A=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((q,G)=>{if(p.encode.update[G])return{...q,[G]:p.encode.update[G]};{const ee=xu(G,d.markDef,d.config);return void 0!==ee?{...q,[G]:Ar(ee)}:q}},A),A.stroke&&(A.strokeForeground={value:!0},A.strokeOffset={value:0}),[{type:"group",from:{facet:{data:d.requestDataName(Vr.Main),name:cw+d.requestDataName(Vr.Main),groupby:P,aggregate:{fields:[x({suffix:"start"}),x({suffix:"start"}),x({suffix:"end"}),x({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:A},marks:[{type:"group",encode:{update:O},marks:[p]}]}]}(d)}return Ib(d)}const _c="faceted_path_";const cw="stack_group_";function Ib(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""};const{mark:_,markDef:x,encoding:S,config:A}=d,O=ui(x.clip,function Jg(d){const p=d.getScaleComponent("x"),_=d.getScaleComponent("y");return!(!p?.get("selectionExtent")&&!_?.get("selectionExtent"))||void 0}(d),function e_(d){const p=d.component.projection;return!(!p||p.isFit)||void 0}(d)),P=F1(x),B=S.key,q=function JC(d){const{encoding:p,stack:_,mark:x,markDef:S,config:A}=d,O=p.order;if(!(!re.isArray(O)&&Ma(O)&&$t(O.value)||!O&&$t(Ji("order",S,A)))){if((re.isArray(O)||dt(O))&&!_)return LM(O,{expr:"datum"});if(yl(x)){const P="horizontal"===S.orient?"y":"x",B=p[P];if(dt(B)){const q=B.sort;return re.isArray(q)?{field:pt(B,{prefix:P,suffix:"sort_index",expr:"datum"})}:sa(q)?{field:pt({aggregate:vE(d.encoding)?q.op:void 0,field:q.field},{expr:"datum"})}:dE(q)?{field:pt(d.fieldDef(q.encoding),{expr:"datum"}),order:q.order}:null===q?void 0:{field:pt(B,{binSuffix:d.stack?.impute?"mid":void 0,expr:"datum"})}}return}}}(d),G=function Xi(d){if(!d.component.selection)return null;const p=We(d.component.selection).length;let _=p,x=d.parent;for(;x&&0===_;)_=We(x.component.selection).length,x=x.parent;return _?{interactive:p>0||"geoshape"===d.mark||!!d.encoding.tooltip}:null}(d),ee=Ji("aria",x,A),se=Ur[_].postEncodingTransform?Ur[_].postEncodingTransform(d):null;return[{name:d.getName("marks"),type:Ur[_].vgMark,...O?{clip:!0}:{},...P?{style:P}:{},...B?{key:B.field}:{},...q?{sort:q}:{},...G||{},...!1===ee?{aria:ee}:{},from:{data:p.fromPrefix+d.requestDataName(Vr.Main)},encode:{update:Ur[_].encodeEntry(d)},...se?{transform:se}:{}}]}class uw extends Wg{constructor(p,_,x){let S=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},A=arguments.length>4?arguments[4]:void 0;super(p,"unit",_,x,A,void 0,Ry(p)?p.view:void 0),ln(this,"markDef",void 0),ln(this,"encoding",void 0),ln(this,"specifiedScales",{}),ln(this,"stack",void 0),ln(this,"specifiedAxes",{}),ln(this,"specifiedLegends",{}),ln(this,"specifiedProjection",{}),ln(this,"selection",[]),ln(this,"children",[]);const O=Du(p.mark)?{...p.mark}:{type:p.mark},P=O.type;void 0===O.filled&&(O.filled=function PE(d,p,_){let{graticule:x}=_;if(x)return!1;const S=xu("filled",d,p),A=d.type;return ui(S,A!==np&&A!==wd&&A!==Su)}(O,A,{graticule:p.data&&cc(p.data)}));const B=this.encoding=function ug(d,p,_,x){const S={};for(const A of We(d))hl(A)||nt(Is(A));for(let A of wa){if(!d[A])continue;const O=d[A];if(us(A)){const P=ja(A),B=S[P];if(dt(B)&&V2(B.type)&&dt(O)&&!B.timeUnit){nt(Yh(P));continue}}if("angle"===A&&"arc"===p&&!d.theta&&(nt("Arc marks uses theta channel rather than angle, replacing angle with theta."),A=As),yA(d,A,p))if(A===He&&"line"===p&&ku(d[A])?.aggregate)nt("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");else if(A===be&&(_?"fill"in d:"stroke"in d))nt(Gm("encoding",{fill:"fill"in d,stroke:"stroke"in d}));else if(A===X0||A===Kl&&!re.isArray(O)&&!Ma(O)||A===W_&&re.isArray(O)){if(O){if(A===Kl){const P=d[A];if(Rv(P)){S[A]=P;continue}}S[A]=re.array(O).reduce((P,B)=>(dt(B)?P.push(cg(B,A)):nt(Nr(B,A)),P),[])}}else{if(A===W_&&null===O)S[A]=null;else if(!(dt(O)||Sd(O)||Ma(O)||hE(O)||Je(O))){nt(Nr(O,A));continue}S[A]=mA(O,A,x)}else nt(bo(A,p))}return S}(p.encoding||{},P,O.filled,A);this.markDef=FE(O,B,A),this.size=function Kg(d){let{encoding:p,size:_}=d;for(const x of Ql){const S=Mr(x);Fd(_[S])&&Wc(p[x])&&(delete _[S],nt(GM(S)))}return _}({encoding:B,size:Ry(p)?{...S,...p.width?{width:p.width}:{},...p.height?{height:p.height}:{}}:S}),this.stack=LA(this.markDef,B),this.specifiedScales=this.initScales(P,B),this.specifiedAxes=this.initAxes(B),this.specifiedLegends=this.initLegends(B),this.specifiedProjection=p.projection,this.selection=(p.params??[]).filter(q=>AA(q))}get hasProjection(){const{encoding:p}=this,_=this.mark===Jm,x=p&&CM.some(S=>Bn(p[S]));return _||x}scaleDomain(p){const _=this.specifiedScales[p];return _?_.domain:void 0}axis(p){return this.specifiedAxes[p]}legend(p){return this.specifiedLegends[p]}initScales(p,_){return ev.reduce((x,S)=>{const A=Oo(_[S]);return A&&(x[S]=this.initScale(A.scale??{})),x},{})}initScale(p){const{domain:_,range:x}=p,S=_o(p);return re.isArray(_)&&(S.domain=_.map(Ha)),re.isArray(x)&&(S.range=x.map(Ha)),S}initAxes(p){return Ql.reduce((_,x)=>{const S=p[x];if(Bn(S)||x===Ri&&Bn(p.x2)||x===mo&&Bn(p.y2)){const A=Bn(S)?S.axis:void 0;_[x]=A&&this.initAxis({...A})}return _},{})}initAxis(p){const _=We(p),x={};for(const S of _){const A=p[S];x[S]=Xf(A)?RM(A):Ha(A)}return x}initLegends(p){return N1.reduce((_,x)=>{const S=Oo(p[x]);if(S&&function Of(d){switch(d){case be:case Se:case Fe:case He:case ye:case _e:case Ts:case Hh:return!0;case nn:case gi:case lt:return!1}}(x)){const A=S.legend;_[x]=A&&_o(A)}return _},{})}parseData(){this.component.data=gc(this)}parseLayoutSize(){!function CR(d){const{size:p,component:_}=d;for(const x of Ql){const S=Mr(x);if(p[S]){const A=p[S];_.layoutSize.set(S,Fd(A)?"step":A,!0)}else{const A=SR(d,S);_.layoutSize.set(S,A,!1)}}}(this)}parseSelections(){this.component.selection=function oC(d,p){const _={},x=d.config.selection;if(!p||!p.length)return _;for(const S of p){const A=hn(S.name),O=S.select,P=re.isString(O)?O:O.type,B=re.isObject(O)?st(O):{type:P},q=x[P];for(const se in q)"fields"===se||"encodings"===se||("mark"===se&&(B[se]={...q[se],...B[se]}),(void 0===B[se]||!0===B[se])&&(B[se]=st(q[se]??B[se])));const G=_[A]={...B,name:A,type:P,init:S.value,bind:S.bind,events:re.isString(B.on)?re.parseSelector(B.on,"scope"):re.array(st(B.on))},ee=st(S);for(const se of gx)se.defined(G)&&se.parse&&se.parse(d,G,ee)}return _}(this,this.selection)}parseMarkGroup(){this.component.mark=hh(this)}parseAxesAndHeaders(){this.component.axes=function Fo(d){return Ql.reduce((p,_)=>(d.component.scales[_]&&(p[_]=[JT(_,d)]),p),{})}(this)}assembleSelectionTopLevelSignals(p){return function JA(d,p){let _=!1;for(const x of Dn(d.component.selection??{})){const S=x.name,A=re.stringValue(S+Hd);if(0===p.filter(P=>P.name===S).length){const B="point"===x.type?", true, true)":")";p.push({name:x.name,update:`${fR}(${A}, ${re.stringValue("global"===x.resolve?"union":x.resolve)}${B}`})}_=!0;for(const P of gx)P.defined(x)&&P.topLevelSignals&&(p=P.topLevelSignals(d,x,p))}return _&&0===p.filter(S=>"unit"===S.name).length&&p.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),Lu(p)}(this,p)}assembleSignals(){return[...Tg(this),...lR(this,[])]}assembleSelectionData(p){return function vg(d,p){const _=[...p],x=kp(d,{escape:!1});for(const S of Dn(d.component.selection??{})){const A={name:S.name+Hd};if(S.project.hasSelectionId&&(A.transform=[{type:"collect",sort:{field:Ya}}]),S.init){const P=S.project.items.map(HE);A.values=S.init.map(S.project.hasSelectionId?B=>({unit:x,[Ya]:eh(B,!1)[0]}):B=>({unit:x,fields:P,values:eh(B,!1)}))}_.filter(P=>P.name===S.name+Hd).length||_.push(A)}return _}(this,p)}assembleLayout(){return null}assembleLayoutSignals(){return cb(this)}assembleMarks(){let p=this.component.mark??[];return(!this.parent||!Hg(this.parent))&&(p=WE(this,p)),p.map(this.correctDataNames)}assembleGroupStyle(){const{style:p}=this.view||{};return void 0!==p?p:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(p){return xo(this.encoding,p)}fieldDef(p){return ku(this.encoding[p])}typedFieldDef(p){const _=this.fieldDef(p);return Yo(_)?_:null}}class eS extends Hu{constructor(p,_,x,S,A){super(p,"layer",_,x,A,p.resolve,p.view),ln(this,"children",void 0);const O={...S,...p.width?{width:p.width}:{},...p.height?{height:p.height}:{}};this.children=p.layer.map((P,B)=>{if(_p(P))return new eS(P,this,this.getName(`layer_${B}`),O,A);if(vl(P))return new uw(P,this,this.getName(`layer_${B}`),O,A);throw new Error(ov(P))})}parseData(){this.component.data=gc(this);for(const p of this.children)p.parseData()}parseLayoutSize(){!function ZT(d){ew(d),Zp(d,"width"),Zp(d,"height")}(this)}parseSelections(){this.component.selection={};for(const p of this.children){p.parseSelections();for(const _ of We(p.component.selection))this.component.selection[_]=p.component.selection[_]}}parseMarkGroup(){for(const p of this.children)p.parseMarkGroup()}parseAxesAndHeaders(){!function Ab(d){const{axes:p,resolve:_}=d.component,x={top:0,bottom:0,right:0,left:0};for(const S of d.children){S.parseAxesAndHeaders();for(const A of We(S.component.axes))_.axis[A]=Ig(d.component.resolve,A),"shared"===_.axis[A]&&(p[A]=XC(p[A],S.component.axes[A]),p[A]||(_.axis[A]="independent",delete p[A]))}for(const S of Ql){for(const A of d.children)if(A.component.axes[S]){if("independent"===_.axis[S]){p[S]=(p[S]??[]).concat(A.component.axes[S]);for(const O of A.component.axes[S]){const{value:P,explicit:B}=O.getWithExplicit("orient");if(!Je(P)){if(x[P]>0&&!B){const q=ow[P];x[P]>x[q]&&O.set("orient",q,!1)}x[P]++}}}delete A.component.axes[S]}if("independent"===_.axis[S]&&p[S]&&p[S].length>1)for(const[A,O]of(p[S]||[]).entries())A>0&&O.get("grid")&&!O.explicit.grid&&(O.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(p){return this.children.reduce((_,x)=>x.assembleSelectionTopLevelSignals(_),p)}assembleSignals(){return this.children.reduce((p,_)=>p.concat(_.assembleSignals()),Tg(this))}assembleLayoutSignals(){return this.children.reduce((p,_)=>p.concat(_.assembleLayoutSignals()),cb(this))}assembleSelectionData(p){return this.children.reduce((_,x)=>x.assembleSelectionData(_),p)}assembleGroupStyle(){const p=new Set;for(const x of this.children)for(const S of re.array(x.assembleGroupStyle()))p.add(S);const _=Array.from(p);return _.length>1?_:1===_.length?_[0]:void 0}assembleTitle(){let p=super.assembleTitle();if(p)return p;for(const _ of this.children)if(p=_.assembleTitle(),p)return p}assembleLayout(){return null}assembleMarks(){return function cx(d,p){for(const _ of d.children)uo(_)&&(p=WE(_,p));return p}(this,this.children.flatMap(p=>p.assembleMarks()))}assembleLegends(){return this.children.reduce((p,_)=>p.concat(_.assembleLegends()),rh(this))}}function Jr(d,p,_,x,S){if(_y(d))return new Sb(d,p,_,S);if(_p(d))return new eS(d,p,_,x,S);if(vl(d))return new uw(d,p,_,x,S);if(function TA(d){return mg(d)||Oy(d)||ME(d)}(d))return new a3(d,p,_,S);throw new Error(ov(d))}function t_(d,p,_,x){const S=x.component.layoutSize.get("width"),A=x.component.layoutSize.get("height");if(void 0===p?(p={type:"pad"},x.hasAxisOrientSignalRef()&&(p.resize=!0)):re.isString(p)&&(p={type:p}),S&&A&&function Bd(d){return"fit"===d||"fit-x"===d||"fit-y"===d}(p.type))if("step"===S&&"step"===A)nt(UM()),p.type="pad";else if("step"===S||"step"===A){const O="step"===S?"width":"height";nt(UM(If(O))),p.type=function aR(d){return d?`fit-${If(d)}`:"fit"}("width"===O?"height":"width")}return{...1===We(p).length&&p.type?"pad"===p.type?{}:{autosize:p.type}:{autosize:p},...Hy(_,!1),...Hy(d,!0)}}function ef(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},x=arguments.length>3?arguments[3]:void 0;const S=d.config?IA(d.config):void 0,A=[].concat(d.assembleSelectionData([]),function Jx(d,p){const _=[],x=Yg(_);let S=0;for(const O of d.sources){O.hasName()||(O.dataName="source_"+S++);const P=O.assemble();x(O,P)}for(const O of _)0===O.transform.length&&delete O.transform;let A=0;for(const[O,P]of _.entries())0===(P.transform??[]).length&&!P.source&&_.splice(A++,0,_.splice(O,1)[0]);for(const O of _)for(const P of O.transform??[])"lookup"===P.type&&(P.from=d.outputNodes[P.from].getSource());for(const O of _)O.name in p&&(O.values=p[O.name]);return _}(d.component.data,_)),O=d.assembleProjections(),P=d.assembleTitle(),B=d.assembleGroupStyle(),q=d.assembleGroupEncodeEntry(!0);let G=d.assembleLayoutSignals();G=G.filter(Ee=>"width"!==Ee.name&&"height"!==Ee.name||void 0===Ee.value||(p[Ee.name]=+Ee.value,!1));const{params:ee,...se}=p;return{$schema:"https://vega.github.io/schema/vega/v5.json",...d.description?{description:d.description}:{},...se,...P?{title:P}:{},...B?{style:B}:{},...q?{encode:{update:q}}:{},data:A,...O.length>0?{projections:O}:{},...d.assembleGroup([...G,...d.assembleSelectionTopLevelSignals([]),...pg(ee)]),...S?{config:S}:{},...x?{usermeta:x}:{}}}Ct.accessPathDepth=ro,Ct.accessPathWithDatum=Js,Ct.compile=function ph(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.logger&&function oy(d){return Xm=d,Xm}(p.logger),p.fieldTitle&&Gf(p.fieldTitle);try{const _=kE(re.mergeConfig(p.config,d.config)),x=YA(d,_),S=Jr(x,null,"",void 0,_);return S.parse(),function _R(d,p){jg(d.sources);let _=0,x=0;for(let S=0;S{"use strict";function Ct(ae,be,Se){return ae.fields=be||[],ae.fname=Se,ae}function re(ae){return null==ae?null:ae.fname}function Ii(ae){return null==ae?null:ae.fields}function sn(ae){return 1===ae.length?yi(ae[0]):Zn(ae)}tn.d(Ds,{$G:()=>Ho,$m:()=>Ri,BB:()=>Rc,Ds:()=>Vo,Dw:()=>St,EP:()=>Rt,FP:()=>wr,HD:()=>Wn,He:()=>At,Hq:()=>Li,IX:()=>Gt,J_:()=>$i,Jy:()=>ea,Kj:()=>xr,Kn:()=>ti,N3:()=>Oi,Oj:()=>Ii,QA:()=>Ot,Rg:()=>It,TS:()=>mo,TW:()=>vr,We:()=>ci,XW:()=>ls,Xr:()=>va,ZE:()=>Ct,ZU:()=>As,Zw:()=>qi,_k:()=>oi,a9:()=>Js,ay:()=>Ci,bM:()=>si,bV:()=>Qi,cG:()=>zo,dH:()=>fr,dI:()=>jo,el:()=>re,fE:()=>fe,fj:()=>ot,hj:()=>po,iL:()=>Be,id:()=>On,j2:()=>hn,jj:()=>dr,jn:()=>Uo,k:()=>Gr,kI:()=>Zi,kJ:()=>ei,kX:()=>N,kg:()=>Xr,l$:()=>We,l7:()=>Mi,m8:()=>Qn,mJ:()=>li,mK:()=>no,mS:()=>an,mf:()=>Dn,nr:()=>ro,qu:()=>Hi,rx:()=>Wi,sw:()=>Ao,t7:()=>Xl,u5:()=>cs,uU:()=>Br,vU:()=>Xt,vk:()=>Oc,yP:()=>Yl,yR:()=>Ut,yb:()=>ai,yl:()=>Ms});const yi=ae=>function(be){return be[ae]},Zn=ae=>{const be=ae.length;return function(Se){for(let Fe=0;Felt&&gi(),ye=lt=_e+1):"]"===nn&&(ye||Xt("Access path missing open bracket: "+ae),ye>0&&gi(),ye=0,lt=_e+1):_e>lt?gi():lt=_e+1}return ye&&Xt("Access path missing closing bracket: "+ae),Fe&&Xt("Access path missing closing quote: "+ae),_e>lt&&(_e++,gi()),be}function Rt(ae,be,Se){const Fe=oi(ae);return ae=1===Fe.length?Fe[0]:ae,Ct((Se&&Se.get||sn)(Fe),[ae],be||ae)}const On=Rt("id"),Ut=Ct(ae=>ae,[],"identity"),si=Ct(()=>0,[],"zero"),N=Ct(()=>1,[],"one"),ai=Ct(()=>!0,[],"true"),Gr=Ct(()=>!1,[],"false");function Yt(ae,be,Se){const Fe=[be].concat([].slice.call(Se));console[ae].apply(console,Fe)}const Li=0,dr=1,Br=2,Zi=3,zo=4;function Xr(ae,be){let Se=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yt,Fe=ae||Li;return{level(ye){return arguments.length?(Fe=+ye,this):Fe},error(){return Fe>=dr&&Se(be||"error","ERROR",arguments),this},warn(){return Fe>=Br&&Se(be||"warn","WARN",arguments),this},info(){return Fe>=Zi&&Se(be||"log","INFO",arguments),this},debug(){return Fe>=zo&&Se(be||"log","DEBUG",arguments),this}}}var ei=Array.isArray;function ti(ae){return ae===Object(ae)}const he=ae=>"__proto__"!==ae;function fe(){for(var ae=arguments.length,be=new Array(ae),Se=0;Se{for(const He in ye)"signals"===He?Fe.signals=Qe(Fe.signals,ye.signals):Be(Fe,He,ye[He],"legend"===He?{layout:1}:"style"===He||null);return Fe},{})}function Be(ae,be,Se,Fe){if(!he(be))return;let ye,He;if(ti(Se)&&!ei(Se))for(ye in He=ti(ae[be])?ae[be]:ae[be]={},Se)Fe&&(!0===Fe||Fe[ye])?Be(He,ye,Se[ye]):he(ye)&&(He[ye]=Se[ye]);else ae[be]=Se}function Qe(ae,be){if(null==ae)return be;const Se={},Fe=[];function ye(He){Se[He.name]||(Se[He.name]=1,Fe.push(He))}return be.forEach(ye),ae.forEach(ye),Fe}function ot(ae){return ae[ae.length-1]}function At(ae){return null==ae||""===ae?null:+ae}const st=ae=>be=>ae*Math.exp(be),Fn=ae=>be=>Math.log(ae*be),Sn=ae=>be=>Math.sign(be)*Math.log1p(Math.abs(be/ae)),yt=ae=>be=>Math.sign(be)*Math.expm1(Math.abs(be))*ae,kt=ae=>be=>be<0?-Math.pow(-be,ae):Math.pow(be,ae);function $t(ae,be,Se,Fe){const ye=Se(ae[0]),He=Se(ot(ae)),lt=(He-ye)*be;return[Fe(ye-lt),Fe(He-lt)]}function St(ae,be){return $t(ae,be,At,Ut)}function li(ae,be){var Se=Math.sign(ae[0]);return $t(ae,be,Fn(Se),st(Se))}function Ot(ae,be,Se){return $t(ae,be,kt(Se),kt(1/Se))}function qi(ae,be,Se){return $t(ae,be,Sn(Se),yt(Se))}function zr(ae,be,Se,Fe,ye){const He=Fe(ae[0]),lt=Fe(ot(ae)),_e=null!=be?Fe(be):(He+lt)/2;return[ye(_e+(He-_e)*Se),ye(_e+(lt-_e)*Se)]}function Ci(ae,be,Se){return zr(ae,be,Se,At,Ut)}function fr(ae,be,Se){const Fe=Math.sign(ae[0]);return zr(ae,be,Se,Fn(Fe),st(Fe))}function no(ae,be,Se,Fe){return zr(ae,be,Se,kt(Fe),kt(1/Fe))}function Qi(ae,be,Se,Fe){return zr(ae,be,Se,Sn(Fe),yt(Fe))}function an(ae){return 1+~~(new Date(ae).getMonth()/3)}function Oi(ae){return 1+~~(new Date(ae).getUTCMonth()/3)}function Gt(ae){return null!=ae?ei(ae)?ae:[ae]:[]}function We(ae,be,Se){let He,Fe=ae[0],ye=ae[1];return ye=Se-be?[be,Se]:[Fe=Math.min(Math.max(Fe,be),Se-He),Fe+He]}function Dn(ae){return"function"==typeof ae}const Jt="descending";function Hi(ae,be,Se){Se=Se||{},be=Gt(be)||[];const Fe=[],ye=[],He={},lt=Se.comparator||io;return Gt(ae).forEach((_e,nn)=>{null!=_e&&(Fe.push(be[nn]===Jt?-1:1),ye.push(_e=Dn(_e)?_e:Rt(_e,null,Se)),(Ii(_e)||[]).forEach(gi=>He[gi]=1))}),0===ye.length?null:Ct(lt(ye,Fe),Object.keys(He))}const hn=(ae,be)=>(aebe||null==be)&&null!=ae?1:(be=be instanceof Date?+be:be,(ae=ae instanceof Date?+ae:ae)!==ae&&be==be?-1:be!=be&&ae==ae?1:0),io=(ae,be)=>1===ae.length?xn(ae[0],be[0]):Mo(ae,be,ae.length),xn=(ae,be)=>function(Se,Fe){return hn(ae(Se),ae(Fe))*be},Mo=(ae,be,Se)=>(be.push(0),function(Fe,ye){let He,lt=0,_e=-1;for(;0===lt&&++_eae}function Vo(ae,be){let Se;return Fe=>{Se&&clearTimeout(Se),Se=setTimeout(()=>(be(Fe),Se=null),ae)}}function Mi(ae){for(let be,Se,Fe=1,ye=arguments.length;Felt&&(lt=ye))}else{for(ye=be(ae[Se]);Selt&&(lt=ye))}return[He,lt]}function jo(ae,be){const Se=ae.length;let ye,He,lt,_e,nn,Fe=-1;if(null==be){for(;++Fe=He){ye=lt=He;break}if(Fe===Se)return[-1,-1];for(_e=nn=Fe;++FeHe&&(ye=He,_e=Fe),lt=He){ye=lt=He;break}if(Fe===Se)return[-1,-1];for(_e=nn=Fe;++FeHe&&(ye=He,_e=Fe),ltFe(He)?be[He]:void 0,set(He,lt){return Fe(He)||(++ye.size,be[He]===ui&&--ye.empty),be[He]=lt,this},delete(He){return Fe(He)&&(--ye.size,++ye.empty,be[He]=ui),this},clear(){ye.size=ye.empty=0,ye.object=be={}},test(He){return arguments.length?(Se=He,ye):Se},clean(){const He={};let lt=0;for(const _e in be){const nn=be[_e];nn!==ui&&(!Se||!Se(nn))&&(He[_e]=nn,++lt)}ye.size=lt,ye.empty=0,ye.object=be=He}};return ae&&Object.keys(ae).forEach(He=>{ye.set(He,ae[He])}),ye}function Ms(ae,be,Se,Fe,ye,He){if(!Se&&0!==Se)return He;const lt=+Se;let gi,_e=ae[0],nn=ot(ae);nn<_e&&(gi=_e,_e=nn,nn=gi),gi=Math.abs(be-_e);const Ts=Math.abs(nn-be);return giHe&&(lt=ye,ye=He,He=lt),Fe=void 0===Fe||Fe,((Se=void 0===Se||Se)?ye<=ae:ye_e.replace(/\\(.)/g,"$1")):Gt(ae));const Fe=ae&&ae.length,ye=Se&&Se.get||sn,He=_e=>ye(be?[_e]:oi(_e));let lt;if(Fe)if(1===Fe){const _e=He(ae[0]);lt=function(nn){return""+_e(nn)}}else{const _e=ae.map(He);lt=function(nn){let gi=""+_e[0](nn),Ts=0;for(;++Ts{be={},Se={},Fe=0},He=(lt,_e)=>(++Fe>ae&&(Se=be,be={},Fe=1),be[lt]=_e);return ye(),{clear:ye,has:lt=>ro(be,lt)||ro(Se,lt),get:lt=>ro(be,lt)?be[lt]:ro(Se,lt)?He(lt,Se[lt]):void 0,set:(lt,_e)=>ro(be,lt)?be[lt]=_e:He(lt,_e)}}function mo(ae,be,Se,Fe){const ye=be.length,He=Se.length;if(!He)return be;if(!ye)return Se;const lt=Fe||new be.constructor(ye+He);let _e=0,nn=0,gi=0;for(;_e0?Se[nn++]:be[_e++];for(;_e=0;)Se+=ae;return Se}function Oc(ae,be,Se,Fe){const ye=Se||" ",He=ae+"",lt=be-He.length;return lt<=0?He:"left"===Fe?Wi(ye,lt)+He:"center"===Fe?Wi(ye,~~(lt/2))+He+Wi(ye,Math.ceil(lt/2)):He+Wi(ye,lt)}function Yl(ae){return ae&&ot(ae)-ae[0]||0}function Qn(ae){return ei(ae)?"["+ae.map(Qn)+"]":ti(ae)||Wn(ae)?JSON.stringify(ae).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):ae}function Ao(ae){return null==ae||""===ae?null:!(!ae||"false"===ae||"0"===ae||!ae)}const ta=ae=>po(ae)||$i(ae)?ae:Date.parse(ae);function As(ae,be){return be=be||ta,null==ae||""===ae?null:be(ae)}function Rc(ae){return null==ae||""===ae?null:ae+""}function It(ae){const be={},Se=ae.length;for(let Fe=0;Fe{"use strict";tn.r(Ds),tn.d(Ds,{Bounds:()=>Fo,CanvasHandler:()=>sm,CanvasRenderer:()=>lS,DATE:()=>ja,DAY:()=>wa,DAYOFYEAR:()=>fd,Dataflow:()=>xd,Debug:()=>N.cG,Error:()=>N.jj,EventStream:()=>so,Gradient:()=>qp,GroupItem:()=>Ab,HOURS:()=>Pc,Handler:()=>rm,HybridHandler:()=>QR,HybridRenderer:()=>wk,Info:()=>N.kI,Item:()=>ow,MILLISECONDS:()=>hd,MINUTES:()=>Rr,MONTH:()=>na,Marks:()=>eu,MultiPulse:()=>Xo,None:()=>N.Hq,Operator:()=>ar,Parameters:()=>vv,Pulse:()=>Go,QUARTER:()=>Mr,RenderType:()=>l_,Renderer:()=>bc,ResourceLoader:()=>XC,SECONDS:()=>rn,SVGHandler:()=>LR,SVGRenderer:()=>xw,SVGStringRenderer:()=>V3,Scenegraph:()=>b3,TIME_UNITS:()=>M2,Transform:()=>ze,View:()=>hj,WEEK:()=>To,Warn:()=>N.uU,YEAR:()=>Or,accessor:()=>N.ZE,accessorFields:()=>N.Oj,accessorName:()=>N.el,array:()=>N.IX,ascending:()=>N.j2,bandwidthNRD:()=>rp,bin:()=>Au,bootstrapCI:()=>sE,boundClip:()=>H3,boundContext:()=>kb,boundItem:()=>OR,boundMark:()=>s_,boundStroke:()=>Dl,changeset:()=>Lf,clampRange:()=>N.l$,codegenExpression:()=>gV,compare:()=>N.qu,constant:()=>N.a9,cumulativeLogNormal:()=>Hc,cumulativeNormal:()=>sc,cumulativeUniform:()=>Wf,dayofyear:()=>k2,debounce:()=>N.Ds,defaultLocale:()=>XM,definition:()=>np,densityLogNormal:()=>kv,densityNormal:()=>Xa,densityUniform:()=>op,domChild:()=>js,domClear:()=>mr,domCreate:()=>a_,domFind:()=>pk,dotbin:()=>aE,error:()=>N.vU,expressionFunction:()=>xs,extend:()=>N.l7,extent:()=>N.We,extentIndex:()=>N.dI,falsy:()=>N.k,fastmap:()=>N.Xr,field:()=>N.EP,flush:()=>N.yl,font:()=>im,fontFamily:()=>gh,fontSize:()=>hi,format:()=>Ym,formatLocale:()=>iy,formats:()=>gl,hasOwnProperty:()=>N.nr,id:()=>N.id,identity:()=>N.yR,inferType:()=>U1,inferTypes:()=>_d,ingest:()=>Ti,inherits:()=>N.XW,inrange:()=>N.u5,interpolate:()=>kC,interpolateColors:()=>_b,interpolateRange:()=>Vx,intersect:()=>tN,intersectBoxLine:()=>Jg,intersectPath:()=>cw,intersectPoint:()=>en,intersectRule:()=>Ib,isArray:()=>N.kJ,isBoolean:()=>N.jn,isDate:()=>N.J_,isFunction:()=>N.mf,isIterable:()=>N.TW,isNumber:()=>N.hj,isObject:()=>N.Kn,isRegExp:()=>N.Kj,isString:()=>N.HD,isTuple:()=>ly,key:()=>N.Jy,lerp:()=>N.t7,lineHeight:()=>Qc,loader:()=>Pf,locale:()=>GM,logger:()=>N.kg,lruCache:()=>N.$m,markup:()=>GR,merge:()=>N.TS,mergeConfig:()=>N.fE,multiLineOffset:()=>r_,one:()=>N.kX,pad:()=>N.vk,panLinear:()=>N.Dw,panLog:()=>N.mJ,panPow:()=>N.QA,panSymlog:()=>N.Zw,parse:()=>cd,parseExpression:()=>gD,parseSelector:()=>yj,path:()=>ex,pathCurves:()=>qx,pathEqual:()=>pS,pathParse:()=>Gp,pathRectangle:()=>Vs,pathRender:()=>xb,pathSymbols:()=>GT,pathTrail:()=>Xp,peek:()=>N.fj,point:()=>mk,projection:()=>dF,quantileLogNormal:()=>Ed,quantileNormal:()=>ao,quantileUniform:()=>cE,quantiles:()=>py,quantizeInterpolator:()=>Bg,quarter:()=>N.mS,quartiles:()=>rE,random:()=>oc,randomInteger:()=>tg,randomKDE:()=>Uc,randomLCG:()=>X2,randomLogNormal:()=>Ns,randomMixture:()=>Hf,randomNormal:()=>Fi,randomUniform:()=>uE,read:()=>Wa,regressionConstant:()=>ng,regressionExp:()=>fE,regressionLinear:()=>dE,regressionLoess:()=>Tu,regressionLog:()=>sa,regressionPoly:()=>_y,regressionPow:()=>og,regressionQuad:()=>Zr,renderModule:()=>hS,repeat:()=>N.rx,resetDefaultLocale:()=>G$,resetSVGClipId:()=>iw,resetSVGDefIds:()=>q3,responseType:()=>Zh,runtimeContext:()=>v9,sampleCurve:()=>qf,sampleLogNormal:()=>Tv,sampleNormal:()=>my,sampleUniform:()=>gy,scale:()=>Yn,sceneEqual:()=>iN,sceneFromJSON:()=>hk,scenePickVisit:()=>_,sceneToJSON:()=>y3,sceneVisit:()=>p,sceneZOrder:()=>d,scheme:()=>Vg,serializeXML:()=>Ae,setHybridRendererOptions:()=>h8,setRandom:()=>oE,span:()=>N.yP,splitAccessPath:()=>N._k,stringValue:()=>N.m8,textMetrics:()=>yc,timeBin:()=>Q_,timeFloor:()=>$e,timeFormatLocale:()=>hv,timeInterval:()=>Of,timeOffset:()=>pd,timeSequence:()=>X_,timeUnitSpecifier:()=>q$,timeUnits:()=>T2,toBoolean:()=>N.sw,toDate:()=>N.ZU,toNumber:()=>N.He,toSet:()=>N.Rg,toString:()=>N.BB,transform:()=>lA,transforms:()=>wd,truncate:()=>N.$G,truthy:()=>N.yb,tupleid:()=>Kt,typeParsers:()=>oy,utcFloor:()=>J0,utcInterval:()=>Bm,utcOffset:()=>O2,utcSequence:()=>tv,utcdayofyear:()=>Yr,utcquarter:()=>N.N3,utcweek:()=>Q0,version:()=>E1,visitArray:()=>N.FP,week:()=>DM,writeConfig:()=>N.iL,zero:()=>N.bM,zoomLinear:()=>N.ay,zoomLog:()=>N.dH,zoomPow:()=>N.mK,zoomSymlog:()=>N.bV});var Ct={};tn.r(Ct),tn.d(Ct,{aggregate:()=>Md,bin:()=>Pv,collect:()=>lp,compare:()=>cp,countpattern:()=>lg,cross:()=>pA,density:()=>Ad,dotbin:()=>kd,expression:()=>Xf,extent:()=>$v,facet:()=>Bv,field:()=>wy,filter:()=>zv,flatten:()=>vl,fold:()=>Id,formula:()=>xo,generate:()=>Yf,impute:()=>Vv,joinaggregate:()=>xE,kde:()=>Ey,key:()=>Uv,load:()=>Hv,lookup:()=>Sy,multiextent:()=>qv,multivalues:()=>dg,params:()=>Dy,pivot:()=>xA,prefacet:()=>My,project:()=>Ru,proxy:()=>EE,quantile:()=>fp,relay:()=>CA,sample:()=>Ay,sequence:()=>CE,sieve:()=>Rd,subflow:()=>Ou,timeunit:()=>hp,tupleindex:()=>Gv,values:()=>ps,window:()=>Ty});var re={};tn.r(re),tn.d(re,{interpolate:()=>wl,interpolateArray:()=>nT,interpolateBasis:()=>XE,interpolateBasisClosed:()=>Ep,interpolateCubehelix:()=>pR,interpolateCubehelixLong:()=>mR,interpolateDate:()=>rT,interpolateDiscrete:()=>pC,interpolateHcl:()=>hb,interpolateHclLong:()=>Rg,interpolateHsl:()=>gT,interpolateHslLong:()=>_T,interpolateHue:()=>r3,interpolateLab:()=>wC,interpolateNumber:()=>dc,interpolateNumberArray:()=>Yy,interpolateObject:()=>gs,interpolateRgb:()=>Ro,interpolateRgbBasis:()=>KE,interpolateRgbBasisClosed:()=>jd,interpolateRound:()=>Ky,interpolateString:()=>dR,interpolateTransformCss:()=>kg,interpolateTransformSvg:()=>Cx,interpolateZoom:()=>yC,piecewise:()=>lC,quantize:()=>xT});var Ii={};tn.r(Ii),tn.d(Ii,{bound:()=>aN,identifier:()=>cN,mark:()=>iB,overlap:()=>dN,render:()=>cB,viewlayout:()=>yN});var sn={};tn.r(sn),tn.d(sn,{axisticks:()=>vN,datajoin:()=>vB,encode:()=>xB,legendentries:()=>wB,linkpath:()=>Ok,pie:()=>vs,scale:()=>lm,sortitems:()=>MN,stack:()=>Fk});var yi={};tn.r(yi),tn.d(yi,{contour:()=>dI,geojson:()=>yF,geopath:()=>bF,geopoint:()=>vF,geoshape:()=>pI,graticule:()=>Jb,heatmap:()=>__,isocontour:()=>gF,kde2d:()=>Az,projection:()=>Oz});var Zn={};tn.r(Zn),tn.d(Zn,{force:()=>mm});var Xt={};tn.r(Xt),tn.d(Xt,{nest:()=>GF,pack:()=>zS,partition:()=>YF,stratify:()=>KF,tree:()=>NI,treelinks:()=>ZF,treemap:()=>l5});var oi={};tn.r(oi),tn.d(oi,{label:()=>JF});var Rt={};tn.r(Rt),tn.d(Rt,{loess:()=>eP,regression:()=>GS});var On={};tn.r(On),tn.d(On,{voronoi:()=>OP});var Ut={};tn.r(Ut),tn.d(Ut,{wordcloud:()=>FP});var si={};tn.r(si),tn.d(si,{crossfilter:()=>XI,resolvefilter:()=>YI});var N=tn(537),ai=tn(861),Gr={},Yt={},Li=34,dr=10,Br=13;function Zi(i){return new Function("d","return {"+i.map(function(o,a){return JSON.stringify(o)+": d["+a+'] || ""'}).join(",")+"}")}function Xr(i){var o=Object.create(null),a=[];return i.forEach(function(l){for(var u in l)u in o||a.push(o[u]=u)}),a}function ei(i,o){var a=i+"",l=a.length;return l=I?z=!0:(Z=C.charCodeAt(k++))===dr?V=!0:Z===Br&&(V=!0,C.charCodeAt(k)===dr&&++k),C.slice(H+1,Y-1).replace(/""/g,'"')}for(;k9999?"+"+ei(i,6):ei(i,4)}(i.getUTCFullYear())+"-"+ei(i.getUTCMonth()+1,2)+"-"+ei(i.getUTCDate(),2)+(u?"T"+ei(o,2)+":"+ei(a,2)+":"+ei(l,2)+"."+ei(u,3)+"Z":l?"T"+ei(o,2)+":"+ei(a,2)+":"+ei(l,2)+"Z":a||o?"T"+ei(o,2)+":"+ei(a,2)+"Z":"")}(C):o.test(C+="")?'"'+C.replace(/"/g,'""')+'"':C}return{parse:function l(C,D){var T,I,k=u(C,function(F,L){if(T)return T(F,L-1);I=F,T=D?function zo(i,o){var a=Zi(i);return function(l,u){return o(a(l),u,i)}}(F,D):Zi(F)});return k.columns=I||[],k},parseRows:u,format:function m(C,D){return null==D&&(D=Xr(C)),[D.map(w).join(i)].concat(f(C,D)).join("\n")},formatBody:function g(C,D){return null==D&&(D=Xr(C)),f(C,D).join("\n")},formatRows:function b(C){return C.map(v).join("\n")},formatRow:v,formatValue:w}}function Qe(i){return i}function At(i,o){return"string"==typeof o&&(o=i.objects[o]),"GeometryCollection"===o.type?{type:"FeatureCollection",features:o.geometries.map(function(a){return st(i,a)})}:st(i,o)}function st(i,o){var a=o.id,l=o.bbox,u=null==o.properties?{}:o.properties,f=Fn(i,o);return null==a&&null==l?{type:"Feature",properties:u,geometry:f}:null==l?{type:"Feature",id:a,properties:u,geometry:f}:{type:"Feature",id:a,bbox:l,properties:u,geometry:f}}function Fn(i,o){var a=function ot(i){if(null==i)return Qe;var o,a,l=i.scale[0],u=i.scale[1],f=i.translate[0],m=i.translate[1];return function(g,b){b||(o=a=0);var v=2,w=g.length,C=new Array(w);for(C[0]=(o+=g[0])*l+f,C[1]=(a+=g[1])*u+m;v1)l=function $t(i,o,a){var f,l=[],u=[];function m(C){var D=C<0?~C:C;(u[D]||(u[D]=[])).push({i:C,g:f})}function g(C){C.forEach(m)}function b(C){C.forEach(g)}return function w(C){switch(f=C,C.type){case"GeometryCollection":C.geometries.forEach(w);break;case"LineString":g(C.arcs);break;case"MultiLineString":case"Polygon":b(C.arcs);break;case"MultiPolygon":!function v(C){C.forEach(b)}(C.arcs)}}(o),u.forEach(null==a?function(C){l.push(C[0].i)}:function(C){a(C[0].g,C[C.length-1].g)&&l.push(C[0].i)}),l}(0,o,a);else for(u=0,l=new Array(f=i.arcs.length);u=St?10:f>=li?5:f>=Ot?2:1;let g,b,v;return u<0?(v=Math.pow(10,-u)/m,g=Math.round(i*v),b=Math.round(o*v),g/vo&&--b,v=-v):(v=Math.pow(10,u)*m,g=Math.round(i/v),b=Math.round(o/v),g*vo&&--b),b0))return[];if((i=+i)==(o=+o))return[i];const l=o=u))return[];const g=f-u+1,b=new Array(g);if(l)if(m<0)for(let v=0;v=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qi(i){if(!(o=no.exec(i)))throw new Error("invalid format: "+i);var o;return new an({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}function an(i){this.fill=void 0===i.fill?" ":i.fill+"",this.align=void 0===i.align?">":i.align+"",this.sign=void 0===i.sign?"-":i.sign+"",this.symbol=void 0===i.symbol?"":i.symbol+"",this.zero=!!i.zero,this.width=void 0===i.width?void 0:+i.width,this.comma=!!i.comma,this.precision=void 0===i.precision?void 0:+i.precision,this.trim=!!i.trim,this.type=void 0===i.type?"":i.type+""}function Gt(i,o){if((a=(i=o?i.toExponential(o-1):i.toExponential()).indexOf("e"))<0)return null;var a,l=i.slice(0,a);return[l.length>1?l[0]+l.slice(2):l,+i.slice(a+1)]}function We(i){return(i=Gt(Math.abs(i)))?i[1]:NaN}function Dn(i,o){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(We(o)/3)))-We(Math.abs(i)))}function Jt(i,o){return i=Math.abs(i),o=Math.abs(o)-i,Math.max(0,We(o)-We(i))+1}function Hi(i){return Math.max(0,-We(Math.abs(i)))}function Vo(i,o){var a=Gt(i,o);if(!a)return i+"";var l=a[0],u=a[1];return u<0?"0."+new Array(-u).join("0")+l:l.length>u+1?l.slice(0,u+1)+"."+l.slice(u+1):l+new Array(u-l.length+2).join("0")}Qi.prototype=an.prototype,an.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 Mi={"%":(i,o)=>(100*i).toFixed(o),b:i=>Math.round(i).toString(2),c:i=>i+"",d:function Oi(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)},e:(i,o)=>i.toExponential(o),f:(i,o)=>i.toFixed(o),g:(i,o)=>i.toPrecision(o),o:i=>Math.round(i).toString(8),p:(i,o)=>Vo(100*i,o),r:Vo,s:function Js(i,o){var a=Gt(i,o);if(!a)return i+"";var l=a[0],u=a[1],f=u-(Mo=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,m=l.length;return f===m?l:f>m?l+new Array(f-m+1).join("0"):f>0?l.slice(0,f)+"."+l.slice(f):"0."+new Array(1-f).join("0")+Gt(i,Math.max(0,o+f-1))[0]},X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function ci(i){return i}var ui,va,Ms,jo=Array.prototype.map,Si=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ro(i){var o=void 0===i.grouping||void 0===i.thousands?ci:function hn(i,o){return function(a,l){for(var u=a.length,f=[],m=0,g=i[0],b=0;u>0&&g>0&&(b+g+1>l&&(g=Math.max(1,l-b)),f.push(a.substring(u-=g,u+g)),!((b+=g+1)>l));)g=i[m=(m+1)%i.length];return f.reverse().join(o)}}(jo.call(i.grouping,Number),i.thousands+""),a=void 0===i.currency?"":i.currency[0]+"",l=void 0===i.currency?"":i.currency[1]+"",u=void 0===i.decimal?".":i.decimal+"",f=void 0===i.numerals?ci:function io(i){return function(o){return o.replace(/[0-9]/g,function(a){return i[+a]})}}(jo.call(i.numerals,String)),m=void 0===i.percent?"%":i.percent+"",g=void 0===i.minus?"\u2212":i.minus+"",b=void 0===i.nan?"NaN":i.nan+"";function v(C){var D=(C=Qi(C)).fill,T=C.align,I=C.sign,k=C.symbol,F=C.zero,L=C.width,z=C.comma,V=C.precision,U=C.trim,W=C.type;"n"===W?(z=!0,W="g"):Mi[W]||(void 0===V&&(V=12),U=!0,W="g"),(F||"0"===D&&"="===T)&&(F=!0,D="0",T="=");var Y="$"===k?a:"#"===k&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",H="$"===k?l:/[%p]/.test(W)?m:"",Z=Mi[W],te=/[defgprs%]/.test(W);function ce(le){var Q,J,oe,ve=Y,xe=H;if("c"===W)xe=Z(le)+xe,le="";else{var we=(le=+le)<0||1/le<0;if(le=isNaN(le)?b:Z(Math.abs(le),V),U&&(le=function xn(i){e:for(var u,o=i.length,a=1,l=-1;a0&&(l=0)}return l>0?i.slice(0,l)+i.slice(u+1):i}(le)),we&&0==+le&&"+"!==I&&(we=!1),ve=(we?"("===I?I:g:"-"===I||"("===I?"":I)+ve,xe=("s"===W?Si[8+Mo/3]:"")+xe+(we&&"("===I?")":""),te)for(Q=-1,J=le.length;++Q(oe=le.charCodeAt(Q))||oe>57){xe=(46===oe?u+le.slice(Q+1):le.slice(Q))+xe,le=le.slice(0,Q);break}}z&&!F&&(le=o(le,1/0));var ne=ve.length+le.length+xe.length,ge=ne>1)+ve+le+xe+ge.slice(ne);break;default:le=ge+ve+le+xe}return f(le)}return V=void 0===V?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V)),ce.toString=function(){return C+""},ce}return{format:v,formatPrefix:function w(C,D){var T=v(((C=Qi(C)).type="f",C)),I=3*Math.max(-8,Math.min(8,Math.floor(We(D)/3))),k=Math.pow(10,-I),F=Si[8+I/3];return function(L){return T(k*L)+F}}}}!function ls(i){ui=ro(i),va=ui.format,Ms=ui.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const cs=new Date,Uo=new Date;function $i(i,o,a,l){function u(f){return i(f=0===arguments.length?new Date:new Date(+f)),f}return u.floor=f=>(i(f=new Date(+f)),f),u.ceil=f=>(i(f=new Date(f-1)),o(f,1),i(f),f),u.round=f=>{const m=u(f),g=u.ceil(f);return f-m(o(f=new Date(+f),null==m?1:Math.floor(m)),f),u.range=(f,m,g)=>{const b=[];if(f=u.ceil(f),g=null==g?1:Math.floor(g),!(f0))return b;let v;do{b.push(v=new Date(+f)),o(f,g),i(f)}while(v$i(m=>{if(m>=m)for(;i(m),!f(m);)m.setTime(m-1)},(m,g)=>{if(m>=m)if(g<0)for(;++g<=0;)for(;o(m,-1),!f(m););else for(;--g>=0;)for(;o(m,1),!f(m););}),a&&(u.count=(f,m)=>(cs.setTime(+f),Uo.setTime(+m),i(cs),i(Uo),Math.floor(a(cs,Uo))),u.every=f=>(f=Math.floor(f),isFinite(f)&&f>0?f>1?u.filter(l?m=>l(m)%f==0:m=>u.count(0,m)%f==0):u:null)),u}const vr=1e3,po=6e4,xr=60*po,Wn=24*xr,ea=7*Wn,Xl=30*Wn,yu=365*Wn,Ri=$i(i=>i.setHours(0,0,0,0),(i,o)=>i.setDate(i.getDate()+o),(i,o)=>(o-i-(o.getTimezoneOffset()-i.getTimezoneOffset())*po)/Wn,i=>i.getDate()-1),Wi=$i(i=>{i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCDate(i.getUTCDate()+o)},(i,o)=>(o-i)/Wn,i=>i.getUTCDate()-1),Yl=$i(i=>{i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCDate(i.getUTCDate()+o)},(i,o)=>(o-i)/Wn,i=>Math.floor(i/Wn));function Ao(i){return $i(o=>{o.setDate(o.getDate()-(o.getDay()+7-i)%7),o.setHours(0,0,0,0)},(o,a)=>{o.setDate(o.getDate()+7*a)},(o,a)=>(a-o-(a.getTimezoneOffset()-o.getTimezoneOffset())*po)/ea)}const ta=Ao(0),As=Ao(1),Ho=(Ao(2),Ao(3),Ao(4));function nn(i){return $i(o=>{o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-i)%7),o.setUTCHours(0,0,0,0)},(o,a)=>{o.setUTCDate(o.getUTCDate()+7*a)},(o,a)=>(a-o)/ea)}Ao(5),Ao(6);const gi=nn(0),Ts=nn(1),Kl=(nn(2),nn(3),nn(4)),di=(nn(5),nn(6),$i(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,o)=>{i.setFullYear(i.getFullYear()+o)},(i,o)=>o.getFullYear()-i.getFullYear(),i=>i.getFullYear()));di.every=i=>isFinite(i=Math.floor(i))&&i>0?$i(o=>{o.setFullYear(Math.floor(o.getFullYear()/i)*i),o.setMonth(0,1),o.setHours(0,0,0,0)},(o,a)=>{o.setFullYear(o.getFullYear()+a*i)}):null;const za=$i(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCFullYear(i.getUTCFullYear()+o)},(i,o)=>o.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());za.every=i=>isFinite(i=Math.floor(i))&&i>0?$i(o=>{o.setUTCFullYear(Math.floor(o.getUTCFullYear()/i)*i),o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0)},(o,a)=>{o.setUTCFullYear(o.getUTCFullYear()+a*i)}):null;const Nc=$i(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,o)=>{i.setMonth(i.getMonth()+o)},(i,o)=>o.getMonth()-i.getMonth()+12*(o.getFullYear()-i.getFullYear()),i=>i.getMonth()),Mf=$i(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCMonth(i.getUTCMonth()+o)},(i,o)=>o.getUTCMonth()-i.getUTCMonth()+12*(o.getUTCFullYear()-i.getUTCFullYear()),i=>i.getUTCMonth()),Va=$i(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*vr-i.getMinutes()*po)},(i,o)=>{i.setTime(+i+o*xr)},(i,o)=>(o-i)/xr,i=>i.getHours()),K0=$i(i=>{i.setUTCMinutes(0,0,0)},(i,o)=>{i.setTime(+i+o*xr)},(i,o)=>(o-i)/xr,i=>i.getUTCHours()),Bi=$i(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*vr)},(i,o)=>{i.setTime(+i+o*po)},(i,o)=>(o-i)/po,i=>i.getMinutes()),R1=$i(i=>{i.setUTCSeconds(0,0)},(i,o)=>{i.setTime(+i+o*po)},(i,o)=>(o-i)/po,i=>i.getUTCMinutes()),qh=$i(i=>{i.setTime(i-i.getMilliseconds())},(i,o)=>{i.setTime(+i+o*vr)},(i,o)=>(o-i)/vr,i=>i.getUTCSeconds()),Af=$i(()=>{},(i,o)=>{i.setTime(+i+o)},(i,o)=>o-i);function Tf(i,o){return null==i||null==o?NaN:io?1:i>=o?0:NaN}function SM(i,o){return null==i||null==o?NaN:oi?1:o>=i?0:NaN}function Fc(i){let o,a,l;function u(g,b,v=0,w=g.length){if(v>>1;a(g[C],b)<0?v=C+1:w=C}while(vTf(i(g),b),l=(g,b)=>i(g)-b):(o=i===Tf||i===SM?i:xa,a=i,l=i),{left:u,center:function m(g,b,v=0,w=g.length){const C=u(g,b,v,w-1);return C>v&&l(g[C-1],b)>-l(g[C],b)?C-1:C},right:function f(g,b,v=0,w=g.length){if(v>>1;a(g[C],b)<=0?v=C+1:w=C}while(v(i=Math.floor(i),isFinite(i)&&i>0?i>1?$i(o=>{o.setTime(Math.floor(o/i)*i)},(o,a)=>{o.setTime(+o+a*i)},(o,a)=>(a-o)/i):Af:null);const Or="year",Mr="quarter",na="month",To="week",ja="date",wa="day",fd="dayofyear",Pc="hours",Rr="minutes",rn="seconds",hd="milliseconds",M2=[Or,Mr,na,To,ja,wa,fd,Pc,Rr,rn,hd],A2=M2.reduce((i,o,a)=>(i[o]=1+a,i),{});function T2(i){const o=(0,N.IX)(i).slice(),a={};return o.length||(0,N.vU)("Missing time unit."),o.forEach(u=>{(0,N.nr)(A2,u)?a[u]=1:(0,N.vU)(`Invalid time unit: ${u}.`)}),(a[To]||a[wa]?1:0)+(a[Mr]||a[na]||a[ja]?1:0)+(a[fd]?1:0)>1&&(0,N.vU)(`Incompatible time units: ${i}`),o.sort((u,f)=>A2[u]-A2[f]),o}const Ue={[Or]:"%Y ",[Mr]:"Q%q ",[na]:"%b ",[ja]:"%d ",[To]:"W%U ",[wa]:"%a ",[fd]:"%j ",[Pc]:"%H:00",[Rr]:"00:%M",[rn]:":%S",[hd]:".%L",[`${Or}-${na}`]:"%Y-%m ",[`${Or}-${na}-${ja}`]:"%Y-%m-%d ",[`${Pc}-${Rr}`]:"%H:%M"};function q$(i,o){const a=(0,N.l7)({},Ue,o),l=T2(i),u=l.length;let g,b,f="",m=0;for(m=0;mm;--g)if(b=l.slice(m,g).join("-"),null!=a[b]){f+=a[b],m=g;break}return f.trim()}const Tt=new Date;function q_(i){return Tt.setFullYear(i),Tt.setMonth(0),Tt.setDate(1),Tt.setHours(0,0,0,0),Tt}function k2(i){return Z0(new Date(i))}function DM(i){return $m(new Date(i))}function Z0(i){return Ri.count(q_(i.getFullYear())-1,i)}function $m(i){return ta.count(q_(i.getFullYear())-1,i)}function kf(i){return q_(i).getDay()}function Ql(i,o,a,l,u,f,m){if(0<=i&&i<100){const g=new Date(-1,o,a,l,u,f,m);return g.setFullYear(i),g}return new Date(i,o,a,l,u,f,m)}function Yr(i){return fi(new Date(i))}function Q0(i){return If(new Date(i))}function fi(i){const o=Date.UTC(i.getUTCFullYear(),0,1);return Wi.count(o-1,i)}function If(i){const o=Date.UTC(i.getUTCFullYear(),0,1);return gi.count(o-1,i)}function G_(i){return Tt.setTime(Date.UTC(i,0,1)),Tt.getUTCDay()}function us(i,o,a,l,u,f,m){if(0<=i&&i<100){const g=new Date(Date.UTC(-1,o,a,l,u,f,m));return g.setUTCFullYear(a.y),g}return new Date(Date.UTC(i,o,a,l,u,f,m))}function MM(i,o,a,l,u){const f=o||1,m=(0,N.fj)(i),g=(L,z,V)=>function jU(i,o,a,l){const u=a<=1?i:l?(f,m)=>l+a*Math.floor((i(f,m)-l)/a):(f,m)=>a*Math.floor(i(f,m)/a);return o?(f,m)=>o(u(f,m),m):u}(a[V=V||L],l[V],L===m&&f,z),b=new Date,v=(0,N.Rg)(i),w=v[Or]?g(Or):(0,N.a9)(2012),C=v[na]?g(na):v[Mr]?g(Mr):N.bM,D=v[To]&&v[wa]?g(wa,1,To+wa):v[To]?g(To,1):v[wa]?g(wa,1):v[ja]?g(ja,1):v[fd]?g(fd,1):N.kX,T=v[Pc]?g(Pc):N.bM,I=v[Rr]?g(Rr):N.bM,k=v[rn]?g(rn):N.bM,F=v[hd]?g(hd):N.bM;return function(L){b.setTime(+L);const z=w(b);return u(z,C(b),D(b,z),T(b),I(b),k(b),F(b))}}function Ai(i,o,a){return o+7*i-(a+6)%7}const UU={[Or]:i=>i.getFullYear(),[Mr]:i=>Math.floor(i.getMonth()/3),[na]:i=>i.getMonth(),[ja]:i=>i.getDate(),[Pc]:i=>i.getHours(),[Rr]:i=>i.getMinutes(),[rn]:i=>i.getSeconds(),[hd]:i=>i.getMilliseconds(),[fd]:i=>Z0(i),[To]:i=>$m(i),[To+wa]:(i,o)=>Ai($m(i),i.getDay(),kf(o)),[wa]:(i,o)=>Ai(1,i.getDay(),kf(o))},HU={[Mr]:i=>3*i,[To]:(i,o)=>Ai(i,0,kf(o))};function $e(i,o){return MM(i,o||1,UU,HU,Ql)}const AM={[Or]:i=>i.getUTCFullYear(),[Mr]:i=>Math.floor(i.getUTCMonth()/3),[na]:i=>i.getUTCMonth(),[ja]:i=>i.getUTCDate(),[Pc]:i=>i.getUTCHours(),[Rr]:i=>i.getUTCMinutes(),[rn]:i=>i.getUTCSeconds(),[hd]:i=>i.getUTCMilliseconds(),[fd]:i=>fi(i),[To]:i=>If(i),[wa]:(i,o)=>Ai(1,i.getUTCDay(),G_(o)),[To+wa]:(i,o)=>Ai(If(i),i.getUTCDay(),G_(o))},TM={[Mr]:i=>3*i,[To]:(i,o)=>Ai(i,0,G_(o))};function J0(i,o){return MM(i,o||1,AM,TM,us)}const N1={[Or]:di,[Mr]:Nc.every(3),[na]:Nc,[To]:ta,[ja]:Ri,[wa]:Ri,[fd]:Ri,[Pc]:Va,[Rr]:Bi,[rn]:qh,[hd]:Af},I2={[Or]:za,[Mr]:Mf.every(3),[na]:Mf,[To]:gi,[ja]:Wi,[wa]:Wi,[fd]:Wi,[Pc]:K0,[Rr]:R1,[rn]:qh,[hd]:Af};function Of(i){return N1[i]}function Bm(i){return I2[i]}function ev(i,o,a){return i?i.offset(o,a):void 0}function pd(i,o,a){return ev(Of(i),o,a)}function O2(i,o,a){return ev(Bm(i),o,a)}function kM(i,o,a,l){return i?i.range(o,a,l):void 0}function X_(i,o,a,l){return kM(Of(i),o,a,l)}function tv(i,o,a,l){return kM(Bm(i),o,a,l)}const Gh=6e4,Y_=60*Gh,nv=24*Y_,Ua=30*nv,K_=365*nv,md=[Or,na,ja,Pc,Rr,rn,hd],zm=md.slice(0,-1),pe=zm.slice(0,-1),Vm=pe.slice(0,-1),Xe=Vm.slice(0,-1),sr=[Or,na],oo=[Or],Lc=[[zm,1,1e3],[zm,5,5e3],[zm,15,15e3],[zm,30,3e4],[pe,1,Gh],[pe,5,5*Gh],[pe,15,15*Gh],[pe,30,30*Gh],[Vm,1,Y_],[Vm,3,3*Y_],[Vm,6,6*Y_],[Vm,12,12*Y_],[Xe,1,nv],[[Or,To],1,6048e5],[sr,1,Ua],[sr,3,3*Ua],[oo,1,K_]];function Q_(i){const o=i.extent,a=i.maxbins||40,l=Math.abs((0,N.yP)(o))/a;let f,m,u=Fc(g=>g[2]).right(Lc,l);return u===Lc.length?(f=oo,m=fr(o[0]/K_,o[1]/K_,a)):u?(u=Lc[l/Lc[u-1][2]=12)]},q:function Pe(je){return 1+~~(je.getMonth()/3)},Q:$c,s:Gm,S:ia,u:ov,U:VM,V:jM,w:UM,W:Tr,x:null,X:null,y:mt,Y:yo,Z:ra,"%":qm},U={a:function Ie(je){return m[je.getUTCDay()]},A:function Ne(je){return f[je.getUTCDay()]},b:function Ve(je){return b[je.getUTCMonth()]},B:function ft(je){return g[je.getUTCMonth()]},c:null,d:nc,e:nc,f:jn,g:sv,G:$n,H:Um,I:kr,j:Ca,L:wu,m:ty,M:P1,p:function Ke(je){return u[+(je.getUTCHours()>=12)]},q:function Dt(je){return 1+~~(je.getUTCMonth()/3)},Q:$c,s:Gm,S:Hm,u:Kr,U:Wm,V:Eu,w:ny,W:L1,x:null,X:null,y:Ff,Y:Yh,Z:av,"%":qm},W={a:function ce(je,tt,it){var Oe=T.exec(tt.slice(it));return Oe?(je.w=I.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},A:function le(je,tt,it){var Oe=C.exec(tt.slice(it));return Oe?(je.w=D.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},b:function ve(je,tt,it){var Oe=L.exec(tt.slice(it));return Oe?(je.m=z.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},B:function xe(je,tt,it){var Oe=k.exec(tt.slice(it));return Oe?(je.m=F.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},c:function Q(je,tt,it){return Z(je,o,tt,it)},d:F1,e:F1,f:$M,g:Jl,G:Ar,H:xu,I:xu,j:Ji,L:LM,m:R2,M:ey,p:function te(je,tt,it){var Oe=v.exec(tt.slice(it));return Oe?(je.p=w.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},q:ec,Q:BM,s:ln,S:PM,u:rv,U:RM,V:Ha,w:OM,W:NM,x:function J(je,tt,it){return Z(je,a,tt,it)},X:function oe(je,tt,it){return Z(je,l,tt,it)},y:Jl,Y:Ar,Z:FM,"%":Rn};function Y(je,tt){return function(it){var un,xt,ur,Oe=[],_t=-1,qt=0,Ln=je.length;for(it instanceof Date||(it=new Date(+it));++_t53)return null;"w"in Oe||(Oe.w=1),"Z"in Oe?(Ln=(qt=Ea(_o(Oe.y,0,1))).getUTCDay(),qt=Ln>4||0===Ln?Ts.ceil(qt):Ts(qt),qt=Wi.offset(qt,7*(Oe.V-1)),Oe.y=qt.getUTCFullYear(),Oe.m=qt.getUTCMonth(),Oe.d=qt.getUTCDate()+(Oe.w+6)%7):(Ln=(qt=iv(_o(Oe.y,0,1))).getDay(),qt=Ln>4||0===Ln?As.ceil(qt):As(qt),qt=Ri.offset(qt,7*(Oe.V-1)),Oe.y=qt.getFullYear(),Oe.m=qt.getMonth(),Oe.d=qt.getDate()+(Oe.w+6)%7)}else("W"in Oe||"U"in Oe)&&("w"in Oe||(Oe.w="u"in Oe?Oe.u%7:"W"in Oe?1:0),Ln="Z"in Oe?Ea(_o(Oe.y,0,1)).getUTCDay():iv(_o(Oe.y,0,1)).getDay(),Oe.m=0,Oe.d="W"in Oe?(Oe.w+6)%7+7*Oe.W-(Ln+5)%7:Oe.w+7*Oe.U-(Ln+6)%7);return"Z"in Oe?(Oe.H+=Oe.Z/100|0,Oe.M+=Oe.Z%100,Ea(Oe)):iv(Oe)}}function Z(je,tt,it,Oe){for(var un,xt,_t=0,qt=tt.length,Ln=it.length;_t=Ln)return-1;if(37===(un=tt.charCodeAt(_t++))){if(un=tt.charAt(_t++),!(xt=W[un in ds?tt.charAt(_t++):un])||(Oe=xt(je,it,Oe))<0)return-1}else if(un!=it.charCodeAt(Oe++))return-1}return Oe}return V.x=Y(a,V),V.X=Y(l,V),V.c=Y(o,V),U.x=Y(a,U),U.X=Y(l,U),U.c=Y(o,U),{format:function(je){var tt=Y(je+="",V);return tt.toString=function(){return je},tt},parse:function(je){var tt=H(je+="",!1);return tt.toString=function(){return je},tt},utcFormat:function(je){var tt=Y(je+="",U);return tt.toString=function(){return je},tt},utcParse:function(je){var tt=H(je+="",!0);return tt.toString=function(){return je},tt}}}var Bc,Nr,lv,bo,Is,ds={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,ht=/^%/,IM=/[\\^$*+?|[\]().{}]/g;function Ni(i,o,a){var l=i<0?"-":"",u=(l?-i:i)+"",f=u.length;return l+(f[o.toLowerCase(),a]))}function OM(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.w=+l[0],a+l[0].length):-1}function rv(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.u=+l[0],a+l[0].length):-1}function RM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.U=+l[0],a+l[0].length):-1}function Ha(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.V=+l[0],a+l[0].length):-1}function NM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.W=+l[0],a+l[0].length):-1}function Ar(i,o,a){var l=Je.exec(o.slice(a,a+4));return l?(i.y=+l[0],a+l[0].length):-1}function Jl(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.y=+l[0]+(+l[0]>68?1900:2e3),a+l[0].length):-1}function FM(i,o,a){var l=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(o.slice(a,a+6));return l?(i.Z=l[1]?0:-(l[2]+(l[3]||"00")),a+l[0].length):-1}function ec(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.q=3*l[0]-3,a+l[0].length):-1}function R2(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.m=l[0]-1,a+l[0].length):-1}function F1(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.d=+l[0],a+l[0].length):-1}function Ji(i,o,a){var l=Je.exec(o.slice(a,a+3));return l?(i.m=0,i.d=+l[0],a+l[0].length):-1}function xu(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.H=+l[0],a+l[0].length):-1}function ey(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.M=+l[0],a+l[0].length):-1}function PM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.S=+l[0],a+l[0].length):-1}function LM(i,o,a){var l=Je.exec(o.slice(a,a+3));return l?(i.L=+l[0],a+l[0].length):-1}function $M(i,o,a){var l=Je.exec(o.slice(a,a+6));return l?(i.L=Math.floor(l[0]/1e3),a+l[0].length):-1}function Rn(i,o,a){var l=ht.exec(o.slice(a,a+1));return l?a+l[0].length:-1}function BM(i,o,a){var l=Je.exec(o.slice(a));return l?(i.Q=+l[0],a+l[0].length):-1}function ln(i,o,a){var l=Je.exec(o.slice(a));return l?(i.s=+l[0],a+l[0].length):-1}function Ft(i,o){return Ni(i.getDate(),o,2)}function zM(i,o){return Ni(i.getHours(),o,2)}function Vt(i,o){return Ni(i.getHours()%12||12,o,2)}function fs(i,o){return Ni(1+Ri.count(di(i),i),o,3)}function Jn(i,o){return Ni(i.getMilliseconds(),o,3)}function Wo(i,o){return Jn(i,o)+"000"}function ks(i,o){return Ni(i.getMonth()+1,o,2)}function Nf(i,o){return Ni(i.getMinutes(),o,2)}function ia(i,o){return Ni(i.getSeconds(),o,2)}function ov(i){var o=i.getDay();return 0===o?7:o}function VM(i,o){return Ni(ta.count(di(i)-1,i),o,2)}function jm(i){var o=i.getDay();return o>=4||0===o?Ho(i):Ho.ceil(i)}function jM(i,o){return i=jm(i),Ni(Ho.count(di(i),i)+(4===di(i).getDay()),o,2)}function UM(i){return i.getDay()}function Tr(i,o){return Ni(As.count(di(i)-1,i),o,2)}function mt(i,o){return Ni(i.getFullYear()%100,o,2)}function _n(i,o){return Ni((i=jm(i)).getFullYear()%100,o,2)}function yo(i,o){return Ni(i.getFullYear()%1e4,o,4)}function tc(i,o){var a=i.getDay();return Ni((i=a>=4||0===a?Ho(i):Ho.ceil(i)).getFullYear()%1e4,o,4)}function ra(i){var o=i.getTimezoneOffset();return(o>0?"-":(o*=-1,"+"))+Ni(o/60|0,"0",2)+Ni(o%60,"0",2)}function nc(i,o){return Ni(i.getUTCDate(),o,2)}function Um(i,o){return Ni(i.getUTCHours(),o,2)}function kr(i,o){return Ni(i.getUTCHours()%12||12,o,2)}function Ca(i,o){return Ni(1+Wi.count(za(i),i),o,3)}function wu(i,o){return Ni(i.getUTCMilliseconds(),o,3)}function jn(i,o){return wu(i,o)+"000"}function ty(i,o){return Ni(i.getUTCMonth()+1,o,2)}function P1(i,o){return Ni(i.getUTCMinutes(),o,2)}function Hm(i,o){return Ni(i.getUTCSeconds(),o,2)}function Kr(i){var o=i.getUTCDay();return 0===o?7:o}function Wm(i,o){return Ni(gi.count(za(i)-1,i),o,2)}function Xh(i){var o=i.getUTCDay();return o>=4||0===o?Kl(i):Kl.ceil(i)}function Eu(i,o){return i=Xh(i),Ni(Kl.count(za(i),i)+(4===za(i).getUTCDay()),o,2)}function ny(i){return i.getUTCDay()}function L1(i,o){return Ni(Ts.count(za(i)-1,i),o,2)}function Ff(i,o){return Ni(i.getUTCFullYear()%100,o,2)}function sv(i,o){return Ni((i=Xh(i)).getUTCFullYear()%100,o,2)}function Yh(i,o){return Ni(i.getUTCFullYear()%1e4,o,4)}function $n(i,o){var a=i.getUTCDay();return Ni((i=a>=4||0===a?Kl(i):Kl.ceil(i)).getUTCFullYear()%1e4,o,4)}function av(){return"+0000"}function qm(){return"%"}function $c(i){return+i}function Gm(i){return Math.floor(+i/1e3)}function zc(i){const o={};return a=>o[a]||(o[a]=i(a))}function uv(i){const o=zc(i.format),a=i.formatPrefix;return{format:o,formatPrefix:a,formatFloat(l){const u=Qi(l||",");if(null==u.precision){switch(u.precision=12,u.type){case"%":u.precision-=2;break;case"e":u.precision-=1}return function cv(i,o){return a=>{const l=i(a),u=l.indexOf(o);if(u<0)return l;let f=function ml(i,o){let l,a=i.lastIndexOf("e");if(a>0)return a;for(a=i.length;--a>o;)if(l=i.charCodeAt(a),l>=48&&l<=57)return a+1}(l,u);const m=fu;)if("0"!==l[f]){++f;break}return l.slice(0,f)+m}}(o(u),o(".1f")(1)[1])}return o(u)},formatSpan(l,u,f,m){m=Qi(m??",f");const g=fr(l,u,f),b=Math.max(Math.abs(l),Math.abs(u));let v;if(null==m.precision)switch(m.type){case"s":return isNaN(v=Dn(g,b))||(m.precision=v),a(m,b);case"":case"e":case"g":case"p":case"r":isNaN(v=Jt(g,b))||(m.precision=v-("e"===m.type));break;case"f":case"%":isNaN(v=Hi(g))||(m.precision=v-2*("%"===m.type))}return o(m)}}}let B1,qM;function HM(){return B1=uv({format:va,formatPrefix:Ms})}function dv(i){return uv(ro(i))}function iy(i){return arguments.length?B1=dv(i):B1}function WM(i,o,a){(0,N.Kn)(a=a||{})||(0,N.vU)(`Invalid time multi-format specifier: ${a}`);const l=o(rn),u=o(Rr),f=o(Pc),m=o(ja),g=o(To),b=o(na),v=o(Mr),w=o(Or),C=i(a[hd]||".%L"),D=i(a[rn]||":%S"),T=i(a[Rr]||"%I:%M"),I=i(a[Pc]||"%I %p"),k=i(a[ja]||a[wa]||"%a %d"),F=i(a[To]||"%b %d"),L=i(a[na]||"%B"),z=i(a[Mr]||"%B"),V=i(a[Or]||"%Y");return U=>(l(U)(0,N.HD)(l)?o(l):WM(o,Of,l),utcFormat:l=>(0,N.HD)(l)?a(l):WM(a,Bm,l),timeParse:zc(i.parse),utcParse:zc(i.utcParse)}}function N2(){return qM=fv({format:Nr,parse:lv,utcFormat:bo,utcParse:Is})}function F2(i){return fv(pl(i))}function hv(i){return arguments.length?qM=F2(i):qM}!function $1(i){Bc=pl(i),Nr=Bc.format,lv=Bc.parse,bo=Bc.utcFormat,Is=Bc.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"]}),HM(),N2();const z1=(i,o)=>(0,N.l7)({},i,o);function GM(i,o){const a=i?dv(i):iy(),l=o?F2(o):hv();return z1(a,l)}function XM(i,o){const a=arguments.length;return a&&2!==a&&(0,N.vU)("defaultLocale expects either zero or two arguments."),a?z1(iy(i),hv(o)):z1(iy(),hv())}function G$(){return HM(),N2(),XM()}const X$=/^(data:|([A-Za-z]+:)?\/\/)/,Y$=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,P2=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,L2="file://";function KM(i,o){return ZM.apply(this,arguments)}function ZM(){return(ZM=(0,ai.Z)(function*(i,o){const a=yield this.sanitize(i,o),l=a.href;return a.localFile?this.file(l):this.http(l,o)})).apply(this,arguments)}function K$(i,o){return QM.apply(this,arguments)}function QM(){return(QM=(0,ai.Z)(function*(i,o){o=(0,N.l7)({},this.options,o);const a=this.fileAccess,l={href:null};let u,f,m;const g=Y$.test(i.replace(P2,""));(null==i||"string"!=typeof i||!g)&&(0,N.vU)("Sanitize failure, invalid URI: "+(0,N.m8)(i));const b=X$.test(i);return(m=o.baseURL)&&!b&&(!i.startsWith("/")&&!m.endsWith("/")&&(i="/"+i),i=m+i),f=(u=i.startsWith(L2))||"file"===o.mode||"http"!==o.mode&&!b&&a,u?i=i.slice(L2.length):i.startsWith("//")&&("file"===o.defaultProtocol?(i=i.slice(2),f=!0):i=(o.defaultProtocol||"http")+":"+i),Object.defineProperty(l,"localFile",{value:!!f}),l.href=i,o.target&&(l.target=o.target+""),o.rel&&(l.rel=o.rel+""),"image"===o.context&&o.crossOrigin&&(l.crossOrigin=o.crossOrigin+""),l})).apply(this,arguments)}function V1(i){return i?o=>new Promise((a,l)=>{i.readFile(o,(u,f)=>{u?l(u):a(f)})}):Kh}function Kh(){return j1.apply(this,arguments)}function j1(){return(j1=(0,ai.Z)(function*(){(0,N.vU)("No file system access.")})).apply(this,arguments)}function JM(i){return i?function(){var o=(0,ai.Z)(function*(a,l){const u=(0,N.l7)({},this.options.http,l),f=l&&l.response,m=yield i(a,u);return m.ok?(0,N.mf)(m[f])?m[f]():m.text():(0,N.vU)(m.status+""+m.statusText)});return function(a,l){return o.apply(this,arguments)}}():vo}function vo(){return ry.apply(this,arguments)}function ry(){return(ry=(0,ai.Z)(function*(){(0,N.vU)("No HTTP fetch method available.")})).apply(this,arguments)}const eA=i=>null!=i&&i==i,pv=i=>!(Number.isNaN(+i)||i instanceof Date),oy={boolean:N.sw,integer:N.He,number:N.He,date:N.ZU,string:N.BB,unknown:N.yR},mv=[i=>"true"===i||"false"===i||!0===i||!1===i,i=>pv(i)&&Number.isInteger(+i),pv,i=>!Number.isNaN(Date.parse(i))],nt=["boolean","integer","number","date"];function U1(i,o){if(!i||!i.length)return"unknown";const a=i.length,l=mv.length,u=mv.map((f,m)=>m+1);for(let g,b,f=0,m=0;f0===f?m:f,0)-1]}function _d(i,o){return o.reduce((a,l)=>(a[l]=U1(i,l),a),{})}function gv(i){const o=function(a,l){const u={delimiter:i};return H1(a,l?(0,N.l7)(l,u):u)};return o.responseType="text",o}function H1(i,o){return o.header&&(i=o.header.map(N.m8).join(o.delimiter)+"\n"+i),fe(o.delimiter).parse(i+"")}function er(i,o){const a=o&&o.property?(0,N.EP)(o.property):N.yR;return(0,N.Kn)(i)&&!function B2(i){return!("function"!=typeof Buffer||!(0,N.mf)(Buffer.isBuffer))&&Buffer.isBuffer(i)}(i)?function W1(i,o){return!(0,N.kJ)(i)&&(0,N.TW)(i)&&(i=[...i]),o&&o.copy?JSON.parse(JSON.stringify(i)):i}(a(i),o):a(JSON.parse(i))}H1.responseType="text",er.responseType="json";const sy={interior:(i,o)=>i!==o,exterior:(i,o)=>i===o};function oa(i,o){let a,l,u,f;return i=er(i,o),o&&o.feature?(a=At,u=o.feature):o&&o.mesh?(a=yt,u=o.mesh,f=sy[o.filter]):(0,N.vU)("Missing TopoJSON feature or mesh parameter."),l=(l=i.objects[u])?a(i,l,f):(0,N.vU)("Invalid TopoJSON object: "+u),l&&l.features||[l]}oa.responseType="json";const Ym={dsv:H1,csv:gv(","),tsv:gv("\t"),json:er,topojson:oa};function gl(i,o){return arguments.length>1?(Ym[i]=o,this):(0,N.nr)(Ym,i)?Ym[i]:null}function Zh(i){const o=gl(i);return o&&o.responseType||"text"}function Wa(i,o,a,l){const u=gl((o=o||{}).type||"json");return u||(0,N.vU)("Unknown data format type: "+o.type),i=u(i,o),o.parse&&function nA(i,o,a,l){if(!i.length)return;const u=hv();a=a||u.timeParse,l=l||u.utcParse;let m,g,b,v,w,C,f=i.columns||Object.keys(i[0]);"auto"===o&&(o=_d(i,f)),f=Object.keys(o);const D=f.map(T=>{const I=o[T];let k,F;if(I&&(I.startsWith("date:")||I.startsWith("utc:")))return k=I.split(/:(.+)?/,2),F=k[1],("'"===F[0]&&"'"===F[F.length-1]||'"'===F[0]&&'"'===F[F.length-1])&&(F=F.slice(1,-1)),("utc"===k[0]?l:a)(F);if(!oy[I])throw Error("Illegal format pattern: "+T+":"+I);return oy[I]});for(b=0,w=i.length,C=f.length;b({options:a||{},sanitize:K$,load:KM,fileAccess:!!o,file:V1(o),http:JM(i)})}(typeof fetch<"u"&&fetch,null);function _v(i){const o=i||N.yR,a=[],l={};return a.add=u=>{const f=o(u);return l[f]||(l[f]=1,a.push(u)),a},a.remove=u=>{const f=o(u);if(l[f]){l[f]=0;const m=a.indexOf(u);m>=0&&a.splice(m,1)}return a},a}function qo(i,o){return ay.apply(this,arguments)}function ay(){return(ay=(0,ai.Z)(function*(i,o){try{yield o(i)}catch(a){i.error(a)}})).apply(this,arguments)}const yv=Symbol("vega_id");let iA=1;function ly(i){return!(!i||!Kt(i))}function Kt(i){return i[yv]}function Qh(i,o){return i[yv]=o,i}function Ti(i){const o=i===Object(i)?i:{data:i};return Kt(o)?o:Qh(o,iA++)}function cy(i){return Vc(i,Ti({}))}function Vc(i,o){for(const a in i)o[a]=i[a];return o}function An(i,o){return Qh(o,Kt(i))}function Fr(i,o){return i?o?(a,l)=>i(a,l)||Kt(o(a))-Kt(o(l)):(a,l)=>i(a,l)||Kt(a)-Kt(l):null}function z2(i){return i&&i.constructor===Lf}function Lf(){const i=[],o=[],a=[],l=[],u=[];let f=null,m=!1;return{constructor:Lf,insert(g){const b=(0,N.IX)(g),v=b.length;for(let w=0;w{I(z)&&(v[Kt(z)]=-1)});for(C=0,D=i.length;C0&&(L(k,I,T.value),g.modifies(I));for(C=0,D=u.length;C{I(z)&&v[Kt(z)]>0&&L(z,T.field,T.value)}),g.modifies(T.field);if(m)g.mod=o.length||l.length?b.filter(z=>v[Kt(z)]>0):b.slice();else for(F in w)g.mod.push(w[F]);return(f||null==f&&(o.length||l.length))&&g.clean(!0),g}}}const bv="_:mod:_";function vv(){Object.defineProperty(this,bv,{writable:!0,value:{}})}vv.prototype={set(i,o,a,l){const u=this,f=u[i],m=u[bv];return null!=o&&o>=0?(f[o]!==a||l)&&(f[o]=a,m[o+":"+i]=-1,m[i]=-1):(f!==a||l)&&(u[i]=a,m[i]=(0,N.kJ)(a)?1+a.length:-1),u},modified(i,o){const a=this[bv];if(!arguments.length){for(const l in a)if(a[l])return!0;return!1}if((0,N.kJ)(i)){for(let l=0;l=0?o+1{T instanceof ar?(T!==this&&(o&&T.targets().add(this),f.push(T)),u.push({op:T,name:C,index:D})):l.set(C,D,T)};for(m in i)if(g=i[m],"pulse"===m)(0,N.IX)(g).forEach(C=>{C instanceof ar?C!==this&&(C.targets().add(this),f.push(C)):(0,N.vU)("Pulse parameters must be operator instances.")}),this.source=g;else if((0,N.kJ)(g))for(l.set(m,-1,Array(b=g.length)),v=0;vo=l);return a.requests=0,a.done=()=>{0==--a.requests&&(i._pending=null,o(i))},i._pending=a}(l);u.requests+=1;const f=yield l.request(o,a);return l.pulse(i,l.changeset().remove(N.yb).insert(f.data||[])),u.done(),f})).apply(this,arguments)}so.prototype={_filter:N.yb,_apply:N.yR,targets(){return this._targets||(this._targets=_v(N.id))},consume(i){return arguments.length?(this._consume=!!i,this):!!this._consume},receive(i){if(this._filter(i)){const o=this.value=this._apply(i),a=this._targets,l=a?a.length:0;for(let u=0;u{const a=Date.now();return a-o>i?(o=a,1):0})},debounce(i){const o=Un();return this.targets().add(Un(null,null,(0,N.Ds)(i,a=>{const l=a.dataflow;o.receive(a),l&&l.run&&l.run()}))),o},between(i,o){let a=!1;return i.targets().add(Un(null,null,()=>a=!0)),o.targets().add(Un(null,null,()=>a=!1)),this.filter(()=>a)},detach(){this._filter=N.yb,this._targets=null}};const Os={skip:!0};function wv(i,o,a,l,u,f){const m=(0,N.l7)({},f,Os);let g,b;(0,N.mf)(a)||(a=(0,N.a9)(a)),void 0===l?g=v=>i.touch(a(v)):(0,N.mf)(l)?(b=new ar(null,l,u,!1),g=v=>{b.evaluate(v);const w=a(v),C=b.value;z2(C)?i.pulse(w,C,f):i.update(w,C,m)}):g=v=>i.update(a(v),l,m),o.apply(g)}function Sa(i,o,a,l,u,f){if(void 0===l)o.targets().add(a);else{const m=f||{},g=new ar(null,function bd(i,o){return o=(0,N.mf)(o)?o:(0,N.a9)(o),i?function(a,l){const u=o(a,l);return i.skip()||(i.skip(u!==this.value).value=u),u}:o}(a,l),u,!1);g.modified(m.force),g.rank=o.rank,o.targets().add(g),a&&(g.skip(!0),g.value=a.value,g.targets().add(a),i.connect(a,[g]))}}const Cv={};function Go(i,o,a){this.dataflow=i,this.stamp=o??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=a||null}function vd(i,o){const a=[];return(0,N.FP)(i,o,l=>a.push(l)),a}function Sv(i,o){const a={};return i.visit(o,l=>{a[Kt(l)]=1}),l=>a[Kt(l)]?null:l}function Dv(i,o){return i?(a,l)=>i(a,l)&&o(a,l):o}function Xo(i,o,a,l){const u=this;let f=0;this.dataflow=i,this.stamp=o,this.fields=null,this.encode=l||null,this.pulses=a;for(const m of a)if(m.stamp===o){if(m.fields){const g=u.fields||(u.fields={});for(const b in m.fields)g[b]=1}m.changed(u.ADD)&&(f|=u.ADD),m.changed(u.REM)&&(f|=u.REM),m.changed(u.MOD)&&(f|=u.MOD)}this.changes=f}function Er(){return(Er=(0,ai.Z)(function*(i,o,a){const l=this,u=[];if(l._pulse)return aA(l);if(l._pending&&(yield l._pending),o&&(yield qo(l,o)),!l._touched.length)return l.debug("Dataflow invoked, but nothing to do."),l;const f=++l._clock;l._pulse=new Go(l,f,i),l._touched.forEach(w=>l._enqueue(w,!0)),l._touched=_v(N.id);let g,b,v,m=0;try{for(;l._heap.size()>0;)g=l._heap.pop(),g.rank===g.qrank?(b=g.run(l._getPulse(g,i)),b.then?b=yield b:b.async&&(u.push(b.async),b=Cv),b!==Cv&&g._targets&&g._targets.forEach(w=>l._enqueue(w)),++m):l._enqueue(g,!0)}catch(w){l._heap.clear(),v=w}if(l._input={},l._pulse=null,l.debug(`Pulse ${f}: ${m} operators`),v&&(l._postrun=[],l.error(v)),l._postrun.length){const w=l._postrun.sort((C,D)=>D.priority-C.priority);l._postrun=[];for(let C=0;Cl.runAsync(null,()=>{w.forEach(C=>{try{C(l)}catch(D){l.error(D)}})})),l})).apply(this,arguments)}function oA(){return(oA=(0,ai.Z)(function*(i,o,a){for(;this._running;)yield this._running;const l=()=>this._running=null;return(this._running=this.evaluate(i,o,a)).then(l,l),this._running})).apply(this,arguments)}function aA(i){return i.error("Dataflow already running. Use runAsync() to chain invocations."),i}Go.prototype={StopPropagation:Cv,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(i){return new Go(this.dataflow).init(this,i)},clone(){const i=this.fork(7);return i.add=i.add.slice(),i.rem=i.rem.slice(),i.mod=i.mod.slice(),i.source&&(i.source=i.source.slice()),i.materialize(23)},addAll(){let i=this;return!i.source||i.add===i.rem||!i.rem.length&&i.source.length===i.add.length||(i=new Go(this.dataflow).init(this),i.add=i.source,i.rem=[]),i},init(i,o){const a=this;return a.stamp=i.stamp,a.encode=i.encode,i.fields&&!(64&o)&&(a.fields=i.fields),1&o?(a.addF=i.addF,a.add=i.add):(a.addF=null,a.add=[]),2&o?(a.remF=i.remF,a.rem=i.rem):(a.remF=null,a.rem=[]),4&o?(a.modF=i.modF,a.mod=i.mod):(a.modF=null,a.mod=[]),32&o?(a.srcF=null,a.source=null):(a.srcF=i.srcF,a.source=i.source,i.cleans&&(a.cleans=i.cleans)),a},runAfter(i){this.dataflow.runAfter(i)},changed(i){const o=i||7;return 1&o&&this.add.length||2&o&&this.rem.length||4&o&&this.mod.length},reflow(i){if(i)return this.fork(7).reflow();const o=this.add.length,a=this.source&&this.source.length;return a&&a!==o&&(this.mod=this.source,o&&this.filter(4,Sv(this,1))),this},clean(i){return arguments.length?(this.cleans=!!i,this):this.cleans},modifies(i){const o=this.fields||(this.fields={});return(0,N.kJ)(i)?i.forEach(a=>o[a]=!0):o[i]=!0,this},modified(i,o){const a=this.fields;return!(!o&&!this.mod.length||!a)&&(arguments.length?(0,N.kJ)(i)?i.some(l=>a[l]):a[i]:!!a)},filter(i,o){const a=this;return 1&i&&(a.addF=Dv(a.addF,o)),2&i&&(a.remF=Dv(a.remF,o)),4&i&&(a.modF=Dv(a.modF,o)),16&i&&(a.srcF=Dv(a.srcF,o)),a},materialize(i){const o=this;return 1&(i=i||7)&&o.addF&&(o.add=vd(o.add,o.addF),o.addF=null),2&i&&o.remF&&(o.rem=vd(o.rem,o.remF),o.remF=null),4&i&&o.modF&&(o.mod=vd(o.mod,o.modF),o.modF=null),16&i&&o.srcF&&(o.source=o.source.filter(o.srcF),o.srcF=null),o},visit(i,o){const a=this,l=o;if(16&i)return(0,N.FP)(a.source,a.srcF,l),a;1&i&&(0,N.FP)(a.add,a.addF,l),2&i&&(0,N.FP)(a.rem,a.remF,l),4&i&&(0,N.FP)(a.mod,a.modF,l);const u=a.source;if(8&i&&u){const f=a.add.length+a.mod.length;f===u.length||(0,N.FP)(u,f?Sv(a,5):a.srcF,l)}return a}},(0,N.XW)(Xo,Go,{fork(i){const o=new Go(this.dataflow).init(this,i&this.NO_FIELDS);return void 0!==i&&(i&o.ADD&&this.visit(o.ADD,a=>o.add.push(a)),i&o.REM&&this.visit(o.REM,a=>o.rem.push(a)),i&o.MOD&&this.visit(o.MOD,a=>o.mod.push(a))),o},changed(i){return this.changes&i},modified(i){const o=this,a=o.fields;return a&&o.changes&o.MOD?(0,N.kJ)(i)?i.some(l=>a[l]):a[i]:0},filter(){(0,N.vU)("MultiPulse does not support filtering.")},materialize(){(0,N.vU)("MultiPulse does not support materialization.")},visit(i,o){const a=this,l=a.pulses,u=l.length;let f=0;if(i&a.SOURCE)for(;fo&&(f=a-1>>1,u=i[f],l(m,u)<0);)i[a]=u,a=f;return i[a]=m}function xd(){this.logger((0,N.kg)()),this.logLevel(N.jj),this._clock=0,this._rank=0,this._locale=XM();try{this._loader=Pf()}catch{}this._touched=_v(N.id),this._input={},this._pulse=null,this._heap=function nE(i){let o=[];return{clear:()=>o=[],size:()=>o.length,peek:()=>o[0],push:a=>(o.push(a),Rs(o,0,o.length-1,i)),pop:()=>{const a=o.pop();let l;return o.length?(l=o[0],o[0]=a,function iE(i,o,a){const l=o,u=i.length,f=i[o];let g,m=1+(o<<1);for(;m=0&&(m=g),i[o]=i[m],m=1+((o=m)<<1);i[o]=f,Rs(i,l,o,a)}(o,0,i)):l=a,l}}}((i,o)=>i.qrank-o.qrank),this._postrun=[]}function _l(i){return function(){return this._log[i].apply(this,arguments)}}function ze(i,o){ar.call(this,i,null,o)}xd.prototype={stamp(){return this._clock},loader(i){return arguments.length?(this._loader=i,this):this._loader},locale(i){return arguments.length?(this._locale=i,this):this._locale},logger(i){return arguments.length?(this._log=i,this):this._log},error:_l("error"),warn:_l("warn"),info:_l("info"),debug:_l("debug"),logLevel:_l("level"),cleanThreshold:1e4,add:function qe(i,o,a,l){let f,u=1;return i instanceof ar?f=i:i&&i.prototype instanceof ar?f=new i:(0,N.mf)(i)?f=new ar(null,i):(u=0,f=new ar(i,o)),this.rank(f),u&&(l=a,a=o),a&&this.connect(f,f.parameters(a,l)),this.touch(f),f},connect:function bi(i,o){const a=i.rank,l=o.length;for(let u=0;u=0;)o.push(a=l[u]),a===i&&(0,N.vU)("Cycle detected in dataflow graph.")},pulse:function Mv(i,o,a){this.touch(i,a||tE);const l=new Go(this,this._clock+(this._pulse?0:1)),u=i.pulse&&i.pulse.source||[];return l.target=i,this._input[i.id]=o.pulse(l,u),this},touch:function Qm(i,o){const a=o||tE;return this._pulse?this._enqueue(i):this._touched.add(i),a.skip&&i.skip(!0),this},update:function fy(i,o,a){const l=a||tE;return(i.set(o)||l.force)&&this.touch(i,l),this},changeset:Lf,ingest:function ic(i,o,a){return o=this.parse(o,a),this.pulse(i,this.changeset().insert(o))},parse:function Zm(i,o){const a=this.locale();return Wa(i,o,a.timeParse,a.utcParse)},preload:function V2(i,o,a){return Z1.apply(this,arguments)},request:function K1(i,o){return yd.apply(this,arguments)},events:function rA(i,o,a,l){const u=this,f=Un(a,l),m=function(v){v.dataflow=u;try{f.receive(v)}catch(w){u.error(w)}finally{u.run()}};let g;g="string"==typeof i&&typeof document<"u"?document.querySelectorAll(i):(0,N.IX)(i);const b=g.length;for(let v=0;vu.pulse),o):this._input[i.id]||function Bf(i,o){return o&&o.stamp===i.stamp?o:(i=i.fork(),o&&o!==Cv&&(i.source=o.source),i)}(this._pulse,a&&a.pulse)}},(0,N.XW)(ze,ar,{run(i){if(i.stampthis.pulse=a):o!==i.StopPropagation&&(this.pulse=o),o},evaluate(i){const o=this.marshall(i.stamp),a=this.transform(o,i);return o.clear(),a},transform(){}});const wd={};function np(i){const o=lA(i);return o&&o.Definition||null}function lA(i){return i=i&&i.toLowerCase(),(0,N.nr)(wd,i)?wd[i]:null}function Su(i,o){let a;if(void 0===o)for(const l of i)null!=l&&(a=l)&&(a=l);else{let l=-1;for(let u of i)null!=(u=o(u,++l,i))&&(a=u)&&(a=u)}return a}function Av(i,o){let a;if(void 0===o)for(const l of i)null!=l&&(a>l||void 0===a&&l>=l)&&(a=l);else{let l=-1;for(let u of i)null!=(u=o(u,++l,i))&&(a>u||void 0===a&&u>=u)&&(a=u)}return a}function zf(i,o){return(null==i||!(i>=i))-(null==o||!(o>=o))||(io?1:0)}function Vf(i,o,a=0,l=1/0,u){if(o=Math.floor(o),a=Math.floor(Math.max(0,a)),l=Math.floor(Math.min(i.length-1,l)),!(a<=o&&o<=l))return i;for(u=void 0===u?zf:function H2(i=Tf){if(i===Tf)return zf;if("function"!=typeof i)throw new TypeError("compare is not a function");return(o,a)=>{const l=i(o,a);return l||0===l?l:(0===i(a,a))-(0===i(o,o))}}(u);l>a;){if(l-a>600){const b=l-a+1,v=o-a+1,w=Math.log(b),C=.5*Math.exp(2*w/3),D=.5*Math.sqrt(w*C*(b-C)/b)*(v-b/2<0?-1:1);Vf(i,o,Math.max(a,Math.floor(o-v*C/b+D)),Math.min(l,Math.floor(o+(b-v)*C/b+D)),u)}const f=i[o];let m=a,g=l;for(Jm(i,a,o),u(i[l],f)>0&&Jm(i,a,l);m0;)--g}0===u(i[a],f)?Jm(i,a,g):(++g,Jm(i,g,l)),g<=o&&(a=g+1),o<=g&&(l=g-1)}return i}function Jm(i,o,a){const l=i[o];i[o]=i[a],i[a]=l}function yl(i){return null===i?NaN:+i}function eg(i,o,a){if(i=Float64Array.from(function*ip(i,o){if(void 0===o)for(let a of i)null!=a&&(a=+a)>=a&&(yield a);else{let a=-1;for(let l of i)null!=(l=o(l,++a,i))&&(l=+l)>=l&&(yield l)}}(i,a)),(l=i.length)&&!isNaN(o=+o)){if(o<=0||l<2)return Av(i);if(o>=1)return Su(i);var l,u=(l-1)*o,f=Math.floor(u),m=Su(Vf(i,f).subarray(0,f+1));return m+(Av(i.subarray(f+1))-m)*(u-f)}}function Du(i,o,a=yl){if((l=i.length)&&!isNaN(o=+o)){if(o<=0||l<2)return+a(i[0],0,i);if(o>=1)return+a(i[l-1],l-1,i);var l,u=(l-1)*o,f=Math.floor(u),m=+a(i[f],f,i);return m+(+a(i[f+1],f+1,i)-m)*(u-f)}}function Mu(i,o){return eg(i,.5,o)}function*hy(i,o){if(null==o)for(let a of i)null!=a&&""!==a&&(a=+a)>=a&&(yield a);else{let a=-1;for(let l of i)l=o(l,++a,i),null!=l&&""!==l&&(l=+l)>=l&&(yield l)}}function py(i,o,a){const l=Float64Array.from(hy(i,a));return l.sort(Tf),o.map(u=>Du(l,u))}function rE(i,o){return py(i,[.25,.5,.75],o)}function rp(i,o){const a=i.length,l=function q2(i,o){const a=function cA(i,o){let l,a=0,u=0,f=0;if(void 0===o)for(let m of i)null!=m&&(m=+m)>=m&&(l=m-u,u+=l/++a,f+=l*(m-u));else{let m=-1;for(let g of i)null!=(g=o(g,++m,i))&&(g=+g)>=g&&(l=g-u,u+=l/++a,f+=l*(g-u))}if(a>1)return f/(a-1)}(i,o);return a&&Math.sqrt(a)}(i,o),u=rE(i,o);return 1.06*(Math.min(l,(u[2]-u[0])/1.34)||l||Math.abs(u[0])||1)*Math.pow(a,-.2)}function Au(i){const o=i.maxbins||20,a=i.base||10,l=Math.log(a),u=i.divide||[5,2];let g,b,v,w,C,D,f=i.extent[0],m=i.extent[1];const T=i.span||m-f||Math.abs(f)||1;if(i.step)g=i.step;else if(i.steps){for(w=T/o,C=0,D=i.steps.length;Co;)g*=a;for(C=0,D=u.length;C=v&&T/w<=o&&(g=w)}w=Math.log(g);const k=Math.pow(a,-(w>=0?0:1+~~(-w/l))-1);return(i.nice||void 0===i.nice)&&(w=Math.floor(f/g+k)*g,f=fD);const u=i.length,f=new Float64Array(u);let C,m=0,g=1,b=l(i[0]),v=b,w=b+o;for(;g=w){for(v=(b+v)/2;m>1);mu;)i[m--]=i[l]}l=u,u=f}return i}(f,o+o/4):f}function X2(i){return function(){return(i=(1103515245*i+12345)%2147483647)/2147483647}}function tg(i,o){let a,l,u;null==o&&(o=i,i=0);const f={min(m){return arguments.length?(a=m||0,u=l-a,f):a},max(m){return arguments.length?(l=m||0,u=l-a,f):l},sample:()=>a+Math.floor(u*oc()),pdf:m=>m===Math.floor(m)&&m>=a&&m=l?1:(g-a+1)/u},icdf:m=>m>=0&&m<=1?a-1+Math.floor(m*u):NaN};return f.min(i).max(o)}const jf=Math.sqrt(2*Math.PI),Y2=Math.SQRT2;let Uf=NaN;function my(i,o){i=i||0,o=o??1;let u,f,a=0,l=0;if(Uf==Uf)a=Uf,Uf=NaN;else{do{a=2*oc()-1,l=2*oc()-1,u=a*a+l*l}while(0===u||u>1);f=Math.sqrt(-2*Math.log(u)/u),a*=f,Uf=l*f}return i+a*o}function Xa(i,o,a){const l=(i-(o||0))/(a=a??1);return Math.exp(-.5*l*l)/(a*jf)}function sc(i,o,a){const l=(i-(o=o||0))/(a=a??1),u=Math.abs(l);let f;if(u>37)f=0;else{const m=Math.exp(-u*u/2);let g;u<7.07106781186547?(g=.0352624965998911*u+.700383064443688,g=g*u+6.37396220353165,g=g*u+33.912866078383,g=g*u+112.079291497871,g=g*u+221.213596169931,g=g*u+220.206867912376,f=m*g,g=.0883883476483184*u+1.75566716318264,g=g*u+16.064177579207,g=g*u+86.7807322029461,g=g*u+296.564248779674,g=g*u+637.333633378831,g=g*u+793.826512519948,g=g*u+440.413735824752,f/=g):(g=u+.65,g=u+4/g,g=u+3/g,g=u+2/g,g=u+1/g,f=m/g/2.506628274631)}return l>0?1-f:f}function ao(i,o,a){return i<0||i>1?NaN:(o||0)+(a??1)*Y2*function lE(i){let a,o=-Math.log((1-i)*(1+i));return o<6.25?(o-=3.125,a=-364441206401782e-35,a=a*o-16850591381820166e-35,a=128584807152564e-32+a*o,a=11157877678025181e-33+a*o,a=a*o-1333171662854621e-31,a=20972767875968562e-33+a*o,a=6637638134358324e-30+a*o,a=a*o-4054566272975207e-29,a=a*o-8151934197605472e-29,a=26335093153082323e-28+a*o,a=a*o-12975133253453532e-27,a=a*o-5415412054294628e-26,a=1.0512122733215323e-9+a*o,a=a*o-4.112633980346984e-9,a=a*o-2.9070369957882005e-8,a=4.2347877827932404e-7+a*o,a=a*o-13654692000834679e-22,a=a*o-13882523362786469e-21,a=.00018673420803405714+a*o,a=a*o-.000740702534166267,a=a*o-.006033670871430149,a=.24015818242558962+a*o,a=1.6536545626831027+a*o):o<16?(o=Math.sqrt(o)-3.25,a=2.2137376921775787e-9,a=9.075656193888539e-8+a*o,a=a*o-2.7517406297064545e-7,a=1.8239629214389228e-8+a*o,a=15027403968909828e-22+a*o,a=a*o-4013867526981546e-21,a=29234449089955446e-22+a*o,a=12475304481671779e-21+a*o,a=a*o-47318229009055734e-21,a=6828485145957318e-20+a*o,a=24031110387097894e-21+a*o,a=a*o-.0003550375203628475,a=.0009532893797373805+a*o,a=a*o-.0016882755560235047,a=.002491442096107851+a*o,a=a*o-.003751208507569241,a=.005370914553590064+a*o,a=1.0052589676941592+a*o,a=3.0838856104922208+a*o):Number.isFinite(o)?(o=Math.sqrt(o)-5,a=-27109920616438573e-27,a=a*o-2.555641816996525e-10,a=1.5076572693500548e-9+a*o,a=a*o-3.789465440126737e-9,a=7.61570120807834e-9+a*o,a=a*o-1.496002662714924e-8,a=2.914795345090108e-8+a*o,a=a*o-6.771199775845234e-8,a=2.2900482228026655e-7+a*o,a=a*o-9.9298272942317e-7,a=4526062597223154e-21+a*o,a=a*o-1968177810553167e-20,a=7599527703001776e-20+a*o,a=a*o-.00021503011930044477,a=a*o-.00013871931833623122,a=1.0103004648645344+a*o,a=4.849906401408584+a*o):a=1/0,a*i}(2*i-1)}function Fi(i,o){let a,l;const u={mean(f){return arguments.length?(a=f||0,u):a},stdev(f){return arguments.length?(l=f??1,u):l},sample:()=>my(a,l),pdf:f=>Xa(f,a,l),cdf:f=>sc(f,a,l),icdf:f=>ao(f,a,l)};return u.mean(i).stdev(o)}function Uc(i,o){const a=Fi();let l=0;const u={data(f){return arguments.length?(i=f,l=f?f.length:0,u.bandwidth(o)):i},bandwidth(f){return arguments.length?(!(o=f)&&i&&(o=rp(i)),u):o},sample:()=>i[~~(oc()*l)]+o*a.sample(),pdf(f){let m=0,g=0;for(;gTv(a,l),pdf:f=>kv(f,a,l),cdf:f=>Hc(f,a,l),icdf:f=>Ed(f,a,l)};return u.mean(i).stdev(o)}function Hf(i,o){let l,a=0;const f={weights(m){return arguments.length?(l=function u(m){const g=[];let v,b=0;for(v=0;v=o&&i<=a?1/(a-o):0}function Wf(i,o,a){return null==a&&(a=o??1,o=0),ia?1:(i-o)/(a-o)}function cE(i,o,a){return null==a&&(a=o??1,o=0),i>=0&&i<=1?o+i*(a-o):NaN}function uE(i,o){let a,l;const u={min(f){return arguments.length?(a=f||0,u):a},max(f){return arguments.length?(l=f??1,u):l},sample:()=>gy(a,l),pdf:f=>op(f,a,l),cdf:f=>Wf(f,a,l),icdf:f=>cE(f,a,l)};return null==o&&(o=i??1,i=0),u.min(i).max(o)}function ng(i,o,a){let l=0,u=0;for(const f of i){const m=a(f);null==o(f)||null==m||isNaN(m)||(l+=(m-l)/++u)}return{coef:[l],predict:()=>l,rSquared:0}}function Iv(i,o,a,l){const u=l-i*i,f=Math.abs(u)<1e-24?0:(a-i*o)/u;return[o-f*i,f]}function ig(i,o,a,l){i=i.filter(T=>{let I=o(T),k=a(T);return null!=I&&(I=+I)>=I&&null!=k&&(k=+k)>=k}),l&&i.sort((T,I)=>o(T)-o(I));const u=i.length,f=new Float64Array(u),m=new Float64Array(u);let w,C,D,g=0,b=0,v=0;for(D of i)f[g]=w=+o(D),m[g]=C=+a(D),++g,b+=(w-b)/g,v+=(C-v)/g;for(g=0;g=f&&null!=m&&(m=+m)>=m&&l(f,m,++u)}function rg(i,o,a,l,u){let f=0,m=0;return Ov(i,o,a,(g,b)=>{const v=b-u(g),w=b-l;f+=v*v,m+=w*w}),1-f/m}function dE(i,o,a){let l=0,u=0,f=0,m=0,g=0;Ov(i,o,a,(w,C)=>{++g,l+=(w-l)/g,u+=(C-u)/g,f+=(w*C-f)/g,m+=(w*w-m)/g});const b=Iv(l,u,f,m),v=w=>b[0]+b[1]*w;return{coef:b,predict:v,rSquared:rg(i,o,a,u,v)}}function sa(i,o,a){let l=0,u=0,f=0,m=0,g=0;Ov(i,o,a,(w,C)=>{++g,w=Math.log(w),l+=(w-l)/g,u+=(C-u)/g,f+=(w*C-f)/g,m+=(w*w-m)/g});const b=Iv(l,u,f,m),v=w=>b[0]+b[1]*Math.log(w);return{coef:b,predict:v,rSquared:rg(i,o,a,u,v)}}function fE(i,o,a){const[l,u,f,m]=ig(i,o,a);let D,T,I,g=0,b=0,v=0,w=0,C=0;Ov(i,o,a,(z,V)=>{D=l[C++],T=Math.log(V),I=D*V,g+=(V*T-g)/C,b+=(I-b)/C,v+=(I*T-v)/C,w+=(D*I-w)/C});const[k,F]=Iv(b/m,g/m,v/m,w/m),L=z=>Math.exp(k+F*(z-f));return{coef:[Math.exp(k-F*f),F],predict:L,rSquared:rg(i,o,a,m,L)}}function og(i,o,a){let l=0,u=0,f=0,m=0,g=0,b=0;Ov(i,o,a,(C,D)=>{const T=Math.log(C),I=Math.log(D);++b,l+=(T-l)/b,u+=(I-u)/b,f+=(T*I-f)/b,m+=(T*T-m)/b,g+=(D-g)/b});const v=Iv(l,u,f,m),w=C=>v[0]*Math.pow(C,v[1]);return v[0]=Math.exp(v[0]),{coef:v,predict:w,rSquared:rg(i,o,a,g,w)}}function Zr(i,o,a){const[l,u,f,m]=ig(i,o,a),g=l.length;let T,I,k,F,b=0,v=0,w=0,C=0,D=0;for(T=0;TV*(H-=f)*H+U*H+W+m;return{coef:[W-U*f+V*f*f+m,U-2*V*f,V],predict:Y,rSquared:rg(i,o,a,m,Y)}}function _y(i,o,a,l){if(0===l)return ng(i,o,a);if(1===l)return dE(i,o,a);if(2===l)return Zr(i,o,a);const[u,f,m,g]=ig(i,o,a),b=u.length,v=[],w=[],C=l+1;let D,T,I,k,F;for(D=0;DMath.abs(i[l][m])&&(m=u);for(f=l;f=l;f--)i[f][u]-=i[f][l]*i[l][u]/i[l][l]}for(u=o-1;u>=0;--u){for(g=0,f=u+1;f{let U=g+L[0]+L[1]*(V-=m)+L[2]*V*V;for(D=3;D=0;--f)for(g=o[f],b=1,u[f]+=g,m=1;m<=f;++m)b*=(f+1-m)/m,u[f-m]+=g*Math.pow(a,m)*b;return u[0]+=l,u}const aa=2,Cd=1e-12;function Tu(i,o,a,l){const[u,f,m,g]=ig(i,o,a,!0),b=u.length,v=Math.max(2,~~(l*b)),w=new Float64Array(b),C=new Float64Array(b),D=new Float64Array(b).fill(1);for(let T=-1;++T<=aa;){const I=[0,v-1];for(let F=0;Fu[V]-L?z:V]-L||1);for(let xe=z;xe<=V;++xe){const Q=u[xe],J=f[xe],oe=by(Math.abs(L-Q)*ce)*D[xe],we=Q*oe;W+=oe,Y+=we,H+=J*oe,Z+=J*we,te+=Q*we}const[le,ve]=Iv(Y/W,H/W,Z/W,te/W);w[F]=le+ve*L,C[F]=Math.abs(f[F]-w[F]),vy(u,F+1,I)}if(T===aa)break;const k=Mu(C);if(Math.abs(k)=1?Cd:(z=1-L*L)*z}return function Rv(i,o,a,l){const u=i.length,f=[];let v,m=0,g=0,b=[];for(;m=i.length))for(;o>u&&i[f]-l<=l-i[u];)a[0]=++u,a[1]=f,++f}const hE=.5*Math.PI/180;function qf(i,o,a,l){a=a||25,l=Math.max(a,l||200);const u=k=>[k,i(k)],f=o[0],m=o[1],g=m-f,b=g/l,v=[u(f)],w=[];if(a===l){for(let k=1;k0;)w.push(u(f+k/a*g));let C=v[0],D=w[w.length-1];const T=1/g,I=function Nv(i,o){let a=i,l=i;const u=o.length;for(let f=0;fl&&(l=m)}return 1/(l-a)}(C[1],w);for(;D;){const k=u((C[0]+D[0])/2);k[0]-C[0]>=b&&bl(C,k,D,T,I)>hE?w.push(k):(C=D,v.push(D),w.pop()),D=w[w.length-1]}return v}function bl(i,o,a,l,u){const f=Math.atan2(u*(a[1]-i[1]),l*(a[0]-i[0])),m=Math.atan2(u*(o[1]-i[1]),l*(o[0]-i[0]));return Math.abs(f-m)}function Qr(i,o,a){i=+i,o=+o,a=(u=arguments.length)<2?(o=i,i=0,1):u<3?1:+a;for(var l=-1,u=0|Math.max(0,Math.ceil((o-i)/a)),f=new Array(u);++l{const a=i.length;let l=1,u=String(i[0](o));for(;l{},Bn={init:sg,add:sg,rem:sg,idx:0},Yo={values:{init:i=>i.cell.store=!0,value:i=>i.cell.data.values(),idx:-1},count:{value:i=>i.cell.num},__count__:{value:i=>i.missing+i.valid},missing:{value:i=>i.missing},valid:{value:i=>i.valid},sum:{init:i=>i.sum=0,value:i=>i.valid?i.sum:void 0,add:(i,o)=>i.sum+=+o,rem:(i,o)=>i.sum-=o},product:{init:i=>i.product=1,value:i=>i.valid?i.product:void 0,add:(i,o)=>i.product*=o,rem:(i,o)=>i.product/=o},mean:{init:i=>i.mean=0,value:i=>i.valid?i.mean:void 0,add:(i,o)=>(i.mean_d=o-i.mean,i.mean+=i.mean_d/i.valid),rem:(i,o)=>(i.mean_d=o-i.mean,i.mean-=i.valid?i.mean_d/i.valid:i.mean)},average:{value:i=>i.valid?i.mean:void 0,req:["mean"],idx:1},variance:{init:i=>i.dev=0,value:i=>i.valid>1?i.dev/(i.valid-1):void 0,add:(i,o)=>i.dev+=i.mean_d*(o-i.mean),rem:(i,o)=>i.dev-=i.mean_d*(o-i.mean),req:["mean"],idx:1},variancep:{value:i=>i.valid>1?i.dev/i.valid:void 0,req:["variance"],idx:2},stdev:{value:i=>i.valid>1?Math.sqrt(i.dev/(i.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:i=>i.valid>1?Math.sqrt(i.dev/i.valid):void 0,req:["variance"],idx:2},stderr:{value:i=>i.valid>1?Math.sqrt(i.dev/(i.valid*(i.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:i=>i.cell.data.distinct(i.get),req:["values"],idx:3},ci0:{value:i=>i.cell.data.ci0(i.get),req:["values"],idx:3},ci1:{value:i=>i.cell.data.ci1(i.get),req:["values"],idx:3},median:{value:i=>i.cell.data.q2(i.get),req:["values"],idx:3},q1:{value:i=>i.cell.data.q1(i.get),req:["values"],idx:3},q3:{value:i=>i.cell.data.q3(i.get),req:["values"],idx:3},min:{init:i=>i.min=void 0,value:i=>i.min=Number.isNaN(i.min)?i.cell.data.min(i.get):i.min,add:(i,o)=>{(o{o<=i.min&&(i.min=NaN)},req:["values"],idx:4},max:{init:i=>i.max=void 0,value:i=>i.max=Number.isNaN(i.max)?i.cell.data.max(i.get):i.max,add:(i,o)=>{(o>i.max||void 0===i.max)&&(i.max=o)},rem:(i,o)=>{o>=i.max&&(i.max=NaN)},req:["values"],idx:4},argmin:{init:i=>i.argmin=void 0,value:i=>i.argmin||i.cell.data.argmin(i.get),add:(i,o,a)=>{o{o<=i.min&&(i.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:i=>i.argmax=void 0,value:i=>i.argmax||i.cell.data.argmax(i.get),add:(i,o,a)=>{o>i.max&&(i.argmax=a)},rem:(i,o)=>{o>=i.max&&(i.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(i,o)=>{i.exp=0,i.exp_r=o},value:i=>i.valid?i.exp*(1-i.exp_r)/(1-i.exp_r**i.valid):void 0,add:(i,o)=>i.exp=i.exp_r*i.exp+o,rem:(i,o)=>i.exp=(i.exp-o/i.exp_r**(i.valid-1))/i.exp_r},exponentialb:{value:i=>i.valid?i.exp*(1-i.exp_r):void 0,req:["exponential"],idx:1}},Ma=Object.keys(Yo).filter(i=>"__count__"!==i);function Dd(i,o,a){return Yo[i](a,o)}function ag(i,o){return i.idx-o.idx}function ap(){this.valid=0,this.missing=0,this._ops.forEach(i=>null==i.aggregate_param?i.init(this):i.init(this,i.aggregate_param))}function Z2(i,o){null!=i&&""!==i?i==i&&(++this.valid,this._ops.forEach(a=>a.add(this,i,o))):++this.missing}function pt(i,o){null!=i&&""!==i?i==i&&(--this.valid,this._ops.forEach(a=>a.rem(this,i,o))):--this.missing}function Fv(i){return this._out.forEach(o=>i[o.out]=o.value(this)),i}function mE(i,o){const a=o||N.yR,l=function dA(i){const o={};i.forEach(l=>o[l.name]=l);const a=l=>{l.req&&l.req.forEach(u=>{o[u]||a(o[u]=Yo[u]())})};return i.forEach(a),Object.values(o).sort(ag)}(i),u=i.slice().sort(ag);function f(m){this._ops=l,this._out=u,this.cell=m,this.init()}return f.prototype.init=ap,f.prototype.add=Z2,f.prototype.rem=pt,f.prototype.set=Fv,f.prototype.get=a,f.fields=i.map(m=>m.out),f}function xy(i){this._key=i?(0,N.EP)(i):Kt,this.reset()}[...Ma,"__count__"].forEach(i=>{Yo[i]=function sp(i,o){return(a,l)=>(0,N.l7)({name:i,aggregate_param:l,out:a||i},Bn,o)}(i,Yo[i])});const Io=xy.prototype;function Md(i){ze.call(this,null,i),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 Pv(i){ze.call(this,null,i)}function Gf(i,o,a){const l=i;let u=o||[],f=a||[],m={},g=0;return{add:b=>f.push(b),remove:b=>m[l(b)]=++g,size:()=>u.length,data:(b,v)=>(g&&(u=u.filter(w=>!m[l(w)]),m={},g=0),v&&b&&u.sort(b),f.length&&(u=b?(0,N.TS)(b,u,f.sort(b)):u.concat(f),f=[]),u)}}function lp(i){ze.call(this,[],i)}function cp(i){ar.call(this,null,hA,i)}function hA(i){return this.value&&!i.modified()?this.value:(0,N.qu)(i.fields,i.orders)}function lg(i){ze.call(this,null,i)}function pA(i){ze.call(this,null,i)}Io.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},Io.add=function(i){this._add.push(i)},Io.rem=function(i){this._rem.push(i)},Io.values=function(){if(this._get=null,0===this._rem.length)return this._add;const i=this._add,o=this._rem,a=this._key,l=i.length,u=o.length,f=Array(l-u),m={};let g,b,v;for(g=0;g=0;)f=i(o[l])+"",(0,N.nr)(a,f)||(a[f]=1,++u);return u},Io.extent=function(i){if(this._get!==i||!this._ext){const o=this.values(),a=(0,N.dI)(o,i);this._ext=[o[a[0]],o[a[1]]],this._get=i}return this._ext},Io.argmin=function(i){return this.extent(i)[0]||{}},Io.argmax=function(i){return this.extent(i)[1]||{}},Io.min=function(i){const o=this.extent(i)[0];return null!=o?i(o):void 0},Io.max=function(i){const o=this.extent(i)[1];return null!=o?i(o):void 0},Io.quartile=function(i){return(this._get!==i||!this._q)&&(this._q=rE(this.values(),i),this._get=i),this._q},Io.q1=function(i){return this.quartile(i)[0]},Io.q2=function(i){return this.quartile(i)[1]},Io.q3=function(i){return this.quartile(i)[2]},Io.ci=function(i){return(this._get!==i||!this._ci)&&(this._ci=sE(this.values(),1e3,.05,i),this._get=i),this._ci},Io.ci0=function(i){return this.ci(i)[0]},Io.ci1=function(i){return this.ci(i)[1]},Md.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Ma},{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"}]},(0,N.XW)(Md,ze,{transform(i,o){const a=this,l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=i.modified();return a.stamp=l.stamp,a.value&&(u||o.modified(a._inputs,!0))?(a._prev=a.value,a.value=u?a.init(i):Object.create(null),o.visit(o.SOURCE,f=>a.add(f))):(a.value=a.value||a.init(i),o.visit(o.REM,f=>a.rem(f)),o.visit(o.ADD,f=>a.add(f))),l.modifies(a._outputs),a._drop=!1!==i.drop,i.cross&&a._dims.length>1&&(a._drop=!1,a.cross()),o.clean()&&a._drop&&l.clean(!0).runAfter(()=>this.clean()),a.changes(l)},cross(){const i=this,o=i.value,a=i._dnames,l=a.map(()=>({})),u=a.length;function f(g){let b,v,w,C;for(b in g)for(w=g[b].tuple,v=0;v{const V=(0,N.el)(z);return u(z),a.push(V),V}),this.cellkey=i.key?i.key:Wc(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const f=i.fields||[null],m=i.ops||["count"],g=i.aggregate_params||[null],b=i.as||[],v=f.length,w={};let C,D,T,I,k,F,L;for(v!==m.length&&(0,N.vU)("Unmatched number of fields and aggregate ops."),L=0;LmE(z,z.field)),Object.create(null)},cellkey:Wc(),cell(i,o){let a=this.value[i];return a?0===a.num&&this._drop&&a.stamp{const C=l(w);w[g]=C,w[b]=null==C?null:u+f*(1+(C-u)/f)}:w=>w[g]=l(w)),o.modifies(a?m:g)},_bins(i){if(this.value&&!i.modified())return this.value;const o=i.field,a=Au(i),l=a.step;let m,g,u=a.start,f=u+Math.ceil((a.stop-u)/l)*l;null!=(m=i.anchor)&&(g=m-(u+l*Math.floor((m-u)/l)),u+=g,f+=g);const b=function(v){let w=(0,N.He)(o(v));return null==w?null:wf?1/0:(w=Math.max(u,Math.min(w,f-l)),u+l*Math.floor(1e-14+(w-u)/l))};return b.start=u,b.stop=a.stop,b.step=l,this.value=(0,N.ZE)(b,(0,N.Oj)(o),i.name||"bin_"+(0,N.el)(o))}}),lp.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},(0,N.XW)(lp,ze,{transform(i,o){const a=o.fork(o.ALL),l=Gf(Kt,this.value,a.materialize(a.ADD).add),u=i.sort,f=o.changed()||u&&(i.modified("sort")||o.modified(u.fields));return a.visit(a.REM,l.remove),this.modified(f),this.value=a.source=l.data(Fr(u),f),o.source&&o.source.root&&(this.value.root=o.source.root),a}}),(0,N.XW)(cp,ar),lg.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"]}]},(0,N.XW)(lg,ze,{transform(i,o){const a=C=>D=>{for(var I,T=function Lv(i,o,a){switch(o){case"upper":i=i.toUpperCase();break;case"lower":i=i.toLowerCase()}return i.match(a)}(g(D),i.case,f)||[],k=0,F=T.length;ku[C]=1+(u[C]||0)),w=a(C=>u[C]-=1);return l?o.visit(o.SOURCE,v):(o.visit(o.ADD,v),o.visit(o.REM,w)),this._finish(o,b)},_parameterCheck(i,o){let a=!1;return(i.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(i.stopwords||"")+"$","i"),a=!0),(i.modified("pattern")||!this._match)&&(this._match=new RegExp(i.pattern||"[\\w']+","g"),a=!0),(i.modified("field")||o.modified(i.field.fields))&&(a=!0),a&&(this._counts={}),a},_finish(i,o){const a=this._counts,l=this._tuples||(this._tuples={}),u=o[0],f=o[1],m=i.fork(i.NO_SOURCE|i.NO_FIELDS);let g,b,v;for(g in a)b=l[g],v=a[g]||0,!b&&v?(l[g]=b=Ti({}),b[u]=g,b[f]=v,m.add.push(b)):0===v?(b&&m.rem.push(b),a[g]=null,l[g]=null):b[f]!==v&&(b[f]=v,m.mod.push(b));return m.modifies(o)}}),pA.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},(0,N.XW)(pA,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.as||["a","b"],u=l[0],f=l[1],m=!this.value||o.changed(o.ADD_REM)||i.modified("as")||i.modified("filter");let g=this.value;return m?(g&&(a.rem=g),g=o.materialize(o.SOURCE).source,a.add=this.value=function ku(i,o,a,l){for(var b,v,u=[],f={},m=i.length,g=0;gcg(f,o))):typeof l[u]===qc&&l[u](i[u]);return l}function Ad(i){ze.call(this,null,i)}const Iu=[{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 _E(i,o){return i?i.map((a,l)=>o[l]||(0,N.el)(a)):null}function Td(i,o,a){const l=[],u=C=>C(b);let f,m,g,b,v,w;if(null==o)l.push(i.map(a));else for(f={},m=0,g=i.length;mo(a,i),(0,N.Oj)(o),(0,N.el)(o))}function $v(i){ze.call(this,[void 0,void 0],i)}function Ou(i,o){ar.call(this,i),this.parent=o,this.count=0}function Bv(i){ze.call(this,{},i),this._keys=(0,N.Xr)();const o=this._targets=[];o.active=0,o.forEach=a=>{for(let l=0,u=o.active;l(0,N.EP)(o)):(0,N.EP)(i.name,i.as)}function zv(i){ze.call(this,(0,N.Xr)(),i)}function vl(i){ze.call(this,[],i)}function Id(i){ze.call(this,[],i)}function xo(i){ze.call(this,null,i)}function Yf(i){ze.call(this,[],i)}Ad.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:Iu.concat({key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Iu},{name:"weights",type:"number",array:!0}]})},{name:"as",type:"string",array:!0,default:["value","density"]}]},(0,N.XW)(Ad,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS);if(!this.value||o.changed()||i.modified()){const l=cg(i.distribution,function up(i){return()=>i.materialize(i.SOURCE).source}(o)),u=i.steps||i.minsteps||25,f=i.steps||i.maxsteps||200;let m=i.method||"pdf";"pdf"!==m&&"cdf"!==m&&(0,N.vU)("Invalid density method: "+m),!i.extent&&!l.data&&(0,N.vU)("Missing density extent parameter."),m=l[m];const g=i.as||["value","density"],v=qf(m,i.extent||(0,N.We)(l.data()),u,f).map(w=>{const C={};return C[g[0]]=w[0],C[g[1]]=w[1],Ti(C)});this.value&&(a.rem=this.value),this.value=a.add=a.source=v}return a}}),kd.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"}]},(0,N.XW)(kd,ze,{transform(i,o){if(this.value&&!i.modified()&&!o.changed())return o;const a=o.materialize(o.SOURCE).source,l=Td(o.source,i.groupby,N.yR),u=i.smooth||!1,f=i.field,m=i.step||((i,o)=>(0,N.yP)((0,N.We)(i,o))/30)(a,f),g=Fr((I,k)=>f(I)-f(k)),b=i.as||"bin",v=l.length;let T,w=1/0,C=-1/0,D=0;for(;DC&&(C=k),I[++T][b]=k}return this.value={start:w,stop:C,step:m},o.reflow(!0).modifies(b)}}),(0,N.XW)(Xf,ar),$v.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},(0,N.XW)($v,ze,{transform(i,o){const a=this.value,l=i.field,u=o.changed()||o.modified(l.fields)||i.modified("field");let f=a[0],m=a[1];if((u||null==f)&&(f=1/0,m=-1/0),o.visit(u?o.SOURCE:o.ADD,g=>{const b=(0,N.He)(l(g));null!=b&&(bm&&(m=b))}),!Number.isFinite(f)||!Number.isFinite(m)){let g=(0,N.el)(l);g&&(g=` for field "${g}"`),o.dataflow.warn(`Infinite extent${g}: [${f}, ${m}]`),f=m=void 0}this.value=[f,m]}}),(0,N.XW)(Ou,ar,{connect(i){return this.detachSubflow=i.detachSubflow,this.targets().add(i),i.source=this},add(i){this.count+=1,this.value.add.push(i)},rem(i){this.count-=1,this.value.rem.push(i)},mod(i){this.value.mod.push(i)},init(i){this.value.init(i,i.NO_SOURCE)},evaluate(){return this.value}}),(0,N.XW)(Bv,ze,{activate(i){this._targets[this._targets.active++]=i},subflow(i,o,a,l){const u=this.value;let m,g,f=(0,N.nr)(u,i)&&u[i];return f?f.value.stampl&&l.count>0);this.initTargets(a)}},initTargets(i){const o=this._targets,a=o.length,l=i?i.length:0;let u=0;for(;uthis.subflow(b,u,o);return this._group=i.group||{},this.initTargets(),o.visit(o.REM,b=>{const v=Kt(b),w=f.get(v);void 0!==w&&(f.delete(v),g(w).rem(b))}),o.visit(o.ADD,b=>{const v=l(b);f.set(Kt(b),v),g(v).add(b)}),m||o.modified(l.fields)?o.visit(o.MOD,b=>{const v=Kt(b),w=f.get(v),C=l(b);w===C?g(C).mod(b):(f.set(v,C),g(w).rem(b),g(C).add(b))}):o.changed(o.MOD)&&o.visit(o.MOD,b=>{g(f.get(Kt(b))).mod(b)}),m&&o.visit(o.REFLOW,b=>{const v=Kt(b),w=f.get(v),C=l(b);w!==C&&(f.set(v,C),g(w).rem(b),g(C).add(b))}),o.clean()?a.runAfter(()=>{this.clean(),f.clean()}):f.empty>a.cleanThreshold&&a.runAfter(f.clean),o}}),(0,N.XW)(wy,ar),zv.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,N.XW)(zv,ze,{transform(i,o){const a=o.dataflow,l=this.value,u=o.fork(),f=u.add,m=u.rem,g=u.mod,b=i.expr;let v=!0;function w(C){const D=Kt(C),T=b(C,i),I=l.get(D);T&&I?(l.delete(D),f.push(C)):T||I?v&&T&&!I&&g.push(C):(l.set(D,1),m.push(C))}return o.visit(o.REM,C=>{const D=Kt(C);l.has(D)?l.delete(D):m.push(C)}),o.visit(o.ADD,C=>{b(C,i)?f.push(C):l.set(Kt(C),1)}),o.visit(o.MOD,w),i.modified()&&(v=!1,o.visit(o.REFLOW,w)),l.empty>a.cleanThreshold&&a.runAfter(l.clean),u}}),vl.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}]},(0,N.XW)(vl,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.fields,u=_E(l,i.as||[]),f=i.index||null,m=u.length;return a.rem=this.value,o.visit(o.SOURCE,g=>{const b=l.map(I=>I(g)),v=b.reduce((I,k)=>Math.max(I,k.length),0);let C,D,T,w=0;for(;w{for(let C,w=0;wm[l]=a(m,i))}}),(0,N.XW)(Yf,ze,{transform(i,o){const a=o.fork(o.ALL),l=i.generator;let m,g,b,u=this.value,f=i.size-u.length;if(f>0){for(m=[];--f>=0;)m.push(b=Ti(l(i))),u.push(b);a.add=a.add.length?a.materialize(a.ADD).add.concat(m):m}else g=u.slice(0,-f),a.rem=a.rem.length?a.materialize(a.REM).rem.concat(g):g,u=u.slice(-f);return a.source=this.value=u,a}});const dp={value:"value",median:Mu,mean:function dt(i,o){let a=0,l=0;if(void 0===o)for(let u of i)null!=u&&(u=+u)>=u&&(++a,l+=u);else{let u=-1;for(let f of i)null!=(f=o(f,++u,i))&&(f=+f)>=f&&(++a,l+=f)}if(a)return l/a},min:Av,max:Su},vE=[];function Vv(i){ze.call(this,[],i)}function xE(i){Md.call(this,i)}function Ey(i){ze.call(this,null,i)}function Uv(i){ar.call(this,null,Od,i)}function Od(i){return this.value&&!i.modified()?this.value:(0,N.Jy)(i.fields,i.flat)}function Hv(i){ze.call(this,[],i),this._pending=null}function Cy(i,o,a){a.forEach(Ti);const l=o.fork(o.NO_FIELDS&o.NO_SOURCE);return l.rem=i.value,i.value=l.source=l.add=a,i._pending=null,l.rem.length&&l.clean(!0),l}function Sy(i){ze.call(this,{},i)}function qv(i){ar.call(this,null,bA,i)}function bA(i){if(this.value&&!i.modified())return this.value;const o=i.extents,a=o.length;let f,m,l=1/0,u=-1/0;for(f=0;fu&&(u=m[1]);return[l,u]}function dg(i){ar.call(this,null,vA,i)}function vA(i){return this.value&&!i.modified()?this.value:i.values.reduce((o,a)=>o.concat(a),[])}function Dy(i){ze.call(this,null,i)}function xA(i){Md.call(this,i)}function My(i){Bv.call(this,i)}function Ru(i){ze.call(this,null,i)}function EE(i){ze.call(this,null,i)}function fp(i){ze.call(this,null,i)}function CA(i){ze.call(this,null,i)}function Ay(i){ze.call(this,[],i),this.count=0}function CE(i){ze.call(this,null,i)}function Rd(i){ze.call(this,null,i),this.modified(!0)}function hp(i){ze.call(this,null,i)}Vv.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},(0,N.XW)(Vv,ze,{transform(i,o){var D,T,I,k,F,L,z,V,U,W,a=o.fork(o.ALL),l=function yA(i){var a,o=i.method||dp.value;if(null!=dp[o])return o===dp.value?(a=void 0!==i.value?i.value:0,()=>a):dp[o];(0,N.vU)("Unrecognized imputation method: "+o)}(i),u=function ug(i){const o=i.field;return a=>a?o(a):NaN}(i),f=(0,N.el)(i.field),m=(0,N.el)(i.key),g=(i.groupby||[]).map(N.el),b=function jv(i,o,a,l){var v,w,C,D,T,I,k,F,u=L=>L(F),f=[],m=l?l.slice():[],g={},b={};for(m.forEach((L,z)=>g[L]=z+1),D=0,k=i.length;Da.add(f))):(u=a.value=a.value||this.init(i),o.visit(o.REM,f=>a.rem(f)),o.visit(o.ADD,f=>a.add(f))),a.changes(),o.visit(o.SOURCE,f=>{(0,N.l7)(f,u[a.cellkey(f)].tuple)}),o.reflow(l).modifies(this._outputs)},changes(){const i=this._adds,o=this._mods;let a,l;for(a=0,l=this._alen;a{const I=Uc(T,m)[g],k=i.counts?T.length:1;qf(I,w||(0,N.We)(T),C,D).forEach(L=>{const z={};for(let V=0;V(this._pending=(0,N.IX)(u.data),f=>f.touch(this)))}:a.request(i.url,i.format).then(l=>Cy(this,o,(0,N.IX)(l.data)))}}),Sy.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}]},(0,N.XW)(Sy,ze,{transform(i,o){const a=i.fields,l=i.index,u=i.values,f=null==i.default?null:i.default,m=i.modified(),g=a.length;let C,D,T,b=m?o.SOURCE:o.ADD,v=o,w=i.as;return u?(D=u.length,g>1&&!w&&(0,N.vU)('Multi-field lookup requires explicit "as" parameter.'),w&&w.length!==g*D&&(0,N.vU)('The "as" parameter has too few output field names.'),w=w||u.map(N.el),C=function(I){for(var L,z,k=0,F=0;ko.modified(I.fields)),b|=T?o.MOD:0),o.visit(b,C),v.modifies(w)}}),(0,N.XW)(qv,ar),(0,N.XW)(dg,ar),(0,N.XW)(Dy,ze,{transform(i,o){return this.modified(i.modified()),this.value=i,o.fork(o.NO_SOURCE|o.NO_FIELDS)}}),xA.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:Ma,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},(0,N.XW)(xA,Md,{_transform:Md.prototype.transform,transform(i,o){return this._transform(function wA(i,o){const a=i.field,l=i.value,u=("count"===i.op?"__count__":i.op)||"sum",f=(0,N.Oj)(a).concat((0,N.Oj)(l)),m=function hr(i,o,a){const l={},u=[];return a.visit(a.SOURCE,f=>{const m=i(f);l[m]||(l[m]=1,u.push(m))}),u.sort(N.j2),o?u.slice(0,o):u}(a,i.limit||0,o);return o.changed()&&i.set("__pivot__",null,null,!0),{key:i.key,groupby:i.groupby,ops:m.map(()=>u),fields:m.map(g=>function wE(i,o,a,l){return(0,N.ZE)(u=>o(u)===i?a(u):NaN,l,i+"")}(g,a,l,f)),as:m.map(g=>g+""),modified:i.modified.bind(i)}}(i,o),o)}}),(0,N.XW)(My,Bv,{transform(i,o){const a=i.subflow,l=i.field,u=f=>this.subflow(Kt(f),a,o,f);return(i.modified("field")||l&&o.modified((0,N.Oj)(l)))&&(0,N.vU)("PreFacet does not support field modification."),this.initTargets(),l?(o.visit(o.MOD,f=>{const m=u(f);l(f).forEach(g=>m.mod(g))}),o.visit(o.ADD,f=>{const m=u(f);l(f).forEach(g=>m.add(Ti(g)))}),o.visit(o.REM,f=>{const m=u(f);l(f).forEach(g=>m.rem(g))})):(o.visit(o.MOD,f=>u(f).mod(f)),o.visit(o.ADD,f=>u(f).add(f)),o.visit(o.REM,f=>u(f).rem(f))),o.clean()&&o.runAfter(()=>this.clean()),o}}),Ru.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,N.XW)(Ru,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.fields,u=_E(i.fields,i.as||[]),f=l?(g,b)=>function fg(i,o,a,l){for(let u=0,f=a.length;u{const b=Kt(g);a.rem.push(m[b]),m[b]=null}),o.visit(o.ADD,g=>{const b=f(g,Ti({}));m[Kt(g)]=b,a.add.push(b)}),o.visit(o.MOD,g=>{a.mod.push(f(g,m[Kt(g)]))}),a}}),(0,N.XW)(EE,ze,{transform(i,o){return this.value=i.value,i.modified("value")?o.fork(o.NO_SOURCE|o.NO_FIELDS):o.StopPropagation}}),fp.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"]}]},(0,N.XW)(fp,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS),l=i.as||["prob","value"];if(this.value&&!i.modified()&&!o.changed())return a.source=this.value,a;const f=Td(o.materialize(o.SOURCE).source,i.groupby,i.field),m=(i.groupby||[]).map(N.el),g=[],b=i.step||.01,v=i.probs||Qr(b/2,1-1e-14,b),w=v.length;return f.forEach(C=>{const D=py(C,v);for(let T=0;T{const f=Kt(u);a.rem.push(l[f]),l[f]=null}),o.visit(o.ADD,u=>{const f=cy(u);l[Kt(u)]=f,a.add.push(f)}),o.visit(o.MOD,u=>{const f=l[Kt(u)];for(const m in u)f[m]=u[m],a.modifies(m);a.mod.push(f)})),a}}),Ay.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},(0,N.XW)(Ay,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.modified("size"),u=i.size,f=this.value.reduce((w,C)=>(w[Kt(C)]=1,w),{});let m=this.value,g=this.count,b=0;function v(w){let C,D;m.length=b&&(C=m[D],f[Kt(C)]&&a.rem.push(C),m[D]=w)),++g}if(o.rem.length&&(o.visit(o.REM,w=>{const C=Kt(w);f[C]&&(f[C]=-1,a.rem.push(w)),--g}),m=m.filter(w=>-1!==f[Kt(w)])),(o.rem.length||l)&&m.length{f[Kt(w)]||v(w)}),b=-1),l&&m.length>u){const w=m.length-u;for(let C=0;C{f[Kt(w)]&&a.mod.push(w)}),o.add.length&&o.visit(o.ADD,v),(o.add.length||b<0)&&(a.add=m.filter(w=>!f[Kt(w)])),this.count=g,this.value=a.source=m,a}}),CE.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"}]},(0,N.XW)(CE,ze,{transform(i,o){if(this.value&&!i.modified())return;const a=o.materialize().fork(o.MOD),l=i.as||"data";return a.rem=this.value?o.rem.concat(this.value):o.rem,this.value=Qr(i.start,i.stop,i.step||1).map(u=>{const f={};return f[l]=u,Ti(f)}),a.add=o.add.concat(this.value),a}}),(0,N.XW)(Rd,ze,{transform(i,o){return this.value=o.source,o.changed()?o.fork(o.NO_SOURCE|o.NO_FIELDS):o.StopPropagation}});const SA=["unit0","unit1"];function Gv(i){ze.call(this,(0,N.Xr)(),i)}function ps(i){ze.call(this,null,i)}hp.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:M2,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:SA}]},(0,N.XW)(hp,ze,{transform(i,o){const a=i.field,l=!1!==i.interval,u="utc"===i.timezone,f=this._floor(i,o),m=(u?Bm:Of)(f.unit).offset,g=i.as||SA,b=g[0],v=g[1],w=f.step;let C=f.start||1/0,D=f.stop||-1/0,T=o.ADD;return(i.modified()||o.changed(o.REM)||o.modified((0,N.Oj)(a)))&&(T=(o=o.reflow(!0)).SOURCE,C=1/0,D=-1/0),o.visit(T,I=>{const k=a(I);let F,L;null==k?(I[b]=null,l&&(I[v]=null)):(I[b]=F=L=f(k),l&&(I[v]=L=m(F,w)),FD&&(D=L))}),f.start=C,f.stop=D,o.modifies(l?g:b)},_floor(i,o){const a="utc"===i.timezone,{units:l,step:u}=i.units?{units:i.units,step:i.step||1}:Q_({extent:i.extent||(0,N.We)(o.materialize(o.SOURCE).source,i.field),maxbins:i.maxbins}),f=T2(l),m=this.value||{},g=(a?J0:$e)(f,u);return g.unit=(0,N.fj)(f),g.units=f,g.step=u,g.start=m.start,g.stop=m.stop,this.value=g}}),(0,N.XW)(Gv,ze,{transform(i,o){const a=o.dataflow,l=i.field,u=this.value,f=g=>u.set(l(g),g);let m=!0;return i.modified("field")||o.modified(l.fields)?(u.clear(),o.visit(o.SOURCE,f)):o.changed()?(o.visit(o.REM,g=>u.delete(l(g))),o.visit(o.ADD,f)):m=!1,this.modified(m),u.empty>a.cleanThreshold&&a.runAfter(u.clean),o.fork()}}),(0,N.XW)(ps,ze,{transform(i,o){(!this.value||i.modified("field")||i.modified("sort")||o.changed()||i.sort&&o.modified(i.sort.fields))&&(this.value=(i.sort?o.source.slice().sort(Fr(i.sort)):o.source).map(i.field))}});const Ko={row_number:function(){return{next:i=>i.index+1}},rank:function(){let i;return{init:()=>i=1,next:o=>{const a=o.index,l=o.data;return a&&o.compare(l[a-1],l[a])?i=a+1:i}}},dense_rank:function(){let i;return{init:()=>i=1,next:o=>{const a=o.index,l=o.data;return a&&o.compare(l[a-1],l[a])?++i:i}}},percent_rank:function(){const i=Ko.rank(),o=i.next;return{init:i.init,next:a=>(o(a)-1)/(a.data.length-1)}},cume_dist:function(){let i;return{init:()=>i=0,next:o=>{const a=o.data,l=o.compare;let u=o.index;if(i0||(0,N.vU)("ntile num must be greater than zero.");const a=Ko.cume_dist(),l=a.next;return{init:a.init,next:u=>Math.ceil(o*l(u))}},lag:function(i,o){return o=+o||1,{next:a=>{const l=a.index-o;return l>=0?i(a.data[l]):null}}},lead:function(i,o){return o=+o||1,{next:a=>{const l=a.index+o,u=a.data;return li(o.data[o.i0])}},last_value:function(i){return{next:o=>i(o.data[o.i1-1])}},nth_value:function(i,o){return(o=+o)>0||(0,N.vU)("nth_value nth must be greater than zero."),{next:a=>{const l=a.i0+(o-1);return lo=null,next:a=>{const l=i(a.data[a.index]);return null!=l?o=l:o}}},next_value:function(i){let o,a;return{init:()=>(o=null,a=-1),next:l=>{const u=l.data;return l.index<=a?o:(a=function Xv(i,o,a){for(let l=o.length;ab[k]=1)}T(i.sort),o.forEach((I,k)=>{const F=a[k],L=l[k],z=u[k]||null,V=(0,N.el)(F),U=pE(I,V,f[k]);if(T(F),m.push(U),(0,N.nr)(Ko,I))g.push(function Q$(i,o,a,l){const u=Ko[i](o,a);return{init:u.init||N.bM,update:function(f,m){m[l]=u.next(f)}}}(I,F,L,U));else{if(null==F&&"count"!==I&&(0,N.vU)("Null aggregate field specified."),"count"===I)return void w.push(U);D=!1;let W=v[V];W||(W=v[V]=[],W.field=F,C.push(W)),W.push(Dd(I,z,U))}}),(w.length||C.length)&&(this.cell=function J2(i,o,a){i=i.map(b=>mE(b,b.field));const l={num:0,agg:null,store:!1,count:o};if(!a)for(var u=i.length,f=l.agg=Array(u),m=0;m0&&!u(f[a],f[a-1])&&(i.i0=o.left(f,f[a])),li.init()),this.cell&&this.cell.init()},MA.update=function(i,o){const a=this.cell,l=this.windows,u=i.data,f=l&&l.length;let m;if(a){for(m=i.p0;mthis.group(u(g));let m=this.state;(!m||a)&&(m=this.state=new Yv(i)),a||o.modified(m.inputs)?(this.value={},o.visit(o.SOURCE,g=>f(g).add(g))):(o.visit(o.REM,g=>f(g).remove(g)),o.visit(o.ADD,g=>f(g).add(g)));for(let g=0,b=this._mlen;g0)for(var b,l=i[0],u=o[0],f=i[a]-l,m=o[a]-u,g=-1;++g<=a;)this._basis.point(this._beta*i[g]+(1-this._beta)*(l+(b=g/a)*f),this._beta*o[g]+(1-this._beta)*(u+b*m));this._x=this._y=null,this._basis.lineEnd()},point:function(i,o){this._x.push(+i),this._y.push(+o)}};const AA=function i(o){function a(l){return 1===o?new hg(l):new Iy(l,o)}return a.beta=function(l){return i(+l)},a}(.85);function pg(i,o,a){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-o),i._y2+i._k*(i._y1-a),i._x2,i._y2)}function TA(i,o){this._context=i,this._k=(1-o)/6}TA.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:pg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2,this._x1=i,this._y1=o;break;case 2:this._point=3;default:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const ME=function i(o){function a(l){return new TA(l,o)}return a.tension=function(l){return i(+l)},a}(0);function mg(i,o){this._context=i,this._k=(1-o)/6}mg.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(i,o){switch(i=+i,o=+o,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:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Oy=function i(o){function a(l){return new mg(l,o)}return a.tension=function(l){return i(+l)},a}(0);function AE(i,o){this._context=i,this._k=(1-o)/6}AE.prototype={areaStart:ac,areaEnd:ac,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(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._x3=i,this._y3=o;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=o);break;case 2:this._point=3,this._x5=i,this._y5=o;break;default:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Fd=function i(o){function a(l){return new AE(l,o)}return a.tension=function(l){return i(+l)},a}(0),Ry=Math.abs,la=Math.atan2,mp=Math.cos,J$=Math.max,Ny=Math.min,Aa=Math.sin,pr=Math.sqrt,lo=1e-12,lc=Math.PI,Fy=lc/2,gg=2*lc;function gp(i){return i>=1?Fy:i<=-1?-Fy:Math.asin(i)}function Kv(i,o,a){var l=i._x1,u=i._y1,f=i._x2,m=i._y2;if(i._l01_a>lo){var g=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,b=3*i._l01_a*(i._l01_a+i._l12_a);l=(l*g-i._x0*i._l12_2a+i._x2*i._l01_2a)/b,u=(u*g-i._y0*i._l12_2a+i._y2*i._l01_2a)/b}if(i._l23_a>lo){var v=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,w=3*i._l23_a*(i._l23_a+i._l12_a);f=(f*v+i._x1*i._l23_2a-o*i._l12_2a)/w,m=(m*v+i._y1*i._l23_2a-a*i._l12_2a)/w}i._context.bezierCurveTo(l,u,f,m,i._x2,i._y2)}function TE(i,o){this._context=i,this._alpha=o}TE.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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2;break;case 2:this._point=3;default:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const kA=function i(o){function a(l){return o?new TE(l,o):new TA(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function Py(i,o){this._context=i,this._alpha=o}Py.prototype={areaStart:ac,areaEnd:ac,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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=o;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=o);break;case 2:this._point=3,this._x5=i,this._y5=o;break;default:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Ly=function i(o){function a(l){return o?new Py(l,o):new AE(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function Pd(i,o){this._context=i,this._alpha=o}Pd.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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,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:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const tR=function i(o){function a(l){return o?new Pd(l,o):new mg(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function kE(i){this._context=i}function IE(i){return new kE(i)}function OE(i){this._context=i}function IA(i){return i<0?-1:1}function OA(i,o,a){var l=i._x1-i._x0,u=o-i._x1,f=(i._y1-i._y0)/(l||u<0&&-0),m=(a-i._y1)/(u||l<0&&-0),g=(f*u+m*l)/(l+u);return(IA(f)+IA(m))*Math.min(Math.abs(f),Math.abs(m),.5*Math.abs(g))||0}function RA(i,o){var a=i._x1-i._x0;return a?(3*(i._y1-i._y0)/a-o)/2:o}function _p(i,o,a){var l=i._x0,f=i._x1,m=i._y1,g=(f-l)/3;i._context.bezierCurveTo(l+g,i._y0+g*o,f-g,m-g*a,f,m)}function Zv(i){this._context=i}function NA(i){this._context=new Fs(i)}function Fs(i){this._context=i}function Qv(i){this._context=i}function Ps(i){var o,l,a=i.length-1,u=new Array(a),f=new Array(a),m=new Array(a);for(u[0]=0,f[0]=2,m[0]=i[0]+2*i[1],o=1;o=0;--o)u[o]=(m[o]-u[o+1])/f[o];for(f[a-1]=(i[a]+u[a-1])/2,o=0;o=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(i,o);else{var a=this._x*(1-this._t)+i*this._t;this._context.lineTo(a,this._y),this._context.lineTo(a,o)}}this._x=i,this._y=o}};const Jv=Math.PI,PE=2*Jv,Zf=1e-6,nR=PE-Zf;function $A(i){this._+=i[0];for(let o=1,a=i.length;o=0))throw new Error(`invalid digits: ${i}`);if(o>15)return $A;const a=10**o;return function(l){this._+=l[0];for(let u=1,f=l.length;uZf)if(Math.abs(C*b-v*w)>Zf&&f){let T=l-m,I=u-g,k=b*b+v*v,F=T*T+I*I,L=Math.sqrt(k),z=Math.sqrt(D),V=f*Math.tan((Jv-Math.acos((k+D-F)/(2*L*z)))/2),U=V/z,W=V/L;Math.abs(U-1)>Zf&&this._append`L${o+U*w},${a+U*C}`,this._append`A${f},${f},0,0,${+(C*T>w*I)},${this._x1=o+W*b},${this._y1=a+W*v}`}else this._append`L${this._x1=o},${this._y1=a}`}arc(o,a,l,u,f,m){if(o=+o,a=+a,m=!!m,(l=+l)<0)throw new Error(`negative radius: ${l}`);let g=l*Math.cos(u),b=l*Math.sin(u),v=o+g,w=a+b,C=1^m,D=m?u-f:f-u;null===this._x1?this._append`M${v},${w}`:(Math.abs(this._x1-v)>Zf||Math.abs(this._y1-w)>Zf)&&this._append`L${v},${w}`,l&&(D<0&&(D=D%PE+PE),D>nR?this._append`A${l},${l},0,1,${C},${o-g},${a-b}A${l},${l},0,1,${C},${this._x1=v},${this._y1=w}`:D>Zf&&this._append`A${l},${l},0,${+(D>=Jv)},${C},${this._x1=o+l*Math.cos(f)},${this._y1=a+l*Math.sin(f)}`)}rect(o,a,l,u){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}h${l=+l}v${+u}h${-l}Z`}toString(){return this._}}function ex(){return new yp}function Ld(i){let o=3;return i.digits=function(a){if(!arguments.length)return o;if(null==a)o=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);o=l}return i},()=>new yp(o)}function tx(i){return i.innerRadius}function nx(i){return i.outerRadius}function zy(i){return i.startAngle}function BA(i){return i.endAngle}function zA(i){return i&&i.padAngle}function ix(i,o,a,l,u,f,m){var g=i-a,b=o-l,v=(m?f:-f)/pr(g*g+b*b),w=v*b,C=-v*g,D=i+w,T=o+C,I=a+w,k=l+C,F=(D+I)/2,L=(T+k)/2,z=I-D,V=k-T,U=z*z+V*V,W=u-f,Y=D*k-I*T,H=(V<0?-1:1)*pr(J$(0,W*W*U-Y*Y)),Z=(Y*V-z*H)/U,te=(-Y*z-V*H)/U,ce=(Y*V+z*H)/U,le=(-Y*z+V*H)/U,ve=Z-F,xe=te-L,Q=ce-F,J=le-L;return ve*ve+xe*xe>Q*Q+J*J&&(Z=ce,te=le),{cx:Z,cy:te,x01:-w,y01:-C,x11:Z*(u/W-1),y11:te*(u/W-1)}}function Vy(i){return"object"==typeof i&&"length"in i?i:Array.from(i)}function yg(i){return i[0]}function bg(i){return i[1]}function rx(i,o){var a=tr(!0),l=null,u=IE,f=null,m=Ld(g);function g(b){var v,C,T,w=(b=Vy(b)).length,D=!1;for(null==l&&(f=u(T=m())),v=0;v<=w;++v)!(v=T;--I)g.point(V[I],U[I]);g.lineEnd(),g.areaEnd()}L&&(V[D]=+i(F,D,C),U[D]=+o(F,D,C),g.point(l?+l(F,D,C):V[D],a?+a(F,D,C):U[D]))}if(z)return g=null,z+""||null}function w(){return rx().defined(u).curve(m).context(f)}return i="function"==typeof i?i:void 0===i?yg:tr(+i),o="function"==typeof o?o:tr(void 0===o?0:+o),a="function"==typeof a?a:void 0===a?bg:tr(+a),v.x=function(C){return arguments.length?(i="function"==typeof C?C:tr(+C),l=null,v):i},v.x0=function(C){return arguments.length?(i="function"==typeof C?C:tr(+C),v):i},v.x1=function(C){return arguments.length?(l=null==C?null:"function"==typeof C?C:tr(+C),v):l},v.y=function(C){return arguments.length?(o="function"==typeof C?C:tr(+C),a=null,v):o},v.y0=function(C){return arguments.length?(o="function"==typeof C?C:tr(+C),v):o},v.y1=function(C){return arguments.length?(a=null==C?null:"function"==typeof C?C:tr(+C),v):a},v.lineX0=v.lineY0=function(){return w().x(i).y(o)},v.lineY1=function(){return w().x(i).y(a)},v.lineX1=function(){return w().x(l).y(o)},v.defined=function(C){return arguments.length?(u="function"==typeof C?C:tr(!!C),v):u},v.curve=function(C){return arguments.length?(m=C,null!=f&&(g=m(f)),v):m},v.context=function(C){return arguments.length?(null==C?f=g=null:g=m(f=C),v):f},v}ex.prototype=yp.prototype,pr(3);const ox={draw(i,o){const a=pr(o/lc);i.moveTo(a,0),i.arc(0,0,a,0,gg)}};pr(1/3),Aa(lc/10),Aa(7*lc/10);function $d(i,o){if(typeof document<"u"&&document.createElement){const a=document.createElement("canvas");if(a&&a.getContext)return a.width=i,a.height=o,a}return null}Aa(gg/10),mp(gg/10),pr(3),pr(3),pr(3),pr(12);const lx=Fc(Tf),Bd=lx.right,aR=lx.left,Hy=(Fc(yl),Bd);function Za(i,o,a){i.prototype=o.prototype=a,a.constructor=i}function Ls(i,o){var a=Object.create(i.prototype);for(var l in o)a[l]=o[l];return a}function co(){}var Pu=1/.7,Qa="\\s*([+-]?\\d+)\\s*",Gc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ka="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wy=/^#([0-9a-f]{3,8})$/,ZA=new RegExp(`^rgb\\(${Qa},${Qa},${Qa}\\)$`),Jf=new RegExp(`^rgb\\(${ka},${ka},${ka}\\)$`),QA=new RegExp(`^rgba\\(${Qa},${Qa},${Qa},${Gc}\\)$`),Ja=new RegExp(`^rgba\\(${ka},${ka},${ka},${Gc}\\)$`),cc=new RegExp(`^hsl\\(${Gc},${ka},${ka}\\)$`),Vr=new RegExp(`^hsla\\(${Gc},${ka},${ka},${Gc}\\)$`),HE={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 eh(){return this.rgb().formatHex()}function JA(){return this.rgb().formatRgb()}function vg(i){var o,a;return i=(i+"").trim().toLowerCase(),(o=Wy.exec(i))?(a=o[1].length,o=parseInt(o[1],16),6===a?WE(o):3===a?new Tn(o>>8&15|o>>4&240,o>>4&15|240&o,(15&o)<<4|15&o,1):8===a?cx(o>>24&255,o>>16&255,o>>8&255,(255&o)/255):4===a?cx(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|240&o,((15&o)<<4|15&o)/255):null):(o=ZA.exec(i))?new Tn(o[1],o[2],o[3],1):(o=Jf.exec(i))?new Tn(255*o[1]/100,255*o[2]/100,255*o[3]/100,1):(o=QA.exec(i))?cx(o[1],o[2],o[3],o[4]):(o=Ja.exec(i))?cx(255*o[1]/100,255*o[2]/100,255*o[3]/100,o[4]):(o=cc.exec(i))?eT(o[1],o[2]/100,o[3]/100,1):(o=Vr.exec(i))?eT(o[1],o[2]/100,o[3]/100,o[4]):HE.hasOwnProperty(i)?WE(HE[i]):"transparent"===i?new Tn(NaN,NaN,NaN,0):null}function WE(i){return new Tn(i>>16&255,i>>8&255,255&i,1)}function cx(i,o,a,l){return l<=0&&(i=o=a=NaN),new Tn(i,o,a,l)}function qE(i){return i instanceof co||(i=vg(i)),i?new Tn((i=i.rgb()).r,i.g,i.b,i.opacity):new Tn}function Lu(i,o,a,l){return 1===arguments.length?qE(i):new Tn(i,o,a,l??1)}function Tn(i,o,a,l){this.r=+i,this.g=+o,this.b=+a,this.opacity=+l}function jr(){return`#${Vd(this.r)}${Vd(this.g)}${Vd(this.b)}`}function ux(){const i=el(this.opacity);return`${1===i?"rgb(":"rgba("}${Xc(this.r)}, ${Xc(this.g)}, ${Xc(this.b)}${1===i?")":`, ${i})`}`}function el(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Xc(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Vd(i){return((i=Xc(i))<16?"0":"")+i.toString(16)}function eT(i,o,a,l){return l<=0?i=o=a=NaN:a<=0||a>=1?i=o=NaN:o<=0&&(i=NaN),new $s(i,o,a,l)}function tT(i){if(i instanceof $s)return new $s(i.h,i.s,i.l,i.opacity);if(i instanceof co||(i=vg(i)),!i)return new $s;if(i instanceof $s)return i;var o=(i=i.rgb()).r/255,a=i.g/255,l=i.b/255,u=Math.min(o,a,l),f=Math.max(o,a,l),m=NaN,g=f-u,b=(f+u)/2;return g?(m=o===f?(a-l)/g+6*(a0&&b<1?0:m,new $s(m,g,b,i.opacity)}function wp(i,o,a,l){return 1===arguments.length?tT(i):new $s(i,o,a,l??1)}function $s(i,o,a,l){this.h=+i,this.s=+o,this.l=+a,this.opacity=+l}function uR(i){return(i=(i||0)%360)<0?i+360:i}function GE(i){return Math.max(0,Math.min(1,i||0))}function uc(i,o,a){return 255*(i<60?o+(a-o)*i/60:i<180?a:i<240?o+(a-o)*(240-i)/60:o)}function dx(i,o,a,l,u){var f=i*i,m=f*i;return((1-3*i+3*f-m)*o+(4-6*f+3*m)*a+(1+3*i+3*f-3*m)*l+m*u)/6}function XE(i){var o=i.length-1;return function(a){var l=a<=0?a=0:a>=1?(a=1,o-1):Math.floor(a*o),u=i[l],f=i[l+1];return dx((a-l/o)*o,l>0?i[l-1]:2*u-f,u,f,l=240?i-240:i+120,u,l),uc(i,u,l),uc(i<120?i+240:i-120,u,l),this.opacity)},clamp(){return new $s(uR(this.h),GE(this.s),GE(this.l),el(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 i=el(this.opacity);return`${1===i?"hsl(":"hsla("}${uR(this.h)}, ${100*GE(this.s)}%, ${100*GE(this.l)}%${1===i?")":`, ${i})`}`}}));const qy=i=>()=>i;function Cp(i,o){return function(a){return i+a*o}}function Xy(i,o){var a=o-i;return a?Cp(i,a>180||a<-180?a-360*Math.round(a/360):a):qy(isNaN(i)?o:i)}function ms(i,o){var a=o-i;return a?Cp(i,a):qy(isNaN(i)?o:i)}const Ro=function i(o){var a=function YE(i){return 1==(i=+i)?ms:function(o,a){return a-o?function Gy(i,o,a){return i=Math.pow(i,a),o=Math.pow(o,a)-i,a=1/a,function(l){return Math.pow(i+l*o,a)}}(o,a,i):qy(isNaN(o)?a:o)}}(o);function l(u,f){var m=a((u=Lu(u)).r,(f=Lu(f)).r),g=a(u.g,f.g),b=a(u.b,f.b),v=ms(u.opacity,f.opacity);return function(w){return u.r=m(w),u.g=g(w),u.b=b(w),u.opacity=v(w),u+""}}return l.gamma=i,l}(1);function Sp(i){return function(o){var m,g,a=o.length,l=new Array(a),u=new Array(a),f=new Array(a);for(m=0;ma&&(f=o.slice(a,f),g[m]?g[m]+=f:g[++m]=f),(l=l[0])===(u=u[0])?g[m]?g[m]+=u:g[++m]=u:(g[++m]=null,b.push({i:m,x:dc(l,u)})),a=Dp.lastIndex;return ao&&(a=i,i=o,o=a),function(l){return Math.max(i,Math.min(o,l))}}(i[0],i[D-1])),g=D>2?El:Mp,b=v=null,C}function C(D){return null==D||isNaN(D=+D)?f:(b||(b=g(i.map(l),o,a)))(l(m(D)))}return C.invert=function(D){return m(u((v||(v=g(o,i.map(l),dc)))(D)))},C.domain=function(D){return arguments.length?(i=Array.from(D,xg),w()):i.slice()},C.range=function(D){return arguments.length?(o=Array.from(D),w()):o.slice()},C.rangeRound=function(D){return o=Array.from(D),a=Ky,w()},C.clamp=function(D){return arguments.length?(m=!!D||Bs,w()):m!==Bs},C.interpolate=function(D){return arguments.length?(a=D,w()):a},C.unknown=function(D){return arguments.length?(f=D,C):f},function(D,T){return l=D,u=T,w()}}function Eg(){return wg()(Bs,Bs)}function Ud(i,o){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(o).domain(i)}return this}function Yc(i,o){switch(arguments.length){case 0:break;case 1:"function"==typeof i?this.interpolator(i):this.range(i);break;default:this.domain(i),"function"==typeof o?this.interpolator(o):this.range(o)}return this}function Cg(i,o,a,l){var f,u=fr(i,o,a);switch((l=Qi(l??",f")).type){case"s":var m=Math.max(Math.abs(i),Math.abs(o));return null==l.precision&&!isNaN(f=Dn(u,m))&&(l.precision=f),Ms(l,m);case"":case"e":case"g":case"p":case"r":null==l.precision&&!isNaN(f=Jt(u,Math.max(Math.abs(i),Math.abs(o))))&&(l.precision=f-("e"===l.type));break;case"f":case"%":null==l.precision&&!isNaN(f=Hi(u))&&(l.precision=f-2*("%"===l.type))}return va(l)}function _s(i){var o=i.domain;return i.ticks=function(a){var l=o();return zr(l[0],l[l.length-1],a??10)},i.tickFormat=function(a,l){var u=o();return Cg(u[0],u[u.length-1],a??10,l)},i.nice=function(a){null==a&&(a=10);var b,v,l=o(),u=0,f=l.length-1,m=l[u],g=l[f],w=10;for(g0;){if((v=Ci(m,g,a))===b)return l[u]=m,l[f]=g,o(l);if(v>0)m=Math.floor(m/v)*v,g=Math.ceil(g/v)*v;else{if(!(v<0))break;m=Math.ceil(m*v)/v,g=Math.floor(g*v)/v}b=v}return i},i}function sT(i,o){var m,a=0,l=(i=i.slice()).length-1,u=i[a],f=i[l];return f-i(-o,a)}function lT(i){const o=i(Sg,eC),a=o.domain;let u,f,l=10;function m(){return u=function Dg(i){return i===Math.E?Math.log:10===i&&Math.log10||2===i&&Math.log2||(i=Math.log(i),o=>Math.log(o)/i)}(l),f=function nC(i){return 10===i?Tp:i===Math.E?Math.exp:o=>Math.pow(i,o)}(l),a()[0]<0?(u=hx(u),f=hx(f),i(aT,tC)):i(Sg,eC),o}return o.base=function(g){return arguments.length?(l=+g,m()):l},o.domain=function(g){return arguments.length?(a(g),m()):a()},o.ticks=g=>{const b=a();let v=b[0],w=b[b.length-1];const C=w0){for(;D<=T;++D)for(I=1;Iw)break;L.push(k)}}else for(;D<=T;++D)for(I=l-1;I>=1;--I)if(k=D>0?I/f(-D):I*f(D),!(kw)break;L.push(k)}2*L.length{if(null==g&&(g=10),null==b&&(b=10===l?"s":","),"function"!=typeof b&&(!(l%1)&&null==(b=Qi(b)).precision&&(b.trim=!0),b=va(b)),g===1/0)return b;const v=Math.max(1,l*g/o.ticks().length);return w=>{let C=w/f(Math.round(u(w)));return C*la(sT(a(),{floor:g=>f(Math.floor(u(g))),ceil:g=>f(Math.ceil(u(g)))})),o}function Mg(i){return function(o){return o<0?-Math.pow(-o,i):Math.pow(o,i)}}function uT(i){return i<0?-Math.sqrt(-i):Math.sqrt(i)}function Jy(i){return i<0?-i*i:i*i}function eb(i){var o=i(Bs,Bs),a=1;return o.exponent=function(u){return arguments.length?(a=+u,function l(){return 1===a?i(Bs,Bs):.5===a?i(uT,Jy):i(Mg(a),Mg(1/a))}()):a},_s(o)}function px(){var i=eb(wg());return i.copy=function(){return Ap(i,px()).exponent(i.exponent())},Ud.apply(i,arguments),i}function tb(i){return function(o){return Math.sign(o)*Math.log1p(Math.abs(o/i))}}function nb(i){return function(o){return Math.sign(o)*Math.expm1(Math.abs(o))*i}}function mx(i){var o=1,a=i(tb(o),nb(o));return a.constant=function(l){return arguments.length?i(tb(o=+l),nb(o)):o},_s(a)}function Wd(i,o,a,l,u,f){const m=[[qh,1,vr],[qh,5,5e3],[qh,15,15e3],[qh,30,3e4],[f,1,po],[f,5,5*po],[f,15,15*po],[f,30,30*po],[u,1,xr],[u,3,3*xr],[u,6,6*xr],[u,12,12*xr],[l,1,Wn],[l,2,2*Wn],[a,1,ea],[o,1,Xl],[o,3,3*Xl],[i,1,yu]];function b(v,w,C){const D=Math.abs(w-v)/C,T=Fc(([,,F])=>F).right(m,D);if(T===m.length)return i.every(fr(v/yu,w/yu,C));if(0===T)return Af.every(Math.max(fr(v,w,C),1));const[I,k]=m[D/m[T-1][2]180?w+=360:w-v>180&&(v+=360),D.push({i:C.push(u(C)+"rotate(",null,l)-2,x:dc(v,w)})):w&&C.push(u(C)+"rotate("+w+l)}(v.rotate,w.rotate,C,D),function g(v,w,C,D){v!==w?D.push({i:C.push(u(C)+"skewX(",null,l)-2,x:dc(v,w)}):w&&C.push(u(C)+"skewX("+w+l)}(v.skewX,w.skewX,C,D),function b(v,w,C,D,T,I){if(v!==C||w!==D){var k=T.push(u(T)+"scale(",null,",",null,")");I.push({i:k-4,x:dc(v,C)},{i:k-2,x:dc(w,D)})}else(1!==C||1!==D)&&T.push(u(T)+"scale("+C+","+D+")")}(v.scaleX,v.scaleY,w.scaleX,w.scaleY,C,D),v=w=null,function(T){for(var F,I=-1,k=D.length;++IyT?Math.pow(i,1/3):i/vC+ub}function Tx(i){return i>Fp?i*i*i:vC*(i-ub)}function db(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function bT(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function fb(i,o,a,l){return 1===arguments.length?function Vn(i){if(i instanceof ue)return new ue(i.h,i.c,i.l,i.opacity);if(i instanceof Bu||(i=Ax(i)),0===i.a&&0===i.b)return new ue(NaN,00?l:1:0}const rh="linear",qd="log",pb="pow",zs="sqrt",mb="symlog",Bp="time",zp="utc",Sl="sequential",Vp="diverging",Fg="quantile",Fx="quantize",Px="threshold",Lx="ordinal",$x="point",jp="bin-ordinal",Zo="continuous",Pg="discrete",il="discretizing",fc="interpolating",MC="temporal";function Bx(){const i=Ex().unknown(void 0),o=i.domain,a=i.range;let u,f,l=[0,1],m=!1,g=0,b=0,v=.5;function w(){const C=o().length,D=l[1]k+u*L);return a(D?F.reverse():F)}return delete i.unknown,i.domain=function(C){return arguments.length?(o(C),w()):o()},i.range=function(C){return arguments.length?(l=[+C[0],+C[1]],w()):l.slice()},i.rangeRound=function(C){return l=[+C[0],+C[1]],m=!0,w()},i.bandwidth=function(){return f},i.step=function(){return u},i.round=function(C){return arguments.length?(m=!!C,w()):m},i.padding=function(C){return arguments.length?(b=Math.max(0,Math.min(1,C)),g=b,w()):g},i.paddingInner=function(C){return arguments.length?(g=Math.max(0,Math.min(1,C)),w()):g},i.paddingOuter=function(C){return arguments.length?(b=Math.max(0,Math.min(1,C)),w()):b},i.align=function(C){return arguments.length?(v=Math.max(0,Math.min(1,C)),w()):v},i.invertRange=function(C){if(null==C[0]||null==C[1])return;const D=l[1]l[1-D])?void 0:(L=Math.max(0,Bd(T,k)-1),z=k===F?L:Bd(T,F)-1,k-T[L]>f+1e-10&&++L,D&&(V=L,L=I-z,z=I-V),L>z?void 0:o().slice(L,z+1))},i.invert=function(C){const D=i.invertRange([C,C]);return D&&D[0]},i.copy=function(){return Bx().domain(o()).range(l).round(m).paddingInner(g).paddingOuter(b).align(v)},w()}function CT(i){const o=i.copy;return i.padding=i.paddingOuter,delete i.paddingInner,i.copy=function(){return CT(o())},i}var DT=Array.prototype.map;const ys=Array.prototype.slice,Gd=new Map,Up=Symbol("vega_scale");function Xd(i){return i[Up]=!0,i}function Yn(i,o,a){return arguments.length>1?(Gd.set(i,function $g(i,o,a){const l=function(){const f=o();return f.invertRange||(f.invertRange=f.invert?function No(i){return function(o){let u,a=o[0],l=o[1];return l=l&&a[b]<=u&&(f<0&&(f=b),m=b);if(!(f<0))return l=i.invertExtent(a[f]),u=i.invertExtent(a[m]),[void 0===l[0]?l[1]:l[0],void 0===u[1]?u[0]:u[1]]}}(f):void 0),f.type=i,Xd(f)};return l.metadata=(0,N.Rg)((0,N.IX)(a)),l}(i,o,a)),this):ah(i)?Gd.get(i):void 0}function ah(i){return Gd.has(i)}function Kc(i,o){const a=Gd.get(i);return a&&a.metadata[o]}function AC(i){return Kc(i,Zo)}function gb(i){return Kc(i,Pg)}function TC(i){return Kc(i,il)}function MT(i){return Kc(i,qd)}function TT(i){return Kc(i,fc)}function kT(i){return Kc(i,Fg)}Yn("identity",function oT(i){var o;function a(l){return null==l||isNaN(l=+l)?o:l}return a.invert=a,a.domain=a.range=function(l){return arguments.length?(i=Array.from(l,xg),a):i.slice()},a.unknown=function(l){return arguments.length?(o=l,a):o},a.copy=function(){return oT(i).unknown(o)},i=arguments.length?Array.from(i,xg):[0,1],_s(a)}),Yn(rh,function fx(){var i=Eg();return i.copy=function(){return Ap(i,fx())},Ud.apply(i,arguments),_s(i)},Zo),Yn(qd,function cT(){const i=lT(wg()).domain([1,10]);return i.copy=()=>Ap(i,cT()).base(i.base()),Ud.apply(i,arguments),i},[Zo,qd]),Yn(pb,px,Zo),Yn(zs,function iC(){return px.apply(null,arguments).exponent(.5)},Zo),Yn(mb,function Hd(){var i=mx(wg());return i.copy=function(){return Ap(i,Hd()).constant(i.constant())},Ud.apply(i,arguments)},Zo),Yn(Bp,function rC(){return Ud.apply(zn(gx,Ag,di,Nc,ta,Ri,Va,Bi,qh,Nr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},[Zo,MC]),Yn(zp,function _x(){return Ud.apply(zn(dT,fR,za,Mf,gi,Wi,K0,R1,qh,bo).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},[Zo,MC]),Yn(Sl,oC,[Zo,fc]),Yn(`${Sl}-${rh}`,oC,[Zo,fc]),Yn(`${Sl}-${qd}`,function ib(){var i=lT(tl()).domain([1,10]);return i.copy=function(){return Cl(i,ib()).base(i.base())},Yc.apply(i,arguments)},[Zo,fc,qd]),Yn(`${Sl}-${pb}`,fT,[Zo,fc]),Yn(`${Sl}-${zs}`,function aC(){return fT.apply(null,arguments).exponent(.5)},[Zo,fc]),Yn(`${Sl}-${mb}`,function sC(){var i=mx(tl());return i.copy=function(){return Cl(i,sC()).constant(i.constant())},Yc.apply(i,arguments)},[Zo,fc]),Yn(`${Vp}-${rh}`,function rb(){var i=_s(Ip()(Bs));return i.copy=function(){return Cl(i,rb())},Yc.apply(i,arguments)},[Zo,fc]),Yn(`${Vp}-${qd}`,function Tg(){var i=lT(Ip()).domain([.1,1,10]);return i.copy=function(){return Cl(i,Tg()).base(i.base())},Yc.apply(i,arguments)},[Zo,fc,qd]),Yn(`${Vp}-${pb}`,yx,[Zo,fc]),Yn(`${Vp}-${zs}`,function cC(){return yx.apply(null,arguments).exponent(.5)},[Zo,fc]),Yn(`${Vp}-${mb}`,function hT(){var i=mx(Ip());return i.copy=function(){return Cl(i,hT()).constant(i.constant())},Yc.apply(i,arguments)},[Zo,fc]),Yn(Fg,function uC(){var l,i=[],o=[],a=[];function u(){var m=0,g=Math.max(1,o.length);for(a=new Array(g-1);++m0?a[g-1]:i[0],g=a?[l[a-1],o]:[l[v-1],l[v]]},m.unknown=function(b){return arguments.length&&(f=b),m},m.thresholds=function(){return l.slice()},m.copy=function(){return bx().domain([i,o]).range(u).unknown(f)},Ud.apply(_s(m),arguments)},il),Yn(Px,function dC(){var a,i=[.5],o=[0,1],l=1;function u(f){return null!=f&&f<=f?o[Hy(i,f,0,l)]:a}return u.domain=function(f){return arguments.length?(i=Array.from(f),l=Math.min(i.length,o.length-1),u):i.slice()},u.range=function(f){return arguments.length?(o=Array.from(f),l=Math.min(i.length,o.length-1),u):o.slice()},u.invertExtent=function(f){var m=o.indexOf(f);return[i[m-1],i[m]]},u.unknown=function(f){return arguments.length?(a=f,u):a},u.copy=function(){return dC().domain(i).range(o).unknown(a)},Ud.apply(u,arguments)},il),Yn(jp,function sh(){let i=[],o=[];function a(l){return null==l||l!=l?void 0:o[(Hy(i,l)-1)%o.length]}return a.domain=function(l){return arguments.length?(i=function zx(i){return DT.call(i,N.He)}(l),a):i.slice()},a.range=function(l){return arguments.length?(o=ys.call(l),a):o.slice()},a.tickFormat=function(l,u){return Cg(i[0],(0,N.fj)(i),l??10,u)},a.copy=function(){return sh().domain(a.domain()).range(a.range())},a},[Pg,il]),Yn(Lx,Ex,Pg),Yn("band",Bx,Pg),Yn($x,function ST(){return CT(Bx().paddingInner(1))},Pg);const IT=["clamp","base","constant","exponent"];function Vx(i,o){const a=o[0],l=(0,N.fj)(o)-a;return function(u){return i(a+u*l)}}function _b(i,o,a){return lC(kC(o||"rgb",a),i)}function Bg(i,o){const a=new Array(o),l=o+1;for(let u=0;ui[g]?m[g](i[g]()):0),m):(0,N.a9)(.5)}function kC(i,o){const a=re[function Yd(i){return"interpolate"+i.toLowerCase().split("-").map(o=>o[0].toUpperCase()+o.slice(1)).join("")}(i)];return null!=o&&a&&a.gamma?a.gamma(o):a}function IC(i){const o=i.length/6|0,a=new Array(o);for(let l=0;l1?(Hp[i]=o,this):Hp[i]}OT({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},IC),OT({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"},i=>_b(IC(i)));const jg="symbol",Vu="discrete",_R=i=>(0,N.kJ)(i)?i.map(o=>String(o)):String(i),bs=(i,o)=>i[1]-o[1],NT=(i,o)=>o[1]-i[1];function OC(i,o,a){let l;return(0,N.hj)(o)&&(i.bins&&(o=Math.max(o,i.bins.length)),null!=a&&(o=Math.min(o,Math.floor((0,N.yP)(i.domain())/a||1)+1))),(0,N.Kn)(o)&&(l=o.step,o=o.interval),(0,N.HD)(o)&&(o=i.type===Bp?Of(o):i.type==zp?Bm(o):(0,N.vU)("Only time and utc scales accept interval strings."),l&&(o=o.every(l))),o}function RC(i,o,a){let l=i.range(),u=l[0],f=(0,N.fj)(l),m=bs;if(u>f&&(l=f,f=u,u=l,m=NT),u=Math.floor(u),f=Math.ceil(f),o=o.map(g=>[g,i(g)]).filter(g=>u<=g[1]&&g[1]<=f).sort(m).map(g=>g[0]),a>0&&o.length>1){const g=[o[0],(0,N.fj)(o)];for(;o.length>a&&o.length>=3;)o=o.filter((b,v)=>!(v%2));o.length<3&&(o=g)}return o}function Kd(i,o){return i.bins?RC(i,i.bins):i.ticks?i.ticks(o):i.domain()}function FT(i,o,a,l,u,f){const m=o.type;let g=_R;if(m===Bp||u===Bp)g=i.timeFormat(l);else if(m===zp||u===zp)g=i.utcFormat(l);else if(MT(m)){const b=i.formatFloat(l);if(f||o.bins)g=b;else{const v=jx(o,a,!1);g=w=>v(w)?b(w):""}}else if(o.tickFormat){const b=o.domain();g=i.formatSpan(b[0],b[b.length-1],a,l)}else l&&(g=i.format(l));return g}function jx(i,o,a){const l=Kd(i,o),u=i.base(),f=Math.log(u),m=Math.max(1,u*o/l.length),g=b=>{let v=b/Math.pow(u,Math.round(Math.log(b)/f));return v*ucn[i.type]||i.bins;function LT(i,o,a,l,u,f,m){const g=ju[o.type]&&f!==Bp&&f!==zp?function s3(i,o,a){const l=o[ju[o.type]](),u=l.length;let m,f=u>1?l[1]-l[0]:l[0];for(m=1;m(o,a,l)=>{const u=Wp(l[a+1],Wp(l.max,1/0)),f=LC(o,i),m=LC(u,i);return f&&m?f+" \u2013 "+m:m?"< "+m:"\u2265 "+f},Wp=(i,o)=>i??o,FC=i=>(o,a)=>a?i(o):null,PC=i=>o=>i(o),LC=(i,o)=>Number.isFinite(i)?o(i):null;function lh(i,o,a){a=a||{};const l=Math.max(3,a.maxlen||7),u=function yR(i,o,a,l){const u=l||o.type;return(0,N.HD)(a)&&function AT(i){return Kc(i,MC)}(u)&&(a=a.replace(/%a/g,"%A").replace(/%b/g,"%B")),a||u!==Bp?a||u!==zp?LT(i,o,5,null,a,l,!0):i.utcFormat("%A, %d %B %Y, %X UTC"):i.timeFormat("%A, %d %B %Y, %X")}(i,o,a.format,a.formatType);if(TC(o.type)){const f=Ux(o).slice(1).map(u),m=f.length;return`${m} boundar${1===m?"y":"ies"}: ${f.join(", ")}`}if(gb(o.type)){const f=o.domain(),m=f.length;return`${m} value${1===m?"":"s"}: ${m>l?f.slice(0,l-2).map(u).join(", ")+", ending with "+f.slice(-1).map(u):f.map(u).join(", ")}`}{const f=o.domain();return`values from ${u(f[0])} to ${u((0,N.fj)(f))}`}}let Hx=0;function bb(i){return i&&i.gradient}function $C(i,o,a){const l=i.gradient;let u=i.id,f="radial"===l?"p_":"";return u||(u=i.id="gradient_"+Hx++,"radial"===l?(i.x1=hc(i.x1,.5),i.y1=hc(i.y1,.5),i.r1=hc(i.r1,0),i.x2=hc(i.x2,.5),i.y2=hc(i.y2,.5),i.r2=hc(i.r2,.5),f="p_"):(i.x1=hc(i.x1,0),i.y1=hc(i.y1,0),i.x2=hc(i.x2,1),i.y2=hc(i.y2,0))),o[u]=i,"url("+(a||"")+"#"+f+u+")"}function hc(i,o){return i??o}function qp(i,o){var l,a=[];return l={gradient:"linear",x1:i?i[0]:0,y1:i?i[1]:0,x2:o?o[0]:1,y2:o?o[1]:0,stops:a,stop:function(u,f){return a.push({offset:u,color:f}),l}}}const zT={basis:{curve:function Nd(i){return new hg(i)}},"basis-closed":{curve:function Ya(i){return new eR(i)}},"basis-open":{curve:function DE(i){return new SE(i)}},bundle:{curve:AA,tension:"beta",value:.85},cardinal:{curve:ME,tension:"tension",value:0},"cardinal-open":{curve:Oy,tension:"tension",value:0},"cardinal-closed":{curve:Fd,tension:"tension",value:0},"catmull-rom":{curve:kA,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Ly,tension:"alpha",value:.5},"catmull-rom-open":{curve:tR,tension:"alpha",value:.5},linear:{curve:IE},"linear-closed":{curve:function RE(i){return new OE(i)}},monotone:{horizontal:function FA(i){return new NA(i)},vertical:function NE(i){return new Zv(i)}},natural:{curve:function Fu(i){return new Qv(i)}},step:{curve:function PA(i){return new _g(i,.5)}},"step-after":{curve:function FE(i){return new _g(i,1)}},"step-before":{curve:function LA(i){return new _g(i,0)}}};function qx(i,o,a){var l=(0,N.nr)(zT,i)&&zT[i],u=null;return l&&(u=l.curve||l[o||"vertical"],l.tension&&null!=a&&(u=u[l.tension](a))),u}const BC={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},bR=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,vb=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,zC=/^((\s+,?\s*)|(,\s*))/,VT=/^[01]/;function Gp(i){const o=[];return(i.match(bR)||[]).forEach(l=>{let u=l[0];const f=u.toLowerCase(),m=BC[f],g=function jT(i,o,a){const l=[];for(let u=0;o&&u1&&(k=Math.sqrt(k),a*=k,l*=k);const F=D/a,L=C/a,z=-C/l,V=D/l,U=F*g+L*b,W=z*g+V*b,Y=F*i+L*o,H=z*i+V*o;let te=1/((Y-U)*(Y-U)+(H-W)*(H-W))-.25;te<0&&(te=0);let ce=Math.sqrt(te);f==u&&(ce=-ce);const le=.5*(U+Y)-ce*(H-W),ve=.5*(W+H)+ce*(Y-U),xe=Math.atan2(W-ve,U-le);let J=Math.atan2(H-ve,Y-le)-xe;J<0&&1===f?J+=Zc:J>0&&0===f&&(J-=Zc);const oe=Math.ceil(Math.abs(J/(ch+.001))),we=[];for(let ne=0;ne+i}function Wg(i,o,a){return Math.max(o,Math.min(i,a))}function Vs(){var i=uo,o=mc,a=Gx,l=Hg,u=Hu(0),f=u,m=u,g=u,b=null;function v(w,C,D){var T,I=C??+i.call(this,w),k=D??+o.call(this,w),F=+a.call(this,w),L=+l.call(this,w),z=Math.min(F,L)/2,V=Wg(+u.call(this,w),0,z),U=Wg(+f.call(this,w),0,z),W=Wg(+m.call(this,w),0,z),Y=Wg(+g.call(this,w),0,z);if(b||(b=T=ex()),V<=0&&U<=0&&W<=0&&Y<=0)b.rect(I,k,F,L);else{var H=I+F,Z=k+L;b.moveTo(I+V,k),b.lineTo(H-U,k),b.bezierCurveTo(H-Uu*U,k,H,k+Uu*U,H,k+U),b.lineTo(H,Z-Y),b.bezierCurveTo(H,Z-Uu*Y,H-Uu*Y,Z,H-Y,Z),b.lineTo(I+W,Z),b.bezierCurveTo(I+Uu*W,Z,I,Z-Uu*W,I,Z-W),b.lineTo(I,k+V),b.bezierCurveTo(I,k+Uu*V,I+Uu*V,k,I+V,k),b.closePath()}if(T)return b=null,T+""||null}return v.x=function(w){return arguments.length?(i=Hu(w),v):i},v.y=function(w){return arguments.length?(o=Hu(w),v):o},v.width=function(w){return arguments.length?(a=Hu(w),v):a},v.height=function(w){return arguments.length?(l=Hu(w),v):l},v.cornerRadius=function(w,C,D,T){return arguments.length?(u=Hu(w),f=null!=C?Hu(C):u,g=null!=D?Hu(D):u,m=null!=T?Hu(T):f,v):u},v.context=function(w){return arguments.length?(b=w??null,v):b},v}function Xp(){var i,o,a,l,f,m,g,b,u=null;function v(C,D,T){const I=T/2;if(f){var k=g-D,F=C-m;if(k||F){var L=Math.hypot(k,F),z=(k/=L)*b,V=(F/=L)*b,U=Math.atan2(F,k);u.moveTo(m-z,g-V),u.lineTo(C-k*I,D-F*I),u.arc(C,D,I,U-Math.PI,U),u.lineTo(m+z,g+V),u.arc(m,g,b,U,U+Math.PI)}else u.arc(C,D,I,0,Zc);u.closePath()}else f=1;m=C,g=D,b=I}function w(C){var D,I,F,T=C.length,k=!1;for(null==u&&(u=F=ex()),D=0;D<=T;++D)!(Di.x||0,Kp=i=>i.y||0,Qd=i=>!1!==i.defined,ER=function jA(){var i=tx,o=nx,a=tr(0),l=null,u=zy,f=BA,m=zA,g=null,b=Ld(v);function v(){var w,C,D=+i.apply(this,arguments),T=+o.apply(this,arguments),I=u.apply(this,arguments)-Fy,k=f.apply(this,arguments)-Fy,F=Ry(k-I),L=k>I;if(g||(g=w=b()),Tlo)if(F>gg-lo)g.moveTo(T*mp(I),T*Aa(I)),g.arc(0,0,T,I,k,!L),D>lo&&(g.moveTo(D*mp(k),D*Aa(k)),g.arc(0,0,D,k,I,L));else{var xe,Q,z=I,V=k,U=I,W=k,Y=F,H=F,Z=m.apply(this,arguments)/2,te=Z>lo&&(l?+l.apply(this,arguments):pr(D*D+T*T)),ce=Ny(Ry(T-D)/2,+a.apply(this,arguments)),le=ce,ve=ce;if(te>lo){var J=gp(te/D*Aa(Z)),oe=gp(te/T*Aa(Z));(Y-=2*J)>lo?(U+=J*=L?1:-1,W-=J):(Y=0,U=W=(I+k)/2),(H-=2*oe)>lo?(z+=oe*=L?1:-1,V-=oe):(H=0,z=V=(I+k)/2)}var we=T*mp(z),ne=T*Aa(z),ge=D*mp(W),de=D*Aa(W);if(ce>lo){var Ve,Te=T*mp(V),Pe=T*Aa(V),Ie=D*mp(U),Ne=D*Aa(U);if(F1?0:i<-1?lc:Math.acos(i)}((ft*Dt+Ke*je)/(pr(ft*ft+Ke*Ke)*pr(Dt*Dt+je*je)))/2),it=pr(Ve[0]*Ve[0]+Ve[1]*Ve[1]);le=Ny(ce,(D-it)/(tt-1)),ve=Ny(ce,(T-it)/(tt+1))}else le=ve=0}H>lo?ve>lo?(xe=ix(Ie,Ne,we,ne,T,ve,L),Q=ix(Te,Pe,ge,de,T,ve,L),g.moveTo(xe.cx+xe.x01,xe.cy+xe.y01),velo&&Y>lo?le>lo?(xe=ix(ge,de,Te,Pe,D,-le,L),Q=ix(we,ne,Ie,Ne,D,-le,L),g.lineTo(xe.cx+xe.x01,xe.cy+xe.y01),lei.startAngle||0).endAngle(i=>i.endAngle||0).padAngle(i=>i.padAngle||0).innerRadius(i=>i.innerRadius||0).outerRadius(i=>i.outerRadius||0).cornerRadius(i=>i.cornerRadius||0),ew=UA().x(Yp).y1(Kp).y0(i=>(i.y||0)+(i.height||0)).defined(Qd),Zp=UA().y(Kp).x1(Yp).x0(i=>(i.x||0)+(i.width||0)).defined(Qd),CR=rx().x(Yp).y(Kp).defined(Qd),SR=Vs().x(Yp).y(Kp).width(i=>i.width||0).height(i=>i.height||0).cornerRadius(i=>Zd(i.cornerRadiusTopLeft,i.cornerRadius)||0,i=>Zd(i.cornerRadiusTopRight,i.cornerRadius)||0,i=>Zd(i.cornerRadiusBottomRight,i.cornerRadius)||0,i=>Zd(i.cornerRadiusBottomLeft,i.cornerRadius)||0),qC=function KA(i,o){let a=null,l=Ld(u);function u(){let f;if(a||(a=f=l()),i.apply(this,arguments).draw(a,+o.apply(this,arguments)),f)return a=null,f+""||null}return i="function"==typeof i?i:tr(i||ox),o="function"==typeof o?o:tr(void 0===o?64:+o),u.type=function(f){return arguments.length?(i="function"==typeof f?f:tr(f),u):i},u.size=function(f){return arguments.length?(o="function"==typeof f?f:tr(+f),u):o},u.context=function(f){return arguments.length?(a=f??null,u):a},u}().type(i=>GT(i.shape||"circle")).size(i=>Zd(i.size,64)),Sb=Xp().x(Yp).y(Kp).defined(Qd).size(i=>i.size||1);function GC(i){return i.cornerRadius||i.cornerRadiusTopLeft||i.cornerRadiusTopRight||i.cornerRadiusBottomRight||i.cornerRadiusBottomLeft}function gc(i,o,a,l){return SR.context(i)(o,a,l)}var Mb=1;function iw(){Mb=1}function rw(i,o,a){var l=o.clip,u=i._defs,f=o.clip_id||(o.clip_id="clip"+Mb++),m=u.clipping[f]||(u.clipping[f]={id:f});return(0,N.mf)(l)?m.path=l(null):GC(a)?m.path=gc(null,a,0,0):(m.width=a.width||0,m.height=a.height||0),"url(#"+f+")"}function Fo(i){this.clear(),i&&this.union(i)}function ow(i){this.mark=i,this.bounds=this.bounds||new Fo}function Ab(i){ow.call(this,i),this.items=this.items||[]}function XC(i){this._pending=0,this._loader=i||Pf()}function QT(i){i._pending+=1}function Wu(i){i._pending-=1}function Dl(i,o,a){if(o.stroke&&0!==o.opacity&&0!==o.strokeOpacity){const l=null!=o.strokeWidth?+o.strokeWidth:1;i.expand(l+(a?function JT(i,o){return i.strokeJoin&&"miter"!==i.strokeJoin?0:o}(o,l):0))}return i}Fo.prototype={clone(){return new Fo(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(i){return this.x1===i.x1&&this.y1===i.y1&&this.x2===i.x2&&this.y2===i.y2},set(i,o,a,l){return athis.x2&&(this.x2=i),o>this.y2&&(this.y2=o),this},expand(i){return this.x1-=i,this.y1-=i,this.x2+=i,this.y2+=i,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(i){return this.x1*=i,this.y1*=i,this.x2*=i,this.y2*=i,this},translate(i,o){return this.x1+=i,this.x2+=i,this.y1+=o,this.y2+=o,this},rotate(i,o,a){const l=this.rotatedPoints(i,o,a);return this.clear().add(l[0],l[1]).add(l[2],l[3]).add(l[4],l[5]).add(l[6],l[7])},rotatedPoints(i,o,a){var{x1:l,y1:u,x2:f,y2:m}=this,g=Math.cos(i),b=Math.sin(i),v=o-o*g+a*b,w=a-o*b-a*g;return[g*l-b*u+v,b*l+g*u+w,g*l-b*m+v,b*l+g*m+w,g*f-b*u+v,b*f+g*u+w,g*f-b*m+v,b*f+g*m+w]},union(i){return i.x1this.x2&&(this.x2=i.x2),i.y2>this.y2&&(this.y2=i.y2),this},intersect(i){return i.x1>this.x1&&(this.x1=i.x1),i.y1>this.y1&&(this.y1=i.y1),i.x2=i.x2&&this.y1<=i.y1&&this.y2>=i.y2},alignsWith(i){return i&&(this.x1==i.x1||this.x2==i.x2||this.y1==i.y1||this.y2==i.y2)},intersects(i){return i&&!(this.x2i.x2||this.y2i.y2)},contains(i,o){return!(ithis.x2||othis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},(0,N.XW)(Ab,ow),XC.prototype={pending(){return this._pending},sanitizeURL(i){const o=this;return QT(o),o._loader.sanitize(i,{context:"href"}).then(a=>(Wu(o),a)).catch(()=>(Wu(o),null))},loadImage(i){const o=this,a=typeof Image<"u"?Image:null;return QT(o),o._loader.sanitize(i,{context:"image"}).then(l=>{const u=l.href;if(!u||!a)throw{url:u};const f=new a,m=(0,N.nr)(l,"crossOrigin")?l.crossOrigin:"anonymous";return null!=m&&(f.crossOrigin=m),f.onload=()=>Wu(o),f.onerror=()=>Wu(o),f.src=u,f}).catch(l=>(Wu(o),{complete:!1,width:0,height:0,src:l&&l.url||""}))},ready(){const i=this;return new Promise(o=>{!function a(l){i.pending()?setTimeout(()=>{a(!0)},10):o(l)}(!1)})}};const Kg=Zc-1e-8;let uh,Zg,Jo,Qp,YC,Tb,sw,Jp;const Jd=(i,o)=>uh.add(i,o),aw=(i,o)=>Jd(Zg=i,Jo=o),KC=i=>Jd(i,uh.y1),lw=i=>Jd(uh.x1,i),dh=(i,o)=>YC*i+sw*o,fh=(i,o)=>Tb*i+Jp*o,ZC=(i,o)=>Jd(dh(i,o),fh(i,o)),QC=(i,o)=>aw(dh(i,o),fh(i,o));function kb(i,o){return uh=i,o?(Qp=o*pc,YC=Jp=Math.cos(Qp),Tb=Math.sin(Qp),sw=-Tb):(YC=Jp=1,Qp=Tb=sw=0),qu}const qu={beginPath(){},closePath(){},moveTo:QC,lineTo:QC,rect(i,o,a,l){Qp?(ZC(i+a,o),ZC(i+a,o+l),ZC(i,o+l),QC(i,o)):(Jd(i+a,o+l),aw(i,o))},quadraticCurveTo(i,o,a,l){const u=dh(i,o),f=fh(i,o),m=dh(a,l),g=fh(a,l);Qg(Zg,u,m,KC),Qg(Jo,f,g,lw),aw(m,g)},bezierCurveTo(i,o,a,l,u,f){const m=dh(i,o),g=fh(i,o),b=dh(a,l),v=fh(a,l),w=dh(u,f),C=fh(u,f);Ur(Zg,m,b,w,KC),Ur(Jo,g,v,C,lw),aw(w,C)},arc(i,o,a,l,u,f){if(l+=Qp,u+=Qp,Zg=a*Math.cos(u)+i,Jo=a*Math.sin(u)+o,Math.abs(u-l)>Kg)Jd(i-a,o-a),Jd(i+a,o+a);else{const m=v=>Jd(a*Math.cos(v)+i,a*Math.sin(v)+o);let g,b;if(m(l),m(u),u!==l)if((l%=Zc)<0&&(l+=Zc),(u%=Zc)<0&&(u+=Zc),uu;++b,g-=ch)m(g);else for(g=l-l%ch+ch,b=0;b<4&&g1e-14?(w=m*m+g*f,w>=0&&(w=Math.sqrt(w),b=(-m+w)/f,v=(-m-w)/f)):b=.5*g/m,0D)return!1;k>C&&(C=k)}else if(T>0){if(k0&&(i.globalAlpha=a,i.fillStyle=Jr(i,o,o.fill),!0)}var t_=[];function ef(i,o,a){var l=null!=(l=o.strokeWidth)?l:1;return!(l<=0)&&(a*=null==o.strokeOpacity?1:o.strokeOpacity)>0&&(i.globalAlpha=a,i.strokeStyle=Jr(i,o,o.stroke),i.lineWidth=l,i.lineCap=o.strokeCap||"butt",i.lineJoin=o.strokeJoin||"miter",i.miterLimit=o.strokeMiterLimit||10,i.setLineDash&&(i.setLineDash(o.strokeDash||t_),i.lineDashOffset=o.strokeDashOffset||0),!0)}function Ob(i,o){return i.zindex-o.zindex||i.index-o.index}function d(i){if(!i.zdirty)return i.zitems;var l,u,f,o=i.items,a=[];for(u=0,f=o.length;u=0;)if(l=o(a[u]))return l;if(a===f)for(u=(a=i.items).length;--u>=0;)if(!a[u].zindex&&(l=o(a[u])))return l;return null}function x(i){return function(o,a,l){p(a,u=>{(!l||l.intersects(u.bounds))&&A(i,o,u,u)})}}function S(i){return function(o,a,l){a.items.length&&(!l||l.intersects(a.bounds))&&A(i,o,a.items[0],a.items)}}function A(i,o,a,l){var u=null==a.opacity?1:a.opacity;0!==u&&(i(o,l)||(e_(o,a),a.fill&&ph(o,a,u)&&o.fill(),a.stroke&&ef(o,a,u)&&o.stroke()))}function O(i){return i=i||N.yb,function(o,a,l,u,f,m){return l*=o.pixelRatio,u*=o.pixelRatio,_(a,g=>{const b=g.bounds;if((!b||b.contains(f,m))&&b&&i(o,g,l,u,f,m))return g})}}function P(i,o){return function(a,l,u,f){var w,m=Array.isArray(l)?l[0]:l,g=o??m.fill,b=m.stroke&&a.isPointInStroke;return b&&(w=m.strokeCap,a.lineWidth=m.strokeWidth??1,a.lineCap=w??"butt"),!i(a,l)&&(g&&a.isPointInPath(u,f)||b&&a.isPointInStroke(u,f))}}function B(i){return O(P(i))}function q(i,o){return"translate("+i+","+o+")"}function G(i){return"rotate("+i+")"}function se(i){return q(i.x||0,i.y||0)}function Re(i,o,a){function f(m,g){var b=g.x||0,v=g.y||0,w=g.angle||0;m.translate(b,v),w&&m.rotate(w*=pc),m.beginPath(),o(m,g),w&&m.rotate(-w),m.translate(-b,-v)}return{type:i,tag:"path",nested:!1,attr:function l(m,g){m("transform",function Ee(i){return q(i.x||0,i.y||0)+(i.angle?" "+G(i.angle):"")}(g)),m("d",o(null,g))},bound:function u(m,g){return o(kb(m,g.angle),g),Dl(m,g).translate(g.x||0,g.y||0)},draw:x(f),pick:B(f),isect:a||cw(f)}}var Le=Re("arc",function tw(i,o){return ER.context(i)(o)});function dn(i,o,a){function f(b,v){b.beginPath(),o(b,v)}const m=P(f);return{type:i,tag:"path",nested:!0,attr:function l(b,v){var w=v.mark.items;w.length&&b("d",o(null,w))},bound:function u(b,v){var w=v.items;return 0===w.length?b:(o(kb(b),w),Dl(b,w[0]))},draw:S(f),pick:function g(b,v,w,C,D,T){var I=v.items,k=v.bounds;return!I||!I.length||k&&!k.contains(D,T)?null:m(b,I,w*=b.pixelRatio,C*=b.pixelRatio)?I[0]:null},isect:en,tip:a}}var vi=dn("area",function Db(i,o){const a=o[0];return("horizontal"===a.orient?Zp:ew).curve(qx(a.interpolate||"linear",a.orient,a.tension)).context(i)(o)},function Ye(i,o){for(var m,g,a="horizontal"===i[0].orient?o[1]:o[0],l="horizontal"===i[0].orient?"y":"x",u=i.length,f=1/0;--u>=0;)!1!==i[u].defined&&(g=Math.abs(i[u][l]-a)).5&&o<1.5?.5-Math.abs(o-1):0}function Ml(i,o){const a=ua(o);i("d",gc(null,o,a,a))}function Gu(i,o,a,l){const u=ua(o);i.beginPath(),gc(i,o,(a||0)+u,(l||0)+u)}const dw=P(Gu),tf=P(Gu,!1),tS=P(Gu,!0);var nS={type:"group",tag:"g",nested:!1,attr:function da(i,o){i("transform",se(o))},bound:function Nb(i,o){if(!o.clip&&o.items){const a=o.items,l=a.length;for(let u=0;u{const f=u.x||0,m=u.y||0,g=u.strokeForeground,b=null==u.opacity?1:u.opacity;(u.stroke||u.fill)&&b&&(Gu(i,u,f,m),e_(i,u),u.fill&&ph(i,u,b)&&i.fill(),u.stroke&&!g&&ef(i,u,b)&&i.stroke()),i.save(),i.translate(f,m),u.clip&&ca(i,u),a&&a.translate(-f,-m),p(u,v=>{("group"===v.marktype||null==l||l.includes(v.marktype))&&this.draw(i,v,a,l)}),a&&a.translate(f,m),i.restore(),g&&u.stroke&&b&&(Gu(i,u,f,m),e_(i,u),ef(i,u,b)&&i.stroke())})},pick:function tk(i,o,a,l,u,f){if(o.bounds&&!o.bounds.contains(u,f)||!o.items)return null;const m=a*i.pixelRatio,g=l*i.pixelRatio;return _(o,b=>{let v,w,C;const D=b.bounds;if(D&&!D.contains(u,f))return;w=b.x||0,C=b.y||0;const k=b.clip;if(k&&(uw+(b.width||0)||fC+(b.height||0)))return;if(i.save(),i.translate(w,C),w=u-w,C=f-C,k&&GC(b)&&!tS(i,b,m,g))return i.restore(),null;const F=b.strokeForeground,L=!1!==o.interactive;return L&&F&&b.stroke&&tf(i,b,m,g)?(i.restore(),b):(v=_(b,z=>function nk(i,o,a){return(!1!==i.interactive||"group"===i.marktype)&&i.bounds&&i.bounds.contains(o,a)}(z,w,C)?this.pick(z,a,l,w,C):null),!v&&L&&(b.fill||!F&&b.stroke)&&dw(i,b,m,g)&&(v=b),i.restore(),v||null)})},isect:JC,content:function Rb(i,o,a){i("clip-path",o.clip?rw(a,o,o):null)},background:function fa(i,o){i("class","background"),i("aria-hidden",!0),Ml(i,o)},foreground:function em(i,o){i("class","foreground"),i("aria-hidden",!0),o.strokeForeground?Ml(i,o):i("d","")}},tm={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function fw(i,o){var a=i.image;return(!a||i.url&&i.url!==a.url)&&(a={complete:!1,width:0,height:0},o.loadImage(i.url).then(l=>{i.image=l,i.image.url=i.url})),a}function Fb(i,o){return null!=i.width?i.width:o&&o.width?!1!==i.aspect&&i.height?i.height*o.width/o.height:o.width:0}function iS(i,o){return null!=i.height?i.height:o&&o.height?!1!==i.aspect&&i.width?i.width*o.height/o.width:o.height:0}function n_(i,o){return"center"===i?o/2:"right"===i?o:0}function Pb(i,o){return"middle"===i?o/2:"bottom"===i?o:0}var rk={type:"image",tag:"image",nested:!1,attr:function AR(i,o,a){const l=fw(o,a),u=Fb(o,l),f=iS(o,l),m=(o.x||0)-n_(o.align,u),g=(o.y||0)-Pb(o.baseline,f);i("href",!l.src&&l.toDataURL?l.toDataURL():l.src||"",tm["xmlns:xlink"],"xlink:href"),i("transform",q(m,g)),i("width",u),i("height",f),i("preserveAspectRatio",!1===o.aspect?"none":"xMidYMid")},bound:function ik(i,o){const a=o.image,l=Fb(o,a),u=iS(o,a),f=(o.x||0)-n_(o.align,l),m=(o.y||0)-Pb(o.baseline,u);return i.set(f,m,f+l,m+u)},draw:function TR(i,o,a){p(o,l=>{if(a&&!a.intersects(l.bounds))return;const u=fw(l,this);let f=Fb(l,u),m=iS(l,u);if(0===f||0===m)return;let v,w,C,D,g=(l.x||0)-n_(l.align,f),b=(l.y||0)-Pb(l.baseline,m);!1!==l.aspect&&(w=u.width/u.height,C=l.width/l.height,w==w&&C==C&&w!==C&&(C=0;)if(!1!==i[l].defined&&(u=i[l].x-o[0])*u+(f=i[l].y-o[1])*f{if(!a||a.intersects(l.bounds)){var u=null==l.opacity?1:l.opacity;u&&c3(i,l,u)&&(e_(i,l),i.stroke())}})},pick:O(function d3(i,o,a,l){return!!i.isPointInStroke&&c3(i,o,1)&&i.isPointInStroke(a,l)}),isect:Ib},f3=Re("shape",function a3(i,o){return(o.mark.shape||o.shape).context(i)(o)}),KU=Re("symbol",function DR(i,o){return qC.context(i)(o)},en);const IR=(0,N.$m)();var yc={height:hi,measureWidth:lk,estimateWidth:pw,width:pw,canvas:hw};function hw(i){yc.width=i&&_c?lk:pw}function pw(i,o){return Lb(Jc(i,o),hi(i))}function Lb(i,o){return~~(.8*i.length*o)}function lk(i,o){return hi(i)<=0||!(o=Jc(i,o))?0:$b(o,im(i))}function $b(i,o){const a=`(${o}) ${i}`;let l=IR.get(a);return void 0===l&&(_c.font=o,l=_c.measureText(i).width,IR.set(a,l)),l}function hi(i){return null!=i.fontSize?+i.fontSize||0:11}function Qc(i){return null!=i.lineHeight?i.lineHeight:hi(i)+2}function mh(i){return function mw(i){return(0,N.kJ)(i)?i.length>1?i:i[0]:i}(i.lineBreak&&i.text&&!(0,N.kJ)(i.text)?i.text.split(i.lineBreak):i.text)}function r_(i){const o=mh(i);return((0,N.kJ)(o)?o.length-1:0)*Qc(i)}function Jc(i,o){const a=null==o?"":(o+"").trim();return i.limit>0&&a.length?function _w(i,o){var a=+i.limit,l=function gw(i){if(yc.width===lk){const o=im(i);return a=>$b(a,o)}if(yc.width===pw){const o=hi(i);return a=>Lb(a,o)}return o=>yc.width(i,o)}(i);if(l(o)>>1))>a?m=b+1:g=b;return u+o.slice(m)}for(;m>>1)))Math.max(D,yc.width(o,T)),0)):C=yc.width(o,w),"center"===u?b-=C/2:"right"===u&&(b-=C),i.set(b+=m,v+=g,b+C,v+l),o.angle&&!a)i.rotate(o.angle*pc,m,g);else if(2===a)return i.rotatedPoints(o.angle*pc,m,g);return i}var eu={arc:Le,area:vi,group:nS,image:rk,line:ok,path:kR,rect:GU,rule:i_,shape:f3,symbol:KU,text:{type:"text",tag:"text",nested:!1,attr:function p3(i,o){var b,a=o.dx||0,l=(o.dy||0)+ck(o),u=rS(o),f=u.x1,m=u.y1,g=o.angle||0;i("text-anchor",h3[o.align]||"start"),g?(b=q(f,m)+" "+G(g),(a||l)&&(b+=" "+q(a,l))):b=q(f+a,m+l),i("transform",b)},bound:uk,draw:function m3(i,o,a){p(o,l=>{var f,m,g,b,v,w,C,u=null==l.opacity?1:l.opacity;if(!(a&&!a.intersects(l.bounds)||0===u||l.fontSize<=0||null==l.text||0===l.text.length)){if(i.font=im(l),i.textAlign=l.align||"left",m=(f=rS(l)).x1,g=f.y1,l.angle&&(i.save(),i.translate(m,g),i.rotate(l.angle*pc),m=g=0),m+=l.dx||0,g+=(l.dy||0)+ck(l),w=mh(l),e_(i,l),(0,N.kJ)(w))for(v=Qc(l),b=0;b=0;)if(!1!==i[a].defined&&(l=i[a].x-o[0])*l+(u=i[a].y-o[1])*u<(l=i[a].size||1)*l)return i[a];return null})};function OR(i,o,a){var l=eu[i.mark.marktype];return l.nested&&(i=i.mark),(o||l.bound)(i.bounds||(i.bounds=new Fo),i,a)}var fk={mark:null};function s_(i,o,a){var g,b,v,w,l=eu[i.marktype],u=l.bound,f=i.items,m=f&&f.length;if(l.nested)return m?v=f[0]:(fk.mark=i,v=fk),w=OR(v,u,a),o&&o.union(w)||w;if(o=o||i.bounds&&i.bounds.clear()||new Fo,m)for(g=0,b=f.length;go;)i.removeChild(a[--l]);return i}function NR(i){return"mark-"+i.marktype+(i.role?" role-"+i.role:"")+(i.name?" "+i.name:"")}function mk(i,o){const a=o.getBoundingClientRect();return[i.clientX-a.left-(o.clientLeft||0),i.clientY-a.top-(o.clientTop||0)]}function rm(i,o){this._active=null,this._handlers={},this._loader=i||Pf(),this._tooltip=o||JU}function JU(i,o,a,l){i.element().setAttribute("title",l||"")}function bc(i){this._el=null,this._bgcolor=null,this._loader=new XC(i)}b3.prototype={toJSON(i){return y3(this.root,i||0)},mark(i,o,a){const l=v3(i,o=o||this.root.items[0]);return o.items[a]=l,l.zindex&&(l.group.zdirty=!0),l}},rm.prototype={initialize(i,o,a){return this._el=i,this._obj=a||null,this.origin(o)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(i){return arguments.length?(this._origin=i||[0,0],this):this._origin.slice()},scene(i){return arguments.length?(this._scene=i,this):this._scene},on(){},off(){},_handlerIndex(i,o,a){for(let l=i?i.length:0;--l>=0;)if(i[l].type===o&&(!a||i[l].handler===a))return l;return-1},handlers(i){const o=this._handlers,a=[];if(i)a.push(...o[this.eventName(i)]);else for(const l in o)a.push(...o[l]);return a},eventName(i){const o=i.indexOf(".");return o<0?i:i.slice(0,o)},handleHref(i,o,a){this._loader.sanitize(a,{context:"href"}).then(l=>{const u=new MouseEvent(i.type,i),f=a_(null,"a");for(const m in l)f.setAttribute(m,l[m]);f.dispatchEvent(u)}).catch(()=>{})},handleTooltip(i,o,a){o&&null!=o.tooltip&&(o=function QU(i,o,a,l){var f,m,u=i&&i.mark;if(u&&(f=eu[u.marktype]).tip){for((m=mk(o,a))[0]-=l[0],m[1]-=l[1];i=i.mark.group;)m[0]-=i.x||0,m[1]-=i.y||0;i=f.tip(u.items,m)}return i}(o,i,this.canvas(),this._origin),this._tooltip.call(this._obj,this,i,o,a&&o&&o.tooltip||null))},getItemBoundingClientRect(i){const o=this.canvas();if(!o)return;const a=o.getBoundingClientRect(),l=this._origin,u=i.bounds,f=u.width(),m=u.height();let g=u.x1+l[0]+a.left,b=u.y1+l[1]+a.top;for(;i.mark&&(i=i.mark.group);)g+=i.x||0,b+=i.y||0;return{x:g,y:b,width:f,height:m,left:g,top:b,right:g+f,bottom:b+m}}},bc.prototype={initialize(i,o,a,l,u){return this._el=i,this.resize(o,a,l,u)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(i){return 0===arguments.length?this._bgcolor:(this._bgcolor=i,this)},resize(i,o,a,l){return this._width=i,this._height=o,this._origin=a||[0,0],this._scale=l||1,this},dirty(){},render(i,o){const a=this;return a._call=function(){a._render(i,o)},a._call(),a._call=null,a},_render(){},renderAsync(i,o){const a=this.render(i,o);return this._ready?this._ready.then(()=>a):Promise.resolve(a)},_load(i,o){var a=this,l=a._loader[i](o);if(!a._ready){const u=a._call;a._ready=a._loader.ready().then(f=>{f&&u(),a._ready=null})}return l},sanitizeURL(i){return this._load("sanitizeURL",i)},loadImage(i){return this._load("loadImage",i)}};const w3="dragenter",oS="dragleave",E3="dragover",gk="pointerdown",vt="pointermove",Bb="pointerout",_h="pointerover",In="mousedown",C3="mousemove",wo="mouseout",nf="mouseover",vc="click",FR="mousewheel",_k="touchstart",yk="touchmove",bk="touchend",sS=vt,om=Bb,PR=vc;function sm(i,o){rm.call(this,i,o),this._down=null,this._touch=null,this._first=!0,this._events={}}function D3(i,o){(i=>i===_k||i===yk||i===bk?[_k,yk,bk]:[i])(o).forEach(a=>function M3(i,o){const a=i.canvas();a&&!i._events[o]&&(i._events[o]=1,a.addEventListener(o,i[o]?l=>i[o](l):l=>i.fire(o,l)))}(i,a))}function vw(i,o,a){o.forEach(l=>i.fire(l,a))}function aS(i,o,a){return function(l){const u=this._active,f=this.pickEvent(l);f===u||((!u||!u.exit)&&vw(this,a,l),this._active=f,vw(this,o,l)),vw(this,i,l)}}function A3(i){return function(o){vw(this,i,o),this._active=null}}function lS(i){bc.call(this,i),this._options={},this._redraw=!1,this._dirty=new Fo,this._tempb=new Fo}(0,N.XW)(sm,rm,{initialize(i,o,a){return this._canvas=i&&pk(i,"canvas"),[vc,In,gk,vt,Bb,oS].forEach(l=>D3(this,l)),rm.prototype.initialize.call(this,i,o,a)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:["keydown","keypress","keyup",w3,oS,E3,gk,"pointerup",vt,Bb,_h,In,"mouseup",C3,wo,nf,vc,"dblclick","wheel",FR,_k,yk,bk],DOMMouseScroll(i){this.fire(FR,i)},pointermove:aS([vt,C3],[_h,nf],[Bb,wo]),dragover:aS([E3],[w3],[oS]),pointerout:A3([Bb,wo]),dragleave:A3([oS]),pointerdown(i){this._down=this._active,this.fire(gk,i)},mousedown(i){this._down=this._active,this.fire(In,i)},click(i){this._down===this._active&&(this.fire(vc,i),this._down=null)},touchstart(i){this._touch=this.pickEvent(i.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(_k,i,!0)},touchmove(i){this.fire(yk,i,!0)},touchend(i){this.fire(bk,i,!0),this._touch=null},fire(i,o,a){const l=a?this._touch:this._active,u=this._handlers[i];if(o.vegaType=i,i===PR&&l&&l.href?this.handleHref(o,l,l.href):(i===sS||i===om)&&this.handleTooltip(o,l,i!==om),u)for(let f=0,m=u.length;f=0&&l.splice(u,1),this},pickEvent(i){const o=mk(i,this._canvas),a=this._origin;return this.pick(this._scene,o[0],o[1],o[0]-a[0],o[1]-a[1])},pick(i,o,a,l,u){const f=this.context();return eu[i.marktype].pick.call(this,f,i,o,a,l,u)}});const I3=bc.prototype;function LR(i,o){rm.call(this,i,o);const a=this;a._hrefHandler=$R(a,(l,u)=>{u&&u.href&&a.handleHref(l,u,u.href)}),a._tooltipHandler=$R(a,(l,u)=>{a.handleTooltip(l,u,l.type!==om)})}(0,N.XW)(lS,bc,{initialize(i,o,a,l,u,f){return this._options=f||{},this._canvas=this._options.externalContext?null:$d(1,1),i&&this._canvas&&(mr(i,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),I3.initialize.call(this,i,o,a,l,u)},resize(i,o,a,l){if(I3.resize.call(this,i,o,a,l),this._canvas)!function k3(i,o,a,l,u,f){const m=typeof HTMLElement<"u"&&i instanceof HTMLElement&&null!=i.parentNode,g=i.getContext("2d"),b=m?function T3(){return typeof window<"u"&&window.devicePixelRatio||1}():u;i.width=o*b,i.height=a*b;for(const v in f)g[v]=f[v];return m&&1!==b&&(i.style.width=o+"px",i.style.height=a+"px"),g.pixelRatio=b,g.setTransform(b,0,0,b,b*l[0],b*l[1]),i}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const u=this._options.externalContext;u||(0,N.vU)("CanvasRenderer is missing a valid canvas or context"),u.scale(this._scale,this._scale),u.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(i){const o=this._tempb.clear().union(i.bounds);let a=i.mark.group;for(;a;)o.translate(a.x||0,a.y||0),a=a.mark.group;this._dirty.union(o)},_render(i,o){const a=this.context(),l=this._origin,u=this._width,f=this._height,m=this._dirty,g=((i,o,a)=>(new Fo).set(0,0,o,a).translate(-i[0],-i[1]))(l,u,f);a.save();const b=this._redraw||m.empty()?(this._redraw=!1,g.expand(1)):function r8(i,o,a){return o.expand(1).round(),i.pixelRatio%1&&o.scale(i.pixelRatio).round().scale(1/i.pixelRatio),o.translate(-a[0]%1,-a[1]%1),i.beginPath(),i.rect(o.x1,o.y1,o.width(),o.height()),i.clip(),o}(a,g.intersect(m),l);return this.clear(-l[0],-l[1],u,f),this.draw(a,i,b,o),a.restore(),m.clear(),this},draw(i,o,a,l){if("group"!==o.marktype&&null!=l&&!l.includes(o.marktype))return;const u=eu[o.marktype];o.clip&&function lr(i,o){var a=o.clip;i.save(),(0,N.mf)(a)?(i.beginPath(),a(i),i.clip()):ca(i,o.group)}(i,o),u.draw.call(this,i,o,a,l),o.clip&&i.restore()},clear(i,o,a,l){const u=this._options,f=this.context();"pdf"!==u.type&&!u.externalContext&&f.clearRect(i,o,a,l),null!=this._bgcolor&&(f.fillStyle=this._bgcolor,f.fillRect(i,o,a,l))}});const $R=(i,o)=>a=>{let l=a.target.__data__;l=Array.isArray(l)?l[0]:l,a.vegaType=a.type,o.call(i._obj,a,l)};(0,N.XW)(LR,rm,{initialize(i,o,a){let l=this._svg;return l&&(l.removeEventListener(PR,this._hrefHandler),l.removeEventListener(sS,this._tooltipHandler),l.removeEventListener(om,this._tooltipHandler)),this._svg=l=i&&pk(i,"svg"),l&&(l.addEventListener(PR,this._hrefHandler),l.addEventListener(sS,this._tooltipHandler),l.addEventListener(om,this._tooltipHandler)),rm.prototype.initialize.call(this,i,o,a)},canvas(){return this._svg},on(i,o){const a=this.eventName(i),l=this._handlers;if(this._handlerIndex(l[a],i,o)<0){const f={type:i,handler:o,listener:$R(this,o)};(l[a]||(l[a]=[])).push(f),this._svg&&this._svg.addEventListener(a,f.listener)}return this},off(i,o){const a=this.eventName(i),l=this._handlers[a],u=this._handlerIndex(l,i,o);return u>=0&&(this._svg&&this._svg.removeEventListener(a,l[u].listener),l.splice(u,1)),this}});const O3="aria-hidden",BR="aria-label",zR="role",VR="aria-roledescription",vk="graphics-object",jR="graphics-symbol",xk=(i,o,a)=>({[zR]:i,[VR]:o,[BR]:a||void 0}),R3=(0,N.Rg)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),UR={axis:{desc:"axis",caption:function a8(i){const o=i.datum,a=i.orient,l=o.title?P3(i):null,u=i.context,f=u.scales[o.scale].value,m=u.dataflow.locale(),g=f.type;return("left"===a||"right"===a?"Y":"X")+"-axis"+(l?` titled '${l}'`:"")+` for a ${gb(g)?"discrete":g} scale with ${lh(m,f,i)}`}},legend:{desc:"legend",caption:function l8(i){const o=i.datum,a=o.title?P3(i):null,l=`${o.type||""} legend`.trim(),u=o.scales,f=Object.keys(u),m=i.context,g=m.scales[u[f[0]]].value,b=m.dataflow.locale();return function c8(i){return i.length?i[0].toUpperCase()+i.slice(1):i}(l)+(a?` titled '${a}'`:"")+` for ${function WR(i){return i=i.map(o=>o+("fill"===o||"stroke"===o?" color":"")),i.length<2?i[0]:i.slice(0,-1).join(", ")+" and "+(0,N.fj)(i)}(f)} with ${lh(b,g,i)}`}},"title-text":{desc:"title",caption:i=>`Title text '${F3(i)}'`},"title-subtitle":{desc:"subtitle",caption:i=>`Subtitle text '${F3(i)}'`}},HR={ariaRole:zR,ariaRoleDescription:VR,description:BR};function eo(i,o){const a=!1===o.aria;if(i(O3,a||void 0),a||null==o.description)for(const l in HR)i(HR[l],void 0);else{const l=o.mark.marktype;i(BR,o.description),i(zR,o.ariaRole||("group"===l?vk:jR)),i(VR,o.ariaRoleDescription||`${l} mark`)}}function N3(i){return!1===i.aria?{[O3]:!0}:R3[i.role]?null:UR[i.role]?function s8(i,o){try{const a=i.items[0];return xk(o.role||jR,o.desc,a.description||(o.caption||(()=>""))(a))}catch{return null}}(i,UR[i.role]):function o8(i){const o=i.marktype,a="group"===o||"text"===o||i.items.some(l=>null!=l.description&&!1!==l.aria);return xk(a?vk:jR,`${o} mark container`,i.description)}(i)}function F3(i){return(0,N.IX)(i.text).join(" ")}function P3(i){try{return(0,N.IX)((0,N.fj)(i.items).items[0].text).join(" ")}catch{return null}}const L3=i=>(i+"").replace(/&/g,"&").replace(//g,">"),qR=i=>L3(i).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function GR(){let i="",o="",a="";const l=[],u=()=>o=a="",m=(b,v)=>(null!=v&&(o+=` ${b}="${qR(v)}"`),g),g={open(b){(b=>{o&&(i+=`${o}>${a}`,u()),l.push(b)})(b),o="<"+b;for(var v=arguments.length,w=new Array(v>1?v-1:0),C=1;C${a}`:"/>"):``,u(),g},attr:m,text:b=>(a+=L3(b),g),toString:()=>i};return g}const Ae=i=>ke(GR(),i)+"";function ke(i,o){if(i.open(o.tagName),o.hasAttributes()){const a=o.attributes,l=a.length;for(let u=0;u1&&i.previousSibling!=o}(f,a))&&o.insertBefore(f,a?a.nextSibling:o.firstChild),f}(0,N.XW)(xw,bc,{initialize(i,o,a,l,u){return this._defs={},this._clearDefs(),i&&(this._svg=js(i,0,"svg",es),this._svg.setAttributeNS(B3,"xmlns",es),this._svg.setAttributeNS(B3,"xmlns:xlink",tm["xmlns:xlink"]),this._svg.setAttribute("version",tm.version),this._svg.setAttribute("class","marks"),mr(i,1),this._root=js(this._svg,0,"g",es),Po(this._root,$3),mr(this._svg,1)),this.background(this._bgcolor),zb.initialize.call(this,i,o,a,l,u)},background(i){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",i),zb.background.apply(this,arguments)},resize(i,o,a,l){return zb.resize.call(this,i,o,a,l),this._svg&&(Po(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const i=this._svg,o=this._bgcolor;if(!i)return null;let a;o&&(i.removeAttribute("style"),a=js(i,0,"rect",es),Po(a,{width:this._width,height:this._height,fill:o}));const l=Ae(i);return o&&(i.removeChild(a),this._svg.style.setProperty("background-color",o)),l},_render(i,o){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,i,void 0,o),mr(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(i){i.dirty!==this._dirtyID&&(i.dirty=this._dirtyID,this._dirty.push(i))},isDirty(i){return this._dirtyAll||!i._svg||!i._svg.ownerSVGElement||i.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const i=this._dirty;if(!i.length||!this._dirtyID)return!0;const o=++this._dirtyID;let a,l,u,f,m,g,b;for(m=0,g=i.length;m{v.dirty=o})),!l.zdirty){if(a.exit){f.nested&&l.items.length?(b=l.items[0],b._svg&&this._update(f,b._svg,b)):a._svg&&(b=a._svg.parentNode,b&&b.removeChild(a._svg)),a._svg=null;continue}a=f.nested?l.items[0]:a,a._update!==o&&(a._svg&&a._svg.ownerSVGElement?this._update(f,a._svg,a):(this._dirtyAll=!1,XR(a,o)),a._update=o)}return!this._dirtyAll},mark(i,o,a,l){if(!this.isDirty(o))return o._svg;const u=this._svg,f=o.marktype,m=eu[f],g=!1===o.interactive?"none":null,b="g"===m.tag,v=Vb(o,i,a,"g",u);if("group"!==f&&null!=l&&!l.includes(f))return mr(v,0),o._svg;v.setAttribute("class",NR(o));const w=N3(o);for(const I in w)xc(v,I,w[I]);b||xc(v,"pointer-events",g),xc(v,"clip-path",o.clip?rw(this,o,o.group):null);let C=null,D=0;const T=I=>{const k=this.isDirty(I),F=Vb(I,v,C,m.tag,u);k&&(this._update(m,F,I),b&&function Oa(i,o,a,l){o=o.lastChild.previousSibling;let u,f=0;p(a,m=>{u=i.mark(o,m,u,l),++f}),mr(o,1+f)}(this,F,I,l)),C=F,++D};return m.nested?o.items.length&&T(o.items[0]):p(o,T),mr(v,D),v},_update(i,o,a){Al=o,ol=o.__values__,eo(bh,a),i.attr(bh,a,this);const l=f8[i.type];l&&l.call(this,i,o,a),Al&&this.style(Al,a)},style(i,o){if(null!=o){for(const a in Wt){let l="font"===a?gh(o):o[a];if(l===ol[a])continue;const u=Wt[a];null==l?i.removeAttribute(u):(bb(l)&&(l=$C(l,this._defs.gradient,ZR())),i.setAttribute(u,l+"")),ol[a]=l}for(const a in cS)KR(i,cS[a],o[a])}},defs(){const i=this._svg,o=this._defs;let a=o.el,l=0;for(const u in o.gradient)a||(o.el=a=js(i,1,"defs",es)),l=u8(a,o.gradient[u],l);for(const u in o.clipping)a||(o.el=a=js(i,1,"defs",es)),l=d8(a,o.clipping[u],l);a&&(0===l?(i.removeChild(a),o.el=null):mr(a,l))},_clearDefs(){const i=this._defs;i.gradient={},i.clipping={}}});let Al=null,ol=null;const f8={group(i,o,a){const l=Al=o.childNodes[2];ol=l.__values__,i.foreground(bh,a,this),ol=o.__values__,Al=o.childNodes[1],i.content(bh,a,this);const u=Al=o.childNodes[0];i.background(bh,a,this);const f=!1===a.mark.interactive?"none":null;if(f!==ol.events&&(xc(l,"pointer-events",f),xc(u,"pointer-events",f),ol.events=f),a.strokeForeground&&a.stroke){const m=a.fill;xc(l,"display",null),this.style(u,a),xc(u,"stroke",null),m&&(a.fill=null),ol=l.__values__,this.style(l,a),m&&(a.fill=m),Al=null}else xc(l,"display","none")},image(i,o,a){!1===a.smooth?(KR(o,"image-rendering","optimizeSpeed"),KR(o,"image-rendering","pixelated")):KR(o,"image-rendering",null)},text(i,o,a){const l=mh(a);let u,f,m,g;(0,N.kJ)(l)?(f=l.map(b=>Jc(a,b)),u=f.join("\n"),u!==ol.text&&(mr(o,0),m=o.ownerDocument,g=Qc(a),f.forEach((b,v)=>{const w=a_(m,"tspan",es);w.__data__=a,w.textContent=b,v&&(w.setAttribute("x",0),w.setAttribute("dy",g)),o.appendChild(w)}),ol.text=u)):(f=Jc(a,l),f!==ol.text&&(o.textContent=f,ol.text=f)),xc(o,"font-family",gh(a)),xc(o,"font-size",hi(a)+"px"),xc(o,"font-style",a.fontStyle),xc(o,"font-variant",a.fontVariant),xc(o,"font-weight",a.fontWeight)}};function bh(i,o,a){o!==ol[i]&&(a?function z3(i,o,a,l){null!=a?i.setAttributeNS(l,o,a):i.removeAttributeNS(l,o)}(Al,i,o,a):xc(Al,i,o),ol[i]=o)}function KR(i,o,a){a!==ol[o]&&(null==a?i.style.removeProperty(o):i.style.setProperty(o,a+""),ol[o]=a)}function Po(i,o){for(const a in o)xc(i,a,o[a])}function xc(i,o,a){null!=a?i.setAttribute(o,a):i.removeAttribute(o)}function ZR(){let i;return typeof window>"u"?"":(i=window.location).hash?i.href.slice(0,-i.hash.length):i.href}function V3(i){bc.call(this,i),this._text=null,this._defs={gradient:{},clipping:{}}}(0,N.XW)(V3,bc,{svg(){return this._text},_render(i){const o=GR();o.open("svg",(0,N.l7)({},tm,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const a=this._bgcolor;return a&&"transparent"!==a&&"none"!==a&&o.open("rect",{width:this._width,height:this._height,fill:a}).close(),o.open("g",$3,{transform:"translate("+this._origin+")"}),this.mark(o,i),o.close(),this.defs(o),this._text=o.close()+"",this},mark(i,o){const a=eu[o.marktype],l=a.tag,u=[eo,a.attr];i.open("g",{class:NR(o),"clip-path":o.clip?rw(this,o,o.group):null},N3(o),{"pointer-events":"g"!==l&&!1===o.interactive?"none":null});const f=m=>{const g=this.href(m);if(g&&i.open("a",g),i.open(l,this.attr(o,m,u,"g"!==l?l:null)),"text"===l){const b=mh(m);if((0,N.kJ)(b)){const v={x:0,dy:Qc(m)};for(let w=0;wthis.mark(i,C)),i.close(),b&&w?(v&&(m.fill=null),m.stroke=w,i.open("path",this.attr(o,m,a.foreground,"bgrect")).close(),v&&(m.fill=v)):i.open("path",this.attr(o,m,a.foreground,"bgfore")).close()}i.close(),g&&i.close()};return a.nested?o.items&&o.items.length&&f(o.items[0]):p(o,f),i.close()},href(i){const o=i.href;let a;if(o){if(a=this._hrefs&&this._hrefs[o])return a;this.sanitizeURL(o).then(l=>{l["xlink:href"]=l.href,l.href=null,(this._hrefs||(this._hrefs={}))[o]=l})}return null},attr(i,o,a,l){const u={},f=(m,g,b,v)=>{u[v||m]=g};return Array.isArray(a)?a.forEach(m=>m(f,o,this)):a(f,o,this),l&&function Hr(i,o,a,l,u){let f;if(null==o||("bgrect"===l&&!1===a.interactive&&(i["pointer-events"]="none"),"bgfore"===l&&(!1===a.interactive&&(i["pointer-events"]="none"),i.display="none",null!==o.fill)))return i;"image"===l&&!1===o.smooth&&(f=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),"text"===l&&(i["font-family"]=gh(o),i["font-size"]=hi(o)+"px",i["font-style"]=o.fontStyle,i["font-variant"]=o.fontVariant,i["font-weight"]=o.fontWeight);for(const m in Wt){let g=o[m];const b=Wt[m];"transparent"===g&&("fill"===b||"stroke"===b)||null!=g&&(bb(g)&&(g=$C(g,u.gradient,"")),i[b]=g)}for(const m in cS){const g=o[m];null!=g&&(f=f||[],f.push(`${cS[m]}: ${g};`))}f&&(i.style=f.join(" "))}(u,o,i,l,this._defs),u},defs(i){const o=this._defs.gradient,a=this._defs.clipping;if(Object.keys(o).length+Object.keys(a).length!==0){i.open("defs");for(const u in o){const f=o[u],m=f.stops;"radial"===f.gradient?(i.open("pattern",{id:"p_"+u,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),i.open("rect",{width:"1",height:"1",fill:"url(#"+u+")"}).close(),i.close(),i.open("radialGradient",{id:u,fx:f.x1,fy:f.y1,fr:f.r1,cx:f.x2,cy:f.y2,r:f.r2})):i.open("linearGradient",{id:u,x1:f.x1,x2:f.x2,y1:f.y1,y2:f.y2});for(let g=0;g!sf.svgMarkTypes.includes(u));this._svgRenderer.render(i,sf.svgMarkTypes),this._canvasRenderer.render(i,l)},resize(i,o,a,l){return jb.resize.call(this,i,o,a,l),this._svgRenderer.resize(i,o,a,l),this._canvasRenderer.resize(i,o,a,l),this},background(i){return sf.svgOnTop?this._canvasRenderer.background(i):this._svgRenderer.background(i),this}}),(0,N.XW)(QR,sm,{initialize(i,o,a){const l=js(js(i,0,"div"),sf.svgOnTop?0:1,"div");return sm.prototype.initialize.call(this,l,o,a)}});const l_={Canvas:"canvas",PNG:"png",SVG:"svg",Hybrid:"hybrid",None:"none"},c_={};function hS(i,o){return i=String(i||"").toLowerCase(),arguments.length>1?(c_[i]=o,this):c_[i]}function tN(i,o,a){const l=[],u=(new Fo).union(o),f=i.marktype;return f?nN(i,u,a,l):"group"===f?j3(i,u,a,l):(0,N.vU)("Intersect scene must be mark node or group item.")}function nN(i,o,a,l){if(function p8(i,o,a){return i.bounds&&o.intersects(i.bounds)&&("group"===i.marktype||!1!==i.interactive&&(!a||a(i)))}(i,o,a)){const u=i.items,f=i.marktype,m=u.length;let g=0;if("group"===f)for(;g=0;f--)if(a[f]!=l[f])return!1;for(f=a.length-1;f>=0;f--)if(!iN(i[u=a[f]],o[u],u))return!1;return typeof i==typeof o}(i,o):i==o)}function pS(i,o){return iN(Gp(i),Gp(o))}function q3(){iw(),function BT(){Hx=0}()}const Hb="top",af="left",kl="right",Xu="bottom",Ek="start",Ck="middle",Il="end",X3="x",b8="y",Sk="group",Y3="axis",K3="title",Dk="legend",mS="row-header",Z3="row-footer",Q3="row-title",rN="column-header",ww="column-footer",J3="column-title",oN="none",Mk="all",Wb="each",sN="flush",am="column",u_="row";function aN(i){ze.call(this,null,i)}function Ak(i,o,a){return o(i.bounds.clear(),i,a)}(0,N.XW)(aN,ze,{transform(i,o){const a=o.dataflow,l=i.mark,u=l.marktype,f=eu[u],m=f.bound;let b,g=l.bounds;if(f.nested)l.items.length&&a.dirty(l.items[0]),g=Ak(l,m),l.items.forEach(v=>{v.bounds.clear().union(g)});else if(u===Sk||i.modified())switch(o.visit(o.MOD,v=>a.dirty(v)),g.clear(),l.items.forEach(v=>g.union(Ak(v,m))),l.role){case Y3:case Dk:case K3:o.reflow()}else b=o.changed(o.REM),o.visit(o.ADD,v=>{g.union(Ak(v,m))}),o.visit(o.MOD,v=>{b=b||g.alignsWith(v.bounds),a.dirty(v),g.union(Ak(v,m))}),b&&(g.clear(),l.items.forEach(v=>g.union(v.bounds)));return H3(l),o.modifies("bounds")}});const lN=":vega_identifier:";function cN(i){ze.call(this,0,i)}function iB(i){ze.call(this,null,i)}function dN(i){ze.call(this,null,i)}cN.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,N.XW)(cN,ze,{transform(i,o){const a=function uN(i){return i._signals[lN]||(i._signals[lN]=i.add(0))}(o.dataflow),l=i.as;let u=a.value;return o.visit(o.ADD,f=>f[l]=f[l]||++u),a.set(this.value=u),o}}),(0,N.XW)(iB,ze,{transform(i,o){let a=this.value;a||(a=o.dataflow.scenegraph().mark(i.markdef,function rB(i){const o=i.groups,a=i.parent;return o&&1===o.size?o.get(Object.keys(o.object)[0]):o&&a?o.lookup(a):null}(i),i.index),a.group.context=i.context,i.context.group||(i.context.group=a.group),a.source=this.source,a.clip=i.clip,a.interactive=i.interactive,this.value=a);const l=a.marktype===Sk?Ab:ow;return o.visit(o.ADD,u=>l.call(u,a)),(i.modified("clip")||i.modified("interactive"))&&(a.clip=i.clip,a.interactive=!!i.interactive,a.zdirty=!0,o.reflow()),a.items=o.source,o}});const oB={parity:i=>i.filter((o,a)=>a%2?o.opacity=0:1),greedy:(i,o)=>{let a;return i.filter((l,u)=>u&&sB(a.bounds,l.bounds,o)?l.opacity=0:(a=l,1))}},sB=(i,o,a)=>a>Math.max(o.x1-i.x2,i.x1-o.x2,o.y1-i.y2,i.y1-o.y2),aB=(i,o)=>{for(var f,a=1,l=i.length,u=i[0].bounds;a{const o=i.bounds;return o.width()>1&&o.height()>1},hN=i=>(i.forEach(o=>o.opacity=1),i),lB=(i,o)=>i.reflow(o.modified()).modifies("opacity");function cB(i){ze.call(this,null,i)}(0,N.XW)(dN,ze,{transform(i,o){const a=oB[i.method]||oB.parity,l=i.separation||0;let f,m,u=o.materialize(o.SOURCE).source;if(!u||!u.length)return;if(!i.method)return i.modified("method")&&(hN(u),o=lB(o,i)),o;if(u=u.filter(fN),!u.length)return;if(i.sort&&(u=u.slice().sort(i.sort)),f=hN(u),o=lB(o,i),f.length>=3&&aB(f,l)){do{f=a(f,l)}while(f.length>=3&&aB(f,l));f.length<3&&!(0,N.fj)(u).opacity&&(f.length>1&&((0,N.fj)(f).opacity=0),(0,N.fj)(u).opacity=1)}i.boundScale&&i.boundTolerance>=0&&(m=((i,o,a)=>{var l=i.range(),u=new Fo;return o===Hb||o===Xu?u.set(l[0],-1/0,l[1],1/0):u.set(-1/0,l[0],1/0,l[1]),u.expand(a||1),f=>u.encloses(f.bounds)})(i.boundScale,i.boundOrient,+i.boundTolerance),u.forEach(b=>{m(b)||(b.opacity=0)}));const g=f[0].mark.bounds.clear();return u.forEach(b=>{b.opacity&&g.union(b.bounds)}),o}}),(0,N.XW)(cB,ze,{transform(i,o){const a=o.dataflow;if(o.visit(o.ALL,l=>a.dirty(l)),o.fields&&o.fields.zindex){const l=o.source&&o.source[0];l&&(l.mark.zdirty=!0)}}});const sl=new Fo;function Ew(i,o,a){return i[o]===a?0:(i[o]=a,1)}function C8(i){var o=i.items[0].orient;return o===af||o===kl}function D8(i,o,a,l){var U,W,u=o.items[0],f=u.datum,m=null!=u.translate?u.translate:.5,g=u.orient,b=function S8(i){let o=+i.grid;return[i.ticks?o++:-1,i.labels?o++:-1,o+ +i.domain]}(f),v=u.range,w=u.offset,C=u.position,D=u.minExtent,T=u.maxExtent,I=f.title&&u.items[b[2]].items[0],k=u.titlePadding,F=u.bounds,L=I&&r_(I),z=0,V=0;switch(sl.clear().union(F),F.clear(),(U=b[0])>-1&&F.union(u.items[U].bounds),(U=b[1])>-1&&F.union(u.items[U].bounds),g){case Hb:z=C||0,V=-w,W=Math.max(D,Math.min(T,-F.y1)),F.add(0,-W).add(v,0),I&&Tk(i,I,W,k,L,0,-1,F);break;case af:z=-w,V=C||0,W=Math.max(D,Math.min(T,-F.x1)),F.add(-W,0).add(0,v),I&&Tk(i,I,W,k,L,1,-1,F);break;case kl:z=a+w,V=C||0,W=Math.max(D,Math.min(T,F.x2)),F.add(0,0).add(W,v),I&&Tk(i,I,W,k,L,1,1,F);break;case Xu:z=C||0,V=l+w,W=Math.max(D,Math.min(T,F.y2)),F.add(0,0).add(v,W),I&&Tk(i,I,W,k,0,0,1,F);break;default:z=u.x,V=u.y}return Dl(F.translate(z,V),u),Ew(u,"x",z+m)|Ew(u,"y",V+m)&&(u.bounds=sl,i.dirty(u),u.bounds=F,i.dirty(u)),u.mark.bounds.clear().union(F)}function Tk(i,o,a,l,u,f,m,g){const b=o.bounds;if(o.auto){const v=m*(a+u+l);let w=0,C=0;i.dirty(o),f?w=(o.x||0)-(o.x=v):C=(o.y||0)-(o.y=v),o.mark.bounds.clear().union(b.translate(-w,-C)),i.dirty(o)}g.union(b)}const pN=(i,o)=>Math.floor(Math.min(i,o)),mN=(i,o)=>Math.ceil(Math.max(i,o));function A8(i){return(new Fo).set(0,0,i.width||0,i.height||0)}function uB(i){const o=i.bounds.clone();return o.empty()?o.set(0,0,0,0):o.translate(-(i.x||0),-(i.y||0))}function fo(i,o,a){return((0,N.Kn)(i)?i[o]:i)??(void 0!==a?a:0)}function dB(i){return i<0?Math.ceil(-i):0}function Cw(i,o,a){var Y,H,Z,te,ce,le,ve,xe,Q,J,oe,l=!a.nodirty,u=a.bounds===sN?A8:uB,f=sl.set(0,0,0,0),m=fo(a.align,am),g=fo(a.align,u_),b=fo(a.padding,am),v=fo(a.padding,u_),w=a.columns||o.length,C=w<=0?1:Math.ceil(o.length/w),D=o.length,T=Array(D),I=Array(w),k=0,F=Array(D),L=Array(C),z=0,V=Array(D),U=Array(D),W=Array(D);for(H=0;H1)for(H=0;H0&&(V[H]+=Q/2);if(g&&fo(a.center,u_)&&1!==w)for(H=0;H0&&(U[H]+=J/2);for(H=0;Hu&&(i.warn("Grid headers exceed limit: "+u),o=o.slice(0,u)),k+=f,z=0,U=o.length;z=0&&null==(H=a[V]);V-=D);g?(Z=null==T?H.x:Math.round(H.bounds.x1+T*H.bounds.width()),te=k):(Z=k,te=null==T?H.y:Math.round(H.bounds.y1+T*H.bounds.height())),W.union(Y.bounds.translate(Z-(Y.x||0),te-(Y.y||0))),Y.x=Z,Y.y=te,i.dirty(Y),F=m(F,W[v])}return F}function _N(i,o,a,l,u,f){if(o){i.dirty(o);var m=a,g=a;l?m=Math.round(u.x1+f*u.width()):g=Math.round(u.y1+f*u.height()),o.bounds.translate(m-(o.x||0),g-(o.y||0)),o.mark.bounds.clear().union(o.bounds),o.x=m,o.y=g,i.dirty(o)}}function on(i,o,a,l,u,f,m){const g=function hB(i,o){const a=i[o]||{};return(l,u)=>null!=a[l]?a[l]:null!=i[l]?i[l]:u}(a,o),b=function pB(i,o){let a=-1/0;return i.forEach(l=>{null!=l.offset&&(a=Math.max(a,l.offset))}),a>-1/0?a:o}(i,g("offset",0)),v=g("anchor",Ek),w=v===Il?1:v===Ck?.5:0,C={align:Wb,bounds:g("bounds",sN),columns:"vertical"===g("direction")?1:i.length,padding:g("margin",8),center:g("center"),nodirty:!0};switch(o){case af:C.anchor={x:Math.floor(l.x1)-b,column:Il,y:w*(m||l.height()+2*l.y1),row:v};break;case kl:C.anchor={x:Math.ceil(l.x2)+b,y:w*(m||l.height()+2*l.y1),row:v};break;case Hb:C.anchor={y:Math.floor(u.y1)-b,row:Il,x:w*(f||u.width()+2*u.x1),column:v};break;case Xu:C.anchor={y:Math.ceil(u.y2)+b,x:w*(f||u.width()+2*u.x1),column:v};break;case"top-left":C.anchor={x:b,y:b};break;case"top-right":C.anchor={x:f-b,y:b,column:Il};break;case"bottom-left":C.anchor={x:b,y:m-b,row:Il};break;case"bottom-right":C.anchor={x:f-b,y:m-b,column:Il,row:Il}}return C}function T8(i,o){var b,v,a=o.items[0],l=a.datum,u=a.orient,f=a.bounds,m=a.x,g=a.y;return a._bounds?a._bounds.clear().union(f):a._bounds=f.clone(),f.clear(),function ki(i,o,a){var l=o.padding,u=l-a.x,f=l-a.y;if(o.datum.title){var m=o.items[1].items[0],g=m.anchor,b=o.titlePadding||0,v=l-m.x,w=l-m.y;switch(m.orient){case af:u+=Math.ceil(m.bounds.width())+b;break;case kl:case Xu:break;default:f+=m.bounds.height()+b}switch((u||f)&&Gb(i,a,u,f),m.orient){case af:w+=qb(o,a,m,g,1,1);break;case kl:v+=qb(o,a,m,Il,0,0)+b,w+=qb(o,a,m,g,1,1);break;case Xu:v+=qb(o,a,m,g,0,0),w+=qb(o,a,m,Il,-1,0,1)+b;break;default:v+=qb(o,a,m,g,0,0)}(v||w)&&Gb(i,m,v,w),(v=Math.round(m.bounds.x1-l))<0&&(Gb(i,a,-v,0),Gb(i,m,-v,0))}else(u||f)&&Gb(i,a,u,f)}(i,a,a.items[0].items[0]),f=function Ra(i,o){return i.items.forEach(a=>o.union(a.bounds)),o.x1=i.padding,o.y1=i.padding,o}(a,f),b=2*a.padding,v=2*a.padding,f.empty()||(b=Math.ceil(f.width()+b),v=Math.ceil(f.height()+v)),"symbol"===l.type&&function mB(i){const o=i.reduce((a,l)=>(a[l.column]=Math.max(l.bounds.x2-l.x,a[l.column]||0),a),{});i.forEach(a=>{a.width=o[a.column],a.height=a.bounds.y2-a.y})}(a.items[0].items[0].items[0].items),u!==oN&&(a.x=m=0,a.y=g=0),a.width=b,a.height=v,Dl(f.set(m,g,m+b,g+v),a),a.mark.bounds.clear().union(f),a}function qb(i,o,a,l,u,f,m){const b=a.datum.vgrad,w=("symbol"===i.datum.type||!f&&b||m?o:o.items[0]).bounds[u?"y2":"x2"]-i.padding,C=b&&f?w:0,D=b&&f?0:w,T=u<=0?0:r_(a);return Math.round(l===Ek?C:l===Il?D-T:.5*(w-T))}function Gb(i,o,a,l){o.x+=a,o.y+=l,o.bounds.translate(a,l),o.mark.bounds.translate(a,l),i.dirty(o)}function yN(i){ze.call(this,null,i)}function bN(i,o){let a=0;if(void 0===o)for(let l of i)(l=+l)&&(a+=l);else{let l=-1;for(let u of i)(u=+o(u,++l,i))&&(a+=u)}return a}function vN(i){ze.call(this,null,i)}function vB(i){ze.call(this,null,i)}function Xb(){return Ti({})}function xB(i){ze.call(this,null,i)}function wB(i){ze.call(this,[],i)}(0,N.XW)(yN,ze,{transform(i,o){const a=o.dataflow;return i.mark.items.forEach(l=>{i.layout&&function fB(i,o,a){var w,C,D,T,I,k,F,l=function M8(i){var u,f,o=i.items,a=o.length,l=0;const m={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;l{(D=L.orient||kl)!==oN&&(F[D]||(F[D]=[])).push(L)});for(const L in F){const z=F[L];Cw(i,z,on(z,L,a.legends,g,b,u,f))}v.forEach(L=>{const z=L.bounds;if(z.equals(L._bounds)||(L.bounds=L._bounds,i.dirty(L),L.bounds=z,i.dirty(L)),!a.autosize||"fit"!==a.autosize.type&&"fit-x"!==a.autosize.type&&"fit-y"!==a.autosize.type)m.union(z);else switch(L.orient){case af:case kl:m.add(z.x1,0).add(z.x2,0);break;case Hb:case Xu:m.add(0,z.y1).add(0,z.y2)}})}m.union(g).union(b),w&&m.union(function gB(i,o,a,l,u){var V,f=o.items[0],g=f.orient,b=f.anchor,v=f.offset,w=f.padding,C=f.items[0].items[0],D=f.items[1]&&f.items[1].items[0],T=g===af||g===kl?l:a,I=0,k=0,F=0,L=0,z=0;if(f.frame!==Sk?g===af?(I=u.y2,T=u.y1):g===kl?(I=u.y1,T=u.y2):(I=u.x1,T=u.x2):g===af&&(I=l,T=0),V=b===Ek?I:b===Il?T:(I+T)/2,D&&D.text){switch(g){case Hb:case Xu:z=C.bounds.height()+w;break;case af:L=C.bounds.width()+w;break;case kl:L=-C.bounds.width()-w}sl.clear().union(D.bounds),sl.translate(L-(D.x||0),z-(D.y||0)),Ew(D,"x",L)|Ew(D,"y",z)&&(i.dirty(D),D.bounds.clear().union(sl),D.mark.bounds.clear().union(sl),i.dirty(D)),sl.clear().union(D.bounds)}else sl.clear();switch(sl.union(C.bounds),g){case Hb:k=V,F=u.y1-sl.height()-v;break;case af:k=u.x1-sl.width()-v,F=V;break;case kl:k=u.x2+sl.width()+v,F=V;break;case Xu:k=V,F=u.y2+v;break;default:k=f.x,F=f.y}return Ew(f,"x",k)|Ew(f,"y",F)&&(sl.translate(k,F),i.dirty(f),f.bounds.clear().union(sl),o.bounds.clear().union(sl),i.dirty(f)),f.bounds}(i,w,u,f,m)),o.clip&&m.set(0,0,o.width||0,o.height||0),function bB(i,o,a,l){const u=l.autosize||{},f=u.type;if(i._autosize<1||!f)return;let m=i._width,g=i._height,b=Math.max(0,o.width||0),v=Math.max(0,Math.ceil(-a.x1)),w=Math.max(0,o.height||0),C=Math.max(0,Math.ceil(-a.y1));const D=Math.max(0,Math.ceil(a.x2-b)),T=Math.max(0,Math.ceil(a.y2-w));if("padding"===u.contains){const I=i.padding();m-=I.left+I.right,g-=I.top+I.bottom}f===oN?(v=0,C=0,b=m,w=g):"fit"===f?(b=Math.max(0,m-v-D),w=Math.max(0,g-C-T)):"fit-x"===f?(b=Math.max(0,m-v-D),g=w+C+T):"fit-y"===f?(m=b+v+D,w=Math.max(0,g-C-T)):"pad"===f&&(m=b+v+D,g=w+C+T),i._resizeView(m,g,b,w,[v,C],u.resize)}(i,o,m,a)}(a,l,i)}),function _B(i){return i&&"legend-entry"!==i.mark.role}(i.mark.group)?o.reflow():o}}),(0,N.XW)(vN,ze,{transform(i,o){if(this.value&&!i.modified())return o.StopPropagation;var a=o.dataflow.locale(),l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=this.value,f=i.scale,g=OC(f,null==i.count?i.values?i.values.length:10:i.count,i.minstep),b=i.format||FT(a,f,g,i.formatSpecifier,i.formatType,!!i.values),v=i.values?RC(f,i.values,g):Kd(f,g);return u&&(l.rem=u),u=v.map((w,C)=>Ti({index:C/(v.length-1||1),value:w,label:b(w)})),i.extra&&u.length&&u.push(Ti({index:-1,extra:{value:u[0].value},label:""})),l.source=u,l.add=u,this.value=u,l}}),(0,N.XW)(vB,ze,{transform(i,o){var a=o.dataflow,l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=i.item||Xb,f=i.key||Kt,m=this.value;return(0,N.kJ)(l.encode)&&(l.encode=null),m&&(i.modified("key")||o.modified(f))&&(0,N.vU)("DataJoin does not support modified key function or fields."),m||(o=o.addAll(),this.value=m=function Yu(i){const o=(0,N.Xr)().test(a=>a.exit);return o.lookup=a=>o.get(i(a)),o}(f)),o.visit(o.ADD,g=>{const b=f(g);let v=m.get(b);v?v.exit?(m.empty--,l.add.push(v)):l.mod.push(v):(v=u(g),m.set(b,v),l.add.push(v)),v.datum=g,v.exit=!1}),o.visit(o.MOD,g=>{const b=f(g),v=m.get(b);v&&(v.datum=g,l.mod.push(v))}),o.visit(o.REM,g=>{const b=f(g),v=m.get(b);g===v.datum&&!v.exit&&(l.rem.push(v),v.exit=!0,++m.empty)}),o.changed(o.ADD_MOD)&&l.modifies("datum"),(o.clean()||i.clean&&m.empty>a.cleanThreshold)&&a.runAfter(m.clean),l}}),(0,N.XW)(xB,ze,{transform(i,o){var a=o.fork(o.ADD_REM),l=i.mod||!1,u=i.encoders,f=o.encode;if((0,N.kJ)(f)){if(!a.changed()&&!f.every(C=>u[C]))return o.StopPropagation;f=f[0],a.encode=null}var m="enter"===f,g=u.update||N.k,b=u.enter||N.k,v=u.exit||N.k,w=(f&&!m?u[f]:g)||N.k;if(o.changed(o.ADD)&&(o.visit(o.ADD,C=>{b(C,i),g(C,i)}),a.modifies(b.output),a.modifies(g.output),w!==N.k&&w!==g&&(o.visit(o.ADD,C=>{w(C,i)}),a.modifies(w.output))),o.changed(o.REM)&&v!==N.k&&(o.visit(o.REM,C=>{v(C,i)}),a.modifies(v.output)),m||w!==N.k){const C=o.MOD|(i.modified()?o.REFLOW:0);m?(o.visit(C,D=>{const T=b(D,i)||l;(w(D,i)||T)&&a.mod.push(D)}),a.mod.length&&a.modifies(b.output)):o.visit(C,D=>{(w(D,i)||l)&&a.mod.push(D)}),a.mod.length&&a.modifies(w.output)}return a.changed()?a:o.StopPropagation}}),(0,N.XW)(wB,ze,{transform(i,o){if(null!=this.value&&!i.modified())return o.StopPropagation;var D,T,I,k,F,a=o.dataflow.locale(),l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=this.value,f=i.type||jg,m=i.scale,g=+i.limit,b=OC(m,null==i.count?5:i.count,i.minstep),w=i.format||LT(a,m,b,f,i.formatSpecifier,i.formatType,!!i.values||f===jg),C=i.values||Ux(m,b);return u&&(l.rem=u),f===jg?(g&&C.length>g?(o.dataflow.warn("Symbol legend count exceeds limit, filtering items."),u=C.slice(0,g-1),F=!0):u=C,(0,N.mf)(I=i.size)?(!i.values&&0===m(u[0])&&(u=u.slice(1)),k=u.reduce((L,z)=>Math.max(L,I(z,i)),0)):I=(0,N.a9)(k=I||8),u=u.map((L,z)=>Ti({index:z,label:w(L,z,u),value:L,offset:k,size:I(L,i)})),F&&u.push(Ti({index:u.length,label:`\u2026${C.length-u.length} entries`,value:F=C[u.length],offset:k,size:I(F,i)}))):"gradient"===f?(D=m.domain(),T=Qo(m,D[0],(0,N.fj)(D)),C.length<3&&!i.values&&D[0]!==(0,N.fj)(D)&&(C=[D[0],(0,N.fj)(D)]),u=C.map((L,z)=>Ti({index:z,label:w(L,z,C),value:L,perc:T(L)}))):(I=C.length-1,T=function $T(i){const o=i.domain(),a=o.length-1;let l=+o[0],u=+(0,N.fj)(o),f=u-l;if(i.type===Px){const m=a?f/a:.1;l-=m,u+=m,f=u-l}return m=>(m-l)/f}(m),u=C.map((L,z)=>Ti({index:z,label:w(L,z,C),value:L,perc:z?T(L):0,perc2:z===I?1:T(C[z+1])}))),l.source=u,l.add=u,this.value=u,l}});const k8=i=>i.source.x,Ik=i=>i.source.y,xN=i=>i.target.x,wN=i=>i.target.y;function Ok(i){ze.call(this,{},i)}Ok.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},(0,N.XW)(Ok,ze,{transform(i,o){var a=i.sourceX||k8,l=i.sourceY||Ik,u=i.targetX||xN,f=i.targetY||wN,m=i.as||"path",b=i.shape||"line",v=SN.get(b+"-"+(i.orient||"vertical"))||SN.get(b);return v||(0,N.vU)("LinkPath unsupported type: "+i.shape+(i.orient?"-"+i.orient:"")),o.visit(o.SOURCE,w=>{w[m]=v(a(w),l(w),u(w),f(w))}),o.reflow(i.modified()).modifies(m)}});const Rk=(i,o,a,l)=>"M"+i+","+o+"L"+a+","+l,EB=(i,o,a,l)=>{var u=a-i,f=l-o,m=Math.hypot(u,f)/2;return"M"+i+","+o+"A"+m+","+m+" "+180*Math.atan2(f,u)/Math.PI+" 0 1 "+a+","+l},CB=(i,o,a,l)=>{const u=a-i,f=l-o,m=.2*(u+f),g=.2*(f-u);return"M"+i+","+o+"C"+(i+m)+","+(o+g)+" "+(a+g)+","+(l-m)+" "+a+","+l},SN=(0,N.Xr)({line:Rk,"line-radial":(i,o,a,l)=>Rk(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),arc:EB,"arc-radial":(i,o,a,l)=>EB(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),curve:CB,"curve-radial":(i,o,a,l)=>CB(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),"orthogonal-horizontal":(i,o,a,l)=>"M"+i+","+o+"V"+l+"H"+a,"orthogonal-vertical":(i,o,a,l)=>"M"+i+","+o+"H"+a+"V"+l,"orthogonal-radial":(i,o,a,l)=>{const u=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a);return"M"+o*u+","+o*f+"A"+o+","+o+" 0 0,"+((Math.abs(a-i)>Math.PI?a<=i:a>i)?1:0)+" "+o*m+","+o*g+"L"+l*m+","+l*g},"diagonal-horizontal":(i,o,a,l)=>{const u=(i+a)/2;return"M"+i+","+o+"C"+u+","+o+" "+u+","+l+" "+a+","+l},"diagonal-vertical":(i,o,a,l)=>{const u=(o+l)/2;return"M"+i+","+o+"C"+i+","+u+" "+a+","+u+" "+a+","+l},"diagonal-radial":(i,o,a,l)=>{const u=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a),b=(o+l)/2;return"M"+o*u+","+o*f+"C"+b*u+","+b*f+" "+b*m+","+b*g+" "+l*m+","+l*g}});function vs(i){ze.call(this,null,i)}vs.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},(0,N.XW)(vs,ze,{transform(i,o){var I,k,F,a=i.as||["startAngle","endAngle"],l=a[0],u=a[1],m=i.startAngle||0,g=null!=i.endAngle?i.endAngle:2*Math.PI,b=o.source,v=b.map(i.field||N.kX),w=v.length,C=m,D=(g-m)/bN(v),T=Qr(w);for(i.sort&&T.sort((L,z)=>v[L]-v[z]),I=0;Iu+(f<0?-1:f>0?1:0),0))!==o.length&&a.warn("Log scale domain includes zero: "+(0,N.m8)(o)),o}function DN(i,o,a){return(0,N.mf)(i)&&(o||a)?Vx(i,Nk(o||[0,1],a)):i}function Nk(i,o){return o?i.slice().reverse():i}function MN(i){ze.call(this,null,i)}(0,N.XW)(lm,ze,{transform(i,o){var a=o.dataflow,l=this.value,u=function P8(i){var l,o=i.type,a="";return o===Sl?Sl+"-"+rh:(function L8(i){const o=i.type;return AC(o)&&o!==Bp&&o!==zp&&(i.scheme||i.range&&i.range.length&&i.range.every(N.HD))}(i)&&(a=2===(l=i.rawDomain?i.rawDomain.length:i.domain?i.domain.length+ +(null!=i.domainMid):0)?Sl+"-":3===l?Vp+"-":""),(a+o||rh).toLowerCase())}(i);for(u in(!l||u!==l.type)&&(this.value=l=Yn(u)()),i)if(!F8[u]){if("padding"===u&&Pi(l.type))continue;(0,N.mf)(l[u])?l[u](i[u]):a.warn("Unsupported scale property: "+u)}return function j8(i,o,a){var l=i.type,u=o.round||!1,f=o.range;if(null!=o.rangeStep)f=function U8(i,o,a){return"band"!==i&&i!==$x&&(0,N.vU)("Only band and point scales support rangeStep."),[0,o.rangeStep*DC(a,i===$x?1:(null!=o.paddingInner?o.paddingInner:o.padding)||0,(null!=o.paddingOuter?o.paddingOuter:o.padding)||0)]}(l,o,a);else if(o.scheme&&(f=function TB(i,o,a){var f,l=o.schemeExtent;return(0,N.kJ)(o.scheme)?f=_b(o.scheme,o.interpolate,o.interpolateGamma):(f=Vg(o.scheme.toLowerCase()))||(0,N.vU)(`Unrecognized scheme name: ${o.scheme}`),a=i===Px?a+1:i===jp?a-1:i===Fg||i===Fx?+o.schemeCount||5:a,TT(i)?DN(f,l,o.reverse):(0,N.mf)(f)?Bg(DN(f,l),a):i===Lx?f:f.slice(0,a)}(l,o,a),(0,N.mf)(f))){if(i.interpolator)return i.interpolator(f);(0,N.vU)(`Scale type ${l} does not support interpolating color schemes.`)}if(f&&TT(l))return i.interpolator(_b(Nk(f,o.reverse),o.interpolate,o.interpolateGamma));f&&o.interpolate&&i.interpolate?i.interpolate(kC(o.interpolate,o.interpolateGamma)):(0,N.mf)(i.round)?i.round(u):(0,N.mf)(i.rangeRound)&&i.interpolate(u?Ky:wl),f&&i.range(Nk(f,o.reverse))}(l,i,function V8(i,o,a){let l=o.bins;if(l&&!(0,N.kJ)(l)){const u=i.domain(),f=u[0],m=(0,N.fj)(u),g=l.step;let b=null==l.start?f:l.start,v=null==l.stop?m:l.stop;g||(0,N.vU)("Scale bins parameter missing step property."),bm&&(v=g*Math.floor(m/g)),l=Qr(b,v+g/2,g)}return l?i.bins=l:i.bins&&delete i.bins,i.type===jp&&(l?!o.domain&&!o.domainRaw&&(i.domain(l),a=l.length):i.bins=i.domain()),a}(l,i,function $8(i,o,a){const l=function B8(i,o,a){return o?(i.domain(AB(i.type,o,a)),o.length):-1}(i,o.domainRaw,a);if(l>-1)return l;var g,b,u=o.domain,f=i.type,m=o.zero||void 0===o.zero&&function zi(i){const o=i.type;return!i.bins&&(o===rh||o===pb||o===zs)}(i);if(!u)return 0;if(Pi(f)&&o.padding&&u[0]!==(0,N.fj)(u)&&(u=function z8(i,o,a,l,u,f){var m=Math.abs((0,N.fj)(a)-a[0]),g=m/(m-2*l),b=i===qd?(0,N.dH)(o,null,g):i===zs?(0,N.mK)(o,null,g,.5):i===pb?(0,N.mK)(o,null,g,u||1):i===mb?(0,N.bV)(o,null,g,f||1):(0,N.ay)(o,null,g);return(o=o.slice())[0]=b[0],o[o.length-1]=b[1],o}(f,u,o.range,o.padding,o.exponent,o.constant)),(m||null!=o.domainMin||null!=o.domainMax||null!=o.domainMid)&&(g=(u=u.slice()).length-1||1,m&&(u[0]>0&&(u[0]=0),u[g]<0&&(u[g]=0)),null!=o.domainMin&&(u[0]=o.domainMin),null!=o.domainMax&&(u[g]=o.domainMax),null!=o.domainMid)){const v=(b=o.domainMid)>u[g]?g+1:bk(w);if(null==o)u.push(i.slice());else for(m={},g=0,b=i.length;gI&&(I=T),a&&D.sort(a)}return u.max=I,u}(o.source,i.groupby,f,m),v=0,w=b.length,C=b.max;vi;function lf(i,o){i&&RN.hasOwnProperty(i.type)&&RN[i.type](i,o)}var ON={Feature:function(i,o){lf(i.geometry,o)},FeatureCollection:function(i,o){for(var a=i.features,l=-1,u=a.length;++l0){for(m=o[--a];a>0&&(l=m,u=o[--a],m=l+u,f=u-(m-l),!f););a>0&&(f<0&&o[a-1]<0||f>0&&o[a-1]>0)&&(u=2*f,l=m+u,u==l-m&&(m=l))}return m}}var bn=1e-6,Sw=1e-12,_i=Math.PI,Eo=_i/2,Dw=_i/4,Ol=2*_i,ts=180/_i,pi=_i/180,Vi=Math.abs,ni=Math.atan,ma=Math.atan2,vn=Math.cos,Lk=Math.ceil,X8=Math.exp,gS=(Math,Math.hypot),$k=Math.log,Bk=Math.pow,fn=Math.sin,Ku=Math.sign||function(i){return i>0?1:i<0?-1:0},xi=Math.sqrt,FN=Math.tan;function OB(i){return i>1?0:i<-1?_i:Math.acos(i)}function Na(i){return i>1?Eo:i<-1?-Eo:Math.asin(i)}function Us(){}var PN,LN,$N,BN,zk=new pa,Vk=new pa,d_={point:Us,lineStart:Us,lineEnd:Us,polygonStart:function(){d_.lineStart=K8,d_.lineEnd=NB},polygonEnd:function(){d_.lineStart=d_.lineEnd=d_.point=Us,zk.add(Vi(Vk)),Vk=new pa},result:function(){var i=zk/2;return zk=new pa,i}};function K8(){d_.point=RB}function RB(i,o){d_.point=Z8,PN=$N=i,LN=BN=o}function Z8(i,o){Vk.add(BN*i-$N*o),$N=i,BN=o}function NB(){Z8(PN,LN)}const FB=d_;var Mw=1/0,zN=Mw,_S=-Mw,yS=_S;const VN={point:function KX(i,o){i_S&&(_S=i),oyS&&(yS=o)},lineStart:Us,lineEnd:Us,polygonStart:Us,polygonEnd:Us,result:function(){var i=[[Mw,zN],[_S,yS]];return _S=yS=-(zN=Mw=1/0),i}};var PB,LB,wc,cf,jN=0,f_=0,Aw=0,Uk=0,Hk=0,Tw=0,UN=0,HN=0,bS=0,Zu={point:h_,lineStart:WN,lineEnd:BB,polygonStart:function(){Zu.lineStart=ZX,Zu.lineEnd=QX},polygonEnd:function(){Zu.point=h_,Zu.lineStart=WN,Zu.lineEnd=BB},result:function(){var i=bS?[UN/bS,HN/bS]:Tw?[Uk/Tw,Hk/Tw]:Aw?[jN/Aw,f_/Aw]:[NaN,NaN];return jN=f_=Aw=Uk=Hk=Tw=UN=HN=bS=0,i}};function h_(i,o){jN+=i,f_+=o,++Aw}function WN(){Zu.point=$B}function $B(i,o){Zu.point=uf,h_(wc=i,cf=o)}function uf(i,o){var a=i-wc,l=o-cf,u=xi(a*a+l*l);Uk+=u*(wc+i)/2,Hk+=u*(cf+o)/2,Tw+=u,h_(wc=i,cf=o)}function BB(){Zu.point=h_}function ZX(){Zu.point=cm}function QX(){Wk(PB,LB)}function cm(i,o){Zu.point=Wk,h_(PB=wc=i,LB=cf=o)}function Wk(i,o){var a=i-wc,l=o-cf,u=xi(a*a+l*l);Uk+=u*(wc+i)/2,Hk+=u*(cf+o)/2,Tw+=u,UN+=(u=cf*i-wc*o)*(wc+i),HN+=u*(cf+o),bS+=3*u,h_(wc=i,cf=o)}const zB=Zu;function VB(i){this._context=i}VB.prototype={_radius:4.5,pointRadius:function(i){return this._radius=i,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(i,o){switch(this._point){case 0:this._context.moveTo(i,o),this._point=1;break;case 1:this._context.lineTo(i,o);break;default:this._context.moveTo(i+this._radius,o),this._context.arc(i,o,this._radius,0,Ol)}},result:Us};var Yb,qk,jB,vS,Hs,qN=new pa,um={point:Us,lineStart:function(){um.point=Q8},lineEnd:function(){Yb&&UB(qk,jB),um.point=Us},polygonStart:function(){Yb=!0},polygonEnd:function(){Yb=null},result:function(){var i=+qN;return qN=new pa,i}};function Q8(i,o){um.point=UB,qk=vS=i,jB=Hs=o}function UB(i,o){qN.add(xi((vS-=i)*vS+(Hs-=o)*Hs)),vS=i,Hs=o}const J8=um;let e6,p_,HB,Gk;class WB{constructor(o){this._append=null==o?GN:function t6(i){const o=Math.floor(i);if(!(o>=0))throw new RangeError(`invalid digits: ${i}`);if(o>15)return GN;if(o!==e6){const a=10**o;e6=o,p_=function(u){let f=1;this._+=u[0];for(const m=u.length;f=0))throw new RangeError(`invalid digits: ${g}`);a=b}return null===o&&(f=new WB(a)),m},m.projection(i).digits(a).context(o)}function GB(){var o,i=[];return{point:function(a,l,u){o.push([a,l,u])},lineStart:function(){i.push(o=[])},lineEnd:Us,rejoin:function(){i.length>1&&i.push(i.pop().concat(i.shift()))},result:function(){var a=i;return i=[],o=null,a}}}function kw(i,o){return Vi(i[0]-o[0])=0;--g)u.point((C=w[g])[0],C[1]);else l(D.x,D.p.x,-1,u);D=D.p}w=(D=D.o).z,T=!T}while(!D.v);u.lineEnd()}}}function wS(i){if(o=i.length){for(var o,u,a=0,l=i[0];++a=0?1:-1,ce=te*Z,le=ce>_i,ve=F*Y;if(b.add(ma(ve*te*fn(ce),L*H+ve*vn(ce))),m+=le?Z+te*Ol:Z,le^I>=a^U>=a){var xe=Rw(Ow(T),Ow(V));Yk(xe);var Q=Rw(f,xe);Yk(Q);var J=(le^Z>=0?-1:1)*Na(Q[2]);(l>J||l===J&&(xe[0]||xe[1]))&&(g+=le^Z>=0?1:-1)}}return(m<-bn||m0){for(b||(u.polygonStart(),b=!0),u.lineStart(),Y=0;Y1&&2&U&&W.push(W.pop().concat(W.shift())),w.push(W.filter(n6))}}return D}}function n6(i){return i.length>1}function ZB(i,o){return((i=i.x)[0]<0?i[1]-Eo-bn:Eo-i[1])-((o=o.x)[0]<0?o[1]-Eo-bn:Eo-o[1])}const YN=KB(function(){return!0},function i6(i){var u,o=NaN,a=NaN,l=NaN;return{lineStart:function(){i.lineStart(),u=1},point:function(f,m){var g=f>0?_i:-_i,b=Vi(f-o);Vi(b-_i)0?Eo:-Eo),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(g,a),i.point(f,a),u=0):l!==g&&b>=_i&&(Vi(o-l)bn?ni((fn(o)*(f=vn(l))*fn(a)-fn(l)*(u=vn(o))*fn(i))/(u*f*m)):(o+l)/2}(o,a,f,m),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(g,a),u=0),i.point(o=f,a=m),l=g},lineEnd:function(){i.lineEnd(),o=a=NaN},clean:function(){return 2-u}}},function JB(i,o,a,l){var u;if(null==i)l.point(-_i,u=a*Eo),l.point(0,u),l.point(_i,u),l.point(_i,0),l.point(_i,-u),l.point(0,-u),l.point(-_i,-u),l.point(-_i,0),l.point(-_i,u);else if(Vi(i[0]-o[0])>bn){var f=i[0]0)do{D.point(0===T||3===T?i:a,T>1?l:o)}while((T=(T+C+4)%4)!==I);else D.point(w[0],w[1])}function m(v,w){return Vi(v[0]-i)0?0:3:Vi(v[0]-a)0?2:1:Vi(v[1]-o)0?1:0:w>0?3:2}function g(v,w){return b(v.x,w.x)}function b(v,w){var C=m(v,1),D=m(w,1);return C!==D?C-D:0===C?w[1]-v[1]:1===C?v[0]-w[0]:2===C?v[1]-w[1]:w[0]-v[0]}return function(v){var D,T,I,k,F,L,z,V,U,W,Y,w=v,C=GB(),H={point:Z,lineStart:function ve(){H.point=Q,T&&T.push(I=[]),W=!0,U=!1,z=V=NaN},lineEnd:function xe(){D&&(Q(k,F),L&&U&&C.rejoin(),D.push(C.result())),H.point=Z,U&&w.lineEnd()},polygonStart:function ce(){w=C,D=[],T=[],Y=!0},polygonEnd:function le(){var J=function te(){for(var J=0,oe=0,we=T.length;oel&&(Ne-Pe)*(l-Ie)>(Ve-Ie)*(i-Pe)&&++J:Ve<=l&&(Ne-Pe)*(l-Ie)<(Ve-Ie)*(i-Pe)&&--J;return J}(),oe=Y&&J,we=(D=YB(D)).length;(oe||we)&&(v.polygonStart(),oe&&(v.lineStart(),f(null,null,1,v),v.lineEnd()),we&&XB(D,g,J,f,v),v.polygonEnd()),w=v,D=T=I=null}};function Z(J,oe){u(J,oe)&&w.point(J,oe)}function Q(J,oe){var we=u(J,oe);if(T&&I.push([J,oe]),W)k=J,F=oe,L=we,W=!1,we&&(w.lineStart(),w.point(J,oe));else if(we&&U)w.point(J,oe);else{var ne=[z=Math.max(CS,Math.min(Nw,z)),V=Math.max(CS,Math.min(Nw,V))],ge=[J=Math.max(CS,Math.min(Nw,J)),oe=Math.max(CS,Math.min(Nw,oe))];!function nz(i,o,a,l,u,f){var I,m=i[0],g=i[1],w=0,C=1,D=o[0]-m,T=o[1]-g;if(I=a-m,D||!(I>0)){if(I/=D,D<0){if(I0){if(I>C)return;I>w&&(w=I)}if(I=u-m,D||!(I<0)){if(I/=D,D<0){if(I>C)return;I>w&&(w=I)}else if(D>0){if(I0)){if(I/=T,T<0){if(I0){if(I>C)return;I>w&&(w=I)}if(I=f-g,T||!(I<0)){if(I/=T,T<0){if(I>C)return;I>w&&(w=I)}else if(T>0){if(I0&&(i[0]=m+w*D,i[1]=g+w*T),C<1&&(o[0]=m+C*D,o[1]=g+C*T),!0}}}}}(ne,ge,i,o,a,l)?we&&(w.lineStart(),w.point(J,oe),Y=!1):(U||(w.lineStart(),w.point(ne[0],ne[1])),w.point(ge[0],ge[1]),we||w.lineEnd(),Y=!1)}z=J,V=oe,U=we}return H}}function ZN(i,o){function a(l,u){return l=i(l,u),o(l[0],l[1])}return i.invert&&o.invert&&(a.invert=function(l,u){return(l=o.invert(l,u))&&i.invert(l[0],l[1])}),a}function QN(i,o){return Vi(i)>_i&&(i-=Math.round(i/Ol)*Ol),[i,o]}function s6(i,o,a){return(i%=Ol)?o||a?ZN(a6(i),l6(o,a)):a6(i):o||a?l6(o,a):QN}function JN(i){return function(o,a){return Vi(o+=i)>_i&&(o-=Math.round(o/Ol)*Ol),[o,a]}}function a6(i){var o=JN(i);return o.invert=JN(-i),o}function l6(i,o){var a=vn(i),l=fn(i),u=vn(o),f=fn(o);function m(g,b){var v=vn(b),w=vn(g)*v,C=fn(g)*v,D=fn(b),T=D*a+w*l;return[ma(C*u-T*f,w*a-D*l),Na(T*u+C*f)]}return m.invert=function(g,b){var v=vn(b),w=vn(g)*v,C=fn(g)*v,D=fn(b),T=D*u-C*f;return[ma(C*u+D*f,w*a+T*l),Na(T*a-w*l)]},m}function Zk(i){return function(o){var a=new iz;for(var l in i)a[l]=i[l];return a.stream=o,a}}function iz(){}function rz(i,o,a){var l=i.clipExtent&&i.clipExtent();return i.scale(150).translate([0,0]),null!=l&&i.clipExtent(null),vh(a,i.stream(VN)),o(VN.result()),null!=l&&i.clipExtent(l),i}function eF(i,o,a){return rz(i,function(l){var u=o[1][0]-o[0][0],f=o[1][1]-o[0][1],m=Math.min(u/(l[1][0]-l[0][0]),f/(l[1][1]-l[0][1])),g=+o[0][0]+(u-m*(l[1][0]+l[0][0]))/2,b=+o[0][1]+(f-m*(l[1][1]+l[0][1]))/2;i.scale(150*m).translate([g,b])},a)}function fm(i,o,a){return eF(i,[[0,0],o],a)}function oz(i,o,a){return rz(i,function(l){var u=+o,f=u/(l[1][0]-l[0][0]),m=(u-f*(l[1][0]+l[0][0]))/2,g=-f*l[0][1];i.scale(150*f).translate([m,g])},a)}function sz(i,o,a){return rz(i,function(l){var u=+o,f=u/(l[1][1]-l[0][1]),m=-f*l[0][0],g=(u-f*(l[1][1]+l[0][1]))/2;i.scale(150*f).translate([m,g])},a)}QN.invert=QN,iz.prototype={constructor:iz,point:function(i,o){this.stream.point(i,o)},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 tF=16,c6=vn(30*pi);function nF(i,o){return+o?function tY(i,o){function a(l,u,f,m,g,b,v,w,C,D,T,I,k,F){var L=v-l,z=w-u,V=L*L+z*z;if(V>4*o&&k--){var U=m+D,W=g+T,Y=b+I,H=xi(U*U+W*W+Y*Y),Z=Na(Y/=H),te=Vi(Vi(Y)-1)o||Vi((L*xe+z*Q)/V-.5)>.3||m*D+g*T+b*I0,u=Vi(o)>bn;function m(w,C){return vn(w)*vn(C)>o}function b(w,C,D){var k=[1,0,0],F=Rw(Ow(w),Ow(C)),L=ES(F,F),z=F[0],V=L-z*z;if(!V)return!D&&w;var U=o*L/V,W=-o*z/V,Y=Rw(k,F),H=dm(k,U);Xk(H,dm(F,W));var te=Y,ce=ES(H,te),le=ES(te,te),ve=ce*ce-le*(ES(H,H)-1);if(!(ve<0)){var xe=xi(ve),Q=dm(te,(-ce-xe)/le);if(Xk(Q,H),Q=Iw(Q),!D)return Q;var ge,J=w[0],oe=C[0],we=w[1],ne=C[1];oe0^Q[1]<(Vi(Q[0]-J)_i^(J<=Q[0]&&Q[0]<=oe)){var Ie=dm(te,(-ce+xe)/le);return Xk(Ie,H),[Q,Iw(Ie)]}}}function v(w,C){var D=l?i:_i-i,T=0;return w<-D?T|=1:w>D&&(T|=2),C<-D?T|=4:C>D&&(T|=8),T}return KB(m,function g(w){var C,D,T,I,k;return{lineStart:function(){I=T=!1,k=1},point:function(F,L){var V,z=[F,L],U=m(F,L),W=l?U?0:v(F,L):U?v(F+(F<0?_i:-_i),L):0;if(!C&&(I=T=U)&&w.lineStart(),U!==T&&(!(V=b(C,z))||kw(C,V)||kw(z,V))&&(z[2]=1),U!==T)k=0,U?(w.lineStart(),V=b(z,C),w.point(V[0],V[1])):(V=b(C,z),w.point(V[0],V[1],2),w.lineEnd()),C=V;else if(u&&C&&l^U){var Y;!(W&D)&&(Y=b(z,C,!0))&&(k=0,l?(w.lineStart(),w.point(Y[0][0],Y[0][1]),w.point(Y[1][0],Y[1][1]),w.lineEnd()):(w.point(Y[1][0],Y[1][1]),w.lineEnd(),w.lineStart(),w.point(Y[0][0],Y[0][1],3)))}U&&(!C||!kw(C,z))&&w.point(z[0],z[1]),C=z,T=U,D=W},lineEnd:function(){T&&w.lineEnd(),C=null},clean:function(){return k|(I&&T)<<1}}},function f(w,C,D,T){!function ez(i,o,a,l,u,f){if(a){var m=vn(o),g=fn(o),b=l*a;null==u?(u=o+l*Ol,f=o-b/2):(u=tz(m,u),f=tz(m,f),(l>0?uf)&&(u+=l*Ol));for(var v,w=u;l>0?w>f:w2?J[2]%360*pi:0,xe()):[g*ts,b*ts,v*ts]},le.angle=function(J){return arguments.length?(C=J%360*pi,xe()):C*ts},le.reflectX=function(J){return arguments.length?(D=J?-1:1,xe()):D<0},le.reflectY=function(J){return arguments.length?(T=J?-1:1,xe()):T<0},le.precision=function(J){return arguments.length?(Y=nF(H,W=J*J),Q()):xi(W)},le.fitExtent=function(J,oe){return eF(le,J,oe)},le.fitSize=function(J,oe){return fm(le,J,oe)},le.fitWidth=function(J,oe){return oz(le,J,oe)},le.fitHeight=function(J,oe){return sz(le,J,oe)},function(){return o=i.apply(this,arguments),le.invert=o.invert&&ve,xe()}}function iF(i){var o=0,a=_i/3,l=az(i),u=l(o,a);return u.parallels=function(f){return arguments.length?l(o=f[0]*pi,a=f[1]*pi):[o*ts,a*ts]},u}function h6(i,o){var a=fn(i),l=(a+fn(o))/2;if(Vi(l)2?i[2]*pi:0),o.invert=function(a){return(a=i.invert(a[0]*pi,a[1]*pi))[0]*=ts,a[1]*=ts,a},o}(o.rotate()).invert([0,0]));return f(null==m?[[D[0]-C,D[1]-C],[D[0]+C,D[1]+C]]:i===Jk?[[Math.max(D[0]-C,m),g],[Math.min(D[0]+C,b),v]]:[[m,Math.max(D[1]-C,g)],[b,Math.min(D[1]+C,v)]])}return o.scale=function(C){return arguments.length?(l(C),w()):l()},o.translate=function(C){return arguments.length?(u(C),w()):u()},o.center=function(C){return arguments.length?(a(C),w()):a()},o.clipExtent=function(C){return arguments.length?(null==C?m=g=b=v=null:(m=+C[0][0],g=+C[0][1],b=+C[1][0],v=+C[1][1]),w()):null==m?null:[[m,g],[b,v]]},w()}function eI(i){return FN((Eo+i)/2)}function y6(i,o){var a=vn(i),l=i===o?fn(i):$k(a/vn(o))/$k(eI(o)/eI(i)),u=a*Bk(eI(i),l)/l;if(!l)return Jk;function f(m,g){u>0?g<-Eo+bn&&(g=-Eo+bn):g>Eo-bn&&(g=Eo-bn);var b=u/Bk(eI(g),l);return[b*fn(l*m),u-b*vn(l*m)]}return f.invert=function(m,g){var b=u-g,v=Ku(l)*xi(m*m+b*b),w=ma(m,Vi(b))*Ku(b);return b*l<0&&(w-=_i*Ku(m)*Ku(b)),[w/l,2*ni(Bk(u/v,1/l))-Eo]},f}function AS(i,o){return[i,o]}function v6(i,o){var a=vn(i),l=i===o?fn(i):(a-vn(o))/(o-i),u=a/l+i;if(Vi(l)bn&&--l>0);return[i/(.8707+(f=a*a)*(f*(f*f*f*(.003971-.001529*f)-.013791)-.131979)),a]},$w.invert=MS(Na),C6.invert=MS(function(i){return 2*ni(i)}),gz.invert=function(i,o){return[-o,2*ni(X8(i))-Eo]};var _z=Math.abs,oI=(Math,Math,Math,Math.cos),sI=(Math,Math,Math,Math,Math,Math,Math,Math,Math.sin),df=(Math,1e-6),Zb=Math.PI,bz=Zb/2,cF=(Math,uF(2));function xz(i){return i>1?bz:i<-1?-bz:Math.asin(i)}function uF(i){return i>0?Math.sqrt(i):0}function dY(i,o){var u,a=i*sI(o),l=30;do{o-=u=(o+sI(o)-a)/(1+oI(o))}while(_z(u)>df&&--l>0);return o/2}uF(Zb);var fY=function Ez(i,o,a){function l(u,f){return[i*u*oI(f=dY(a,f)),o*sI(f)]}return l.invert=function(u,f){return f=xz(f/o),[u/(i*oI(f)),xz((2*f+sI(2*f))/a)]},l}(cF/bz,cF,Zb);const pY=qB(),Cz=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function dF(i,o){if(!i||"string"!=typeof i)throw new Error("Projection type must be a name string.");return i=i.toLowerCase(),arguments.length>1?(lI[i]=function mY(i,o){return function a(){const l=o();return l.type=i,l.path=qB().projection(l),l.copy=l.copy||function(){const u=a();return Cz.forEach(f=>{l[f]&&u[f](l[f]())}),u.path.pointRadius(l.path.pointRadius()),u},Xd(l)}}(i,o),this):lI[i]||null}function IS(i){return i&&i.path||pY}const lI={albers:lz,albersusa:function p6(){var i,o,l,f,g,b,a=lz(),u=Qk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),m=Qk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),v={point:function(D,T){b=[D,T]}};function w(D){var T=D[0],I=D[1];return b=null,l.point(T,I),b||(f.point(T,I),b)||(g.point(T,I),b)}function C(){return i=o=null,w}return w.invert=function(D){var T=a.scale(),I=a.translate(),k=(D[0]-I[0])/T,F=(D[1]-I[1])/T;return(F>=.12&&F<.234&&k>=-.425&&k<-.214?u:F>=.166&&F<.234&&k>=-.214&&k<-.115?m:a).invert(D)},w.stream=function(D){return i&&o===D?i:i=function cz(i){var o=i.length;return{point:function(a,l){for(var u=-1;++u2?l[2]+90:90]):[(l=a())[0],l[1],l[2]-90]},a([0,0,90]).scale(159.155)}};for(const i in lI)dF(i,lI[i]);function Sz(i,o,a){var l=Qr(i,o-bn,a).concat(o);return function(u){return l.map(function(f){return[u,f]})}}function fF(i,o,a){var l=Qr(i,o-bn,a).concat(o);return function(u){return l.map(function(f){return[f,u]})}}function hF(){}const ff=[[],[[[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 Dz(){var i=1,o=1,a=g;function l(b,v){return v.map(w=>u(b,w))}function u(b,v){var w=[],C=[];return function f(b,v,w){var T,I,F,L,z,C=new Array,D=new Array;for(T=I=-1,ff[(F=b[0]>=v)<<1].forEach(V);++T=v)<<1].forEach(V);for(ff[F<<0].forEach(V);++I=v)<<1|(L=b[I*i]>=v)<<2].forEach(V);++T=v)<<1|(L=b[I*i+T+1]>=v)<<2|z<<3].forEach(V);ff[F|L<<3].forEach(V)}for(T=-1,ff[(L=b[I*i]>=v)<<2].forEach(V);++T=v)<<2|z<<3].forEach(V);function V(U){var te,ce,W=[U[0][0]+T,U[0][1]+I],Y=[U[1][0]+T,U[1][1]+I],H=m(W),Z=m(Y);(te=D[H])?(ce=C[Z])?(delete D[te.end],delete C[ce.start],te===ce?(te.ring.push(Y),w(te.ring)):C[te.start]=D[ce.end]={start:te.start,end:ce.end,ring:te.ring.concat(ce.ring)}):(delete D[te.end],te.ring.push(Y),D[te.end=Z]=te):(te=C[Z])?(ce=D[H])?(delete C[te.start],delete D[ce.end],te===ce?(te.ring.push(Y),w(te.ring)):C[ce.start]=D[te.end]={start:ce.start,end:te.end,ring:ce.ring.concat(te.ring)}):(delete C[te.start],te.ring.unshift(W),C[te.start=H]=te):C[H]=D[Z]={start:H,end:Z,ring:[W,Y]}}ff[L<<3].forEach(V)}(b,v,D=>{a(D,b,v),function pF(i){for(var o=0,a=i.length,l=i[a-1][1]*i[0][0]-i[a-1][0]*i[0][1];++o0?w.push([D]):C.push(D)}),C.forEach(D=>{for(var k,T=0,I=w.length;T{var F,D=C[0],T=C[1],I=0|D,k=0|T,L=v[k*i+I];D>0&&D0&&T=0&&w>=0||(0,N.vU)("invalid size"),i=v,o=w,l},l.smooth=function(b){return arguments.length?(a=b?g:hF,l):a===g},l}function mF(i,o){for(var u,a=-1,l=o.length;++al!=T>l&&a<(D-v)*(l-w)/(T-w)+v&&(u=-u)}return u}function gY(i,o,a){var l;return function _Y(i,o,a){return(o[0]-i[0])*(a[1]-i[1])==(a[0]-i[0])*(o[1]-i[1])}(i,o,a)&&function yY(i,o,a){return i<=o&&o<=a||a<=o&&o<=i}(i[l=+(i[0]===o[0])],a[l],o[l])}function Mz(i,o,a){return function(l){var u=(0,N.We)(l),f=a?Math.min(u[0],0):u[0],m=u[1],g=m-f,b=o?fr(f,m,i):g/(i+1);return Qr(f+b,m,b)}}function gF(i){ze.call(this,null,i)}function Bw(i,o,a,l,u){const f=i.x1||0,m=i.y1||0,g=o*a<0;function b(C){C.forEach(v)}function v(C){g&&C.reverse(),C.forEach(w)}function w(C){C[0]=(C[0]-f)*o+l,C[1]=(C[1]-m)*a+u}return function(C){return C.coordinates.forEach(b),C}}function OS(i,o,a){const l=i>=0?i:rp(o,a);return Math.round((Math.sqrt(4*l*l+1)-1)/2)}function zw(i){return(0,N.mf)(i)?i:(0,N.a9)(+i)}function _F(){var i=b=>b[0],o=b=>b[1],a=N.kX,l=[-1,-1],u=960,f=500,m=2;function g(b,v){const w=OS(l[0],b,i)>>m,C=OS(l[1],b,o)>>m,D=w?w+2:0,T=C?C+2:0,I=2*D+(u>>m),k=2*T+(f>>m),F=new Float32Array(I*k),L=new Float32Array(I*k);let z=F;b.forEach(U=>{const W=D+(+i(U)>>m),Y=T+(+o(U)>>m);W>=0&&W=0&&Y0&&C>0?(RS(I,k,F,L,w),Vw(I,k,L,F,C),RS(I,k,F,L,w),Vw(I,k,L,F,C),RS(I,k,F,L,w),Vw(I,k,L,F,C)):w>0?(RS(I,k,F,L,w),RS(I,k,L,F,w),RS(I,k,F,L,w),z=L):C>0&&(Vw(I,k,F,L,C),Vw(I,k,L,F,C),Vw(I,k,F,L,C),z=L);const V=v?Math.pow(2,-2*m):1/bN(z);for(let U=0,W=I*k;U>m),y2:T+(f>>m)}}return g.x=function(b){return arguments.length?(i=zw(b),g):i},g.y=function(b){return arguments.length?(o=zw(b),g):o},g.weight=function(b){return arguments.length?(a=zw(b),g):a},g.size=function(b){if(!arguments.length)return[u,f];var v=+b[0],w=+b[1];return v>=0&&w>=0||(0,N.vU)("invalid size"),u=v,f=w,g},g.cellSize=function(b){return arguments.length?((b=+b)>=1||(0,N.vU)("invalid cell size"),m=Math.floor(Math.log(b)/Math.LN2),g):1<=u&&(g>=f&&(b-=a[g-f+m*i]),l[g-u+m*i]=b/Math.min(g+1,i-1+f-g,f))}function Vw(i,o,a,l,u){const f=1+(u<<1);for(let m=0;m=u&&(g>=f&&(b-=a[m+(g-f)*i]),l[m+(g-u)*i]=b/Math.min(g+1,o-1+f-g,f))}function Az(i){ze.call(this,null,i)}gF.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"}]},(0,N.XW)(gF,ze,{transform(i,o){if(this.value&&!o.changed()&&!i.modified())return o.StopPropagation;var a=o.fork(o.NO_SOURCE|o.NO_FIELDS),l=o.materialize(o.SOURCE).source,u=i.field||N.yR,f=Dz().smooth(!1!==i.smooth),m=i.thresholds||function bY(i,o,a){const l=Mz(a.levels||10,a.nice,!1!==a.zero);return"shared"!==a.resolve?l:l(i.map(u=>Su(o(u).values)))}(l,u,i),g=null===i.as?null:i.as||"contour",b=[];return l.forEach(v=>{const w=u(v),C=f.size([w.width,w.height])(w.values,(0,N.kJ)(m)?m:m(w.values));(function Ws(i,o,a,l){let u=l.scale||o.scale,f=l.translate||o.translate;if((0,N.mf)(u)&&(u=u(a,l)),(0,N.mf)(f)&&(f=f(a,l)),(1===u||null==u)&&!f)return;const m=((0,N.hj)(u)?u:u[0])||1,g=((0,N.hj)(u)?u:u[1])||1;i.forEach(Bw(o,m,g,f&&f[0]||0,f&&f[1]||0))})(C,w,v,i),C.forEach(D=>{b.push(Vc(v,Ti(null!=g?{[g]:D}:D)))})}),this.value&&(a.rem=this.value),this.value=a.source=a.add=b,a}}),Az.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 vY=["x","y","weight","size","cellSize","bandwidth"];function uI(i,o){return vY.forEach(a=>null!=o[a]?i[a](o[a]):0),i}function dI(i){ze.call(this,null,i)}(0,N.XW)(Az,ze,{transform(i,o){if(this.value&&!o.changed()&&!i.modified())return o.StopPropagation;var b,a=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=function R6(i,o){var u,f,m,g,b,v,a=[],l=w=>w(g);if(null==o)a.push(i);else for(u={},f=0,m=i.length;fTi(function v(w,C){for(let D=0;Dbn}).map(D)).concat(Qr(Lk(f/v)*v,u,v).filter(function(V){return Vi(V%C)>bn}).map(T))}return L.lines=function(){return z().map(function(V){return{type:"LineString",coordinates:V}})},L.outline=function(){return{type:"Polygon",coordinates:[I(l).concat(k(m).slice(1),I(a).reverse().slice(1),k(g).reverse().slice(1))]}},L.extent=function(V){return arguments.length?L.extentMajor(V).extentMinor(V):L.extentMinor()},L.extentMajor=function(V){return arguments.length?(g=+V[0][1],m=+V[1][1],(l=+V[0][0])>(a=+V[1][0])&&(V=l,l=a,a=V),g>m&&(V=g,g=m,m=V),L.precision(F)):[[l,g],[a,m]]},L.extentMinor=function(V){return arguments.length?(f=+V[0][1],u=+V[1][1],(o=+V[0][0])>(i=+V[1][0])&&(V=o,o=i,i=V),f>u&&(V=f,f=u,u=V),L.precision(F)):[[o,f],[i,u]]},L.step=function(V){return arguments.length?L.stepMajor(V).stepMinor(V):L.stepMinor()},L.stepMajor=function(V){return arguments.length?(w=+V[0],C=+V[1],L):[w,C]},L.stepMinor=function(V){return arguments.length?(b=+V[0],v=+V[1],L):[b,v]},L.precision=function(V){return arguments.length?(F=+V,D=Sz(f,u,90),T=fF(o,i,F),I=Sz(g,m,90),k=fF(l,a,F),L):F},L.extentMajor([[-180,-90+bn],[180,90-bn]]).extentMinor([[-180,-80-bn],[180,80+bn]])}()}function __(i){ze.call(this,null,i)}function N6(i){if(!(0,N.mf)(i))return!1;const o=(0,N.Rg)((0,N.Oj)(i));return o.$x||o.$y||o.$value||o.$max}function Oz(i){ze.call(this,null,i),this.modified(!0)}function xF(i,o,a){(0,N.mf)(i[o])&&i[o](a)}function P6(i,o,a,l){if(isNaN(o)||isNaN(a))return i;var u,C,D,T,I,k,F,L,z,f=i._root,m={data:l},g=i._x0,b=i._y0,v=i._x1,w=i._y1;if(!f)return i._root=m,i;for(;f.length;)if((k=o>=(C=(g+v)/2))?g=C:v=C,(F=a>=(D=(b+w)/2))?b=D:w=D,u=f,!(f=f[L=F<<1|k]))return u[L]=m,i;if(T=+i._x.call(null,f.data),I=+i._y.call(null,f.data),o===T&&a===I)return m.next=f,u?u[L]=m:i._root=m,i;do{u=u?u[L]=new Array(4):i._root=new Array(4),(k=o>=(C=(g+v)/2))?g=C:v=C,(F=a>=(D=(b+w)/2))?b=D:w=D}while((L=F<<1|k)==(z=(I>=D)<<1|T>=C));return u[z]=f,u[L]=m,i}function Rl(i,o,a,l,u){this.node=i,this.x0=o,this.y0=a,this.x1=l,this.y1=u}function V6(i){return i[0]}function IY(i){return i[1]}function Pz(i,o,a){var l=new gI(o??V6,a??IY,NaN,NaN,NaN,NaN);return null==i?l:l.addAll(i)}function gI(i,o,a,l,u,f){this._x=i,this._y=o,this._x0=a,this._y0=l,this._x1=u,this._y1=f,this._root=void 0}function Lz(i){for(var o={data:i.data},a=o;i=i.next;)a=a.next={data:i.data};return o}yF.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},(0,N.XW)(yF,ze,{transform(i,o){var v,a=this._features,l=this._points,u=i.fields,f=u&&u[0],m=u&&u[1],g=i.geojson||!u&&N.yR,b=o.ADD;v=i.modified()||o.changed(o.REM)||o.modified((0,N.Oj)(g))||f&&o.modified((0,N.Oj)(f))||m&&o.modified((0,N.Oj)(m)),(!this.value||v)&&(b=o.SOURCE,this._features=a=[],this._points=l=[]),g&&o.visit(b,w=>a.push(g(w))),f&&m&&(o.visit(b,w=>{var C=f(w),D=m(w);null!=C&&null!=D&&(C=+C)===C&&(D=+D)===D&&l.push([C,D])}),a=a.concat({type:fI,geometry:{type:"MultiPoint",coordinates:l}})),this.value={type:hI,features:a}}}),bF.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},(0,N.XW)(bF,ze,{transform(i,o){var a=o.fork(o.ALL),l=this.value,u=i.field||N.yR,f=i.as||"path",m=a.SOURCE;!l||i.modified()?(this.value=l=IS(i.projection),a.materialize().reflow()):m=u===N.yR||o.modified(u.fields)?a.ADD_MOD:a.ADD;const g=function kz(i,o){const a=i.pointRadius();return i.context(null),null!=o&&i.pointRadius(o),a}(l,i.pointRadius);return a.visit(m,b=>b[f]=l(u(b))),l.pointRadius(g),a.modifies(f)}}),vF.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},(0,N.XW)(vF,ze,{transform(i,o){var b,a=i.projection,l=i.fields[0],u=i.fields[1],f=i.as||["x","y"],m=f[0],g=f[1];function v(w){const C=a([l(w),u(w)]);C?(w[m]=C[0],w[g]=C[1]):(w[m]=void 0,w[g]=void 0)}return i.modified()?o=o.materialize().reflow(!0).visit(o.SOURCE,v):(b=o.modified(l.fields)||o.modified(u.fields),o.visit(b?o.ADD_MOD:o.ADD,v)),o.modifies(f)}}),pI.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"}]},(0,N.XW)(pI,ze,{transform(i,o){var a=o.fork(o.ALL),l=this.value,u=i.as||"shape",f=a.ADD;return(!l||i.modified())&&(this.value=l=function mI(i,o,a){const l=null==a?u=>i(o(u)):u=>{var f=i.pointRadius(),m=i.pointRadius(a)(o(u));return i.pointRadius(f),m};return l.context=u=>(i.context(u),l),l}(IS(i.projection),i.field||(0,N.EP)("datum"),i.pointRadius),a.materialize().reflow(),f=a.SOURCE),a.visit(f,m=>m[u]=l),a.modifies(u)}}),Jb.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}]},(0,N.XW)(Jb,ze,{transform(i,o){var u,a=this.value,l=this.generator;if(!a.length||i.modified())for(const f in i)(0,N.mf)(l[f])&&l[f](i[f]);return u=l(),a.length?o.mod.push(An(a[0],u)):o.add.push(Ti(u)),a[0]=u,o}}),__.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"}]},(0,N.XW)(__,ze,{transform(i,o){if(!o.changed()&&!i.modified())return o.StopPropagation;var a=o.materialize(o.SOURCE).source,l="shared"===i.resolve,u=i.field||N.yR,f=function xY(i,o){let a;return(0,N.mf)(i)?(a=l=>i(l,o),a.dep=N6(i)):i?a=(0,N.a9)(i):(a=l=>l.$value/l.$max||0,a.dep=!0),a}(i.opacity,i),m=function Iz(i,o){let a;return(0,N.mf)(i)?(a=l=>Lu(i(l,o)),a.dep=N6(i)):a=(0,N.a9)(Lu(i||"#888")),a}(i.color,i),g=i.as||"image",b={$x:0,$y:0,$value:0,$max:l?Su(a.map(v=>Su(u(v).values))):0};return a.forEach(v=>{const w=u(v),C=(0,N.l7)({},v,b);l||(C.$max=Su(w.values||[])),v[g]=function wY(i,o,a,l){const u=i.width,m=i.x1||0,g=i.y1||0,b=i.x2||u,v=i.y2||i.height,w=i.values,C=w?F=>w[F]:N.bM,D=$d(b-m,v-g),T=D.getContext("2d"),I=T.getImageData(0,0,b-m,v-g),k=I.data;for(let F=g,L=0;F{null!=i[l]&&xF(a,l,i[l])})):Cz.forEach(l=>{i.modified(l)&&xF(a,l,i[l])}),null!=i.pointRadius&&a.path.pointRadius(i.pointRadius),i.fit&&function F6(i,o){const a=function Rz(i){return 1===(i=(0,N.IX)(i)).length?i[0]:{type:hI,features:i.reduce((o,a)=>o.concat(function CY(i){return i.type===hI?i.features:(0,N.IX)(i).filter(o=>null!=o).map(o=>o.type===fI?o:{type:fI,geometry:o})}(a)),[])}}(o.fit);o.extent?i.fitExtent(o.extent,a):o.size&&i.fitSize(o.size,a)}(a,i),o.fork(o.NO_SOURCE|o.NO_FIELDS)}});var Nl=Pz.prototype=gI.prototype;function al(i){return function(){return i}}function hm(i){return 1e-6*(i()-.5)}function H6(i){return i.x+i.vx}function $z(i){return i.y+i.vy}Nl.copy=function(){var a,l,i=new gI(this._x,this._y,this._x0,this._y0,this._x1,this._y1),o=this._root;if(!o)return i;if(!o.length)return i._root=Lz(o),i;for(a=[{source:o,target:i._root=new Array(4)}];o=a.pop();)for(var u=0;u<4;++u)(l=o.source[u])&&(l.length?a.push({source:l,target:o.target[u]=new Array(4)}):o.target[u]=Lz(l));return i},Nl.add=function SY(i){const o=+this._x.call(null,i),a=+this._y.call(null,i);return P6(this.cover(o,a),o,a,i)},Nl.addAll=function DY(i){var o,a,u,f,l=i.length,m=new Array(l),g=new Array(l),b=1/0,v=1/0,w=-1/0,C=-1/0;for(a=0;aw&&(w=u),fC&&(C=f));if(b>w||v>C)return this;for(this.cover(b,v).cover(w,C),a=0;ai||i>=u||l>o||o>=f;)switch(v=(ow||(g=I.y0)>C||(b=I.x1)=L)<<1|i>=F)&&(I=D[D.length-1],D[D.length-1]=D[D.length-1-k],D[D.length-1-k]=I)}else{var z=i-+this._x.call(null,T.data),V=o-+this._y.call(null,T.data),U=z*z+V*V;if(U=(D=(m+b)/2))?m=D:b=D,(k=C>=(T=(g+v)/2))?g=T:v=T,o=a,!(a=a[F=k<<1|I]))return this;if(!a.length)break;(o[F+1&3]||o[F+2&3]||o[F+3&3])&&(l=o,L=F)}for(;a.data!==i;)if(u=a,!(a=a.next))return this;return(f=a.next)&&delete a.next,u?(f?u.next=f:delete u.next,this):o?(f?o[F]=f:delete o[F],(a=o[0]||o[1]||o[2]||o[3])&&a===(o[3]||o[2]||o[1]||o[0])&&!a.length&&(l?l[L]=a:this._root=a),this):(this._root=f,this)},Nl.removeAll=function B6(i){for(var o=0,a=i.length;o{}};function zz(){for(var l,i=0,o=arguments.length,a={};i=0&&(l=a.slice(u+1),a=a.slice(0,u)),a&&!o.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:l}})}(i+"",a),f=-1,m=l.length;if(!(arguments.length<2)){if(null!=o&&"function"!=typeof o)throw new Error("invalid callback: "+o);for(;++f0)for(var u,f,a=new Array(u),l=0;l=0&&i._call.call(void 0,o),i=i._next;--pm}()}finally{pm=0,function NY(){for(var i,a,o=CF,l=1/0;o;)o._call?(l>o._time&&(l=o._time),i=o,o=o._next):(a=o._next,o._next=null,o=i?i._next=a:CF=a);PS=i,Wz(l)}(),t0=0}}function X6(){var i=_I.now(),o=i-SF;o>EF&&(DF-=o,SF=i)}function Wz(i){pm||(NS&&(NS=clearTimeout(NS)),i-t0>24?(i<1/0&&(NS=setTimeout(G6,i-_I.now()-DF)),FS&&(FS=clearInterval(FS))):(FS||(SF=_I.now(),FS=setInterval(X6,EF)),pm=1,Hz(G6)))}MF.prototype=q6.prototype={constructor:MF,restart:function(i,o,a){if("function"!=typeof i)throw new TypeError("callback is not a function");a=(null==a?cr():+a)+(null==o?0:+o),!this._next&&PS!==this&&(PS?PS._next=this:CF=this,PS=this),this._call=i,this._time=a,Wz()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wz())}};const Y6=4294967296;function LY(i){return i.x}function qz(i){return i.y}var Z6=Math.PI*(3-Math.sqrt(5));function AF(i){return i.index}function Gz(i,o){var a=i.get(o);if(!a)throw new Error("node not found: "+o);return a}const wh={center:function wF(i,o){var a,l=1;function u(){var f,g,m=a.length,b=0,v=0;for(f=0;fT+ce||YI+ce||HD.index){var le=T-Z.x-Z.vx,ve=I-Z.y-Z.vy,xe=le*le+ve*ve;xev.r&&(v.r=v[w].r)}function b(){if(o){var v,C,w=o.length;for(a=new Array(w),v=0;v=g)){(T.data!==o||T.next)&&(0===L&&(U+=(L=hm(a))*L),0===z&&(U+=(z=hm(a))*z),U[o(W,Y,m),W]));for(F=0,g=new Array(L);Fo(l,a):o)}function Uw(i){var o=0,a=i.children,l=a&&a.length;if(l)for(;--l>=0;)o+=a[l].value;else o=1;i.value=o}function Hw(i,o){i instanceof Map?(i=[void 0,i],void 0===o&&(o=zY)):void 0===o&&(o=IF);for(var l,f,m,g,b,a=new Ww(i),u=[a];l=u.pop();)if((m=o(l.data))&&(b=(m=Array.from(m)).length))for(l.children=m,g=b-1;g>=0;--g)u.push(f=m[g]=new Ww(m[g])),f.parent=l,f.depth=l.depth+1;return a.eachBefore(cH)}function IF(i){return i.children}function zY(i){return Array.isArray(i)?i[1]:null}function VY(i){void 0!==i.data.value&&(i.value=i.data.value),i.data=i.data.data}function cH(i){var o=0;do{i.height=o}while((i=i.parent)&&i.height<++o)}function Ww(i){this.data=i,this.depth=this.height=0,this.parent=null}function wI(i){return null==i?null:OF(i)}function OF(i){if("function"!=typeof i)throw new Error;return i}function n0(){return 0}function qw(i){return function(){return i}}mm.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:Kz}]},(0,N.XW)(mm,ze,{transform(i,o){var a=this.value,l=o.changed(o.ADD_REM),u=i.modified(yI),f=i.iterations||300;if(a?(l&&(o.modifies("index"),a.nodes(o.source)),(u||o.changed(o.MOD))&&kF(a,i,0,o)):(this.value=a=function tH(i,o){const a=function Q6(i){var o,a=1,l=.001,u=1-Math.pow(l,1/300),f=0,m=.6,g=new Map,b=q6(C),v=W6("tick","end"),w=function K6(){let i=1;return()=>(i=(1664525*i+1013904223)%Y6)/Y6}();function C(){D(),v.call("tick",o),a1?(null==F?g.delete(k):g.set(k,I(F)),o):g.get(k)},find:function(k,F,L){var U,W,Y,H,Z,z=0,V=i.length;for(null==L?L=1/0:L*=L,z=0;z1?(v.on(k,F),o):v.on(k)}}}(i),l=a.stop,u=a.restart;let f=!1;return a.stopped=()=>f,a.restart=()=>(f=!1,u()),a.stop=()=>(f=!0,l()),kF(a,o,!0).on("end",()=>f=!0)}(o.source,i),a.on("tick",function eH(i,o){return()=>i.touch(o).run()}(o.dataflow,this)),i.static||(l=!0,a.tick()),o.modifies("index")),u||l||i.modified(Yz)||o.changed()&&i.restart)if(a.alpha(Math.max(a.alpha(),i.alpha||1)).alphaDecay(1-Math.pow(a.alphaMin(),1/f)),i.static)for(a.stop();--f>=0;)a.tick();else if(a.stopped()&&a.restart(),!l)return o.StopPropagation;return this.finish(i,o)},finish(i,o){const a=o.dataflow;for(let w,g=this._argops,b=0,v=g.length;b=0;--f)l.push(u[f]);return this},find:function iH(i,o){let a=-1;for(const l of this)if(i.call(o,l,++a,this))return l},sum:function rH(i){return this.eachAfter(function(o){for(var a=+i(o.data)||0,l=o.children,u=l&&l.length;--u>=0;)a+=l[u].value;o.value=a})},sort:function oH(i){return this.eachBefore(function(o){o.children&&o.children.sort(i)})},path:function sH(i){for(var o=this,a=function aH(i,o){if(i===o)return i;var a=i.ancestors(),l=o.ancestors(),u=null;for(i=a.pop(),o=l.pop();i===o;)u=i,i=a.pop(),o=l.pop();return u}(o,i),l=[o];o!==a;)l.push(o=o.parent);for(var u=l.length;i!==a;)l.splice(u,0,i),i=i.parent;return l},ancestors:function lH(){for(var i=this,o=[i];i=i.parent;)o.push(i);return o},descendants:function $Y(){return Array.from(this)},leaves:function BY(){var i=[];return this.eachBefore(function(o){o.children||i.push(o)}),i},links:function vI(){var i=this,o=[];return i.each(function(a){a!==i&&o.push({source:a.parent,target:a})}),o},copy:function Qu(){return Hw(this).eachBefore(VY)},[Symbol.iterator]:function*xI(){var o,l,u,f,i=this,a=[i];do{for(o=a.reverse(),a=[];i=o.pop();)if(yield i,l=i.children)for(u=0,f=l.length;u0&&a*a>l*l+u*u}function Yi(i,o){for(var a=0;a1e-6?(le+Math.sqrt(le*le-4*ce*ve))/(2*ce):ve/le);return{x:l+Y+H*xe,y:u+Z+te*xe,r:xe}}function td(i,o,a){var u,f,g,b,l=i.x-o.x,m=i.y-o.y,v=l*l+m*m;v?(f=o.r+a.r,b=i.r+a.r,(f*=f)>(b*=b)?(u=(v+b-f)/(2*v),g=Math.sqrt(Math.max(0,b/v-u*u)),a.x=i.x-u*l-g*m,a.y=i.y-u*m+g*l):(u=(v+f-b)/(2*v),g=Math.sqrt(Math.max(0,f/v-u*u)),a.x=o.x+u*l-g*m,a.y=o.y+u*m+g*l)):(a.x=o.x+a.r,a.y=o.y)}function Qz(i,o){var a=i.r+o.r-1e-6,l=o.x-i.x,u=o.y-i.y;return a>0&&a*a>l*l+u*u}function is(i){var o=i._,a=i.next._,l=o.r+a.r,u=(o.x*a.r+a.x*o.r)/l,f=(o.y*a.r+a.y*o.r)/l;return u*u+f*f}function SI(i){this._=i,this.next=null,this.previous=null}function $r(i,o){if(!(f=(i=function dH(i){return"object"==typeof i&&"length"in i?i:Array.from(i)}(i)).length))return 0;var a,l,u,f,m,g,b,v,w,C,D;if((a=i[0]).x=0,a.y=0,!(f>1))return a.r;if(a.x=-(l=i[1]).r,l.x=a.r,l.y=0,!(f>2))return a.r+l.r;td(l,a,u=i[2]),a=new SI(a),l=new SI(l),u=new SI(u),a.next=u.previous=l,l.next=a.previous=u,u.next=l.previous=a;e:for(b=3;bfunction e5(i){let o=(i=`${i}`).length;return AI(i,o-1)&&!AI(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}(a(U,W,u))),z=L.map(t5),V=new Set(L).add("");for(const U of z)V.has(U)||(V.add(U),L.push(U),z.push(t5(U)),f.push(LF));m=(U,W)=>L[W],g=(U,W)=>z[W]}for(w=0,b=f.length;w=0&&(T=f[L]).data===LF;--L)T.data=null}if(C.parent=gH,C.eachBefore(function(L){L.depth=L.parent.depth+1,--b}).eachBefore(cH),C.parent=null,b>0)throw new Error("cycle");return C}return l.id=function(u){return arguments.length?(i=wI(u),l):i},l.parentId=function(u){return arguments.length?(o=wI(u),l):o},l.path=function(u){return arguments.length?(a=wI(u),l):a},l}function t5(i){let o=i.length;if(o<2)return"";for(;--o>1&&!AI(i,o););return i.slice(0,o)}function AI(i,o){if("/"===i[o]){let a=0;for(;o>0&&"\\"===i[--o];)++a;if(!(1&a))return!0}return!1}function TI(i,o){return i.parent===o.parent?1:2}function r0(i){var o=i.children;return o?o[0]:i.t}function $F(i){var o=i.children;return o?o[o.length-1]:i.t}function bH(i,o,a){var l=a/(o.i-i.i);o.c-=l,o.s+=a,i.c+=l,o.z+=a,o.m+=a}function n5(i,o,a){return i.a.parent===o.parent?i.a:a}function kI(i,o){this._=i,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=o}function xH(i,o){return i.parent===o.parent?1:2}function VF(i,o){return i+o.x}function CH(i,o){return Math.max(i,o.y)}function II(i,o,a,l,u){for(var m,f=i.children,g=-1,b=f.length,v=i.value&&(u-a)/i.value;++gz&&(z=v),Y=F*F*W,(V=Math.max(z/Y,Y/L))>U){F-=v;break}U=V}m.push(b={value:F,dice:T1?l:1)},a}(HF),qF=function i(o){function a(l,u,f,m,g){if((b=l._squarify)&&b.ratio===o)for(var b,v,w,C,T,D=-1,I=b.length,k=l.value;++D1?l:1)},a}(HF);function RI(i,o,a){const l={};return i.each(u=>{const f=u.data;a(f)&&(l[o(f)]=u)}),i.lookup=l,i}function GF(i){ze.call(this,null,i)}GF.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const o0=i=>i.values;function r5(){const i=[],o={entries:u=>l(a(u,0),0),key:u=>(i.push(u),o)};function a(u,f){if(f>=i.length)return u;const m=u.length,g=i[f++],b={},v={};let C,D,T,w=-1;for(;++wi.length)return u;const m=[];for(const g in u)m.push({key:g,values:l(u[g],f)});return m}return o}function v_(i){ze.call(this,null,i)}(0,N.XW)(GF,ze,{transform(i,o){o.source||(0,N.vU)("Nest transform requires an upstream data source.");var a=i.generate,l=i.modified(),u=o.clone(),f=this.value;return(!f||l||o.changed())&&(f&&f.each(m=>{m.children&&ly(m.data)&&u.rem.push(m.data)}),this.value=f=Hw({values:(0,N.IX)(i.keys).reduce((m,g)=>(m.key(g),m),r5()).entries(u.source)},o0),a&&f.each(m=>{m.children&&(m=Ti(m.data),u.add.push(m),u.source.push(m))}),RI(f,Kt,Kt)),u.source.root=f,u}});const x_=(i,o)=>i.parent===o.parent?1:2;(0,N.XW)(v_,ze,{transform(i,o){(!o.source||!o.source.root)&&(0,N.vU)(this.constructor.name+" transform requires a backing tree data source.");const a=this.layout(i.method),l=this.fields,u=o.source.root,f=i.as||l;i.field?u.sum(i.field):u.count(),i.sort&&u.sort(Fr(i.sort,m=>m.data)),function MH(i,o,a){for(let l,u=0,f=o.length;ufunction o5(i,o,a){const l=i.data,u=o.length-1;for(let f=0;f(i=(1664525*i+1013904223)%EI)/EI}();return f.x=o/2,f.y=a/2,i?f.eachBefore(BS(i)).eachAfter(RF(l,.5,m)).eachBefore(NF(1)):f.eachBefore(BS(DI)).eachAfter(RF(n0,1,m)).eachAfter(RF(l,f.r/Math.min(o,a),m)).eachBefore(NF(Math.min(o,a)/(2*f.r))),f}return u.radius=function(f){return arguments.length?(i=wI(f),u):i},u.size=function(f){return arguments.length?(o=+f[0],a=+f[1],u):[o,a]},u.padding=function(f){return arguments.length?(l="function"==typeof f?f:qw(+f),u):l},u},params:["radius","size","padding"],fields:XF});const VS=["x0","y0","x1","y1","depth","children"];function YF(i){v_.call(this,i)}function KF(i){ze.call(this,null,i)}YF.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:VS.length,default:VS}]},(0,N.XW)(YF,v_,{layout:function FF(){var i=1,o=1,a=0,l=!1;function u(m){var g=m.height+1;return m.x0=m.y0=a,m.x1=i,m.y1=o/g,m.eachBefore(function f(m,g){return function(b){b.children&&b_(b,b.x0,m*(b.depth+1)/g,b.x1,m*(b.depth+2)/g);var v=b.x0,w=b.y0,C=b.x1-a,D=b.y1-a;C=0;--m)l.push(u=a.children[m]=new kI(f[m],m)),u.parent=a;return(o.parent=new kI(null,0)).children=[o],o}(v);if(w.eachAfter(f),w.parent.m=-w.z,w.eachBefore(m),l)v.eachBefore(b);else{var C=v,D=v,T=v;v.eachBefore(function(z){z.xD.x&&(D=z),z.depth>T.depth&&(T=z)});var I=C===D?1:i(C,D)/2,k=I-C.x,F=o/(D.x+I+k),L=a/(T.depth||1);v.eachBefore(function(z){z.x=(z.x+k)*F,z.y=z.depth*L})}return v}function f(v){var w=v.children,C=v.parent.children,D=v.i?C[v.i-1]:null;if(w){!function BF(i){for(var f,o=0,a=0,l=i.children,u=l.length;--u>=0;)(f=l[u]).z+=o,f.m+=o,o+=f.s+(a+=f.c)}(v);var T=(w[0].z+w[w.length-1].z)/2;D?(v.z=D.z+i(v._,D._),v.m=v.z-T):v.z=T}else D&&(v.z=D.z+i(v._,D._));v.parent.A=function g(v,w,C){if(w){for(var U,D=v,T=v,I=w,k=D.parent.children[0],F=D.m,L=T.m,z=I.m,V=k.m;I=$F(I),D=r0(D),I&&D;)k=r0(k),(T=$F(T)).a=v,(U=I.z+z-D.z-F+i(I._,D._))>0&&(bH(n5(I,v,C),v,U),F+=U,L+=U),z+=I.m,F+=D.m,V+=k.m,L+=T.m;I&&!$F(T)&&(T.t=I,T.m+=z-L),D&&!r0(k)&&(k.t=D,k.m+=F-V,C=v)}return C}(v,D,v.parent.A||C[0])}function m(v){v._.x=v.z+v.parent.m,v.m+=v.parent.m}function b(v){v.x*=o,v.y=v.depth*a}return u.separation=function(v){return arguments.length?(i=v,u):i},u.size=function(v){return arguments.length?(l=!1,o=+v[0],a=+v[1],u):l?null:[o,a]},u.nodeSize=function(v){return arguments.length?(l=!0,o=+v[0],a=+v[1],u):l?[o,a]:null},u},cluster:function UF(){var i=xH,o=1,a=1,l=!1;function u(f){var m,g=0;f.eachAfter(function(D){var T=D.children;T?(D.x=function wH(i){return i.reduce(VF,0)/i.length}(T),D.y=function EH(i){return 1+i.reduce(CH,0)}(T)):(D.x=m?g+=i(D,m):0,D.y=0,m=D)});var b=function SH(i){for(var o;o=i.children;)i=o[0];return i}(f),v=function jF(i){for(var o;o=i.children;)i=o[o.length-1];return i}(f),w=b.x-i(b,v)/2,C=v.x+i(v,b)/2;return f.eachAfter(l?function(D){D.x=(D.x-f.x)*o,D.y=(f.y-D.y)*a}:function(D){D.x=(D.x-w)/(C-w)*o,D.y=(1-(f.y?D.y/f.y:1))*a})}return u.separation=function(f){return arguments.length?(i=f,u):i},u.size=function(f){return arguments.length?(l=!1,o=+f[0],a=+f[1],u):l?null:[o,a]},u.nodeSize=function(f){return arguments.length?(l=!0,o=+f[0],a=+f[1],u):l?[o,a]:null},u}},s5=["x","y","depth","children"];function NI(i){v_.call(this,i)}function ZF(i){ze.call(this,[],i)}NI.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:s5.length,default:s5}]},(0,N.XW)(NI,v_,{layout(i){const o=i||"tidy";if((0,N.nr)(AH,o))return AH[o]();(0,N.vU)("Unrecognized Tree layout method: "+o)},params:["size","nodeSize"],fields:s5}),ZF.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},(0,N.XW)(ZF,ze,{transform(i,o){const a=this.value,l=o.source&&o.source.root,u=o.fork(o.NO_SOURCE),f={};return l||(0,N.vU)("TreeLinks transform requires a tree data source."),o.changed(o.ADD_REM)?(u.rem=a,o.visit(o.SOURCE,m=>f[Kt(m)]=1),l.each(m=>{const g=m.data,b=m.parent&&m.parent.data;b&&f[Kt(g)]&&f[Kt(b)]&&u.add.push(Ti({source:b,target:g}))}),this.value=u.add):o.changed(o.MOD)&&(o.visit(o.MOD,m=>f[Kt(m)]=1),a.forEach(m=>{(f[Kt(m.source)]||f[Kt(m.target)])&&u.mod.push(m)})),u}});const a5={binary:function i5(i,o,a,l,u){var m,b,f=i.children,g=f.length,v=new Array(g+1);for(v[0]=b=m=0;m=D-1){var z=f[C];return z.x0=I,z.y0=k,z.x1=F,void(z.y1=L)}for(var V=v[C],U=T/2+V,W=C+1,Y=D-1;W>>1;v[H]L-k){var ce=T?(I*te+F*Z)/T:F;w(C,W,Z,I,k,ce,L),w(W,D,te,ce,k,F,L)}else{var le=T?(k*te+L*Z)/T:L;w(C,W,Z,I,k,F,le),w(W,D,te,I,le,F,L)}}(0,g,i.value,o,a,l,u)},dice:b_,slice:II,slicedice:function WY(i,o,a,l,u){(1&i.depth?II:b_)(i,o,a,l,u)},squarify:WF,resquarify:qF},jS=["x0","y0","x1","y1","depth","children"];function l5(i){v_.call(this,i)}l5.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:jS.length,default:jS}]},(0,N.XW)(l5,v_,{layout(){const i=function DH(){var i=WF,o=!1,a=1,l=1,u=[0],f=n0,m=n0,g=n0,b=n0,v=n0;function w(D){return D.x0=D.y0=0,D.x1=a,D.y1=l,D.eachBefore(C),u=[0],o&&D.eachBefore(MI),D}function C(D){var T=u[D.depth],I=D.x0+T,k=D.y0+T,F=D.x1-T,L=D.y1-T;F{const a=i.tile();a.ratio&&i.tile(a.ratio(o))},i.method=o=>{(0,N.nr)(a5,o)?i.tile(a5[o]):(0,N.vU)("Unrecognized Treemap layout method: "+o)},i},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:jS});const iu=4278190080;function QF(i,o,a){return new Uint32Array(i.getImageData(0,0,o,a).data.buffer)}function FI(i,o,a){if(!o.length)return;const l=o[0].mark.marktype;"group"===l?o.forEach(u=>{u.items.forEach(f=>FI(i,f.items,a))}):eu[l].draw(i,{items:a?o.map(PI):o})}function PI(i){const o=Vc(i,{});return o.stroke&&0!==o.strokeOpacity||o.fill&&0!==o.fillOpacity?{...o,strokeOpacity:1,stroke:"#000",fillOpacity:0}:o}const gm=5,Pl=31,US=32,_m=new Uint32Array(US+1),pf=new Uint32Array(US+1);pf[0]=0,_m[0]=~pf[0];for(let i=1;i<=US;++i)pf[i]=pf[i-1]<<1|1,_m[i]=~pf[i];function LI(i,o,a,l,u,f){let m=a/2;return i-m<0||i+m>u||o-(m=l/2)<0||o+m>f}function w_(i,o,a,l,u,f,m,g){const b=u*f/(2*l),v=i(o-b),w=i(o+b),C=i(a-(f/=2)),D=i(a+f);return m.outOfBounds(v,C,w,D)||m.getRange(v,C,w,D)||g&&g.getRange(v,C,w,D)}const NH=[-1,-1,1,1],FH=[-1,1,-1,1],u5=["right","center","left"],LH=["bottom","middle","top"];function d5(i,o,a,l,u,f,m,g,b,v,w,C){return!(u.outOfBounds(i,a,o,l)||(C&&f||u).getRange(i,a,o,l))}const BH={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},zH={naive:function c5(i,o,a,l){const u=i.width,f=i.height;return function(m){const g=m.datum.datum.items[l].items,b=g.length,v=m.datum.fontSize,w=yc.width(m.datum,m.datum.text);let D,T,I,k,F,L,z,C=0;for(let V=0;V=C&&(C=z,m.x=F,m.y=L);return F=w/2,L=v/2,D=m.x-F,T=m.x+F,I=m.y-L,k=m.y+L,m.align="center",D<0&&T<=u?m.align="left":0<=D&&u=1;)z=(F+L)/2,w_(i,I,k,T,D,z,m,g)?L=z:F=z;if(F>C)return[I,k,F,!0]}}return function(v){const w=v.datum.datum.items[l].items,C=w.length,D=v.datum.fontSize,T=yc.width(v.datum,v.datum.text);let z,V,U,W,Y,H,Z,te,ce,le,ve,xe,Q,J,oe,we,ne,I=a?D:0,k=!1,F=!1,L=0;for(let ge=0;geV&&(ne=z,z=V,V=ne),U>W&&(ne=U,U=W,W=ne),ce=i(z),ve=i(V),le=~~((ce+ve)/2),xe=i(U),J=i(W),Q=~~((xe+J)/2),Z=le;Z>=ce;--Z)for(te=Q;te>=xe;--te)we=b(Z,te,I,T,D),we&&([v.x,v.y,I,k]=we);for(Z=le;Z<=ve;++Z)for(te=Q;te<=J;++te)we=b(Z,te,I,T,D),we&&([v.x,v.y,I,k]=we);!k&&!a&&(oe=Math.abs(V-z+W-U),Y=(z+V)/2,H=(U+W)/2,oe>=L&&!LI(Y,H,T,D,u,f)&&!w_(i,Y,H,D,T,D,m,null)&&(L=oe,v.x=Y,v.y=H,F=!0))}return!(!k&&!F||(Y=T/2,H=D/2,m.setRange(i(v.x-Y),i(v.y-H),i(v.x+Y),i(v.y+H)),v.align="center",v.baseline="middle",0))}},floodfill:function PH(i,o,a,l){const u=i.width,f=i.height,m=o[0],g=o[1],b=i.bitmap();return function(v){const w=v.datum.datum.items[l].items,C=w.length,D=v.datum.fontSize,T=yc.width(v.datum,v.datum.text),I=[];let V,U,W,Y,H,Z,te,ce,le,ve,xe,Q,k=a?D:0,F=!1,L=!1,z=0;for(let J=0;J=1;)xe=(le+ve)/2,w_(i,H,Z,D,T,xe,m,g)?ve=xe:le=xe;le>k&&(v.x=H,v.y=Z,k=le,F=!0)}}!F&&!a&&(Q=Math.abs(U-V+Y-W),H=(V+U)/2,Z=(W+Y)/2,Q>=z&&!LI(H,Z,T,D,u,f)&&!w_(i,H,Z,D,T,D,m,null)&&(z=Q,v.x=H,v.y=Z,L=!0))}return!(!F&&!L||(H=T/2,Z=D/2,m.setRange(i(v.x-H),i(v.y-Z),i(v.x+H),i(v.y+Z)),v.align="center",v.baseline="middle",0))}}};function VH(i,o,a,l,u,f,m,g,b,v,w){if(!i.length)return i;const C=Math.max(l.length,u.length),D=function Eh(i,o){const a=new Float64Array(o),l=i.length;for(let u=0;u[f.x,f.x,f.x,f.y,f.y,f.y];return i?"line"===i||"area"===i?f=>u(f.datum):"line"===o?f=>{const m=f.datum.items[l].items;return u(m.length?m["start"===a?0:m.length-1]:{x:NaN,y:NaN})}:f=>{const m=f.datum.bounds;return[m.x1,(m.x1+m.x2)/2,m.x2,m.y1,(m.y1+m.y2)/2,m.y2]}:u}(I,k,g,b),z=null===v||v===1/0,V=F&&"naive"===w;let U=-1,W=-1;const Y=i.map(ce=>{const le=z?yc.width(ce,ce.text):void 0;return U=Math.max(U,le),W=Math.max(W,ce.fontSize),{datum:ce,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:L(ce),textWidth:le}});v=null===v||v===1/0?Math.max(U,W)+Math.max(...l):v;const H=function OH(i,o,a){const l=Math.max(1,Math.sqrt(i*o/1e6)),u=~~((i+2*a+l)/l),f=~~((o+2*a+l)/l),m=g=>~~((g+a)/l);return m.invert=g=>g*l-a,m.bitmap=()=>function IH(i,o){const a=new Uint32Array(~~((i*o+US)/US));function l(f,m){a[f]|=m}function u(f,m){a[f]&=m}return{array:a,get:(f,m)=>{const g=m*i+f;return a[g>>>gm]&1<<(g&Pl)},set:(f,m)=>{const g=m*i+f;l(g>>>gm,1<<(g&Pl))},clear:(f,m)=>{const g=m*i+f;u(g>>>gm,~(1<<(g&Pl)))},getRange:(f,m,g,b)=>{let w,C,D,T,v=b;for(;v>=m;--v)if(w=v*i+f,C=v*i+g,D=w>>>gm,T=C>>>gm,D===T){if(a[D]&_m[w&Pl]&pf[1+(C&Pl)])return!0}else{if(a[D]&_m[w&Pl]||a[T]&pf[1+(C&Pl)])return!0;for(let I=D+1;I{let v,w,C,D,T;for(;m<=b;++m)if(v=m*i+f,w=m*i+g,C=v>>>gm,D=w>>>gm,C===D)l(C,_m[v&Pl]&pf[1+(w&Pl)]);else for(l(C,_m[v&Pl]),l(D,pf[1+(w&Pl)]),T=C+1;T{let v,w,C,D,T;for(;m<=b;++m)if(v=m*i+f,w=m*i+g,C=v>>>gm,D=w>>>gm,C===D)u(C,pf[v&Pl]|_m[1+(w&Pl)]);else for(u(C,pf[v&Pl]),u(D,_m[1+(w&Pl)]),T=C+1;Tf<0||m<0||b>=o||g>=i}}(u,f),m.ratio=l,m.padding=a,m.width=i,m.height=o,m}(o[0],o[1],v);let Z;if(!V){a&&Y.sort((ve,xe)=>a(ve.datum,xe.datum));let ce=!1;for(let ve=0;veve.datum);Z=f.length||le?function kH(i,o,a,l,u){const f=i.width,m=i.height,g=l||u,b=$d(f,m).getContext("2d"),v=$d(f,m).getContext("2d"),w=g&&$d(f,m).getContext("2d");a.forEach(Z=>FI(b,Z,!1)),FI(v,o,!1),g&&FI(w,o,!0);const C=QF(b,f,m),D=QF(v,f,m),T=g&&QF(w,f,m),I=i.bitmap(),k=g&&i.bitmap();let F,L,z,V,U,W,Y,H;for(L=0;La.set(i(l.boundary[0]),i(l.boundary[3]))),[a,void 0]}(H,m&&Y)}const te=F?zH[w](H,Z,m,b):function $H(i,o,a,l){const u=i.width,f=i.height,m=o[0],g=o[1],b=l.length;return function(v){const w=v.boundary,C=v.datum.fontSize;if(w[2]<0||w[5]<0||w[0]>u||w[3]>f)return!1;let T,I,k,F,L,z,V,U,W,Y,H,Z,te,ce,le,D=v.textWidth??0;for(let ve=0;ve>>2&3)-1,k=0===T&&0===I||l[ve]<0,F=T&&I?Math.SQRT1_2:1,L=l[ve]<0?-1:1,z=w[1+T]+l[ve]*T*F,H=w[4+I]+L*C*I/2+l[ve]*I*F,U=H-C/2,W=H+C/2,Z=i(z),ce=i(U),le=i(W),!D){if(!d5(Z,Z,ce,le,m,g,0,0,0,0,0,k))continue;D=yc.width(v.datum,v.datum.text)}if(Y=z+L*D*T/2,z=Y-D/2,V=Y+D/2,Z=i(z),te=i(V),d5(Z,te,ce,le,m,g,0,0,0,0,0,k))return v.x=T?T*L<0?V:z:Y,v.y=I?I*L<0?W:U:H,v.align=u5[T*L+1],v.baseline=LH[I*L+1],m.setRange(Z,ce,te,le),!0}return!1}}(H,Z,T,D);return Y.forEach(ce=>ce.opacity=+te(ce)),Y}const p5=["x","y","opacity","align","baseline"],m5=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function JF(i){ze.call(this,null,i)}function g5(i,o){var u,f,m,g,b,v,a=[],l=function(w){return w(g)};if(null==o)a.push(i);else for(u={},f=0,m=i.length;f{const m=f.datum;m[u[0]]=f.x,m[u[1]]=f.y,m[u[2]]=f.opacity,m[u[3]]=f.align,m[u[4]]=f.baseline}),o.reflow(l).modifies(u)}}),eP.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}]},(0,N.XW)(eP,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS);if(!this.value||o.changed()||i.modified()){const u=g5(o.materialize(o.SOURCE).source,i.groupby),f=(i.groupby||[]).map(N.el),m=f.length,g=i.as||[(0,N.el)(i.x),(0,N.el)(i.y)],b=[];u.forEach(v=>{Tu(v,i.x,i.y,i.bandwidth||.3).forEach(w=>{const C={};for(let D=0;D"poly"===i?o:"quad"===i?2:1)(m,g),v=i.as||[(0,N.el)(i.x),(0,N.el)(i.y)],w=BI[m],C=[];let D=i.extent;(0,N.nr)(BI,m)||(0,N.vU)("Invalid regression method: "+m),null!=D&&"log"===m&&D[0]<=0&&(o.dataflow.warn("Ignoring extent with values <= 0 for log regression."),D=null),u.forEach(T=>{if(T.length<=b)return void o.dataflow.warn("Skipping regression with more parameters than data points.");const k=w(T,i.x,i.y,g);if(i.params)return void C.push(Ti({keys:T.dims,coef:k.coef,rSquared:k.rSquared}));const F=D||(0,N.We)(T,i.x),L=z=>{const V={};for(let U=0;UL([z,k.predict(z)])):qf(k.predict,F,25,200).forEach(L)}),this.value&&(a.rem=this.value),this.value=a.add=a.source=C}return a}});const qs=134217729;function XS(i,o,a,l,u){let f,m,g,b,v=o[0],w=l[0],C=0,D=0;w>v==w>-v?(f=v,v=o[++C]):(f=w,w=l[++D]);let T=0;if(Cv==w>-v?(m=v+f,g=f-(m-v),v=o[++C]):(m=w+f,g=f-(m-w),w=l[++D]),f=m,0!==g&&(u[T++]=g);Cv==w>-v?(m=f+v,b=m-f,g=f-(m-b)+(v-b),v=o[++C]):(m=f+w,b=m-f,g=f-(m-b)+(w-b),w=l[++D]),f=m,0!==g&&(u[T++]=g);for(;C=33306690738754716e-32*v?b:-function GH(i,o,a,l,u,f,m){let g,b,v,w,C,D,T,I,k,F,L,z,V,U,W,Y,H,Z;const te=i-u,ce=a-u,le=o-f,ve=l-f;U=te*ve,D=qs*te,T=D-(D-te),I=te-T,D=qs*ve,k=D-(D-ve),F=ve-k,W=I*F-(U-T*k-I*k-T*F),Y=le*ce,D=qs*le,T=D-(D-le),I=le-T,D=qs*ce,k=D-(D-ce),F=ce-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Gw[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Gw[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Gw[2]=z-(Z-C)+(L-C),Gw[3]=Z;let xe=function UH(i,o){let a=o[0];for(let l=1;l=Q||-xe>=Q||(C=i-te,g=i-(te+C)+(C-u),C=a-ce,v=a-(ce+C)+(C-u),C=o-le,b=o-(le+C)+(C-f),C=l-ve,w=l-(ve+C)+(C-f),0===g&&0===b&&0===v&&0===w)||(Q=11093356479670487e-47*m+33306690738754706e-32*Math.abs(xe),xe+=te*w+ve*g-(le*v+ce*b),xe>=Q||-xe>=Q))return xe;U=g*ve,D=qs*g,T=D-(D-g),I=g-T,D=qs*ve,k=D-(D-ve),F=ve-k,W=I*F-(U-T*k-I*k-T*F),Y=b*ce,D=qs*b,T=D-(D-b),I=b-T,D=qs*ce,k=D-(D-ce),F=ce-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const J=XS(4,Gw,4,Ll,_5);U=te*w,D=qs*te,T=D-(D-te),I=te-T,D=qs*w,k=D-(D-w),F=w-k,W=I*F-(U-T*k-I*k-T*F),Y=le*v,D=qs*le,T=D-(D-le),I=le-T,D=qs*v,k=D-(D-v),F=v-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const oe=XS(J,_5,4,Ll,WH);U=g*w,D=qs*g,T=D-(D-g),I=g-T,D=qs*w,k=D-(D-w),F=w-k,W=I*F-(U-T*k-I*k-T*F),Y=b*v,D=qs*b,T=D-(D-b),I=b-T,D=qs*v,k=D-(D-v),F=v-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const we=XS(oe,WH,4,Ll,qH);return qH[we-1]}(i,o,a,l,u,f,v)}ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(8),ct(8),ct(8),ct(4),ct(8),ct(8),ct(8),ct(12),ct(192),ct(192),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(4),ct(4),ct(4),ct(8),ct(16),ct(16),ct(16),ct(32),ct(32),ct(48),ct(64),ct(1152),ct(1152),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(1152),ct(1152),ct(1152),ct(1152),ct(1152),ct(2304),ct(2304),ct(3456),ct(5760),ct(8),ct(8),ct(8),ct(16),ct(24),ct(48),ct(48),ct(96),ct(192),ct(384),ct(384),ct(384),ct(768),ct(96),ct(96),ct(96),ct(1152);const MP=Math.pow(2,-52),AP=new Uint32Array(512);class TP{static from(o,a=P5,l=iD){const u=o.length,f=new Float64Array(2*u);for(let m=0;m>1;if(a>0&&"number"!=typeof o[0])throw new Error("Expected coords to contain numbers.");this.coords=o;const l=Math.max(2*a-5,0);this._triangles=new Uint32Array(3*l),this._halfedges=new Int32Array(3*l),this._hashSize=Math.ceil(Math.sqrt(a)),this._hullPrev=new Uint32Array(a),this._hullNext=new Uint32Array(a),this._hullTri=new Uint32Array(a),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(a),this._dists=new Float64Array(a),this.update()}update(){const{coords:o,_hullPrev:a,_hullNext:l,_hullTri:u,_hullHash:f}=this,m=o.length>>1;let g=1/0,b=1/0,v=-1/0,w=-1/0;for(let te=0;tev&&(v=ce),le>w&&(w=le),this._ids[te]=te}const C=(g+v)/2,D=(b+w)/2;let T,I,k;for(let te=0,ce=1/0;te0&&(I=te,ce=le)}let z=o[2*I],V=o[2*I+1],U=1/0;for(let te=0;teve&&(te[ce++]=xe,ve=Q)}return this.hull=te.subarray(0,ce),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(zI(F,L,z,V,W,Y)<0){const te=I,ce=z,le=V;I=k,z=W,V=Y,k=te,W=ce,Y=le}const H=function aK(i,o,a,l,u,f){const m=a-i,g=l-o,b=u-i,v=f-o,w=m*m+g*g,C=b*b+v*v,D=.5/(m*v-g*b);return{x:i+(v*w-g*C)*D,y:o+(m*C-b*w)*D}}(F,L,z,V,W,Y);this._cx=H.x,this._cy=H.y;for(let te=0;te0&&Math.abs(xe-ce)<=MP&&Math.abs(Q-le)<=MP||(ce=xe,le=Q,ve===T||ve===I||ve===k))continue;let J=0;for(let de=0,Te=this._hashKey(xe,Q);de=0;)if(oe=we,oe===J){oe=-1;break}if(-1===oe)continue;let ne=this._addTriangle(oe,ve,l[oe],-1,-1,u[oe]);u[ve]=this._legalize(ne+2),u[oe]=ne,Z++;let ge=l[oe];for(;we=l[ge],zI(xe,Q,o[2*ge],o[2*ge+1],o[2*we],o[2*we+1])<0;)ne=this._addTriangle(ge,ve,we,u[ve],-1,u[ge]),u[ve]=this._legalize(ne+2),l[ge]=ge,Z--,ge=we;if(oe===J)for(;we=a[oe],zI(xe,Q,o[2*we],o[2*we+1],o[2*oe],o[2*oe+1])<0;)ne=this._addTriangle(we,ve,oe,-1,u[oe],u[we]),this._legalize(ne+2),u[we]=ne,l[oe]=oe,Z--,oe=we;this._hullStart=a[ve]=oe,l[oe]=a[ge]=ve,l[ve]=ge,f[this._hashKey(xe,Q)]=ve,f[this._hashKey(o[2*oe],o[2*oe+1])]=oe}this.hull=new Uint32Array(Z);for(let te=0,ce=this._hullStart;te0?3-a:1+a)/4}(o-this._cx,a-this._cy)*this._hashSize)%this._hashSize}_legalize(o){const{_triangles:a,_halfedges:l,coords:u}=this;let f=0,m=0;for(;;){const g=l[o],b=o-o%3;if(m=b+(o+2)%3,-1===g){if(0===f)break;o=AP[--f];continue}const v=g-g%3,C=v+(g+2)%3,D=a[m],T=a[o],I=a[b+(o+1)%3],k=a[C];if(oK(u[2*D],u[2*D+1],u[2*T],u[2*T+1],u[2*I],u[2*I+1],u[2*k],u[2*k+1])){a[o]=k,a[g]=D;const L=l[C];if(-1===L){let V=this._hullStart;do{if(this._hullTri[V]===C){this._hullTri[V]=o;break}V=this._hullPrev[V]}while(V!==this._hullStart)}this._link(o,L),this._link(g,l[m]),this._link(m,C),f=a&&o[i[g]]>m;)i[g+1]=i[g--];i[g+1]=f}else{let f=a+1,m=l;m0(i,a+l>>1,f),o[i[a]]>o[i[l]]&&m0(i,a,l),o[i[f]]>o[i[l]]&&m0(i,f,l),o[i[a]]>o[i[f]]&&m0(i,a,f);const g=i[f],b=o[g];for(;;){do{f++}while(o[i[f]]b);if(m=m-a?(p0(i,o,f,l),p0(i,o,a,m-1)):(p0(i,o,a,m-1),p0(i,o,f,l))}}function m0(i,o,a){const l=i[o];i[o]=i[a],i[a]=l}function P5(i){return i[0]}function iD(i){return i[1]}class Em{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(o,a){this._+=`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(o,a){this._+=`L${this._x1=+o},${this._y1=+a}`}arc(o,a,l){const u=(o=+o)+(l=+l),f=a=+a;if(l<0)throw new Error("negative radius");null===this._x1?this._+=`M${u},${f}`:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+u+","+f),l&&(this._+=`A${l},${l},0,1,1,${o-l},${a}A${l},${l},0,1,1,${this._x1=u},${this._y1=f}`)}rect(o,a,l,u){this._+=`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}h${+l}v${+u}h${-l}Z`}value(){return this._||null}}class kP{constructor(){this._=[]}moveTo(o,a){this._.push([o,a])}closePath(){this._.push(this._[0].slice())}lineTo(o,a){this._.push([o,a])}value(){return this._.length?this._:null}}class IP{constructor(o,[a,l,u,f]=[0,0,960,500]){if(!((u=+u)>=(a=+a)&&(f=+f)>=(l=+l)))throw new Error("invalid bounds");this.delaunay=o,this._circumcenters=new Float64Array(2*o.points.length),this.vectors=new Float64Array(2*o.points.length),this.xmax=u,this.xmin=a,this.ymax=f,this.ymin=l,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:o,hull:a,triangles:l},vectors:u}=this;let f,m;const g=this.circumcenters=this._circumcenters.subarray(0,l.length/3*2);for(let z,V,k=0,F=0,L=l.length;k1;)f-=2;for(let m=2;m0){if(a>=this.ymax)return null;(m=(this.ymax-a)/u)0){if(o>=this.xmax)return null;(m=(this.xmax-o)/l)this.xmax?2:0)|(athis.ymax?8:0)}_simplify(o){if(o&&o.length>4){for(let a=0;a2&&function cK(i){const{triangles:o,coords:a}=i;for(let l=0;l1e-10)return!1}return!0}(o)){this.collinear=Int32Array.from({length:a.length/2},(D,T)=>T).sort((D,T)=>a[2*D]-a[2*T]||a[2*D+1]-a[2*T+1]);const b=this.collinear[0],v=this.collinear[this.collinear.length-1],w=[a[2*b],a[2*b+1],a[2*v],a[2*v+1]],C=1e-8*Math.hypot(w[3]-w[1],w[2]-w[0]);for(let D=0,T=a.length/2;D0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=u[0],m[u[0]]=1,2===u.length&&(m[u[1]]=0,this.triangles[1]=u[1],this.triangles[2]=u[1]))}voronoi(o){return new IP(this,o)}*neighbors(o){const{inedges:a,hull:l,_hullIndex:u,halfedges:f,triangles:m,collinear:g}=this;if(g){const C=g.indexOf(o);return C>0&&(yield g[C-1]),void(C=0&&f!==l&&f!==u;)l=f;return f}_step(o,a,l){const{inedges:u,hull:f,_hullIndex:m,halfedges:g,triangles:b,points:v}=this;if(-1===u[o]||!v.length)return(o+1)%(v.length>>1);let w=o,C=Nn(a-v[2*o],2)+Nn(l-v[2*o+1],2);const D=u[o];let T=D;do{let I=b[T];const k=Nn(a-v[2*I],2)+Nn(l-v[2*I+1],2);if(k>5<<5,D=~~Math.max(Math.abs(z+V),Math.abs(z-V))}else w=w+31>>5<<5;if(D>b&&(b=D),m+w>=rD<<5&&(m=0,g+=b,b=0),g+D>=GI)break;u.translate((m+(w>>1))/f,(g+(D>>1))/f),o.rotate&&u.rotate(o.rotate*qI),u.fillText(o.text,0,0),o.padding&&(u.lineWidth=2*o.padding,u.strokeText(o.text,0,0)),u.restore(),o.width=w,o.height=D,o.xoff=m,o.yoff=g,o.x1=w>>1,o.y1=D>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,m+=w}for(var W=u.getImageData(0,0,(rD<<5)/f,GI/f).data,Y=[];--l>=0;)if((o=a[l]).hasText){for(C=(w=o.width)>>5,D=o.y1-o.y0,T=0;T>5)]|=ce,H|=ce}H?Z=I:(o.y0++,D--,I--,g++)}o.y1=o.y0+Z,o.sprite=Y.slice(0,(o.y1-o.y0)*C)}}}function z5(i,o,a){for(var w,l=i.sprite,u=i.width>>5,f=i.x-(u<<4),m=127&f,g=32-m,b=i.y1-i.y0,v=(i.y+i.y0)*(a>>=5)+(f>>5),C=0;C>>m:0))&o[v+D])return!0;v+=a}return!1}function h7(i,o){var a=i[0],l=i[1];o.x+o.x0l.x&&(l.x=o.x+o.x1),o.y+o.y1>l.y&&(l.y=o.y+o.y1)}function V5(i,o){return i.x+i.x1>o[0].x&&i.x+i.x0o[0].y&&i.y+i.y0=V));)if(k.x=L+Z,k.y=z+te,!(k.x+k.x0<0||k.y+k.y0<0||k.x+k.x1>i[0]||k.y+k.y1>i[1])&&(!F||!z5(k,I,i[0]))&&(!F||V5(k,F))){for(var ne,ce=k.sprite,le=k.width>>5,ve=i[0]>>5,xe=k.x-(le<<4),Q=127&xe,J=32-Q,oe=k.y1-k.y0,we=(k.y+k.y0)*ve+(xe>>5),ge=0;ge>>Q:0);we+=ve}return k.sprite=null,!0}return!1}return C.layout=function(){for(var I=function D(I){I.width=I.height=1;var k=Math.sqrt(I.getContext("2d").getImageData(0,0,1,1).data.length>>2);I.width=(rD<<5)/k,I.height=GI/k;var F=I.getContext("2d");return F.fillStyle=F.strokeStyle="red",F.textAlign="center",{context:F,ratio:k}}($d()),k=function m7(i){for(var o=[],a=-1;++a>5)*i[1]),F=null,L=v.length,z=-1,V=[],U=v.map(Y=>({text:o(Y),font:a(Y),style:u(Y),weight:f(Y),rotate:m(Y),size:~~(l(Y)+1e-14),padding:g(Y),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:Y})).sort((Y,H)=>H.size-Y.size);++z>1,W.y=i[1]*(w()+.5)>>1,C_(I,W,U,z),W.hasText&&T(k,W,F)&&(V.push(W),F?h7(F,W):F=[{x:W.x+W.x0,y:W.y+W.y0},{x:W.x+W.x1,y:W.y+W.y1}],W.x-=i[0]>>1,W.y-=i[1]>>1)}return V},C.words=function(I){return arguments.length?(v=I,C):v},C.size=function(I){return arguments.length?(i=[+I[0],+I[1]],C):i},C.font=function(I){return arguments.length?(a=g0(I),C):a},C.fontStyle=function(I){return arguments.length?(u=g0(I),C):u},C.fontWeight=function(I){return arguments.length?(f=g0(I),C):f},C.rotate=function(I){return arguments.length?(m=g0(I),C):m},C.text=function(I){return arguments.length?(o=g0(I),C):o},C.spiral=function(I){return arguments.length?(b=g7[I]||I,C):b},C.fontSize=function(I){return arguments.length?(l=g0(I),C):l},C.padding=function(I){return arguments.length?(g=g0(I),C):g},C.random=function(I){return arguments.length?(w=I,C):w},C}(),i)}FP.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:U5}]},(0,N.XW)(FP,ze,{transform(i,o){i.size&&(!i.size[0]||!i.size[1])&&(0,N.vU)("Wordcloud size dimensions must be non-zero.");const l=i.modified();if(!(l||o.changed(o.ADD_REM)||_7.some(function a(I){const k=i[I];return(0,N.mf)(k)&&o.modified(k.fields)})))return;const u=o.materialize(o.SOURCE).source,f=this.value,m=i.as||U5;let b,g=i.fontSize||14;if((0,N.mf)(g)?b=i.fontSizeRange:g=(0,N.a9)(g),b){const I=g,k=Yn("sqrt")().domain((0,N.We)(u,I)).range(b);g=F=>k(I(F))}u.forEach(I=>{I[m[0]]=NaN,I[m[1]]=NaN,I[m[3]]=0});const v=f.words(u).text(i.text).size(i.size||[500,500]).padding(i.padding||1).spiral(i.spiral||"archimedean").rotate(i.rotate||0).font(i.font||"sans-serif").fontStyle(i.fontStyle||"normal").fontWeight(i.fontWeight||"normal").fontSize(g).random(oc).layout(),w=f.size(),C=w[0]>>1,D=w[1]>>1,T=v.length;for(let k,F,I=0;Inew Uint8Array(i),dK=i=>new Uint16Array(i),_0=i=>new Uint32Array(i);function oD(i,o,a){const l=(o<257?b7:o<65537?dK:_0)(i);return a&&l.set(a),l}function PP(i,o,a){const l=1<{const u=i[a],f=i[l];return uf?1:0}),function y7(i,o){return Array.from(o,a=>i[a])}(i,o)}(T,D),w)I=o,k=i,o=Array(w+C),i=_0(w+C),function X5(i,o,a,l,u,f,m,g,b){let C,v=0,w=0;for(C=0;v0)for(F=0;Fi,size:()=>a}}function XI(i){ze.call(this,function H5(){let i=8,o=[],a=_0(0),l=oD(0,i),u=oD(0,i);return{data:()=>o,seen:()=>a=function W5(i,o,a){return i.length>=o?i:((a=a||new i.constructor(o)).set(i),a)}(a,o.length),add(f){for(let v,m=0,g=o.length,b=f.length;mo.length,curr:()=>l,prev:()=>u,reset:f=>u[f]=l[f],all:()=>i<257?255:i<65537?65535:4294967295,set(f,m){l[f]|=m},clear(f,m){l[f]&=~m},resize(f,m){(f>l.length||m>i)&&(i=Math.max(m,i),l=oD(f,i,l),u=oD(f,i))}}}(),i),this._indices=null,this._dims=null}function YI(i){ze.call(this,null,i)}XI.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}}]},(0,N.XW)(XI,ze,{transform(i,o){return this._dims?i.modified("fields")||i.fields.some(l=>o.modified(l.fields))?this.reinit(i,o):this.eval(i,o):this.init(i,o)},init(i,o){const a=i.fields,l=i.query,u=this._indices={},f=this._dims=[],m=l.length;let b,v,g=0;for(;g{const f=u.remove(o,a);for(const m in l)l[m].reindex(f)})},update(i,o,a){const l=this._dims,u=i.query,f=o.stamp,m=l.length;let b,v,g=0;for(a.filters=0,v=0;vT)for(F=T,L=Math.min(C,I);FI)for(F=Math.max(C,I),L=D;FC)for(I=C,k=Math.min(v,D);ID)for(I=Math.max(v,D),k=w;Ig[w]&a?null:m[w];return f.filter(f.MOD,v),u&u-1?(f.filter(f.ADD,w=>{const C=g[w]&a;return!C&&C^b[w]&a?m[w]:null}),f.filter(f.REM,w=>{const C=g[w]&a;return!C||C^C^b[w]&a?null:m[w]})):(f.filter(f.ADD,v),f.filter(f.REM,w=>(g[w]&a)===u?m[w]:null)),f.filter(f.SOURCE,w=>v(w._index))}});const y0="Literal",K5="CallExpression";function mf(i){this.type=i}mf.prototype.visit=function(i){let o,a,l;if(i(this))return 1;for(o=function S7(i){switch(i.type){case"ArrayExpression":return i.elements;case"BinaryExpression":case"LogicalExpression":return[i.left,i.right];case K5:return[i.callee].concat(i.arguments);case"ConditionalExpression":return[i.test,i.consequent,i.alternate];case"MemberExpression":return[i.object,i.property];case"ObjectExpression":return i.properties;case"Property":return[i.key,i.value];case"UnaryExpression":return[i.argument];default:return[]}}(this),a=0,l=o.length;a",Sh[Wr]="Identifier",Sh[lu]="Keyword",Sh[ii]="Null",Sh[nd]="Numeric",Sh[Sr]="Punctuator",Sh[S_]="String",Sh[9]="RegularExpression";var id="ArrayExpression",fK="BinaryExpression",D7="CallExpression",M7="ConditionalExpression",J5="Identifier",A7="Literal",eV="LogicalExpression",ZI="MemberExpression",D_="ObjectExpression",hK="Property",T7="UnaryExpression",_a="Unexpected token %0",tV="Unexpected number",nV="Unexpected string",iV="Unexpected identifier",k7="Unexpected reserved word",aD="Unexpected end of input",Dh="Invalid regular expression",lD="Invalid regular expression: missing /",cD="Octal literals are not allowed in strict mode.",b0="Duplicate data property in object literal not allowed in strict mode",Lo="ILLEGAL",Sm="Disabled.",LP=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]"),M_=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 QI(i,o){if(!i)throw new Error("ASSERT: "+o)}function Dm(i){return i>=48&&i<=57}function JI(i){return"0123456789abcdefABCDEF".indexOf(i)>=0}function v0(i){return"01234567".indexOf(i)>=0}function I7(i){return 32===i||9===i||11===i||12===i||160===i||i>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0}function x0(i){return 10===i||13===i||8232===i||8233===i}function uD(i){return 36===i||95===i||i>=65&&i<=90||i>=97&&i<=122||92===i||i>=128&&LP.test(String.fromCharCode(i))}function dD(i){return 36===i||95===i||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||92===i||i>=128&&M_.test(String.fromCharCode(i))}const O7={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 rV(){for(;Ge1114111||"}"!==i)&&rr({},_a,Lo),o<=65535?String.fromCharCode(o):String.fromCharCode(55296+(o-65536>>10),56320+(o-65536&1023))}function BP(){var i,o;for(i=Zt.charCodeAt(Ge++),o=String.fromCharCode(i),92===i&&(117!==Zt.charCodeAt(Ge)&&rr({},_a,Lo),++Ge,(!(i=$P("u"))||"\\"===i||!uD(i.charCodeAt(0)))&&rr({},_a,Lo),o=i);Ge>>="===(m=Zt.substr(Ge,4))?{type:Sr,value:m,start:i,end:Ge+=4}:">>>"===(f=m.substr(0,3))||"<<="===f||">>="===f?{type:Sr,value:f,start:i,end:Ge+=3}:l===(u=f.substr(0,2))[1]&&"+-<>&|".indexOf(l)>=0||"=>"===u?{type:Sr,value:u,start:i,end:Ge+=2}:("//"===u&&rr({},_a,Lo),"<>=!+-*%&|^/".indexOf(l)>=0?(++Ge,{type:Sr,value:l,start:i,end:Ge}):void rr({},_a,Lo))}function N7(){var i,o,a;if(QI(Dm((a=Zt[Ge]).charCodeAt(0))||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),o=Ge,i="","."!==a){if(i=Zt[Ge++],a=Zt[Ge],"0"===i){if("x"===a||"X"===a)return++Ge,function pK(i){let o="";for(;Ge=ll)return{type:sD,start:Ge,end:Ge};const i=Zt.charCodeAt(Ge);return uD(i)?function R7(){var i,o;return i=Ge,o=92===Zt.charCodeAt(Ge)?BP():function oV(){var i,o;for(i=Ge++;Ge=0&&Ge(QI(m=0&&rr({},Dh,a),{value:a,literal:o}}(),l=function gK(i,o){let a=i;o.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,(l,u)=>{if(parseInt(u,16)<=1114111)return"x";rr({},Dh)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(a)}catch{rr({},Dh)}try{return new RegExp(i,o)}catch{return null}}(o.value,a.value),{literal:o.literal+a.literal,value:l,regex:{pattern:o.value,flags:a.value},start:i,end:Ge}}()),lV()):eO(jl())}return a}function CK(){const i=[];if(Ul("("),!or(")"))for(;Ge":case"<=":case">=":case"instanceof":case"in":o=7;break;case"<<":case">>":case">>>":o=8;break;case"+":case"-":o=9;break;case"*":case"/":case"%":o=11}return o}function A_(){var i,o;return i=function hV(){var i,o,a,l,u,f,m,g,b,v;if(i=Cn,b=mD(),0===(u=HP(l=Cn)))return b;for(l.prec=u,jl(),o=[i,Cn],f=[b,l,m=mD()];(u=HP(Cn))>0;){for(;f.length>2&&u<=f[f.length-2].prec;)m=f.pop(),g=f.pop().value,b=f.pop(),o.pop(),a=cV(g,b,m),f.push(a);(l=jl()).prec=u,f.push(l),o.push(Cn),a=mD(),f.push(a)}for(a=f[v=f.length-1],o.pop();v>1;)o.pop(),a=cV(f[v-1].value,f[v-2],a),v-=2;return a}(),or("?")&&(jl(),o=A_(),Ul(":"),i=function uV(i,o,a){const l=new mf(M7);return l.test=i,l.consequent=o,l.alternate=a,l}(i,o,A_())),i}function tO(){const i=A_();if(or(","))throw new Error(Sm);return i}function gD(i){Ge=0,ll=(Zt=i).length,Cn=null,lV();const o=tO();if(Cn.type!==sD)throw new Error("Unexpect token after expression.");return o}var pV={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 mV(i){function a(m,g,b){return v=>function o(m,g,b,v){let w=i(g[0]);return b&&(w=b+"("+w+")",0===b.lastIndexOf("new ",0)&&(w="("+w+")")),w+"."+m+(v<0?"":0===v?"()":"("+g.slice(1).map(i).join(",")+")")}(m,v,g,b)}const l="new Date",u="String",f="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(m){m.length<3&&(0,N.vU)("Missing arguments to clamp function."),m.length>3&&(0,N.vU)("Too many arguments to clamp function.");const g=m.map(i);return"Math.max("+g[1]+", Math.min("+g[2]+","+g[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:l,date:a("getDate",l,0),day:a("getDay",l,0),year:a("getFullYear",l,0),month:a("getMonth",l,0),hours:a("getHours",l,0),minutes:a("getMinutes",l,0),seconds:a("getSeconds",l,0),milliseconds:a("getMilliseconds",l,0),time:a("getTime",l,0),timezoneoffset:a("getTimezoneOffset",l,0),utcdate:a("getUTCDate",l,0),utcday:a("getUTCDay",l,0),utcyear:a("getUTCFullYear",l,0),utcmonth:a("getUTCMonth",l,0),utchours:a("getUTCHours",l,0),utcminutes:a("getUTCMinutes",l,0),utcseconds:a("getUTCSeconds",l,0),utcmilliseconds:a("getUTCMilliseconds",l,0),length:a("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:a("toUpperCase",u,0),lower:a("toLowerCase",u,0),substring:a("substring",u),split:a("split",u),trim:a("trim",u,0),regexp:f,test:a("test",f),if:function(m){m.length<3&&(0,N.vU)("Missing arguments to if function."),m.length>3&&(0,N.vU)("Too many arguments to if function.");const g=m.map(i);return"("+g[0]+"?"+g[1]+":"+g[2]+")"}}}function gV(i){const o=(i=i||{}).allowed?(0,N.Rg)(i.allowed):{},a=i.forbidden?(0,N.Rg)(i.forbidden):{},l=i.constants||pV,u=(i.functions||mV)(C),f=i.globalvar,m=i.fieldvar,g=(0,N.mf)(f)?f:I=>`${f}["${I}"]`;let b={},v={},w=0;function C(I){if((0,N.HD)(I))return I;const k=D[I.type];return null==k&&(0,N.vU)("Unsupported type: "+I.type),k(I)}const D={Literal:I=>I.raw,Identifier:I=>{const k=I.name;return w>0?k:(0,N.nr)(a,k)?(0,N.vU)("Illegal identifier: "+k):(0,N.nr)(l,k)?l[k]:(0,N.nr)(o,k)?k:(b[k]=1,g(k))},MemberExpression:I=>{const k=!I.computed,F=C(I.object);k&&(w+=1);const L=C(I.property);return F===m&&(v[function j7(i){const o=i&&i.length-1;return o&&('"'===i[0]&&'"'===i[o]||"'"===i[0]&&"'"===i[o])?i.slice(1,-1):i}(L)]=1),k&&(w-=1),F+(k?"."+L:"["+L+"]")},CallExpression:I=>{"Identifier"!==I.callee.type&&(0,N.vU)("Illegal callee type: "+I.callee.type);const k=I.callee.name,F=I.arguments,L=(0,N.nr)(u,k)&&u[k];return L||(0,N.vU)("Unrecognized function: "+k),(0,N.mf)(L)?L(F):L+"("+F.map(C).join(",")+")"},ArrayExpression:I=>"["+I.elements.map(C).join(",")+"]",BinaryExpression:I=>"("+C(I.left)+" "+I.operator+" "+C(I.right)+")",UnaryExpression:I=>"("+I.operator+C(I.argument)+")",ConditionalExpression:I=>"("+C(I.test)+"?"+C(I.consequent)+":"+C(I.alternate)+")",LogicalExpression:I=>"("+C(I.left)+I.operator+C(I.right)+")",ObjectExpression:I=>"{"+I.properties.map(C).join(",")+"}",Property:I=>{w+=1;const k=C(I.key);return w-=1,k+":"+C(I.value)}};function T(I){const k={code:C(I),globals:Object.keys(b),fields:Object.keys(v)};return b={},v={},k}return T.functions=u,T.constants=l,T}var U7,Mh,r1,qP,o1,nO=new pa,WP=new pa,Dr={point:Us,lineStart:Us,lineEnd:Us,polygonStart:function(){nO=new pa,Dr.lineStart=s1,Dr.lineEnd=AK},polygonEnd:function(){var i=+nO;WP.add(i<0?Ol+i:i),this.lineStart=this.lineEnd=this.point=Us},sphere:function(){WP.add(Ol)}};function s1(){Dr.point=H7}function AK(){_V(U7,Mh)}function H7(i,o){Dr.point=_V,U7=i,Mh=o,r1=i*=pi,qP=vn(o=(o*=pi)/2+Dw),o1=fn(o)}function _V(i,o){var a=(i*=pi)-r1,l=a>=0?1:-1,u=l*a,f=vn(o=(o*=pi)/2+Dw),m=fn(o),g=o1*m,b=qP*f+g*vn(u),v=g*l*fn(u);nO.add(ma(v,b)),r1=i,qP=f,o1=m}var So,Dc,$o,Fa,T_,yV,bV,a1,_D,gf,_f,cu={point:GP,lineStart:l1,lineEnd:oO,polygonStart:function(){cu.point=vV,cu.lineStart=W7,cu.lineEnd=TK,_D=new pa,Dr.polygonStart()},polygonEnd:function(){Dr.polygonEnd(),cu.point=GP,cu.lineStart=l1,cu.lineEnd=oO,nO<0?(So=-($o=180),Dc=-(Fa=90)):_D>bn?Fa=90:_D<-bn&&(Dc=-90),_f[0]=So,_f[1]=$o},sphere:function(){So=-($o=180),Dc=-(Fa=90)}};function GP(i,o){gf.push(_f=[So=i,$o=i]),oFa&&(Fa=o)}function rO(i,o){var a=Ow([i*pi,o*pi]);if(a1){var l=Rw(a1,a),f=Rw([l[1],-l[0],0],l);Yk(f),f=Iw(f);var v,m=i-T_,g=m>0?1:-1,b=f[0]*ts*g,w=Vi(m)>180;w^(g*T_Fa&&(Fa=v):w^(g*T_<(b=(b+360)%360-180)&&bFa&&(Fa=o)),w?iuu(So,$o)&&($o=i):uu(i,$o)>uu(So,$o)&&(So=i):$o>=So?(i$o&&($o=i)):i>T_?uu(So,i)>uu(So,$o)&&($o=i):uu(i,$o)>uu(So,$o)&&(So=i)}else gf.push(_f=[So=i,$o=i]);oFa&&(Fa=o),a1=a,T_=i}function l1(){cu.point=rO}function oO(){_f[0]=So,_f[1]=$o,cu.point=GP,a1=null}function vV(i,o){if(a1){var a=i-T_;_D.add(Vi(a)>180?a+(a>0?360:-360):a)}else yV=i,bV=o;Dr.point(i,o),rO(i,o)}function W7(){Dr.lineStart()}function TK(){vV(yV,bV),Dr.lineEnd(),Vi(_D)>bn&&(So=-($o=180)),_f[0]=So,_f[1]=$o,a1=null}function uu(i,o){return(o-=i)<0?o+360:o}function XP(i,o){return i[0]-o[0]}function yD(i,o){return i[0]<=i[1]?i[0]<=o&&o<=i[1]:oo.indexOf(a)>=0):o},R_union:function(i,o){var a=(0,N.He)(o[0]),l=(0,N.He)(o[1]);return a>l&&(a=o[1],l=o[0]),i.length?(i[0]>a&&(i[0]=a),i[1]l&&(a=o[1],l=o[0]),i.length?ll&&(i[1]=l),i):[a,l]}};function OV(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to selection functions must be a string literal.");const u=o[0].value,m="unit",g="@"+m,b=":"+u;(o.length>=2&&(0,N.fj)(o).value)===wD&&!(0,N.nr)(l,g)&&(l[g]=a.getData(u).indataRef(a,m)),(0,N.nr)(l,b)||(l[b]=a.getData(u).tuplesRef())}function Z7(i){const o=this.context.data[i];return o?o.values.value:[]}const Tm=i=>function(o,a){return this.context.dataflow.locale()[i](a)(o)},RV=Tm("format"),Q7=Tm("timeFormat"),jK=Tm("utcFormat"),J7=Tm("timeParse"),UK=Tm("utcParse"),S0=new Date(2e3,0,1);function mO(i,o,a){return Number.isInteger(i)&&Number.isInteger(o)?(S0.setYear(2e3),S0.setMonth(i),S0.setDate(o),Q7.call(this,S0,a)):""}const eL="%",NV="$";function tL(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to data functions must be a string literal.");const u=o[0].value,f=":"+u;if(!(0,N.nr)(f,l))try{l[f]=a.getData(u).tuplesRef()}catch{}}function ul(i,o,a,l){if(o[0].type===y0)yO(a,l,o[0].value);else for(i in a.scales)yO(a,l,i)}function yO(i,o,a){const l=eL+a;if(!(0,N.nr)(o,l))try{o[l]=i.scaleRef(a)}catch{}}function yf(i,o){if((0,N.mf)(i))return i;if((0,N.HD)(i)){const a=o.scales[i];return a&&function Lg(i){return i&&!0===i[Up]}(a.value)?a.value:void 0}}function FV(i,o){return function(a,l,u){if(a){const f=yf(a,(u||this).context);return f&&f.path[i](l)}return o(l)}}const qK=FV("area",function iO(i){return WP=new pa,vh(i,Dr),2*WP}),GK=FV("bounds",function xV(i){var o,a,l,u,f,m,g;if(Fa=$o=-(So=Dc=1/0),gf=[],vh(i,cu),a=gf.length){for(gf.sort(XP),o=1,f=[l=gf[0]];ouu(l[0],l[1])&&(l[1]=u[1]),uu(u[0],l[1])>uu(l[0],l[1])&&(l[0]=u[0])):f.push(l=u);for(m=-1/0,o=0,l=f[a=f.length-1];o<=a;l=u,++o)(g=uu(l[1],(u=f[o])[0]))>m&&(m=g,So=u[0],$o=l[1])}return gf=_f=null,So===1/0||Dc===1/0?[[NaN,NaN],[NaN,NaN]]:[[So,Dc],[$o,Fa]]}),XK=FV("centroid",function C0(i){bD=YP=sO=aO=w0=lO=cO=uO=0,wV=new pa,c1=new pa,KP=new pa,vh(i,du);var o=+wV,a=+c1,l=+KP,u=gS(o,a,l);return us9(i,o)}const l9={};function zV(i){return(0,N.kJ)(i)||ArrayBuffer.isView(i)?i:null}function VV(i){return zV(i)||((0,N.HD)(i)?i:null)}const c9=i=>i.data;function u9(i,o){const a=Z7.call(o,i);return a.root&&a.root.lookup||{}}const h9=()=>typeof window<"u"&&window||null;function p9(i,o,a){if(!i)return[];const[l,u]=i,f=(new Fo).set(l[0],l[1],u[0],u[1]);return tN(a||this.context.dataflow.scenegraph().root,f,function EZ(i){let o=null;if(i){const a=(0,N.IX)(i.marktype),l=(0,N.IX)(i.markname);o=u=>(!a.length||a.some(f=>u.marktype===f))&&(!l.length||l.some(f=>u.name===f))}return o}(o))}const bO={random:()=>oc(),cumulativeNormal:sc,cumulativeLogNormal:Hc,cumulativeUniform:Wf,densityNormal:Xa,densityLogNormal:kv,densityUniform:op,quantileNormal:ao,quantileLogNormal:Ed,quantileUniform:cE,sampleNormal:my,sampleLogNormal:Tv,sampleUniform:gy,isArray:N.kJ,isBoolean:N.jn,isDate:N.J_,isDefined:i=>void 0!==i,isNumber:N.hj,isObject:N.Kn,isRegExp:N.Kj,isString:N.HD,isTuple:ly,isValid:i=>null!=i&&i==i,toBoolean:N.sw,toDate:i=>(0,N.ZU)(i),toNumber:N.He,toString:N.BB,indexof:function oZ(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l1?o-1:0),l=1;l1?o-1:0),l=1;l1?o-1:0),l=1;l(0,N.We)(i),inScope:function YK(i){const o=this.context.group;let a=!1;if(o)for(;i;){if(i===o){a=!0;break}i=i.mark.group}return a},intersect:p9,clampRange:N.l$,pinchDistance:function tZ(i){const o=i.touches;return Math.hypot(o[0].clientX-o[1].clientX,o[0].clientY-o[1].clientY)},pinchAngle:function nZ(i){const o=i.touches;return Math.atan2(o[0].clientY-o[1].clientY,o[0].clientX-o[1].clientX)},screen:function vZ(){const i=h9();return i?i.screen:{}},containerSize:function wZ(){const i=this.context.dataflow,o=i.container&&i.container();return o?[o.clientWidth,o.clientHeight]:[void 0,void 0]},windowSize:function xZ(){const i=h9();return i?[i.innerWidth,i.innerHeight]:[void 0,void 0]},bandspace:function uZ(i,o,a){return DC(i||0,o||0,a||0)},setdata:function zK(i,o){const a=this.context.dataflow;return a.pulse(this.context.data[i].input,a.changeset().remove(N.yb).insert(o)),1},pathShape:function bZ(i){let o=null;return function(a){return a?xb(a,o=o||Gp(i)):i}},panLinear:N.Dw,panLog:N.mJ,panPow:N.QA,panSymlog:N.Zw,zoomLinear:N.ay,zoomLog:N.dH,zoomPow:N.mK,zoomSymlog:N.bV,encode:function VK(i,o,a){if(i){const l=this.context.dataflow;l.pulse(i.mark.source,l.changeset().encode(i,o))}return void 0!==a?a:i},modify:function BV(i,o,a,l,u,f){const m=this.context.dataflow,g=this.context.data[i],b=g.input,v=m.stamp();let C,D,w=g.changes;if(!1===m._trigger||!(b.value.length||o||l))return 0;if((!w||w.stamp{g.modified=!0,m.pulse(b,w).run()},!0,1)),a&&(C=!0===a?N.yb:(0,N.kJ)(a)||ly(a)?a:a9(a),w.remove(C)),o&&w.insert(o),l&&(C=a9(l),b.value.some(C)?w.remove(C):w.insert(l)),u)for(D in f)w.modify(u,D,f[D]);return 1},lassoAppend:function CZ(i,o,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const u=(i=(0,N.IX)(i))[i.length-1];return void 0===u||Math.hypot(u[0]-o,u[1]-a)>l?[...i,[o,a]]:i},lassoPath:function SZ(i){return(0,N.IX)(i).reduce((o,a,l)=>{let[u,f]=a;return o+(0==l?`M ${u},${f} `:l===i.length-1?" Z":`L ${u},${f} `)},"")},intersectLasso:function DZ(i,o,a){const{x:l,y:u,mark:f}=a,m=(new Fo).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[b,v]of o)bm.x2&&(m.x2=b),vm.y2&&(m.y2=v);return m.translate(l,u),p9([[m.x1,m.y1],[m.x2,m.y2]],i,f).filter(b=>function MZ(i,o,a){let l=0;for(let u=0,f=a.length-1;uo!=g>o&&i<(m-b)*(o-v)/(g-v)+b&&l++}return 1&l}(b.x,b.y,o))}},AZ=["view","item","group","xy","x","y"],m9="this.",jV={},g9={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:i=>`_[${(0,N.m8)(NV+i)}]`,functions:function kZ(i){const o=mV(i);AZ.forEach(a=>o[a]="event.vega."+a);for(const a in bO)o[a]=m9+a;return(0,N.l7)(o,function nL(i,o,a){o.__bandwidth=u=>u&&u.bandwidth?u.bandwidth():0,a._bandwidth=ul,a._range=ul,a._scale=ul;const l=u=>"_["+(u.type===y0?(0,N.m8)(eL+u.value):(0,N.m8)(eL)+"+"+i(u))+"]";return{_bandwidth:u=>`this.__bandwidth(${l(u[0])})`,_range:u=>`${l(u[0])}.range()`,_scale:u=>`${l(u[0])}(${i(u[1])})`}}(i,bO,jV)),o},constants:pV,visitors:jV},UV=gV(g9);function xs(i,o,a){return 1===arguments.length?bO[i]:(bO[i]=o,a&&(jV[i]=a),UV&&(UV.functions[i]=m9+i),this)}function km(i,o){const a={};let l;try{l=gD(i=(0,N.HD)(i)?i:(0,N.m8)(i)+"")}catch{(0,N.vU)("Expression parse error: "+i)}l.visit(f=>{if(f.type!==K5)return;const m=f.callee.name,g=g9.visitors[m];g&&g(m,f.arguments,o,a)});const u=UV(l);return u.globals.forEach(f=>{const m=NV+f;!(0,N.nr)(a,m)&&o.getSignal(f)&&(a[m]=o.signalRef(f))}),{$expr:(0,N.l7)({code:u.code},o.options.ast?{ast:l}:null),$fields:u.fields,$params:a}}xs("bandwidth",function dZ(i,o){const a=yf(i,(o||this).context);return a&&a.bandwidth?a.bandwidth():0},ul),xs("copy",function fZ(i,o){const a=yf(i,(o||this).context);return a?a.copy():void 0},ul),xs("domain",function hZ(i,o){const a=yf(i,(o||this).context);return a?a.domain():[]},ul),xs("range",function mZ(i,o){const a=yf(i,(o||this).context);return a&&a.range?a.range():[]},ul),xs("invert",function pZ(i,o,a){const l=yf(i,(a||this).context);return l?(0,N.kJ)(o)?(l.invertRange||l.invert)(o):(l.invert||l.invertExtent)(o):void 0},ul),xs("scale",function gZ(i,o,a){const l=yf(i,(a||this).context);return l?l(o):void 0},ul),xs("gradient",function _Z(i,o,a,l,u){i=yf(i,(u||this).context);const f=qp(o,a);let m=i.domain(),g=m[0],b=(0,N.fj)(m),v=N.yR;return b-g?v=Qo(i,g,b):i=(i.interpolator?Yn("sequential")().interpolator(i.interpolator()):Yn("linear")().interpolate(i.interpolate()).range(i.range())).domain([g=0,b=1]),i.ticks&&(m=i.ticks(+l||15),g!==m[0]&&m.unshift(g),b!==(0,N.fj)(m)&&m.push(b)),m.forEach(w=>f.stop(v(w),i(w))),f},ul),xs("geoArea",qK,ul),xs("geoBounds",GK,ul),xs("geoCentroid",XK,ul),xs("geoShape",function yZ(i,o,a){const l=yf(i,(a||this).context);return function(u){return l?l.path.context(u)(o):""}},ul),xs("geoScale",function i9(i,o){const a=yf(i,(o||this).context);return a&&a.scale()},ul),xs("indata",function BK(i,o,a){const l=this.context.data[i]["index:"+o],u=l?l.value.get(a):void 0;return u&&u.count},function n9(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to indata must be a string literal."),o[1].type!==y0&&(0,N.vU)("Second argument to indata must be a string literal.");const u=o[0].value,f=o[1].value,m="@"+f;(0,N.nr)(m,l)||(l[m]=a.getData(u).indataRef(a,f))}),xs("data",Z7,tL),xs("treePath",function d9(i,o,a){const l=u9(i,this),u=l[o],f=l[a];return u&&f?u.path(f).map(c9):void 0},tL),xs("treeAncestors",function f9(i,o){const a=u9(i,this)[o];return a?a.ancestors().map(c9):void 0},tL),xs("vlSelectionTest",function FK(i,o,a){for(var v,w,C,D,T,l=this.context.data[i],u=l?l.values.value:[],f=l?l[JP]&&l[JP].value:void 0,m=a===wD,g=u.length,b=0;b(H[w[te].field]=Z,H),{}))}else T=Th,I=rd(v),(F=(k=m[T]||(m[T]={}))[D]||(k[D]=[])).push(I),a&&(F=g[D]||(g[D]=[])).push({[Th]:I});return o=o||"union",m[Th]?m[Th]=IV[`${Th}_${o}`](...Object.values(m[Th])):Object.keys(m).forEach(H=>{m[H]=Object.keys(m[H]).map(Z=>m[H][Z]).reduce((Z,te)=>void 0===Z?te:IV[`${b[H]}_${o}`](Z,te))}),f=Object.keys(g),a&&f.length&&(m[l?"vlPoint":"vlMulti"]="union"===o?{or:f.reduce((Z,te)=>(Z.push(...g[te]),Z),[])}:{and:f.map(Z=>({or:g[Z]}))}),m},OV),xs("vlSelectionTuples",function pO(i,o){return i.map(a=>(0,N.l7)(o.fields?{values:o.fields.map(l=>AV(l)(a.datum))}:{[Th]:rd(a.datum)},o))});const OZ=(0,N.Rg)(["rule"]),_9=(0,N.Rg)(["group","image","rect"]);function HV(i){return(i+"").toLowerCase()}function vO(i,o,a){a.endsWith(";")||(a="return("+a+");");const l=Function(...o.concat(a));return i&&i.functions?l.bind(i.functions):l}var LZ={operator:(i,o)=>vO(i,["_"],o.code),parameter:(i,o)=>vO(i,["datum","_"],o.code),event:(i,o)=>vO(i,["event"],o.code),handler:(i,o)=>vO(i,["_","event"],`var datum=event.item&&event.item.datum;return ${o.code};`),encode:(i,o)=>{const{marktype:a,channels:l}=o;let u="var o=item,datum=o.datum,m=0,$;";for(const f in l){const m="o["+(0,N.m8)(f)+"]";u+=`$=${l[f].code};if(${m}!==$)${m}=$,m=1;`}return u+=function RZ(i,o){let a="";return OZ[o]||(i.x2&&(i.x?(_9[o]&&(a+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),a+="o.width=o.x2-o.x;"):a+="o.x=o.x2-(o.width||0);"),i.xc&&(a+="o.x=o.xc-(o.width||0)/2;"),i.y2&&(i.y?(_9[o]&&(a+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),a+="o.height=o.y2-o.y;"):a+="o.y=o.y2-(o.height||0);"),i.yc&&(a+="o.y=o.yc-(o.height||0)/2;")),a}(l,a),u+="return m;",vO(i,["item","_"],u)},codegen:{get(i){const o=`[${i.map(N.m8).join("][")}]`,a=Function("_",`return _${o};`);return a.path=o,a},comparator(i,o){let a;const u=Function("a","b","var u, v; return "+i.map((f,m)=>{const g=o[m];let b,v;return f.path?(b=`a${f.path}`,v=`b${f.path}`):((a=a||{})["f"+m]=f,b=`this.f${m}(a)`,v=`this.f${m}(b)`),function PZ(i,o,a,l){return`((u = ${i}) < (v = ${o}) || u == null) && v != null ? ${a}\n : (u > v || v == null) && u != null ? ${l}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${a}\n : v !== v && u === u ? ${l} : `}(b,v,-g,g)}).join("")+"0;");return a?u.bind(a):u}}};function y9(i,o,a){if(!i||!(0,N.Kn)(i))return i;for(let f,l=0,u=b9.length;lu&&u.$tupleid?Kt:u);return o.fn[a]||(o.fn[a]=(0,N.qu)(l,i.$order,o.expr.codegen))}},{key:"$context",parse:function GZ(i,o){return o}},{key:"$subflow",parse:function XZ(i,o){const a=i.$subflow;return function(l,u,f){const m=o.fork().parse(a),g=m.get(a.operators[0].id),b=m.signals.parent;return b&&b.set(f),g.detachSubflow=()=>o.detach(m),g}}},{key:"$tupleid",parse:function YZ(){return Kt}}];const QZ={skip:!0};function v9(i,o,a,l){return new x9(i,o,a,l)}function x9(i,o,a,l){this.dataflow=i,this.transforms=o,this.events=i.events.bind(i),this.expr=l||LZ,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},a&&(this.functions=Object.create(a),this.functions.context=this)}function w9(i){this.dataflow=i.dataflow,this.transforms=i.transforms,this.events=i.events,this.expr=i.expr,this.signals=Object.create(i.signals),this.scales=Object.create(i.scales),this.nodes=Object.create(i.nodes),this.data=Object.create(i.data),this.fn=Object.create(i.fn),i.functions&&(this.functions=Object.create(i.functions),this.functions.context=this)}function kh(i,o){i&&(null==o?i.removeAttribute("aria-label"):i.setAttribute("aria-label",o))}x9.prototype=w9.prototype={fork(){const i=new w9(this);return(this.subcontext||(this.subcontext=[])).push(i),i},detach(i){this.subcontext=this.subcontext.filter(a=>a!==i);const o=Object.keys(i.nodes);for(const a of o)i.nodes[a]._targets=null;for(const a of o)i.nodes[a].detach();i.nodes=null},get(i){return this.nodes[i]},set(i,o){return this.nodes[i]=o},add(i,o){const a=this,l=a.dataflow,u=i.value;if(a.set(i.id,o),function FZ(i){return"collect"===HV(i)}(i.type)&&u&&(u.$ingest?l.ingest(o,u.$ingest,u.$format):u.$request?l.preload(o,u.$request,u.$format):l.pulse(o,l.changeset().insert(u))),i.root&&(a.root=o),i.parent){let f=a.get(i.parent.$ref);f?(l.connect(f,[o]),o.targets().add(f)):(a.unresolved=a.unresolved||[]).push(()=>{f=a.get(i.parent.$ref),l.connect(f,[o]),o.targets().add(f)})}if(i.signal&&(a.signals[i.signal]=o),i.scale&&(a.scales[i.scale]=o),i.data)for(const f in i.data){const m=a.data[f]||(a.data[f]={});i.data[f].forEach(g=>m[g]=o)}},resolve(){return(this.unresolved||[]).forEach(i=>i()),delete this.unresolved,this},operator(i,o){this.add(i,this.dataflow.add(i.value,o))},transform(i,o){this.add(i,this.dataflow.add(this.transforms[HV(o)]))},stream(i,o){this.set(i.id,o)},update(i,o,a,l,u){this.dataflow.on(o,a,l,u,i.options)},operatorExpression(i){return this.expr.operator(this,i)},parameterExpression(i){return this.expr.parameter(this,i)},eventExpression(i){return this.expr.event(this,i)},handlerExpression(i){return this.expr.handler(this,i)},encodeExpression(i){return this.expr.encode(this,i)},parse:function IZ(i){const o=this,a=i.operators||[];return i.background&&(o.background=i.background),i.eventConfig&&(o.eventConfig=i.eventConfig),i.locale&&(o.locale=i.locale),a.forEach(l=>o.parseOperator(l)),a.forEach(l=>o.parseOperatorParameters(l)),(i.streams||[]).forEach(l=>o.parseStream(l)),(i.updates||[]).forEach(l=>o.parseUpdate(l)),o.resolve()},parseOperator:function $Z(i){const o=this;!function NZ(i){return"operator"===HV(i)}(i.type)&&i.type?o.transform(i,i.type):o.operator(i,i.update?o.operatorExpression(i.update):null)},parseOperatorParameters:function BZ(i){const o=this;if(i.params){const a=o.get(i.id);a||(0,N.vU)("Invalid operator id: "+i.id),o.dataflow.connect(a,a.parameters(o.parseParameters(i.params),i.react,i.initonly))}},parseParameters:function zZ(i,o){o=o||{};const a=this;for(const l in i){const u=i[l];o[l]=(0,N.kJ)(u)?u.map(f=>y9(f,a,o)):y9(u,a,o)}return o},parseStream:function KZ(i){var u,o=this,a=null!=i.filter?o.eventExpression(i.filter):void 0,l=null!=i.stream?o.get(i.stream):void 0;i.source?l=o.events(i.source,i.type,a):i.merge&&(l=(u=i.merge.map(f=>o.get(f)))[0].merge.apply(u[0],u.slice(1))),i.between&&(u=i.between.map(f=>o.get(f)),l=l.between(u[0],u[1])),i.filter&&(l=l.filter(a)),null!=i.throttle&&(l=l.throttle(+i.throttle)),null!=i.debounce&&(l=l.debounce(+i.debounce)),null==l&&(0,N.vU)("Invalid stream definition: "+JSON.stringify(i)),i.consume&&l.consume(!0),o.stream(i,l)},parseUpdate:function ZZ(i){var u,o=this,a=(0,N.Kn)(a=i.source)?a.$ref:a,l=o.get(a),f=i.update,m=void 0;l||(0,N.vU)("Source not defined: "+i.source),u=i.target&&i.target.$expr?o.eventExpression(i.target.$expr):o.get(i.target),f&&f.$expr&&(f.$params&&(m=o.parseParameters(f.$params)),f=o.handlerExpression(f.$expr)),o.update(i,l,u,f,m)},getState:function JZ(i){var o=this,a={};if(i.signals){var l=a.signals={};Object.keys(o.signals).forEach(f=>{const m=o.signals[f];i.signals(f,m)&&(l[f]=m.value)})}if(i.data){var u=a.data={};Object.keys(o.data).forEach(f=>{const m=o.data[f];i.data(f,m)&&(u[f]=m.input.value)})}return o.subcontext&&!1!==i.recurse&&(a.subcontext=o.subcontext.map(f=>f.getState(i))),a},setState:function eQ(i){var o=this,a=o.dataflow,l=i.data,u=i.signals;Object.keys(u||{}).forEach(f=>{a.update(o.signals[f],u[f],QZ)}),Object.keys(l||{}).forEach(f=>{a.pulse(o.data[f].input,a.changeset().remove(N.yb).insert(l[f]))}),(i.subcontext||[]).forEach((f,m)=>{const g=o.subcontext[m];g&&g.setState(f)})}};const SD="default";function WV(i,o){const a=i.globalCursor()?typeof document<"u"&&document.body:i.container();if(a)return null==o?a.style.removeProperty("cursor"):a.style.cursor=o}function xO(i,o){var a=i._runtime.data;return(0,N.nr)(a,o)||(0,N.vU)("Unrecognized data set: "+o),a[o]}function DD(i,o){z2(o)||(0,N.vU)("Second argument to changes must be a changeset.");const a=xO(this,i);return a.modified=!0,this.pulse(a.input,o)}function qV(i){var o=i.padding();return Math.max(0,i._viewWidth+o.left+o.right)}function S9(i){var o=i.padding();return Math.max(0,i._viewHeight+o.top+o.bottom)}function iL(i){var o=i.padding(),a=i._origin;return[o.left+a[0],o.top+a[1]]}const T9={trap:!1};function d1(i,o,a,l){i._eventListeners.push({type:a,sources:(0,N.IX)(o),handler:l})}function MD(i,o,a){const l=i._eventConfig&&i._eventConfig[o];return!(!1===l||(0,N.Kn)(l)&&!l[a])||(i.warn(`Blocked ${o} ${a} event listener.`),!1)}function ZV(i){return i.item}function AD(i){return i.item.mark.source}function Wl(i){return function(o,a){return a.vega.view().changeset().encode(a.item,i)}}function Ys(i,o,a){const l=document.createElement(i);for(const u in o)l.setAttribute(u,o[u]);return null!=a&&(l.textContent=a),l}const I9="vega-bind",O9="vega-bind-name",R9="vega-bind-radio";function N9(i,o,a){if(!o)return;const l=a.param;let u=a.state;return u||(u=a.state={elements:null,active:!1,set:null,update:m=>{m!=i.signal(l.signal)&&i.runAsync(null,()=>{u.source=!0,i.signal(l.signal,m)})}},l.debounce&&(u.update=(0,N.Ds)(l.debounce,u.update))),(null==l.input&&l.element?JV:ej)(u,o,l,i),u.active||(i.on(i._signals[l.signal],null,()=>{u.source?u.source=!1:u.set(i.signal(l.signal))}),u.active=!0),u}function JV(i,o,a,l){const u=a.event||"input",f=()=>i.update(o.value);l.signal(a.signal,o.value),o.addEventListener(u,f),d1(l,o,u,f),i.set=m=>{o.value=m,o.dispatchEvent(function iQ(i){return typeof Event<"u"?new Event(i):{type:i}}(u))}}function ej(i,o,a,l){const u=l.signal(a.signal),f=Ys("div",{class:I9}),m="radio"===a.input?f:f.appendChild(Ys("label"));m.appendChild(Ys("span",{class:O9},a.name||a.signal)),o.appendChild(f);let g=F9;switch(a.input){case"checkbox":g=tj;break;case"select":g=nj;break;case"radio":g=rQ;break;case"range":g=P9}g(i,m,a,u)}function F9(i,o,a,l){const u=Ys("input");for(const f in a)"signal"!==f&&"element"!==f&&u.setAttribute("input"===f?"type":f,a[f]);u.setAttribute("name",a.signal),u.value=l,o.appendChild(u),u.addEventListener("input",()=>i.update(u.value)),i.elements=[u],i.set=f=>u.value=f}function tj(i,o,a,l){const u={type:"checkbox",name:a.signal};l&&(u.checked=!0);const f=Ys("input",u);o.appendChild(f),f.addEventListener("change",()=>i.update(f.checked)),i.elements=[f],i.set=m=>f.checked=!!m||null}function nj(i,o,a,l){const u=Ys("select",{name:a.signal}),f=a.labels||[];a.options.forEach((m,g)=>{const b={value:m};rL(m,l)&&(b.selected=!0),u.appendChild(Ys("option",b,(f[g]||m)+""))}),o.appendChild(u),u.addEventListener("change",()=>{i.update(a.options[u.selectedIndex])}),i.elements=[u],i.set=m=>{for(let g=0,b=a.options.length;g{const b={type:"radio",name:a.signal,value:m};rL(m,l)&&(b.checked=!0);const v=Ys("input",b);v.addEventListener("change",()=>i.update(m));const w=Ys("label",{},(f[g]||m)+"");return w.prepend(v),u.appendChild(w),v}),i.set=m=>{const g=i.elements,b=g.length;for(let v=0;v{b.textContent=g.value,i.update(+g.value)};g.addEventListener("input",v),g.addEventListener("change",v),i.elements=[g],i.set=w=>{g.value=w,b.textContent=w}}function rL(i,o){return i===o||i+""==o+""}function ij(i,o,a,l,u,f){return(o=o||new l(i.loader())).initialize(a,qV(i),S9(i),iL(i),u,f).background(i.background())}function rj(i,o){return o?function(){try{o.apply(this,arguments)}catch(a){i.error(a)}}:null}function wO(i,o,a){if("string"==typeof o){if(!(typeof document<"u"))return i.error("DOM document instance not found."),null;if(!(o=document.querySelector(o)))return i.error("Signal bind element not found: "+o),null}if(o&&a)try{o.textContent=""}catch(l){o=null,i.error(l)}return o}const TD=i=>+i||0;function $9(i){return(0,N.Kn)(i)?{top:TD(i.top),bottom:TD(i.bottom),left:TD(i.left),right:TD(i.right)}:(i=>({top:i,bottom:i,left:i,right:i}))(TD(i))}function h1(i,o,a,l){return oL.apply(this,arguments)}function oL(){return(oL=(0,ai.Z)(function*(i,o,a,l){const u=hS(o),f=u&&u.headless;return f||(0,N.vU)("Unrecognized renderer type: "+o),yield i.runAsync(),ij(i,null,null,f,a,l).renderAsync(i._scenegraph.root)})).apply(this,arguments)}function sL(){return(sL=(0,ai.Z)(function*(i,o){i!==l_.Canvas&&i!==l_.SVG&&i!==l_.PNG&&(0,N.vU)("Unrecognized image type: "+i);const a=yield h1(this,i,o);return i===l_.SVG?function z9(i,o){const a=new Blob([i],{type:o});return window.URL.createObjectURL(a)}(a.svg(),"image/svg+xml"):a.canvas().toDataURL("image/png")})).apply(this,arguments)}function aL(){return(aL=(0,ai.Z)(function*(i,o){return(yield h1(this,l_.Canvas,i,o)).canvas()})).apply(this,arguments)}function EO(){return(EO=(0,ai.Z)(function*(i){return(yield h1(this,l_.SVG,i)).svg()})).apply(this,arguments)}var sj="width",aj="height",lL="padding",CO={skip:!0};function H9(i,o){var a=i.autosize(),l=i.padding();return o-(a&&a.contains===lL?l.left+l.right:0)}function W9(i,o){var a=i.autosize(),l=i.padding();return o-(a&&a.contains===lL?l.top+l.bottom:0)}function uQ(i,o){return o.modified&&(0,N.kJ)(o.input.value)&&!i.startsWith("_:vega:_")}function lj(i,o){return!("parent"===i||o instanceof wd.proxy)}function G9(i,o,a,l){const u=i.element();u&&u.setAttribute("title",function uj(i){return null==i?"":(0,N.kJ)(i)?dj(i):(0,N.Kn)(i)&&!(0,N.J_)(i)?function p1(i){return Object.keys(i).map(o=>{const a=i[o];return o+": "+((0,N.kJ)(a)?dj(a):fj(a))}).join("\n")}(i):i+""}(l))}function dj(i){return"["+i.map(fj).join(", ")+"]"}function fj(i){return(0,N.kJ)(i)?"[\u2026]":(0,N.Kn)(i)&&!(0,N.J_)(i)?"{\u2026}":i}function hj(i,o){const a=this;if(o=o||{},xd.call(a),o.loader&&a.loader(o.loader),o.logger&&a.logger(o.logger),null!=o.logLevel&&a.logLevel(o.logLevel),o.locale||i.locale){const f=(0,N.l7)({},i.locale,o.locale);a.locale(GM(f.number,f.time))}a._el=null,a._elBind=null,a._renderType=o.renderer||l_.Canvas,a._scenegraph=new b3;const l=a._scenegraph.root;a._renderer=null,a._tooltip=o.tooltip||G9,a._redraw=!0,a._handler=(new sm).scene(l),a._globalCursor=!1,a._preventDefault=!1,a._timers=[],a._eventListeners=[],a._resizeListeners=[],a._eventConfig=function KV(i){const o=(0,N.l7)({defaults:{}},i),a=(l,u)=>{u.forEach(f=>{(0,N.kJ)(l[f])&&(l[f]=(0,N.Rg)(l[f]))})};return a(o.defaults,["prevent","allow"]),a(o,["view","window","selector"]),o}(i.eventConfig),a.globalCursor(a._eventConfig.globalCursor);const u=function oj(i,o,a){return v9(i,wd,bO,a).parse(o)}(a,i,o.expr);a._runtime=u,a._signals=u.signals,a._bind=(i.bindings||[]).map(f=>({state:null,param:(0,N.l7)({},f)})),u.root&&u.root.set(l),l.source=u.data.root.input,a.pulse(u.data.root.input,a.changeset().insert(l.items)),a._width=a.width(),a._height=a.height(),a._viewWidth=H9(a,a._width),a._viewHeight=W9(a,a._height),a._origin=[0,0],a._resize=0,a._autosize=1,function aQ(i){var o=i._signals,a=o[sj],l=o[aj],u=o[lL];function f(){i._autosize=i._resize=1}i._resizeWidth=i.add(null,g=>{i._width=g.size,i._viewWidth=H9(i,g.size),f()},{size:a}),i._resizeHeight=i.add(null,g=>{i._height=g.size,i._viewHeight=W9(i,g.size),f()},{size:l});const m=i.add(null,f,{pad:u});i._resizeWidth.rank=a.rank+1,i._resizeHeight.rank=l.rank+1,m.rank=u.rank+1}(a),function Do(i){i.add(null,o=>(i._background=o.bg,i._resize=1,o.bg),{bg:i._signals.background})}(a),function Hl(i){const o=i._signals.cursor||(i._signals.cursor=i.add({user:SD,item:null}));i.on(i.events("view","pointermove"),o,(a,l)=>{const u=o.value,f=u?(0,N.HD)(u)?u:u.user:SD,m=l.item&&l.item.cursor||null;return u&&f===u.user&&m==u.item?u:{user:f,item:m}}),i.add(null,function(a){let l=a.cursor,u=this.value;return(0,N.HD)(l)||(u=l.item,l=l.user),WV(i,l&&l!==SD?l:u||l),u},{cursor:o})}(a),a.description(i.description),o.hover&&a.hover(),o.container&&a.initialize(o.container,o.bind),o.watchPixelRatio&&a._watchPixelRatio()}function SO(i,o){return(0,N.nr)(i._signals,o)?i._signals[o]:(0,N.vU)("Unrecognized signal name: "+(0,N.m8)(o))}function pj(i,o){const a=(i._targets||[]).filter(l=>l._update&&l._update.handler===o);return a.length?a[0]:null}function Y9(i,o,a,l){let u=pj(a,l);return u||(u=rj(i,()=>l(o,a.value)),u.handler=l,i.on(a,null,u)),i}function kD(i,o,a){const l=pj(o,a);return l&&o._targets.remove(l),i}(0,N.XW)(hj,xd,{evaluate(i,o,a){var l=this;return(0,ai.Z)(function*(){if(yield xd.prototype.evaluate.call(l,i,o),l._redraw||l._resize)try{l._renderer&&(l._resize&&(l._resize=0,function GV(i){var o=iL(i),a=qV(i),l=S9(i);i._renderer.background(i.background()),i._renderer.resize(a,l,o),i._handler.origin(o),i._resizeListeners.forEach(u=>{try{u(a,l)}catch(f){i.error(f)}})}(l)),yield l._renderer.renderAsync(l._scenegraph.root)),l._redraw=!1}catch(u){l.error(u)}return a&&qo(l,a),l})()},dirty(i){this._redraw=!0,this._renderer&&this._renderer.dirty(i)},description(i){if(arguments.length){const o=null!=i?i+"":null;return o!==this._desc&&kh(this._el,this._desc=o),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(i,o,a){const l=SO(this,i);return 1===arguments.length?l.value:this.update(l,o,a)},width(i){return arguments.length?this.signal("width",i):this.signal("width")},height(i){return arguments.length?this.signal("height",i):this.signal("height")},padding(i){return arguments.length?this.signal("padding",$9(i)):$9(this.signal("padding"))},autosize(i){return arguments.length?this.signal("autosize",i):this.signal("autosize")},background(i){return arguments.length?this.signal("background",i):this.signal("background")},renderer(i){return arguments.length?(hS(i)||(0,N.vU)("Unrecognized renderer type: "+i),i!==this._renderType&&(this._renderType=i,this._resetRenderer()),this):this._renderType},tooltip(i){return arguments.length?(i!==this._tooltip&&(this._tooltip=i,this._resetRenderer()),this):this._tooltip},loader(i){return arguments.length?(i!==this._loader&&(xd.prototype.loader.call(this,i),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(SO(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function lQ(i,o,a,l,u,f){this.runAfter(m=>{let g=0;m._autosize=0,m.width()!==a&&(g=1,m.signal(sj,a,CO),m._resizeWidth.skip(!0)),m.height()!==l&&(g=1,m.signal(aj,l,CO),m._resizeHeight.skip(!0)),m._viewWidth!==i&&(m._resize=1,m._viewWidth=i),m._viewHeight!==o&&(m._resize=1,m._viewHeight=o),(m._origin[0]!==u[0]||m._origin[1]!==u[1])&&(m._resize=1,m._origin=u),g&&m.run("enter"),f&&m.runAfter(b=>b.resize())},!1,1)},addEventListener(i,o,a){let l=o;return a&&!1===a.trap||(l=rj(this,o),l.raw=o),this._handler.on(i,l),this},removeEventListener(i,o){for(var u,f,a=this._handler.handlers(i),l=a.length;--l>=0;)if(u=a[l].handler,i===(f=a[l].type)&&(o===u||o===u.raw)){this._handler.off(f,u);break}return this},addResizeListener(i){const o=this._resizeListeners;return o.includes(i)||o.push(i),this},removeResizeListener(i){var o=this._resizeListeners,a=o.indexOf(i);return a>=0&&o.splice(a,1),this},addSignalListener(i,o){return Y9(this,i,SO(this,i),o)},removeSignalListener(i,o){return kD(this,SO(this,i),o)},addDataListener(i,o){return Y9(this,i,xO(this,i).values,o)},removeDataListener(i,o){return kD(this,xO(this,i).values,o)},globalCursor(i){if(arguments.length){if(this._globalCursor!==!!i){const o=WV(this,null);this._globalCursor=!!i,o&&WV(this,o)}return this}return this._globalCursor},preventDefault(i){return arguments.length?(this._preventDefault=i,this):this._preventDefault},timer:function q9(i,o){this._timers.push(function tQ(i,o,a){var l=new MF,u=o;return null==o?(l.restart(i,o,a),l):(l._restart=l.restart,l.restart=function(f,m,g){m=+m,g=null==g?cr():+g,l._restart(function b(v){v+=u,l._restart(b,u+=m,g),f(v)},m,g)},l.restart(i,o,a),l)}(function a(l){i({timestamp:Date.now(),elapsed:l})},o))},events:function f1(i,o,a){var m,l=this,u=new so(a),f=function(v,w){l.runAsync(null,()=>{"view"===i&&function k9(i,o){var a=i._eventConfig.defaults,l=a.prevent,u=a.allow;return!1!==l&&!0!==u&&(!0===l||!1===u||(l?l[o]:u?!u[o]:i.preventDefault()))}(l,o)&&v.preventDefault(),u.receive(function D9(i,o,a){var f,g,l=i._renderer,u=l&&l.canvas();return u&&(g=iL(i),(f=mk(o.changedTouches?o.changedTouches[0]:o,u))[0]-=g[0],f[1]-=g[1]),o.dataflow=i,o.item=a,o.vega=function M9(i,o,a){const l=o?"group"===o.mark.marktype?o:o.mark.group:null;function u(m){var b,g=l;if(m)for(b=o;b;b=b.mark.group)if(b.mark.name===m){g=b;break}return g&&g.mark&&g.mark.interactive?g:{}}function f(m){if(!m)return a;(0,N.HD)(m)&&(m=u(m));const g=a.slice();for(;m;)g[0]-=m.x||0,g[1]-=m.y||0,m=m.mark&&m.mark.group;return g}return{view:(0,N.a9)(i),item:(0,N.a9)(o||{}),group:u,xy:f,x:m=>f(m)[0],y:m=>f(m)[1]}}(i,a,f),o}(l,v,w))})};if("timer"===i)MD(l,"timer",o)&&l.timer(f,o);else if("view"===i)MD(l,"view",o)&&l.addEventListener(o,f,T9);else if("window"===i?MD(l,"window",o)&&typeof window<"u"&&(m=[window]):typeof document<"u"&&MD(l,"selector",o)&&(m=Array.from(document.querySelectorAll(i))),m){for(var g=0,b=m.length;g=0;)o[l].stop();for(l=a.length;--l>=0;)for(u=(f=a[l]).sources.length;--u>=0;)f.sources[u].removeEventListener(f.type,f.handler);return i&&i.call(this,this._handler,null,null,null),this},hover:function nQ(i,o){return o=[o||"update",(i=[i||"hover"])[0]],this.on(this.events("view","pointerover",ZV),AD,Wl(i)),this.on(this.events("view","pointerout",ZV),AD,Wl(o)),this},data:function Bo(i,o){return arguments.length<2?xO(this,i).values.value:DD.call(this,i,Lf().remove(N.yb).insert(o))},change:DD,insert:function Ih(i,o){return DD.call(this,i,Lf().insert(o))},remove:function C9(i,o){return DD.call(this,i,Lf().remove(o))},scale:function U9(i){var o=this._runtime.scales;return(0,N.nr)(o,i)||(0,N.vU)("Unrecognized scale or projection: "+i),o[i].value},initialize:function sQ(i,o){const a=this,l=a._renderType,u=a._eventConfig.bind,f=hS(l);i=a._el=i?wO(a,i,!0):null,function E9(i){const o=i.container();o&&(o.setAttribute("role","graphics-document"),o.setAttribute("aria-roleDescription","visualization"),kh(o,i.description()))}(a),f||a.error("Unrecognized renderer type: "+l);const m=f.handler||sm,g=i?f.renderer:f.headless;return a._renderer=g?ij(a,a._renderer,i,g):null,a._handler=function oQ(i,o,a,l){const u=new l(i.loader(),rj(i,i.tooltip())).scene(i.scenegraph().root).initialize(a,iL(i),i);return o&&o.handlers().forEach(f=>{u.on(f.type,f.handler)}),u}(a,a._handler,i,m),a._redraw=!0,i&&"none"!==u&&(o=o?a._elBind=wO(a,o,!0):i.appendChild(Ys("form",{class:"vega-bindings"})),a._bind.forEach(b=>{b.param.element&&"container"!==u&&(b.element=wO(a,b.param.element,!!b.param.input))}),a._bind.forEach(b=>{N9(a,b.element||o,b)})),a},toImageURL:function B9(i,o){return sL.apply(this,arguments)},toCanvas:function V9(i,o){return aL.apply(this,arguments)},toSVG:function j9(i){return EO.apply(this,arguments)},getState:function cQ(i){return this._runtime.getState(i||{data:uQ,signals:lj,recurse:!0})},setState:function cj(i){return this.runAsync(null,o=>{o._trigger=!1,o._runtime.setState(i)},o=>{o._trigger=!0}),this},_watchPixelRatio:function X9(){if("canvas"===this.renderer()&&this._renderer._canvas){let i=null;const o=()=>{i?.();const a=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);a.addEventListener("change",o),i=()=>{a.removeEventListener("change",o)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};o()}}});const K9="view",D0="[",k_="]",Z9="{",I_="}",mj=":",cL=",",uL="@",gj=">",Q9=/[[\]{}]/,_j={"*":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 J9,eW;function yj(i,o,a){return J9=o||K9,eW=a||_j,bj(i.trim()).map(dL)}function ID(i,o,a,l,u){const f=i.length;let g,m=0;for(;o=0?--m:l&&l.indexOf(g)>=0&&++m}return o}function bj(i){const o=[],a=i.length;let l=0,u=0;for(;u' after between selector: "+i;l=l.map(dL);const u=dL(i.slice(1).trim());return u.between?{between:l,stream:u}:(u.between=l,u)}(i):function dQ(i){const o={source:J9},a=[];let b,v,l=[0,0],u=0,f=0,m=i.length,g=0;if(i[m-1]===I_){if(g=i.lastIndexOf(Z9),!(g>=0))throw"Unmatched right brace: "+i;try{l=function fQ(i){const o=i.split(cL);if(!i.length||o.length>2)throw i;return o.map(a=>{const l=+a;if(l!=l)throw i;return l})}(i.substring(g+1,m-1))}catch{throw"Invalid throttle specification: "+i}m=(i=i.slice(0,g).trim()).length,g=0}if(!m)throw i;if(i[0]===uL&&(u=++g),b=ID(i,g,mj),b1?(o.type=a[1],u?o.markname=a[0].slice(1):function tW(i){return eW[i]}(a[0])?o.marktype=a[0]:o.source=a[0]):o.type=a[0],"!"===o.type.slice(-1)&&(o.consume=!0,o.type=o.type.slice(0,-1)),null!=v&&(o.filter=v),l[0]&&(o.throttle=l[0]),l[1]&&(o.debounce=l[1]),o}(i)}function vj(i){return(0,N.Kn)(i)?i:{type:i||"pad"}}const DO=i=>+i||0,hQ=i=>({top:i,bottom:i,left:i,right:i});function iW(i){return(0,N.Kn)(i)?i.signal?i:{top:DO(i.top),bottom:DO(i.bottom),left:DO(i.left),right:DO(i.right)}:hQ(DO(i))}const ya=i=>(0,N.Kn)(i)&&!(0,N.kJ)(i)?(0,N.l7)({},i):{value:i};function rs(i,o,a,l){return null!=a?((0,N.Kn)(a)&&!(0,N.kJ)(a)||(0,N.kJ)(a)&&a.length&&(0,N.Kn)(a[0])?i.update[o]=a:i[l||"enter"][o]={value:a},1):0}function dl(i,o,a){for(const l in o)rs(i,l,o[l]);for(const l in a)rs(i,l,a[l],"update")}function OD(i,o,a){for(const l in o)a&&(0,N.nr)(a,l)||(i[l]=(0,N.l7)(i[l]||{},o[l]));return i}function RD(i,o){return o&&(o.enter&&o.enter[i]||o.update&&o.update[i])}const xj="mark",wj="frame",Ej="scope",pQ="axis",Cj="axis-domain",mQ="axis-grid",gQ="axis-label",_Q="axis-tick",rW="axis-title",oW="legend",sW="legend-band",yQ="legend-entry",bQ="legend-gradient",Sj="legend-label",aW="legend-symbol",vQ="legend-title",xQ="title",wQ="title-text",EQ="title-subtitle";function Dj(i,o,a){i[o]=a&&a.signal?{signal:a.signal}:{value:a}}const cW=i=>(0,N.HD)(i)?(0,N.m8)(i):i.signal?`(${i.signal})`:Mj(i);function O_(i){if(null!=i.gradient)return function uW(i){const o=[i.start,i.stop,i.count].map(a=>null==a?null:(0,N.m8)(a));for(;o.length&&null==(0,N.fj)(o);)o.pop();return o.unshift(cW(i.gradient)),`gradient(${o.join(",")})`}(i);let o=i.signal?`(${i.signal})`:i.color?function od(i){return i.c?fL("hcl",i.h,i.c,i.l):i.h||i.s?fL("hsl",i.h,i.s,i.l):i.l||i.a?fL("lab",i.l,i.a,i.b):i.r||i.g||i.b?fL("rgb",i.r,i.g,i.b):null}(i.color):null!=i.field?Mj(i.field):void 0!==i.value?(0,N.m8)(i.value):void 0;return null!=i.scale&&(o=function dW(i,o){const a=cW(i.scale);return null!=i.range?o=`lerp(_range(${a}), ${+i.range})`:(void 0!==o&&(o=`_scale(${a}, ${o})`),i.band&&(o=(o?o+"+":"")+`_bandwidth(${a})`+(1==+i.band?"":"*"+ND(i.band)),i.extra&&(o=`(datum.extra ? _scale(${a}, datum.extra.value) : ${o})`)),null==o&&(o="0")),o}(i,o)),void 0===o&&(o=null),null!=i.exponent&&(o=`pow(${o},${ND(i.exponent)})`),null!=i.mult&&(o+=`*${ND(i.mult)}`),null!=i.offset&&(o+=`+${ND(i.offset)}`),i.round&&(o=`round(${o})`),o}const fL=(i,o,a,l)=>`(${i}(${[o,a,l].map(O_).join(",")})+'')`;function ND(i){return(0,N.Kn)(i)?"("+O_(i)+")":i}function Mj(i){return hL((0,N.Kn)(i)?i:{datum:i})}function hL(i){let o,a,l;if(i.signal)o="datum",l=i.signal;else if(i.group||i.parent){for(a=Math.max(1,i.level||1),o="item";a-- >0;)o+=".mark.group";i.parent?(l=i.parent,o+=".datum"):l=i.group}else i.datum?(o="datum",l=i.datum):(0,N.vU)("Invalid field reference: "+(0,N.m8)(i));return i.signal||(l=(0,N.HD)(l)?(0,N._k)(l).map(N.m8).join("]["):hL(l)),o+"["+l+"]"}function pL(i,o,a,l,u,f){const m={};(f=f||{}).encoders={$encode:m},i=function lW(i,o,a,l,u){const f={},m={};let g,b,v,w;for(b in b="lineBreak","text"===o&&null!=u[b]&&!RD(b,i)&&Dj(f,b,u[b]),("legend"==a||String(a).startsWith("axis"))&&(a=null),w=a===wj?u.group:a===xj?(0,N.l7)({},u.mark,u[o]):null,w)v=RD(b,i)||("fill"===b||"stroke"===b)&&(RD("fill",i)||RD("stroke",i)),v||Dj(f,b,w[b]);for(b in(0,N.IX)(l).forEach(C=>{const D=u.style&&u.style[C];for(const T in D)RD(T,i)||Dj(f,T,D[T])}),i=(0,N.l7)({},i),f)w=f[b],w.signal?(g=g||{})[b]=w:m[b]=w;return i.enter=(0,N.l7)(m,i.enter),g&&(i.update=(0,N.l7)(g,i.update)),i}(i,o,a,l,u.config);for(const g in i)m[g]=Tj(i[g],o,f,u);return f}function Tj(i,o,a,l){const u={},f={};for(const m in i)null!=i[m]&&(u[m]=fW(MO(i[m]),l,a,f));return{$expr:{marktype:o,channels:u},$fields:Object.keys(f),$output:Object.keys(i)}}function MO(i){return(0,N.kJ)(i)?function Aj(i){let o="";return i.forEach(a=>{const l=O_(a);o+=a.test?`(${a.test})?${l}:`:l}),":"===(0,N.fj)(o)&&(o+="null"),o}(i):O_(i)}function fW(i,o,a,l){const u=km(i,o);return u.$fields.forEach(f=>l[f]=1),(0,N.l7)(a,u.$params),u.$expr}const kj="outer",Ij=["value","update","init","react","bind"];function mL(i,o){(0,N.vU)(i+' for "outer" push: '+(0,N.m8)(o))}function Oj(i,o){const a=i.name;if(i.push===kj)o.signals[a]||mL("No prior signal definition",a),Ij.forEach(l=>{void 0!==i[l]&&mL("Invalid property ",l)});else{const l=o.addSignal(a,i.value);!1===i.react&&(l.react=!1),i.bind&&o.addBinding(a,i.bind)}}function gL(i,o,a,l){this.id=-1,this.type=i,this.value=o,this.params=a,l&&(this.parent=l)}function FD(i,o,a,l){return new gL(i,o,a,l)}function _L(i,o){return FD("operator",i,o)}function pn(i){const o={$ref:i.id};return i.id<0&&(i.refs=i.refs||[]).push(o),o}function AO(i,o){return o?{$field:i,$name:o}:{$field:i}}const yL=AO("key");function Rj(i,o){return{$compare:i,$order:o}}function PD(i,o){return(i&&i.signal?"$"+i.signal:i||"")+(i&&o?"_":"")+(o&&o.signal?"$"+o.signal:o||"")}const TO="scope",LD="view";function os(i){return i&&i.signal}function M0(i){if(os(i))return!0;if((0,N.Kn)(i))for(const o in i)if(M0(i[o]))return!0;return!1}function bf(i,o){return i??o}function m1(i){return i&&i.signal||i}const Oh="timer";function R_(i,o){return(i.merge?Im:i.stream?A0:i.type?Om:(0,N.vU)("Invalid stream specification: "+(0,N.m8)(i)))(i,o)}function Im(i,o){const l=kO({merge:i.merge.map(u=>R_(u,o))},i,o);return o.addStream(l).id}function A0(i,o){const l=kO({stream:R_(i.stream,o)},i,o);return o.addStream(l).id}function Om(i,o){let a;i.type===Oh?(a=o.event(Oh,i.throttle),i={between:i.between,filter:i.filter}):a=o.event(function Pn(i){return i===TO?LD:i||LD}(i.source),i.type);const l=kO({stream:a},i,o);return 1===Object.keys(l).length?a:o.addStream(l).id}function kO(i,o,a){let l=o.between;return l&&(2!==l.length&&(0,N.vU)('Stream "between" parameter must have 2 entries: '+(0,N.m8)(o)),i.between=[R_(l[0],a),R_(l[1],a)]),l=o.filter?[].concat(o.filter):[],(o.marktype||o.markname||o.markrole)&&l.push(function mW(i,o,a){const l="event.item";return l+(i&&"*"!==i?"&&"+l+".mark.marktype==='"+i+"'":"")+(a?"&&"+l+".mark.role==='"+a+"'":"")+(o?"&&"+l+".mark.name==='"+o+"'":"")}(o.marktype,o.markname,o.markrole)),o.source===TO&&l.push("inScope(event.item)"),l.length&&(i.filter=km("("+l.join(")&&(")+")",a).$expr),null!=(l=o.throttle)&&(i.throttle=+l),null!=(l=o.debounce)&&(i.debounce=+l),o.consume&&(i.consume=!0),i}const La={code:"_.$value",ast:{type:"Identifier",value:"value"}};function Nh(i){return{signal:"["+i.map(o=>o.scale?'scale("'+o.scale+'")':o.signal)+"]"}}const _r=i=>(o,a,l)=>FD(i,a,o||void 0,l),gW=_r("aggregate"),vL=_r("axisticks"),_W=_r("bound"),Fh=_r("collect"),yW=_r("compare"),DQ=_r("datajoin"),bW=_r("encode"),vW=_r("expression"),xW=_r("facet"),wW=_r("field"),MQ=_r("key"),$D=_r("legendentries"),Pj=_r("load"),xL=_r("mark"),IO=_r("multiextent"),EW=_r("multivalues"),CW=_r("overlap"),SW=_r("params"),Lj=_r("prefacet"),DW=_r("projection"),MW=_r("proxy"),AW=_r("relay"),$j=_r("render"),TW=_r("scale"),T0=_r("sieve"),Bj=_r("sortitems"),kW=_r("viewlayout"),IW=_r("values");let wL=0;const zj={min:"min",max:"max",count:"sum"};function Vj(i,o){const a=o.getScale(i.name).params;let l;for(l in a.domain=RO(i.domain,i,o),null!=i.range&&(a.range=Hj(i,o,a)),null!=i.interpolate&&function BW(i,o){o.interpolate=fu(i.type||i),null!=i.gamma&&(o.interpolateGamma=fu(i.gamma))}(i.interpolate,a),null!=i.nice&&(a.nice=function $W(i){return(0,N.Kn)(i)?{interval:fu(i.interval),step:fu(i.step)}:fu(i)}(i.nice)),null!=i.bins&&(a.bins=function LW(i,o){return i.signal||(0,N.kJ)(i)?g1(i,o):o.objectProperty(i)}(i.bins,o)),i)(0,N.nr)(a,l)||"name"===l||(a[l]=fu(i[l],o))}function fu(i,o){return(0,N.Kn)(i)?i.signal?o.signalRef(i.signal):(0,N.vU)("Unsupported object: "+(0,N.m8)(i)):i}function g1(i,o){return i.signal?o.signalRef(i.signal):i.map(a=>fu(a,o))}function BD(i){(0,N.vU)("Can not find data set: "+(0,N.m8)(i))}function RO(i,o,a){if(i)return i.signal?a.signalRef(i.signal):((0,N.kJ)(i)?OW:i.fields?jj:AQ)(i,o,a);(null!=o.domainMin||null!=o.domainMax)&&(0,N.vU)("No scale domain defined for domainMin/domainMax to override.")}function OW(i,o,a){return i.map(l=>fu(l,a))}function AQ(i,o,a){const l=a.getData(i.data);return l||BD(i.data),gb(o.type)?l.valuesRef(a,i.field,Uj(i.sort,!1)):kT(o.type)?l.domainRef(a,i.field):l.extentRef(a,i.field)}function jj(i,o,a){const l=i.data,u=i.fields.reduce((f,m)=>(m=(0,N.HD)(m)?{data:l,field:m}:(0,N.kJ)(m)||m.signal?function RW(i,o){const a="_:vega:_"+wL++,l=Fh({});if((0,N.kJ)(i))l.value={$ingest:i};else if(i.signal){const u="setdata("+(0,N.m8)(a)+","+i.signal+")";l.params.input=o.signalRef(u)}return o.addDataPipeline(a,[l,T0({})]),{data:a,field:"data"}}(m,a):m,f.push(m),f),[]);return(gb(o.type)?NW:kT(o.type)?FW:PW)(i,a,u)}function NW(i,o,a){const l=Uj(i.sort,!0);let u,f;const m=a.map(v=>{const w=o.getData(v.data);return w||BD(v.data),w.countsRef(o,v.field,l)}),g={groupby:yL,pulse:m};l&&(u=l.op||"count",f=l.field?PD(u,l.field):"count",g.ops=[zj[u]],g.fields=[o.fieldRef(f)],g.as=[f]),u=o.add(gW(g));const b=o.add(Fh({pulse:pn(u)}));return f=o.add(IW({field:yL,sort:o.sortRef(l),pulse:pn(b)})),pn(f)}function Uj(i,o){return i&&(i.field||i.op?i.field||"count"===i.op?o&&i.field&&i.op&&!zj[i.op]&&(0,N.vU)("Multiple domain scales can not be sorted using "+i.op):(0,N.vU)("No field provided for sort aggregate op: "+i.op):(0,N.Kn)(i)?i.field="key":i={field:"key"}),i}function FW(i,o,a){const l=a.map(u=>{const f=o.getData(u.data);return f||BD(u.data),f.domainRef(o,u.field)});return pn(o.add(EW({values:l})))}function PW(i,o,a){const l=a.map(u=>{const f=o.getData(u.data);return f||BD(u.data),f.extentRef(o,u.field)});return pn(o.add(IO({extents:l})))}function Hj(i,o,a){const l=o.config.range;let u=i.range;if(u.signal)return o.signalRef(u.signal);if((0,N.HD)(u)){if(l&&(0,N.nr)(l,u))return Hj(i=(0,N.l7)({},i,{range:l[u]}),o,a);"width"===u?u=[0,{signal:"width"}]:"height"===u?u=gb(i.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,N.vU)("Unrecognized scale range value: "+(0,N.m8)(u))}else{if(u.scheme)return a.scheme=(0,N.kJ)(u.scheme)?g1(u.scheme,o):fu(u.scheme,o),u.extent&&(a.schemeExtent=g1(u.extent,o)),void(u.count&&(a.schemeCount=fu(u.count,o)));if(u.step)return void(a.rangeStep=fu(u.step,o));if(gb(i.type)&&!(0,N.kJ)(u))return RO(u,i,o);(0,N.kJ)(u)||(0,N.vU)("Unsupported range type: "+(0,N.m8)(u))}return u.map(f=>((0,N.kJ)(f)?g1:fu)(f,o))}function Wj(i,o,a){return(0,N.kJ)(i)?i.map(l=>Wj(l,o,a)):(0,N.Kn)(i)?i.signal?a.signalRef(i.signal):"fit"===o?i:(0,N.vU)("Unsupported parameter object: "+(0,N.m8)(i)):i}const vf="top",_1="left",y1="right",N_="bottom",VW="vertical",jW="start",HW="end",EL="index",CL="label",WW="offset",b1="perc",qW="perc2",sd="value",zD="guide-label",SL="guide-title",GW="group-title",XW="group-subtitle",Gj="symbol",NO="gradient",DL="discrete",Xj="size",VD=[Xj,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],$a={name:1,style:1,interactive:1},ji={value:0},ad={value:1},v1="group",Zj="rect",Rm="rule",Qj="symbol",I0="text";function FO(i){return i.type=v1,i.interactive=i.interactive||!1,i}function Mc(i,o){const a=(l,u)=>bf(i[l],bf(o[l],u));return a.isVertical=l=>VW===bf(i.direction,o.direction||(l?o.symbolDirection:o.gradientDirection)),a.gradientLength=()=>bf(i.gradientLength,o.gradientLength||o.gradientWidth),a.gradientThickness=()=>bf(i.gradientThickness,o.gradientThickness||o.gradientHeight),a.entryColumns=()=>bf(i.columns,bf(o.columns,+a.isVertical(!0))),a}function ML(i,o){const a=o&&(o.update&&o.update[i]||o.enter&&o.enter[i]);return a&&a.signal?a:a?a.value:null}function AL(i,o,a){return`item.anchor === '${jW}' ? ${i} : item.anchor === '${HW}' ? ${o} : ${a}`}const jD=AL((0,N.m8)(_1),(0,N.m8)(y1),(0,N.m8)("center"));function PO(i,o){return o?i?(0,N.Kn)(i)?Object.assign({},i,{offset:PO(i.offset,o)}):{value:i,offset:o}:o:i}function hu(i,o){return o?(i.name=o.name,i.style=o.style||i.style,i.interactive=!!o.interactive,i.encode=OD(i.encode,o,$a)):i.interactive=!1,i}function KW(i,o,a,l){const u=Mc(i,a),f=u.isVertical(),m=u.gradientThickness(),g=u.gradientLength();let b,v,w,C,D;f?(v=[0,1],w=[0,0],C=m,D=g):(v=[0,0],w=[1,0],C=g,D=m);const T={enter:b={opacity:ji,x:ji,y:ji,width:ya(C),height:ya(D)},update:(0,N.l7)({},b,{opacity:ad,fill:{gradient:o,start:v,stop:w}}),exit:{opacity:ji}};return dl(T,{stroke:u("gradientStrokeColor"),strokeWidth:u("gradientStrokeWidth")},{opacity:u("gradientOpacity")}),hu({type:Zj,role:bQ,encode:T},l)}function e4(i,o,a,l,u){const f=Mc(i,a),m=f.isVertical(),g=f.gradientThickness(),b=f.gradientLength();let v,w,C,D,T="";m?(v="y",C="y2",w="x",D="width",T="1-"):(v="x",C="x2",w="y",D="height");const I={opacity:ji,fill:{scale:o,field:sd}};I[v]={signal:T+"datum."+b1,mult:b},I[w]=ji,I[C]={signal:T+"datum."+qW,mult:b},I[D]=ya(g);const k={enter:I,update:(0,N.l7)({},I,{opacity:ad}),exit:{opacity:ji}};return dl(k,{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),hu({type:Zj,role:sW,key:sd,from:u,encode:k},l)}const ZW=`datum.${b1}<=0?"${_1}":datum.${b1}>=1?"${y1}":"center"`,kL=`datum.${b1}<=0?"${N_}":datum.${b1}>=1?"${vf}":"middle"`;function UD(i,o,a,l){const u=Mc(i,o),f=u.isVertical(),m=ya(u.gradientThickness()),g=u.gradientLength();let v,w,C,D,b=u("labelOverlap"),T="";const I={enter:v={opacity:ji},update:w={opacity:ad,text:{field:CL}},exit:{opacity:ji}};return dl(I,{fill:u("labelColor"),fillOpacity:u("labelOpacity"),font:u("labelFont"),fontSize:u("labelFontSize"),fontStyle:u("labelFontStyle"),fontWeight:u("labelFontWeight"),limit:bf(i.labelLimit,o.gradientLabelLimit)}),f?(v.align={value:"left"},v.baseline=w.baseline={signal:kL},C="y",D="x",T="1-"):(v.align=w.align={signal:ZW},v.baseline={value:"top"},C="x",D="y"),v[C]=w[C]={signal:T+"datum."+b1,mult:g},v[D]=w[D]=m,m.offset=bf(i.labelOffset,o.gradientLabelOffset)||0,b=b?{separation:u("labelSeparation"),method:b,order:"datum."+EL}:void 0,hu({type:I0,role:Sj,style:zD,key:sd,from:l,encode:I,overlap:b},a)}function LO(i,o,a,l,u){const f=Mc(i,o),m=a.entries,g=!(!m||!m.interactive),b=m?m.name:void 0,v=f("clipHeight"),w=f("symbolOffset"),C={data:"value"},D=`(${u}) ? datum.${WW} : datum.${Xj}`,T=v?ya(v):{field:Xj},I=`datum.${EL}`,k=`max(1, ${u})`;let F,L,z,V,U;T.mult=.5,F={enter:L={opacity:ji,x:{signal:D,mult:.5,offset:w},y:T},update:z={opacity:ad,x:L.x,y:L.y},exit:{opacity:ji}};let W=null,Y=null;i.fill||(W=o.symbolBaseFillColor,Y=o.symbolBaseStrokeColor),dl(F,{fill:f("symbolFillColor",W),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor",Y),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),VD.forEach(ce=>{i[ce]&&(z[ce]=L[ce]={scale:i[ce],field:sd})});const H=hu({type:Qj,role:aW,key:sd,from:C,clip:!!v||void 0,encode:F},a.symbols),Z=ya(w);Z.offset=f("labelOffset"),F={enter:L={opacity:ji,x:{signal:D,offset:Z},y:T},update:z={opacity:ad,text:{field:CL},x:L.x,y:L.y},exit:{opacity:ji}},dl(F,{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")});const te=hu({type:I0,role:Sj,style:zD,key:sd,from:C,encode:F},a.labels);return F={enter:{noBound:{value:!v},width:ji,height:v?ya(v):ji,opacity:ji},exit:{opacity:ji},update:z={opacity:ad,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(V=`ceil(item.mark.items.length / ${k})`,z.row.signal=`${I}%${V}`,z.column.signal=`floor(${I} / ${V})`,U={field:["row",I]}):(z.row.signal=`floor(${I} / ${k})`,z.column.signal=`${I} % ${k}`,U={field:I}),z.column.signal=`(${u})?${z.column.signal}:${I}`,FO({role:Ej,from:l={facet:{data:l,name:"value",groupby:EL}},encode:OD(F,m,$a),marks:[H,te],name:b,interactive:g,sort:U})}const BO='item.orient === "left"',HD='item.orient === "right"',ld=`(${BO} || ${HD})`,IL=`datum.vgrad && ${ld}`,zO=AL('"top"','"bottom"','"middle"'),JW=`datum.vgrad && ${HD} ? (${AL('"right"','"left"','"center"')}) : (${ld} && !(datum.vgrad && ${BO})) ? "left" : ${jD}`,t4=`item._anchor || (${ld} ? "middle" : "start")`,Ph=`${IL} ? (${BO} ? -90 : 90) : 0`,O0=`${ld} ? (datum.vgrad ? (${HD} ? "bottom" : "top") : ${zO}) : "top"`;function eq(i,o){let a;return(0,N.Kn)(i)&&(i.signal?a=i.signal:i.path?a="pathShape("+VO(i.path)+")":i.sphere&&(a="geoShape("+VO(i.sphere)+', {type: "Sphere"})')),a?o.signalRef(a):!!i}function VO(i){return(0,N.Kn)(i)&&i.signal?i.signal:(0,N.m8)(i)}function OL(i){const o=i.role||"";return o.indexOf("axis")&&o.indexOf("legend")&&o.indexOf("title")?i.type===v1?Ej:o||xj:o}function qD(i){return{marktype:i.type,name:i.name||void 0,role:i.role||OL(i),zindex:+i.zindex||void 0,aria:i.aria,description:i.description}}function tq(i,o){return i&&i.signal?o.signalRef(i.signal):!1!==i}function GD(i,o){const a=np(i.type);a||(0,N.vU)("Unrecognized transform type: "+(0,N.m8)(i.type));const l=FD(a.type.toLowerCase(),null,nq(a,i,o));return i.signal&&o.addSignal(i.signal,o.proxy(l)),l.metadata=a.metadata||{},l}function nq(i,o,a){const l={},u=i.params.length;for(let f=0;fi4(i,u,a))):i4(i,l,a)}(i,o,a):"projection"===l?a.projectionRef(o[i.name]):i.array&&!os(u)?u.map(f=>n4(i,f,a)):n4(i,u,a):void(i.required&&(0,N.vU)("Missing required "+(0,N.m8)(o.type)+" parameter: "+(0,N.m8)(i.name)))}function n4(i,o,a){const l=i.type;if(os(o))return rq(l)?(0,N.vU)("Expression references can not be signals."):o4(l)?a.fieldRef(o):oq(l)?a.compareRef(o):a.signalRef(o.signal);{const u=i.expr||o4(l);return u&&r4(o)?a.exprRef(o.expr,o.as):u&&IQ(o)?AO(o.field,o.as):rq(l)?km(o,a):OQ(l)?pn(a.getData(o).values):o4(l)?AO(o):oq(l)?a.compareRef(o):o}}function i4(i,o,a){const l=i.params.length;let u;for(let m=0;mi&&i.expr,IQ=i=>i&&i.field,OQ=i=>"data"===i,rq=i=>"expr"===i,o4=i=>"field"===i,oq=i=>"compare"===i;function R0(i,o){return i.$ref?i:i.data&&i.data.$ref?i.data:pn(o.getData(i.data).output)}function N0(i,o,a,l,u){this.scope=i,this.input=o,this.output=a,this.values=l,this.aggregate=u,this.index={}}function s4(i){return(0,N.HD)(i)?i:null}function a4(i,o,a){const l=PD(a.op,a.field);let u;if(o.ops){for(let f=0,m=o.as.length;fC??"null").join(",")+"),0)",o);b.update=w.$expr,b.params=w.$params}function UO(i,o){const a=OL(i),l=i.type===v1,u=i.from&&i.from.facet,f=i.overlap;let g,b,v,w,C,D,T,m=i.layout||a===Ej||a===wj;const I=a===xj||m||u,k=function RQ(i,o,a){let l,u,f,m,g;return i?(l=i.facet)&&(o||(0,N.vU)("Only group marks can be faceted."),null!=l.field?m=g=R0(l,a):(i.data?g=pn(a.getData(i.data).aggregate):(f=GD((0,N.l7)({type:"aggregate",groupby:(0,N.IX)(l.groupby)},l.aggregate),a),f.params.key=a.keyRef(l.groupby),f.params.pulse=R0(l,a),m=g=pn(a.add(f))),u=a.keyRef(l.groupby,!0))):m=pn(a.add(Fh(null,[{}]))),m||(m=R0(i,a)),{key:u,pulse:m,parent:g}}(i.from,l,o);b=o.add(DQ({key:k.key||(i.key?AO(i.key):void 0),pulse:k.pulse,clean:!l}));const F=pn(b);b=v=o.add(Fh({pulse:F})),b=o.add(xL({markdef:qD(i),interactive:tq(i.interactive,o),clip:eq(i.clip,o),context:{$context:!0},groups:o.lookup(),parent:o.signals.parent?o.signalRef("parent"):null,index:o.markpath(),pulse:pn(b)}));const L=pn(b);b=w=o.add(bW(pL(i.encode,i.type,a,i.style,o,{mod:!1,pulse:L}))),b.params.parent=o.encode(),i.transform&&i.transform.forEach(Y=>{const H=GD(Y,o),Z=H.metadata;(Z.generates||Z.changes)&&(0,N.vU)("Mark transforms should not generate new data."),Z.nomod||(w.params.mod=!0),H.params.pulse=pn(b),o.add(b=H)}),i.sort&&(b=o.add(Bj({sort:o.compareRef(i.sort),pulse:pn(b)})));const z=pn(b);(u||m)&&(m=o.add(kW({layout:o.objectProperty(i.layout),legends:o.legends,mark:L,pulse:z})),D=pn(m));const V=o.add(_W({mark:L,pulse:D||z}));T=pn(V),l&&(I&&(g=o.operators,g.pop(),m&&g.pop()),o.pushState(z,D||T,F),u?function jO(i,o,a){const l=i.from.facet,u=l.name,f=R0(l,o);let m;l.name||(0,N.vU)("Facet must have a name: "+(0,N.m8)(l)),l.data||(0,N.vU)("Facet must reference a data set: "+(0,N.m8)(l)),l.field?m=o.add(Lj({field:o.fieldRef(l.field),pulse:f})):l.groupby?m=o.add(xW({key:o.keyRef(l.groupby),group:pn(o.proxy(a.parent)),pulse:f})):(0,N.vU)("Facet must specify groupby or field: "+(0,N.m8)(l));const g=o.fork(),b=g.add(Fh()),v=g.add(T0({pulse:pn(b)}));g.addData(u,new N0(g,b,b,v)),g.addSignal("parent",null),m.params.subflow={$subflow:g.parse(i).toRuntime()}}(i,o,k):I?function l4(i,o,a){const l=o.add(Lj({pulse:a.pulse})),u=o.fork();u.add(T0()),u.addSignal("parent",null),l.params.subflow={$subflow:u.parse(i).toRuntime()}}(i,o,k):o.parse(i),o.popState(),I&&(m&&g.push(m),g.push(V))),f&&(T=function FL(i,o,a){const l=i.method,u=i.bound,f=i.separation,m={separation:os(f)?a.signalRef(f.signal):f,method:os(l)?a.signalRef(l.signal):l,pulse:o};if(i.order&&(m.sort=a.compareRef({field:i.order})),u){const g=u.tolerance;m.boundTolerance=os(g)?a.signalRef(g.signal):+g,m.boundScale=a.scaleRef(u.scale),m.boundOrient=u.orient}return pn(a.add(CW(m)))}(f,T,o));const U=o.add($j({pulse:T})),W=o.add(T0({pulse:pn(U)},void 0,o.parent()));null!=i.name&&(C=i.name,o.addData(C,new N0(o,v,U,W)),i.on&&i.on.forEach(Y=>{(Y.insert||Y.remove||Y.toggle)&&(0,N.vU)("Marks only support modify triggers."),NL(Y,o,C)}))}function lq(i,o,a){const l={enter:{},update:{}};return dl(l,{orient:i("orient"),offset:i("offset"),padding:i("padding"),titlePadding:i("titlePadding"),cornerRadius:i("cornerRadius"),fill:i("fillColor"),stroke:i("strokeColor"),strokeWidth:a.strokeWidth,strokeDash:a.strokeDash,x:i("legendX"),y:i("legendY"),format:o.format,formatType:o.formatType}),l}function u4(i,o,a){return o[i]?`scale("${o[i]}",datum)`:ML(i,a[0].encode)}N0.fromEntries=function(i,o){const a=o.length,l=o[a-1],u=o[a-2];let f=o[0],m=null,g=1;for(f&&"load"===f.type&&(f=o[1]),i.add(o[0]);gi===N_||i===vf,L0=(i,o,a)=>os(i)?$L(i.signal,o,a):i===_1||i===vf?o:a,ws=(i,o,a)=>os(i)?mq(i.signal,o,a):d4(i)?o:a,Ac=(i,o,a)=>os(i)?p4(i.signal,o,a):d4(i)?a:o,f4=(i,o,a)=>os(i)?m4(i.signal,o,a):i===vf?{value:o}:{value:a},h4=(i,o,a)=>os(i)?NQ(i.signal,o,a):i===y1?{value:o}:{value:a},mq=(i,o,a)=>g4(`${i} === '${vf}' || ${i} === '${N_}'`,o,a),p4=(i,o,a)=>g4(`${i} !== '${vf}' && ${i} !== '${N_}'`,o,a),$L=(i,o,a)=>zL(`${i} === '${_1}' || ${i} === '${vf}'`,o,a),m4=(i,o,a)=>zL(`${i} === '${vf}'`,o,a),NQ=(i,o,a)=>zL(`${i} === '${y1}'`,o,a),g4=(i,o,a)=>(o=null!=o?ya(o):o,a=null!=a?ya(a):a,BL(o)&&BL(a)?{signal:`${i} ? (${o=o?o.signal||(0,N.m8)(o.value):null}) : (${a=a?a.signal||(0,N.m8)(a.value):null})`}:[(0,N.l7)({test:i},o)].concat(a||[])),BL=i=>null==i||1===Object.keys(i).length,zL=(i,o,a)=>({signal:`${i} ? (${x1(o)}) : (${x1(a)})`}),gq=(i,o,a,l,u)=>({signal:(null!=l?`${i} === '${_1}' ? (${x1(l)}) : `:"")+(null!=a?`${i} === '${N_}' ? (${x1(a)}) : `:"")+(null!=u?`${i} === '${y1}' ? (${x1(u)}) : `:"")+(null!=o?`${i} === '${vf}' ? (${x1(o)}) : `:"")+"(null)"}),x1=i=>os(i)?i.signal:null==i?null:(0,N.m8)(i),_q=(i,o)=>0===o?0:os(i)?{signal:`(${i.signal}) * ${o}`}:{value:i*o},$0=(i,o)=>{const a=i.signal;return a&&a.endsWith("(null)")?{signal:a.slice(0,-6)+o.signal}:i};function w1(i,o,a,l){let u;if(o&&(0,N.nr)(o,i))return o[i];if((0,N.nr)(a,i))return a[i];if(i.startsWith("title")){switch(i){case"titleColor":u="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":u=i[5].toLowerCase()+i.slice(6)}return l[SL][u]}if(i.startsWith("label")){switch(i){case"labelColor":u="fill";break;case"labelFont":case"labelFontSize":u=i[5].toLowerCase()+i.slice(6)}return l[zD][u]}return null}function _4(i){const o={};for(const a of i)if(a)for(const l in a)o[l]=1;return Object.keys(o)}function qO(i,o){return{scale:i.scale,range:o}}function VL(i,o,a,l,u){return{signal:'flush(range("'+i+'"), scale("'+i+'", datum.value), '+o+","+a+","+l+","+u+")"}}function jL(i,o){const a=function y4(i,o){var g,b,v,a=o.config,l=a.style,u=a.axis,f="band"===o.scaleType(i.scale)&&a.axisBand,m=i.orient;if(os(m)){const C=_4([a.axisX,a.axisY]),D=_4([a.axisTop,a.axisBottom,a.axisLeft,a.axisRight]);for(v of(g={},C))g[v]=ws(m,w1(v,a.axisX,u,l),w1(v,a.axisY,u,l));for(v of(b={},D))b[v]=gq(m.signal,w1(v,a.axisTop,u,l),w1(v,a.axisBottom,u,l),w1(v,a.axisLeft,u,l),w1(v,a.axisRight,u,l))}else g=m===vf||m===N_?a.axisX:a.axisY,b=a["axis"+m[0].toUpperCase()+m.slice(1)];return g||b||f?(0,N.l7)({},u,g,b,f):u}(i,o),l=i.encode||{},u=l.axis||{},f=u.name||void 0,m=u.interactive,g=u.style,b=Mc(i,a),v=function TL(i){const o=i("tickBand");let l,u,a=i("tickOffset");return o?o.signal?(l={signal:`(${o.signal}) === 'extent' ? 1 : 0.5`},u={signal:`(${o.signal}) === 'extent'`},(0,N.Kn)(a)||(a={signal:`(${o.signal}) === 'extent' ? 0 : ${a}`})):"extent"===o?(l=1,u=!0,a=0):(l=.5,u=!1):(l=i("bandPosition"),u=i("tickExtra")),{extra:u,band:l,offset:a}}(b),w={scale:i.scale,ticks:!!b("ticks"),labels:!!b("labels"),grid:!!b("grid"),domain:!!b("domain"),title:null!=i.title},C=pn(o.add(Fh({},[w]))),D=pn(o.add(vL({scale:o.scaleRef(i.scale),extra:o.property(v.extra),count:o.objectProperty(i.tickCount),values:o.objectProperty(i.values),minstep:o.property(i.tickMinStep),formatType:o.property(i.formatType),formatSpecifier:o.property(i.format)}))),T=[];let I;return w.grid&&T.push(function bq(i,o,a,l,u){const f=Mc(i,o),m=i.orient,g=i.gridScale,b=L0(m,1,-1),v=function vq(i,o){if(1!==o)if((0,N.Kn)(i)){let a=i=(0,N.l7)({},i);for(;null!=a.mult;){if(!(0,N.Kn)(a.mult))return a.mult=os(o)?{signal:`(${a.mult}) * (${o.signal})`}:a.mult*o,i;a=a.mult=(0,N.l7)({},a.mult)}a.mult=o}else i=os(o)?{signal:`(${o.signal}) * (${i||0})`}:o*(i||0);return i}(i.offset,b);let w,C,D;const T={enter:w={opacity:ji},update:D={opacity:ad},exit:C={opacity:ji}};dl(T,{stroke:f("gridColor"),strokeCap:f("gridCap"),strokeDash:f("gridDash"),strokeDashOffset:f("gridDashOffset"),strokeOpacity:f("gridOpacity"),strokeWidth:f("gridWidth")});const I={scale:i.scale,field:sd,band:u.band,extra:u.extra,offset:u.offset,round:f("tickRound")},k=ws(m,{signal:"height"},{signal:"width"}),F=g?{scale:g,range:0,mult:b,offset:v}:{value:0,offset:v},L=g?{scale:g,range:1,mult:b,offset:v}:(0,N.l7)(k,{mult:b,offset:v});return w.x=D.x=ws(m,I,F),w.y=D.y=Ac(m,I,F),w.x2=D.x2=Ac(m,L),w.y2=D.y2=ws(m,L),C.x=ws(m,I),C.y=Ac(m,I),hu({type:Rm,role:mQ,key:sd,from:l,encode:T},a)}(i,a,l.grid,D,v)),w.ticks&&(I=b("tickSize"),T.push(function xq(i,o,a,l,u,f){const m=Mc(i,o),g=i.orient,b=L0(g,-1,1);let v,w,C;const D={enter:v={opacity:ji},update:C={opacity:ad},exit:w={opacity:ji}};dl(D,{stroke:m("tickColor"),strokeCap:m("tickCap"),strokeDash:m("tickDash"),strokeDashOffset:m("tickDashOffset"),strokeOpacity:m("tickOpacity"),strokeWidth:m("tickWidth")});const T=ya(u);T.mult=b;const I={scale:i.scale,field:sd,band:f.band,extra:f.extra,offset:f.offset,round:m("tickRound")};return C.y=v.y=ws(g,ji,I),C.y2=v.y2=ws(g,T),w.x=ws(g,I),C.x=v.x=Ac(g,ji,I),C.x2=v.x2=Ac(g,T),w.y=Ac(g,I),hu({type:Rm,role:_Q,key:sd,from:l,encode:D},a)}(i,a,l.ticks,D,I,v))),w.labels&&(I=w.ticks?I:0,T.push(function b4(i,o,a,l,u,f){const m=Mc(i,o),g=i.orient,b=i.scale,v=L0(g,-1,1),w=m1(m("labelFlush")),C=m1(m("labelFlushOffset")),D=m("labelAlign"),T=m("labelBaseline");let k,I=0===w||!!w;const F=ya(u);F.mult=v,F.offset=ya(m("labelPadding")||0),F.offset.mult=v;const L={scale:b,field:sd,band:.5,offset:PO(f.offset,m("labelOffset"))},z=ws(g,I?VL(b,w,'"left"','"right"','"center"'):{value:"center"},h4(g,"left","right")),V=ws(g,f4(g,"bottom","top"),I?VL(b,w,'"top"','"bottom"','"middle"'):{value:"middle"}),U=VL(b,w,`-(${C})`,C,0);I=I&&C;const W={opacity:ji,x:ws(g,L,F),y:Ac(g,L,F)},Y={enter:W,update:k={opacity:ad,text:{field:CL},x:W.x,y:W.y,align:z,baseline:V},exit:{opacity:ji,x:W.x,y:W.y}};dl(Y,{dx:!D&&I?ws(g,U):null,dy:!T&&I?Ac(g,U):null}),dl(Y,{angle:m("labelAngle"),fill:m("labelColor"),fillOpacity:m("labelOpacity"),font:m("labelFont"),fontSize:m("labelFontSize"),fontWeight:m("labelFontWeight"),fontStyle:m("labelFontStyle"),limit:m("labelLimit"),lineHeight:m("labelLineHeight")},{align:D,baseline:T});const H=m("labelBound");let Z=m("labelOverlap");return Z=Z||H?{separation:m("labelSeparation"),method:Z,order:"datum.index",bound:H?{scale:b,orient:g,tolerance:H}:null}:void 0,k.align!==z&&(k.align=$0(k.align,z)),k.baseline!==V&&(k.baseline=$0(k.baseline,V)),hu({type:I0,role:gQ,style:zD,key:sd,from:l,encode:Y,overlap:Z},a)}(i,a,l.labels,D,I,v))),w.domain&&T.push(function yq(i,o,a,l){const u=Mc(i,o),f=i.orient;let m,g;const b={enter:m={opacity:ji},update:g={opacity:ad},exit:{opacity:ji}};dl(b,{stroke:u("domainColor"),strokeCap:u("domainCap"),strokeDash:u("domainDash"),strokeDashOffset:u("domainDashOffset"),strokeWidth:u("domainWidth"),strokeOpacity:u("domainOpacity")});const v=qO(i,0),w=qO(i,1);return m.x=g.x=ws(f,v,ji),m.x2=g.x2=ws(f,w),m.y=g.y=Ac(f,v,ji),m.y2=g.y2=Ac(f,w),hu({type:Rm,role:Cj,from:l,encode:b},a)}(i,a,l.domain,C)),w.title&&T.push(function wq(i,o,a,l){const u=Mc(i,o),f=i.orient,m=L0(f,-1,1);let g,b;const v={enter:g={opacity:ji,anchor:ya(u("titleAnchor",null)),align:{signal:jD}},update:b=(0,N.l7)({},g,{opacity:ad,text:ya(i.title)}),exit:{opacity:ji}},w={signal:`lerp(range("${i.scale}"), ${AL(0,1,.5)})`};return b.x=ws(f,w),b.y=Ac(f,w),g.angle=ws(f,ji,_q(m,90)),g.baseline=ws(f,f4(f,N_,vf),{value:N_}),b.angle=g.angle,b.baseline=g.baseline,dl(v,{fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit"),lineHeight:u("titleLineHeight")},{align:u("titleAlign"),angle:u("titleAngle"),baseline:u("titleBaseline")}),function xf(i,o,a,l){const u=(g,b)=>null!=g?(a.update[b]=$0(ya(g),a.update[b]),!1):!RD(b,l),f=u(i("titleX"),"x"),m=u(i("titleY"),"y");a.enter.auto=m===f?ya(m):ws(o,ya(m),ya(f))}(u,f,v,a),v.update.align=$0(v.update.align,g.align),v.update.angle=$0(v.update.angle,g.angle),v.update.baseline=$0(v.update.baseline,g.baseline),hu({type:I0,role:rW,style:SL,from:l,encode:v},a)}(i,a,l.title,C)),UO(FO({role:pQ,from:C,encode:OD(XD(b,i),u,$a),marks:T,aria:b("aria"),description:b("description"),zindex:b("zindex"),name:f,interactive:m,style:g}),o)}function XD(i,o){const a={enter:{},update:{}};return dl(a,{orient:i("orient"),offset:i("offset")||0,position:bf(o.position,0),titlePadding:i("titlePadding"),minExtent:i("minExtent"),maxExtent:i("maxExtent"),range:{signal:`abs(span(range("${o.scale}")))`},translate:i("translate"),format:o.format,formatType:o.formatType}),a}function GO(i,o,a){const l=(0,N.IX)(i.signals),u=(0,N.IX)(i.scales);return a||l.forEach(f=>Oj(f,o)),(0,N.IX)(i.projections).forEach(f=>function zW(i,o){const a=o.config.projection||{},l={};for(const u in i)"name"!==u&&(l[u]=Wj(i[u],u,o));for(const u in a)null==l[u]&&(l[u]=Wj(a[u],u,o));o.addProjection(i.name,l)}(f,o)),u.forEach(f=>function OO(i,o){const a=i.type||"linear";ah(a)||(0,N.vU)("Unrecognized scale type: "+(0,N.m8)(a)),o.addScale(i.name,{type:a,domain:void 0})}(f,o)),(0,N.IX)(i.data).forEach(f=>function hq(i,o){const a=[];i.transform&&i.transform.forEach(l=>{a.push(GD(l,o))}),i.on&&i.on.forEach(l=>{NL(l,o,i.name)}),o.addDataPipeline(i.name,function pq(i,o,a){const l=[];let g,b,v,w,C,u=null,f=!1,m=!1;for(i.values?os(i.values)||M0(i.format)?(l.push(WO(o,i)),l.push(u=P0())):l.push(u=P0({$ingest:i.values,$format:i.format})):i.url?M0(i.url)||M0(i.format)?(l.push(WO(o,i)),l.push(u=P0())):l.push(u=P0({$request:i.url,$format:i.format})):i.source&&(u=g=(0,N.IX)(i.source).map(D=>pn(o.getData(D).output)),l.push(null)),b=0,v=a.length;bVj(f,o)),(a||l).forEach(f=>function SQ(i,o){const a=o.getSignal(i.name);let l=i.update;i.init&&(l?(0,N.vU)("Signals can not include both init and update expressions."):(l=i.init,a.initonly=!0)),l&&(l=km(l,o),a.update=l.$expr,a.params=l.$params),i.on&&i.on.forEach(u=>function Rh(i,o,a){const l=i.encode,u={target:a};let f=i.events,m=i.update,g=[];f||(0,N.vU)("Signal update missing events specification."),(0,N.HD)(f)&&(f=yj(f,o.isSubscope()?TO:LD)),f=(0,N.IX)(f).filter(b=>b.signal||b.scale?(g.push(b),0):1),g.length>1&&(g=[Nh(g)]),f.length&&g.push(f.length>1?{merge:f}:f[0]),null!=l&&(m&&(0,N.vU)("Signal encode and update are mutually exclusive."),m="encode(item(),"+(0,N.m8)(l)+")"),u.update=(0,N.HD)(m)?km(m,o):null!=m.expr?km(m.expr,o):null!=m.value?m.value:null!=m.signal?{$expr:La,$params:{$value:o.signalRef(m.signal)}}:(0,N.vU)("Invalid signal update specification."),i.force&&(u.options={force:!0}),g.forEach(b=>o.addUpdate((0,N.l7)(function CQ(i,o){return{source:i.signal?o.signalRef(i.signal):i.scale?o.scaleRef(i.scale):R_(i,o)}}(b,o),u)))}(u,o,a.id))}(f,o)),(0,N.IX)(i.axes).forEach(f=>jL(f,o)),(0,N.IX)(i.marks).forEach(f=>UO(f,o)),(0,N.IX)(i.legends).forEach(f=>function c4(i,o){const a=o.config.legend,l=i.encode||{},u=Mc(i,a),f=l.legend||{},m=f.name||void 0,g=f.interactive,b=f.style,v={};let C,D,T,w=0;VD.forEach(V=>i[V]?(v[V]=i[V],w=w||i[V]):0),w||(0,N.vU)("Missing valid scale for legend.");const I=function sq(i,o){let a=i.type||Gj;return!i.type&&1===function aq(i){return VD.reduce((o,a)=>o+(i[a]?1:0),0)}(i)&&(i.fill||i.stroke)&&(a=AC(o)?NO:TC(o)?DL:Gj),a!==NO?a:TC(o)?DL:NO}(i,o.scaleType(w)),k={title:null!=i.title,scales:v,type:I,vgrad:"symbol"!==I&&u.isVertical()},F=pn(o.add(Fh(null,[k]))),z=pn(o.add($D(D={type:I,scale:o.scaleRef(w),count:o.objectProperty(u("tickCount")),limit:o.property(u("symbolLimit")),values:o.objectProperty(i.values),minstep:o.property(i.tickMinStep),formatType:o.property(i.formatType),formatSpecifier:o.property(i.format)})));return I===NO?(T=[KW(i,w,a,l.gradient),UD(i,a,l.labels,z)],D.count=D.count||o.signalRef(`max(2,2*floor((${m1(u.gradientLength())})/100))`)):I===DL?T=[e4(i,w,a,l.gradient,z),UD(i,a,l.labels,z)]:(C=function $O(i,o){const a=Mc(i,o);return{align:a("gridAlign"),columns:a.entryColumns(),center:{row:!0,column:!1},padding:{row:a("rowPadding"),column:a("columnPadding")}}}(i,a),T=[LO(i,a,l,z,m1(C.columns))],D.size=function cq(i,o,a){const l=m1(u4("size",i,a)),u=m1(u4("strokeWidth",i,a)),f=m1(function uq(i,o,a){return ML("fontSize",i)||function Jj(i,o,a){const l=o.config.style[a];return l&&l[i]}("fontSize",o,a)}(a[1].encode,o,zD));return km(`max(ceil(sqrt(${l})+${u}),${f})`,o)}(i,o,T[0].marks)),T=[FO({role:yQ,from:F,encode:{enter:{x:{value:0},y:{value:0}}},marks:T,layout:C,interactive:g})],k.title&&T.push(function WD(i,o,a,l){const u=Mc(i,o),f={enter:{opacity:ji},update:{opacity:ad,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:ji}};return dl(f,{orient:u("titleOrient"),_anchor:u("titleAnchor"),anchor:{signal:t4},angle:{signal:Ph},align:{signal:JW},baseline:{signal:O0},text:i.title,fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit"),lineHeight:u("titleLineHeight")},{align:u("titleAlign"),baseline:u("titleBaseline")}),hu({type:I0,role:vQ,style:SL,from:l,encode:f},a)}(i,a,l.title,F)),UO(FO({role:oW,from:F,encode:OD(lq(u,i,a),f,$a),marks:T,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:m,interactive:g,style:b}),o)}(f,o)),i.title&&function PL(i,o){const a=Mc(i=(0,N.HD)(i)?{text:i}:i,o.config.title),l=i.encode||{},u=l.group||{},f=u.name||void 0,m=u.interactive,g=u.style,b=[],w=pn(o.add(Fh(null,[{}])));return b.push(function dq(i,o,a,l){const u={value:0},m={enter:{opacity:u},update:{opacity:{value:1}},exit:{opacity:u}};return dl(m,{text:i.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:o("dx"),dy:o("dy"),fill:o("color"),font:o("font"),fontSize:o("fontSize"),fontStyle:o("fontStyle"),fontWeight:o("fontWeight"),lineHeight:o("lineHeight")},{align:o("align"),angle:o("angle"),baseline:o("baseline")}),hu({type:I0,role:wQ,style:GW,from:l,encode:m},a)}(i,a,function LL(i){const o=i.encode;return o&&o.title||(0,N.l7)({name:i.name,interactive:i.interactive,style:i.style},o)}(i),w)),i.subtitle&&b.push(function fq(i,o,a,l){const u={value:0},m={enter:{opacity:u},update:{opacity:{value:1}},exit:{opacity:u}};return dl(m,{text:i.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:o("dx"),dy:o("dy"),fill:o("subtitleColor"),font:o("subtitleFont"),fontSize:o("subtitleFontSize"),fontStyle:o("subtitleFontStyle"),fontWeight:o("subtitleFontWeight"),lineHeight:o("subtitleLineHeight")},{align:o("align"),angle:o("angle"),baseline:o("baseline")}),hu({type:I0,role:EQ,style:XW,from:l,encode:m},a)}(i,a,l.subtitle,w)),UO(FO({role:xQ,from:w,encode:HO(a,u),marks:b,aria:a("aria"),description:a("description"),zindex:a("zindex"),name:f,interactive:m,style:g}),o)}(i.title,o),o.parseLambdas(),o}const Eq=i=>OD({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},i);function B0(i,o){return o&&o.signal?{name:i,update:o.signal}:{name:i,value:o}}function v4(i,o){this.config=i||{},this.options=o||{},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 YD(i){this.config=i.config,this.options=i.options,this.legends=i.legends,this.field=Object.create(i.field),this.signals=Object.create(i.signals),this.lambdas=Object.create(i.lambdas),this.scales=Object.create(i.scales),this.events=Object.create(i.events),this.data=Object.create(i.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++i._nextsub[0],this._nextsub=i._nextsub,this._parent=i._parent.slice(),this._encode=i._encode.slice(),this._lookup=i._lookup.slice(),this._markpath=i._markpath}function UL(i){return((0,N.kJ)(i)?x4:w4)(i)}function x4(i){const o=i.length;let a="[";for(let l=0;l0?",":"")+((0,N.Kn)(u)?u.signal||UL(u):(0,N.m8)(u))}return a+"]"}function w4(i){let l,u,o="{",a=0;for(l in i)u=i[l],o+=(++a>1?",":"")+(0,N.m8)(l)+":"+((0,N.Kn)(u)?u.signal||UL(u):(0,N.m8)(u));return o+"}"}function cd(i,o,a){return(0,N.Kn)(i)||(0,N.vU)("Input Vega specification must be an object."),function Cq(i,o){const a=o.config,l=pn(o.root=o.add(_L())),u=function Sq(i,o){const a=m=>bf(i[m],o[m]),l=[B0("background",a("background")),B0("autosize",vj(a("autosize"))),B0("padding",iW(a("padding"))),B0("width",a("width")||0),B0("height",a("height")||0)],u=l.reduce((m,g)=>(m[g.name]=g,m),{}),f={};return(0,N.IX)(i.signals).forEach(m=>{(0,N.nr)(u,m.name)?m=(0,N.l7)(u[m.name],m):l.push(m),f[m.name]=m}),(0,N.IX)(o.signals).forEach(m=>{!(0,N.nr)(f,m.name)&&!(0,N.nr)(u,m.name)&&l.push(m)}),l}(i,a);u.forEach(v=>Oj(v,o)),o.description=i.description||a.description,o.eventConfig=a.events,o.legends=o.objectProperty(a.legend&&a.legend.layout),o.locale=a.locale;const f=o.add(Fh()),m=o.add(bW(pL(Eq(i.encode),v1,wj,i.style,o,{pulse:pn(f)}))),g=o.add(kW({layout:o.objectProperty(i.layout),legends:o.legends,autosize:o.signalRef("autosize"),mark:l,pulse:pn(m)}));o.operators.pop(),o.pushState(pn(m),pn(g),null),GO(i,o,u),o.operators.push(g);let b=o.add(_W({mark:l,pulse:pn(g)}));return b=o.add($j({pulse:pn(b)})),b=o.add(T0({pulse:pn(b)})),o.addData("root",new N0(o,f,f,b)),o}(i,new v4(o=(0,N.fE)(function E4(){const i="sans-serif",l="#4c78a8",u="#000",f="#888",m="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:l},area:{fill:l},image:null,line:{stroke:l,strokeWidth:2},path:{stroke:l},rect:{fill:l},rule:{stroke:u},shape:{stroke:l},symbol:{fill:l,size:64},text:{fill:u,font:i,fontSize:11},trail:{fill:l,size:2},style:{"guide-label":{fill:u,font:i,fontSize:10},"guide-title":{fill:u,font:i,fontSize:11,fontWeight:"bold"},"group-title":{fill:u,font:i,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:u,font:i,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:m},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:f,grid:!1,gridWidth:1,gridColor:m,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:f,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:m,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:f,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"]}}}(),o,i.config),a)).toRuntime()}v4.prototype=YD.prototype={parse(i){return GO(i,this)},fork(){return new YD(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(i){return this.operators.push(i),i.id=this.id(),i.refs&&(i.refs.forEach(o=>{o.$ref=i.id}),i.refs=null),i},proxy(i){const o=i instanceof gL?pn(i):i;return this.add(MW({value:o}))},addStream(i){return this.streams.push(i),i.id=this.id(),i},addUpdate(i){return this.updates.push(i),i},finish(){let i,o;for(i in this.root&&(this.root.root=!0),this.signals)this.signals[i].signal=i;for(i in this.scales)this.scales[i].scale=i;function a(l,u,f){let m,g;l&&(m=l.data||(l.data={}),g=m[u]||(m[u]=[]),g.push(f))}for(i in this.data){o=this.data[i],a(o.input,i,"input"),a(o.output,i,"output"),a(o.values,i,"values");for(const l in o.index)a(o.index[l],i,"index:"+l)}return this},pushState(i,o,a){this._encode.push(pn(this.add(T0({pulse:i})))),this._parent.push(o),this._lookup.push(a?pn(this.proxy(a)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return(0,N.fj)(this._parent)},encode(){return(0,N.fj)(this._encode)},lookup(){return(0,N.fj)(this._lookup)},markpath(){const i=this._markpath;return++i[i.length-1]},fieldRef(i,o){if((0,N.HD)(i))return AO(i,o);i.signal||(0,N.vU)("Unsupported field reference: "+(0,N.m8)(i));const a=i.signal;let l=this.field[a];if(!l){const u={name:this.signalRef(a)};o&&(u.as=o),this.field[a]=l=pn(this.add(wW(u)))}return l},compareRef(i){let o=!1;const a=f=>os(f)?(o=!0,this.signalRef(f.signal)):function Fj(i){return i&&i.expr}(f)?(o=!0,this.exprRef(f.expr)):f,l=(0,N.IX)(i.field).map(a),u=(0,N.IX)(i.order).map(a);return o?pn(this.add(yW({fields:l,orders:u}))):Rj(l,u)},keyRef(i,o){let a=!1;const u=this.signals;return i=(0,N.IX)(i).map(f=>os(f)?(a=!0,pn(u[f.signal])):f),a?pn(this.add(MQ({fields:i,flat:o}))):function bL(i,o){const a={$key:i};return o&&(a.$flat=!0),a}(i,o)},sortRef(i){if(!i)return i;const o=PD(i.op,i.field),a=i.order||"ascending";return a.signal?pn(this.add(yW({fields:o,orders:this.signalRef(a.signal)}))):Rj(o,a)},event(i,o){const a=i+":"+o;if(!this.events[a]){const l=this.id();this.streams.push({id:l,source:i,type:o}),this.events[a]=l}return this.events[a]},hasOwnSignal(i){return(0,N.nr)(this.signals,i)},addSignal(i,o){this.hasOwnSignal(i)&&(0,N.vU)("Duplicate signal name: "+(0,N.m8)(i));const a=o instanceof gL?o:this.add(_L(o));return this.signals[i]=a},getSignal(i){return this.signals[i]||(0,N.vU)("Unrecognized signal name: "+(0,N.m8)(i)),this.signals[i]},signalRef(i){return this.signals[i]?pn(this.signals[i]):((0,N.nr)(this.lambdas,i)||(this.lambdas[i]=this.add(_L(null))),pn(this.lambdas[i]))},parseLambdas(){const i=Object.keys(this.lambdas);for(let o=0,a=i.length;o{"use strict";var Ds=/("(?:[^\\"]|\\.)*")|[:,]/g;Ba.exports=function(Ct,re){var Ii,sn,yi;return re=re||{},Ii=JSON.stringify([1],void 0,void 0===re.indent?2:re.indent).slice(2,-3),sn=""===Ii?1/0:void 0===re.maxLength?80:re.maxLength,yi=re.replacer,function Zn(Xt,oi,Rt){var On,Ut,si,N,ai,Gr,Yt,Li,dr,Br,Zi,zo;if(Xt&&"function"==typeof Xt.toJSON&&(Xt=Xt.toJSON()),void 0===(Zi=JSON.stringify(Xt,yi)))return Zi;if(Zi.length<=(Yt=sn-oi.length-Rt)&&(dr=Zi.replace(Ds,function(Xr,ei){return ei||Xr+" "})).length<=Yt)return dr;if(null!=yi&&(Xt=JSON.parse(Zi),yi=void 0),"object"==typeof Xt&&null!==Xt){if(Li=oi+Ii,si=[],Ut=0,Array.isArray(Xt))for(Br="[",On="]",Yt=Xt.length;Ut0)return[Br,Ii+si.join(",\n"+Li),On].join("\n"+oi)}return Zi}(Ct,"",0)}},861:(Ba,Ds,tn)=>{"use strict";function Ct(Ii,sn,yi,Zn,Xt,oi,Rt){try{var On=Ii[oi](Rt),Ut=On.value}catch(si){return void yi(si)}On.done?sn(Ut):Promise.resolve(Ut).then(Zn,Xt)}function re(Ii){return function(){var sn=this,yi=arguments;return new Promise(function(Zn,Xt){var oi=Ii.apply(sn,yi);function Rt(Ut){Ct(oi,Zn,Xt,Rt,On,"next",Ut)}function On(Ut){Ct(oi,Zn,Xt,Rt,On,"throw",Ut)}Rt(void 0)})}}tn.d(Ds,{Z:()=>re})}},Ba=>{Ba(Ba.s=733)}]); \ No newline at end of file +(self.webpackChunka2agc=self.webpackChunka2agc||[]).push([[179],{733:(Ba,Ds,tn)=>{"use strict";var Ct={};tn.r(Ct),tn.d(Ct,{JsonPatchError:()=>Es,_areEquals:()=>E$,applyOperation:()=>aM,applyPatch:()=>cU,applyReducer:()=>dde,deepClone:()=>cde,getValueByPointer:()=>lU,validate:()=>Ate,validator:()=>uU});var re={};tn.r(re),tn.d(re,{compare:()=>bde,generate:()=>YG,observe:()=>yde,unobserve:()=>_de});var Ii={};tn.r(Ii),tn.d(Ii,{carbong10:()=>Afe,carbong100:()=>kfe,carbong90:()=>Tfe,carbonwhite:()=>Mfe,dark:()=>Qde,excel:()=>Jde,fivethirtyeight:()=>nfe,ggplot2:()=>ife,googlecharts:()=>mfe,latimes:()=>afe,powerbi:()=>Cfe,quartz:()=>lfe,urbaninstitute:()=>pfe,version:()=>Ife,vox:()=>cfe});var sn=tn(861);let Zn=null,oi=1;const Rt=Symbol("SIGNAL");function On(e){const n=Zn;return Zn=e,n}function Li(e){if((!Be(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==oi)){if(!e.producerMustRecompute(e)&&!ei(e))return e.dirty=!1,void(e.lastCleanEpoch=oi);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=oi}}function ei(e){Qe(e);for(let n=0;n0}function Qe(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let $t=null;function Jt(e){return"function"==typeof e}function Hi(e){const t=e(r=>{Error.call(r),r.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const hn=Hi(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((r,s)=>`${s+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function io(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class xn{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const c of t)c.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(Jt(r))try{r()}catch(c){n=c instanceof hn?c.errors:[c]}const{_finalizers:s}=this;if(s){this._finalizers=null;for(const c of s)try{Vo(c)}catch(h){n=n??[],h instanceof hn?n=[...n,...h.errors]:n.push(h)}}if(n)throw new hn(n)}}add(n){var t;if(n&&n!==this)if(this.closed)Vo(n);else{if(n instanceof xn){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&io(t,n)}remove(n){const{_finalizers:t}=this;t&&io(t,n),n instanceof xn&&n._removeParent(this)}}xn.EMPTY=(()=>{const e=new xn;return e.closed=!0,e})();const Mo=xn.EMPTY;function Js(e){return e instanceof xn||e&&"closed"in e&&Jt(e.remove)&&Jt(e.add)&&Jt(e.unsubscribe)}function Vo(e){Jt(e)?e():e.unsubscribe()}const Mi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ci={setTimeout(e,n,...t){const{delegate:r}=ci;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){const{delegate:n}=ci;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jo(e){ci.setTimeout(()=>{const{onUnhandledError:n}=Mi;if(!n)throw e;n(e)})}function Si(){}const ro=Ms("C",void 0,void 0);function Ms(e,n,t){return{kind:e,value:n,error:t}}let ls=null;function cs(e){if(Mi.useDeprecatedSynchronousErrorHandling){const n=!ls;if(n&&(ls={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:r}=ls;if(ls=null,t)throw r}}else e()}class $i extends xn{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Js(n)&&n.add(this)):this.destination=Ri}static create(n,t,r){return new Wn(n,t,r)}next(n){this.isStopped?yu(function va(e){return Ms("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?yu(function ui(e){return Ms("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?yu(ro,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const vr=Function.prototype.bind;function po(e,n){return vr.call(e,n)}class xr{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){ea(r)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){ea(r)}else ea(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){ea(t)}}}class Wn extends $i{constructor(n,t,r){let s;if(super(),Jt(n)||!n)s={next:n??void 0,error:t??void 0,complete:r??void 0};else{let c;this&&Mi.useDeprecatedNextContext?(c=Object.create(n),c.unsubscribe=()=>this.unsubscribe(),s={next:n.next&&po(n.next,c),error:n.error&&po(n.error,c),complete:n.complete&&po(n.complete,c)}):s=n}this.destination=new xr(s)}}function ea(e){Mi.useDeprecatedSynchronousErrorHandling?function Uo(e){Mi.useDeprecatedSynchronousErrorHandling&&ls&&(ls.errorThrown=!0,ls.error=e)}(e):jo(e)}function yu(e,n){const{onStoppedNotification:t}=Mi;t&&ci.setTimeout(()=>t(e,n))}const Ri={closed:!0,next:Si,error:function Xl(e){throw e},complete:Si},mo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Wi(e){return e}function Yl(e){return 0===e.length?Wi:1===e.length?e[0]:function(t){return e.reduce((r,s)=>s(r),t)}}let Qn=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,s){const c=function As(e){return e&&e instanceof $i||function ta(e){return e&&Jt(e.next)&&Jt(e.error)&&Jt(e.complete)}(e)&&Js(e)}(t)?t:new Wn(t,r,s);return cs(()=>{const{operator:h,source:y}=this;c.add(h?h.call(c,y):y?this._subscribe(c):this._trySubscribe(c))}),c}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return new(r=Ao(r))((s,c)=>{const h=new Wn({next:y=>{try{t(y)}catch(E){c(E),h.unsubscribe()}},error:c,complete:s});this.subscribe(h)})}_subscribe(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)}[mo](){return this}pipe(...t){return Yl(t)(this)}toPromise(t){return new(t=Ao(t))((r,s)=>{let c;this.subscribe(h=>c=h,h=>s(h),()=>r(c))})}}return e.create=n=>new e(n),e})();function Ao(e){var n;return null!==(n=e??Mi.Promise)&&void 0!==n?n:Promise}const Rc=Hi(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let It=(()=>{class e extends Qn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const r=new Ho(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new Rc}next(t){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(t)}})}error(t){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){cs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:r,isStopped:s,observers:c}=this;return r||s?Mo:(this.currentObservers=null,c.push(t),new xn(()=>{this.currentObservers=null,io(c,t)}))}_checkFinalizedStatuses(t){const{hasError:r,thrownError:s,isStopped:c}=this;r?t.error(s):c&&t.complete()}asObservable(){const t=new Qn;return t.source=this,t}}return e.create=(n,t)=>new Ho(n,t),e})();class Ho extends It{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:Mo}}class wr extends It{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){const{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}}function ae(e){return Jt(e?.lift)}function be(e){return n=>{if(ae(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Se(e,n,t,r,s){return new Fe(e,n,t,r,s)}class Fe extends $i{constructor(n,t,r,s,c,h){super(n),this.onFinalize=c,this.shouldUnsubscribe=h,this._next=t?function(y){try{t(y)}catch(E){n.error(E)}}:super._next,this._error=s?function(y){try{s(y)}catch(E){n.error(E)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(y){n.error(y)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function ye(e,n){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>{r.next(e.call(n,c,s++))}))})}const lt="https://g.co/ng/security#xss";class _e extends Error{constructor(n,t){super(function nn(e,n){return`NG0${Math.abs(e)}${n?": "+n:""}`}(n,t)),this.code=n}}function Gi(e){for(let n in e)if(e[n]===Gi)return n;throw Error("Could not find renamed property on target object.")}function O1(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function go(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(go).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function EM(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const D2=Gi({__forward_ref__:Gi});function di(e){return e.__forward_ref__=di,e.toString=function(){return go(this())},e}function Mn(e){return za(e)?e():e}function za(e){return"function"==typeof e&&e.hasOwnProperty(D2)&&e.__forward_ref__===di}function CM(e){return e&&!!e.\u0275providers}const Nc=Gi({\u0275cmp:Gi}),Wh=Gi({\u0275dir:Gi}),Mf=Gi({\u0275pipe:Gi}),Zl=Gi({\u0275mod:Gi}),Va=Gi({\u0275fac:Gi}),Y0=Gi({__NG_ELEMENT_ID__:Gi}),K0=Gi({__NG_ENV_ID__:Gi});function qn(e){return"string"==typeof e?e:null==e?"":String(e)}function Af(e,n){throw new _e(-201,!1)}function Rr(e,n){null==e&&function rn(e,n,t,r){throw new Error(`ASSERTION ERROR: ${e}`+(null==r?"":` [Expected=> ${t} ${r} ${n} <=Actual]`))}(n,e,null,"!=")}function Ue(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Tt(e){return{providers:e.providers||[],imports:e.imports||[]}}function q_(e){return DM(e,kf)||DM(e,Yr)}function DM(e,n){return e.hasOwnProperty(n)?e[n]:null}function $m(e){return e&&(e.hasOwnProperty(Ql)||e.hasOwnProperty(Q0))?e[Ql]:null}const kf=Gi({\u0275prov:Gi}),Ql=Gi({\u0275inj:Gi}),Yr=Gi({ngInjectableDef:Gi}),Q0=Gi({ngInjectorDef:Gi});var fi=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}(fi||{});let If;function G_(){return If}function us(e){const n=If;return If=e,n}function MM(e,n,t){const r=q_(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&fi.Optional?null:void 0!==n?n:void Af()}const Ai=globalThis;class $e{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ue({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const X_={},tv="__NG_DI_FLAG__",Rf="ngTempTokenPath",Y_=/\n/gm,bu="__source";let Ua;function md(e){const n=Ua;return Ua=e,n}function zm(e,n=fi.Default){if(void 0===Ua)throw new _e(-203,!1);return null===Ua?MM(e,void 0,n):Ua.get(e,n&fi.Optional?null:void 0,n)}function pe(e,n=fi.Default){return(G_()||zm)(Mn(e),n)}function Xe(e,n=fi.Default){return pe(e,Z_(n))}function Z_(e){return typeof e>"u"||"number"==typeof e?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function sr(e){const n=[];for(let t=0;tn){h=c-1;break}}}for(;cc?"":s[$+1].toLowerCase();const X=8&r?j:null;if(X&&-1!==IM(X,M,0)||2&r&&M!==j){if(Jl(r))return!1;h=!0}}}}else{if(!h&&!Jl(r)&&!Jl(E))return!1;if(h&&Jl(E))continue;h=!1,r=E|1&r}}return Jl(r)||h}function Jl(e){return 0==(1&e)}function FM(e,n,t,r){if(null===n)return-1;let s=0;if(r||!t){let c=!1;for(;s-1)for(t++;t0?'="'+y+'"':"")+"]"}else 8&r?s+="."+h:4&r&&(s+=" "+h);else""!==s&&!Jl(h)&&(n+=ey(c,s),s=""),r=h,c=c||!Jl(r);t++}return""!==s&&(n+=ey(c,s)),n}function Rn(e){return Ea(()=>{const n=ov(e),t={...n,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===_o.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||pl.Emulated,styles:e.styles||Je,_:null,schemas:e.schemas||null,tView:null,id:""};VM(t);const r=e.dependencies;return t.directiveDefs=jm(r,!1),t.pipeDefs=jm(r,!0),t.id=function UM(e){let n=0;const t=[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 s of t)n=Math.imul(31,n)+s.charCodeAt(0)<<0;return n+=2147483648,"c"+n}(t),t})}function BM(e){return Jn(e)||Wo(e)}function ln(e){return null!==e}function Ft(e){return Ea(()=>({type:e.type,bootstrap:e.bootstrap||Je,declarations:e.declarations||Je,imports:e.imports||Je,exports:e.exports||Je,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function zM(e,n){if(null==e)return ds;const t={};for(const r in e)if(e.hasOwnProperty(r)){const s=e[r];let c,h,y=ht.None;Array.isArray(s)?(y=s[0],c=s[1],h=s[2]??c):(c=s,h=s),n?(t[c]=y!==ht.None?[r,y]:r,n[c]=h):t[c]=r}return t}function Vt(e){return Ea(()=>{const n=ov(e);return VM(n),n})}function fs(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 Jn(e){return e[Nc]||null}function Wo(e){return e[Wh]||null}function ks(e){return e[Mf]||null}function ia(e,n){const t=e[Zl]||null;if(!t&&!0===n)throw new Error(`Type ${go(e)} does not have '\u0275mod' property.`);return t}function ov(e){const n={};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:n,inputTransforms:null,inputConfig:e.inputs||ds,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Je,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:zM(e.inputs,n),outputs:zM(e.outputs),debugInfo:null}}function VM(e){e.features?.forEach(n=>n(e))}function jm(e,n){if(!e)return null;const t=n?ks:BM;return()=>("function"==typeof e?e():e).map(r=>t(r)).filter(ln)}const Tr=0,mt=1,_n=2,yo=3,tc=4,ra=5,nc=6,Um=7,kr=8,Ca=9,wu=10,jn=11,ty=12,P1=13,Hm=14,Kr=15,Wm=16,Xh=17,Eu=18,ny=19,L1=20,Ff=21,sv=22,Yh=23,$n=25,av=1,$c=7,Bc=9,Nr=10;var lv=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(lv||{});function bo(e){return Array.isArray(e)&&"object"==typeof e[av]}function Is(e){return Array.isArray(e)&&!0===e[av]}function $1(e){return 0!=(4&e.flags)}function zc(e){return e.componentOffset>-1}function cv(e){return 1==(1&e.flags)}function ml(e){return!!e.template}function uv(e){return 0!=(512&e[_n])}function Kh(e,n){return e.hasOwnProperty(Va)?e[Va]:null}class j1{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function JM(e,n,t,r){null!==n?n.applyValueToInputSignal(n,r):e[t]=r}function vo(){return ry}function ry(e){return e.type.prototype.ngOnChanges&&(e.setInput=$2),eA}function eA(){const e=pv(this),n=e?.current;if(n){const t=e.previous;if(t===ds)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function $2(e,n,t,r,s){const c=this.declaredInputs[r],h=pv(e)||function Xm(e,n){return e[tA]=n}(e,{previous:ds,current:null}),y=h.current||(h.current={}),E=h.previous,M=E[c];y[c]=new j1(M&&M.currentValue,t,E===ds),JM(e,n,s,t)}vo.ngInherit=!0;const tA="__ngSimpleChanges__";function pv(e){return e[tA]||null}const nt=function(e,n,t){},U1="svg";let gv=!1;function er(e){for(;Array.isArray(e);)e=e[Tr];return e}function sy(e,n){return er(n[e])}function oa(e,n){return er(n[e.index])}function gl(e,n){return e.data[n]}function Zh(e,n){return e[n]}function Wa(e,n){const t=n[e];return bo(t)?t:t[Tr]}function Pf(e){return 128==(128&e[_n])}function qo(e,n){return null==n?null:e[n]}function ay(e){e[Xh]=0}function yv(e){1024&e[_n]||(e[_n]|=1024,Pf(e)&&Qh(e))}function ly(e){return 9216&e[_n]||e[Yh]?.dirty}function Kt(e){ly(e)?Qh(e):64&e[_n]&&(function H1(){return gv}()?(e[_n]|=1024,Qh(e)):e[wu].changeDetectionScheduler?.notify())}function Qh(e){e[wu].changeDetectionScheduler?.notify();let n=Vc(e);for(;null!==n&&!(8192&n[_n])&&(n[_n]|=8192,Pf(n));)n=Vc(n)}function Ti(e,n){if(256==(256&e[_n]))throw new _e(911,!1);null===e[Ff]&&(e[Ff]=[]),e[Ff].push(n)}function Vc(e){const n=e[yo];return Is(n)?n[yo]:n}const An={lFrame:Da(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function q1(){return An.bindingsEnabled}function Km(){return null!==An.skipHydrationRootTNode}function qe(){return An.lFrame.lView}function bi(){return An.lFrame.tView}function hs(e){return An.lFrame.contextLView=e,e[kr]}function so(e){return An.lFrame.contextLView=null,e}function Un(){let e=rA();for(;null!==e&&64===e.type;)e=e.parent;return e}function rA(){return An.lFrame.currentTNode}function ic(e,n){const t=An.lFrame;t.currentTNode=e,t.isParent=n}function K1(){return An.lFrame.isParent}function yd(){An.lFrame.isParent=!1}function Os(){const e=An.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function Sa(){return An.lFrame.bindingIndex++}function bd(e){const n=An.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function Cv(e,n){const t=An.lFrame;t.bindingIndex=t.bindingRootIndex=e,jc(n)}function jc(e){An.lFrame.currentDirectiveIndex=e}function rc(e){const n=An.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}function Q1(){return An.lFrame.currentQueryIndex}function uy(e){An.lFrame.currentQueryIndex=e}function Jh(e){const n=e[mt];return 2===n.type?n.declTNode:1===n.type?e[ra]:null}function J1(e,n,t){if(t&fi.SkipSelf){let s=n,c=e;for(;!(s=s.parent,null!==s||t&fi.Host||(s=Jh(c),null===s||(c=c[Hm],10&s.type))););if(null===s)return!1;n=s,e=c}const r=An.lFrame=ko();return r.currentTNode=n,r.lView=e,!0}function ep(e){const n=ko(),t=e[mt];An.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function ko(){const e=An.lFrame,n=null===e?null:e.child;return null===n?Da(e):n}function Da(e){const n={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=n),n}function Go(){const e=An.lFrame;return An.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const vd=Go;function Sv(){const e=Go();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 Xo(){return An.lFrame.selectedIndex}function tp(e){An.lFrame.selectedIndex=e}function Er(){const e=An.lFrame;return gl(e.tView,e.selectedIndex)}function dy(){An.lFrame.currentNamespace=U1}function sA(){!function Z$(){An.lFrame.currentNamespace=null}()}let j2=!0;function eE(){return j2}function Bf(e){j2=e}function Qm(e,n){for(let t=n.directiveStart,r=n.directiveEnd;t=r)break}else n[E]<0&&(e[Xh]+=65536),(y>14>16&&(3&e[_n])===n&&(e[_n]+=16384,iE(y,c)):iE(y,c)}const _l=-1;class ze{constructor(n,t,r){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function zf(e){return e!==_l}function Vf(e){return 32767&e}function yl(e,n){let t=function Jm(e){return e>>16}(e),r=n;for(;t>0;)r=r[Hm],t--;return r}let ip=!0;function eg(e){const n=ip;return ip=e,n}const W2=255,cA=5;let q2=0;const Mu={};function hy(e,n){const t=rE(e,n);if(-1!==t)return t;const r=n[mt];r.firstCreatePass&&(e.injectorIndex=n.length,py(r.data,e),py(n,null),py(r.blueprint,null));const s=rp(e,n),c=e.injectorIndex;if(zf(s)){const h=Vf(s),y=yl(s,n),E=y[mt].data;for(let M=0;M<8;M++)n[c+M]=y[h+M]|E[h+M]}return n[c+8]=s,c}function py(e,n){e.push(0,0,0,0,0,0,0,0,n)}function rE(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function rp(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,r=null,s=n;for(;null!==s;){if(r=kv(s),null===r)return _l;if(t++,s=s[Hm],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return _l}function Au(e,n,t){!function G2(e,n,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Y0)&&(r=t[Y0]),null==r&&(r=t[Y0]=q2++);const s=r&W2;n.data[e+(s>>cA)]|=1<=0?n&W2:lE:n}(t);if("function"==typeof c){if(!J1(n,e,r))return r&fi.Host?oE(s,0,r):sE(n,t,r,s);try{let h;if(h=c(r),null!=h||r&fi.Optional)return h;Af()}finally{vd()}}else if("number"==typeof c){let h=null,y=rE(e,n),E=_l,M=r&fi.Host?n[Kr][ra]:null;for((-1===y||r&fi.SkipSelf)&&(E=-1===y?rp(e,n):n[y+8],E!==_l&&my(r,!1)?(h=n[mt],y=Vf(E),n=yl(E,n)):y=-1);-1!==y;){const R=n[mt];if(Uf(c,y,R.data)){const $=X2(y,n,t,h,r,M);if($!==Mu)return $}E=n[y+8],E!==_l&&my(r,n[mt].data[y+8]===M)&&Uf(c,y,n)?(h=R,y=Vf(E),n=yl(E,n)):y=-1}}return s}function X2(e,n,t,r,s,c){const h=n[mt],y=h.data[e+8],R=tg(y,h,t,null==r?zc(y)&&ip:r!=h&&0!=(3&y.type),s&fi.Host&&c===y);return null!==R?jf(n,h,R,y):Mu}function tg(e,n,t,r,s){const c=e.providerIndexes,h=n.data,y=1048575&c,E=e.directiveStart,R=c>>20,j=s?y+R:e.directiveEnd;for(let X=r?y:y+R;X=E&&K.type===t)return X}if(s){const X=h[E];if(X&&ml(X)&&X.type===t)return E}return null}function jf(e,n,t,r){let s=e[t];const c=n.data;if(function wd(e){return e instanceof ze}(s)){const h=s;h.resolving&&function VU(e,n){const t=n?`. Dependency path: ${n.join(" > ")} > ${e}`:"";throw new _e(-200,`Circular dependency in DI detected for ${e}${t}`)}(function Bi(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():qn(e)}(c[t]));const y=eg(h.canSeeViewProviders);h.resolving=!0;const M=h.injectImpl?us(h.injectImpl):null;J1(e,r,fi.Default);try{s=e[t]=h.factory(void 0,c,e,r),n.firstCreatePass&&t>=r.directiveStart&&function tE(e,n,t){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:c}=n.type.prototype;if(r){const h=ry(n);(t.preOrderHooks??=[]).push(e,h),(t.preOrderCheckHooks??=[]).push(e,h)}s&&(t.preOrderHooks??=[]).push(0-e,s),c&&((t.preOrderHooks??=[]).push(e,c),(t.preOrderCheckHooks??=[]).push(e,c))}(t,c[t],n)}finally{null!==M&&us(M),eg(y),h.resolving=!1,vd()}}return s}function Uf(e,n,t){return!!(t[n+(e>>cA)]&1<{const n=e.prototype.constructor,t=n[Va]||Uc(n),r=Object.prototype;let s=Object.getPrototypeOf(e.prototype).constructor;for(;s&&s!==r;){const c=s[Va]||Uc(s);if(c&&c!==t)return c;s=Object.getPrototypeOf(s)}return c=>new c})}function Uc(e){return za(e)?()=>{const n=Uc(Mn(e));return n&&n()}:Kh(e)}function kv(e){const n=e[mt],t=n.type;return 2===t?n.declTNode:1===t?e[ra]:null}function Hc(e){return function oc(e,n){if("class"===n)return e.classes;if("style"===n)return e.styles;const t=e.attrs;if(t){const r=t.length;let s=0;for(;s{const r=function op(e){return function(...t){if(e){const r=e(...t);for(const s in r)this[s]=r[s]}}}(n);function s(...c){if(this instanceof s)return r.apply(this,c),this;const h=new s(...c);return y.annotation=h,y;function y(E,M,R){const $=E.hasOwnProperty(Ns)?E[Ns]:Object.defineProperty(E,Ns,{value:[]})[Ns];for(;$.length<=R;)$.push(null);return($[R]=$[R]||[]).push(h),E}}return t&&(s.prototype=Object.create(t.prototype)),s.prototype.ngMetadataName=e,s.annotationCls=s,s})}function Cd(e,n){e.forEach(t=>Array.isArray(t)?Cd(t,n):n(t))}function Tu(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function by(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function bl(e,n,t){let r=Qr(e,n);return r>=0?e[1|r]=t:(r=~r,function qf(e,n,t,r){let s=e.length;if(s==n)e.push(t,r);else if(1===s)e.push(r,e[0]),e[0]=t;else{for(s--,e.push(e[s-1],e[s]);s>n;)e[s]=e[s-2],s--;e[n]=t,e[n+1]=r}}(e,r,n,t)),r}function dt(e,n){const t=Qr(e,n);if(t>=0)return e[1|t]}function Qr(e,n){return function Wc(e,n,t){let r=0,s=e.length>>t;for(;s!==r;){const c=r+(s-r>>1),h=e[c<n?s=c:r=c+1}return~(s<{t.push(h)};return Cd(n,h=>{const y=h;Td(y,c,[],r)&&(s||=[],s.push(y))}),void 0!==s&&_E(s,c),t}function _E(e,n){for(let t=0;t{n(c,r)})}}function Td(e,n,t,r){if(!(e=Mn(e)))return!1;let s=null,c=$m(e);const h=!c&&Jn(e);if(c||h){if(h&&!h.standalone)return!1;s=e}else{const E=e.ngModule;if(c=$m(E),!c)return!1;s=E}const y=r.has(s);if(h){if(y)return!1;if(r.add(s),h.dependencies){const E="function"==typeof h.dependencies?h.dependencies():h.dependencies;for(const M of E)Td(M,n,t,r)}}else{if(!c)return!1;{if(null!=c.imports&&!y){let M;r.add(s);try{Cd(c.imports,R=>{Td(R,n,t,r)&&(M||=[],M.push(R))})}finally{}void 0!==M&&_E(M,n)}if(!y){const M=Kh(s)||(()=>new s);n({provide:s,useFactory:M,deps:Je},s),n({provide:cg,useValue:s,multi:!0},s),n({provide:qc,useValue:()=>pe(s),multi:!0},s)}const E=c.providers;if(null!=E&&!y){const M=e;kd(E,R=>{n(R,M)})}}}return s!==e&&void 0!==e.providers}function kd(e,n){for(let t of e)CM(t)&&(t=t.\u0275providers),Array.isArray(t)?kd(t,n):n(t)}const _A=Gi({provide:String,useValue:Gi});function Xf(e){return null!==e&&"object"==typeof e&&_A in e}function Ou(e){return"function"==typeof e}const wy=new $e(""),bE={},zv={};let vl;function Id(){return void 0===vl&&(vl=new Ad),vl}class xo{}class Yf extends xo{get destroyed(){return this._destroyed}constructor(n,t,r,s){super(),this.parent=t,this.source=r,this.scopes=s,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Uv(n,h=>this.processProvider(h)),this.records.set(gE,ug(void 0,this)),s.has("environment")&&this.records.set(xo,ug(void 0,this));const c=this.records.get(wy);null!=c&&"string"==typeof c.value&&this.scopes.add(c.value),this.injectorDefTypes=new Set(this.get(cg,Je,fi.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const t of n)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const t=md(this),r=us(void 0);try{return n()}finally{md(t),us(r)}}get(n,t=X_,r=fi.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(K0))return n[K0](this);r=Z_(r);const c=md(this),h=us(void 0);try{if(!(r&fi.SkipSelf)){let E=this.records.get(n);if(void 0===E){const M=function Ey(e){return"function"==typeof e||"object"==typeof e&&e instanceof $e}(n)&&q_(n);E=M&&this.injectableDefInScope(M)?ug(dp(n),bE):null,this.records.set(n,E)}if(null!=E)return this.hydrate(n,E)}return(r&fi.Self?Id():this.parent).get(n,t=r&fi.Optional&&t===X_?null:t)}catch(y){if("NullInjectorError"===y.name){if((y[Rf]=y[Rf]||[]).unshift(go(n)),c)throw y;return function Q_(e,n,t,r){const s=e[Rf];throw n[bu]&&s.unshift(n[bu]),e.message=function iv(e,n,t,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let s=go(n);if(Array.isArray(n))s=n.map(go).join(" -> ");else if("object"==typeof n){let c=[];for(let h in n)if(n.hasOwnProperty(h)){let y=n[h];c.push(h+":"+("string"==typeof y?JSON.stringify(y):go(y)))}s=`{${c.join(", ")}}`}return`${t}${r?"("+r+")":""}[${s}]: ${e.replace(Y_,"\n ")}`}("\n"+e.message,s,t,r),e.ngTokenPath=s,e[Rf]=null,e}(y,n,"R3InjectorError",this.source)}throw y}finally{us(h),md(c)}}resolveInjectorInitializers(){const n=md(this),t=us(void 0);try{const s=this.get(qc,Je,fi.Self);for(const c of s)c()}finally{md(n),us(t)}}toString(){const n=[],t=this.records;for(const r of t.keys())n.push(go(r));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new _e(205,!1)}processProvider(n){let t=Ou(n=Mn(n))?n:Mn(n&&n.provide);const r=function Vv(e){return Xf(e)?ug(void 0,e.useValue):ug(yA(e),bE)}(n);if(!Ou(n)&&!0===n.multi){let s=this.records.get(t);s||(s=ug(void 0,bE,!0),s.factory=()=>sr(s.multi),this.records.set(t,s)),t=n,s.multi.push(n)}this.records.set(t,r)}hydrate(n,t){return t.value===bE&&(t.value=zv,t.value=t.factory()),"object"==typeof t.value&&t.value&&function xE(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(n){if(!n.providedIn)return!1;const t=Mn(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){const t=this._onDestroyHooks.indexOf(n);-1!==t&&this._onDestroyHooks.splice(t,1)}}function dp(e){const n=q_(e),t=null!==n?n.factory:Kh(e);if(null!==t)return t;if(e instanceof $e)throw new _e(204,!1);if(e instanceof Function)return function vE(e){if(e.length>0)throw new _e(204,!1);const t=function Z0(e){return e&&(e[kf]||e[Yr])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new _e(204,!1)}function yA(e,n,t){let r;if(Ou(e)){const s=Mn(e);return Kh(s)||dp(s)}if(Xf(e))r=()=>Mn(e.useValue);else if(function $v(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...sr(e.deps||[]));else if(function yE(e){return!(!e||!e.useExisting)}(e))r=()=>pe(Mn(e.useExisting));else{const s=Mn(e&&(e.useClass||e.provide));if(!function jv(e){return!!e.deps}(e))return Kh(s)||dp(s);r=()=>new s(...sr(e.deps))}return r}function ug(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function Uv(e,n){for(const t of e)Array.isArray(t)?Uv(t,n):t&&CM(t)?Uv(t.\u0275providers,n):n(t)}function Od(e,n){e instanceof Yf&&e.assertNotDestroyed();const r=md(e),s=us(void 0);try{return n()}finally{md(r),us(s)}}function wA(e,n=null,t=null,r){const s=wE(e,n,t,r);return s.resolveInjectorInitializers(),s}function wE(e,n=null,t=null,r,s=new Set){const c=[t||Je,Q2(e)];return r=r||("object"==typeof e?void 0:go(e)),new Yf(c,n||Id(),r||null,s)}let Ay,hr=(()=>{class e{static#e=this.THROW_IF_NOT_FOUND=X_;static#t=this.NULL=new Ad;static create(t,r){if(Array.isArray(t))return wA({name:""},r,t,"");{const s=t.name??"";return wA({name:s},t.parent,t.providers,s)}}static#n=this.\u0275prov=Ue({token:e,providedIn:"any",factory:()=>pe(gE)});static#i=this.__NG_ELEMENT_ID__=-1}return e})();const hp=new $e("",{providedIn:"root",factory:()=>SA}),SA="ng",Gv=new $e(""),ps=new $e("",{providedIn:"platform",factory:()=>"unknown"}),Ko=new $e(""),Xv=new $e("",{providedIn:"root",factory:()=>function Rd(){if(void 0!==Ay)return Ay;if(typeof document<"u")return document;throw new _e(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function xl(e){return e instanceof Function?e():e}function Py(e){return 128==(128&e.flags)}var Pd=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pd||{});const tR=/^>|^->||--!>|)/g,IE="\u200b$1\u200b";const RE=new Map;let IA=0;const Qv="__ngContext__";function Ps(e,n){bo(n)?(e[Qv]=n[ny],function RA(e){RE.set(e[ny],e)}(n)):e[Qv]=n}let $y;function yp(e,n){return $y(e,n)}function By(e,n,t,r,s){if(null!=r){let c,h=!1;Is(r)?c=r:bo(r)&&(h=!0,r=r[Tr]);const y=er(r);0===e&&null!==t?null==s?$E(n,t,y):bp(n,t,y,s||null,!0):1===e&&null!==t?bp(n,t,y,s||null,!0):2===e?function jy(e,n,t){const r=sx(e,n);r&&function oR(e,n,t,r){e.removeChild(n,t,r)}(e,r,n,t)}(n,y,h):3===e&&n.destroyNode(y),null!=c&&function YA(e,n,t,r,s){const c=t[$c];c!==er(t)&&By(n,e,r,c,s);for(let y=Nr;yn.replace(kE,IE))}(n))}function zy(e,n,t){return e.createElement(n,t)}function VA(e,n){Qf(e,n,n[jn],2,null,null)}function Vy(e,n){const t=e[Bc],r=t.indexOf(n);t.splice(r,1)}function yg(e,n){if(e.length<=Nr)return;const t=Nr+n,r=e[t];if(r){const s=r[Wm];null!==s&&s!==e&&Vy(s,r),n>0&&(e[t-1][tc]=r[tc]);const c=by(e,Nr+n);!function BA(e,n){VA(e,n),n[Tr]=null,n[ra]=null}(r[mt],r);const h=c[Eu];null!==h&&h.detachView(c[mt]),r[yo]=null,r[tc]=null,r[_n]&=-129}return r}function bg(e,n){if(!(256&n[_n])){const t=n[jn];t.destroyNode&&Qf(e,n,t,3,null,null),function ix(e){let n=e[ty];if(!n)return rx(e[mt],e);for(;n;){let t=null;if(bo(n))t=n[ty];else{const r=n[Nr];r&&(t=r)}if(!t){for(;n&&!n[tc]&&n!==e;)bo(n)&&rx(n[mt],n),n=n[yo];null===n&&(n=e),bo(n)&&rx(n[mt],n),t=n&&n[tc]}n=t}}(n)}}function rx(e,n){if(!(256&n[_n])){n[_n]&=-129,n[_n]|=256,n[Yh]&&function ti(e){if(Qe(e),Be(e))for(let n=0;n=0?r[h]():r[-h].unsubscribe(),c+=2}else t[c].call(r[t[c+1]]);null!==r&&(n[Um]=null);const s=n[Ff];if(null!==s){n[Ff]=null;for(let c=0;c-1){const{encapsulation:c}=e.data[r.directiveStart+s];if(c===pl.None||c===pl.Emulated)return null}return oa(r,t)}}(e,n.parent,t)}function bp(e,n,t,r,s){e.insertBefore(n,t,r,s)}function $E(e,n,t){e.appendChild(n,t)}function HA(e,n,t,r,s){null!==r?bp(e,n,t,r,s):$E(e,n,t)}function sx(e,n){return e.parentNode(n)}function BE(e,n,t){return zE(e,n,t)}let VE,Uy,Ls,zE=function WA(e,n,t){return 40&e.type?oa(e,t):null};function ax(e,n,t,r){const s=LE(e,r,n),c=n[jn],y=BE(r.parent||n[ra],r,n);if(null!=s)if(Array.isArray(t))for(let E=0;Ee,createScript:e=>e,createScriptURL:e=>e})}catch{}return Uy}()?.createHTML(e)||e}function Qa(e){return function co(){if(void 0===Ls&&(Ls=null,Ai.trustedTypes))try{Ls=Ai.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ls}()?.createScriptURL(e)||e}class Gc{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${lt})`}}class ka extends Gc{getTypeName(){return"HTML"}}class Wy extends Gc{getTypeName(){return"Style"}}class ZA extends Gc{getTypeName(){return"Script"}}class Jf extends Gc{getTypeName(){return"URL"}}class QA extends Gc{getTypeName(){return"ResourceURL"}}function Ja(e){return e instanceof Gc?e.changingThisBreaksApplicationSecurity:e}function cc(e,n){const t=function Vr(e){return e instanceof Gc&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${lt})`)}return t===n}class WE{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const t=(new window.DOMParser).parseFromString(Bd(n),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(n):(t.removeChild(t.firstChild),t)}catch{return null}}}class cx{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const t=this.inertDocument.createElement("template");return t.innerHTML=Bd(n),t}}const Lu=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Tn(e){return(e=String(e)).match(Lu)?e:"unsafe:"+e}function jr(e){const n={};for(const t of e.split(","))n[t]=!0;return n}function xp(...e){const n={};for(const t of e)for(const r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}const ux=jr("area,br,col,hr,img,wbr"),el=jr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Xc=jr("rp,rt"),wp=xp(ux,xp(el,jr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),xp(Xc,jr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),xp(Xc,el)),$s=jr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),uc=xp($s,jr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),jr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),dx=jr("script,style,template");class XE{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let t=n.firstChild,r=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=this.checkClobberedElement(t,t.nextSibling);if(s){t=s;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(n){const t=n.nodeName.toLowerCase();if(!wp.hasOwnProperty(t))return this.sanitizedSomething=!0,!dx.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=n.attributes;for(let s=0;s"),!0}endElement(n){const t=n.nodeName.toLowerCase();wp.hasOwnProperty(t)&&!ux.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Cp(n))}checkClobberedElement(n,t){if(t&&(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return t}}const Ep=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qy=/([^\#-~ |!])/g;function Cp(e){return e.replace(/&/g,"&").replace(Ep,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(qy,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Gy;function Xy(e,n){let t=null;try{Gy=Gy||function vg(e){const n=new cx(e);return function qE(){try{return!!(new window.DOMParser).parseFromString(Bd(""),"text/html")}catch{return!1}}()?new WE(n):n}(e);let r=n?String(n):"";t=Gy.getInertBodyElement(r);let s=5,c=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=c,c=t.innerHTML,t=Gy.getInertBodyElement(r)}while(r!==c);return Bd((new XE).sanitizeChildren(YE(t)||t))}finally{if(t){const r=YE(t)||t;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function YE(e){return"content"in e&&function ms(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Ro=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}(Ro||{});function jd(e){const n=Dp();return n?n.sanitize(Ro.URL,e)||"":cc(e,"URL")?Ja(e):Tn(qn(e))}function Yy(e){const n=Dp();if(n)return Qa(n.sanitize(Ro.RESOURCE_URL,e)||"");if(cc(e,"ResourceURL"))return Qa(Ja(e));throw new _e(904,!1)}function Dp(){const e=qe();return e&&e[wu].sanitizer}class th{}let fx=()=>null;function Sg(e,n,t=!1){return fx(e,n,t)}class mx{}class Hd{}class gx{resolveComponentFactory(n){throw function Wd(e){const n=Error(`No component factory found for ${go(e)}.`);return n.ngComponent=e,n}(n)}}let Ag=(()=>{class e{static#e=this.NULL=new gx}return e})();function kp(){return nh(Un(),qe())}function nh(e,n){return new zn(oa(e,n))}let zn=(()=>{class e{constructor(t){this.nativeElement=t}static#e=this.__NG_ELEMENT_ID__=kp}return e})();function rC(e){return e instanceof zn?e.nativeElement:e}class _x{}let tl=(()=>{class e{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function Cl(){const e=qe(),t=Wa(Un().index,e);return(bo(t)?t:e)[jn]}()}return e})(),oC=(()=>{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>null})}return e})();const ib={};function Ip(e){const n=On(null);try{return e()}finally{On(n)}}function Tg(e){return!!function cC(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}class uC{constructor(){}supports(n){return Tg(n)}create(n){return new dC(n)}}const bx=(e,n)=>n;class dC{constructor(n){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=n||bx}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,s=0,c=null;for(;t||r;){const h=!r||t&&t.currentIndex{h=this._trackByFn(s,y),null!==t&&Object.is(t.trackById,h)?(r&&(t=this._verifyReinsertion(t,y,h,s)),Object.is(t.item,y)||this._addIdentityChange(t,y)):(t=this._mismatch(t,y,h,s),r=!0),t=t._next,s++}),this.length=s;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,s){let c;return null===n?c=this._itTail:(c=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,c,s)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(r,s))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,c,s)):n=this._addAfter(new pT(t,r),c,s),n}_verifyReinsertion(n,t,r,s){let c=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==c?n=this._reinsertAfter(c,n._prev,s):n.currentIndex!=s&&(n.currentIndex=s,this._addToMoves(n,s)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}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(n,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const s=n._prevRemoved,c=n._nextRemoved;return null===s?this._removalsHead=c:s._nextRemoved=c,null===c?this._removalsTail=s:c._prevRemoved=s,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){const s=null===t?this._itHead:t._next;return n._next=s,n._prev=t,null===s?this._itTail=n:s._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new xx),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,r=n._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xx),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class pT{constructor(n,t){this.item=n,this.trackById=t,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 vx{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){const t=n._prevDup,r=n._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class xx{constructor(){this.map=new Map}put(n){const t=n.trackById;let r=this.map.get(t);r||(r=new vx,this.map.set(t,r)),r.add(n)}get(n,t){const s=this.map.get(n);return s?s.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ob(e,n,t){const r=e.previousIndex;if(null===r)return r;let s=0;return t&&r{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:Ex});constructor(t){this.factories=t}static create(t,r){if(null!=r){const s=r.factories.slice();t=t.concat(s)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||Ex()),deps:[[e,new pt,new ap]]}}find(t){const r=this.factories.find(s=>s.supports(t));if(null!=r)return r;throw new _e(901,!1)}}return e})();function ih(e,n,t,r,s=!1){for(;null!==t;){const c=n[t.index];null!==c&&r.push(er(c)),Is(c)&&Rp(c,r);const h=t.type;if(8&h)ih(e,n,t.child,r);else if(32&h){const y=yp(t,n);let E;for(;E=y();)r.push(E)}else if(16&h){const y=GA(n,t);if(Array.isArray(y))r.push(...y);else{const E=Vc(n[Kr]);ih(E[mt],E,y,r,!0)}}t=s?t.projectionNext:t.next}return r}function Rp(e,n){for(let t=Nr;t!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{},consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{Qh(e.lView)},consumerOnSignalRead(){this.lView[Yh]=this}};function _C(e){return bC(e[ty])}function yC(e){return bC(e[tc])}function bC(e){for(;null!==e&&!Is(e);)e=e[tc];return e}function Dx(e){return e.ngOriginalError}class nl{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&Dx(n);for(;t&&Dx(t);)t=Dx(t);return t||null}}const ab=new $e("",{providedIn:"root",factory:()=>Xe(nl).handleError.bind(void 0)}),cb=new $e("",{providedIn:"root",factory:()=>!1}),Vn={};function Ze(e=1){fb(bi(),qe(),Xo()+e,!1)}function fb(e,n,t,r){if(!r)if(3==(3&n[_n])){const c=e.preOrderCheckHooks;null!==c&&fy(n,c,t)}else{const c=e.preOrderHooks;null!==c&&Mv(n,c,0,t)}tp(t)}function ue(e,n=fi.Default){const t=qe();return null===t?pe(e,n):aE(Un(),t,Mn(e),n)}function Og(){throw new Error("invalid")}function wC(e,n,t,r,s,c){const h=On(null);try{let y=null;s&ht.SignalBased&&(y=n[r][Rt]),null!==y&&void 0!==y.transformFn&&(c=y.transformFn(c)),s&ht.HasDecoratorInputTransform&&(c=e.inputTransforms[r].call(n,c)),null!==e.setInput?e.setInput(n,y,c,t,r):JM(n,y,r,c)}finally{On(h)}}function hb(e,n,t,r,s,c,h,y,E,M,R){const $=n.blueprint.slice();return $[Tr]=s,$[_n]=204|r,(null!==M||e&&2048&e[_n])&&($[_n]|=2048),ay($),$[yo]=$[Hm]=e,$[kr]=t,$[wu]=h||e&&e[wu],$[jn]=y||e&&e[jn],$[Ca]=E||e&&e[Ca]||null,$[ra]=c,$[ny]=function OA(){return IA++}(),$[nc]=R,$[L1]=M,$[Kr]=2==n.type?e[Kr]:$,$}function Rg(e,n,t,r,s){let c=e.data[n];if(null===c)c=function kx(e,n,t,r,s){const c=rA(),h=K1(),E=e.data[n]=function DC(e,n,t,r,s,c){let h=n?n.injectorIndex:-1,y=0;return Km()&&(y|=128),{type:t,index:r,insertBeforeIndex:null,injectorIndex:h,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:y,providerIndexes:0,value:s,attrs:c,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,h?c:c&&c.parent,t,n,r,s);return null===e.firstChild&&(e.firstChild=E),null!==c&&(h?null==c.child&&null!==E.parent&&(c.child=E):null===c.next&&(c.next=E,E.prev=c)),E}(e,n,t,r,s),function Ga(){return An.lFrame.inI18n}()&&(c.flags|=32);else if(64&c.type){c.type=t,c.value=r,c.attrs=s;const h=function Zm(){const e=An.lFrame,n=e.currentTNode;return e.isParent?n:n.parent}();c.injectorIndex=null===h?-1:h.injectorIndex}return ic(c,!0),c}function Pp(e,n,t,r){if(0===t)return-1;const s=n.length;for(let c=0;c$n&&fb(e,n,$n,!1),nt(h?2:0,s),t(r,s)}finally{tp(c),nt(h?3:1,s)}}function Ng(e,n,t){if($1(n)){const r=On(null);try{const c=n.directiveEnd;for(let h=n.directiveStart;hnull;function wT(e,n,t,r,s){for(let c in n){if(!n.hasOwnProperty(c))continue;const h=n[c];if(void 0===h)continue;r??={};let y,E=ht.None;Array.isArray(h)?(y=h[0],E=h[1]):y=h;let M=c;if(null!==s){if(!s.hasOwnProperty(c))continue;M=s[c]}0===e?rh(r,t,M,y,E):rh(r,t,M,y)}return r}function rh(e,n,t,r,s){let c;e.hasOwnProperty(t)?(c=e[t]).push(n,r):c=e[t]=[n,r],void 0!==s&&c.push(s)}function zs(e,n,t,r,s,c,h,y){const E=oa(n,t);let R,M=n.inputs;!y&&null!=M&&(R=M[r])?($g(e,t,R,r,s),zc(n)&&function mb(e,n){const t=Wa(n,e);16&t[_n]||(t[_n]|=64)}(t,n.index)):3&n.type&&(r=function pb(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),s=null!=h?h(s,n.value||"",r):s,c.setProperty(E,r,s))}function Sl(e,n,t,r){if(q1()){const s=null===r?null:{"":-1},c=function ET(e,n){const t=e.directiveRegistry;let r=null,s=null;if(t)for(let c=0;c0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(h)!=y&&h.push(y),h.push(t,r,c)}}(e,n,r,Pp(e,t,s.hostVars,Vn),s)}function No(e,n,t,r,s,c){const h=oa(e,n);!function oh(e,n,t,r,s,c,h){if(null==c)e.removeAttribute(n,s,t);else{const y=null==h?qn(c):h(c,r||"",s);e.setAttribute(n,s,y,t)}}(n[jn],h,c,e.value,t,r,s)}function Bx(e,n,t,r,s,c){const h=c[n];if(null!==h)for(let y=0;ye.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}(y,h),function Cx(e){e.lView[Yh]!==e&&(e.lView=null,Np.push(e))}(y)),Sv()}}function AT(e,n){for(let t=_C(e);null!==t;t=yC(t))for(let r=Nr;r-1&&(yg(n,r),by(t,r))}this._attachedToViewContainer=!1}bg(this._lView[mt],this._lView)}onDestroy(n){Ti(this._lView,n)}markForCheck(){Bg(this._cdRefInjectingView||this._lView)}detach(){this._lView[_n]&=-129}reattach(){Kt(this._lView),this._lView[_n]|=128}detectChanges(){this._lView[_n]|=1024,function Kc(e,n=!0){const t=e[wu],r=t.rendererFactory;r.begin?.();try{!function AC(e){Vx(e,0);let n=0;for(;ly(e);){if(100===n)throw new _e(103,!1);n++,Vx(e,1)}}(e)}catch(c){throw n&&Lg(e,c),c}finally{r.end?.(),t.inlineEffectRunner?.flush()}}(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new _e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,VA(this._lView[mt],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new _e(902,!1);this._appRef=n,Kt(this._lView)}}let Qo=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=kC}return e})();function kC(e){return function Yd(e,n,t){if(zc(e)&&!t){const r=Wa(e.index,n);return new zu(r,r)}return 47&e.type?new zu(n[Kr],n):null}(Un(),qe(),16==(16&e))}let Hp=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=jg;static#t=this.__NG_ENV_ID__=t=>t}return e})();class Vg extends Hp{constructor(n){super(),this._lView=n}onDestroy(n){return Ti(this._lView,n),()=>function cy(e,n){if(null===e[Ff])return;const t=e[Ff].indexOf(n);-1!==t&&e[Ff].splice(t,1)}(this._lView,n)}}function jg(){return new Vg(qe())}const RC=new Set;function Kd(e){RC.has(e)||(RC.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function jx(e){return n=>{setTimeout(e,void 0,n)}}const cn=class FT extends It{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,t,r){let s=n,c=t||(()=>null),h=r;if(n&&"object"==typeof n){const E=n;s=E.next?.bind(E),c=E.error?.bind(E),h=E.complete?.bind(E)}this.__isAsync&&(c=jx(c),s&&(s=jx(s)),h&&(h=jx(h)));const y=super.subscribe({next:s,error:c,complete:h});return n instanceof xn&&n.add(y),y}};function ju(...e){}class Bt{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new cn(!1),this.onMicrotaskEmpty=new cn(!1),this.onStable=new cn(!1),this.onError=new cn(!1),typeof Zone>"u")throw new _e(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&&t,s.shouldCoalesceRunChangeDetection=r,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function Ux(){const e="function"==typeof Ai.requestAnimationFrame;let n=Ai[e?"requestAnimationFrame":"setTimeout"],t=Ai[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&n&&t){const r=n[Zone.__symbol__("OriginalDelegate")];r&&(n=r);const s=t[Zone.__symbol__("OriginalDelegate")];s&&(t=s)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function NC(e){const n=()=>{!function LT(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Ai,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,Wp(e),e.isCheckStableRunning=!0,yb(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),Wp(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,s,c,h,y)=>{if(function $T(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(y))return t.invokeTask(s,c,h,y);try{return FC(e),t.invokeTask(s,c,h,y)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===c.type||e.shouldCoalesceRunChangeDetection)&&n(),PC(e)}},onInvoke:(t,r,s,c,h,y,E)=>{try{return FC(e),t.invoke(s,c,h,y,E)}finally{e.shouldCoalesceRunChangeDetection&&n(),PC(e)}},onHasTask:(t,r,s,c)=>{t.hasTask(s,c),r===s&&("microTask"==c.change?(e._hasPendingMicrotasks=c.microTask,Wp(e),yb(e)):"macroTask"==c.change&&(e.hasPendingMacrotasks=c.macroTask))},onHandleError:(t,r,s,c)=>(t.handleError(s,c),e.runOutsideAngular(()=>e.onError.emit(c)),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Bt.isInAngularZone())throw new _e(909,!1)}static assertNotInAngularZone(){if(Bt.isInAngularZone())throw new _e(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,s){const c=this._inner,h=c.scheduleEventTask("NgZoneEvent: "+s,n,PT,ju,ju);try{return c.runTask(h,t,r)}finally{c.cancelTask(h)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}}const PT={};function yb(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 Wp(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function FC(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function PC(e){e._nesting--,yb(e)}class LC{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new cn,this.onMicrotaskEmpty=new cn,this.onStable=new cn,this.onError=new cn}run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,s){return n.apply(t,r)}}var lh=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(lh||{});const Hx={destroy(){}};function bb(e,n){!n&&function Hv(e){if(!G_()&&!function K_(){return Ua}())throw new _e(-203,!1)}();const t=n?.injector??Xe(hr);if(!function Kf(e){return"browser"===(e??Xe(hr)).get(ps)}(t))return Hx;Kd("NgAfterNextRender");const r=t.get(qp),s=r.handler??=new hc,c=n?.phase??lh.MixedReadWrite,h=()=>{s.unregister(E),y()},y=t.get(Hp).onDestroy(h),E=new $C(t,c,()=>{h(),e()});return s.register(E),{destroy:h}}class $C{constructor(n,t,r){this.phase=t,this.callbackFn=r,this.zone=n.get(Bt),this.errorHandler=n.get(nl,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(n){this.errorHandler?.handleError(n)}}}class hc{constructor(){this.executingCallbacks=!1,this.buckets={[lh.EarlyRead]:new Set,[lh.Write]:new Set,[lh.MixedReadWrite]:new Set,[lh.Read]:new Set},this.deferredCallbacks=new Set}register(n){(this.executingCallbacks?this.deferredCallbacks:this.buckets[n.phase]).add(n)}unregister(n){this.buckets[n.phase].delete(n),this.deferredCallbacks.delete(n)}execute(){let n=!1;this.executingCallbacks=!0;for(const t of Object.values(this.buckets))for(const r of t)n=!0,r.invoke();this.executingCallbacks=!1;for(const t of this.deferredCallbacks)this.buckets[t.phase].add(t);return this.deferredCallbacks.clear(),n}destroy(){for(const n of Object.values(this.buckets))n.clear();this.deferredCallbacks.clear()}}let qp=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const s of t)s();return!!this.handler?.execute()||t.length>0}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>new e})}return e})();function zT(e,n){const t=Wa(n,e),r=t[mt];!function qx(e,n){for(let t=n.length;t0&&KA(e,t,c.join(" "))}}(j,Et,K,r),void 0!==t&&function HT(e,n,t){const r=e.projection=[];for(let s=0;s=0;r--){const s=e[r];s.hostVars=n+=s.hostVars,s.hostAttrs=gd(s.hostAttrs,t=gd(t,s.hostAttrs))}}(r)}function xR(e,n){for(const t in n.inputs){if(!n.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const r=n.inputs[t];if(void 0!==r&&(e.inputs[t]=r,e.declaredInputs[t]=n.declaredInputs[t],null!==n.inputTransforms)){const s=Array.isArray(r)?r[0]:r;if(!n.inputTransforms.hasOwnProperty(s))continue;e.inputTransforms??={},e.inputTransforms[s]=n.inputTransforms[s]}}}function wb(e){return e===ds?{}:e===Je?[]:e}function qT(e,n){const t=e.viewQuery;e.viewQuery=t?(r,s)=>{n(r,s),t(r,s)}:n}function UC(e,n){const t=e.contentQueries;e.contentQueries=t?(r,s,c)=>{n(r,s,c),t(r,s,c)}:n}function GT(e,n){const t=e.hostBindings;e.hostBindings=t?(r,s)=>{n(r,s),t(r,s)}:n}function Vs(e){const n=e.inputConfig,t={};for(const r in n)if(n.hasOwnProperty(r)){const s=n[r];Array.isArray(s)&&s[3]&&(t[r]=s[3])}e.inputTransforms=t}let Ab=()=>null;function Wu(e,n){return Ab(e,n)}function Dl(e,n,t,r){const s=n.tView,y=hb(e,s,t,4096&e[_n]?4096:16,null,n,null,null,null,r?.injector??null,r?.dehydratedView??null);y[Wm]=e[n.index];const M=e[Eu];return null!==M&&(y[Eu]=M.createEmbeddedView(s)),BC(s,y,t),y}function Kg(e,n){return!n||null===n.firstChild||Py(e)}function uh(e,n,t,r=!0){const s=n[mt];if(function jA(e,n,t,r){const s=Nr+r,c=t.length;r>0&&(t[s-1][tc]=n),r{class e{static#e=this.__NG_ELEMENT_ID__=Qp}return e})();function Qp(){return Jd(Un(),qe())}const YC=Jo,Tb=class extends YC{constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return nh(this._hostTNode,this._hostLView)}get injector(){return new ao(this._hostTNode,this._hostLView)}get parentInjector(){const n=rp(this._hostTNode,this._hostLView);if(zf(n)){const t=yl(n,this._hostLView),r=Vf(n);return new ao(t[mt].data[r+8],t)}return new ao(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=sw(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-Nr}createEmbeddedView(n,t,r){let s,c;"number"==typeof r?s=r:null!=r&&(s=r.index,c=r.injector);const h=Wu(this._lContainer,n.ssrId),y=n.createEmbeddedViewImpl(t||{},c,h);return this.insertImpl(y,s,Kg(this._hostTNode,h)),y}createComponent(n,t,r,s,c){const h=n&&!function yy(e){return"function"==typeof e}(n);let y;if(h)y=t;else{const K=t||{};y=K.index,r=K.injector,s=K.projectableNodes,c=K.environmentInjector||K.ngModuleRef}const E=h?n:new pc(Jn(n)),M=r||this.parentInjector;if(!c&&null==E.ngModule){const ie=(h?M:this.parentInjector).get(xo,null);ie&&(c=ie)}const R=Jn(E.componentType??{}),$=Wu(this._lContainer,R?.id??null),X=E.create(M,s,$?.firstChild??null,c);return this.insertImpl(X.hostView,y,Kg(this._hostTNode,$)),X}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){const s=n._lView;if(function _v(e){return Is(e[yo])}(s)){const y=this.indexOf(n);if(-1!==y)this.detach(y);else{const E=s[yo],M=new Tb(E,E[ra],E[yo]);M.detach(M.indexOf(n))}}const c=this._adjustIndex(t),h=this._lContainer;return uh(h,s,c,r),n.attachToViewContainerRef(),Tu(Jp(h),c,n),n}move(n,t){return this.insert(n,t)}indexOf(n){const t=sw(this._lContainer);return null!==t?t.indexOf(n):-1}remove(n){const t=this._adjustIndex(n,-1),r=yg(this._lContainer,t);r&&(by(Jp(this._lContainer),t),bg(r[mt],r))}detach(n){const t=this._adjustIndex(n,-1),r=yg(this._lContainer,t);return r&&null!=by(Jp(this._lContainer),t)?new zu(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function sw(e){return e[8]}function Jp(e){return e[8]||(e[8]=[])}function Jd(e,n){let t;const r=n[e.index];return Is(r)?t=r:(t=ST(r,n,null,e),n[e.index]=t,zx(n,t)),KC(t,n,e,r),new Tb(t,e,n)}let KC=function fh(e,n,t,r){if(e[$c])return;let s;s=8&t.type?er(r):function aw(e,n){const t=e[jn],r=t.createComment(""),s=oa(n,e);return bp(t,sx(t,s),r,function sR(e,n){return e.nextSibling(n)}(t,s),!1),r}(n,t),e[$c]=s},lw=()=>!1;function qu(e,n,t){return e[n]=t}function Ur(e,n,t){return!Object.is(e[n],t)&&(e[n]=t,!0)}function en(e,n,t,r,s,c,h,y){const E=qe(),M=bi(),R=e+$n,$=M.firstCreatePass?function cw(e,n,t,r,s,c,h,y,E){const M=n.consts,R=Rg(n,e,4,h||null,qo(M,y));Sl(n,t,R,qo(M,E)),Qm(n,R);const $=R.tView=Nx(2,R,r,s,c,n.directiveRegistry,n.pipeRegistry,null,n.schemas,M,null);return null!==n.queries&&(n.queries.template(n,R),$.queries=n.queries.embeddedTView(R)),R}(R,M,E,n,t,r,s,c,h):M.data[R];ic($,!1);const j=JC(M,E,$,e);eE()&&ax(M,E,j,$),Ps(j,E);const X=ST(j,E,j,$);return E[R]=X,zx(E,X),function dh(e,n,t){return lw(e,n,t)}(X,$,E),cv($)&&Lp(M,E,$),null!=h&&Ox(E,$,y),en}let JC=function Ib(e,n,t,r){return Bf(!0),n[jn].createComment("")};function hi(e,n,t,r){const s=qe();return Ur(s,Sa(),n)&&(bi(),No(Er(),s,e,n,t,r)),hi}function mw(e,n,t,r){return Ur(e,Sa(),t)?n+qn(t)+r:Vn}function dk(e,n){return e<<17|n<<2}function o_(e){return e>>17&32767}function fk(e){return 2|e}function s_(e){return(131068&e)>>2}function RR(e,n){return-131069&e|n<<2}function hk(e){return 1|e}function pk(e,n,t,r){const s=e[t+1],c=null===n;let h=r?o_(s):s_(s),y=!1;for(;0!==h&&(!1===y||c);){const M=e[h+1];js(e[h],n)&&(y=!0,e[h+1]=r?hk(M):fk(M)),h=r?o_(M):s_(M)}y&&(e[t+1]=r?fk(s):hk(s))}function js(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&Qr(e,n)>=0}const mr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function NR(e){return e.substring(mr.key,mr.keyEnd)}function rm(e,n){const t=mr.textEnd;return t===n?-1:(n=mr.keyEnd=function e8(e,n,t){for(;n32;)n++;return n}(e,mr.key=n,t),bw(e,n,t))}function bw(e,n,t){for(;n=0;t=rm(n,t))bl(e,NR(n),!0)}function vc(e,n,t,r){const s=qe(),c=bi(),h=bd(2);c.firstUpdatePass&&FR(c,e,h,r),n!==Vn&&Ur(s,h,n)&&M3(c,c.data[Xo()],s,s[jn],e,s[h+1]=function A3(e,n){return null==e||""===e||("string"==typeof n?e+=n:"object"==typeof e&&(e=go(Ja(e)))),e}(n,t),r,h)}function rf(e,n,t,r){const s=bi(),c=bd(2);s.firstUpdatePass&&FR(s,null,c,r);const h=qe();if(t!==Vn&&Ur(h,c,t)){const y=s.data[Xo()];if(T3(y,r)&&!S3(s,c)){let E=r?y.classesWithoutHost:y.stylesWithoutHost;null!==E&&(t=EM(E,t||"")),Bb(s,y,h,t,r)}else!function D3(e,n,t,r,s,c,h,y){s===Vn&&(s=Je);let E=0,M=0,R=0=e.expandoStartIndex}function FR(e,n,t,r){const s=e.data;if(null===s[t+1]){const c=s[Xo()],h=S3(e,t);T3(c,r)&&null===n&&!h&&(n=!1),n=function _k(e,n,t,r){const s=rc(e);let c=r?n.residualClasses:n.residualStyles;if(null===s)0===(r?n.classBindings:n.styleBindings)&&(t=om(t=sS(null,e,n,t,r),n.attrs,r),c=null);else{const h=n.directiveStylingLast;if(-1===h||e[h]!==s)if(t=sS(s,e,n,t,r),null===c){let E=function yk(e,n,t){const r=t?n.classBindings:n.styleBindings;if(0!==s_(r))return e[o_(r)]}(e,n,r);void 0!==E&&Array.isArray(E)&&(E=sS(null,e,n,E[1],r),E=om(E,n.attrs,r),function bk(e,n,t,r){e[o_(t?n.classBindings:n.styleBindings)]=r}(e,n,r,E))}else c=function t8(e,n,t){let r;const s=n.directiveEnd;for(let c=1+n.directiveStylingLast;c0)&&(M=!0)):R=t,s)if(0!==E){const j=o_(e[y+1]);e[r+1]=dk(j,y),0!==j&&(e[j+1]=RR(e[j+1],r)),e[y+1]=function OR(e,n){return 131071&e|n<<17}(e[y+1],r)}else e[r+1]=dk(y,0),0!==y&&(e[y+1]=RR(e[y+1],r)),y=r;else e[r+1]=dk(E,0),0===y?y=r:e[E+1]=RR(e[E+1],r),E=r;M&&(e[r+1]=fk(e[r+1])),pk(e,R,r,!0),pk(e,R,r,!1),function a_(e,n,t,r,s){const c=s?e.residualClasses:e.residualStyles;null!=c&&"string"==typeof n&&Qr(c,n)>=0&&(t[r+1]=hk(t[r+1]))}(n,R,e,r,c),h=dk(y,E),c?n.classBindings=h:n.styleBindings=h}(s,c,n,t,h,r)}}function sS(e,n,t,r,s){let c=null;const h=t.directiveEnd;let y=t.directiveStylingLast;for(-1===y?y=t.directiveStart:y++;y0;){const E=e[s],M=Array.isArray(E),R=M?E[1]:E,$=null===R;let j=t[s+1];j===Vn&&(j=$?Je:void 0);let X=$?dt(j,r):R===r?j:void 0;if(M&&!aS(X)&&(X=dt(E,r)),aS(X)&&(y=X,h))return y;const K=e[s+1];s=h?o_(K):s_(K)}if(null!==n){let E=c?n.residualClasses:n.residualStyles;null!=E&&(y=dt(E,r))}return y}function aS(e){return void 0!==e}function T3(e,n){return 0!=(e.flags&(n?8:16))}function eo(e,n,t){Kd("NgControlFlow");const r=qe(),s=Sa(),c=function WR(e,n){return e[n]}(r,$n+e);if(Ur(r,s,n)){const y=On(null);try{if(function Zg(e,n){const t=yg(e,n);return void 0!==t&&bg(t[mt],t),t}(c,0),-1!==n){const E=function qR(e,n){return gl(e,n)}(r[mt],$n+n),M=Wu(c,E.tView.ssrId);uh(c,Dl(r,E,t,{dehydratedView:M}),0,Kg(E,M))}}finally{On(y)}}else{const y=function JT(e,n){const t=Nr+n;if(t(Bf(!0),zy(r,s,function aA(){return An.lFrame.currentNamespace}()));function es(e,n,t){const r=qe(),s=bi(),c=e+$n,h=s.firstCreatePass?function B3(e,n,t,r,s){const c=n.consts,h=qo(c,r),y=Rg(n,e,8,"ng-container",h);return null!==h&&vb(y,h,!0),Sl(n,t,y,qo(c,s)),null!==n.queries&&n.queries.elementStart(n,y),y}(c,s,r,n,t):s.data[c];ic(h,!0);const y=XR(s,r,h,e);return r[c]=y,eE()&&ax(s,r,y,h),Ps(y,r),cv(h)&&(Lp(s,r,h),Ng(s,h,r)),null!=t&&Ox(r,h),es}function xw(){let e=Un();const n=bi();return K1()?yd():(e=e.parent,ic(e,!1)),n.firstCreatePass&&(Qm(n,e),$1(e)&&n.queries.elementEnd(e)),xw}function zb(e,n,t){return es(e,n,t),xw(),zb}let XR=(e,n,t,r)=>(Bf(!0),nx(n[jn],""));function Oa(){return qe()}function Vb(e,n,t){const r=qe();return Ur(r,Sa(),n)&&zs(bi(),Er(),r,e,n,r[jn],t,!0),Vb}function YR(e,n,t){const r=qe();if(Ur(r,Sa(),n)){const c=bi(),h=Er();zs(c,h,r,e,n,Xd(rc(c.data),h,r),t,!0)}return YR}const Al=void 0;var f8=["en",[["a","p"],["AM","PM"],Al],[["AM","PM"],Al,Al],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Al,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Al,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Al,"{1} 'at' {0}",Al],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function ol(e){const t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===r?1:5}];let bh={};function Po(e){const n=function sf(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=ZR(n);if(t)return t;const r=n.split("-")[0];if(t=ZR(r),t)return t;if("en"===r)return f8;throw new _e(701,!1)}function ZR(e){return e in bh||(bh[e]=Ai.ng&&Ai.ng.common&&Ai.ng.common.locales&&Ai.ng.common.locales[e]),bh[e]}var Hr=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Hr||{});const jb="en-US";let JR=jb;function Cw(e){return!!e&&"function"==typeof e.then}function fB(e){return!!e&&"function"==typeof e.subscribe}function yn(e,n,t,r){const s=qe(),c=bi(),h=Un();return _N(c,s,s[jn],h,e,n,r),yn}function gN(e,n){const t=Un(),r=qe(),s=bi();return _N(s,r,Xd(rc(s.data),t,r),t,e,n),gN}function _N(e,n,t,r,s,c,h){const y=cv(r),M=e.firstCreatePass&&Up(e),R=n[kr],$=Gd(n);let j=!0;if(3&r.type||h){const ie=oa(r,n),me=h?h(ie):ie,Me=$.length,Ce=h?Mt=>h(er(Mt[r.index])):r.index;let rt=null;if(!h&&y&&(rt=function kk(e,n,t,r){const s=e.cleanup;if(null!=s)for(let c=0;cE?y[E]:null}"string"==typeof h&&(c+=2)}return null}(e,n,s,r.index)),null!==rt)(rt.__ngLastListenerFn__||rt).__ngNextListenerFn__=c,rt.__ngLastListenerFn__=c,j=!1;else{c=pB(r,n,R,c,!1);const Mt=t.listen(me,s,c);$.push(c,Mt),M&&M.push(s,Ce,Me,Me+1)}}else c=pB(r,n,R,c,!1);const X=r.outputs;let K;if(j&&null!==X&&(K=X[s])){const ie=K.length;if(ie)for(let me=0;me-1?Wa(e.index,n):n);let E=hB(n,t,r,h),M=c.__ngNextListenerFn__;for(;M;)E=hB(n,t,M,h)&&E,M=M.__ngNextListenerFn__;return s&&!1===E&&h.preventDefault(),E}}function on(e=1){return function Dv(e){return(An.lFrame.contextLView=function iA(e,n){for(;e>0;)n=n[Hm],e--;return n}(e,An.lFrame.contextLView))[kr]}(e)}function T8(e,n){let t=null;const r=function R2(e){const n=e.attrs;if(null!=n){const t=n.indexOf(5);if(!(1&t))return n[t+1]}return null}(e);for(let s=0;s{class e{static#e=this.__NG_ELEMENT_ID__=k8}return e})();const xB=Yu,wB=class extends xB{constructor(n,t,r){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,t){return this.createEmbeddedViewImpl(n,t)}createEmbeddedViewImpl(n,t,r){const s=Dl(this._declarationLView,this._declarationTContainer,n,{injector:t,dehydratedView:r});return new zu(s)}};function k8(){return Ik(Un(),qe())}function Ik(e,n){return 4&e.type?new wB(n,e,nh(e,n)):null}class xN{constructor(n){this.queryList=n,this.matches=null}clone(){return new xN(this.queryList)}setDirty(){this.queryList.setDirty()}}class wN{constructor(n=[]){this.queries=n}createEmbeddedView(n){const t=n.queries;if(null!==t){const r=null!==n.contentQueries?n.contentQueries[0]:t.length,s=[];for(let c=0;c0)r.push(h[y/2]);else{const M=c[y+1],R=n[-E];for(let $=Nr;$(Bf(!0),function Ld(e,n){return e.createText(n)}(n[jn],r));function Pr(e){return lf("",e,""),Pr}function lf(e,n,t){const r=qe(),s=mw(r,e,n,t);return s!==Vn&&function Yn(e,n,t){const r=sy(n,e);!function tx(e,n,t){e.setValue(n,t)}(e[jn],r,t)}(r,Xo(),s),lf}function Sw(e,n,t,r,s){if(e=Mn(e),Array.isArray(e))for(let c=0;c>20;if(Ou(e)||!e.multi){const X=new ze(M,s,ue),K=Dw(E,n,s?R:R+j,$);-1===K?(Au(hy(y,h),c,E),_i(c,e,n.length),n.push(E),y.directiveStart++,y.directiveEnd++,s&&(y.providerIndexes+=1048576),t.push(X),h.push(X)):(t[K]=X,h[K]=X)}else{const X=Dw(E,n,R+j,$),K=Dw(E,n,R,R+j),me=K>=0&&t[K];if(s&&!me||!s&&!(X>=0&&t[X])){Au(hy(y,h),c,E);const Me=function Vi(e,n,t,r,s){const c=new ze(e,t,ue);return c.multi=[],c.index=n,c.componentProviders=0,Eo(c,s,r&&!t),c}(s?ts:Ol,t.length,s,r,M);!s&&me&&(t[K].providerFactory=Me),_i(c,e,n.length,0),n.push(E),y.directiveStart++,y.directiveEnd++,s&&(y.providerIndexes+=1048576),t.push(Me),h.push(Me)}else _i(c,e,X>-1?X:K,Eo(t[s?K:X],M,!s&&r));!s&&r&&me&&t[K].componentProviders++}}}function _i(e,n,t,r){const s=Ou(n),c=function Bv(e){return!!e.useClass}(n);if(s||c){const E=(c?Mn(n.useClass):n).prototype.ngOnDestroy;if(E){const M=e.destroyHooks||(e.destroyHooks=[]);if(!s&&n.multi){const R=M.indexOf(t);-1===R?M.push(t,[r,E]):M[R+1].push(r,E)}else M.push(t,E)}}}function Eo(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Dw(e,n,t,r){for(let s=t;s{t.providersResolver=(r,s)=>function bn(e,n,t){const r=bi();if(r.firstCreatePass){const s=ml(e);Sw(t,r.data,r.blueprint,s,!0),Sw(n,r.data,r.blueprint,s,!1)}}(r,s?s(e):e,n)}}class ma{}class vn{}class IB extends ma{constructor(n,t,r){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new zC(this);const s=ia(n);this._bootstrapComponents=xl(s.bootstrap),this._r3Injector=wE(n,t,[{provide:ma,useValue:this},{provide:Ag,useValue:this.componentFactoryResolver},...r],go(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class gS extends vn{constructor(n){super(),this.moduleType=n}create(n){return new IB(this.moduleType,n,[])}}class Bk extends ma{constructor(n){super(),this.componentFactoryResolver=new zC(this),this.instance=null;const t=new Yf([...n.providers,{provide:ma,useValue:this},{provide:Ag,useValue:this.componentFactoryResolver}],n.parent||Id(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function fn(e,n,t=null){return new Bk({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}let Ku=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const r=up(0,t.type),s=r.length>0?fn([r],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=Ue({token:e,providedIn:"environment",factory:()=>new e(pe(xo))})}return e})();function xi(e){Kd("NgStandalone"),e.getStandaloneInjector=n=>n.get(Ku).getOrCreateStandaloneInjector(e)}function f_(e,n,t){const r=Os()+e,s=qe();return s[r]===Vn?qu(s,r,t?n.call(t):n()):function Qg(e,n){return e[n]}(s,r)}function wc(e,n){const t=e[n];return t===Vn?void 0:t}function cf(e,n,t,r,s,c){const h=n+t;return Ur(e,h,s)?qu(e,h+1,c?r.call(c,s):r(s)):wc(e,h+1)}function Zu(e,n,t,r,s,c,h){const y=n+t;return function hh(e,n,t,r){const s=Ur(e,n,t);return Ur(e,n+1,r)||s}(e,y,s,c)?qu(e,y+2,h?r.call(h,s,c):r(s,c)):wc(e,y+2)}function uf(e,n){const t=bi();let r;const s=e+$n;t.firstCreatePass?(r=function BB(e,n){if(n)for(let t=n.length-1;t>=0;t--){const r=n[t];if(e===r.name)return r}}(n,t.pipeRegistry),t.data[s]=r,r.onDestroy&&(t.destroyHooks??=[]).push(s,r.onDestroy)):r=t.data[s];const c=r.factory||(r.factory=Kh(r.type)),y=us(ue);try{const E=eg(!1),M=c();return eg(E),function F8(e,n,t,r){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=r}(t,qe(),s,M),M}finally{us(y)}}function cm(e,n,t){const r=e+$n,s=qe(),c=Zh(s,r);return Yb(s,r)?cf(s,Os(),n,c.transform,t,c):c.transform(t)}function Wk(e,n,t,r){const s=e+$n,c=qe(),h=Zh(c,s);return Yb(c,s)?Zu(c,Os(),n,h.transform,t,r,h):h.transform(t,r)}function Yb(e,n){return e[mt].data[n].pure}function qk(e,n){return Ik(e,n)}let tF=(()=>{class e{log(t){console.log(t)}warn(t){console.warn(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();class c6{constructor(n,t){this.ngModuleFactory=n,this.componentFactories=t}}let nF=(()=>{class e{compileModuleSync(t){return new gS(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const r=this.compileModuleSync(t),c=xl(ia(t).declarations).reduce((h,y)=>{const E=Jn(y);return E&&h.push(new pc(E)),h},[]);return new c6(r,c)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Fw=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new wr(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const pz=new $e(""),kS=new $e("");let sF,oF=(()=>{class e{constructor(t,r,s){this._ngZone=t,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,sF||(function w6(e){sF=e}(s),s.addToWindow(r)),this._watchAngularEvents(),t.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:()=>{Bt.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,s){let c=-1;r&&r>0&&(c=setTimeout(()=>{this._callbacks=this._callbacks.filter(h=>h.timeoutId!==c),t()},r)),this._callbacks.push({doneCb:t,timeoutId:c,updateCb:s})}whenStable(t,r,s){if(s&&!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(t,r,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,r,s){return[]}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bt),pe(iI),pe(kS))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),iI=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return sF?.findTestabilityInTree(this,t,r)??null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const rI=new $e("");let aF=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),this.appInits=Xe(rI,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const s of this.appInits){const c=s();if(Cw(c))t.push(c);else if(fB(c)){const h=new Promise((y,E)=>{c.subscribe({complete:y,error:E})});t.push(h)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(s=>{this.reject(s)}),0===t.length&&r(),this.initialized=!0}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const $w=new $e("");function S6(e,n){return Array.isArray(n)?n.reduce(S6,e):{...e,...n}}let Kb=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Xe(ab),this.afterRenderEffectManager=Xe(qp),this.componentTypes=[],this.components=[],this.isStable=Xe(Fw).hasPendingTasks.pipe(ye(t=>!t)),this._injector=Xe(xo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,r){const s=t instanceof Hd;if(!this._injector.get(aF).done)throw!s&&function Nf(e){const n=Jn(e)||Wo(e)||ks(e);return null!==n&&n.standalone}(t),new _e(405,!1);let h;h=s?t:this._injector.get(Ag).resolveComponentFactory(t),this.componentTypes.push(h.componentType);const y=function gz(e){return e.isBoundToModule}(h)?void 0:this._injector.get(ma),M=h.create(hr.NULL,[],r||h.selector,y),R=M.location.nativeElement,$=M.injector.get(pz,null);return $?.registerApplication(R),M.onDestroy(()=>{this.detachView(M.hostView),lF(this.components,M),$?.unregisterApplication(R)}),this._loadComponent(M),M}tick(){if(this._runningTick)throw new _e(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this.internalErrorHandler(t)}finally{try{this.afterRenderEffectManager.execute()}catch(t){this.internalErrorHandler(t)}this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;lF(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const r=this._injector.get($w,[]);[...this._bootstrapListeners,...r].forEach(s=>s(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>lF(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new _e(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lF(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}let yz=(()=>{class e{constructor(){this.zone=Xe(Bt),this.applicationRef=Xe(Kb)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rY(){const e=Xe(Bt),n=Xe(nl);return t=>e.runOutsideAngular(()=>n.handleError(t))}let sI=(()=>{class e{constructor(){this.subscription=new xn,this.initialized=!1,this.zone=Xe(Bt),this.pendingTasks=Xe(Fw)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Bt.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Bt.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const df=new $e("",{providedIn:"root",factory:()=>Xe(df,fi.Optional|fi.SkipSelf)||function sY(){return typeof $localize<"u"&&$localize.locale||jb}()}),vz=new $e("");let cF=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const s=function yR(e="zone.js",n){return"noop"===e?new LC:"zone.js"===e?new Bt(n):e}(r?.ngZone,function M6(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing}));return s.run(()=>{const c=function $k(e,n,t){return new IB(e,n,t)}(t.moduleType,this.injector,function D6(e){return[{provide:Bt,useFactory:e},{provide:qc,multi:!0,useFactory:()=>{const n=Xe(yz,{optional:!0});return()=>n.initialize()}},{provide:qc,multi:!0,useFactory:()=>{const n=Xe(sI);return()=>{n.initialize()}}},{provide:ab,useFactory:rY}]}(()=>s)),h=c.injector.get(nl,null);return s.runOutsideAngular(()=>{const y=s.onError.subscribe({next:E=>{h.handleError(E)}});c.onDestroy(()=>{lF(this._modules,c),y.unsubscribe()})}),function _z(e,n,t){try{const r=t();return Cw(r)?r.catch(s=>{throw n.runOutsideAngular(()=>e.handleError(s)),s}):r}catch(r){throw n.runOutsideAngular(()=>e.handleError(r)),r}}(h,s,()=>{const y=c.injector.get(aF);return y.runInitializers(),y.donePromise.then(()=>(function eN(e){Rr(e,"Expected localeId to be defined"),"string"==typeof e&&(JR=e.toLowerCase().replace(/_/g,"-"))}(c.injector.get(df,jb)||jb),this._moduleDoBootstrap(c),c))})})}bootstrapModule(t,r=[]){const s=S6({},r);return function E6(e,n,t){const r=new gS(t);return Promise.resolve(r)}(0,0,t).then(c=>this.bootstrapModuleFactory(c,s))}_moduleDoBootstrap(t){const r=t.injector.get(Kb);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(s=>r.bootstrap(s));else{if(!t.instance.ngDoBootstrap)throw new _e(-403,!1);t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new _e(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const t=this._injector.get(vz,null);t&&(t.forEach(r=>r()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(r){return new(r||e)(pe(hr))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),Qb=null;const A6=new $e("");function T6(e,n,t=[]){const r=`Platform: ${n}`,s=new $e(r);return(c=[])=>{let h=wz();if(!h||h.injector.get(A6,!1)){const y=[...t,...c,{provide:s,useValue:!0}];e?e(y):function cY(e){if(Qb&&!Qb.get(A6,!1))throw new _e(400,!1);(function mz(){!function li(e){$t=e}(()=>{throw new _e(600,!1)})})(),Qb=e;const n=e.get(cF);(function I6(e){e.get(Gv,null)?.forEach(t=>t())})(e)}(function k6(e=[],n){return hr.create({name:n,providers:[{provide:wy,useValue:"platform"},{provide:vz,useValue:new Set([()=>Qb=null])},...e]})}(y,r))}return function xz(e){const n=wz();if(!n)throw new _e(401,!1);return n}()}}function wz(){return Qb?.get(cF)??null}const Mz=T6(null,"core",[]);let gF=(()=>{class e{constructor(t){}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Kb))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();function cr(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function jw(e,n=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?n:Number(e)}let qz=null;function y_(){return qz}class Q6{}const mi=new $e("");let AF=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(J6),providedIn:"platform"})}return e})();const Gz=new $e("");let J6=(()=>{class e extends AF{constructor(){super(),this._doc=Xe(mi),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return y_().getBaseHref(this._doc)}onPopState(t){const r=y_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=y_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,r,s){this._history.pushState(t,r,s)}replaceState(t,r,s){this._history.replaceState(t,r,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function TF(e,n){if(0==e.length)return n;if(0==n.length)return e;let t=0;return e.endsWith("/")&&t++,n.startsWith("/")&&t++,2==t?e+n.substring(1):1==t?e+n:e+"/"+n}function Xz(e){const n=e.match(/#|\?|$/),t=n&&n.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function wh(e){return e&&"?"!==e[0]?"?"+e:e}let hf=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Yz),providedIn:"root"})}return e})();const yI=new $e("");let Yz=(()=>{class e extends hf{constructor(t,r){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??Xe(mi).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return TF(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+wh(this._platformLocation.search),s=this._platformLocation.hash;return s&&t?`${r}${s}`:r}pushState(t,r,s,c){const h=this.prepareExternalUrl(s+wh(c));this._platformLocation.pushState(t,r,h)}replaceState(t,r,s,c){const h=this.prepareExternalUrl(s+wh(c));this._platformLocation.replaceState(t,r,h)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(AF),pe(yI,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Kz=(()=>{class e extends hf{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){const r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=TF(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,s,c){let h=this.prepareExternalUrl(s+wh(c));0==h.length&&(h=this._platformLocation.pathname),this._platformLocation.pushState(t,r,h)}replaceState(t,r,s,c){let h=this.prepareExternalUrl(s+wh(c));0==h.length&&(h=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,h)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(AF),pe(yI,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),mm=(()=>{class e{constructor(t){this._subject=new cn,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const r=this._locationStrategy.getBaseHref();this._basePath=function nH(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(Xz(kF(r))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+wh(r))}normalize(t){return e.stripTrailingSlash(function tH(e,n){if(!e||!n.startsWith(e))return n;const t=n.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:n}(this._basePath,kF(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,r="",s=null){this._locationStrategy.pushState(s,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wh(r)),s)}replaceState(t,r="",s=null){this._locationStrategy.replaceState(s,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wh(r)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{const r=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(s=>s(t,r))}subscribe(t,r,s){return this._subject.subscribe({next:t,error:r,complete:s})}static#e=this.normalizeQueryParams=wh;static#t=this.joinWithSlash=TF;static#n=this.stripTrailingSlash=Xz;static#i=this.\u0275fac=function(r){return new(r||e)(pe(hf))};static#r=this.\u0275prov=Ue({token:e,factory:()=>function eH(){return new mm(pe(hf))}(),providedIn:"root"})}return e})();function kF(e){return e.replace(/\/index.html$/,"")}var Fl=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Fl||{}),Lr=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Lr||{}),tu=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(tu||{}),ns=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e.Infinity=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}(ns||{});function vI(e,n){return Ju(Po(e)[Hr.DateFormat],n)}function xI(e,n){return Ju(Po(e)[Hr.TimeFormat],n)}function Hw(e,n){return Ju(Po(e)[Hr.DateTimeFormat],n)}function Qu(e,n){const t=Po(e),r=t[Hr.NumberSymbols][n];if(typeof r>"u"){if(n===ns.CurrencyDecimal)return t[Hr.NumberSymbols][ns.Decimal];if(n===ns.CurrencyGroup)return t[Hr.NumberSymbols][ns.Group]}return r}function OF(e){if(!e[Hr.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Hr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Ju(e,n){for(let t=n;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function EI(e){const[n,t]=e.split(":");return{hours:+n,minutes:+t}}const UY=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,LS={},hH=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ed=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(ed||{}),nr=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(nr||{}),Yi=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(Yi||{});function pH(e,n,t,r){let s=function yH(e){if(e5(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[s,c=1,h=1]=e.split("-").map(y=>+y);return CI(s,c-1,h)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let r;if(r=e.match(UY))return function Jz(e){const n=new Date(0);let t=0,r=0;const s=e[8]?n.setUTCFullYear:n.setFullYear,c=e[8]?n.setUTCHours:n.setHours;e[9]&&(t=Number(e[9]+e[10]),r=Number(e[9]+e[11])),s.call(n,Number(e[1]),Number(e[2])-1,Number(e[3]));const h=Number(e[4]||0)-t,y=Number(e[5]||0)-r,E=Number(e[6]||0),M=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return c.call(n,h,y,E,M),n}(r)}const n=new Date(e);if(!e5(n))throw new Error(`Unable to convert "${e}" into a date`);return n}(e);n=nu(t,n)||n;let y,h=[];for(;n;){if(y=hH.exec(n),!y){h.push(n);break}{h=h.concat(y.slice(1));const R=h.pop();if(!R)break;n=R}}let E=s.getTimezoneOffset();r&&(E=PF(r,E),s=function _H(e,n,t){const r=t?-1:1,s=e.getTimezoneOffset();return function LF(e,n){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+n),e}(e,r*(PF(n,s)-s))}(s,r,!0));let M="";return h.forEach(R=>{const $=function gH(e){if(FF[e])return FF[e];let n;switch(e){case"G":case"GG":case"GGG":n=$r(Yi.Eras,Lr.Abbreviated);break;case"GGGG":n=$r(Yi.Eras,Lr.Wide);break;case"GGGGG":n=$r(Yi.Eras,Lr.Narrow);break;case"y":n=is(nr.FullYear,1,0,!1,!0);break;case"yy":n=is(nr.FullYear,2,0,!0,!0);break;case"yyy":n=is(nr.FullYear,3,0,!1,!0);break;case"yyyy":n=is(nr.FullYear,4,0,!1,!0);break;case"Y":n=b_(1);break;case"YY":n=b_(2,!0);break;case"YYY":n=b_(3);break;case"YYYY":n=b_(4);break;case"M":case"L":n=is(nr.Month,1,1);break;case"MM":case"LL":n=is(nr.Month,2,1);break;case"MMM":n=$r(Yi.Months,Lr.Abbreviated);break;case"MMMM":n=$r(Yi.Months,Lr.Wide);break;case"MMMMM":n=$r(Yi.Months,Lr.Narrow);break;case"LLL":n=$r(Yi.Months,Lr.Abbreviated,Fl.Standalone);break;case"LLLL":n=$r(Yi.Months,Lr.Wide,Fl.Standalone);break;case"LLLLL":n=$r(Yi.Months,Lr.Narrow,Fl.Standalone);break;case"w":n=MI(1);break;case"ww":n=MI(2);break;case"W":n=MI(1,!0);break;case"d":n=is(nr.Date,1);break;case"dd":n=is(nr.Date,2);break;case"c":case"cc":n=is(nr.Day,1);break;case"ccc":n=$r(Yi.Days,Lr.Abbreviated,Fl.Standalone);break;case"cccc":n=$r(Yi.Days,Lr.Wide,Fl.Standalone);break;case"ccccc":n=$r(Yi.Days,Lr.Narrow,Fl.Standalone);break;case"cccccc":n=$r(Yi.Days,Lr.Short,Fl.Standalone);break;case"E":case"EE":case"EEE":n=$r(Yi.Days,Lr.Abbreviated);break;case"EEEE":n=$r(Yi.Days,Lr.Wide);break;case"EEEEE":n=$r(Yi.Days,Lr.Narrow);break;case"EEEEEE":n=$r(Yi.Days,Lr.Short);break;case"a":case"aa":case"aaa":n=$r(Yi.DayPeriods,Lr.Abbreviated);break;case"aaaa":n=$r(Yi.DayPeriods,Lr.Wide);break;case"aaaaa":n=$r(Yi.DayPeriods,Lr.Narrow);break;case"b":case"bb":case"bbb":n=$r(Yi.DayPeriods,Lr.Abbreviated,Fl.Standalone,!0);break;case"bbbb":n=$r(Yi.DayPeriods,Lr.Wide,Fl.Standalone,!0);break;case"bbbbb":n=$r(Yi.DayPeriods,Lr.Narrow,Fl.Standalone,!0);break;case"B":case"BB":case"BBB":n=$r(Yi.DayPeriods,Lr.Abbreviated,Fl.Format,!0);break;case"BBBB":n=$r(Yi.DayPeriods,Lr.Wide,Fl.Format,!0);break;case"BBBBB":n=$r(Yi.DayPeriods,Lr.Narrow,Fl.Format,!0);break;case"h":n=is(nr.Hours,1,-12);break;case"hh":n=is(nr.Hours,2,-12);break;case"H":n=is(nr.Hours,1);break;case"HH":n=is(nr.Hours,2);break;case"m":n=is(nr.Minutes,1);break;case"mm":n=is(nr.Minutes,2);break;case"s":n=is(nr.Seconds,1);break;case"ss":n=is(nr.Seconds,2);break;case"S":n=is(nr.FractionalSeconds,1);break;case"SS":n=is(nr.FractionalSeconds,2);break;case"SSS":n=is(nr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=DI(ed.Short);break;case"ZZZZZ":n=DI(ed.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=DI(ed.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=DI(ed.Long);break;default:return null}return FF[e]=n,n}(R);M+=$?$(s,t,E):"''"===R?"'":R.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),M}function CI(e,n,t){const r=new Date(0);return r.setFullYear(e,n,t),r.setHours(0,0,0),r}function nu(e,n){const t=function rH(e){return Po(e)[Hr.LocaleId]}(e);if(LS[t]??={},LS[t][n])return LS[t][n];let r="";switch(n){case"shortDate":r=vI(e,tu.Short);break;case"mediumDate":r=vI(e,tu.Medium);break;case"longDate":r=vI(e,tu.Long);break;case"fullDate":r=vI(e,tu.Full);break;case"shortTime":r=xI(e,tu.Short);break;case"mediumTime":r=xI(e,tu.Medium);break;case"longTime":r=xI(e,tu.Long);break;case"fullTime":r=xI(e,tu.Full);break;case"short":const s=nu(e,"shortTime"),c=nu(e,"shortDate");r=$S(Hw(e,tu.Short),[s,c]);break;case"medium":const h=nu(e,"mediumTime"),y=nu(e,"mediumDate");r=$S(Hw(e,tu.Medium),[h,y]);break;case"long":const E=nu(e,"longTime"),M=nu(e,"longDate");r=$S(Hw(e,tu.Long),[E,M]);break;case"full":const R=nu(e,"fullTime"),$=nu(e,"fullDate");r=$S(Hw(e,tu.Full),[R,$])}return r&&(LS[t][n]=r),r}function $S(e,n){return n&&(e=e.replace(/\{([^}]+)}/g,function(t,r){return null!=n&&r in n?n[r]:t})),e}function td(e,n,t="-",r,s){let c="";(e<0||s&&e<=0)&&(s?e=1-e:(e=-e,c=t));let h=String(e);for(;h.length0||y>-t)&&(y+=t),e===nr.Hours)0===y&&-12===t&&(y=12);else if(e===nr.FractionalSeconds)return function Qz(e,n){return td(e,3).substring(0,n)}(y,n);const E=Qu(h,ns.MinusSign);return td(y,n,E,r,s)}}function $r(e,n,t=Fl.Format,r=!1){return function(s,c){return function HY(e,n,t,r,s,c){switch(t){case Yi.Months:return function aH(e,n,t){const r=Po(e),c=Ju([r[Hr.MonthsFormat],r[Hr.MonthsStandalone]],n);return Ju(c,t)}(n,s,r)[e.getMonth()];case Yi.Days:return function sH(e,n,t){const r=Po(e),c=Ju([r[Hr.DaysFormat],r[Hr.DaysStandalone]],n);return Ju(c,t)}(n,s,r)[e.getDay()];case Yi.DayPeriods:const h=e.getHours(),y=e.getMinutes();if(c){const M=function n0(e){const n=Po(e);return OF(n),(n[Hr.ExtraData][2]||[]).map(r=>"string"==typeof r?EI(r):[EI(r[0]),EI(r[1])])}(n),R=function qw(e,n,t){const r=Po(e);OF(r);const c=Ju([r[Hr.ExtraData][0],r[Hr.ExtraData][1]],n)||[];return Ju(c,t)||[]}(n,s,r),$=M.findIndex(j=>{if(Array.isArray(j)){const[X,K]=j,ie=h>=X.hours&&y>=X.minutes,me=h0?Math.floor(s/60):Math.ceil(s/60);switch(e){case ed.Short:return(s>=0?"+":"")+td(h,2,c)+td(Math.abs(s%60),2,c);case ed.ShortGMT:return"GMT"+(s>=0?"+":"")+td(h,1,c);case ed.Long:return"GMT"+(s>=0?"+":"")+td(h,2,c)+":"+td(Math.abs(s%60),2,c);case ed.Extended:return 0===r?"Z":(s>=0?"+":"")+td(h,2,c)+":"+td(Math.abs(s%60),2,c);default:throw new Error(`Unknown zone width "${e}"`)}}}const mH=0,BS=4;function NF(e){const n=e.getDay(),t=0===n?-3:BS-n;return CI(e.getFullYear(),e.getMonth(),e.getDate()+t)}function MI(e,n=!1){return function(t,r){let s;if(n){const c=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,h=t.getDate();s=1+Math.floor((h+c)/7)}else{const c=NF(t),h=function RF(e){const n=CI(e,mH,1).getDay();return CI(e,0,1+(n<=BS?BS:BS+7)-n)}(c.getFullYear()),y=c.getTime()-h.getTime();s=1+Math.round(y/6048e5)}return td(s,e,Qu(r,ns.MinusSign))}}function b_(e,n=!1){return function(t,r){return td(NF(t).getFullYear(),e,Qu(r,ns.MinusSign),n)}}const FF={};function PF(e,n){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?n:t}function e5(e){return e instanceof Date&&!isNaN(e.valueOf())}function HF(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const r=t.indexOf("="),[s,c]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(s.trim()===n)return decodeURIComponent(c)}return null}const OI=/\s+/,WF=[];let qF=(()=>{class e{constructor(t,r){this._ngEl=t,this._renderer=r,this.initialClasses=WF,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(OI):WF}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(OI):t}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const r of t)this._updateState(r,!0);else if(null!=t)for(const r of Object.keys(t))this._updateState(r,!!t[r]);this._applyStateDiff()}_updateState(t,r){const s=this.stateMap.get(t);void 0!==s?(s.enabled!==r&&(s.changed=!0,s.enabled=r),s.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const r=t[0],s=t[1];s.changed?(this._toggleClass(r,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),s.touched=!1}}_toggleClass(t,r){(t=t.trim()).length>0&&t.split(OI).forEach(s=>{r?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(tl))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngClass",""]],inputs:{klass:[ht.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}return e})();class GF{constructor(n,t,r,s){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=s}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 o0=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,r,s){this._viewContainer=t,this._template=r,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((s,c,h)=>{if(null==s.previousIndex)r.createEmbeddedView(this._template,new GF(s.item,this._ngForOf,-1,-1),null===h?void 0:h);else if(null==h)r.remove(null===c?void 0:c);else if(null!==c){const y=r.get(c);r.move(y,h),r5(y,s)}});for(let s=0,c=r.length;s{r5(r.get(s.currentIndex),s)})}static ngTemplateContextGuard(t,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo),ue(Yu),ue(pC))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function r5(e,n){e.context.$implicit=n.item}let x_=(()=>{class e{constructor(t,r){this._viewContainer=t,this._context=new MH,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){o5("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){o5("ngIfElse",t),this._elseTemplateRef=t,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(t,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo),ue(Yu))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class MH{constructor(){this.$implicit=null,this.ngIf=null}}function o5(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${go(n)}'.`)}let jS=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const s=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,s,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,r,s)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,r,s),get:(t,r,s)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,s)}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Jo))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[vo]})}return e})();function iu(e,n){return new _e(2100,!1)}class TH{createSubscription(n,t){return Ip(()=>n.subscribe({next:t,error:r=>{throw r}}))}dispose(n){Ip(()=>n.unsubscribe())}}class kH{createSubscription(n,t){return n.then(t,r=>{throw r})}dispose(n){}}const QF=new kH,FI=new TH;let PI=(()=>{class e{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,r=>this._updateLatestValue(t,r))}_selectStrategy(t){if(Cw(t))return QF;if(fB(t))return FI;throw iu()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,r){t===this._obj&&(this._latestValue=r,this._ref.markForCheck())}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo,16))};static#t=this.\u0275pipe=fs({name:"async",type:e,pure:!1,standalone:!0})}return e})(),_m=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw iu();return t.toUpperCase()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275pipe=fs({name:"uppercase",type:e,pure:!0,standalone:!0})}return e})();const IH=new $e(""),OH=new $e("");let c5=(()=>{class e{constructor(t,r,s){this.locale=t,this.defaultTimezone=r,this.defaultOptions=s}transform(t,r,s,c){if(null==t||""===t||t!=t)return null;try{return pH(t,r??this.defaultOptions?.dateFormat??"mediumDate",c||this.locale,s??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(h){throw iu()}}static#e=this.\u0275fac=function(r){return new(r||e)(ue(df,16),ue(IH,24),ue(OH,24))};static#t=this.\u0275pipe=fs({name:"date",type:e,pure:!0,standalone:!0})}return e})(),Ir=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const $I="browser",BH="server";function Eh(e){return e===$I}function qS(e){return e===BH}let m5=(()=>{class e{static#e=this.\u0275prov=Ue({token:e,providedIn:"root",factory:()=>Eh(Xe(ps))?new JF(Xe(mi),window):new eP})}return e})();class JF{constructor(n,t){this.document=n,this.window=t,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n){this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){const t=function g5(e,n){const t=e.getElementById(n)||e.getElementsByName(n)[0];if(t)return t;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let s=r.currentNode;for(;s;){const c=s.shadowRoot;if(c){const h=c.getElementById(n)||c.querySelector(`[name="${n}"]`);if(h)return h}s=r.nextNode()}}return null}(this.document,n);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(n){this.window.history.scrollRestoration=n}scrollToElement(n){const t=n.getBoundingClientRect(),r=t.left+this.window.pageXOffset,s=t.top+this.window.pageYOffset,c=this.offset();this.window.scrollTo(r-c[0],s-c[1])}}class eP{setOffset(n){}getScrollPosition(){return[0,0]}scrollToPosition(n){}scrollToAnchor(n){}setHistoryScrollRestoration(n){}}class BI{}class gr extends Q6{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class ir extends gr{static makeCurrent(){!function Z6(e){qz??=e}(new ir)}onAndCancel(n,t,r){return n.addEventListener(t,r),()=>{n.removeEventListener(t,r)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function E_(){return Di=Di||document.querySelector("base"),Di?Di.getAttribute("href"):null}();return null==t?null:function ho(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Di=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return HF(document.cookie,n)}}let Di=null,e1=(()=>{class e{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const JS=new $e("");let to=(()=>{class e{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(s=>{s.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,r,s){return this._findPluginFor(r).addEventListener(t,r,s)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(c=>c.supports(t)),!r)throw new _e(5101,!1);return this._eventNameToPlugin.set(t,r),r}static#e=this.\u0275fac=function(r){return new(r||e)(pe(JS),pe(Bt))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class D5{constructor(n){this._doc=n}}const M5="ng-app-id";let r7=(()=>{class e{constructor(t,r,s,c={}){this.doc=t,this.appId=r,this.nonce=s,this.platformId=c,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=qS(c),this.resetHostNodes()}addStyles(t){for(const r of t)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(t){for(const r of t)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(r=>r.remove()),t.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const r of this.getAllStyles())this.addStyleToHost(t,r)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const r of this.hostNodes)this.addStyleToHost(r,t)}onStyleRemoved(t){const r=this.styleRef;r.get(t)?.elements?.forEach(s=>s.remove()),r.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${M5}="${this.appId}"]`);if(t?.length){const r=new Map;return t.forEach(s=>{null!=s.textContent&&r.set(s.textContent,s)}),r}return null}changeUsageCount(t,r){const s=this.styleRef;if(s.has(t)){const c=s.get(t);return c.usage+=r,c.usage}return s.set(t,{usage:r,elements:[]}),r}getStyleElement(t,r){const s=this.styleNodesInDOM,c=s?.get(r);if(c?.parentNode===t)return s.delete(r),c.removeAttribute(M5),c;{const h=this.doc.createElement("style");return this.nonce&&h.setAttribute("nonce",this.nonce),h.textContent=r,this.platformIsServer&&h.setAttribute(M5,this.appId),t.appendChild(h),h}}addStyleToHost(t,r){const s=this.getStyleElement(t,r),c=this.styleRef,h=c.get(r)?.elements;h?h.push(s):c.set(r,{elements:[s],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(hp),pe(Xv,8),pe(ps))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const cP={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/MathML/"},uP=/%COMP%/g,c0=new $e("",{providedIn:"root",factory:()=>!0});function Sc(e,n){return n.map(t=>t.replace(uP,e))}let wm=(()=>{class e{constructor(t,r,s,c,h,y,E,M=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=c,this.doc=h,this.platformId=y,this.ngZone=E,this.nonce=M,this.rendererByCompId=new Map,this.platformIsServer=qS(y),this.defaultRenderer=new Vl(t,h,E,this.platformIsServer)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===pl.ShadowDom&&(r={...r,encapsulation:pl.Emulated});const s=this.getOrCreateRenderer(t,r);return s instanceof jI?s.applyToHost(t):s instanceof eD&&s.applyStyles(),s}getOrCreateRenderer(t,r){const s=this.rendererByCompId;let c=s.get(r.id);if(!c){const h=this.doc,y=this.ngZone,E=this.eventManager,M=this.sharedStylesHost,R=this.removeStylesOnCompDestroy,$=this.platformIsServer;switch(r.encapsulation){case pl.Emulated:c=new jI(E,M,r,this.appId,R,h,y,$);break;case pl.ShadowDom:return new dP(E,M,t,r,h,y,this.nonce,$);default:c=new eD(E,M,r,R,h,y,$)}s.set(r.id,c)}return c}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(to),pe(r7),pe(hp),pe(c0),pe(mi),pe(ps),pe(Bt),pe(Xv))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class Vl{constructor(n,t,r,s){this.eventManager=n,this.doc=t,this.ngZone=r,this.platformIsServer=s,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,t){return t?this.doc.createElementNS(cP[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(VI(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(VI(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){n&&n.removeChild(t)}selectRootElement(n,t){let r="string"==typeof n?this.doc.querySelector(n):n;if(!r)throw new _e(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,s){if(s){t=s+":"+t;const c=cP[s];c?n.setAttributeNS(c,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){const s=cP[r];s?n.removeAttributeNS(s,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,s){s&(Pd.DashCase|Pd.Important)?n.style.setProperty(t,r,s&Pd.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Pd.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){null!=n&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r){if("string"==typeof n&&!(n=y_().getGlobalEventTarget(this.doc,n)))throw new Error(`Unsupported event target ${n} for event ${t}`);return this.eventManager.addEventListener(n,t,this.decoratePreventDefault(r))}decoratePreventDefault(n){return t=>{if("__ngUnwrap__"===t)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(t)):n(t))&&t.preventDefault()}}}function VI(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class dP extends Vl{constructor(n,t,r,s,c,h,y,E){super(n,c,h,E),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const M=Sc(s.id,s.styles);for(const R of M){const $=document.createElement("style");y&&$.setAttribute("nonce",y),$.textContent=R,this.shadowRoot.appendChild($)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(this.nodeOrShadowRoot(n),t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class eD extends Vl{constructor(n,t,r,s,c,h,y,E){super(n,c,h,y),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=s,this.styles=E?Sc(E,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class jI extends eD{constructor(n,t,r,s,c,h,y,E){const M=s+"-"+r.id;super(n,t,r,c,h,y,E,M),this.contentAttr=function u0(e){return"_ngcontent-%COMP%".replace(uP,e)}(M),this.hostAttr=function au(e){return"_nghost-%COMP%".replace(uP,e)}(M)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){const r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}}let fP=(()=>{class e extends D5{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,s){return t.addEventListener(r,s,!1),()=>this.removeEventListener(t,r,s)}removeEventListener(t,r,s){return t.removeEventListener(r,s)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const UI=["alt","control","meta","shift"],hP={"\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"},pP={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let mP=(()=>{class e extends D5{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,r,s){const c=e.parseEventName(r),h=e.eventCallback(c.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>y_().onAndCancel(t,c.domEventName,h))}static parseEventName(t){const r=t.toLowerCase().split("."),s=r.shift();if(0===r.length||"keydown"!==s&&"keyup"!==s)return null;const c=e._normalizeKey(r.pop());let h="",y=r.indexOf("code");if(y>-1&&(r.splice(y,1),h="code."),UI.forEach(M=>{const R=r.indexOf(M);R>-1&&(r.splice(R,1),h+=M+".")}),h+=c,0!=r.length||0===c.length)return null;const E={};return E.domEventName=s,E.fullKey=h,E}static matchEventFullKeyCode(t,r){let s=hP[t.key]||t.key,c="";return r.indexOf("code.")>-1&&(s=t.code,c="code."),!(null==s||!s)&&(s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),UI.forEach(h=>{h!==s&&(0,pP[h])(t)&&(c+=h+".")}),c+=s,c===r)}static eventCallback(t,r,s){return c=>{e.matchEventFullKeyCode(c,t)&&s.runGuarded(()=>r(c))}}static _normalizeKey(t){return"esc"===t?"escape":t}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const I5=T6(Mz,"browser",[{provide:ps,useValue:$I},{provide:Gv,useValue:function k5(){ir.makeCurrent()},multi:!0},{provide:mi,useFactory:function bP(){return function CE(e){Ay=e}(document),document},deps:[]}]),O5=new $e(""),xP=[{provide:kS,useClass:class Cc{addToWindow(n){Ai.getAngularTestability=(r,s=!0)=>{const c=n.findTestabilityInTree(r,s);if(null==c)throw new _e(5103,!1);return c},Ai.getAllAngularTestabilities=()=>n.getAllTestabilities(),Ai.getAllAngularRootElements=()=>n.getAllRootElements(),Ai.frameworkStabilizers||(Ai.frameworkStabilizers=[]),Ai.frameworkStabilizers.push(r=>{const s=Ai.getAllAngularTestabilities();let c=s.length;const h=function(){c--,0==c&&r()};s.forEach(y=>{y.whenStable(h)})})}findTestabilityInTree(n,t,r){return null==t?null:n.getTestability(t)??(r?y_().isShadowRoot(t)?this.findTestabilityInTree(n,t.host,!0):this.findTestabilityInTree(n,t.parentElement,!0):null)}},deps:[]},{provide:pz,useClass:oF,deps:[Bt,iI,kS]},{provide:oF,useClass:oF,deps:[Bt,iI,kS]}],wP=[{provide:wy,useValue:"root"},{provide:nl,useFactory:function yP(){return new nl},deps:[]},{provide:JS,useClass:fP,multi:!0,deps:[mi,Bt,ps]},{provide:JS,useClass:mP,multi:!0,deps:[mi]},wm,r7,to,{provide:_x,useExisting:wm},{provide:BI,useClass:e1,deps:[]},[]];let R5=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:hp,useValue:t.appId}]}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(O5,12))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[...wP,...xP],imports:[Ir,gF]})}return e})(),CP=(()=>{class e{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),n1=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:function(r){let s=null;return s=r?new(r||e):pe(iK),s},providedIn:"root"})}return e})(),iK=(()=>{class e extends n1{constructor(t){super(),this._doc=t}sanitize(t,r){if(null==r)return null;switch(t){case Ro.NONE:return r;case Ro.HTML:return cc(r,"HTML")?Ja(r):Xy(this._doc,String(r)).toString();case Ro.STYLE:return cc(r,"Style")?Ja(r):r;case Ro.SCRIPT:if(cc(r,"Script"))return Ja(r);throw new _e(5200,!1);case Ro.URL:return cc(r,"URL")?Ja(r):Tn(String(r));case Ro.RESOURCE_URL:if(cc(r,"ResourceURL"))return Ja(r);throw new _e(5201,!1);default:throw new _e(5202,!1)}}bypassSecurityTrustHtml(t){return function HE(e){return new ka(e)}(t)}bypassSecurityTrustStyle(t){return function eh(e){return new Wy(e)}(t)}bypassSecurityTrustScript(t){return function lR(e){return new ZA(e)}(t)}bypassSecurityTrustUrl(t){return function cR(e){return new Jf(e)}(t)}bypassSecurityTrustResourceUrl(t){return function JA(e){return new QA(e)}(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function p0(e){return e&&Jt(e.schedule)}function m0(e){return e[e.length-1]}function P5(e){return Jt(m0(e))?e.pop():void 0}function iD(e){return p0(m0(e))?e.pop():void 0}function Nn(e,n,t,r){var h,s=arguments.length,c=s<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,t,r);else for(var y=e.length-1;y>=0;y--)(h=e[y])&&(c=(s<3?h(c):s>3?h(n,t,c):h(n,t))||c);return s>3&&c&&Object.defineProperty(n,t,c),c}function ga(e,n){return function(t,r){n(t,r,e)}}function gt(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function C_(e){return this instanceof C_?(this.v=e,this):new C_(e)}function V5(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function NP(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(c){t[c]=e[c]&&function(h){return new Promise(function(y,E){!function s(c,h,y,E){Promise.resolve(E).then(function(M){c({value:M,done:y})},h)}(y,E,(h=e[c](h)).done,h.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const _0=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function H5(e){return Jt(e?.then)}function W5(e){return Jt(e[mo])}function oD(e){return Symbol.asyncIterator&&Jt(e?.[Symbol.asyncIterator])}function PP(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 G5=function q5(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function X5(e){return Jt(e?.[G5])}function XI(e){return function z5(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=t.apply(e,n||[]),c=[];return s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s;function h(j){r[j]&&(s[j]=function(X){return new Promise(function(K,ie){c.push([j,X,K,ie])>1||y(j,X)})})}function y(j,X){try{!function E(j){j.value instanceof C_?Promise.resolve(j.value.v).then(M,R):$(c[0][2],j)}(r[j](X))}catch(K){$(c[0][3],K)}}function M(j){y("next",j)}function R(j){y("throw",j)}function $(j,X){j(X),c.shift(),c.length&&y(c[0][0],c[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:r,done:s}=yield C_(t.read());if(s)return yield C_(void 0);yield yield C_(r)}}finally{t.releaseLock()}})}function YI(e){return Jt(e?.getReader)}function Gs(e){if(e instanceof Qn)return e;if(null!=e){if(W5(e))return function y0(e){return new Qn(n=>{const t=e[mo]();if(Jt(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(_0(e))return function v7(e){return new Qn(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,jo)})}(e);if(oD(e))return Y5(e);if(X5(e))return function w7(e){return new Qn(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(YI(e))return function K5(e){return Y5(XI(e))}(e)}throw PP(e)}function Y5(e){return new Qn(n=>{(function E7(e,n){var t,r,s,c;return function B5(e,n,t,r){return new(t||(t=Promise))(function(c,h){function y(R){try{M(r.next(R))}catch($){h($)}}function E(R){try{M(r.throw(R))}catch($){h($)}}function M(R){R.done?c(R.value):function s(c){return c instanceof t?c:new t(function(h){h(c)})}(R.value).then(y,E)}M((r=r.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=V5(e);!(r=yield t.next()).done;)if(n.next(r.value),n.closed)return}catch(h){s={error:h}}finally{try{r&&!r.done&&(c=t.return)&&(yield c.call(t))}finally{if(s)throw s.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function Cm(e,n,t,r=0,s=!1){const c=n.schedule(function(){t(),s?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(c),!s)return c}function Z5(e,n=0){return be((t,r)=>{t.subscribe(Se(r,s=>Cm(r,e,()=>r.next(s),n),()=>Cm(r,e,()=>r.complete(),n),s=>Cm(r,e,()=>r.error(s),n)))})}function Q5(e,n=0){return be((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function Zt(e,n){if(!e)throw new Error("Iterable cannot be null");return new Qn(t=>{Cm(t,n,()=>{const r=e[Symbol.asyncIterator]();Cm(t,n,()=>{r.next().then(s=>{s.done?t.complete():t.next(s.value)})},0,!0)})})}function Cn(e,n){return n?function ll(e,n){if(null!=e){if(W5(e))return function C7(e,n){return Gs(e).pipe(Q5(n),Z5(n))}(e,n);if(_0(e))return function S7(e,n){return new Qn(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}(e,n);if(H5(e))return function mf(e,n){return Gs(e).pipe(Q5(n),Z5(n))}(e,n);if(oD(e))return Zt(e,n);if(X5(e))return function Sh(e,n){return new Qn(t=>{let r;return Cm(t,n,()=>{r=e[G5](),Cm(t,n,()=>{let s,c;try{({value:s,done:c}=r.next())}catch(h){return void t.error(h)}c?t.complete():t.next(s)},0,!0)}),()=>Jt(r?.return)&&r.return()})}(e,n);if(YI(e))return function Ge(e,n){return Zt(XI(e),n)}(e,n)}throw PP(e)}(e,n):Gs(e)}function zt(...e){return Cn(e,iD(e))}function Wr(e,n,t=1/0){return Jt(n)?Wr((r,s)=>ye((c,h)=>n(r,c,s,h))(Gs(e(r,s))),t):("number"==typeof n&&(t=n),be((r,s)=>function sD(e,n,t,r,s,c,h,y){const E=[];let M=0,R=0,$=!1;const j=()=>{$&&!E.length&&!M&&n.complete()},X=ie=>M{c&&n.next(ie),M++;let me=!1;Gs(t(ie,R++)).subscribe(Se(n,Me=>{s?.(Me),c?X(Me):n.next(Me)},()=>{me=!0},void 0,()=>{if(me)try{for(M--;E.length&&MK(Me)):K(Me)}j()}catch(Me){n.error(Me)}}))};return e.subscribe(Se(n,X,()=>{$=!0,j()})),()=>{y?.()}}(r,s,e,t)))}function lu(e,n){return Jt(n)?Wr(e,n,1):Wr(e,1)}function ii(e,n){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>e.call(n,c,s++)&&r.next(c)))})}function nd(e){return be((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}function Sr(e,n){return be((t,r)=>{let s=null,c=0,h=!1;const y=()=>h&&!s&&r.complete();t.subscribe(Se(r,E=>{s?.unsubscribe();let M=0;const R=c++;Gs(e(E,R)).subscribe(s=Se(r,$=>r.next(n?n(E,$,R,M++):$),()=>{s=null,y()}))},()=>{h=!0,y()}))})}class S_{}class KI{}class id{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?"string"==typeof n?this.lazyInit=()=>{this.headers=new Map,n.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const s=t.slice(0,r),c=s.toLowerCase(),h=t.slice(r+1).trim();this.maybeSetNormalizedName(s,c),this.headers.has(c)?this.headers.get(c).push(h):this.headers.set(c,[h])}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.setHeaderEntries(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof id?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){const t=new id;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof id?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){const t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(n.name,t);const s=("a"===n.op?this.headers.get(t):void 0)||[];s.push(...r),this.headers.set(t,s);break;case"d":const c=n.value;if(c){let h=this.headers.get(t);if(!h)return;h=h.filter(y=>-1===c.indexOf(y)),0===h.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,h)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(n,t){const r=(Array.isArray(t)?t:[t]).map(c=>c.toString()),s=n.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(n,s)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}}class D7{encodeKey(n){return eV(n)}encodeValue(n){return eV(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const J5=/%(\d[a-f0-9])/gi,A7={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eV(e){return encodeURIComponent(e).replace(J5,(n,t)=>A7[t]??n)}function ZI(e){return`${e}`}class D_{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new D7,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function M7(e,n){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(s=>{const c=s.indexOf("="),[h,y]=-1==c?[n.decodeKey(s),""]:[n.decodeKey(s.slice(0,c)),n.decodeValue(s.slice(c+1))],E=t.get(h)||[];E.push(y),t.set(h,E)}),t}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{const r=n.fromObject[t],s=Array.isArray(r)?r.map(ZI):[ZI(r)];this.map.set(t,s)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){const t=[];return Object.keys(n).forEach(r=>{const s=n[r];Array.isArray(s)?s.forEach(c=>{t.push({param:r,value:c,op:"a"})}):t.push({param:r,value:s,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const t=new D_({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const t=("a"===n.op?this.map.get(n.param):void 0)||[];t.push(ZI(n.value)),this.map.set(n.param,t);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let r=this.map.get(n.param)||[];const s=r.indexOf(ZI(n.value));-1!==s&&r.splice(s,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class T7{constructor(){this.map=new Map}set(n,t){return this.map.set(n,t),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tV(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function nV(e){return typeof Blob<"u"&&e instanceof Blob}function iV(e){return typeof FormData<"u"&&e instanceof FormData}class aD{constructor(n,t,r,s){let c;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function _a(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==r?r:null,c=s):c=r,c&&(this.reportProgress=!!c.reportProgress,this.withCredentials=!!c.withCredentials,c.responseType&&(this.responseType=c.responseType),c.headers&&(this.headers=c.headers),c.context&&(this.context=c.context),c.params&&(this.params=c.params),this.transferCache=c.transferCache),this.headers??=new id,this.context??=new T7,this.params){const h=this.params.toString();if(0===h.length)this.urlWithParams=t;else{const y=t.indexOf("?");this.urlWithParams=t+(-1===y?"?":y$.set(j,n.setHeaders[j]),E)),n.setParams&&(M=Object.keys(n.setParams).reduce(($,j)=>$.set(j,n.setParams[j]),M)),new aD(t,r,c,{params:M,headers:E,context:R,reportProgress:y,responseType:s,withCredentials:h})}}var Dh=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}(Dh||{});class lD{constructor(n,t=Sm.Ok,r="OK"){this.headers=n.headers||new id,this.status=void 0!==n.status?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class cD extends lD{constructor(n={}){super(n),this.type=Dh.ResponseHeader}clone(n={}){return new cD({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class b0 extends lD{constructor(n={}){super(n),this.type=Dh.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new b0({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Lo extends lD{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}var Sm=function(e){return e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e}(Sm||{});function LP(e,n){return{body:n,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 M_=(()=>{class e{constructor(t){this.handler=t}request(t,r,s={}){let c;if(t instanceof aD)c=t;else{let E,M;E=s.headers instanceof id?s.headers:new id(s.headers),s.params&&(M=s.params instanceof D_?s.params:new D_({fromObject:s.params})),c=new aD(t,r,void 0!==s.body?s.body:null,{headers:E,context:s.context,params:M,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}const h=zt(c).pipe(lu(E=>this.handler.handle(E)));if(t instanceof aD||"events"===s.observe)return h;const y=h.pipe(ii(E=>E instanceof b0));switch(s.observe||"body"){case"body":switch(c.responseType){case"arraybuffer":return y.pipe(ye(E=>{if(null!==E.body&&!(E.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return E.body}));case"blob":return y.pipe(ye(E=>{if(null!==E.body&&!(E.body instanceof Blob))throw new Error("Response is not a Blob.");return E.body}));case"text":return y.pipe(ye(E=>{if(null!==E.body&&"string"!=typeof E.body)throw new Error("Response is not a string.");return E.body}));default:return y.pipe(ye(E=>E.body))}case"response":return y;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new D_).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,s={}){return this.request("PATCH",t,LP(s,r))}post(t,r,s={}){return this.request("POST",t,LP(s,r))}put(t,r,s={}){return this.request("PUT",t,LP(s,r))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(S_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function dD(e,n){return n(e)}function O7(e,n){return(t,r)=>n.intercept(t,{handle:s=>e(s,r)})}const $P=new $e(""),fD=new $e(""),BP=new $e(""),oV=new $e("");function R7(){let e=null;return(n,t)=>{null===e&&(e=(Xe($P,{optional:!0})??[]).reduceRight(O7,dD));const r=Xe(Fw),s=r.add();return e(n,t).pipe(nd(()=>r.remove(s)))}}let sV=(()=>{class e extends S_{constructor(t,r){super(),this.backend=t,this.injector=r,this.chain=null,this.pendingTasks=Xe(Fw);const s=Xe(oV,{optional:!0});this.backend=s??t}handle(t){if(null===this.chain){const s=Array.from(new Set([...this.injector.get(fD),...this.injector.get(BP,[])]));this.chain=s.reduceRight((c,h)=>function rV(e,n,t){return(r,s)=>Od(t,()=>n(r,c=>e(c,s)))}(c,h,this.injector),dD)}const r=this.pendingTasks.add();return this.chain(t,s=>this.backend.handle(s)).pipe(nd(()=>this.pendingTasks.remove(r)))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(KI),pe(xo))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const cV=/^\)\]\}',?\n/;let uV=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new _e(-2800,!1);const r=this.xhrFactory;return(r.\u0275loadImpl?Cn(r.\u0275loadImpl()):zt(null)).pipe(Sr(()=>new Qn(c=>{const h=r.build();if(h.open(t.method,t.urlWithParams),t.withCredentials&&(h.withCredentials=!0),t.headers.forEach((ie,me)=>h.setRequestHeader(ie,me.join(","))),t.headers.has("Accept")||h.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const ie=t.detectContentTypeHeader();null!==ie&&h.setRequestHeader("Content-Type",ie)}if(t.responseType){const ie=t.responseType.toLowerCase();h.responseType="json"!==ie?ie:"text"}const y=t.serializeBody();let E=null;const M=()=>{if(null!==E)return E;const ie=h.statusText||"OK",me=new id(h.getAllResponseHeaders()),Me=function P7(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(h)||t.url;return E=new cD({headers:me,status:h.status,statusText:ie,url:Me}),E},R=()=>{let{headers:ie,status:me,statusText:Me,url:Ce}=M(),rt=null;me!==Sm.NoContent&&(rt=typeof h.response>"u"?h.responseText:h.response),0===me&&(me=rt?Sm.Ok:0);let Mt=me>=200&&me<300;if("json"===t.responseType&&"string"==typeof rt){const Et=rt;rt=rt.replace(cV,"");try{rt=""!==rt?JSON.parse(rt):null}catch(Qt){rt=Et,Mt&&(Mt=!1,rt={error:Qt,text:rt})}}Mt?(c.next(new b0({body:rt,headers:ie,status:me,statusText:Me,url:Ce||void 0})),c.complete()):c.error(new Lo({error:rt,headers:ie,status:me,statusText:Me,url:Ce||void 0}))},$=ie=>{const{url:me}=M(),Me=new Lo({error:ie,status:h.status||0,statusText:h.statusText||"Unknown Error",url:me||void 0});c.error(Me)};let j=!1;const X=ie=>{j||(c.next(M()),j=!0);let me={type:Dh.DownloadProgress,loaded:ie.loaded};ie.lengthComputable&&(me.total=ie.total),"text"===t.responseType&&h.responseText&&(me.partialText=h.responseText),c.next(me)},K=ie=>{let me={type:Dh.UploadProgress,loaded:ie.loaded};ie.lengthComputable&&(me.total=ie.total),c.next(me)};return h.addEventListener("load",R),h.addEventListener("error",$),h.addEventListener("timeout",$),h.addEventListener("abort",$),t.reportProgress&&(h.addEventListener("progress",X),null!==y&&h.upload&&h.upload.addEventListener("progress",K)),h.send(y),c.next({type:Dh.Sent}),()=>{h.removeEventListener("error",$),h.removeEventListener("abort",$),h.removeEventListener("load",R),h.removeEventListener("timeout",$),t.reportProgress&&(h.removeEventListener("progress",X),null!==y&&h.upload&&h.upload.removeEventListener("progress",K)),h.readyState!==h.DONE&&h.abort()}})))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BI))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();const hD=new $e(""),VP=new $e("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),jP=new $e("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dV{}let rr=(()=>{class e{constructor(t,r,s){this.doc=t,this.platform=r,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=HF(t,this.cookieName),this.lastCookieString=t),this.lastToken}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(ps),pe(VP))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function eO(e,n){const t=e.url.toLowerCase();if(!Xe(hD)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return n(e);const r=Xe(dV).getToken(),s=Xe(jP);return null!=r&&!e.headers.has(s)&&(e=e.clone({headers:e.headers.set(s,r)})),n(e)}var or=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}(or||{});function $7(...e){const n=[M_,uV,sV,{provide:S_,useExisting:sV},{provide:KI,useExisting:uV},{provide:fD,useValue:eO,multi:!0},{provide:hD,useValue:!0},{provide:dV,useClass:rr}];for(const t of e)n.push(...t.\u0275providers);return function Iu(e){return{\u0275providers:e}}(n)}const fV=new $e("");function z7(){return function Mm(e,n){return{\u0275kind:e,\u0275providers:n}}(or.LegacyInterceptors,[{provide:fV,useFactory:R7},{provide:fD,useExisting:fV,multi:!0}])}let V7=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[$7(z7())]})}return e})();function Mh(e){return null!=e&&"false"!=`${e}`}function r1(e,n=0){return function qP(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}(e)?Number(e):n}function o1(e){return Array.isArray(e)?e:[e]}function Dr(e){return null==e?"":"string"==typeof e?e:`${e}px`}function s1(e){return e instanceof zn?e.nativeElement:e}const{isArray:H7}=Array;function iO(e){return ye(n=>function _V(e,n){return H7(n)?e(...n):e(n)}(e,n))}const So=["addListener","removeListener"],Dc=["addEventListener","removeEventListener"],$o=["on","off"];function Fa(e,n,t,r){if(Jt(t)&&(r=t,t=void 0),r)return Fa(e,n,t).pipe(iO(r));const[s,c]=function a1(e){return Jt(e.addEventListener)&&Jt(e.removeEventListener)}(e)?Dc.map(h=>y=>e[h](n,y,t)):function yV(e){return Jt(e.addListener)&&Jt(e.removeListener)}(e)?So.map(T_(e,n)):function bV(e){return Jt(e.on)&&Jt(e.off)}(e)?$o.map(T_(e,n)):[];if(!s&&_0(e))return Wr(h=>Fa(h,n,t))(Gs(e));if(!s)throw new TypeError("Invalid event target");return new Qn(h=>{const y=(...E)=>h.next(1c(y)})}function T_(e,n){return t=>r=>e[t](n,r)}class _D extends xn{constructor(n,t){super()}schedule(n,t=0){return this}}const gf={setInterval(e,n,...t){const{delegate:r}=gf;return r?.setInterval?r.setInterval(e,n,...t):setInterval(e,n,...t)},clearInterval(e){const{delegate:n}=gf;return(n?.clearInterval||clearInterval)(e)},delegate:void 0};class _f extends _D{constructor(n,t){super(n,t),this.scheduler=n,this.work=t,this.pending=!1}schedule(n,t=0){var r;if(this.closed)return this;this.state=n;const s=this.id,c=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(c,s,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(c,this.id,t),this}requestAsyncId(n,t,r=0){return gf.setInterval(n.flush.bind(n,this),r)}recycleAsyncId(n,t,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&gf.clearInterval(t)}execute(n,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(n,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,t){let s,r=!1;try{this.work(n)}catch(c){r=!0,s=c||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s}unsubscribe(){if(!this.closed){const{id:n,scheduler:t}=this,{actions:r}=t;this.work=this.state=this.scheduler=null,this.pending=!1,io(r,this),null!=n&&(this.id=this.recycleAsyncId(t,n,null)),this.delay=null,super.unsubscribe()}}}const cu={schedule(e){let n=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:r}=cu;r&&(n=r.requestAnimationFrame,t=r.cancelAnimationFrame);const s=n(c=>{t=void 0,e(c)});return new xn(()=>t?.(s))},requestAnimationFrame(...e){const{delegate:n}=cu;return(n?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:n}=cu;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},rO={now:()=>(rO.delegate||Date).now(),delegate:void 0};class l1{constructor(n,t=l1.now){this.schedulerActionCtor=n,this.now=t}schedule(n,t=0,r){return new this.schedulerActionCtor(this,n).schedule(r,t)}}l1.now=rO.now;class oO extends l1{constructor(n,t=l1.now){super(n,t),this.actions=[],this._active=!1}flush(n){const{actions:t}=this;if(this._active)return void t.push(n);let r;this._active=!0;do{if(r=n.execute(n.state,n.delay))break}while(n=t.shift());if(this._active=!1,r){for(;n=t.shift();)n.unsubscribe();throw r}}}new class vV extends oO{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:r}=this;let s;n=n||r.shift();do{if(s=n.execute(n.state,n.delay))break}while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,s){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw s}}}(class GP extends _f{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return null!==r&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=cu.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,t,r=0){var s;if(null!=r?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);const{actions:c}=n;null!=t&&(null===(s=c[c.length-1])||void 0===s?void 0:s.id)!==t&&(cu.cancelAnimationFrame(t),n._scheduled=void 0)}});let XP,uu=1;const yD={};function xV(e){return e in yD&&(delete yD[e],!0)}const bD={setImmediate(e){const n=uu++;return yD[n]=!0,XP||(XP=Promise.resolve()),XP.then(()=>xV(n)&&e()),n},clearImmediate(e){xV(e)}},{setImmediate:sO,clearImmediate:aO}=bD,w0={setImmediate(...e){const{delegate:n}=w0;return(n?.setImmediate||sO)(...e)},clearImmediate(e){const{delegate:n}=w0;return(n?.clearImmediate||aO)(e)},delegate:void 0},c1=(new class cO extends oO{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:r}=this;let s;n=n||r.shift();do{if(s=n.execute(n.state,n.delay))break}while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,s){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw s}}}(class lO extends _f{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return null!==r&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=w0.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,t,r=0){var s;if(null!=r?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);const{actions:c}=n;null!=t&&(null===(s=c[c.length-1])||void 0===s?void 0:s.id)!==t&&(w0.clearImmediate(t),n._scheduled===t&&(n._scheduled=void 0))}}),new oO(_f)),KP=c1;function Pa(e=0,n,t=KP){let r=-1;return null!=n&&(p0(n)?t=n:r=n),new Qn(s=>{let c=function CV(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;c<0&&(c=0);let h=0;return t.schedule(function(){s.closed||(s.next(h++),0<=r?this.schedule(void 0,r):s.complete())},c)})}function cl(e,n=c1){return function EV(e){return be((n,t)=>{let r=!1,s=null,c=null,h=!1;const y=()=>{if(c?.unsubscribe(),c=null,r){r=!1;const M=s;s=null,t.next(M)}h&&t.complete()},E=()=>{c=null,h&&t.complete()};n.subscribe(Se(t,M=>{r=!0,s=M,c||Gs(e(M)).subscribe(c=Se(t,y,E))},()=>{h=!0,(!r||!c||c.closed)&&t.complete()}))})}(()=>Pa(e,n))}function Kn(e){return be((n,t)=>{Gs(e).subscribe(Se(t,()=>t.complete(),Si)),!t.closed&&n.subscribe(t)})}let du;try{du=typeof Intl<"u"&&Intl.v8BreakIterator}catch{du=!1}let u1,Xs=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Eh(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!du)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#e=this.\u0275fac=function(r){return new(r||e)(pe(ps))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function fO(e){return function q7(){if(null==u1&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>u1=!0}))}finally{u1=u1||!1}return u1}()?e:!!e.capture}var Ah=function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e}(Ah||{});let vD,C0,ZP;function DV(){if(null==C0){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return C0=!1,C0;if("scrollBehavior"in document.documentElement.style)C0=!0;else{const e=Element.prototype.scrollTo;C0=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return C0}function xD(){if("object"!=typeof document||!document)return Ah.NORMAL;if(null==vD){const e=document.createElement("div"),n=e.style;e.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";const t=document.createElement("div"),r=t.style;r.width="2px",r.height="1px",e.appendChild(t),document.body.appendChild(e),vD=Ah.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,vD=0===e.scrollLeft?Ah.NEGATED:Ah.INVERTED),e.remove()}return vD}function wD(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function Am(e){return e.composedPath?e.composedPath()[0]:e.target}function QP(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const G7=new $e("cdk-dir-doc",{providedIn:"root",factory:function TV(){return Xe(mi)}}),X7=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let rd=(()=>{class e{constructor(t){this.value="ltr",this.change=new cn,t&&(this.value=function Th(e){const n=e?.toLowerCase()||"";return"auto"===n&&typeof navigator<"u"&&navigator?.language?X7.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(G7,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ED=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})(),hO=(()=>{class e{constructor(t,r,s){this._ngZone=t,this._platform=r,this._scrolled=new It,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const r=this.scrollContainers.get(t);r&&(r.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Qn(r=>{this._globalSubscription||this._addGlobalListener();const s=t>0?this._scrolled.pipe(cl(t)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):zt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(t,r){const s=this.getAncestorScrollContainers(t);return this.scrolled(r).pipe(ii(c=>!c||s.indexOf(c)>-1))}getAncestorScrollContainers(t){const r=[];return this.scrollContainers.forEach((s,c)=>{this._scrollableContainsElement(c,t)&&r.push(c)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,r){let s=s1(r),c=t.getElementRef().nativeElement;do{if(s==c)return!0}while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Fa(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bt),pe(Xs),pe(mi,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),CD=(()=>{class e{constructor(t,r,s,c){this.elementRef=t,this.scrollDispatcher=r,this.ngZone=s,this.dir=c,this._destroyed=new It,this._elementScrolled=new Qn(h=>this.ngZone.runOutsideAngular(()=>Fa(this.elementRef.nativeElement,"scroll").pipe(Kn(this._destroyed)).subscribe(h)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const r=this.elementRef.nativeElement,s=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=s?t.end:t.start),null==t.right&&(t.right=s?t.start:t.end),null!=t.bottom&&(t.top=r.scrollHeight-r.clientHeight-t.bottom),s&&xD()!=Ah.NORMAL?(null!=t.left&&(t.right=r.scrollWidth-r.clientWidth-t.left),xD()==Ah.INVERTED?t.left=t.right:xD()==Ah.NEGATED&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=r.scrollWidth-r.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const r=this.elementRef.nativeElement;DV()?r.scrollTo(t):(null!=t.top&&(r.scrollTop=t.top),null!=t.left&&(r.scrollLeft=t.left))}measureScrollOffset(t){const r="left",s="right",c=this.elementRef.nativeElement;if("top"==t)return c.scrollTop;if("bottom"==t)return c.scrollHeight-c.clientHeight-c.scrollTop;const h=this.dir&&"rtl"==this.dir.value;return"start"==t?t=h?s:r:"end"==t&&(t=h?r:s),h&&xD()==Ah.INVERTED?t==r?c.scrollWidth-c.clientWidth-c.scrollLeft:c.scrollLeft:h&&xD()==Ah.NEGATED?t==r?c.scrollLeft+c.scrollWidth-c.clientWidth:-c.scrollLeft:t==r?c.scrollLeft:c.scrollWidth-c.clientWidth-c.scrollLeft}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(hO),ue(Bt),ue(rd,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}return e})(),pO=(()=>{class e{constructor(t,r,s){this._platform=t,this._change=new It,this._changeListener=c=>{this._change.next(c)},this._document=s,r.runOutsideAngular(()=>{if(t.isBrowser){const c=this._getWindow();c.addEventListener("resize",this._changeListener),c.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:r,height:s}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+s,right:t.left+r,height:s,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,r=this._getWindow(),s=t.documentElement,c=s.getBoundingClientRect();return{top:-c.top||t.body.scrollTop||r.scrollY||s.scrollTop||0,left:-c.left||t.body.scrollLeft||r.scrollX||s.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(cl(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Bt),pe(mi,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Tm=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})(),RV=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[ED,Tm,ED,Tm]})}return e})();function kh(e,...n){return n.length?n.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}function Do(e,n,t){const r=Jt(e)||n||t?{next:e,error:n,complete:t}:e;return r?be((s,c)=>{var h;null===(h=r.subscribe)||void 0===h||h.call(r);let y=!0;s.subscribe(Se(c,E=>{var M;null===(M=r.next)||void 0===M||M.call(r,E),c.next(E)},()=>{var E;y=!1,null===(E=r.complete)||void 0===E||E.call(r),c.complete()},E=>{var M;y=!1,null===(M=r.error)||void 0===M||M.call(r,E),c.error(E)},()=>{var E,M;y&&(null===(E=r.unsubscribe)||void 0===E||E.call(r)),null===(M=r.finalize)||void 0===M||M.call(r)}))}):Wi}function SD(e,n=c1){return be((t,r)=>{let s=null,c=null,h=null;const y=()=>{if(s){s.unsubscribe(),s=null;const M=c;c=null,r.next(M)}};function E(){const M=h+e,R=n.now();if(R{c=M,h=n.now(),s||(s=n.schedule(E,e),r.add(s))},()=>{y(),r.complete()},void 0,()=>{c=s=null}))})}const Hl=new Qn(e=>e.complete());function Bo(e){return e<=0?()=>Hl:be((n,t)=>{let r=0;n.subscribe(Se(t,s=>{++r<=e&&(t.next(s),e<=r&&t.complete())}))})}function DD(e){return ii((n,t)=>e<=t)}function Ih(e,n=Wi){return e=e??C9,be((t,r)=>{let s,c=!0;t.subscribe(Se(r,h=>{const y=n(h);(c||!e(s,y))&&(c=!1,s=y,r.next(h))}))})}function C9(e,n){return e===n}let qV=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),GV=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[qV]})}return e})();const{isArray:D9}=Array,{getPrototypeOf:M9,prototype:XV,keys:A9}=Object;function YV(e){if(1===e.length){const n=e[0];if(D9(n))return{args:n,keys:null};if(function T9(e){return e&&"object"==typeof e&&M9(e)===XV}(n)){const t=A9(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}function KV(e,n){return e.reduce((t,r,s)=>(t[r]=n[s],t),{})}function d1(...e){const n=iD(e),t=P5(e),{args:r,keys:s}=YV(e);if(0===r.length)return Cn([],n);const c=new Qn(function k9(e,n,t=Wi){return r=>{MD(n,()=>{const{length:s}=e,c=new Array(s);let h=s,y=s;for(let E=0;E{const M=Cn(e[E],n);let R=!1;M.subscribe(Se(r,$=>{c[E]=$,R||(R=!0,y--),y||r.next(t(c.slice()))},()=>{--h||r.complete()}))},r)},r)}}(r,n,s?h=>KV(s,h):Wi));return t?c.pipe(iO(t)):c}function MD(e,n,t){e?Cm(t,e,n):n()}function f1(e=1/0){return Wr(Wi,e)}function AD(...e){return function ZV(){return f1(1)}()(Cn(e,iD(e)))}function Wl(...e){const n=iD(e);return be((t,r)=>{(n?AD(e,t,n):AD(e,t)).subscribe(r)})}const QV=new Set;let Ys,I9=(()=>{class e{constructor(t,r){this._platform=t,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):R9}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function O9(e,n){if(!QV.has(e))try{Ys||(Ys=document.createElement("style"),n&&(Ys.nonce=n),Ys.setAttribute("type","text/css"),document.head.appendChild(Ys)),Ys.sheet&&(Ys.sheet.insertRule(`@media ${e} {body{ }}`,0),QV.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Xv,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function R9(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let N9=(()=>{class e{constructor(t,r){this._mediaMatcher=t,this._zone=r,this._queries=new Map,this._destroySubject=new It}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return JV(o1(t)).some(s=>this._registerQuery(s).mql.matches)}observe(t){let c=d1(JV(o1(t)).map(h=>this._registerQuery(h).observable));return c=AD(c.pipe(Bo(1)),c.pipe(DD(1),SD(0))),c.pipe(ye(h=>{const y={matches:!1,breakpoints:{}};return h.forEach(({matches:E,query:M})=>{y.matches=y.matches||E,y.breakpoints[M]=E}),y}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const r=this._mediaMatcher.matchMedia(t),c={observable:new Qn(h=>{const y=E=>this._zone.run(()=>h.next(E));return r.addListener(y),()=>{r.removeListener(y)}}).pipe(Wl(r),ye(({matches:h})=>({query:t,matches:h})),Kn(this._destroySubject)),mql:r};return this._queries.set(t,c),c}static#e=this.\u0275fac=function(r){return new(r||e)(pe(I9),pe(Bt))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function JV(e){return e.map(n=>n.split(",")).reduce((n,t)=>n.concat(t)).map(n=>n.trim())}function tj(e,n,t){const r=nj(e,n);t=t.trim();const s=r.filter(c=>c!==t);s.length?e.setAttribute(n,s.join(" ")):e.removeAttribute(n)}function nj(e,n){return e.getAttribute(n)?.match(/\S+/g)??[]}class wO{constructor(n){this._items=n,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new It,this._typeaheadSubscription=xn.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new It,this.change=new It,n instanceof Xb&&(this._itemChangesSubscription=n.changes.subscribe(t=>{if(this._activeItem){const s=t.toArray().indexOf(this._activeItem);s>-1&&s!==this._activeItemIndex&&(this._activeItemIndex=s)}}))}skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Do(t=>this._pressedLetters.push(t)),SD(n),ii(()=>this._pressedLetters.length>0),ye(()=>this._pressedLetters.join(""))).subscribe(t=>{const r=this._getItemsArray();for(let s=1;s!n[c]||this._allowedModifierKeys.indexOf(c)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&s){this.setNextItemActive();break}return;case 38:if(this._vertical&&s){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&s){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&s){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&s){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&s){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&s){const c=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(c>0?c:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&s){const c=this._activeItemIndex+this._pageUpAndDown.delta,h=this._getItemsArray().length;this._setActiveItemByIndex(c=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],n.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(n){const t=this._getItemsArray(),r="number"==typeof n?n:t.indexOf(n);this._activeItem=t[r]??null,this._activeItemIndex=r}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(n){this._wrap?this._setActiveInWrapMode(n):this._setActiveInDefaultMode(n)}_setActiveInWrapMode(n){const t=this._getItemsArray();for(let r=1;r<=t.length;r++){const s=(this._activeItemIndex+n*r+t.length)%t.length;if(!this._skipPredicateFn(t[s]))return void this.setActiveItem(s)}}_setActiveInDefaultMode(n){this._setActiveItemByIndex(this._activeItemIndex+n,n)}_setActiveItemByIndex(n,t){const r=this._getItemsArray();if(r[n]){for(;this._skipPredicateFn(r[n]);)if(!r[n+=t])return;this.setActiveItem(n)}}_getItemsArray(){return this._items instanceof Xb?this._items.toArray():this._items}}class TD extends wO{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}}class L9 extends wO{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}}let h1=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function B9(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const r=function oL(e){try{return e.frameElement}catch{return null}}(function aj(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(r&&(-1===oj(r)||!this.isVisible(r)))return!1;let s=t.nodeName.toLowerCase(),c=oj(t);return t.hasAttribute("contenteditable")?-1!==c:!("iframe"===s||"object"===s||this._platform.WEBKIT&&this._platform.IOS&&!function U9(e){let n=e.nodeName.toLowerCase(),t="input"===n&&e.type;return"text"===t||"password"===t||"select"===n||"textarea"===n}(t))&&("audio"===s?!!t.hasAttribute("controls")&&-1!==c:"video"===s?-1!==c&&(null!==c||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,r){return function sj(e){return!function z9(e){return function aL(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function sL(e){let n=e.nodeName.toLowerCase();return"input"===n||"select"===n||"button"===n||"textarea"===n}(e)||function V9(e){return function j9(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||EO(e))}(t)&&!this.isDisabled(t)&&(r?.ignoreVisibility||this.isVisible(t))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function EO(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let n=e.getAttribute("tabindex");return!(!n||isNaN(parseInt(n,10)))}function oj(e){if(!EO(e))return null;const n=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}class lL{get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}constructor(n,t,r,s,c=!1){this._element=n,this._checker=t,this._ngZone=r,this._document=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,c||this.attachAnchors()}destroy(){const n=this._startAnchor,t=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){const t=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return"start"==n?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const r=this._getFirstTabbableElement(t);return r?.focus(n),!!r}return t.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){const t=this._getRegionBoundary("start");return t&&t.focus(n),!!t}focusLastTabbableElement(n){const t=this._getRegionBoundary("end");return t&&t.focus(n),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;const t=n.children;for(let r=0;r=0;r--){const s=t[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[r]):null;if(s)return s}return null}_createAnchor(){const n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,t){n?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._ngZone.isStable?n():this._ngZone.onStable.pipe(Bo(1)).subscribe(n)}}let CO=(()=>{class e{constructor(t,r,s){this._checker=t,this._ngZone=r,this._document=s}create(t,r=!1){return new lL(t,this._checker,this._ngZone,this._document,r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(h1),pe(Bt),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lj(e){return 0===e.buttons||0===e.detail}function cj(e){const n=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!n||-1!==n.identifier||null!=n.radiusX&&1!==n.radiusX||null!=n.radiusY&&1!==n.radiusY)}const q9=new $e("cdk-input-modality-detector-options"),G9={ignoreKeys:[18,17,224,91,16]},p1=fO({passive:!0,capture:!0});let dj=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,r,s,c){this._platform=t,this._mostRecentTarget=null,this._modality=new wr(null),this._lastTouchMs=0,this._onKeydown=h=>{this._options?.ignoreKeys?.some(y=>y===h.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Am(h))},this._onMousedown=h=>{Date.now()-this._lastTouchMs<650||(this._modality.next(lj(h)?"keyboard":"mouse"),this._mostRecentTarget=Am(h))},this._onTouchstart=h=>{cj(h)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Am(h))},this._options={...G9,...c},this.modalityDetected=this._modality.pipe(DD(1)),this.modalityChanged=this.modalityDetected.pipe(Ih()),t.isBrowser&&r.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,p1),s.addEventListener("mousedown",this._onMousedown,p1),s.addEventListener("touchstart",this._onTouchstart,p1)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,p1),document.removeEventListener("mousedown",this._onMousedown,p1),document.removeEventListener("touchstart",this._onTouchstart,p1))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(Bt),pe(mi),pe(q9,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const fj=new $e("liveAnnouncerElement",{providedIn:"root",factory:function X9(){return null}}),hj=new $e("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let SO=0,pj=(()=>{class e{constructor(t,r,s,c){this._ngZone=r,this._defaultOptions=c,this._document=s,this._liveElement=t||this._createLiveElement()}announce(t,...r){const s=this._defaultOptions;let c,h;return 1===r.length&&"number"==typeof r[0]?h=r[0]:[c,h]=r,this.clear(),clearTimeout(this._previousTimeout),c||(c=s&&s.politeness?s.politeness:"polite"),null==h&&s&&(h=s.duration),this._liveElement.setAttribute("aria-live",c),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(y=>this._currentResolve=y)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof h&&(this._previousTimeout=setTimeout(()=>this.clear(),h)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",r=this._document.getElementsByClassName(t),s=this._document.createElement("div");for(let c=0;c .cdk-overlay-container [aria-modal="true"]');for(let s=0;s{class e{constructor(t,r,s,c,h){this._ngZone=t,this._platform=r,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new It,this._rootNodeFocusAndBlurListener=y=>{for(let M=Am(y);M;M=M.parentElement)"focus"===y.type?this._onFocus(y,M):this._onBlur(y,M)},this._document=c,this._detectionMode=h?.detectionMode||kD.IMMEDIATE}monitor(t,r=!1){const s=s1(t);if(!this._platform.isBrowser||1!==s.nodeType)return zt();const c=function AV(e){if(function MV(){if(null==ZP){const e=typeof document<"u"?document.head:null;ZP=!(!e||!e.createShadowRoot&&!e.attachShadow)}return ZP}()){const n=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}(s)||this._getDocument(),h=this._elementInfo.get(s);if(h)return r&&(h.checkChildren=!0),h.subject;const y={checkChildren:r,subject:new It,rootNode:c};return this._elementInfo.set(s,y),this._registerGlobalListeners(y),y.subject}stopMonitoring(t){const r=s1(t),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(t,r,s){const c=s1(t);c===this._getDocument().activeElement?this._getClosestElementsInfo(c).forEach(([y,E])=>this._originChanged(y,r,E)):(this._setOrigin(r),"function"==typeof c.focus&&c.focus(s))}ngOnDestroy(){this._elementInfo.forEach((t,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===kD.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,r){t.classList.toggle("cdk-focused",!!r),t.classList.toggle("cdk-touch-focused","touch"===r),t.classList.toggle("cdk-keyboard-focused","keyboard"===r),t.classList.toggle("cdk-mouse-focused","mouse"===r),t.classList.toggle("cdk-program-focused","program"===r)}_setOrigin(t,r=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&r,this._detectionMode===kD.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,r){const s=this._elementInfo.get(r),c=Am(t);!s||!s.checkChildren&&r!==c||this._originChanged(r,this._getFocusOrigin(c),s)}_onBlur(t,r){const s=this._elementInfo.get(r);!s||s.checkChildren&&t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(this._setClasses(r),this._emitOrigin(s,null))}_emitOrigin(t,r){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(r))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const r=t.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,D0),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,D0)}),this._rootNodeFocusListenerCount.set(r,s+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Kn(this._stopInputModalityDetector)).subscribe(c=>{this._setOrigin(c,!0)}))}_removeGlobalListeners(t){const r=t.rootNode;if(this._rootNodeFocusListenerCount.has(r)){const s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,D0),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,D0),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,r,s){this._setClasses(t,r),this._emitOrigin(s,r),this._lastFocusOrigin=r}_getClosestElementsInfo(t){const r=[];return this._elementInfo.forEach((s,c)=>{(c===t||s.checkChildren&&c.contains(t))&&r.push([c,s])}),r}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:r,mostRecentModality:s}=this._inputModalityDetector;if("mouse"!==s||!r||r===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const c=t.labels;if(c)for(let h=0;h{class e{constructor(t,r){this._platform=t,this._document=r,this._breakpointSubscription=Xe(N9).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return I_.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const r=this._document.defaultView||window,s=r&&r.getComputedStyle?r.getComputedStyle(t):null,c=(s&&s.backgroundColor||"").replace(/ /g,"");switch(t.remove(),c){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return I_.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return I_.BLACK_ON_WHITE}return I_.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(uL,mj,cL),this._hasCheckedHighContrastMode=!0;const r=this.getHighContrastMode();r===I_.BLACK_ON_WHITE?t.add(uL,mj):r===I_.WHITE_ON_BLACK&&t.add(uL,cL)}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Xs),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Q9=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gj))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[GV]})}return e})();const yj=["text"];function tW(e,n){if(1&e&&Wt(0,"mat-pseudo-checkbox",6),2&e){const t=on();vt("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function ID(e,n){1&e&&Wt(0,"mat-pseudo-checkbox",7),2&e&&vt("disabled",on().disabled)}function bj(e,n){if(1&e&&(Ae(0,"span",8),wt(1),ke()),2&e){const t=on();Ze(),lf("(",t.group.label,")")}}const dL=[[["mat-icon"]],"*"],nW=["mat-icon","*"],ya=new $e("mat-sanity-checks",{providedIn:"root",factory:function iW(){return!0}});let rs=(()=>{class e{constructor(t,r,s){this._sanityChecks=r,this._document=s,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!QP()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gj),pe(ya,8),pe(mi))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[ED,ED]})}return e})();class Cj{constructor(n,t,r,s,c){this._defaultMatcher=n,this.ngControl=t,this._parentFormGroup=r,this._parentForm=s,this._stateChanges=c,this.errorState=!1}updateErrorState(){const n=this.errorState,t=this._parentFormGroup||this._parentForm,r=this.matcher||this._defaultMatcher,s=this.ngControl?this.ngControl.control:null,c=r?.isErrorState(s,t)??!1;c!==n&&(this.errorState=c,this._stateChanges.next())}}let lW=(()=>{class e{isErrorState(t,r){return!!(t&&t.invalid&&(t.touched||r&&r.submitted))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var od=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(od||{});class uW{constructor(n,t,r,s=!1){this._renderer=n,this.element=t,this.config=r,this._animationForciblyDisabledThroughCss=s,this.state=od.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const ND=fO({passive:!0,capture:!0});class Mj{constructor(){this._events=new Map,this._delegateEventHandler=n=>{const t=Am(n);t&&this._events.get(n.type)?.forEach((r,s)=>{(s===t||s.contains(t))&&r.forEach(c=>c.handleEvent(n))})}}addHandler(n,t,r,s){const c=this._events.get(t);if(c){const h=c.get(r);h?h.add(s):c.set(r,new Set([s]))}else this._events.set(t,new Map([[r,new Set([s])]])),n.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,ND)})}removeHandler(n,t,r){const s=this._events.get(n);if(!s)return;const c=s.get(t);c&&(c.delete(r),0===c.size&&s.delete(t),0===s.size&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,ND)))}}const hL={enterDuration:225,exitDuration:150},Aj=fO({passive:!0,capture:!0}),pL=["mousedown","touchstart"],Tj=["mouseup","mouseleave","touchend","touchcancel"];class MO{static#e=this._eventManager=new Mj;constructor(n,t,r,s){this._target=n,this._ngZone=t,this._platform=s,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,s.isBrowser&&(this._containerElement=s1(r))}fadeInRipple(n,t,r={}){const s=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),c={...hL,...r.animation};r.centered&&(n=s.left+s.width/2,t=s.top+s.height/2);const h=r.radius||function fW(e,n,t){const r=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),s=Math.max(Math.abs(n-t.top),Math.abs(n-t.bottom));return Math.sqrt(r*r+s*s)}(n,t,s),y=n-s.left,E=t-s.top,M=c.enterDuration,R=document.createElement("div");R.classList.add("mat-ripple-element"),R.style.left=y-h+"px",R.style.top=E-h+"px",R.style.height=2*h+"px",R.style.width=2*h+"px",null!=r.color&&(R.style.backgroundColor=r.color),R.style.transitionDuration=`${M}ms`,this._containerElement.appendChild(R);const $=window.getComputedStyle(R),X=$.transitionDuration,K="none"===$.transitionProperty||"0s"===X||"0s, 0s"===X||0===s.width&&0===s.height,ie=new uW(this,R,r,K);R.style.transform="scale3d(1, 1, 1)",ie.state=od.FADING_IN,r.persistent||(this._mostRecentTransientRipple=ie);let me=null;return!K&&(M||c.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Me=()=>this._finishRippleTransition(ie),Ce=()=>this._destroyRipple(ie);R.addEventListener("transitionend",Me),R.addEventListener("transitioncancel",Ce),me={onTransitionEnd:Me,onTransitionCancel:Ce}}),this._activeRipples.set(ie,me),(K||!M)&&this._finishRippleTransition(ie),ie}fadeOutRipple(n){if(n.state===od.FADING_OUT||n.state===od.HIDDEN)return;const t=n.element,r={...hL,...n.config.animation};t.style.transitionDuration=`${r.exitDuration}ms`,t.style.opacity="0",n.state=od.FADING_OUT,(n._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){const t=s1(n);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,pL.forEach(r=>{MO._eventManager.addHandler(this._ngZone,r,t,this)}))}handleEvent(n){"mousedown"===n.type?this._onMousedown(n):"touchstart"===n.type?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Tj.forEach(t=>{this._triggerElement.addEventListener(t,this,Aj)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===od.FADING_IN?this._startFadeOutTransition(n):n.state===od.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){const t=n===this._mostRecentTransientRipple,{persistent:r}=n.config;n.state=od.VISIBLE,!r&&(!t||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){const t=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=od.HIDDEN,null!==t&&(n.element.removeEventListener("transitionend",t.onTransitionEnd),n.element.removeEventListener("transitioncancel",t.onTransitionCancel)),n.element.remove()}_onMousedown(n){const t=lj(n),r=this._lastTouchStartEvent&&Date.now(){!n.config.persistent&&(n.state===od.VISIBLE||n.config.terminateOnPointerUp&&n.state===od.FADING_IN)&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const n=this._triggerElement;n&&(pL.forEach(t=>MO._eventManager.removeHandler(t,n,this)),this._pointerUpEventsRegistered&&Tj.forEach(t=>n.removeEventListener(t,this,Aj)))}}const kj=new $e("mat-ripple-global-options");let Ij=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,r,s,c,h){this._elementRef=t,this._animationMode=h,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=c||{},this._rippleRenderer=new MO(this,r,t,s)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,r=0,s){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,r,{...this.rippleConfig,...s}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt),ue(Xs),ue(kj,8),ue(Ko,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-ripple-unbounded",s.unbounded)},inputs:{color:[ht.None,"matRippleColor","color"],unbounded:[ht.None,"matRippleUnbounded","unbounded"],centered:[ht.None,"matRippleCentered","centered"],radius:[ht.None,"matRippleRadius","radius"],animation:[ht.None,"matRippleAnimation","animation"],disabled:[ht.None,"matRippleDisabled","disabled"],trigger:[ht.None,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}return e})(),mL=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),Oj=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,s){2&r&&In("mat-pseudo-checkbox-indeterminate","indeterminate"===s.state)("mat-pseudo-checkbox-checked","checked"===s.state)("mat-pseudo-checkbox-disabled",s.disabled)("mat-pseudo-checkbox-minimal","minimal"===s.appearance)("mat-pseudo-checkbox-full","full"===s.appearance)("_mat-animation-noopable","NoopAnimations"===s._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[xi],decls:0,vars:0,template:function(r,s){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return e})(),gL=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs]})}return e})();const FD=new $e("MAT_OPTION_PARENT_COMPONENT"),pn=new $e("MatOptgroup");let yL=0;class Rj{constructor(n,t=!1){this.source=n,this.isUserInput=t}}let bL=(()=>{class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,r,s,c){this._element=t,this._changeDetectorRef=r,this._parent=s,this.group=c,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+yL++,this.onSelectionChange=new cn,this._stateChanges=new It}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,r){const s=this._getHostElement();"function"==typeof s.focus&&s.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!kh(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new Rj(this,t))}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Qo),ue(FD,8),ue(pn,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-option"]],viewQuery:function(r,s){if(1&r&&ha(yj,7),2&r){let c;zi(c=Pi())&&(s._text=c.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,s){1&r&&yn("click",function(){return s._selectViaInteraction()})("keydown",function(h){return s._handleKeydown(h)}),2&r&&(Vb("id",s.id),hi("aria-selected",s.selected)("aria-disabled",s.disabled.toString()),In("mdc-list-item--selected",s.selected)("mat-mdc-option-multiple",s.multiple)("mat-mdc-option-active",s.active)("mdc-list-item--disabled",s.disabled))},inputs:{value:"value",id:"id",disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[Vs,xi],ngContentSelectors:nW,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox","aria-hidden","true",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","aria-hidden","true","appearance","minimal",3,"disabled"],["class","cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(r,s){1&r&&(Ra(dL),en(0,tW,1,2,"mat-pseudo-checkbox",0),ki(1),Ae(2,"span",1,2),ki(4,1),ke(),en(5,ID,1,1,"mat-pseudo-checkbox",3)(6,bj,2,1,"span",4),Wt(7,"div",5)),2&r&&(eo(0,s.multiple?0:-1),Ze(5),eo(5,s.multiple||!s.selected||s.hideSingleSelectionIndicator?-1:5),Ze(),eo(6,s.group&&s.group._inert?6:-1),Ze(),vt("matRippleTrigger",s._getHostElement())("matRippleDisabled",s.disabled||s.disableRipple))},dependencies:[Oj,Ij],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})(),Nj=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mL,rs,gL]})}return e})();const PD={capture:!0},TO=["focus","click","mouseenter","touchstart"],LD="mat-ripple-loader-uninitialized",os="mat-ripple-loader-class-name",Fj="mat-ripple-loader-centered",M0="mat-ripple-loader-disabled";let bf=(()=>{class e{constructor(){this._document=Xe(mi,{optional:!0}),this._animationMode=Xe(Ko,{optional:!0}),this._globalRippleOptions=Xe(kj,{optional:!0}),this._platform=Xe(Xs),this._ngZone=Xe(Bt),this._hosts=new Map,this._onInteraction=t=>{if(!(t.target instanceof HTMLElement))return;const s=t.target.closest(`[${LD}]`);s&&this._createRipple(s)},this._ngZone.runOutsideAngular(()=>{for(const t of TO)this._document?.addEventListener(t,this._onInteraction,PD)})}ngOnDestroy(){const t=this._hosts.keys();for(const r of t)this.destroyRipple(r);for(const r of TO)this._document?.removeEventListener(r,this._onInteraction,PD)}configureRipple(t,r){t.setAttribute(LD,""),(r.className||!t.hasAttribute(os))&&t.setAttribute(os,r.className||""),r.centered&&t.setAttribute(Fj,""),r.disabled&&t.setAttribute(M0,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,r){const s=this._hosts.get(t);s?s.disabled=r:r?t.setAttribute(M0,""):t.removeAttribute(M0)}_createRipple(t){if(!this._document)return;const r=this._hosts.get(t);if(r)return r;t.querySelector(".mat-ripple")?.remove();const s=this._document.createElement("span");s.classList.add("mat-ripple",t.getAttribute(os)),t.append(s);const c=new Ij(new zn(s),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return c._isInitialized=!0,c.trigger=t,c.centered=t.hasAttribute(Fj),c.disabled=t.hasAttribute(M0),this.attachRipple(t,c),c}attachRipple(t,r){t.removeAttribute(LD),this._hosts.set(t,r)}destroyRipple(t){const r=this._hosts.get(t);r&&(r.ngOnDestroy(),this._hosts.delete(t))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Oh(...e){const n=iD(e),t=function L5(e,n){return"number"==typeof m0(e)?e.pop():n}(e,1/0),r=e;return r.length?1===r.length?Gs(r[0]):f1(t)(Cn(r,n)):Hl}function R_(e){return ye(()=>e)}var Pn=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}(Pn||{});const Im="*";function A0(e,n){return{type:Pn.Trigger,name:e,definitions:n,options:{}}}function Om(e,n=null){return{type:Pn.Animate,styles:n,timings:e}}function La(e){return{type:Pn.Style,styles:e,offset:null}}function Rh(e,n,t){return{type:Pn.State,name:e,styles:n,options:t}}function Nh(e,n,t=null){return{type:Pn.Transition,expr:e,animation:n,options:t}}function _r(e=null){return{type:Pn.AnimateChild,options:e}}function vL(e,n,t=null){return{type:Pn.Query,selector:e,animation:n,options:t}}class $D{constructor(n=0,t=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=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}class Pj{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let t=0,r=0,s=0;const c=this.players.length;0==c?queueMicrotask(()=>this._onFinish()):this.players.forEach(h=>{h.onDone(()=>{++t==c&&this._onFinish()}),h.onDestroy(()=>{++r==c&&this._onDestroy()}),h.onStart(()=>{++s==c&&this._onStart()})}),this.totalTime=this.players.reduce((h,y)=>Math.max(h,y.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const t=n*this.totalTime;this.players.forEach(r=>{const s=r.totalTime?Math.min(1,t/r.totalTime):1;r.setPosition(s)})}getPosition(){const n=this.players.reduce((t,r)=>null===t||r.totalTime>t.totalTime?r:t,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}const IO=["*"],EW=["content"];function CW(e,n){if(1&e){const t=Oa();Ae(0,"div",1),yn("click",function(){return hs(t),so(on()._onBackdropClicked())}),ke()}2&e&&In("mat-drawer-shown",on()._isShowingBackdrop())}function SW(e,n){1&e&&(Ae(0,"mat-drawer-content"),ki(1,2),ke())}const Lj=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],DW=["mat-drawer","mat-drawer-content","*"];function MW(e,n){if(1&e){const t=Oa();Ae(0,"div",1),yn("click",function(){return hs(t),so(on()._onBackdropClicked())}),ke()}2&e&&In("mat-drawer-shown",on()._isShowingBackdrop())}function AW(e,n){1&e&&(Ae(0,"mat-sidenav-content"),ki(1,2),ke())}const $j=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],TW=["mat-sidenav","mat-sidenav-content","*"],Bj={transformDrawer:A0("transform",[Rh("open, open-instant",La({transform:"none",visibility:"visible"})),Rh("void",La({"box-shadow":"none",visibility:"hidden"})),Nh("void => open-instant",Om("0ms")),Nh("void <=> open, open-instant => void",Om("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},IW=new $e("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function zj(){return!1}}),wL=new $e("MAT_DRAWER_CONTAINER");let OO=(()=>{class e extends CD{constructor(t,r,s,c,h){super(s,c,h),this._changeDetectorRef=t,this._container=r}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue(di(()=>fu)),ue(zn),ue(hO),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(r,s){2&r&&_h("margin-left",s._container._contentMargins.left,"px")("margin-right",s._container._contentMargins.right,"px")},standalone:!0,features:[ni([{provide:CD,useExisting:e}]),wn,xi],ngContentSelectors:IO,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},encapsulation:2,changeDetection:0})}return e})(),Vj=(()=>{class e{get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=Mh(t)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=Mh(t)),this._autoFocus=t}get opened(){return this._opened}set opened(t){this.toggle(Mh(t))}constructor(t,r,s,c,h,y,E,M){this._elementRef=t,this._focusTrapFactory=r,this._focusMonitor=s,this._platform=c,this._ngZone=h,this._interactivityChecker=y,this._doc=E,this._container=M,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new It,this._animationEnd=new It,this._animationState="void",this.openedChange=new cn(!0),this._openedStream=this.openedChange.pipe(ii(R=>R),ye(()=>{})),this.openedStart=this._animationStarted.pipe(ii(R=>R.fromState!==R.toState&&0===R.toState.indexOf("open")),R_(void 0)),this._closedStream=this.openedChange.pipe(ii(R=>!R),ye(()=>{})),this.closedStart=this._animationStarted.pipe(ii(R=>R.fromState!==R.toState&&"void"===R.toState),R_(void 0)),this._destroyed=new It,this.onPositionChanged=new cn,this._modeChanged=new It,this.openedChange.subscribe(R=>{R?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Fa(this._elementRef.nativeElement,"keydown").pipe(ii(R=>27===R.keyCode&&!this.disableClose&&!kh(R)),Kn(this._destroyed)).subscribe(R=>this._ngZone.run(()=>{this.close(),R.stopPropagation(),R.preventDefault()}))}),this._animationEnd.pipe(Ih((R,$)=>R.fromState===$.fromState&&R.toState===$.toState)).subscribe(R=>{const{fromState:$,toState:j}=R;(0===j.indexOf("open")&&"void"===$||"void"===j&&0===$.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(t,r){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const s=()=>{t.removeEventListener("blur",s),t.removeEventListener("mousedown",s),t.removeAttribute("tabindex")};t.addEventListener("blur",s),t.addEventListener("mousedown",s)})),t.focus(r)}_focusByCssSelector(t,r){let s=this._elementRef.nativeElement.querySelector(t);s&&this._forceFocus(s,r)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(r=>{!r&&"function"==typeof this._elementRef.nativeElement.focus&&t.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,r){t&&r&&(this._openedVia=r);const s=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),s}_setOpen(t,r,s){return this._opened=t,t?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",r&&this._restoreFocus(s)),this._updateFocusTrapState(),new Promise(c=>{this.openedChange.pipe(Bo(1)).subscribe(h=>c(h?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const r=this._elementRef.nativeElement,s=r.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),s.insertBefore(this._anchor,r)),s.appendChild(r)):this._anchor&&this._anchor.parentNode.insertBefore(r,this._anchor)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(k_),ue(Xs),ue(Bt),ue(h1),ue(mi,8),ue(wL,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer"]],viewQuery:function(r,s){if(1&r&&ha(EW,5),2&r){let c;zi(c=Pi())&&(s._content=c.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(r,s){1&r&&gN("@transform.start",function(h){return s._animationStarted.next(h)})("@transform.done",function(h){return s._animationEnd.next(h)}),2&r&&(hi("align",null),YR("@transform",s._animationState),In("mat-drawer-end","end"===s.position)("mat-drawer-over","over"===s.mode)("mat-drawer-push","push"===s.mode)("mat-drawer-side","side"===s.mode)("mat-drawer-opened",s.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[xi],ngContentSelectors:IO,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(r,s){1&r&&(Ra(),Ae(0,"div",0,1),ki(2),ke())},dependencies:[CD],encapsulation:2,data:{animation:[Bj.transformDrawer]},changeDetection:0})}return e})(),fu=(()=>{class e{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=Mh(t)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:Mh(t)}get scrollable(){return this._userContent||this._content}constructor(t,r,s,c,h,y=!1,E){this._dir=t,this._element=r,this._ngZone=s,this._changeDetectorRef=c,this._animationMode=E,this._drawers=new Xb,this.backdropClick=new cn,this._destroyed=new It,this._doCheckSubject=new It,this._contentMargins={left:null,right:null},this._contentMarginChanges=new It,t&&t.change.pipe(Kn(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),h.change().pipe(Kn(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=y}ngAfterContentInit(){this._allDrawers.changes.pipe(Wl(this._allDrawers),Kn(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(r=>!r._container||r._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Wl(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(SD(10),Kn(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,r=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const s=this._left._getWidth();t+=s,r-=s}if(this._right&&this._right.opened)if("side"==this._right.mode)r+=this._right._getWidth();else if("push"==this._right.mode){const s=this._right._getWidth();r+=s,t-=s}t=t||null,r=r||null,(t!==this._contentMargins.left||r!==this._contentMargins.right)&&(this._contentMargins={left:t,right:r},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(ii(r=>r.fromState!==r.toState),Kn(this._drawers.changes)).subscribe(r=>{"open-instant"!==r.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Kn(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Kn(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Bo(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Kn(Oh(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const r=this._element.nativeElement.classList,s="mat-drawer-container-has-open";t?r.add(s):r.remove(s)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static#e=this.\u0275fac=function(r){return new(r||e)(ue(rd,8),ue(zn),ue(Bt),ue(Qo),ue(pO),ue(IW),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,OO,5),vs(c,Vj,5)),2&r){let h;zi(h=Pi())&&(s._content=h.first),zi(h=Pi())&&(s._allDrawers=h)}},viewQuery:function(r,s){if(1&r&&ha(OO,5),2&r){let c;zi(c=Pi())&&(s._userContent=c.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-drawer-container-explicit-backdrop",s._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[ni([{provide:wL,useExisting:e}]),xi],ngContentSelectors:DW,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,s){1&r&&(Ra(Lj),en(0,CW,1,2,"div",0),ki(1),ki(2,1),en(3,SW,2,0,"mat-drawer-content")),2&r&&(eo(0,s.hasBackdrop?0:-1),Ze(3),eo(3,s._content?-1:3))},dependencies:[OO],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),g1=(()=>{class e extends OO{constructor(t,r,s,c,h){super(t,r,s,c,h)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue(di(()=>RO)),ue(zn),ue(hO),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(r,s){2&r&&_h("margin-left",s._container._contentMargins.left,"px")("margin-right",s._container._contentMargins.right,"px")},standalone:!0,features:[ni([{provide:CD,useExisting:e}]),wn,xi],ngContentSelectors:IO,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},encapsulation:2,changeDetection:0})}return e})(),BD=(()=>{class e extends Vj{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=Mh(t)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=r1(t)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=r1(t)}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(r,s){2&r&&(hi("align",null),_h("top",s.fixedInViewport?s.fixedTopGap:null,"px")("bottom",s.fixedInViewport?s.fixedBottomGap:null,"px"),In("mat-drawer-end","end"===s.position)("mat-drawer-over","over"===s.mode)("mat-drawer-push","push"===s.mode)("mat-drawer-side","side"===s.mode)("mat-drawer-opened",s.opened)("mat-sidenav-fixed",s.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],standalone:!0,features:[wn,xi],ngContentSelectors:IO,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(r,s){1&r&&(Ra(),Ae(0,"div",0,1),ki(2),ke())},dependencies:[CD],encapsulation:2,data:{animation:[Bj.transformDrawer]},changeDetection:0})}return e})(),RO=(()=>{class e extends fu{constructor(){super(...arguments),this._allDrawers=void 0,this._content=void 0}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-sidenav-container"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,g1,5),vs(c,BD,5)),2&r){let h;zi(h=Pi())&&(s._content=h.first),zi(h=Pi())&&(s._allDrawers=h)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-drawer-container-explicit-backdrop",s._backdropOverride)},exportAs:["matSidenavContainer"],standalone:!0,features:[ni([{provide:wL,useExisting:e}]),wn,xi],ngContentSelectors:TW,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,s){1&r&&(Ra($j),en(0,MW,1,2,"div",0),ki(1),ki(2,1),en(3,AW,2,0,"mat-sidenav-content")),2&r&&(eo(0,s.hasBackdrop?0:-1),Ze(3),eo(3,s._content?-1:3))},dependencies:[g1],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),OW=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,Tm,Tm,rs]})}return e})();function jj(e){return new _e(3e3,!1)}function k0(e){switch(e.length){case 0:return new $D;case 1:return e[0];default:return new Pj(e)}}function YW(e,n,t=new Map,r=new Map){const s=[],c=[];let h=-1,y=null;if(n.forEach(E=>{const M=E.get("offset"),R=M==h,$=R&&y||new Map;E.forEach((j,X)=>{let K=X,ie=j;if("offset"!==X)switch(K=e.normalizePropertyName(K,s),ie){case"!":ie=t.get(X);break;case Im:ie=r.get(X);break;default:ie=e.normalizeStyleValue(X,K,ie,s)}$.set(K,ie)}),R||c.push($),y=$,h=M}),s.length)throw function b1(e){return new _e(3502,!1)}();return c}function Yj(e,n,t,r){switch(n){case"start":e.onStart(()=>r(t&&Kj(t,"start",e)));break;case"done":e.onDone(()=>r(t&&Kj(t,"done",e)));break;case"destroy":e.onDestroy(()=>r(t&&Kj(t,"destroy",e)))}}function Kj(e,n,t){const c=VD(e.element,e.triggerName,e.fromState,e.toState,n||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),h=e._data;return null!=h&&(c._data=h),c}function VD(e,n,t,r,s="",c=0,h){return{element:e,triggerName:n,fromState:t,toState:r,phaseName:s,totalTime:c,disabled:!!h}}function $a(e,n,t){let r=e.get(n);return r||e.set(n,r=t),r}function ji(e){const n=e.indexOf(":");return[e.substring(1,n),e.slice(n+1)]}const ad=typeof document>"u"?null:document.documentElement;function v1(e){const n=e.parentNode||e.host||null;return n===ad?null:n}let Rm=null,Qj=!1;function ML(e,n){for(;n;){if(n===e)return!0;n=v1(n)}return!1}function Jj(e,n,t){if(t)return Array.from(e.querySelectorAll(n));const r=e.querySelector(n);return r?[r]:[]}let jD=(()=>{class e{validateStyleProperty(t){return function I0(e){Rm||(Rm=function Mc(){return typeof document<"u"?document.body:null}()||{},Qj=!!Rm.style&&"WebkitAppearance"in Rm.style);let n=!0;return Rm.style&&!function Zj(e){return"ebkit"==e.substring(1,6)}(e)&&(n=e in Rm.style,!n&&Qj&&(n="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Rm.style)),n}(t)}matchesElement(t,r){return!1}containsElement(t,r){return ML(t,r)}getParentElement(t){return v1(t)}query(t,r,s){return Jj(t,r,s)}computeStyle(t,r,s){return s||""}animate(t,r,s,c,h,y=[],E){return new $D(s,c)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();class TL{static#e=this.NOOP=new jD}class PO{}const KW=1e3,kL="ng-enter",UD="ng-leave",LO="ng-trigger",$O=".ng-trigger",BO="ng-animating",HD=".ng-animating";function ld(e){if("number"==typeof e)return e;const n=e.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:IL(parseFloat(n[1]),n[2])}function IL(e,n){return"s"===n?e*KW:e}function zO(e,n,t){return e.hasOwnProperty("duration")?e:function QW(e,n,t){let s,c=0,h="";if("string"==typeof e){const y=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===y)return n.push(jj()),{duration:0,delay:0,easing:""};s=IL(parseFloat(y[1]),y[2]);const E=y[3];null!=E&&(c=IL(parseFloat(E),y[4]));const M=y[5];M&&(h=M)}else s=e;if(!t){let y=!1,E=n.length;s<0&&(n.push(function RW(){return new _e(3100,!1)}()),y=!0),c<0&&(n.push(function NW(){return new _e(3101,!1)}()),y=!0),y&&n.splice(E,0,jj())}return{duration:s,delay:c,easing:h}}(e,n,t)}function Ph(e,n,t){n.forEach((r,s)=>{const c=GD(s);t&&!t.has(s)&&t.set(s,e.style[c]),e.style[c]=r})}function O0(e,n){n.forEach((t,r)=>{const s=GD(r);e.style[s]=""})}function WD(e){return Array.isArray(e)?1==e.length?e[0]:function mW(e,n=null){return{type:Pn.Sequence,steps:e,options:n}}(e):e}const VO=new RegExp("{{\\s*(.+?)\\s*}}","g");function OL(e){let n=[];if("string"==typeof e){let t;for(;t=VO.exec(e);)n.push(t[1]);VO.lastIndex=0}return n}function qD(e,n,t){const r=`${e}`,s=r.replace(VO,(c,h)=>{let y=n[h];return null==y&&(t.push(function FW(e){return new _e(3003,!1)}()),y=""),y.toString()});return s==r?e:s}const tq=/-+([a-z0-9])/g;function GD(e){return e.replace(tq,(...n)=>n[1].toUpperCase())}function pu(e,n,t){switch(n.type){case Pn.Trigger:return e.visitTrigger(n,t);case Pn.State:return e.visitState(n,t);case Pn.Transition:return e.visitTransition(n,t);case Pn.Sequence:return e.visitSequence(n,t);case Pn.Group:return e.visitGroup(n,t);case Pn.Animate:return e.visitAnimate(n,t);case Pn.Keyframes:return e.visitKeyframes(n,t);case Pn.Style:return e.visitStyle(n,t);case Pn.Reference:return e.visitReference(n,t);case Pn.AnimateChild:return e.visitAnimateChild(n,t);case Pn.AnimateRef:return e.visitAnimateRef(n,t);case Pn.Query:return e.visitQuery(n,t);case Pn.Stagger:return e.visitStagger(n,t);default:throw function PW(e){return new _e(3004,!1)}()}}function RL(e,n){return window.getComputedStyle(e)[n]}const i4=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 r4 extends PO{normalizePropertyName(n,t){return GD(n)}normalizeStyleValue(n,t,r,s){let c="";const h=r.toString().trim();if(i4.has(t)&&0!==r&&"0"!==r)if("number"==typeof r)c="px";else{const y=r.match(/^[+-]?[\d\.]+([a-z]*)$/);y&&0==y[1].length&&s.push(function LW(e,n){return new _e(3005,!1)}())}return h+c}}const R0="*";const F_=new Set(["true","1"]),jO=new Set(["false","0"]);function l4(e,n){const t=F_.has(e)||jO.has(e),r=F_.has(n)||jO.has(n);return(s,c)=>{let h=e==R0||e==s,y=n==R0||n==c;return!h&&t&&"boolean"==typeof s&&(h=s?F_.has(e):jO.has(e)),!y&&r&&"boolean"==typeof c&&(y=c?F_.has(n):jO.has(n)),h&&y}}const UO=new RegExp("s*:selfs*,?","g");function FL(e,n,t,r){return new sq(e).build(n,t,r)}class sq{constructor(n){this._driver=n}build(n,t,r){const s=new cq(t);return this._resetContextStyleTimingState(s),pu(this,WD(n),s)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,t){let r=t.queryCount=0,s=t.depCount=0;const c=[],h=[];return"@"==n.name.charAt(0)&&t.errors.push(function $W(){return new _e(3006,!1)}()),n.definitions.forEach(y=>{if(this._resetContextStyleTimingState(t),y.type==Pn.State){const E=y,M=E.name;M.toString().split(/\s*,\s*/).forEach(R=>{E.name=R,c.push(this.visitState(E,t))}),E.name=M}else if(y.type==Pn.Transition){const E=this.visitTransition(y,t);r+=E.queryCount,s+=E.depCount,h.push(E)}else t.errors.push(function BW(){return new _e(3007,!1)}())}),{type:Pn.Trigger,name:n.name,states:c,transitions:h,queryCount:r,depCount:s,options:null}}visitState(n,t){const r=this.visitStyle(n.styles,t),s=n.options&&n.options.params||null;if(r.containsDynamicStyles){const c=new Set,h=s||{};r.styles.forEach(y=>{y instanceof Map&&y.forEach(E=>{OL(E).forEach(M=>{h.hasOwnProperty(M)||c.add(M)})})}),c.size&&t.errors.push(function Hj(e,n){return new _e(3008,!1)}(0,c.values()))}return{type:Pn.State,name:n.name,style:r,options:s?{params:s}:null}}visitTransition(n,t){t.queryCount=0,t.depCount=0;const r=pu(this,WD(n.animation),t),s=function N0(e,n){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(r=>function s4(e,n,t){if(":"==e[0]){const E=function a4(e,n){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,r)=>parseFloat(r)>parseFloat(t);case":decrement":return(t,r)=>parseFloat(r) *"}}(e,t);if("function"==typeof E)return void n.push(E);e=E}const r=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return t.push(function UW(e){return new _e(3015,!1)}()),n;const s=r[1],c=r[2],h=r[3];n.push(l4(s,h)),"<"==c[0]&&(s!=R0||h!=R0)&&n.push(l4(h,s))}(r,t,n)):t.push(e),t}(n.expr,t.errors);return{type:Pn.Transition,matchers:s,animation:r,queryCount:t.queryCount,depCount:t.depCount,options:F0(n.options)}}visitSequence(n,t){return{type:Pn.Sequence,steps:n.steps.map(r=>pu(this,r,t)),options:F0(n.options)}}visitGroup(n,t){const r=t.currentTime;let s=0;const c=n.steps.map(h=>{t.currentTime=r;const y=pu(this,h,t);return s=Math.max(s,t.currentTime),y});return t.currentTime=s,{type:Pn.Group,steps:c,options:F0(n.options)}}visitAnimate(n,t){const r=function uq(e,n){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return PL(zO(e,n).duration,0,"");const t=e;if(t.split(/\s+/).some(c=>"{"==c.charAt(0)&&"{"==c.charAt(1))){const c=PL(0,0,"");return c.dynamic=!0,c.strValue=t,c}const s=zO(t,n);return PL(s.duration,s.delay,s.easing)}(n.timings,t.errors);t.currentAnimateTimings=r;let s,c=n.styles?n.styles:La({});if(c.type==Pn.Keyframes)s=this.visitKeyframes(c,t);else{let h=n.styles,y=!1;if(!h){y=!0;const M={};r.easing&&(M.easing=r.easing),h=La(M)}t.currentTime+=r.duration+r.delay;const E=this.visitStyle(h,t);E.isEmptyStep=y,s=E}return t.currentAnimateTimings=null,{type:Pn.Animate,timings:r,style:s,options:null}}visitStyle(n,t){const r=this._makeStyleAst(n,t);return this._validateStyleAst(r,t),r}_makeStyleAst(n,t){const r=[],s=Array.isArray(n.styles)?n.styles:[n.styles];for(let y of s)"string"==typeof y?y===Im?r.push(y):t.errors.push(new _e(3002,!1)):r.push(new Map(Object.entries(y)));let c=!1,h=null;return r.forEach(y=>{if(y instanceof Map&&(y.has("easing")&&(h=y.get("easing"),y.delete("easing")),!c))for(let E of y.values())if(E.toString().indexOf("{{")>=0){c=!0;break}}),{type:Pn.Style,styles:r,easing:h,offset:n.offset,containsDynamicStyles:c,options:null}}_validateStyleAst(n,t){const r=t.currentAnimateTimings;let s=t.currentTime,c=t.currentTime;r&&c>0&&(c-=r.duration+r.delay),n.styles.forEach(h=>{"string"!=typeof h&&h.forEach((y,E)=>{const M=t.collectedStyles.get(t.currentQuerySelector),R=M.get(E);let $=!0;R&&(c!=s&&c>=R.startTime&&s<=R.endTime&&(t.errors.push(function vf(e,n,t,r,s){return new _e(3010,!1)}()),$=!1),c=R.startTime),$&&M.set(E,{startTime:c,endTime:s}),t.options&&function eq(e,n,t){const r=n.params||{},s=OL(e);s.length&&s.forEach(c=>{r.hasOwnProperty(c)||t.push(function Uj(e){return new _e(3001,!1)}())})}(y,t.options,t.errors)})})}visitKeyframes(n,t){const r={type:Pn.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function _1(){return new _e(3011,!1)}()),r;let c=0;const h=[];let y=!1,E=!1,M=0;const R=n.steps.map(Me=>{const Ce=this._makeStyleAst(Me,t);let rt=null!=Ce.offset?Ce.offset:function u4(e){if("string"==typeof e)return null;let n=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const r=t;n=parseFloat(r.get("offset")),r.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;n=parseFloat(t.get("offset")),t.delete("offset")}return n}(Ce.styles),Mt=0;return null!=rt&&(c++,Mt=Ce.offset=rt),E=E||Mt<0||Mt>1,y=y||Mt0&&c<$?t.errors.push(function qj(){return new _e(3202,!1)}()):0==c&&(j=1/($-1));const X=$-1,K=t.currentTime,ie=t.currentAnimateTimings,me=ie.duration;return R.forEach((Me,Ce)=>{const rt=j>0?Ce==X?1:j*Ce:h[Ce],Mt=rt*me;t.currentTime=K+ie.delay+Mt,ie.duration=Mt,this._validateStyleAst(Me,t),Me.offset=rt,r.styles.push(Me)}),r}visitReference(n,t){return{type:Pn.Reference,animation:pu(this,WD(n.animation),t),options:F0(n.options)}}visitAnimateChild(n,t){return t.depCount++,{type:Pn.AnimateChild,options:F0(n.options)}}visitAnimateRef(n,t){return{type:Pn.AnimateRef,animation:this.visitReference(n.animation,t),options:F0(n.options)}}visitQuery(n,t){const r=t.currentQuerySelector,s=n.options||{};t.queryCount++,t.currentQuery=n;const[c,h]=function aq(e){const n=!!e.split(/\s*,\s*/).find(t=>":self"==t);return n&&(e=e.replace(UO,"")),e=e.replace(/@\*/g,$O).replace(/@\w+/g,t=>$O+"-"+t.slice(1)).replace(/:animating/g,HD),[e,n]}(n.selector);t.currentQuerySelector=r.length?r+" "+c:c,$a(t.collectedStyles,t.currentQuerySelector,new Map);const y=pu(this,WD(n.animation),t);return t.currentQuery=null,t.currentQuerySelector=r,{type:Pn.Query,selector:c,limit:s.limit||0,optional:!!s.optional,includeSelf:h,animation:y,originalSelector:n.selector,options:F0(n.options)}}visitStagger(n,t){t.currentQuery||t.errors.push(function VW(){return new _e(3013,!1)}());const r="full"===n.timings?{duration:0,delay:0,easing:"full"}:zO(n.timings,t.errors,!0);return{type:Pn.Stagger,animation:pu(this,WD(n.animation),t),timings:r,options:null}}}class cq{constructor(n){this.errors=n,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 F0(e){return e?(e={...e}).params&&(e.params=function lq(e){return e?{...e}:null}(e.params)):e={},e}function PL(e,n,t){return{duration:e,delay:n,easing:t}}function LL(e,n,t,r,s,c,h=null,y=!1){return{type:1,element:e,keyframes:n,preStyleProps:t,postStyleProps:r,duration:s,delay:c,totalTime:s+c,easing:h,subTimeline:y}}class HO{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,t){let r=this._map.get(n);r||this._map.set(n,r=[]),r.push(...t)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const hq=new RegExp(":enter","g"),P0=new RegExp(":leave","g");function WO(e,n,t,r,s,c=new Map,h=new Map,y,E,M=[]){return(new d4).buildKeyframes(e,n,t,r,s,c,h,y,E,M)}class d4{buildKeyframes(n,t,r,s,c,h,y,E,M,R=[]){M=M||new HO;const $=new ws(n,t,M,s,c,R,[]);$.options=E;const j=E.delay?ld(E.delay):0;$.currentTimeline.delayNextStep(j),$.currentTimeline.setStyles([h],null,$.errors,E),pu(this,r,$);const X=$.timelines.filter(K=>K.containsAnimation());if(X.length&&y.size){let K;for(let ie=X.length-1;ie>=0;ie--){const me=X[ie];if(me.element===t){K=me;break}}K&&!K.allowOnlyTimelineStyles()&&K.setStyles([y],null,$.errors,E)}return X.length?X.map(K=>K.buildKeyframes()):[LL(t,[],[],[],0,j,"",!1)]}visitTrigger(n,t){}visitState(n,t){}visitTransition(n,t){}visitAnimateChild(n,t){const r=t.subInstructions.get(t.element);if(r){const s=t.createSubContext(n.options),c=t.currentTimeline.currentTime,h=this._visitSubInstructions(r,s,s.options);c!=h&&t.transformIntoNewTimeline(h)}t.previousNode=n}visitAnimateRef(n,t){const r=t.createSubContext(n.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],t,r),this.visitReference(n.animation,r),t.transformIntoNewTimeline(r.currentTimeline.currentTime),t.previousNode=n}_applyAnimationRefDelays(n,t,r){for(const s of n){const c=s?.delay;if(c){const h="number"==typeof c?c:ld(qD(c,s?.params??{},t.errors));r.delayNextStep(h)}}}_visitSubInstructions(n,t,r){let c=t.currentTimeline.currentTime;const h=null!=r.duration?ld(r.duration):null,y=null!=r.delay?ld(r.delay):null;return 0!==h&&n.forEach(E=>{const M=t.appendInstructionToTimeline(E,h,y);c=Math.max(c,M.duration+M.delay)}),c}visitReference(n,t){t.updateOptions(n.options,!0),pu(this,n.animation,t),t.previousNode=n}visitSequence(n,t){const r=t.subContextCount;let s=t;const c=n.options;if(c&&(c.params||c.delay)&&(s=t.createSubContext(c),s.transformIntoNewTimeline(),null!=c.delay)){s.previousNode.type==Pn.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=L0);const h=ld(c.delay);s.delayNextStep(h)}n.steps.length&&(n.steps.forEach(h=>pu(this,h,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>r&&s.transformIntoNewTimeline()),t.previousNode=n}visitGroup(n,t){const r=[];let s=t.currentTimeline.currentTime;const c=n.options&&n.options.delay?ld(n.options.delay):0;n.steps.forEach(h=>{const y=t.createSubContext(n.options);c&&y.delayNextStep(c),pu(this,h,y),s=Math.max(s,y.currentTimeline.currentTime),r.push(y.currentTimeline)}),r.forEach(h=>t.currentTimeline.mergeTimelineCollectedStyles(h)),t.transformIntoNewTimeline(s),t.previousNode=n}_visitTiming(n,t){if(n.dynamic){const r=n.strValue;return zO(t.params?qD(r,t.params,t.errors):r,t.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,t){const r=t.currentAnimateTimings=this._visitTiming(n.timings,t),s=t.currentTimeline;r.delay&&(t.incrementTime(r.delay),s.snapshotCurrentStyles());const c=n.style;c.type==Pn.Keyframes?this.visitKeyframes(c,t):(t.incrementTime(r.duration),this.visitStyle(c,t),s.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=n}visitStyle(n,t){const r=t.currentTimeline,s=t.currentAnimateTimings;!s&&r.hasCurrentStyleProperties()&&r.forwardFrame();const c=s&&s.easing||n.easing;n.isEmptyStep?r.applyEmptyStep(c):r.setStyles(n.styles,c,t.errors,t.options),t.previousNode=n}visitKeyframes(n,t){const r=t.currentAnimateTimings,s=t.currentTimeline.duration,c=r.duration,y=t.createSubContext().currentTimeline;y.easing=r.easing,n.styles.forEach(E=>{y.forwardTime((E.offset||0)*c),y.setStyles(E.styles,E.easing,t.errors,t.options),y.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(y),t.transformIntoNewTimeline(s+c),t.previousNode=n}visitQuery(n,t){const r=t.currentTimeline.currentTime,s=n.options||{},c=s.delay?ld(s.delay):0;c&&(t.previousNode.type===Pn.Style||0==r&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=L0);let h=r;const y=t.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!s.optional,t.errors);t.currentQueryTotal=y.length;let E=null;y.forEach((M,R)=>{t.currentQueryIndex=R;const $=t.createSubContext(n.options,M);c&&$.delayNextStep(c),M===t.element&&(E=$.currentTimeline),pu(this,n.animation,$),$.currentTimeline.applyStylesToKeyframe(),h=Math.max(h,$.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(h),E&&(t.currentTimeline.mergeTimelineCollectedStyles(E),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=n}visitStagger(n,t){const r=t.parentContext,s=t.currentTimeline,c=n.timings,h=Math.abs(c.duration),y=h*(t.currentQueryTotal-1);let E=h*t.currentQueryIndex;switch(c.duration<0?"reverse":c.easing){case"reverse":E=y-E;break;case"full":E=r.currentStaggerTime}const R=t.currentTimeline;E&&R.delayNextStep(E);const $=R.currentTime;pu(this,n.animation,t),t.previousNode=n,r.currentStaggerTime=s.currentTime-$+(s.startTime-r.currentTimeline.startTime)}}const L0={};class ws{constructor(n,t,r,s,c,h,y,E){this._driver=n,this.element=t,this.subInstructions=r,this._enterClassName=s,this._leaveClassName=c,this.errors=h,this.timelines=y,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=L0,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=E||new Ac(this._driver,t,0),y.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,t){if(!n)return;const r=n;let s=this.options;null!=r.duration&&(s.duration=ld(r.duration)),null!=r.delay&&(s.delay=ld(r.delay));const c=r.params;if(c){let h=s.params;h||(h=this.options.params={}),Object.keys(c).forEach(y=>{(!t||!h.hasOwnProperty(y))&&(h[y]=qD(c[y],h,this.errors))})}}_copyOptions(){const n={};if(this.options){const t=this.options.params;if(t){const r=n.params={};Object.keys(t).forEach(s=>{r[s]=t[s]})}}return n}createSubContext(n=null,t,r){const s=t||this.element,c=new ws(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,r||0));return c.previousNode=this.previousNode,c.currentAnimateTimings=this.currentAnimateTimings,c.options=this._copyOptions(),c.updateOptions(n),c.currentQueryIndex=this.currentQueryIndex,c.currentQueryTotal=this.currentQueryTotal,c.parentContext=this,this.subContextCount++,c}transformIntoNewTimeline(n){return this.previousNode=L0,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,t,r){const s={duration:t??n.duration,delay:this.currentTimeline.currentTime+(r??0)+n.delay,easing:""},c=new f4(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,s,n.stretchStartingKeyframe);return this.timelines.push(c),s}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,t,r,s,c,h){let y=[];if(s&&y.push(this.element),n.length>0){n=(n=n.replace(hq,"."+this._enterClassName)).replace(P0,"."+this._leaveClassName);let M=this._driver.query(this.element,n,1!=r);0!==r&&(M=r<0?M.slice(M.length+r,M.length):M.slice(0,r)),y.push(...M)}return!c&&0==y.length&&h.push(function jW(e){return new _e(3014,!1)}()),y}}class Ac{constructor(n,t,r,s){this._driver=n,this.element=t,this.startTime=r,this._elementTimelineStylesLookup=s,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(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,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(n){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+n),t&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,t){return this.applyStylesToKeyframe(),new Ac(this._driver,n,t||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(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,t){this._localTimelineStyles.set(n,t),this._globalTimelineStyles.set(n,t),this._styleSummary.set(n,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[t,r]of this._globalTimelineStyles)this._backFill.set(t,r||Im),this._currentKeyframe.set(t,Im);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,t,r,s){t&&this._previousKeyframe.set("easing",t);const c=s&&s.params||{},h=function mq(e,n){const t=new Map;let r;return e.forEach(s=>{if("*"===s){r??=n.keys();for(let c of r)t.set(c,Im)}else for(let[c,h]of s)t.set(c,h)}),t}(n,this._globalTimelineStyles);for(let[y,E]of h){const M=qD(E,c,r);this._pendingStyles.set(y,M),this._localTimelineStyles.has(y)||this._backFill.set(y,this._globalTimelineStyles.get(y)??Im),this._updateStyle(y,M)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,t)=>{this._currentKeyframe.set(t,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,n)}))}snapshotCurrentStyles(){for(let[n,t]of this._localTimelineStyles)this._pendingStyles.set(n,t),this._updateStyle(n,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let t in this._currentKeyframe)n.push(t);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((t,r)=>{const s=this._styleSummary.get(r);(!s||t.time>s.time)&&this._updateStyle(r,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,t=new Set,r=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((y,E)=>{const M=new Map([...this._backFill,...y]);M.forEach((R,$)=>{"!"===R?n.add($):R===Im&&t.add($)}),r||M.set("offset",E/this.duration),s.push(M)});const c=[...n.values()],h=[...t.values()];if(r){const y=s[0],E=new Map(y);y.set("offset",0),E.set("offset",1),s=[y,E]}return LL(this.element,s,c,h,this.duration,this.startTime,this.easing,!1)}}class f4 extends Ac{constructor(n,t,r,s,c,h,y=!1){super(n,t,h.delay),this.keyframes=r,this.preStyleProps=s,this.postStyleProps=c,this._stretchStartingKeyframe=y,this.timings={duration:h.duration,delay:h.delay,easing:h.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:t,duration:r,easing:s}=this.timings;if(this._stretchStartingKeyframe&&t){const c=[],h=r+t,y=t/h,E=new Map(n[0]);E.set("offset",0),c.push(E);const M=new Map(n[0]);M.set("offset",h4(y)),c.push(M);const R=n.length-1;for(let $=1;$<=R;$++){let j=new Map(n[$]);const X=j.get("offset");j.set("offset",h4((t+X*r)/h)),c.push(j)}r=h,t=0,s="",n=c}return LL(this.element,n,this.preStyleProps,this.postStyleProps,r,t,s,!0)}}function h4(e,n=3){const t=Math.pow(10,n-1);return Math.round(e*t)/t}function p4(e,n,t,r,s,c,h,y,E,M,R,$,j){return{type:0,element:e,triggerName:n,isRemovalTransition:s,fromState:t,fromStyles:c,toState:r,toStyles:h,timelines:y,queriedElements:E,preStyleProps:M,postStyleProps:R,totalTime:$,errors:j}}const $L={};class m4{constructor(n,t,r){this._triggerName=n,this.ast=t,this._stateStyles=r}match(n,t,r,s){return function g4(e,n,t,r,s){return e.some(c=>c(n,t,r,s))}(this.ast.matchers,n,t,r,s)}buildStyles(n,t,r){let s=this._stateStyles.get("*");return void 0!==n&&(s=this._stateStyles.get(n?.toString())||s),s?s.buildStyles(t,r):new Map}build(n,t,r,s,c,h,y,E,M,R){const $=[],j=this.ast.options&&this.ast.options.params||$L,K=this.buildStyles(r,y&&y.params||$L,$),ie=E&&E.params||$L,me=this.buildStyles(s,ie,$),Me=new Set,Ce=new Map,rt=new Map,Mt="void"===s,Et={params:BL(ie,j),delay:this.ast.options?.delay},Qt=R?[]:WO(n,t,this.ast.animation,c,h,K,me,Et,M,$);let mn=0;return Qt.forEach(Ei=>{mn=Math.max(Ei.duration+Ei.delay,mn)}),$.length?p4(t,this._triggerName,r,s,Mt,K,me,[],[],Ce,rt,mn,$):(Qt.forEach(Ei=>{const Cs=Ei.element,U_=$a(Ce,Cs,new Set);Ei.preStyleProps.forEach(jh=>U_.add(jh));const S2=$a(rt,Cs,new Set);Ei.postStyleProps.forEach(jh=>S2.add(jh)),Cs!==t&&Me.add(Cs)}),p4(t,this._triggerName,r,s,Mt,K,me,Qt,[...Me.values()],Ce,rt,mn))}}function BL(e,n){const t={...n};return Object.entries(e).forEach(([r,s])=>{null!=s&&(t[r]=s)}),t}class zL{constructor(n,t,r){this.styles=n,this.defaultParams=t,this.normalizer=r}buildStyles(n,t){const r=new Map,s=BL(n,this.defaultParams);return this.styles.styles.forEach(c=>{"string"!=typeof c&&c.forEach((h,y)=>{h&&(h=qD(h,s,t));const E=this.normalizer.normalizePropertyName(y,t);h=this.normalizer.normalizeStyleValue(y,E,h,t),r.set(y,h)})}),r}}class x1{constructor(n,t,r){this.name=n,this.ast=t,this._normalizer=r,this.transitionFactories=[],this.states=new Map,t.states.forEach(s=>{this.states.set(s.name,new zL(s.style,s.options&&s.options.params||{},r))}),$0(this.states,"true","1"),$0(this.states,"false","0"),t.transitions.forEach(s=>{this.transitionFactories.push(new m4(n,s,this.states))}),this.fallbackTransition=function _q(e,n,t){return new m4(e,{type:Pn.Transition,animation:{type:Pn.Sequence,steps:[],options:null},matchers:[(h,y)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,t,r,s){return this.transitionFactories.find(h=>h.match(n,t,r,s))||null}matchStyles(n,t,r){return this.fallbackTransition.buildStyles(n,t,r)}}function $0(e,n,t){e.has(n)?e.has(t)||e.set(t,e.get(n)):e.has(t)&&e.set(n,e.get(t))}const w1=new HO;class _4{constructor(n,t,r){this.bodyNode=n,this._driver=t,this._normalizer=r,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,t){const r=[],c=FL(this._driver,t,r,[]);if(r.length)throw function qW(e){return new _e(3503,!1)}();this._animations.set(n,c)}_buildPlayer(n,t,r){const s=n.element,c=YW(this._normalizer,n.keyframes,t,r);return this._driver.animate(s,c,n.duration,n.delay,n.easing,[],!0)}create(n,t,r={}){const s=[],c=this._animations.get(n);let h;const y=new Map;if(c?(h=WO(this._driver,t,c,kL,UD,new Map,new Map,r,w1,s),h.forEach(R=>{const $=$a(y,R.element,new Map);R.postStyleProps.forEach(j=>$.set(j,null))})):(s.push(function sd(){return new _e(3300,!1)}()),h=[]),s.length)throw function zD(e){return new _e(3504,!1)}();y.forEach((R,$)=>{R.forEach((j,X)=>{R.set(X,this._driver.computeStyle($,X,Im))})});const M=k0(h.map(R=>{const $=y.get(R.element);return this._buildPlayer(R,new Map,$)}));return this._playersById.set(n,M),M.onDestroy(()=>this.destroy(n)),this.players.push(M),M}destroy(n){const t=this._getPlayer(n);t.destroy(),this._playersById.delete(n);const r=this.players.indexOf(t);r>=0&&this.players.splice(r,1)}_getPlayer(n){const t=this._playersById.get(n);if(!t)throw function SL(e){return new _e(3301,!1)}();return t}listen(n,t,r,s){const c=VD(t,"","","");return Yj(this._getPlayer(n),r,c,s),()=>{}}command(n,t,r,s){if("register"==r)return void this.register(n,s[0]);if("create"==r)return void this.create(n,t,s[0]||{});const c=this._getPlayer(n);switch(r){case"play":c.play();break;case"pause":c.pause();break;case"reset":c.reset();break;case"restart":c.restart();break;case"finish":c.finish();break;case"init":c.init();break;case"setPosition":c.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(n)}}}const y4="ng-animate-queued",qO="ng-animate-disabled",VL=[],b4={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},wq={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},xf="__ng_removed";class jL{get params(){return this.options.params}constructor(n,t=""){this.namespaceId=t;const r=n&&n.hasOwnProperty("value");if(this.value=function v4(e){return e??null}(r?n.value:n),r){const{value:c,...h}=n;this.options=h}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const t=n.params;if(t){const r=this.options.params;Object.keys(t).forEach(s=>{null==r[s]&&(r[s]=t[s])})}}}const XD="void",GO=new jL(XD);class Eq{constructor(n,t,r){this.id=n,this.hostElement=t,this._engine=r,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,cd(t,this._hostClassName)}listen(n,t,r,s){if(!this._triggers.has(t))throw function GW(e,n){return new _e(3302,!1)}();if(null==r||0==r.length)throw function XW(e){return new _e(3303,!1)}();if(!function UL(e){return"start"==e||"done"==e}(r))throw function Gj(e,n){return new _e(3400,!1)}();const c=$a(this._elementListeners,n,[]),h={name:t,phase:r,callback:s};c.push(h);const y=$a(this._engine.statesByElement,n,new Map);return y.has(t)||(cd(n,LO),cd(n,LO+"-"+t),y.set(t,GO)),()=>{this._engine.afterFlush(()=>{const E=c.indexOf(h);E>=0&&c.splice(E,1),this._triggers.has(t)||y.delete(t)})}}register(n,t){return!this._triggers.has(n)&&(this._triggers.set(n,t),!0)}_getTrigger(n){const t=this._triggers.get(n);if(!t)throw function NO(e){return new _e(3401,!1)}();return t}trigger(n,t,r,s=!0){const c=this._getTrigger(t),h=new B0(this.id,t,n);let y=this._engine.statesByElement.get(n);y||(cd(n,LO),cd(n,LO+"-"+t),this._engine.statesByElement.set(n,y=new Map));let E=y.get(t);const M=new jL(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&E&&M.absorbOptions(E.options),y.set(t,M),E||(E=GO),M.value!==XD&&E.value===M.value){if(!function l(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!=r.length)return!1;for(let s=0;s{O0(n,me),Ph(n,Me)})}return}const j=$a(this._engine.playersByElement,n,[]);j.forEach(ie=>{ie.namespaceId==this.id&&ie.triggerName==t&&ie.queued&&ie.destroy()});let X=c.matchTransition(E.value,M.value,n,M.params),K=!1;if(!X){if(!s)return;X=c.fallbackTransition,K=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:t,transition:X,fromState:E,toState:M,player:h,isFallbackTransition:K}),K||(cd(n,y4),h.onStart(()=>{E1(n,y4)})),h.onDone(()=>{let ie=this.players.indexOf(h);ie>=0&&this.players.splice(ie,1);const me=this._engine.playersByElement.get(n);if(me){let Me=me.indexOf(h);Me>=0&&me.splice(Me,1)}}),this.players.push(h),j.push(h),h}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(t=>t.delete(n)),this._elementListeners.forEach((t,r)=>{this._elementListeners.set(r,t.filter(s=>s.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const t=this._engine.playersByElement.get(n);t&&(t.forEach(r=>r.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,t){const r=this._engine.driver.query(n,$O,!0);r.forEach(s=>{if(s[xf])return;const c=this._engine.fetchNamespacesByElement(s);c.size?c.forEach(h=>h.triggerLeaveAnimation(s,t,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(n,t,r,s){const c=this._engine.statesByElement.get(n),h=new Map;if(c){const y=[];if(c.forEach((E,M)=>{if(h.set(M,E.value),this._triggers.has(M)){const R=this.trigger(n,M,XD,s);R&&y.push(R)}}),y.length)return this._engine.markElementAsRemoved(this.id,n,!0,t,h),r&&k0(y).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const t=this._elementListeners.get(n),r=this._engine.statesByElement.get(n);if(t&&r){const s=new Set;t.forEach(c=>{const h=c.name;if(s.has(h))return;s.add(h);const E=this._triggers.get(h).fallbackTransition,M=r.get(h)||GO,R=new jL(XD),$=new B0(this.id,h,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:h,transition:E,fromState:M,toState:R,player:$,isFallbackTransition:!0})})}}removeNode(n,t){const r=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,t),this.triggerLeaveAnimation(n,t,!0))return;let s=!1;if(r.totalAnimations){const c=r.players.length?r.playersByQueriedElement.get(n):[];if(c&&c.length)s=!0;else{let h=n;for(;h=h.parentNode;)if(r.statesByElement.get(h)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(n),s)r.markElementAsRemoved(this.id,n,!1,t);else{const c=n[xf];(!c||c===b4)&&(r.afterFlush(()=>this.clearElementCache(n)),r.destroyInnerAnimations(n),r._onRemovalComplete(n,t))}}insertNode(n,t){cd(n,this._hostClassName)}drainQueuedTransitions(n){const t=[];return this._queue.forEach(r=>{const s=r.player;if(s.destroyed)return;const c=r.element,h=this._elementListeners.get(c);h&&h.forEach(y=>{if(y.name==r.triggerName){const E=VD(c,r.triggerName,r.fromState.value,r.toState.value);E._data=n,Yj(r.player,y.phase,E,y.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):t.push(r)}),this._queue=[],t.sort((r,s)=>{const c=r.transition.ast.depCount,h=s.transition.ast.depCount;return 0==c||0==h?c-h:this._engine.driver.containsElement(r.element,s.element)?1:-1})}destroy(n){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}}class Cq{_onRemovalComplete(n,t){this.onRemovalComplete(n,t)}constructor(n,t,r,s){this.bodyNode=n,this.driver=t,this._normalizer=r,this.scheduler=s,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=(c,h)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(t=>{t.players.forEach(r=>{r.queued&&n.push(r)})}),n}createNamespace(n,t){const r=new Eq(n,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(r,t):(this.newHostElements.set(t,r),this.collectEnterElement(t)),this._namespaceLookup[n]=r}_balanceNamespaceList(n,t){const r=this._namespaceList,s=this.namespacesByHostElement;if(r.length-1>=0){let h=!1,y=this.driver.getParentElement(t);for(;y;){const E=s.get(y);if(E){const M=r.indexOf(E);r.splice(M+1,0,n),h=!0;break}y=this.driver.getParentElement(y)}h||r.unshift(n)}else r.push(n);return s.set(t,n),n}register(n,t){let r=this._namespaceLookup[n];return r||(r=this.createNamespace(n,t)),r}registerTrigger(n,t,r){let s=this._namespaceLookup[n];s&&s.register(t,r)&&this.totalAnimations++}destroy(n,t){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const r=this._fetchNamespace(n);this.namespacesByHostElement.delete(r.hostElement);const s=this._namespaceList.indexOf(r);s>=0&&this._namespaceList.splice(s,1),r.destroy(t),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const t=new Set,r=this.statesByElement.get(n);if(r)for(let s of r.values())if(s.namespaceId){const c=this._fetchNamespace(s.namespaceId);c&&t.add(c)}return t}trigger(n,t,r,s){if(YD(t)){const c=this._fetchNamespace(n);if(c)return c.trigger(t,r,s),!0}return!1}insertNode(n,t,r,s){if(!YD(t))return;const c=t[xf];if(c&&c.setForRemoval){c.setForRemoval=!1,c.setForMove=!0;const h=this.collectedLeaveElements.indexOf(t);h>=0&&this.collectedLeaveElements.splice(h,1)}if(n){const h=this._fetchNamespace(n);h&&h.insertNode(t,r)}s&&this.collectEnterElement(t)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,t){t?this.disabledNodes.has(n)||(this.disabledNodes.add(n),cd(n,qO)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),E1(n,qO))}removeNode(n,t,r){if(YD(t)){this.scheduler?.notify();const s=n?this._fetchNamespace(n):null;s?s.removeNode(t,r):this.markElementAsRemoved(n,t,!1,r);const c=this.namespacesByHostElement.get(t);c&&c.id!==n&&c.removeNode(t,r)}else this._onRemovalComplete(t,r)}markElementAsRemoved(n,t,r,s,c){this.collectedLeaveElements.push(t),t[xf]={namespaceId:n,setForRemoval:s,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:c}}listen(n,t,r,s,c){return YD(t)?this._fetchNamespace(n).listen(t,r,s,c):()=>{}}_buildInstruction(n,t,r,s,c){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,r,s,n.fromState.options,n.toState.options,t,c)}destroyInnerAnimations(n){let t=this.driver.query(n,$O,!0);t.forEach(r=>this.destroyActiveAnimationsForElement(r)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(n,HD,!0),t.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(n){const t=this.playersByElement.get(n);t&&t.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(n){const t=this.playersByQueriedElement.get(n);t&&t.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return k0(this.players).onDone(()=>n());n()})}processLeaveNode(n){const t=n[xf];if(t&&t.setForRemoval){if(n[xf]=b4,t.namespaceId){this.destroyInnerAnimations(n);const r=this._fetchNamespace(t.namespaceId);r&&r.clearElementCache(n)}this._onRemovalComplete(n,t.setForRemoval)}n.classList?.contains(qO)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(n=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,s)=>this._balanceNamespaceList(r,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){const r=this._whenQuietFns;this._whenQuietFns=[],t.length?k0(t).onDone(()=>{r.forEach(s=>s())}):r.forEach(s=>s())}}reportError(n){throw function DL(e){return new _e(3402,!1)}()}_flushAnimations(n,t){const r=new HO,s=[],c=new Map,h=[],y=new Map,E=new Map,M=new Map,R=new Set;this.disabledNodes.forEach(et=>{R.add(et);const ut=this.driver.query(et,".ng-animate-queued",!0);for(let at=0;at{const at=kL+ie++;K.set(ut,at),et.forEach(Lt=>cd(Lt,at))});const me=[],Me=new Set,Ce=new Set;for(let et=0;etMe.add(Lt)):Ce.add(ut))}const rt=new Map,Mt=E4(j,Array.from(Me));Mt.forEach((et,ut)=>{const at=UD+ie++;rt.set(ut,at),et.forEach(Lt=>cd(Lt,at))}),n.push(()=>{X.forEach((et,ut)=>{const at=K.get(ut);et.forEach(Lt=>E1(Lt,at))}),Mt.forEach((et,ut)=>{const at=rt.get(ut);et.forEach(Lt=>E1(Lt,at))}),me.forEach(et=>{this.processLeaveNode(et)})});const Et=[],Qt=[];for(let et=this._namespaceList.length-1;et>=0;et--)this._namespaceList[et].drainQueuedTransitions(t).forEach(at=>{const Lt=at.player,Gn=at.element;if(Et.push(Lt),this.collectedEnterElements.length){const Ic=Gn[xf];if(Ic&&Ic.setForMove){if(Ic.previousTriggersValues&&Ic.previousTriggersValues.has(at.triggerName)){const wM=Ic.previousTriggersValues.get(at.triggerName),Uh=this.statesByElement.get(at.element);if(Uh&&Uh.has(at.triggerName)){const PU=Uh.get(at.triggerName);PU.value=wM,Uh.set(at.triggerName,PU)}}return void Lt.destroy()}}const Xn=!$||!this.driver.containsElement($,Gn),Ui=rt.get(Gn),Ss=K.get(Gn),ri=this._buildInstruction(at,r,Ss,Ui,Xn);if(ri.errors&&ri.errors.length)return void Qt.push(ri);if(Xn)return Lt.onStart(()=>O0(Gn,ri.fromStyles)),Lt.onDestroy(()=>Ph(Gn,ri.toStyles)),void s.push(Lt);if(at.isFallbackTransition)return Lt.onStart(()=>O0(Gn,ri.fromStyles)),Lt.onDestroy(()=>Ph(Gn,ri.toStyles)),void s.push(Lt);const k1=[];ri.timelines.forEach(Ic=>{Ic.stretchStartingKeyframe=!0,this.disabledNodes.has(Ic.element)||k1.push(Ic)}),ri.timelines=k1,r.append(Gn,ri.timelines),h.push({instruction:ri,player:Lt,element:Gn}),ri.queriedElements.forEach(Ic=>$a(y,Ic,[]).push(Lt)),ri.preStyleProps.forEach((Ic,wM)=>{if(Ic.size){let Uh=E.get(wM);Uh||E.set(wM,Uh=new Set),Ic.forEach((PU,qX)=>Uh.add(qX))}}),ri.postStyleProps.forEach((Ic,wM)=>{let Uh=M.get(wM);Uh||M.set(wM,Uh=new Set),Ic.forEach((PU,qX)=>Uh.add(qX))})});if(Qt.length){const et=[];Qt.forEach(ut=>{et.push(function TQ(e,n){return new _e(3505,!1)}())}),Et.forEach(ut=>ut.destroy()),this.reportError(et)}const mn=new Map,Ei=new Map;h.forEach(et=>{const ut=et.element;r.has(ut)&&(Ei.set(ut,ut),this._beforeAnimationBuild(et.player.namespaceId,et.instruction,mn))}),s.forEach(et=>{const ut=et.element;this._getPreviousPlayers(ut,!1,et.namespaceId,et.triggerName,null).forEach(Lt=>{$a(mn,ut,[]).push(Lt),Lt.destroy()})});const Cs=me.filter(et=>u(et,E,M)),U_=new Map;w4(U_,this.driver,Ce,M,Im).forEach(et=>{u(et,E,M)&&Cs.push(et)});const jh=new Map;X.forEach((et,ut)=>{w4(jh,this.driver,new Set(et),E,"!")}),Cs.forEach(et=>{const ut=U_.get(et),at=jh.get(et);U_.set(et,new Map([...ut?.entries()??[],...at?.entries()??[]]))});const Ht=[],Pt=[],Hn={};h.forEach(et=>{const{element:ut,player:at,instruction:Lt}=et;if(r.has(ut)){if(R.has(ut))return at.onDestroy(()=>Ph(ut,Lt.toStyles)),at.disabled=!0,at.overrideTotalTime(Lt.totalTime),void s.push(at);let Gn=Hn;if(Ei.size>1){let Ui=ut;const Ss=[];for(;Ui=Ui.parentNode;){const ri=Ei.get(Ui);if(ri){Gn=ri;break}Ss.push(Ui)}Ss.forEach(ri=>Ei.set(ri,Gn))}const Xn=this._buildAnimation(at.namespaceId,Lt,mn,c,jh,U_);if(at.setRealPlayer(Xn),Gn===Hn)Ht.push(at);else{const Ui=this.playersByElement.get(Gn);Ui&&Ui.length&&(at.parentPlayer=k0(Ui)),s.push(at)}}else O0(ut,Lt.fromStyles),at.onDestroy(()=>Ph(ut,Lt.toStyles)),Pt.push(at),R.has(ut)&&s.push(at)}),Pt.forEach(et=>{const ut=c.get(et.element);if(ut&&ut.length){const at=k0(ut);et.setRealPlayer(at)}}),s.forEach(et=>{et.parentPlayer?et.syncPlayerEvents(et.parentPlayer):et.destroy()});for(let et=0;et!Xn.destroyed);Gn.length?i(this,ut,Gn):this.processLeaveNode(ut)}return me.length=0,Ht.forEach(et=>{this.players.push(et),et.onDone(()=>{et.destroy();const ut=this.players.indexOf(et);this.players.splice(ut,1)}),et.play()}),Ht}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,t,r,s,c){let h=[];if(t){const y=this.playersByQueriedElement.get(n);y&&(h=y)}else{const y=this.playersByElement.get(n);if(y){const E=!c||c==XD;y.forEach(M=>{M.queued||!E&&M.triggerName!=s||h.push(M)})}}return(r||s)&&(h=h.filter(y=>!(r&&r!=y.namespaceId||s&&s!=y.triggerName))),h}_beforeAnimationBuild(n,t,r){const c=t.element,h=t.isRemovalTransition?void 0:n,y=t.isRemovalTransition?void 0:t.triggerName;for(const E of t.timelines){const M=E.element,R=M!==c,$=$a(r,M,[]);this._getPreviousPlayers(M,R,h,y,t.toState).forEach(X=>{const K=X.getRealPlayer();K.beforeDestroy&&K.beforeDestroy(),X.destroy(),$.push(X)})}O0(c,t.fromStyles)}_buildAnimation(n,t,r,s,c,h){const y=t.triggerName,E=t.element,M=[],R=new Set,$=new Set,j=t.timelines.map(K=>{const ie=K.element;R.add(ie);const me=ie[xf];if(me&&me.removedBeforeQueried)return new $D(K.duration,K.delay);const Me=ie!==E,Ce=function o(e){const n=[];return a(e,n),n}((r.get(ie)||VL).map(mn=>mn.getRealPlayer())).filter(mn=>!!mn.element&&mn.element===ie),rt=c.get(ie),Mt=h.get(ie),Et=YW(this._normalizer,K.keyframes,rt,Mt),Qt=this._buildPlayer(K,Et,Ce);if(K.subTimeline&&s&&$.add(ie),Me){const mn=new B0(n,y,ie);mn.setRealPlayer(Qt),M.push(mn)}return Qt});M.forEach(K=>{$a(this.playersByQueriedElement,K.element,[]).push(K),K.onDone(()=>function Sq(e,n,t){let r=e.get(n);if(r){if(r.length){const s=r.indexOf(t);r.splice(s,1)}0==r.length&&e.delete(n)}return r}(this.playersByQueriedElement,K.element,K))}),R.forEach(K=>cd(K,BO));const X=k0(j);return X.onDestroy(()=>{R.forEach(K=>E1(K,BO)),Ph(E,t.toStyles)}),$.forEach(K=>{$a(s,K,[]).push(X)}),X}_buildPlayer(n,t,r){return t.length>0?this.driver.animate(n.element,t,n.duration,n.delay,n.easing,r):new $D(n.duration,n.delay)}}class B0{constructor(n,t,r){this.namespaceId=n,this.triggerName=t,this.element=r,this._player=new $D,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(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((t,r)=>{t.forEach(s=>Yj(n,r,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const t=this._player;t.triggerCallback&&n.onStart(()=>t.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,t){$a(this._queuedCallbacks,n,[]).push(t)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}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(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const t=this._player;t.triggerCallback&&t.triggerCallback(n)}}function YD(e){return e&&1===e.nodeType}function x4(e,n){const t=e.style.display;return e.style.display=n??"none",t}function w4(e,n,t,r,s){const c=[];t.forEach(E=>c.push(x4(E)));const h=[];r.forEach((E,M)=>{const R=new Map;E.forEach($=>{const j=n.computeStyle(M,$,s);R.set($,j),(!j||0==j.length)&&(M[xf]=wq,h.push(M))}),e.set(M,R)});let y=0;return t.forEach(E=>x4(E,c[y++])),h}function E4(e,n){const t=new Map;if(e.forEach(y=>t.set(y,[])),0==n.length)return t;const s=new Set(n),c=new Map;function h(y){if(!y)return 1;let E=c.get(y);if(E)return E;const M=y.parentNode;return E=t.has(M)?M:s.has(M)?1:h(M),c.set(y,E),E}return n.forEach(y=>{const E=h(y);1!==E&&t.get(E).push(y)}),t}function cd(e,n){e.classList?.add(n)}function E1(e,n){e.classList?.remove(n)}function i(e,n,t){k0(t).onDone(()=>e.processLeaveNode(n))}function a(e,n){for(let t=0;ts.add(c)):n.set(e,r),t.delete(e),!0}class f{constructor(n,t,r,s){this._driver=t,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(c,h)=>{},this._transitionEngine=new Cq(n.body,t,r,s),this._timelineEngine=new _4(n.body,t,r),this._transitionEngine.onRemovalComplete=(c,h)=>this.onRemovalComplete(c,h)}registerTrigger(n,t,r,s,c){const h=n+"-"+s;let y=this._triggerCache[h];if(!y){const E=[],R=FL(this._driver,c,E,[]);if(E.length)throw function WW(e,n){return new _e(3404,!1)}();y=function gq(e,n,t){return new x1(e,n,t)}(s,R,this._normalizer),this._triggerCache[h]=y}this._transitionEngine.registerTrigger(t,s,y)}register(n,t){this._transitionEngine.register(n,t)}destroy(n,t){this._transitionEngine.destroy(n,t)}onInsert(n,t,r,s){this._transitionEngine.insertNode(n,t,r,s)}onRemove(n,t,r){this._transitionEngine.removeNode(n,t,r)}disableAnimations(n,t){this._transitionEngine.markElementAsDisabled(n,t)}process(n,t,r,s){if("@"==r.charAt(0)){const[c,h]=ji(r);this._timelineEngine.command(c,t,h,s)}else this._transitionEngine.trigger(n,t,r,s)}listen(n,t,r,s,c){if("@"==r.charAt(0)){const[h,y]=ji(r);return this._timelineEngine.listen(h,t,y,c)}return this._transitionEngine.listen(n,t,r,s,c)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}}class g{static#e=this.initialStylesByElement=new WeakMap;constructor(n,t,r){this._element=n,this._startStyles=t,this._endStyles=r,this._state=0;let s=g.initialStylesByElement.get(n);s||g.initialStylesByElement.set(n,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Ph(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ph(this._element,this._initialStyles),this._endStyles&&(Ph(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(g.initialStylesByElement.delete(this._element),this._startStyles&&(O0(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(O0(this._element,this._endStyles),this._endStyles=null),Ph(this._element,this._initialStyles),this._state=3)}}function b(e){let n=null;return e.forEach((t,r)=>{(function v(e){return"display"===e||"position"===e})(r)&&(n=n||new Map,n.set(r,t))}),n}class w{constructor(n,t,r,s){this.element=n,this.keyframes=t,this.options=r,this._specialStyles=s,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=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const t=[];return n.forEach(r=>{t.push(Object.fromEntries(r))}),t}_triggerWebAnimation(n,t,r){return n.animate(this._convertKeyframesToObject(t),r)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),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(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,s)=>{"offset"!==s&&n.set(s,this._finished?r:RL(this.element,s))}),this.currentSnapshot=n}triggerCallback(n){const t="start"===n?this._onStartFns:this._onDoneFns;t.forEach(r=>r()),t.length=0}}class C{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,t){return!1}containsElement(n,t){return ML(n,t)}getParentElement(n){return v1(n)}query(n,t,r){return Jj(n,t,r)}computeStyle(n,t,r){return RL(n,t)}animate(n,t,r,s,c,h=[]){const E={duration:r,delay:s,fill:0==s?"both":"forwards"};c&&(E.easing=c);const M=new Map,R=h.filter(X=>X instanceof w);(function iq(e,n){return 0===e||0===n})(r,s)&&R.forEach(X=>{X.currentSnapshot.forEach((K,ie)=>M.set(ie,K))});let $=function JW(e){return e.length?e[0]instanceof Map?e:e.map(n=>new Map(Object.entries(n))):[]}(t).map(X=>new Map(X));$=function n4(e,n,t){if(t.size&&n.length){let r=n[0],s=[];if(t.forEach((c,h)=>{r.has(h)||s.push(h),r.set(h,c)}),s.length)for(let c=1;ch.set(y,RL(e,y)))}}return n}(n,$,M);const j=function m(e,n){let t=null,r=null;return Array.isArray(n)&&n.length?(t=b(n[0]),n.length>1&&(r=b(n[n.length-1]))):n instanceof Map&&(t=b(n)),t||r?new g(e,t,r):null}(n,$);return new w(n,$,E,j)}}const I="@",k="@.disabled";class F{constructor(n,t,r,s){this.namespaceId=n,this.delegate=t,this.engine=r,this._onDestroy=s,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,t){return this.delegate.createElement(n,t)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,t){this.delegate.appendChild(n,t),this.engine.onInsert(this.namespaceId,t,n,!1)}insertBefore(n,t,r,s=!0){this.delegate.insertBefore(n,t,r),this.engine.onInsert(this.namespaceId,t,n,s)}removeChild(n,t,r){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(n,t){return this.delegate.selectRootElement(n,t)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,t,r,s){this.delegate.setAttribute(n,t,r,s)}removeAttribute(n,t,r){this.delegate.removeAttribute(n,t,r)}addClass(n,t){this.delegate.addClass(n,t)}removeClass(n,t){this.delegate.removeClass(n,t)}setStyle(n,t,r,s){this.delegate.setStyle(n,t,r,s)}removeStyle(n,t,r){this.delegate.removeStyle(n,t,r)}setProperty(n,t,r){t.charAt(0)==I&&t==k?this.disableAnimations(n,!!r):this.delegate.setProperty(n,t,r)}setValue(n,t){this.delegate.setValue(n,t)}listen(n,t,r){return this.delegate.listen(n,t,r)}disableAnimations(n,t){this.engine.disableAnimations(n,t)}}class L extends F{constructor(n,t,r,s,c){super(t,r,s,c),this.factory=n,this.namespaceId=t}setProperty(n,t,r){t.charAt(0)==I?"."==t.charAt(1)&&t==k?this.disableAnimations(n,r=void 0===r||!!r):this.engine.process(this.namespaceId,n,t.slice(1),r):this.delegate.setProperty(n,t,r)}listen(n,t,r){if(t.charAt(0)==I){const s=function z(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(n);let c=t.slice(1),h="";return c.charAt(0)!=I&&([c,h]=function V(e){const n=e.indexOf(".");return[e.substring(0,n),e.slice(n+1)]}(c)),this.engine.listen(this.namespaceId,s,c,h,y=>{this.factory.scheduleListenerCallback(y._data||-1,r,y)})}return this.delegate.listen(n,t,r)}}class U{constructor(n,t,r){this.delegate=n,this.engine=t,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(s,c)=>{const h=c?.parentNode(s);h&&c.removeChild(h,s)}}createRenderer(n,t){const s=this.delegate.createRenderer(n,t);if(!n||!t?.data?.animation){const M=this._rendererCache;let R=M.get(s);return R||(R=new F("",s,this.engine,()=>M.delete(s)),M.set(s,R)),R}const c=t.id,h=t.id+"-"+this._currentId;this._currentId++,this.engine.register(h,n);const y=M=>{Array.isArray(M)?M.forEach(y):this.engine.registerTrigger(c,h,n,M.name,M)};return t.data.animation.forEach(y),new L(this,h,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,t,r){if(n>=0&&nt(r));const s=this._animationCallbacksBuffer;0==s.length&&queueMicrotask(()=>{this._zone.run(()=>{s.forEach(c=>{const[h,y]=c;h(y)}),this._animationCallbacksBuffer=[]})}),s.push([t,r])}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 Z=[{provide:PO,useFactory:function Y(){return new r4}},{provide:f,useClass:(()=>{class e extends f{constructor(t,r,s){super(t,r,s,Xe(th,{optional:!0}))}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(TL),pe(PO))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})()},{provide:_x,useFactory:function H(e,n,t){return new U(e,n,t)},deps:[wm,f,Bt]}],te=[{provide:TL,useFactory:()=>new C},{provide:Ko,useValue:"BrowserAnimations"},...Z],ce=[{provide:TL,useClass:jD},{provide:Ko,useValue:"NoopAnimations"},...Z];let le=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?ce:te}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:te,imports:[R5]})}return e})();class J extends It{constructor(n=1/0,t=1/0,r=rO){super(),this._bufferSize=n,this._windowTime=t,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,t)}next(n){const{isStopped:t,_buffer:r,_infiniteTimeWindow:s,_timestampProvider:c,_windowTime:h}=this;t||(r.push(n),!s&&r.push(c.now()+h)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(n),{_infiniteTimeWindow:r,_buffer:s}=this,c=s.slice();for(let h=0;hnew It),resetOnError:t=!0,resetOnComplete:r=!0,resetOnRefCountZero:s=!0}=e;return c=>{let h,y,E,M=0,R=!1,$=!1;const j=()=>{y?.unsubscribe(),y=void 0},X=()=>{j(),h=E=void 0,R=$=!1},K=()=>{const ie=h;X(),ie?.unsubscribe()};return be((ie,me)=>{M++,!$&&!R&&j();const Me=E=E??n();me.add(()=>{M--,0===M&&!$&&!R&&(y=we(K,s))}),Me.subscribe(me),!h&&M>0&&(h=new Wn({next:Ce=>Me.next(Ce),error:Ce=>{$=!0,j(),y=we(X,t,Ce),Me.error(Ce)},complete:()=>{R=!0,j(),y=we(X,r),Me.complete()}}),Gs(ie).subscribe(h))})(c)}}function we(e,n,...t){if(!0===n)return void e();if(!1===n)return;const r=new Wn({next:()=>{r.unsubscribe(),e()}});return Gs(n(...t)).subscribe(r)}function ne(e,n,t){let r,s=!1;return e&&"object"==typeof e?({bufferSize:r=1/0,windowTime:n=1/0,refCount:s=!1,scheduler:t}=e):r=e??1/0,oe({connector:()=>new J(r,n,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}const ge=Hi(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function de(e){return be((n,t)=>{let r=!1;n.subscribe(Se(t,s=>{r=!0,t.next(s)},()=>{r||t.next(e),t.complete()}))})}function Te(e=Pe){return be((n,t)=>{let r=!1;n.subscribe(Se(t,s=>{r=!0,t.next(s)},()=>r?t.complete():t.error(e())))})}function Pe(){return new ge}function Ie(e,n){const t=arguments.length>=2;return r=>r.pipe(e?ii((s,c)=>e(s,c,r)):Wi,Bo(1),t?de(n):Te(()=>new ge))}let Ve={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function ft(e){Ve=e}const Ke=/[&<>"']/,Dt=new RegExp(Ke.source,"g"),je=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,tt=new RegExp(je.source,"g"),it={"&":"&","<":"<",">":">",'"':""","'":"'"},Oe=e=>it[e];function _t(e,n){if(n){if(Ke.test(e))return e.replace(Dt,Oe)}else if(je.test(e))return e.replace(tt,Oe);return e}const qt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,un=/(^|[^\[])\^/g;function xt(e,n){e="string"==typeof e?e:e.source,n=n||"";const t={replace:(r,s)=>(s=(s="object"==typeof s&&"source"in s?s.source:s).replace(un,"$1"),e=e.replace(r,s),t),getRegex:()=>new RegExp(e,n)};return t}function ur(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ss={exec:()=>null};function Ks(e,n){const r=e.replace(/\|/g,(c,h,y)=>{let E=!1,M=h;for(;--M>=0&&"\\"===y[M];)E=!E;return E?"|":" |"}).split(/ \|/);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),n)if(r.length>n)r.splice(n);else for(;r.length0)return{type:"space",raw:t[0]}}code(n){const t=this.rules.block.code.exec(n);if(t){const r=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:as(r,"\n")}}}fences(n){const t=this.rules.block.fences.exec(n);if(t){const r=t[0],s=function ud(e,n){const t=e.match(/^(\s+)(?:```)/);if(null===t)return n;const r=t[1];return n.split("\n").map(s=>{const c=s.match(/^\s+/);if(null===c)return s;const[h]=c;return h.length>=r.length?s.slice(r.length):s}).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:s}}}heading(n){const t=this.rules.block.heading.exec(n);if(t){let r=t[2].trim();if(/#$/.test(r)){const s=as(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(n){const t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:t[0]}}blockquote(n){const t=this.rules.block.blockquote.exec(n);if(t){const r=as(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),s=this.lexer.state.top;this.lexer.state.top=!0;const c=this.lexer.blockTokens(r);return this.lexer.state.top=s,{type:"blockquote",raw:t[0],tokens:c,text:r}}}list(n){let t=this.rules.block.list.exec(n);if(t){let r=t[1].trim();const s=r.length>1,c={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");const h=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let y="",E="",M=!1;for(;n;){let R=!1;if(!(t=h.exec(n))||this.rules.block.hr.test(n))break;y=t[0],n=n.substring(y.length);let $=t[2].split("\n",1)[0].replace(/^\t+/,Me=>" ".repeat(3*Me.length)),j=n.split("\n",1)[0],X=0;this.options.pedantic?(X=2,E=$.trimStart()):(X=t[2].search(/[^ ]/),X=X>4?1:X,E=$.slice(X),X+=t[1].length);let K=!1;if(!$&&/^ *$/.test(j)&&(y+=j+"\n",n=n.substring(j.length+1),R=!0),!R){const Me=new RegExp(`^ {0,${Math.min(3,X-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),Ce=new RegExp(`^ {0,${Math.min(3,X-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),rt=new RegExp(`^ {0,${Math.min(3,X-1)}}(?:\`\`\`|~~~)`),Mt=new RegExp(`^ {0,${Math.min(3,X-1)}}#`);for(;n;){const Et=n.split("\n",1)[0];if(j=Et,this.options.pedantic&&(j=j.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),rt.test(j)||Mt.test(j)||Me.test(j)||Ce.test(n))break;if(j.search(/[^ ]/)>=X||!j.trim())E+="\n"+j.slice(X);else{if(K||$.search(/[^ ]/)>=4||rt.test($)||Mt.test($)||Ce.test($))break;E+="\n"+j}!K&&!j.trim()&&(K=!0),y+=Et+"\n",n=n.substring(Et.length+1),$=j.slice(X)}}c.loose||(M?c.loose=!0:/\n *\n *$/.test(y)&&(M=!0));let me,ie=null;this.options.gfm&&(ie=/^\[[ xX]\] /.exec(E),ie&&(me="[ ] "!==ie[0],E=E.replace(/^\[[ xX]\] +/,""))),c.items.push({type:"list_item",raw:y,task:!!ie,checked:me,loose:!1,text:E,tokens:[]}),c.raw+=y}c.items[c.items.length-1].raw=y.trimEnd(),c.items[c.items.length-1].text=E.trimEnd(),c.raw=c.raw.trimEnd();for(let R=0;R"space"===X.type),j=$.length>0&&$.some(X=>/\n.*\n/.test(X.raw));c.loose=j}if(c.loose)for(let R=0;R$/,"$1").replace(this.rules.inline._escapes,"$1"):"",c=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:s,title:c}}}table(n){const t=this.rules.block.table.exec(n);if(t){if(!/[:|]/.test(t[2]))return;const r={type:"table",raw:t[0],header:Ks(t[1]).map(s=>({text:s,tokens:[]})),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(r.header.length===r.align.length){let c,h,y,E,s=r.align.length;for(c=0;c({text:M,tokens:[]}));for(s=r.header.length,h=0;h/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(n){const t=this.rules.inline.link.exec(n);if(t){const r=t[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const h=as(r.slice(0,-1),"\\");if((r.length-h.length)%2==0)return}else{const h=function ba(e,n){if(-1===e.indexOf(n[1]))return-1;let t=0;for(let r=0;r-1){const E=(0===t[0].indexOf("!")?5:4)+t[1].length+h;t[2]=t[2].substring(0,h),t[0]=t[0].substring(0,E).trim(),t[3]=""}}let s=t[2],c="";if(this.options.pedantic){const h=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);h&&(s=h[1],c=h[3])}else c=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(r)?s.slice(1):s.slice(1,-1)),KD(t,{href:s&&s.replace(this.rules.inline._escapes,"$1"),title:c&&c.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(n,t){let r;if((r=this.rules.inline.reflink.exec(n))||(r=this.rules.inline.nolink.exec(n))){let s=(r[2]||r[1]).replace(/\s+/g," ");if(s=t[s.toLowerCase()],!s){const c=r[0].charAt(0);return{type:"text",raw:c,text:c}}return KD(r,s,r[0],this.lexer)}}emStrong(n,t,r=""){let s=this.rules.inline.emStrong.lDelim.exec(n);if(!(!s||s[3]&&r.match(/[\p{L}\p{N}]/u))&&(!s[1]&&!s[2]||!r||this.rules.inline.punctuation.exec(r))){const h=[...s[0]].length-1;let y,E,M=h,R=0;const $="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for($.lastIndex=0,t=t.slice(-1*n.length+h);null!=(s=$.exec(t));){if(y=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!y)continue;if(E=[...y].length,s[3]||s[4]){M+=E;continue}if((s[5]||s[6])&&h%3&&!((h+E)%3)){R+=E;continue}if(M-=E,M>0)continue;E=Math.min(E,E+M+R);const j=[...s[0]][0].length,X=n.slice(0,h+s.index+j+E);if(Math.min(h,E)%2){const ie=X.slice(1,-1);return{type:"em",raw:X,text:ie,tokens:this.lexer.inlineTokens(ie)}}const K=X.slice(2,-2);return{type:"strong",raw:X,text:K,tokens:this.lexer.inlineTokens(K)}}}}codespan(n){const t=this.rules.inline.code.exec(n);if(t){let r=t[2].replace(/\n/g," ");const s=/[^ ]/.test(r),c=/^ /.test(r)&&/ $/.test(r);return s&&c&&(r=r.substring(1,r.length-1)),r=_t(r,!0),{type:"codespan",raw:t[0],text:r}}}br(n){const t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]}}del(n){const t=this.rules.inline.del.exec(n);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(n){const t=this.rules.inline.autolink.exec(n);if(t){let r,s;return"@"===t[2]?(r=_t(t[1]),s="mailto:"+r):(r=_t(t[1]),s=r),{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let r,s;if("@"===t[2])r=_t(t[0]),s="mailto:"+r;else{let c;do{c=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(c!==t[0]);r=_t(t[0]),s="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(n){const t=this.rules.inline.text.exec(n);if(t){let r;return r=this.lexer.state.inRawBlock?t[0]:_t(t[0]),{type:"text",raw:t[0],text:r}}}}const gn={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ss,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};gn.def=xt(gn.def).replace("label",gn._label).replace("title",gn._title).getRegex(),gn.bullet=/(?:[*+-]|\d{1,9}[.)])/,gn.listItemStart=xt(/^( *)(bull) */).replace("bull",gn.bullet).getRegex(),gn.list=xt(gn.list).replace(/bull/g,gn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+gn.def.source+")").getRegex(),gn._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gn._comment=/|$)/,gn.html=xt(gn.html,"i").replace("comment",gn._comment).replace("tag",gn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gn.lheading=xt(gn.lheading).replace(/bull/g,gn.bullet).getRegex(),gn.paragraph=xt(gn._paragraph).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.blockquote=xt(gn.blockquote).replace("paragraph",gn.paragraph).getRegex(),gn.normal={...gn},gn.gfm={...gn.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},gn.gfm.table=xt(gn.gfm.table).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.gfm.paragraph=xt(gn._paragraph).replace("hr",gn.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gn.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",gn._tag).getRegex(),gn.pedantic={...gn.normal,html:xt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",gn._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ss,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(gn.normal._paragraph).replace("hr",gn.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",gn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ss,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ss,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~"};Nt.punctuation=xt(Nt.punctuation,"u").replace(/punctuation/g,Nt._punctuation).getRegex(),Nt.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Nt.anyPunctuation=/\\[punct]/g,Nt._escapes=/\\([punct])/g,Nt._comment=xt(gn._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Nt.emStrong.lDelim=xt(Nt.emStrong.lDelim,"u").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimAst=xt(Nt.emStrong.rDelimAst,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimUnd=xt(Nt.emStrong.rDelimUnd,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt.anyPunctuation=xt(Nt.anyPunctuation,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt._escapes=xt(Nt._escapes,"gu").replace(/punct/g,Nt._punctuation).getRegex(),Nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Nt.autolink=xt(Nt.autolink).replace("scheme",Nt._scheme).replace("email",Nt._email).getRegex(),Nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nt.tag=xt(Nt.tag).replace("comment",Nt._comment).replace("attribute",Nt._attribute).getRegex(),Nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nt.link=xt(Nt.link).replace("label",Nt._label).replace("href",Nt._href).replace("title",Nt._title).getRegex(),Nt.reflink=xt(Nt.reflink).replace("label",Nt._label).replace("ref",gn._label).getRegex(),Nt.nolink=xt(Nt.nolink).replace("ref",gn._label).getRegex(),Nt.reflinkSearch=xt(Nt.reflinkSearch,"g").replace("reflink",Nt.reflink).replace("nolink",Nt.nolink).getRegex(),Nt.normal={...Nt},Nt.pedantic={...Nt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Nt._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nt._label).getRegex()},Nt.gfm={...Nt.normal,escape:xt(Nt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\E+" ".repeat(M.length));n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(y=>!!(r=y.call({lexer:this},n,t))&&(n=n.substring(r.raw.length),t.push(r),!0)))){if(r=this.tokenizer.space(n)){n=n.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(n)){n=n.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(r):(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);continue}if(r=this.tokenizer.fences(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(n)){n=n.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(s.raw+="\n"+r.raw,s.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);continue}if(r=this.tokenizer.table(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(n)){n=n.substring(r.raw.length),t.push(r);continue}if(c=n,this.options.extensions&&this.options.extensions.startBlock){let y=1/0;const E=n.slice(1);let M;this.options.extensions.startBlock.forEach(R=>{M=R.call({lexer:this},E),"number"==typeof M&&M>=0&&(y=Math.min(y,M))}),y<1/0&&y>=0&&(c=n.substring(0,y+1))}if(this.state.top&&(r=this.tokenizer.paragraph(c))){s=t[t.length-1],h&&"paragraph"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r),h=c.length!==n.length,n=n.substring(r.raw.length);continue}if(r=this.tokenizer.text(n)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r);continue}if(n){const y="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(y);break}throw new Error(y)}}return this.state.top=!0,t}inline(n,t=[]){return this.inlineQueue.push({src:n,tokens:t}),t}inlineTokens(n,t=[]){let r,s,c,y,E,M,h=n;if(this.tokens.links){const R=Object.keys(this.tokens.links);if(R.length>0)for(;null!=(y=this.tokenizer.rules.inline.reflinkSearch.exec(h));)R.includes(y[0].slice(y[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,y.index)+"["+"a".repeat(y[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(y=this.tokenizer.rules.inline.blockSkip.exec(h));)h=h.slice(0,y.index)+"["+"a".repeat(y[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(y=this.tokenizer.rules.inline.anyPunctuation.exec(h));)h=h.slice(0,y.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;n;)if(E||(M=""),E=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(R=>!!(r=R.call({lexer:this},n,t))&&(n=n.substring(r.raw.length),t.push(r),!0)))){if(r=this.tokenizer.escape(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(n)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(r=this.tokenizer.link(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(n,h,M)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(n)){n=n.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(n)){n=n.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(n))){n=n.substring(r.raw.length),t.push(r);continue}if(c=n,this.options.extensions&&this.options.extensions.startInline){let R=1/0;const $=n.slice(1);let j;this.options.extensions.startInline.forEach(X=>{j=X.call({lexer:this},$),"number"==typeof j&&j>=0&&(R=Math.min(R,j))}),R<1/0&&R>=0&&(c=n.substring(0,R+1))}if(r=this.tokenizer.inlineText(c)){n=n.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(M=r.raw.slice(-1)),E=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(n){const R="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(R);break}throw new Error(R)}}return t}}class z0{options;constructor(n){this.options=n||Ve}code(n,t,r){const s=(t||"").match(/^\S*/)?.[0];return n=n.replace(/\n$/,"")+"\n",s?'
    '+(r?n:_t(n,!0))+"
    \n":"
    "+(r?n:_t(n,!0))+"
    \n"}blockquote(n){return`
    \n${n}
    \n`}html(n,t){return n}heading(n,t,r){return`${n}\n`}hr(){return"
    \n"}list(n,t,r){const s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"\n"}listitem(n,t,r){return`
  • ${n}
  • \n`}checkbox(n){return"'}paragraph(n){return`

    ${n}

    \n`}table(n,t){return t&&(t=`${t}`),"\n\n"+n+"\n"+t+"
    \n"}tablerow(n){return`\n${n}\n`}tablecell(n,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`\n`}strong(n){return`${n}`}em(n){return`${n}`}codespan(n){return`${n}`}br(){return"
    "}del(n){return`${n}`}link(n,t,r){const s=ur(n);if(null===s)return r;let c='
    ",c}image(n,t,r){const s=ur(n);if(null===s)return r;let c=`${r}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":r+=this.renderer.code(c.text,c.lang,!!c.escaped);continue;case"table":{const h=c;let y="",E="";for(let R=0;R0&&"paragraph"===j.tokens[0].type?(j.tokens[0].text=me+" "+j.tokens[0].text,j.tokens[0].tokens&&j.tokens[0].tokens.length>0&&"text"===j.tokens[0].tokens[0].type&&(j.tokens[0].tokens[0].text=me+" "+j.tokens[0].tokens[0].text)):j.tokens.unshift({type:"text",text:me+" "}):ie+=me+" "}ie+=this.parse(j.tokens,M),R+=this.renderer.listitem(ie,K,!!X)}r+=this.renderer.list(R,y,E);continue}case"html":r+=this.renderer.html(c.text,c.block);continue;case"paragraph":r+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":{let h=c,y=h.tokens?this.parseInline(h.tokens):h.text;for(;s+1{r=r.concat(this.walkTokens(c[h],t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...n){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(c=>{if(!c.name)throw new Error("extension name required");if("renderer"in c){const h=t.renderers[c.name];t.renderers[c.name]=h?function(...y){let E=c.renderer.apply(this,y);return!1===E&&(E=h.apply(this,y)),E}:c.renderer}if("tokenizer"in c){if(!c.level||"block"!==c.level&&"inline"!==c.level)throw new Error("extension level must be 'block' or 'inline'");const h=t[c.level];h?h.unshift(c.tokenizer):t[c.level]=[c.tokenizer],c.start&&("block"===c.level?t.startBlock?t.startBlock.push(c.start):t.startBlock=[c.start]:"inline"===c.level&&(t.startInline?t.startInline.push(c.start):t.startInline=[c.start]))}"childTokens"in c&&c.childTokens&&(t.childTokens[c.name]=c.childTokens)}),s.extensions=t),r.renderer){const c=this.defaults.renderer||new z0(this.defaults);for(const h in r.renderer){const y=r.renderer[h],M=c[h];c[h]=(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$||""}}s.renderer=c}if(r.tokenizer){const c=this.defaults.tokenizer||new wf(this.defaults);for(const h in r.tokenizer){const y=r.tokenizer[h],M=c[h];c[h]=(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$}}s.tokenizer=c}if(r.hooks){const c=this.defaults.hooks||new C4;for(const h in r.hooks){const y=r.hooks[h],M=c[h];c[h]=C4.passThroughHooks.has(h)?R=>{if(this.defaults.async)return Promise.resolve(y.call(c,R)).then(j=>M.call(c,j));const $=y.call(c,R);return M.call(c,$)}:(...R)=>{let $=y.apply(c,R);return!1===$&&($=M.apply(c,R)),$}}s.hooks=c}if(r.walkTokens){const c=this.defaults.walkTokens,h=r.walkTokens;s.walkTokens=function(y){let E=[];return E.push(h.call(this,y)),c&&(E=E.concat(c.call(this,y))),E}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,t){return Ef.lex(n,t??this.defaults)}parser(n,t){return Cf.parse(n,t??this.defaults)}#e(n,t){return(r,s)=>{const c={...s},h={...this.defaults,...c};!0===this.defaults.async&&!1===c.async&&(h.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),h.async=!0);const y=this.#t(!!h.silent,!!h.async);if(typeof r>"u"||null===r)return y(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return y(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(h.hooks&&(h.hooks.options=h),h.async)return Promise.resolve(h.hooks?h.hooks.preprocess(r):r).then(E=>n(E,h)).then(E=>h.walkTokens?Promise.all(this.walkTokens(E,h.walkTokens)).then(()=>E):E).then(E=>t(E,h)).then(E=>h.hooks?h.hooks.postprocess(E):E).catch(y);try{h.hooks&&(r=h.hooks.preprocess(r));const E=n(r,h);h.walkTokens&&this.walkTokens(E,h.walkTokens);let M=t(E,h);return h.hooks&&(M=h.hooks.postprocess(M)),M}catch(E){return y(E)}}}#t(n,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",n){const s="

    An error occurred:

    "+_t(r.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(r);throw r}}};function yr(e,n){return ZD.parse(e,n)}yr.options=yr.setOptions=function(e){return ZD.setOptions(e),ft(yr.defaults=ZD.defaults),yr},yr.getDefaults=function Ne(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},yr.defaults=Ve,yr.use=function(...e){return ZD.use(...e),ft(yr.defaults=ZD.defaults),yr},yr.walkTokens=function(e,n){return ZD.walkTokens(e,n)},yr.parseInline=ZD.parseInline,yr.Parser=Cf,yr.parser=Cf.parse,yr.Renderer=z0,yr.TextRenderer=XO,yr.Lexer=Ef,yr.lexer=Ef.lex,yr.Tokenizer=wf,yr.Hooks=C4,yr.parse=yr;const Lre=["*"];let FQ=(()=>{class e{constructor(){this._buttonClick$=new It,this.copied$=this._buttonClick$.pipe(Sr(()=>Oh(zt(!0),Pa(3e3).pipe(R_(!1)))),Ih(),ne(1)),this.copiedText$=this.copied$.pipe(Wl(!1),ye(t=>t?"Copied":"Copy"))}onCopyToClipboardClick(){this._buttonClick$.next()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["markdown-clipboard"]],standalone:!0,features:[xi],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(r,s){1&r&&(Ae(0,"button",0),yn("click",function(){return s.onCopyToClipboardClick()}),uf(1,"async"),wt(2),uf(3,"async"),ke()),2&r&&(In("copied",cm(1,3,s.copied$)),Ze(2),Pr(cm(3,5,s.copiedText$)))},dependencies:[PI],encapsulation:2,changeDetection:0})}return e})();const zre=new $e("CLIPBOARD_OPTIONS");var Dq=function(e){return e.CommandLine="command-line",e.LineHighlight="line-highlight",e.LineNumbers="line-numbers",e}(Dq||{});const PQ=new $e("MARKED_EXTENSIONS"),LQ=new $e("MARKED_OPTIONS"),$Q=new $e("SECURITY_CONTEXT");let Mq=(()=>{class e{get options(){return this._options}set options(t){this._options={...this.DEFAULT_MARKED_OPTIONS,...t}}get renderer(){return this.options.renderer}set renderer(t){this.options.renderer=t}constructor(t,r,s,c,h,y,E){this.clipboardOptions=t,this.extensions=r,this.platform=c,this.securityContext=h,this.http=y,this.sanitizer=E,this.DEFAULT_MARKED_OPTIONS={renderer:new z0},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new It,this.reload$=this._reload$.asObservable(),this.options=s}parse(t,r=this.DEFAULT_PARSE_OPTIONS){const{decodeHtml:s,inline:c,emoji:h,mermaid:y,disableSanitizer:E}=r,M={...this.options,...r.markedOptions},R=M.renderer||this.renderer||new z0;this.extensions&&(this.renderer=this.extendsRendererForExtensions(R)),y&&(this.renderer=this.extendsRendererForMermaid(R));const $=this.trimIndentation(t),j=s?this.decodeHtml($):$,X=h?this.parseEmoji(j):j,K=this.parseMarked(X,M,c);return(E?K:this.sanitizer.sanitize(this.securityContext,K))||""}render(t,r=this.DEFAULT_RENDER_OPTIONS,s){const{clipboard:c,clipboardOptions:h,katex:y,katexOptions:E,mermaid:M,mermaidOptions:R}=r;c&&this.renderClipboard(t,s,{...this.DEFAULT_CLIPBOARD_OPTIONS,...this.clipboardOptions,...h}),y&&this.renderKatex(t,{...this.DEFAULT_KATEX_OPTIONS,...E}),M&&this.renderMermaid(t,{...this.DEFAULT_MERMAID_OPTIONS,...R}),this.highlight(t)}reload(){this._reload$.next()}getSource(t){if(!this.http)throw new Error("[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information");return this.http.get(t,{responseType:"text"}).pipe(ye(r=>this.handleExtension(t,r)))}highlight(t){if(!Eh(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;t||(t=document);const r=t.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(r,s=>s.classList.add("language-none")),Prism.highlightAllUnder(t)}decodeHtml(t){if(!Eh(this.platform))return t;const r=document.createElement("textarea");return r.innerHTML=t,r.value}extendsRendererForExtensions(t){const r=t;return!0===r.\u0275NgxMarkdownRendererExtendedForExtensions||(this.extensions?.length>0&&yr.use(...this.extensions),r.\u0275NgxMarkdownRendererExtendedForExtensions=!0),t}extendsRendererForMermaid(t){const r=t;if(!0===r.\u0275NgxMarkdownRendererExtendedForMermaid)return t;const s=t.code;return t.code=function(c,h,y){return"mermaid"===h?`
    ${c}
    `:s.call(this,c,h,y)},r.\u0275NgxMarkdownRendererExtendedForMermaid=!0,t}handleExtension(t,r){const s=t.lastIndexOf("://"),c=s>-1?t.substring(s+4):t,h=c.lastIndexOf("/"),y=h>-1?c.substring(h+1).split("?")[0]:"",E=y.lastIndexOf("."),M=E>-1?y.substring(E+1):"";return M&&"md"!==M?"```"+M+"\n"+r+"\n```":r}parseMarked(t,r,s=!1){return r.renderer&&(yr.use({renderer:r.renderer}),delete r.renderer),s?yr.parseInline(t,r):yr.parse(t,r)}parseEmoji(t){if(!Eh(this.platform))return t;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error("[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information");return joypixels.shortnameToUnicode(t)}renderKatex(t,r){if(Eh(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error("[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information");renderMathInElement(t,r)}}renderClipboard(t,r,s){if(!Eh(this.platform))return;if(typeof ClipboardJS>"u")throw new Error("[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information");if(!r)throw new Error("[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function");const{buttonComponent:c,buttonTemplate:h}=s,y=t.querySelectorAll("pre");for(let E=0;E$.style.opacity="1",M.onmouseout=()=>$.style.opacity="0",j=c?r.createComponent(c).hostView:h?r.createEmbeddedView(h):r.createComponent(FQ).hostView,j.rootNodes.forEach(K=>{K.onmouseover=()=>$.style.opacity="1",$.appendChild(K),X=new ClipboardJS(K,{text:()=>M.innerText})}),j.onDestroy(()=>X.destroy())}}renderMermaid(t,r=this.DEFAULT_MERMAID_OPTIONS){if(!Eh(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error("[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information");const s=t.querySelectorAll(".mermaid");0!==s.length&&(mermaid.initialize(r),mermaid.run({nodes:s}))}trimIndentation(t){if(!t)return"";let r;return t.split("\n").map(s=>{let c=r;return s.length>0&&(c=isNaN(c)?s.search(/\S|$/):Math.min(s.search(/\S|$/),c)),isNaN(r)&&(r=c),c?s.substring(c):s}).join("\n")}static#e=this.\u0275fac=function(r){return new(r||e)(pe(zre,8),pe(PQ,8),pe(LQ,8),pe(ps),pe($Q),pe(M_,8),pe(n1))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),HL=(()=>{class e{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(t){this._disableSanitizer=this.coerceBooleanProperty(t)}get inline(){return this._inline}set inline(t){this._inline=this.coerceBooleanProperty(t)}get clipboard(){return this._clipboard}set clipboard(t){this._clipboard=this.coerceBooleanProperty(t)}get emoji(){return this._emoji}set emoji(t){this._emoji=this.coerceBooleanProperty(t)}get katex(){return this._katex}set katex(t){this._katex=this.coerceBooleanProperty(t)}get mermaid(){return this._mermaid}set mermaid(t){this._mermaid=this.coerceBooleanProperty(t)}get lineHighlight(){return this._lineHighlight}set lineHighlight(t){this._lineHighlight=this.coerceBooleanProperty(t)}get lineNumbers(){return this._lineNumbers}set lineNumbers(t){this._lineNumbers=this.coerceBooleanProperty(t)}get commandLine(){return this._commandLine}set commandLine(t){this._commandLine=this.coerceBooleanProperty(t)}constructor(t,r,s){this.element=t,this.markdownService=r,this.viewContainerRef=s,this.error=new cn,this.load=new cn,this.ready=new cn,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new It}ngOnChanges(){this.loadContent()}loadContent(){null==this.data?null==this.src||this.handleSrc():this.handleData()}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(Kn(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(t,r=!1){var s=this;return(0,sn.Z)(function*(){const c={decodeHtml:r,inline:s.inline,emoji:s.emoji,mermaid:s.mermaid,disableSanitizer:s.disableSanitizer},h={clipboard:s.clipboard,clipboardOptions:{buttonComponent:s.clipboardButtonComponent,buttonTemplate:s.clipboardButtonTemplate},katex:s.katex,katexOptions:s.katexOptions,mermaid:s.mermaid,mermaidOptions:s.mermaidOptions},y=yield s.markdownService.parse(t,c);s.element.nativeElement.innerHTML=y,s.handlePlugins(),s.markdownService.render(s.element.nativeElement,h,s.viewContainerRef),s.ready.emit()})()}coerceBooleanProperty(t){return null!=t&&"false"!=`${String(t)}`}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:t=>{this.render(t).then(()=>{this.load.emit(t)})},error:t=>this.error.emit(t)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,Dq.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,Dq.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(t,r){const s=t.querySelectorAll("pre");for(let c=0;c{const y=r[h];if(y){const E=this.toLispCase(h);s.item(c).setAttribute(E,y.toString())}})}toLispCase(t){const r=t.match(/([A-Z])/g);if(!r)return t;let s=t.toString();for(let c=0,h=r.length;c{class e{static forRoot(t){return{ngModule:e,providers:[Yre(t)]}}static forChild(){return{ngModule:e}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();var BQ;function YO(e){return!!e&&(e instanceof Qn||Jt(e.lift)&&Jt(e.subscribe))}function qL(e){return new Qn(n=>{Gs(e()).subscribe(n)})}function C1(e,n){const t=Jt(e)?e:()=>e,r=s=>s.error(t());return new Qn(n?s=>n.schedule(r,0,s):r)}function Aq(){return be((e,n)=>{let t=null;e._refCount++;const r=Se(n,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(t=null);const s=e._connection,c=t;t=null,s&&(!c||s===c)&&s.unsubscribe(),n.unsubscribe()});e.subscribe(r),r.closed||(t=e.connect())})}!function(e){let n;var s;let t,r;(s=n=e.SecurityLevel||(e.SecurityLevel={})).Strict="strict",s.Loose="loose",s.Antiscript="antiscript",s.Sandbox="sandbox",function(s){s.Base="base",s.Forest="forest",s.Dark="dark",s.Default="default",s.Neutral="neutral"}(t=e.Theme||(e.Theme={})),function(s){s[s.Debug=1]="Debug",s[s.Info=2]="Info",s[s.Warn=3]="Warn",s[s.Error=4]="Error",s[s.Fatal=5]="Fatal"}(r=e.LogLevel||(e.LogLevel={}))}(BQ||(BQ={}));class zQ extends Qn{constructor(n,t){super(),this.source=n,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,ae(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new xn;const t=this.getSubject();n.add(this.source.subscribe(Se(t,void 0,()=>{this._teardown(),t.complete()},r=>{this._teardown(),t.error(r)},()=>this._teardown()))),n.closed&&(this._connection=null,n=xn.EMPTY)}return n}refCount(){return Aq()(this)}}function Sf(e){return be((n,t)=>{let c,r=null,s=!1;r=n.subscribe(Se(t,void 0,void 0,h=>{c=Gs(e(h,Sf(e)(n))),r?(r.unsubscribe(),r=null,c.subscribe(t)):s=!0})),s&&(r.unsubscribe(),r=null,c.subscribe(t))})}function Tq(e){return e<=0?()=>Hl:be((n,t)=>{let r=[];n.subscribe(Se(t,s=>{r.push(s),e{for(const s of r)t.next(s);t.complete()},void 0,()=>{r=null}))})}const wi="primary",GL=Symbol("RouteTitle");class Jre{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const t=this.params[n];return Array.isArray(t)?t[0]:t}return null}getAll(n){if(this.has(n)){const t=this.params[n];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function KO(e){return new Jre(e)}function eoe(e,n,t){const r=t.path.split("/");if(r.length>e.length||"full"===t.pathMatch&&(n.hasChildren()||r.lengthr[c]===s)}return e===n}function jQ(e){return e.length>0?e[e.length-1]:null}function S1(e){return YO(e)?e:Cw(e)?Cn(Promise.resolve(e)):zt(e)}const noe={exact:function WQ(e,n,t){if(!QD(e.segments,n.segments)||!S4(e.segments,n.segments,t)||e.numberOfChildren!==n.numberOfChildren)return!1;for(const r in n.children)if(!e.children[r]||!WQ(e.children[r],n.children[r],t))return!1;return!0},subset:qQ},UQ={exact:function ioe(e,n){return P_(e,n)},subset:function roe(e,n){return Object.keys(n).length<=Object.keys(e).length&&Object.keys(n).every(t=>VQ(e[t],n[t]))},ignored:()=>!0};function HQ(e,n,t){return noe[t.paths](e.root,n.root,t.matrixParams)&&UQ[t.queryParams](e.queryParams,n.queryParams)&&!("exact"===t.fragment&&e.fragment!==n.fragment)}function qQ(e,n,t){return GQ(e,n,n.segments,t)}function GQ(e,n,t,r){if(e.segments.length>t.length){const s=e.segments.slice(0,t.length);return!(!QD(s,t)||n.hasChildren()||!S4(s,t,r))}if(e.segments.length===t.length){if(!QD(e.segments,t)||!S4(e.segments,t,r))return!1;for(const s in n.children)if(!e.children[s]||!qQ(e.children[s],n.children[s],r))return!1;return!0}{const s=t.slice(0,e.segments.length),c=t.slice(e.segments.length);return!!(QD(e.segments,s)&&S4(e.segments,s,r)&&e.children[wi])&&GQ(e.children[wi],n,c,r)}}function S4(e,n,t){return n.every((r,s)=>UQ[t](e[s].parameters,r.parameters))}class ZO{constructor(n=new qr([],{}),t={},r=null){this.root=n,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap??=KO(this.queryParams),this._queryParamMap}toString(){return aoe.serialize(this)}}class qr{constructor(n,t){this.segments=n,this.children=t,this.parent=null,Object.values(t).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return D4(this)}}class XL{constructor(n,t){this.path=n,this.parameters=t}get parameterMap(){return this._parameterMap??=KO(this.parameters),this._parameterMap}toString(){return KQ(this)}}function QD(e,n){return e.length===n.length&&e.every((t,r)=>t.path===n[r].path)}let QO=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>new Iq,providedIn:"root"})}return e})();class Iq{parse(n){const t=new yoe(n);return new ZO(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(n){const t=`/${YL(n.root,!0)}`,r=function uoe(e){const n=Object.entries(e).map(([t,r])=>Array.isArray(r)?r.map(s=>`${M4(t)}=${M4(s)}`).join("&"):`${M4(t)}=${M4(r)}`).filter(t=>t);return n.length?`?${n.join("&")}`:""}(n.queryParams);return`${t}${r}${"string"==typeof n.fragment?`#${function loe(e){return encodeURI(e)}(n.fragment)}`:""}`}}const aoe=new Iq;function D4(e){return e.segments.map(n=>KQ(n)).join("/")}function YL(e,n){if(!e.hasChildren())return D4(e);if(n){const t=e.children[wi]?YL(e.children[wi],!1):"",r=[];return Object.entries(e.children).forEach(([s,c])=>{s!==wi&&r.push(`${s}:${YL(c,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function soe(e,n){let t=[];return Object.entries(e.children).forEach(([r,s])=>{r===wi&&(t=t.concat(n(s,r)))}),Object.entries(e.children).forEach(([r,s])=>{r!==wi&&(t=t.concat(n(s,r)))}),t}(e,(r,s)=>s===wi?[YL(e.children[wi],!1)]:[`${s}:${YL(r,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[wi]?`${D4(e)}/${t[0]}`:`${D4(e)}/(${t.join("//")})`}}function XQ(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function M4(e){return XQ(e).replace(/%3B/gi,";")}function Oq(e){return XQ(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function A4(e){return decodeURIComponent(e)}function YQ(e){return A4(e.replace(/\+/g,"%20"))}function KQ(e){return`${Oq(e.path)}${function coe(e){return Object.entries(e).map(([n,t])=>`;${Oq(n)}=${Oq(t)}`).join("")}(e.parameters)}`}const doe=/^[^\/()?;#]+/;function Rq(e){const n=e.match(doe);return n?n[0]:""}const foe=/^[^\/()?;=#]+/,poe=/^[^=?&#]+/,goe=/^[^&#]+/;class yoe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new qr([],{}):new qr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(t).length>0)&&(r[wi]=new qr(n,t)),r}parseSegment(){const n=Rq(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new _e(4009,!1);return this.capture(n),new XL(A4(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const t=function hoe(e){const n=e.match(foe);return n?n[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=Rq(this.remaining);s&&(r=s,this.capture(r))}n[A4(t)]=A4(r)}parseQueryParam(n){const t=function moe(e){const n=e.match(poe);return n?n[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const h=function _oe(e){const n=e.match(goe);return n?n[0]:""}(this.remaining);h&&(r=h,this.capture(r))}const s=YQ(t),c=YQ(r);if(n.hasOwnProperty(s)){let h=n[s];Array.isArray(h)||(h=[h],n[s]=h),h.push(c)}else n[s]=c}parseParens(n){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=Rq(this.remaining),s=this.remaining[r.length];if("/"!==s&&")"!==s&&";"!==s)throw new _e(4010,!1);let c;r.indexOf(":")>-1?(c=r.slice(0,r.indexOf(":")),this.capture(c),this.capture(":")):n&&(c=wi);const h=this.parseChildren();t[c]=1===Object.keys(h).length?h[wi]:new qr([],h),this.consumeOptional("//")}return t}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new _e(4011,!1)}}function ZQ(e){return e.segments.length>0?new qr([],{[wi]:e}):e}function QQ(e){const n={};for(const[r,s]of Object.entries(e.children)){const c=QQ(s);if(r===wi&&0===c.segments.length&&c.hasChildren())for(const[h,y]of Object.entries(c.children))n[h]=y;else(c.segments.length>0||c.hasChildren())&&(n[r]=c)}return function boe(e){if(1===e.numberOfChildren&&e.children[wi]){const n=e.children[wi];return new qr(e.segments.concat(n.segments),n.children)}return e}(new qr(e.segments,n))}function JO(e){return e instanceof ZO}function JQ(e){let n;const s=ZQ(function t(c){const h={};for(const E of c.children){const M=t(E);h[E.outlet]=M}const y=new qr(c.url,h);return c===e&&(n=y),y}(e.root));return n??s}function eJ(e,n,t,r){let s=e;for(;s.parent;)s=s.parent;if(0===n.length)return Nq(s,s,s,t,r);const c=function xoe(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new nJ(!0,0,e);let n=0,t=!1;const r=e.reduce((s,c,h)=>{if("object"==typeof c&&null!=c){if(c.outlets){const y={};return Object.entries(c.outlets).forEach(([E,M])=>{y[E]="string"==typeof M?M.split("/"):M}),[...s,{outlets:y}]}if(c.segmentPath)return[...s,c.segmentPath]}return"string"!=typeof c?[...s,c]:0===h?(c.split("/").forEach((y,E)=>{0==E&&"."===y||(0==E&&""===y?t=!0:".."===y?n++:""!=y&&s.push(y))}),s):[...s,c]},[]);return new nJ(t,n,r)}(n);if(c.toRoot())return Nq(s,s,new qr([],{}),t,r);const h=function woe(e,n,t){if(e.isAbsolute)return new k4(n,!0,0);if(!t)return new k4(n,!1,NaN);if(null===t.parent)return new k4(t,!0,0);const r=T4(e.commands[0])?0:1;return function Eoe(e,n,t){let r=e,s=n,c=t;for(;c>s;){if(c-=s,r=r.parent,!r)throw new _e(4005,!1);s=r.segments.length}return new k4(r,!1,s-c)}(t,t.segments.length-1+r,e.numberOfDoubleDots)}(c,s,e),y=h.processChildren?ZL(h.segmentGroup,h.index,c.commands):iJ(h.segmentGroup,h.index,c.commands);return Nq(s,h.segmentGroup,y,t,r)}function T4(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function KL(e){return"object"==typeof e&&null!=e&&e.outlets}function Nq(e,n,t,r,s){let h,c={};r&&Object.entries(r).forEach(([E,M])=>{c[E]=Array.isArray(M)?M.map(R=>`${R}`):`${M}`}),h=e===n?t:tJ(e,n,t);const y=ZQ(QQ(h));return new ZO(y,c,s)}function tJ(e,n,t){const r={};return Object.entries(e.children).forEach(([s,c])=>{r[s]=c===n?t:tJ(c,n,t)}),new qr(e.segments,r)}class nJ{constructor(n,t,r){if(this.isAbsolute=n,this.numberOfDoubleDots=t,this.commands=r,n&&r.length>0&&T4(r[0]))throw new _e(4003,!1);const s=r.find(KL);if(s&&s!==jQ(r))throw new _e(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class k4{constructor(n,t,r){this.segmentGroup=n,this.processChildren=t,this.index=r}}function iJ(e,n,t){if(e??=new qr([],{}),0===e.segments.length&&e.hasChildren())return ZL(e,n,t);const r=function Soe(e,n,t){let r=0,s=n;const c={match:!1,pathIndex:0,commandIndex:0};for(;s=t.length)return c;const h=e.segments[s],y=t[r];if(KL(y))break;const E=`${y}`,M=r0&&void 0===E)break;if(E&&M&&"object"==typeof M&&void 0===M.outlets){if(!oJ(E,M,h))return c;r+=2}else{if(!oJ(E,{},h))return c;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(e,n,t),s=t.slice(r.commandIndex);if(r.match&&r.pathIndexc!==wi)&&e.children[wi]&&1===e.numberOfChildren&&0===e.children[wi].segments.length){const c=ZL(e.children[wi],n,t);return new qr(e.segments,c.children)}return Object.entries(r).forEach(([c,h])=>{"string"==typeof h&&(h=[h]),null!==h&&(s[c]=iJ(e.children[c],n,h))}),Object.entries(e.children).forEach(([c,h])=>{void 0===r[c]&&(s[c]=h)}),new qr(e.segments,s)}}function Fq(e,n,t){const r=e.segments.slice(0,n);let s=0;for(;s{"string"==typeof r&&(r=[r]),null!==r&&(n[t]=Fq(new qr([],{}),0,r))}),n}function rJ(e){const n={};return Object.entries(e).forEach(([t,r])=>n[t]=`${r}`),n}function oJ(e,n,t){return e==t.path&&P_(n,t.parameters)}const QL="imperative";var Ki=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}(Ki||{});class L_{constructor(n,t){this.id=n,this.url=t}}class JD extends L_{constructor(n,t,r="imperative",s=null){super(n,t),this.type=Ki.NavigationStart,this.navigationTrigger=r,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class $_ extends L_{constructor(n,t,r){super(n,t),this.urlAfterRedirects=r,this.type=Ki.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Lh=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Lh||{}),I4=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(I4||{});class eM extends L_{constructor(n,t,r,s){super(n,t),this.reason=r,this.code=s,this.type=Ki.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class e2 extends L_{constructor(n,t,r,s){super(n,t),this.reason=r,this.code=s,this.type=Ki.NavigationSkipped}}class t2 extends L_{constructor(n,t,r,s){super(n,t),this.error=r,this.target=s,this.type=Ki.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class O4 extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Moe extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Aoe extends L_{constructor(n,t,r,s,c){super(n,t),this.urlAfterRedirects=r,this.state=s,this.shouldActivate=c,this.type=Ki.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Toe extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class sJ extends L_{constructor(n,t,r,s){super(n,t),this.urlAfterRedirects=r,this.state=s,this.type=Ki.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class koe{constructor(n){this.route=n,this.type=Ki.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Ioe{constructor(n){this.route=n,this.type=Ki.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Ooe{constructor(n){this.snapshot=n,this.type=Ki.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Roe{constructor(n){this.snapshot=n,this.type=Ki.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Noe{constructor(n){this.snapshot=n,this.type=Ki.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Foe{constructor(n){this.snapshot=n,this.type=Ki.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class aJ{constructor(n,t,r){this.routerEvent=n,this.position=t,this.anchor=r,this.type=Ki.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Pq{}class Lq{constructor(n){this.url=n}}class Poe{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new JL,this.attachRef=null}}let JL=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(t,r){const s=this.getOrCreateContext(t);s.outlet=r,this.contexts.set(t,s)}onChildOutletDestroyed(t){const r=this.getContext(t);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let r=this.getContext(t);return r||(r=new Poe,this.contexts.set(t,r)),r}getContext(t){return this.contexts.get(t)||null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class lJ{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const t=this.pathFromRoot(n);return t.length>1?t[t.length-2]:null}children(n){const t=$q(n,this._root);return t?t.children.map(r=>r.value):[]}firstChild(n){const t=$q(n,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(n){const t=Bq(n,this._root);return t.length<2?[]:t[t.length-2].children.map(s=>s.value).filter(s=>s!==n)}pathFromRoot(n){return Bq(n,this._root).map(t=>t.value)}}function $q(e,n){if(e===n.value)return n;for(const t of n.children){const r=$q(e,t);if(r)return r}return null}function Bq(e,n){if(e===n.value)return[n];for(const t of n.children){const r=Bq(e,t);if(r.length)return r.unshift(n),r}return[]}class Nm{constructor(n,t){this.value=n,this.children=t}toString(){return`TreeNode(${this.value})`}}function n2(e){const n={};return e&&e.children.forEach(t=>n[t.value.outlet]=t),n}class cJ extends lJ{constructor(n,t){super(n),this.snapshot=t,jq(this,n)}toString(){return this.snapshot.toString()}}function uJ(e){const n=function Loe(e){const c=new Vq([],{},{},"",{},wi,e,null,{});return new dJ("",new Nm(c,[]))}(e),t=new wr([new XL("",{})]),r=new wr({}),s=new wr({}),c=new wr({}),h=new wr(""),y=new tM(t,r,c,h,s,wi,e,n.root);return y.snapshot=n.root,new cJ(new Nm(y,[]),n)}class tM{constructor(n,t,r,s,c,h,y,E){this.urlSubject=n,this.paramsSubject=t,this.queryParamsSubject=r,this.fragmentSubject=s,this.dataSubject=c,this.outlet=h,this.component=y,this._futureSnapshot=E,this.title=this.dataSubject?.pipe(ye(M=>M[GL]))??zt(void 0),this.url=n,this.params=t,this.queryParams=r,this.fragment=s,this.data=c}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(ye(n=>KO(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ye(n=>KO(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function zq(e,n,t="emptyOnly"){let r;const{routeConfig:s}=e;return r=null===n||"always"!==t&&""!==s?.path&&(n.component||n.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.data,...s?.data,...e._resolvedData}},s&&hJ(s)&&(r.resolve[GL]=s.title),r}class Vq{get title(){return this.data?.[GL]}constructor(n,t,r,s,c,h,y,E,M){this.url=n,this.params=t,this.queryParams=r,this.fragment=s,this.data=c,this.outlet=h,this.component=y,this.routeConfig=E,this._resolve=M}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??=KO(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=KO(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class dJ extends lJ{constructor(n,t){super(t),this.url=n,jq(this,t)}toString(){return fJ(this._root)}}function jq(e,n){n.value._routerState=e,n.children.forEach(t=>jq(e,t))}function fJ(e){const n=e.children.length>0?` { ${e.children.map(fJ).join(", ")} } `:"";return`${e.value}${n}`}function Uq(e){if(e.snapshot){const n=e.snapshot,t=e._futureSnapshot;e.snapshot=t,P_(n.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),n.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),P_(n.params,t.params)||e.paramsSubject.next(t.params),function toe(e,n){if(e.length!==n.length)return!1;for(let t=0;tP_(t.parameters,n[r].parameters))}(e.url,n.url);return t&&!(!e.parent!=!n.parent)&&(!e.parent||Hq(e.parent,n.parent))}function hJ(e){return"string"==typeof e.title||null===e.title}let Wq=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=wi,this.activateEvents=new cn,this.deactivateEvents=new cn,this.attachEvents=new cn,this.detachEvents=new cn,this.parentContexts=Xe(JL),this.location=Xe(Jo),this.changeDetector=Xe(Qo),this.environmentInjector=Xe(xo),this.inputBinder=Xe(R4,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(t){if(t.name){const{firstChange:r,previousValue:s}=t.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new _e(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new _e(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new _e(4012,!1);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new _e(4013,!1);this._activatedRoute=t;const s=this.location,h=t.snapshot.component,y=this.parentContexts.getOrCreateContext(this.name).children,E=new $oe(t,y,s.injector);this.activated=s.createComponent(h,{index:s.length,injector:E,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[vo]})}return e})();class $oe{constructor(n,t,r){this.route=n,this.childContexts=t,this.parent=r}get(n,t){return n===tM?this.route:n===JL?this.childContexts:this.parent.get(n,t)}}const R4=new $e("");let pJ=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){const{activatedRoute:r}=t,s=d1([r.queryParams,r.params,r.data]).pipe(Sr(([c,h,y],E)=>(y={...c,...h,...y},0===E?zt(y):Promise.resolve(y)))).subscribe(c=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==r||null===r.component)return void this.unsubscribeFromRouteData(t);const h=function K6(e){const n=Jn(e);if(!n)return null;const t=new pc(n);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}(r.component);if(h)for(const{templateName:y}of h.inputs)t.activatedComponentRef.setInput(y,c[y]);else this.unsubscribeFromRouteData(t)});this.outletDataSubscriptions.set(t,s)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function e$(e,n,t){if(t&&e.shouldReuseRoute(n.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=n.value;const s=function zoe(e,n,t){return n.children.map(r=>{for(const s of t.children)if(e.shouldReuseRoute(r.value,s.value.snapshot))return e$(e,r,s);return e$(e,r)})}(e,n,t);return new Nm(r,s)}{if(e.shouldAttach(n.value)){const c=e.retrieve(n.value);if(null!==c){const h=c.route;return h.value._futureSnapshot=n.value,h.children=n.children.map(y=>e$(e,y)),h}}const r=function Voe(e){return new tM(new wr(e.url),new wr(e.params),new wr(e.queryParams),new wr(e.fragment),new wr(e.data),e.outlet,e.component,e)}(n.value),s=n.children.map(c=>e$(e,c));return new Nm(r,s)}}const mJ="ngNavigationCancelingError";function gJ(e,n){const{redirectTo:t,navigationBehaviorOptions:r}=JO(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,s=_J(!1,Lh.Redirect);return s.url=t,s.navigationBehaviorOptions=r,s}function _J(e,n){const t=new Error(`NavigationCancelingError: ${e||""}`);return t[mJ]=!0,t.cancellationCode=n,t}function yJ(e){return!!e&&e[mJ]}let bJ=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["ng-component"]],standalone:!0,features:[xi],decls:1,vars:0,template:function(r,s){1&r&&Wt(0,"router-outlet")},dependencies:[Wq],encapsulation:2})}return e})();function qq(e){const n=e.children&&e.children.map(qq),t=n?{...e,children:n}:{...e};return!t.component&&!t.loadComponent&&(n||t.loadChildren)&&t.outlet&&t.outlet!==wi&&(t.component=bJ),t}function B_(e){return e.outlet||wi}function t$(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let n=e.parent;n;n=n.parent){const t=n.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class Yoe{constructor(n,t,r,s,c){this.routeReuseStrategy=n,this.futureState=t,this.currState=r,this.forwardEvent=s,this.inputBindingEnabled=c}activate(n){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,n),Uq(this.futureState.root),this.activateChildRoutes(t,r,n)}deactivateChildRoutes(n,t,r){const s=n2(t);n.children.forEach(c=>{const h=c.value.outlet;this.deactivateRoutes(c,s[h],r),delete s[h]}),Object.values(s).forEach(c=>{this.deactivateRouteAndItsChildren(c,r)})}deactivateRoutes(n,t,r){const s=n.value,c=t?t.value:null;if(s===c)if(s.component){const h=r.getContext(s.outlet);h&&this.deactivateChildRoutes(n,t,h.children)}else this.deactivateChildRoutes(n,t,r);else c&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(n,t){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,t):this.deactivateRouteAndOutlet(n,t)}detachAndStoreRouteSubtree(n,t){const r=t.getContext(n.value.outlet),s=r&&n.value.component?r.children:t,c=n2(n);for(const h of Object.values(c))this.deactivateRouteAndItsChildren(h,s);if(r&&r.outlet){const h=r.outlet.detach(),y=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:h,route:n,contexts:y})}}deactivateRouteAndOutlet(n,t){const r=t.getContext(n.value.outlet),s=r&&n.value.component?r.children:t,c=n2(n);for(const h of Object.values(c))this.deactivateRouteAndItsChildren(h,s);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,t,r){const s=n2(t);n.children.forEach(c=>{this.activateRoutes(c,s[c.value.outlet],r),this.forwardEvent(new Foe(c.value.snapshot))}),n.children.length&&this.forwardEvent(new Roe(n.value.snapshot))}activateRoutes(n,t,r){const s=n.value,c=t?t.value:null;if(Uq(s),s===c)if(s.component){const h=r.getOrCreateContext(s.outlet);this.activateChildRoutes(n,t,h.children)}else this.activateChildRoutes(n,t,r);else if(s.component){const h=r.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const y=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),h.children.onOutletReAttached(y.contexts),h.attachRef=y.componentRef,h.route=y.route.value,h.outlet&&h.outlet.attach(y.componentRef,y.route.value),Uq(y.route.value),this.activateChildRoutes(n,null,h.children)}else{const y=t$(s.snapshot);h.attachRef=null,h.route=s,h.injector=y,h.outlet&&h.outlet.activateWith(s,h.injector),this.activateChildRoutes(n,null,h.children)}}else this.activateChildRoutes(n,null,r)}}class vJ{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class N4{constructor(n,t){this.component=n,this.route=t}}function Koe(e,n,t){const r=e._root;return n$(r,n?n._root:null,t,[r.value])}function r2(e,n){const t=Symbol(),r=n.get(e,t);return r===t?"function"!=typeof e||function k2(e){return null!==q_(e)}(e)?n.get(e):e:r}function n$(e,n,t,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const c=n2(n);return e.children.forEach(h=>{(function Qoe(e,n,t,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const c=e.value,h=n?n.value:null,y=t?t.getContext(e.value.outlet):null;if(h&&c.routeConfig===h.routeConfig){const E=function Joe(e,n,t){if("function"==typeof t)return t(e,n);switch(t){case"pathParamsChange":return!QD(e.url,n.url);case"pathParamsOrQueryParamsChange":return!QD(e.url,n.url)||!P_(e.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Hq(e,n)||!P_(e.queryParams,n.queryParams);default:return!Hq(e,n)}}(h,c,c.routeConfig.runGuardsAndResolvers);E?s.canActivateChecks.push(new vJ(r)):(c.data=h.data,c._resolvedData=h._resolvedData),n$(e,n,c.component?y?y.children:null:t,r,s),E&&y&&y.outlet&&y.outlet.isActivated&&s.canDeactivateChecks.push(new N4(y.outlet.component,h))}else h&&i$(n,y,s),s.canActivateChecks.push(new vJ(r)),n$(e,null,c.component?y?y.children:null:t,r,s)})(h,c[h.value.outlet],t,r.concat([h.value]),s),delete c[h.value.outlet]}),Object.entries(c).forEach(([h,y])=>i$(y,t.getContext(h),s)),s}function i$(e,n,t){const r=n2(e),s=e.value;Object.entries(r).forEach(([c,h])=>{i$(h,s.component?n?n.children.getContext(c):null:n,t)}),t.canDeactivateChecks.push(new N4(s.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,s))}function r$(e){return"function"==typeof e}function xJ(e){return e instanceof ge||"EmptyError"===e?.name}const F4=Symbol("INITIAL_VALUE");function o2(){return Sr(e=>d1(e.map(n=>n.pipe(Bo(1),Wl(F4)))).pipe(ye(n=>{for(const t of n)if(!0!==t){if(t===F4)return F4;if(!1===t||t instanceof ZO)return t}return!0}),ii(n=>n!==F4),Bo(1)))}function wJ(e){return function Oc(...e){return Yl(e)}(Do(n=>{if(JO(n))throw gJ(0,n)}),ye(n=>!0===n))}class Gq{constructor(n){this.segmentGroup=n||null}}class Xq extends Error{constructor(n){super(),this.urlTree=n}}function s2(e){return C1(new Gq(e))}class yse{constructor(n,t){this.urlSerializer=n,this.urlTree=t}lineralizeSegments(n,t){let r=[],s=t.root;for(;;){if(r=r.concat(s.segments),0===s.numberOfChildren)return zt(r);if(s.numberOfChildren>1||!s.children[wi])return C1(new _e(4e3,!1));s=s.children[wi]}}applyRedirectCommands(n,t,r){const s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),n,r);if(t.startsWith("/"))throw new Xq(s);return s}applyRedirectCreateUrlTree(n,t,r,s){const c=this.createSegmentGroup(n,t.root,r,s);return new ZO(c,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(n,t){const r={};return Object.entries(n).forEach(([s,c])=>{if("string"==typeof c&&c.startsWith(":")){const y=c.substring(1);r[s]=t[y]}else r[s]=c}),r}createSegmentGroup(n,t,r,s){const c=this.createSegments(n,t.segments,r,s);let h={};return Object.entries(t.children).forEach(([y,E])=>{h[y]=this.createSegmentGroup(n,E,r,s)}),new qr(c,h)}createSegments(n,t,r,s){return t.map(c=>c.path.startsWith(":")?this.findPosParam(n,c,s):this.findOrReturn(c,r))}findPosParam(n,t,r){const s=r[t.path.substring(1)];if(!s)throw new _e(4001,!1);return s}findOrReturn(n,t){let r=0;for(const s of t){if(s.path===n.path)return t.splice(r),s;r++}return n}}const Yq={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bse(e,n,t,r,s){const c=Kq(e,n,t);return c.matched?(r=function Uoe(e,n){return e.providers&&!e._injector&&(e._injector=fn(e.providers,n,`Route: ${e.path}`)),e._injector??n}(n,r),function mse(e,n,t,r){const s=n.canMatch;return s&&0!==s.length?zt(s.map(h=>{const y=r2(h,e);return S1(function ose(e){return e&&r$(e.canMatch)}(y)?y.canMatch(n,t):Od(e,()=>y(n,t)))})).pipe(o2(),wJ()):zt(!0)}(r,n,t).pipe(ye(h=>!0===h?c:{...Yq}))):zt(c)}function Kq(e,n,t){if("**"===n.path)return function vse(e){return{matched:!0,parameters:e.length>0?jQ(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(t);if(""===n.path)return"full"===n.pathMatch&&(e.hasChildren()||t.length>0)?{...Yq}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const s=(n.matcher||eoe)(t,e,n);if(!s)return{...Yq};const c={};Object.entries(s.posParams??{}).forEach(([y,E])=>{c[y]=E.path});const h=s.consumed.length>0?{...c,...s.consumed[s.consumed.length-1].parameters}:c;return{matched:!0,consumedSegments:s.consumed,remainingSegments:t.slice(s.consumed.length),parameters:h,positionalParamSegments:s.posParams??{}}}function EJ(e,n,t,r){return t.length>0&&function Ese(e,n,t){return t.some(r=>P4(e,n,r)&&B_(r)!==wi)}(e,t,r)?{segmentGroup:new qr(n,wse(r,new qr(t,e.children))),slicedSegments:[]}:0===t.length&&function Cse(e,n,t){return t.some(r=>P4(e,n,r))}(e,t,r)?{segmentGroup:new qr(e.segments,xse(e,t,r,e.children)),slicedSegments:t}:{segmentGroup:new qr(e.segments,e.children),slicedSegments:t}}function xse(e,n,t,r){const s={};for(const c of t)if(P4(e,n,c)&&!r[B_(c)]){const h=new qr([],{});s[B_(c)]=h}return{...r,...s}}function wse(e,n){const t={};t[wi]=n;for(const r of e)if(""===r.path&&B_(r)!==wi){const s=new qr([],{});t[B_(r)]=s}return t}function P4(e,n,t){return(!(e.hasChildren()||n.length>0)||"full"!==t.pathMatch)&&""===t.path}class Mse{}class kse{constructor(n,t,r,s,c,h,y){this.injector=n,this.configLoader=t,this.rootComponentType=r,this.config=s,this.urlTree=c,this.paramsInheritanceStrategy=h,this.urlSerializer=y,this.applyRedirects=new yse(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(n){return new _e(4002,`'${n.segmentGroup}'`)}recognize(){const n=EJ(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(ye(t=>{const r=new Vq([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},wi,this.rootComponentType,null,{}),s=new Nm(r,t),c=new dJ("",s),h=function voe(e,n,t=null,r=null){return eJ(JQ(e),n,t,r)}(r,[],this.urlTree.queryParams,this.urlTree.fragment);return h.queryParams=this.urlTree.queryParams,c.url=this.urlSerializer.serialize(h),this.inheritParamsAndData(c._root,null),{state:c,tree:h}}))}match(n){return this.processSegmentGroup(this.injector,this.config,n,wi).pipe(Sf(r=>{if(r instanceof Xq)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Gq?this.noMatchError(r):r}))}inheritParamsAndData(n,t){const r=n.value,s=zq(r,t,this.paramsInheritanceStrategy);r.params=Object.freeze(s.params),r.data=Object.freeze(s.data),n.children.forEach(c=>this.inheritParamsAndData(c,r))}processSegmentGroup(n,t,r,s){return 0===r.segments.length&&r.hasChildren()?this.processChildren(n,t,r):this.processSegment(n,t,r,r.segments,s,!0).pipe(ye(c=>c instanceof Nm?[c]:[]))}processChildren(n,t,r){const s=[];for(const c of Object.keys(r.children))"primary"===c?s.unshift(c):s.push(c);return Cn(s).pipe(lu(c=>{const h=r.children[c],y=function Goe(e,n){const t=e.filter(r=>B_(r)===n);return t.push(...e.filter(r=>B_(r)!==n)),t}(t,c);return this.processSegmentGroup(n,y,h,c)}),function Zre(e,n){return be(function Kre(e,n,t,r,s){return(c,h)=>{let y=t,E=n,M=0;c.subscribe(Se(h,R=>{const $=M++;E=y?e(E,R,$):(y=!0,R),r&&h.next(E)},s&&(()=>{y&&h.next(E),h.complete()})))}}(e,n,arguments.length>=2,!0))}((c,h)=>(c.push(...h),c)),de(null),function Qre(e,n){const t=arguments.length>=2;return r=>r.pipe(e?ii((s,c)=>e(s,c,r)):Wi,Tq(1),t?de(n):Te(()=>new ge))}(),Wr(c=>{if(null===c)return s2(r);const h=CJ(c);return function Ise(e){e.sort((n,t)=>n.value.outlet===wi?-1:t.value.outlet===wi?1:n.value.outlet.localeCompare(t.value.outlet))}(h),zt(h)}))}processSegment(n,t,r,s,c,h){return Cn(t).pipe(lu(y=>this.processSegmentAgainstRoute(y._injector??n,t,y,r,s,c,h).pipe(Sf(E=>{if(E instanceof Gq)return zt(null);throw E}))),Ie(y=>!!y),Sf(y=>{if(xJ(y))return function Dse(e,n,t){return 0===n.length&&!e.children[t]}(r,s,c)?zt(new Mse):s2(r);throw y}))}processSegmentAgainstRoute(n,t,r,s,c,h,y){return function Sse(e,n,t,r){return!!(B_(e)===r||r!==wi&&P4(n,t,e))&&Kq(n,e,t).matched}(r,s,c,h)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,s,r,c,h):this.allowRedirects&&y?this.expandSegmentAgainstRouteUsingRedirect(n,s,t,r,c,h):s2(s):s2(s)}expandSegmentAgainstRouteUsingRedirect(n,t,r,s,c,h){const{matched:y,consumedSegments:E,positionalParamSegments:M,remainingSegments:R}=Kq(t,s,c);if(!y)return s2(t);s.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const $=this.applyRedirects.applyRedirectCommands(E,s.redirectTo,M);return this.applyRedirects.lineralizeSegments(s,$).pipe(Wr(j=>this.processSegment(n,r,t,j.concat(R),h,!1)))}matchSegmentAgainstRoute(n,t,r,s,c){const h=bse(t,r,s,n);return"**"===r.path&&(t.children={}),h.pipe(Sr(y=>y.matched?this.getChildConfig(n=r._injector??n,r,s).pipe(Sr(({routes:E})=>{const M=r._loadedInjector??n,{consumedSegments:R,remainingSegments:$,parameters:j}=y,X=new Vq(R,j,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function Rse(e){return e.data||{}}(r),B_(r),r.component??r._loadedComponent??null,r,function Nse(e){return e.resolve||{}}(r)),{segmentGroup:K,slicedSegments:ie}=EJ(t,R,$,E);if(0===ie.length&&K.hasChildren())return this.processChildren(M,E,K).pipe(ye(Me=>null===Me?null:new Nm(X,Me)));if(0===E.length&&0===ie.length)return zt(new Nm(X,[]));const me=B_(r)===c;return this.processSegment(M,E,K,ie,me?wi:c,!0).pipe(ye(Me=>new Nm(X,Me instanceof Nm?[Me]:[])))})):s2(t)))}getChildConfig(n,t,r){return t.children?zt({routes:t.children,injector:n}):t.loadChildren?void 0!==t._loadedRoutes?zt({routes:t._loadedRoutes,injector:t._loadedInjector}):function pse(e,n,t,r){const s=n.canLoad;return void 0===s||0===s.length?zt(!0):zt(s.map(h=>{const y=r2(h,e);return S1(function tse(e){return e&&r$(e.canLoad)}(y)?y.canLoad(n,t):Od(e,()=>y(n,t)))})).pipe(o2(),wJ())}(n,t,r).pipe(Wr(s=>s?this.configLoader.loadChildren(n,t).pipe(Do(c=>{t._loadedRoutes=c.routes,t._loadedInjector=c.injector})):function _se(e){return C1(_J(!1,Lh.GuardRejected))}())):zt({routes:[],injector:n})}}function Ose(e){const n=e.value.routeConfig;return n&&""===n.path}function CJ(e){const n=[],t=new Set;for(const r of e){if(!Ose(r)){n.push(r);continue}const s=n.find(c=>r.value.routeConfig===c.value.routeConfig);void 0!==s?(s.children.push(...r.children),t.add(s)):n.push(r)}for(const r of t){const s=CJ(r.children);n.push(new Nm(r.value,s))}return n.filter(r=>!t.has(r))}function SJ(e){const n=e.children.map(t=>SJ(t)).flat();return[e,...n]}function Zq(e){return Sr(n=>{const t=e(n);return t?Cn(t).pipe(ye(()=>n)):zt(n)})}let DJ=(()=>{class e{buildTitle(t){let r,s=t.root;for(;void 0!==s;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(c=>c.outlet===wi);return r}getResolvedTitleForRoute(t){return t.data[GL]}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(zse),providedIn:"root"})}return e})(),zse=(()=>{class e extends DJ{constructor(t){super(),this.title=t}updateTitle(t){const r=this.buildTitle(t);void 0!==r&&this.title.setTitle(r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(CP))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const a2=new $e("",{providedIn:"root",factory:()=>({})}),l2=new $e("");let Qq=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Xe(nF)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return zt(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const r=S1(t.loadComponent()).pipe(ye(MJ),Do(c=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=c}),nd(()=>{this.componentLoaders.delete(t)})),s=new zQ(r,()=>new It).pipe(Aq());return this.componentLoaders.set(t,s),s}loadChildren(t,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return zt({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);const c=function Vse(e,n,t,r){return S1(e.loadChildren()).pipe(ye(MJ),Wr(s=>s instanceof vn||Array.isArray(s)?zt(s):Cn(n.compileModuleAsync(s))),ye(s=>{r&&r(e);let c,h,y=!1;return Array.isArray(s)?(h=s,!0):(c=s.create(t).injector,h=c.get(l2,[],{optional:!0,self:!0}).flat()),{routes:h.map(qq),injector:c}}))}(r,this.compiler,t,this.onLoadEndListener).pipe(nd(()=>{this.childrenLoaders.delete(r)})),h=new zQ(c,()=>new It).pipe(Aq());return this.childrenLoaders.set(r,h),h}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function MJ(e){return function jse(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let Jq=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Use),providedIn:"root"})}return e})(),Use=(()=>{class e{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,r){return t}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const AJ=new $e(""),TJ=new $e("");function Hse(e,n,t){const r=e.get(TJ),s=e.get(mi);return e.get(Bt).runOutsideAngular(()=>{if(!s.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,Promise.resolve();let c;const h=new Promise(M=>{c=M}),y=s.startViewTransition(()=>(c(),function Wse(e){return new Promise(n=>{bb(n,{injector:e})})}(e))),{onViewTransitionCreated:E}=r;return E&&Od(e,()=>E({transition:y,from:n,to:t})),h})}let L4=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new It,this.transitionAbortSubject=new It,this.configLoader=Xe(Qq),this.environmentInjector=Xe(xo),this.urlSerializer=Xe(QO),this.rootContexts=Xe(JL),this.location=Xe(mm),this.inputBindingEnabled=null!==Xe(R4,{optional:!0}),this.titleStrategy=Xe(DJ),this.options=Xe(a2,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=Xe(Jq),this.createViewTransition=Xe(AJ,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>zt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new Ioe(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new koe(s))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const r=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:r})}setupNavigations(t,r,s){return this.transitions=new wr({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:QL,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ii(c=>0!==c.id),ye(c=>({...c,extractedUrl:this.urlHandlingStrategy.extract(c.rawUrl)})),Sr(c=>{this.currentTransition=c;let h=!1,y=!1;return zt(c).pipe(Do(E=>{this.currentNavigation={id:E.id,initialUrl:E.rawUrl,extractedUrl:E.extractedUrl,trigger:E.source,extras:E.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Sr(E=>{const M=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!M&&"reload"!==(E.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const $="";return this.events.next(new e2(E.id,this.urlSerializer.serialize(E.rawUrl),$,I4.IgnoredSameUrlNavigation)),E.resolve(null),Hl}if(this.urlHandlingStrategy.shouldProcessUrl(E.rawUrl))return zt(E).pipe(Sr($=>{const j=this.transitions?.getValue();return this.events.next(new JD($.id,this.urlSerializer.serialize($.extractedUrl),$.source,$.restoredState)),j!==this.transitions?.getValue()?Hl:Promise.resolve($)}),function Fse(e,n,t,r,s,c){return Wr(h=>function Ase(e,n,t,r,s,c,h="emptyOnly"){return new kse(e,n,t,r,s,h,c).recognize()}(e,n,t,r,h.extractedUrl,s,c).pipe(ye(({state:y,tree:E})=>({...h,targetSnapshot:y,urlAfterRedirects:E}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),Do($=>{c.targetSnapshot=$.targetSnapshot,c.urlAfterRedirects=$.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:$.urlAfterRedirects};const j=new O4($.id,this.urlSerializer.serialize($.extractedUrl),this.urlSerializer.serialize($.urlAfterRedirects),$.targetSnapshot);this.events.next(j)}));if(M&&this.urlHandlingStrategy.shouldProcessUrl(E.currentRawUrl)){const{id:$,extractedUrl:j,source:X,restoredState:K,extras:ie}=E,me=new JD($,this.urlSerializer.serialize(j),X,K);this.events.next(me);const Me=uJ(this.rootComponentType).snapshot;return this.currentTransition=c={...E,targetSnapshot:Me,urlAfterRedirects:j,extras:{...ie,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=j,zt(c)}{const $="";return this.events.next(new e2(E.id,this.urlSerializer.serialize(E.extractedUrl),$,I4.IgnoredByUrlHandlingStrategy)),E.resolve(null),Hl}}),Do(E=>{const M=new Moe(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(M)}),ye(E=>(this.currentTransition=c={...E,guards:Koe(E.targetSnapshot,E.currentSnapshot,this.rootContexts)},c)),function sse(e,n){return Wr(t=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:c,canDeactivateChecks:h}}=t;return 0===h.length&&0===c.length?zt({...t,guardsResult:!0}):function ase(e,n,t,r){return Cn(e).pipe(Wr(s=>function hse(e,n,t,r,s){const c=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return c&&0!==c.length?zt(c.map(y=>{const E=t$(n)??s,M=r2(y,E);return S1(function rse(e){return e&&r$(e.canDeactivate)}(M)?M.canDeactivate(e,n,t,r):Od(E,()=>M(e,n,t,r))).pipe(Ie())})).pipe(o2()):zt(!0)}(s.component,s.route,t,n,r)),Ie(s=>!0!==s,!0))}(h,r,s,e).pipe(Wr(y=>y&&function ese(e){return"boolean"==typeof e}(y)?function lse(e,n,t,r){return Cn(n).pipe(lu(s=>AD(function use(e,n){return null!==e&&n&&n(new Ooe(e)),zt(!0)}(s.route.parent,r),function cse(e,n){return null!==e&&n&&n(new Noe(e)),zt(!0)}(s.route,r),function fse(e,n,t){const r=n[n.length-1],c=n.slice(0,n.length-1).reverse().map(h=>function Zoe(e){const n=e.routeConfig?e.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:e,guards:n}:null}(h)).filter(h=>null!==h).map(h=>qL(()=>zt(h.guards.map(E=>{const M=t$(h.node)??t,R=r2(E,M);return S1(function ise(e){return e&&r$(e.canActivateChild)}(R)?R.canActivateChild(r,e):Od(M,()=>R(r,e))).pipe(Ie())})).pipe(o2())));return zt(c).pipe(o2())}(e,s.path,t),function dse(e,n,t){const r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||0===r.length)return zt(!0);const s=r.map(c=>qL(()=>{const h=t$(n)??t,y=r2(c,h);return S1(function nse(e){return e&&r$(e.canActivate)}(y)?y.canActivate(n,e):Od(h,()=>y(n,e))).pipe(Ie())}));return zt(s).pipe(o2())}(e,s.route,t))),Ie(s=>!0!==s,!0))}(r,c,e,n):zt(y)),ye(y=>({...t,guardsResult:y})))})}(this.environmentInjector,E=>this.events.next(E)),Do(E=>{if(c.guardsResult=E.guardsResult,JO(E.guardsResult))throw gJ(0,E.guardsResult);const M=new Aoe(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot,!!E.guardsResult);this.events.next(M)}),ii(E=>!!E.guardsResult||(this.cancelNavigationTransition(E,"",Lh.GuardRejected),!1)),Zq(E=>{if(E.guards.canActivateChecks.length)return zt(E).pipe(Do(M=>{const R=new Toe(M.id,this.urlSerializer.serialize(M.extractedUrl),this.urlSerializer.serialize(M.urlAfterRedirects),M.targetSnapshot);this.events.next(R)}),Sr(M=>{let R=!1;return zt(M).pipe(function Pse(e,n){return Wr(t=>{const{targetSnapshot:r,guards:{canActivateChecks:s}}=t;if(!s.length)return zt(t);const c=new Set(s.map(E=>E.route)),h=new Set;for(const E of c)if(!h.has(E))for(const M of SJ(E))h.add(M);let y=0;return Cn(h).pipe(lu(E=>c.has(E)?function Lse(e,n,t,r){const s=e.routeConfig,c=e._resolve;return void 0!==s?.title&&!hJ(s)&&(c[GL]=s.title),function $se(e,n,t,r){const s=kq(e);if(0===s.length)return zt({});const c={};return Cn(s).pipe(Wr(h=>function Bse(e,n,t,r){const s=t$(n)??r,c=r2(e,s);return S1(c.resolve?c.resolve(n,t):Od(s,()=>c(n,t)))}(e[h],n,t,r).pipe(Ie(),Do(y=>{c[h]=y}))),Tq(1),R_(c),Sf(h=>xJ(h)?Hl:C1(h)))}(c,e,n,r).pipe(ye(h=>(e._resolvedData=h,e.data=zq(e,e.parent,t).resolve,null)))}(E,r,e,n):(E.data=zq(E,E.parent,e).resolve,zt(void 0))),Do(()=>y++),Tq(1),Wr(E=>y===h.size?zt(t):Hl))})}(this.paramsInheritanceStrategy,this.environmentInjector),Do({next:()=>R=!0,complete:()=>{R||this.cancelNavigationTransition(M,"",Lh.NoDataFromResolver)}}))}),Do(M=>{const R=new sJ(M.id,this.urlSerializer.serialize(M.extractedUrl),this.urlSerializer.serialize(M.urlAfterRedirects),M.targetSnapshot);this.events.next(R)}))}),Zq(E=>{const M=R=>{const $=[];R.routeConfig?.loadComponent&&!R.routeConfig._loadedComponent&&$.push(this.configLoader.loadComponent(R.routeConfig).pipe(Do(j=>{R.component=j}),ye(()=>{})));for(const j of R.children)$.push(...M(j));return $};return d1(M(E.targetSnapshot.root)).pipe(de(null),Bo(1))}),Zq(()=>this.afterPreactivation()),Sr(()=>{const{currentSnapshot:E,targetSnapshot:M}=c,R=this.createViewTransition?.(this.environmentInjector,E.root,M.root);return R?Cn(R).pipe(ye(()=>c)):zt(c)}),ye(E=>{const M=function Boe(e,n,t){const r=e$(e,n._root,t?t._root:void 0);return new cJ(r,n)}(t.routeReuseStrategy,E.targetSnapshot,E.currentRouterState);return this.currentTransition=c={...E,targetRouterState:M},this.currentNavigation.targetRouterState=M,c}),Do(()=>{this.events.next(new Pq)}),((e,n,t,r)=>ye(s=>(new Yoe(n,s.targetRouterState,s.currentRouterState,t,r).activate(e),s)))(this.rootContexts,t.routeReuseStrategy,E=>this.events.next(E),this.inputBindingEnabled),Bo(1),Do({next:E=>{h=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new $_(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects))),this.titleStrategy?.updateTitle(E.targetRouterState.snapshot),E.resolve(!0)},complete:()=>{h=!0}}),Kn(this.transitionAbortSubject.pipe(Do(E=>{throw E}))),nd(()=>{!h&&!y&&this.cancelNavigationTransition(c,"",Lh.SupersededByNewNavigation),this.currentNavigation?.id===c.id&&(this.currentNavigation=null)}),Sf(E=>{if(y=!0,yJ(E))this.events.next(new eM(c.id,this.urlSerializer.serialize(c.extractedUrl),E.message,E.cancellationCode)),function joe(e){return yJ(e)&&JO(e.url)}(E)?this.events.next(new Lq(E.url)):c.resolve(!1);else{this.events.next(new t2(c.id,this.urlSerializer.serialize(c.extractedUrl),E,c.targetSnapshot??void 0));try{c.resolve(t.errorHandler(E))}catch(M){this.options.resolveNavigationPromiseOnError?c.resolve(!1):c.reject(M)}}return Hl}))}))}cancelNavigationTransition(t,r,s){const c=new eM(t.id,this.urlSerializer.serialize(t.extractedUrl),r,s);this.events.next(c),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qse(e){return e!==QL}let Gse=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Yse),providedIn:"root"})}return e})();class Xse{shouldDetach(n){return!1}store(n,t){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,t){return n.routeConfig===t.routeConfig}}let Yse=(()=>{class e extends Xse{static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),kJ=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:()=>Xe(Kse),providedIn:"root"})}return e})(),Kse=(()=>{class e extends kJ{constructor(){super(...arguments),this.location=Xe(mm),this.urlSerializer=Xe(QO),this.options=Xe(a2,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=Xe(Jq),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new ZO,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=uJ(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(t){return this.location.subscribe(r=>{"popstate"===r.type&&t(r.url,r.state)})}handleRouterEvent(t,r){if(t instanceof JD)this.stateMemento=this.createStateMemento();else if(t instanceof e2)this.rawUrlTree=r.initialUrl;else if(t instanceof O4){if("eager"===this.urlUpdateStrategy&&!r.extras.skipLocationChange){const s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(s,r)}}else t instanceof Pq?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,"deferred"===this.urlUpdateStrategy&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):t instanceof eM&&(t.code===Lh.GuardRejected||t.code===Lh.NoDataFromResolver)?this.restoreHistory(r):t instanceof t2?this.restoreHistory(r,!0):t instanceof $_&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,r){const s=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){const h={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId)};this.location.replaceState(s,"",h)}else{const c={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId+1)};this.location.go(s,"",c)}}restoreHistory(t,r=!1){if("computed"===this.canceledNavigationResolution){const c=this.currentPageId-this.browserPageId;0!==c?this.location.historyGo(c):this.currentUrlTree===t.finalUrl&&0===c&&(this.resetState(t),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var o$=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(o$||{});function IJ(e,n){e.events.pipe(ii(t=>t instanceof $_||t instanceof eM||t instanceof t2||t instanceof e2),ye(t=>t instanceof $_||t instanceof e2?o$.COMPLETE:t instanceof eM&&(t.code===Lh.Redirect||t.code===Lh.SupersededByNewNavigation)?o$.REDIRECTING:o$.FAILED),ii(t=>t!==o$.REDIRECTING),Bo(1)).subscribe(()=>{n()})}function Zse(e){throw e}const Qse={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Jse={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let dd=(()=>{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.isNgZoneEnabled=!1,this.console=Xe(tF),this.stateManager=Xe(kJ),this.options=Xe(a2,{optional:!0})||{},this.pendingTasks=Xe(Fw),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=Xe(L4),this.urlSerializer=Xe(QO),this.location=Xe(mm),this.urlHandlingStrategy=Xe(Jq),this._events=new It,this.errorHandler=this.options.errorHandler||Zse,this.navigated=!1,this.routeReuseStrategy=Xe(Gse),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=Xe(l2,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!Xe(R4,{optional:!0}),this.eventsSubscription=new xn,this.isNgZoneEnabled=Xe(Bt)instanceof Bt&&Bt.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const t=this.navigationTransitions.events.subscribe(r=>{try{const s=this.navigationTransitions.currentTransition,c=this.navigationTransitions.currentNavigation;if(null!==s&&null!==c)if(this.stateManager.handleRouterEvent(r,c),r instanceof eM&&r.code!==Lh.Redirect&&r.code!==Lh.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof $_)this.navigated=!0;else if(r instanceof Lq){const h=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),y={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||qse(s.source)};this.scheduleNavigation(h,QL,null,y,{resolve:s.resolve,reject:s.reject,promise:s.promise})}(function tae(e){return!(e instanceof Pq||e instanceof Lq)})(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),QL,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(t,"popstate",r)},0)})}navigateToSyncWithBrowser(t,r,s){const c={replaceUrl:!0},h=s?.navigationId?s:null;if(s){const E={...s};delete E.navigationId,delete E.\u0275routerPageId,0!==Object.keys(E).length&&(c.state=E)}const y=this.parseUrl(t);this.scheduleNavigation(y,r,h,c)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(qq),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(t,r={}){const{relativeTo:s,queryParams:c,fragment:h,queryParamsHandling:y,preserveFragment:E}=r,M=E?this.currentUrlTree.fragment:h;let $,R=null;switch(y){case"merge":R={...this.currentUrlTree.queryParams,...c};break;case"preserve":R=this.currentUrlTree.queryParams;break;default:R=c||null}null!==R&&(R=this.removeEmptyProps(R));try{$=JQ(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof t[0]||!t[0].startsWith("/"))&&(t=[]),$=this.currentUrlTree.root}return eJ($,t,R,M??null)}navigateByUrl(t,r={skipLocationChange:!1}){const s=JO(t)?t:this.parseUrl(t),c=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(c,QL,null,r)}navigate(t,r={skipLocationChange:!1}){return function eae(e){for(let n=0;n(null!=c&&(r[s]=c),r),{})}scheduleNavigation(t,r,s,c,h){if(this.disposed)return Promise.resolve(!1);let y,E,M;h?(y=h.resolve,E=h.reject,M=h.promise):M=new Promise(($,j)=>{y=$,E=j});const R=this.pendingTasks.add();return IJ(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(R))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:c,resolve:y,reject:E,promise:M,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),M.catch($=>Promise.reject($))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$4=(()=>{class e{constructor(t,r,s,c,h,y){this.router=t,this.route=r,this.tabIndexAttribute=s,this.renderer=c,this.el=h,this.locationStrategy=y,this.href=null,this.commands=null,this.onChanges=new It,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const E=h.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===E||"area"===E,this.isAnchorElement?this.subscription=t.events.subscribe(M=>{M instanceof $_&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(t){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",t)}ngOnChanges(t){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(t){null!=t?(this.commands=Array.isArray(t)?t:[t],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(t,r,s,c,h){const y=this.urlTree;return!!(null===y||this.isAnchorElement&&(0!==t||r||s||c||h||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(y,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const t=this.urlTree;this.href=null!==t&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(t)):null;const r=null===this.href?null:function dc(e,n,t){return function rT(e,n){return"src"===n&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===n&&("base"===e||"link"===e)?Yy:jd}(n,t)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(t,r){const s=this.renderer,c=this.el.nativeElement;null!==r?s.setAttribute(c,t,r):s.removeAttribute(c,t)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(dd),ue(tM),Hc("tabindex"),ue(tl),ue(zn),ue(hf))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,s){1&r&&yn("click",function(h){return s.onClick(h.button,h.ctrlKey,h.shiftKey,h.altKey,h.metaKey)}),2&r&&hi("target",s.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[ht.HasDecoratorInputTransform,"preserveFragment","preserveFragment",cr],skipLocationChange:[ht.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",cr],replaceUrl:[ht.HasDecoratorInputTransform,"replaceUrl","replaceUrl",cr],routerLink:"routerLink"},standalone:!0,features:[Vs,vo]})}return e})(),OJ=(()=>{class e{get isActive(){return this._isActive}constructor(t,r,s,c,h){this.router=t,this.element=r,this.renderer=s,this.cdr=c,this.link=h,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new cn,this.routerEventsSubscription=t.events.subscribe(y=>{y instanceof $_&&this.update()})}ngAfterContentInit(){zt(this.links.changes,zt(null)).pipe(f1()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const t=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=Cn(t).pipe(f1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(t){const r=Array.isArray(t)?t:t.split(" ");this.classes=r.filter(s=>!!s)}ngOnChanges(t){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const t=this.hasActiveLinks();this._isActive!==t&&(this._isActive=t,this.cdr.markForCheck(),this.classes.forEach(r=>{t?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),t&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(t))})}isLinkActive(t){const r=function nae(e){return!!e.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>{const c=s.urlTree;return!!c&&t.isActive(c,r)}}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.links.some(t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(dd),ue(zn),ue(tl),ue(Qo),ue($4,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(r,s,c){if(1&r&&vs(c,$4,5),2&r){let h;zi(h=Pi())&&(s.links=h)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[vo]})}return e})();class RJ{}let iae=(()=>{class e{constructor(t,r,s,c,h){this.router=t,this.injector=s,this.preloadingStrategy=c,this.loader=h}setUpPreloading(){this.subscription=this.router.events.pipe(ii(t=>t instanceof $_),lu(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const s=[];for(const c of r){c.providers&&!c._injector&&(c._injector=fn(c.providers,t,`Route: ${c.path}`));const h=c._injector??t,y=c._loadedInjector??h;(c.loadChildren&&!c._loadedRoutes&&void 0===c.canLoad||c.loadComponent&&!c._loadedComponent)&&s.push(this.preloadConfig(h,c)),(c.children||c._loadedRoutes)&&s.push(this.processRoutes(y,c.children??c._loadedRoutes))}return Cn(s).pipe(f1())}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>{let s;s=r.loadChildren&&void 0===r.canLoad?this.loader.loadChildren(t,r):zt(null);const c=s.pipe(Wr(h=>null===h?zt(void 0):(r._loadedRoutes=h.routes,r._loadedInjector=h.injector,this.processRoutes(h.injector??t,h.routes))));return r.loadComponent&&!r._loadedComponent?Cn([c,this.loader.loadComponent(r)]).pipe(f1()):c})}static#e=this.\u0275fac=function(r){return new(r||e)(pe(dd),pe(nF),pe(xo),pe(RJ),pe(Qq))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const eG=new $e("");let NJ=(()=>{class e{constructor(t,r,s,c,h={}){this.urlSerializer=t,this.transitions=r,this.viewportScroller=s,this.zone=c,this.options=h,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},h.scrollPositionRestoration||="disabled",h.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(t=>{t instanceof JD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof $_?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof e2&&t.code===I4.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof aJ&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new aJ(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){Og()};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function z_(e,n){return{\u0275kind:e,\u0275providers:n}}function PJ(){const e=Xe(hr);return n=>{const t=e.get(Kb);if(n!==t.components[0])return;const r=e.get(dd),s=e.get(LJ);1===e.get(tG)&&r.initialNavigation(),e.get($J,null,fi.Optional)?.setUpPreloading(),e.get(eG,null,fi.Optional)?.init(),r.resetRootComponentType(t.componentTypes[0]),s.closed||(s.next(),s.complete(),s.unsubscribe())}}const LJ=new $e("",{factory:()=>new It}),tG=new $e("",{providedIn:"root",factory:()=>1}),$J=new $e("");function aae(e){return z_(0,[{provide:$J,useExisting:iae},{provide:RJ,useExisting:e}])}function cae(e){return z_(9,[{provide:AJ,useValue:Hse},{provide:TJ,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const BJ=new $e("ROUTER_FORROOT_GUARD"),uae=[mm,{provide:QO,useClass:Iq},dd,JL,{provide:tM,useFactory:function FJ(e){return e.routerState.root},deps:[dd]},Qq,[]];let mu=(()=>{class e{constructor(t){}static forRoot(t,r){return{ngModule:e,providers:[uae,[],{provide:l2,multi:!0,useValue:t},{provide:BJ,useFactory:pae,deps:[[dd,new ap,new pt]]},{provide:a2,useValue:r||{}},r?.useHash?{provide:hf,useClass:Kz}:{provide:hf,useClass:Yz},{provide:eG,useFactory:()=>{const e=Xe(m5),n=Xe(Bt),t=Xe(a2),r=Xe(L4),s=Xe(QO);return t.scrollOffset&&e.setOffset(t.scrollOffset),new NJ(s,r,e,n,t)}},r?.preloadingStrategy?aae(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?mae(r):[],r?.bindToComponentInputs?z_(8,[pJ,{provide:R4,useExisting:pJ}]).\u0275providers:[],r?.enableViewTransitions?cae().\u0275providers:[],[{provide:zJ,useFactory:PJ},{provide:$w,multi:!0,useExisting:zJ}]]}}static forChild(t){return{ngModule:e,providers:[{provide:l2,multi:!0,useValue:t}]}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BJ,8))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();function pae(e){return"guarded"}function mae(e){return["disabled"===e.initialNavigation?z_(3,[{provide:rI,multi:!0,useFactory:()=>{const n=Xe(dd);return()=>{n.setUpLocationChangeListener()}}},{provide:tG,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?z_(2,[{provide:tG,useValue:0},{provide:rI,multi:!0,deps:[hr],useFactory:n=>{const t=n.get(Gz,Promise.resolve());return()=>t.then(()=>new Promise(r=>{const s=n.get(dd),c=n.get(LJ);IJ(s,()=>{r(!0)}),n.get(L4).afterPreactivation=()=>(r(!0),c.closed?zt(void 0):c),s.initialNavigation()}))}}]).\u0275providers:[]]}const zJ=new $e("");class _ae{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(n=!1,t,r=!0,s){this._multiple=n,this._emitChanges=r,this.compareWith=s,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new It,t&&t.length&&(n?t.forEach(c=>this._markSelected(c)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(r=>this._markSelected(r));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...n){this._verifyValueAssignment(n),n.forEach(r=>this._unmarkSelected(r));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...n){this._verifyValueAssignment(n);const t=this.selected,r=new Set(n);n.forEach(c=>this._markSelected(c)),t.filter(c=>!r.has(this._getConcreteValue(c,r))).forEach(c=>this._unmarkSelected(c));const s=this._hasQueuedChanges();return this._emitChangeEvent(),s}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();const t=this._hasQueuedChanges();return n&&this._emitChangeEvent(),t}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(n,t){if(this.compareWith){t=t??this._selection;for(let r of t)if(this.compareWith(n,r))return r;return n}return n}}let VJ=(()=>{class e{constructor(){this._listeners=[]}notify(t,r){for(let s of this._listeners)s(t,r)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(r=>t!==r)}}ngOnDestroy(){this._listeners=[]}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yae=0;const nG=new $e("CdkAccordion");let bae=(()=>{class e{constructor(){this._stateChanges=new It,this._openCloseAllActions=new It,this.id="cdk-accordion-"+yae++,this.multi=!1}openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[ht.HasDecoratorInputTransform,"multi","multi",cr]},exportAs:["cdkAccordion"],standalone:!0,features:[ni([{provide:nG,useExisting:e}]),Vs,vo]})}return e})(),vae=0,xae=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,r,s){this.accordion=t,this._changeDetectorRef=r,this._expansionDispatcher=s,this._openCloseAllSubscription=xn.EMPTY,this.closed=new cn,this.opened=new cn,this.destroyed=new cn,this.expandedChange=new cn,this.id="cdk-accordion-child-"+vae++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=s.listen((c,h)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===h&&this.id!==c&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(nG,12),ue(Qo),ue(VJ))};static#t=this.\u0275dir=Vt({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[ht.HasDecoratorInputTransform,"expanded","expanded",cr],disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[ni([{provide:nG,useValue:void 0}]),Vs]})}return e})(),wae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();class iG{attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;null!=n&&(this._attachedHost=null,n.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(n){this._attachedHost=n}}class rG extends iG{constructor(n,t,r,s,c){super(),this.component=n,this.viewContainerRef=t,this.injector=r,this.componentFactoryResolver=s,this.projectableNodes=c}}class B4 extends iG{constructor(n,t,r,s){super(),this.templateRef=n,this.viewContainerRef=t,this.context=r,this.injector=s}get origin(){return this.templateRef.elementRef}attach(n,t=this.context){return this.context=t,super.attach(n)}detach(){return this.context=void 0,super.detach()}}class Eae extends iG{constructor(n){super(),this.element=n instanceof zn?n.nativeElement:n}}class oG{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(n){return n instanceof rG?(this._attachedPortal=n,this.attachComponentPortal(n)):n instanceof B4?(this._attachedPortal=n,this.attachTemplatePortal(n)):this.attachDomPortal&&n instanceof Eae?(this._attachedPortal=n,this.attachDomPortal(n)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Cae extends oG{constructor(n,t,r,s,c){super(),this.outletElement=n,this._componentFactoryResolver=t,this._appRef=r,this._defaultInjector=s,this.attachDomPortal=h=>{const y=h.element,E=this._document.createComment("dom-portal");y.parentNode.insertBefore(E,y),this.outletElement.appendChild(y),this._attachedPortal=h,super.setDisposeFn(()=>{E.parentNode&&E.parentNode.replaceChild(y,E)})},this._document=c}attachComponentPortal(n){const r=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let s;return n.viewContainerRef?(s=n.viewContainerRef.createComponent(r,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector,n.projectableNodes||void 0),this.setDisposeFn(()=>s.destroy())):(s=r.create(n.injector||this._defaultInjector||hr.NULL),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(s.hostView),s.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(s)),this._attachedPortal=n,s}attachTemplatePortal(n){let t=n.viewContainerRef,r=t.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return r.rootNodes.forEach(s=>this.outletElement.appendChild(s)),r.detectChanges(),this.setDisposeFn(()=>{let s=t.indexOf(r);-1!==s&&t.remove(s)}),this._attachedPortal=n,r}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}let z4=(()=>{class e extends oG{constructor(t,r,s){super(),this._componentFactoryResolver=t,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new cn,this.attachDomPortal=c=>{const h=c.element,y=this._document.createComment("dom-portal");c.setAttachedHost(this),h.parentNode.insertBefore(y,h),this._getRootNode().appendChild(h),this._attachedPortal=c,super.setDisposeFn(()=>{y.parentNode&&y.parentNode.replaceChild(h,y)})},this._document=s}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const r=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,c=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),h=r.createComponent(c,r.length,t.injector||r.injector,t.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(h.hostView.rootNodes[0]),super.setDisposeFn(()=>h.destroy()),this._attachedPortal=t,this._attachedRef=h,this.attached.emit(h),h}attachTemplatePortal(t){t.setAttachedHost(this);const r=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Ag),ue(Jo),ue(mi))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[ht.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[wn]})}return e})(),s$=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const Sae=["body"];function Dae(e,n){}const Mae=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Aae=["mat-expansion-panel-header","*","mat-action-row"];function Tae(e,n){1&e&&Wt(0,"span",2),2&e&&vt("@indicatorRotate",on()._getExpandedState())}const kae=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Iae=["mat-panel-title","mat-panel-description","*"],sG=new $e("MAT_ACCORDION"),jJ="225ms cubic-bezier(0.4,0.0,0.2,1)",UJ={indicatorRotate:A0("indicatorRotate",[Rh("collapsed, void",La({transform:"rotate(0deg)"})),Rh("expanded",La({transform:"rotate(180deg)"})),Nh("expanded <=> collapsed, void => collapsed",Om(jJ))]),bodyExpansion:A0("bodyExpansion",[Rh("collapsed, void",La({height:"0px",visibility:"hidden"})),Rh("expanded",La({height:"*",visibility:""})),Nh("expanded <=> collapsed, void => collapsed",Om(jJ))])},HJ=new $e("MAT_EXPANSION_PANEL");let Oae=(()=>{class e{constructor(t,r){this._template=t,this._expansionPanel=r}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Yu),ue(HJ,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}return e})(),Rae=0;const WJ=new $e("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let V4=(()=>{class e extends xae{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,r,s,c,h,y,E){super(t,r,s),this._viewContainerRef=c,this._animationMode=y,this._hideToggle=!1,this.afterExpand=new cn,this.afterCollapse=new cn,this._inputChanges=new It,this._headerId="mat-expansion-panel-header-"+Rae++,this._bodyAnimationDone=new It,this.accordion=t,this._document=h,this._bodyAnimationDone.pipe(Ih((M,R)=>M.fromState===R.fromState&&M.toState===R.toState)).subscribe(M=>{"void"!==M.fromState&&("expanded"===M.toState?this.afterExpand.emit():"collapsed"===M.toState&&this.afterCollapse.emit())}),E&&(this.hideToggle=E.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Wl(null),ii(()=>this.expanded&&!this._portal),Bo(1)).subscribe(()=>{this._portal=new B4(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,r=this._body.nativeElement;return t===r||r.contains(t)}return!1}static#e=this.\u0275fac=function(r){return new(r||e)(ue(sG,12),ue(Qo),ue(VJ),ue(Jo),ue(mi),ue(Ko,8),ue(WJ,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(r,s,c){if(1&r&&vs(c,Oae,5),2&r){let h;zi(h=Pi())&&(s._lazyContent=h.first)}},viewQuery:function(r,s){if(1&r&&ha(Sae,5),2&r){let c;zi(c=Pi())&&(s._body=c.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(r,s){2&r&&In("mat-expanded",s.expanded)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-expansion-panel-spacing",s._hasSpacing())},inputs:{hideToggle:[ht.HasDecoratorInputTransform,"hideToggle","hideToggle",cr],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[ni([{provide:sG,useValue:void 0},{provide:HJ,useExisting:e}]),Vs,wn,vo,xi],ngContentSelectors:Aae,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(r,s){1&r&&(Ra(Mae),ki(0),Ae(1,"div",0,1),yn("@bodyExpansion.done",function(h){return s._bodyAnimationDone.next(h)}),Ae(3,"div",2),ki(4,1),en(5,Dae,0,0,"ng-template",3),ke(),ki(6,2),ke()),2&r&&(Ze(),vt("@bodyExpansion",s._getExpandedState())("id",s.id),hi("aria-labelledby",s._headerId),Ze(4),vt("cdkPortalOutlet",s._portal))},dependencies:[z4],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color);color:var(--mat-expansion-container-text-color);border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font);font-size:var(--mat-expansion-container-text-size);font-weight:var(--mat-expansion-container-text-weight);line-height:var(--mat-expansion-container-text-line-height);letter-spacing:var(--mat-expansion-container-text-tracking)}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color)}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[UJ.bodyExpansion]},changeDetection:0})}return e})(),j4=(()=>{class e{constructor(t,r,s,c,h,y,E){this.panel=t,this._element=r,this._focusMonitor=s,this._changeDetectorRef=c,this._animationMode=y,this._parentChangeSubscription=xn.EMPTY,this.tabIndex=0;const M=t.accordion?t.accordion._stateChanges.pipe(ii(R=>!(!R.hideToggle&&!R.togglePosition))):Hl;this.tabIndex=parseInt(E||"")||0,this._parentChangeSubscription=Oh(t.opened,t.closed,M,t._inputChanges.pipe(ii(R=>!!(R.hideToggle||R.disabled||R.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(ii(()=>t._containsFocus())).subscribe(()=>s.focusVia(r,"program")),h&&(this.expandedHeight=h.expandedHeight,this.collapsedHeight=h.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:kh(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,r){t?this._focusMonitor.focusVia(this._element,t,r):this._element.nativeElement.focus(r)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(V4,1),ue(zn),ue(k_),ue(Qo),ue(WJ,8),ue(Ko,8),Hc("tabindex"))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(r,s){1&r&&yn("click",function(){return s._toggle()})("keydown",function(h){return s._keydown(h)}),2&r&&(hi("id",s.panel._headerId)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s._getPanelId())("aria-expanded",s._isExpanded())("aria-disabled",s.panel.disabled),_h("height",s._getHeaderHeight()),In("mat-expanded",s._isExpanded())("mat-expansion-toggle-indicator-after","after"===s._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===s._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===s._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[ht.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jw(t)]},standalone:!0,features:[Vs,xi],ngContentSelectors:Iae,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator"],[1,"mat-expansion-indicator"]],template:function(r,s){1&r&&(Ra(kae),Ae(0,"span",0),ki(1),ki(2,1),ki(3,2),ke(),en(4,Tae,1,1,"span",1)),2&r&&(In("mat-content-hide-toggle",!s._showToggle()),Ze(4),eo(4,s._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font);font-size:var(--mat-expansion-header-text-size);font-weight:var(--mat-expansion-header-text-weight);line-height:var(--mat-expansion-header-text-line-height);letter-spacing:var(--mat-expansion-header-text-tracking)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color)}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color)}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[UJ.indicatorRotate]},changeDetection:0})}return e})(),aG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}return e})(),lG=(()=>{class e extends bae{constructor(){super(...arguments),this._ownHeaders=new Xb,this.hideToggle=!1,this.displayMode="default",this.togglePosition="after"}ngAfterContentInit(){this._headers.changes.pipe(Wl(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(r=>r.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new L9(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(e)))(s||e)}})();static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-accordion"]],contentQueries:function(r,s,c){if(1&r&&vs(c,j4,5),2&r){let h;zi(h=Pi())&&(s._headers=h)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(r,s){2&r&&In("mat-accordion-multi",s.multi)},inputs:{hideToggle:[ht.HasDecoratorInputTransform,"hideToggle","hideToggle",cr],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],standalone:!0,features:[ni([{provide:sG,useExisting:e}]),Vs,wn]})}return e})(),cG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,wae,s$]})}return e})();const Nae=[{path:"",component:(()=>{class e{constructor(){this.clsName="agc-about"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-about"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:25,vars:0,consts:[[1,"header"],[1,"content"],["src","assets/pages/about/index.md",1,"index"],["multi","",1,"panels"],["src","assets/pages/about/helping.md"],["src","assets/pages/about/data.md"],["src","assets/pages/about/connect.md"],["src","assets/pages/about/credits.md"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"ADDICTIONS DATA ANALYSES AND VISUALIZATIONS"),ke(),Ae(2,"div",1),Wt(3,"markdown",2),Ae(4,"mat-accordion",3)(5,"mat-expansion-panel")(6,"mat-expansion-panel-header")(7,"mat-panel-title"),wt(8,"HOW WE'RE HELPING"),ke()(),Wt(9,"markdown",4),ke(),Ae(10,"mat-expansion-panel")(11,"mat-expansion-panel-header")(12,"mat-panel-title"),wt(13,"THE DATA"),ke()(),Wt(14,"markdown",5),ke(),Ae(15,"mat-expansion-panel")(16,"mat-expansion-panel-header")(17,"mat-panel-title"),wt(18,"CONNECT WITH US"),ke()(),Wt(19,"markdown",6),ke(),Ae(20,"mat-expansion-panel")(21,"mat-expansion-panel-header")(22,"mat-panel-title"),wt(23,"CREDITS"),ke()(),Wt(24,"markdown",7),ke()()())},dependencies:[lG,V4,j4,aG,HL],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] markdown[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{padding-bottom:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:700}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] markdown[_ngcontent-%COMP%]{padding:1rem .5rem 0}"],changeDetection:0})}return e})()}];let Fae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Nae),mu]})}return e})(),Pae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,cG,WL,Fae]})}return e})();const Lae=[{path:"",component:(()=>{class e{constructor(){this.clsName="change-log"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-change-log"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:4,vars:0,consts:[[1,"header"],[1,"content"],["src","assets/generated/CHANGELOG.md"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),Wt(3,"markdown",2),ke())},dependencies:[HL],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}"],changeDetection:0})}return e})()}];let $ae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Lae),mu]})}return e})(),Bae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,$ae,WL.forChild()]})}return e})();const zae=[{path:"",component:(()=>{class e{constructor(){this.clsName="data-er-diagram"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-er-diagram"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:7,vars:0,consts:[[1,"header"],[1,"title"],[1,"description"],["title","Data ER Diagram","src","assets/schema/relationships.html",1,"schema-frame"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),wt(3,"Data ER Diagram"),ke(),Ae(4,"div",2),wt(5,"Entity-relationship diagram of all data tables and columns in the database"),ke(),Wt(6,"iframe",3))},styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .schema-frame[_ngcontent-%COMP%]{margin-top:2rem;width:100%;height:100vh}"],changeDetection:0})}return e})()}];let Vae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(zae),mu]})}return e})(),jae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vae]})}return e})();const Uae=[{path:"",component:(()=>{class e{constructor(){this.clsName="data-schema-browser"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-schema-browser"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:7,vars:0,consts:[[1,"header"],[1,"title"],[1,"description"],["title","A2AGC Database Schema","src","assets/schema/index.html",1,"schema-frame"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1,"Marion County Opioid Addiction Report"),ke(),Ae(2,"div",1),wt(3,"Data Schema Browser"),ke(),Ae(4,"div",2),wt(5,"Browse the A2AGC Database Schema"),ke(),Wt(6,"iframe",3))},styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .schema-frame[_ngcontent-%COMP%]{margin-top:2rem;width:100%;height:100vh}"],changeDetection:0})}return e})()}];let Hae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Uae),mu]})}return e})(),Wae=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Hae]})}return e})();function a$(...e){const n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return ye(t=>{let r=t;for(let s=0;s"u"}function Tc(e){return!ql(e)}function uG(e){return!!e}function KJ(e){return ql(e)?e:JSON.parse(JSON.stringify(e))}function ZJ(e){return Tc(e)&&"object"==typeof e&&function dG(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)}let eee=(()=>{class e{constructor(){this.bootstrap$=new J(1)}get appBootstrapped$(){return this.bootstrap$.asObservable()}bootstrap(){this.bootstrap$.next(!0),this.bootstrap$.complete()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function _le(e,n){return e===n}function fG(e,n=_le){let t=null,r=null;function s(){return function yle(e,n,t){if(null===n||null===t||n.length!==t.length)return!1;const r=n.length;for(let s=0;s{class e{static set(t){this._value=t}static pop(){const t=this._value;return this._value={},t}}return e._value={},e})();const tee=new $e("INITIAL_STATE_TOKEN",{providedIn:"root",factory:()=>ble.pop()}),nee=new $e("\u0275NGXS_STATE_FACTORY"),iee=new $e("\u0275NGXS_STATE_CONTEXT_FACTORY");function c$(...e){const n=P5(e),{args:t,keys:r}=YV(e),s=new Qn(c=>{const{length:h}=t;if(!h)return void c.complete();const y=new Array(h);let E=h,M=h;for(let R=0;R{$||($=!0,M--),y[R]=j},()=>E--,void 0,()=>{(!E||!$)&&(M||c.next(r?KV(r,y):y),c.complete())}))}});return n?s.pipe(iO(n)):s}function ree(e,n){return n?t=>t.pipe(ree((r,s)=>Gs(e(r,s)).pipe(ye((c,h)=>n(r,c,s,h))))):be((t,r)=>{let s=0,c=null,h=!1;t.subscribe(Se(r,y=>{c||(c=Se(r,void 0,()=>{c=null,h&&r.complete()}),Gs(e(y,s++)).subscribe(c))},()=>{h=!0,!c&&r.complete()}))})}function nM(e){return e.constructor&&e.constructor.type?e.constructor.type:e.type}const pG=(e,n,t)=>{e=Object.assign({},e);const r=n.split("."),s=r.length-1;return r.reduce((c,h,y)=>(c[h]=y===s?t:Array.isArray(c[h])?c[h].slice():Object.assign({},c[h]),c&&c[h]),e),e},u$=(e,n)=>n.split(".").reduce((t,r)=>t&&t[r],e),mG=e=>e&&"object"==typeof e&&!Array.isArray(e),gG=(e,...n)=>{if(!n.length)return e;const t=n.shift();if(mG(e)&&mG(t))for(const r in t)mG(t[r])?(e[r]||Object.assign(e,{[r]:{}}),gG(e[r],t[r])):Object.assign(e,{[r]:t[r]});return gG(e,...n)};let cee=(()=>{class e{constructor(t,r){this._ngZone=t,this._platformId=r}enter(t){return qS(this._platformId)?this.runInsideAngular(t):this.runOutsideAngular(t)}leave(t){return this.runInsideAngular(t)}runInsideAngular(t){return Bt.isInAngularZone()?t():this._ngZone.run(t)}runOutsideAngular(t){return Bt.isInAngularZone()?this._ngZone.runOutsideAngular(t):t()}}return e.\u0275fac=function(t){return new(t||e)(pe(Bt),pe(ps))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const uee=new $e("ROOT_OPTIONS"),dee=new $e("ROOT_STATE_TOKEN"),fee=new $e("FEATURE_STATE_TOKEN"),_G=new $e("NGXS_PLUGINS"),V0="NGXS_META",hee="NGXS_OPTIONS_META",yG="NGXS_SELECTOR_META";let X4=(()=>{class e{constructor(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=cee}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:function(t){let r=null;return t?r=new t:(s=pe(uee),r=gG(new e,s)),r;var s},providedIn:"root"}),e})();class kle{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}}let Ile=(()=>{class e{enter(t){return t()}leave(t){return t()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const pee=new $e("USER_PROVIDED_NGXS_EXECUTION_STRATEGY"),Ole=new $e("NGXS_EXECUTION_STRATEGY",{providedIn:"root",factory:()=>{const e=Xe(gE),n=e.get(pee);return e.get(n||(typeof Ai.Zone<"u"?cee:Ile))}});function bG(e){if(!e.hasOwnProperty(V0)){const n={name:null,actions:{},defaults:{},path:null,makeRootSelector:t=>t.getStateGetter(n.name),children:[]};Object.defineProperty(e,V0,{value:n})}return iM(e)}function iM(e){return e[V0]}function vG(e){return e.hasOwnProperty(yG)||Object.defineProperty(e,yG,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:()=>({})}}),Y4(e)}function Y4(e){return e[yG]}function zle(...e){return u2(e,["DISPATCHED"])}function u2(e,n,t=Hle){const r=function Wle(e){return e.reduce((n,t)=>(n[nM(t)]=!0,n),{})}(e),s=n&&function qle(e){return e.reduce((n,t)=>(n[t]=!0,n),{})}(n);return function(c){return c.pipe(function jle(e,n){return ii(t=>{const r=nM(t.action);return e[r]&&(!n||n[t.status])})}(r,s),t())}}function Ule(){return ye(({action:e,status:n,error:t})=>({action:e,result:{successful:"SUCCESSFUL"===n,canceled:"CANCELED"===n,error:t}}))}function Hle(){return ye(e=>e.action)}function d$(e){return n=>new Qn(t=>n.subscribe({next(r){e.leave(()=>t.next(r))},error(r){e.leave(()=>t.error(r))},complete(){e.leave(()=>t.complete())}}))}let xG=(()=>{class e{constructor(t){this._executionStrategy=t}enter(t){return this._executionStrategy.enter(t)}leave(t){return this._executionStrategy.leave(t)}}return e.\u0275fac=function(t){return new(t||e)(pe(Ole))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function gee(e){const n=[];let t=!1;return function(...s){if(t)n.unshift(s);else{for(t=!0,e(...s);n.length>0;){const c=n.pop();c&&e(...c)}t=!1}}}class Gle extends It{constructor(){super(...arguments),this._orderedNext=gee(n=>super.next(n))}next(n){this._orderedNext(n)}}class Xle extends wr{constructor(n){super(n),this._orderedNext=gee(t=>super.next(t)),this._currentValue=n}getValue(){return this._currentValue}next(n){this._currentValue=n,this._orderedNext(n)}}let wG=(()=>{class e extends Gle{ngOnDestroy(){this.complete()}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Yle=(()=>{class e extends Qn{constructor(t,r){const s=t.pipe(d$(r),oe());super(c=>{const h=s.subscribe({next:y=>c.next(y),error:y=>c.error(y),complete:()=>c.complete()});c.add(h)})}}return e.\u0275fac=function(t){return new(t||e)(pe(wG),pe(xG))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const _ee=e=>(...n)=>e.shift()(...n,(...r)=>_ee(e)(...r));let yee=(()=>{class e{constructor(t){this._injector=t,this._errorHandler=null}reportErrorSafely(t){null===this._errorHandler&&(this._errorHandler=this._injector.get(nl));try{this._errorHandler.handleError(t)}catch{}}}return e.\u0275fac=function(t){return new(t||e)(pe(hr))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),EG=(()=>{class e extends Xle{constructor(){super({})}ngOnDestroy(){this.complete()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),CG=(()=>{class e{constructor(t,r){this._parentManager=t,this._pluginHandlers=r,this.plugins=[],this.registerHandlers()}get rootPlugins(){return this._parentManager&&this._parentManager.plugins||this.plugins}registerHandlers(){const t=this.getPluginHandlers();this.rootPlugins.push(...t)}getPluginHandlers(){return(this._pluginHandlers||[]).map(r=>r.handle?r.handle.bind(r):r)}}return e.\u0275fac=function(t){return new(t||e)(pe(e,12),pe(_G,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})(),bee=(()=>{class e extends It{}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Zle=(()=>{class e{constructor(t,r,s,c,h,y){this._actions=t,this._actionResults=r,this._pluginManager=s,this._stateStream=c,this._ngxsExecutionStrategy=h,this._internalErrorReporter=y}dispatch(t){return this._ngxsExecutionStrategy.enter(()=>this.dispatchByEvents(t)).pipe(function Kle(e,n){return t=>{let r=!1;return t.subscribe({error:s=>{n.enter(()=>Promise.resolve().then(()=>{r||n.leave(()=>e.reportErrorSafely(s))}))}}),new Qn(s=>(r=!0,t.pipe(d$(n)).subscribe(s)))}}(this._internalErrorReporter,this._ngxsExecutionStrategy))}dispatchByEvents(t){return Array.isArray(t)?0===t.length?zt(this._stateStream.getValue()):c$(t.map(r=>this.dispatchSingle(r))):this.dispatchSingle(t)}dispatchSingle(t){const r=this._stateStream.getValue();return _ee([...this._pluginManager.plugins,(c,h)=>{c!==r&&this._stateStream.next(c);const y=this.getActionResultStream(h);return y.subscribe(E=>this._actions.next(E)),this._actions.next({action:h,status:"DISPATCHED"}),this.createDispatchObservable(y)}])(r,t).pipe(ne())}getActionResultStream(t){return this._actionResults.pipe(ii(r=>r.action===t&&"DISPATCHED"!==r.status),Bo(1),ne())}createDispatchObservable(t){return t.pipe(ree(r=>{switch(r.status){case"SUCCESSFUL":return zt(this._stateStream.getValue());case"ERRORED":return C1(r.error);default:return Hl}})).pipe(ne())}}return e.\u0275fac=function(t){return new(t||e)(pe(wG),pe(bee),pe(CG),pe(EG),pe(xG),pe(yee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),f$=(()=>{class e{constructor(t,r,s){this._stateStream=t,this._dispatcher=r,this._config=s}getRootStateOperations(){return{getState:()=>this._stateStream.getValue(),setState:r=>this._stateStream.next(r),dispatch:r=>this._dispatcher.dispatch(r)}}setStateToTheCurrentWithNew(t){const r=this.getRootStateOperations(),s=r.getState();r.setState(Object.assign(Object.assign({},s),t.defaults))}}return e.\u0275fac=function(t){return new(t||e)(pe(EG),pe(Zle),pe(X4))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),SG=(()=>{class e{constructor(t){this._internalStateOperations=t}createStateContext(t){const r=this._internalStateOperations.getRootStateOperations();return{getState:()=>Eee(r.getState(),t.path),patchState(s){const c=r.getState(),h=function Qle(e){return n=>{const t=Object.assign({},n);for(const r in e)t[r]=e[r];return t}}(s);return wee(r,c,h,t.path)},setState(s){const c=r.getState();return function G4(e){return"function"==typeof e}(s)?wee(r,c,s,t.path):xee(r,c,s,t.path)},dispatch:s=>r.dispatch(s)}}}return e.\u0275fac=function(t){return new(t||e)(pe(f$))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function xee(e,n,t,r){const s=pG(n,r,t);return e.setState(s),s}function wee(e,n,t,r){return xee(e,n,t(Eee(n,r)),r)}function Eee(e,n){return u$(e,n)}new RegExp("^[a-zA-Z0-9_]+$");let DG=(()=>{class e{}return e.type="@@INIT",e})(),MG=(()=>{class e{constructor(t){this.addedStates=t}}return e.type="@@UPDATE_STATE",e})();new $e("NGXS_DEVELOPMENT_OPTIONS",{providedIn:"root",factory:()=>({warnOnUnhandledActions:!0})});let d2=(()=>{class e{constructor(t,r,s,c,h,y,E){this._injector=t,this._config=r,this._parentFactory=s,this._actions=c,this._actionResults=h,this._stateContextFactory=y,this._initialState=E,this._actionsSubscription=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=fG(()=>{const M=this;function R(j){const X=M.statePaths[j];return X?function mee(e,n){return n&&n.compatibility&&n.compatibility.strictContentSecurityPolicy?function Rle(e){const n=e.slice();return t=>n.reduce((r,s)=>r&&r[s],t)}(e):function Nle(e){const n=e;let t="store."+n[0],r=0;const s=n.length;let c=t;for(;++r(X||(X=R(j)),X?X(...K):void 0))},getSelectorOptions:j=>Object.assign(Object.assign({},M._config.selectorOptions),j||{})}})}get states(){return this._parentFactory?this._parentFactory.states:this._states}get statesByName(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName}get statePaths(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths}static _cloneDefaults(t){let r=t;return Array.isArray(t)?r=t.slice():function Ble(e){return"object"==typeof e&&null!==e||"function"==typeof e}(t)?r=Object.assign({},t):void 0===t&&(r={}),r}ngOnDestroy(){var t;null===(t=this._actionsSubscription)||void 0===t||t.unsubscribe()}add(t){const{newStates:r}=this.addToStatesMap(t);if(!r.length)return[];const s=function Fle(e){const n=t=>e.find(s=>s===t)[V0].name;return e.reduce((t,r)=>{const{name:s,children:c}=r[V0];return t[s]=(c||[]).map(n),t},{})}(r),c=function $le(e){const n=[],t={},r=(s,c=[])=>{Array.isArray(c)||(c=[]),c.push(s),t[s]=!0,e[s].forEach(h=>{t[h]||r(h,c.slice(0))}),n.indexOf(s)<0&&n.push(s)};return Object.keys(e).forEach(s=>r(s)),n.reverse()}(s),h=function Lle(e,n={}){const t=(r,s)=>{for(const c in r)if(r.hasOwnProperty(c)&&r[c].indexOf(s)>=0){const h=t(r,c);return null!==h?`${h}.${c}`:c}return null};for(const r in e)if(e.hasOwnProperty(r)){const s=t(e,r);n[r]=s?`${s}.${r}`:r}return n}(s),y=function Ple(e){return e.reduce((n,t)=>(n[t[V0].name]=t,n),{})}(r),E=[];for(const M of c){const R=y[M],$=h[M],j=R[V0];this.addRuntimeInfoToMeta(j,$);const X={name:M,path:$,isInitialised:!1,actions:j.actions,instance:this._injector.get(R),defaults:e._cloneDefaults(j.defaults)};this.hasBeenMountedAndBootstrapped(M,$)||E.push(X),this.states.push(X)}return E}addAndReturnDefaults(t){const s=this.add(t||[]);return{defaults:s.reduce((h,y)=>pG(h,y.path,y.defaults),{}),states:s}}connectActionHandlers(){if(this._parentFactory||null!==this._actionsSubscription)return;const t=new It;this._actionsSubscription=this._actions.pipe(ii(r=>"DISPATCHED"===r.status),Wr(r=>{t.next(r);const s=r.action;return this.invokeActions(t,s).pipe(ye(()=>({action:s,status:"SUCCESSFUL"})),de({action:s,status:"CANCELED"}),Sf(c=>zt({action:s,status:"ERRORED",error:c})))})).subscribe(r=>this._actionResults.next(r))}invokeActions(t,r){const s=nM(r),c=[];let h=!1;for(const y of this.states){const E=y.actions[s];if(E)for(const M of E){const R=this._stateContextFactory.createStateContext(y);try{let $=y.instance[M.fn](R,r);$ instanceof Promise&&($=Cn($)),YO($)?($=$.pipe(Wr(j=>j instanceof Promise?Cn(j):YO(j)?j:zt(j)),de({})),M.options.cancelUncompleted&&($=$.pipe(Kn(t.pipe(zle(r)))))):$=zt({}).pipe(ne()),c.push($)}catch($){c.push(C1($))}h=!0}}return c.length||c.push(zt({})),c$(c)}addToStatesMap(t){const r=[],s=this.statesByName;for(const c of t){const h=iM(c).name;!s[h]&&(r.push(c),s[h]=c)}return{newStates:r}}addRuntimeInfoToMeta(t,r){this.statePaths[t.name]=r,t.path=r}hasBeenMountedAndBootstrapped(t,r){const s=void 0!==u$(this._initialState,r);return this.statesByName[t]&&s}}return e.\u0275fac=function(t){return new(t||e)(pe(hr),pe(X4),pe(e,12),pe(wG),pe(bee),pe(SG),pe(tee,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();function Cee(e){const n=Y4(e)||iM(e);return n&&n.makeRootSelector||(()=>e)}let j0=(()=>{class e{constructor(t,r,s,c,h,y){this._stateStream=t,this._internalStateOperations=r,this._config=s,this._internalExecutionStrategy=c,this._stateFactory=h,this._selectableStateStream=this._stateStream.pipe(d$(this._internalExecutionStrategy),ne({bufferSize:1,refCount:!0})),this.initStateStream(y)}dispatch(t){return this._internalStateOperations.getRootStateOperations().dispatch(t)}select(t){const r=this.getStoreBoundSelectorFn(t);return this._selectableStateStream.pipe(ye(r),Sf(s=>{const{suppressErrors:c}=this._config.selectorOptions;return s instanceof TypeError&&c?zt(void 0):C1(s)}),Ih(),d$(this._internalExecutionStrategy))}selectOnce(t){return this.select(t).pipe(Bo(1))}selectSnapshot(t){return this.getStoreBoundSelectorFn(t)(this._stateStream.getValue())}subscribe(t){return this._selectableStateStream.pipe(d$(this._internalExecutionStrategy)).subscribe(t)}snapshot(){return this._internalStateOperations.getRootStateOperations().getState()}reset(t){return this._internalStateOperations.getRootStateOperations().setState(t)}getStoreBoundSelectorFn(t){return Cee(t)(this._stateFactory.getRuntimeSelectorContext())}initStateStream(t){const r=this._stateStream.value;if(!r||0===Object.keys(r).length){const h=Object.keys(this._config.defaultsState).length>0?Object.assign(Object.assign({},this._config.defaultsState),t):t;this._stateStream.next(h)}}}return e.\u0275fac=function(t){return new(t||e)(pe(EG),pe(f$),pe(X4),pe(xG),pe(d2),pe(tee,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Z4=(()=>{class e{constructor(t,r){e.store=t,e.config=r}ngOnDestroy(){e.store=null,e.config=null}}return e.store=null,e.config=null,e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(X4))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),See=(()=>{class e{constructor(t,r,s,c,h){this._store=t,this._internalErrorReporter=r,this._internalStateOperations=s,this._stateContextFactory=c,this._bootstrapper=h,this._destroy$=new It}ngOnDestroy(){this._destroy$.next()}ngxsBootstrap(t,r){this._internalStateOperations.getRootStateOperations().dispatch(t).pipe(ii(()=>!!r),Do(()=>this._invokeInitOnStates(r.states)),Wr(()=>this._bootstrapper.appBootstrapped$),ii(s=>!!s),Sf(s=>(this._internalErrorReporter.reportErrorSafely(s),Hl)),Kn(this._destroy$)).subscribe(()=>this._invokeBootstrapOnStates(r.states))}_invokeInitOnStates(t){for(const r of t){const s=r.instance;s.ngxsOnChanges&&this._store.select(c=>u$(c,r.path)).pipe(Wl(void 0),be((e,n)=>{let t,r=!1;e.subscribe(Se(n,s=>{const c=t;t=s,r&&n.next([c,s]),r=!0}))}),Kn(this._destroy$)).subscribe(([c,h])=>{const y=new kle(c,h,!r.isInitialised);s.ngxsOnChanges(y)}),s.ngxsOnInit&&s.ngxsOnInit(this._getStateContext(r)),r.isInitialised=!0}}_invokeBootstrapOnStates(t){for(const r of t){const s=r.instance;s.ngxsAfterBootstrap&&s.ngxsAfterBootstrap(this._getStateContext(r))}}_getStateContext(t){return this._stateContextFactory.createStateContext(t)}}return e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(yee),pe(f$),pe(SG),pe(eee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),dce=(()=>{class e{constructor(t,r,s,c,h=[],y){const E=t.addAndReturnDefaults(h);r.setStateToTheCurrentWithNew(E),t.connectActionHandlers(),y.ngxsBootstrap(new DG,E)}}return e.\u0275fac=function(t){return new(t||e)(pe(d2),pe(f$),pe(j0),pe(Z4),pe(dee,8),pe(See))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})(),fce=(()=>{class e{constructor(t,r,s,c=[],h){const y=e.flattenStates(c),E=s.addAndReturnDefaults(y);E.states.length&&(r.setStateToTheCurrentWithNew(E),h.ngxsBootstrap(new MG(E.defaults),E))}static flattenStates(t=[]){return t.reduce((r,s)=>r.concat(s),[])}}return e.\u0275fac=function(t){return new(t||e)(pe(j0),pe(f$),pe(d2),pe(fee,8),pe(See))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})(),Dee=(()=>{class e{static forRoot(t=[],r={}){return{ngModule:dce,providers:[d2,CG,...t,...e.ngxsTokenProviders(t,r)]}}static forFeature(t=[]){return{ngModule:fce,providers:[d2,CG,...t,{provide:fee,multi:!0,useValue:t}]}}static ngxsTokenProviders(t,r){return[{provide:pee,useValue:r.executionStrategy},{provide:dee,useValue:t},{provide:uee,useValue:r},{provide:$w,useFactory:e.appBootstrapListenerFactory,multi:!0,deps:[eee]},{provide:iee,useExisting:SG},{provide:nee,useExisting:d2}]}static appBootstrapListenerFactory(t){return()=>t.bootstrap()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();function Mee(e,n){return(t,r)=>{const s=bG(t.constructor);Array.isArray(e)||(e=[e]);for(const c of e){const h=c.type;s.actions[h]||(s.actions[h]=[]),s.actions[h].push({fn:r,options:n||{},type:h})}}}function rM(e){return n=>{const t=n,r=bG(t),s=Object.getPrototypeOf(t),c=function hce(e,n){return Object.assign(Object.assign({},e[hee]||{}),n)}(s,e);(function pce(e){const{meta:n,inheritedStateClass:t,optionsWithInheritance:r}=e,{children:s,defaults:c,name:h}=r,y="string"==typeof h?h:h&&h.getName()||null;if(t.hasOwnProperty(V0)){const E=t[V0]||{};n.actions=Object.assign(Object.assign({},n.actions),E.actions)}n.children=s,n.defaults=c,n.name=y})({meta:r,inheritedStateClass:s,optionsWithInheritance:c}),t[hee]=c}}const Aee="NGXS_SELECTOR_OPTIONS_META",Q4={getOptions:e=>e&&e[Aee]||{},defineOptions:(e,n)=>{e&&(e[Aee]=n)}};function h$(e,n,t){const r=function lce(e,n){const t=n&&n.containerClass,s=fG(function(...h){const y=e.apply(t,h);return y instanceof Function?fG.apply(null,[y]):y});return Object.setPrototypeOf(s,e),s}(n,t),s=function bce(e,n){const t=vG(e);t.originalFn=e;let r=()=>({});n&&(t.containerClass=n.containerClass,t.selectorName=n.selectorName||null,r=n.getSelectorOptions||r);const s=Object.assign({},t);return t.getSelectorOptions=()=>function vce(e,n){return Object.assign(Object.assign(Object.assign(Object.assign({},Q4.getOptions(e.containerClass)||{}),Q4.getOptions(e.originalFn)||{}),e.getSelectorOptions()||{}),n)}(s,r()),t}(n,t);return s.makeRootSelector=function ace(e,n,t){return r=>{const{argumentSelectorFunctions:s,selectorOptions:c}=function cce(e,n,t=[]){const r=n.getSelectorOptions(),s=e.getSelectorOptions(r),h=function uce(e=[],n,t){const r=[];return t&&(0===e.length||n.injectContainerState)&&iM(t)&&r.push(t),e&&r.push(...e),r}(t,s,n.containerClass).map(y=>Cee(y)(e));return{selectorOptions:s,argumentSelectorFunctions:h}}(r,e,n);return function(y){const E=s.map(M=>M(y));try{return t(...E)}catch(M){if(M instanceof TypeError&&c.suppressErrors)return;throw M}}}}(s,e,r),r}function Tee(e){return(n,t,r)=>{r||(r=Object.getOwnPropertyDescriptor(n,t));const s=r?.value,c=h$(e,s,{containerClass:n,selectorName:t.toString(),getSelectorOptions:()=>({})}),h={configurable:!0,get:()=>c};return h.originalFn=s,h}}class xce{constructor(n){this.name=n,vG(this).makeRootSelector=r=>r.getStateGetter(this.name)}getName(){return this.name}toString(){return`StateToken[${this.name}]`}}const Ece="NGXS_COMPUTED_OPTION",kee="NGXS_DATA_META",AG="NGXS_META",Iee="NGXS_ARGUMENT_REGISTRY_META";let Oee=(()=>{class e{constructor(t){this.subscription=null,this.sequence$=new wr(0),t&&(this.subscription=t.subscribe(()=>this.updateSequence()))}get sequenceValue(){return this.sequence$.getValue()}ngOnDestroy(){this.sequence$.next(0),this.subscription?.unsubscribe()}updateSequence(){this.sequence$.next(this.sequenceValue+1)}}return e.\u0275fac=function(t){return new(t||e)(pe(j0,8))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();function p$(e){return e[kee]}let $h=(()=>{class e{constructor(t,r,s){e.store=t.get(j0),e.ngZone=t.get(Bt),e.factory=r,e.context=s,e.computed=t.get(Oee),e.injector=t}}return e.store=null,e.computed=null,e.context=null,e.factory=null,e.ngZone=null,e.injector=null,e.\u0275fac=function(t){return new(t||e)(pe(hr),pe(nee),pe(iee))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();class Zs{constructor(){Zs.statesCachedMeta.clear()}static createStateContext(n){return $h.context.createStateContext(n)}static ensureMappedState(n){if(ql($h.factory)||ql(n))throw new Error("Metadata not created \n Maybe you forgot to import the NgxsDataPluginModule\n Also, you cannot use this.ctx.* until the application is fully rendered \n (use by default ngxsOnInit(ctx: StateContext), or ngxsAfterBootstrap(ctx: StateContext) !!!");return(Tc(n.name)?Zs.statesCachedMeta.get(n.name):null)||Zs.ensureMeta(n)}static getRepositoryByInstance(n){const r=p$(Zs.getStateClassByInstance(n))??null;if(ql(r))throw new Error("You forgot add decorator @StateRepository or initialize state!\nExample: NgxsModule.forRoot([ .. ]), or NgxsModule.forFeature([ .. ])");return r}static getStateClassByInstance(n){return(n??{}).constructor}static clearMetaByInstance(n){const t=Zs.getRepositoryByInstance(n);t.stateMeta.actions={},t.operations={}}static createPayload(n,t){const r={},s=Array.from(n);for(const[c,h]of s.entries()){const y=t?.getPayloadTypeByIndex(c);Tc(y)&&(r[y]=h)}return Object.keys(r).length>0?r:null}static createAction(n,t,r){const s=Zs.createPayload(t,r),c=function Mce(e){return class{constructor(t){if(t)for(const r of Object.keys(t))this[r]=t[r]}static get type(){return e}}}(n.type);return new c(s)}static ensureMeta(n){const t=Tc(n.name)?$h.factory.states?.find(r=>r.name===n.name):null;return Tc(t)&&Tc(n.name)&&Zs.statesCachedMeta.set(n.name,t),t}}Zs.statesCachedMeta=new Map,Zs.\u0275fac=function(n){return new(n||Zs)},Zs.\u0275prov=Ue({token:Zs,factory:Zs.\u0275fac}),new class Ace{constructor(){this.subject=new J(1)}init(){this.subject.next()}onInit(n){this.subject.pipe(Ie()).subscribe(n)}reset(){this.subject.complete(),this.subject=new J(1)}};class kce extends Error{constructor(n){super(`Child states can only be added to an object. Cannot convert ${Tc(n?.constructor)?n.constructor.name:n} to PlainObject`)}}function Ree(e){return e.NGXS_OPTIONS_META??{name:""}}function Nee(e){const n=Ree(e),t=n.children??[],s=KJ(void 0===n.defaults?{}:n.defaults);if(t.length>0){if(ZJ(s))return function Ice(e,n){return n.reduce((t,r)=>{const s=Ree(r);if(function l$(e){const n="string"==typeof e?e.trim():e;return[void 0,null,NaN,"",1/0].includes(n)}(s.name))throw new Error("State name not provided in class");return t[s.name.toString()]=Nee(r),t},e??{})}(s,t);throw new kce(s)}return s}function Fee(){return`__${Ece}__`}function Pee(e){return e[Fee()]??null}function Lee(){return $h?.computed?.sequenceValue??0}function Nce(e){let n=!1;return YO(e)&&(n=!0),n}function TG(e){return e[Iee]}class Fce extends Error{constructor(n,t){super(`An argument with the name '${n}' already exists in the method '${t}'`)}}class Pce{constructor(){this.payloadMap=new Map,this.argumentMap=new Map}getPayloadTypeByIndex(n){return this.payloadMap.get(n)??null}getArgumentNameByIndex(n){return this.argumentMap.get(n)??null}createPayloadType(n,t,r){this.checkDuplicateName(n,t),this.payloadMap.set(r,n),this.payloadMap.set(n,n)}createArgumentName(n,t,r){this.checkDuplicateName(n,t),this.argumentMap.set(r,n),this.argumentMap.set(n,n)}checkDuplicateName(n,t){if(uG(this.argumentMap.has(n))||uG(this.payloadMap.has(n)))throw new Fce(n,t)}}function Vce(e){return{enumerable:!0,configurable:!0,get(){const n=p$(e),t=Zs.ensureMappedState(n.stateMeta);return Zs.createStateContext(t)}}}function Bee(e){if(!e)throw new Error("You forgot add decorator @StateRepository or initialize state!\nExample: NgxsModule.forRoot([ .. ]), or NgxsModule.forFeature([ .. ])");return{...e,getState:()=>e.getState(),setState(n){e.setState(n)},patchState(n){e.patchState(n)}}}const qce={dataActionSubscribeRequired:!0},Gce=new $e("NGXS_DATA_CONFIG",{providedIn:"root",factory:()=>qce});let Xce=(()=>{class e{constructor(t,r){this.accessor=t,this.injector=r}static forRoot(t=[]){return{ngModule:e,providers:[Zs,$h,Oee,...t]}}}return e.\u0275fac=function(t){return new(t||e)(pe(Zs,2),pe($h,2))},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();function Fm(){return(e,n,t)=>{!function Dce(e,n){if(!function lle(e,n){let t=e,r=!1;if(ZJ(t))for(;null!==t;){if(c2(t?.hasOwnProperty(n))){r=!!Object.getOwnPropertyDescriptor(t,n)?.get;break}t=Object.getPrototypeOf(t)}return r}(e,n?.toString()))throw new Error(`The method must be a getter for the computed decorator to work properly.\nExample: \n@Computed() get ${n.toString()}() { \n\t .. \n}`)}(e,n);const r=t.get;return t.get=function(...s){const c=function Rce(e){return ql(Pee(e))&&Object.defineProperties(e,{[Fee()]:{enumerable:!0,configurable:!0,value:new WeakMap}}),Pee(e)}(this),h=c?.get(r);if(c2(h?.isObservable))return h?.value;if(ql(h)||h.sequenceId!==Lee()){c.delete(r);const E=r.apply(this,s);return c.set(r,{value:E,sequenceId:Lee(),isObservable:Nce(E)}),E}return h?.value},t}}const Yce={cancelUncompleted:!0,insideZone:!1,subscribeRequired:!0};function Qs(e={}){const n=function Kce(e){const n=$h?.injector?.get(Gce,void 0,fi.Optional),t={...Yce};return Tc(n)&&void 0!==n?.dataActionSubscribeRequired&&(t.subscribeRequired=n.dataActionSubscribeRequired),{...t,...e}}(e);return(t,r,s)=>{!function Sce(e,n){if(e.hasOwnProperty("prototype"))throw new Error("Cannot support static methods with @DataAction()");if(void 0===n)throw new Error("@DataAction() can only decorate a method implementation")}(t,s);const c=s.value,h=r.toString();return s.value=function(...y){const E=this;let M=null;const R=Zs.getRepositoryByInstance(E),$=R.operations;let j=$[h];const X=R.stateMeta,K=TG(c);if(ql(j)){const rt=function Wce(e){return String(e).replace(/\/\/.*$/gm,"").replace(/\s+/g,"").replace(/\/\*[^*/]*\*\//g,"").split("){",1)?.[0]?.replace(/^[^(]*\(/,"").replace(/=[^,]+/g,"").split(",").filter(Boolean)??[]}(c),Mt=function Tce(e){const{statePath:n,argumentsNames:t,methodName:r,argumentRegistry:s}=e;let c="";for(let h=0;h(c2(n.insideZone)?$h.ngZone?.run(()=>{M=c.apply(E,y)}):M=c.apply(E,y),YO(M)&&c2(n.subscribeRequired)?zt(null).pipe(ye(()=>M)):M);const Me=Zs.createAction(j,y,K),Ce=$h.store.dispatch(Me);return YO(M)?function Oce(e,n){return c$([e,n]).pipe(ye(t=>t.pop()))}(Ce,M):M},s}}function Gl(e){return(n,t,r)=>{const s=e.trim();if(!s)throw new Error("Payload name should be initialized");(function Lce(e,n){const t=e[n];return ql(TG(t))&&Object.defineProperties(t,{[Iee]:{enumerable:!0,configurable:!0,value:new Pce}}),TG(t)})(n,t).createPayloadType(s,t,r)}}function f2(){return e=>{const n=function Hce(e){if(function Zae(e){return!uG(e)}(e.hasOwnProperty(AG))){const n={name:null,actions:{},defaults:{},path:null,makeRootSelector:t=>t.getStateGetter(n.name),children:[]};Object.defineProperty(e,AG,{value:n})}return function Uce(e){return e?.[AG]}(e)}(e);if(ql(n.name))throw new Error("@StateRepository should be add before decorator @State");!function zce(e,n){(function Bce(e){const n=p$(e)??null;return(ql(n)||n?.stateClass!==e)&&function $ce(e){Object.defineProperty(e,kee,{writable:!0,configurable:!0,enumerable:!0,value:{stateMeta:null,operations:{},stateClass:e}})}(e),p$(e)}(e)).stateMeta=n}(e,n),function Qce(e,n,t){Object.defineProperties(e.prototype,{name:{enumerable:!0,configurable:!0,value:n.name},initialState:{enumerable:!0,configurable:!0,get:()=>KJ(t)},context:Vce(e)})}(e,n,Nee(e)),function jce(e){const t=p$(e)?.stateMeta?.name??null;if(Tc(t)){const r=`__${t}__selector`;Object.defineProperties(e.prototype,{[r]:{writable:!0,enumerable:!1,configurable:!0},state$:{enumerable:!0,configurable:!0,get(){if(Tc(this[r]))return this[r];if(ql($h.store))throw new Error("Metadata not created \n Maybe you forgot to import the NgxsDataPluginModule\n Also, you cannot use this.ctx.* until the application is fully rendered \n (use by default ngxsOnInit(ctx: StateContext), or ngxsAfterBootstrap(ctx: StateContext) !!!");return this[r]=$h.store.select(e).pipe(ye(s=>s),ne({refCount:!0,bufferSize:1})),this[r]}}})}}(e)}}var zee=function(e){return e.ID="id",e}(zee||{}),kG=function(e){return e.ASC="asc",e.DESC="desc",e}(kG||{});let Vee=(()=>{class e{constructor(){this._dirty=!0,this.browserStorageEvents$=new It,this.isInitialised=!1,this.isBootstrapped=!1}get dirty(){return this._dirty}set dirty(t){this._dirty=t}ngxsOnChanges(t){this.dirty&&this.isBootstrapped&&(this.dirty=!1,this.ngxsDataDoCheck?.())}ngxsOnInit(){this.isInitialised=!0}ngxsAfterBootstrap(){this.isBootstrapped=!0,this.dirty&&(this.dirty=!1,this.ngxsDataDoCheck?.())}markAsDirtyAfterReset(){this.dirty=!0,this.ngxsDataAfterReset?.()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})(),IG=(()=>{class e extends Vee{constructor(){super(...arguments),this.primaryKey=zee.ID,this.comparator=null}get snapshot(){return this.getState()}get ids(){return this.snapshot.ids}get entities(){return this.snapshot.entities}get entitiesArray(){const t=this.snapshot;return t.ids.map(r=>t.entities[r])}get ids$(){return this.state$.pipe(ye(t=>t.ids))}get entities$(){return this.state$.pipe(ye(t=>t.entities))}get entitiesArray$(){return this.state$.pipe(ye(t=>t.ids.map(r=>t.entities[r])))}get ctx(){return Bee(this.context)}reset(){this.setEntitiesState(this.initialState),this.markAsDirtyAfterReset()}addOne(t){this.addEntityOne(t)}addMany(t){this.addEntitiesMany(t)}setOne(t){this.setEntityOne(t)}setMany(t){this.setEntitiesMany(t)}setAll(t){this.setEntitiesAll(t)}updateOne(t){this.updateEntitiesMany([t])}updateMany(t){this.updateEntitiesMany(t)}upsertOne(t){this.upsertEntitiesMany([t])}upsertMany(t){this.upsertEntitiesMany(t)}removeOne(t){this.removeEntitiesMany([t])}removeMany(t){this.removeEntitiesMany(t)}removeByEntity(t){const r=this.selectId(t);this.removeEntitiesMany([r])}removeByEntities(t){const r=[];for(const s of t){const c=this.selectId(s);r.push(c)}this.removeEntitiesMany(r)}removeAll(){this.setAll([])}sort(t){this.comparator=t??this.comparator,ql(this.comparator)?console.warn("You must set the compare function before sorting."):this.setEntitiesState(this.getState())}patchState(t){this.ctx.patchState(t)}setComparator(t){return this.comparator=t,this}dispatch(t){return this.ctx.dispatch(t)}getState(){return this.ctx.getState()}selectId(t){return t?.[this.primaryKey]}selectOne(t){return this.snapshot.entities[t]??null}selectAll(){const t=this.getState();return t.ids.map(r=>t.entities[r])}addEntityOne(t){const r=this.getState(),s=this.selectIdValue(t);s in r.entities||this.setEntitiesState({...r,ids:[...r.ids,s],entities:{...r.entities,[s]:t}})}addEntitiesMany(t){const r=this.getState(),s={},c=[];for(const h of t){const y=this.selectIdValue(h);y in r.entities||y in s||(c.push(y),s[y]=h)}c.length>0&&this.setEntitiesState({...r,ids:[...r.ids,...c],entities:{...r.entities,...s}})}setEntitiesAll(t){const r=this.getState(),s={},c=[];for(const h of t){const y=this.selectIdValue(h);y in s||(c.push(y),s[y]=h)}this.setEntitiesState({...r,ids:c,entities:s})}setEntityOne(t){const r=this.getState(),s=this.selectIdValue(t);this.setEntitiesState(s in r.entities?{...r,entities:{...r.entities,[s]:t}}:{...r,ids:[...r.ids,s],entities:{...r.entities,[s]:t}})}setEntitiesMany(t){for(const r of t)this.setEntityOne(r)}updateEntitiesMany(t){const r=this.getState(),s=t.filter(y=>y.id in r.entities);if(0===s.length)return;const c=this.generateKeyMap(r),h={...r.entities};for(const y of s){const E=this.updateOrigin(h,y),M=this.selectIdValue(E);M!==y.id&&(delete c[y.id],delete h[y.id]),c[y.id]=M,h[M]=E}this.setEntitiesState({...r,ids:r.ids.map(y=>c[y]??y),entities:h})}upsertEntitiesMany(t){const r=this.getState(),s=[],c=[];for(const h of t){const y=this.selectIdValue(h);y in r.entities?s.push({id:y,changes:h}):c.push(h)}this.updateMany(s),this.addMany(c)}removeEntitiesMany(t){const r=this.getState(),s=this.generateKeyMap(r),c={...r.entities};for(const h of t)h in c&&(delete s[h],delete c[h]);this.setEntitiesState({...r,ids:r.ids.filter(h=>h in s),entities:c})}setEntitiesState(t){const r=this.sortKeysByComparator(t.ids,t.entities);this.ctx.patchState({...t,ids:r,entities:t.entities})}sortKeysByComparator(t,r){if(ql(this.comparator))return t;const s=t.slice(),c=this.comparator;return"function"==typeof c?s.sort((h,y)=>c(r[h],r[y])):this.sortByComparatorOptions(s,c,r)}sortByComparatorOptions(t,r,s){switch(r?.sortByOrder){case kG.ASC:return t.sort((c,h)=>function dle(e,n,t){return n?.[e]>t?.[e]?1:n?.[e]function fle(e,n,t){return n?.[e]>t?.[e]?-1:n?.[e](r[s]=s,r),{})}updateOrigin(t,r){return{...t[r.id],...r.changes}}selectIdValue(t){const r=this.selectId(t);return ql(r),r}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"snapshot",null),Nn([Fm(),gt("design:type",Array),gt("design:paramtypes",[])],e.prototype,"ids",null),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"entities",null),Nn([Fm(),gt("design:type",Array),gt("design:paramtypes",[])],e.prototype,"entitiesArray",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"ids$",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"entities$",null),Nn([Fm(),gt("design:type",Qn),gt("design:paramtypes",[])],e.prototype,"entitiesArray$",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"reset",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"addOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"addMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"setOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"setMany",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"setAll",null),Nn([Qs(),ga(0,Gl("update")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"updateOne",null),Nn([Qs(),ga(0,Gl("updates")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"updateMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"upsertOne",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"upsertMany",null),Nn([Qs(),ga(0,Gl("id")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"removeOne",null),Nn([Qs(),ga(0,Gl("ids")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"removeMany",null),Nn([Qs(),ga(0,Gl("entity")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"removeByEntity",null),Nn([Qs(),ga(0,Gl("entities")),gt("design:type",Function),gt("design:paramtypes",[Array]),gt("design:returntype",void 0)],e.prototype,"removeByEntities",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"removeAll",null),Nn([Qs(),ga(0,Gl("comparator")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"sort",null),Nn([Qs(),ga(0,Gl("patchValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"patchState",null),e})(),OG=(()=>{class e extends Vee{get snapshot(){return this.getState()}get ctx(){return Bee(this.context)}patchState(t){this.ctx.patchState(t)}setState(t){this.ctx.setState(t)}reset(){this.ctx.setState(this.initialState),this.markAsDirtyAfterReset()}getState(){return this.ctx.getState()}dispatch(t){return this.ctx.dispatch(t)}}return e.\u0275fac=(()=>{let n;return function(r){return(n||(n=Fi(e)))(r||e)}})(),e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),Nn([Fm(),gt("design:type",Object),gt("design:paramtypes",[])],e.prototype,"snapshot",null),Nn([Qs(),ga(0,Gl("patchValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"patchState",null),Nn([Qs(),ga(0,Gl("stateValue")),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],e.prototype,"setState",null),Nn([Qs(),gt("design:type",Function),gt("design:paramtypes",[]),gt("design:returntype",void 0)],e.prototype,"reset",null),e})();var gu=tn(104);let RG=(()=>{class e extends gu.View{static#e=this.HANDLER_TYPES=[];static withDataHandlers(t){const r=this.HANDLER_TYPES;return class extends(this){static#t=this.HANDLER_TYPES=r.concat(t)}}constructor(t,r){super(t,r),this.handlers=this.constructor.HANDLER_TYPES.map(h=>new h(this))}finalize(){return this.handlers.forEach(t=>t.finalize?.()),super.finalize()}}return e})();function NG(e){return n=>(function nue(e,n){const t=e.signals??=[],r=e.projections?e.projections[0]:void 0;!r||"albersUsa"===r.type||(t.push({name:"tx",update:"width / 2 - 300"},{name:"ty",update:"height / 2"},{name:"scale",value:n.initialZoom??n.zoomLevels[0],on:[{events:{type:"wheel",consume:!0,filter:"event.shiftKey"},update:["clamp(scale * pow(1.0015, -event.deltaY * pow(48, event.deltaMode)), ",n.zoomLevels[0],", ",n.zoomLevels[1],")"].join("")}]},{name:"angles",value:[0,0],on:[{events:"mousedown",update:"[rotateX, centerY]"}]},{name:"cloned",value:null,on:[{events:"mousedown",update:"copy('"+r.name+"')"}]},{name:"start",value:null,on:[{events:"mousedown",update:"invert(cloned, xy())"}]},{name:"drag",value:null,on:[{events:"[mousedown[event.shiftKey], window:mouseup] > window:mousemove",update:"invert(cloned, xy())"}]},{name:"delta",value:null,on:[{events:{signal:"drag"},update:"[drag[0] - start[0], start[1] - drag[1]]"}]},{name:"rotateX",value:n.center[0],on:[{events:{signal:"delta"},update:"angles[0] + delta[0]"}]},{name:"centerY",value:n.center[1],on:[{events:{signal:"delta"},update:"clamp(angles[1] + delta[1], -60, 60)"}]}),Object.assign(r,{scale:{signal:"scale"},rotate:[{signal:"rotateX"},0,0],center:[0,{signal:"centerY"}],translate:[{signal:"tx"},{signal:"ty"}]}),delete r.size)}(n,e),n)}NG({center:[86.44305475,39.76622477],zoomLevels:[3200,25e4],initialZoom:6400}),NG({center:[96,39],zoomLevels:[10,25e4],initialZoom:600});const iue=[{CASE_NUMBER:"",RANK:0,AGE:0,PERIOD:0,TIME_BEFORE_DEATH:0,ALL_TYPES:0,HEALTH_ENCOUNTERS:0,OPIOID_PRESCRIPTIONS:0,INCARCERATIONS:0,OVERDOSES:0,NUM_ENCOUNTERS_TOTAL:0,NUM_INCARCERATIONS_TOTAL:0,AGE_RANK:0,HEALTH_RANK:0,OVERDOSE_RANK:0,INCARCERATIONS_RANK:0,PRESCRIPTIONS_RANK:0,FINAL_RANK:0,TIME_FIRST_OD:0,TIME_FIRST_RX:0,OD_DIFF:0,RX_DIFF:0},{CASE_NUMBER:"",RANK:0,AGE:0,PERIOD:0,TIME_BEFORE_DEATH:120,ALL_TYPES:0,HEALTH_ENCOUNTERS:0,OPIOID_PRESCRIPTIONS:0,INCARCERATIONS:0,OVERDOSES:0,NUM_ENCOUNTERS_TOTAL:0,NUM_INCARCERATIONS_TOTAL:0,AGE_RANK:0,HEALTH_RANK:0,OVERDOSE_RANK:0,INCARCERATIONS_RANK:0,PRESCRIPTIONS_RANK:0,FINAL_RANK:0,TIME_FIRST_OD:0,TIME_FIRST_RX:0,OD_DIFF:0,RX_DIFF:0}];let FG=(()=>{class e{static#e=this.OPTIONS={};static withOptions(t){return class extends(this){static#t=this.OPTIONS=t}}constructor(t){this.view=t,this.options=this.constructor.OPTIONS,this.sortBy="HEALTH_RANK",this.sortRanks={},t.addDataListener("source",(r,s)=>{this.data=s,this.sortRanks=this.compileSortRanks(s),this.scheduleUpdateCall()}),t.addSignalListener("sort_by__field",(r,s)=>{this.sortBy=s,this.scheduleUpdateCall()}),t.addSignalListener("rank",(r,s)=>{this.ranks=s.RANK,this.ranksLookup=void 0,this.scheduleUpdateCall()}),t.addSignalListener("age",(r,s)=>{this.age=s.AGE,this.scheduleUpdateCall()}),t.addSignalListener("encounters",(r,s)=>{this.numEncounters=s.NUM_ENCOUNTERS_TOTAL,this.scheduleUpdateCall()}),t.addSignalListener("incarcerations",(r,s)=>{this.numIncarcerations=s.NUM_INCARCERATIONS_TOTAL,this.scheduleUpdateCall()})}finalize(){this.clearScheduledUpdateCall(),this.data=void 0,this.sortBy="HEALTH_RANK",this.sortRanks={},this.ranks=void 0,this.ranksLookup=void 0,this.age=void 0,this.numEncounters=void 0}scheduleUpdateCall(){var t=this;this.clearScheduledUpdateCall(),this.scheduledUpdateCall=setTimeout((0,sn.Z)(function*(){t.clearScheduledUpdateCall(),t.updateData(),t.view.resize(),yield t.view.runAsync()}),this.options.debounceTime??500)}clearScheduledUpdateCall(){void 0!==this.scheduledUpdateCall&&(clearTimeout(this.scheduledUpdateCall),this.scheduledUpdateCall=void 0)}updateData(){let{data:t=[]}=this;t=this.filterByRank(t),t=this.filterByAge(t),t=this.filterByEncounters(t),t=this.filterByIncarcerations(t),t=this.sortData(t),t=this.limitData(t),t=this.setRanks(t),0===t.length&&(t=iue),this.view.data("processed_source",t)}compileSortRanks(t){const r={};for(const{CASE_NUMBER:s,AGE_RANK:c,HEALTH_RANK:h,OVERDOSE_RANK:y,TIME_FIRST_OD:E,TIME_FIRST_RX:M,OD_DIFF:R,RX_DIFF:$,INCARCERATIONS_RANK:j,PRESCRIPTIONS_RANK:X}of t)r[s]??={AGE_RANK:c,HEALTH_RANK:h,OVERDOSE_RANK:y,TIME_FIRST_OD:E,TIME_FIRST_RX:M,OD_DIFF:R,RX_DIFF:$,INCARCERATIONS_RANK:j,PRESCRIPTIONS_RANK:X};return r}filterByRank(t){const{ranks:r}=this;if(void 0===r)return t;const s=this.ranksLookup??=new Set(r);return t.filter(({RANK:c})=>s.has(c))}filterByAge(t){const{age:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({AGE:h})=>s<=h&&h<=c)}filterByEncounters(t){const{numEncounters:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({NUM_ENCOUNTERS_TOTAL:h})=>s<=h&&h<=c)}filterByIncarcerations(t){const{numIncarcerations:r}=this;if(void 0===r)return t;const[s,c]=r;return t.filter(({NUM_INCARCERATIONS_TOTAL:h})=>s<=h&&h<=c)}sortData(t){const{sortBy:r,sortRanks:s}=this,c=h=>s[h.CASE_NUMBER][r];return t.sort((h,y)=>c(h)-c(y))}limitData(t){const{options:{maxCasesShown:r=54}}=this,s=new Set,c=[];for(const h of t)s.has(h.CASE_NUMBER)?c.push(h):s.size(c.CASE_NUMBER!==r&&(r=c.CASE_NUMBER,s+=1),{...c,...(0,gu.ingest)({}),FINAL_RANK:s}))}}return e})();const rue={Gender:"SEX",Age:"AGE","Opioid Prescriptions within last year before death":"OPIOID_PRESCRIPTIONS_1YEAR","Any Opioid Prescriptions before death":"ANY_PRESCRIPTIONS","Prescription vs. Illicit Drugs":"ILLICIT_V_PRESCRIPTION"};class oue{constructor(n){this.view=n,this.subsets={},this.setData(),this.view.addSignalListener("data_variable_selection",(t,r)=>this.updateDataVariable(r.LABEL&&r.LABEL.length>0?r.LABEL[0]:void 0))}setData(){var n=this;return(0,sn.Z)(function*(){const t=yield(0,gu.loader)().load("assets/generated/vis-geomap-opioid-deaths.csv").then(r=>(0,gu.read)(r,{type:"csv",parse:{N_OPIOID_PRESCRIPTIONS:"number",LATITUDE:"number",LONGITUDE:"number",PERIOD:"date"}}));Object.entries(rue).forEach(([r,s])=>{n.subsets[r]=t.filter(c=>c.DATA_VARIABLE===s)}),n.updateDataVariable("Age")})()}updateDataVariable(n){var t=this;return(0,sn.Z)(function*(){n&&(yield t.view.runAsync(),t.view.data("source",t.subsets[n]||[]))})()}finalize(){this.subsets={}}}const jee=[{id:"vis1-geomap-of-opioid-deaths",title:"Accidental Drug Overdose Deaths",description:"Marion County by Place of Injury (2010-2018)",spec:"assets/pages/vis1-geomap-of-opioid-deaths/vis.vl.json",options:{renderer:"canvas",actions:!0,patch:e=>((e=NG({center:[87.44305475,38.76622477],zoomLevels:[3200,25e4],initialZoom:6400})(e)).width=941,e.height=941,e),viewClass:class sue extends gu.View{constructor(n,t){super(n,t),this.dataHandler=new oue(this)}finalize(){return this.dataHandler.finalize(),super.finalize()}}},content:"assets/pages/vis1-geomap-of-opioid-deaths/README.md",sql:"assets/pages/vis1-geomap-of-opioid-deaths/data.sql",csv:"assets/generated/vis-geomap-opioid-deaths.csv"},{id:"vis2-age-and-gender",title:"Age Group & Gender of Accidental Drug Overdose",description:"Marion County Deaths & Population (2010-2018)",spec:"assets/pages/vis2-age-and-gender/vis.vl.json",options:{},content:"assets/pages/vis2-age-and-gender/README.md",sql:"assets/pages/vis2-age-and-gender/data.sql",csv:"assets/generated/vis2-data/death-counts.csv"},{id:"vis3-heatmap-of-accidental-overdoses",title:"Age Group & Gender of Accidental Drug Overdose",description:"Marion County by Deaths & Population (2010-2018)",spec:"assets/pages/vis3-heatmap-of-accidental-overdoses/vis.vl.json",options:{},content:"assets/pages/vis3-heatmap-of-accidental-overdoses/README.md",sql:"assets/pages/vis4-combined-visualization/data.sql",csv:"assets/generated/visualization4/data.csv"},{id:"vis4-combined-visualization",title:"Accidental Drug Overdose Deaths",description:"Marion County by Substance, Sex, & Age (2010-2018)",spec:"assets/pages/vis4-combined-visualization/vis.vl.json",options:{},content:"assets/pages/vis4-combined-visualization/README.md",sql:"assets/pages/vis4-combined-visualization/data.sql",csv:"assets/generated/visualization4/data.csv"},{id:"vis5-opioid-trajectories",title:"Opioid Death Datasets",description:"Marion County by History of Opioid Prescription, Previous Overdose, Incarceration, Health Data (2010-2018)",spec:"assets/pages/vis5-opioid-trajectories/vis.vl.json",options:{},content:"assets/pages/vis5-opioid-trajectories/README.md",sql:"assets/pages/vis5-opioid-trajectories/data.sql",csv:"assets/generated/visualization5/data.csv"},{id:"vis6-maps-of-health",title:"Maps of Health #1",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"},{id:"vis6-maps-of-health-v2",title:"Maps of Health #2",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis2.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"},{id:"vis6-maps-of-health-v3",title:"Maps of Health #3",description:"Marion County Encounters Over Time (2004 - 2018)",spec:"assets/pages/vis6-maps-of-health/vis3.vl.json",options:{renderer:"canvas",actions:!0,width:1268,viewClass:RG.withDataHandlers([FG])},content:"assets/pages/vis6-maps-of-health/README.md",sql:"assets/pages/vis6-maps-of-health/data.sql",csv:"assets/generated/visualization6/data.csv"}];let Uee=(()=>{let e=class V$ extends IG{ngxsOnInit(){this.setAll(jee)}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(V$)))(s||V$)}})();static#t=this.\u0275prov=Ue({token:V$,factory:V$.\u0275fac})};return e=Nn([f2(),rM({name:"visualizations"})],e),e})(),aue=(()=>{class e{constructor(t){this.service=t}resolve(t){const r=t.paramMap.get("id");return null===r?Hl:this.service.entities$.pipe(a$(r),Bo(1))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Uee))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Hee=DV();class cue{constructor(n,t){this._viewportRuler=n,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=Dr(-this._previousScrollPosition.left),n.style.top=Dr(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const n=this._document.documentElement,r=n.style,s=this._document.body.style,c=r.scrollBehavior||"",h=s.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),Hee&&(r.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Hee&&(r.scrollBehavior=c,s.scrollBehavior=h)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,r=this._viewportRuler.getViewportSize();return t.scrollHeight>r.height||t.scrollWidth>r.width}}class uue{constructor(n,t,r,s){this._scrollDispatcher=n,this._ngZone=t,this._viewportRuler=r,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(n){this._overlayRef=n}enable(){if(this._scrollSubscription)return;const n=this._scrollDispatcher.scrolled(0).pipe(ii(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class Wee{enable(){}disable(){}attach(){}}function PG(e,n){return n.some(t=>e.bottomt.bottom||e.rightt.right)}function qee(e,n){return n.some(t=>e.topt.bottom||e.leftt.right)}class due{constructor(n,t,r,s){this._scrollDispatcher=n,this._viewportRuler=t,this._ngZone=r,this._config=s,this._scrollSubscription=null}attach(n){this._overlayRef=n}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:s}=this._viewportRuler.getViewportSize();PG(t,[{width:r,height:s,bottom:s,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let fue=(()=>{class e{constructor(t,r,s,c){this._scrollDispatcher=t,this._viewportRuler=r,this._ngZone=s,this.noop=()=>new Wee,this.close=h=>new uue(this._scrollDispatcher,this._ngZone,this._viewportRuler,h),this.block=()=>new cue(this._viewportRuler,this._document),this.reposition=h=>new due(this._scrollDispatcher,this._viewportRuler,this._ngZone,h),this._document=c}static#e=this.\u0275fac=function(r){return new(r||e)(pe(hO),pe(pO),pe(Bt),pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class LG{constructor(n){if(this.scrollStrategy=new Wee,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,n){const t=Object.keys(n);for(const r of t)void 0!==n[r]&&(this[r]=n[r])}}}class hue{constructor(n,t){this.connectionPair=n,this.scrollableViewProperties=t}}let Gee=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const r=this._attachedOverlays.indexOf(t);r>-1&&this._attachedOverlays.splice(r,1),0===this._attachedOverlays.length&&this.detach()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pue=(()=>{class e extends Gee{constructor(t,r){super(t),this._ngZone=r,this._keydownListener=s=>{const c=this._attachedOverlays;for(let h=c.length-1;h>-1;h--)if(c[h]._keydownEvents.observers.length>0){const y=c[h]._keydownEvents;this._ngZone?this._ngZone.run(()=>y.next(s)):y.next(s);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(Bt,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mue=(()=>{class e extends Gee{constructor(t,r,s){super(t),this._platform=r,this._ngZone=s,this._cursorStyleIsSet=!1,this._pointerDownListener=c=>{this._pointerDownEventTarget=Am(c)},this._clickListener=c=>{const h=Am(c),y="click"===c.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:h;this._pointerDownEventTarget=null;const E=this._attachedOverlays.slice();for(let M=E.length-1;M>-1;M--){const R=E[M];if(R._outsidePointerEvents.observers.length<1||!R.hasAttached())continue;if(R.overlayElement.contains(h)||R.overlayElement.contains(y))break;const $=R._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>$.next(c)):$.next(c)}}}add(t){if(super.add(t),!this._isAttached){const r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(mi),pe(Xs),pe(Bt,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),m$=(()=>{class e{constructor(t,r){this._platform=r,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||QP()){const s=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let c=0;cthis._backdropClick.next($),this._backdropTransitionendHandler=$=>{this._disposeBackdrop($.target)},this._keydownEvents=new It,this._outsidePointerEvents=new It,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Bo(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const n=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){const n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,n&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config={...this._config,...n},this._updateElementSize()}setDirection(n){this._config={...this._config,direction:n},this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){const n=this._config.direction;return n?"string"==typeof n?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const n=this._pane.style;n.width=Dr(this._config.width),n.height=Dr(this._config.height),n.minWidth=Dr(this._config.minWidth),n.minHeight=Dr(this._config.minHeight),n.maxWidth=Dr(this._config.maxWidth),n.maxHeight=Dr(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){const n="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(n)})}):this._backdropElement.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const n=this._backdropElement;if(n){if(this._animationsDisabled)return void this._disposeBackdrop(n);n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{n.addEventListener("transitionend",this._backdropTransitionendHandler)}),n.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(n)},500))}}_toggleClasses(n,t,r){const s=o1(t||[]).filter(c=>!!c);s.length&&(r?n.classList.add(...s):n.classList.remove(...s))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const n=this._ngZone.onStable.pipe(Kn(Oh(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),n.unsubscribe())})})}_disposeScrollStrategy(){const n=this._scrollStrategy;n&&(n.disable(),n.detach&&n.detach())}_disposeBackdrop(n){n&&(n.removeEventListener("click",this._backdropClickHandler),n.removeEventListener("transitionend",this._backdropTransitionendHandler),n.remove(),this._backdropElement===n&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const Xee="cdk-overlay-connected-position-bounding-box",gue=/([A-Za-z%]+)$/;class _ue{get positions(){return this._preferredPositions}constructor(n,t,r,s,c){this._viewportRuler=t,this._document=r,this._platform=s,this._overlayContainer=c,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new It,this._resizeSubscription=xn.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(n)}attach(n){this._validatePositions(),n.hostElement.classList.add(Xee),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const n=this._originRect,t=this._overlayRect,r=this._viewportRect,s=this._containerRect,c=[];let h;for(let y of this._preferredPositions){let E=this._getOriginPoint(n,s,y),M=this._getOverlayPoint(E,t,y),R=this._getOverlayFit(M,t,r,y);if(R.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(y,E);this._canFitWithFlexibleDimensions(R,M,r)?c.push({position:y,origin:E,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(E,y)}):(!h||h.overlayFit.visibleAreaE&&(E=R,y=M)}return this._isPushed=!1,void this._applyPosition(y.position,y.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(h.position,h.originPoint);this._applyPosition(h.position,h.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&oM(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Xee),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,t)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,-1===n.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,t,r){let s,c;if("center"==r.originX)s=n.left+n.width/2;else{const h=this._isRtl()?n.right:n.left,y=this._isRtl()?n.left:n.right;s="start"==r.originX?h:y}return t.left<0&&(s-=t.left),c="center"==r.originY?n.top+n.height/2:"top"==r.originY?n.top:n.bottom,t.top<0&&(c-=t.top),{x:s,y:c}}_getOverlayPoint(n,t,r){let s,c;return s="center"==r.overlayX?-t.width/2:"start"===r.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,c="center"==r.overlayY?-t.height/2:"top"==r.overlayY?0:-t.height,{x:n.x+s,y:n.y+c}}_getOverlayFit(n,t,r,s){const c=Kee(t);let{x:h,y}=n,E=this._getOffset(s,"x"),M=this._getOffset(s,"y");E&&(h+=E),M&&(y+=M);let j=0-y,X=y+c.height-r.height,K=this._subtractOverflows(c.width,0-h,h+c.width-r.width),ie=this._subtractOverflows(c.height,j,X),me=K*ie;return{visibleArea:me,isCompletelyWithinViewport:c.width*c.height===me,fitsInViewportVertically:ie===c.height,fitsInViewportHorizontally:K==c.width}}_canFitWithFlexibleDimensions(n,t,r){if(this._hasFlexibleDimensions){const s=r.bottom-t.y,c=r.right-t.x,h=Yee(this._overlayRef.getConfig().minHeight),y=Yee(this._overlayRef.getConfig().minWidth);return(n.fitsInViewportVertically||null!=h&&h<=s)&&(n.fitsInViewportHorizontally||null!=y&&y<=c)}return!1}_pushOverlayOnScreen(n,t,r){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};const s=Kee(t),c=this._viewportRect,h=Math.max(n.x+s.width-c.width,0),y=Math.max(n.y+s.height-c.height,0),E=Math.max(c.top-r.top-n.y,0),M=Math.max(c.left-r.left-n.x,0);let R=0,$=0;return R=s.width<=c.width?M||-h:n.xK&&!this._isInitialRender&&!this._growAfterOpen&&(h=n.y-K/2)}if("end"===t.overlayX&&!s||"start"===t.overlayX&&s)j=r.width-n.x+this._viewportMargin,R=n.x-this._viewportMargin;else if("start"===t.overlayX&&!s||"end"===t.overlayX&&s)$=n.x,R=r.right-n.x;else{const X=Math.min(r.right-n.x+r.left,n.x),K=this._lastBoundingBoxSize.width;R=2*X,$=n.x-X,R>K&&!this._isInitialRender&&!this._growAfterOpen&&($=n.x-K/2)}return{top:h,left:$,bottom:y,right:j,width:R,height:c}}_setBoundingBoxStyles(n,t){const r=this._calculateBoundingBoxRect(n,t);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));const s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right=s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{const c=this._overlayRef.getConfig().maxHeight,h=this._overlayRef.getConfig().maxWidth;s.height=Dr(r.height),s.top=Dr(r.top),s.bottom=Dr(r.bottom),s.width=Dr(r.width),s.left=Dr(r.left),s.right=Dr(r.right),s.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",s.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",c&&(s.maxHeight=Dr(c)),h&&(s.maxWidth=Dr(h))}this._lastBoundingBoxSize=r,oM(this._boundingBox.style,s)}_resetBoundingBoxStyles(){oM(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){oM(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,t){const r={},s=this._hasExactPosition(),c=this._hasFlexibleDimensions,h=this._overlayRef.getConfig();if(s){const R=this._viewportRuler.getViewportScrollPosition();oM(r,this._getExactOverlayY(t,n,R)),oM(r,this._getExactOverlayX(t,n,R))}else r.position="static";let y="",E=this._getOffset(t,"x"),M=this._getOffset(t,"y");E&&(y+=`translateX(${E}px) `),M&&(y+=`translateY(${M}px)`),r.transform=y.trim(),h.maxHeight&&(s?r.maxHeight=Dr(h.maxHeight):c&&(r.maxHeight="")),h.maxWidth&&(s?r.maxWidth=Dr(h.maxWidth):c&&(r.maxWidth="")),oM(this._pane.style,r)}_getExactOverlayY(n,t,r){let s={top:"",bottom:""},c=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(c=this._pushOverlayOnScreen(c,this._overlayRect,r)),"bottom"===n.overlayY?s.bottom=this._document.documentElement.clientHeight-(c.y+this._overlayRect.height)+"px":s.top=Dr(c.y),s}_getExactOverlayX(n,t,r){let h,s={left:"",right:""},c=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(c=this._pushOverlayOnScreen(c,this._overlayRect,r)),h=this._isRtl()?"end"===n.overlayX?"left":"right":"end"===n.overlayX?"right":"left","right"===h?s.right=this._document.documentElement.clientWidth-(c.x+this._overlayRect.width)+"px":s.left=Dr(c.x),s}_getScrollVisibility(){const n=this._getOriginRect(),t=this._pane.getBoundingClientRect(),r=this._scrollables.map(s=>s.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:qee(n,r),isOriginOutsideView:PG(n,r),isOverlayClipped:qee(t,r),isOverlayOutsideView:PG(t,r)}}_subtractOverflows(n,...t){return t.reduce((r,s)=>r-Math.max(s,0),n)}_getNarrowedViewportRect(){const n=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+n-this._viewportMargin,bottom:r.top+t-this._viewportMargin,width:n-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,t){return"x"===t?null==n.offsetX?this._offsetX:n.offsetX:null==n.offsetY?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&o1(n).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){const n=this._origin;if(n instanceof zn)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();const t=n.width||0,r=n.height||0;return{top:n.y,bottom:n.y+r,left:n.x,right:n.x+t,height:r,width:t}}}function oM(e,n){for(let t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function Yee(e){if("number"!=typeof e&&null!=e){const[n,t]=e.split(gue);return t&&"px"!==t?null:parseFloat(n)}return e||null}function Kee(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const Zee="cdk-global-overlay-wrapper";class yue{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(n){const t=n.getConfig();this._overlayRef=n,this._width&&!t.width&&n.updateSize({width:this._width}),this._height&&!t.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(Zee),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:s,height:c,maxWidth:h,maxHeight:y}=r,E=!("100%"!==s&&"100vw"!==s||h&&"100%"!==h&&"100vw"!==h),M=!("100%"!==c&&"100vh"!==c||y&&"100%"!==y&&"100vh"!==y),R=this._xPosition,$=this._xOffset,j="rtl"===this._overlayRef.getConfig().direction;let X="",K="",ie="";E?ie="flex-start":"center"===R?(ie="center",j?K=$:X=$):j?"left"===R||"end"===R?(ie="flex-end",X=$):("right"===R||"start"===R)&&(ie="flex-start",K=$):"left"===R||"start"===R?(ie="flex-start",X=$):("right"===R||"end"===R)&&(ie="flex-end",K=$),n.position=this._cssPosition,n.marginLeft=E?"0":X,n.marginTop=M?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=E?"0":K,t.justifyContent=ie,t.alignItems=M?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,r=t.style;t.classList.remove(Zee),r.justifyContent=r.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}}let bue=(()=>{class e{constructor(t,r,s,c){this._viewportRuler=t,this._document=r,this._platform=s,this._overlayContainer=c}global(){return new yue}flexibleConnectedTo(t){return new _ue(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(pO),pe(mi),pe(Xs),pe(m$))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),vue=0,Bh=(()=>{class e{constructor(t,r,s,c,h,y,E,M,R,$,j,X){this.scrollStrategies=t,this._overlayContainer=r,this._componentFactoryResolver=s,this._positionBuilder=c,this._keyboardDispatcher=h,this._injector=y,this._ngZone=E,this._document=M,this._directionality=R,this._location=$,this._outsideClickDispatcher=j,this._animationsModuleType=X}create(t){const r=this._createHostElement(),s=this._createPaneElement(r),c=this._createPortalOutlet(s),h=new LG(t);return h.direction=h.direction||this._directionality.value,new eU(c,r,s,h,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const r=this._document.createElement("div");return r.id="cdk-overlay-"+vue++,r.classList.add("cdk-overlay-pane"),t.appendChild(r),r}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(Kb)),new Cae(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(fue),pe(m$),pe(Ag),pe(bue),pe(pue),pe(hr),pe(Bt),pe(mi),pe(rd),pe(mm),pe(mue),pe(Ko,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const xue=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Qee=new $e("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.reposition()}});let $G=(()=>{class e{constructor(t){this.elementRef=t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}return e})(),Jee=(()=>{class e{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,r,s,c,h){this._overlay=t,this._dir=h,this._backdropSubscription=xn.EMPTY,this._attachSubscription=xn.EMPTY,this._detachSubscription=xn.EMPTY,this._positionSubscription=xn.EMPTY,this._disposeOnNavigation=!1,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new cn,this.positionChange=new cn,this.attach=new cn,this.detach=new cn,this.overlayKeydown=new cn,this.overlayOutsideClick=new cn,this._templatePortal=new B4(r,s),this._scrollStrategyFactory=c,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=xue);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),27===r.keyCode&&!this.disableClose&&!kh(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{this.overlayOutsideClick.next(r)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),r=new LG({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||0===this.width)&&(r.width=this.width),(this.height||0===this.height)&&(r.height=this.height),(this.minWidth||0===this.minWidth)&&(r.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(t){const r=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof $G?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function lue(e,n=!1){return be((t,r)=>{let s=0;t.subscribe(Se(r,c=>{const h=e(c,s++);(h||n)&&r.next(c),!h&&r.complete()}))})}(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Bh),ue(Yu),ue(Jo),ue(Qee),ue(rd,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[ht.None,"cdkConnectedOverlayOrigin","origin"],positions:[ht.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[ht.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[ht.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[ht.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[ht.None,"cdkConnectedOverlayWidth","width"],height:[ht.None,"cdkConnectedOverlayHeight","height"],minWidth:[ht.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[ht.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[ht.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[ht.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[ht.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[ht.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[ht.None,"cdkConnectedOverlayOpen","open"],disableClose:[ht.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[ht.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",cr],lockPosition:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",cr],flexibleDimensions:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",cr],growAfterOpen:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",cr],push:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",cr],disposeOnNavigation:[ht.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",cr]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[Vs,vo]})}return e})();const Eue={provide:Qee,deps:[Bh],useFactory:function wue(e){return()=>e.scrollStrategies.reposition()}};let BG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[Bh,Eue],imports:[ED,s$,RV,RV]})}return e})();function Cue(e,n){}class tU{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let ete=(()=>{class e extends oG{constructor(t,r,s,c,h,y,E,M){super(),this._elementRef=t,this._focusTrapFactory=r,this._config=c,this._interactivityChecker=h,this._ngZone=y,this._overlayRef=E,this._focusMonitor=M,this._platform=Xe(Xs),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=Xe(Qo),this.attachDomPortal=R=>{this._portalOutlet.hasAttached();const $=this._portalOutlet.attachDomPortal(R);return this._contentAttached(),$},this._document=s,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const r=this._ariaLabelledByQueue.indexOf(t);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const r=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),r}attachTemplatePortal(t){this._portalOutlet.hasAttached();const r=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,r){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const s=()=>{t.removeEventListener("blur",s),t.removeEventListener("mousedown",s),t.removeAttribute("tabindex")};t.addEventListener("blur",s),t.addEventListener("mousedown",s)})),t.focus(r)}_focusByCssSelector(t,r){let s=this._elementRef.nativeElement.querySelector(t);s&&this._forceFocus(s,r)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(r=>{r||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let r=null;if("string"==typeof t?r=this._document.querySelector(t):"boolean"==typeof t?r=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(r=t),this._config.restoreFocus&&r&&"function"==typeof r.focus){const s=wD(),c=this._elementRef.nativeElement;(!s||s===this._document.body||s===c||c.contains(s))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,r=wD();return t===r||t.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=wD()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(mi,8),ue(tU),ue(h1),ue(Bt),ue(eU),ue(k_))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,s){if(1&r&&ha(z4,7),2&r){let c;zi(c=Pi())&&(s._portalOutlet=c.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,s){2&r&&hi("id",s._config.id||null)("role",s._config.role)("aria-modal",s._config.ariaModal)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null)},standalone:!0,features:[wn,xi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,s){1&r&&en(0,Cue,0,0,"ng-template",0)},dependencies:[z4],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return e})();class zG{constructor(n,t){this.overlayRef=n,this.config=t,this.closed=new It,this.disableClose=t.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(r=>{27===r.keyCode&&!this.disableClose&&!kh(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=n.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(n,t){if(this.containerInstance){const r=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(n),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",t=""){return this.overlayRef.updateSize({width:n,height:t}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}}const tte=new $e("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.block()}}),Sue=new $e("DialogData"),Due=new $e("DefaultDialogConfig");let Aue=0,nte=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,r,s,c,h,y){this._overlay=t,this._injector=r,this._defaultOptions=s,this._parentDialog=c,this._overlayContainer=h,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new It,this._afterOpenedAtThisLevel=new It,this._ariaHiddenElements=new Map,this.afterAllClosed=qL(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wl(void 0))),this._scrollStrategy=y}open(t,r){(r={...this._defaultOptions||new tU,...r}).id=r.id||"cdk-dialog-"+Aue++,r.id&&this.getDialogById(r.id);const c=this._getOverlayConfig(r),h=this._overlay.create(c),y=new zG(h,r),E=this._attachContainer(h,y,r);return y.containerInstance=E,this._attachDialogContent(t,y,E,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(y),y.closed.subscribe(()=>this._removeOpenDialog(y,!0)),this.afterOpened.next(y),y}closeAll(){VG(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(r=>r.id===t)}ngOnDestroy(){VG(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),VG(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const r=new LG({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(r.backdropClass=t.backdropClass),r}_attachContainer(t,r,s){const c=s.injector||s.viewContainerRef?.injector,h=[{provide:tU,useValue:s},{provide:zG,useValue:r},{provide:eU,useValue:t}];let y;s.container?"function"==typeof s.container?y=s.container:(y=s.container.type,h.push(...s.container.providers(s))):y=ete;const E=new rG(y,s.viewContainerRef,hr.create({parent:c||this._injector,providers:h}),s.componentFactoryResolver);return t.attach(E).instance}_attachDialogContent(t,r,s,c){if(t instanceof Yu){const h=this._createInjector(c,r,s,void 0);let y={$implicit:c.data,dialogRef:r};c.templateContext&&(y={...y,..."function"==typeof c.templateContext?c.templateContext():c.templateContext}),s.attachTemplatePortal(new B4(t,null,y,h))}else{const h=this._createInjector(c,r,s,this._injector),y=s.attachComponentPortal(new rG(t,c.viewContainerRef,h,c.componentFactoryResolver));r.componentRef=y,r.componentInstance=y.instance}}_createInjector(t,r,s,c){const h=t.injector||t.viewContainerRef?.injector,y=[{provide:Sue,useValue:t.data},{provide:zG,useValue:r}];return t.providers&&("function"==typeof t.providers?y.push(...t.providers(r,t,s)):y.push(...t.providers)),t.direction&&(!h||!h.get(rd,null,{optional:!0}))&&y.push({provide:rd,useValue:{value:t.direction,change:zt()}}),hr.create({parent:h||c,providers:y})}_removeOpenDialog(t,r){const s=this.openDialogs.indexOf(t);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((c,h)=>{c?h.setAttribute("aria-hidden",c):h.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const r=t.parentElement.children;for(let s=r.length-1;s>-1;s--){const c=r[s];c!==t&&"SCRIPT"!==c.nodeName&&"STYLE"!==c.nodeName&&!c.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(c,c.getAttribute("aria-hidden")),c.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bh),pe(hr),pe(Due,8),pe(e,12),pe(m$),pe(tte))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function VG(e,n){let t=e.length;for(;t--;)n(e[t])}let Tue=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[nte],imports:[BG,s$,Q9,s$]})}return e})();function kue(e,n){}class jG{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const UG="mdc-dialog--open",ite="mdc-dialog--opening",rte="mdc-dialog--closing";let ote=(()=>{class e extends ete{constructor(t,r,s,c,h,y,E,M,R){super(t,r,s,c,h,y,E,R),this._animationMode=M,this._animationStateChanged=new cn,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?ate(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?ate(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(ste,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(ite,UG)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(UG),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(UG),this._animationsEnabled?(this._hostElement.style.setProperty(ste,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(rte)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(ite,rte)}_waitForAnimationToComplete(t,r){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const r=super.attachComponentPortal(t);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(CO),ue(mi,8),ue(jG),ue(h1),ue(Bt),ue(eU),ue(Ko,8),ue(k_))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(r,s){2&r&&(Vb("id",s._config.id),hi("aria-modal",s._config.ariaModal)("role",s._config.role)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null),In("_mat-animation-noopable",!s._animationsEnabled))},standalone:!0,features:[wn,xi],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1),en(2,kue,0,0,"ng-template",2),ke()())},dependencies:[z4],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0;transform:scale(0.8)}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--closing .mdc-dialog__surface{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{opacity:1}.mdc-dialog--open .mdc-dialog__surface{transform:none}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{width:100%;height:100%}.mat-mdc-dialog-component-host{display:contents}.mat-mdc-dialog-container{--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition:opacity linear var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container .mdc-dialog__surface{transition:transform var(--mat-dialog-transition-duration, 0ms) 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container,.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__surface{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2})}return e})();const ste="--mat-dialog-transition-duration";function ate(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?r1(e.substring(0,e.length-2)):e.endsWith("s")?1e3*r1(e.substring(0,e.length-1)):"0"===e?0:null}var nU=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}(nU||{});class g${constructor(n,t,r){this._ref=n,this._containerInstance=r,this._afterOpened=new It,this._beforeClosed=new It,this._state=nU.OPEN,this.disableClose=t.disableClose,this.id=n.id,r._animationStateChanged.pipe(ii(s=>"opened"===s.state),Bo(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),r._animationStateChanged.pipe(ii(s=>"closed"===s.state),Bo(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Oh(this.backdropClick(),this.keydownEvents().pipe(ii(s=>27===s.keyCode&&!this.disableClose&&!kh(s)))).subscribe(s=>{this.disableClose||(s.preventDefault(),lte(this,"keydown"===s.type?"keyboard":"mouse"))})}close(n){this._result=n,this._containerInstance._animationStateChanged.pipe(ii(t=>"closing"===t.state),Bo(1)).subscribe(t=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=nU.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let t=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?t.left(n.left):t.right(n.right):t.centerHorizontally(),n&&(n.top||n.bottom)?n.top?t.top(n.top):t.bottom(n.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",t=""){return this._ref.updateSize(n,t),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=nU.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function lte(e,n,t){return e._closeInteractionType=n,e.close(t)}const cte=new $e("MatMdcDialogData"),Rue=new $e("mat-mdc-dialog-default-options"),ute=new $e("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.block()}});let Fue=0,_$=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,r,s,c,h,y,E,M){this._overlay=t,this._defaultOptions=c,this._scrollStrategy=h,this._parentDialog=y,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new It,this._afterOpenedAtThisLevel=new It,this.dialogConfigClass=jG,this.afterAllClosed=qL(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Wl(void 0))),this._dialog=r.get(nte),this._dialogRefConstructor=g$,this._dialogContainerType=ote,this._dialogDataToken=cte}open(t,r){let s;(r={...this._defaultOptions||new jG,...r}).id=r.id||"mat-mdc-dialog-"+Fue++,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();const c=this._dialog.open(t,{...r,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:tU,useValue:r}]},templateContext:()=>({dialogRef:s}),providers:(h,y,E)=>(s=new this._dialogRefConstructor(h,r,E),s.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:E},{provide:this._dialogDataToken,useValue:y.data},{provide:this._dialogRefConstructor,useValue:s}])});return s.componentRef=c.componentRef,s.componentInstance=c.componentInstance,this.openDialogs.push(s),this.afterOpened.next(s),s.afterClosed().subscribe(()=>{const h=this.openDialogs.indexOf(s);h>-1&&(this.openDialogs.splice(h,1),this.openDialogs.length||this._getAfterAllClosed().next())}),s}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(r=>r.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let r=t.length;for(;r--;)t[r].close()}static#e=this.\u0275fac=function(r){return new(r||e)(pe(Bh),pe(hr),pe(mm,8),pe(Rue,8),pe(ute),pe(e,12),pe(m$),pe(Ko,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Pue=0,dte=(()=>{class e{constructor(t,r,s){this.dialogRef=t,this._elementRef=r,this._dialog=s,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=fte(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const r=t._matDialogClose||t._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(t){lte(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$,8),ue(zn),ue(_$))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,s){1&r&&yn("click",function(h){return s._onButtonClick(h)}),2&r&&hi("aria-label",s.ariaLabel||null)("type",s.type)},inputs:{ariaLabel:[ht.None,"aria-label","ariaLabel"],type:"type",dialogResult:[ht.None,"mat-dialog-close","dialogResult"],_matDialogClose:[ht.None,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[vo]})}return e})(),iU=(()=>{class e{constructor(t,r,s){this._dialogRef=t,this._elementRef=r,this._dialog=s,this.id="mat-mdc-dialog-title-"+Pue++}ngOnInit(){this._dialogRef||(this._dialogRef=fte(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)})}ngOnDestroy(){const t=this._dialogRef?._containerInstance;t&&Promise.resolve().then(()=>{t._removeAriaLabelledBy?.(this.id)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$,8),ue(zn),ue(_$))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,s){2&r&&Vb("id",s.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0})}return e})(),rU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0})}return e})();function fte(e,n){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?n.find(r=>r.id===t.id):null}let HG=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[_$],imports:[Tue,BG,s$,rs,rs]})}return e})();const $ue=["*"];let oU;function y$(e){return function Bue(){if(void 0===oU&&(oU=null,typeof window<"u")){const e=window;void 0!==e.trustedTypes&&(oU=e.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return oU}()?.createHTML(e)||e}function pte(e){return Error(`Unable to find icon with the name "${e}"`)}function mte(e){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${e}".`)}function gte(e){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${e}".`)}class sM{constructor(n,t,r){this.url=n,this.svgText=t,this.options=r}}let b$=(()=>{class e{constructor(t,r,s,c){this._httpClient=t,this._sanitizer=r,this._errorHandler=c,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=s}addSvgIcon(t,r,s){return this.addSvgIconInNamespace("",t,r,s)}addSvgIconLiteral(t,r,s){return this.addSvgIconLiteralInNamespace("",t,r,s)}addSvgIconInNamespace(t,r,s,c){return this._addSvgIconConfig(t,r,new sM(s,null,c))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,r,s,c){const h=this._sanitizer.sanitize(Ro.HTML,s);if(!h)throw gte(s);const y=y$(h);return this._addSvgIconConfig(t,r,new sM("",y,c))}addSvgIconSet(t,r){return this.addSvgIconSetInNamespace("",t,r)}addSvgIconSetLiteral(t,r){return this.addSvgIconSetLiteralInNamespace("",t,r)}addSvgIconSetInNamespace(t,r,s){return this._addSvgIconSetConfig(t,new sM(r,null,s))}addSvgIconSetLiteralInNamespace(t,r,s){const c=this._sanitizer.sanitize(Ro.HTML,r);if(!c)throw gte(r);const h=y$(c);return this._addSvgIconSetConfig(t,new sM("",h,s))}registerFontClassAlias(t,r=t){return this._fontCssClassesByAlias.set(t,r),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const r=this._sanitizer.sanitize(Ro.RESOURCE_URL,t);if(!r)throw mte(t);const s=this._cachedIconsByUrl.get(r);return s?zt(sU(s)):this._loadSvgIconFromConfig(new sM(t,null)).pipe(Do(c=>this._cachedIconsByUrl.set(r,c)),ye(c=>sU(c)))}getNamedSvgIcon(t,r=""){const s=_te(r,t);let c=this._svgIconConfigs.get(s);if(c)return this._getSvgFromConfig(c);if(c=this._getIconConfigFromResolvers(r,t),c)return this._svgIconConfigs.set(s,c),this._getSvgFromConfig(c);const h=this._iconSetConfigs.get(r);return h?this._getSvgFromIconSetConfigs(t,h):C1(pte(s))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?zt(sU(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(ye(r=>sU(r)))}_getSvgFromIconSetConfigs(t,r){const s=this._extractIconWithNameFromAnySet(t,r);return s?zt(s):c$(r.filter(h=>!h.svgText).map(h=>this._loadSvgIconSetFromConfig(h).pipe(Sf(y=>{const M=`Loading icon set URL: ${this._sanitizer.sanitize(Ro.RESOURCE_URL,h.url)} failed: ${y.message}`;return this._errorHandler.handleError(new Error(M)),zt(null)})))).pipe(ye(()=>{const h=this._extractIconWithNameFromAnySet(t,r);if(!h)throw pte(t);return h}))}_extractIconWithNameFromAnySet(t,r){for(let s=r.length-1;s>=0;s--){const c=r[s];if(c.svgText&&c.svgText.toString().indexOf(t)>-1){const h=this._svgElementFromConfig(c),y=this._extractSvgIconFromSet(h,t,c.options);if(y)return y}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Do(r=>t.svgText=r),ye(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?zt(null):this._fetchIcon(t).pipe(Do(r=>t.svgText=r))}_extractSvgIconFromSet(t,r,s){const c=t.querySelector(`[id="${r}"]`);if(!c)return null;const h=c.cloneNode(!0);if(h.removeAttribute("id"),"svg"===h.nodeName.toLowerCase())return this._setSvgAttributes(h,s);if("symbol"===h.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(h),s);const y=this._svgElementFromString(y$(""));return y.appendChild(h),this._setSvgAttributes(y,s)}_svgElementFromString(t){const r=this._document.createElement("DIV");r.innerHTML=t;const s=r.querySelector("svg");if(!s)throw Error(" tag not found");return s}_toSvgElement(t){const r=this._svgElementFromString(y$("")),s=t.attributes;for(let c=0;cy$(M)),nd(()=>this._inProgressUrlFetches.delete(h)),oe());return this._inProgressUrlFetches.set(h,E),E}_addSvgIconConfig(t,r,s){return this._svgIconConfigs.set(_te(t,r),s),this}_addSvgIconSetConfig(t,r){const s=this._iconSetConfigs.get(t);return s?s.push(r):this._iconSetConfigs.set(t,[r]),this}_svgElementFromConfig(t){if(!t.svgElement){const r=this._svgElementFromString(t.svgText);this._setSvgAttributes(r,t.options),t.svgElement=r}return t.svgElement}_getIconConfigFromResolvers(t,r){for(let s=0;sn?n.pathname+n.search:""}}}),yte=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],que=yte.map(e=>`[${e}]`).join(", "),Gue=/^url\(['"]?#(.*?)['"]?\)$/;let v$=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const r=this._cleanupFontValue(t);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const r=this._cleanupFontValue(t);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(t,r,s,c,h,y){this._elementRef=t,this._iconRegistry=r,this._location=c,this._errorHandler=h,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=xn.EMPTY,y&&(y.color&&(this.color=this._defaultColor=y.color),y.fontSet&&(this.fontSet=y.fontSet)),s||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const r=t.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let r=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){const s=t.childNodes[r];(1!==s.nodeType||"svg"===s.nodeName.toLowerCase())&&s.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(s=>s.length>0);this._previousFontSetClass.forEach(s=>t.classList.remove(s)),r.forEach(s=>t.classList.add(s)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const r=this._elementsWithExternalReferences;r&&r.forEach((s,c)=>{s.forEach(h=>{c.setAttribute(h.name,`url('${t}#${h.value}')`)})})}_cacheChildrenWithExternalReferences(t){const r=t.querySelectorAll(que),s=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let c=0;c{const y=r[c],E=y.getAttribute(h),M=E?E.match(Gue):null;if(M){let R=s.get(y);R||(R=[],s.set(y,R)),R.push({name:h,value:M[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[r,s]=this._splitIconName(t);r&&(this._svgNamespace=r),s&&(this._svgName=s),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(s,r).pipe(Bo(1)).subscribe(c=>this._setSvgElement(c),c=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${r}:${s}! ${c.message}`))})}}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(b$),Hc("aria-hidden"),ue(Hue),ue(nl),ue(Uue,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,s){2&r&&(hi("data-mat-icon-type",s._usingFontIcon()?"font":"svg")("data-mat-icon-name",s._svgName||s.fontIcon)("data-mat-icon-namespace",s._svgNamespace||s.fontSet)("fontIcon",s._usingFontIcon()?s.fontIcon:null),wo(s.color?"mat-"+s.color:""),In("mat-icon-inline",s.inline)("mat-icon-no-color","primary"!==s.color&&"accent"!==s.color&&"warn"!==s.color))},inputs:{color:"color",inline:[ht.HasDecoratorInputTransform,"inline","inline",cr],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[Vs,xi],ngContentSelectors:$ue,decls:1,vars:0,template:function(r,s){1&r&&(Ra(),ki(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}return e})(),h2=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),Xue=(()=>{class e{constructor(t){this.dialogRef=t}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-help-modal"]],decls:42,vars:0,consts:[[1,"agc-about","wrapper"],[1,"container"],[1,"close"],[1,"material-icons","close-icon",3,"click"],[1,"content"],["mat-dialog-title","",1,"title"],[1,"mat-typography"],[1,"help-title"],[1,"help-text"],[1,"gif-container"],["src","assets/images/help-year-range-selector.gif","alt","help-year-range-selector.gif"],["src","assets/images/help-variables-filterby3.gif","alt","help-variables-filterby3.gif"],["src","assets/images/help-filter-controls.gif","alt","help-filter-controls.gif"],["src","assets/images/help-pan-zoom.gif","alt","help-pan-zoom.gif"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon",3),yn("click",function(){return s.close()}),wt(4,"clear"),ke()(),Ae(5,"div",4)(6,"h2",5),wt(7,"Help"),ke(),Ae(8,"mat-dialog-content",6)(9,"mat-accordion")(10,"mat-expansion-panel")(11,"mat-expansion-panel-header")(12,"mat-panel-title",7),wt(13,"SELECT YEAR RANGE"),ke()(),Ae(14,"div",8),wt(15," Set year ranges by clicking with your mouse cursor then dragging and releasing. Click again to reset. "),ke(),Ae(16,"div",9),Wt(17,"img",10),ke()(),Ae(18,"mat-expansion-panel")(19,"mat-expansion-panel-header")(20,"mat-panel-title",7),wt(21,"SELECT VARIABLES & FILTERS"),ke()(),Ae(22,"div",8),wt(23," Click on Variables and filter by items. SHIFT + CLICK to add more items. "),ke(),Ae(24,"div",9),Wt(25,"img",11),ke()(),Ae(26,"mat-expansion-panel")(27,"mat-expansion-panel-header")(28,"mat-panel-title",7),wt(29,"USE CONTROLS TO FILTER"),ke()(),Ae(30,"div",8),wt(31," Click on controls to update visualizations. Use SHIFT + CLICK to add more items. "),ke(),Ae(32,"div",9),Wt(33,"img",12),ke()(),Ae(34,"mat-expansion-panel")(35,"mat-expansion-panel-header")(36,"mat-panel-title",7),wt(37,"PAN AND ZOOM"),ke()(),Ae(38,"div",8),wt(39," Hold down SHIFT key then use the scroll-wheel to zoom. SHIFT + CLICK (Hold) to pan. "),ke(),Ae(40,"div",9),Wt(41,"img",13),ke()()()()()()())},dependencies:[iU,rU,v$,lG,V4,j4,aG],styles:["mat-dialog-container{padding:0;overflow:hidden} .mat-expansion-panel-header{background-color:#fafafa}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:2rem;min-height:43rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{padding:1rem 1.5rem;margin:0 -24px;overflow:hidden;font-family:inherit;line-height:inherit;letter-spacing:inherit;font-size:inherit;color:inherit}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .help-title[_ngcontent-%COMP%]{font-weight:700;font-size:.875rem;line-height:1.5rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .help-text[_ngcontent-%COMP%]{font-size:1rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%] .gif-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:2rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{float:right;margin-top:1rem;margin-right:1rem;cursor:pointer}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:2.25rem;margin-bottom:.5rem;text-align:left;font-weight:lighter;font-family:inherit;letter-spacing:normal;color:inherit;padding:0;line-height:2rem}.agc-about.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]:before{height:inherit}"]})}return e})();function Yue(e,n){if(1&e){const t=Oa();Ae(0,"div",17),yn("click",function(){const c=hs(t).index;return so(on().setSlide(c))}),ke()}if(2&e){const t=n.index;In("active",on().currentSlide===t)}}let Kue=(()=>{class e{constructor(t){this.dialogRef=t,this.slides=[{title:"Select year range...",text:"Set year ranges by clicking with your mouse cursor then dragging and releasing. Click again to reset.",img:"assets/images/help-year-range-selector.gif"},{title:"Select variables and filters...",text:"Click on Variables and filter by items. SHIFT + CLICK to add more items.",img:"assets/images/help-variables-filterby3.gif"},{title:"Use controls to filter...",text:"Click on controls to update visualizations. Use SHIFT + CLICK to add more items.",img:"assets/images/help-filter-controls.gif"},{title:"Pan and zoom...",text:"Hold down SHIFT key then use the scroll-wheel to zoom. SHIFT + CLICK (Hold) to pan.",img:"assets/images/help-pan-zoom.gif"}],this.currentSlide=0}close(){this.dialogRef.close()}incrementSlide(){this.currentSlide!==this.slides.length-1&&(this.currentSlide=this.currentSlide+1)}decrementSlide(){0!==this.currentSlide&&(this.currentSlide=this.currentSlide-1)}setSlide(t){t<0||t>=this.slides.length||(this.currentSlide=t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(g$))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-help-tour-modal"]],decls:24,vars:9,consts:[[1,"agc-tour","wrapper"],[1,"container"],[1,"close"],[1,"material-icons","close-icon",3,"click"],[1,"content"],["mat-dialog-title","",1,"title"],[1,"mat-typography"],[1,"help-text"],[1,"carousel"],[1,"material-icons","chevron-icon",3,"click"],[1,"gif-container"],[3,"src","alt"],[1,"slide-row"],[1,"slide-dots"],["class","slide",3,"active","click",4,"ngFor","ngForOf"],[1,"button-row"],[1,"btn-outline",3,"click"],[1,"slide",3,"click"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon",3),yn("click",function(){return s.close()}),wt(4,"clear"),ke()(),Ae(5,"div",4)(6,"h2",5),wt(7),ke(),Ae(8,"mat-dialog-content",6)(9,"div",7),wt(10),ke(),Ae(11,"div",8)(12,"mat-icon",9),yn("click",function(){return s.decrementSlide()}),wt(13,"chevron_left"),ke(),Ae(14,"div",10),Wt(15,"img",11),ke(),Ae(16,"mat-icon",9),yn("click",function(){return s.incrementSlide()}),wt(17,"chevron_right"),ke()(),Ae(18,"div",12)(19,"div",13),en(20,Yue,1,2,"div",14),ke()(),Ae(21,"div",15)(22,"button",16),yn("click",function(){return s.close()}),wt(23,"Got it!"),ke()()()()()()),2&r&&(Ze(7),Pr(s.slides[s.currentSlide].title),Ze(3),Pr(s.slides[s.currentSlide].text),Ze(2),In("disabled",0===s.currentSlide),Ze(3),vt("src",s.slides[s.currentSlide].img,jd)("alt",s.slides[s.currentSlide].img.split("/")[6]),Ze(),In("disabled",s.currentSlide===s.slides.length-1),Ze(4),vt("ngForOf",s.slides))},dependencies:[o0,iU,rU,v$],styles:["mat-dialog-container{padding:0;overflow:hidden} .mat-expansion-panel-header{background-color:#fafafa}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{overflow:hidden;font-family:inherit;line-height:inherit;letter-spacing:inherit;font-size:inherit;color:inherit;padding:1rem 0}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{float:right;margin-top:1rem;margin-right:1rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:2.25rem;margin-bottom:.5rem;text-align:left;font-weight:lighter;font-family:inherit;letter-spacing:normal;color:inherit;padding:0;line-height:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]:before{height:inherit}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .help-text[_ngcontent-%COMP%]{font-size:1rem}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .gif-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:2rem}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{font-size:4rem;height:4rem;width:4rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%] .chevron-icon.disabled[_ngcontent-%COMP%]{color:#d3d3d3}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%]{justify-content:space-around;display:flex}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center;width:9rem}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%]{width:1rem;height:1rem;border-radius:50%;border:1px solid darkgray;background-color:#fff;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .slide-row[_ngcontent-%COMP%] .slide-dots[_ngcontent-%COMP%] .slide.active[_ngcontent-%COMP%]{background-color:#2a4d87}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%]{justify-content:flex-end;display:flex}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%] .btn-outline[_ngcontent-%COMP%]{border-radius:5px;border:1px solid #6880aa;color:#6880aa;background-color:#fff;width:9rem;height:2.5rem;font-size:1rem;cursor:pointer}.agc-tour.wrapper[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%] .btn-outline[_ngcontent-%COMP%]:hover{background-color:#6880aa;color:#fff}"],changeDetection:0})}return e})();const bte="HELP_POPUP_SHOWN";let vte=(()=>{let e=class j$ extends OG{get hasShownHelpModal$(){return this.state$.pipe(a$("hasShownHelpModal"))}ngxsOnInit(){super.ngxsOnInit();const t="true"===localStorage.getItem(bte)?.toLowerCase();this.patchState({hasShownHelpModal:t})}setHasShownHelpModal(t){localStorage.setItem(bte,t.toString()),this.ctx.patchState({hasShownHelpModal:t})}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(j$)))(s||j$)}})();static#t=this.\u0275prov=Ue({token:j$,factory:j$.\u0275fac})};return Nn([Fm()],e.prototype,"hasShownHelpModal$",null),Nn([Qs()],e.prototype,"setHasShownHelpModal",null),e=Nn([f2(),rM({name:"page",defaults:{hasShownHelpModal:!1}})],e),e})();const Zue=["mat-button",""],Que=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],Jue=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],tde=["mat-icon-button",""],nde=["*"],ide=new $e("MAT_BUTTON_CONFIG"),rde=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let xte=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,r,s,c){this._elementRef=t,this._platform=r,this._ngZone=s,this._animationMode=c,this._focusMonitor=Xe(k_),this._rippleLoader=Xe(bf),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const h=Xe(ide,{optional:!0}),y=t.nativeElement,E=y.classList;this.disabledInteractive=h?.disabledInteractive??!1,this._rippleLoader?.configureRipple(y,{className:"mat-mdc-button-ripple"});for(const{attribute:M,mdcClasses:R}of rde)y.hasAttribute(M)&&E.add(...R)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",r){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static#e=this.\u0275fac=function(r){Og()};static#t=this.\u0275dir=Vt({type:e,inputs:{color:"color",disableRipple:[ht.HasDecoratorInputTransform,"disableRipple","disableRipple",cr],disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr],ariaDisabled:[ht.HasDecoratorInputTransform,"aria-disabled","ariaDisabled",cr],disabledInteractive:[ht.HasDecoratorInputTransform,"disabledInteractive","disabledInteractive",cr]},features:[Vs]})}return e})(),wte=(()=>{class e extends xte{constructor(t,r,s,c){super(t,r,s,c)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Xs),ue(Bt),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,s){2&r&&(hi("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),wo(s.color?"mat-"+s.color:""),In("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[wn,xi],attrs:Zue,ngContentSelectors:Jue,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){1&r&&(Ra(Que),Wt(0,"span",0),ki(1),Ae(2,"span",1),ki(3,1),ke(),ki(4,2),Wt(5,"span",2)(6,"span",3)),2&r&&In("mdc-button__ripple",!s._isFab)("mdc-fab__ripple",s._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),Ete=(()=>{class e extends xte{constructor(t,r,s,c){super(t,r,s,c),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Xs),ue(Bt),ue(Ko,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,s){2&r&&(hi("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),wo(s.color?"mat-"+s.color:""),In("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===s._animationMode)("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[wn,xi],attrs:tde,ngContentSelectors:nde,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){1&r&&(Ra(),Wt(0,"span",0),ki(1),Wt(2,"span",1)(3,"span",2))},styles:['.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size);width:var(--mdc-icon-button-state-layer-size);color:var(--mdc-icon-button-icon-color)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button{padding:12px;border-radius:50%;flex-shrink:0;text-align:center;font-size:var(--mdc-icon-button-icon-size);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),x$=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,mL,rs]})}return e})();var sde=tn(563);function w$(){return Sr(Wi)}var ade=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var c in s)s.hasOwnProperty(c)&&(r[c]=s[c])})(n,t)};return function(n,t){function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),lde=Object.prototype.hasOwnProperty;function aU(e,n){return lde.call(e,n)}function WG(e){if(Array.isArray(e)){for(var n=new Array(e.length),t=0;t=48&&r<=57))return!1;n++}return!0}function U0(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Cte(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function GG(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var n=0,t=e.length;n0&&"constructor"==E[R-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(t&&void 0===j&&(void 0===M[X]?j=E.slice(0,R).join("/"):R==$-1&&(j=n.path),void 0!==j&&K(n,0,e,j)),R++,Array.isArray(M)){if("-"===X)X=M.length;else{if(t&&!qG(X))throw new Es("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",c,n,e);qG(X)&&(X=~~X)}if(R>=$){if(t&&"add"===n.op&&X>M.length)throw new Es("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",c,n,e);if(!1===(h=ude[n.op].call(n,M,X,e)).test)throw new Es("Test operation failed","TEST_OPERATION_FAILED",c,n,e);return h}}else if(R>=$){if(!1===(h=p2[n.op].call(n,M,X,e)).test)throw new Es("Test operation failed","TEST_OPERATION_FAILED",c,n,e);return h}if(M=M[X],t&&R<$&&(!M||"object"!=typeof M))throw new Es("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",c,n,e)}}function cU(e,n,t,r,s){if(void 0===r&&(r=!0),void 0===s&&(s=!0),t&&!Array.isArray(n))throw new Es("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Df(e));for(var c=new Array(n.length),h=0,y=n.length;h0)throw new Es('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,e,t);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new Es("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new Es("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&GG(e.value))throw new Es("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,e,t);if(t)if("add"==e.op){var s=e.path.split("/").length,c=r.split("/").length;if(s!==c+1&&s!==c)throw new Es("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,e,t)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new Es("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,e,t)}else if("move"===e.op||"copy"===e.op){var y=Ate([{op:"_get",path:e.from,value:void 0}],t);if(y&&"OPERATION_PATH_UNRESOLVABLE"===y.name)throw new Es("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,e,t)}}function Ate(e,n,t){try{if(!Array.isArray(e))throw new Es("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)cU(Df(n),Df(e),t||!0);else{t=t||uU;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function KG(e,n,t,r,s){if(n!==e){"function"==typeof n.toJSON&&(n=n.toJSON());for(var c=WG(n),h=WG(e),E=!1,M=h.length-1;M>=0;M--){var $=e[R=h[M]];if(!aU(n,R)||void 0===n[R]&&void 0!==$&&!1===Array.isArray(n))Array.isArray(e)===Array.isArray(n)?(s&&t.push({op:"test",path:r+"/"+U0(R),value:Df($)}),t.push({op:"remove",path:r+"/"+U0(R)}),E=!0):(s&&t.push({op:"test",path:r,value:e}),t.push({op:"replace",path:r,value:n}));else{var j=n[R];"object"==typeof $&&null!=$&&"object"==typeof j&&null!=j&&Array.isArray($)===Array.isArray(j)?KG($,j,t,r+"/"+U0(R),s):$!==j&&(s&&t.push({op:"test",path:r+"/"+U0(R),value:Df($)}),t.push({op:"replace",path:r+"/"+U0(R),value:Df(j)}))}}if(E||c.length!=h.length)for(M=0;Me*n,"+":(e,n)=>e+n,"-":(e,n)=>e-n,"/":(e,n)=>e/n,"%":(e,n)=>e%n,">":(e,n)=>e>n,"<":(e,n)=>ee<=n,">=":(e,n)=>e>=n,"==":(e,n)=>e==n,"!=":(e,n)=>e!=n,"===":(e,n)=>e===n,"!==":(e,n)=>e!==n,"&":(e,n)=>e&n,"|":(e,n)=>e|n,"^":(e,n)=>e^n,"<<":(e,n)=>e<>":(e,n)=>e>>n,">>>":(e,n)=>e>>>n},Cde={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const Sde=Array.prototype.slice,lM=(e,n,t)=>{const r=t?t(n[0]):n[0];return r[e].apply(r,Sde.call(n,1))};var Mde={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,n,t)=>Math.max(n,Math.min(t,e)),now:Date.now,utc:Date.UTC,datetime:(e,n,t,r,s,c,h)=>new Date(e,n||0,t??1,r||0,s||0,c||0,h||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 lM("join",arguments)},indexof:function(){return lM("indexOf",arguments)},lastindexof:function(){return lM("lastIndexOf",arguments)},slice:function(){return lM("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return lM("substring",arguments,String)},split:function(){return lM("split",arguments,String)},replace:function(){return lM("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,n)=>RegExp(e).test(n)};const Ade=["view","item","group","xy","x","y"],QG=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&QG.add(setImmediate);const Tde={Literal:(e,n)=>n.value,Identifier:(e,n)=>{const t=n.name;return e.memberDepth>0?t:"datum"===t?e.datum:"event"===t?e.event:"item"===t?e.item:wde[t]||e.params["$"+t]},MemberExpression:(e,n)=>{const t=!n.computed,r=e(n.object);t&&(e.memberDepth+=1);const s=e(n.property);if(t&&(e.memberDepth-=1),!QG.has(r[s]))return r[s];console.error(`Prevented interpretation of member "${s}" which could lead to insecure code execution`)},CallExpression:(e,n)=>{const t=n.arguments;let r=n.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(t[0])?e(t[1]):e(t[2]):(e.fn[r]||Mde[r]).apply(e.fn,t.map(e))},ArrayExpression:(e,n)=>n.elements.map(e),BinaryExpression:(e,n)=>Ede[n.operator](e(n.left),e(n.right)),UnaryExpression:(e,n)=>Cde[n.operator](e(n.argument)),ConditionalExpression:(e,n)=>e(n.test)?e(n.consequent):e(n.alternate),LogicalExpression:(e,n)=>"&&"===n.operator?e(n.left)&&e(n.right):e(n.left)||e(n.right),ObjectExpression:(e,n)=>n.properties.reduce((t,r)=>{e.memberDepth+=1;const s=e(r.key);return e.memberDepth-=1,QG.has(e(r.value))?console.error(`Prevented interpretation of property "${s}" which could lead to insecure code execution`):t[s]=e(r.value),t},{})};function C$(e,n,t,r,s,c){const h=y=>Tde[y.type](h,y);return h.memberDepth=0,h.fn=Object.create(n),h.params=t,h.datum=r,h.event=s,h.item=c,Ade.forEach(y=>h.fn[y]=function(){return s.vega[y](...arguments)}),h(e)}var kde={operator(e,n){const t=n.ast,r=e.functions;return s=>C$(t,r,s)},parameter(e,n){const t=n.ast,r=e.functions;return(s,c)=>C$(t,r,c,s)},event(e,n){const t=n.ast,r=e.functions;return s=>C$(t,r,void 0,void 0,s)},handler(e,n){const t=n.ast,r=e.functions;return(s,c)=>C$(t,r,s,c.item&&c.item.datum,c)},encode(e,n){const{marktype:t,channels:r}=n,s=e.functions,c="group"===t||"image"===t||"rect"===t;return(h,y)=>{const E=h.datum;let R,M=0;for(const $ in r)R=C$(r[$].ast,s,y,E,void 0,h),h[$]!==R&&(h[$]=R,M=1);return"rule"!==t&&function xde(e,n,t){let r;n.x2&&(n.x?(t&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),n.xc&&(e.x=e.xc-(e.width||0)/2),n.y2&&(n.y?(t&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),n.yc&&(e.y=e.yc-(e.height||0)/2)}(h,r,c),M}}},Ide=tn(998);const Tte=function Ode(e){const[n,t]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:n,version:t}};const m2="#fff",Qde={background:"#333",view:{stroke:"#888"},title:{color:m2,subtitleColor:m2},style:{"guide-label":{fill:m2},"guide-title":{fill:m2}},axis:{domainColor:m2,gridColor:"#888",tickColor:m2}},cM="#4572a7",Jde={background:"#fff",arc:{fill:cM},area:{fill:cM},line:{stroke:cM,strokeWidth:2},path:{stroke:cM},rect:{fill:cM},shape:{stroke:cM},symbol:{fill:cM,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"]}},uM="#30a2da",JG="#cbcbcb",nfe={arc:{fill:uM},area:{fill:uM},axis:{domainColor:JG,grid:!0,gridColor:JG,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:JG,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:uM,strokeWidth:2},path:{stroke:uM,strokeWidth:.5},rect:{fill:uM},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:uM},bar:{binSpacing:2,fill:uM,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},dM="#000",ife={group:{fill:"#e5e5e5"},arc:{fill:dM},area:{fill:dM},line:{stroke:dM},path:{stroke:dM},rect:{fill:dM},shape:{stroke:dM},symbol:{fill:dM,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"]}},Rte="Benton Gothic, sans-serif",fM="#82c6df",eX="Benton Gothic Bold, sans-serif",S$={"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"]},afe={background:"#ffffff",title:{anchor:"start",color:"#000000",font:eX,fontSize:22,fontWeight:"normal"},arc:{fill:fM},area:{fill:fM},line:{stroke:fM,strokeWidth:2},path:{stroke:fM},rect:{fill:fM},shape:{stroke:fM},symbol:{fill:fM,size:30},axis:{labelFont:Rte,labelFontSize:11.5,labelFontWeight:"normal",titleFont:eX,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:Rte,labelFontSize:11.5,symbolType:"square",titleFont:eX,titleFontSize:13,titleFontWeight:"normal"},range:{category:S$["category-6"],diverging:S$["fireandice-6"],heatmap:S$["fire-7"],ordinal:S$["fire-7"],ramp:S$["fire-7"]}},hM="#ab5787",dU="#979797",lfe={background:"#f9f9f9",arc:{fill:hM},area:{fill:hM},line:{stroke:hM},path:{stroke:hM},rect:{fill:hM},shape:{stroke:hM},symbol:{fill:hM,size:30},axis:{domainColor:dU,domainWidth:.5,gridWidth:.2,labelColor:dU,tickColor:dU,tickWidth:.2,titleColor:dU},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"]}},pM="#3e5c69",cfe={background:"#fff",arc:{fill:pM},area:{fill:pM},line:{stroke:pM},path:{stroke:pM},rect:{fill:pM},shape:{stroke:pM},symbol:{fill:pM},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"]}},zh="#1696d2",fU="Lato",tX="Lato",D$={"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"]},pfe={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:fU},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:tX,labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:fU},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:tX,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:fU,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:tX,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:fU,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:D$["six-groups-cat-1"],diverging:D$["diverging-colors"],heatmap:D$["diverging-colors"],ordinal:D$["six-groups-seq"],ramp:D$["shades-blue"]},area:{fill:zh},rect:{fill:zh},line:{color:zh,stroke:zh,strokeWidth:5},trail:{color:zh,stroke:zh,strokeWidth:0,size:1},path:{stroke:zh,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:zh,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:zh,stroke:null}},arc:{fill:zh},shape:{stroke:zh},symbol:{fill:zh,size:30}},mM="#3366CC",hU="Arial, sans-serif",mfe={arc:{fill:mM},area:{fill:mM},path:{stroke:mM},rect:{fill:mM},shape:{stroke:mM},symbol:{stroke:mM},circle:{fill:mM},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:hU,fontSize:12},"guide-title":{font:hU,fontSize:12},"group-title":{font:hU,fontSize:12}},title:{font:hU,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"]}},nX=e=>e*(1/3+1),Bte=nX(9),zte=nX(10),Vte=nX(12),M$="Segoe UI",jte="wf_standard-font, helvetica, arial, sans-serif",A$="#605E5C",Hte="transparent",Pm="#118DFF",Gte=["#DEEFFF",Pm],Cfe={view:{stroke:Hte},background:Hte,font:M$,header:{titleFont:jte,titleFontSize:Vte,titleColor:"#252423",labelFont:M$,labelFontSize:zte,labelColor:A$},axis:{ticks:!1,grid:!1,domain:!1,labelColor:A$,labelFontSize:Bte,titleFont:jte,titleColor:"#252423",titleFontSize:Vte,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:Pm},line:{stroke:Pm,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:M$,fontSize:Bte,fill:A$},arc:{fill:Pm},area:{fill:Pm,line:!0,opacity:.6},path:{stroke:Pm},rect:{fill:Pm},point:{fill:Pm,filled:!0,size:75},shape:{stroke:Pm},symbol:{fill:Pm,strokeWidth:1.5,size:50},legend:{titleFont:M$,titleFontWeight:"bold",titleColor:A$,labelFont:M$,labelFontSize:zte,labelColor:A$,symbolType:"circle",symbolSize:75},range:{category:[Pm,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:Gte,heatmap:Gte,ordinal:["#DEEFFF","#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Pm]}},iX='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',Sfe=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Dfe=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function pU({type:e,background:n}){const t="dark"===e?"#161616":"#ffffff",r="dark"===e?"#f4f4f4":"#161616",c="dark"===e?"#d4bbff":"#6929c4";return{background:n,arc:{fill:c},area:{fill:c},path:{stroke:c},rect:{fill:c},shape:{stroke:c},symbol:{stroke:c},circle:{fill:c},view:{fill:t,stroke:t},group:{fill:t},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:iX,fontWeight:600},axis:{labelColor:r,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:r,labelAngle:0},style:{"guide-label":{font:iX,fill:r,fontWeight:400},"guide-title":{font:iX,fill:r,fontWeight:400}},range:{category:"dark"===e?Sfe:Dfe,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 Mfe=pU({type:"light",background:"#ffffff"}),Afe=pU({type:"light",background:"#f4f4f4"}),Tfe=pU({type:"dark",background:"#262626"}),kfe=pU({type:"dark",background:"#161616"}),Ife="2.14.0";var mU=tn(537);function Yte(e,n){return JSON.stringify(e,function Jfe(e){const n=[];return function(t,r){if("object"!=typeof r||null===r)return r;const s=n.indexOf(this)+1;return n.length=s,n.length>e?"[Object]":n.indexOf(r)>=0?"[Circular]":(n.push(r),r)}}(n))}const Kte="vg-tooltip-element",the={offsetX:10,offsetY:10,id:Kte,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function nhe(e){return String(e).replace(/&/g,"&").replace(/n((0,mU.HD)(s)?s:Yte(s,t))).join(", ")}]`;if((0,mU.Kn)(e)){let s="";const{title:c,image:h,...y}=e;c&&(s+=`

    ${n(c)}

    `),h&&(s+=``);const E=Object.keys(y);if(E.length>0){s+="";for(const M of E){let R=y[M];void 0!==R&&((0,mU.Kn)(R)&&(R=Yte(R,t)),s+=``)}s+="
    ${n(M)}${n(R)}
    "}return s||"{}"}return n(e)},baseURL:""};class Zte{constructor(n){this.options={...the,...n};const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const r=document.createElement("style");r.setAttribute("id",this.options.styleId),r.innerHTML=function ihe(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(Kte,e)}(t);const s=document.head;s.childNodes.length>0?s.insertBefore(r,s.childNodes[0]):s.appendChild(r)}}tooltipHandler(n,t,r,s){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==s||""===s)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(s,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:c,y:h}=function rhe(e,n,t,r){let s=e.clientX+t;s+n.width>window.innerWidth&&(s=+e.clientX-t-n.width);let c=e.clientY+r;return c+n.height>window.innerHeight&&(c=+e.clientY-r-n.height),{x:s,y:c}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${h}px`,this.el.style.left=`${c}px`}}function ohe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rX,Qte,ahe=br;function br(e){var n=this;if(n instanceof br||(n=new br),n.tail=null,n.head=null,n.length=0,e&&"function"==typeof e.forEach)e.forEach(function(s){n.push(s)});else if(arguments.length>0)for(var t=0,r=arguments.length;t1)t=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,t=this.head.value}for(var s=0;null!==r;s++)t=e(t,r.value,s),r=r.next;return t},br.prototype.reduceReverse=function(e,n){var t,r=this.tail;if(arguments.length>1)t=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,t=this.tail.value}for(var s=this.length-1;null!==r;s--)t=e(t,r.value,s),r=r.prev;return t},br.prototype.toArray=function(){for(var e=new Array(this.length),n=0,t=this.head;null!==t;n++)e[n]=t.value,t=t.next;return e},br.prototype.toArrayReverse=function(){for(var e=new Array(this.length),n=0,t=this.tail;null!==t;n++)e[n]=t.value,t=t.prev;return e},br.prototype.slice=function(e,n){(n=n||this.length)<0&&(n+=this.length),(e=e||0)<0&&(e+=this.length);var t=new br;if(nthis.length&&(n=this.length);for(var r=0,s=this.head;null!==s&&rthis.length&&(n=this.length);for(var r=this.length,s=this.tail;null!==s&&r>n;r--)s=s.prev;for(;null!==s&&r>e;r--,s=s.prev)t.push(s.value);return t},br.prototype.splice=function(e,n,...t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,s=this.head;null!==s&&r1,sX=(e,n,t)=>{const r=e[Lm].get(n);if(r){const s=r.value;if(gU(e,s)){if(_2(e,r),!e[T$])return}else t&&(e[ene]&&(r.value.now=Date.now()),e[fl].unshiftNode(r));return s.value}},gU=(e,n)=>{if(!n||!n.maxAge&&!e[yM])return!1;const t=Date.now()-n.now;return n.maxAge?t>n.maxAge:e[yM]&&t>e[yM]},k$=e=>{if(e[H0]>e[_M])for(let n=e[fl].tail;e[H0]>e[_M]&&null!==n;){const t=n.prev;_2(e,n),n=t}},_2=(e,n)=>{if(n){const t=n.value;e[W0]&&e[W0](t.key,t.value),e[H0]-=t.length,e[Lm].delete(t.key),e[fl].removeNode(n)}};class hhe{constructor(n,t,r,s,c){this.key=n,this.value=t,this.length=r,this.now=s,this.maxAge=c||0}}const tne=(e,n,t,r)=>{let s=t.value;gU(e,s)&&(_2(e,t),e[T$]||(s=void 0)),s&&n.call(r,s.value,s.key,e)};var phe=class fhe{constructor(n){if("number"==typeof n&&(n={max:n}),n||(n={}),n.max&&("number"!=typeof n.max||n.max<0))throw new TypeError("max must be a non-negative number");this[_M]=n.max||1/0;const t=n.length||oX;if(this[g2]="function"!=typeof t?oX:t,this[T$]=n.stale||!1,n.maxAge&&"number"!=typeof n.maxAge)throw new TypeError("maxAge must be a number");this[yM]=n.maxAge||0,this[W0]=n.dispose,this[Jte]=n.noDisposeOnSet||!1,this[ene]=n.updateAgeOnGet||!1,this.reset()}set max(n){if("number"!=typeof n||n<0)throw new TypeError("max must be a non-negative number");this[_M]=n||1/0,k$(this)}get max(){return this[_M]}set allowStale(n){this[T$]=!!n}get allowStale(){return this[T$]}set maxAge(n){if("number"!=typeof n)throw new TypeError("maxAge must be a non-negative number");this[yM]=n,k$(this)}get maxAge(){return this[yM]}set lengthCalculator(n){"function"!=typeof n&&(n=oX),n!==this[g2]&&(this[g2]=n,this[H0]=0,this[fl].forEach(t=>{t.length=this[g2](t.value,t.key),this[H0]+=t.length})),k$(this)}get lengthCalculator(){return this[g2]}get length(){return this[H0]}get itemCount(){return this[fl].length}rforEach(n,t){t=t||this;for(let r=this[fl].tail;null!==r;){const s=r.prev;tne(this,n,r,t),r=s}}forEach(n,t){t=t||this;for(let r=this[fl].head;null!==r;){const s=r.next;tne(this,n,r,t),r=s}}keys(){return this[fl].toArray().map(n=>n.key)}values(){return this[fl].toArray().map(n=>n.value)}reset(){this[W0]&&this[fl]&&this[fl].length&&this[fl].forEach(n=>this[W0](n.key,n.value)),this[Lm]=new Map,this[fl]=new dhe,this[H0]=0}dump(){return this[fl].map(n=>!gU(this,n)&&{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}).toArray().filter(n=>n)}dumpLru(){return this[fl]}set(n,t,r){if((r=r||this[yM])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,c=this[g2](t,n);if(this[Lm].has(n)){if(c>this[_M])return _2(this,this[Lm].get(n)),!1;const E=this[Lm].get(n).value;return this[W0]&&(this[Jte]||this[W0](n,E.value)),E.now=s,E.maxAge=r,E.value=t,this[H0]+=c-E.length,E.length=c,this.get(n),k$(this),!0}const h=new hhe(n,t,c,s,r);return h.length>this[_M]?(this[W0]&&this[W0](n,t),!1):(this[H0]+=h.length,this[fl].unshift(h),this[Lm].set(n,this[fl].head),k$(this),!0)}has(n){if(!this[Lm].has(n))return!1;const t=this[Lm].get(n).value;return!gU(this,t)}get(n){return sX(this,n,!0)}peek(n){return sX(this,n,!1)}pop(){const n=this[fl].tail;return n?(_2(this,n),n.value):null}del(n){_2(this,this[Lm].get(n))}load(n){this.reset();const t=Date.now();for(let r=n.length-1;r>=0;r--){const s=n[r],c=s.e||0;if(0===c)this.set(s.k,s.v);else{const h=c-t;h>0&&this.set(s.k,s.v,h)}}}prune(){this[Lm].forEach((n,t)=>sX(this,t,!1))}};const mhe=Object.freeze({loose:!0}),ghe=Object.freeze({});var aX=e=>e?"object"!=typeof e?mhe:e:ghe,lX={exports:{}},cX={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},_U="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,n){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=cX,c=_U,h=(n=e.exports={}).re=[],y=n.safeRe=[],E=n.src=[],M=n.t={};let R=0;const $="[a-zA-Z0-9-]",j=[["\\s",1],["\\d",s],[$,r]],K=(ie,me,Me)=>{const Ce=(ie=>{for(const[me,Me]of j)ie=ie.split(`${me}*`).join(`${me}{0,${Me}}`).split(`${me}+`).join(`${me}{1,${Me}}`);return ie})(me),rt=R++;c(ie,rt,me),M[ie]=rt,E[rt]=me,h[rt]=new RegExp(me,Me?"g":void 0),y[rt]=new RegExp(Ce,Me?"g":void 0)};K("NUMERICIDENTIFIER","0|[1-9]\\d*"),K("NUMERICIDENTIFIERLOOSE","\\d+"),K("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${$}*`),K("MAINVERSION",`(${E[M.NUMERICIDENTIFIER]})\\.(${E[M.NUMERICIDENTIFIER]})\\.(${E[M.NUMERICIDENTIFIER]})`),K("MAINVERSIONLOOSE",`(${E[M.NUMERICIDENTIFIERLOOSE]})\\.(${E[M.NUMERICIDENTIFIERLOOSE]})\\.(${E[M.NUMERICIDENTIFIERLOOSE]})`),K("PRERELEASEIDENTIFIER",`(?:${E[M.NUMERICIDENTIFIER]}|${E[M.NONNUMERICIDENTIFIER]})`),K("PRERELEASEIDENTIFIERLOOSE",`(?:${E[M.NUMERICIDENTIFIERLOOSE]}|${E[M.NONNUMERICIDENTIFIER]})`),K("PRERELEASE",`(?:-(${E[M.PRERELEASEIDENTIFIER]}(?:\\.${E[M.PRERELEASEIDENTIFIER]})*))`),K("PRERELEASELOOSE",`(?:-?(${E[M.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[M.PRERELEASEIDENTIFIERLOOSE]})*))`),K("BUILDIDENTIFIER",`${$}+`),K("BUILD",`(?:\\+(${E[M.BUILDIDENTIFIER]}(?:\\.${E[M.BUILDIDENTIFIER]})*))`),K("FULLPLAIN",`v?${E[M.MAINVERSION]}${E[M.PRERELEASE]}?${E[M.BUILD]}?`),K("FULL",`^${E[M.FULLPLAIN]}$`),K("LOOSEPLAIN",`[v=\\s]*${E[M.MAINVERSIONLOOSE]}${E[M.PRERELEASELOOSE]}?${E[M.BUILD]}?`),K("LOOSE",`^${E[M.LOOSEPLAIN]}$`),K("GTLT","((?:<|>)?=?)"),K("XRANGEIDENTIFIERLOOSE",`${E[M.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),K("XRANGEIDENTIFIER",`${E[M.NUMERICIDENTIFIER]}|x|X|\\*`),K("XRANGEPLAIN",`[v=\\s]*(${E[M.XRANGEIDENTIFIER]})(?:\\.(${E[M.XRANGEIDENTIFIER]})(?:\\.(${E[M.XRANGEIDENTIFIER]})(?:${E[M.PRERELEASE]})?${E[M.BUILD]}?)?)?`),K("XRANGEPLAINLOOSE",`[v=\\s]*(${E[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[M.XRANGEIDENTIFIERLOOSE]})(?:${E[M.PRERELEASELOOSE]})?${E[M.BUILD]}?)?)?`),K("XRANGE",`^${E[M.GTLT]}\\s*${E[M.XRANGEPLAIN]}$`),K("XRANGELOOSE",`^${E[M.GTLT]}\\s*${E[M.XRANGEPLAINLOOSE]}$`),K("COERCE",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?(?:$|[^\\d])`),K("COERCERTL",E[M.COERCE],!0),K("LONETILDE","(?:~>?)"),K("TILDETRIM",`(\\s*)${E[M.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",K("TILDE",`^${E[M.LONETILDE]}${E[M.XRANGEPLAIN]}$`),K("TILDELOOSE",`^${E[M.LONETILDE]}${E[M.XRANGEPLAINLOOSE]}$`),K("LONECARET","(?:\\^)"),K("CARETTRIM",`(\\s*)${E[M.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",K("CARET",`^${E[M.LONECARET]}${E[M.XRANGEPLAIN]}$`),K("CARETLOOSE",`^${E[M.LONECARET]}${E[M.XRANGEPLAINLOOSE]}$`),K("COMPARATORLOOSE",`^${E[M.GTLT]}\\s*(${E[M.LOOSEPLAIN]})$|^$`),K("COMPARATOR",`^${E[M.GTLT]}\\s*(${E[M.FULLPLAIN]})$|^$`),K("COMPARATORTRIM",`(\\s*)${E[M.GTLT]}\\s*(${E[M.LOOSEPLAIN]}|${E[M.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",K("HYPHENRANGE",`^\\s*(${E[M.XRANGEPLAIN]})\\s+-\\s+(${E[M.XRANGEPLAIN]})\\s*$`),K("HYPHENRANGELOOSE",`^\\s*(${E[M.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[M.XRANGEPLAINLOOSE]})\\s*$`),K("STAR","(<|>)?=?\\s*\\*"),K("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),K("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(lX,lX.exports);var uX=lX.exports;const ine=/^[0-9]+$/,rne=(e,n)=>{const t=ine.test(e),r=ine.test(n);return t&&r&&(e=+e,n=+n),e===n?0:t&&!r?-1:r&&!t?1:erne(n,e)};const yU=_U,{MAX_LENGTH:one,MAX_SAFE_INTEGER:bU}=cX,{safeRe:sne,t:ane}=uX,whe=aX,{compareIdentifiers:y2}=xhe;var dX=class H_{constructor(n,t){if(t=whe(t),n instanceof H_){if(n.loose===!!t.loose&&n.includePrerelease===!!t.includePrerelease)return n;n=n.version}else if("string"!=typeof n)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof n}".`);if(n.length>one)throw new TypeError(`version is longer than ${one} characters`);yU("SemVer",n,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=n.trim().match(t.loose?sne[ane.LOOSE]:sne[ane.FULL]);if(!r)throw new TypeError(`Invalid Version: ${n}`);if(this.raw=n,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>bU||this.major<0)throw new TypeError("Invalid major version");if(this.minor>bU||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>bU||this.patch<0)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const c=+s;if(c>=0&&c=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);if(-1===c){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let c=[t,s];!1===r&&(c=[t]),0===y2(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${n}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const lne=dX;var b2=(e,n,t)=>new lne(e,t).compare(new lne(n,t));const Ehe=b2,She=b2,Mhe=b2,The=b2,Ihe=b2,Rhe=b2;var fX,cne,hX,une,Vhe=(e,n,t,r)=>{switch(n){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return((e,n,t)=>0===Ehe(e,n,t))(e,t,r);case"!=":return((e,n,t)=>0!==She(e,n,t))(e,t,r);case">":return((e,n,t)=>Mhe(e,n,t)>0)(e,t,r);case">=":return((e,n,t)=>The(e,n,t)>=0)(e,t,r);case"<":return((e,n,t)=>Ihe(e,n,t)<0)(e,t,r);case"<=":return((e,n,t)=>Rhe(e,n,t)<=0)(e,t,r);default:throw new TypeError(`Invalid operator: ${n}`)}};const Uhe=function dne(){if(une)return hX;une=1;class e{constructor(Pt,Hn){if(Hn=r(Hn),Pt instanceof e)return Pt.loose===!!Hn.loose&&Pt.includePrerelease===!!Hn.includePrerelease?Pt:new e(Pt.raw,Hn);if(Pt instanceof s)return this.raw=Pt.value,this.set=[[Pt]],this.format(),this;if(this.options=Hn,this.loose=!!Hn.loose,this.includePrerelease=!!Hn.includePrerelease,this.raw=Pt.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(et=>this.parseRange(et.trim())).filter(et=>et.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const et=this.set[0];if(this.set=this.set.filter(ut=>!K(ut[0])),0===this.set.length)this.set=[et];else if(this.set.length>1)for(const ut of this.set)if(1===ut.length&&ie(ut[0])){this.set=[ut];break}}this.format()}format(){return this.range=this.set.map(Pt=>Pt.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(Pt){const et=((this.options.includePrerelease&&j)|(this.options.loose&&X))+":"+Pt,ut=t.get(et);if(ut)return ut;const at=this.options.loose;Pt=Pt.replace(at?y[E.HYPHENRANGELOOSE]:y[E.HYPHENRANGE],S2(this.options.includePrerelease)),c("hyphen replace",Pt),Pt=Pt.replace(y[E.COMPARATORTRIM],M),c("comparator trim",Pt),Pt=Pt.replace(y[E.TILDETRIM],R),c("tilde trim",Pt),Pt=Pt.replace(y[E.CARETTRIM],$),c("caret trim",Pt);let Gn=Pt.split(" ").map(ri=>Me(ri,this.options)).join(" ").split(/\s+/).map(ri=>U_(ri,this.options));at&&(Gn=Gn.filter(ri=>(c("loose invalid filter",ri,this.options),!!ri.match(y[E.COMPARATORLOOSE])))),c("range list",Gn);const Xn=new Map,Ui=Gn.map(ri=>new s(ri,this.options));for(const ri of Ui){if(K(ri))return[ri];Xn.set(ri.value,ri)}Xn.size>1&&Xn.has("")&&Xn.delete("");const Ss=[...Xn.values()];return t.set(et,Ss),Ss}intersects(Pt,Hn){if(!(Pt instanceof e))throw new TypeError("a Range is required");return this.set.some(et=>me(et,Hn)&&Pt.set.some(ut=>me(ut,Hn)&&et.every(at=>ut.every(Lt=>at.intersects(Lt,Hn)))))}test(Pt){if(!Pt)return!1;if("string"==typeof Pt)try{Pt=new h(Pt,this.options)}catch{return!1}for(let Hn=0;Hn")&&R.operator.startsWith(">")||this.operator.startsWith("<")&&R.operator.startsWith("<")||this.semver.version===R.semver.version&&this.operator.includes("=")&&R.operator.includes("=")||c(this.semver,"<",R.semver,$)&&this.operator.startsWith(">")&&R.operator.startsWith("<")||c(this.semver,">",R.semver,$)&&this.operator.startsWith("<")&&R.operator.startsWith(">")))}}fX=n;const t=aX,{safeRe:r,t:s}=uX,c=Vhe,h=_U,y=dX,E=dne();return fX}(),c=_U,h=dX,{safeRe:y,t:E,comparatorTrimReplace:M,tildeTrimReplace:R,caretTrimReplace:$}=uX,{FLAG_INCLUDE_PRERELEASE:j,FLAG_LOOSE:X}=cX,K=Ht=>"<0.0.0-0"===Ht.value,ie=Ht=>""===Ht.value,me=(Ht,Pt)=>{let Hn=!0;const et=Ht.slice();let ut=et.pop();for(;Hn&&et.length;)Hn=et.every(at=>ut.intersects(at,Pt)),ut=et.pop();return Hn},Me=(Ht,Pt)=>(c("comp",Ht,Pt),Ht=Et(Ht,Pt),c("caret",Ht),Ht=rt(Ht,Pt),c("tildes",Ht),Ht=mn(Ht,Pt),c("xrange",Ht),Ht=Cs(Ht,Pt),c("stars",Ht),Ht),Ce=Ht=>!Ht||"x"===Ht.toLowerCase()||"*"===Ht,rt=(Ht,Pt)=>Ht.trim().split(/\s+/).map(Hn=>Mt(Hn,Pt)).join(" "),Mt=(Ht,Pt)=>Ht.replace(Pt.loose?y[E.TILDELOOSE]:y[E.TILDE],(et,ut,at,Lt,Gn)=>{let Xn;return c("tilde",Ht,et,ut,at,Lt,Gn),Ce(ut)?Xn="":Ce(at)?Xn=`>=${ut}.0.0 <${+ut+1}.0.0-0`:Ce(Lt)?Xn=`>=${ut}.${at}.0 <${ut}.${+at+1}.0-0`:Gn?(c("replaceTilde pr",Gn),Xn=`>=${ut}.${at}.${Lt}-${Gn} <${ut}.${+at+1}.0-0`):Xn=`>=${ut}.${at}.${Lt} <${ut}.${+at+1}.0-0`,c("tilde return",Xn),Xn}),Et=(Ht,Pt)=>Ht.trim().split(/\s+/).map(Hn=>Qt(Hn,Pt)).join(" "),Qt=(Ht,Pt)=>{c("caret",Ht,Pt);const et=Pt.includePrerelease?"-0":"";return Ht.replace(Pt.loose?y[E.CARETLOOSE]:y[E.CARET],(ut,at,Lt,Gn,Xn)=>{let Ui;return c("caret",Ht,ut,at,Lt,Gn,Xn),Ce(at)?Ui="":Ce(Lt)?Ui=`>=${at}.0.0${et} <${+at+1}.0.0-0`:Ce(Gn)?Ui="0"===at?`>=${at}.${Lt}.0${et} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.0${et} <${+at+1}.0.0-0`:Xn?(c("replaceCaret pr",Xn),Ui="0"===at?"0"===Lt?`>=${at}.${Lt}.${Gn}-${Xn} <${at}.${Lt}.${+Gn+1}-0`:`>=${at}.${Lt}.${Gn}-${Xn} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.${Gn}-${Xn} <${+at+1}.0.0-0`):(c("no pr"),Ui="0"===at?"0"===Lt?`>=${at}.${Lt}.${Gn}${et} <${at}.${Lt}.${+Gn+1}-0`:`>=${at}.${Lt}.${Gn}${et} <${at}.${+Lt+1}.0-0`:`>=${at}.${Lt}.${Gn} <${+at+1}.0.0-0`),c("caret return",Ui),Ui})},mn=(Ht,Pt)=>(c("replaceXRanges",Ht,Pt),Ht.split(/\s+/).map(Hn=>Ei(Hn,Pt)).join(" ")),Ei=(Ht,Pt)=>(Ht=Ht.trim()).replace(Pt.loose?y[E.XRANGELOOSE]:y[E.XRANGE],(et,ut,at,Lt,Gn,Xn)=>{c("xRange",Ht,et,ut,at,Lt,Gn,Xn);const Ui=Ce(at),Ss=Ui||Ce(Lt),ri=Ss||Ce(Gn);return"="===ut&&ri&&(ut=""),Xn=Pt.includePrerelease?"-0":"",Ui?et=">"===ut||"<"===ut?"<0.0.0-0":"*":ut&&ri?(Ss&&(Lt=0),Gn=0,">"===ut?(ut=">=",Ss?(at=+at+1,Lt=0,Gn=0):(Lt=+Lt+1,Gn=0)):"<="===ut&&(ut="<",Ss?at=+at+1:Lt=+Lt+1),"<"===ut&&(Xn="-0"),et=`${ut+at}.${Lt}.${Gn}${Xn}`):Ss?et=`>=${at}.0.0${Xn} <${+at+1}.0.0-0`:ri&&(et=`>=${at}.${Lt}.0${Xn} <${at}.${+Lt+1}.0-0`),c("xRange return",et),et}),Cs=(Ht,Pt)=>(c("replaceStars",Ht,Pt),Ht.trim().replace(y[E.STAR],"")),U_=(Ht,Pt)=>(c("replaceGTE0",Ht,Pt),Ht.trim().replace(y[Pt.includePrerelease?E.GTE0PRE:E.GTE0],"")),S2=Ht=>(Pt,Hn,et,ut,at,Lt,Gn,Xn,Ui,Ss,ri,k1,Are)=>`${Hn=Ce(et)?"":Ce(ut)?`>=${et}.0.0${Ht?"-0":""}`:Ce(at)?`>=${et}.${ut}.0${Ht?"-0":""}`:Lt?`>=${Hn}`:`>=${Hn}${Ht?"-0":""}`} ${Xn=Ce(Ui)?"":Ce(Ss)?`<${+Ui+1}.0.0-0`:Ce(ri)?`<${Ui}.${+Ss+1}.0-0`:k1?`<=${Ui}.${Ss}.${ri}-${k1}`:Ht?`<${Ui}.${Ss}.${+ri+1}-0`:`<=${Xn}`}`.trim(),jh=(Ht,Pt,Hn)=>{for(let et=0;et0){const ut=Ht[et].semver;if(ut.major===Pt.major&&ut.minor===Pt.minor&&ut.patch===Pt.patch)return!0}return!1}return!0};return hX}();var fne=ohe((e,n,t)=>{try{n=new Uhe(n,t)}catch{return!1}return n.test(e)}),qhe='.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 hne(e,...n){for(const t of n)Ghe(e,t);return e}function Ghe(e,n){for(const t of Object.keys(n))(0,gu.writeConfig)(e,t,n[t],!0)}const V_=gu;let I$=Ide;const pne=typeof window<"u"?window:void 0;void 0===I$&&pne?.vl?.compile&&(I$=pne.vl);const gpe={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},_pe={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"},O$={vega:"Vega","vega-lite":"Vega-Lite"},vU={vega:V_.version,"vega-lite":I$?I$.version:"not available"},ype={vega:e=>e,"vega-lite":(e,n)=>I$.compile(e,{config:n}).spec},bpe='\n\n \n \n \n',vpe="chart-wrapper";function mne(e,n,t,r){const s=`${n}
    `,c=`
    ${t}`,h=window.open("");h.document.write(s+e+c),h.document.title=`${O$[r]} JSON Source`}function gne(e){return!(!e||!("load"in e))}function _ne(e){return gne(e)?e:V_.loader(e)}function pX(){return pX=(0,sn.Z)(function*(e,n,t={}){let r,s;(0,gu.isString)(n)?(s=_ne(t.loader),r=JSON.parse(yield s.load(n))):r=n;const c=function Epe(e){const n=e.usermeta?.embedOptions??{};return(0,gu.isString)(n.defaultStyle)&&(n.defaultStyle=!1),n}(r),h=c.loader;(!s||h)&&(s=_ne(t.loader??h));const y=yield yne(c,s),E=yield yne(t,s),M={...hne(E,y),config:(0,gu.mergeConfig)(E.config??{},y.config??{})};return yield function Dpe(e,n){return gX.apply(this,arguments)}(e,r,M,s)}),pX.apply(this,arguments)}function yne(e,n){return mX.apply(this,arguments)}function mX(){return(mX=(0,sn.Z)(function*(e,n){const t=(0,gu.isString)(e.config)?JSON.parse(yield n.load(e.config)):e.config??{},r=(0,gu.isString)(e.patch)?JSON.parse(yield n.load(e.patch)):e.patch;return{...e,...r?{patch:r}:{},...t?{config:t}:{}}})).apply(this,arguments)}function gX(){return gX=(0,sn.Z)(function*(e,n,t={},r){const s=t.theme?(0,gu.mergeConfig)(Ii[t.theme],t.config??{}):t.config,c=(0,gu.isBoolean)(t.actions)?t.actions:hne({},gpe,t.actions??{}),h={..._pe,...t.i18n},y=t.renderer??"canvas",E=t.logLevel??V_.Warn,M=t.downloadFileName??"visualization",R="string"==typeof e?document.querySelector(e):e;if(!R)throw new Error(`${e} does not exist`);if(!1!==t.defaultStyle){const Et="vega-embed-style",{root:Qt,rootContainer:mn}=function Spe(e){const n=e.getRootNode?e.getRootNode():document;return n instanceof ShadowRoot?{root:n,rootContainer:n}:{root:document,rootContainer:document.head??document.body}}(R);if(!Qt.getElementById(Et)){const Ei=document.createElement("style");Ei.id=Et,Ei.innerHTML=void 0===t.defaultStyle||!0===t.defaultStyle?qhe.toString():t.defaultStyle,mn.appendChild(Ei)}}const $=function wpe(e,n){if(e.$schema){const t=Tte(e.$schema);n&&n!==t.library&&console.warn(`The given visualization spec is written in ${O$[t.library]}, but mode argument sets ${O$[n]??n}.`);const r=t.library;return fne(vU[r],`^${t.version.slice(1)}`)||console.warn(`The input spec uses ${O$[r]} ${t.version}, but the current version of ${O$[r]} is v${vU[r]}.`),r}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":n??"vega"}(n,t.mode);let j=ype[$](n,s);if("vega-lite"===$&&j.$schema){const Et=Tte(j.$schema);fne(vU.vega,`^${Et.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${Et.version}, but current version is v${vU.vega}.`)}R.classList.add("vega-embed"),c&&R.classList.add("has-actions"),R.innerHTML="";let X=R;if(c){const Et=document.createElement("div");Et.classList.add(vpe),R.appendChild(Et),X=Et}const K=t.patch;if(K&&(j=K instanceof Function?K(j):cU(j,K,!0,!1).newDocument),t.formatLocale&&V_.formatLocale(t.formatLocale),t.timeFormatLocale&&V_.timeFormatLocale(t.timeFormatLocale),t.expressionFunctions)for(const Et in t.expressionFunctions){const Qt=t.expressionFunctions[Et];"fn"in Qt?V_.expressionFunction(Et,Qt.fn,Qt.visitor):Qt instanceof Function&&V_.expressionFunction(Et,Qt)}const{ast:ie}=t,me=V_.parse(j,"vega-lite"===$?{}:s,{ast:ie}),Me=new(t.viewClass||V_.View)(me,{loader:r,logLevel:E,renderer:y,...ie?{expr:V_.expressionInterpreter??t.expr??kde}:{}});if(Me.addSignalListener("autosize",(Et,Qt)=>{const{type:mn}=Qt;"fit-x"==mn?(X.classList.add("fit-x"),X.classList.remove("fit-y")):"fit-y"==mn?(X.classList.remove("fit-x"),X.classList.add("fit-y")):"fit"==mn?X.classList.add("fit-x","fit-y"):X.classList.remove("fit-x","fit-y")}),!1!==t.tooltip){const{loader:Et,tooltip:Qt}=t,mn=Et&&!gne(Et)?Et?.baseURL:void 0,Ei=function xpe(e){return"function"==typeof e}(Qt)?Qt:new Zte({baseURL:mn,...!0===Qt?{}:Qt}).call;Me.tooltip(Ei)}let rt,{hover:Ce}=t;if(void 0===Ce&&(Ce="vega"===$),Ce){const{hoverSet:Et,updateSet:Qt}="boolean"==typeof Ce?{}:Ce;Me.hover(Et,Qt)}if(t&&(null!=t.width&&Me.width(t.width),null!=t.height&&Me.height(t.height),null!=t.padding&&Me.padding(t.padding)),yield Me.initialize(X,t.bind).runAsync(),!1!==c){let Et=R;if(!1!==t.defaultStyle||t.forceActionsMenu){const mn=document.createElement("details");mn.title=h.CLICK_TO_VIEW_ACTIONS,R.append(mn),Et=mn;const Ei=document.createElement("summary");Ei.innerHTML=bpe,mn.append(Ei),rt=Cs=>{mn.contains(Cs.target)||mn.removeAttribute("open")},document.addEventListener("click",rt)}const Qt=document.createElement("div");if(Et.append(Qt),Qt.classList.add("vega-actions"),!0===c||!1!==c.export)for(const mn of["svg","png"])if(!0===c||!0===c.export||c.export[mn]){const Ei=h[`${mn.toUpperCase()}_ACTION`],Cs=document.createElement("a"),U_=(0,gu.isObject)(t.scaleFactor)?t.scaleFactor[mn]:t.scaleFactor;Cs.text=Ei,Cs.href="#",Cs.target="_blank",Cs.download=`${M}.${mn}`,Cs.addEventListener("mousedown",function(){var S2=(0,sn.Z)(function*(jh){jh.preventDefault();const Ht=yield Me.toImageURL(mn,U_);this.href=Ht});return function(jh){return S2.apply(this,arguments)}}()),Qt.append(Cs)}if(!0===c||!1!==c.source){const mn=document.createElement("a");mn.text=h.SOURCE_ACTION,mn.href="#",mn.addEventListener("click",function(Ei){mne(ZG()(n),t.sourceHeader??"",t.sourceFooter??"",$),Ei.preventDefault()}),Qt.append(mn)}if("vega-lite"===$&&(!0===c||!1!==c.compiled)){const mn=document.createElement("a");mn.text=h.COMPILED_ACTION,mn.href="#",mn.addEventListener("click",function(Ei){mne(ZG()(j),t.sourceHeader??"",t.sourceFooter??"","vega"),Ei.preventDefault()}),Qt.append(mn)}if(!0===c||!1!==c.editor){const mn=t.editorUrl??"https://vega.github.io/editor/",Ei=document.createElement("a");Ei.text=h.EDITOR_ACTION,Ei.href="#",Ei.addEventListener("click",function(Cs){(function Whe(e,n,t){const r=e.open(n),{origin:h}=new URL(n);let y=40;e.addEventListener("message",function E(R){R.source===r&&(y=0,e.removeEventListener("message",E,!1))},!1),setTimeout(function M(){y<=0||(r.postMessage(t,h),setTimeout(M,250),y-=1)},250)})(window,mn,{config:s,mode:$,renderer:y,spec:ZG()(n)}),Cs.preventDefault()}),Qt.append(Ei)}}return{view:Me,spec:n,vgSpec:j,finalize:function Mt(){rt&&document.removeEventListener("click",rt),Me.finalize()},embedOptions:t}}),gX.apply(this,arguments)}let bne=(()=>{class e{constructor(){this.loader$=new J(1),this.subscriptions=new xn,this.event$=this.loader$.pipe(w$(),ne(1)),this.view$=this.event$.pipe(ii(t=>"ready"===t.type),ye(t=>t.view)),this.loading$=this.event$.pipe(ye(t=>"loading"===t.type),Ih()),this.error$=this.event$.pipe(ii(t=>"error"===t.type),ye(t=>t?.error))}ngOnDestroy(){this.loader$.complete(),this.subscriptions.unsubscribe()}create(...t){const r=function Cpe(e,n){return pX.apply(this,arguments)}(...t),s=this.subscriptions,h=new xn(()=>r.then(M=>M.finalize())),y=r.then(M=>M.view),E=Cn(y).pipe(ye(M=>({type:"ready",view:M})),Sf(M=>Cn([{type:"error",error:M}])),Wl({type:"loading",loader:y}));h.add(s),r.finally(()=>s.unsubscribe()),this.subscriptions=h,this.loader$.next(E)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function vne(){}let v2=(()=>{class e{set autosize(t){this._autosize="boolean"==typeof t?{width:t,height:t}:{width:!1,height:!1,...t}}get autosize(){return this._autosize}constructor(t,r,s,c){this.manager=r,this.renderer=s,this.cdr=c,this._autosize={width:!0,height:!0},this.minSizeChange=1,this.viewChange=this.manager.view$,this.viewLoading=this.manager.loading$,this.viewError=this.manager.error$,this.subscriptions=this.manager.event$.subscribe(this.handleEvents.bind(this)),this.detach=vne,this.container=t.nativeElement}ngOnChanges(t){("spec"in t||"options"in t)&&this.create()}ngOnDestroy(){this.subscriptions.unsubscribe(),this.detach()}create(){const{spec:t,options:r,manager:s,renderer:c}=this;if(t){const h=c.createElement("div");s.create(h,t,r)}else this.detach()}handleEvents(t){"ready"===t.type?this.attach(t.view):"error"===t.type&&this.detach()}attach(t){const{cdr:r,container:s,renderer:c}=this;if(t.container()){const h=this.getRoot(t.container()),y=new sde.ResizeSensor(h,({width:E,height:M})=>{this.updateSize(h,t,E,M)});this.detach(),this.detach=()=>{y.detach(),c.removeChild(s,h),r.markForCheck(),this.detach=vne},c.appendChild(s,h)}r.markForCheck()}updateSize(t,r,s,c){const{_autosize:h}=this,y=h.width&&this.updateWidth(t,r,s),E=h.height&&this.updateHeight(t,r,c);(y||E)&&r.runAsync()}updateWidth(t,r,s){const{minSizeChange:c}=this,y=t.classList.contains("has-actions")?38:0;return Math.abs(s-r.width()-y)>=c&&(r.width(s-y),!0)}updateHeight(t,r,s){const{minSizeChange:c}=this;return Math.abs(s-r.height())>=c&&(r.height(s),!0)}getRoot(t){const{renderer:r}=this;let s=r.parentNode(t);for(;s;)t=s,s=r.parentNode(s);return t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(bne),ue(tl),ue(Qo))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["ngx-vega"]],inputs:{spec:"spec",options:"options",autosize:"autosize",minSizeChange:"minSizeChange"},outputs:{viewChange:"viewChange",viewLoading:"viewLoading",viewError:"viewError"},standalone:!0,features:[ni([bne]),vo,xi],decls:0,vars:0,template:function(r,s){},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;height:99%}"],changeDetection:0})}return e})();const Mpe=["determinateSpinner"];function Ape(e,n){if(1&e&&(dy(),Ae(0,"svg",11),Wt(1,"circle",12),ke()),2&e){const t=on();hi("viewBox",t._viewBox()),Ze(),_h("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),hi("r",t._circleRadius())}}const Tpe=new $e("mat-progress-spinner-default-options",{providedIn:"root",factory:function kpe(){return{diameter:xne}}}),xne=100;let Ope=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}constructor(t,r,s){this._elementRef=t,this._defaultColor="primary",this._value=0,this._diameter=xne,this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,this.mode="mat-spinner"===t.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",s&&(s.color&&(this.color=this._defaultColor=s.color),s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Ko,8),ue(Tpe))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,s){if(1&r&&ha(Mpe,5),2&r){let c;zi(c=Pi())&&(s._determinateCircle=c.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,s){2&r&&(hi("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===s.mode?s.value:null)("mode",s.mode),wo("mat-"+s.color),_h("width",s.diameter,"px")("height",s.diameter,"px")("--mdc-circular-progress-size",s.diameter+"px")("--mdc-circular-progress-active-indicator-width",s.diameter+"px"),In("_mat-animation-noopable",s._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===s.mode))},inputs:{color:"color",mode:"mode",value:[ht.HasDecoratorInputTransform,"value","value",jw],diameter:[ht.HasDecoratorInputTransform,"diameter","diameter",jw],strokeWidth:[ht.HasDecoratorInputTransform,"strokeWidth","strokeWidth",jw]},exportAs:["matProgressSpinner"],standalone:!0,features:[Vs,xi],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,s){if(1&r&&(en(0,Ape,2,8,"ng-template",null,0,qk),Ae(2,"div",1,2),dy(),Ae(4,"svg",3),Wt(5,"circle",4),ke()(),sA(),Ae(6,"div",5)(7,"div",6)(8,"div",7),zb(9,8),ke(),Ae(10,"div",9),zb(11,8),ke(),Ae(12,"div",10),zb(13,8),ke()()()),2&r){const c=lm(1);Ze(4),hi("viewBox",s._viewBox()),Ze(),_h("stroke-dasharray",s._strokeCircumference(),"px")("stroke-dashoffset",s._strokeDashOffset(),"px")("stroke-width",s._circleStrokeWidth(),"%"),hi("r",s._circleRadius()),Ze(4),vt("ngTemplateOutlet",c),Ze(2),vt("ngTemplateOutlet",c),Ze(2),vt("ngTemplateOutlet",c)}},dependencies:[jS],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0})}return e})(),Rpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,rs]})}return e})();function Npe(e,n){if(1&e&&(Ae(0,"div",15),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.headline)}}function Fpe(e,n){if(1&e&&(Ae(0,"div",16),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.title)}}function Ppe(e,n){if(1&e&&(Ae(0,"div",17),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.description)}}const Lpe=()=>({width:!0,height:!1});function $pe(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",18),yn("viewLoading",function(s){return hs(t),so(on().loadingVegaVisualization=s)}),ke()}if(2&e){const t=on();vt("spec",t.spec)("options",t.options)("autosize",f_(3,Lpe))}}function Bpe(e,n){1&e&&Wt(0,"markdown",19),2&e&&vt("src",on().content)}function zpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",26),yn("load",function(){return hs(t),so(on(2).disableSpinner("sql"))}),ke()}2&e&&vt("src",on(2).sql)}function Vpe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,21),yn("closed",function(){return hs(t),so(on().enableSpinner("sql"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Data Extraction Source Code (SQL) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,zpe,1,1,"markdown",25),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.sql,jd),Ze(3),In("smooth-hide",!r.spinners.sql),Ze(),vt("ngIf",r.sql&&t.expanded)}}function jpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",29),yn("load",function(){return hs(t),so(on(2).disableSpinner("csv"))}),ke()}2&e&&vt("src",on(2).csv)}function Upe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,27),yn("closed",function(){return hs(t),so(on().enableSpinner("csv"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Extracted Data (CSV) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,jpe,1,1,"markdown",28),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.csv,jd),Ze(3),In("smooth-hide",!r.spinners.csv),Ze(),vt("ngIf",r.csv&&t.expanded)}}function Hpe(e,n){if(1&e){const t=Oa();Ae(0,"markdown",26),yn("load",function(){return hs(t),so(on(2).disableSpinner("spec"))}),ke()}2&e&&vt("src",on(2).specString)}function Wpe(e,n){if(1&e){const t=Oa();Ae(0,"mat-expansion-panel",20,30),yn("closed",function(){return hs(t),so(on().enableSpinner("spec"))}),Ae(2,"mat-expansion-panel-header")(3,"mat-panel-title"),wt(4," Visualization Source Code (Vega Lite Spec) "),ke()(),Ae(5,"div",22)(6,"a",23)(7,"mat-icon"),wt(8,"cloud_download"),ke()()(),Wt(9,"mat-spinner",24),en(10,Hpe,1,1,"markdown",25),ke()}if(2&e){const t=lm(1),r=on();Ze(6),vt("href",r.specString,jd),Ze(3),In("smooth-hide",!r.spinners.spec),Ze(),vt("ngIf",r.spec&&t.expanded)}}let qpe=(()=>{class e{get specString(){return this.spec}constructor(t,r){this.dialog=t,this.page=r,this.clsName="agc-visualization-page",this.headline="Marion County Opioid Addiction Report",this.options={renderer:"canvas",actions:!0,width:1268},this.spinners={sql:!0,csv:!0,spec:!0},this.loadingVegaVisualization=!0}ngOnInit(){this.page.snapshot.hasShownHelpModal||(this.dialog.open(Kue,{width:"50rem",data:{}}),this.page.setHasShownHelpModal(!0))}disableSpinner(t){this.spinners={...this.spinners,[t]:!1}}enableSpinner(t){this.spinners={...this.spinners,[t]:!0}}launchHelpDialog(){this.dialog.open(Xue,{width:"60rem",data:{}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(_$),ue(vte))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-visualization-page"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{headline:"headline",title:"title",description:"description",spec:"spec",options:"options",content:"content",sql:"sql",csv:"csv"},decls:22,vars:12,consts:[["class","header",4,"ngIf"],[1,"content"],[1,"center-box"],["class","title",4,"ngIf"],["class","description",4,"ngIf"],[1,"loading-message"],[1,"visualization"],[3,"spec","options","autosize","viewLoading",4,"ngIf"],["mat-icon-button","","color","accent","disableRipple","",1,"help",3,"click"],["title","Help",1,"qmark"],["ngClass","info"],["ngClass","storage-icon","svgIcon","menu:data-storage"],[3,"src",4,"ngIf"],["multi",""],[3,"closed",4,"ngIf"],[1,"header"],[1,"title"],[1,"description"],[3,"spec","options","autosize","viewLoading"],[3,"src"],[3,"closed"],["sqlPanel",""],[1,"file-download-area"],["target","_blank","rel","noreferrer noopener",1,"file-download",3,"href"],[1,"spinner"],["lineNumbers","",3,"src","load",4,"ngIf"],["lineNumbers","",3,"src","load"],["csvPanel",""],["class","csvContent","lineNumbers","",3,"src","load",4,"ngIf"],["lineNumbers","",1,"csvContent",3,"src","load"],["specPanel",""]],template:function(r,s){1&r&&(en(0,Npe,2,1,"div",0),Ae(1,"div",1)(2,"div",2),en(3,Fpe,2,1,"div",3)(4,Ppe,2,1,"div",4),Ae(5,"div",5),Wt(6,"mat-spinner"),ke(),Ae(7,"div",6),en(8,$pe,1,4,"ngx-vega",7),Ae(9,"button",8),yn("click",function(){return s.launchHelpDialog()}),Ae(10,"span",9),wt(11,"?"),ke()()(),Ae(12,"mat-expansion-panel",10)(13,"mat-expansion-panel-header")(14,"mat-panel-title"),Wt(15,"mat-icon",11),wt(16," DATA & GRAPHIC VARIABLE EXTRACTION INFORMATION "),ke()(),en(17,Bpe,1,1,"markdown",12),Ae(18,"mat-accordion",13),en(19,Vpe,11,4,"mat-expansion-panel",14)(20,Upe,11,4,"mat-expansion-panel",14)(21,Wpe,11,4,"mat-expansion-panel",14),ke()()()()),2&r&&(vt("ngIf",s.headline),Ze(3),vt("ngIf",s.title),Ze(),vt("ngIf",s.description),Ze(),In("smooth-hide",!s.loadingVegaVisualization),Ze(3),vt("ngIf",s.spec),Ze(4),In("smooth-show",!s.loadingVegaVisualization),Ze(5),vt("ngIf",s.content),Ze(2),vt("ngIf",s.sql),Ze(),vt("ngIf",s.csv),Ze(),vt("ngIf",s.spec))},dependencies:[qF,x_,Ete,lG,V4,j4,aG,v$,HL,v2,Ope],styles:[".mat-expanded .mat-expanded .mat-expansion-panel-content{min-height:13rem}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] markdown[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center;font-weight:300;font-size:2.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{align-items:center;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .center-box[_ngcontent-%COMP%]{display:block;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .loading-message[_ngcontent-%COMP%]{position:fixed;z-index:2;left:50%;top:50%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]{position:relative;padding-right:2.375rem;display:flex;width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]:hover ngx-vega[_ngcontent-%COMP%] summary, [_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]:hover .help[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s ease}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%]{position:absolute;top:0;right:0;cursor:pointer;opacity:.2;transition:opacity .4s ease-in;border-width:1px;border-style:solid;border-radius:50%;box-shadow:1px 1px 3px #0000001a;background:#fff;color:#1b1e23}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%], [_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%] .qmark[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;line-height:1.75rem;font-size:1.25rem;vertical-align:baseline;padding:0}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%] .help[_ngcontent-%COMP%] .mat-button-focus-overlay{display:none}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{opacity:0;margin-top:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:700;font-size:.875rem;line-height:1.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] mat-expansion-panel-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .file-download-area[_ngcontent-%COMP%]{margin-top:.625rem;margin-bottom:2.5rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .file-download-area[_ngcontent-%COMP%] .file-download[_ngcontent-%COMP%]{position:absolute;right:2rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{position:absolute;z-index:1;left:50%;top:8rem}[_nghost-%COMP%] .content[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%] markdown[_ngcontent-%COMP%]{padding:1rem .5rem 0}[_nghost-%COMP%] .smooth-show[_ngcontent-%COMP%]{opacity:1!important;transition:opacity .75s}[_nghost-%COMP%] .smooth-hide[_ngcontent-%COMP%]{opacity:0!important;transition:opacity .5s}"],changeDetection:0})}return e})();function Gpe(e,n){if(1&e&&Wt(0,"agc-visualization-page",1),2&e){const t=on();vt("title",t.visualization.title)("description",t.visualization.description)("spec",t.visualization.spec)("options",t.visualization.options)("content",t.visualization.content)("sql",t.visualization.sql)("csv",t.visualization.csv)}}const Xpe=[{path:"",component:(()=>{class e{constructor(t){this.subscriptions=new xn;const r=t.data.subscribe(s=>{this.visualization=s.visualization});this.subscriptions.add(r)}ngOnDestroy(){this.subscriptions.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)(ue(tM))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-visualization"]],decls:1,vars:1,consts:[[3,"title","description","spec","options","content","sql","csv",4,"ngIf"],[3,"title","description","spec","options","content","sql","csv"]],template:function(r,s){1&r&&en(0,Gpe,1,7,"agc-visualization-page",0),2&r&&vt("ngIf",s.visualization)},dependencies:[x_,qpe]})}return e})(),resolve:{visualization:aue}}];let Ype=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(Xpe),mu]})}return e})(),Kpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,HG,h2,cG]})}return e})(),Zpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,HG,h2]})}return e})(),_X=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,cG,h2,WL.forChild(),v2,Kpe,Zpe,Rpe]})}return e})(),Qpe=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Ype,_X]})}return e})(),wne=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();class Jpe{constructor(n){this._box=n,this._destroyed=new It,this._resizeSubject=new It,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(n){return this._elementObservables.has(n)||this._elementObservables.set(n,new Qn(t=>{const r=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(n,{box:this._box}),()=>{this._resizeObserver?.unobserve(n),r.unsubscribe(),this._elementObservables.delete(n)}}).pipe(ii(t=>t.some(r=>r.target===n)),ne({bufferSize:1,refCount:!0}),Kn(this._destroyed))),this._elementObservables.get(n)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let eme=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=Xe(Bt)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,r){const s=r?.box||"content-box";return this._observers.has(s)||this._observers.set(s,new Jpe(s)),this._observers.get(s).observe(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const tme=["notch"],nme=["matFormFieldNotchedOutline",""],ime=["*"],rme=["textField"],ome=["iconPrefixContainer"],sme=["textPrefixContainer"];function ame(e,n){1&e&&Wt(0,"span",16)}function lme(e,n){if(1&e&&(Ae(0,"label",14),ki(1,1),en(2,ame,1,0,"span",15),ke()),2&e){const t=on(2);vt("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),hi("for",t._control.id),Ze(2),eo(2,!t.hideRequiredMarker&&t._control.required?2:-1)}}function cme(e,n){1&e&&en(0,lme,3,5,"label",14),2&e&&eo(0,on()._hasFloatingLabel()?0:-1)}function ume(e,n){1&e&&Wt(0,"div",17)}function dme(e,n){}function fme(e,n){1&e&&en(0,dme,0,0,"ng-template",9),2&e&&(on(2),vt("ngTemplateOutlet",lm(1)))}function hme(e,n){if(1&e&&(Ae(0,"div",5),en(1,fme,1,1,null,9),ke()),2&e){const t=on();vt("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),Ze(),eo(1,t._forceDisplayInfixLabel()?-1:1)}}function pme(e,n){1&e&&(Ae(0,"div",18,19),ki(2,2),ke())}function mme(e,n){1&e&&(Ae(0,"div",20,21),ki(2,3),ke())}function gme(e,n){}function _me(e,n){1&e&&en(0,gme,0,0,"ng-template",9),2&e&&(on(),vt("ngTemplateOutlet",lm(1)))}function yme(e,n){1&e&&(Ae(0,"div",22),ki(1,4),ke())}function bme(e,n){1&e&&(Ae(0,"div",23),ki(1,5),ke())}function vme(e,n){1&e&&Wt(0,"div",12)}function xme(e,n){1&e&&(Ae(0,"div",24),ki(1,6),ke()),2&e&&vt("@transitionMessages",on()._subscriptAnimationState)}function wme(e,n){if(1&e&&(Ae(0,"mat-hint",26),wt(1),ke()),2&e){const t=on(2);vt("id",t._hintLabelId),Ze(),Pr(t.hintLabel)}}function Eme(e,n){if(1&e&&(Ae(0,"div",25),en(1,wme,2,2,"mat-hint",26),ki(2,7),Wt(3,"div",27),ki(4,8),ke()),2&e){const t=on();vt("@transitionMessages",t._subscriptAnimationState),Ze(),eo(1,t.hintLabel?1:-1)}}const Cme=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Sme=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let xU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-label"]],standalone:!0})}return e})();const Dme=new $e("MatError");let Mme=0,Ene=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+Mme++}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,s){2&r&&(Vb("id",s.id),hi("align",null),In("mat-mdc-form-field-hint-end","end"===s.align))},inputs:{align:"align",id:"id"},standalone:!0})}return e})();const Ame=new $e("MatPrefix"),Tme=new $e("MatSuffix"),Cne=new $e("FloatingLabelParent");let Sne=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=Xe(eme),this._ngZone=Xe(Bt),this._parent=Xe(Cne),this._resizeSubscription=new xn}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function kme(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const r=t.scrollWidth;return t.remove(),r}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn))};static#t=this.\u0275dir=Vt({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,s){2&r&&In("mdc-floating-label--float-above",s.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}return e})();const Dne="mdc-line-ripple--active",wU="mdc-line-ripple--deactivating";let Mne=(()=>{class e{constructor(t,r){this._elementRef=t,this._handleTransitionEnd=s=>{const c=this._elementRef.nativeElement.classList,h=c.contains(wU);"opacity"===s.propertyName&&h&&c.remove(Dne,wU)},r.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(wU),t.add(Dne)}deactivate(){this._elementRef.nativeElement.classList.add(wU)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt))};static#t=this.\u0275dir=Vt({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}return e})(),Ane=(()=>{class e{constructor(t,r){this._elementRef=t,this._ngZone=r,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,s){if(1&r&&ha(tme,5),2&r){let c;zi(c=Pi())&&(s._notch=c.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,s){2&r&&In("mdc-notched-outline--notched",s.open)},inputs:{open:[ht.None,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[xi],attrs:nme,ngContentSelectors:ime,decls:5,vars:0,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],["notch",""],[1,"mdc-notched-outline__trailing"]],template:function(r,s){1&r&&(Ra(),Wt(0,"div",0),Ae(1,"div",1,2),ki(3),ke(),Wt(4,"div",3))},encapsulation:2,changeDetection:0})}return e})();const Ime={transitionMessages:A0("transitionMessages",[Rh("enter",La({opacity:1,transform:"translateY(0%)"})),Nh("void => enter",[La({opacity:0,transform:"translateY(-5px)"}),Om("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Tne=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Vt({type:e})}return e})();const kne=new $e("MatFormField"),Ome=new $e("MAT_FORM_FIELD_DEFAULT_OPTIONS");let Ine=0,Nne=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Mh(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const r=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,r,s,c,h,y,E,M){this._elementRef=t,this._changeDetectorRef=r,this._ngZone=s,this._dir=c,this._platform=h,this._defaults=y,this._animationMode=E,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+Ine++,this._hintLabelId="mat-mdc-hint-"+Ine++,this._subscriptAnimationState="",this._destroyed=new It,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,y&&(y.appearance&&(this.appearance=y.appearance),this._hideRequiredMarker=!!y?.hideRequiredMarker,y.color&&(this.color=y.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Kn(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Oh(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Kn(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Kn(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const r=this._control?this._control.ngControl:null;return r&&r[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const r=this._hintChildren?this._hintChildren.find(c=>"start"===c.align):null,s=this._hintChildren?this._hintChildren.find(c=>"end"===c.align):null;r?t.push(r.id):this._hintLabel&&t.push(this._hintLabelId),s&&t.push(s.id)}else this._errorChildren&&t.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const r=this._iconPrefixContainer?.nativeElement,s=this._textPrefixContainer?.nativeElement,c=r?.getBoundingClientRect().width??0,h=s?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${c+h}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const r=t.getRootNode();return r&&r!==t}return document.documentElement.contains(t)}static#e=this.\u0275fac=function(r){return new(r||e)(ue(zn),ue(Qo),ue(Bt),ue(rd),ue(Xs),ue(Ome,8),ue(Ko,8),ue(mi))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,xU,5),vs(c,xU,7),vs(c,Tne,5),vs(c,Ame,5),vs(c,Tme,5),vs(c,Dme,5),vs(c,Ene,5)),2&r){let h;zi(h=Pi())&&(s._labelChildNonStatic=h.first),zi(h=Pi())&&(s._labelChildStatic=h.first),zi(h=Pi())&&(s._formFieldControl=h.first),zi(h=Pi())&&(s._prefixChildren=h),zi(h=Pi())&&(s._suffixChildren=h),zi(h=Pi())&&(s._errorChildren=h),zi(h=Pi())&&(s._hintChildren=h)}},viewQuery:function(r,s){if(1&r&&(ha(rme,5),ha(ome,5),ha(sme,5),ha(Sne,5),ha(Ane,5),ha(Mne,5)),2&r){let c;zi(c=Pi())&&(s._textField=c.first),zi(c=Pi())&&(s._iconPrefixContainer=c.first),zi(c=Pi())&&(s._textPrefixContainer=c.first),zi(c=Pi())&&(s._floatingLabel=c.first),zi(c=Pi())&&(s._notchedOutline=c.first),zi(c=Pi())&&(s._lineRipple=c.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,s){2&r&&In("mat-mdc-form-field-label-always-float",s._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",s._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",s._hasIconSuffix)("mat-form-field-invalid",s._control.errorState)("mat-form-field-disabled",s._control.disabled)("mat-form-field-autofilled",s._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===s._animationMode)("mat-form-field-appearance-fill","fill"==s.appearance)("mat-form-field-appearance-outline","outline"==s.appearance)("mat-form-field-hide-placeholder",s._hasFloatingLabel()&&!s._shouldLabelFloat())("mat-focused",s._control.focused)("mat-primary","accent"!==s.color&&"warn"!==s.color)("mat-accent","accent"===s.color)("mat-warn","warn"===s.color)("ng-untouched",s._shouldForward("untouched"))("ng-touched",s._shouldForward("touched"))("ng-pristine",s._shouldForward("pristine"))("ng-dirty",s._shouldForward("dirty"))("ng-valid",s._shouldForward("valid"))("ng-invalid",s._shouldForward("invalid"))("ng-pending",s._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[ni([{provide:kne,useExisting:e},{provide:Cne,useExisting:e}]),xi],ngContentSelectors:Sme,decls:18,vars:21,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],["class","mat-mdc-form-field-icon-prefix"],["class","mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],["class","mat-mdc-form-field-text-suffix"],["class","mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,s){if(1&r&&(Ra(Cme),en(0,cme,1,1,"ng-template",null,0,qk),Ae(2,"div",1,2),yn("click",function(h){return s._control.onContainerClick(h)}),en(4,ume,1,0,"div",3),Ae(5,"div",4),en(6,hme,2,2,"div",5)(7,pme,3,0,"div",6)(8,mme,3,0,"div",7),Ae(9,"div",8),en(10,_me,1,1,null,9),ki(11),ke(),en(12,yme,2,0,"div",10)(13,bme,2,0,"div",11),ke(),en(14,vme,1,0,"div",12),ke(),Ae(15,"div",13),en(16,xme,2,1)(17,Eme,5,2),ke()),2&r){let c;Ze(2),In("mdc-text-field--filled",!s._hasOutline())("mdc-text-field--outlined",s._hasOutline())("mdc-text-field--no-label",!s._hasFloatingLabel())("mdc-text-field--disabled",s._control.disabled)("mdc-text-field--invalid",s._control.errorState),Ze(2),eo(4,s._hasOutline()||s._control.disabled?-1:4),Ze(2),eo(6,s._hasOutline()?6:-1),Ze(),eo(7,s._hasIconPrefix?7:-1),Ze(),eo(8,s._hasTextPrefix?8:-1),Ze(2),eo(10,!s._hasOutline()||s._forceDisplayInfixLabel()?10:-1),Ze(2),eo(12,s._hasTextSuffix?12:-1),Ze(),eo(13,s._hasIconSuffix?13:-1),Ze(),eo(14,s._hasOutline()?-1:14),Ze(),In("mat-mdc-form-field-subscript-dynamic-size","dynamic"===s.subscriptSizing),Ze(),eo(16,"error"===(c=s._getDisplayedMessages())?16:"hint"===c?17:-1)}},dependencies:[Sne,Ane,jS,Mne,Ene],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 96px/0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-top:1px solid;border-bottom:1px solid}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{max-width:calc(100% - 12px*2)}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-text-field--filled{border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-text-field--filled .mdc-line-ripple::before{border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(.75*var(--mdc-outlined-text-field-label-text-size))}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mdc-outlined-text-field-label-text-size)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[Ime.transitionMessages]},changeDetection:0})}return e})(),Fme=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,Ir,GV,rs]})}return e})();function M1(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function Lne(e){return null!=e&&"number"==typeof e.length}const kc=new $e(""),A1=new $e(""),zme=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Vme{static min(n){return function $ne(e){return n=>{if(M1(n.value)||M1(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t{if(M1(n.value)||M1(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}(n)}static required(n){return function zne(e){return M1(e.value)?{required:!0}:null}(n)}static requiredTrue(n){return function Vne(e){return!0===e.value?null:{required:!0}}(n)}static email(n){return function jne(e){return M1(e.value)||zme.test(e.value)?null:{email:!0}}(n)}static minLength(n){return function Une(e){return n=>M1(n.value)||!Lne(n.value)?null:n.value.lengthLne(n.value)&&n.value.length>e?{maxlength:{requiredLength:e,actualLength:n.value.length}}:null}(n)}static pattern(n){return function Wne(e){if(!e)return EU;let n,t;return"string"==typeof e?(t="","^"!==e.charAt(0)&&(t+="^"),t+=e,"$"!==e.charAt(e.length-1)&&(t+="$"),n=new RegExp(t)):(t=e.toString(),n=e),r=>{if(M1(r.value))return null;const s=r.value;return n.test(s)?null:{pattern:{requiredPattern:t,actualValue:s}}}}(n)}static nullValidator(n){return null}static compose(n){return Zne(n)}static composeAsync(n){return Qne(n)}}function EU(e){return null}function qne(e){return null!=e}function Gne(e){return Cw(e)?Cn(e):e}function Xne(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function Yne(e,n){return n.map(t=>t(e))}function Kne(e){return e.map(n=>function jme(e){return!e.validate}(n)?n:t=>n.validate(t))}function Zne(e){if(!e)return null;const n=e.filter(qne);return 0==n.length?null:function(t){return Xne(Yne(t,n))}}function bX(e){return null!=e?Zne(Kne(e)):null}function Qne(e){if(!e)return null;const n=e.filter(qne);return 0==n.length?null:function(t){return c$(Yne(t,n).map(Gne)).pipe(ye(Xne))}}function vX(e){return null!=e?Qne(Kne(e)):null}function Jne(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function eie(e){return e._rawValidators}function tie(e){return e._rawAsyncValidators}function xX(e){return e?Array.isArray(e)?e:[e]:[]}function CU(e,n){return Array.isArray(e)?e.includes(n):e===n}function nie(e,n){const t=xX(n);return xX(e).forEach(s=>{CU(t,s)||t.push(s)}),t}function iie(e,n){return xX(n).filter(t=>!CU(e,t))}class rie{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(n){this._rawValidators=n||[],this._composedValidatorFn=bX(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=vX(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class _u extends rie{get formDirective(){return null}get path(){return null}}class q0 extends rie{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}const R$="VALID",DU="INVALID",x2="PENDING",N$="DISABLED";function CX(e){return(MU(e)?e.validators:e)||null}function SX(e,n){return(MU(n)?n.asyncValidators:e)||null}function MU(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class cie{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===R$}get invalid(){return this.status===DU}get pending(){return this.status==x2}get disabled(){return this.status===N$}get enabled(){return this.status!==N$}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(nie(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(nie(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(iie(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(iie(n,this._rawAsyncValidators))}hasValidator(n){return CU(this._rawValidators,n)}hasAsyncValidator(n){return CU(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=x2,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=N$,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=R$,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===R$||this.status===x2)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N$:R$}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=x2,this._hasOwnPendingAsyncValidator=!0;const t=Gne(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,s)=>r&&r._find(s),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new cn,this.statusChanges=new cn}_calculateStatus(){return this._allControlsDisabled()?N$:this.errors?DU:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x2)?x2:this._anyControlsHaveStatus(DU)?DU:R$}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){MU(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function Xme(e){return Array.isArray(e)?bX(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Yme(e){return Array.isArray(e)?vX(e):e||null}(this._rawAsyncValidators)}}class DX extends cie{constructor(n,t,r){super(CX(t),SX(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){(function lie(e,n,t){e._forEachChild((r,s)=>{if(void 0===t[s])throw new _e(1002,"")})})(this,0,n),Object.keys(n).forEach(r=>{(function aie(e,n,t){const r=e.controls;if(!(n?Object.keys(r):r).length)throw new _e(1e3,"");if(!r[t])throw new _e(1001,"")})(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const s=this.controls[r];s&&s.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,s)=>{r.reset(n?n[s]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,s)=>((r.enabled||this.disabled)&&(t[s]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((s,c)=>{r=t(r,s,c)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}const F$=new $e("CallSetDisabledState",{providedIn:"root",factory:()=>MX}),MX="always";function P$(e,n,t=MX){AX(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function Qme(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&uie(e,n)})}(e,n),function ege(e,n){const t=(r,s)=>{n.valueAccessor.writeValue(r),s&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function Jme(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&uie(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function Zme(e,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function TU(e,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),IU(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function kU(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function AX(e,n){const t=eie(e);null!==n.validator?e.setValidators(Jne(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const r=tie(e);null!==n.asyncValidator?e.setAsyncValidators(Jne(r,n.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const s=()=>e.updateValueAndValidity();kU(n._rawValidators,s),kU(n._rawAsyncValidators,s)}function IU(e,n){let t=!1;if(null!==e){if(null!==n.validator){const s=eie(e);if(Array.isArray(s)&&s.length>0){const c=s.filter(h=>h!==n.validator);c.length!==s.length&&(t=!0,e.setValidators(c))}}if(null!==n.asyncValidator){const s=tie(e);if(Array.isArray(s)&&s.length>0){const c=s.filter(h=>h!==n.asyncValidator);c.length!==s.length&&(t=!0,e.setAsyncValidators(c))}}}const r=()=>{};return kU(n._rawValidators,r),kU(n._rawAsyncValidators,r),t}function uie(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function die(e,n){AX(e,n)}function fie(e,n){e._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}const oge={provide:_u,useExisting:di(()=>OU)},L$=Promise.resolve();let OU=(()=>{class e extends _u{constructor(t,r,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new cn,this.form=new DX({},bX(t),vX(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){L$.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),P$(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){L$.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){L$.then(()=>{const r=this._findContainer(t.path),s=new DX({});die(s,t),r.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){L$.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){L$.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,fie(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static#e=this.\u0275fac=function(r){return new(r||e)(ue(kc,10),ue(A1,10),ue(F$,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,s){1&r&&yn("submit",function(h){return s.onSubmit(h)})("reset",function(){return s.onReset()})},inputs:{options:[ht.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ni([oge]),wn]})}return e})();function hie(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function pie(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const mie=class extends cie{constructor(n=null,t,r){super(CX(t),SX(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),MU(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=pie(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){hie(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){hie(this._onDisabledChange,n)}_forEachChild(n){}_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(n){pie(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};Promise.resolve();const mge={provide:_u,useExisting:di(()=>RU)};let RU=(()=>{class e extends _u{constructor(t,r,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new cn,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(IU(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return P$(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){TU(t.control||null,t,!1),function rge(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this.submitted=!0,fie(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,s=this.form.get(t.path);r!==s&&(TU(r||null,t),(e=>e instanceof mie)(s)&&(P$(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);die(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function tge(e,n){return IU(e,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){AX(this.form,this),this._oldForm&&IU(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(r){return new(r||e)(ue(kc,10),ue(A1,10),ue(F$,8))};static#t=this.\u0275dir=Vt({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){1&r&&yn("submit",function(h){return s.onSubmit(h)})("reset",function(){return s.onReset()})},inputs:{form:[ht.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ni([mge]),wn,vo]})}return e})();const Nge=["trigger"],Fge=["panel"];function Pge(e,n){if(1&e&&(Ae(0,"span",9),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.placeholder)}}function Lge(e,n){1&e&&ki(0)}function $ge(e,n){if(1&e&&(Ae(0,"span",11),wt(1),ke()),2&e){const t=on(2);Ze(),Pr(t.triggerValue)}}function Bge(e,n){if(1&e&&(Ae(0,"span",10),en(1,Lge,1,0)(2,$ge,2,1),ke()),2&e){const t=on();Ze(),eo(1,t.customTrigger?1:2)}}function zge(e,n){if(1&e){const t=Oa();dy(),sA(),Ae(0,"div",12,13),yn("@transformPanel.done",function(s){return hs(t),so(on()._panelDoneAnimatingStream.next(s.toState))})("keydown",function(s){return hs(t),so(on()._handleKeydown(s))}),ki(2,1),ke()}if(2&e){const t=on();(function k3(e,n,t){rf(bl,nf,mw(qe(),e,n,t),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),vt("ngClass",t.panelClass)("@transformPanel","showing"),hi("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const Vge=[[["mat-select-trigger"]],"*"],jge=["mat-select-trigger","*"],Uge={transformPanelWrap:A0("transformPanelWrap",[Nh("* => void",vL("@transformPanel",[_r()],{optional:!0}))]),transformPanel:A0("transformPanel",[Rh("void",La({opacity:0,transform:"scale(1, 0.8)"})),Nh("void => showing",Om("120ms cubic-bezier(0, 0, 0.2, 1)",La({opacity:1,transform:"scale(1, 1)"}))),Nh("* => void",Om("100ms linear",La({opacity:0})))])};let $ie=0;const Bie=new $e("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{const e=Xe(Bh);return()=>e.scrollStrategies.reposition()}}),Wge=new $e("MAT_SELECT_CONFIG"),qge={provide:Bie,deps:[Bh],useFactory:function Hge(e){return()=>e.scrollStrategies.reposition()}},Gge=new $e("MatSelectTrigger");class Xge{constructor(n,t){this.source=n,this.value=t}}let zie=(()=>{class e{_scrollOptionIntoView(t){const r=this.options.toArray()[t];if(r){const s=this.panel.nativeElement,c=function hW(e,n,t){if(t.length){let r=n.toArray(),s=t.toArray(),c=0;for(let h=0;ht+r?Math.max(0,e-r+n):t}(h.offsetTop,h.offsetHeight,s.scrollTop,s.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new Xge(this,t)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Vme.required)??!1}set required(t){this._required=t,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=t}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,r,s,c,h,y,E,M,R,$,j,X,K,ie){this._viewportRuler=t,this._changeDetectorRef=r,this._ngZone=s,this._elementRef=h,this._dir=y,this._parentFormField=R,this.ngControl=$,this._liveAnnouncer=K,this._defaultOptions=ie,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(me,Me)=>me===Me,this._uid="mat-select-"+$ie++,this._triggerAriaLabelledBy=null,this._destroy=new It,this.stateChanges=new It,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+$ie++,this._panelDoneAnimatingStream=new It,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=qL(()=>{const me=this.options;return me?me.changes.pipe(Wl(me),Sr(()=>Oh(...me.map(Me=>Me.onSelectionChange)))):this._ngZone.onStable.pipe(Bo(1),Sr(()=>this.optionSelectionChanges))}),this.openedChange=new cn,this._openedStream=this.openedChange.pipe(ii(me=>me),ye(()=>{})),this._closedStream=this.openedChange.pipe(ii(me=>!me),ye(()=>{})),this.selectionChange=new cn,this.valueChange=new cn,this._trackedModal=null,this._skipPredicate=me=>!this.panelOpen&&me.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),null!=ie?.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=ie.typeaheadDebounceInterval),this._errorStateTracker=new Cj(c,$,M,E,this.stateChanges),this._scrollStrategyFactory=X,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(j)||0,this.id=this.id}ngOnInit(){this._selectionModel=new _ae(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Ih(),Kn(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Kn(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Kn(this._destroy)).subscribe(t=>{t.added.forEach(r=>r.select()),t.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(Wl(null),Kn(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),r=this.ngControl;if(t!==this._triggerAriaLabelledBy){const s=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?s.setAttribute("aria-labelledby",t):s.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(void 0!==this._previousControl&&null!==r.disabled&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){const t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;const r=`${this.id}-panel`;this._trackedModal&&tj(this._trackedModal,"aria-owns",r),function F9(e,n,t){const r=nj(e,n);t=t.trim(),!r.some(s=>s.trim()===t)&&(r.push(t),e.setAttribute(n,r.join(" ")))}(t,"aria-owns",r),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(tj(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const r=t.keyCode,s=40===r||38===r||37===r||39===r,c=13===r||32===r,h=this._keyManager;if(!h.isTyping()&&c&&!kh(t)||(this.multiple||t.altKey)&&s)t.preventDefault(),this.open();else if(!this.multiple){const y=this.selected;h.onKeydown(t);const E=this.selected;E&&y!==E&&this._liveAnnouncer.announce(E.viewValue,1e4)}}_handleOpenKeydown(t){const r=this._keyManager,s=t.keyCode,c=40===s||38===s,h=r.isTyping();if(c&&t.altKey)t.preventDefault(),this.close();else if(h||13!==s&&32!==s||!r.activeItem||kh(t))if(!h&&this._multiple&&65===s&&t.ctrlKey){t.preventDefault();const y=this.options.some(E=>!E.disabled&&!E.selected);this.options.forEach(E=>{E.disabled||(y?E.select():E.deselect())})}else{const y=r.activeItemIndex;r.onKeydown(t),this._multiple&&c&&t.shiftKey&&r.activeItem&&r.activeItemIndex!==y&&r.activeItem._selectViaInteraction()}else t.preventDefault(),r.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Bo(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{const r=this._selectOptionByValue(t);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const r=this.options.find(s=>{if(this._selectionModel.isSelected(s))return!1;try{return null!=s.value&&this._compareWith(s.value,t)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_getOverlayWidth(t){return"auto"===this.panelWidth?(t instanceof $G?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new TD(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Oh(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Kn(t)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Oh(...this.options.map(r=>r._stateChanges)).pipe(Kn(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,r){const s=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(s!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),r&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),r&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),s!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((r,s)=>this.sortComparator?this.sortComparator(r,s,t):t.indexOf(r)-t.indexOf(s)),this.stateChanges.next()}}_propagateChanges(t){let r;r=this.multiple?this.selected.map(s=>s.value):this.selected?this.selected.value:t,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let r=0;r0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let r=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static#e=this.\u0275fac=function(r){return new(r||e)(ue(pO),ue(Qo),ue(Bt),ue(lW),ue(zn),ue(rd,8),ue(OU,8),ue(RU,8),ue(kne,8),ue(q0,10),Hc("tabindex"),ue(Bie),ue(pj),ue(Wge,8))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-select"]],contentQueries:function(r,s,c){if(1&r&&(vs(c,Gge,5),vs(c,bL,5),vs(c,pn,5)),2&r){let h;zi(h=Pi())&&(s.customTrigger=h.first),zi(h=Pi())&&(s.options=h),zi(h=Pi())&&(s.optionGroups=h)}},viewQuery:function(r,s){if(1&r&&(ha(Nge,5),ha(Fge,5),ha(Jee,5)),2&r){let c;zi(c=Pi())&&(s.trigger=c.first),zi(c=Pi())&&(s.panel=c.first),zi(c=Pi())&&(s._overlayDir=c.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,s){1&r&&yn("keydown",function(h){return s._handleKeydown(h)})("focus",function(){return s._onFocus()})("blur",function(){return s._onBlur()}),2&r&&(hi("id",s.id)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s.panelOpen?s.id+"-panel":null)("aria-expanded",s.panelOpen)("aria-label",s.ariaLabel||null)("aria-required",s.required.toString())("aria-disabled",s.disabled.toString())("aria-invalid",s.errorState)("aria-activedescendant",s._getAriaActiveDescendant()),In("mat-mdc-select-disabled",s.disabled)("mat-mdc-select-invalid",s.errorState)("mat-mdc-select-required",s.required)("mat-mdc-select-empty",s.empty)("mat-mdc-select-multiple",s.multiple))},inputs:{userAriaDescribedBy:[ht.None,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[ht.HasDecoratorInputTransform,"disabled","disabled",cr],disableRipple:[ht.HasDecoratorInputTransform,"disableRipple","disableRipple",cr],tabIndex:[ht.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jw(t)],hideSingleSelectionIndicator:[ht.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",cr],placeholder:"placeholder",required:[ht.HasDecoratorInputTransform,"required","required",cr],multiple:[ht.HasDecoratorInputTransform,"multiple","multiple",cr],disableOptionCentering:[ht.HasDecoratorInputTransform,"disableOptionCentering","disableOptionCentering",cr],compareWith:"compareWith",value:"value",ariaLabel:[ht.None,"aria-label","ariaLabel"],ariaLabelledby:[ht.None,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[ht.HasDecoratorInputTransform,"typeaheadDebounceInterval","typeaheadDebounceInterval",jw],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[ni([{provide:Tne,useExisting:e},{provide:FD,useExisting:e}]),Vs,vo,xi],ngContentSelectors:jge,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(r,s){if(1&r&&(Ra(Vge),Ae(0,"div",0,1),yn("click",function(){return s.open()}),Ae(3,"div",2),en(4,Pge,2,1,"span",3)(5,Bge,3,1),ke(),Ae(6,"div",4)(7,"div",5),dy(),Ae(8,"svg",6),Wt(9,"path",7),ke()()()(),en(10,zge,3,9,"ng-template",8),yn("backdropClick",function(){return s.close()})("attach",function(){return s._onAttached()})("detach",function(){return s.close()})),2&r){const c=lm(1);Ze(3),hi("id",s._valueId),Ze(),eo(4,s.empty?4:5),Ze(6),vt("cdkConnectedOverlayPanelClass",s._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",s._scrollStrategy)("cdkConnectedOverlayOrigin",s._preferredOverlayOrigin||c)("cdkConnectedOverlayOpen",s.panelOpen)("cdkConnectedOverlayPositions",s._positions)("cdkConnectedOverlayWidth",s._overlayWidth)}},dependencies:[$G,Jee,qF],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Uge.transformPanel]},changeDetection:0})}return e})(),Vie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({providers:[qge],imports:[Ir,BG,Nj,rs,Tm,Fme,Nj,rs]})}return e})(),Yge=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vie]})}return e})(),Kge=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,Vie,Yge]})}return e})(),jie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,HG,h2,WL]})}return e})(),Uie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})(),Hie=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,v2,wne]})}return e})(),NU=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,jie,Uie,Hie,_X,jie,Uie,Hie,_X]})}return e})();function Wie(e,n,t){return t?Wie(e,n).pipe(iO(t)):new Qn(r=>{const s=(...h)=>r.next(1===h.length?h[0]:h),c=e(s);return Jt(n)?()=>n(s,c):void 0})}const B$={datasetsPath:"assets/generated/aggregate-table-data.json",subLabel:"Drug",subLabelFlag:"Tox lab flag",timeSliderSource:["deaths","DOD"]};var xM=function(e){return e.pie="pie-chart",e.verticalBar="vertical-bar-chart",e.horizontalBar="horizontal-bar-chart",e}(xM||{});const LX={[xM.pie]:{maxDistinctValues:4},[xM.verticalBar]:{maxDistinctValues:50},[xM.horizontalBar]:{maxDistinctValues:500}};function qie(e){return e??{ids:[],entities:{}}}let z$=(()=>{let e=class U$ extends IG{selectId(t){return"string"==typeof t?t:t.name}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=Fi(U$)))(s||U$)}})();static#t=this.\u0275prov=Ue({token:U$,factory:U$.\u0275fac})};return e=Nn([f2(),rM({name:"datasets",defaults:qie()})],e),e})();var w2=function(e){return e.all="all",e.sub="sub",e.nonSub="non-sub",e}(w2||{});let E2=(()=>{let e=class LU extends IG{get subLabel$(){return this.state$.pipe(a$("subLabel"),Ih())}get subLabelFlag$(){return this.state$.pipe(a$("subLabelFlag"),Ih())}constructor(t){super(),this.datasetsState=t}selectId(t,r){return"object"==typeof t&&"dataset"in t&&(r=t,t=t.dataset),`${this.datasetsState.selectId(t)}:${"string"==typeof r?r:r.name}`}getVariable(t){return this.entities$.pipe(a$(t),Ih())}getVariables(t,r){const s=this.createVariableSelector(t,r);return this.entitiesArray$.pipe(ye(c=>c.filter(s)))}getSubVariables(t){return this.getVariables(t,w2.sub)}getMetadata(t){return this.getVariable(t).pipe(ye(r=>{if(void 0===r)return[];const s=[{label:"Type",value:r.type},{label:"Description",value:r.description},{label:"Missing values",value:`${r.percentMissing}%`}];if("summary"===r.distribution.type){const{distribution:{summary:{distinct:c,min:h,max:y}}}=r;s.push({label:"Distinct entries",value:""+c},{label:"Minimum value/length",value:""+h},{label:"Maximum value/length",value:""+y})}return s}))}createVariableSelector(t,r){const s=[];if(void 0!==t){const{datasetsState:h}=this,y=h.selectId.bind(h),E=y(t);s.push(M=>y(M.dataset)===E)}const{snapshot:{subLabelFlag:c}}=this;switch(r){case w2.nonSub:s.push(h=>h.description!==c);break;case w2.sub:s.push(h=>h.description===c)}return 0===s.length?()=>!0:1===s.length?s[0]:h=>s.every(y=>y(h))}static#e=this.\u0275fac=function(r){return new(r||LU)(pe(z$))};static#t=this.\u0275prov=Ue({token:LU,factory:LU.\u0275fac})};return Nn([Fm()],e.prototype,"subLabel$",null),Nn([Fm()],e.prototype,"subLabelFlag$",null),e=Nn([f2(),rM({name:"datasetVariables",defaults:{...qie(),subLabel:B$.subLabel,subLabelFlag:B$.subLabelFlag}})],e),e})();function Gie(e,n=c1,t){const r=Pa(e,n);return function Qge(e,n){return be((t,r)=>{const{leading:s=!0,trailing:c=!1}=n??{};let h=!1,y=null,E=null,M=!1;const R=()=>{E?.unsubscribe(),E=null,c&&(X(),M&&r.complete())},$=()=>{E=null,M&&r.complete()},j=K=>E=Gs(e(K)).subscribe(Se(r,R,$)),X=()=>{if(h){h=!1;const K=y;y=null,r.next(K),!M&&j(K)}};t.subscribe(Se(r,K=>{h=!0,y=K,(!E||E.closed)&&(s?X():j(K))},()=>{M=!0,(!(c&&h&&E)||E.closed)&&r.complete()}))})}(()=>r,t)}var T1=function(e){return e.pie="pie-chart",e.histogram="histogram",e.verticalBar="bar-chart",e.horizontalBar="horizontal-bar-chart",e.summary="summary",e}(T1||{});function Xie(e,n=[],t={}){const{flipAxes:r,xLabel:s,yLabel:c}=t;return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",autosize:{resize:!0},width:"container",view:{strokeOpacity:0},data:{name:"distribution",values:n},transform:[{aggregate:[{op:"sum",field:"count",as:"total"}],groupby:["value"]},{calculate:'isDate(datum.value) ? timeFormat(datum.value, "%Y") : toString(datum.value)',as:"label"},{calculate:'format(datum.total, ",")',as:"totalLabel"}],encoding:{x:r?Kie(s):Yie(s,0),y:r?Yie(c):Kie(c)},layer:[{mark:{type:"bar",width:24,color:"#77ACF0",strokeWidth:1,stroke:"white",orient:r?"horizontal":"vertical"}},{mark:{type:"text",align:r?"left":"center",baseline:"middle",dx:r?3:0,dy:r?0:-10},encoding:{text:{field:"totalLabel",type:"nominal"}}}]}}function Yie(e,n){return{field:"label",type:"nominal",axis:{minExtent:0,title:e,titlePadding:10,titleColor:"#212121",titleFontSize:12,titleFontWeight:"bold",labelFlush:!1,labelAngle:n,domainColor:"#757575",grid:!1,tickColor:"#757575"}}}function Kie(e){return{field:"total",type:"quantitative",title:"Count of Records",axis:{title:e,titlePadding:10,titleColor:"#212121",titleFontSize:12,titleFontWeight:"bold",labelFontSize:10,domainColor:"#757575",gridColor:"#e0e0e0",tickColor:"#757575"}}}function Zie(e,n=[]){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:"container",height:350,autosize:{resize:!0},view:{strokeOpacity:0},data:{name:"distribution",values:n},transform:[{aggregate:[{op:"sum",field:"count",as:"count"}],groupby:["value"]},{joinaggregate:[{op:"sum",field:"count",as:"total"}]},{calculate:"datum.count / datum.total",as:"percentage"},{calculate:'isDate(datum.value) ? timeFormat(datum.value, "%Y") : toString(datum.value)',as:"label"},{calculate:'"(" + datum.count + ")"',as:"countLabel"},{calculate:'format(datum.percentage, ",.2%")',as:"percentageLabel"}],encoding:{color:{field:"value",type:"nominal",scale:{scheme:"tableau20"},legend:{title:null,orient:"top-left",symbolType:"square",labelExpr:"datum.label",labelFontWeight:"bold"}},theta:{field:"count",type:"quantitative",stack:!0}},layer:[{mark:{type:"arc",radius:130,stroke:"white",strokeWidth:2}},{mark:{type:"text",radius:160,fill:"black",fontWeight:"bold"},encoding:{text:{field:"percentageLabel",type:"nominal"}}},{mark:{type:"text",radius:160,fill:"black",yOffset:15},encoding:{text:{field:"countLabel",type:"nominal"}}}]}}function Jge(e=[]){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:"container",height:150,title:{text:"Select Date Range to Update Datasets",align:"left",anchor:"start"},view:{strokeOpacity:0},data:{name:"distribution",values:e},mark:"line",params:[{name:"period",select:{type:"interval",encodings:["x"],mark:{fill:"#6ea7ef",fillOpacity:.15}}}],encoding:{color:{value:"#6ea7ef"},x:{field:"period",type:"temporal",title:"Year",axis:{minExtent:0,titlePadding:10,titleFontSize:14,tickColor:"#757575",domainColor:"#757575",labelExpr:'[month(datum.value) === 0 ? timeFormat(datum.value, "%Y") : ""]',labelFlush:!1,gridDash:{condition:{test:{field:"value",timeUnit:"month",equal:7},value:[2,2]},value:[]},gridColor:{condition:{test:{field:"value",timeUnit:"month",equal:1},value:"#bdbdbd"},value:"#e0e0e0"}}},y:{aggregate:"sum",field:"count",type:"quantitative",title:"# Deaths",axis:{titlePadding:10,titleFontSize:14,domainColor:"#757575",labelFontSize:{condition:{test:{field:"index",equal:1},value:0},value:10},gridColor:"#e0e0e0",gridOpacity:{condition:{test:{field:"index",equal:1},value:0},value:1},tickColor:"#757575",tickOpacity:{condition:{test:{field:"index",equal:1},value:0},value:1}}}}}}let $X=(()=>{class e{constructor(){this.createBarChart=Xie,this.createPieChart=Zie,this.createTimeSlider=Jge}createChart(t){const{type:r,distribution:{type:s,summary:{distinct:c}}}=t;if(Object.values(T1).includes(s)&&s!==T1.summary){if(c<=LX[xM.pie].maxDistinctValues)return Zie();switch(s){case T1.pie:case T1.histogram:case T1.verticalBar:if(c<=LX[xM.verticalBar].maxDistinctValues)return this.createBarChart(t,[],{xLabel:t.name,yLabel:"Count of Records"});case T1.horizontalBar:if(c<=LX[xM.horizontalBar].maxDistinctValues||"DATE"===r)return this.createBarChart(t,[],{flipAxes:!0,xLabel:"# Total Deaths",yLabel:t.name});default:return}}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var e_e=tn(316);function Qie(e){const n=new Date(e);return Number.isNaN(+n)?void 0:n}let BX=(()=>{class e{constructor(t){this.http=t}load(t){const{distribution:{url:r}}=t,s=this.getTransformHandlers(t),c={header:!0,delimiter:",",skipEmptyLines:!0,dynamicTyping:this.getDynamicTypingConfig(t),transform:(h,y)=>{const E=s[y];return E?E(h):h}};return this.http.get(r,{responseType:"text"}).pipe(ye(h=>(0,e_e.parse)(h,c)),ye(h=>this.aggregateResult(t,h.data)))}getDynamicTypingConfig(t){return{value:void 0===this.getValueTransform(t)}}getTransformHandlers(t){return{period:Qie,value:this.getValueTransform(t),count:Number}}aggregateResult(t,r){return"DATE"===t.type?this.aggregateByYear(r):r}getValueTransform(t){switch(t.type){case"BOOLEAN":return r=>"0"===r?"False":"True";case"DATE":return Qie;default:return}}aggregateByYear(t){const r=t.reduce((h,{value:y,count:E})=>{const M=y?.getFullYear?.(),R=(h.get(M)??0)+E;return h.set(M,R)},new Map);return Array.from(r.keys()).sort((h,y)=>void 0===h?1:void 0===y?-1:h-y).map(h=>{const y=void 0!==h?new Date(h,0):void 0;return{period:y,value:y??"",count:r.get(h)}})}static#e=this.\u0275fac=function(r){return new(r||e)(pe(M_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),t_e=(()=>{class e{constructor(t,r,s){this.chartFactory=t,this.dataLoader=r,this.variableStore=s,this.visualizations=[],this.filterSources$=new J(1),this.filterSources$.next(zt(void 0))}setVariables(t){this.visualizations=t.map(r=>{const s=this.variableStore.selectId(r),c=this.variableStore.getMetadata(s),h=this.chartFactory.createChart(r);return{variable:r,metadata:c,spec:h,data:h&&this.createDataSource(r)}})}setFilterSource(t){this.filterSources$.next(t)}createDataSource(t){const r=this.filterSources$.pipe(w$(),Wl(void 0));return d1([this.dataLoader.load(t),r]).pipe(Gie(100)).pipe(ye(([h,y])=>this.filterData(h,y)))}filterData(t,r){if(void 0===r)return t;const[s,c]=r;return t.filter(({period:y})=>void 0===y||s<=+y&&+y<=c)}static#e=this.\u0275fac=function(r){return new(r||e)(pe($X),pe(BX),pe(E2))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})(),Jie=(()=>{class e{get filteredData(){const t=this.createFilterPred();return t?this.data.filter(t):this.data}get hasDataPeriods(){return this.data.some(({period:t})=>!!t)}constructor(t){this.loader=t,this.dataEmitter=new J(1),this.data=[],this.data$=this.dataEmitter.asObservable()}ngOnDestroy(){this.clearData(),this.clearFilter()}load(t){this.clearData(),this.clearFilter();const r=this.loader.load(t);this.dataSub=r.subscribe(this.setData.bind(this))}setData(t){t!==this.data&&(this.clearData(),this.data=t,this.updateFiltering())}setFilterSource(t){t!==this.filterSource&&(this.clearFilter(),this.filterSource=t,this.updateFiltering())}createFilterPred(){if(!this.filter)return;const[t,r]=this.filter;return({period:s})=>!s||t<=+s&&+s<=r}updateFiltering(){if(this.filterSource)if(this.hasDataPeriods){if(!this.filterSub){let t=!1;if(this.filterSub=this.filterSource.subscribe(r=>{t=!0,this.filter=r,this.emitData()}),t)return}}else this.clearFilter();this.emitData()}emitData(){this.dataEmitter.next(this.filteredData)}clearData(){this.dataSub?.unsubscribe?.(),this.data=[]}clearFilter(){this.filterSub?.unsubscribe?.(),this.filterSub=void 0,this.filter=void 0}static#e=this.\u0275fac=function(r){return new(r||e)(pe(BX))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac})}return e})();function n_e(e,n){if(1&e&&(Ae(0,"div",3)(1,"div",4),wt(2),ke(),Ae(3,"div",5),wt(4),ke()()),2&e){const t=n.$implicit;Ze(2),lf("",t.label,":"),Ze(2),Pr(t.value)}}let i_e=(()=>{class e{constructor(){this.clsName="dataset-summary",this.summary=[],this.title=""}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-dataset-summary"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{summary:"summary",title:"title"},decls:4,vars:2,consts:[[1,"title"],[1,"summary"],["class","summary-item",4,"ngFor","ngForOf"],[1,"summary-item"],[1,"label"],[1,"value"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1),ke(),Ae(2,"div",1),en(3,n_e,5,2,"div",2),ke()),2&r&&(Ze(),Pr(s.title),Ze(2),vt("ngForOf",s.summary))},dependencies:[o0],styles:["[_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-weight:700;color:#000}[_nghost-%COMP%] .summary[_ngcontent-%COMP%]{padding-top:.5em;padding-left:1rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%]{display:flex;font-size:.8rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:700;color:#000;margin-right:.5rem}[_nghost-%COMP%] .summary[_ngcontent-%COMP%] .summary-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:lighter}"],changeDetection:0})}return e})();function r_e(e,n){1&e&&(Ae(0,"div",6),wt(1," Loading visualization... "),ke())}function o_e(e,n){1&e&&(Ae(0,"div",7),wt(1," No data available for the selected time period "),ke())}function s_e(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",8),yn("viewChange",function(s){return hs(t),so(on(2).attachView(s))}),ke()}if(2&e){const t=on(2);In("no-data",0===t.data.length),vt("spec",t.spec)("autosize",t.autosize)("options",t.options)}}function a_e(e,n){if(1&e&&(Ae(0,"div",2),en(1,r_e,2,0,"div",3)(2,o_e,2,0,"div",4)(3,s_e,1,5,"ngx-vega",5),ke()),2&e){const t=on();Ze(),vt("ngIf",t.loading),Ze(),vt("ngIf",0===t.data.length&&!t.loading),Ze(),vt("ngIf",t.spec)}}const l_e=100;let c_e=(()=>{class e{get isSummaryOnly(){return this.variable.distribution.type===T1.summary}constructor(t,r,s,c){this.cdr=t,this.chartFactory=r,this.dataManager=s,this.variableState=c,this.autosize=!1,this.loading=!0,this.data=[],this.subscriptions=new xn;const h=s.data$.subscribe(y=>{this.data=y,this.scheduleViewDataUpdate()});this.subscriptions.add(h),this.subscriptions.add(()=>this.clearViewDataUpdate())}ngOnChanges(t){"variable"in t&&this.onVariableChange(),("filterThrottle"in t||"filterSource"in t)&&this.onFilterChange()}ngOnDestroy(){this.subscriptions.unsubscribe()}attachView(t){this.view=t,this.scheduleViewDataUpdate()}resetView(){this.loading=!0,this.spec=void 0,this.metadata=void 0,this.data=[],this.view=void 0}onVariableChange(){this.resetView();const{variable:t,chartFactory:r,dataManager:s,variableState:c}=this,h=c.selectId(t),y=this.spec=r.createChart(t);this.metadata=c.getMetadata(h),y?s.load(t):s.setData([])}onFilterChange(){const{filterSource:t,filterThrottle:r=l_e,dataManager:s}=this,c=t?.pipe?.(Gie(r));s.setFilterSource(c)}scheduleViewDataUpdate(){var t=this;if(void 0!==this.viewDataUpdateTaskId)return;const r=()=>s===this.viewDataUpdateTaskId,s=this.viewDataUpdateTaskId=setTimeout((0,sn.Z)(function*(){if(!r()||!t.view)return;const c=t.getDataBindingName();void 0!==c?(t.view.data(c,t.data),yield t.view.runAsync(),r()&&(t.loading=!1,t.cdr.markForCheck(),t.clearViewDataUpdate())):t.clearViewDataUpdate()}))}clearViewDataUpdate(){const t=this.viewDataUpdateTaskId;void 0!==t&&(clearTimeout(t),this.viewDataUpdateTaskId=void 0)}getDataBindingName(){if(void 0!==this.dataBindingName)return this.dataBindingName;let t;return this.view?.getState({recurse:!1,signals:()=>!1,data:r=>(t=r,!1)}),t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(Qo),ue($X),ue(Jie),ue(E2))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-variable-visualization"]],inputs:{variable:"variable",filterThrottle:"filterThrottle",filterSource:"filterSource",dataBindingName:"dataBindingName",autosize:"autosize",options:"options"},features:[ni([Jie]),vo],decls:3,vars:5,consts:[[1,"summary",3,"title","summary"],["class","visualization-area",4,"ngIf"],[1,"visualization-area"],["class","loading-message",4,"ngIf"],["class","no-data-message",4,"ngIf"],["class","visualization",3,"no-data","spec","autosize","options","viewChange",4,"ngIf"],[1,"loading-message"],[1,"no-data-message"],[1,"visualization",3,"spec","autosize","options","viewChange"]],template:function(r,s){1&r&&(Wt(0,"agc-dataset-summary",0),uf(1,"async"),en(2,a_e,4,3,"div",1)),2&r&&(vt("title",s.variable.name)("summary",cm(1,3,s.metadata)),Ze(2),vt("ngIf",!s.isSummaryOnly))},dependencies:[x_,v2,i_e,PI],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;width:100%}[_nghost-%COMP%] .summary[_ngcontent-%COMP%]{flex-grow:1;margin-right:1rem}[_nghost-%COMP%] .visualization-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:3;flex-shrink:1;min-width:25rem}[_nghost-%COMP%] .visualization-area[_ngcontent-%COMP%] .visualization.no-data[_ngcontent-%COMP%]{display:none}"],changeDetection:0})}return e})();function u_e(e,n){if(1&e&&(Ae(0,"mat-option",6),wt(1),ke()),2&e){const t=n.$implicit;vt("value",t),Ze(),Pr(t)}}function d_e(e,n){if(1&e){const t=Oa();Ae(0,"div",11),yn("click",function(){const c=hs(t).$implicit;return so(on(2).changeSelection(c))}),wt(1),ke()}if(2&e){const t=n.$implicit;In("selected",t===on(2).selection),Ze(),Pr(t)}}function f_e(e,n){if(1&e){const t=Oa();Ae(0,"div",18),yn("click",function(){const c=hs(t).$implicit;return so(on(3).subOptionFilter=c)}),wt(1),ke()}if(2&e){const t=n.$implicit,r=on(3);In("selected",r.subOptionFilter===t)("disabled",!r.validSubOption(t)),Ze(),Pr(t)}}function h_e(e,n){if(1&e){const t=Oa();Ae(0,"div",11),yn("click",function(){const c=hs(t).$implicit;return so(on(3).changeSelection(c))}),wt(1),ke()}if(2&e){const t=n.$implicit;In("selected",t===on(3).selection),Ze(),Pr(t)}}function p_e(e,n){1&e&&(Ae(0,"div",19),wt(1,"No options match the selected filter."),ke())}function m_e(e,n){if(1&e&&(Ae(0,"div",12)(1,"div",13)(2,"div",14),wt(3),ke(),Ae(4,"div",15),en(5,f_e,2,5,"div",16),ke()(),Ae(6,"div",8),en(7,h_e,2,3,"div",9)(8,p_e,2,0,"div",17),ke()()),2&e){const t=on(2);Ze(3),lf("",t.subLabel,":"),Ze(2),vt("ngForOf",t.LETTERS),Ze(2),vt("ngForOf",t.getFilteredSubOptions()),Ze(),vt("ngIf",t.getFilteredSubOptions().length<1)}}function g_e(e,n){if(1&e&&(Ae(0,"div",7)(1,"div",8),en(2,d_e,2,3,"div",9),ke(),en(3,m_e,9,4,"div",10),ke()),2&e){const t=on();Ze(2),vt("ngForOf",t.options),Ze(),vt("ngIf",t.subOptions.length>0)}}let __e=(()=>{class e{constructor(){this.clsName="agc-sub-selector",this.label="",this.selection="",this.options=[],this.subLabel="",this.subOptions=[],this.selectionChange=new cn,this.showMenu=!1,this.subOptionFilter="A",this.LETTERS=[...Array(26)].map((t,r)=>String.fromCharCode(r+65))}ngOnInit(){this.subOptions.length>0&&(this.subOptionFilter=this.subOptions[0].charAt(0))}ngOnChanges(t){"selection"in t&&(this.showMenu=!1)}get allOptions(){return this.subOptions.length<1?this.options:this.options.concat(this.subOptions)}get enabled(){return this.options.length>0}toggleMenu(){this.showMenu=!(!this.options||this.options.length<=0||this.showMenu)}changeSelection(t){this.selection=t===this.selection?"":t,this.showMenu=!1,this.selectionChange.emit(this.selection)}getFilteredSubOptions(){return""===this.subOptionFilter?this.subOptions:this.subOptions.filter(t=>t.charAt(0).toLowerCase()===this.subOptionFilter.toLowerCase())}validSubOption(t){return!(!this.subOptions||this.subOptions.map(s=>s.charAt(0).toLowerCase()).indexOf(t.toLowerCase())<0)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-sub-selector"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{label:"label",selection:"selection",options:"options",subLabel:"subLabel",subOptions:"subOptions"},outputs:{selectionChange:"selectionChange"},features:[vo],decls:8,vars:4,consts:[[1,"select-container"],["id","selection"],["aria-label","selection",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],[1,"select-cover",3,"click"],["class","select-menu mat-elevation-z3",4,"ngIf"],[3,"value"],[1,"select-menu","mat-elevation-z3"],[1,"options"],["class","option",3,"selected","click",4,"ngFor","ngForOf"],["class","sub-options-container",4,"ngIf"],[1,"option",3,"click"],[1,"sub-options-container"],[1,"sub-options-header"],[1,"option"],[1,"sub-options-filters"],["class","letter-filter",3,"selected","disabled","click",4,"ngFor","ngForOf"],["class","empty-message",4,"ngIf"],[1,"letter-filter",3,"click"],[1,"empty-message"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"mat-form-field")(2,"mat-label",1),wt(3),ke(),Ae(4,"mat-select",2),yn("valueChange",function(h){return s.selection=h}),en(5,u_e,2,2,"mat-option",3),ke()(),Ae(6,"div",4),yn("click",function(){return s.toggleMenu()}),ke(),en(7,g_e,4,2,"div",5),ke()),2&r&&(Ze(3),Pr(s.label),Ze(),vt("value",s.selection),Ze(),vt("ngForOf",s.allOptions),Ze(2),vt("ngIf",s.showMenu))},dependencies:[o0,x_,Nne,xU,zie,bL],styles:["[_nghost-%COMP%] .select-container[_ngcontent-%COMP%]{position:relative;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{z-index:1}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-cover[_ngcontent-%COMP%]{width:100%;height:100%;z-index:2;position:absolute;left:0;top:0;cursor:pointer}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-cover.inactive[_ngcontent-%COMP%]{cursor:disabled!important}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%]{width:45rem;min-height:5rem;max-height:45vh;overflow:auto;position:absolute;left:0;display:block;margin-top:-1rem;background-color:#fff;padding:.5rem;z-index:3}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu.hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%]{width:100%;display:flex;padding:.5rem}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%]{width:100%;display:flex;padding:.75rem 0rem;cursor:pointer}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter[_ngcontent-%COMP%]{padding:.25rem;color:#000;border-bottom:1px solid white}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter.selected[_ngcontent-%COMP%]{background-color:#fafafa;font-weight:700;color:#000;border-bottom:1px solid black}[_nghost-%COMP%] .select-container[_ngcontent-%COMP%] .select-menu[_ngcontent-%COMP%] .sub-options-container[_ngcontent-%COMP%] .sub-options-header[_ngcontent-%COMP%] .sub-options-filters[_ngcontent-%COMP%] .letter-filter.disabled[_ngcontent-%COMP%]{color:#d3d3d3;cursor:not-allowed}[_nghost-%COMP%] .options[_ngcontent-%COMP%]{width:100%;height:-moz-fit-content;height:fit-content;display:flex;flex-wrap:wrap;flex-basis:24%}[_nghost-%COMP%] .options[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{background-color:#fafafa;cursor:pointer}[_nghost-%COMP%] .options[_ngcontent-%COMP%] .empty-message[_ngcontent-%COMP%]{width:100%;text-align:center;font-style:italic;padding-bottom:1rem}[_nghost-%COMP%] .option[_ngcontent-%COMP%]{width:11rem;min-width:11rem;padding:1rem 0rem;text-align:center;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%] .option.selected[_ngcontent-%COMP%]{background-color:#fafafa}"],changeDetection:0})}return e})();function y_e(e,n){if(1&e&&(Ae(0,"mat-option",7),wt(1),ke()),2&e){const t=n.$implicit;vt("value",n.index),Ze(),Pr(t.name)}}function b_e(e,n){if(1&e&&(Ae(0,"div",8),wt(1),ke()),2&e){const t=on();Ze(),Pr(t.selectedDataset.description)}}let v_e=(()=>{class e{constructor(){this.clsName="agc-table-data-selector",this.datasets=[],this.variables=[],this.subLabel="",this.subVariables=[],this.datasetChange=new cn,this.dataVariableChange=new cn,this.selectAll=new cn}get variableNames(){return this.variables.map(t=>t.name)}get subVariableNames(){return this.subVariables.map(t=>t.name)}setDataset(t){void 0!==t&&t!==this.selectedDataset&&(this.selectedDataset=t,this.selectedVariable=void 0,this.datasetChange.emit(t))}setVariableFromName(t){if(void 0!==this.selectedDataset){const r=this.variables.find(s=>s.name===t)??this.subVariables.find(s=>s.name===t);r?.dataset===this.selectedDataset.name&&(this.selectedVariable=r,this.dataVariableChange.emit(r))}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-table-data-selector"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{datasets:"datasets",variables:"variables",subLabel:"subLabel",subVariables:"subVariables"},outputs:{datasetChange:"datasetChange",dataVariableChange:"dataVariableChange",selectAll:"selectAll"},decls:10,vars:7,consts:[[1,"selections-container"],["id","datasetLabel"],["aria-label","datasetLabel",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["label","Data Variable",3,"options","subLabel","subOptions","selection","selectionChange"],["mat-raised-button","",1,"all",3,"disabled","click"],["class","description",4,"ngIf"],[3,"value"],[1,"description"]],template:function(r,s){if(1&r&&(Ae(0,"div",0)(1,"mat-form-field")(2,"mat-label",1),wt(3,"Dataset"),ke(),Ae(4,"mat-select",2),yn("selectionChange",function(h){return s.setDataset(s.datasets[h.value])}),en(5,y_e,2,2,"mat-option",3),ke()(),Ae(6,"agc-sub-selector",4),yn("selectionChange",function(h){return s.setVariableFromName(h)}),ke(),Ae(7,"button",5),yn("click",function(){return s.selectAll.emit()}),wt(8," Select All Variables "),ke()(),en(9,b_e,2,1,"div",6)),2&r){let c;Ze(5),vt("ngForOf",s.datasets),Ze(),vt("options",s.variableNames)("subLabel",s.subLabel)("subOptions",s.subVariableNames)("selection",null!==(c=null==s.selectedVariable?null:s.selectedVariable.name)&&void 0!==c?c:""),Ze(),vt("disabled",void 0===s.selectedDataset),Ze(2),vt("ngIf",null==s.selectedDataset?null:s.selectedDataset.description)}},dependencies:[o0,x_,Nne,xU,zie,bL,__e],styles:["[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]:first-of-type{margin-right:2rem}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .mdc-text-field, [_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .mat-mdc-form-field-focus-overlay{background-color:inherit;padding-left:0}[_nghost-%COMP%] .selections-container[_ngcontent-%COMP%] .all[_ngcontent-%COMP%]{margin-left:2rem;margin-bottom:1.25em;cursor:pointer}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{margin-top:3rem}"],changeDetection:0})}return e})();function x_e(e,n){if(1&e&&Wt(0,"agc-variable-visualization",6),2&e){const t=n.$implicit,r=on(2);vt("variable",t)("filterSource",r.filterSource$)("autosize",r.autosize)}}const w_e=()=>({actions:!1});function E_e(e,n){if(1&e){const t=Oa();Ae(0,"ngx-vega",7),yn("viewChange",function(s){return hs(t),so(on(2).attachFilterView(s))}),ke()}if(2&e){const t=on(2);In("active",t.filterActive)("sticky",t.selectedVariables.length>1),vt("spec",t.filterSpec)("autosize",t.autosize)("options",f_(7,w_e))}}function C_e(e,n){if(1&e&&(Ae(0,"div",3),en(1,x_e,1,3,"agc-variable-visualization",4)(2,E_e,1,8,"ngx-vega",5),ke()),2&e){const t=on();Ze(),vt("ngForOf",t.selectedVariables),Ze(),vt("ngIf",t.filterSpec)}}const zX=()=>[],S_e=[{path:"",component:(()=>{class e{constructor(t,r,s,c,h){this.variablesState=r,this.loader=s,this.chartFactory=c,this.cdr=h,this.clsName="agc-data-distributions",this.autosize={width:!0,height:!1},this.selectedVariables=[],this.filterActive=!1,this.filterSourceObservables$=new J(1),this.variableObservables$=new J(1),this.subVariableObservables$=new J(1),this.datasets$=t.entitiesArray$,this.subLabel$=r.subLabel$,this.variables$=this.variableObservables$.pipe(w$()),this.subVariables$=this.subVariableObservables$.pipe(w$()),this.loadFilterSpec(),this.filterSource$=this.createFilterSource()}hasSpec(t){return"spec"in t&&void 0!==t.spec}setSelectedDataset(t){if(t!==this.selectedDataset){this.selectedDataset=t,this.selectedVariables=[],this.filterActive=!1;const{variablesState:r,variableObservables$:s,subVariableObservables$:c}=this,h=r.getVariables(t,w2.nonSub),y=r.getVariables(t,w2.sub);s.next(h),c.next(y)}}setSelectedVariable(t){const{selectedDataset:r,selectedVariables:s}=this;r&&(1!==s.length||s[0]!==t)&&(this.selectedVariables=[t],this.filterActive=!1)}setSelectAllVariables(){const{selectedDataset:t}=this;if(t){const r=this.variablesState.entitiesArray.filter(s=>s.dataset===t.name);this.selectedVariables=r,this.filterActive=!0}}attachFilterView(t){const s=Wie(c=>t.addSignalListener("period",c),c=>t.removeSignalListener("period",c)).pipe(ye(([c,{period:h}])=>h));this.filterSourceObservables$.next(s)}loadFilterSpec(){const{variablesState:t,loader:r,chartFactory:s,cdr:c}=this,h=t.selectId(...B$.timeSliderSource);t.getVariable(h).pipe(ii(M=>!!M),Sr(M=>r.load(M)),Bo(1)).subscribe(M=>{this.filterSpec=s.createTimeSlider(M),c.markForCheck()})}createFilterSource(){const{filterSourceObservables$:t,cdr:r}=this;return function Zge(e,n){return new Qn(t=>{const r=e(),s=n(r);return(s?Gs(s):Hl).subscribe(t),()=>{r&&r.unsubscribe()}})}(()=>(this.filterActive=!0,r.markForCheck(),new xn(()=>{this.filterActive=!1,r.markForCheck()})),()=>t).pipe(ne(1),w$())}static#e=this.\u0275fac=function(r){return new(r||e)(ue(z$),ue(E2),ue(BX),ue($X),ue(Qo))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-data-distributions"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},features:[ni([t_e])],decls:8,vars:16,consts:[[1,"header"],[3,"subLabel","datasets","variables","subVariables","datasetChange","dataVariableChange","selectAll"],["class","data-block",4,"ngIf"],[1,"data-block"],["class","visualization","dataBindingName","distribution",3,"variable","filterSource","autosize",4,"ngFor","ngForOf"],["class","time-slider",3,"active","sticky","spec","autosize","options","viewChange",4,"ngIf"],["dataBindingName","distribution",1,"visualization",3,"variable","filterSource","autosize"],[1,"time-slider",3,"spec","autosize","options","viewChange"]],template:function(r,s){if(1&r&&(Ae(0,"div",0),wt(1,"Data Distributions"),ke(),Ae(2,"agc-table-data-selector",1),yn("datasetChange",function(h){return s.setSelectedDataset(h)})("dataVariableChange",function(h){return s.setSelectedVariable(h)})("selectAll",function(){return s.setSelectAllVariables()}),uf(3,"async"),uf(4,"async"),uf(5,"async"),uf(6,"async"),ke(),en(7,C_e,3,2,"div",2)),2&r){let c,h,y,E;Ze(2),vt("subLabel",null!==(c=cm(3,5,s.subLabel$))&&void 0!==c?c:"")("datasets",null!==(h=cm(4,7,s.datasets$))&&void 0!==h?h:f_(13,zX))("variables",null!==(y=cm(5,9,s.variables$))&&void 0!==y?y:f_(14,zX))("subVariables",null!==(E=cm(6,11,s.subVariables$))&&void 0!==E?E:f_(15,zX)),Ze(5),vt("ngIf",s.selectedVariables.length>0)}},dependencies:[o0,x_,v2,c_e,v_e,PI],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;margin-bottom:4.5rem;padding:0 1rem;align-items:center}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%]{width:100%;height:100%;margin-top:2rem}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .visualization[_ngcontent-%COMP%]{padding-top:2rem;padding-bottom:2rem}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider[_ngcontent-%COMP%]{margin-top:2rem;width:100%}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider[_ngcontent-%COMP%]:not(.active){display:none}[_nghost-%COMP%] .data-block[_ngcontent-%COMP%] .time-slider.sticky[_ngcontent-%COMP%]{position:sticky;bottom:0;z-index:2001}"],changeDetection:0})}return e})()}];let D_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forChild(S_e),mu]})}return e})(),M_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,v2,NU,wne,Kge,D_e]})}return e})();const A_e=[{path:"",pathMatch:"full",redirectTo:"about"},{path:"about",loadChildren:()=>Pae},{path:"change-log",loadChildren:()=>Bae},{path:"data-er-diagram",loadChildren:()=>jae},{path:"data-schema-browser",loadChildren:()=>Wae},{path:"visualization/:id",loadChildren:()=>Qpe},{path:"data-distributions",loadChildren:()=>M_e}];let T_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[mu.forRoot(A_e),mu]})}return e})();const k_e={version:"1.0.0",lastCommitDate:new Date(1719313724e3),buildDate:new Date(1719313870580)};let ere=(()=>{class e{constructor(t){this.data=t}static#e=this.\u0275fac=function(r){return new(r||e)(ue(cte))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-markdown-modal"]],decls:10,vars:4,consts:[["mat-dialog-title","",1,"header"],[1,"title"],[1,"filler"],["mat-icon-button","","mat-dialog-close","","tabindex","-1",1,"close"],[3,"src"]],template:function(r,s){1&r&&(Ae(0,"h2",0)(1,"div",1),wt(2),uf(3,"uppercase"),ke(),Wt(4,"div",2),Ae(5,"button",3)(6,"mat-icon"),wt(7,"close"),ke()()(),Ae(8,"mat-dialog-content"),Wt(9,"markdown",4),ke()),2&r&&(Ze(2),Pr(cm(3,2,s.data.title)),Ze(7),vt("src",s.data.src))},dependencies:[Ete,dte,iU,rU,v$,HL,_m],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center}[_nghost-%COMP%] .header[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0})}return e})(),tre=(()=>{class e{constructor(t,r,s){this.path=t,this.queryParams=r,this.extras=s}}return e.type="[Router] Navigate",e})(),nre=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterRequest",e})(),VX=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterNavigation",e})(),ire=(()=>{class e{constructor(t,r,s,c="none"){this.routerState=t,this.storeState=r,this.event=s,this.trigger=c}}return e.type="[Router] RouterCancel",e})(),rre=(()=>{class e{constructor(t,r,s,c="none"){this.routerState=t,this.storeState=r,this.event=s,this.trigger=c}}return e.type="[Router] RouterError",e})(),ore=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterDataResolved",e})(),sre=(()=>{class e{constructor(t,r,s="none"){this.routerState=t,this.event=r,this.trigger=s}}return e.type="[Router] RouterNavigated",e})();class jX{}class I_e{serialize(n){return{root:this.serializeRoute(n.root),url:n.url}}serializeRoute(n){const t=n.children.map(r=>this.serializeRoute(r));return{url:n.url,params:n.params,queryParams:n.queryParams,fragment:n.fragment,data:n.data,outlet:n.outlet,component:null,routeConfig:null,root:null,parent:null,firstChild:t[0],children:t,pathFromRoot:null,paramMap:n.paramMap,queryParamMap:n.queryParamMap,toString:n.toString}}}const are=new $e("USER_OPTIONS",{providedIn:"root",factory:()=>{}}),lre=new $e("NGXS_ROUTER_PLUGIN_OPTIONS",{providedIn:"root",factory:()=>({})});function O_e(e){return{navigationActionTiming:e&&e.navigationActionTiming||1}}var C2;let Vh=C2=class{constructor(n,t,r,s,c){this._store=n,this._router=t,this._serializer=r,this._ngZone=s,this._trigger="none",this._routerState=null,this._storeState=null,this._lastEvent=null,this._subscription=new xn,this._options=null,this._options=c.get(lre,null),this._setUpStoreListener(),this._setUpRouterEventsListener()}static state(n){return n&&n.state}static url(n){return n&&n.state&&n.state.url}ngOnDestroy(){this._subscription.unsubscribe()}navigate(n,t){return this._ngZone.run(()=>this._router.navigate(t.path,Object.assign({queryParams:t.queryParams},t.extras)))}angularRouterAction(n,t){n.setState({trigger:t.trigger,state:t.routerState,navigationId:t.event.id})}_setUpStoreListener(){const n=this._store.select(C2).subscribe(t=>{this._navigateIfNeeded(t)});this._subscription.add(n)}_navigateIfNeeded(n){n&&"devtools"===n.trigger&&(this._storeState=this._store.selectSnapshot(C2)),this._storeState&&this._storeState.state&&n&&"router"!==n.trigger&&this._router.url!==this._storeState.state.url&&!(this._lastEvent instanceof JD)&&(this._storeState=this._store.selectSnapshot(C2),this._trigger="store",this._ngZone.run(()=>this._router.navigateByUrl(this._storeState.state.url)))}_setUpRouterEventsListener(){const n=null!=this._options&&2===this._options.navigationActionTiming;let t;const r=this._router.events.subscribe(s=>{this._lastEvent=s,s instanceof JD?this._navigationStart(s):s instanceof O4?(t=s,!n&&"store"!==this._trigger&&this._dispatchRouterNavigation(t)):s instanceof sJ?this._dispatchRouterDataResolved(s):s instanceof eM?(this._dispatchRouterCancel(s),this._reset()):s instanceof t2?(this._dispatchRouterError(s),this._reset()):s instanceof $_&&("store"!==this._trigger&&(n&&this._dispatchRouterNavigation(t),this._dispatchRouterNavigated(s)),this._reset())});this._subscription.add(r)}_navigationStart(n){this._routerState=this._serializer.serialize(this._router.routerState.snapshot),"none"!==this._trigger&&(this._storeState=this._store.selectSnapshot(C2),this._dispatchRouterAction(new nre(this._routerState,n,this._trigger)))}_dispatchRouterDataResolved(n){const t=this._serializer.serialize(n.state);this._dispatchRouterAction(new ore(t,n,this._trigger))}_dispatchRouterNavigation(n){const t=this._serializer.serialize(n.state);this._dispatchRouterAction(new VX(t,new O4(n.id,n.url,n.urlAfterRedirects,t),this._trigger))}_dispatchRouterCancel(n){this._dispatchRouterAction(new ire(this._routerState,this._storeState,n,this._trigger))}_dispatchRouterError(n){this._dispatchRouterAction(new rre(this._routerState,this._storeState,new t2(n.id,n.url,`${n}`),this._trigger))}_dispatchRouterNavigated(n){const t=this._serializer.serialize(this._router.routerState.snapshot);this._dispatchRouterAction(new sre(t,n,this._trigger))}_dispatchRouterAction(n){this._trigger="router";try{this._store.dispatch(n)}finally{this._trigger="none"}}_reset(){this._trigger="none",this._storeState=null,this._routerState=null}};Vh.\u0275fac=function(n){return new(n||Vh)(pe(j0),pe(dd),pe(jX),pe(Bt),pe(hr))},Vh.\u0275prov=Ue({token:Vh,factory:Vh.\u0275fac}),Nn([Mee(tre),gt("design:type",Function),gt("design:paramtypes",[Object,tre]),gt("design:returntype",void 0)],Vh.prototype,"navigate",null),Nn([Mee([nre,VX,rre,ire,ore,sre]),gt("design:type",Function),gt("design:paramtypes",[Object,Object]),gt("design:returntype",void 0)],Vh.prototype,"angularRouterAction",null),Nn([Tee(),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",void 0)],Vh,"state",null),Nn([Tee(),gt("design:type",Function),gt("design:paramtypes",[Object]),gt("design:returntype",Object)],Vh,"url",null),Vh=C2=Nn([rM({name:"router",defaults:{state:void 0,navigationId:void 0,trigger:"none"}}),gt("design:paramtypes",[j0,dd,jX,Bt,hr])],Vh);let R_e=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:are,useValue:t},{provide:lre,useFactory:O_e,deps:[are]},{provide:jX,useClass:I_e}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({imports:[[Dee.forFeature([Vh])]]}),e})(),cre=(()=>{let e=class $U extends OG{constructor(t,r){super(),this.actions$=t,this.router=r,this.destroy$=new It,this.navigationStart$=this.router.events.pipe(ii(s=>s instanceof JD),ye(s=>s.url),Kn(this.destroy$)),this.navigationEnd$=this.actions$.pipe(function Vle(...e){return u2(e,["SUCCESSFUL","CANCELED","ERRORED"],Ule)}(VX),ye(s=>s.action.event.url),Kn(this.destroy$))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static#e=this.\u0275fac=function(r){return new(r||$U)(pe(Yle),pe(dd))};static#t=this.\u0275prov=Ue({token:$U,factory:$U.\u0275fac})};return e=Nn([f2(),rM({name:"routerFacade"})],e),e})(),N_e=(()=>{class e{constructor(t){this.http=t}load(t){return this.http.get(t,{responseType:"json"}).pipe(ye(this.parseRawData.bind(this)))}parseRawData(t){if(!t)return{datasets:[],variables:[]};const r=[],s=[];for(const c of Object.values(t))r.push(this.parseRawDataset(c)),s.push(...Object.values(c.columns).map(h=>this.parseRawDatasetVariable(c,h)));return{datasets:r,variables:s}}parseRawDataset(t){return{name:t.name,description:t.remarks,variables:Object.keys(t.columns)}}parseRawDatasetVariable(t,r){return{dataset:t.name,name:r.name,description:r.remarks,type:r.type,nonNullCount:r.n_non_null,percentMissing:r.pct_missing,distribution:{type:r.dist_type,url:r.dist_data.url,summary:{distinct:r.dist_data.distinct,min:r.dist_data.min,max:r.dist_data.max}}}}static#e=this.\u0275fac=function(r){return new(r||e)(pe(M_))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ure=(()=>{let e=class BU extends OG{constructor(t,r,s,c){super(),this.datasetLoader=t,this.datasetsState=r,this.variablesState=s,this.http=c}ngxsOnInit(){super.ngxsOnInit(),this.datasetLoader.load(B$.datasetsPath).subscribe(t=>{this.datasetsState.addMany(t.datasets),this.variablesState.addMany(t.variables)})}isPrivate(){return this.http.get(B$.datasetsPath,{responseType:"json"}).pipe(ye(r=>this.isNotEmpty(r)),Sf(this.handleError))}handleError(){return zt(!1)}isNotEmpty(t){return 0!==Object.keys(t).length}static#e=this.\u0275fac=function(r){return new(r||BU)(pe(N_e),pe(z$),pe(E2),pe(M_))};static#t=this.\u0275prov=Ue({token:BU,factory:BU.\u0275fac})};return e=Nn([f2(),rM({name:"data",children:[z$,E2]})],e),e})(),F_e=(()=>{class e{constructor(){this.clsName="agc-banner"}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-banner"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:4,vars:0,consts:[[1,"info"],[1,"filler"],["src","assets/images/hero-banner.jpg","alt","Image of a pill bottle",1,"image"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1," Indiana Opioid Dashboard\n"),ke(),Wt(2,"div",1)(3,"img",2))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;height:15rem;align-items:center}[_nghost-%COMP%] .info[_ngcontent-%COMP%]{display:flex;height:4rem;padding-left:2rem;padding-right:1rem;align-items:center}[_nghost-%COMP%] .image[_ngcontent-%COMP%]{height:15rem}[_nghost-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0})}return e})(),P_e=(()=>{class e{constructor(){this.clsName="agc-page-footer",this.buildDate=new Date,this.contactClick=new cn,this.privacyClick=new cn}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-footer"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{buildDate:"buildDate"},outputs:{contactClick:"contactClick",privacyClick:"privacyClick"},decls:12,vars:4,consts:[[1,"resources"],["mat-button","","disableRipple","",1,"contact",3,"click"],["mat-button","","disableRipple","",1,"privacy",3,"click"],[1,"filler"],[1,"build-date"],[1,"copyright"]],template:function(r,s){1&r&&(Ae(0,"div",0)(1,"button",1),yn("click",function(){return s.contactClick.emit()}),wt(2,"Contact Us"),ke(),Ae(3,"button",2),yn("click",function(){return s.privacyClick.emit()}),wt(4,"Privacy Policy"),ke(),Wt(5,"div",3),Ae(6,"span",4),wt(7),uf(8,"date"),ke()(),Ae(9,"div",5)(10,"span"),wt(11,"Copyright \xa9 2020 Indiana University, Regenstrief Institute - All rights reserved."),ke()()),2&r&&(Ze(7),lf(" This site was last updated on ",Wk(8,1,s.buildDate,"MM/dd/yyyy, h:mm a")," "))},dependencies:[wte,c5],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .resources[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;height:4.5rem;align-items:center;padding-left:1rem;padding-right:1rem}[_nghost-%COMP%] .resources[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%], [_nghost-%COMP%] .resources[_ngcontent-%COMP%] .privacy[_ngcontent-%COMP%]{transition:color .3s}[_nghost-%COMP%] .resources[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;height:3rem;justify-content:center;align-items:center}"],changeDetection:0})}return e})(),L_e=(()=>{class e{constructor(){this.clsName="agc-menu-icon",this.alternateIcon=!1}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-menu-icon"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{alternateIcon:"alternateIcon"},decls:6,vars:2,consts:[[1,"icon"],[1,"bar"],[1,"text"]],template:function(r,s){1&r&&(Ae(0,"div",0),Wt(1,"div",1)(2,"div",1)(3,"div",1),ke(),Ae(4,"div",2),wt(5,"MENU"),ke()),2&r&&In("alternate",s.alternateIcon)},styles:["[_nghost-%COMP%]{display:block;width:2.25rem;height:2.25rem;cursor:pointer}[_nghost-%COMP%] .icon[_ngcontent-%COMP%]{margin-bottom:.25rem}[_nghost-%COMP%] .icon[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:1.875rem;height:.25rem;border-radius:.625rem;transition:.4s}[_nghost-%COMP%] .icon[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(2){width:2.25rem;margin:.25rem 0}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(1){width:1.75rem;transform:translate(.375rem,.5rem) rotate(45deg)}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(2){opacity:0}[_nghost-%COMP%] .icon.alternate[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]:nth-of-type(3){width:1.75rem;transform:translate(.375rem,-.5rem) rotate(-45deg)}"],changeDetection:0})}return e})(),$_e=(()=>{class e{constructor(){this.clsName="agc-page-header",this.menuOpen=!1,this.menuOpenChange=new cn}toggleMenuOpen(){this.menuOpen=!this.menuOpen,this.menuOpenChange.emit(this.menuOpen)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-header"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{menuOpen:"menuOpen"},outputs:{menuOpenChange:"menuOpenChange"},decls:7,vars:1,consts:[["mat-flat-button","","color","primary",1,"menu",3,"click"],[3,"alternateIcon"],[1,"logos"],["href","https://cns.iu.edu","target","_blank","rel","noreferrer noopener"],["src","assets/images/iu-white.svg","alt","Indiana University logo"],["href","https://www.regenstrief.org","target","_blank","rel","noreferrer noopener"],["src","assets/images/regenstrief-white.svg","alt","Regenstrief Institute logo"]],template:function(r,s){1&r&&(Ae(0,"button",0),yn("click",function(){return s.toggleMenuOpen()}),Wt(1,"agc-menu-icon",1),ke(),Ae(2,"div",2)(3,"a",3),Wt(4,"img",4),ke(),Ae(5,"a",5),Wt(6,"img",6),ke()()),2&r&&(Ze(),vt("alternateIcon",s.menuOpen))},dependencies:[wte,L_e],styles:["[_nghost-%COMP%]{display:flex;height:3.5rem;align-items:center}[_nghost-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;width:5rem;height:3.5rem;align-items:center;justify-content:center;border-radius:0;border-right-width:1px;border-right-style:solid}[_nghost-%COMP%] .logos[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:100%;justify-content:flex-start;align-items:center;border-radius:0;border-left-width:1px;border-left-style:solid}[_nghost-%COMP%] .logos[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{height:2.25rem;margin-left:1rem}[_nghost-%COMP%] .logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:2.25rem}"],changeDetection:0})}return e})(),B_e=(()=>{class e{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Mh(t)}get inset(){return this._inset}set inset(t){this._inset=Mh(t)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(r,s){2&r&&(hi("aria-orientation",s.vertical?"vertical":"horizontal"),In("mat-divider-vertical",s.vertical)("mat-divider-horizontal",!s.vertical)("mat-divider-inset",s.inset))},inputs:{vertical:"vertical",inset:"inset"},standalone:!0,features:[xi],decls:0,vars:0,template:function(r,s){},styles:[".mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color);border-top-width:var(--mat-divider-width)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color);border-right-width:var(--mat-divider-width)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0})}return e})(),z_e=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[rs,rs]})}return e})(),V_e=(()=>{class e{constructor(t){this.locale=t}transform(t,r,s,c){if(!t||0===t.length||void 0===r)return t;const h=new Intl.Collator(this.locale||void 0,{usage:"sort",numeric:!0,sensitivity:"nocase"===c?"accent":"variant"});return[...t].sort((E,M)=>{const R=E[r],$=M[r];return null==R?null==$?0:1:null==$?-1:"desc"===s?-h.compare(R,$):h.compare(R,$)})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(df,24))};static#t=this.\u0275pipe=fs({name:"orderBy",type:e,pure:!0})}return e})();const j_e=e=>["/visualization",e];function U_e(e,n){if(1&e&&(Ae(0,"a",11)(1,"div",7),wt(2),ke(),Ae(3,"div",12),wt(4),ke(),Wt(5,"mat-divider"),ke()),2&e){const t=n.$implicit;vt("routerLink",function Aw(e,n,t,r){return cf(qe(),Os(),e,n,t,r)}(3,j_e,t.path)),Ze(2),Pr(t.title),Ze(2),Pr(t.description)}}function H_e(e,n){1&e&&(Ae(0,"a",13),Wt(1,"mat-icon",14),Ae(2,"span",7),wt(3,"Data Distributions"),ke()())}function W_e(e,n){1&e&&Wt(0,"mat-divider")}function q_e(e,n){1&e&&Wt(0,"mat-divider")}function G_e(e,n){1&e&&(Ae(0,"a",15),Wt(1,"mat-icon",16),Ae(2,"span",7),wt(3,"Data Schema Browser"),ke()())}function X_e(e,n){1&e&&Wt(0,"mat-divider")}function Y_e(e,n){1&e&&(Ae(0,"a",17)(1,"mat-icon"),wt(2,"bar_chart_outline"),ke(),Ae(3,"span",7),wt(4,"Data ER Diagram"),ke()())}let K_e=(()=>{class e{constructor(){this.clsName="agc-page-menu",this.header="",this.pages=[],this.showData=!0}linkId(t,r){return r.path}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-page-menu"]],hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},inputs:{header:"header",pages:"pages",showData:"showData"},decls:24,vars:12,consts:[[1,"header"],[1,"pages"],["class","link","routerLinkActive","active",3,"routerLink",4,"ngFor","ngForOf","ngForTrackBy"],[1,"info"],["class","link distributions","routerLink","/data-distributions","routerLinkActive","active",4,"ngIf"],[4,"ngIf"],["routerLink","/about","routerLinkActive","active",1,"link","about"],[1,"title"],["class","link schema","routerLink","/data-schema-browser","routerLinkActive","active",4,"ngIf"],["class","link er-diagram","routerLink","/data-er-diagram","routerLinkActive","active",4,"ngIf"],["routerLink","/change-log","routerLinkActive","active",1,"link","changelog"],["routerLinkActive","active",1,"link",3,"routerLink"],[1,"description"],["routerLink","/data-distributions","routerLinkActive","active",1,"link","distributions"],["svgIcon","menu:data-distributions"],["routerLink","/data-schema-browser","routerLinkActive","active",1,"link","schema"],["svgIcon","menu:data-storage"],["routerLink","/data-er-diagram","routerLinkActive","active",1,"link","er-diagram"]],template:function(r,s){1&r&&(Ae(0,"div",0),wt(1),ke(),Ae(2,"nav",1),en(3,U_e,6,5,"a",2),uf(4,"orderBy"),ke(),Ae(5,"div",3),en(6,H_e,4,0,"a",4)(7,W_e,1,0,"mat-divider",5),Ae(8,"a",6)(9,"mat-icon"),wt(10,"info_outlined"),ke(),Ae(11,"span",7),wt(12,"About"),ke()(),en(13,q_e,1,0,"mat-divider",5)(14,G_e,4,0,"a",8)(15,X_e,1,0,"mat-divider",5)(16,Y_e,5,0,"a",9),Wt(17,"mat-divider"),Ae(18,"a",10)(19,"mat-icon"),wt(20,"published_with_changes_outline"),ke(),Ae(21,"span",7),wt(22,"Changelog"),ke()(),Wt(23,"mat-divider"),ke()),2&r&&(Ze(),lf(" ",s.header,"\n"),Ze(2),vt("ngForOf",Wk(4,9,s.pages,"order"))("ngForTrackBy",s.linkId),Ze(3),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(6),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData),Ze(),vt("ngIf",s.showData))},dependencies:[o0,x_,$4,OJ,B_e,v$,V_e],styles:["[_nghost-%COMP%]{display:block;width:30rem;margin-bottom:2rem}[_nghost-%COMP%] .header[_ngcontent-%COMP%], [_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(mat-divider), [_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{display:flex;height:4rem;align-items:center}[_nghost-%COMP%] .pages[_ngcontent-%COMP%]{padding-top:2rem}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{outline:none;text-decoration:none}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-top:1rem}[_nghost-%COMP%] .pages[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding-bottom:1rem}[_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:flex;height:2.25rem;align-items:center;cursor:pointer;outline:none;text-decoration:none;transition:color .3s ease-in-out}[_nghost-%COMP%] .info[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}"],changeDetection:0})}return e})(),Z_e=(()=>{class e{constructor(){this.clsName="agc-sub-bar",this.visible=!0}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-sub-bar"]],hostVars:4,hostBindings:function(r,s){2&r&&(wo(s.clsName),In("visible",s.visible))},inputs:{visible:"visible"},decls:0,vars:0,template:function(r,s){},styles:["[_nghost-%COMP%]{display:block;height:2.625rem;transition:height .3s ease-in-out}[_nghost-%COMP%]:not(.visible){height:0}"],changeDetection:0})}return e})(),Q_e=(()=>{class e{constructor(t,r,s,c){this.dialog=s,this.zone=c,this.clsName="agc-root",this.showData=!0,this.menuHeader="Marion County Opioid Addiction Report",this.pages=jee.map(h=>({path:h.id,title:h.title,description:h.description})),this.subBarVisible=!0,this.menuOpen=!1,this.buildDate=k_e.buildDate,t.navigationStart$.subscribe(()=>{this.menuOpen=!1}),r.isPrivate().subscribe(h=>{this.showData=h})}ngAfterViewInit(){this.sidenavContainer.scrollable.elementScrolled().subscribe(()=>{const r=0===this.sidenavContainer.scrollable.measureScrollOffset("top");this.subBarVisible!==r&&this.zone.run(()=>{this.subBarVisible=r})})}openContactUs(){this.dialog.open(ere,{width:"800px",height:"600px",data:{title:"Contact us",src:"assets/footer/contact-us.md"}})}openPrivacyPolicy(){this.dialog.open(ere,{width:"800px",height:"600px",data:{title:"Privacy Policy",src:"assets/footer/privacy-policy.md"}})}static#e=this.\u0275fac=function(r){return new(r||e)(ue(cre),ue(ure),ue(_$),ue(Bt))};static#t=this.\u0275cmp=Rn({type:e,selectors:[["agc-root"]],viewQuery:function(r,s){if(1&r&&ha(RO,5),2&r){let c;zi(c=Pi())&&(s.sidenavContainer=c.first)}},hostVars:2,hostBindings:function(r,s){2&r&&wo(s.clsName)},decls:12,vars:7,consts:[[3,"menuOpen","menuOpenChange"],["mode","over",3,"opened","openedChange","closedStart"],[3,"header","pages","showData"],[3,"visible"],[1,"content"],[1,"outlet-wrapper"],[1,"space-filler"],[3,"buildDate","contactClick","privacyClick"]],template:function(r,s){1&r&&(Ae(0,"agc-page-header",0),yn("menuOpenChange",function(h){return s.menuOpen=h}),ke(),Ae(1,"mat-sidenav-container")(2,"mat-sidenav",1),yn("openedChange",function(h){return s.menuOpen=h})("closedStart",function(){return s.menuOpen=!1}),Wt(3,"agc-page-menu",2),ke(),Ae(4,"mat-sidenav-content"),Wt(5,"agc-sub-bar",3)(6,"agc-banner"),Ae(7,"div",4)(8,"div",5),Wt(9,"router-outlet"),ke(),Wt(10,"div",6),ke(),Ae(11,"agc-page-footer",7),yn("contactClick",function(){return s.openContactUs()})("privacyClick",function(){return s.openPrivacyPolicy()}),ke()()()),2&r&&(vt("menuOpen",s.menuOpen),Ze(2),vt("opened",s.menuOpen),Ze(),vt("header",s.menuHeader)("pages",s.pages)("showData",s.showData),Ze(2),vt("visible",s.subBarVisible),Ze(6),vt("buildDate",s.buildDate))},dependencies:[BD,RO,g1,Wq,F_e,P_e,$_e,K_e,Z_e],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto}[_nghost-%COMP%] agc-page-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:10}[_nghost-%COMP%] mat-sidenav-container[_ngcontent-%COMP%]{height:calc(100% - 3.5rem)}[_nghost-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-flow:column;max-width:1328px;min-height:calc(100% - 25.125rem);padding:4.5rem 4rem;align-items:center;margin:auto}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .outlet-wrapper[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .content[_ngcontent-%COMP%] .space-filler[_ngcontent-%COMP%]{flex-grow:1}"]})}return e})(),dre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})(),fre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$]})}return e})(),hre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,x$,h2,NU]})}return e})(),pre=(()=>{class e{constructor(t,r){t.addSvgIconInNamespace("menu","data-storage",r.bypassSecurityTrustResourceUrl("assets/icons/data-storage.svg")),t.addSvgIconInNamespace("menu","data-distributions",r.bypassSecurityTrustResourceUrl("assets/icons/data-distributions.svg"))}static#e=this.\u0275fac=function(r){return new(r||e)(pe(b$),pe(n1))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir,mu,z_e,h2,NU]})}return e})(),mre=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Ir]})}return e})();const gre=new $e("Theme options");let J_e=(()=>{class e{get theme(){return this.currentTheme}set theme(t){const r=t||this.defaultTheme,s=this.currentTheme;this.currentTheme=r,this.switchTheme(this.elements,r,s)}constructor(t,r){this.elements=[],this.defaultTheme=t.default??"",this.currentTheme=t.theme??this.defaultTheme;const s=r?.getContainerElement();s&&this.addElement(s)}ngOnDestroy(){const t=[...this.elements];for(const r of t)this.removeElement(r)}addBootstrapComponent(t){const r=t.location.nativeElement;r&&(this.addElement(r),t.onDestroy(()=>this.removeElement(r)))}addElement(t){this.switchTheme([t],this.currentTheme,""),this.elements.push(t)}removeElement(t){const r=this.elements.indexOf(t);r>=0&&(this.elements.splice(r,1),this.switchTheme([t],"",this.currentTheme))}switchTheme(t,r,s){this.addClass(t,"color-transitions-disabled"),this.removeClass(t,s),this.addClass(t,r),setTimeout(()=>this.removeClass(t,"color-transitions-disabled"))}addClass(t,r){if(r)for(const s of t)s.classList.add(r)}removeClass(t,r){if(r)for(const s of t)s.classList.remove(r)}static#e=this.\u0275fac=function(r){return new(r||e)(pe(gre),pe(m$,8))};static#t=this.\u0275prov=Ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eye=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[{provide:$w,useFactory:r=>s=>r.addBootstrapComponent(s),deps:[J_e],multi:!0},{provide:gre,useValue:t}]}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({})}return e})();const FU=(e,n)=>((e,n)=>new Array(n+1).join("0"))(0,n-e.toString().length)+e;class iye{constructor(n,t,r){this.action=n,this.store=t,this.logWriter=r}dispatched(n){const t=nM(this.action),r=function nye(e){return FU(e.getHours(),2)+":"+FU(e.getMinutes(),2)+":"+FU(e.getSeconds(),2)+"."+FU(e.getMilliseconds(),3)}(new Date);this.logWriter.startGroup(`action ${t} @ ${r}`),this._hasPayload(this.action)&&this.logWriter.logGrey("payload",Object.assign({},this.action)),this.logWriter.logGrey("prev state",n)}completed(n){this.logWriter.logGreen("next state",n),this.logWriter.endGroup()}errored(n){this.logWriter.logRedish("next state after error",this.store.snapshot()),this.logWriter.logRedish("error",n),this.logWriter.endGroup()}_hasPayload(n){return this._getNonEmptyProperties(n).length>0}_getNonEmptyProperties(n){return Object.keys(n).map(s=>n[s]).filter(s=>void 0!==s)}}class rye{constructor(n){this.options=n,this.options=this.options||{},this.logger=n.logger||console}startGroup(n){const t=this.options.collapsed?this.logger.groupCollapsed:this.logger.group;try{t.call(this.logger,n)}catch{console.log(n)}}endGroup(){try{this.logger.groupEnd()}catch{this.logger.log("\u2014\u2014 log end \u2014\u2014")}}logGrey(n,t){this.log(n,"color: #9E9E9E; font-weight: bold",t)}logGreen(n,t){this.log(n,"color: #4CAF50; font-weight: bold",t)}logRedish(n,t){this.log(n,"color: #FD8182; font-weight: bold",t)}log(n,t,r){this.isIE()?this.logger.log(n,r):this.logger.log("%c "+n,t,r)}isIE(){const n=typeof window<"u"&&window.navigator.userAgent?window.navigator.userAgent:"";let t=!1;const r=n.indexOf("MSIE "),s=n.indexOf("Trident/");return(r>-1||s>-1)&&(t=!0),t}}const _re=new $e("NGXS_LOGGER_PLUGIN_OPTIONS");let oye=(()=>{class e{constructor(t,r){this._options=t,this._injector=r}handle(t,r,s){if(this._options.disabled||!this._options.filter(r,t))return s(t,r);this._logWriter=this._logWriter||new rye(this._options),this._store=this._store||this._injector.get(j0);const c=new iye(r,this._store,this._logWriter);return c.dispatched(t),s(t,r).pipe(Do(h=>{c.completed(h)}),Sf(h=>{throw c.errored(h),h}))}}return e.\u0275fac=function(t){return new(t||e)(pe(_re),pe(hr))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();const yre=new $e("LOGGER_USER_OPTIONS");function sye(e){return Object.assign(Object.assign({},{logger:console,collapsed:!1,disabled:!1,filter:()=>!0}),e)}let aye=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:_G,useClass:oye,multi:!0},{provide:yre,useValue:t},{provide:_re,useFactory:sye,deps:[yre]}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();const UX=new $e(""),vre=new $e(""),HX="@@STATE";function lye(e){return Object.assign({key:[HX],storage:0,serialize:JSON.stringify,deserialize:JSON.parse,beforeSerialize:n=>n,afterDeserialize:n=>n},e)}function cye(e,n){return qS(n)?null:0===e.storage?localStorage:1===e.storage?sessionStorage:null}function xre(e,n){return n&&n.namespace?`${n.namespace}:${e}`:e}function wre(e){return null!=e&&!!e.engine}const Ere="NGXS_OPTIONS_META",Cre=new $e("");function fye(e,n){const r=(Array.isArray(n.key)?n.key:[n.key]).map(s=>{const c=function uye(e){return wre(e)&&(e=e.key),e.hasOwnProperty(Ere)&&(e=e[Ere].name),e instanceof xce?e.getName():e}(s);return{key:c,engine:wre(s)?e.get(s.engine):e.get(vre)}});return Object.assign(Object.assign({},n),{keysWithEngines:r})}let hye=(()=>{class e{constructor(t,r){this._options=t,this._platformId=r,this._keysWithEngines=this._options.keysWithEngines,this._usesDefaultStateKey=1===this._keysWithEngines.length&&this._keysWithEngines[0].key===HX}handle(t,r,s){var c;if(qS(this._platformId))return s(t,r);const h=function wle(e){const n=nM(e);return function(t){return n===nM(t)}}(r),y=h(DG),E=h(MG),M=y||E;let R=!1;if(M){const $=E&&r.addedStates;for(const{key:j,engine:X}of this._keysWithEngines){if(!this._usesDefaultStateKey&&$){const me=j.indexOf(pye),Me=me>-1?j.slice(0,me):j;if(!$.hasOwnProperty(Me))continue}const K=xre(j,this._options);let ie=X.getItem(K);if("undefined"!==ie&&null!=ie){try{const me=this._options.deserialize(ie);ie=this._options.afterDeserialize(me,j)}catch{ie={}}null===(c=this._options.migrations)||void 0===c||c.forEach(me=>{me.version===u$(ie,me.versionKey||"version")&&(!me.key&&this._usesDefaultStateKey||me.key===j)&&(ie=me.migrate(ie),R=!0)}),this._usesDefaultStateKey?(ie&&$&&Object.keys($).length>0&&(ie=Object.keys($).reduce((me,Me)=>(ie.hasOwnProperty(Me)&&(me[Me]=ie[Me]),me),{})),t=Object.assign(Object.assign({},t),ie)):t=pG(t,j,ie)}}}return s(t,r).pipe(Do($=>{if(!M||R)for(const{key:j,engine:X}of this._keysWithEngines){let K=$;const ie=xre(j,this._options);j!==HX&&(K=u$($,j));try{const me=this._options.beforeSerialize(K,j);X.setItem(ie,this._options.serialize(me))}catch(me){}}}))}}return e.\u0275fac=function(t){return new(t||e)(pe(Cre),pe(ps))},e.\u0275prov=Ue({token:e,factory:e.\u0275fac}),e})();const pye=".",Dre=new $e("");let gye=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:_G,useClass:hye,multi:!0},{provide:Dre,useValue:t},{provide:UX,useFactory:lye,deps:[Dre]},{provide:vre,useFactory:cye,deps:[UX,ps]},{provide:Cre,useFactory:fye,deps:[hr,UX]}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ft({type:e}),e.\u0275inj=Tt({}),e})();new $e("",{providedIn:"root",factory:()=>Eh(Xe(ps))?localStorage:null}),new $e("",{providedIn:"root",factory:()=>Eh(Xe(ps))?sessionStorage:null});const _ye=[cre,vte,Uee,ure,z$,E2];let yye=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[Xce.forRoot(),Dee.forRoot(_ye,{developmentMode:!1}),gye.forRoot({key:[]}),R_e.forRoot(),aye.forRoot({disabled:true})]})}return e})(),bye=(()=>{class e{constructor(t){if(t)throw new Error("CoreModule should only be imported once in the AppModule!")}static#e=this.\u0275fac=function(r){return new(r||e)(pe(e,12))};static#t=this.\u0275mod=Ft({type:e});static#n=this.\u0275inj=Tt({imports:[eye.forRoot(),yye,dre,fre,hre,pre,mre,dre,fre,hre,pre,mre]})}return e})(),vye=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=Ft({type:e,bootstrap:[Q_e]});static#n=this.\u0275inj=Tt({imports:[R5,le,V7,OW,WL.forRoot({loader:M_,markedOptions:{provide:LQ,useValue:{gfm:!0}}}),T_e,bye,NU]})}return e})();I5().bootstrapModule(vye).catch(e=>console.error(e))},563:(Ba,Ds,tn)=>{Ba.exports={ResizeSensor:tn(884),ElementQueries:tn(381)}},381:function(Ba,Ds,tn){"use strict";var Ct,re,Ii;typeof window<"u"&&window,re=[tn(884)],void 0!==(Ii="function"==typeof(Ct=function(sn){var yi=function(){var Xt,oi={},Rt=[];function On(he){he||(he=document.documentElement);var fe=window.getComputedStyle(he,null).fontSize;return parseFloat(fe)||16}function si(he,fe){var Be=fe.split(/\d/),Qe=Be[Be.length-1];switch(fe=parseFloat(fe),Qe){case"px":default:return fe;case"em":return fe*On(he);case"rem":return fe*On();case"vw":return fe*document.documentElement.clientWidth/100;case"vh":return fe*document.documentElement.clientHeight/100;case"vmin":case"vmax":var ot=document.documentElement.clientWidth/100,At=document.documentElement.clientHeight/100;return fe*(0,Math["vmin"===Qe?"min":"max"])(ot,At)}}function N(he,fe){this.element=he;var Be,Qe,ot,At,st,Fn,Sn,yt,kt=["min-width","min-height","max-width","max-height"];this.call=function(){for(Be in ot=function Ut(he){if(!he.getBoundingClientRect)return{width:he.offsetWidth,height:he.offsetHeight};var fe=he.getBoundingClientRect();return{width:Math.round(fe.width),height:Math.round(fe.height)}}(this.element),Fn={},oi[fe])oi[fe].hasOwnProperty(Be)&&(At=si(this.element,(Qe=oi[fe][Be]).value),st="width"===Qe.property?ot.width:ot.height,Sn="","min"===Qe.mode&&st>=At&&(Sn+=Qe.value),"max"===Qe.mode&&st<=At&&(Sn+=Qe.value),Fn[yt=Qe.mode+"-"+Qe.property]||(Fn[yt]=""),Sn&&-1===(" "+Fn[yt]+" ").indexOf(" "+Sn+" ")&&(Fn[yt]+=" "+Sn));for(var $t in kt)kt.hasOwnProperty($t)&&(Fn[kt[$t]]?this.element.setAttribute(kt[$t],Fn[kt[$t]].substr(1)):this.element.removeAttribute(kt[$t]))}}function ai(he,fe){he.elementQueriesSetupInformation||(he.elementQueriesSetupInformation=new N(he,fe)),he.elementQueriesSensor||(he.elementQueriesSensor=new sn(he,function(){he.elementQueriesSetupInformation.call()}))}function Gr(he,fe,Be,Qe){if(typeof oi[he]>"u"){oi[he]=[];var ot=Rt.length;Xt.innerHTML+="\n"+he+" {animation: 0.1s element-queries;}",Xt.innerHTML+="\n"+he+" > .resize-sensor {min-width: "+ot+"px;}",Rt.push(he)}oi[he].push({mode:fe,property:Be,value:Qe})}function Yt(he){var fe;if(document.querySelectorAll&&(fe=he?he.querySelectorAll.bind(he):document.querySelectorAll.bind(document)),!fe&&typeof $$<"u"&&(fe=$$),!fe&&typeof jQuery<"u"&&(fe=jQuery),!fe)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return fe}function dr(he){var fe=[],Be=[],Qe=[],ot=0,At=-1,st=[];for(var Fn in he.children)if(he.children.hasOwnProperty(Fn)&&he.children[Fn].tagName&&"img"===he.children[Fn].tagName.toLowerCase()){fe.push(he.children[Fn]);var Sn=he.children[Fn].getAttribute("min-width")||he.children[Fn].getAttribute("data-min-width"),yt=he.children[Fn].getAttribute("data-src")||he.children[Fn].getAttribute("url");Qe.push(yt),Be.push({minWidth:Sn}),Sn?he.children[Fn].style.display="none":(ot=fe.length-1,he.children[Fn].style.display="block")}function $t(){var li,St=!1;for(li in fe)fe.hasOwnProperty(li)&&Be[li].minWidth&&he.offsetWidth>Be[li].minWidth&&(St=li);if(St||(St=ot),At!==St)if(st[St])fe[At].style.display="none",fe[St].style.display="block",At=St;else{var Ot=new Image;Ot.onload=function(){fe[St].src=Qe[St],fe[At].style.display="none",fe[St].style.display="block",st[St]=!0,At=St},Ot.src=Qe[St]}else fe[St].src=Qe[St]}At=ot,he.resizeSensorInstance=new sn(he,$t),$t()}var Zi=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,zo=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function Xr(he){var fe,Be,Qe,ot;for(he=he.replace(/'/g,'"');null!==(fe=Zi.exec(he));)for(Be=fe[1]+fe[3],Qe=fe[2];null!==(ot=zo.exec(Qe));)Gr(Be,ot[1],ot[2],ot[3])}function ei(he){var fe="";if(he)if("string"==typeof he)(-1!==(he=he.toLowerCase()).indexOf("min-width")||-1!==he.indexOf("max-width"))&&Xr(he);else for(var Be=0,Qe=he.length;Be img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",Xt.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(Xt),ti=!0);for(var fe=0,Be=document.styleSheets.length;fe"u")return null;var Ii=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),sn=Ii.requestAnimationFrame||Ii.mozRequestAnimationFrame||Ii.webkitRequestAnimationFrame||function(Ut){return Ii.setTimeout(Ut,20)},yi=Ii.cancelAnimationFrame||Ii.mozCancelAnimationFrame||Ii.webkitCancelAnimationFrame||function(Ut){Ii.clearTimeout(Ut)};function Zn(Ut,si){var N=Object.prototype.toString.call(Ut),ai="[object Array]"===N||"[object NodeList]"===N||"[object HTMLCollection]"===N||"[object Object]"===N||typeof jQuery<"u"&&Ut instanceof jQuery||typeof Elements<"u"&&Ut instanceof Elements,Gr=0,Yt=Ut.length;if(ai)for(;Gr=this._config.preview;if(Zn)sn.postMessage({results:At,workerId:Rt.WORKER_ID,finished:Fn});else if(ti(this._config.chunk)&&!Be){if(this._config.chunk(At,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);At=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(At.data),this._completeResults.errors=this._completeResults.errors.concat(At.errors),this._completeResults.meta=At.meta),this._completed||!Fn||!ti(this._config.complete)||At&&At.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Fn||At&&At.meta.paused||this._nextChunk(),At}this._halted=!0},this._sendError=function(fe){ti(this._config.error)?this._config.error(fe):Zn&&this._config.error&&sn.postMessage({workerId:Rt.WORKER_ID,error:fe,finished:!1})}}function si(he){var fe;(he=he||{}).chunkSize||(he.chunkSize=Rt.RemoteChunkSize),Ut.call(this,he),this._nextChunk=yi?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Be){this._input=Be,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(fe=new XMLHttpRequest,this._config.withCredentials&&(fe.withCredentials=this._config.withCredentials),yi||(fe.onload=ei(this._chunkLoaded,this),fe.onerror=ei(this._chunkError,this)),fe.open(this._config.downloadRequestBody?"POST":"GET",this._input,!yi),this._config.downloadRequestHeaders){var Be=this._config.downloadRequestHeaders;for(var Qe in Be)fe.setRequestHeader(Qe,Be[Qe])}this._config.chunkSize&&fe.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{fe.send(this._config.downloadRequestBody)}catch(At){this._chunkError(At.message)}yi&&0===fe.status&&this._chunkError()}},this._chunkLoaded=function(){var Qe;4===fe.readyState&&(fe.status<200||400<=fe.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:fe.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null===(Qe=fe.getResponseHeader("Content-Range"))?-1:parseInt(Qe.substring(Qe.lastIndexOf("/")+1))),this.parseChunk(fe.responseText)))},this._chunkError=function(Be){this._sendError(new Error(fe.statusText||Be))}}function N(he){var fe,Be;(he=he||{}).chunkSize||(he.chunkSize=Rt.LocalChunkSize),Ut.call(this,he);var Qe=typeof FileReader<"u";this.stream=function(ot){this._input=ot,Be=ot.slice||ot.webkitSlice||ot.mozSlice,Qe?((fe=new FileReader).onload=ei(this._chunkLoaded,this),fe.onerror=ei(this._chunkError,this)):fe=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(ot.target.result)},this._chunkError=function(){this._sendError(fe.error)}}function ai(he){var fe;Ut.call(this,he=he||{}),this.stream=function(Be){return fe=Be,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var Be,Qe=this._config.chunkSize;return Qe?(Be=fe.substring(0,Qe),fe=fe.substring(Qe)):(Be=fe,fe=""),this._finished=!fe,this.parseChunk(Be)}}}function Gr(he){Ut.call(this,he=he||{});var fe=[],Be=!0,Qe=!1;this.pause=function(){Ut.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Ut.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(ot){this._input=ot,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Qe&&1===fe.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),fe.length?this.parseChunk(fe.shift()):Be=!0},this._streamData=ei(function(ot){try{fe.push("string"==typeof ot?ot:ot.toString(this._config.encoding)),Be&&(Be=!1,this._checkIsFinished(),this.parseChunk(fe.shift()))}catch(At){this._streamError(At)}},this),this._streamError=ei(function(ot){this._streamCleanUp(),this._sendError(ot)},this),this._streamEnd=ei(function(){this._streamCleanUp(),Qe=!0,this._streamData("")},this),this._streamCleanUp=ei(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Yt(he){var fe,Be,Qe,ot=Math.pow(2,53),At=-ot,st=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Fn=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Sn=this,yt=0,kt=0,$t=!1,St=!1,li=[],Ot={data:[],errors:[],meta:{}};if(ti(he.step)){var qi=he.step;he.step=function(an){if(Ot=an,fr())Ci();else{if(Ci(),0===Ot.data.length)return;yt+=an.data.length,he.preview&&yt>he.preview?Be.abort():(Ot.data=Ot.data[0],qi(Ot,Sn))}}}function zr(an){return"greedy"===he.skipEmptyLines?""===an.join("").trim():1===an.length&&0===an[0].length}function Ci(){return Ot&&Qe&&(Qi("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Rt.DefaultDelimiter+"'"),Qe=!1),he.skipEmptyLines&&(Ot.data=Ot.data.filter(function(an){return!zr(an)})),fr()&&function(){if(Ot)if(Array.isArray(Ot.data[0])){for(var Oi=0;fr()&&Oi=li.length?"__parsed_extra":li[Dn]),he.transform&&(hn=he.transform(hn,Hi)),hn=no(Hi,hn),"__parsed_extra"===Hi?(Jt[Hi]=Jt[Hi]||[],Jt[Hi].push(hn)):Jt[Hi]=hn}return he.header&&(Dn>li.length?Qi("FieldMismatch","TooManyFields","Too many fields: expected "+li.length+" fields but parsed "+Dn,kt+We):Dn=xn.length/2?"\r\n":"\r"}(an,he.quoteChar||'"')),Qe=!1,he.delimiter)ti(he.delimiter)&&(he.delimiter=he.delimiter(an),Ot.meta.delimiter=he.delimiter);else{var Dn=function(Hi,hn,io,xn,Mo){var Js,Vo,Mi,ci;Mo=Mo||[",","\t","|",";",Rt.RECORD_SEP,Rt.UNIT_SEP];for(var jo=0;jo=st)return Uo(!0)}else for(Si=yt,yt++;;){if(-1===(Si=$t.indexOf(fe,Si+1)))return li||Qi.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:no.length,index:yt}),ls();if(Si===Ot-1)return ls($t.substring(yt,Si).replace(jo,fe));if(fe!==Sn||$t[Si+1]!==Sn){if(fe===Sn||0===Si||$t[Si-1]!==Sn){-1!==Mi&&Mi=st)return Uo(!0);break}Qi.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:no.length,index:yt}),Si++}}else Si++}return ls();function va(vr){no.push(vr),Oi=yt}function Ms(vr){var po=0;if(-1!==vr){var xr=$t.substring(Si+1,vr);xr&&""===xr.trim()&&(po=xr.length)}return po}function ls(vr){return li||(void 0===vr&&(vr=$t.substring(yt)),an.push(vr),yt=Ot,va(an),fr&&$i()),Uo()}function cs(vr){yt=vr,va(an),an=[],ci=$t.indexOf(Qe,yt)}function Uo(vr){return{data:no,errors:Qi,meta:{delimiter:Be,linebreak:Qe,aborted:kt,truncated:!!vr,cursor:Oi+(St||0)}}}function $i(){At(Uo()),no=[],Qi=[]}},this.abort=function(){kt=!0},this.getCharIndex=function(){return yt}}function Br(he){var fe=he.data,Be=Xt[fe.workerId],Qe=!1;if(fe.error)Be.userError(fe.error,fe.file);else if(fe.results&&fe.results.data){var ot={abort:function(){Qe=!0,Zi(fe.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:zo,resume:zo};if(ti(Be.userStep)){for(var At=0;AtAt(_,p))}:fe(d)?{or:d.or.map(_=>At(_,p))}:p(d)}const st=structuredClone;function Fn(d){throw new Error(d)}function Sn(d,p){const _={};for(const x of p)re.hasOwnProperty(d,x)&&(_[x]=d[x]);return _}function yt(d,p){const _={...d};for(const x of p)delete _[x];return _}function kt(d){if(re.isNumber(d))return d;const p=re.isString(d)?d:Wn(d);if(p.length<250)return p;let _=0;for(let x=0;x1?p-1:0),x=1;x0===P?O:`[${O}]`),A=S.map((O,P)=>S.slice(0,P+1).join(""));for(const O of A)p.add(O)}return p}function Oi(d,p){return void 0===d||void 0===p||Qi(an(d),an(p))}function Gt(d){return 0===We(d).length}Set.prototype.toJSON=function(){return`Set(${[...this].map(d=>Wn(d)).join(",")})`};const We=Object.keys,Dn=Object.values,Jt=Object.entries;function Hi(d){return!0===d||!1===d}function hn(d){const p=d.replace(/\W/g,"_");return(d.match(/^\d+/)?"_":"")+p}function io(d,p){return Qe(d)?`!(${io(d.not,p)})`:Be(d)?`(${d.and.map(_=>io(_,p)).join(") && (")})`:fe(d)?`(${d.or.map(_=>io(_,p)).join(") || (")})`:p(d)}function xn(d,p){if(0===p.length)return!0;const _=p.shift();return _ in d&&xn(d[_],p)&&delete d[_],Gt(d)}function Mo(d){return d.charAt(0).toUpperCase()+d.substr(1)}function Js(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";const _=re.splitAccessPath(d),x=[];for(let S=1;S<=_.length;S++){const A=`[${_.slice(0,S).map(re.stringValue).join("][")}]`;x.push(`${p}${A}`)}return x.join(" && ")}function Vo(d){return`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum"}[${re.stringValue(re.splitAccessPath(d).join("."))}]`}function Mi(d){return d.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ci(d){return`${re.splitAccessPath(d).map(Mi).join("\\.")}`}function jo(d,p,_){return d.replace(new RegExp(p.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),_)}function Si(d){return`${re.splitAccessPath(d).join(".")}`}function ro(d){return d?re.splitAccessPath(d).length:0}function ui(){for(var d=arguments.length,p=new Array(d),_=0;_Q_(d[p])?hn(`_${p}_${Jt(d[p])}`):hn(`_${p}_${d[p]}`)).join("")}function sr(d){return!0===d||Lc(d)&&!d.binned}function oo(d){return"binned"===d||Lc(d)&&!0===d.binned}function Lc(d){return re.isObject(d)}function Q_(d){return d?.param}function iv(d){switch(d){case ea:case Xl:case He:case be:case Se:case Fe:case Ts:case _e:case nn:case gi:case ye:return 6;case Hh:return 4;default:return 10}}function Ea(d){return!!d?.expr}function _o(d){const p=We(d||{}),_={};for(const x of p)_[x]=Ha(d[x]);return _}function pl(d){const{anchor:p,frame:_,offset:x,orient:S,angle:A,limit:O,color:P,subtitleColor:B,subtitleFont:q,subtitleFontSize:G,subtitleFontStyle:ee,subtitleFontWeight:se,subtitleLineHeight:Ee,subtitlePadding:De,...Re}=d,Ye={...p?{anchor:p}:{},..._?{frame:_}:{},...x?{offset:x}:{},...S?{orient:S}:{},...void 0!==A?{angle:A}:{},...void 0!==O?{limit:O}:{}},bt={...B?{subtitleColor:B}:{},...q?{subtitleFont:q}:{},...G?{subtitleFontSize:G}:{},...ee?{subtitleFontStyle:ee}:{},...se?{subtitleFontWeight:se}:{},...Ee?{subtitleLineHeight:Ee}:{},...De?{subtitlePadding:De}:{}};return{titleMarkConfig:{...Re,...P?{fill:P}:{}},subtitleMarkConfig:Sn(d,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:Ye,subtitle:bt}}function ds(d){return re.isString(d)||re.isArray(d)&&re.isString(d[0])}function Je(d){return!!d?.signal}function ht(d){return!!d.step}function vu(d){return!re.isArray(d)&&"field"in d&&"data"in d}const gd=We({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}),OM={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},rv=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function RM(d){const p=re.isArray(d.condition)?d.condition.map(NM):NM(d.condition);return{...Ha(d),condition:p}}function Ha(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return d}function NM(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return d}function Ar(d){if(Ea(d)){const{expr:p,..._}=d;return{signal:p,..._}}return Je(d)?d:void 0!==d?{value:d}:void 0}function Jl(d){return Je(d)?d.signal:re.stringValue(d)}function FM(d){return Je(d)?d.signal:re.stringValue(d.value)}function ec(d){return Je(d)?d.signal:null==d?null:re.stringValue(d)}function R2(d,p,_){for(const x of _){const S=xu(x,p.markDef,p.config);void 0!==S&&(d[x]=Ar(S))}return d}function F1(d){return[].concat(d.type,d.style??[])}function Ji(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{vgChannel:S,ignoreVgConfig:A}=x;return S&&void 0!==p[S]?p[S]:void 0!==p[d]?p[d]:!A||S&&S!==d?xu(d,p,_,x):void 0}function xu(d,p,_){let{vgChannel:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ui(x?ey(d,p,_.style):void 0,ey(d,p,_.style),x?_[p.type][x]:void 0,_[p.type][d],x?_.mark[x]:_.mark[d])}function ey(d,p,_){return PM(d,F1(p),_)}function PM(d,p,_){let x;p=re.array(p);for(const S of p){const A=_[S];A&&void 0!==A[d]&&(x=A[d])}return x}function LM(d,p){return re.array(d).reduce((_,x)=>(_.field.push(pt(x,p)),_.order.push(x.sort??"ascending"),_),{field:[],order:[]})}function $M(d,p){const _=[...d];return p.forEach(x=>{for(const S of _)if(xr(S,x))return;_.push(x)}),_}function Rn(d,p){return xr(d,p)||!p?d:d?[...re.array(d),...re.array(p)].join(", "):p}function BM(d,p){const _=d.value,x=p.value;if(null==_||null===x)return{explicit:d.explicit,value:null};if((ds(_)||Je(_))&&(ds(x)||Je(x)))return{explicit:d.explicit,value:Rn(_,x)};if(ds(_)||Je(_))return{explicit:d.explicit,value:_};if(ds(x)||Je(x))return{explicit:d.explicit,value:x};if(!(ds(_)||Je(_)||ds(x)||Je(x)))return{explicit:d.explicit,value:$M(_,x)};throw new Error("It should never reach here")}function ln(d,p,_){return(p=function zM(d){var p=function Ft(d,p){if("object"!=typeof d||null===d)return d;var _=d[Symbol.toPrimitive];if(void 0!==_){var x=_.call(d,p||"default");if("object"!=typeof x)return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===p?String:Number)(d)}(d,"string");return"symbol"==typeof p?p:String(p)}(p))in d?Object.defineProperty(d,p,{value:_,enumerable:!0,configurable:!0,writable:!0}):d[p]=_,d}function fs(d,p,_){return function ks(d,p,_){if(p.set)p.set.call(d,_);else{if(!p.writable)throw new TypeError("attempted to set read only private field");p.value=_}}(d,Jn(d,p,"set"),_),_}function Jn(d,p,_){if(!p.has(d))throw new TypeError("attempted to "+_+" private field on non-instance");return p.get(d)}function ia(d,p,_){(function Nf(d,p){if(p.has(d))throw new TypeError("Cannot initialize the same private elements twice on an object")})(d,p),p.set(d,_)}function ov(d){return`Invalid specification ${Wn(d)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const VM='Autosize "fit" only works for single views and layered views.';function jm(d){return("width"==d?"Width":"Height")+' "container" only works for single views and layered views.'}function jM(d){return`${"width"==d?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==d?"x":"y"}".`}function UM(d){return d?`Dropping "fit-${d}" because spec has discrete ${Mr(d)}.`:'Dropping "fit" because spec has discrete size.'}function Tr(d){return`Unknown field for ${d}. Cannot calculate view size.`}function mt(d){return`Cannot project a selection on encoding channel "${d}", which has no field.`}function _n(d,p){return`Cannot project a selection on encoding channel "${d}" as it uses an aggregate function ("${p}").`}function tc(d){return`Selection not supported for ${d} yet.`}const wu="The same selection must be used to override scale domains in a layered view.";function P1(d){return`The "columns" property cannot be used when "${d}" has nested row/column.`}function Wm(d,p,_){return`An ancestor parsed field "${d}" as ${_} but a child wants to parse the field as ${p}.`}function Eu(d){return`Ignoring an invalid transform: ${Wn(d)}.`}function L1(d){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${d} are dropped.`}function Yh(d){return`${d}Offset dropped because ${d} is continuous`}function av(d){return`Invalid field type "${d}".`}function Gm(d,p){const{fill:_,stroke:x}=p;return`Dropping color ${d} as the plot also has ${_&&x?"fill and stroke":_?"fill":"stroke"}.`}function Nr(d,p){return`Dropping ${Wn(d)} from channel "${p}" since it does not contain any data field, datum, value, or signal.`}function bo(d,p,_){return`${d} dropped as it is incompatible with "${p}"${_?` when ${_}`:""}.`}function Is(d){return`${d}-encoding is dropped as ${d} is not a valid encoding channel.`}function $1(d){return`${d} encoding should be discrete (ordinal / nominal / binned).`}function zc(d){return`${d} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function ml(d,p){return`Using discrete channel "${d}" to encode "${p}" field can be misleading as it does not encode ${"ordinal"===p?"order":"magnitude"}.`}function WM(d){return`Using unaggregated domain with raw field has no effect (${Wn(d)}).`}function fv(d){return`Unaggregated domain not applicable for "${d}" since it produces values outside the origin domain of the source data.`}function qM(d){return`Unaggregated domain is currently unsupported for log scale (${Wn(d)}).`}function z1(d,p,_){return`${_}-scale's "${p}" is dropped as it does not work with ${d} scale.`}function GM(d){return`The step for "${d}" is dropped because the ${"width"===d?"x":"y"} is continuous.`}const P2="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function V1(d,p){return`Invalid ${d}: ${Wn(p)}.`}function ry(d){return`1D error band does not support ${d}.`}function eA(d){return`Channel ${d} is required for "binned" bin.`}const pv=re.logger(re.Warn);let Xm=pv;function nt(){Xm.warn(...arguments)}function _d(d){if(d&&re.isObject(d))for(const p of Pf)if(p in d)return!0;return!1}const gv=["january","february","march","april","may","june","july","august","september","october","november","december"],H1=gv.map(d=>d.substr(0,3)),B2=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],er=B2.map(d=>d.substr(0,3));function Ym(d,p){const _=[];if(p&&void 0!==d.day&&We(d).length>1&&(nt(function Kh(d){return`Dropping day from datetime ${Wn(d)} as day cannot be combined with other units.`}(d)),delete(d=st(d)).day),_.push(void 0!==d.year?d.year:2012),void 0!==d.month){const x=p?function sy(d){if(vr(d)&&(d=+d),re.isNumber(d))return d-1;{const p=d.toLowerCase(),_=gv.indexOf(p);if(-1!==_)return _;const x=p.substr(0,3),S=H1.indexOf(x);if(-1!==S)return S;throw new Error(V1("month",d))}}(d.month):d.month;_.push(x)}else if(void 0!==d.quarter){const x=p?function W1(d){if(vr(d)&&(d=+d),re.isNumber(d))return d>4&&nt(V1("quarter",d)),d-1;throw new Error(V1("quarter",d))}(d.quarter):d.quarter;_.push(re.isNumber(x)?3*x:`${x}*3`)}else _.push(0);if(void 0!==d.date)_.push(d.date);else if(void 0!==d.day){const x=p?function oa(d){if(vr(d)&&(d=+d),re.isNumber(d))return d%7;{const p=d.toLowerCase(),_=B2.indexOf(p);if(-1!==_)return _;const x=p.substr(0,3),S=er.indexOf(x);if(-1!==S)return S;throw new Error(V1("day",d))}}(d.day):d.day;_.push(re.isNumber(x)?x+1:`${x}+1`)}else _.push(1);for(const x of["hours","minutes","seconds","milliseconds"]){const S=d[x];_.push(typeof S>"u"?0:S)}return _}function gl(d){const _=Ym(d,!0).join(", ");return d.utc?`utc(${_})`:`datetime(${_})`}const nA={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},Pf=We(nA);function qo(d){return re.isObject(d)?d.binned:ay(d)}function ay(d){return d&&d.startsWith("binned")}function yv(d){return d.startsWith("utc")}const ly={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function Kt(d){return Pf.filter(p=>Ti(d,p))}function Qh(d){const p=Kt(d);return p[p.length-1]}function Ti(d,p){const _=d.indexOf(p);return!(_<0||_>0&&"seconds"===p&&"i"===d.charAt(_-1)||d.length>_+3&&"day"===p&&"o"===d.charAt(_+3)||_>0&&"year"===p&&"f"===d.charAt(_-1))}function cy(d,p){let{end:_}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1};const x=Js(p),S=yv(d)?"utc":"";function A(B){return"quarter"===B?`(${S}quarter(${x})-1)`:`${S}${B}(${x})`}let O;const P={};for(const B of Pf)Ti(d,B)&&(P[B]=A(B),O=B);return _&&(P[O]+="+1"),function Zh(d){const _=Ym(d,!1).join(", ");return d.utc?`utc(${_})`:`datetime(${_})`}(P)}function Vc(d){if(d)return`timeUnitSpecifier(${Wn(Kt(d))}, ${Wn(ly)})`}function Fr(d){if(!d)return;let p;return re.isString(d)?p=ay(d)?{unit:d.substring(6),binned:!0}:{unit:d}:re.isObject(d)&&(p={...d,...d.unit?{unit:d.unit}:{}}),yv(p.unit)&&(p.utc=!0,p.unit=function iA(d){return d.substring(3)}(p.unit)),p}function Lf(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S=>S;const _=Fr(d),x=Qh(_.unit);if(x&&"day"!==x){const S={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:A,part:O}=q1(x,_.step);return`${p(gl({...S,[O]:+S[O]+A}))} - ${p(gl(S))}`}}const bv={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function q1(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(function vv(d){return!!bv[d]}(d))return{part:d,step:p};switch(d){case"day":case"dayofyear":return{part:"date",step:p};case"quarter":return{part:"month",step:3*p};case"week":return{part:"date",step:7*p}}}function G1(d){return!!d?.field&&void 0!==d.equal}function X1(d){return!!d?.field&&void 0!==d.lt}function Y1(d){return!!d?.field&&void 0!==d.lte}function ar(d){return!!d?.field&&void 0!==d.gt}function xv(d){return!!d?.field&&void 0!==d.gte}function qe(d){if(d?.field){if(re.isArray(d.range)&&2===d.range.length)return!0;if(Je(d.range))return!0}return!1}function bi(d){return!!d?.field&&(re.isArray(d.oneOf)||re.isArray(d.in))}function so(d){return bi(d)||G1(d)||qe(d)||X1(d)||ar(d)||Y1(d)||xv(d)}function Un(d,p){return Td(d,{timeUnit:p,wrapTime:!0})}function Zm(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{field:_}=d,x=Fr(d.timeUnit),{unit:S,binned:A}=x||{},O=pt(d,{expr:"datum"}),P=S?`time(${A?O:cy(S,_)})`:O;if(G1(d))return`${P}===${Un(d.equal,S)}`;if(X1(d))return`${P}<${Un(d.lt,S)}`;if(ar(d))return`${P}>${Un(d.gt,S)}`;if(Y1(d))return`${P}<=${Un(d.lte,S)}`;if(xv(d))return`${P}>=${Un(d.gte,S)}`;if(bi(d))return`indexof([${function rA(d,p){return d.map(_=>Un(_,p))}(d.oneOf,S).join(",")}], ${P}) !== -1`;if(function hs(d){return!!d?.field&&void 0!==d.valid}(d))return ic(P,d.valid);if(qe(d)){const{range:B}=d,q=Je(B)?{signal:`${B.signal}[0]`}:B[0],G=Je(B)?{signal:`${B.signal}[1]`}:B[1];if(null!==q&&null!==G&&p)return"inrange("+P+", ["+Un(q,S)+", "+Un(G,S)+"])";const ee=[];return null!==q&&ee.push(`${P} >= ${Un(q,S)}`),null!==G&&ee.push(`${P} <= ${Un(G,S)}`),ee.length>0?ee.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Wn(d)}`)}function ic(d){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?`!isValid(${d}) || !isFinite(+${d})`:`isValid(${d}) && isFinite(+${d})`}function K1(d){return so(d)&&d.timeUnit?{...d,timeUnit:Fr(d.timeUnit)}:d}function V2(d){return"quantitative"===d||"temporal"===d}function Z1(d){return"ordinal"===d||"nominal"===d}const $f="quantitative",Os="ordinal",qa="temporal",wv="nominal",Sa="geojson";const Ga={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"},Ev={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 Cv(d,p){const _=Ev[d],x=Ev[p];return _===x||"ordinal-position"===_&&"time"===x||"ordinal-position"===x&&"time"===_}const Cu={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 jc(d){return Cu[d]}const rc=new Set(["linear","log","pow","sqrt","symlog"]),Q1=new Set([...rc,"time","utc"]);function uy(d){return rc.has(d)}const Jh=new Set(["quantile","quantize","threshold"]),J1=new Set([...Q1,...Jh,"sequential","identity"]),ep=new Set(["ordinal","bin-ordinal","point","band"]);function ko(d){return ep.has(d)}function Da(d){return J1.has(d)}function Go(d){return Q1.has(d)}function vd(d){return Jh.has(d)}function Xo(d){return d?.param}const{type:oA,domain:sA,range:Z$,rangeMax:aA,rangeMin:j2,scheme:eE,...Bf}={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},tE=We(Bf);function Qm(d,p){switch(p){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(d);case"bins":return!["point","band","identity","ordinal"].includes(d);case"round":return Go(d)||"band"===d||"point"===d;case"padding":case"rangeMin":case"rangeMax":return Go(d)||["point","band"].includes(d);case"paddingOuter":case"align":return["point","band"].includes(d);case"paddingInner":return"band"===d;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return Go(d);case"nice":return Go(d)||"quantize"===d||"threshold"===d;case"exponent":return"pow"===d;case"base":return"log"===d;case"constant":return"symlog"===d;case"zero":return Da(d)&&!St(["log","time","utc","threshold","quantile"],d)}}function fy(d,p){switch(p){case"interpolate":case"scheme":case"domainMid":return Wh(d)?void 0:function dv(d){return`Cannot use the scale property "${d}" with non-color channel.`}(p);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 Rs={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"},iE=Rs.arc,xd=Rs.area,_l=Rs.bar,ze=Rs.image,wd=Rs.line,np=Rs.point,lA=Rs.rect,Su=Rs.rule,Av=Rs.text,U2=Rs.tick,H2=Rs.trail,zf=Rs.circle,Vf=Rs.square,Jm=Rs.geoshape;function yl(d){return["line","area","trail"].includes(d)}function ip(d){return["rect","bar","image","arc"].includes(d)}const eg=new Set(We(Rs));function Du(d){return d.type}const q2=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],G2=We({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),rp=We({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 Au(d){return d&&null!=d.band}const oc={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},sE={binSpacing:1,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},aE={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5};function tg(d){const{channel:p,channelDef:_,markDef:x,scale:S,config:A}=d,O=lE(d);return dt(_)&&!zm(_.aggregate)&&S&&Go(S.get("type"))?function jf(d){let{fieldDef:p,channel:_,markDef:x,ref:S,config:A}=d;return yl(x.type)?S:null===Ji("invalid",x,A)?[Y2(p,_),S]:S}({fieldDef:_,channel:p,markDef:x,ref:O,config:A}):O}function Y2(d,p){return{test:Uf(d,!0),..."y"===Fc(p)?{field:{group:"height"}}:{value:0}}}function Uf(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ic(re.isString(d)?d:pt(d,{expr:"datum"}),!p)}function Xa(d,p,_,x){const S={};if(p&&(S.scale=p),Sd(d)){const{datum:A}=d;_d(A)?S.signal=gl(A):Je(A)?S.signal=A.signal:Ea(A)?S.signal=A.expr:S.value=A}else S.field=pt(d,_);if(x){const{offset:A,band:O}=x;A&&(S.offset=A),O&&(S.band=O)}return S}function sc(d){let{scaleName:p,fieldOrDatumDef:_,fieldOrDatumDef2:x,offset:S,startSuffix:A,endSuffix:O="end",bandPosition:P=.5}=d;const B=!Je(P)&&01&&void 0!==arguments[1]?arguments[1]:{},_=d.field;const x=p.prefix;let S=p.suffix,A="";if(function xy(d){return"count"===d.aggregate}(d))_=cs("count");else{let O;if(!p.nofn)if(function Z2(d){return"op"in d}(d))O=d.op;else{const{bin:P,aggregate:B,timeUnit:q}=d;sr(P)?(O=Z_(P),S=(p.binSuffix??"")+(p.suffix??"")):B?Ua(B)?(A=`["${_}"]`,_=`argmax_${B.argmax}`):bu(B)?(A=`["${_}"]`,_=`argmin_${B.argmin}`):O=String(B):q&&!qo(q)&&(O=function z2(d){const{utc:p,..._}=Fr(d);return _.unit?(p?"utc":"")+We(_).map(x=>hn(`${"unit"===x?"":`_${x}_`}${_[x]}`)).join(""):(p?"utc":"")+"timeunit"+We(_).map(x=>hn(`_${x}_${_[x]}`)).join("")}(q),S=(!["range","mid"].includes(p.binSuffix)&&p.binSuffix||"")+(p.suffix??""))}O&&(_=_?`${O}_${_}`:O)}return S&&(_=`${_}_${S}`),x&&(_=`${x}_${_}`),p.forAs?Si(_):p.expr?Vo(_,p.expr)+A:ci(_)+A}function Fv(d){switch(d.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return dt(d)&&!!d.bin;case"temporal":return!1}throw new Error(av(d.type))}const fA=(d,p)=>{switch(p.fieldTitle){case"plain":return d.field;case"functional":return function Md(d){const{aggregate:p,bin:_,timeUnit:x,field:S}=d;if(Ua(p))return`${S} for argmax(${p.argmax})`;if(bu(p))return`${S} for argmin(${p.argmin})`;const A=x&&!qo(x)?Fr(x):void 0,O=p||A?.unit||A?.maxbins&&"timeunit"||sr(_)&&"bin";return O?`${O.toUpperCase()}(${S})`:S}(d);default:return function Io(d,p){const{field:_,bin:x,timeUnit:S,aggregate:A}=d;if("count"===A)return p.countTitle;if(sr(x))return`${_} (binned)`;if(S&&!qo(S)){const O=Fr(S)?.unit;if(O)return`${_} (${Kt(O).join("-")})`}else if(A)return Ua(A)?`${_} for max ${A.argmax}`:bu(A)?`${_} for min ${A.argmin}`:`${Mo(A)} of ${_}`;return _}(d,p)}};let Pv=fA;function Gf(d){Pv=d}function cp(d,p,_){let{allowDisabling:x,includeDefault:S=!0}=_;const A=hA(d)?.title;if(!dt(d))return A??d.title;const O=d,P=S?lg(O,p):void 0;return x?ui(A,O.title,P):A??O.title??P}function hA(d){return Dd(d)&&d.axis?d.axis:ag(d)&&d.legend?d.legend:Zr(d)&&d.header?d.header:void 0}function lg(d,p){return Pv(d,p)}function Lv(d){if(dA(d)){const{format:p,formatType:_}=d;return{format:p,formatType:_}}{const p=hA(d)??{},{format:_,formatType:x}=p;return{format:_,formatType:x}}}function ku(d){return dt(d)?d:qf(d)?d.condition:void 0}function Oo(d){return Bn(d)?d:Nv(d)?d.condition:void 0}function mA(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return re.isString(d)||re.isNumber(d)||re.isBoolean(d)?(nt(function $n(d,p,_){return`Channel ${d} is a ${p}. Converted to {value: ${Wn(_)}}.`}(p,re.isString(d)?"string":re.isNumber(d)?"number":"boolean",d)),{value:d}):Bn(d)?qc(d,p,_,x):Nv(d)?{...d,condition:qc(d.condition,p,_,x)}:d}function qc(d,p,_,x){if(dA(d)){const{format:S,formatType:A,...O}=d;if(Uc(A)&&!_.customFormatTypes)return nt(L1(p)),qc(O,p,_,x)}else{const S=Dd(d)?"axis":ag(d)?"legend":Zr(d)?"header":null;if(S&&d[S]){const{format:A,formatType:O,...P}=d[S];if(Uc(O)&&!_.customFormatTypes)return nt(L1(p)),qc({...d,[S]:P},p,_,x)}}return dt(d)?cg(d,p,x):function gE(d){let p=d.type;if(p)return d;const{datum:_}=d;return p=re.isNumber(_)?"quantitative":re.isString(_)?"nominal":_d(_)?"temporal":void 0,{...d,type:p}}(d)}function cg(d,p){let{compositeMark:_=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{aggregate:x,timeUnit:S,bin:A,field:O}=d,P={...d};if(!_&&x&&!K_(x)&&!Ua(x)&&!bu(x)&&(nt(function $c(d){return`Invalid aggregation operator "${d}".`}(x)),delete P.aggregate),S&&(P.timeUnit=Fr(S)),O&&(P.field=`${O}`),sr(A)&&(P.bin=Ad(A,p)),oo(A)&&!Yr(p)&&nt(function $2(d){return`Channel ${d} should not be used with "binned" bin.`}(p)),Yo(P)){const{type:B}=P,q=function bd(d){if(d)switch(d=d.toLowerCase(),d){case"q":case $f:return"quantitative";case"t":case qa:return"temporal";case"o":case Os:return"ordinal";case"n":case wv:return"nominal";case Sa:return"geojson"}}(B);B!==q&&(P.type=q),"quantitative"!==B&&zm(x)&&(nt(function qm(d,p){return`Invalid field type "${d}" for aggregate: "${p}", using "quantitative" instead.`}(B,x)),P.type="quantitative")}else if(!SM(p)){const B=function pA(d,p){switch(p){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(Cd(d)&&re.isArray(d.sort))return"ordinal";const{aggregate:_,bin:x,timeUnit:S}=d;if(S)return"temporal";if(x||_&&!Ua(_)&&!bu(_))return"quantitative";if(sp(d)&&d.scale?.type)switch(Ev[d.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(P,p);P.type=B}if(Yo(P)){const{compatible:B,warning:q}=function Q2(d,p){const _=d.type;if("geojson"===_&&"shape"!==p)return{compatible:!1,warning:`Channel ${p} should not be used with a geojson data.`};switch(p){case ea:case Xl:case yu:return Fv(d)?Iu:{compatible:!1,warning:$1(p)};case Ri:case mo:case Yl:case Qn:case be:case Se:case Fe:case G0:case X0:case I1:case W_:case Gi:case O1:case lt:case As:case Ao:case go:return Iu;case Ho:case ae:case It:case wr:return _!==$f?{compatible:!1,warning:`Channel ${p} should be used with a quantitative field only, not ${d.type} field.`}:Iu;case _e:case nn:case gi:case Ts:case He:case Rc:case ta:case Wi:case Oc:return"nominal"!==_||d.sort?Iu:{compatible:!1,warning:`Channel ${p} should not be used with an unsorted discrete field.`};case ye:case Hh:return Fv(d)||function mE(d){return sp(d)&&vd(d.scale?.type)}(d)?Iu:{compatible:!1,warning:zc(p)};case Kl:return"nominal"!==d.type||"sort"in d?Iu:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(P,p)||{};!1===B&&nt(q)}if(Cd(P)&&re.isString(P.sort)){const{sort:B}=P;if(rg(B))return{...P,sort:{encoding:B}};const q=B.substr(1);if("-"===B.charAt(0)&&rg(q))return{...P,sort:{encoding:q,order:"descending"}}}if(Zr(P)){const{header:B}=P;if(B){const{orient:q,...G}=B;if(q)return{...P,header:{...G,labelOrient:B.labelOrient||q,titleOrient:B.titleOrient||q}}}}return P}function Ad(d,p){return re.isBoolean(d)?{maxbins:iv(p)}:"binned"===d?{binned:!0}:d.maxbins||d.step?d:{...d,maxbins:iv(p)}}const Iu={compatible:!0};function up(d){const{formatType:p}=Lv(d);return"time"===p||!p&&function _E(d){return d&&("temporal"===d.type||dt(d)&&!!d.timeUnit)}(d)}function Td(d,p){let{timeUnit:_,type:x,wrapTime:S,undefinedIfExprNotRequired:A}=p;const O=_&&Fr(_)?.unit;let B,P=O||"temporal"===x;return Ea(d)?B=d.expr:Je(d)?B=d.signal:_d(d)?(P=!0,B=gl(d)):(re.isString(d)||re.isNumber(d))&&P&&(B=`datetime(${Wn(d)})`,function _v(d){return!!nA[d]}(O)&&(re.isNumber(d)&&d<1e4||re.isString(d)&&isNaN(Date.parse(d)))&&(B=gl({[O]:d}))),B?S&&P?`time(${B})`:B:A?void 0:Wn(d)}function gA(d,p){const{type:_}=d;return p.map(x=>{const A=Td(x,{timeUnit:dt(d)&&!qo(d.timeUnit)?d.timeUnit:void 0,type:_,undefinedIfExprNotRequired:!0});return void 0!==A?{signal:A}:x})}function kd(d,p){return sr(d.bin)?pd(p)&&["ordinal","nominal"].includes(d.type):(console.warn("Only call this method for binned field defs."),!1)}const _A={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 Xf(d){return d?.condition}const yE=["domain","grid","labels","ticks","title"],$v={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"},Ou={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},Bv={...Ou,style:1,labelExpr:1,encoding:1};function wy(d){return!!Bv[d]}const zv=We({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 vl(d){return"mark"in d}class Id{constructor(p,_){this.name=p,this.run=_}hasMatchingType(p){return!!vl(p)&&function X2(d){return Du(d)?d.type:d}(p.mark)===this.name}}function xo(d,p){const _=d&&d[p];return!!_&&(re.isArray(_)?li(_,x=>!!x.field):dt(_)||qf(_))}function Yf(d,p){const _=d&&d[p];return!!_&&(re.isArray(_)?li(_,x=>!!x.field):dt(_)||Sd(_)||Nv(_))}function dp(d,p){if(Yr(p)){const _=d[p];if((dt(_)||Sd(_))&&(Z1(_.type)||dt(_)&&_.timeUnit))return Yf(d,To(p))}return!1}function vE(d){return li(Y0,p=>{if(xo(d,p)){const _=d[p];if(re.isArray(_))return li(_,x=>!!x.aggregate);{const x=ku(_);return x&&!!x.aggregate}}return!1})}function Vv(d,p){const _=[],x=[],S=[],A=[],O={};return Ey(d,(P,B)=>{if(dt(P)){const{field:q,aggregate:G,bin:ee,timeUnit:se,...Ee}=P;if(G||se||ee){const Re=hA(P)?.title;let Le=pt(P,{forAs:!0});const Ye={...Re?[]:{title:cp(P,p,{allowDisabling:!0})},...Ee,field:Le};if(G){let bt;if(Ua(G)?(bt="argmax",Le=pt({op:"argmax",field:G.argmax},{forAs:!0}),Ye.field=`${Le}.${q}`):bu(G)?(bt="argmin",Le=pt({op:"argmin",field:G.argmin},{forAs:!0}),Ye.field=`${Le}.${q}`):"boxplot"!==G&&"errorbar"!==G&&"errorband"!==G&&(bt=G),bt){const kn={op:bt,as:Le};q&&(kn.field=q),A.push(kn)}}else if(_.push(Le),Yo(P)&&sr(ee))x.push({bin:ee,field:q,as:Le}),_.push(pt(P,{binSuffix:"end"})),kd(P,B)&&_.push(pt(P,{binSuffix:"range"})),Yr(B)&&(O[`${B}2`]={field:`${Le}_end`}),Ye.bin="binned",SM(B)||(Ye.type=$f);else if(se&&!qo(se)){S.push({timeUnit:se,field:q,as:Le});const bt=Yo(P)&&P.type!==qa&&"time";bt&&(B===G0||B===W_?Ye.formatType=bt:function I2(d){return!!Z0[d]}(B)?Ye.legend={formatType:bt,...Ye.legend}:Yr(B)&&(Ye.axis={formatType:bt,...Ye.axis}))}O[B]=Ye}else _.push(q),O[B]=d[B]}else O[B]=d[B]}),{bins:x,timeUnits:S,aggregate:A,groupby:_,encoding:O}}function yA(d,p,_){const x=O2(p,_);if(!x)return!1;if("binned"===x){const S=d[p===Wi?Ri:mo];return!!(dt(S)&&dt(d[p])&&oo(S.bin))}return!0}function jv(d,p){const _={};for(const x of We(d)){const S=mA(d[x],x,p,{compositeMark:!0});_[x]=S}return _}function xE(d){const p=[];for(const _ of We(d))if(xo(d,_)){const S=re.array(d[_]);for(const A of S)dt(A)?p.push(A):qf(A)&&p.push(A.condition)}return p}function Ey(d,p,_){if(d)for(const x of We(d)){const S=d[x];if(re.isArray(S))for(const A of S)p.call(_,A,x);else p.call(_,S,x)}}function Od(d,p){return We(p).reduce((_,x)=>{switch(x){case Ri:case mo:case Gi:case go:case O1:case Wi:case Oc:case Yl:case Qn:case As:case Rc:case Ao:case ta:case It:case Ho:case wr:case ae:case G0:case ye:case lt:case W_:return _;case Kl:if("line"===d||"trail"===d)return _;case X0:case I1:{const S=p[x];if(re.isArray(S)||dt(S))for(const A of re.array(S))A.aggregate||_.push(pt(A,{}));return _}case He:if("trail"===d)return _;case be:case Se:case Fe:case _e:case nn:case gi:case Hh:case Ts:{const S=ku(p[x]);return S&&!S.aggregate&&_.push(pt(S,{})),_}}},[])}function Wv(d,p,_){let x=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return"tooltip"in _?{tooltip:_.tooltip}:{tooltip:[...d.map(O=>{let{fieldPrefix:P,titlePrefix:B}=O;const q=x?` of ${Cy(p)}`:"";return{field:P+p.field,type:p.type,title:Je(B)?{signal:`${B}"${escape(q)}"`}:B+q}}),...Ci(xE(_).map(ap),kt)]}}function Cy(d){const{title:p,field:_}=d;return ui(p,_)}function Sy(d,p,_,x,S){const{scale:A,axis:O}=_;return P=>{let{partName:B,mark:q,positionPrefix:G,endPositionPrefix:ee,extraEncoding:se={}}=P;const Ee=Cy(_);return qv(d,B,S,{mark:q,encoding:{[p]:{field:`${G}_${_.field}`,type:_.type,...void 0!==Ee?{title:Ee}:{},...void 0!==A?{scale:A}:{},...void 0!==O?{axis:O}:{}},...re.isString(ee)?{[`${p}2`]:{field:`${ee}_${_.field}`}}:{},...x,...se}})}}function qv(d,p,_,x){const{clip:S,color:A,opacity:O}=d,P=d.type;return d[p]||void 0===d[p]&&_[p]?[{...x,mark:{..._[p],...S?{clip:S}:{},...A?{color:A}:{},...O?{opacity:O}:{},...Du(x.mark)?x.mark:{type:x.mark},style:`${P}-${String(p)}`,...re.isBoolean(d[p])?{}:d[p]}}]:[]}function bA(d,p,_){const{encoding:x}=d,S="vertical"===p?"y":"x",O=x[`${S}2`],P=x[`${S}Error`],B=x[`${S}Error2`];return{continuousAxisChannelDef:dg(x[S],_),continuousAxisChannelDef2:dg(O,_),continuousAxisChannelDefError:dg(P,_),continuousAxisChannelDefError2:dg(B,_),continuousAxis:S}}function dg(d,p){if(d?.aggregate){const{aggregate:_,...x}=d;return _!==p&&nt(function vo(d,p){return`Continuous axis should not have customized aggregation function ${d}; ${p} already agregates the axis.`}(_,p)),x}return d}function vA(d,p){const{mark:_,encoding:x}=d,{x:S,y:A}=x;if(Du(_)&&_.orient)return _.orient;if(Wc(S)){if(Wc(A)){const O=dt(S)&&S.aggregate,P=dt(A)&&A.aggregate;if(!O&&P===p)return"vertical";if(!P&&O===p)return"horizontal";if(O===p&&P===p)throw new Error("Both x and y cannot have aggregate");return up(A)&&!up(S)?"horizontal":"vertical"}return"horizontal"}if(Wc(A))return"vertical";throw new Error(`Need a valid continuous axis for ${p}s`)}const Dy="boxplot",wA=new Id(Dy,hr);function wE(d){return re.isNumber(d)?"tukey":d}function hr(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{mark:x,encoding:S,params:A,projection:O,...P}=d,B=Du(x)?x:{type:x};A&&nt(tc("boxplot"));const q=B.extent??_.boxplot.extent,G=Ji("size",B,_),ee=B.invalid,se=wE(q),{bins:Ee,timeUnits:De,transform:Re,continuousAxisChannelDef:Le,continuousAxis:Ye,groupby:bt,aggregate:kn,encodingWithoutContinuousAxis:dn,ticksOrient:vi,boxOrient:lr,customTooltipWithoutAggregatedField:ca}=function Ru(d,p,_){const x=vA(d,Dy),{continuousAxisChannelDef:S,continuousAxis:A}=bA(d,x,Dy),O=S.field,P=wE(p),B=[...My(O),{op:"median",field:O,as:`mid_box_${O}`},{op:"min",field:O,as:("min-max"===P?"lower_whisker_":"min_")+O},{op:"max",field:O,as:("min-max"===P?"upper_whisker_":"max_")+O}],q="min-max"===P||"tukey"===P?[]:[{calculate:`datum["upper_box_${O}"] - datum["lower_box_${O}"]`,as:`iqr_${O}`},{calculate:`min(datum["upper_box_${O}"] + datum["iqr_${O}"] * ${p}, datum["max_${O}"])`,as:`upper_whisker_${O}`},{calculate:`max(datum["lower_box_${O}"] - datum["iqr_${O}"] * ${p}, datum["min_${O}"])`,as:`lower_whisker_${O}`}],{[A]:G,...ee}=d.encoding,{customTooltipWithoutAggregatedField:se,filteredEncoding:Ee}=function Hv(d){const{tooltip:p,..._}=d;if(!p)return{filteredEncoding:_};let x,S;if(re.isArray(p)){for(const A of p)A.aggregate?(x||(x=[]),x.push(A)):(S||(S=[]),S.push(A));x&&(_.tooltip=x)}else p.aggregate?_.tooltip=p:S=p;return re.isArray(S)&&1===S.length&&(S=S[0]),{customTooltipWithoutAggregatedField:S,filteredEncoding:_}}(ee),{bins:De,timeUnits:Re,aggregate:Le,groupby:Ye,encoding:bt}=Vv(Ee,_),kn="vertical"===x?"horizontal":"vertical",dn=x;return{bins:De,timeUnits:Re,transform:[...De,...Re,{aggregate:[...Le,...B],groupby:Ye},...q],groupby:Ye,aggregate:Le,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:bt,ticksOrient:kn,boxOrient:dn,customTooltipWithoutAggregatedField:se}}(d,q,_),{color:ua,size:da,...Ml}=dn,fa=kR=>Sy(B,Ye,Le,kR,_.boxplot),em=fa(Ml),Rb=fa(dn),Nb=fa({...Ml,...da?{size:da}:{}}),Gu=Wv([{fieldPrefix:"min-max"===se?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===se?"lower_whisker_":"min_",titlePrefix:"Min"}],Le,dn),dw={type:"tick",color:"black",opacity:1,orient:vi,invalid:ee,aria:!1},tf="min-max"===se?Gu:Wv([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],Le,dn),tS=[...em({partName:"rule",mark:{type:"rule",invalid:ee,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:tf}),...em({partName:"rule",mark:{type:"rule",invalid:ee,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:tf}),...em({partName:"ticks",mark:dw,positionPrefix:"lower_whisker",extraEncoding:tf}),...em({partName:"ticks",mark:dw,positionPrefix:"upper_whisker",extraEncoding:tf})],ek=[..."tukey"!==se?tS:[],...Rb({partName:"box",mark:{type:"bar",...G?{size:G}:{},orient:lr,invalid:ee,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:Gu}),...Nb({partName:"median",mark:{type:"tick",invalid:ee,...re.isObject(_.boxplot.median)&&_.boxplot.median.color?{color:_.boxplot.median.color}:{},...G?{size:G}:{},orient:vi,aria:!1},positionPrefix:"mid_box",extraEncoding:Gu})];if("min-max"===se)return{...P,transform:(P.transform??[]).concat(Re),layer:ek};const tk=`datum["lower_box_${Le.field}"]`,nk=`datum["upper_box_${Le.field}"]`,nS=`(${nk} - ${tk})`,tm=`${tk} - ${q} * ${nS}`,fw=`${nk} + ${q} * ${nS}`,Fb=`datum["${Le.field}"]`,iS={joinaggregate:My(Le.field),groupby:bt},n_={transform:[{filter:`(${tm} <= ${Fb}) && (${Fb} <= ${fw})`},{aggregate:[{op:"min",field:Le.field,as:`lower_whisker_${Le.field}`},{op:"max",field:Le.field,as:`upper_whisker_${Le.field}`},{op:"min",field:`lower_box_${Le.field}`,as:`lower_box_${Le.field}`},{op:"max",field:`upper_box_${Le.field}`,as:`upper_box_${Le.field}`},...kn],groupby:bt}],layer:tS},{tooltip:Pb,...AR}=Ml,{scale:ik,axis:TR}=Le,rk=Cy(Le),ok=yt(TR,["title"]),sk=qv(B,"outliers",_.boxplot,{transform:[{filter:`(${Fb} < ${tm}) || (${Fb} > ${fw})`}],mark:"point",encoding:{[Ye]:{field:Le.field,type:Le.type,...void 0!==rk?{title:rk}:{},...void 0!==ik?{scale:ik}:{},...Gt(ok)?{}:{axis:ok}},...AR,...ua?{color:ua}:{},...ca?{tooltip:ca}:{}}})[0];let nm;const ak=[...Ee,...De,iS];return sk?nm={transform:ak,layer:[sk,n_]}:(nm=n_,nm.transform.unshift(...ak)),{...P,layer:[nm,{transform:Re,layer:ek}]}}function My(d){return[{op:"q1",field:d,as:`lower_box_${d}`},{op:"q3",field:d,as:`upper_box_${d}`}]}const fg="errorbar",fp=new Id(fg,EA);function EA(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{transform:x,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:O,ticksOrient:P,markDef:B,outerSpec:q,tooltipEncoding:G}=hp(d,fg,_);delete O.size;const ee=Sy(B,A,S,O,_.errorbar),se=B.thickness,Ee=B.size,De={type:"tick",orient:P,aria:!1,...void 0!==se?{thickness:se}:{},...void 0!==Ee?{size:Ee}:{}},Re=[...ee({partName:"ticks",mark:De,positionPrefix:"lower",extraEncoding:G}),...ee({partName:"ticks",mark:De,positionPrefix:"upper",extraEncoding:G}),...ee({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==se?{size:se}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:G})];return{...q,transform:x,...Re.length>1?{layer:Re}:{...Re[0]}}}function CA(d,p){const{encoding:_}=d;if(function Ay(d){return(Bn(d.x)||Bn(d.y))&&!Bn(d.x2)&&!Bn(d.y2)&&!Bn(d.xError)&&!Bn(d.xError2)&&!Bn(d.yError)&&!Bn(d.yError2)}(_))return{orient:vA(d,p),inputType:"raw"};const x=function CE(d){return Bn(d.x2)||Bn(d.y2)}(_),S=function Rd(d){return Bn(d.xError)||Bn(d.xError2)||Bn(d.yError)||Bn(d.yError2)}(_),A=_.x,O=_.y;if(x){if(S)throw new Error(`${p} cannot be both type aggregated-upper-lower and aggregated-error`);const P=_.x2,B=_.y2;if(Bn(P)&&Bn(B))throw new Error(`${p} cannot have both x2 and y2`);if(Bn(P)){if(Wc(A))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${p}`)}if(Bn(B)){if(Wc(O))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${p}`)}throw new Error("No ranged axis")}{const P=_.xError,q=_.yError,G=_.yError2;if(Bn(_.xError2)&&!Bn(P))throw new Error(`${p} cannot have xError2 without xError`);if(Bn(G)&&!Bn(q))throw new Error(`${p} cannot have yError2 without yError`);if(Bn(P)&&Bn(q))throw new Error(`${p} cannot have both xError and yError with both are quantiative`);if(Bn(P)){if(Wc(A))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Bn(q)){if(Wc(O))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function hp(d,p,_){const{mark:x,encoding:S,params:A,projection:O,...P}=d,B=Du(x)?x:{type:x};A&&nt(tc(p));const{orient:q,inputType:G}=CA(d,p),{continuousAxisChannelDef:ee,continuousAxisChannelDef2:se,continuousAxisChannelDefError:Ee,continuousAxisChannelDefError2:De,continuousAxis:Re}=bA(d,q,p),{errorBarSpecificAggregate:Le,postAggregateCalculates:Ye,tooltipSummary:bt,tooltipTitleWithFieldName:kn}=function SA(d,p,_,x,S,A,O,P){let B=[],q=[];const G=p.field;let ee,se=!1;if("raw"===A){const Ee=d.center?d.center:d.extent?"iqr"===d.extent?"median":"mean":P.errorbar.center,De=d.extent?d.extent:"mean"===Ee?"stderr":"iqr";if("median"===Ee!=("iqr"===De)&&nt(function JM(d,p,_){return`${d} is not usually used with ${p} for ${_}.`}(Ee,De,O)),"stderr"===De||"stdev"===De)B=[{op:De,field:G,as:`extent_${G}`},{op:Ee,field:G,as:`center_${G}`}],q=[{calculate:`datum["center_${G}"] + datum["extent_${G}"]`,as:`upper_${G}`},{calculate:`datum["center_${G}"] - datum["extent_${G}"]`,as:`lower_${G}`}],ee=[{fieldPrefix:"center_",titlePrefix:Mo(Ee)},{fieldPrefix:"upper_",titlePrefix:Gv(Ee,De,"+")},{fieldPrefix:"lower_",titlePrefix:Gv(Ee,De,"-")}],se=!0;else{let Re,Le,Ye;"ci"===De?(Re="mean",Le="ci0",Ye="ci1"):(Re="median",Le="q1",Ye="q3"),B=[{op:Le,field:G,as:`lower_${G}`},{op:Ye,field:G,as:`upper_${G}`},{op:Re,field:G,as:`center_${G}`}],ee=[{fieldPrefix:"upper_",titlePrefix:cp({field:G,aggregate:Ye,type:"quantitative"},P,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:cp({field:G,aggregate:Le,type:"quantitative"},P,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:cp({field:G,aggregate:Re,type:"quantitative"},P,{allowDisabling:!1})}]}}else{(d.center||d.extent)&&nt(function j1(d,p){return`${p?"extent ":""}${p&&d?"and ":""}${d?"center ":""}${p&&d?"are ":"is "}not needed when data are aggregated.`}(d.center,d.extent)),"aggregated-upper-lower"===A?(ee=[],q=[{calculate:`datum["${_.field}"]`,as:`upper_${G}`},{calculate:`datum["${G}"]`,as:`lower_${G}`}]):"aggregated-error"===A&&(ee=[{fieldPrefix:"",titlePrefix:G}],q=[{calculate:`datum["${G}"] + datum["${x.field}"]`,as:`upper_${G}`}],q.push(S?{calculate:`datum["${G}"] + datum["${S.field}"]`,as:`lower_${G}`}:{calculate:`datum["${G}"] - datum["${x.field}"]`,as:`lower_${G}`}));for(const Ee of q)ee.push({fieldPrefix:Ee.as.substring(0,6),titlePrefix:jo(jo(Ee.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:q,errorBarSpecificAggregate:B,tooltipSummary:ee,tooltipTitleWithFieldName:se}}(B,ee,se,Ee,De,G,p,_),{[Re]:dn,["x"===Re?"x2":"y2"]:vi,["x"===Re?"xError":"yError"]:lr,["x"===Re?"xError2":"yError2"]:ca,...ua}=S,{bins:da,timeUnits:Ml,aggregate:fa,groupby:em,encoding:Rb}=Vv(ua,_),Nb=[...fa,...Le],Gu="raw"!==G?[]:em,dw=Wv(bt,ee,Rb,kn);return{transform:[...P.transform??[],...da,...Ml,...0===Nb.length?[]:[{aggregate:Nb,groupby:Gu}],...Ye],groupby:Gu,continuousAxisChannelDef:ee,continuousAxis:Re,encodingWithoutContinuousAxis:Rb,ticksOrient:"vertical"===q?"horizontal":"vertical",markDef:B,outerSpec:P,tooltipEncoding:dw}}function Gv(d,p,_){return`${Mo(d)} ${_} ${p}`}const ps="errorband",Ko=new Id(ps,Xv);function Xv(d,p){let{config:_}=p;d={...d,encoding:jv(d.encoding,_)};const{transform:x,continuousAxisChannelDef:S,continuousAxis:A,encodingWithoutContinuousAxis:O,markDef:P,outerSpec:B,tooltipEncoding:q}=hp(d,ps,_),G=P,ee=Sy(G,A,S,O,_.errorband),se=void 0!==d.encoding.x&&void 0!==d.encoding.y;let Ee={type:se?"area":"rect"},De={type:se?"line":"rule"};const Re={...G.interpolate?{interpolate:G.interpolate}:{},...G.tension&&G.interpolate?{tension:G.tension}:{}};return se?(Ee={...Ee,...Re,ariaRoleDescription:"errorband"},De={...De,...Re,aria:!1}):G.interpolate?nt(ry("interpolate")):G.tension&&nt(ry("tension")),{...B,transform:x,layer:[...ee({partName:"band",mark:Ee,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:q}),...ee({partName:"borders",mark:De,positionPrefix:"lower",extraEncoding:q}),...ee({partName:"borders",mark:De,positionPrefix:"upper",extraEncoding:q})]}}const DA={};function Yv(d,p,_){const x=new Id(d,p);DA[d]={normalizer:x,parts:_}}Yv(Dy,hr,["box","median","outliers","rule","ticks"]),Yv(fg,EA,["ticks","rule"]),Yv(ps,Xv,["band","borders"]);const J2=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Ty={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"},pp={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"},xl=We(Ty),Kf=We(pp),hg=We({header:1,headerRow:1,headerColumn:1,headerFacet:1}),Nd=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Ya="_vgsid_",SE={point:{on:"click",fields:[Ya],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 DE(d){return"legend"===d||!!d?.legend}function Iy(d){return DE(d)&&re.isObject(d)}function AA(d){return!!d?.select}function pg(d){const p=[];for(const _ of d||[]){if(AA(_))continue;const{expr:x,bind:S,...A}=_;if(S&&x){const O={...A,bind:S,init:x};p.push(O)}else{const O={...A,...x?{update:x}:{},...S?{bind:S}:{}};p.push(O)}}return p}function ME(d){return"concat"in d}function mg(d){return"vconcat"in d}function Oy(d){return"hconcat"in d}function AE(d){let{step:p,offsetIsDiscrete:_}=d;return _?p.for??"offset":"position"}function Fd(d){return re.isObject(d)&&void 0!==d.step}function Ry(d){return d.view||d.width||d.height}const J$=We({align:1,bounds:1,center:1,columns:1,spacing:1});function Aa(d,p){return d[p]??d["width"===p?"continuousWidth":"continuousHeight"]}function pr(d,p){const _=lo(d,p);return Fd(_)?_.step:lc}function lo(d,p){return ui(d[p]??d["width"===p?"discreteWidth":"discreteHeight"],{step:d.step})}const lc=20,gg={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:lc},mark:{color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},arc:{},area:{},bar:sE,circle:{},geoshape:{},image:{},line:{},point:{},rect:aE,rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},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,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,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:SE,style:{},title:{},facet:{spacing:20},concat:{spacing:20},normalizedNumberFormat:".0%"},Nu=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],gp={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Kv={blue:Nu[0],orange:Nu[1],red:Nu[2],teal:Nu[3],green:Nu[4],yellow:Nu[5],purple:Nu[6],pink:Nu[7],brown:Nu[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 Ly(d){const p=We(d||{}),_={};for(const x of p){const S=d[x];_[x]=Xf(S)?RM(S):Ha(S)}return _}const tR=[...rp,...zv,...hg,"background","padding","legend","lineBreak","scale","style","title","view"];function kE(){let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:p,font:_,fontSize:x,selection:S,...A}=d,O=re.mergeConfig({},st(gg),_?function Py(d){return{text:{font:d},style:{"guide-label":{font:d},"guide-title":{font:d},"group-title":{font:d},"group-subtitle":{font:d}}}}(_):{},p?function TE(){let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:re.isObject(d)?{...Kv,...d}:Kv}],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"}]}}}(p):{},x?function kA(d){return{signals:[{name:"fontSize",value:re.isObject(d)?{...gp,...d}:gp}],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"}}}}}(x):{},A||{});S&&re.writeConfig(O,"selection",S,!0);const P=yt(O,tR);for(const B of["background","lineBreak","padding"])O[B]&&(P[B]=Ha(O[B]));for(const B of rp)O[B]&&(P[B]=_o(O[B]));for(const B of zv)O[B]&&(P[B]=Ly(O[B]));for(const B of hg)O[B]&&(P[B]=_o(O[B]));return O.legend&&(P.legend=_o(O.legend)),O.scale&&(P.scale=_o(O.scale)),O.style&&(P.style=function Pd(d){const p=We(d),_={};for(const x of p)_[x]=Ly(d[x]);return _}(O.style)),O.title&&(P.title=_o(O.title)),O.view&&(P.view=_o(O.view)),P}const IE=new Set(["view",...eg]),OE=["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"],RE={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]};function IA(d){d=st(d);for(const p of OE)delete d[p];if(d.axis)for(const p in d.axis)Xf(d.axis[p])&&delete d.axis[p];if(d.legend)for(const p of J2)delete d.legend[p];if(d.mark){for(const p of G2)delete d.mark[p];d.mark.tooltip&&re.isObject(d.mark.tooltip)&&delete d.mark.tooltip}d.params&&(d.signals=(d.signals||[]).concat(pg(d.params)),delete d.params);for(const p of IE){for(const x of G2)delete d[p][x];const _=RE[p];if(_)for(const x of _)delete d[p][x];RA(d,p)}for(const p of function MA(){return We(DA)}())delete d[p];!function OA(d){const{titleMarkConfig:p,subtitleMarkConfig:_,subtitle:x}=pl(d.title);Gt(p)||(d.style["group-title"]={...d.style["group-title"],...p}),Gt(_)||(d.style["group-subtitle"]={...d.style["group-subtitle"],..._}),Gt(x)?delete d.title:d.title=x}(d);for(const p in d)re.isObject(d[p])&&Gt(d[p])&&delete d[p];return Gt(d)?void 0:d}function RA(d,p,_,x){"view"===p&&(_="cell");const A={...x?d[p][x]:d[p],...d.style[_??p]};Gt(A)||(d.style[_??p]=A),x||delete d[p]}function _p(d){return"layer"in d}class Fs{map(p,_){return _y(p)?this.mapFacet(p,_):function Zv(d){return"repeat"in d}(p)?this.mapRepeat(p,_):Oy(p)?this.mapHConcat(p,_):mg(p)?this.mapVConcat(p,_):ME(p)?this.mapConcat(p,_):this.mapLayerOrUnit(p,_)}mapLayerOrUnit(p,_){if(_p(p))return this.mapLayer(p,_);if(vl(p))return this.mapUnit(p,_);throw new Error(ov(p))}mapLayer(p,_){return{...p,layer:p.layer.map(x=>this.mapLayerOrUnit(x,_))}}mapHConcat(p,_){return{...p,hconcat:p.hconcat.map(x=>this.map(x,_))}}mapVConcat(p,_){return{...p,vconcat:p.vconcat.map(x=>this.map(x,_))}}mapConcat(p,_){const{concat:x,...S}=p;return{...S,concat:x.map(A=>this.map(A,_))}}mapFacet(p,_){return{...p,spec:this.map(p.spec,_)}}mapRepeat(p,_){return{...p,spec:this.map(p.spec,_)}}}const NE={zero:1,center:1,normalize:1};const Qv=new Set([iE,_l,xd,Su,np,zf,Vf,wd,Av,U2]),Ps=new Set([_l,xd,iE]);function Fu(d){return dt(d)&&"quantitative"===Qr(d)&&!d.bin}function _g(d,p,_){let{orient:x,type:S}=_;const A="x"===p?"y":"radius",O="x"===p&&["bar","area"].includes(S),P=d[p],B=d[A];if(dt(P)&&dt(B))if(Fu(P)&&Fu(B)){if(P.stack)return p;if(B.stack)return A;const q=dt(P)&&!!P.aggregate;if(q!==(dt(B)&&!!B.aggregate))return q?p:A;if(O){if("vertical"===x)return A;if("horizontal"===x)return p}}else{if(Fu(P))return p;if(Fu(B))return A}else{if(Fu(P))return O&&"vertical"===x?void 0:p;if(Fu(B))return O&&"horizontal"===x?void 0:A}}function LA(d,p){const _=Du(d)?d:{type:d},x=_.type;if(!Qv.has(x))return null;const S=_g(p,"x",_)||_g(p,"theta",_);if(!S)return null;const A=p[S],O=dt(A)?pt(A,{}):void 0,P=function PA(d){switch(d){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(S),B=[],q=new Set;if(p[P]){const Re=p[P],Le=dt(Re)?pt(Re,{}):void 0;Le&&Le!==O&&(B.push(P),q.add(Le))}const G="x"===P?"xOffset":"yOffset",ee=p[G],se=dt(ee)?pt(ee,{}):void 0;se&&se!==O&&(B.push(G),q.add(se));const Ee=$m.reduce((Re,Le)=>{if("tooltip"!==Le&&xo(p,Le)){const Ye=p[Le];for(const bt of re.array(Ye)){const kn=ku(bt);if(kn.aggregate)continue;const dn=pt(kn,{});(!dn||!q.has(dn))&&Re.push({channel:Le,fieldDef:kn})}}return Re},[]);let De;return void 0!==A.stack?De=re.isBoolean(A.stack)?A.stack?"zero":null:A.stack:Ps.has(x)&&(De="zero"),!De||!function FA(d){return d in NE}(De)||vE(p)&&0===Ee.length?null:A?.scale?.type&&A?.scale?.type!==Ga.LINEAR?(A?.stack&&nt(function K$(d){return`Cannot stack non-linear scale (${d}).`}(A.scale.type)),null):Bn(p[Or(S)])?(void 0!==A.stack&&nt(function ZM(d){return`Cannot stack "${d}" if there is already "${d}2".`}(S)),null):(dt(A)&&A.aggregate&&!Vm.has(A.aggregate)&&nt(function QM(d){return`Stacking is applied even though the aggregate function is non-summative ("${d}").`}(A.aggregate)),{groupbyChannels:B,groupbyFields:q,fieldChannel:S,impute:null!==A.impute&&yl(x),stackBy:Ee,offset:De})}function FE(d,p,_){const x=_o(d),S=Ji("orient",x,_);if(x.orient=function Zf(d,p,_){switch(d){case np:case zf:case Vf:case Av:case lA:case ze:return}const{x,y:S,x2:A,y2:O}=p;switch(d){case _l:if(dt(x)&&(oo(x.bin)||dt(S)&&S.aggregate&&!x.aggregate))return"vertical";if(dt(S)&&(oo(S.bin)||dt(x)&&x.aggregate&&!S.aggregate))return"horizontal";if(O||A){if(_)return _;if(!A)return(dt(x)&&x.type===$f&&!sr(x.bin)||sg(x))&&dt(S)&&oo(S.bin)?"horizontal":"vertical";if(!O)return(dt(S)&&S.type===$f&&!sr(S.bin)||sg(S))&&dt(x)&&oo(x.bin)?"vertical":"horizontal"}case Su:if(A&&(!dt(x)||!oo(x.bin))&&O&&(!dt(S)||!oo(S.bin)))return;case xd:if(O)return dt(S)&&oo(S.bin)?"horizontal":"vertical";if(A)return dt(x)&&oo(x.bin)?"vertical":"horizontal";if(d===Su){if(x&&!S)return"vertical";if(S&&!x)return"horizontal"}case wd:case U2:{const P=pE(x),B=pE(S);if(_)return _;if(P&&!B)return"tick"!==d?"horizontal":"vertical";if(!P&&B)return"tick"!==d?"vertical":"horizontal";if(P&&B)return"vertical";{const q=Yo(x)&&x.type===qa,G=Yo(S)&&S.type===qa;if(q&&!G)return"vertical";if(!q&&G)return"horizontal"}return}}return"vertical"}(x.type,p,S),void 0!==S&&S!==x.orient&&nt(function HM(d,p){return`Specified orient "${d}" overridden with "${p}".`}(x.orient,S)),"bar"===x.type&&x.orient){const P=Ji("cornerRadiusEnd",x,_);if(void 0!==P){const B="horizontal"===x.orient&&p.x2||"vertical"===x.orient&&p.y2?["cornerRadius"]:oc[x.orient];for(const q of B)x[q]=P;void 0!==x.cornerRadiusEnd&&delete x.cornerRadiusEnd}}return void 0===Ji("opacity",x,_)&&(x.opacity=function Jv(d,p){if(St([np,U2,zf,Vf],d)&&!vE(p))return.7}(x.type,p)),void 0===Ji("cursor",x,_)&&(x.cursor=function tr(d,p,_){return p.href||d.href||Ji("href",d,_)?"pointer":d.cursor}(x,p,_)),x}function nR(d){const{point:p,line:_,...x}=d;return We(x).length>1?x:x.type}function $A(d){for(const p of["line","area","rule","trail"])d[p]&&(d={...d,[p]:yt(d[p],["point","line"])});return d}function $y(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_=arguments.length>2?arguments[2]:void 0;return"transparent"===d.point?{opacity:0}:d.point?re.isObject(d.point)?d.point:{}:void 0!==d.point?null:p.point||_.shape?re.isObject(p.point)?p.point:{}:void 0}function yp(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.line?!0===d.line?{}:d.line:void 0!==d.line?null:p.line?!0===p.line?{}:p.line:void 0}class ex{constructor(){ln(this,"name","path-overlay")}hasMatchingType(p,_){if(vl(p)){const{mark:x,encoding:S}=p,A=Du(x)?x:{type:x};switch(A.type){case"line":case"rule":case"trail":return!!$y(A,_[A.type],S);case"area":return!!$y(A,_[A.type],S)||!!yp(A,_[A.type])}}return!1}run(p,_,x){const{config:S}=_,{params:A,projection:O,mark:P,name:B,encoding:q,...G}=p,ee=jv(q,S),se=Du(P)?P:{type:P},Ee=$y(se,S[se.type],ee),De="area"===se.type&&yp(se,S[se.type]),Re=[{name:B,...A?{params:A}:{},mark:nR({..."area"===se.type&&void 0===se.opacity&&void 0===se.fillOpacity?{opacity:.7}:{},...se}),encoding:yt(ee,["shape"])}],Le=LA(FE(se,ee,S),ee);let Ye=ee;if(Le){const{fieldChannel:bt,offset:kn}=Le;Ye={...ee,[bt]:{...ee[bt],...kn?{stack:kn}:{}}}}return Ye=yt(Ye,["y2","x2"]),De&&Re.push({...O?{projection:O}:{},mark:{type:"line",...Sn(se,["clip","interpolate","tension","tooltip"]),...De},encoding:Ye}),Ee&&Re.push({...O?{projection:O}:{},mark:{type:"point",opacity:1,filled:!0,...Sn(se,["clip","tooltip"]),...Ee},encoding:Ye}),x({...G,layer:Re},{..._,config:$A(S)})}}function By(d,p){return p?og(d)?zA(d,p):nx(d,p):d}function Ld(d,p){return p?zA(d,p):d}function tx(d,p,_){const x=p[d];return function K2(d){return d&&!re.isString(d)&&"repeat"in d}(x)?x.repeat in _?{...p,[d]:_[x.repeat]}:void nt(function ty(d){return`Unknown repeated value "${d}".`}(x.repeat)):p}function nx(d,p){if(void 0!==(d=tx("field",d,p))){if(null===d)return null;if(Cd(d)&&sa(d.sort)){const _=tx("field",d.sort,p);d={...d,..._?{sort:_}:{}}}return d}}function zy(d,p){if(dt(d))return nx(d,p);{const _=tx("datum",d,p);return _!==d&&!_.type&&(_.type="nominal"),_}}function BA(d,p){if(!Bn(d)){if(Nv(d)){const _=zy(d.condition,p);if(_)return{...d,condition:_};{const{condition:x,...S}=d;return S}}return d}{const _=zy(d,p);if(_)return _;if(hE(d))return{condition:d.condition}}}function zA(d,p){const _={};for(const x in d)if(re.hasOwnProperty(d,x)){const S=d[x];if(re.isArray(S))_[x]=S.map(A=>BA(A,p)).filter(A=>A);else{const A=BA(S,p);void 0!==A&&(_[x]=A)}}return _}class VA{constructor(){ln(this,"name","RuleForRangedLine")}hasMatchingType(p){if(vl(p)){const{encoding:_,mark:x}=p;if("line"===x||Du(x)&&"line"===x.type)for(const S of Tf){const O=_[Fc(S)];if(_[S]&&(dt(O)&&!oo(O.bin)||Sd(O)))return!0}}return!1}run(p,_,x){const{encoding:S,mark:A}=p;return nt(function B1(d,p){return`Line mark is for continuous lines and thus cannot be used with ${d&&p?"x2 and y2":d?"x2":"y2"}. We will use the rule mark (line segments) instead.`}(!!S.x2,!!S.y2)),x({...p,mark:re.isObject(A)?{...A,type:"rule"}:"rule"},_)}}function jA(d){let{parentEncoding:p,encoding:_={},layer:x}=d,S={};if(p){const A=new Set([...We(p),...We(_)]);for(const O of A){const P=_[O],B=p[O];if(Bn(P)){const q={...B,...P};S[O]=q}else Nv(P)?S[O]={...P,condition:{...B,...P.condition}}:P||null===P?S[O]=P:(x||Ma(B)||Je(B)||Bn(B)||re.isArray(B))&&(S[O]=B)}}else S=_;return!S||Gt(S)?void 0:S}function iR(d){const{parentProjection:p,projection:_}=d;return p&&_&&nt(function Ff(d){const{parentProjection:p,projection:_}=d;return`Layer's shared projection ${Wn(p)} is overridden by a child projection ${Wn(_)}.`}({parentProjection:p,projection:_})),_??p}function Vy(d){return"filter"in d}function bg(d){return"lookup"in d}function rR(d){return"pivot"in d}function LE(d){return"density"in d}function ox(d){return"quantile"in d}function bp(d){return"regression"in d}function $E(d){return"loess"in d}function HA(d){return"sample"in d}function oR(d){return"window"in d}function e3(d){return"joinaggregate"in d}function sx(d){return"flatten"in d}function sR(d){return"calculate"in d}function BE(d){return"bin"in d}function WA(d){return"impute"in d}function zE(d){return"timeUnit"in d}function VE(d){return"aggregate"in d}function qA(d){return"stack"in d}function ax(d){return"fold"in d}function vp(d){return"extent"in d&&!("density"in d)}function jy(d,p){const{transform:_,...x}=d;return _?{...x,transform:_.map(A=>{if(Vy(A))return{filter:Qf(A,p)};if(BE(A)&&Lc(A.bin))return{...A,bin:Ta(A.bin)};if(bg(A)){const{selection:O,...P}=A.from;return O?{...A,from:{param:O,...P}}:A}return A})}:d}function Ka(d,p){const _=st(d);if(dt(_)&&Lc(_.bin)&&(_.bin=Ta(_.bin)),sp(_)&&_.scale?.domain?.selection){const{selection:x,...S}=_.scale.domain;_.scale.domain={...S,...x?{param:x}:{}}}if(hE(_))if(re.isArray(_.condition))_.condition=_.condition.map(x=>{const{selection:S,param:A,test:O,...P}=x;return A?x:{...P,test:Qf(x,p)}});else{const{selection:x,param:S,test:A,...O}=Ka(_.condition,p);_.condition=S?_.condition:{...O,test:Qf(_.condition,p)}}return _}function Ta(d){const p=d.extent;if(p?.selection){const{selection:_,...x}=p;return{...d,extent:{...x,param:_}}}return d}function Qf(d,p){const _=x=>At(x,S=>{const O={param:S,empty:p.emptySelections[S]??!0};return p.selectionPredicates[S]??=[],p.selectionPredicates[S].push(O),O});return d.selection?_(d.selection):At(d.test||d.filter,x=>x.selection?_(x.selection):x)}class UE extends Fs{map(p,_){const x=_.selections??[];if(p.params&&!vl(p)){const S=[];for(const A of p.params)AA(A)?x.push(A):S.push(A);p.params=S}return _.selections=x,super.map(p,_)}mapUnit(p,_){const x=_.selections;if(!x||!x.length)return p;const S=(_.path??[]).concat(p.name),A=[];for(const O of x)if(O.views&&O.views.length)for(const P of O.views)(re.isString(P)&&(P===p.name||S.includes(P))||re.isArray(P)&&P.map(B=>S.indexOf(B)).every((B,q,G)=>-1!==B&&(0===q||B>G[q-1])))&&A.push(O);else A.push(O);return A.length&&(p.params=A),p}}for(const d of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const p=UE.prototype[d];UE.prototype[d]=function(_,x){return p.call(this,_,XA(_,x))}}function XA(d,p){return d.name?{...p,path:(p.path??[]).concat(d.name)}:p}function YA(d,p){void 0===p&&(p=kE(d.config));const _=function $d(d){const _={config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}};return KA.map(t3.map(n3.map(d,_),_),_)}(d,p),{width:x,height:S}=d,A=function lx(d,p,_){let{width:x,height:S}=p;const A=vl(d)||_p(d),O={};A?"container"==x&&"container"==S?(O.type="fit",O.contains="padding"):"container"==x?(O.type="fit-x",O.contains="padding"):"container"==S&&(O.type="fit-y",O.contains="padding"):("container"==x&&(nt(jm("width")),x=void 0),"container"==S&&(nt(jm("height")),S=void 0));const P={type:"pad",...O,..._?Uy(_.autosize):{},...Uy(d.autosize)};if("fit"===P.type&&!A&&(nt(VM),P.type="pad"),"container"==x&&!("fit"==P.type||"fit-x"==P.type)&&nt(jM("width")),"container"==S&&!("fit"==P.type||"fit-y"==P.type)&&nt(jM("height")),!xr(P,{type:"pad"}))return P}(_,{width:x,height:S,autosize:d.autosize},p);return{..._,...A?{autosize:A}:{}}}const t3=new class ix extends Fs{constructor(){super(...arguments),ln(this,"nonFacetUnitNormalizers",[wA,fp,Ko,new ex,new VA])}map(p,_){if(vl(p)){const x=xo(p.encoding,ea),S=xo(p.encoding,Xl),A=xo(p.encoding,yu);if(x||S||A)return this.mapFacetedUnit(p,_)}return super.map(p,_)}mapUnit(p,_){const{parentEncoding:x,parentProjection:S}=_,A=Ld(p.encoding,_.repeater),O={...p,...p.name?{name:[_.repeaterPrefix,p.name].filter(B=>B).join("_")}:{},...A?{encoding:A}:{}};if(x||S)return this.mapUnitWithParentEncodingOrProjection(O,_);const P=this.mapLayerOrUnit.bind(this);for(const B of this.nonFacetUnitNormalizers)if(B.hasMatchingType(O,_.config))return B.run(O,_,P);return O}mapRepeat(p,_){return function NA(d){return!re.isArray(d.repeat)&&d.repeat.layer}(p)?this.mapLayerRepeat(p,_):this.mapNonLayerRepeat(p,_)}mapLayerRepeat(p,_){const{repeat:x,spec:S,...A}=p,{row:O,column:P,layer:B}=x,{repeater:q={},repeaterPrefix:G=""}=_;return O||P?this.mapRepeat({...p,repeat:{...O?{row:O}:{},...P?{column:P}:{}},spec:{repeat:{layer:B},spec:S}},_):{...A,layer:B.map(ee=>{const se={...q,layer:ee},Ee=`${(S.name?`${S.name}_`:"")+G}child__layer_${hn(ee)}`,De=this.mapLayerOrUnit(S,{..._,repeater:se,repeaterPrefix:Ee});return De.name=Ee,De})}}mapNonLayerRepeat(p,_){const{repeat:x,spec:S,data:A,...O}=p;!re.isArray(x)&&p.columns&&(p=yt(p,["columns"]),nt(P1("repeat")));const P=[],{repeater:B={},repeaterPrefix:q=""}=_,G=!re.isArray(x)&&x.row||[B?B.row:null],ee=!re.isArray(x)&&x.column||[B?B.column:null],se=re.isArray(x)&&x||[B?B.repeat:null];for(const De of se)for(const Re of G)for(const Le of ee){const Ye={repeat:De,row:Re,column:Le,layer:B.layer},bt=(S.name?`${S.name}_`:"")+q+"child__"+(re.isArray(x)?`${hn(De)}`:(x.row?`row_${hn(Re)}`:"")+(x.column?`column_${hn(Le)}`:"")),kn=this.map(S,{..._,repeater:Ye,repeaterPrefix:bt});kn.name=bt,P.push(yt(kn,["data"]))}const Ee=re.isArray(x)?p.columns:x.column?x.column.length:1;return{data:S.data??A,align:"all",...O,columns:Ee,concat:P}}mapFacet(p,_){const{facet:x}=p;return og(x)&&p.columns&&(p=yt(p,["columns"]),nt(P1("facet"))),super.mapFacet(p,_)}mapUnitWithParentEncodingOrProjection(p,_){const{encoding:x,projection:S}=p,{parentEncoding:A,parentProjection:O,config:P}=_,B=iR({parentProjection:O,projection:S}),q=jA({parentEncoding:A,encoding:Ld(x,_.repeater)});return this.mapUnit({...p,...B?{projection:B}:{},...q?{encoding:q}:{}},{config:P})}mapFacetedUnit(p,_){const{row:x,column:S,facet:A,...O}=p.encoding,{mark:P,width:B,projection:q,height:G,view:ee,params:se,encoding:Ee,...De}=p,{facetMapping:Re,layout:Le}=this.getFacetMappingAndLayout({row:x,column:S,facet:A},_),Ye=Ld(O,_.repeater);return this.mapFacet({...De,...Le,facet:Re,spec:{...B?{width:B}:{},...G?{height:G}:{},...ee?{view:ee}:{},...q?{projection:q}:{},mark:P,encoding:Ye,...se?{params:se}:{}}},_)}getFacetMappingAndLayout(p,_){const{row:x,column:S,facet:A}=p;if(x||S){A&&nt(function cv(d){return`Facet encoding dropped as ${d.join(" and ")} ${d.length>1?"are":"is"} also specified.`}([...x?[ea]:[],...S?[Xl]:[]]));const O={},P={};for(const B of[ea,Xl]){const q=p[B];if(q){const{align:G,center:ee,spacing:se,columns:Ee,...De}=q;O[B]=De;for(const Re of["align","center","spacing"])void 0!==q[Re]&&(P[Re]??={},P[Re][B]=q[Re])}}return{facetMapping:O,layout:P}}{const{align:O,center:P,spacing:B,columns:q,...G}=A;return{facetMapping:By(G,_.repeater),layout:{...O?{align:O}:{},...P?{center:P}:{},...B?{spacing:B}:{},...q?{columns:q}:{}}}}}mapLayer(p,_){let{parentEncoding:x,parentProjection:S,...A}=_;const{encoding:O,projection:P,...B}=p,q={...A,parentEncoding:jA({parentEncoding:x,encoding:O,layer:!0}),parentProjection:iR({parentProjection:S,projection:P})};return super.mapLayer({...B,...p.name?{name:[q.repeaterPrefix,p.name].filter(G=>G).join("_")}:{}},q)}},n3=new class jE extends Fs{map(p,_){return _.emptySelections??={},_.selectionPredicates??={},p=jy(p,_),super.map(p,_)}mapLayerOrUnit(p,_){if((p=jy(p,_)).encoding){const x={};for(const[S,A]of Jt(p.encoding))x[S]=Ka(A,_);p={...p,encoding:x}}return super.mapLayerOrUnit(p,_)}mapUnit(p,_){const{selection:x,...S}=p;return x?{...S,params:Jt(x).map(A=>{let[O,P]=A;const{init:B,bind:q,empty:G,...ee}=P;"single"===ee.type?(ee.type="point",ee.toggle=!1):"multi"===ee.type&&(ee.type="point"),_.emptySelections[O]="none"!==G;for(const se of Dn(_.selectionPredicates[O]??{}))se.empty="none"!==G;return{name:O,value:B,select:ee,bind:q}})}:p}},KA=new UE;function Uy(d){return re.isString(d)?{type:d}:d??{}}const i3=["background","padding"];function Hy(d,p){const _={};for(const x of i3)d&&void 0!==d[x]&&(_[x]=Ha(d[x]));return p&&(_.params=d.params),_}class Za{constructor(){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.explicit=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},this.implicit=_}clone(){return new Za(st(this.explicit),st(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(p){return ui(this.explicit[p],this.implicit[p])}getWithExplicit(p){return void 0!==this.explicit[p]?{explicit:!0,value:this.explicit[p]}:void 0!==this.implicit[p]?{explicit:!1,value:this.implicit[p]}:{explicit:!1,value:void 0}}setWithExplicit(p,_){let{value:x,explicit:S}=_;void 0!==x&&this.set(p,x,S)}set(p,_,x){return delete this[x?"implicit":"explicit"][p],this[x?"explicit":"implicit"][p]=_,this}copyKeyFromSplit(p,_){let{explicit:x,implicit:S}=_;void 0!==x[p]?this.set(p,x[p],!0):void 0!==S[p]&&this.set(p,S[p],!1)}copyKeyFromObject(p,_){void 0!==_[p]&&this.set(p,_[p],!0)}copyAll(p){for(const _ of We(p.combine())){const x=p.getWithExplicit(_);this.setWithExplicit(_,x)}}}function Ls(d){return{explicit:!0,value:d}}function co(d){return{explicit:!1,value:d}}function zd(d){return(p,_,x,S)=>{const A=d(p.value,_.value);return A>0?p:A<0?_:Pu(p,_,x,S)}}function Pu(d,p,_,x){return d.explicit&&p.explicit&&nt(function XM(d,p,_,x){return`Conflicting ${p.toString()} property "${d.toString()}" (${Wn(_)} and ${Wn(x)}). Using ${Wn(_)}.`}(_,x,d.value,p.value)),d}function Qa(d,p,_,x){let S=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Pu;return void 0===d||void 0===d.value?p:d.explicit&&!p.explicit?d:p.explicit&&!d.explicit?p:xr(d.value,p.value)?d:S(d,p,_,x)}class Gc extends Za{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(p,_),this.explicit=p,this.implicit=_,this.parseNothing=x}clone(){const p=super.clone();return p.parseNothing=this.parseNothing,p}}function ka(d){return"url"in d}function Wy(d){return"values"in d}function ZA(d){return"name"in d&&!ka(d)&&!Wy(d)&&!Jf(d)}function Jf(d){return d&&(QA(d)||Ja(d)||cc(d))}function QA(d){return"sequence"in d}function Ja(d){return"sphere"in d}function cc(d){return"graticule"in d}let Vr=function(d){return d[d.Raw=0]="Raw",d[d.Main=1]="Main",d[d.Row=2]="Row",d[d.Column=3]="Column",d[d.Lookup=4]="Lookup",d}({});function HE(d){const{signals:p,hasLegend:_,index:x,...S}=d;return S.field=ci(S.field),S}function eh(d){let p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:re.identity;if(re.isArray(d)){const x=d.map(S=>eh(S,p,_));return p?`[${x.join(", ")}]`:x}return _d(d)?_(p?gl(d):function Wa(d){const p=Ym(d,!0);return d.utc?+new Date(Date.UTC(...p)):+new Date(...p)}(d)):p?_(Wn(d)):d}function lR(d,p){for(const _ of Dn(d.component.selection??{})){const x=_.name;let S=`${x}${Wd}, ${"global"===_.resolve?"true":`{unit: ${kp(d)}}`}`;for(const A of gx)A.defined(_)&&(A.signals&&(p=A.signals(d,_,p)),A.modifyExpr&&(S=A.modifyExpr(d,_,S)));p.push({name:x+dT,on:[{events:{signal:_.name+Wd},update:`modify(${re.stringValue(_.name+Hd)}, ${S})`}]})}return Lu(p)}function cR(d,p){if(d.component.selection&&We(d.component.selection).length){const _=re.stringValue(d.getName("cell"));p.unshift({name:"facet",value:{},on:[{events:re.parseSelector("pointermove","scope"),update:`isTuple(facet) ? facet : group(${_}).datum`}]})}return Lu(p)}function WE(d,p){for(const _ of Dn(d.component.selection??{}))for(const x of gx)x.defined(_)&&x.marks&&(p=x.marks(d,_,p));return p}function Lu(d){return d.map(p=>(p.on&&!p.on.length&&delete p.on,p))}class Tn{constructor(p,_){this.debugName=_,ln(this,"_children",[]),ln(this,"_parent",null),ln(this,"_hash",void 0),p&&(this.parent=p)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(p){this._parent=p,p&&p.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(p,_){this._children.includes(p)?nt("Attempt to add the same child twice."):void 0!==_?this._children.splice(_,0,p):this._children.push(p)}removeChild(p){const _=this._children.indexOf(p);return this._children.splice(_,1),_}remove(){let p=this._parent.removeChild(this);for(const _ of this._children)_._parent=this._parent,this._parent.addChild(_,p++)}insertAsParentOf(p){const _=p.parent;_.removeChild(this),this.parent=_,p.parent=this}swapWithParent(){const p=this._parent,_=p.parent;for(const S of this._children)S.parent=p;this._children=[],p.removeChild(this);const x=p.parent.removeChild(p);this._parent=_,_.addChild(this,x),p.parent=this}}class jr extends Tn{clone(){const p=new this.constructor;return p.debugName=`clone_${this.debugName}`,p._source=this._source,p._name=`clone_${this._name}`,p.type=this.type,p.refCounts=this.refCounts,p.refCounts[p._name]=0,p}constructor(p,_,x,S){super(p,_),this.type=x,this.refCounts=S,ln(this,"_source",void 0),ln(this,"_name",void 0),this._source=this._name=_,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 ${Ms()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(p){this._source=p}}function xp(d){return void 0!==d.as}function ux(d){return`${d}_end`}class el extends Tn{clone(){return new el(null,st(this.timeUnits))}constructor(p,_){super(p),this.timeUnits=_}static makeFromEncoding(p,_){const x=_.reduceFieldDef((S,A,O)=>{const{field:P,timeUnit:B}=A;if(B){let q;if(qo(B)){if(uo(_)){const{mark:G,markDef:ee,config:se}=_,Ee=Tu({fieldDef:A,markDef:ee,config:se});(ip(G)||Ee)&&(q={timeUnit:Fr(B),field:P})}}else q={as:pt(A,{forAs:!0}),field:P,timeUnit:B};if(uo(_)){const{mark:G,markDef:ee,config:se}=_,Ee=Tu({fieldDef:A,markDef:ee,config:se});ip(G)&&Yr(O)&&.5!==Ee&&(q.rectBandPosition=Ee)}q&&(S[kt(q)]=q)}return S},{});return Gt(x)?null:new el(p,x)}static makeFromTransform(p,_){const{timeUnit:x,...S}={..._},O={...S,timeUnit:Fr(x)};return new el(p,{[kt(O)]:O})}merge(p){this.timeUnits={...this.timeUnits};for(const _ in p.timeUnits)this.timeUnits[_]||(this.timeUnits[_]=p.timeUnits[_]);for(const _ of p.children)p.removeChild(_),_.parent=this;p.remove()}removeFormulas(p){const _={};for(const[x,S]of Jt(this.timeUnits)){const A=xp(S)?S.as:`${S.field}_end`;p.has(A)||(_[x]=S)}this.timeUnits=_}producedFields(){return new Set(Dn(this.timeUnits).map(p=>xp(p)?p.as:ux(p.field)))}dependentFields(){return new Set(Dn(this.timeUnits).map(p=>p.field))}hash(){return`TimeUnit ${kt(this.timeUnits)}`}assemble(){const p=[];for(const _ of Dn(this.timeUnits)){const{rectBandPosition:x}=_,S=Fr(_.timeUnit);if(xp(_)){const{field:A,as:O}=_,{unit:P,utc:B,...q}=S,G=[O,`${O}_end`];p.push({field:ci(A),type:"timeunit",...P?{units:Kt(P)}:{},...B?{timezone:"utc"}:{},...q,as:G}),p.push(...tT(G,x,S))}else if(_){const{field:A}=_,O=A.replaceAll("\\.","."),P=eT({timeUnit:S,field:O}),B=ux(O);p.push({type:"formula",expr:P,as:B}),p.push(...tT([O,B],x,S))}}return p}}const Xc="offsetted_rect_start",Vd="offsetted_rect_end";function eT(d){let{timeUnit:p,field:_,reverse:x}=d;const{unit:S,utc:A}=p,O=Qh(S),{part:P,step:B}=q1(O,p.step);return`${A?"utcOffset":"timeOffset"}('${P}', datum['${_}'], ${x?-B:B})`}function tT(d,p,_){let[x,S]=d;if(void 0!==p&&.5!==p){const A=`datum['${x}']`,O=`datum['${S}']`;return[{type:"formula",expr:wp([eT({timeUnit:_,field:x,reverse:!0}),A],p+.5),as:`${x}_${Xc}`},{type:"formula",expr:wp([A,O],p+.5),as:`${x}_${Vd}`}]}return[]}function wp(d,p){let[_,x]=d;return`${1-p} * ${_} + ${p} * ${x}`}const $s="_tuple_fields";class uR{constructor(){ln(this,"hasChannel",void 0),ln(this,"hasField",void 0),ln(this,"hasSelectionId",void 0),ln(this,"timeUnit",void 0),ln(this,"items",void 0);for(var p=arguments.length,_=new Array(p),x=0;x!0,parse:(d,p,_)=>{const x=p.name,S=p.project??=new uR,A={},O={},P=new Set,B=(De,Re)=>{const Le="visual"===Re?De.channel:De.field;let Ye=hn(`${x}_${Le}`);for(let bt=1;P.has(Ye);bt++)Ye=hn(`${x}_${Le}_${bt}`);return P.add(Ye),{[Re]:Ye}},q=p.type,G=d.config.selection[q],ee=void 0!==_.value?re.array(_.value):null;let{fields:se,encodings:Ee}=re.isObject(_.select)?_.select:{};if(!se&&!Ee&&ee)for(const De of ee)if(re.isObject(De))for(const Re of We(De))Af(Re)?(Ee||(Ee=[])).push(Re):"interval"===q?(nt('Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.'),Ee=G.encodings):(se??=[]).push(Re);!se&&!Ee&&(Ee=G.encodings,"fields"in G&&(se=G.fields));for(const De of Ee??[]){const Re=d.fieldDef(De);if(Re){let Le=Re.field;if(Re.aggregate){nt(_n(De,Re.aggregate));continue}if(!Le){nt(mt(De));continue}if(Re.timeUnit&&!qo(Re.timeUnit)){Le=d.vgField(De);const Ye={timeUnit:Re.timeUnit,as:Le,field:Re.field};O[kt(Ye)]=Ye}if(!A[Le]){const bt={field:Le,channel:De,type:"interval"===q&&pd(De)&&Da(d.getScaleComponent(De).get("type"))?"R":Re.bin?"R-RE":"E",index:S.items.length};bt.signals={...B(bt,"data"),...B(bt,"visual")},S.items.push(A[Le]=bt),S.hasField[Le]=A[Le],S.hasSelectionId=S.hasSelectionId||Le===Ya,za(De)?(bt.geoChannel=De,bt.channel=Mn(De),S.hasChannel[bt.channel]=A[Le]):S.hasChannel[De]=A[Le]}}else nt(mt(De))}for(const De of se??[]){if(S.hasField[De])continue;const Re={type:"E",field:De,index:S.items.length};Re.signals={...B(Re,"data")},S.items.push(Re),S.hasField[De]=Re,S.hasSelectionId=S.hasSelectionId||De===Ya}ee&&(p.init=ee.map(De=>S.items.map(Re=>re.isObject(De)?void 0!==De[Re.geoChannel||Re.channel]?De[Re.geoChannel||Re.channel]:De[Re.field]:De))),Gt(O)||(S.timeUnit=new el(null,O))},signals:(d,p,_)=>{const x=p.name+$s;return _.filter(A=>A.name===x).length>0||p.project.hasSelectionId?_:_.concat({name:x,value:p.project.items.map(HE)})}},uc={defined:d=>"interval"===d.type&&"global"===d.resolve&&d.bind&&"scales"===d.bind,parse:(d,p)=>{const _=p.scales=[];for(const x of p.project.items){const S=x.channel;if(!pd(S))continue;const A=d.getScaleComponent(S),O=A?A.get("type"):void 0;A&&Da(O)?(A.set("selectionExtent",{param:p.name,field:x.field},!0),_.push(x)):nt("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(d,p,_)=>{const x=p.scales.filter(O=>0===_.filter(P=>P.name===O.signals.data).length);if(!d.parent||XE(d)||0===x.length)return _;const S=_.filter(O=>O.name===p.name)[0];let A=S.update;if(A.indexOf(fR)>=0)S.update=`{${x.map(O=>`${re.stringValue(ci(O.field))}: ${O.signals.data}`).join(", ")}}`;else{for(const O of x){const P=`${re.stringValue(ci(O.field))}: ${O.signals.data}`;A.includes(P)||(A=`${A.substring(0,A.length-1)}, ${P}}`)}S.update=A}return _.concat(x.map(O=>({name:O.signals.data})))},signals:(d,p,_)=>{if(d.parent&&!XE(d))for(const x of p.scales){const S=_.filter(A=>A.name===x.signals.data)[0];S.push="outer",delete S.value,delete S.update}return _}};function dx(d,p){return`domain(${re.stringValue(d.scaleName(p))})`}function XE(d){return d.parent&&Hg(d.parent)&&!d.parent.parent}const Ep="_brush",qy="_scale_trigger",Cp="geo_interval_init_tick",Gy="_init",YE={defined:d=>"interval"===d.type,parse:(d,p,_)=>{if(d.hasProjection){const x={...re.isObject(_.select)?_.select:{}};x.fields=[Ya],x.encodings||(x.encodings=_.value?We(_.value):[Ho,It]),_.select={type:"interval",...x}}if(p.translate&&!uc.defined(p)){const x=`!event.item || event.item.mark.name !== ${re.stringValue(p.name+Ep)}`;for(const S of p.events){if(!S.between){nt(`${S} is not an ordered event stream for interval selections.`);continue}const A=re.array(S.between[0].filter??=[]);A.indexOf(x)<0&&A.push(x)}}},signals:(d,p,_)=>{const x=p.name,S=x+Wd,A=Dn(p.project.hasChannel).filter(P=>P.channel===Ri||P.channel===mo),O=p.init?p.init[0]:null;if(_.push(...A.reduce((P,B)=>P.concat(function ms(d,p,_,x){const S=!d.hasProjection,A=_.channel,O=_.signals.visual,P=re.stringValue(S?d.scaleName(A):d.projectionName()),B=se=>`scale(${P}, ${se})`,q=d.getSizeSignalRef(A===Ri?"width":"height").signal,G=`${A}(unit)`,ee=p.events.reduce((se,Ee)=>[...se,{events:Ee.between[0],update:`[${G}, ${G}]`},{events:Ee,update:`[${O}[0], clamp(${G}, 0, ${q})]`}],[]);if(S){const se=_.signals.data,Ee=uc.defined(p),De=d.getScaleComponent(A),Re=De?De.get("type"):void 0,Le=x?{init:eh(x,!0,B)}:{value:[]};return ee.push({events:{signal:p.name+qy},update:Da(Re)?`[${B(`${se}[0]`)}, ${B(`${se}[1]`)}]`:"[0, 0]"}),Ee?[{name:se,on:[]}]:[{name:O,...Le,on:ee},{name:se,...x?{init:eh(x)}:{},on:[{events:{signal:O},update:`${O}[0] === ${O}[1] ? null : invert(${P}, ${O})`}]}]}{const se=A===Ri?0:1,Ee=p.name+Gy;return[{name:O,...x?{init:`[${Ee}[0][${se}], ${Ee}[1][${se}]]`}:{value:[]},on:ee}]}}(d,p,B,O&&O[B.index])),[])),d.hasProjection){const P=re.stringValue(d.projectionName()),B=d.projectionName()+"_center",{x:q,y:G}=p.project.hasChannel,ee=q&&q.signals.visual,se=G&&G.signals.visual,Ee=q?O&&O[q.index]:`${B}[0]`,De=G?O&&O[G.index]:`${B}[1]`,Re=vi=>d.getSizeSignalRef(vi).signal,Le=`[[${ee?ee+"[0]":"0"}, ${se?se+"[0]":"0"}],[${ee?ee+"[1]":Re("width")}, ${se?se+"[1]":Re("height")}]]`;O&&(_.unshift({name:x+Gy,init:`[scale(${P}, [${q?Ee[0]:Ee}, ${G?De[0]:De}]), scale(${P}, [${q?Ee[1]:Ee}, ${G?De[1]:De}])]`}),(!q||!G)&&(_.find(lr=>lr.name===B)||_.unshift({name:B,update:`invert(${P}, [${Re("width")}/2, ${Re("height")}/2])`})));const kn=`vlSelectionTuples(intersect(${Le}, {markname: ${re.stringValue(d.getName("marks"))}}, unit.mark), {unit: ${kp(d)}})`,dn=A.map(vi=>vi.signals.visual);return _.concat({name:S,on:[{events:[...dn.length?[{signal:dn.join(" || ")}]:[],...O?[{signal:Cp}]:[]],update:kn}]})}{if(!uc.defined(p)){const q=x+qy,G=A.map(ee=>{const se=ee.channel,{data:Ee,visual:De}=ee.signals,Re=re.stringValue(d.scaleName(se)),Ye=Da(d.getScaleComponent(se).get("type"))?"+":"";return`(!isArray(${Ee}) || (${Ye}invert(${Re}, ${De})[0] === ${Ye}${Ee}[0] && ${Ye}invert(${Re}, ${De})[1] === ${Ye}${Ee}[1]))`});G.length&&_.push({name:q,value:{},on:[{events:A.map(ee=>({scale:d.scaleName(ee.channel)})),update:G.join(" && ")+` ? ${q} : {}`}]})}const P=A.map(q=>q.signals.data),B=`unit: ${kp(d)}, fields: ${x+$s}, values`;return _.concat({name:S,...O?{init:`{${B}: ${eh(O)}}`}:{},...P.length?{on:[{events:[{signal:P.join(" || ")}],update:`${P.join(" && ")} ? {${B}: [${P}]} : null`}]}:{}})}},topLevelSignals:(d,p,_)=>(uo(d)&&d.hasProjection&&p.init&&(_.filter(S=>S.name===Cp).length||_.unshift({name:Cp,value:null,on:[{events:"timer{1}",update:`${Cp} === null ? {} : ${Cp}`}]})),_),marks:(d,p,_)=>{const x=p.name,{x:S,y:A}=p.project.hasChannel,O=S?.signals.visual,P=A?.signals.visual,B=`data(${re.stringValue(p.name+Hd)})`;if(uc.defined(p)||!S&&!A)return _;const q={x:void 0!==S?{signal:`${O}[0]`}:{value:0},y:void 0!==A?{signal:`${P}[0]`}:{value:0},x2:void 0!==S?{signal:`${O}[1]`}:{field:{group:"width"}},y2:void 0!==A?{signal:`${P}[1]`}:{field:{group:"height"}}};if("global"===p.resolve)for(const Re of We(q))q[Re]=[{test:`${B}.length && ${B}[0].unit === ${kp(d)}`,...q[Re]},{value:0}];const{fill:G,fillOpacity:ee,cursor:se,...Ee}=p.mark,De=We(Ee).reduce((Re,Le)=>(Re[Le]=[{test:[void 0!==S&&`${O}[0] !== ${O}[1]`,void 0!==A&&`${P}[0] !== ${P}[1]`].filter(Ye=>Ye).join(" && "),value:Ee[Le]},{value:null}],Re),{});return[{name:`${x+Ep}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:G},fillOpacity:{value:ee}},update:q}},..._,{name:x+Ep,type:"rect",clip:!0,encode:{enter:{...se?{cursor:{value:se}}:{},fill:{value:"transparent"}},update:{...q,...De}}}]}};const Ro={defined:d=>"point"===d.type,signals:(d,p,_)=>{const x=p.name,S=x+$s,A=p.project,O="(item().isVoronoi ? datum.datum : datum)",P=Dn(d.component.selection??{}).reduce((ee,se)=>"interval"===se.type?ee.concat(se.name+Ep):ee,[]).map(ee=>`indexof(item().mark.name, '${ee}') < 0`).join(" && "),B="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(P?` && ${P}`:"");let q=`unit: ${kp(d)}, `;q+=p.project.hasSelectionId?`${Ya}: ${O}[${re.stringValue(Ya)}]`:`fields: ${S}, values: [${A.items.map(se=>d.fieldDef(se.channel)?.bin?`[${O}[${re.stringValue(d.vgField(se.channel,{}))}], ${O}[${re.stringValue(d.vgField(se.channel,{binSuffix:"end"}))}]]`:`${O}[${re.stringValue(se.field)}]`).join(", ")}]`;const G=p.events;return _.concat([{name:x+Wd,on:G?[{events:G,update:`${B} ? {${q}} : null`,force:!0}]:[]}])}};function Sp(d,p,_,x){const S=hE(p)&&p.condition,A=x(p);return S?{[_]:[...re.array(S).map(B=>{const q=x(B);if(function yy(d){return d.param}(B)){const{param:G,empty:ee}=B;return{test:ib(d,{param:G,empty:ee}),...q}}return{test:aC(d,B.test),...q}}),...void 0!==A?[A]:[]]}:void 0!==A?{[_]:A}:{}}function KE(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return Sp(d,d.encoding[p],p,x=>jd(x,d.config))}function jd(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(d){if(Ma(d))return Ar(d.value);if(Bn(d)){const{format:x,formatType:S}=Lv(d);return Hc({fieldOrDatumDef:d,format:x,formatType:S,expr:_,config:p})}}}function Yy(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{encoding:_,markDef:x,config:S,stack:A}=d,O=_.tooltip;if(re.isArray(O))return{tooltip:nT({tooltip:O},A,S,p)};{const P=p.reactiveGeom?"datum.datum":"datum";return Sp(d,O,"tooltip",B=>{const q=jd(B,S,P);if(q)return q;if(null===B)return;let G=Ji("tooltip",x,S);return!0===G&&(G={content:"encoding"}),re.isString(G)?{value:G}:re.isObject(G)?Je(G)?G:"encoding"===G.content?nT(_,A,S,p):{signal:P}:void 0})}}function ZE(d,p,_){let{reactiveGeom:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S={..._,..._.tooltipFormat},A={},O=x?"datum.datum":"datum",P=[];function B(G,ee){const se=Fc(ee),Ee=Yo(G)?G:{...G,type:d[se].type},De=Ee.title||lg(Ee,S),Re=re.array(De).join(", ").replaceAll(/"/g,'\\"');let Le;if(Yr(ee)){const Ye="x"===ee?"x2":"y2",bt=ku(d[Ye]);if(oo(Ee.bin)&&bt){const kn=pt(Ee,{expr:O}),dn=pt(bt,{expr:O}),{format:vi,formatType:lr}=Lv(Ee);Le=ng(kn,dn,vi,lr,S),A[Ye]=!0}}if((Yr(ee)||ee===As||ee===Ao)&&p&&p.fieldChannel===ee&&"normalize"===p.offset){const{format:Ye,formatType:bt}=Lv(Ee);Le=Hc({fieldOrDatumDef:Ee,format:Ye,formatType:bt,expr:O,config:S,normalizeStack:!0}).signal}Le??=jd(Ee,S,O).signal,P.push({channel:ee,key:Re,value:Le})}Ey(d,(G,ee)=>{dt(G)?B(G,ee):qf(G)&&B(G.condition,ee)});const q={};for(const{channel:G,key:ee,value:se}of P)!A[G]&&!q[ee]&&(q[ee]=se);return q}function nT(d,p,_){let{reactiveGeom:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=ZE(d,p,_,{reactiveGeom:x}),A=Jt(S).map(O=>{let[P,B]=O;return`"${P}": ${B}`});return A.length>0?{signal:`{${A.join(", ")}}`}:void 0}function iT(d){const{markDef:p,config:_}=d,x=Ji("aria",p,_);return!1===x?{}:{...x?{aria:x}:{},...rT(d),...dc(d)}}function rT(d){const{mark:p,markDef:_,config:x}=d;if(!1===x.aria)return{};const S=Ji("ariaRoleDescription",_,x);return null!=S?{ariaRoleDescription:{value:S}}:p in OM?{}:{ariaRoleDescription:{value:p}}}function dc(d){const{encoding:p,markDef:_,config:x,stack:S}=d,A=p.description;if(A)return Sp(d,A,"description",B=>jd(B,d.config));const O=Ji("description",_,x);if(null!=O)return{description:Ar(O)};if(!1===x.aria)return{};const P=ZE(p,S,x);return Gt(P)?void 0:{description:{signal:Jt(P).map((B,q)=>{let[G,ee]=B;return`"${q>0?"; ":""}${G}: " + (${ee})`}).join(" + ")}}}function gs(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{markDef:x,encoding:S,config:A}=p,{vgChannel:O}=_;let{defaultRef:P,defaultValue:B}=_;return void 0===P&&(B??=Ji(d,x,A,{vgChannel:O,ignoreVgConfig:!0}),void 0!==B&&(P=Ar(B))),Sp(p,S[d],O??d,G=>lE({channel:d,channelDef:G,markDef:x,config:A,scaleName:p.scaleName(d),scale:p.getScaleComponent(d),stack:null,defaultRef:P}))}function QE(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0};const{markDef:_,encoding:x,config:S}=d,{type:A}=_,O=p.filled??Ji("filled",_,S),P=St(["bar","point","circle","square","geoshape"],A)?"transparent":void 0,B=Ji(!0===O?"color":void 0,_,S,{vgChannel:"fill"})??S.mark[!0===O&&"color"]??P,q=Ji(!1===O?"color":void 0,_,S,{vgChannel:"stroke"})??S.mark[!1===O&&"color"],G=O?"fill":"stroke",ee={...B?{fill:Ar(B)}:{},...q?{stroke:Ar(q)}:{}};return _.color&&(O?_.fill:_.stroke)&&nt(Gm("property",{fill:"fill"in _,stroke:"stroke"in _})),{...ee,...gs("color",d,{vgChannel:G,defaultValue:O?B:q}),...gs("fill",d,{defaultValue:x.fill?B:void 0}),...gs("stroke",d,{defaultValue:x.stroke?q:void 0})}}function Dp(d){const{encoding:p,mark:_}=d,x=p.order;return!yl(_)&&Ma(x)?Sp(d,x,"zindex",S=>Ar(S.value)):{}}function th(d){let{channel:p,markDef:_,encoding:x={},model:S,bandPosition:A}=d;const O=`${p}Offset`,P=_[O],B=x[O];if(("xOffset"===O||"yOffset"===O)&&B)return{offsetType:"encoding",offset:lE({channel:O,channelDef:B,markDef:_,config:S?.config,scaleName:S.scaleName(O),scale:S.getScaleComponent(O),stack:null,defaultRef:Ar(P),bandPosition:A})};const q=_[O];return q?{offsetType:"visual",offset:q}:{}}function Ia(d,p,_){let{defaultPos:x,vgChannel:S}=_;const{encoding:A,markDef:O,config:P,stack:B}=p,q=A[d],G=A[Or(d)],ee=p.scaleName(d),se=p.getScaleComponent(d),{offset:Ee,offsetType:De}=th({channel:d,markDef:O,encoding:A,model:p,bandPosition:.5}),Re=wl({model:p,defaultPos:x,channel:d,scaleName:ee,scale:se}),Le=!q&&Yr(d)&&(A.latitude||A.longitude)?{field:p.getName(d)}:function dR(d){const{channel:p,channelDef:_,scaleName:x,stack:S,offset:A,markDef:O}=d;if(Bn(_)&&S&&p===S.fieldChannel){if(dt(_)){let P=_.bandPosition;if(void 0===P&&"text"===O.type&&("radius"===p||"theta"===p)&&(P=.5),void 0!==P)return sc({scaleName:x,fieldOrDatumDef:_,startSuffix:"start",bandPosition:P,offset:A})}return Xa(_,x,{suffix:"end"},{offset:A})}return tg(d)}({channel:d,channelDef:q,channel2Def:G,markDef:O,config:P,scaleName:ee,scale:se,stack:B,offset:Ee,defaultRef:Re,bandPosition:"encoding"===De?0:void 0});return Le?{[S||d]:Le}:void 0}function wl(d){let{model:p,defaultPos:_,channel:x,scaleName:S,scale:A}=d;const{markDef:O,config:P}=p;return()=>{const B=Fc(x),q=xa(x),G=Ji(x,O,P,{vgChannel:q});if(void 0!==G)return Fi(x,G);switch(_){case"zeroOrMin":case"zeroOrMax":if(S){const ee=A.get("type");if(!St([Ga.LOG,Ga.TIME,Ga.UTC],ee)&&A.domainDefinitelyIncludesZero())return{scale:S,value:0}}if("zeroOrMin"===_)return"y"===B?{field:{group:"height"}}:{value:0};switch(B){case"radius":return{signal:`min(${p.width.signal},${p.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...p[Mr(x)],mult:.5}}}}const Ky={left:"x",center:"xc",right:"x2"},JE={top:"y",middle:"yc",bottom:"y2"};function xg(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle";if("radius"===d||"theta"===d)return xa(d);const S="x"===d?"align":"baseline",A=Ji(S,p,_);let O;return Je(A)?(nt(function uv(d){return`The ${d} for range marks cannot be an expression`}(S)),O=void 0):O=A,"x"===d?Ky[O||("top"===x?"left":"center")]:JE[O||x]}function $u(d,p,_){let{defaultPos:x,defaultPos2:S,range:A}=_;return A?Bs(d,p,{defaultPos:x,defaultPos2:S}):Ia(d,p,{defaultPos:x})}function Bs(d,p,_){let{defaultPos:x,defaultPos2:S}=_;const{markDef:A,config:O}=p,P=Or(d),B=Mr(d),q=function Zy(d,p,_){const{encoding:x,mark:S,markDef:A,stack:O,config:P}=d,B=Fc(_),q=Mr(_),G=xa(_),ee=x[B],se=d.scaleName(B),Ee=d.getScaleComponent(B),{offset:De}=th(_ in x||_ in A?{channel:_,markDef:A,encoding:x,model:d}:{channel:B,markDef:A,encoding:x,model:d});if(!ee&&("x2"===_||"y2"===_)&&(x.latitude||x.longitude)){const Le=Mr(_),Ye=d.markDef[Le];return null!=Ye?{[Le]:{value:Ye}}:{[G]:{field:d.getName(_)}}}const Re=function Qy(d){let{channel:p,channelDef:_,channel2Def:x,markDef:S,config:A,scaleName:O,scale:P,stack:B,offset:q,defaultRef:G}=d;return Bn(_)&&B&&p.charAt(0)===B.fieldChannel.charAt(0)?Xa(_,O,{suffix:"start"},{offset:q}):tg({channel:p,channelDef:x,scaleName:O,scale:P,stack:B,markDef:S,config:A,offset:q,defaultRef:G})}({channel:_,channelDef:ee,channel2Def:x[_],markDef:A,config:P,scaleName:se,scale:Ee,stack:O,offset:De,defaultRef:void 0});return void 0!==Re?{[G]:Re}:Mp(_,A)||Mp(_,{[_]:ey(_,A,P.style),[q]:ey(q,A,P.style)})||Mp(_,P[S])||Mp(_,P.mark)||{[G]:wl({model:d,defaultPos:p,channel:_,scaleName:se,scale:Ee})()}}(p,S,P);return{...Ia(d,p,{defaultPos:x,vgChannel:q[B]?xg(d,A,O):xa(d)}),...q}}function Mp(d,p){const _=Mr(d),x=xa(d);if(void 0!==p[x])return{[x]:Fi(d,p[x])};if(void 0!==p[d])return{[x]:Fi(d,p[d])};if(p[_]){const S=p[_];if(!Au(S))return{[_]:Fi(d,S)};nt(function Bc(d){return`Position range does not support relative band size for ${d}.`}(_))}}function El(d,p){const{config:_,encoding:x,markDef:S}=d,A=S.type,O=Or(p),P=Mr(p),B=x[p],q=x[O],G=d.getScaleComponent(p),ee=G?G.get("type"):void 0,se=S.orient,Ee=x[P]??x.size??Ji("size",S,_,{vgChannel:P}),De=na(p),Re="bar"===A&&("x"===p?"vertical"===se:"horizontal"===se);return!dt(B)||!(sr(B.bin)||oo(B.bin)||B.timeUnit&&!q)||Ee&&!Au(Ee)||x[De]||ko(ee)?(Bn(B)&&ko(ee)||Re)&&!q?function wg(d,p,_){const{markDef:x,encoding:S,config:A,stack:O}=_,P=x.orient,B=_.scaleName(p),q=_.getScaleComponent(p),G=Mr(p),ee=Or(p),se=na(p),Ee=_.scaleName(se),De=_.getScaleComponent(To(p)),Re="horizontal"===P&&"y"===p||"vertical"===P&&"x"===p;let Le;(S.size||x.size)&&(Re?Le=gs("size",_,{vgChannel:G,defaultRef:Ar(x.size)}):nt(function N2(d){return`Cannot apply size to non-oriented mark "${d}".`}(x.type)));const Ye=!!Le,bt=by({channel:p,fieldDef:d,markDef:x,config:A,scaleType:(q||De)?.get("type"),useVlSizeChannel:Re});Le=Le||{[G]:Ap(G,Ee||B,De||q,A,bt,!!d,x.type)};const dn=xg(p,x,A,"band"===(q||De)?.get("type")&&Au(bt)&&!Ye?"top":"middle"),vi="xc"===dn||"yc"===dn,{offset:lr,offsetType:ca}=th({channel:p,markDef:x,encoding:S,model:_,bandPosition:vi?.5:0}),ua=tg({channel:p,channelDef:d,markDef:x,config:A,scaleName:B,scale:q,stack:O,offset:lr,defaultRef:wl({model:_,defaultPos:"mid",channel:p,scaleName:B,scale:q}),bandPosition:vi?"encoding"===ca?0:.5:Je(bt)?{signal:`(1-${bt})/2`}:Au(bt)?(1-bt.band)/2:0});if(G)return{[dn]:ua,...Le};{const da=xa(ee),Ml=Le[G],fa=lr?{...Ml,offset:lr}:Ml;return{[dn]:ua,[da]:re.isArray(ua)?[ua[0],{...ua[1],offset:fa}]:{...ua,offset:fa}}}}(B,p,d):Bs(p,d,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function Ud(d){let{fieldDef:p,fieldDef2:_,channel:x,model:S}=d;const{config:A,markDef:O,encoding:P}=S,B=S.getScaleComponent(x),q=S.scaleName(x),G=B?B.get("type"):void 0,ee=B.get("reverse"),se=by({channel:x,fieldDef:p,markDef:O,config:A,scaleType:G}),De=S.component.axes[x]?.[0]?.get("translate")??.5,Re=Yr(x)?Ji("binSpacing",O,A)??0:0,Le=Or(x),Ye=xa(x),bt=xa(Le),kn=xu("minBandSize",O,A),{offset:dn}=th({channel:x,markDef:O,encoding:P,model:S,bandPosition:0}),{offset:vi}=th({channel:Le,markDef:O,encoding:P,model:S,bandPosition:0}),lr=function ao(d){let{scaleName:p,fieldDef:_}=d;const x=pt(_,{expr:"datum"});return`abs(scale("${p}", ${pt(_,{expr:"datum",suffix:"end"})}) - scale("${p}", ${x}))`}({fieldDef:p,scaleName:q}),ca=Eg(x,Re,ee,De,dn,kn,lr),ua=Eg(Le,Re,ee,De,vi??dn,kn,lr),da=Je(se)?{signal:`(1-${se.signal})/2`}:Au(se)?(1-se.band)/2:.5,Ml=Tu({fieldDef:p,fieldDef2:_,markDef:O,config:A});if(sr(p.bin)||p.timeUnit){const fa=p.timeUnit&&.5!==Ml;return{[bt]:Yc({fieldDef:p,scaleName:q,bandPosition:da,offset:ua,useRectOffsetField:fa}),[Ye]:Yc({fieldDef:p,scaleName:q,bandPosition:Je(da)?{signal:`1-${da.signal}`}:1-da,offset:ca,useRectOffsetField:fa})}}if(oo(p.bin)){const fa=Xa(p,q,{},{offset:ua});if(dt(_))return{[bt]:fa,[Ye]:Xa(_,q,{},{offset:ca})};if(Lc(p.bin)&&p.bin.step)return{[bt]:fa,[Ye]:{signal:`scale("${q}", ${pt(p,{expr:"datum"})} + ${p.bin.step})`,offset:ca}}}nt(eA(Le))}({fieldDef:B,fieldDef2:q,channel:p,model:d})}function Ap(d,p,_,x,S,A,O){if(Au(S)){if(!_)return{mult:S.band,field:{group:d}};{const B=_.get("type");if("band"===B){let q=`bandwidth('${p}')`;1!==S.band&&(q=`${S.band} * ${q}`);const G=xu("minBandSize",{type:O},x);return{signal:G?`max(${ec(G)}, ${q})`:q}}1!==S.band&&(nt(function iy(d){return`Cannot use the relative band size with ${d} scale.`}(B)),S=void 0)}}else{if(Je(S))return S;if(S)return{value:S}}if(_){const B=_.get("range");if(ht(B)&&re.isNumber(B.step))return{value:B.step-2}}if(!A){const{bandPaddingInner:B,barBandPaddingInner:q,rectBandPaddingInner:G}=x.scale,ee=ui(B,"bar"===O?q:G);if(Je(ee))return{signal:`(1 - (${ee.signal})) * ${d}`};if(re.isNumber(ee))return{signal:`${1-ee} * ${d}`}}return{value:pr(x.view,d)-2}}function Eg(d,p,_,x,S,A,O){if(D2(d))return 0;const P="x"===d||"y2"===d,B=P?-p/2:p/2;if(Je(_)||Je(S)||Je(x)||A){const q=ec(_),G=ec(S),ee=ec(x),se=ec(A),De=A?`(${O} < ${se} ? ${P?"":"-"}0.5 * (${se} - (${O})) : ${B})`:B;return{signal:(ee?`${ee} + `:"")+(q?`(${q} ? -1 : 1) * `:"")+(G?`(${G} + ${De})`:De)}}return S=S||0,x+(_?-S-B:+S+B)}function Yc(d){let{fieldDef:p,scaleName:_,bandPosition:x,offset:S,useRectOffsetField:A}=d;return sc({scaleName:_,fieldOrDatumDef:p,bandPosition:x,offset:S,...A?{startSuffix:Xc,endSuffix:Vd}:{}})}const Cg=new Set(["aria","width","height"]);function _s(d,p){const{fill:_,stroke:x}="include"===p.color?QE(d):{};return{...oT(d.markDef,p),...fx(d,"fill",_),...fx(d,"stroke",x),...gs("opacity",d),...gs("fillOpacity",d),...gs("strokeOpacity",d),...gs("strokeWidth",d),...gs("strokeDash",d),...Dp(d),...Yy(d),...KE(d,"href"),...iT(d)}}function fx(d,p,_){const{config:x,mark:S,markDef:A}=d;if("hide"===Ji("invalid",A,x)&&_&&!yl(S)){const P=function sT(d,p){let{invalid:_=!1,channels:x}=p;const S=x.reduce((O,P)=>{const B=d.getScaleComponent(P);if(B){const q=B.get("type"),G=d.vgField(P,{expr:"datum"});G&&Da(q)&&(O[G]=!0)}return O},{}),A=We(S);if(A.length>0){const O=_?"||":"&&";return A.map(P=>Uf(P,_)).join(` ${O} `)}}(d,{invalid:!0,channels:ev});if(P)return{[p]:[{test:P,value:null},...re.array(_)]}}return _?{[p]:_}:{}}function oT(d,p){return gd.reduce((_,x)=>(!Cg.has(x)&&void 0!==d[x]&&"ignore"!==p[x]&&(_[x]=Ar(d[x])),_),{})}function Sg(d){const{config:p,markDef:_}=d;if(Ji("invalid",_,p)){const S=function eC(d,p){let{invalid:_=!1,channels:x}=p;const S=x.reduce((O,P)=>{const B=d.getScaleComponent(P);if(B){const q=B.get("type"),G=d.vgField(P,{expr:"datum",binSuffix:d.stack?.impute?"mid":void 0});G&&Da(q)&&(O[G]=!0)}return O},{}),A=We(S);if(A.length>0){const O=_?"||":"&&";return A.map(P=>Uf(P,_)).join(` ${O} `)}}(d,{channels:Ql});if(S)return{defined:{signal:S}}}return{}}function aT(d,p){if(void 0!==p)return{[d]:Ar(p)}}const tC="voronoi",Tp={defined:d=>"point"===d.type&&d.nearest,parse:(d,p)=>{if(p.events)for(const _ of p.events)_.markname=d.getName(tC)},marks:(d,p,_)=>{const{x,y:S}=p.project.hasChannel,A=d.mark;if(yl(A))return nt(function yo(d){return`The "nearest" transform is not supported for ${d} marks.`}(A)),_;const O={name:d.getName(tC),type:"path",interactive:!0,from:{data:d.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...Yy(d,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:x||!S?"datum.datum.x || 0":"0"},y:{expr:S||!x?"datum.datum.y || 0":"0"},size:[d.getSizeSignalRef("width"),d.getSizeSignalRef("height")]}]};let P=0,B=!1;return _.forEach((q,G)=>{const ee=q.name??"";ee===d.component.mark[0].name?P=G:ee.indexOf(tC)>=0&&(B=!0)}),B||_.splice(P+1,0,O),_}},nC={defined:d=>"point"===d.type&&"global"===d.resolve&&d.bind&&"scales"!==d.bind&&!DE(d.bind),parse:(d,p,_)=>zn(p,_),topLevelSignals:(d,p,_)=>{const x=p.name,S=p.project,A=p.bind,O=p.init&&p.init[0],P=Tp.defined(p)?"(item().isVoronoi ? datum.datum : datum)":"datum";return S.items.forEach((B,q)=>{const G=hn(`${x}_${B.field}`);_.filter(se=>se.name===G).length||_.unshift({name:G,...O?{init:eh(O[q])}:{value:null},on:p.events?[{events:p.events,update:`datum && item().mark.marktype !== 'group' ? ${P}[${re.stringValue(B.field)}] : null`}]:[],bind:A[B.field]??A[B.channel]??A})}),_},signals:(d,p,_)=>{const x=p.name,S=p.project,A=_.filter(q=>q.name===x+Wd)[0],O=x+$s,P=S.items.map(q=>hn(`${x}_${q.field}`)),B=P.map(q=>`${q} !== null`).join(" && ");return P.length&&(A.update=`${B} ? {fields: ${O}, values: [${P.join(", ")}]} : null`),delete A.value,delete A.on,_}},Dg="_toggle",hx={defined:d=>"point"===d.type&&!!d.toggle,signals:(d,p,_)=>_.concat({name:p.name+Dg,value:!1,on:[{events:p.events,update:p.toggle}]}),modifyExpr:(d,p)=>{const _=p.name+Wd,x=p.name+Dg;return`${x} ? null : ${_}, `+("global"===p.resolve?`${x} ? null : true, `:`${x} ? null : {unit: ${kp(d)}}, `)+`${x} ? ${_} : null`}},lT={defined:d=>void 0!==d.clear&&!1!==d.clear,parse:(d,p)=>{p.clear&&(p.clear=re.isString(p.clear)?re.parseSelector(p.clear,"view"):p.clear)},topLevelSignals:(d,p,_)=>{if(nC.defined(p))for(const x of p.project.items){const S=_.findIndex(A=>A.name===hn(`${p.name}_${x.field}`));-1!==S&&_[S].on.push({events:p.clear,update:"null"})}return _},signals:(d,p,_)=>{function x(S,A){-1!==S&&_[S].on&&_[S].on.push({events:p.clear,update:A})}if("interval"===p.type)for(const S of p.project.items){const A=_.findIndex(O=>O.name===S.signals.visual);x(A,"[0, 0]"),-1===A&&x(_.findIndex(P=>P.name===S.signals.data),"null")}else{let S=_.findIndex(A=>A.name===p.name+Wd);x(S,"null"),hx.defined(p)&&(S=_.findIndex(A=>A.name===p.name+Dg),x(S,"false"))}return _}},cT={defined:d=>{const p="global"===d.resolve&&d.bind&&DE(d.bind),_=1===d.project.items.length&&d.project.items[0].field!==Ya;return p&&!_&&nt("Legend bindings are only supported for selections over an individual field or encoding channel."),p&&_},parse:(d,p,_)=>{const x=st(_);if(x.select=re.isString(x.select)?{type:x.select,toggle:p.toggle}:{...x.select,toggle:p.toggle},zn(p,x),re.isObject(_.select)&&(_.select.on||_.select.clear)){const O='event.item && indexof(event.item.mark.role, "legend") < 0';for(const P of p.events)P.filter=re.array(P.filter??[]),P.filter.includes(O)||P.filter.push(O)}const S=Iy(p.bind)?p.bind.legend:"click",A=re.isString(S)?re.parseSelector(S,"view"):re.array(S);p.bind={legend:{merge:A}}},topLevelSignals:(d,p,_)=>{const x=p.name,S=Iy(p.bind)&&p.bind.legend,A=O=>P=>{const B=st(P);return B.markname=O,B};for(const O of p.project.items){if(!O.hasLegend)continue;const P=`${hn(O.field)}_legend`,B=`${x}_${P}`;if(0===_.filter(G=>G.name===B).length){const G=S.merge.map(A(`${P}_symbols`)).concat(S.merge.map(A(`${P}_labels`))).concat(S.merge.map(A(`${P}_entries`)));_.unshift({name:B,...p.init?{}:{value:null},on:[{events:G,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:S.merge,update:`!event.item || !datum ? null : ${B}`,force:!0}]})}}return _},signals:(d,p,_)=>{const x=p.name,S=p.project,A=_.find(se=>se.name===x+Wd),O=x+$s,P=S.items.filter(se=>se.hasLegend).map(se=>hn(`${x}_${hn(se.field)}_legend`)),q=`${P.map(se=>`${se} !== null`).join(" && ")} ? {fields: ${O}, values: [${P.join(", ")}]} : null`;p.events&&P.length>0?A.on.push({events:P.map(se=>({signal:se})),update:q}):P.length>0&&(A.update=q,delete A.value,delete A.on);const G=_.find(se=>se.name===x+Dg),ee=Iy(p.bind)&&p.bind.legend;return G&&(p.events?G.on.push({...G.on[0],events:ee}):G.on[0].events=ee),_}};const uT="_translate_anchor",Jy="_translate_delta",eb={defined:d=>"interval"===d.type&&d.translate,signals:(d,p,_)=>{const x=p.name,S=uc.defined(p),A=x+uT,{x:O,y:P}=p.project.hasChannel;let B=re.parseSelector(p.translate,"scope");return S||(B=B.map(q=>(q.between[0].markname=x+Ep,q))),_.push({name:A,value:{},on:[{events:B.map(q=>q.between[0]),update:"{x: x(unit), y: y(unit)"+(void 0!==O?`, extent_x: ${S?dx(d,Ri):`slice(${O.signals.visual})`}`:"")+(void 0!==P?`, extent_y: ${S?dx(d,mo):`slice(${P.signals.visual})`}`:"")+"}"}]},{name:x+Jy,value:{},on:[{events:B,update:`{x: ${A}.x - x(unit), y: ${A}.y - y(unit)}`}]}),void 0!==O&&px(d,p,O,"width",_),void 0!==P&&px(d,p,P,"height",_),_}};function px(d,p,_,x,S){const A=p.name,O=A+uT,P=A+Jy,B=_.channel,q=uc.defined(p),G=S.filter(vi=>vi.name===_.signals[q?"data":"visual"])[0],ee=d.getSizeSignalRef(x).signal,se=d.getScaleComponent(B),Ee=se&&se.get("type"),De=se&&se.get("reverse"),Le=`${O}.extent_${B}`,dn=`${q&&se?"log"===Ee?"panLog":"symlog"===Ee?"panSymlog":"pow"===Ee?"panPow":"panLinear":"panLinear"}(${Le}, ${q?B===Ri?De?"":"-":De?"-":"":""}${P}.${B} / ${q?`${ee}`:`span(${Le})`}${q?"pow"===Ee?`, ${se.get("exponent")??1}`:"symlog"===Ee?`, ${se.get("constant")??1}`:"":""})`;G.on.push({events:{signal:P},update:q?dn:`clampRange(${dn}, 0, ${ee})`})}const iC="_zoom_anchor",tb="_zoom_delta",nb={defined:d=>"interval"===d.type&&d.zoom,signals:(d,p,_)=>{const x=p.name,S=uc.defined(p),A=x+tb,{x:O,y:P}=p.project.hasChannel,B=re.stringValue(d.scaleName(Ri)),q=re.stringValue(d.scaleName(mo));let G=re.parseSelector(p.zoom,"scope");return S||(G=G.map(ee=>(ee.markname=x+Ep,ee))),_.push({name:x+iC,on:[{events:G,update:S?"{"+[B?`x: invert(${B}, x(unit))`:"",q?`y: invert(${q}, y(unit))`:""].filter(ee=>ee).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:A,on:[{events:G,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==O&&mx(d,p,O,"width",_),void 0!==P&&mx(d,p,P,"height",_),_}};function mx(d,p,_,x,S){const A=p.name,O=_.channel,P=uc.defined(p),B=S.filter(bt=>bt.name===_.signals[P?"data":"visual"])[0],q=d.getSizeSignalRef(x).signal,G=d.getScaleComponent(O),ee=G&&G.get("type"),se=P?dx(d,O):B.name,Ee=A+tb,Ye=`${P&&G?"log"===ee?"zoomLog":"symlog"===ee?"zoomSymlog":"pow"===ee?"zoomPow":"zoomLinear":"zoomLinear"}(${se}, ${A}${iC}.${O}, ${Ee}${P?"pow"===ee?`, ${G.get("exponent")??1}`:"symlog"===ee?`, ${G.get("constant")??1}`:"":""})`;B.on.push({events:{signal:Ee},update:P?Ye:`clampRange(${Ye}, 0, ${q})`})}const Hd="_store",Wd="_tuple",dT="_modify",fR="vlSelectionResolve",gx=[Ro,YE,GE,hx,nC,uc,cT,lT,eb,nb,Tp];function kp(d){let{escape:p}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},_=p?re.stringValue(d.name):d.name;const x=function Ag(d){let p=d.parent;for(;p&&!mc(p);)p=p.parent;return p}(d);if(x){const{facet:S}=x;for(const A of Zl)S[A]&&(_+=` + '__facet_${A}_' + (facet[${re.stringValue(x.vgField(A))}])`)}return _}function nh(d){return Dn(d.component.selection??{}).reduce((p,_)=>p||_.project.hasSelectionId,!1)}function zn(d,p){(re.isString(p.select)||!p.select.on)&&delete d.events,(re.isString(p.select)||!p.select.clear)&&delete d.clear,(re.isString(p.select)||!p.select.toggle)&&delete d.toggle}function rC(d){const p=[];return"Identifier"===d.type?[d.name]:"Literal"===d.type?[d.value]:("MemberExpression"===d.type&&(p.push(...rC(d.object)),p.push(...rC(d.property))),p)}function _x(d){return"MemberExpression"===d.object.type?_x(d.object):"datum"===d.object.name}function tl(d){const p=re.parseExpression(d),_=new Set;return p.visit(x=>{"MemberExpression"===x.type&&_x(x)&&_.add(rC(x).slice(1).join("."))}),_}class Cl extends Tn{clone(){return new Cl(null,this.model,st(this.filter))}constructor(p,_,x){super(p),this.model=_,this.filter=x,ln(this,"expr",void 0),ln(this,"_dependentFields",void 0),this.expr=aC(this.model,this.filter,this),this._dependentFields=tl(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function ib(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum";const S=re.isString(p)?p:p.param,A=hn(S),O=re.stringValue(A+Hd);let P;try{P=d.getSelectionComponent(A,S)}catch{return`!!${A}`}if(P.project.timeUnit){const se=_??d.component.data.raw,Ee=P.project.timeUnit.clone();se.parent?Ee.insertAsParentOf(se):se.parent=Ee}const G=`${P.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${O}, ${x}${"global"===P.resolve?")":`, ${re.stringValue(P.resolve)})`}`,ee=`length(data(${O}))`;return!1===p.empty?`${ee} && ${G}`:`!${ee} || ${G}`}function sC(d,p,_){const x=hn(p),S=_.encoding;let O,A=_.field;try{O=d.getSelectionComponent(x,p)}catch{return x}if(S||A){if(S&&!A){const P=O.project.items.filter(B=>B.channel===S);!P.length||P.length>1?(A=O.project.items[0].field,nt((P.length?"Multiple ":"No ")+`matching ${re.stringValue(S)} encoding found for selection ${re.stringValue(_.param)}. Using "field": ${re.stringValue(A)}.`)):A=P[0].field}}else A=O.project.items[0].field,O.project.items.length>1&&nt(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${re.stringValue(A)}.`);return`${O.name}[${re.stringValue(ci(A))}]`}function aC(d,p,_){return io(p,x=>re.isString(x)?x:function Km(d){return d?.param}(x)?ib(d,x,_):Zm(x))}function Ip(d,p,_,x){d.encode??={},d.encode[p]??={},d.encode[p].update??={},d.encode[p].update[_]=x}function rb(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1};const{disable:S,orient:A,scale:O,labelExpr:P,title:B,zindex:q,...G}=d.combine();if(!S){for(const ee in G){const se=$v[ee],Ee=G[ee];if(se&&se!==p&&"both"!==se)delete G[ee];else if(Xf(Ee)){const{condition:De,...Re}=Ee,Le=re.array(De),Ye=_A[ee];if(Ye){const{vgProp:bt,part:kn}=Ye;Ip(G,kn,bt,[...Le.map(vi=>{const{test:lr,...ca}=vi;return{test:aC(null,lr),...ca}}),Re]),delete G[ee]}else if(null===Ye){const bt={signal:Le.map(kn=>{const{test:dn,...vi}=kn;return`${aC(null,dn)} ? ${FM(vi)} : `}).join("")+FM(Re)};G[ee]=bt}}else if(Je(Ee)){const De=_A[ee];if(De){const{vgProp:Re,part:Le}=De;Ip(G,Le,Re,Ee),delete G[ee]}}St(["labelAlign","labelBaseline"],ee)&&null===G[ee]&&delete G[ee]}if("grid"===p){if(!G.grid)return;if(G.encode){const{grid:ee}=G.encode;G.encode={...ee?{grid:ee}:{}},Gt(G.encode)&&delete G.encode}return{scale:O,orient:A,...G,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:ui(q,0)}}{if(!x.header&&d.mainExtracted)return;if(void 0!==P){let se=P;G.encode?.labels?.update&&Je(G.encode.labels.update.text)&&(se=jo(P,"datum.label",G.encode.labels.update.text.signal)),Ip(G,"labels","text",{signal:se})}if(null===G.labelAlign&&delete G.labelAlign,G.encode){for(const se of yE)d.hasAxisPart(se)||delete G.encode[se];Gt(G.encode)&&delete G.encode}const ee=function lC(d,p){if(d)return re.isArray(d)&&!ds(d)?d.map(_=>lg(_,p)).join(", "):d}(B,_);return{scale:O,orient:A,grid:!1,...ee?{title:ee}:{},...G,...!1===_.aria?{aria:!1}:{},zindex:ui(q,0)}}}}function Tg(d){const{axes:p}=d.component,_=[];for(const x of Ql)if(p[x])for(const S of p[x])if(!S.get("disable")&&!S.get("gridScale")){const A="x"===x?"height":"width",O=d.getSizeSignalRef(A).signal;A!==O&&_.push({name:A,update:O})}return _}function yx(d,p,_,x){return Object.assign.apply(null,[{},...d.map(S=>{if("axisOrient"===S){const A="x"===_?"bottom":"left",O=p["x"===_?"axisBottom":"axisLeft"]||{},P=p["x"===_?"axisTop":"axisRight"]||{},B=new Set([...We(O),...We(P)]),q={};for(const G of B.values())q[G]={signal:`${x.signal} === "${A}" ? ${ec(O[G])} : ${ec(P[G])}`};return q}return p[S]})])}function uC(d,p){const _=[{}];for(const x of d){let S=p[x]?.style;if(S){S=re.array(S);for(const A of S)_.push(p.style[A])}}return Object.assign.apply(null,_)}function bx(d,p,_){let x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=PM(d,_,p);if(void 0!==S)return{configFrom:"style",configValue:S};for(const A of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==x[A]?.[d])return{configFrom:A,configValue:x[A][d]};return{}}const dC={scale:d=>{let{model:p,channel:_}=d;return p.scaleName(_)},format:d=>{let{format:p}=d;return p},formatType:d=>{let{formatType:p}=d;return p},grid:d=>{let{fieldOrDatumDef:p,axis:_,scaleType:x}=d;return _.grid??function pT(d,p){return!ko(d)&&dt(p)&&!sr(p?.bin)&&!oo(p?.bin)}(x,p)},gridScale:d=>{let{model:p,channel:_}=d;return function vx(d,p){const _="x"===p?"y":"x";if(d.getScaleComponent(_))return d.scaleName(_)}(p,_)},labelAlign:d=>{let{axis:p,labelAngle:_,orient:x,channel:S}=d;return p.labelAlign||fC(_,x,S)},labelAngle:d=>{let{labelAngle:p}=d;return p},labelBaseline:d=>{let{axis:p,labelAngle:_,orient:x,channel:S}=d;return p.labelBaseline||wx(_,x,S)},labelFlush:d=>{let{axis:p,fieldOrDatumDef:_,channel:x}=d;return p.labelFlush??function hC(d,p){if("x"===p&&St(["quantitative","temporal"],d))return!0}(_.type,x)},labelOverlap:d=>{let{axis:p,fieldOrDatumDef:_,scaleType:x}=d;return p.labelOverlap??function Ex(d,p,_,x){if(_&&!re.isObject(x)||"nominal"!==d&&"ordinal"!==d)return"log"!==p&&"symlog"!==p||"greedy"}(_.type,x,dt(_)&&!!_.timeUnit,dt(_)?_.sort:void 0)},orient:d=>{let{orient:p}=d;return p},tickCount:d=>{let{channel:p,model:_,axis:x,fieldOrDatumDef:S,scaleType:A}=d;const O="x"===p?"width":"y"===p?"height":void 0,P=O?_.getSizeSignalRef(O):void 0;return x.tickCount??function r3(d){let{fieldOrDatumDef:p,scaleType:_,size:x,values:S}=d;if(!S&&!ko(_)&&"log"!==_){if(dt(p)){if(sr(p.bin))return{signal:`ceil(${x.signal}/10)`};if(p.timeUnit&&St(["month","hours","day","quarter"],Fr(p.timeUnit)?.unit))return}return{signal:`ceil(${x.signal}/40)`}}}({fieldOrDatumDef:S,scaleType:A,size:P,values:x.values})},tickMinStep:function mC(d){let{format:p,fieldOrDatumDef:_}=d;if("d"===p)return 1;if(dt(_)){const{timeUnit:x}=_;if(x){const S=Lf(x);if(S)return{signal:S}}}},title:d=>{let{axis:p,model:_,channel:x}=d;if(void 0!==p.title)return p.title;const S=Op(_,x);if(void 0!==S)return S;const A=_.typedFieldDef(x),P=_.fieldDef("x"===x?"x2":"y2");return $M(A?[aa(A)]:[],dt(P)?[aa(P)]:[])},values:d=>{let{axis:p,fieldOrDatumDef:_}=d;return function mT(d,p){const _=d.values;return re.isArray(_)?gA(p,_):Je(_)?_:void 0}(p,_)},zindex:d=>{let{axis:p,fieldOrDatumDef:_,mark:x}=d;return p.zindex??function ih(d,p){return"rect"===d&&Fv(p)?1:0}(x,_)}};function ob(d){return`(((${d.signal} % 360) + 360) % 360)`}function wx(d,p,_,x){if(void 0!==d){if("x"===_){if(Je(d)){const S=ob(d);return{signal:`(45 < ${S} && ${S} < 135) || (225 < ${S} && ${S} < 315) ? "middle" :(${S} <= 45 || 315 <= ${S}) === ${Je(p)?`(${p.signal} === "top")`:"top"===p} ? "bottom" : "top"`}}return 45{if(sp(x)&&fE(x.sort)){const{field:A,timeUnit:O}=x,P=x.sort,B=P.map((q,G)=>`${Zm({field:A,timeUnit:O,equal:q})} ? ${G} : `).join("")+P.length;p=new Rp(p,{calculate:B,as:Np(x,S,{forAs:!0})})}}),p}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 ${kt(this.transform)}`}}function Np(d,p,_){return pt(d,{prefix:p,suffix:"sort_index",..._??{}})}function sb(d,p){return St(["top","bottom"],p)?"column":St(["left","right"],p)||"row"===d?"row":"column"}function kg(d,p,_,x){return ui((p||{})[d],("row"===x?_.headerRow:"column"===x?_.headerColumn:_.headerFacet)[d],_.header[d])}function Cx(d,p,_,x){const S={};for(const A of d){const O=kg(A,p||{},_,x);void 0!==O&&(S[A]=O)}return S}const gC=["row","column"],Sx=["header","footer"];function hR(d,p){const _=d.component.layoutHeaders[p].title,x=d.config?d.config:void 0,S=d.component.layoutHeaders[p].facetFieldDef?d.component.layoutHeaders[p].facetFieldDef:void 0,{titleAnchor:A,titleAngle:O,titleOrient:P}=Cx(["titleAnchor","titleAngle","titleOrient"],S.header,x,p),B=sb(p,P),q=$i(O);return{name:`${p}-title`,type:"group",role:`${B}-title`,title:{text:_,..."row"===p?{orient:"left"}:{},style:"guide-title",...yC(q,B),..._C(B,q,A),...Mx(x,S,p,xl,Ty)}}}function _C(d,p){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"middle"){case"start":return{align:"left"};case"end":return{align:"right"}}const x=fC(p,"row"===d?"left":"top","row"===d?"y":"x");return x?{align:x}:{}}function yC(d,p){const _=wx(d,"row"===p?"left":"top","row"===p?"y":"x",!0);return _?{baseline:_}:{}}function bC(d,p){const _=d.component.layoutHeaders[p],x=[];for(const S of Sx)if(_[S])for(const A of _[S]){const O=Dx(d,p,S,_,A);null!=O&&x.push(O)}return x}function gT(d,p){const{sort:_}=d;return sa(_)?{field:pt(_,{expr:"datum"}),order:_.order??"ascending"}:re.isArray(_)?{field:Np(d,p,{expr:"datum"}),order:"ascending"}:{field:pt(d,{expr:"datum"}),order:_??"ascending"}}function _T(d,p,_){const{format:x,formatType:S,labelAngle:A,labelAnchor:O,labelOrient:P,labelExpr:B}=Cx(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],d.header,_,p),q=Hc({fieldOrDatumDef:d,format:x,formatType:S,expr:"parent",config:_}).signal,G=sb(p,P);return{text:{signal:B?jo(jo(B,"datum.label",q),"datum.value",pt(d,{expr:"parent"})):q},..."row"===p?{orient:"left"}:{},style:"guide-label",frame:"group",...yC(A,G),..._C(G,A,O),...Mx(_,d,p,Kf,pp)}}function Dx(d,p,_,x,S){if(S){let A=null;const{facetFieldDef:O}=x,P=d.config?d.config:void 0;if(O&&S.labels){const{labelOrient:ee}=Cx(["labelOrient"],O.header,P,p);("row"===p&&!St(["top","bottom"],ee)||"column"===p&&!St(["left","right"],ee))&&(A=_T(O,p,P))}const B=mc(d)&&!og(d.facet),q=S.axes,G=q?.length>0;if(A||G){const ee="row"===p?"height":"width";return{name:d.getName(`${p}_${_}`),type:"group",role:`${p}-${_}`,...x.facetFieldDef?{from:{data:d.getName(`${p}_domain`)},sort:gT(O,p)}:{},...G&&B?{from:{data:d.getName(`facet_domain_${p}`)}}:{},...A?{title:A}:{},...S.sizeSignal?{encode:{update:{[ee]:S.sizeSignal}}}:{},...G?{axes:q}:{}}}}return null}const nl={column:{start:0,end:1},row:{start:1,end:0}};function ab(d,p){return nl[p][d]}function Mx(d,p,_,x,S){const A={};for(const O of x){if(!S[O])continue;const P=kg(O,p?.header,d,_);void 0!==P&&(A[S[O]]=P)}return A}function cb(d){return[...ub(d,"width"),...ub(d,"height"),...ub(d,"childWidth"),...ub(d,"childHeight")]}function ub(d,p){const _="width"===p?"x":"y",x=d.component.layoutSize.get(p);if(!x||"merged"===x)return[];const S=d.getSizeSignalRef(p).signal;if("step"===x){const A=d.getScaleComponent(_);if(A){const O=A.get("type"),P=A.get("range");if(ko(O)&&ht(P)){const B=d.scaleName(_);return mc(d.parent)&&"independent"===d.parent.component.resolve.scale[_]?[Fp(B,P)]:[Fp(B,P),{name:S,update:vC(B,A,`domain('${B}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==x){const A=S.endsWith("width"),O=A?"containerSize()[0]":"containerSize()[1]",B=`isFinite(${O}) ? ${O} : ${Aa(d.config.view,A?"width":"height")}`;return[{name:S,init:B,on:[{update:B,events:"window:resize"}]}]}return[{name:S,value:x}]}function Fp(d,p){const _=`${d}_step`;return Je(p.step)?{name:_,update:p.step.signal}:{name:_,value:p.step}}function vC(d,p,_){const x=p.get("type"),S=p.get("padding"),A=ui(p.get("paddingOuter"),S);let O=p.get("paddingInner");return O="band"===x?void 0!==O?O:S:1,`bandspace(${_}, ${ec(O)}, ${ec(A)}) * ${d}_step`}function yT(d){return"childWidth"===d?"width":"childHeight"===d?"height":d}function Ax(d,p){return We(d).reduce((_,x)=>({..._,...Sp(p,d[x],x,A=>Ar(A.value))}),{})}function o3(d,p){if(mc(p))return"theta"===d?"independent":"shared";if(Hg(p))return"shared";if(Gx(p))return Yr(d)||"theta"===d||"radius"===d?"independent":"shared";throw new Error("invalid model type for resolve")}function Ig(d,p){const _=d.scale[p],x=Yr(p)?"axis":"legend";return"independent"===_?("shared"===d[x][p]&&nt(function X$(d){return`Setting the scale to be independent for "${d}" means we also have to set the guide (axis or legend) to be independent.`}(p)),"independent"):d[x][p]||"shared"}const xC=We({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,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1});class Tx extends Za{}const db={symbols:function bT(d,p){let{fieldOrDatumDef:_,model:x,channel:S,legendCmpt:A,legendType:O}=p;if("symbol"!==O)return;const{markDef:P,encoding:B,config:q,mark:G}=x,ee=P.filled&&"trail"!==G;let se={...R2({},x,q2),...QE(x,{filled:ee})};const Ee=A.get("symbolOpacity")??q.legend.symbolOpacity,De=A.get("symbolFillColor")??q.legend.symbolFillColor,Re=A.get("symbolStrokeColor")??q.legend.symbolStrokeColor,Le=void 0===Ee?ue(B.opacity)??P.opacity:void 0;if(se.fill)if("fill"===S||ee&&S===be)delete se.fill;else if(se.fill.field)De?delete se.fill:(se.fill=Ar(q.legend.symbolBaseFillColor??"black"),se.fillOpacity=Ar(Le??1));else if(re.isArray(se.fill)){const Ye=Og(B.fill??B.color)??P.fill??(ee&&P.color);Ye&&(se.fill=Ar(Ye))}if(se.stroke)if("stroke"===S||!ee&&S===be)delete se.stroke;else if(se.stroke.field||Re)delete se.stroke;else if(re.isArray(se.stroke)){const Ye=ui(Og(B.stroke||B.color),P.stroke,ee?P.color:void 0);Ye&&(se.stroke={value:Ye})}if(S!==_e){const Ye=dt(_)&&EC(0,A,_);Ye?se.opacity=[{test:Ye,...Ar(Le??1)},Ar(q.legend.unselectedOpacity)]:Le&&(se.opacity=Ar(Le))}return se={...se,...d},Gt(se)?void 0:se},gradient:function Vn(d,p){let{model:_,legendType:x,legendCmpt:S}=p;if("gradient"!==x)return;const{config:A,markDef:O,encoding:P}=_;let B={};const G=void 0===(S.get("gradientOpacity")??A.legend.gradientOpacity)?ue(P.opacity)||O.opacity:void 0;return G&&(B.opacity=Ar(G)),B={...B,...d},Gt(B)?void 0:B},labels:function Ze(d,p){let{fieldOrDatumDef:_,model:x,channel:S,legendCmpt:A}=p;const O=x.legend(S)||{},P=x.config,B=dt(_)?EC(0,A,_):void 0,q=B?[{test:B,value:1},{value:P.legend.unselectedOpacity}]:void 0,{format:G,formatType:ee}=O;let se;Uc(ee)?se=Ns({fieldOrDatumDef:_,field:"datum.value",format:G,formatType:ee,config:P}):void 0===G&&void 0===ee&&P.customFormatTypes&&("quantitative"===_.type&&P.numberFormatType?se=Ns({fieldOrDatumDef:_,field:"datum.value",format:P.numberFormat,formatType:P.numberFormatType,config:P}):"temporal"===_.type&&P.timeFormatType&&dt(_)&&void 0===_.timeUnit&&(se=Ns({fieldOrDatumDef:_,field:"datum.value",format:P.timeFormat,formatType:P.timeFormatType,config:P})));const Ee={...q?{opacity:q}:{},...se?{text:se}:{},...d};return Gt(Ee)?void 0:Ee},entries:function fb(d,p){let{legendCmpt:_}=p;return _.get("selections")?.length?{...d,fill:{value:"transparent"}}:d}};function ue(d){return wC(d,(p,_)=>Math.max(p,_.value))}function Og(d){return wC(d,(p,_)=>ui(p,_.value))}function wC(d,p){return function bl(d){const p=d?.condition;return!!p&&(re.isArray(p)||Ma(p))}(d)?re.array(d.condition).reduce(p,d.value):Ma(d)?d.value:void 0}function EC(d,p,_){const x=p.get("selections");if(!x?.length)return;const S=re.stringValue(_.field);return x.map(A=>`(!length(data(${re.stringValue(hn(A)+Hd)})) || (${A}[${S}] && indexof(${A}[${S}], datum.value) >= 0))`).join(" || ")}const hb={direction:d=>{let{direction:p}=d;return p},format:d=>{let{fieldOrDatumDef:p,legend:_,config:x}=d;const{format:S,formatType:A}=_;return Hf(p,p.type,S,A,x,!1)},formatType:d=>{let{legend:p,fieldOrDatumDef:_,scaleType:x}=d;const{formatType:S}=p;return gy(S,_,x)},gradientLength:d=>{const{legend:p,legendConfig:_}=d;return p.gradientLength??_.gradientLength??function Ox(d){let{legendConfig:p,model:_,direction:x,orient:S,scaleType:A}=d;const{gradientHorizontalMaxLength:O,gradientHorizontalMinLength:P,gradientVerticalMaxLength:B,gradientVerticalMinLength:q}=p;if(Go(A))return"horizontal"===x?"top"===S||"bottom"===S?Rx(_,"width",P,O):P:Rx(_,"height",q,B)}(d)},labelOverlap:d=>{let{legend:p,legendConfig:_,scaleType:x}=d;return p.labelOverlap??_.labelOverlap??function Nx(d){if(St(["quantile","threshold","log","symlog"],d))return"greedy"}(x)},symbolType:d=>{let{legend:p,markDef:_,channel:x,encoding:S}=d;return p.symbolType??function kx(d,p,_,x){if("shape"!==p){const S=Og(_)??x;if(S)return S}switch(d){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"}}(_.type,x,S.shape,_.shape)},title:d=>{let{fieldOrDatumDef:p,config:_}=d;return cp(p,_,{allowDisabling:!0})},type:d=>{let{legendType:p,scaleType:_,channel:x}=d;if(Wh(x)&&Go(_)){if("gradient"===p)return}else if("symbol"===p)return;return p},values:d=>{let{fieldOrDatumDef:p,legend:_}=d;return function Rg(d,p){const _=d.values;return re.isArray(_)?gA(p,_):Je(_)?_:void 0}(_,p)}};function Pp(d){const{legend:p}=d;return ui(p.type,function Ix(d){let{channel:p,timeUnit:_,scaleType:x}=d;if(Wh(p)){if(St(["quarter","month","day"],_))return"symbol";if(Go(x))return"gradient"}return"symbol"}(d))}function Ng(d){let{legendConfig:p,legendType:_,orient:x,legend:S}=d;return S.direction??p[_?"gradientDirection":"symbolDirection"]??function Lp(d,p){switch(d){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===p?"horizontal":void 0}}(x,_)}function Rx(d,p,_,x){return{signal:`clamp(${d.getSizeSignalRef(p).signal}, ${_}, ${x})`}}function vT(d){const p=uo(d)?function CC(d){const{encoding:p}=d,_={};for(const x of[be,...Nd]){const S=Oo(p[x]);!S||!d.getScaleComponent(x)||x===ye&&dt(S)&&S.type===Sa||(_[x]=pR(d,x))}return _}(d):function mR(d){const{legends:p,resolve:_}=d.component;for(const x of d.children){vT(x);for(const S of We(x.component.legends))_.legend[S]=Ig(d.component.resolve,S),"shared"===_.legend[S]&&(p[S]=xT(p[S],x.component.legends[S]),p[S]||(_.legend[S]="independent",delete p[S]))}for(const x of We(p))for(const S of d.children)S.component.legends[x]&&"shared"===_.legend[x]&&delete S.component.legends[x];return p}(d);return d.component.legends=p,p}function SC(d,p,_,x){switch(p){case"disable":return void 0!==_;case"values":return!!_?.values;case"title":if("title"===p&&d===x?.title)return!0}return d===(_||{})[p]}function pR(d,p){let _=d.legend(p);const{markDef:x,encoding:S,config:A}=d,O=A.legend,P=new Tx({},function $p(d,p){const _=d.scaleName(p);if("trail"===d.mark){if("color"===p)return{stroke:_};if("size"===p)return{strokeWidth:_}}return"color"===p?d.markDef.filled?{fill:_}:{stroke:_}:{[p]:_}}(d,p));!function Mg(d,p,_){const x=d.fieldDef(p)?.field;for(const S of Dn(d.component.selection??{})){const A=S.project.hasField[x]??S.project.hasChannel[p];if(A&&cT.defined(S)){const O=_.get("selections")??[];O.push(S.name),_.set("selections",O,!1),A.hasLegend=!0}}}(d,p,P);const B=void 0!==_?!_:O.disable;if(P.set("disable",B,void 0!==_),B)return P;_=_||{};const q=d.getScaleComponent(p).get("type"),G=Oo(S[p]),ee=dt(G)?Fr(G.timeUnit)?.unit:void 0,se=_.orient||A.legend.orient||"right",Ee=Pp({legend:_,channel:p,timeUnit:ee,scaleType:q}),Re={legend:_,channel:p,model:d,markDef:x,encoding:S,fieldOrDatumDef:G,legendConfig:O,config:A,scaleType:q,orient:se,legendType:Ee,direction:Ng({legend:_,legendType:Ee,orient:se,legendConfig:O})};for(const dn of xC){if("gradient"===Ee&&dn.startsWith("symbol")||"symbol"===Ee&&dn.startsWith("gradient"))continue;const vi=dn in hb?hb[dn](Re):_[dn];if(void 0!==vi){const lr=SC(vi,dn,_,d.fieldDef(p));(lr||void 0===A.legend[dn])&&P.set(dn,vi,lr)}}const Le=_?.encoding??{},Ye=P.get("selections"),bt={},kn={fieldOrDatumDef:G,model:d,channel:p,legendCmpt:P,legendType:Ee};for(const dn of["labels","legend","title","symbols","gradient","entries"]){const vi=Ax(Le[dn]??{},d),lr=dn in db?db[dn](vi,kn):vi;void 0!==lr&&!Gt(lr)&&(bt[dn]={...Ye?.length&&dt(G)?{name:`${hn(G.field)}_legend_${dn}`}:{},...Ye?.length?{interactive:!!Ye}:{},update:lr})}return Gt(bt)||P.set("encode",bt,!!_?.encoding),P}function xT(d,p){if(!d)return p.clone();const _=d.getWithExplicit("orient"),x=p.getWithExplicit("orient");if(_.explicit&&x.explicit&&_.value!==x.value)return;let S=!1;for(const A of xC){const O=Qa(d.getWithExplicit(A),p.getWithExplicit(A),A,"legend",(P,B)=>{switch(A){case"symbolType":return DC(P,B);case"title":return BM(P,B);case"type":return S=!0,co("symbol")}return Pu(P,B,A,"legend")});d.setWithExplicit(A,O)}return S&&(d.implicit?.encode?.gradient&&xn(d.implicit,["encode","gradient"]),d.explicit?.encode?.gradient&&xn(d.explicit,["encode","gradient"])),d}function DC(d,p){return"circle"===p.value?p:d}function rh(d){const p=d.component.legends,_={};for(const S of We(p)){const O=Wn(d.getScaleComponent(S).get("domains"));if(_[O])for(const P of _[O])xT(P,p[S])||_[O].push(p[S]);else _[O]=[p[S].clone()]}return Dn(_).flat().map(S=>function qd(d,p){const{disable:_,labelExpr:x,selections:S,...A}=d.combine();if(!_){if(!1===p.aria&&null==A.aria&&(A.aria=!1),A.encode?.symbols){const O=A.encode.symbols.update;O.fill&&"transparent"!==O.fill.value&&!O.stroke&&!A.stroke&&(O.stroke={value:"transparent"});for(const P of Nd)A[P]&&delete O[P]}if(A.title||delete A.title,void 0!==x){let O=x;A.encode?.labels?.update&&Je(A.encode.labels.update.text)&&(O=jo(x,"datum.label",A.encode.labels.update.text.signal)),function wT(d,p,_,x){d.encode??={},d.encode[p]??={},d.encode[p].update??={},d.encode[p].update[_]=x}(A,"labels","text",{signal:O})}return A}}(S,d.config)).filter(S=>void 0!==S)}function pb(d){return Hg(d)||Gx(d)?function zs(d){return d.children.reduce((p,_)=>p.concat(_.assembleProjections()),mb(d))}(d):mb(d)}function mb(d){const p=d.component.projection;if(!p||p.merged)return[];const _=p.combine(),{name:x}=_;if(p.data){const S={signal:`[${p.size.map(O=>O.signal).join(", ")}]`},A=p.data.reduce((O,P)=>{const B=Je(P)?P.signal:`data('${d.lookupDataSource(P)}')`;return St(O,B)||O.push(B),O},[]);if(A.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:x,size:S,fit:{signal:A.length>1?`[${A.join(", ")}]`:A[0]},..._}]}return[{name:x,translate:{signal:"[width / 2, height / 2]"},..._}]}const Bp=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class zp extends Za{constructor(p,_,x,S){super({..._},{name:p}),this.specifiedProjection=_,this.size=x,this.data=S,ln(this,"merged",!1)}get isFit(){return!!this.data}}function Sl(d){d.component.projection=uo(d)?function Vp(d){if(d.hasProjection){const p=_o(d.specifiedProjection),_=!(p&&(null!=p.scale||null!=p.translate)),x=_?[d.getSizeSignalRef("width"),d.getSizeSignalRef("height")]:void 0,S=_?function Fg(d){const p=[],{encoding:_}=d;for(const x of[[Ho,It],[ae,wr]])(Oo(_[x[0]])||Oo(_[x[1]]))&&p.push({signal:d.getName(`geojson_${p.length}`)});return d.channelHasField(ye)&&d.typedFieldDef(ye).type===Sa&&p.push({signal:d.getName(`geojson_${p.length}`)}),0===p.length&&p.push(d.requestDataName(Vr.Main)),p}(d):void 0,A=new zp(d.projectionName(!0),{..._o(d.config.projection)??{},...p??{}},x,S);return A.get("type")||A.set("type","equalEarth",!1),A}}(d):function Px(d){if(0===d.children.length)return;let p;for(const x of d.children)Sl(x);const _=Ot(d.children,x=>{const S=x.component.projection;if(S){if(p){const A=function Fx(d,p){const _=Ot(Bp,S=>!!(!re.hasOwnProperty(d.explicit,S)&&!re.hasOwnProperty(p.explicit,S)||re.hasOwnProperty(d.explicit,S)&&re.hasOwnProperty(p.explicit,S)&&xr(d.get(S),p.get(S))));if(xr(d.size,p.size)){if(_)return d;if(xr(d.explicit,{}))return p;if(xr(p.explicit,{}))return d}return null}(p,S);return A&&(p=A),!!A}return p=S,!0}return!0});if(p&&_){const x=d.projectionName(!0),S=new zp(x,p.specifiedProjection,p.size,st(p.data));for(const A of d.children){const O=A.component.projection;O&&(O.isFit&&S.data.push(...A.component.projection.data),A.renameProjection(O.get("name"),x),O.merged=!0)}return S}}(d)}function Lx(d,p,_,x){if(kd(p,_)){const S=uo(d)?d.axis(_)??d.legend(_)??{}:{},A=pt(p,{expr:"datum"}),O=pt(p,{expr:"datum",binSuffix:"end"});return{formulaAs:pt(p,{binSuffix:"range",forAs:!0}),formula:ng(A,O,S.format,S.formatType,x)}}return{}}function $x(d,p){return`${Z_(d)}_${p}`}function jp(d,p,_){const S=$x(Ad(_,void 0)??{},p);return d.getName(`${S}_bins`)}function Pg(d,p,_){let x,S;x=function Zo(d){return"as"in d}(d)?re.isString(d.as)?[d.as,`${d.as}_end`]:[d.as[0],d.as[1]]:[pt(d,{forAs:!0}),pt(d,{binSuffix:"end",forAs:!0})];const A={...Ad(p,void 0)},O=$x(A,d.field),{signal:P,extentSignal:B}=function ET(d,p){return{signal:d.getName(`${p}_bins`),extentSignal:d.getName(`${p}_extent`)}}(_,O);if(Q_(A.extent)){const G=A.extent;S=sC(_,G.param,G),delete A.extent}return{key:O,binComponent:{bin:A,field:d.field,as:[x],...P?{signal:P}:{},...B?{extentSignal:B}:{},...S?{span:S}:{}}}}class il extends Tn{clone(){return new il(null,st(this.bins))}constructor(p,_){super(p),this.bins=_}static makeFromEncoding(p,_){const x=_.reduceFieldDef((S,A,O)=>{if(Yo(A)&&sr(A.bin)){const{key:P,binComponent:B}=Pg(A,A.bin,_);S[P]={...B,...S[P],...Lx(_,A,O,_.config)}}return S},{});return Gt(x)?null:new il(p,x)}static makeFromTransform(p,_,x){const{key:S,binComponent:A}=Pg(_,_.bin,x);return new il(p,{[S]:A})}merge(p,_){for(const x of We(p.bins))x in this.bins?(_(p.bins[x].signal,this.bins[x].signal),this.bins[x].as=Ci([...this.bins[x].as,...p.bins[x].as],kt)):this.bins[x]=p.bins[x];for(const x of p.children)p.removeChild(x),x.parent=this;p.remove()}producedFields(){return new Set(Dn(this.bins).map(p=>p.as).flat(2))}dependentFields(){return new Set(Dn(this.bins).map(p=>p.field))}hash(){return`Bin ${kt(this.bins)}`}assemble(){return Dn(this.bins).flatMap(p=>{const _=[],[x,...S]=p.as,{extent:A,...O}=p.bin,P={type:"bin",field:ci(p.field),as:x,signal:p.signal,...Q_(A)?{extent:null}:{extent:A},...p.span?{span:{signal:`span(${p.span})`}}:{},...O};!A&&p.extentSignal&&(_.push({type:"extent",field:ci(p.field),signal:p.extentSignal}),P.extent={signal:p.extentSignal}),_.push(P);for(const B of S)for(let q=0;q<2;q++)_.push({type:"formula",expr:pt({field:x[q]},{expr:"datum"}),as:B[q]});return p.formula&&_.push({type:"formula",expr:p.formula,as:p.formulaAs}),_})}}function fc(d,p,_,x){const S=uo(x)?x.encoding[Or(p)]:void 0;if(Yo(_)&&uo(x)&&vy(_,S,x.markDef,x.config)){d.add(pt(_,{})),d.add(pt(_,{suffix:"end"}));const{mark:A,markDef:O,config:P}=x,B=Tu({fieldDef:_,markDef:O,config:P});ip(A)&&.5!==B&&Yr(p)&&(d.add(pt(_,{suffix:Xc})),d.add(pt(_,{suffix:Vd}))),_.bin&&kd(_,p)&&d.add(pt(_,{binSuffix:"range"}))}else if(za(p)){const A=Mn(p);d.add(x.getName(A))}else d.add(pt(_));return sp(_)&&function Er(d){return re.isObject(d)&&"field"in d}(_.scale?.range)&&d.add(_.scale.range.field),d}class No extends Tn{clone(){return new No(null,new Set(this.dimensions),st(this.measures))}constructor(p,_,x){super(p),this.dimensions=_,this.measures=x}get groupBy(){return this.dimensions}static makeFromEncoding(p,_){let x=!1;_.forEachFieldDef(O=>{O.aggregate&&(x=!0)});const S={},A=new Set;return x&&(_.forEachFieldDef((O,P)=>{const{aggregate:B,field:q}=O;if(B)if("count"===B)S["*"]??={},S["*"].count=new Set([pt(O,{forAs:!0})]);else{if(bu(B)||Ua(B)){const G=bu(B)?"argmin":"argmax",ee=B[G];S[ee]??={},S[ee][G]=new Set([pt({op:G,field:ee},{forAs:!0})])}else S[q]??={},S[q][B]=new Set([pt(O,{forAs:!0})]);pd(P)&&"unaggregated"===_.scaleDomain(P)&&(S[q]??={},S[q].min=new Set([pt({field:q,aggregate:"min"},{forAs:!0})]),S[q].max=new Set([pt({field:q,aggregate:"max"},{forAs:!0})]))}else fc(A,P,O,_)}),A.size+We(S).length!==0)?new No(p,A,S):null}static makeFromTransform(p,_){const x=new Set,S={};for(const A of _.aggregate){const{op:O,field:P,as:B}=A;O&&("count"===O?(S["*"]??={},S["*"].count=new Set([B||pt(A,{forAs:!0})])):(S[P]??={},S[P][O]=new Set([B||pt(A,{forAs:!0})])))}for(const A of _.groupby??[])x.add(A);return x.size+We(S).length===0?null:new No(p,x,S)}merge(p){return no(this.dimensions,p.dimensions)?(function MC(d,p){for(const _ of We(p)){const x=p[_];for(const S of We(x))_ in d?d[_][S]=new Set([...d[_][S]??[],...x[S]]):d[_]={[S]:x[S]}}}(this.measures,p.measures),!0):(function U1(){Xm.debug(...arguments)}("different dimensions, cannot merge"),!1)}addDimensions(p){p.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...We(this.measures)])}producedFields(){const p=new Set;for(const _ of We(this.measures))for(const x of We(this.measures[_])){const S=this.measures[_][x];0===S.size?p.add(`${x}_${_}`):S.forEach(p.add,p)}return p}hash(){return`Aggregate ${kt({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const p=[],_=[],x=[];for(const A of We(this.measures))for(const O of We(this.measures[A]))for(const P of this.measures[A][O])x.push(P),p.push(O),_.push("*"===A?null:ci(A));return{type:"aggregate",groupby:[...this.dimensions].map(ci),ops:p,fields:_,as:x}}}class oh extends Tn{constructor(p,_,x,S){super(p),this.model=_,this.name=x,this.data=S,ln(this,"column",void 0),ln(this,"row",void 0),ln(this,"facet",void 0),ln(this,"childModel",void 0);for(const A of Zl){const O=_.facet[A];if(O){const{bin:P,sort:B}=O;this[A]={name:_.getName(`${A}_domain`),fields:[pt(O),...sr(P)?[pt(O,{binSuffix:"end"})]:[]],...sa(B)?{sortField:B}:re.isArray(B)?{sortIndexField:Np(O,A)}:{}}}}this.childModel=_.child}hash(){let p="Facet";for(const _ of Zl)this[_]&&(p+=` ${_.charAt(0)}:${kt(this[_])}`);return p}get fields(){const p=[];for(const _ of Zl)this[_]?.fields&&p.push(...this[_].fields);return p}dependentFields(){const p=new Set(this.fields);for(const _ of Zl)this[_]&&(this[_].sortField&&p.add(this[_].sortField.field),this[_].sortIndexField&&p.add(this[_].sortIndexField));return p}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const p={};for(const _ of Ql){const x=this.childModel.component.scales[_];if(x&&!x.merged){const S=x.get("type"),A=x.get("range");if(ko(S)&&ht(A)){const P=NC(Wp(this.childModel,_));P?p[_]=P:nt(Tr(_))}}}return p}assembleRowColumnHeaderData(p,_,x){const S={row:"y",column:"x",facet:void 0}[p],A=[],O=[],P=[];S&&x&&x[S]&&(_?(A.push(`distinct_${x[S]}`),O.push("max")):(A.push(x[S]),O.push("distinct")),P.push(`distinct_${x[S]}`));const{sortField:B,sortIndexField:q}=this[p];if(B){const{op:G=ig,field:ee}=B;A.push(ee),O.push(G),P.push(pt(B,{forAs:!0}))}else q&&(A.push(q),O.push("max"),P.push(q));return{name:this[p].name,source:_??this.data,transform:[{type:"aggregate",groupby:this[p].fields,...A.length?{fields:A,ops:O,as:P}:{}}]}}assembleFacetHeaderData(p){const{columns:_}=this.model.layout,{layoutHeaders:x}=this.model.component,S=[],A={};for(const B of gC){for(const q of Sx){const G=(x[B]&&x[B][q])??[];for(const ee of G)if(ee.axes?.length>0){A[B]=!0;break}}if(A[B]){const q=`length(data("${this.facet.name}"))`;S.push({name:`${this.facet.name}_${B}`,transform:[{type:"sequence",start:0,stop:"row"===B?_?{signal:`ceil(${q} / ${_})`}:1:_?{signal:`min(${q}, ${_})`}:{signal:q}}]})}}const{row:O,column:P}=A;return(O||P)&&S.unshift(this.assembleRowColumnHeaderData("facet",null,p)),S}assemble(){const p=[];let _=null;const x=this.getChildIndependentFieldsWithStep(),{column:S,row:A,facet:O}=this;if(S&&A&&(x.x||x.y)){_=`cross_${this.column.name}_${this.row.name}`;const P=[].concat(x.x??[],x.y??[]),B=P.map(()=>"distinct");p.push({name:_,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:P,ops:B}]})}for(const P of[Xl,ea])this[P]&&p.push(this.assembleRowColumnHeaderData(P,_,x));if(O){const P=this.assembleFacetHeaderData(x);P&&p.push(...P)}return p}}function Bx(d){return d.startsWith("'")&&d.endsWith("'")||d.startsWith('"')&&d.endsWith('"')?d.slice(1,-1):d}function ST(d){const p={};return ot(d.filter,_=>{if(so(_)){let x=null;G1(_)?x=Ha(_.equal):Y1(_)?x=Ha(_.lte):X1(_)?x=Ha(_.lt):ar(_)?x=Ha(_.gt):xv(_)?x=Ha(_.gte):qe(_)?x=_.range[0]:bi(_)&&(x=(_.oneOf??_.in)[0]),x&&(_d(x)?p[_.field]="date":re.isNumber(x)?p[_.field]="number":re.isString(x)&&(p[_.field]="string")),_.timeUnit&&(p[_.field]="date")}}),p}function DT(d){const p={};function _(x){up(x)?p[x.field]="date":"quantitative"===x.type&&function pe(d){return re.isString(d)&&St(["min","max"],d)}(x.aggregate)?p[x.field]="number":ro(x.field)>1?x.field in p||(p[x.field]="flatten"):sp(x)&&sa(x.sort)&&ro(x.sort.field)>1&&(x.sort.field in p||(p[x.sort.field]="flatten"))}if((uo(d)||mc(d))&&d.forEachFieldDef((x,S)=>{if(Yo(x))_(x);else{const A=Fc(S),O=d.fieldDef(A);_({...x,type:O.type})}}),uo(d)){const{mark:x,markDef:S,encoding:A}=d;if(yl(x)&&!d.encoding.order){const P=A["horizontal"===S.orient?"y":"x"];dt(P)&&"quantitative"===P.type&&!(P.field in p)&&(p[P.field]="number")}}return p}class ys extends Tn{clone(){return new ys(null,st(this._parse))}constructor(p,_){super(p),ln(this,"_parse",void 0),this._parse=_}hash(){return`Parse ${kt(this._parse)}`}static makeExplicit(p,_,x){let S={};const A=_.data;return!Jf(A)&&A?.format?.parse&&(S=A.format.parse),this.makeWithAncestors(p,S,{},x)}static makeWithAncestors(p,_,x,S){for(const P of We(x)){const B=S.getWithExplicit(P);void 0!==B.value&&(B.explicit||B.value===x[P]||"derived"===B.value||"flatten"===x[P]?delete x[P]:nt(Wm(P,x[P],B.value)))}for(const P of We(_)){const B=S.get(P);void 0!==B&&(B===_[P]?delete _[P]:nt(Wm(P,_[P],B)))}const A=new Za(_,x);S.copyAll(A);const O={};for(const P of We(A.combine())){const B=A.get(P);null!==B&&(O[P]=B)}return 0===We(O).length||S.parseNothing?null:new ys(p,O)}get parse(){return this._parse}merge(p){this._parse={...this._parse,...p.parse},p.remove()}assembleFormatParse(){const p={};for(const _ of We(this._parse)){const x=this._parse[_];1===ro(_)&&(p[_]=x)}return p}producedFields(){return new Set(We(this._parse))}dependentFields(){return new Set(We(this._parse))}assembleTransforms(){let p=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return We(this._parse).filter(_=>!p||ro(_)>1).map(_=>{const x=function CT(d,p){const _=Js(d);return"number"===p?`toNumber(${_})`:"boolean"===p?`toBoolean(${_})`:"string"===p?`toString(${_})`:"date"===p?`toDate(${_})`:"flatten"===p?_:p.startsWith("date:")?`timeParse(${_},'${Bx(p.slice(5,p.length))}')`:p.startsWith("utc:")?`utcParse(${_},'${Bx(p.slice(4,p.length))}')`:(nt(function Kr(d){return`Unrecognized parse "${d}".`}(p)),null)}(_,this._parse[_]);return x?{type:"formula",expr:x,as:Si(_)}:null}).filter(_=>null!==_)}}class sh extends Tn{clone(){return new sh(null)}constructor(p){super(p)}dependentFields(){return new Set}producedFields(){return new Set([Ya])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Ya}}}class Gd extends Tn{clone(){return new Gd(null,this.params)}constructor(p,_){super(p),this.params=_}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${kt(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class Up extends Tn{clone(){return new Up(null,this.params)}constructor(p,_){super(p),this.params=_}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${kt(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class Xd extends Tn{constructor(p){let _;if(super(null),ln(this,"_data",void 0),ln(this,"_name",void 0),ln(this,"_generator",void 0),p??={name:"source"},Jf(p)||(_=p.format?{...yt(p.format,["parse"])}:{}),Wy(p))this._data={values:p.values};else if(ka(p)){if(this._data={url:p.url},!_.type){let x=/(?:\.([^.]+))?$/.exec(p.url)[1];St(["json","csv","tsv","dsv","topojson"],x)||(x="json"),_.type=x}}else Ja(p)?this._data={values:[{type:"Sphere"}]}:(ZA(p)||Jf(p))&&(this._data={});this._generator=Jf(p),p.name&&(this._name=p.name),_&&!Gt(_)&&(this._data.format=_)}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(p){this._name=p}set parent(p){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:[]}}}function Lg(d){return d instanceof Xd||d instanceof Gd||d instanceof Up}var $g=new WeakMap;class Yn{constructor(){ia(this,$g,{writable:!0,value:void 0}),fs(this,$g,!1)}setModified(){fs(this,$g,!0)}get modifiedFlag(){return function Vt(d,p){return function Wo(d,p){return p.get?p.get.call(d):p.value}(d,Jn(d,p,"get"))}(this,$g)}}class ah extends Yn{getNodeDepths(p,_,x){x.set(p,_);for(const S of p.children)this.getNodeDepths(S,_+1,x);return x}optimize(p){const x=[...this.getNodeDepths(p,0,new Map).entries()].sort((S,A)=>A[1]-S[1]);for(const S of x)this.run(S[0]);return this.modifiedFlag}}class Kc extends Yn{optimize(p){this.run(p);for(const _ of p.children)this.optimize(_);return this.modifiedFlag}}class AC extends Kc{mergeNodes(p,_){const x=_.shift();for(const S of _)p.removeChild(S),S.parent=x,S.remove()}run(p){const _=p.children.map(S=>S.hash()),x={};for(let S=0;S<_.length;S++)void 0===x[_[S]]?x[_[S]]=[p.children[S]]:x[_[S]].push(p.children[S]);for(const S of We(x))x[S].length>1&&(this.setModified(),this.mergeNodes(p,x[S]))}}class gb extends Kc{constructor(p){super(),ln(this,"requiresSelectionId",void 0),this.requiresSelectionId=p&&nh(p)}run(p){p instanceof sh&&(this.requiresSelectionId&&(Lg(p.parent)||p.parent instanceof No||p.parent instanceof ys)||(this.setModified(),p.remove()))}}class TC extends Yn{optimize(p){return this.run(p,new Set),this.modifiedFlag}run(p,_){let x=new Set;p instanceof el&&(x=p.producedFields(),Qi(x,_)&&(this.setModified(),p.removeFormulas(_),0===p.producedFields.length&&p.remove()));for(const S of p.children)this.run(S,new Set([..._,...x]))}}class MT extends Kc{constructor(){super()}run(p){p instanceof jr&&!p.isRequired()&&(this.setModified(),p.remove())}}class AT extends ah{run(p){if(!(Lg(p)||p.numChildren()>1))for(const _ of p.children)if(_ instanceof ys)if(p instanceof ys)this.setModified(),p.merge(_);else{if(Oi(p.producedFields(),_.dependentFields()))continue;this.setModified(),_.swapWithParent()}}}class TT extends ah{run(p){const _=[...p.children],x=p.children.filter(S=>S instanceof ys);if(p.numChildren()>1&&x.length>=1){const S={},A=new Set;for(const O of x){const P=O.parse;for(const B of We(P))B in S?S[B]!==P[B]&&A.add(B):S[B]=P[B]}for(const O of A)delete S[O];if(!Gt(S)){this.setModified();const O=new ys(p,S);for(const P of _){if(P instanceof ys)for(const B of We(S))delete P.parse[B];p.removeChild(P),P.parent=O,P instanceof ys&&0===We(P.parse).length&&P.remove()}}}}}class kT extends ah{run(p){p instanceof jr||p.numChildren()>0||p instanceof oh||p instanceof Xd||(this.setModified(),p.remove())}}class IT extends ah{run(p){const _=p.children.filter(S=>S instanceof el),x=_.pop();for(const S of _)this.setModified(),x.merge(S)}}class Vx extends ah{run(p){const _=p.children.filter(S=>S instanceof No),x={};for(const S of _){const A=kt(S.groupBy);A in x||(x[A]=[]),x[A].push(S)}for(const S of We(x)){const A=x[S];if(A.length>1){const O=A.pop();for(const P of A)O.merge(P)&&(p.removeChild(P),P.parent=O,P.remove(),this.setModified())}}}}class _b extends ah{constructor(p){super(),this.model=p}run(p){const _=!(Lg(p)||p instanceof Cl||p instanceof ys||p instanceof sh),x=[],S=[];for(const A of p.children)A instanceof il&&(_&&!Oi(p.producedFields(),A.dependentFields())?x.push(A):S.push(A));if(x.length>0){const A=x.pop();for(const O of x)A.merge(O,this.model.renameSignal.bind(this.model));this.setModified(),p instanceof il?p.merge(A,this.model.renameSignal.bind(this.model)):A.swapWithParent()}if(S.length>1){const A=S.pop();for(const O of S)A.merge(O,this.model.renameSignal.bind(this.model));this.setModified()}}}class Bg extends ah{run(p){const _=[...p.children];if(!li(_,O=>O instanceof jr)||p.numChildren()<=1)return;const S=[];let A;for(const O of _)if(O instanceof jr){let P=O;for(;1===P.numChildren();){const[B]=P.children;if(!(B instanceof jr))break;P=B}S.push(...P.children),A?(p.removeChild(O),O.parent=A.parent,A.parent.removeChild(A),A.parent=P,this.setModified()):A=P}else S.push(O);if(S.length){this.setModified();for(const O of S)O.parent.removeChild(O),O.parent=A}}}class zu extends Tn{clone(){return new zu(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci(this.transform.groupby.concat(p),_=>_)}dependentFields(){const p=new Set;return this.transform.groupby&&this.transform.groupby.forEach(p.add,p),this.transform.joinaggregate.map(_=>_.field).filter(_=>void 0!==_).forEach(p.add,p),p}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(p){return p.as??pt(p)}hash(){return`JoinAggregateTransform ${kt(this.transform)}`}assemble(){const p=[],_=[],x=[];for(const A of this.transform.joinaggregate)_.push(A.op),x.push(this.getDefaultName(A)),p.push(void 0===A.field?null:A.field);const S=this.transform.groupby;return{type:"joinaggregate",as:x,ops:_,fields:p,...void 0!==S?{groupby:S}:{}}}}class Yd extends Tn{clone(){return new Yd(null,st(this._stack))}constructor(p,_){super(p),ln(this,"_stack",void 0),this._stack=_}static makeFromTransform(p,_){const{stack:x,groupby:S,as:A,offset:O="zero"}=_,P=[],B=[];if(void 0!==_.sort)for(const ee of _.sort)P.push(ee.field),B.push(ui(ee.order,"ascending"));const q={field:P,order:B};let G;return G=function kC(d){return re.isArray(d)&&d.every(p=>re.isString(p))&&d.length>1}(A)?A:re.isString(A)?[A,`${A}_end`]:[`${_.stack}_start`,`${_.stack}_end`],new Yd(p,{dimensionFieldDefs:[],stackField:x,groupby:S,offset:O,sort:q,facetby:[],as:G})}static makeFromEncoding(p,_){const x=_.stack,{encoding:S}=_;if(!x)return null;const{groupbyChannels:A,fieldChannel:O,offset:P,impute:B}=x,q=A.map(Ee=>ku(S[Ee])).filter(Ee=>!!Ee),G=function Qo(d){return d.stack.stackBy.reduce((p,_)=>{const S=pt(_.fieldDef);return S&&p.push(S),p},[])}(_),ee=_.encoding.order;let se;if(re.isArray(ee)||dt(ee))se=LM(ee);else{const Ee=Rv(ee)?ee.sort:"y"===O?"descending":"ascending";se=G.reduce((De,Re)=>(De.field.push(Re),De.order.push(Ee),De),{field:[],order:[]})}return new Yd(p,{dimensionFieldDefs:q,stackField:_.vgField(O),facetby:[],stackby:G,sort:se,offset:P,impute:B,as:[_.vgField(O,{suffix:"start",forAs:!0}),_.vgField(O,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(p){this._stack.facetby.push(...p)}dependentFields(){const p=new Set;return p.add(this._stack.stackField),this.getGroupbyFields().forEach(p.add,p),this._stack.facetby.forEach(p.add,p),this._stack.sort.field.forEach(p.add,p),p}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${kt(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:p,impute:_,groupby:x}=this._stack;return p.length>0?p.map(S=>S.bin?_?[pt(S,{binSuffix:"mid"})]:[pt(S,{}),pt(S,{binSuffix:"end"})]:[pt(S)]).flat():x??[]}assemble(){const p=[],{facetby:_,dimensionFieldDefs:x,stackField:S,stackby:A,sort:O,offset:P,impute:B,as:q}=this._stack;if(B)for(const G of x){const{bandPosition:ee=.5,bin:se}=G;if(se){const Ee=pt(G,{expr:"datum"}),De=pt(G,{expr:"datum",binSuffix:"end"});p.push({type:"formula",expr:`${ee}*${Ee}+${1-ee}*${De}`,as:pt(G,{binSuffix:"mid",forAs:!0})})}p.push({type:"impute",field:S,groupby:[...A,..._],key:pt(G,{binSuffix:"mid"}),method:"value",value:0})}return p.push({type:"stack",groupby:[...this.getGroupbyFields(),..._],field:S,sort:O,as:q,offset:P}),p}}class zg extends Tn{clone(){return new zg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci(this.transform.groupby.concat(p),_=>_)}dependentFields(){const p=new Set;return(this.transform.groupby??[]).forEach(p.add,p),(this.transform.sort??[]).forEach(_=>p.add(_.field)),this.transform.window.map(_=>_.field).filter(_=>void 0!==_).forEach(p.add,p),p}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(p){return p.as??pt(p)}hash(){return`WindowTransform ${kt(this.transform)}`}assemble(){const p=[],_=[],x=[],S=[];for(const ee of this.transform.window)_.push(ee.op),x.push(this.getDefaultName(ee)),S.push(void 0===ee.param?null:ee.param),p.push(void 0===ee.field?null:ee.field);const A=this.transform.frame,O=this.transform.groupby;if(A&&null===A[0]&&null===A[1]&&_.every(ee=>K_(ee)))return{type:"joinaggregate",as:x,ops:_,fields:p,...void 0!==O?{groupby:O}:{}};const P=[],B=[];if(void 0!==this.transform.sort)for(const ee of this.transform.sort)P.push(ee.field),B.push(ee.order??"ascending");const G=this.transform.ignorePeers;return{type:"window",params:S,as:x,ops:_,fields:p,sort:{field:P,order:B},...void 0!==G?{ignorePeers:G}:{},...void 0!==O?{groupby:O}:{},...void 0!==A?{frame:A}:{}}}}function IC(d){if(d instanceof oh)if(1!==d.numChildren()||d.children[0]instanceof jr){const p=d.model.component.data.main;OT(p);const _=function gR(d){return function p(_){if(!(_ instanceof oh)){const x=_.clone();if(x instanceof jr){const S=Hp+x.getSource();x.setSource(S),d.model.component.data.outputNodes[S]=x}else(x instanceof No||x instanceof Yd||x instanceof zg||x instanceof zu)&&x.addDimensions(d.fields);for(const S of _.children.flatMap(p))S.parent=x;return[x]}return _.children.flatMap(p)}}(d),x=d.children.map(_).flat();for(const S of x)S.parent=p}else{const p=d.children[0];(p instanceof No||p instanceof Yd||p instanceof zg||p instanceof zu)&&p.addDimensions(d.fields),p.swapWithParent(),IC(d)}else d.children.map(IC)}function OT(d){if(d instanceof jr&&d.type===Vr.Main&&1===d.numChildren()){const p=d.children[0];p instanceof oh||(p.swapWithParent(),OT(d))}}const Hp="scale_",Vg=5;function jg(d){for(const p of d){for(const _ of p.children)if(_.parent!==p)return!1;if(!jg(p.children))return!1}return!0}function Vu(d,p){let _=!1;for(const x of p)_=d.optimize(x)||_;return _}function RT(d,p,_){let x=d.sources,S=!1;return S=Vu(new MT,x)||S,S=Vu(new gb(p),x)||S,x=x.filter(A=>A.numChildren()>0),S=Vu(new kT,x)||S,x=x.filter(A=>A.numChildren()>0),_||(S=Vu(new AT,x)||S,S=Vu(new _b(p),x)||S,S=Vu(new TC,x)||S,S=Vu(new TT,x)||S,S=Vu(new Vx,x)||S,S=Vu(new IT,x)||S,S=Vu(new AC,x)||S,S=Vu(new Bg,x)||S),d.sources=x,S}class bs{constructor(p){ln(this,"signal",void 0),Object.defineProperty(this,"signal",{enumerable:!0,get:p})}static fromName(p,_){return new bs(()=>p(_))}}function NT(d){uo(d)?function OC(d){const p=d.component.scales;for(const _ of We(p)){const x=FT(d,_);if(p[_].setWithExplicit("domains",x),s3(d,_),d.component.data.isFaceted){let A=d;for(;!mc(A)&&A.parent;)A=A.parent;if("shared"===A.component.resolve.scale[_])for(const P of x.value)vu(P)&&(P.data=Hp+P.data.replace(Hp,""))}}}(d):function RC(d){for(const _ of d.children)NT(_);const p=d.component.scales;for(const _ of We(p)){let x,S=null;for(const A of d.children){const O=A.component.scales[_];if(O){x=void 0===x?O.getWithExplicit("domains"):Qa(x,O.getWithExplicit("domains"),"domains","scale",yb);const P=O.get("selectionExtent");S&&P&&S.param!==P.param&&nt(wu),S=P}}p[_].setWithExplicit("domains",x),S&&p[_].set("selectionExtent",S,!0)}}(d)}function FT(d,p){const _=d.getScaleComponent(p).get("type"),{encoding:x}=d,S=function Kd(d,p,_,x){if("unaggregated"===d){const{valid:S,reason:A}=PT(p,_);if(!S)return void nt(A)}else if(void 0===d&&x.useUnaggregatedDomain){const{valid:S}=PT(p,_);if(S)return"unaggregated"}return d}(d.scaleDomain(p),d.typedFieldDef(p),_,d.config.scale);return S!==d.scaleDomain(p)&&(d.specifiedScales[p]={...d.specifiedScales[p],domain:S}),"x"===p&&Oo(x.x2)?Oo(x.x)?Qa(ju(_,S,d,"x"),ju(_,S,d,"x2"),"domain","scale",yb):ju(_,S,d,"x2"):"y"===p&&Oo(x.y2)?Oo(x.y)?Qa(ju(_,S,d,"y"),ju(_,S,d,"y2"),"domain","scale",yb):ju(_,S,d,"y2"):ju(_,S,d,p)}function cn(d,p,_){const x=Fr(_)?.unit;return"temporal"===p||x?function jx(d,p,_){return d.map(x=>({signal:`{data: ${Td(x,{timeUnit:_,type:p})}}`}))}(d,p,x):[d]}function ju(d,p,_,x){const{encoding:S,markDef:A,mark:O,config:P,stack:B}=_,q=Oo(S[x]),{type:G}=q,ee=q.timeUnit;if(function tp(d){return d?.unionWith}(p)){const De=ju(d,void 0,_,x);return Ls([...cn(p.unionWith,G,ee),...De.value])}if(Je(p))return Ls([p]);if(p&&"unaggregated"!==p&&!Xo(p))return Ls(cn(p,G,ee));if(B&&x===B.fieldChannel){if("normalize"===B.offset)return co([[0,1]]);const De=_.requestDataName(Vr.Main);return co([{data:De,field:_.vgField(x,{suffix:"start"})},{data:De,field:_.vgField(x,{suffix:"end"})}])}const se=pd(x)&&dt(q)?function Bt(d,p,_){if(!ko(_))return;const x=d.fieldDef(p),S=x.sort;if(fE(S))return{op:"min",field:Np(x,p),order:"ascending"};const{stack:A}=d,O=A?new Set([...A.groupbyFields,...A.stackBy.map(P=>P.fieldDef.field)]):void 0;if(sa(S))return Ux(S,A&&!O.has(S.field));if(dE(S)){const{encoding:P,order:B}=S,q=d.fieldDef(P),{aggregate:G,field:ee}=q,se=A&&!O.has(ee);if(bu(G)||Ua(G))return Ux({field:pt(q),order:B},se);if(K_(G)||!G)return Ux({op:G,field:ee,order:B},se)}else{if("descending"===S)return{op:"min",field:d.vgField(p),order:"descending"};if(St(["ascending",void 0],S))return!0}}(_,x,d):void 0;if(Sd(q))return co(cn([q.datum],G,ee));const Ee=q;if("unaggregated"===p){const De=_.requestDataName(Vr.Main),{field:Re}=q;return co([{data:De,field:pt({field:Re,aggregate:"min"})},{data:De,field:pt({field:Re,aggregate:"max"})}])}if(sr(Ee.bin)){if(ko(d))return co("bin-ordinal"===d?[]:[{data:Hi(se)?_.requestDataName(Vr.Main):_.requestDataName(Vr.Raw),field:_.vgField(x,kd(Ee,x)?{binSuffix:"range"}:{}),sort:!0!==se&&re.isObject(se)?se:{field:_.vgField(x,{}),op:"min"}}]);{const{bin:De}=Ee;if(sr(De)){const Re=jp(_,Ee.field,De);return co([new bs(()=>{const Le=_.getSignalName(Re);return`[${Le}.start, ${Le}.stop]`})])}return co([{data:_.requestDataName(Vr.Main),field:_.vgField(x,{})}])}}if(Ee.timeUnit&&St(["time","utc"],d)){const De=S[Or(x)];if(vy(Ee,De,A,P)){const Re=_.requestDataName(Vr.Main),Le=Tu({fieldDef:Ee,fieldDef2:De,markDef:A,config:P}),Ye=ip(O)&&.5!==Le&&Yr(x);return co([{data:Re,field:_.vgField(x,Ye?{suffix:Xc}:{})},{data:Re,field:_.vgField(x,{suffix:Ye?Vd:"end"})}])}}return co(se?[{data:Hi(se)?_.requestDataName(Vr.Main):_.requestDataName(Vr.Raw),field:_.vgField(x),sort:se}]:[{data:_.requestDataName(Vr.Main),field:_.vgField(x)}])}function Ux(d,p){const{op:_,field:x,order:S}=d;return{op:_??(p?"sum":ig),...x?{field:ci(x)}:{},...S?{order:S}:{}}}function s3(d,p){const _=d.component.scales[p],x=d.specifiedScales[p].domain,S=d.fieldDef(p)?.bin,A=Xo(x)&&x,O=Lc(S)&&Q_(S.extent)&&S.extent;(A||O)&&_.set("selectionExtent",A??O,!0)}function PT(d,p){const{aggregate:_,type:x}=d;return _?re.isString(_)&&!Xe.has(_)?{valid:!1,reason:fv(_)}:"quantitative"===x&&"log"===p?{valid:!1,reason:qM(d)}:{valid:!0}:{valid:!1,reason:WM(d)}}function yb(d,p,_,x){return d.explicit&&p.explicit&&nt(function G$(d,p,_,x){return`Conflicting ${p.toString()} property "${d.toString()}" (${Wn(_)} and ${Wn(x)}). Using the union of the two domains.`}(_,x,d.value,p.value)),{explicit:d.explicit,value:[...d.value,...p.value]}}function LT(d){const p=Ci(d.map(O=>{if(vu(O)){const{sort:P,...B}=O;return B}return O}),kt),_=Ci(d.map(O=>{if(vu(O)){const P=O.sort;return void 0!==P&&!Hi(P)&&("op"in P&&"count"===P.op&&delete P.field,"ascending"===P.order&&delete P.order),P}}).filter(O=>void 0!==O),kt);if(0===p.length)return;if(1===p.length){const O=d[0];if(vu(O)&&_.length>0){let P=_[0];if(_.length>1){nt(P2);const B=_.filter(q=>re.isObject(q)&&"op"in q&&"min"!==q.op);P=!_.every(q=>re.isObject(q)&&"op"in q)||1!==B.length||B[0]}else re.isObject(P)&&"field"in P&&O.field===P.field&&(P=!P.order||{order:P.order});return{...O,sort:P}}return O}const x=Ci(_.map(O=>Hi(O)||!("op"in O)||re.isString(O.op)&&O.op in nv?O:(nt(function Y$(d){return`Dropping sort property ${Wn(d)} as unioned domains only support boolean or op "count", "min", and "max".`}(O)),!0)),kt);let S;1===x.length?S=x[0]:x.length>1&&(nt(P2),S=!0);const A=Ci(d.map(O=>vu(O)?O.data:null),O=>O);return 1===A.length&&null!==A[0]?{data:A[0],fields:p.map(P=>P.field),...S?{sort:S}:{}}:{fields:p,...S?{sort:S}:{}}}function NC(d){if(vu(d)&&re.isString(d.field))return d.field;if(function IM(d){return!re.isArray(d)&&"fields"in d&&!("data"in d)}(d)){let p;for(const _ of d.fields)if(vu(_)&&re.isString(_.field))if(p){if(p!==_.field)return nt("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."),p}else p=_.field;return nt("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."),p}if(function Ni(d){return!re.isArray(d)&&"fields"in d&&"data"in d}(d)){nt("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 p=d.fields[0];return re.isString(p)?p:void 0}}function Wp(d,p){return LT(d.component.scales[p].get("domains").map(S=>(vu(S)&&(S.data=d.lookupDataSource(S.data)),S)))}function FC(d){return Hg(d)||Gx(d)?d.children.reduce((p,_)=>p.concat(FC(_)),PC(d)):PC(d)}function PC(d){return We(d.component.scales).reduce((p,_)=>{const x=d.component.scales[_];if(x.merged)return p;const S=x.combine(),{name:A,type:O,selectionExtent:P,domains:B,range:q,reverse:G,...ee}=S,se=function LC(d,p,_,x){if(Yr(_)){if(ht(d))return{step:{signal:`${p}_step`}}}else if(re.isObject(d)&&vu(d))return{...d,data:x.lookupDataSource(d.data)};return d}(S.range,A,_,d),Ee=Wp(d,_),De=P?function qE(d,p,_,x){const S=sC(d,p.param,p);return{signal:Da(_.get("type"))&&re.isArray(x)&&x[0]>x[1]?`isValid(${S}) && reverse(${S})`:S}}(d,P,x,Ee):null;return p.push({name:A,type:O,...Ee?{domain:Ee}:{},...De?{domainRaw:De}:{},range:se,...void 0!==G?{reverse:G}:{},...ee}),p},[])}class $T extends Za{constructor(p,_){super({},{name:p}),ln(this,"merged",!1),this.setWithExplicit("type",_)}domainDefinitelyIncludesZero(){return!1!==this.get("zero")||li(this.get("domains"),p=>re.isArray(p)&&2===p.length&&re.isNumber(p[0])&&p[0]<=0&&re.isNumber(p[1])&&p[1]>=0)}}const yR=["range","scheme"];function Hx(d,p){const _=d.fieldDef(p);if(_?.bin){const{bin:x,field:S}=_,A=Mr(p),O=d.getName(A);if(re.isObject(x)&&x.binned&&void 0!==x.step)return new bs(()=>{const P=d.scaleName(p),B=`(domain("${P}")[1] - domain("${P}")[0]) / ${x.step}`;return`${d.getSignalName(O)} / (${B})`});if(sr(x)){const P=jp(d,S,x);return new bs(()=>{const B=d.getSignalName(P),q=`(${B}.stop - ${B}.start) / ${B}.step`;return`${d.getSignalName(O)} / (${q})`})}}}function BT(d,p){const _=p.specifiedScales[d],{size:x}=p,A=p.getScaleComponent(d).get("type");for(const ee of yR)if(void 0!==_[ee]){const se=Qm(A,ee),Ee=fy(d,ee);if(se)if(Ee)nt(Ee);else switch(ee){case"range":{const De=_.range;if(re.isArray(De)){if(Yr(d))return Ls(De.map(Re=>{if("width"===Re||"height"===Re){const Le=p.getName(Re),Ye=p.getSignalName.bind(p);return bs.fromName(Ye,Le)}return Re}))}else if(re.isObject(De))return Ls({data:p.requestDataName(Vr.Main),field:De.field,sort:{op:"min",field:p.vgField(d)}});return Ls(De)}case"scheme":return Ls(Wx(_[ee]))}else nt(z1(A,ee,d))}const O=d===Ri||"xOffset"===d?"width":"height",P=x[O];if(Fd(P))if(Yr(d))if(ko(A)){const ee=hc(P,p,d);if(ee)return Ls({step:ee})}else nt(GM(O));else if(us(d)&&"band"===p.getScaleComponent(d===Yl?"x":"y").get("type")){const De=qp(P,A);if(De)return Ls(De)}const{rangeMin:B,rangeMax:q}=_,G=function $C(d,p){const{size:_,config:x,mark:S,encoding:A}=p,{type:O}=Oo(A[d]),B=p.getScaleComponent(d).get("type"),{domain:q,domainMid:G}=p.specifiedScales[d];switch(d){case Ri:case mo:if(St(["point","band"],B)){const ee=qx(d,_,x.view);if(Fd(ee))return{step:hc(ee,p,d)}}return bb(d,p,B);case Yl:case Qn:return function zT(d,p,_){const x=d===Yl?"x":"y",S=p.getScaleComponent(x);if(!S)return bb(x,p,_,{center:!0});const A=S.get("type"),O=p.scaleName(x),{markDef:P,config:B}=p;if("band"===A){const q=qx(x,p.size,p.config.view);if(Fd(q)){const G=qp(q,_);if(G)return G}return[0,{signal:`bandwidth('${O}')`}]}{const q=p.encoding[x];if(dt(q)&&q.timeUnit){const G=Lf(q.timeUnit,De=>`scale('${O}', ${De})`),ee=p.config.scale.bandWithNestedOffsetPaddingInner,se=Tu({fieldDef:q,markDef:P,config:B})-.5,Ee=0!==se?` + ${se}`:"";return ee?[{signal:`${Je(ee)?`${ee.signal}/2`+Ee:`${ee/2+se}`} * (${G})`},{signal:`${Je(ee)?`(1 - ${ee.signal}/2)`+Ee:`${1-ee/2+se}`} * (${G})`}]:[0,{signal:G}]}return Fn(`Cannot use ${d} scale if ${x} scale is not discrete.`)}}(d,p,B);case He:{const se=vb(S,p.component.scales[d].get("zero"),x),Ee=function VT(d,p,_,x){const S={x:Hx(_,"x"),y:Hx(_,"y")};switch(d){case"bar":case"tick":{if(void 0!==x.scale.maxBandSize)return x.scale.maxBandSize;const A=Gp(p,S,x.view);return re.isNumber(A)?A-1:new bs(()=>`${A.signal} - 1`)}case"line":case"trail":case"rule":return x.scale.maxStrokeWidth;case"text":return x.scale.maxFontSize;case"point":case"square":case"circle":{if(x.scale.maxSize)return x.scale.maxSize;const A=Gp(p,S,x.view);return re.isNumber(A)?Math.pow(zC*A,2):new bs(()=>`pow(${zC} * ${A.signal}, 2)`)}}throw new Error(bo("size",d))}(S,_,p,x);return vd(B)?function bR(d,p,_){const x=()=>{const S=ec(p),A=ec(d),O=`(${S} - ${A}) / (${_} - 1)`;return`sequence(${A}, ${S} + ${O}, ${O})`};return Je(p)?new bs(x):{signal:x()}}(se,Ee,function BC(d,p,_,x){switch(d){case"quantile":return p.scale.quantileCount;case"quantize":return p.scale.quantizeCount;case"threshold":return void 0!==_&&re.isArray(_)?_.length+1:(nt(function tA(d){return`Domain for ${d} is required for threshold scale.`}(x)),3)}}(B,x,q,d)):[se,Ee]}case As:return[0,2*Math.PI];case lt:return[0,360];case Ao:return[0,new bs(()=>`min(${p.getSignalName("width")},${p.getSignalName("height")})/2`)];case Ts:return[x.scale.minStrokeWidth,x.scale.maxStrokeWidth];case Hh:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case ye:return"symbol";case be:case Se:case Fe:return"ordinal"===B?"nominal"===O?"category":"ordinal":void 0!==G?"diverging":"rect"===S||"geoshape"===S?"heatmap":"ramp";case _e:case nn:case gi:return[x.scale.minOpacity,x.scale.maxOpacity]}}(d,p);return(void 0!==B||void 0!==q)&&Qm(A,"rangeMin")&&re.isArray(G)&&2===G.length?Ls([B??G[0],q??G[1]]):co(G)}function Wx(d){return function Dv(d){return!re.isString(d)&&!!d.name}(d)?{scheme:d.name,...yt(d,["name"])}:{scheme:d}}function bb(d,p,_){let{center:x}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const S=Mr(d),A=p.getName(S),O=p.getSignalName.bind(p);return d===mo&&Da(_)?x?[bs.fromName(P=>`${O(P)}/2`,A),bs.fromName(P=>`-${O(P)}/2`,A)]:[bs.fromName(O,A),0]:x?[bs.fromName(P=>`-${O(P)}/2`,A),bs.fromName(P=>`${O(P)}/2`,A)]:[0,bs.fromName(O,A)]}function hc(d,p,_){const{encoding:x}=p,S=p.getScaleComponent(_),A=To(_),O=x[A];if("offset"===AE({step:d,offsetIsDiscrete:Bn(O)&&Z1(O.type)})&&Yf(x,A)){const B=p.getScaleComponent(A);let G=`domain('${p.scaleName(A)}').length`;"band"===B.get("type")&&(G=`bandspace(${G}, ${B.get("paddingInner")??B.get("padding")??0}, ${B.get("paddingOuter")??B.get("padding")??0})`);const ee=S.get("paddingInner")??S.get("padding");return{signal:`${d.step} * ${G} / (1-${Jl(ee)})`}}return d.step}function qp(d,p){if("offset"===AE({step:d,offsetIsDiscrete:ko(p)}))return{step:d.step}}function qx(d,p,_){const x=d===Ri?"width":"height";return p[x]||lo(_,x)}function vb(d,p,_){if(p)return Je(p)?{signal:`${p.signal} ? 0 : ${vb(d,!1,_)}`}:0;switch(d){case"bar":case"tick":return _.scale.minBandSize;case"line":case"trail":case"rule":return _.scale.minStrokeWidth;case"text":return _.scale.minFontSize;case"point":case"square":case"circle":return _.scale.minSize}throw new Error(bo("size",d))}const zC=.95;function Gp(d,p,_){const x=Fd(d.width)?d.width.step:pr(_,"width"),S=Fd(d.height)?d.height.step:pr(_,"height");return p.x||p.y?new bs(()=>`min(${[p.x?p.x.signal:x,p.y?p.y.signal:S].join(", ")})`):Math.min(x,S)}function jT(d,p){uo(d)?function pc(d,p){const _=d.component.scales,{config:x,encoding:S,markDef:A,specifiedScales:O}=d;for(const P of We(_)){const B=O[P],q=_[P],G=d.getScaleComponent(P),ee=Oo(S[P]),se=B[p],Ee=G.get("type"),De=G.get("padding"),Re=G.get("paddingInner"),Le=Qm(Ee,p),Ye=fy(P,p);if(void 0!==se&&(Le?Ye&&nt(Ye):nt(z1(Ee,p,P))),Le&&void 0===Ye)if(void 0!==se){const bt=ee.timeUnit,kn=ee.type;switch(p){case"domainMax":case"domainMin":_d(B[p])||"temporal"===kn||bt?q.set(p,{signal:Td(B[p],{type:kn,timeUnit:bt})},!0):q.set(p,B[p],!0);break;default:q.copyKeyFromObject(p,B)}}else{const bt=p in UT?UT[p]({model:d,channel:P,fieldOrDatumDef:ee,scaleType:Ee,scalePadding:De,scalePaddingInner:Re,domain:B.domain,domainMin:B.domainMin,domainMax:B.domainMax,markDef:A,config:x,hasNestedOffsetScale:dp(S,P),hasSecondaryRangeChannel:!!S[Or(P)]}):x.scale[p];void 0!==bt&&q.set(p,bt,!1)}}}(d,p):Zc(d,p)}const UT={bins:d=>{let{model:p,fieldOrDatumDef:_}=d;return dt(_)?function Ug(d,p){const _=p.bin;if(sr(_)){const x=jp(d,p.field,_);return new bs(()=>d.getSignalName(x))}if(oo(_)&&Lc(_)&&void 0!==_.step)return{step:_.step}}(p,_):void 0},interpolate:d=>{let{channel:p,fieldOrDatumDef:_}=d;return function VC(d,p){if(St([be,Se,Fe],d)&&"nominal"!==p)return"hcl"}(p,_.type)},nice:d=>{let{scaleType:p,channel:_,domain:x,domainMin:S,domainMax:A,fieldOrDatumDef:O}=d;return function jC(d,p,_,x,S,A){if(!(ku(A)?.bin||re.isArray(_)||null!=S||null!=x||St([Ga.TIME,Ga.UTC],d)))return!!Yr(p)||void 0}(p,_,x,S,A,O)},padding:d=>{let{channel:p,scaleType:_,fieldOrDatumDef:x,markDef:S,config:A}=d;return function HT(d,p,_,x,S,A){if(Yr(d)){if(Go(p)){if(void 0!==_.continuousPadding)return _.continuousPadding;const{type:O,orient:P}=S;if("bar"===O&&(!dt(x)||!x.bin&&!x.timeUnit)&&("vertical"===P&&"x"===d||"horizontal"===P&&"y"===d))return A.continuousBandSize}if(p===Ga.POINT)return _.pointPadding}}(p,_,A.scale,x,S,A.bar)},paddingInner:d=>{let{scalePadding:p,channel:_,markDef:x,scaleType:S,config:A,hasNestedOffsetScale:O}=d;return function vR(d,p,_,x,S){let A=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0===d){if(Yr(p)){const{bandPaddingInner:O,barBandPaddingInner:P,rectBandPaddingInner:B,bandWithNestedOffsetPaddingInner:q}=S;return A?q:ui(O,"bar"===_?P:B)}if(us(p)&&x===Ga.BAND)return S.offsetBandPaddingInner}}(p,_,x.type,S,A.scale,O)},paddingOuter:d=>{let{scalePadding:p,channel:_,scaleType:x,scalePaddingInner:S,config:A,hasNestedOffsetScale:O}=d;return function WT(d,p,_,x,S){let A=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0===d)if(Yr(p)){const{bandPaddingOuter:O,bandWithNestedOffsetPaddingOuter:P}=S;if(A)return P;if(_===Ga.BAND)return ui(O,Je(x)?{signal:`${x.signal}/2`}:x/2)}else if(us(p)){if(_===Ga.POINT)return.5;if(_===Ga.BAND)return S.offsetBandPaddingOuter}}(p,_,x,S,A.scale,O)},reverse:d=>{let{fieldOrDatumDef:p,scaleType:_,channel:x,config:S}=d;return function wn(d,p,_,x){return"x"===_&&void 0!==x.xReverse?Da(d)&&"descending"===p?Je(x.xReverse)?{signal:`!${x.xReverse.signal}`}:!x.xReverse:x.xReverse:!(!Da(d)||"descending"!==p)||void 0}(_,dt(p)?p.sort:void 0,x,S.scale)},zero:d=>{let{channel:p,fieldOrDatumDef:_,domain:x,markDef:S,scaleType:A,config:O,hasSecondaryRangeChannel:P}=d;return function xR(d,p,_,x,S,A,O){if(_&&"unaggregated"!==_&&Da(S)){if(re.isArray(_)){const B=_[0],q=_[_.length-1];if(re.isNumber(B)&&B<=0&&re.isNumber(q)&&q>=0)return!0}return!1}if("size"===d&&"quantitative"===p.type&&!vd(S))return!0;if((!dt(p)||!p.bin)&&St([...Ql,...fi],d)){const{orient:B,type:q}=x;return(!St(["bar","area","line","trail"],q)||!("horizontal"===B&&"y"===d||"vertical"===B&&"x"===d))&&(!(!St(["bar","area"],q)||O)||A?.zero)}return!1}(p,_,x,S,A,O.scale,P)}};function ch(d){uo(d)?function lh(d){const p=d.component.scales;for(const _ of ev){const x=p[_];if(!x)continue;const S=BT(_,d);x.setWithExplicit("range",S)}}(d):Zc(d,"range")}function Zc(d,p){const _=d.component.scales;for(const x of d.children)"range"===p?ch(x):jT(x,p);for(const x of We(_)){let S;for(const A of d.children){const O=A.component.scales[x];O&&(S=Qa(S,O.getWithExplicit(p),p,"scale",zd((B,q)=>"range"===p&&B.step&&q.step?B.step-q.step:0)))}_[x].setWithExplicit(p,S)}}function xb(d,p,_,x){const A=function wb(d,p,_,x){switch(p.type){case"nominal":case"ordinal":if(Wh(d)||"discrete"===Gh(d))return"shape"===d&&"ordinal"===p.type&&nt(ml(d,"ordinal")),"ordinal";if(Yr(d)||us(d)){if(St(["rect","bar","image","rule"],_.type)||x)return"band"}else if("arc"===_.type&&d in Q0)return"band";return Au(_[Mr(d)])||Dd(p)&&p.axis?.tickBand?"band":"point";case"temporal":return Wh(d)?"time":"discrete"===Gh(d)?(nt(ml(d,"temporal")),"ordinal"):dt(p)&&p.timeUnit&&Fr(p.timeUnit).utc?"utc":"time";case"quantitative":return Wh(d)?dt(p)&&sr(p.bin)?"bin-ordinal":"linear":"discrete"===Gh(d)?(nt(ml(d,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(av(p.type))}(p,_,x,arguments.length>4&&void 0!==arguments[4]&&arguments[4]),{type:O}=d;return pd(p)?void 0!==O?function nE(d,p){let _=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!pd(d))return!1;switch(d){case Ri:case mo:case Yl:case Qn:case As:case Ao:return!(!Go(p)&&"band"!==p)||"point"===p&&!_;case He:case Ts:case _e:case nn:case gi:case lt:return Go(p)||vd(p)||St(["band","point","ordinal"],p);case be:case Se:case Fe:return"band"!==p;case Hh:case ye:return"ordinal"===p||vd(p)}}(p,O)?dt(_)&&!function Mv(d,p){return St([Os,wv],p)?void 0===d||ko(d):p===qa?St([Ga.TIME,Ga.UTC,void 0],d):p!==$f||uy(d)||vd(d)||void 0===d}(O,_.type)?(nt(function hv(d,p){return`FieldDef does not work with "${d}" scale. We are using "${p}" scale instead.`}(O,A)),A):O:(nt(function F2(d,p,_){return`Channel "${d}" does not work with "${p}" scale. We are using "${_}" scale instead.`}(p,O,A)),A):A:null}function UC(d){d.component.scales=uo(d)?function GT(d){const{encoding:p,mark:_,markDef:x}=d,S={};for(const A of ev){const O=Oo(p[A]);if(O&&_===Jm&&A===ye&&O.type===Sa)continue;let P=O&&O.scale;if(O&&null!==P&&!1!==P){P??={};const q=xb(P,A,O,x,dp(p,A));S[A]=new $T(d.scaleName(`${A}`,!0),{value:q,explicit:P.type===q})}}return S}(d):function wR(d){const p=d.component.scales={},_={},x=d.component.resolve;for(const S of d.children){UC(S);for(const A of We(S.component.scales))if(x.scale[A]??=o3(A,d),"shared"===x.scale[A]){const O=_[A],P=S.component.scales[A].getWithExplicit("type");O?Cv(O.value,P.value)?_[A]=Qa(O,P,"type","scale",HC):(x.scale[A]="independent",delete _[A]):_[A]=P}}for(const S of We(_)){const A=d.scaleName(S,!0);p[S]=new $T(A,_[S]);for(const P of d.children){const B=P.component.scales[S];B&&(P.renameScale(B.get("name"),A),B.merged=!0)}}return p}(d)}const HC=zd((d,p)=>jc(d)-jc(p));class Uu{constructor(){ln(this,"nameMap",void 0),this.nameMap={}}rename(p,_){this.nameMap[p]=_}has(p){return void 0!==this.nameMap[p]}get(p){for(;this.nameMap[p]&&p!==this.nameMap[p];)p=this.nameMap[p];return p}}function uo(d){return"unit"===d?.type}function mc(d){return"facet"===d?.type}function Gx(d){return"concat"===d?.type}function Hg(d){return"layer"===d?.type}class Hu{constructor(p,_,x,S,A,O,P){this.type=_,this.parent=x,this.config=A,ln(this,"name",void 0),ln(this,"size",void 0),ln(this,"title",void 0),ln(this,"description",void 0),ln(this,"data",void 0),ln(this,"transforms",void 0),ln(this,"layout",void 0),ln(this,"scaleNameMap",void 0),ln(this,"projectionNameMap",void 0),ln(this,"signalNameMap",void 0),ln(this,"component",void 0),ln(this,"view",void 0),ln(this,"children",void 0),ln(this,"correctDataNames",B=>(B.from?.data&&(B.from.data=this.lookupDataSource(B.from.data)),B.from?.facet?.data&&(B.from.facet.data=this.lookupDataSource(B.from.facet.data)),B)),this.parent=x,this.config=A,this.view=_o(P),this.name=p.name??S,this.title=ds(p.title)?{text:p.title}:p.title?_o(p.title):void 0,this.scaleNameMap=x?x.scaleNameMap:new Uu,this.projectionNameMap=x?x.projectionNameMap:new Uu,this.signalNameMap=x?x.signalNameMap:new Uu,this.data=p.data,this.description=p.description,this.transforms=function GA(d){return d.map(p=>Vy(p)?{filter:At(p.filter,K1)}:p)}(p.transform??[]),this.layout="layer"===_||"unit"===_?{}:function Ny(d,p,_){const x=_[p],S={},{spacing:A,columns:O}=x;void 0!==A&&(S.spacing=A),void 0!==O&&(_y(d)&&!og(d.facet)||ME(d))&&(S.columns=O),mg(d)&&(S.columns=1);for(const P of J$)if(void 0!==d[P])if("spacing"===P){const B=d[P];S[P]=re.isNumber(B)?B:{row:B.row??A,column:B.column??A}}else S[P]=d[P];return S}(p,_,A),this.component={data:{sources:x?x.component.data.sources:[],outputNodes:x?x.component.data.outputNodes:{},outputNodeRefCounts:x?x.component.data.outputNodeRefCounts:{},isFaceted:_y(p)||x?.component.data.isFaceted&&void 0===p.data},layoutSize:new Za,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...O?st(O):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function qT(d){let{ignoreRange:p}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};UC(d),NT(d);for(const _ of tE)jT(d,_);p||ch(d)}(this)}parseProjection(){Sl(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){vT(this)}assembleEncodeFromView(p){const{style:_,...x}=p,S={};for(const A of We(x)){const O=x[A];void 0!==O&&(S[A]=Ar(O))}return S}assembleGroupEncodeEntry(p){let _={};return this.view&&(_=this.assembleEncodeFromView(this.view)),p||(this.description&&(_.description=Ar(this.description)),"unit"!==this.type&&"layer"!==this.type)?Gt(_)?void 0:_:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),..._??{}}}assembleLayout(){if(!this.layout)return;const{spacing:p,..._}=this.layout,{component:x,config:S}=this,A=function lb(d,p){const _={};for(const x of Zl){const S=d[x];if(S?.facetFieldDef){const{titleAnchor:A,titleOrient:O}=Cx(["titleAnchor","titleOrient"],S.facetFieldDef.header,p,x),P=sb(x,O),B=ab(A,P);void 0!==B&&(_[P]=B)}}return Gt(_)?void 0:_}(x.layoutHeaders,S);return{padding:p,...this.assembleDefaultLayout(),..._,...A?{titleBand:A}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:p}=this.component;let _=[];for(const x of Zl)p[x].title&&_.push(hR(this,x));for(const x of gC)_=_.concat(bC(this,x));return _}assembleAxes(){return function hT(d,p){const{x:_=[],y:x=[]}=d;return[..._.map(S=>rb(S,"grid",p)),...x.map(S=>rb(S,"grid",p)),..._.map(S=>rb(S,"main",p)),...x.map(S=>rb(S,"main",p))].filter(S=>S)}(this.component.axes,this.config)}assembleLegends(){return rh(this)}assembleProjections(){return pb(this)}assembleTitle(){const{encoding:p,..._}=this.title??{},x={...pl(this.config.title).nonMarkTitleProperties,..._,...p?{encode:{update:p}}:{}};if(x.text)return St(["unit","layer"],this.type)?St(["middle",void 0],x.anchor)&&(x.frame??="group"):x.anchor??="start",Gt(x)?void 0:x}assembleGroup(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const _={};p=p.concat(this.assembleSignals()),p.length>0&&(_.signals=p);const x=this.assembleLayout();x&&(_.layout=x),_.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const S=!this.parent||mc(this.parent)?FC(this):[];S.length>0&&(_.scales=S);const A=this.assembleAxes();A.length>0&&(_.axes=A);const O=this.assembleLegends();return O.length>0&&(_.legends=O),_}getName(p){return hn((this.name?`${this.name}_`:"")+p)}getDataName(p){return this.getName(Vr[p].toLowerCase())}requestDataName(p){const _=this.getDataName(p),x=this.component.data.outputNodeRefCounts;return x[_]=(x[_]||0)+1,_}getSizeSignalRef(p){if(mc(this.parent)){const x=If(yT(p)),S=this.component.scales[x];if(S&&!S.merged){const A=S.get("type"),O=S.get("range");if(ko(A)&&ht(O)){const P=S.get("name"),q=NC(Wp(this,x));return q?{signal:vC(P,S,pt({aggregate:"distinct",field:q},{expr:"datum"}))}:(nt(Tr(x)),null)}}}return{signal:this.signalNameMap.get(this.getName(p))}}lookupDataSource(p){const _=this.component.data.outputNodes[p];return _?_.getSource():p}getSignalName(p){return this.signalNameMap.get(p)}renameSignal(p,_){this.signalNameMap.rename(p,_)}renameScale(p,_){this.scaleNameMap.rename(p,_)}renameProjection(p,_){this.projectionNameMap.rename(p,_)}scaleName(p,_){return _?this.getName(p):hl(p)&&pd(p)&&this.component.scales[p]||this.scaleNameMap.has(this.getName(p))?this.scaleNameMap.get(this.getName(p)):void 0}projectionName(p){return p?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(p){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const _=this.component.scales[p];return _&&!_.merged?_:this.parent?this.parent.getScaleComponent(p):void 0}getSelectionComponent(p,_){let x=this.component.selection[p];if(!x&&this.parent&&(x=this.parent.getSelectionComponent(p,_)),!x)throw new Error(function ra(d){return`Cannot find a selection named "${d}".`}(_));return x}hasAxisOrientSignalRef(){return this.component.axes.x?.some(p=>p.hasOrientSignalRef())||this.component.axes.y?.some(p=>p.hasOrientSignalRef())}}class Wg extends Hu{vgField(p){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const x=this.fieldDef(p);if(x)return pt(x,_)}reduceFieldDef(p,_){return function Uv(d,p,_,x){return d?We(d).reduce((S,A)=>{const O=d[A];return re.isArray(O)?O.reduce((P,B)=>p.call(x,P,B,A),S):p.call(x,S,O,A)},_):_}(this.getMapping(),(x,S,A)=>{const O=ku(S);return O?p(x,O,A):x},_)}forEachFieldDef(p,_){Ey(this.getMapping(),(x,S)=>{const A=ku(x);A&&p(A,S)},_)}}class Vs extends Tn{clone(){return new Vs(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"value",x[1]??"density"]}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${kt(this.transform)}`}assemble(){const{density:p,..._}=this.transform,x={type:"kde",field:p,..._};return this.transform.groupby&&(x.resolve="shared"),x}}class Xp extends Tn{clone(){return new Xp(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${kt(this.transform)}`}assemble(){const{extent:p,param:_}=this.transform;return{type:"extent",field:p,signal:_}}}class Zd extends Tn{clone(){return new Zd(null,{...this.filter})}constructor(p,_){super(p),this.filter=_}static make(p,_){const{config:x,mark:S,markDef:A}=_;if("filter"!==Ji("invalid",A,x))return null;const P=_.reduceFieldDef((B,q,G)=>{const ee=pd(G)&&_.getScaleComponent(G);return ee&&Da(ee.get("type"))&&"count"!==q.aggregate&&!yl(S)&&(B[q.field]=q),B},{});return We(P).length?new Zd(p,P):null}dependentFields(){return new Set(We(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${kt(this.filter)}`}assemble(){const p=We(this.filter).reduce((_,x)=>{const S=this.filter[x],A=pt(S,{expr:"datum"});return null!==S&&("temporal"===S.type?_.push(`(isDate(${A}) || (isValid(${A}) && isFinite(+${A})))`):"quantitative"===S.type&&(_.push(`isValid(${A})`),_.push(`isFinite(+${A})`))),_},[]);return p.length>0?{type:"filter",expr:p.join(" && ")}:null}}class Yp extends Tn{clone(){return new Yp(this.parent,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const{flatten:x,as:S=[]}=this.transform;this.transform.as=x.map((A,O)=>S[O]??A)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${kt(this.transform)}`}assemble(){const{flatten:p,as:_}=this.transform;return{type:"flatten",fields:p,as:_}}}class Kp extends Tn{clone(){return new Kp(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"key",x[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${kt(this.transform)}`}assemble(){const{fold:p,as:_}=this.transform;return{type:"fold",fields:p,as:_}}}class qg extends Tn{clone(){return new qg(null,st(this.fields),this.geojson,this.signal)}static parseAll(p,_){if(_.component.projection&&!_.component.projection.isFit)return p;let x=0;for(const S of[[Ho,It],[ae,wr]]){const A=S.map(O=>{const P=Oo(_.encoding[O]);return dt(P)?P.field:Sd(P)?{expr:`${P.datum}`}:Ma(P)?{expr:`${P.value}`}:void 0});(A[0]||A[1])&&(p=new qg(p,A,null,_.getName("geojson_"+x++)))}if(_.channelHasField(ye)){const S=_.typedFieldDef(ye);S.type===Sa&&(p=new qg(p,null,S.field,_.getName("geojson_"+x++)))}return p}constructor(p,_,x,S){super(p),this.fields=_,this.geojson=x,this.signal=S}dependentFields(){const p=(this.fields??[]).filter(re.isString);return new Set([...this.geojson?[this.geojson]:[],...p])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${kt(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 Eb extends Tn{clone(){return new Eb(null,this.projection,st(this.fields),st(this.as))}constructor(p,_,x,S){super(p),this.projection=_,this.fields=x,this.as=S}static parseAll(p,_){if(!_.projectionName())return p;for(const x of[[Ho,It],[ae,wr]]){const S=x.map(O=>{const P=Oo(_.encoding[O]);return dt(P)?P.field:Sd(P)?{expr:`${P.datum}`}:Ma(P)?{expr:`${P.value}`}:void 0}),A=x[0]===ae?"2":"";(S[0]||S[1])&&(p=new Eb(p,_.projectionName(),S,[_.getName(`x${A}`),_.getName(`y${A}`)]))}return p}dependentFields(){return new Set(this.fields.filter(re.isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${kt(this.fields)} ${kt(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Gg extends Tn{clone(){return new Gg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(p){const{start:_=0,stop:x,step:S}=p;return{signal:`sequence(${[_,x,...S?[S]:[]].join(",")})`}}static makeFromTransform(p,_){return new Gg(p,_)}static makeFromEncoding(p,_){const x=_.encoding,S=x.x,A=x.y;if(dt(S)&&dt(A)){const O=S.impute?S:A.impute?A:void 0;if(void 0===O)return;const P=S.impute?A:A.impute?S:void 0,{method:B,value:q,frame:G,keyvals:ee}=O.impute,se=Od(_.mark,x);return new Gg(p,{impute:O.field,key:P.field,...B?{method:B}:{},...void 0!==q?{value:q}:{},...G?{frame:G}:{},...void 0!==ee?{keyvals:ee}:{},...se.length?{groupby:se}:{}})}return null}hash(){return`Impute ${kt(this.transform)}`}assemble(){const{impute:p,key:_,keyvals:x,method:S,groupby:A,value:O,frame:P=[null,null]}=this.transform,B={type:"impute",field:p,key:_,...x?{keyvals:(d=x,void 0!==d?.stop?this.processSequence(x):x)}:{},method:"value",...A?{groupby:A}:{},value:S&&"value"!==S?null:O};var d;return S&&"value"!==S?[B,{type:"window",as:[`imputed_${p}_value`],ops:[S],fields:[p],frame:P,ignorePeers:!1,...A?{groupby:A}:{}},{type:"formula",expr:`datum.${p} === null ? datum.imputed_${p}_value : datum.${p}`,as:p}]:[B]}}class Xx extends Tn{clone(){return new Xx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??_.on,x[1]??_.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${kt(this.transform)}`}assemble(){const{loess:p,on:_,...x}=this.transform;return{type:"loess",x:_,y:p,...x}}}class Yx extends Tn{clone(){return new Yx(null,st(this.transform),this.secondary)}constructor(p,_,x){super(p),this.transform=_,this.secondary=x}static make(p,_,x,S){const A=_.component.data.sources,{from:O}=x;let P=null;if(function rx(d){return"data"in d}(O)){let B=tw(O.data,A);B||(B=new Xd(O.data),A.push(B));const q=_.getName(`lookup_${S}`);P=new jr(B,q,Vr.Lookup,_.component.data.outputNodeRefCounts),_.component.data.outputNodes[q]=P}else if(function UA(d){return"param"in d}(O)){const B=O.param;let q;x={as:B,...x};try{q=_.getSelectionComponent(hn(B),B)}catch{throw new Error(function kr(d){return`Lookups can only be performed on selection parameters. "${d}" is a variable parameter.`}(B))}if(P=q.materialized,!P)throw new Error(function Ca(d){return`Cannot define and lookup the "${d}" selection in the same view. Try moving the lookup into a second, layered view?`}(B))}return new Yx(p,x,P.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?re.array(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${kt({transform:this.transform,secondary:this.secondary})}`}assemble(){let p;if(this.transform.from.fields)p={values:this.transform.from.fields,...this.transform.as?{as:re.array(this.transform.as)}:{}};else{let _=this.transform.as;re.isString(_)||(nt('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.'),_="_lookup"),p={as:[_]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...p,...this.transform.default?{default:this.transform.default}:{}}}}class Kx extends Tn{clone(){return new Kx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??"prob",x[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${kt(this.transform)}`}assemble(){const{quantile:p,..._}=this.transform;return{type:"quantile",field:p,..._}}}class Zx extends Tn{clone(){return new Zx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_,this.transform=st(_);const x=this.transform.as??[void 0,void 0];this.transform.as=[x[0]??_.on,x[1]??_.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${kt(this.transform)}`}assemble(){const{regression:p,on:_,...x}=this.transform;return{type:"regression",x:_,y:p,...x}}}class Qx extends Tn{clone(){return new Qx(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}addDimensions(p){this.transform.groupby=Ci((this.transform.groupby??[]).concat(p),_=>_)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${kt(this.transform)}`}assemble(){const{pivot:p,value:_,groupby:x,limit:S,op:A}=this.transform;return{type:"pivot",field:p,value:_,...void 0!==S?{limit:S}:{},...void 0!==A?{op:A}:{},...void 0!==x?{groupby:x}:{}}}}class Xg extends Tn{clone(){return new Xg(null,st(this.transform))}constructor(p,_){super(p),this.transform=_}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${kt(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Yg(d){let p=0;return function _(x,S){if(x instanceof Xd&&!x.isGenerator&&!ka(x.data)&&(d.push(S),S={name:null,source:S.name,transform:[]}),x instanceof ys&&(x.parent instanceof Xd&&!S.source?(S.format={...S.format??{},parse:x.assembleFormatParse()},S.transform.push(...x.assembleTransforms(!0))):S.transform.push(...x.assembleTransforms())),x instanceof oh)return S.name||(S.name="data_"+p++),!S.source||S.transform.length>0?(d.push(S),x.data=S.name):x.data=S.source,void d.push(...x.assemble());switch((x instanceof Gd||x instanceof Up||x instanceof Zd||x instanceof Cl||x instanceof Rp||x instanceof Eb||x instanceof No||x instanceof Yx||x instanceof zg||x instanceof zu||x instanceof Kp||x instanceof Yp||x instanceof Vs||x instanceof Xx||x instanceof Kx||x instanceof Zx||x instanceof sh||x instanceof Xg||x instanceof Qx||x instanceof Xp)&&S.transform.push(x.assemble()),(x instanceof il||x instanceof el||x instanceof Gg||x instanceof Yd||x instanceof qg)&&S.transform.push(...x.assemble()),x instanceof jr&&(S.source&&0===S.transform.length?x.setSource(S.source):x.parent instanceof jr?x.setSource(S.name):(S.name||(S.name="data_"+p++),x.setSource(S.name),1===x.numChildren()&&(d.push(S),S={name:null,source:S.name,transform:[]}))),x.numChildren()){case 0:x instanceof jr&&(!S.source||S.transform.length>0)&&d.push(S);break;case 1:_(x.children[0],S);break;default:{S.name||(S.name="data_"+p++);let A=S.name;!S.source||S.transform.length>0?d.push(S):A=S.source;for(const O of x.children)_(O,{name:null,source:A,transform:[]});break}}}}function XT(d){return"top"===d||"left"===d||Je(d)?"header":"footer"}function YT(d,p){const{facet:_,config:x,child:S,component:A}=d;if(d.channelHasField(p)){const O=_[p],P=kg("title",null,x,p);let B=cp(O,x,{allowDisabling:!0,includeDefault:void 0===P||!!P});S.component.layoutHeaders[p].title&&(B=re.isArray(B)?B.join(", "):B,B+=` / ${S.component.layoutHeaders[p].title}`,S.component.layoutHeaders[p].title=null);const q=kg("labelOrient",O.header,x,p),G=null!==O.header&&ui(O.header?.labels,x.header.labels,!0),ee=St(["bottom","right"],q)?"footer":"header";A.layoutHeaders[p]={title:null!==O.header?B:null,facetFieldDef:O,[ee]:"facet"===p?[]:[KT(d,p,G)]}}}function KT(d,p,_){const x="row"===p?"height":"width";return{labels:_,sizeSignal:d.child.component.layoutSize.get(x)?d.child.getSizeSignalRef(x):void 0,axes:[]}}function Qd(d,p){const{child:_}=d;if(_.component.axes[p]){const{layoutHeaders:x,resolve:S}=d.component;if(S.axis[p]=Ig(S,p),"shared"===S.axis[p]){const A="x"===p?"column":"row",O=x[A];for(const P of _.component.axes[p]){const B=XT(P.get("orient"));O[B]??=[KT(d,A,!1)];const q=rb(P,"main",d.config,{header:!0});q&&O[B][0].axes.push(q),P.mainExtracted=!0}}}}function ew(d){for(const p of d.children)p.parseLayoutSize()}function Zp(d,p){const _=yT(p),x=If(_),S=d.component.resolve,A=d.component.layoutSize;let O;for(const P of d.children){const B=P.component.layoutSize.getWithExplicit(_),q=S.scale[x]??o3(x,d);if("independent"===q&&"step"===B.value){O=void 0;break}if(O){if("independent"===q&&O.value!==B.value){O=void 0;break}O=Qa(O,B,_,"")}else O=B}if(O){for(const P of d.children)d.renameSignal(P.getName(_),d.getName(p)),P.component.layoutSize.set(_,"merged",!1);A.setWithExplicit(p,O)}else A.setWithExplicit(p,{explicit:!1,value:void 0})}function SR(d,p){const x=d.config,S=d.getScaleComponent("width"===p?"x":"y");if(S){const A=S.get("type"),O=S.get("range");if(ko(A)){const P=lo(x.view,p);return ht(O)||Fd(P)?"step":P}return Aa(x.view,p)}if(d.hasProjection||"arc"===d.mark)return Aa(x.view,p);{const A=lo(x.view,p);return Fd(A)?A.step:A}}function qC(d,p,_){return pt(p,{suffix:`by_${pt(d)}`,..._??{}})}class Sb extends Wg{constructor(p,_,x,S){super(p,"facet",_,x,S,p.resolve),ln(this,"facet",void 0),ln(this,"child",void 0),ln(this,"children",void 0),this.child=Jr(p.spec,this,this.getName("child"),void 0,S),this.children=[this.child],this.facet=this.initFacet(p.facet)}initFacet(p){if(!og(p))return{facet:this.initFacetFieldDef(p,"facet")};const _=We(p),x={};for(const S of _){if(![ea,Xl].includes(S)){nt(bo(S,"facet"));break}const A=p[S];if(void 0===A.field){nt(Nr(A,S));break}x[S]=this.initFacetFieldDef(A,S)}return x}initFacetFieldDef(p,_){const x=cg(p,_);return x.header?x.header=_o(x.header):null===x.header&&(x.header=null),x}channelHasField(p){return!!this.facet[p]}fieldDef(p){return this.facet[p]}parseData(){this.component.data=gc(this),this.child.parseData()}parseLayoutSize(){ew(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function Cb(d){for(const p of Zl)YT(d,p);Qd(d,"x"),Qd(d,"y")}(this)}assembleSelectionTopLevelSignals(p){return this.child.assembleSelectionTopLevelSignals(p)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(p){return this.child.assembleSelectionData(p)}getHeaderLayoutMixins(){const p={};for(const _ of Zl)for(const x of Sx){const S=this.component.layoutHeaders[_],A=S[x],{facetFieldDef:O}=S;if(O){const P=kg("titleOrient",O.header,this.config,_);if(["right","bottom"].includes(P)){const B=sb(_,P);p.titleAnchor??={},p.titleAnchor[B]="end"}}if(A?.[0]){const B="header"===x?"headerBand":"footerBand";"facet"!==_&&!this.child.component.layoutSize.get("row"===_?"height":"width")&&(p[B]??={},p[B][_]=.5),S.title&&(p.offset??={},p.offset["row"===_?"rowTitle":"columnTitle"]=10)}}return p}assembleDefaultLayout(){const{column:p,row:_}=this.facet,x=p?this.columnDistinctSignal():_?1:void 0;let S="all";return(!_&&"independent"===this.component.resolve.scale.x||!p&&"independent"===this.component.resolve.scale.y)&&(S="none"),{...this.getHeaderLayoutMixins(),...x?{columns:x}:{},bounds:"full",align:S}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Sb))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(p){return this.parent&&this.parent instanceof Sb?{...this.channelHasField("column")?{encode:{update:{columns:{field:pt(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(p)}:super.assembleGroup(p)}getCardinalityAggregateForChild(){const p=[],_=[],x=[];if(this.child instanceof Sb){if(this.child.channelHasField("column")){const S=pt(this.child.facet.column);p.push(S),_.push("distinct"),x.push(`distinct_${S}`)}}else for(const S of Ql){const A=this.child.component.scales[S];if(A&&!A.merged){const O=A.get("type"),P=A.get("range");if(ko(O)&&ht(P)){const q=NC(Wp(this.child,S));q?(p.push(q),_.push("distinct"),x.push(`distinct_${q}`)):nt(Tr(S))}}}return{fields:p,ops:_,as:x}}assembleFacet(){const{name:p,data:_}=this.component.data.facetRoot,{row:x,column:S}=this.facet,{fields:A,ops:O,as:P}=this.getCardinalityAggregateForChild(),B=[];for(const G of Zl){const ee=this.facet[G];if(ee){B.push(pt(ee));const{bin:se,sort:Ee}=ee;if(sr(se)&&B.push(pt(ee,{binSuffix:"end"})),sa(Ee)){const{field:De,op:Re=ig}=Ee,Le=qC(ee,Ee);x&&S?(A.push(Le),O.push("max"),P.push(Le)):(A.push(De),O.push(Re),P.push(Le))}else if(re.isArray(Ee)){const De=Np(ee,G);A.push(De),O.push("max"),P.push(De)}}}const q=!!x&&!!S;return{name:p,data:_,groupby:B,...q||A.length>0?{aggregate:{...q?{cross:q}:{},...A.length?{fields:A,ops:O,as:P}:{}}}:{}}}facetSortFields(p){const{facet:_}=this,x=_[p];return x?sa(x.sort)?[qC(x,x.sort,{expr:"datum"})]:re.isArray(x.sort)?[Np(x,p,{expr:"datum"})]:[pt(x,{expr:"datum"})]:[]}facetSortOrder(p){const{facet:_}=this,x=_[p];if(x){const{sort:S}=x;return[(sa(S)?S.order:!re.isArray(S)&&S)||"ascending"]}return[]}assembleLabelTitle(){const{facet:p,config:_}=this;if(p.facet)return _T(p.facet,"facet",_);const x={row:["top","bottom"],column:["left","right"]};for(const S of gC)if(p[S]){const A=kg("labelOrient",p[S]?.header,_,S);if(x[S].includes(A))return _T(p[S],S,_)}}assembleMarks(){const{child:p}=this,x=function WC(d){const p=[],_=Yg(p);for(const x of d.children)_(x,{source:d.name,name:null,transform:[]});return p}(this.component.data.facetRoot),S=p.assembleGroupEncodeEntry(!1),A=this.assembleLabelTitle()||p.assembleTitle(),O=p.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...A?{title:A}:{},...O?{style:O}:{},from:{facet:this.assembleFacet()},sort:{field:Zl.map(B=>this.facetSortFields(B)).flat(),order:Zl.map(B=>this.facetSortOrder(B)).flat()},...x.length>0?{data:x}:{},...S?{encode:{update:S}}:{},...p.assembleGroup(cR(this,[]))}]}getMapping(){return this.facet}}function tw(d,p){for(const _ of p){const x=_.data;if(d.name&&_.hasName()&&d.name!==_.dataName)continue;const S=d.format?.mesh,A=x.format?.feature;if(S&&A)continue;const O=d.format?.feature;if((O||A)&&O!==A)continue;const P=x.format?.mesh;if(!S&&!P||S===P)if(Wy(d)&&Wy(x)){if(xr(d.values,x.values))return _}else if(ka(d)&&ka(x)){if(d.url===x.url)return _}else if(ZA(d)&&d.name===_.dataName)return _}return null}function gc(d){let p=function Db(d,p){if(d.data||!d.parent){if(null===d.data){const x=new Xd({values:[]});return p.push(x),x}const _=tw(d.data,p);if(_)return Jf(d.data)||(_.data.format=qi({},d.data.format,_.data.format)),!_.hasName()&&d.data.name&&(_.dataName=d.data.name),_;{const x=new Xd(d.data);return p.push(x),x}}return d.parent.component.data.facetRoot?d.parent.component.data.facetRoot:d.parent.component.data.main}(d,d.component.data.sources);const{outputNodes:_,outputNodeRefCounts:x}=d.component.data,S=d.data,O=S&&(Jf(S)||ka(S)||Wy(S))||!d.parent?new Gc:d.parent.component.data.ancestorParse.clone();Jf(S)?(QA(S)?p=new Up(p,S.sequence):cc(S)&&(p=new Gd(p,S.graticule)),O.parseNothing=!0):null===S?.format?.parse&&(O.parseNothing=!0),p=ys.makeExplicit(p,d,O)??p,p=new sh(p);const P=d.parent&&Hg(d.parent);(uo(d)||mc(d))&&P&&(p=il.makeFromEncoding(p,d)??p),d.transforms.length>0&&(p=function nw(d,p,_){let x=0;for(const S of p.transforms){let A,O;if(sR(S))O=d=new Rp(d,S),A="derived";else if(Vy(S)){const P=ST(S);O=d=ys.makeWithAncestors(d,{},P,_)??d,d=new Cl(d,p,S.filter)}else if(BE(S))O=d=il.makeFromTransform(d,S,p),A="number";else if(zE(S))A="date",void 0===_.getWithExplicit(S.field).value&&(d=new ys(d,{[S.field]:A}),_.set(S.field,A,!1)),O=d=el.makeFromTransform(d,S);else if(VE(S))O=d=No.makeFromTransform(d,S),A="number",nh(p)&&(d=new sh(d));else if(bg(S))O=d=Yx.make(d,p,S,x++),A="derived";else if(oR(S))O=d=new zg(d,S),A="number";else if(e3(S))O=d=new zu(d,S),A="number";else if(qA(S))O=d=Yd.makeFromTransform(d,S),A="derived";else if(ax(S))O=d=new Kp(d,S),A="derived";else if(vp(S))O=d=new Xp(d,S),A="derived";else if(sx(S))O=d=new Yp(d,S),A="derived";else if(rR(S))O=d=new Qx(d,S),A="derived";else if(HA(S))d=new Xg(d,S);else if(WA(S))O=d=Gg.makeFromTransform(d,S),A="derived";else if(LE(S))O=d=new Vs(d,S),A="derived";else if(ox(S))O=d=new Kx(d,S),A="derived";else if(bp(S))O=d=new Zx(d,S),A="derived";else{if(!$E(S)){nt(Eu(S));continue}O=d=new Xx(d,S),A="derived"}if(O&&void 0!==A)for(const P of O.producedFields()??[])_.set(P,A,!1)}return d}(p,d,O));const B=function zx(d){const p={};if(uo(d)&&d.component.selection)for(const _ of We(d.component.selection)){const x=d.component.selection[_];for(const S of x.project.items)!S.channel&&ro(S.field)>1&&(p[S.field]="flatten")}return p}(d),q=DT(d);p=ys.makeWithAncestors(p,{},{...B,...q},O)??p,uo(d)&&(p=qg.parseAll(p,d),p=Eb.parseAll(p,d)),(uo(d)||mc(d))&&(P||(p=il.makeFromEncoding(p,d)??p),p=el.makeFromEncoding(p,d)??p,p=Rp.parseAllForSortIndex(p,d));const G=d.getDataName(Vr.Raw),ee=new jr(p,G,Vr.Raw,x);if(_[G]=ee,p=ee,uo(d)){const Re=No.makeFromEncoding(p,d);Re&&(p=Re,nh(d)&&(p=new sh(p))),p=Gg.makeFromEncoding(p,d)??p,p=Yd.makeFromEncoding(p,d)??p}uo(d)&&(p=Zd.make(p,d)??p);const se=d.getDataName(Vr.Main),Ee=new jr(p,se,Vr.Main,x);_[se]=Ee,p=Ee,uo(d)&&function fT(d,p){for(const[_,x]of Jt(d.component.selection??{})){const S=d.getName(`lookup_${_}`);d.component.data.outputNodes[S]=x.materialized=new jr(new Cl(p,d,{param:_}),S,Vr.Lookup,d.component.data.outputNodeRefCounts)}}(d,Ee);let De=null;if(mc(d)){const Re=d.getName("facet");p=function GC(d,p){const{row:_,column:x}=p;if(_&&x){let S=null;for(const A of[_,x])if(sa(A.sort)){const{field:O,op:P=ig}=A.sort;d=S=new zu(d,{joinaggregate:[{op:P,field:O,as:qC(A,A.sort,{forAs:!0})}],groupby:[pt(A)]})}return S}return null}(p,d.facet)??p,De=new oh(p,d,Re,Ee.getSource()),_[Re]=De}return{...d.component.data,outputNodes:_,outputNodeRefCounts:x,raw:ee,main:Ee,facetRoot:De,ancestorParse:O}}class a3 extends Hu{constructor(p,_,x,S){super(p,"concat",_,x,S,p.resolve),ln(this,"children",void 0),("shared"===p.resolve?.axis?.x||"shared"===p.resolve?.axis?.y)&&nt("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(p).map((A,O)=>Jr(A,this,this.getName(`concat_${O}`),void 0,S))}parseData(){this.component.data=gc(this);for(const p of this.children)p.parseData()}parseSelections(){this.component.selection={};for(const p of this.children){p.parseSelections();for(const _ of We(p.component.selection))this.component.selection[_]=p.component.selection[_]}}parseMarkGroup(){for(const p of this.children)p.parseMarkGroup()}parseAxesAndHeaders(){for(const p of this.children)p.parseAxesAndHeaders()}getChildren(p){return mg(p)?p.vconcat:Oy(p)?p.hconcat:p.concat}parseLayoutSize(){!function ER(d){ew(d);const _=void 0===d.layout.columns?"height":"childHeight";Zp(d,1===d.layout.columns?"width":"childWidth"),Zp(d,_)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(p){return this.children.reduce((_,x)=>x.assembleSelectionTopLevelSignals(_),p)}assembleSignals(){return this.children.forEach(p=>p.assembleSignals()),[]}assembleLayoutSignals(){const p=cb(this);for(const _ of this.children)p.push(..._.assembleLayoutSignals());return p}assembleSelectionData(p){return this.children.reduce((_,x)=>x.assembleSelectionData(_),p)}assembleMarks(){return this.children.map(p=>{const _=p.assembleTitle(),x=p.assembleGroupStyle(),S=p.assembleGroupEncodeEntry(!1);return{type:"group",name:p.getName("group"),..._?{title:_}:{},...x?{style:x}:{},...S?{encode:{update:S}}:{},...p.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const p=this.layout.columns;return{...null!=p?{columns:p}:{},bounds:"full",align:"each"}}}const MR={disable:1,gridScale:1,scale:1,...Ou,labelExpr:1,encode:1},Mb=We(MR);class iw extends Za{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(),this.explicit=p,this.implicit=_,this.mainExtracted=x}clone(){return new iw(st(this.explicit),st(this.implicit),this.mainExtracted)}hasAxisPart(p){return"axis"===p||("grid"===p||"title"===p?!!this.get(p):!function DR(d){return!1===d||null===d}(this.get(p)))}hasOrientSignalRef(){return Je(this.explicit.orient)}}const ow={bottom:"top",top:"bottom",left:"right",right:"left"};function XC(d,p){if(!d)return p.map(_=>_.clone());{if(d.length!==p.length)return;const _=d.length;for(let x=0;x<_;x++){const S=d[x],A=p[x];if(!!S!=!!A)return;if(S&&A){const O=S.getWithExplicit("orient"),P=A.getWithExplicit("orient");if(O.explicit&&P.explicit&&O.value!==P.value)return;d[x]=QT(S,A)}}}return d}function QT(d,p){for(const _ of Mb){const x=Qa(d.getWithExplicit(_),p.getWithExplicit(_),_,"axis",(S,A)=>{switch(_){case"title":return BM(S,A);case"gridScale":return{explicit:S.explicit,value:ui(S.value,A.value)}}return Pu(S,A,_,"axis")});d.setWithExplicit(_,x)}return d}function Wu(d,p,_,x,S){if("disable"===p)return void 0!==_;switch(_=_||{},p){case"titleAngle":case"labelAngle":return d===(Je(_.labelAngle)?_.labelAngle:$i(_.labelAngle));case"values":return!!_.values;case"encode":return!!_.encoding||!!_.labelAngle;case"title":if(d===Op(x,S))return!0}return d===_[p]}const Dl=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function JT(d,p){let _=p.axis(d);const x=new iw,S=Oo(p.encoding[d]),{mark:A,config:O}=p,P=_?.orient||O["x"===d?"axisX":"axisY"]?.orient||O.axis?.orient||function pC(d){return"x"===d?"bottom":"left"}(d),B=p.getScaleComponent(d).get("type"),q=function cC(d,p,_,x){const S="band"===p?["axisDiscrete","axisBand"]:"point"===p?["axisDiscrete","axisPoint"]:uy(p)?["axisQuantitative"]:"time"===p||"utc"===p?["axisTemporal"]:[],A="x"===d?"axisX":"axisY",O=Je(_)?"axisOrient":`axis${Mo(_)}`,P=[...S,...S.map(q=>A+q.substr(4))],B=["axis",O,A];return{vlOnlyAxisConfig:yx(P,x,d,_),vgAxisConfig:yx(B,x,d,_),axisConfigStyle:uC([...B,...P],x)}}(d,B,P,p.config),G=void 0!==_?!_:bx("disable",O.style,_?.style,q).configValue;if(x.set("disable",G,void 0!==_),G)return x;_=_||{};const ee=function xx(d,p,_,x,S){const A=p?.labelAngle;if(void 0!==A)return Je(A)?A:$i(A);{const{configValue:O}=bx("labelAngle",x,p?.style,S);return void 0!==O?$i(O):_!==Ri||!St([wv,Os],d.type)||dt(d)&&d.timeUnit?void 0:270}}(S,_,d,O.style,q),se=gy(_.formatType,S,B),Ee=Hf(S,S.type,_.format,_.formatType,O,!0),De={fieldOrDatumDef:S,axis:_,channel:d,model:p,scaleType:B,orient:P,labelAngle:ee,format:Ee,formatType:se,mark:A,config:O};for(const Ye of Mb){const bt=Ye in dC?dC[Ye](De):wy(Ye)?_[Ye]:void 0,kn=void 0!==bt,dn=Wu(bt,Ye,_,p,d);if(kn&&dn)x.set(Ye,bt,dn);else{const{configValue:vi,configFrom:lr}=wy(Ye)&&"values"!==Ye?bx(Ye,O.style,_.style,q):{},ca=void 0!==vi;kn&&!ca?x.set(Ye,bt,dn):("vgAxisConfig"!==lr||Dl.has(Ye)&&ca||Xf(vi)||Je(vi))&&x.set(Ye,vi,!1)}}const Re=_.encoding??{},Le=yE.reduce((Ye,bt)=>{if(!x.hasAxisPart(bt))return Ye;const kn=Ax(Re[bt]??{},p),dn="labels"===bt?function rw(d,p,_){const{encoding:x,config:S}=d,A=Oo(x[p])??Oo(x[Or(p)]),O=d.axis(p)||{},{format:P,formatType:B}=O;if(Uc(B))return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:P,formatType:B,config:S}),..._};if(void 0===P&&void 0===B&&S.customFormatTypes){if("quantitative"===Qr(A)){if(Dd(A)&&"normalize"===A.stack&&S.normalizedNumberFormatType)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.normalizedNumberFormat,formatType:S.normalizedNumberFormatType,config:S}),..._};if(S.numberFormatType)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.numberFormat,formatType:S.numberFormatType,config:S}),..._}}if("temporal"===Qr(A)&&S.timeFormatType&&dt(A)&&!A.timeUnit)return{text:Ns({fieldOrDatumDef:A,field:"datum.value",format:S.timeFormat,formatType:S.timeFormatType,config:S}),..._}}return _}(p,d,kn):kn;return void 0!==dn&&!Gt(dn)&&(Ye[bt]={update:dn}),Ye},{});return Gt(Le)||x.set("encode",Le,!!_.encoding||void 0!==_.labelAngle),x}function Jp(d,p){const{config:_}=d;return{..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d),...gs("angle",d),...Jd(d,0,p)}}function Jd(d,p,_){return _?{shape:{value:_}}:gs("shape",d)}function QC(d,p,_){if(void 0===Ji("align",d,_))return"center"}function kb(d,p,_){if(void 0===Ji("baseline",d,_))return"middle"}function Qg(d){const{config:p,markDef:_}=d,{orient:x}=_,S="horizontal"===x?"width":"height",A=d.getScaleComponent("horizontal"===x?"x":"y"),O=Ji("size",_,p,{vgChannel:S})??p.tick.bandSize;if(void 0!==O)return O;{const P=A?A.get("range"):void 0;return P&&ht(P)&&re.isNumber(P.step)?3*P.step/4:3*pr(p.view,S)/4}}const Ur={arc:{vgMark:"arc",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...El(d,"radius"),...El(d,"theta")})},area:{vgMark:"area",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...$u("x",d,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===d.markDef.orient}),...$u("y",d,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===d.markDef.orient}),...Sg(d)})},bar:{vgMark:"rect",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y")})},circle:{vgMark:"symbol",encodeEntry:d=>Jp(d,"circle")},geoshape:{vgMark:"shape",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:d=>{const{encoding:p}=d,_=p.shape;return[{type:"geoshape",projection:d.projectionName(),..._&&dt(_)&&_.type===Sa?{field:pt(_,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y"),...KE(d,"url")})},line:{vgMark:"line",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d,{vgChannel:"strokeWidth"}),...Sg(d)})},point:{vgMark:"symbol",encodeEntry:d=>Jp(d)},rect:{vgMark:"rect",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...El(d,"x"),...El(d,"y")})},rule:{vgMark:"rule",encodeEntry:d=>{const{markDef:p}=d,_=p.orient;return d.encoding.x||d.encoding.y||d.encoding.latitude||d.encoding.longitude?{..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...$u("x",d,{defaultPos:"horizontal"===_?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==_}),...$u("y",d,{defaultPos:"vertical"===_?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==_}),...gs("size",d,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:d=>Jp(d,"square")},text:{vgMark:"text",encodeEntry:d=>{const{config:p,encoding:_}=d;return{..._s(d,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...KE(d),...gs("size",d,{vgChannel:"fontSize"}),...gs("angle",d),...aT("align",QC(d.markDef,0,p)),...aT("baseline",kb(d.markDef,0,p)),...Ia("radius",d,{defaultPos:null}),...Ia("theta",d,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:d=>{const{config:p,markDef:_}=d,x=_.orient,S="horizontal"===x?"width":"height",A="horizontal"===x?"height":"width";return{..._s(d,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid",vgChannel:"xc"}),...Ia("y",d,{defaultPos:"mid",vgChannel:"yc"}),...gs("size",d,{defaultValue:Qg(d),vgChannel:S}),[A]:Ar(Ji("thickness",_,p))}}},trail:{vgMark:"trail",encodeEntry:d=>({..._s(d,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Ia("x",d,{defaultPos:"mid"}),...Ia("y",d,{defaultPos:"mid"}),...gs("size",d),...Sg(d)})}};function hh(d){if(St([wd,xd,H2],d.mark)){const p=Od(d.mark,d.encoding);if(p.length>0)return function rl(d,p){return[{name:d.getName("pathgroup"),type:"group",from:{facet:{name:_c+d.requestDataName(Vr.Main),data:d.requestDataName(Vr.Main),groupby:p}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Ib(d,{fromPrefix:_c})}]}(d,p)}else if(d.mark===_l){const p=rv.some(_=>Ji(_,d.markDef,d.config));if(d.stack&&!d.fieldDef("size")&&p)return function en(d){const[p]=Ib(d,{fromPrefix:cw}),_=d.scaleName(d.stack.fieldChannel),x=function(){return d.vgField(d.stack.fieldChannel,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},S=(q,G)=>`${q}(${[x({prefix:"min",suffix:"start",expr:G}),x({prefix:"max",suffix:"start",expr:G}),x({prefix:"min",suffix:"end",expr:G}),x({prefix:"max",suffix:"end",expr:G})].map(se=>`scale('${_}',${se})`).join(",")})`;let A,O;"x"===d.stack.fieldChannel?(A={...Sn(p.encode.update,["y","yc","y2","height",...rv]),x:{signal:S("min","datum")},x2:{signal:S("max","datum")},clip:{value:!0}},O={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},p.encode.update={...yt(p.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(A={...Sn(p.encode.update,["x","xc","x2","width"]),y:{signal:S("min","datum")},y2:{signal:S("max","datum")},clip:{value:!0}},O={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},p.encode.update={...yt(p.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const q of rv){const G=xu(q,d.markDef,d.config);p.encode.update[q]?(A[q]=p.encode.update[q],delete p.encode.update[q]):G&&(A[q]=Ar(G)),G&&(p.encode.update[q]={value:0})}const P=[];if(d.stack.groupbyChannels?.length>0)for(const q of d.stack.groupbyChannels){const G=d.fieldDef(q),ee=pt(G);ee&&P.push(ee),(G?.bin||G?.timeUnit)&&P.push(pt(G,{binSuffix:"end"}))}return A=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((q,G)=>{if(p.encode.update[G])return{...q,[G]:p.encode.update[G]};{const ee=xu(G,d.markDef,d.config);return void 0!==ee?{...q,[G]:Ar(ee)}:q}},A),A.stroke&&(A.strokeForeground={value:!0},A.strokeOffset={value:0}),[{type:"group",from:{facet:{data:d.requestDataName(Vr.Main),name:cw+d.requestDataName(Vr.Main),groupby:P,aggregate:{fields:[x({suffix:"start"}),x({suffix:"start"}),x({suffix:"end"}),x({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:A},marks:[{type:"group",encode:{update:O},marks:[p]}]}]}(d)}return Ib(d)}const _c="faceted_path_";const cw="stack_group_";function Ib(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""};const{mark:_,markDef:x,encoding:S,config:A}=d,O=ui(x.clip,function Jg(d){const p=d.getScaleComponent("x"),_=d.getScaleComponent("y");return!(!p?.get("selectionExtent")&&!_?.get("selectionExtent"))||void 0}(d),function e_(d){const p=d.component.projection;return!(!p||p.isFit)||void 0}(d)),P=F1(x),B=S.key,q=function JC(d){const{encoding:p,stack:_,mark:x,markDef:S,config:A}=d,O=p.order;if(!(!re.isArray(O)&&Ma(O)&&$t(O.value)||!O&&$t(Ji("order",S,A)))){if((re.isArray(O)||dt(O))&&!_)return LM(O,{expr:"datum"});if(yl(x)){const P="horizontal"===S.orient?"y":"x",B=p[P];if(dt(B)){const q=B.sort;return re.isArray(q)?{field:pt(B,{prefix:P,suffix:"sort_index",expr:"datum"})}:sa(q)?{field:pt({aggregate:vE(d.encoding)?q.op:void 0,field:q.field},{expr:"datum"})}:dE(q)?{field:pt(d.fieldDef(q.encoding),{expr:"datum"}),order:q.order}:null===q?void 0:{field:pt(B,{binSuffix:d.stack?.impute?"mid":void 0,expr:"datum"})}}return}}}(d),G=function Xi(d){if(!d.component.selection)return null;const p=We(d.component.selection).length;let _=p,x=d.parent;for(;x&&0===_;)_=We(x.component.selection).length,x=x.parent;return _?{interactive:p>0||"geoshape"===d.mark||!!d.encoding.tooltip}:null}(d),ee=Ji("aria",x,A),se=Ur[_].postEncodingTransform?Ur[_].postEncodingTransform(d):null;return[{name:d.getName("marks"),type:Ur[_].vgMark,...O?{clip:!0}:{},...P?{style:P}:{},...B?{key:B.field}:{},...q?{sort:q}:{},...G||{},...!1===ee?{aria:ee}:{},from:{data:p.fromPrefix+d.requestDataName(Vr.Main)},encode:{update:Ur[_].encodeEntry(d)},...se?{transform:se}:{}}]}class uw extends Wg{constructor(p,_,x){let S=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},A=arguments.length>4?arguments[4]:void 0;super(p,"unit",_,x,A,void 0,Ry(p)?p.view:void 0),ln(this,"markDef",void 0),ln(this,"encoding",void 0),ln(this,"specifiedScales",{}),ln(this,"stack",void 0),ln(this,"specifiedAxes",{}),ln(this,"specifiedLegends",{}),ln(this,"specifiedProjection",{}),ln(this,"selection",[]),ln(this,"children",[]);const O=Du(p.mark)?{...p.mark}:{type:p.mark},P=O.type;void 0===O.filled&&(O.filled=function PE(d,p,_){let{graticule:x}=_;if(x)return!1;const S=xu("filled",d,p),A=d.type;return ui(S,A!==np&&A!==wd&&A!==Su)}(O,A,{graticule:p.data&&cc(p.data)}));const B=this.encoding=function ug(d,p,_,x){const S={};for(const A of We(d))hl(A)||nt(Is(A));for(let A of wa){if(!d[A])continue;const O=d[A];if(us(A)){const P=ja(A),B=S[P];if(dt(B)&&V2(B.type)&&dt(O)&&!B.timeUnit){nt(Yh(P));continue}}if("angle"===A&&"arc"===p&&!d.theta&&(nt("Arc marks uses theta channel rather than angle, replacing angle with theta."),A=As),yA(d,A,p))if(A===He&&"line"===p&&ku(d[A])?.aggregate)nt("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");else if(A===be&&(_?"fill"in d:"stroke"in d))nt(Gm("encoding",{fill:"fill"in d,stroke:"stroke"in d}));else if(A===X0||A===Kl&&!re.isArray(O)&&!Ma(O)||A===W_&&re.isArray(O)){if(O){if(A===Kl){const P=d[A];if(Rv(P)){S[A]=P;continue}}S[A]=re.array(O).reduce((P,B)=>(dt(B)?P.push(cg(B,A)):nt(Nr(B,A)),P),[])}}else{if(A===W_&&null===O)S[A]=null;else if(!(dt(O)||Sd(O)||Ma(O)||hE(O)||Je(O))){nt(Nr(O,A));continue}S[A]=mA(O,A,x)}else nt(bo(A,p))}return S}(p.encoding||{},P,O.filled,A);this.markDef=FE(O,B,A),this.size=function Kg(d){let{encoding:p,size:_}=d;for(const x of Ql){const S=Mr(x);Fd(_[S])&&Wc(p[x])&&(delete _[S],nt(GM(S)))}return _}({encoding:B,size:Ry(p)?{...S,...p.width?{width:p.width}:{},...p.height?{height:p.height}:{}}:S}),this.stack=LA(this.markDef,B),this.specifiedScales=this.initScales(P,B),this.specifiedAxes=this.initAxes(B),this.specifiedLegends=this.initLegends(B),this.specifiedProjection=p.projection,this.selection=(p.params??[]).filter(q=>AA(q))}get hasProjection(){const{encoding:p}=this,_=this.mark===Jm,x=p&&CM.some(S=>Bn(p[S]));return _||x}scaleDomain(p){const _=this.specifiedScales[p];return _?_.domain:void 0}axis(p){return this.specifiedAxes[p]}legend(p){return this.specifiedLegends[p]}initScales(p,_){return ev.reduce((x,S)=>{const A=Oo(_[S]);return A&&(x[S]=this.initScale(A.scale??{})),x},{})}initScale(p){const{domain:_,range:x}=p,S=_o(p);return re.isArray(_)&&(S.domain=_.map(Ha)),re.isArray(x)&&(S.range=x.map(Ha)),S}initAxes(p){return Ql.reduce((_,x)=>{const S=p[x];if(Bn(S)||x===Ri&&Bn(p.x2)||x===mo&&Bn(p.y2)){const A=Bn(S)?S.axis:void 0;_[x]=A&&this.initAxis({...A})}return _},{})}initAxis(p){const _=We(p),x={};for(const S of _){const A=p[S];x[S]=Xf(A)?RM(A):Ha(A)}return x}initLegends(p){return N1.reduce((_,x)=>{const S=Oo(p[x]);if(S&&function Of(d){switch(d){case be:case Se:case Fe:case He:case ye:case _e:case Ts:case Hh:return!0;case nn:case gi:case lt:return!1}}(x)){const A=S.legend;_[x]=A&&_o(A)}return _},{})}parseData(){this.component.data=gc(this)}parseLayoutSize(){!function CR(d){const{size:p,component:_}=d;for(const x of Ql){const S=Mr(x);if(p[S]){const A=p[S];_.layoutSize.set(S,Fd(A)?"step":A,!0)}else{const A=SR(d,S);_.layoutSize.set(S,A,!1)}}}(this)}parseSelections(){this.component.selection=function oC(d,p){const _={},x=d.config.selection;if(!p||!p.length)return _;for(const S of p){const A=hn(S.name),O=S.select,P=re.isString(O)?O:O.type,B=re.isObject(O)?st(O):{type:P},q=x[P];for(const se in q)"fields"===se||"encodings"===se||("mark"===se&&(B[se]={...q[se],...B[se]}),(void 0===B[se]||!0===B[se])&&(B[se]=st(q[se]??B[se])));const G=_[A]={...B,name:A,type:P,init:S.value,bind:S.bind,events:re.isString(B.on)?re.parseSelector(B.on,"scope"):re.array(st(B.on))},ee=st(S);for(const se of gx)se.defined(G)&&se.parse&&se.parse(d,G,ee)}return _}(this,this.selection)}parseMarkGroup(){this.component.mark=hh(this)}parseAxesAndHeaders(){this.component.axes=function Fo(d){return Ql.reduce((p,_)=>(d.component.scales[_]&&(p[_]=[JT(_,d)]),p),{})}(this)}assembleSelectionTopLevelSignals(p){return function JA(d,p){let _=!1;for(const x of Dn(d.component.selection??{})){const S=x.name,A=re.stringValue(S+Hd);if(0===p.filter(P=>P.name===S).length){const B="point"===x.type?", true, true)":")";p.push({name:x.name,update:`${fR}(${A}, ${re.stringValue("global"===x.resolve?"union":x.resolve)}${B}`})}_=!0;for(const P of gx)P.defined(x)&&P.topLevelSignals&&(p=P.topLevelSignals(d,x,p))}return _&&0===p.filter(S=>"unit"===S.name).length&&p.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),Lu(p)}(this,p)}assembleSignals(){return[...Tg(this),...lR(this,[])]}assembleSelectionData(p){return function vg(d,p){const _=[...p],x=kp(d,{escape:!1});for(const S of Dn(d.component.selection??{})){const A={name:S.name+Hd};if(S.project.hasSelectionId&&(A.transform=[{type:"collect",sort:{field:Ya}}]),S.init){const P=S.project.items.map(HE);A.values=S.init.map(S.project.hasSelectionId?B=>({unit:x,[Ya]:eh(B,!1)[0]}):B=>({unit:x,fields:P,values:eh(B,!1)}))}_.filter(P=>P.name===S.name+Hd).length||_.push(A)}return _}(this,p)}assembleLayout(){return null}assembleLayoutSignals(){return cb(this)}assembleMarks(){let p=this.component.mark??[];return(!this.parent||!Hg(this.parent))&&(p=WE(this,p)),p.map(this.correctDataNames)}assembleGroupStyle(){const{style:p}=this.view||{};return void 0!==p?p:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(p){return xo(this.encoding,p)}fieldDef(p){return ku(this.encoding[p])}typedFieldDef(p){const _=this.fieldDef(p);return Yo(_)?_:null}}class eS extends Hu{constructor(p,_,x,S,A){super(p,"layer",_,x,A,p.resolve,p.view),ln(this,"children",void 0);const O={...S,...p.width?{width:p.width}:{},...p.height?{height:p.height}:{}};this.children=p.layer.map((P,B)=>{if(_p(P))return new eS(P,this,this.getName(`layer_${B}`),O,A);if(vl(P))return new uw(P,this,this.getName(`layer_${B}`),O,A);throw new Error(ov(P))})}parseData(){this.component.data=gc(this);for(const p of this.children)p.parseData()}parseLayoutSize(){!function ZT(d){ew(d),Zp(d,"width"),Zp(d,"height")}(this)}parseSelections(){this.component.selection={};for(const p of this.children){p.parseSelections();for(const _ of We(p.component.selection))this.component.selection[_]=p.component.selection[_]}}parseMarkGroup(){for(const p of this.children)p.parseMarkGroup()}parseAxesAndHeaders(){!function Ab(d){const{axes:p,resolve:_}=d.component,x={top:0,bottom:0,right:0,left:0};for(const S of d.children){S.parseAxesAndHeaders();for(const A of We(S.component.axes))_.axis[A]=Ig(d.component.resolve,A),"shared"===_.axis[A]&&(p[A]=XC(p[A],S.component.axes[A]),p[A]||(_.axis[A]="independent",delete p[A]))}for(const S of Ql){for(const A of d.children)if(A.component.axes[S]){if("independent"===_.axis[S]){p[S]=(p[S]??[]).concat(A.component.axes[S]);for(const O of A.component.axes[S]){const{value:P,explicit:B}=O.getWithExplicit("orient");if(!Je(P)){if(x[P]>0&&!B){const q=ow[P];x[P]>x[q]&&O.set("orient",q,!1)}x[P]++}}}delete A.component.axes[S]}if("independent"===_.axis[S]&&p[S]&&p[S].length>1)for(const[A,O]of(p[S]||[]).entries())A>0&&O.get("grid")&&!O.explicit.grid&&(O.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(p){return this.children.reduce((_,x)=>x.assembleSelectionTopLevelSignals(_),p)}assembleSignals(){return this.children.reduce((p,_)=>p.concat(_.assembleSignals()),Tg(this))}assembleLayoutSignals(){return this.children.reduce((p,_)=>p.concat(_.assembleLayoutSignals()),cb(this))}assembleSelectionData(p){return this.children.reduce((_,x)=>x.assembleSelectionData(_),p)}assembleGroupStyle(){const p=new Set;for(const x of this.children)for(const S of re.array(x.assembleGroupStyle()))p.add(S);const _=Array.from(p);return _.length>1?_:1===_.length?_[0]:void 0}assembleTitle(){let p=super.assembleTitle();if(p)return p;for(const _ of this.children)if(p=_.assembleTitle(),p)return p}assembleLayout(){return null}assembleMarks(){return function cx(d,p){for(const _ of d.children)uo(_)&&(p=WE(_,p));return p}(this,this.children.flatMap(p=>p.assembleMarks()))}assembleLegends(){return this.children.reduce((p,_)=>p.concat(_.assembleLegends()),rh(this))}}function Jr(d,p,_,x,S){if(_y(d))return new Sb(d,p,_,S);if(_p(d))return new eS(d,p,_,x,S);if(vl(d))return new uw(d,p,_,x,S);if(function TA(d){return mg(d)||Oy(d)||ME(d)}(d))return new a3(d,p,_,S);throw new Error(ov(d))}function t_(d,p,_,x){const S=x.component.layoutSize.get("width"),A=x.component.layoutSize.get("height");if(void 0===p?(p={type:"pad"},x.hasAxisOrientSignalRef()&&(p.resize=!0)):re.isString(p)&&(p={type:p}),S&&A&&function Bd(d){return"fit"===d||"fit-x"===d||"fit-y"===d}(p.type))if("step"===S&&"step"===A)nt(UM()),p.type="pad";else if("step"===S||"step"===A){const O="step"===S?"width":"height";nt(UM(If(O))),p.type=function aR(d){return d?`fit-${If(d)}`:"fit"}("width"===O?"height":"width")}return{...1===We(p).length&&p.type?"pad"===p.type?{}:{autosize:p.type}:{autosize:p},...Hy(_,!1),...Hy(d,!0)}}function ef(d,p){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},x=arguments.length>3?arguments[3]:void 0;const S=d.config?IA(d.config):void 0,A=[].concat(d.assembleSelectionData([]),function Jx(d,p){const _=[],x=Yg(_);let S=0;for(const O of d.sources){O.hasName()||(O.dataName="source_"+S++);const P=O.assemble();x(O,P)}for(const O of _)0===O.transform.length&&delete O.transform;let A=0;for(const[O,P]of _.entries())0===(P.transform??[]).length&&!P.source&&_.splice(A++,0,_.splice(O,1)[0]);for(const O of _)for(const P of O.transform??[])"lookup"===P.type&&(P.from=d.outputNodes[P.from].getSource());for(const O of _)O.name in p&&(O.values=p[O.name]);return _}(d.component.data,_)),O=d.assembleProjections(),P=d.assembleTitle(),B=d.assembleGroupStyle(),q=d.assembleGroupEncodeEntry(!0);let G=d.assembleLayoutSignals();G=G.filter(Ee=>"width"!==Ee.name&&"height"!==Ee.name||void 0===Ee.value||(p[Ee.name]=+Ee.value,!1));const{params:ee,...se}=p;return{$schema:"https://vega.github.io/schema/vega/v5.json",...d.description?{description:d.description}:{},...se,...P?{title:P}:{},...B?{style:B}:{},...q?{encode:{update:q}}:{},data:A,...O.length>0?{projections:O}:{},...d.assembleGroup([...G,...d.assembleSelectionTopLevelSignals([]),...pg(ee)]),...S?{config:S}:{},...x?{usermeta:x}:{}}}Ct.accessPathDepth=ro,Ct.accessPathWithDatum=Js,Ct.compile=function ph(d){let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.logger&&function oy(d){return Xm=d,Xm}(p.logger),p.fieldTitle&&Gf(p.fieldTitle);try{const _=kE(re.mergeConfig(p.config,d.config)),x=YA(d,_),S=Jr(x,null,"",void 0,_);return S.parse(),function _R(d,p){jg(d.sources);let _=0,x=0;for(let S=0;S{"use strict";function Ct(ae,be,Se){return ae.fields=be||[],ae.fname=Se,ae}function re(ae){return null==ae?null:ae.fname}function Ii(ae){return null==ae?null:ae.fields}function sn(ae){return 1===ae.length?yi(ae[0]):Zn(ae)}tn.d(Ds,{$G:()=>Ho,$m:()=>Ri,BB:()=>Rc,Ds:()=>Vo,Dw:()=>St,EP:()=>Rt,FP:()=>wr,HD:()=>Wn,He:()=>At,Hq:()=>Li,IX:()=>Gt,J_:()=>$i,Jy:()=>ea,Kj:()=>xr,Kn:()=>ti,N3:()=>Oi,Oj:()=>Ii,QA:()=>Ot,Rg:()=>It,TS:()=>mo,TW:()=>vr,We:()=>ci,XW:()=>ls,Xr:()=>va,ZE:()=>Ct,ZU:()=>As,Zw:()=>qi,_k:()=>oi,a9:()=>Js,ay:()=>Ci,bM:()=>si,bV:()=>Qi,cG:()=>zo,dH:()=>fr,dI:()=>jo,el:()=>re,fE:()=>fe,fj:()=>ot,hj:()=>po,iL:()=>Be,id:()=>On,j2:()=>hn,jj:()=>dr,jn:()=>Uo,k:()=>Gr,kI:()=>Zi,kJ:()=>ei,kX:()=>N,kg:()=>Xr,l$:()=>We,l7:()=>Mi,m8:()=>Qn,mJ:()=>li,mK:()=>no,mS:()=>an,mf:()=>Dn,nr:()=>ro,qu:()=>Hi,rx:()=>Wi,sw:()=>Ao,t7:()=>Xl,u5:()=>cs,uU:()=>Br,vU:()=>Xt,vk:()=>Oc,yP:()=>Yl,yR:()=>Ut,yb:()=>ai,yl:()=>Ms});const yi=ae=>function(be){return be[ae]},Zn=ae=>{const be=ae.length;return function(Se){for(let Fe=0;Felt&&gi(),ye=lt=_e+1):"]"===nn&&(ye||Xt("Access path missing open bracket: "+ae),ye>0&&gi(),ye=0,lt=_e+1):_e>lt?gi():lt=_e+1}return ye&&Xt("Access path missing closing bracket: "+ae),Fe&&Xt("Access path missing closing quote: "+ae),_e>lt&&(_e++,gi()),be}function Rt(ae,be,Se){const Fe=oi(ae);return ae=1===Fe.length?Fe[0]:ae,Ct((Se&&Se.get||sn)(Fe),[ae],be||ae)}const On=Rt("id"),Ut=Ct(ae=>ae,[],"identity"),si=Ct(()=>0,[],"zero"),N=Ct(()=>1,[],"one"),ai=Ct(()=>!0,[],"true"),Gr=Ct(()=>!1,[],"false");function Yt(ae,be,Se){const Fe=[be].concat([].slice.call(Se));console[ae].apply(console,Fe)}const Li=0,dr=1,Br=2,Zi=3,zo=4;function Xr(ae,be){let Se=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yt,Fe=ae||Li;return{level(ye){return arguments.length?(Fe=+ye,this):Fe},error(){return Fe>=dr&&Se(be||"error","ERROR",arguments),this},warn(){return Fe>=Br&&Se(be||"warn","WARN",arguments),this},info(){return Fe>=Zi&&Se(be||"log","INFO",arguments),this},debug(){return Fe>=zo&&Se(be||"log","DEBUG",arguments),this}}}var ei=Array.isArray;function ti(ae){return ae===Object(ae)}const he=ae=>"__proto__"!==ae;function fe(){for(var ae=arguments.length,be=new Array(ae),Se=0;Se{for(const He in ye)"signals"===He?Fe.signals=Qe(Fe.signals,ye.signals):Be(Fe,He,ye[He],"legend"===He?{layout:1}:"style"===He||null);return Fe},{})}function Be(ae,be,Se,Fe){if(!he(be))return;let ye,He;if(ti(Se)&&!ei(Se))for(ye in He=ti(ae[be])?ae[be]:ae[be]={},Se)Fe&&(!0===Fe||Fe[ye])?Be(He,ye,Se[ye]):he(ye)&&(He[ye]=Se[ye]);else ae[be]=Se}function Qe(ae,be){if(null==ae)return be;const Se={},Fe=[];function ye(He){Se[He.name]||(Se[He.name]=1,Fe.push(He))}return be.forEach(ye),ae.forEach(ye),Fe}function ot(ae){return ae[ae.length-1]}function At(ae){return null==ae||""===ae?null:+ae}const st=ae=>be=>ae*Math.exp(be),Fn=ae=>be=>Math.log(ae*be),Sn=ae=>be=>Math.sign(be)*Math.log1p(Math.abs(be/ae)),yt=ae=>be=>Math.sign(be)*Math.expm1(Math.abs(be))*ae,kt=ae=>be=>be<0?-Math.pow(-be,ae):Math.pow(be,ae);function $t(ae,be,Se,Fe){const ye=Se(ae[0]),He=Se(ot(ae)),lt=(He-ye)*be;return[Fe(ye-lt),Fe(He-lt)]}function St(ae,be){return $t(ae,be,At,Ut)}function li(ae,be){var Se=Math.sign(ae[0]);return $t(ae,be,Fn(Se),st(Se))}function Ot(ae,be,Se){return $t(ae,be,kt(Se),kt(1/Se))}function qi(ae,be,Se){return $t(ae,be,Sn(Se),yt(Se))}function zr(ae,be,Se,Fe,ye){const He=Fe(ae[0]),lt=Fe(ot(ae)),_e=null!=be?Fe(be):(He+lt)/2;return[ye(_e+(He-_e)*Se),ye(_e+(lt-_e)*Se)]}function Ci(ae,be,Se){return zr(ae,be,Se,At,Ut)}function fr(ae,be,Se){const Fe=Math.sign(ae[0]);return zr(ae,be,Se,Fn(Fe),st(Fe))}function no(ae,be,Se,Fe){return zr(ae,be,Se,kt(Fe),kt(1/Fe))}function Qi(ae,be,Se,Fe){return zr(ae,be,Se,Sn(Fe),yt(Fe))}function an(ae){return 1+~~(new Date(ae).getMonth()/3)}function Oi(ae){return 1+~~(new Date(ae).getUTCMonth()/3)}function Gt(ae){return null!=ae?ei(ae)?ae:[ae]:[]}function We(ae,be,Se){let He,Fe=ae[0],ye=ae[1];return ye=Se-be?[be,Se]:[Fe=Math.min(Math.max(Fe,be),Se-He),Fe+He]}function Dn(ae){return"function"==typeof ae}const Jt="descending";function Hi(ae,be,Se){Se=Se||{},be=Gt(be)||[];const Fe=[],ye=[],He={},lt=Se.comparator||io;return Gt(ae).forEach((_e,nn)=>{null!=_e&&(Fe.push(be[nn]===Jt?-1:1),ye.push(_e=Dn(_e)?_e:Rt(_e,null,Se)),(Ii(_e)||[]).forEach(gi=>He[gi]=1))}),0===ye.length?null:Ct(lt(ye,Fe),Object.keys(He))}const hn=(ae,be)=>(aebe||null==be)&&null!=ae?1:(be=be instanceof Date?+be:be,(ae=ae instanceof Date?+ae:ae)!==ae&&be==be?-1:be!=be&&ae==ae?1:0),io=(ae,be)=>1===ae.length?xn(ae[0],be[0]):Mo(ae,be,ae.length),xn=(ae,be)=>function(Se,Fe){return hn(ae(Se),ae(Fe))*be},Mo=(ae,be,Se)=>(be.push(0),function(Fe,ye){let He,lt=0,_e=-1;for(;0===lt&&++_eae}function Vo(ae,be){let Se;return Fe=>{Se&&clearTimeout(Se),Se=setTimeout(()=>(be(Fe),Se=null),ae)}}function Mi(ae){for(let be,Se,Fe=1,ye=arguments.length;Felt&&(lt=ye))}else{for(ye=be(ae[Se]);Selt&&(lt=ye))}return[He,lt]}function jo(ae,be){const Se=ae.length;let ye,He,lt,_e,nn,Fe=-1;if(null==be){for(;++Fe=He){ye=lt=He;break}if(Fe===Se)return[-1,-1];for(_e=nn=Fe;++FeHe&&(ye=He,_e=Fe),lt=He){ye=lt=He;break}if(Fe===Se)return[-1,-1];for(_e=nn=Fe;++FeHe&&(ye=He,_e=Fe),ltFe(He)?be[He]:void 0,set(He,lt){return Fe(He)||(++ye.size,be[He]===ui&&--ye.empty),be[He]=lt,this},delete(He){return Fe(He)&&(--ye.size,++ye.empty,be[He]=ui),this},clear(){ye.size=ye.empty=0,ye.object=be={}},test(He){return arguments.length?(Se=He,ye):Se},clean(){const He={};let lt=0;for(const _e in be){const nn=be[_e];nn!==ui&&(!Se||!Se(nn))&&(He[_e]=nn,++lt)}ye.size=lt,ye.empty=0,ye.object=be=He}};return ae&&Object.keys(ae).forEach(He=>{ye.set(He,ae[He])}),ye}function Ms(ae,be,Se,Fe,ye,He){if(!Se&&0!==Se)return He;const lt=+Se;let gi,_e=ae[0],nn=ot(ae);nn<_e&&(gi=_e,_e=nn,nn=gi),gi=Math.abs(be-_e);const Ts=Math.abs(nn-be);return giHe&&(lt=ye,ye=He,He=lt),Fe=void 0===Fe||Fe,((Se=void 0===Se||Se)?ye<=ae:ye_e.replace(/\\(.)/g,"$1")):Gt(ae));const Fe=ae&&ae.length,ye=Se&&Se.get||sn,He=_e=>ye(be?[_e]:oi(_e));let lt;if(Fe)if(1===Fe){const _e=He(ae[0]);lt=function(nn){return""+_e(nn)}}else{const _e=ae.map(He);lt=function(nn){let gi=""+_e[0](nn),Ts=0;for(;++Ts{be={},Se={},Fe=0},He=(lt,_e)=>(++Fe>ae&&(Se=be,be={},Fe=1),be[lt]=_e);return ye(),{clear:ye,has:lt=>ro(be,lt)||ro(Se,lt),get:lt=>ro(be,lt)?be[lt]:ro(Se,lt)?He(lt,Se[lt]):void 0,set:(lt,_e)=>ro(be,lt)?be[lt]=_e:He(lt,_e)}}function mo(ae,be,Se,Fe){const ye=be.length,He=Se.length;if(!He)return be;if(!ye)return Se;const lt=Fe||new be.constructor(ye+He);let _e=0,nn=0,gi=0;for(;_e0?Se[nn++]:be[_e++];for(;_e=0;)Se+=ae;return Se}function Oc(ae,be,Se,Fe){const ye=Se||" ",He=ae+"",lt=be-He.length;return lt<=0?He:"left"===Fe?Wi(ye,lt)+He:"center"===Fe?Wi(ye,~~(lt/2))+He+Wi(ye,Math.ceil(lt/2)):He+Wi(ye,lt)}function Yl(ae){return ae&&ot(ae)-ae[0]||0}function Qn(ae){return ei(ae)?"["+ae.map(Qn)+"]":ti(ae)||Wn(ae)?JSON.stringify(ae).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):ae}function Ao(ae){return null==ae||""===ae?null:!(!ae||"false"===ae||"0"===ae||!ae)}const ta=ae=>po(ae)||$i(ae)?ae:Date.parse(ae);function As(ae,be){return be=be||ta,null==ae||""===ae?null:be(ae)}function Rc(ae){return null==ae||""===ae?null:ae+""}function It(ae){const be={},Se=ae.length;for(let Fe=0;Fe{"use strict";tn.r(Ds),tn.d(Ds,{Bounds:()=>Fo,CanvasHandler:()=>sm,CanvasRenderer:()=>lS,DATE:()=>ja,DAY:()=>wa,DAYOFYEAR:()=>fd,Dataflow:()=>xd,Debug:()=>N.cG,Error:()=>N.jj,EventStream:()=>so,Gradient:()=>qp,GroupItem:()=>Ab,HOURS:()=>Pc,Handler:()=>rm,HybridHandler:()=>QR,HybridRenderer:()=>wk,Info:()=>N.kI,Item:()=>ow,MILLISECONDS:()=>hd,MINUTES:()=>Rr,MONTH:()=>na,Marks:()=>eu,MultiPulse:()=>Xo,None:()=>N.Hq,Operator:()=>ar,Parameters:()=>vv,Pulse:()=>Go,QUARTER:()=>Mr,RenderType:()=>l_,Renderer:()=>bc,ResourceLoader:()=>XC,SECONDS:()=>rn,SVGHandler:()=>LR,SVGRenderer:()=>xw,SVGStringRenderer:()=>V3,Scenegraph:()=>b3,TIME_UNITS:()=>M2,Transform:()=>ze,View:()=>hj,WEEK:()=>To,Warn:()=>N.uU,YEAR:()=>Or,accessor:()=>N.ZE,accessorFields:()=>N.Oj,accessorName:()=>N.el,array:()=>N.IX,ascending:()=>N.j2,bandwidthNRD:()=>rp,bin:()=>Au,bootstrapCI:()=>sE,boundClip:()=>H3,boundContext:()=>kb,boundItem:()=>OR,boundMark:()=>s_,boundStroke:()=>Dl,changeset:()=>Lf,clampRange:()=>N.l$,codegenExpression:()=>gV,compare:()=>N.qu,constant:()=>N.a9,cumulativeLogNormal:()=>Hc,cumulativeNormal:()=>sc,cumulativeUniform:()=>Wf,dayofyear:()=>k2,debounce:()=>N.Ds,defaultLocale:()=>XM,definition:()=>np,densityLogNormal:()=>kv,densityNormal:()=>Xa,densityUniform:()=>op,domChild:()=>js,domClear:()=>mr,domCreate:()=>a_,domFind:()=>pk,dotbin:()=>aE,error:()=>N.vU,expressionFunction:()=>xs,extend:()=>N.l7,extent:()=>N.We,extentIndex:()=>N.dI,falsy:()=>N.k,fastmap:()=>N.Xr,field:()=>N.EP,flush:()=>N.yl,font:()=>im,fontFamily:()=>gh,fontSize:()=>hi,format:()=>Ym,formatLocale:()=>iy,formats:()=>gl,hasOwnProperty:()=>N.nr,id:()=>N.id,identity:()=>N.yR,inferType:()=>U1,inferTypes:()=>_d,ingest:()=>Ti,inherits:()=>N.XW,inrange:()=>N.u5,interpolate:()=>kC,interpolateColors:()=>_b,interpolateRange:()=>Vx,intersect:()=>tN,intersectBoxLine:()=>Jg,intersectPath:()=>cw,intersectPoint:()=>en,intersectRule:()=>Ib,isArray:()=>N.kJ,isBoolean:()=>N.jn,isDate:()=>N.J_,isFunction:()=>N.mf,isIterable:()=>N.TW,isNumber:()=>N.hj,isObject:()=>N.Kn,isRegExp:()=>N.Kj,isString:()=>N.HD,isTuple:()=>ly,key:()=>N.Jy,lerp:()=>N.t7,lineHeight:()=>Qc,loader:()=>Pf,locale:()=>GM,logger:()=>N.kg,lruCache:()=>N.$m,markup:()=>GR,merge:()=>N.TS,mergeConfig:()=>N.fE,multiLineOffset:()=>r_,one:()=>N.kX,pad:()=>N.vk,panLinear:()=>N.Dw,panLog:()=>N.mJ,panPow:()=>N.QA,panSymlog:()=>N.Zw,parse:()=>cd,parseExpression:()=>gD,parseSelector:()=>yj,path:()=>ex,pathCurves:()=>qx,pathEqual:()=>pS,pathParse:()=>Gp,pathRectangle:()=>Vs,pathRender:()=>xb,pathSymbols:()=>GT,pathTrail:()=>Xp,peek:()=>N.fj,point:()=>mk,projection:()=>dF,quantileLogNormal:()=>Ed,quantileNormal:()=>ao,quantileUniform:()=>cE,quantiles:()=>py,quantizeInterpolator:()=>Bg,quarter:()=>N.mS,quartiles:()=>rE,random:()=>oc,randomInteger:()=>tg,randomKDE:()=>Uc,randomLCG:()=>X2,randomLogNormal:()=>Ns,randomMixture:()=>Hf,randomNormal:()=>Fi,randomUniform:()=>uE,read:()=>Wa,regressionConstant:()=>ng,regressionExp:()=>fE,regressionLinear:()=>dE,regressionLoess:()=>Tu,regressionLog:()=>sa,regressionPoly:()=>_y,regressionPow:()=>og,regressionQuad:()=>Zr,renderModule:()=>hS,repeat:()=>N.rx,resetDefaultLocale:()=>G$,resetSVGClipId:()=>iw,resetSVGDefIds:()=>q3,responseType:()=>Zh,runtimeContext:()=>v9,sampleCurve:()=>qf,sampleLogNormal:()=>Tv,sampleNormal:()=>my,sampleUniform:()=>gy,scale:()=>Yn,sceneEqual:()=>iN,sceneFromJSON:()=>hk,scenePickVisit:()=>_,sceneToJSON:()=>y3,sceneVisit:()=>p,sceneZOrder:()=>d,scheme:()=>Vg,serializeXML:()=>Ae,setHybridRendererOptions:()=>h8,setRandom:()=>oE,span:()=>N.yP,splitAccessPath:()=>N._k,stringValue:()=>N.m8,textMetrics:()=>yc,timeBin:()=>Q_,timeFloor:()=>$e,timeFormatLocale:()=>hv,timeInterval:()=>Of,timeOffset:()=>pd,timeSequence:()=>X_,timeUnitSpecifier:()=>q$,timeUnits:()=>T2,toBoolean:()=>N.sw,toDate:()=>N.ZU,toNumber:()=>N.He,toSet:()=>N.Rg,toString:()=>N.BB,transform:()=>lA,transforms:()=>wd,truncate:()=>N.$G,truthy:()=>N.yb,tupleid:()=>Kt,typeParsers:()=>oy,utcFloor:()=>J0,utcInterval:()=>Bm,utcOffset:()=>O2,utcSequence:()=>tv,utcdayofyear:()=>Yr,utcquarter:()=>N.N3,utcweek:()=>Q0,version:()=>E1,visitArray:()=>N.FP,week:()=>DM,writeConfig:()=>N.iL,zero:()=>N.bM,zoomLinear:()=>N.ay,zoomLog:()=>N.dH,zoomPow:()=>N.mK,zoomSymlog:()=>N.bV});var Ct={};tn.r(Ct),tn.d(Ct,{aggregate:()=>Md,bin:()=>Pv,collect:()=>lp,compare:()=>cp,countpattern:()=>lg,cross:()=>pA,density:()=>Ad,dotbin:()=>kd,expression:()=>Xf,extent:()=>$v,facet:()=>Bv,field:()=>wy,filter:()=>zv,flatten:()=>vl,fold:()=>Id,formula:()=>xo,generate:()=>Yf,impute:()=>Vv,joinaggregate:()=>xE,kde:()=>Ey,key:()=>Uv,load:()=>Hv,lookup:()=>Sy,multiextent:()=>qv,multivalues:()=>dg,params:()=>Dy,pivot:()=>xA,prefacet:()=>My,project:()=>Ru,proxy:()=>EE,quantile:()=>fp,relay:()=>CA,sample:()=>Ay,sequence:()=>CE,sieve:()=>Rd,subflow:()=>Ou,timeunit:()=>hp,tupleindex:()=>Gv,values:()=>ps,window:()=>Ty});var re={};tn.r(re),tn.d(re,{interpolate:()=>wl,interpolateArray:()=>nT,interpolateBasis:()=>XE,interpolateBasisClosed:()=>Ep,interpolateCubehelix:()=>pR,interpolateCubehelixLong:()=>mR,interpolateDate:()=>rT,interpolateDiscrete:()=>pC,interpolateHcl:()=>hb,interpolateHclLong:()=>Rg,interpolateHsl:()=>gT,interpolateHslLong:()=>_T,interpolateHue:()=>r3,interpolateLab:()=>wC,interpolateNumber:()=>dc,interpolateNumberArray:()=>Yy,interpolateObject:()=>gs,interpolateRgb:()=>Ro,interpolateRgbBasis:()=>KE,interpolateRgbBasisClosed:()=>jd,interpolateRound:()=>Ky,interpolateString:()=>dR,interpolateTransformCss:()=>kg,interpolateTransformSvg:()=>Cx,interpolateZoom:()=>yC,piecewise:()=>lC,quantize:()=>xT});var Ii={};tn.r(Ii),tn.d(Ii,{bound:()=>aN,identifier:()=>cN,mark:()=>iB,overlap:()=>dN,render:()=>cB,viewlayout:()=>yN});var sn={};tn.r(sn),tn.d(sn,{axisticks:()=>vN,datajoin:()=>vB,encode:()=>xB,legendentries:()=>wB,linkpath:()=>Ok,pie:()=>vs,scale:()=>lm,sortitems:()=>MN,stack:()=>Fk});var yi={};tn.r(yi),tn.d(yi,{contour:()=>dI,geojson:()=>yF,geopath:()=>bF,geopoint:()=>vF,geoshape:()=>pI,graticule:()=>Jb,heatmap:()=>__,isocontour:()=>gF,kde2d:()=>Az,projection:()=>Oz});var Zn={};tn.r(Zn),tn.d(Zn,{force:()=>mm});var Xt={};tn.r(Xt),tn.d(Xt,{nest:()=>GF,pack:()=>zS,partition:()=>YF,stratify:()=>KF,tree:()=>NI,treelinks:()=>ZF,treemap:()=>l5});var oi={};tn.r(oi),tn.d(oi,{label:()=>JF});var Rt={};tn.r(Rt),tn.d(Rt,{loess:()=>eP,regression:()=>GS});var On={};tn.r(On),tn.d(On,{voronoi:()=>OP});var Ut={};tn.r(Ut),tn.d(Ut,{wordcloud:()=>FP});var si={};tn.r(si),tn.d(si,{crossfilter:()=>XI,resolvefilter:()=>YI});var N=tn(537),ai=tn(861),Gr={},Yt={},Li=34,dr=10,Br=13;function Zi(i){return new Function("d","return {"+i.map(function(o,a){return JSON.stringify(o)+": d["+a+'] || ""'}).join(",")+"}")}function Xr(i){var o=Object.create(null),a=[];return i.forEach(function(l){for(var u in l)u in o||a.push(o[u]=u)}),a}function ei(i,o){var a=i+"",l=a.length;return l=I?z=!0:(Z=C.charCodeAt(k++))===dr?V=!0:Z===Br&&(V=!0,C.charCodeAt(k)===dr&&++k),C.slice(H+1,Y-1).replace(/""/g,'"')}for(;k9999?"+"+ei(i,6):ei(i,4)}(i.getUTCFullYear())+"-"+ei(i.getUTCMonth()+1,2)+"-"+ei(i.getUTCDate(),2)+(u?"T"+ei(o,2)+":"+ei(a,2)+":"+ei(l,2)+"."+ei(u,3)+"Z":l?"T"+ei(o,2)+":"+ei(a,2)+":"+ei(l,2)+"Z":a||o?"T"+ei(o,2)+":"+ei(a,2)+"Z":"")}(C):o.test(C+="")?'"'+C.replace(/"/g,'""')+'"':C}return{parse:function l(C,D){var T,I,k=u(C,function(F,L){if(T)return T(F,L-1);I=F,T=D?function zo(i,o){var a=Zi(i);return function(l,u){return o(a(l),u,i)}}(F,D):Zi(F)});return k.columns=I||[],k},parseRows:u,format:function m(C,D){return null==D&&(D=Xr(C)),[D.map(w).join(i)].concat(f(C,D)).join("\n")},formatBody:function g(C,D){return null==D&&(D=Xr(C)),f(C,D).join("\n")},formatRows:function b(C){return C.map(v).join("\n")},formatRow:v,formatValue:w}}function Qe(i){return i}function At(i,o){return"string"==typeof o&&(o=i.objects[o]),"GeometryCollection"===o.type?{type:"FeatureCollection",features:o.geometries.map(function(a){return st(i,a)})}:st(i,o)}function st(i,o){var a=o.id,l=o.bbox,u=null==o.properties?{}:o.properties,f=Fn(i,o);return null==a&&null==l?{type:"Feature",properties:u,geometry:f}:null==l?{type:"Feature",id:a,properties:u,geometry:f}:{type:"Feature",id:a,bbox:l,properties:u,geometry:f}}function Fn(i,o){var a=function ot(i){if(null==i)return Qe;var o,a,l=i.scale[0],u=i.scale[1],f=i.translate[0],m=i.translate[1];return function(g,b){b||(o=a=0);var v=2,w=g.length,C=new Array(w);for(C[0]=(o+=g[0])*l+f,C[1]=(a+=g[1])*u+m;v1)l=function $t(i,o,a){var f,l=[],u=[];function m(C){var D=C<0?~C:C;(u[D]||(u[D]=[])).push({i:C,g:f})}function g(C){C.forEach(m)}function b(C){C.forEach(g)}return function w(C){switch(f=C,C.type){case"GeometryCollection":C.geometries.forEach(w);break;case"LineString":g(C.arcs);break;case"MultiLineString":case"Polygon":b(C.arcs);break;case"MultiPolygon":!function v(C){C.forEach(b)}(C.arcs)}}(o),u.forEach(null==a?function(C){l.push(C[0].i)}:function(C){a(C[0].g,C[C.length-1].g)&&l.push(C[0].i)}),l}(0,o,a);else for(u=0,l=new Array(f=i.arcs.length);u=St?10:f>=li?5:f>=Ot?2:1;let g,b,v;return u<0?(v=Math.pow(10,-u)/m,g=Math.round(i*v),b=Math.round(o*v),g/vo&&--b,v=-v):(v=Math.pow(10,u)*m,g=Math.round(i/v),b=Math.round(o/v),g*vo&&--b),b0))return[];if((i=+i)==(o=+o))return[i];const l=o=u))return[];const g=f-u+1,b=new Array(g);if(l)if(m<0)for(let v=0;v=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qi(i){if(!(o=no.exec(i)))throw new Error("invalid format: "+i);var o;return new an({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}function an(i){this.fill=void 0===i.fill?" ":i.fill+"",this.align=void 0===i.align?">":i.align+"",this.sign=void 0===i.sign?"-":i.sign+"",this.symbol=void 0===i.symbol?"":i.symbol+"",this.zero=!!i.zero,this.width=void 0===i.width?void 0:+i.width,this.comma=!!i.comma,this.precision=void 0===i.precision?void 0:+i.precision,this.trim=!!i.trim,this.type=void 0===i.type?"":i.type+""}function Gt(i,o){if((a=(i=o?i.toExponential(o-1):i.toExponential()).indexOf("e"))<0)return null;var a,l=i.slice(0,a);return[l.length>1?l[0]+l.slice(2):l,+i.slice(a+1)]}function We(i){return(i=Gt(Math.abs(i)))?i[1]:NaN}function Dn(i,o){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(We(o)/3)))-We(Math.abs(i)))}function Jt(i,o){return i=Math.abs(i),o=Math.abs(o)-i,Math.max(0,We(o)-We(i))+1}function Hi(i){return Math.max(0,-We(Math.abs(i)))}function Vo(i,o){var a=Gt(i,o);if(!a)return i+"";var l=a[0],u=a[1];return u<0?"0."+new Array(-u).join("0")+l:l.length>u+1?l.slice(0,u+1)+"."+l.slice(u+1):l+new Array(u-l.length+2).join("0")}Qi.prototype=an.prototype,an.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 Mi={"%":(i,o)=>(100*i).toFixed(o),b:i=>Math.round(i).toString(2),c:i=>i+"",d:function Oi(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)},e:(i,o)=>i.toExponential(o),f:(i,o)=>i.toFixed(o),g:(i,o)=>i.toPrecision(o),o:i=>Math.round(i).toString(8),p:(i,o)=>Vo(100*i,o),r:Vo,s:function Js(i,o){var a=Gt(i,o);if(!a)return i+"";var l=a[0],u=a[1],f=u-(Mo=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,m=l.length;return f===m?l:f>m?l+new Array(f-m+1).join("0"):f>0?l.slice(0,f)+"."+l.slice(f):"0."+new Array(1-f).join("0")+Gt(i,Math.max(0,o+f-1))[0]},X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function ci(i){return i}var ui,va,Ms,jo=Array.prototype.map,Si=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ro(i){var o=void 0===i.grouping||void 0===i.thousands?ci:function hn(i,o){return function(a,l){for(var u=a.length,f=[],m=0,g=i[0],b=0;u>0&&g>0&&(b+g+1>l&&(g=Math.max(1,l-b)),f.push(a.substring(u-=g,u+g)),!((b+=g+1)>l));)g=i[m=(m+1)%i.length];return f.reverse().join(o)}}(jo.call(i.grouping,Number),i.thousands+""),a=void 0===i.currency?"":i.currency[0]+"",l=void 0===i.currency?"":i.currency[1]+"",u=void 0===i.decimal?".":i.decimal+"",f=void 0===i.numerals?ci:function io(i){return function(o){return o.replace(/[0-9]/g,function(a){return i[+a]})}}(jo.call(i.numerals,String)),m=void 0===i.percent?"%":i.percent+"",g=void 0===i.minus?"\u2212":i.minus+"",b=void 0===i.nan?"NaN":i.nan+"";function v(C){var D=(C=Qi(C)).fill,T=C.align,I=C.sign,k=C.symbol,F=C.zero,L=C.width,z=C.comma,V=C.precision,U=C.trim,W=C.type;"n"===W?(z=!0,W="g"):Mi[W]||(void 0===V&&(V=12),U=!0,W="g"),(F||"0"===D&&"="===T)&&(F=!0,D="0",T="=");var Y="$"===k?a:"#"===k&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",H="$"===k?l:/[%p]/.test(W)?m:"",Z=Mi[W],te=/[defgprs%]/.test(W);function ce(le){var Q,J,oe,ve=Y,xe=H;if("c"===W)xe=Z(le)+xe,le="";else{var we=(le=+le)<0||1/le<0;if(le=isNaN(le)?b:Z(Math.abs(le),V),U&&(le=function xn(i){e:for(var u,o=i.length,a=1,l=-1;a0&&(l=0)}return l>0?i.slice(0,l)+i.slice(u+1):i}(le)),we&&0==+le&&"+"!==I&&(we=!1),ve=(we?"("===I?I:g:"-"===I||"("===I?"":I)+ve,xe=("s"===W?Si[8+Mo/3]:"")+xe+(we&&"("===I?")":""),te)for(Q=-1,J=le.length;++Q(oe=le.charCodeAt(Q))||oe>57){xe=(46===oe?u+le.slice(Q+1):le.slice(Q))+xe,le=le.slice(0,Q);break}}z&&!F&&(le=o(le,1/0));var ne=ve.length+le.length+xe.length,ge=ne>1)+ve+le+xe+ge.slice(ne);break;default:le=ge+ve+le+xe}return f(le)}return V=void 0===V?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V)),ce.toString=function(){return C+""},ce}return{format:v,formatPrefix:function w(C,D){var T=v(((C=Qi(C)).type="f",C)),I=3*Math.max(-8,Math.min(8,Math.floor(We(D)/3))),k=Math.pow(10,-I),F=Si[8+I/3];return function(L){return T(k*L)+F}}}}!function ls(i){ui=ro(i),va=ui.format,Ms=ui.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const cs=new Date,Uo=new Date;function $i(i,o,a,l){function u(f){return i(f=0===arguments.length?new Date:new Date(+f)),f}return u.floor=f=>(i(f=new Date(+f)),f),u.ceil=f=>(i(f=new Date(f-1)),o(f,1),i(f),f),u.round=f=>{const m=u(f),g=u.ceil(f);return f-m(o(f=new Date(+f),null==m?1:Math.floor(m)),f),u.range=(f,m,g)=>{const b=[];if(f=u.ceil(f),g=null==g?1:Math.floor(g),!(f0))return b;let v;do{b.push(v=new Date(+f)),o(f,g),i(f)}while(v$i(m=>{if(m>=m)for(;i(m),!f(m);)m.setTime(m-1)},(m,g)=>{if(m>=m)if(g<0)for(;++g<=0;)for(;o(m,-1),!f(m););else for(;--g>=0;)for(;o(m,1),!f(m););}),a&&(u.count=(f,m)=>(cs.setTime(+f),Uo.setTime(+m),i(cs),i(Uo),Math.floor(a(cs,Uo))),u.every=f=>(f=Math.floor(f),isFinite(f)&&f>0?f>1?u.filter(l?m=>l(m)%f==0:m=>u.count(0,m)%f==0):u:null)),u}const vr=1e3,po=6e4,xr=60*po,Wn=24*xr,ea=7*Wn,Xl=30*Wn,yu=365*Wn,Ri=$i(i=>i.setHours(0,0,0,0),(i,o)=>i.setDate(i.getDate()+o),(i,o)=>(o-i-(o.getTimezoneOffset()-i.getTimezoneOffset())*po)/Wn,i=>i.getDate()-1),Wi=$i(i=>{i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCDate(i.getUTCDate()+o)},(i,o)=>(o-i)/Wn,i=>i.getUTCDate()-1),Yl=$i(i=>{i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCDate(i.getUTCDate()+o)},(i,o)=>(o-i)/Wn,i=>Math.floor(i/Wn));function Ao(i){return $i(o=>{o.setDate(o.getDate()-(o.getDay()+7-i)%7),o.setHours(0,0,0,0)},(o,a)=>{o.setDate(o.getDate()+7*a)},(o,a)=>(a-o-(a.getTimezoneOffset()-o.getTimezoneOffset())*po)/ea)}const ta=Ao(0),As=Ao(1),Ho=(Ao(2),Ao(3),Ao(4));function nn(i){return $i(o=>{o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-i)%7),o.setUTCHours(0,0,0,0)},(o,a)=>{o.setUTCDate(o.getUTCDate()+7*a)},(o,a)=>(a-o)/ea)}Ao(5),Ao(6);const gi=nn(0),Ts=nn(1),Kl=(nn(2),nn(3),nn(4)),di=(nn(5),nn(6),$i(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,o)=>{i.setFullYear(i.getFullYear()+o)},(i,o)=>o.getFullYear()-i.getFullYear(),i=>i.getFullYear()));di.every=i=>isFinite(i=Math.floor(i))&&i>0?$i(o=>{o.setFullYear(Math.floor(o.getFullYear()/i)*i),o.setMonth(0,1),o.setHours(0,0,0,0)},(o,a)=>{o.setFullYear(o.getFullYear()+a*i)}):null;const za=$i(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCFullYear(i.getUTCFullYear()+o)},(i,o)=>o.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());za.every=i=>isFinite(i=Math.floor(i))&&i>0?$i(o=>{o.setUTCFullYear(Math.floor(o.getUTCFullYear()/i)*i),o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0)},(o,a)=>{o.setUTCFullYear(o.getUTCFullYear()+a*i)}):null;const Nc=$i(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,o)=>{i.setMonth(i.getMonth()+o)},(i,o)=>o.getMonth()-i.getMonth()+12*(o.getFullYear()-i.getFullYear()),i=>i.getMonth()),Mf=$i(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,o)=>{i.setUTCMonth(i.getUTCMonth()+o)},(i,o)=>o.getUTCMonth()-i.getUTCMonth()+12*(o.getUTCFullYear()-i.getUTCFullYear()),i=>i.getUTCMonth()),Va=$i(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*vr-i.getMinutes()*po)},(i,o)=>{i.setTime(+i+o*xr)},(i,o)=>(o-i)/xr,i=>i.getHours()),K0=$i(i=>{i.setUTCMinutes(0,0,0)},(i,o)=>{i.setTime(+i+o*xr)},(i,o)=>(o-i)/xr,i=>i.getUTCHours()),Bi=$i(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*vr)},(i,o)=>{i.setTime(+i+o*po)},(i,o)=>(o-i)/po,i=>i.getMinutes()),R1=$i(i=>{i.setUTCSeconds(0,0)},(i,o)=>{i.setTime(+i+o*po)},(i,o)=>(o-i)/po,i=>i.getUTCMinutes()),qh=$i(i=>{i.setTime(i-i.getMilliseconds())},(i,o)=>{i.setTime(+i+o*vr)},(i,o)=>(o-i)/vr,i=>i.getUTCSeconds()),Af=$i(()=>{},(i,o)=>{i.setTime(+i+o)},(i,o)=>o-i);function Tf(i,o){return null==i||null==o?NaN:io?1:i>=o?0:NaN}function SM(i,o){return null==i||null==o?NaN:oi?1:o>=i?0:NaN}function Fc(i){let o,a,l;function u(g,b,v=0,w=g.length){if(v>>1;a(g[C],b)<0?v=C+1:w=C}while(vTf(i(g),b),l=(g,b)=>i(g)-b):(o=i===Tf||i===SM?i:xa,a=i,l=i),{left:u,center:function m(g,b,v=0,w=g.length){const C=u(g,b,v,w-1);return C>v&&l(g[C-1],b)>-l(g[C],b)?C-1:C},right:function f(g,b,v=0,w=g.length){if(v>>1;a(g[C],b)<=0?v=C+1:w=C}while(v(i=Math.floor(i),isFinite(i)&&i>0?i>1?$i(o=>{o.setTime(Math.floor(o/i)*i)},(o,a)=>{o.setTime(+o+a*i)},(o,a)=>(a-o)/i):Af:null);const Or="year",Mr="quarter",na="month",To="week",ja="date",wa="day",fd="dayofyear",Pc="hours",Rr="minutes",rn="seconds",hd="milliseconds",M2=[Or,Mr,na,To,ja,wa,fd,Pc,Rr,rn,hd],A2=M2.reduce((i,o,a)=>(i[o]=1+a,i),{});function T2(i){const o=(0,N.IX)(i).slice(),a={};return o.length||(0,N.vU)("Missing time unit."),o.forEach(u=>{(0,N.nr)(A2,u)?a[u]=1:(0,N.vU)(`Invalid time unit: ${u}.`)}),(a[To]||a[wa]?1:0)+(a[Mr]||a[na]||a[ja]?1:0)+(a[fd]?1:0)>1&&(0,N.vU)(`Incompatible time units: ${i}`),o.sort((u,f)=>A2[u]-A2[f]),o}const Ue={[Or]:"%Y ",[Mr]:"Q%q ",[na]:"%b ",[ja]:"%d ",[To]:"W%U ",[wa]:"%a ",[fd]:"%j ",[Pc]:"%H:00",[Rr]:"00:%M",[rn]:":%S",[hd]:".%L",[`${Or}-${na}`]:"%Y-%m ",[`${Or}-${na}-${ja}`]:"%Y-%m-%d ",[`${Pc}-${Rr}`]:"%H:%M"};function q$(i,o){const a=(0,N.l7)({},Ue,o),l=T2(i),u=l.length;let g,b,f="",m=0;for(m=0;mm;--g)if(b=l.slice(m,g).join("-"),null!=a[b]){f+=a[b],m=g;break}return f.trim()}const Tt=new Date;function q_(i){return Tt.setFullYear(i),Tt.setMonth(0),Tt.setDate(1),Tt.setHours(0,0,0,0),Tt}function k2(i){return Z0(new Date(i))}function DM(i){return $m(new Date(i))}function Z0(i){return Ri.count(q_(i.getFullYear())-1,i)}function $m(i){return ta.count(q_(i.getFullYear())-1,i)}function kf(i){return q_(i).getDay()}function Ql(i,o,a,l,u,f,m){if(0<=i&&i<100){const g=new Date(-1,o,a,l,u,f,m);return g.setFullYear(i),g}return new Date(i,o,a,l,u,f,m)}function Yr(i){return fi(new Date(i))}function Q0(i){return If(new Date(i))}function fi(i){const o=Date.UTC(i.getUTCFullYear(),0,1);return Wi.count(o-1,i)}function If(i){const o=Date.UTC(i.getUTCFullYear(),0,1);return gi.count(o-1,i)}function G_(i){return Tt.setTime(Date.UTC(i,0,1)),Tt.getUTCDay()}function us(i,o,a,l,u,f,m){if(0<=i&&i<100){const g=new Date(Date.UTC(-1,o,a,l,u,f,m));return g.setUTCFullYear(a.y),g}return new Date(Date.UTC(i,o,a,l,u,f,m))}function MM(i,o,a,l,u){const f=o||1,m=(0,N.fj)(i),g=(L,z,V)=>function jU(i,o,a,l){const u=a<=1?i:l?(f,m)=>l+a*Math.floor((i(f,m)-l)/a):(f,m)=>a*Math.floor(i(f,m)/a);return o?(f,m)=>o(u(f,m),m):u}(a[V=V||L],l[V],L===m&&f,z),b=new Date,v=(0,N.Rg)(i),w=v[Or]?g(Or):(0,N.a9)(2012),C=v[na]?g(na):v[Mr]?g(Mr):N.bM,D=v[To]&&v[wa]?g(wa,1,To+wa):v[To]?g(To,1):v[wa]?g(wa,1):v[ja]?g(ja,1):v[fd]?g(fd,1):N.kX,T=v[Pc]?g(Pc):N.bM,I=v[Rr]?g(Rr):N.bM,k=v[rn]?g(rn):N.bM,F=v[hd]?g(hd):N.bM;return function(L){b.setTime(+L);const z=w(b);return u(z,C(b),D(b,z),T(b),I(b),k(b),F(b))}}function Ai(i,o,a){return o+7*i-(a+6)%7}const UU={[Or]:i=>i.getFullYear(),[Mr]:i=>Math.floor(i.getMonth()/3),[na]:i=>i.getMonth(),[ja]:i=>i.getDate(),[Pc]:i=>i.getHours(),[Rr]:i=>i.getMinutes(),[rn]:i=>i.getSeconds(),[hd]:i=>i.getMilliseconds(),[fd]:i=>Z0(i),[To]:i=>$m(i),[To+wa]:(i,o)=>Ai($m(i),i.getDay(),kf(o)),[wa]:(i,o)=>Ai(1,i.getDay(),kf(o))},HU={[Mr]:i=>3*i,[To]:(i,o)=>Ai(i,0,kf(o))};function $e(i,o){return MM(i,o||1,UU,HU,Ql)}const AM={[Or]:i=>i.getUTCFullYear(),[Mr]:i=>Math.floor(i.getUTCMonth()/3),[na]:i=>i.getUTCMonth(),[ja]:i=>i.getUTCDate(),[Pc]:i=>i.getUTCHours(),[Rr]:i=>i.getUTCMinutes(),[rn]:i=>i.getUTCSeconds(),[hd]:i=>i.getUTCMilliseconds(),[fd]:i=>fi(i),[To]:i=>If(i),[wa]:(i,o)=>Ai(1,i.getUTCDay(),G_(o)),[To+wa]:(i,o)=>Ai(If(i),i.getUTCDay(),G_(o))},TM={[Mr]:i=>3*i,[To]:(i,o)=>Ai(i,0,G_(o))};function J0(i,o){return MM(i,o||1,AM,TM,us)}const N1={[Or]:di,[Mr]:Nc.every(3),[na]:Nc,[To]:ta,[ja]:Ri,[wa]:Ri,[fd]:Ri,[Pc]:Va,[Rr]:Bi,[rn]:qh,[hd]:Af},I2={[Or]:za,[Mr]:Mf.every(3),[na]:Mf,[To]:gi,[ja]:Wi,[wa]:Wi,[fd]:Wi,[Pc]:K0,[Rr]:R1,[rn]:qh,[hd]:Af};function Of(i){return N1[i]}function Bm(i){return I2[i]}function ev(i,o,a){return i?i.offset(o,a):void 0}function pd(i,o,a){return ev(Of(i),o,a)}function O2(i,o,a){return ev(Bm(i),o,a)}function kM(i,o,a,l){return i?i.range(o,a,l):void 0}function X_(i,o,a,l){return kM(Of(i),o,a,l)}function tv(i,o,a,l){return kM(Bm(i),o,a,l)}const Gh=6e4,Y_=60*Gh,nv=24*Y_,Ua=30*nv,K_=365*nv,md=[Or,na,ja,Pc,Rr,rn,hd],zm=md.slice(0,-1),pe=zm.slice(0,-1),Vm=pe.slice(0,-1),Xe=Vm.slice(0,-1),sr=[Or,na],oo=[Or],Lc=[[zm,1,1e3],[zm,5,5e3],[zm,15,15e3],[zm,30,3e4],[pe,1,Gh],[pe,5,5*Gh],[pe,15,15*Gh],[pe,30,30*Gh],[Vm,1,Y_],[Vm,3,3*Y_],[Vm,6,6*Y_],[Vm,12,12*Y_],[Xe,1,nv],[[Or,To],1,6048e5],[sr,1,Ua],[sr,3,3*Ua],[oo,1,K_]];function Q_(i){const o=i.extent,a=i.maxbins||40,l=Math.abs((0,N.yP)(o))/a;let f,m,u=Fc(g=>g[2]).right(Lc,l);return u===Lc.length?(f=oo,m=fr(o[0]/K_,o[1]/K_,a)):u?(u=Lc[l/Lc[u-1][2]=12)]},q:function Pe(je){return 1+~~(je.getMonth()/3)},Q:$c,s:Gm,S:ia,u:ov,U:VM,V:jM,w:UM,W:Tr,x:null,X:null,y:mt,Y:yo,Z:ra,"%":qm},U={a:function Ie(je){return m[je.getUTCDay()]},A:function Ne(je){return f[je.getUTCDay()]},b:function Ve(je){return b[je.getUTCMonth()]},B:function ft(je){return g[je.getUTCMonth()]},c:null,d:nc,e:nc,f:jn,g:sv,G:$n,H:Um,I:kr,j:Ca,L:wu,m:ty,M:P1,p:function Ke(je){return u[+(je.getUTCHours()>=12)]},q:function Dt(je){return 1+~~(je.getUTCMonth()/3)},Q:$c,s:Gm,S:Hm,u:Kr,U:Wm,V:Eu,w:ny,W:L1,x:null,X:null,y:Ff,Y:Yh,Z:av,"%":qm},W={a:function ce(je,tt,it){var Oe=T.exec(tt.slice(it));return Oe?(je.w=I.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},A:function le(je,tt,it){var Oe=C.exec(tt.slice(it));return Oe?(je.w=D.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},b:function ve(je,tt,it){var Oe=L.exec(tt.slice(it));return Oe?(je.m=z.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},B:function xe(je,tt,it){var Oe=k.exec(tt.slice(it));return Oe?(je.m=F.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},c:function Q(je,tt,it){return Z(je,o,tt,it)},d:F1,e:F1,f:$M,g:Jl,G:Ar,H:xu,I:xu,j:Ji,L:LM,m:R2,M:ey,p:function te(je,tt,it){var Oe=v.exec(tt.slice(it));return Oe?(je.p=w.get(Oe[0].toLowerCase()),it+Oe[0].length):-1},q:ec,Q:BM,s:ln,S:PM,u:rv,U:RM,V:Ha,w:OM,W:NM,x:function J(je,tt,it){return Z(je,a,tt,it)},X:function oe(je,tt,it){return Z(je,l,tt,it)},y:Jl,Y:Ar,Z:FM,"%":Rn};function Y(je,tt){return function(it){var un,xt,ur,Oe=[],_t=-1,qt=0,Ln=je.length;for(it instanceof Date||(it=new Date(+it));++_t53)return null;"w"in Oe||(Oe.w=1),"Z"in Oe?(Ln=(qt=Ea(_o(Oe.y,0,1))).getUTCDay(),qt=Ln>4||0===Ln?Ts.ceil(qt):Ts(qt),qt=Wi.offset(qt,7*(Oe.V-1)),Oe.y=qt.getUTCFullYear(),Oe.m=qt.getUTCMonth(),Oe.d=qt.getUTCDate()+(Oe.w+6)%7):(Ln=(qt=iv(_o(Oe.y,0,1))).getDay(),qt=Ln>4||0===Ln?As.ceil(qt):As(qt),qt=Ri.offset(qt,7*(Oe.V-1)),Oe.y=qt.getFullYear(),Oe.m=qt.getMonth(),Oe.d=qt.getDate()+(Oe.w+6)%7)}else("W"in Oe||"U"in Oe)&&("w"in Oe||(Oe.w="u"in Oe?Oe.u%7:"W"in Oe?1:0),Ln="Z"in Oe?Ea(_o(Oe.y,0,1)).getUTCDay():iv(_o(Oe.y,0,1)).getDay(),Oe.m=0,Oe.d="W"in Oe?(Oe.w+6)%7+7*Oe.W-(Ln+5)%7:Oe.w+7*Oe.U-(Ln+6)%7);return"Z"in Oe?(Oe.H+=Oe.Z/100|0,Oe.M+=Oe.Z%100,Ea(Oe)):iv(Oe)}}function Z(je,tt,it,Oe){for(var un,xt,_t=0,qt=tt.length,Ln=it.length;_t=Ln)return-1;if(37===(un=tt.charCodeAt(_t++))){if(un=tt.charAt(_t++),!(xt=W[un in ds?tt.charAt(_t++):un])||(Oe=xt(je,it,Oe))<0)return-1}else if(un!=it.charCodeAt(Oe++))return-1}return Oe}return V.x=Y(a,V),V.X=Y(l,V),V.c=Y(o,V),U.x=Y(a,U),U.X=Y(l,U),U.c=Y(o,U),{format:function(je){var tt=Y(je+="",V);return tt.toString=function(){return je},tt},parse:function(je){var tt=H(je+="",!1);return tt.toString=function(){return je},tt},utcFormat:function(je){var tt=Y(je+="",U);return tt.toString=function(){return je},tt},utcParse:function(je){var tt=H(je+="",!0);return tt.toString=function(){return je},tt}}}var Bc,Nr,lv,bo,Is,ds={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,ht=/^%/,IM=/[\\^$*+?|[\]().{}]/g;function Ni(i,o,a){var l=i<0?"-":"",u=(l?-i:i)+"",f=u.length;return l+(f[o.toLowerCase(),a]))}function OM(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.w=+l[0],a+l[0].length):-1}function rv(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.u=+l[0],a+l[0].length):-1}function RM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.U=+l[0],a+l[0].length):-1}function Ha(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.V=+l[0],a+l[0].length):-1}function NM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.W=+l[0],a+l[0].length):-1}function Ar(i,o,a){var l=Je.exec(o.slice(a,a+4));return l?(i.y=+l[0],a+l[0].length):-1}function Jl(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.y=+l[0]+(+l[0]>68?1900:2e3),a+l[0].length):-1}function FM(i,o,a){var l=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(o.slice(a,a+6));return l?(i.Z=l[1]?0:-(l[2]+(l[3]||"00")),a+l[0].length):-1}function ec(i,o,a){var l=Je.exec(o.slice(a,a+1));return l?(i.q=3*l[0]-3,a+l[0].length):-1}function R2(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.m=l[0]-1,a+l[0].length):-1}function F1(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.d=+l[0],a+l[0].length):-1}function Ji(i,o,a){var l=Je.exec(o.slice(a,a+3));return l?(i.m=0,i.d=+l[0],a+l[0].length):-1}function xu(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.H=+l[0],a+l[0].length):-1}function ey(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.M=+l[0],a+l[0].length):-1}function PM(i,o,a){var l=Je.exec(o.slice(a,a+2));return l?(i.S=+l[0],a+l[0].length):-1}function LM(i,o,a){var l=Je.exec(o.slice(a,a+3));return l?(i.L=+l[0],a+l[0].length):-1}function $M(i,o,a){var l=Je.exec(o.slice(a,a+6));return l?(i.L=Math.floor(l[0]/1e3),a+l[0].length):-1}function Rn(i,o,a){var l=ht.exec(o.slice(a,a+1));return l?a+l[0].length:-1}function BM(i,o,a){var l=Je.exec(o.slice(a));return l?(i.Q=+l[0],a+l[0].length):-1}function ln(i,o,a){var l=Je.exec(o.slice(a));return l?(i.s=+l[0],a+l[0].length):-1}function Ft(i,o){return Ni(i.getDate(),o,2)}function zM(i,o){return Ni(i.getHours(),o,2)}function Vt(i,o){return Ni(i.getHours()%12||12,o,2)}function fs(i,o){return Ni(1+Ri.count(di(i),i),o,3)}function Jn(i,o){return Ni(i.getMilliseconds(),o,3)}function Wo(i,o){return Jn(i,o)+"000"}function ks(i,o){return Ni(i.getMonth()+1,o,2)}function Nf(i,o){return Ni(i.getMinutes(),o,2)}function ia(i,o){return Ni(i.getSeconds(),o,2)}function ov(i){var o=i.getDay();return 0===o?7:o}function VM(i,o){return Ni(ta.count(di(i)-1,i),o,2)}function jm(i){var o=i.getDay();return o>=4||0===o?Ho(i):Ho.ceil(i)}function jM(i,o){return i=jm(i),Ni(Ho.count(di(i),i)+(4===di(i).getDay()),o,2)}function UM(i){return i.getDay()}function Tr(i,o){return Ni(As.count(di(i)-1,i),o,2)}function mt(i,o){return Ni(i.getFullYear()%100,o,2)}function _n(i,o){return Ni((i=jm(i)).getFullYear()%100,o,2)}function yo(i,o){return Ni(i.getFullYear()%1e4,o,4)}function tc(i,o){var a=i.getDay();return Ni((i=a>=4||0===a?Ho(i):Ho.ceil(i)).getFullYear()%1e4,o,4)}function ra(i){var o=i.getTimezoneOffset();return(o>0?"-":(o*=-1,"+"))+Ni(o/60|0,"0",2)+Ni(o%60,"0",2)}function nc(i,o){return Ni(i.getUTCDate(),o,2)}function Um(i,o){return Ni(i.getUTCHours(),o,2)}function kr(i,o){return Ni(i.getUTCHours()%12||12,o,2)}function Ca(i,o){return Ni(1+Wi.count(za(i),i),o,3)}function wu(i,o){return Ni(i.getUTCMilliseconds(),o,3)}function jn(i,o){return wu(i,o)+"000"}function ty(i,o){return Ni(i.getUTCMonth()+1,o,2)}function P1(i,o){return Ni(i.getUTCMinutes(),o,2)}function Hm(i,o){return Ni(i.getUTCSeconds(),o,2)}function Kr(i){var o=i.getUTCDay();return 0===o?7:o}function Wm(i,o){return Ni(gi.count(za(i)-1,i),o,2)}function Xh(i){var o=i.getUTCDay();return o>=4||0===o?Kl(i):Kl.ceil(i)}function Eu(i,o){return i=Xh(i),Ni(Kl.count(za(i),i)+(4===za(i).getUTCDay()),o,2)}function ny(i){return i.getUTCDay()}function L1(i,o){return Ni(Ts.count(za(i)-1,i),o,2)}function Ff(i,o){return Ni(i.getUTCFullYear()%100,o,2)}function sv(i,o){return Ni((i=Xh(i)).getUTCFullYear()%100,o,2)}function Yh(i,o){return Ni(i.getUTCFullYear()%1e4,o,4)}function $n(i,o){var a=i.getUTCDay();return Ni((i=a>=4||0===a?Kl(i):Kl.ceil(i)).getUTCFullYear()%1e4,o,4)}function av(){return"+0000"}function qm(){return"%"}function $c(i){return+i}function Gm(i){return Math.floor(+i/1e3)}function zc(i){const o={};return a=>o[a]||(o[a]=i(a))}function uv(i){const o=zc(i.format),a=i.formatPrefix;return{format:o,formatPrefix:a,formatFloat(l){const u=Qi(l||",");if(null==u.precision){switch(u.precision=12,u.type){case"%":u.precision-=2;break;case"e":u.precision-=1}return function cv(i,o){return a=>{const l=i(a),u=l.indexOf(o);if(u<0)return l;let f=function ml(i,o){let l,a=i.lastIndexOf("e");if(a>0)return a;for(a=i.length;--a>o;)if(l=i.charCodeAt(a),l>=48&&l<=57)return a+1}(l,u);const m=fu;)if("0"!==l[f]){++f;break}return l.slice(0,f)+m}}(o(u),o(".1f")(1)[1])}return o(u)},formatSpan(l,u,f,m){m=Qi(m??",f");const g=fr(l,u,f),b=Math.max(Math.abs(l),Math.abs(u));let v;if(null==m.precision)switch(m.type){case"s":return isNaN(v=Dn(g,b))||(m.precision=v),a(m,b);case"":case"e":case"g":case"p":case"r":isNaN(v=Jt(g,b))||(m.precision=v-("e"===m.type));break;case"f":case"%":isNaN(v=Hi(g))||(m.precision=v-2*("%"===m.type))}return o(m)}}}let B1,qM;function HM(){return B1=uv({format:va,formatPrefix:Ms})}function dv(i){return uv(ro(i))}function iy(i){return arguments.length?B1=dv(i):B1}function WM(i,o,a){(0,N.Kn)(a=a||{})||(0,N.vU)(`Invalid time multi-format specifier: ${a}`);const l=o(rn),u=o(Rr),f=o(Pc),m=o(ja),g=o(To),b=o(na),v=o(Mr),w=o(Or),C=i(a[hd]||".%L"),D=i(a[rn]||":%S"),T=i(a[Rr]||"%I:%M"),I=i(a[Pc]||"%I %p"),k=i(a[ja]||a[wa]||"%a %d"),F=i(a[To]||"%b %d"),L=i(a[na]||"%B"),z=i(a[Mr]||"%B"),V=i(a[Or]||"%Y");return U=>(l(U)(0,N.HD)(l)?o(l):WM(o,Of,l),utcFormat:l=>(0,N.HD)(l)?a(l):WM(a,Bm,l),timeParse:zc(i.parse),utcParse:zc(i.utcParse)}}function N2(){return qM=fv({format:Nr,parse:lv,utcFormat:bo,utcParse:Is})}function F2(i){return fv(pl(i))}function hv(i){return arguments.length?qM=F2(i):qM}!function $1(i){Bc=pl(i),Nr=Bc.format,lv=Bc.parse,bo=Bc.utcFormat,Is=Bc.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"]}),HM(),N2();const z1=(i,o)=>(0,N.l7)({},i,o);function GM(i,o){const a=i?dv(i):iy(),l=o?F2(o):hv();return z1(a,l)}function XM(i,o){const a=arguments.length;return a&&2!==a&&(0,N.vU)("defaultLocale expects either zero or two arguments."),a?z1(iy(i),hv(o)):z1(iy(),hv())}function G$(){return HM(),N2(),XM()}const X$=/^(data:|([A-Za-z]+:)?\/\/)/,Y$=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,P2=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,L2="file://";function KM(i,o){return ZM.apply(this,arguments)}function ZM(){return(ZM=(0,ai.Z)(function*(i,o){const a=yield this.sanitize(i,o),l=a.href;return a.localFile?this.file(l):this.http(l,o)})).apply(this,arguments)}function K$(i,o){return QM.apply(this,arguments)}function QM(){return(QM=(0,ai.Z)(function*(i,o){o=(0,N.l7)({},this.options,o);const a=this.fileAccess,l={href:null};let u,f,m;const g=Y$.test(i.replace(P2,""));(null==i||"string"!=typeof i||!g)&&(0,N.vU)("Sanitize failure, invalid URI: "+(0,N.m8)(i));const b=X$.test(i);return(m=o.baseURL)&&!b&&(!i.startsWith("/")&&!m.endsWith("/")&&(i="/"+i),i=m+i),f=(u=i.startsWith(L2))||"file"===o.mode||"http"!==o.mode&&!b&&a,u?i=i.slice(L2.length):i.startsWith("//")&&("file"===o.defaultProtocol?(i=i.slice(2),f=!0):i=(o.defaultProtocol||"http")+":"+i),Object.defineProperty(l,"localFile",{value:!!f}),l.href=i,o.target&&(l.target=o.target+""),o.rel&&(l.rel=o.rel+""),"image"===o.context&&o.crossOrigin&&(l.crossOrigin=o.crossOrigin+""),l})).apply(this,arguments)}function V1(i){return i?o=>new Promise((a,l)=>{i.readFile(o,(u,f)=>{u?l(u):a(f)})}):Kh}function Kh(){return j1.apply(this,arguments)}function j1(){return(j1=(0,ai.Z)(function*(){(0,N.vU)("No file system access.")})).apply(this,arguments)}function JM(i){return i?function(){var o=(0,ai.Z)(function*(a,l){const u=(0,N.l7)({},this.options.http,l),f=l&&l.response,m=yield i(a,u);return m.ok?(0,N.mf)(m[f])?m[f]():m.text():(0,N.vU)(m.status+""+m.statusText)});return function(a,l){return o.apply(this,arguments)}}():vo}function vo(){return ry.apply(this,arguments)}function ry(){return(ry=(0,ai.Z)(function*(){(0,N.vU)("No HTTP fetch method available.")})).apply(this,arguments)}const eA=i=>null!=i&&i==i,pv=i=>!(Number.isNaN(+i)||i instanceof Date),oy={boolean:N.sw,integer:N.He,number:N.He,date:N.ZU,string:N.BB,unknown:N.yR},mv=[i=>"true"===i||"false"===i||!0===i||!1===i,i=>pv(i)&&Number.isInteger(+i),pv,i=>!Number.isNaN(Date.parse(i))],nt=["boolean","integer","number","date"];function U1(i,o){if(!i||!i.length)return"unknown";const a=i.length,l=mv.length,u=mv.map((f,m)=>m+1);for(let g,b,f=0,m=0;f0===f?m:f,0)-1]}function _d(i,o){return o.reduce((a,l)=>(a[l]=U1(i,l),a),{})}function gv(i){const o=function(a,l){const u={delimiter:i};return H1(a,l?(0,N.l7)(l,u):u)};return o.responseType="text",o}function H1(i,o){return o.header&&(i=o.header.map(N.m8).join(o.delimiter)+"\n"+i),fe(o.delimiter).parse(i+"")}function er(i,o){const a=o&&o.property?(0,N.EP)(o.property):N.yR;return(0,N.Kn)(i)&&!function B2(i){return!("function"!=typeof Buffer||!(0,N.mf)(Buffer.isBuffer))&&Buffer.isBuffer(i)}(i)?function W1(i,o){return!(0,N.kJ)(i)&&(0,N.TW)(i)&&(i=[...i]),o&&o.copy?JSON.parse(JSON.stringify(i)):i}(a(i),o):a(JSON.parse(i))}H1.responseType="text",er.responseType="json";const sy={interior:(i,o)=>i!==o,exterior:(i,o)=>i===o};function oa(i,o){let a,l,u,f;return i=er(i,o),o&&o.feature?(a=At,u=o.feature):o&&o.mesh?(a=yt,u=o.mesh,f=sy[o.filter]):(0,N.vU)("Missing TopoJSON feature or mesh parameter."),l=(l=i.objects[u])?a(i,l,f):(0,N.vU)("Invalid TopoJSON object: "+u),l&&l.features||[l]}oa.responseType="json";const Ym={dsv:H1,csv:gv(","),tsv:gv("\t"),json:er,topojson:oa};function gl(i,o){return arguments.length>1?(Ym[i]=o,this):(0,N.nr)(Ym,i)?Ym[i]:null}function Zh(i){const o=gl(i);return o&&o.responseType||"text"}function Wa(i,o,a,l){const u=gl((o=o||{}).type||"json");return u||(0,N.vU)("Unknown data format type: "+o.type),i=u(i,o),o.parse&&function nA(i,o,a,l){if(!i.length)return;const u=hv();a=a||u.timeParse,l=l||u.utcParse;let m,g,b,v,w,C,f=i.columns||Object.keys(i[0]);"auto"===o&&(o=_d(i,f)),f=Object.keys(o);const D=f.map(T=>{const I=o[T];let k,F;if(I&&(I.startsWith("date:")||I.startsWith("utc:")))return k=I.split(/:(.+)?/,2),F=k[1],("'"===F[0]&&"'"===F[F.length-1]||'"'===F[0]&&'"'===F[F.length-1])&&(F=F.slice(1,-1)),("utc"===k[0]?l:a)(F);if(!oy[I])throw Error("Illegal format pattern: "+T+":"+I);return oy[I]});for(b=0,w=i.length,C=f.length;b({options:a||{},sanitize:K$,load:KM,fileAccess:!!o,file:V1(o),http:JM(i)})}(typeof fetch<"u"&&fetch,null);function _v(i){const o=i||N.yR,a=[],l={};return a.add=u=>{const f=o(u);return l[f]||(l[f]=1,a.push(u)),a},a.remove=u=>{const f=o(u);if(l[f]){l[f]=0;const m=a.indexOf(u);m>=0&&a.splice(m,1)}return a},a}function qo(i,o){return ay.apply(this,arguments)}function ay(){return(ay=(0,ai.Z)(function*(i,o){try{yield o(i)}catch(a){i.error(a)}})).apply(this,arguments)}const yv=Symbol("vega_id");let iA=1;function ly(i){return!(!i||!Kt(i))}function Kt(i){return i[yv]}function Qh(i,o){return i[yv]=o,i}function Ti(i){const o=i===Object(i)?i:{data:i};return Kt(o)?o:Qh(o,iA++)}function cy(i){return Vc(i,Ti({}))}function Vc(i,o){for(const a in i)o[a]=i[a];return o}function An(i,o){return Qh(o,Kt(i))}function Fr(i,o){return i?o?(a,l)=>i(a,l)||Kt(o(a))-Kt(o(l)):(a,l)=>i(a,l)||Kt(a)-Kt(l):null}function z2(i){return i&&i.constructor===Lf}function Lf(){const i=[],o=[],a=[],l=[],u=[];let f=null,m=!1;return{constructor:Lf,insert(g){const b=(0,N.IX)(g),v=b.length;for(let w=0;w{I(z)&&(v[Kt(z)]=-1)});for(C=0,D=i.length;C0&&(L(k,I,T.value),g.modifies(I));for(C=0,D=u.length;C{I(z)&&v[Kt(z)]>0&&L(z,T.field,T.value)}),g.modifies(T.field);if(m)g.mod=o.length||l.length?b.filter(z=>v[Kt(z)]>0):b.slice();else for(F in w)g.mod.push(w[F]);return(f||null==f&&(o.length||l.length))&&g.clean(!0),g}}}const bv="_:mod:_";function vv(){Object.defineProperty(this,bv,{writable:!0,value:{}})}vv.prototype={set(i,o,a,l){const u=this,f=u[i],m=u[bv];return null!=o&&o>=0?(f[o]!==a||l)&&(f[o]=a,m[o+":"+i]=-1,m[i]=-1):(f!==a||l)&&(u[i]=a,m[i]=(0,N.kJ)(a)?1+a.length:-1),u},modified(i,o){const a=this[bv];if(!arguments.length){for(const l in a)if(a[l])return!0;return!1}if((0,N.kJ)(i)){for(let l=0;l=0?o+1{T instanceof ar?(T!==this&&(o&&T.targets().add(this),f.push(T)),u.push({op:T,name:C,index:D})):l.set(C,D,T)};for(m in i)if(g=i[m],"pulse"===m)(0,N.IX)(g).forEach(C=>{C instanceof ar?C!==this&&(C.targets().add(this),f.push(C)):(0,N.vU)("Pulse parameters must be operator instances.")}),this.source=g;else if((0,N.kJ)(g))for(l.set(m,-1,Array(b=g.length)),v=0;vo=l);return a.requests=0,a.done=()=>{0==--a.requests&&(i._pending=null,o(i))},i._pending=a}(l);u.requests+=1;const f=yield l.request(o,a);return l.pulse(i,l.changeset().remove(N.yb).insert(f.data||[])),u.done(),f})).apply(this,arguments)}so.prototype={_filter:N.yb,_apply:N.yR,targets(){return this._targets||(this._targets=_v(N.id))},consume(i){return arguments.length?(this._consume=!!i,this):!!this._consume},receive(i){if(this._filter(i)){const o=this.value=this._apply(i),a=this._targets,l=a?a.length:0;for(let u=0;u{const a=Date.now();return a-o>i?(o=a,1):0})},debounce(i){const o=Un();return this.targets().add(Un(null,null,(0,N.Ds)(i,a=>{const l=a.dataflow;o.receive(a),l&&l.run&&l.run()}))),o},between(i,o){let a=!1;return i.targets().add(Un(null,null,()=>a=!0)),o.targets().add(Un(null,null,()=>a=!1)),this.filter(()=>a)},detach(){this._filter=N.yb,this._targets=null}};const Os={skip:!0};function wv(i,o,a,l,u,f){const m=(0,N.l7)({},f,Os);let g,b;(0,N.mf)(a)||(a=(0,N.a9)(a)),void 0===l?g=v=>i.touch(a(v)):(0,N.mf)(l)?(b=new ar(null,l,u,!1),g=v=>{b.evaluate(v);const w=a(v),C=b.value;z2(C)?i.pulse(w,C,f):i.update(w,C,m)}):g=v=>i.update(a(v),l,m),o.apply(g)}function Sa(i,o,a,l,u,f){if(void 0===l)o.targets().add(a);else{const m=f||{},g=new ar(null,function bd(i,o){return o=(0,N.mf)(o)?o:(0,N.a9)(o),i?function(a,l){const u=o(a,l);return i.skip()||(i.skip(u!==this.value).value=u),u}:o}(a,l),u,!1);g.modified(m.force),g.rank=o.rank,o.targets().add(g),a&&(g.skip(!0),g.value=a.value,g.targets().add(a),i.connect(a,[g]))}}const Cv={};function Go(i,o,a){this.dataflow=i,this.stamp=o??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=a||null}function vd(i,o){const a=[];return(0,N.FP)(i,o,l=>a.push(l)),a}function Sv(i,o){const a={};return i.visit(o,l=>{a[Kt(l)]=1}),l=>a[Kt(l)]?null:l}function Dv(i,o){return i?(a,l)=>i(a,l)&&o(a,l):o}function Xo(i,o,a,l){const u=this;let f=0;this.dataflow=i,this.stamp=o,this.fields=null,this.encode=l||null,this.pulses=a;for(const m of a)if(m.stamp===o){if(m.fields){const g=u.fields||(u.fields={});for(const b in m.fields)g[b]=1}m.changed(u.ADD)&&(f|=u.ADD),m.changed(u.REM)&&(f|=u.REM),m.changed(u.MOD)&&(f|=u.MOD)}this.changes=f}function Er(){return(Er=(0,ai.Z)(function*(i,o,a){const l=this,u=[];if(l._pulse)return aA(l);if(l._pending&&(yield l._pending),o&&(yield qo(l,o)),!l._touched.length)return l.debug("Dataflow invoked, but nothing to do."),l;const f=++l._clock;l._pulse=new Go(l,f,i),l._touched.forEach(w=>l._enqueue(w,!0)),l._touched=_v(N.id);let g,b,v,m=0;try{for(;l._heap.size()>0;)g=l._heap.pop(),g.rank===g.qrank?(b=g.run(l._getPulse(g,i)),b.then?b=yield b:b.async&&(u.push(b.async),b=Cv),b!==Cv&&g._targets&&g._targets.forEach(w=>l._enqueue(w)),++m):l._enqueue(g,!0)}catch(w){l._heap.clear(),v=w}if(l._input={},l._pulse=null,l.debug(`Pulse ${f}: ${m} operators`),v&&(l._postrun=[],l.error(v)),l._postrun.length){const w=l._postrun.sort((C,D)=>D.priority-C.priority);l._postrun=[];for(let C=0;Cl.runAsync(null,()=>{w.forEach(C=>{try{C(l)}catch(D){l.error(D)}})})),l})).apply(this,arguments)}function oA(){return(oA=(0,ai.Z)(function*(i,o,a){for(;this._running;)yield this._running;const l=()=>this._running=null;return(this._running=this.evaluate(i,o,a)).then(l,l),this._running})).apply(this,arguments)}function aA(i){return i.error("Dataflow already running. Use runAsync() to chain invocations."),i}Go.prototype={StopPropagation:Cv,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(i){return new Go(this.dataflow).init(this,i)},clone(){const i=this.fork(7);return i.add=i.add.slice(),i.rem=i.rem.slice(),i.mod=i.mod.slice(),i.source&&(i.source=i.source.slice()),i.materialize(23)},addAll(){let i=this;return!i.source||i.add===i.rem||!i.rem.length&&i.source.length===i.add.length||(i=new Go(this.dataflow).init(this),i.add=i.source,i.rem=[]),i},init(i,o){const a=this;return a.stamp=i.stamp,a.encode=i.encode,i.fields&&!(64&o)&&(a.fields=i.fields),1&o?(a.addF=i.addF,a.add=i.add):(a.addF=null,a.add=[]),2&o?(a.remF=i.remF,a.rem=i.rem):(a.remF=null,a.rem=[]),4&o?(a.modF=i.modF,a.mod=i.mod):(a.modF=null,a.mod=[]),32&o?(a.srcF=null,a.source=null):(a.srcF=i.srcF,a.source=i.source,i.cleans&&(a.cleans=i.cleans)),a},runAfter(i){this.dataflow.runAfter(i)},changed(i){const o=i||7;return 1&o&&this.add.length||2&o&&this.rem.length||4&o&&this.mod.length},reflow(i){if(i)return this.fork(7).reflow();const o=this.add.length,a=this.source&&this.source.length;return a&&a!==o&&(this.mod=this.source,o&&this.filter(4,Sv(this,1))),this},clean(i){return arguments.length?(this.cleans=!!i,this):this.cleans},modifies(i){const o=this.fields||(this.fields={});return(0,N.kJ)(i)?i.forEach(a=>o[a]=!0):o[i]=!0,this},modified(i,o){const a=this.fields;return!(!o&&!this.mod.length||!a)&&(arguments.length?(0,N.kJ)(i)?i.some(l=>a[l]):a[i]:!!a)},filter(i,o){const a=this;return 1&i&&(a.addF=Dv(a.addF,o)),2&i&&(a.remF=Dv(a.remF,o)),4&i&&(a.modF=Dv(a.modF,o)),16&i&&(a.srcF=Dv(a.srcF,o)),a},materialize(i){const o=this;return 1&(i=i||7)&&o.addF&&(o.add=vd(o.add,o.addF),o.addF=null),2&i&&o.remF&&(o.rem=vd(o.rem,o.remF),o.remF=null),4&i&&o.modF&&(o.mod=vd(o.mod,o.modF),o.modF=null),16&i&&o.srcF&&(o.source=o.source.filter(o.srcF),o.srcF=null),o},visit(i,o){const a=this,l=o;if(16&i)return(0,N.FP)(a.source,a.srcF,l),a;1&i&&(0,N.FP)(a.add,a.addF,l),2&i&&(0,N.FP)(a.rem,a.remF,l),4&i&&(0,N.FP)(a.mod,a.modF,l);const u=a.source;if(8&i&&u){const f=a.add.length+a.mod.length;f===u.length||(0,N.FP)(u,f?Sv(a,5):a.srcF,l)}return a}},(0,N.XW)(Xo,Go,{fork(i){const o=new Go(this.dataflow).init(this,i&this.NO_FIELDS);return void 0!==i&&(i&o.ADD&&this.visit(o.ADD,a=>o.add.push(a)),i&o.REM&&this.visit(o.REM,a=>o.rem.push(a)),i&o.MOD&&this.visit(o.MOD,a=>o.mod.push(a))),o},changed(i){return this.changes&i},modified(i){const o=this,a=o.fields;return a&&o.changes&o.MOD?(0,N.kJ)(i)?i.some(l=>a[l]):a[i]:0},filter(){(0,N.vU)("MultiPulse does not support filtering.")},materialize(){(0,N.vU)("MultiPulse does not support materialization.")},visit(i,o){const a=this,l=a.pulses,u=l.length;let f=0;if(i&a.SOURCE)for(;fo&&(f=a-1>>1,u=i[f],l(m,u)<0);)i[a]=u,a=f;return i[a]=m}function xd(){this.logger((0,N.kg)()),this.logLevel(N.jj),this._clock=0,this._rank=0,this._locale=XM();try{this._loader=Pf()}catch{}this._touched=_v(N.id),this._input={},this._pulse=null,this._heap=function nE(i){let o=[];return{clear:()=>o=[],size:()=>o.length,peek:()=>o[0],push:a=>(o.push(a),Rs(o,0,o.length-1,i)),pop:()=>{const a=o.pop();let l;return o.length?(l=o[0],o[0]=a,function iE(i,o,a){const l=o,u=i.length,f=i[o];let g,m=1+(o<<1);for(;m=0&&(m=g),i[o]=i[m],m=1+((o=m)<<1);i[o]=f,Rs(i,l,o,a)}(o,0,i)):l=a,l}}}((i,o)=>i.qrank-o.qrank),this._postrun=[]}function _l(i){return function(){return this._log[i].apply(this,arguments)}}function ze(i,o){ar.call(this,i,null,o)}xd.prototype={stamp(){return this._clock},loader(i){return arguments.length?(this._loader=i,this):this._loader},locale(i){return arguments.length?(this._locale=i,this):this._locale},logger(i){return arguments.length?(this._log=i,this):this._log},error:_l("error"),warn:_l("warn"),info:_l("info"),debug:_l("debug"),logLevel:_l("level"),cleanThreshold:1e4,add:function qe(i,o,a,l){let f,u=1;return i instanceof ar?f=i:i&&i.prototype instanceof ar?f=new i:(0,N.mf)(i)?f=new ar(null,i):(u=0,f=new ar(i,o)),this.rank(f),u&&(l=a,a=o),a&&this.connect(f,f.parameters(a,l)),this.touch(f),f},connect:function bi(i,o){const a=i.rank,l=o.length;for(let u=0;u=0;)o.push(a=l[u]),a===i&&(0,N.vU)("Cycle detected in dataflow graph.")},pulse:function Mv(i,o,a){this.touch(i,a||tE);const l=new Go(this,this._clock+(this._pulse?0:1)),u=i.pulse&&i.pulse.source||[];return l.target=i,this._input[i.id]=o.pulse(l,u),this},touch:function Qm(i,o){const a=o||tE;return this._pulse?this._enqueue(i):this._touched.add(i),a.skip&&i.skip(!0),this},update:function fy(i,o,a){const l=a||tE;return(i.set(o)||l.force)&&this.touch(i,l),this},changeset:Lf,ingest:function ic(i,o,a){return o=this.parse(o,a),this.pulse(i,this.changeset().insert(o))},parse:function Zm(i,o){const a=this.locale();return Wa(i,o,a.timeParse,a.utcParse)},preload:function V2(i,o,a){return Z1.apply(this,arguments)},request:function K1(i,o){return yd.apply(this,arguments)},events:function rA(i,o,a,l){const u=this,f=Un(a,l),m=function(v){v.dataflow=u;try{f.receive(v)}catch(w){u.error(w)}finally{u.run()}};let g;g="string"==typeof i&&typeof document<"u"?document.querySelectorAll(i):(0,N.IX)(i);const b=g.length;for(let v=0;vu.pulse),o):this._input[i.id]||function Bf(i,o){return o&&o.stamp===i.stamp?o:(i=i.fork(),o&&o!==Cv&&(i.source=o.source),i)}(this._pulse,a&&a.pulse)}},(0,N.XW)(ze,ar,{run(i){if(i.stampthis.pulse=a):o!==i.StopPropagation&&(this.pulse=o),o},evaluate(i){const o=this.marshall(i.stamp),a=this.transform(o,i);return o.clear(),a},transform(){}});const wd={};function np(i){const o=lA(i);return o&&o.Definition||null}function lA(i){return i=i&&i.toLowerCase(),(0,N.nr)(wd,i)?wd[i]:null}function Su(i,o){let a;if(void 0===o)for(const l of i)null!=l&&(a=l)&&(a=l);else{let l=-1;for(let u of i)null!=(u=o(u,++l,i))&&(a=u)&&(a=u)}return a}function Av(i,o){let a;if(void 0===o)for(const l of i)null!=l&&(a>l||void 0===a&&l>=l)&&(a=l);else{let l=-1;for(let u of i)null!=(u=o(u,++l,i))&&(a>u||void 0===a&&u>=u)&&(a=u)}return a}function zf(i,o){return(null==i||!(i>=i))-(null==o||!(o>=o))||(io?1:0)}function Vf(i,o,a=0,l=1/0,u){if(o=Math.floor(o),a=Math.floor(Math.max(0,a)),l=Math.floor(Math.min(i.length-1,l)),!(a<=o&&o<=l))return i;for(u=void 0===u?zf:function H2(i=Tf){if(i===Tf)return zf;if("function"!=typeof i)throw new TypeError("compare is not a function");return(o,a)=>{const l=i(o,a);return l||0===l?l:(0===i(a,a))-(0===i(o,o))}}(u);l>a;){if(l-a>600){const b=l-a+1,v=o-a+1,w=Math.log(b),C=.5*Math.exp(2*w/3),D=.5*Math.sqrt(w*C*(b-C)/b)*(v-b/2<0?-1:1);Vf(i,o,Math.max(a,Math.floor(o-v*C/b+D)),Math.min(l,Math.floor(o+(b-v)*C/b+D)),u)}const f=i[o];let m=a,g=l;for(Jm(i,a,o),u(i[l],f)>0&&Jm(i,a,l);m0;)--g}0===u(i[a],f)?Jm(i,a,g):(++g,Jm(i,g,l)),g<=o&&(a=g+1),o<=g&&(l=g-1)}return i}function Jm(i,o,a){const l=i[o];i[o]=i[a],i[a]=l}function yl(i){return null===i?NaN:+i}function eg(i,o,a){if(i=Float64Array.from(function*ip(i,o){if(void 0===o)for(let a of i)null!=a&&(a=+a)>=a&&(yield a);else{let a=-1;for(let l of i)null!=(l=o(l,++a,i))&&(l=+l)>=l&&(yield l)}}(i,a)),(l=i.length)&&!isNaN(o=+o)){if(o<=0||l<2)return Av(i);if(o>=1)return Su(i);var l,u=(l-1)*o,f=Math.floor(u),m=Su(Vf(i,f).subarray(0,f+1));return m+(Av(i.subarray(f+1))-m)*(u-f)}}function Du(i,o,a=yl){if((l=i.length)&&!isNaN(o=+o)){if(o<=0||l<2)return+a(i[0],0,i);if(o>=1)return+a(i[l-1],l-1,i);var l,u=(l-1)*o,f=Math.floor(u),m=+a(i[f],f,i);return m+(+a(i[f+1],f+1,i)-m)*(u-f)}}function Mu(i,o){return eg(i,.5,o)}function*hy(i,o){if(null==o)for(let a of i)null!=a&&""!==a&&(a=+a)>=a&&(yield a);else{let a=-1;for(let l of i)l=o(l,++a,i),null!=l&&""!==l&&(l=+l)>=l&&(yield l)}}function py(i,o,a){const l=Float64Array.from(hy(i,a));return l.sort(Tf),o.map(u=>Du(l,u))}function rE(i,o){return py(i,[.25,.5,.75],o)}function rp(i,o){const a=i.length,l=function q2(i,o){const a=function cA(i,o){let l,a=0,u=0,f=0;if(void 0===o)for(let m of i)null!=m&&(m=+m)>=m&&(l=m-u,u+=l/++a,f+=l*(m-u));else{let m=-1;for(let g of i)null!=(g=o(g,++m,i))&&(g=+g)>=g&&(l=g-u,u+=l/++a,f+=l*(g-u))}if(a>1)return f/(a-1)}(i,o);return a&&Math.sqrt(a)}(i,o),u=rE(i,o);return 1.06*(Math.min(l,(u[2]-u[0])/1.34)||l||Math.abs(u[0])||1)*Math.pow(a,-.2)}function Au(i){const o=i.maxbins||20,a=i.base||10,l=Math.log(a),u=i.divide||[5,2];let g,b,v,w,C,D,f=i.extent[0],m=i.extent[1];const T=i.span||m-f||Math.abs(f)||1;if(i.step)g=i.step;else if(i.steps){for(w=T/o,C=0,D=i.steps.length;Co;)g*=a;for(C=0,D=u.length;C=v&&T/w<=o&&(g=w)}w=Math.log(g);const k=Math.pow(a,-(w>=0?0:1+~~(-w/l))-1);return(i.nice||void 0===i.nice)&&(w=Math.floor(f/g+k)*g,f=fD);const u=i.length,f=new Float64Array(u);let C,m=0,g=1,b=l(i[0]),v=b,w=b+o;for(;g=w){for(v=(b+v)/2;m>1);mu;)i[m--]=i[l]}l=u,u=f}return i}(f,o+o/4):f}function X2(i){return function(){return(i=(1103515245*i+12345)%2147483647)/2147483647}}function tg(i,o){let a,l,u;null==o&&(o=i,i=0);const f={min(m){return arguments.length?(a=m||0,u=l-a,f):a},max(m){return arguments.length?(l=m||0,u=l-a,f):l},sample:()=>a+Math.floor(u*oc()),pdf:m=>m===Math.floor(m)&&m>=a&&m=l?1:(g-a+1)/u},icdf:m=>m>=0&&m<=1?a-1+Math.floor(m*u):NaN};return f.min(i).max(o)}const jf=Math.sqrt(2*Math.PI),Y2=Math.SQRT2;let Uf=NaN;function my(i,o){i=i||0,o=o??1;let u,f,a=0,l=0;if(Uf==Uf)a=Uf,Uf=NaN;else{do{a=2*oc()-1,l=2*oc()-1,u=a*a+l*l}while(0===u||u>1);f=Math.sqrt(-2*Math.log(u)/u),a*=f,Uf=l*f}return i+a*o}function Xa(i,o,a){const l=(i-(o||0))/(a=a??1);return Math.exp(-.5*l*l)/(a*jf)}function sc(i,o,a){const l=(i-(o=o||0))/(a=a??1),u=Math.abs(l);let f;if(u>37)f=0;else{const m=Math.exp(-u*u/2);let g;u<7.07106781186547?(g=.0352624965998911*u+.700383064443688,g=g*u+6.37396220353165,g=g*u+33.912866078383,g=g*u+112.079291497871,g=g*u+221.213596169931,g=g*u+220.206867912376,f=m*g,g=.0883883476483184*u+1.75566716318264,g=g*u+16.064177579207,g=g*u+86.7807322029461,g=g*u+296.564248779674,g=g*u+637.333633378831,g=g*u+793.826512519948,g=g*u+440.413735824752,f/=g):(g=u+.65,g=u+4/g,g=u+3/g,g=u+2/g,g=u+1/g,f=m/g/2.506628274631)}return l>0?1-f:f}function ao(i,o,a){return i<0||i>1?NaN:(o||0)+(a??1)*Y2*function lE(i){let a,o=-Math.log((1-i)*(1+i));return o<6.25?(o-=3.125,a=-364441206401782e-35,a=a*o-16850591381820166e-35,a=128584807152564e-32+a*o,a=11157877678025181e-33+a*o,a=a*o-1333171662854621e-31,a=20972767875968562e-33+a*o,a=6637638134358324e-30+a*o,a=a*o-4054566272975207e-29,a=a*o-8151934197605472e-29,a=26335093153082323e-28+a*o,a=a*o-12975133253453532e-27,a=a*o-5415412054294628e-26,a=1.0512122733215323e-9+a*o,a=a*o-4.112633980346984e-9,a=a*o-2.9070369957882005e-8,a=4.2347877827932404e-7+a*o,a=a*o-13654692000834679e-22,a=a*o-13882523362786469e-21,a=.00018673420803405714+a*o,a=a*o-.000740702534166267,a=a*o-.006033670871430149,a=.24015818242558962+a*o,a=1.6536545626831027+a*o):o<16?(o=Math.sqrt(o)-3.25,a=2.2137376921775787e-9,a=9.075656193888539e-8+a*o,a=a*o-2.7517406297064545e-7,a=1.8239629214389228e-8+a*o,a=15027403968909828e-22+a*o,a=a*o-4013867526981546e-21,a=29234449089955446e-22+a*o,a=12475304481671779e-21+a*o,a=a*o-47318229009055734e-21,a=6828485145957318e-20+a*o,a=24031110387097894e-21+a*o,a=a*o-.0003550375203628475,a=.0009532893797373805+a*o,a=a*o-.0016882755560235047,a=.002491442096107851+a*o,a=a*o-.003751208507569241,a=.005370914553590064+a*o,a=1.0052589676941592+a*o,a=3.0838856104922208+a*o):Number.isFinite(o)?(o=Math.sqrt(o)-5,a=-27109920616438573e-27,a=a*o-2.555641816996525e-10,a=1.5076572693500548e-9+a*o,a=a*o-3.789465440126737e-9,a=7.61570120807834e-9+a*o,a=a*o-1.496002662714924e-8,a=2.914795345090108e-8+a*o,a=a*o-6.771199775845234e-8,a=2.2900482228026655e-7+a*o,a=a*o-9.9298272942317e-7,a=4526062597223154e-21+a*o,a=a*o-1968177810553167e-20,a=7599527703001776e-20+a*o,a=a*o-.00021503011930044477,a=a*o-.00013871931833623122,a=1.0103004648645344+a*o,a=4.849906401408584+a*o):a=1/0,a*i}(2*i-1)}function Fi(i,o){let a,l;const u={mean(f){return arguments.length?(a=f||0,u):a},stdev(f){return arguments.length?(l=f??1,u):l},sample:()=>my(a,l),pdf:f=>Xa(f,a,l),cdf:f=>sc(f,a,l),icdf:f=>ao(f,a,l)};return u.mean(i).stdev(o)}function Uc(i,o){const a=Fi();let l=0;const u={data(f){return arguments.length?(i=f,l=f?f.length:0,u.bandwidth(o)):i},bandwidth(f){return arguments.length?(!(o=f)&&i&&(o=rp(i)),u):o},sample:()=>i[~~(oc()*l)]+o*a.sample(),pdf(f){let m=0,g=0;for(;gTv(a,l),pdf:f=>kv(f,a,l),cdf:f=>Hc(f,a,l),icdf:f=>Ed(f,a,l)};return u.mean(i).stdev(o)}function Hf(i,o){let l,a=0;const f={weights(m){return arguments.length?(l=function u(m){const g=[];let v,b=0;for(v=0;v=o&&i<=a?1/(a-o):0}function Wf(i,o,a){return null==a&&(a=o??1,o=0),ia?1:(i-o)/(a-o)}function cE(i,o,a){return null==a&&(a=o??1,o=0),i>=0&&i<=1?o+i*(a-o):NaN}function uE(i,o){let a,l;const u={min(f){return arguments.length?(a=f||0,u):a},max(f){return arguments.length?(l=f??1,u):l},sample:()=>gy(a,l),pdf:f=>op(f,a,l),cdf:f=>Wf(f,a,l),icdf:f=>cE(f,a,l)};return null==o&&(o=i??1,i=0),u.min(i).max(o)}function ng(i,o,a){let l=0,u=0;for(const f of i){const m=a(f);null==o(f)||null==m||isNaN(m)||(l+=(m-l)/++u)}return{coef:[l],predict:()=>l,rSquared:0}}function Iv(i,o,a,l){const u=l-i*i,f=Math.abs(u)<1e-24?0:(a-i*o)/u;return[o-f*i,f]}function ig(i,o,a,l){i=i.filter(T=>{let I=o(T),k=a(T);return null!=I&&(I=+I)>=I&&null!=k&&(k=+k)>=k}),l&&i.sort((T,I)=>o(T)-o(I));const u=i.length,f=new Float64Array(u),m=new Float64Array(u);let w,C,D,g=0,b=0,v=0;for(D of i)f[g]=w=+o(D),m[g]=C=+a(D),++g,b+=(w-b)/g,v+=(C-v)/g;for(g=0;g=f&&null!=m&&(m=+m)>=m&&l(f,m,++u)}function rg(i,o,a,l,u){let f=0,m=0;return Ov(i,o,a,(g,b)=>{const v=b-u(g),w=b-l;f+=v*v,m+=w*w}),1-f/m}function dE(i,o,a){let l=0,u=0,f=0,m=0,g=0;Ov(i,o,a,(w,C)=>{++g,l+=(w-l)/g,u+=(C-u)/g,f+=(w*C-f)/g,m+=(w*w-m)/g});const b=Iv(l,u,f,m),v=w=>b[0]+b[1]*w;return{coef:b,predict:v,rSquared:rg(i,o,a,u,v)}}function sa(i,o,a){let l=0,u=0,f=0,m=0,g=0;Ov(i,o,a,(w,C)=>{++g,w=Math.log(w),l+=(w-l)/g,u+=(C-u)/g,f+=(w*C-f)/g,m+=(w*w-m)/g});const b=Iv(l,u,f,m),v=w=>b[0]+b[1]*Math.log(w);return{coef:b,predict:v,rSquared:rg(i,o,a,u,v)}}function fE(i,o,a){const[l,u,f,m]=ig(i,o,a);let D,T,I,g=0,b=0,v=0,w=0,C=0;Ov(i,o,a,(z,V)=>{D=l[C++],T=Math.log(V),I=D*V,g+=(V*T-g)/C,b+=(I-b)/C,v+=(I*T-v)/C,w+=(D*I-w)/C});const[k,F]=Iv(b/m,g/m,v/m,w/m),L=z=>Math.exp(k+F*(z-f));return{coef:[Math.exp(k-F*f),F],predict:L,rSquared:rg(i,o,a,m,L)}}function og(i,o,a){let l=0,u=0,f=0,m=0,g=0,b=0;Ov(i,o,a,(C,D)=>{const T=Math.log(C),I=Math.log(D);++b,l+=(T-l)/b,u+=(I-u)/b,f+=(T*I-f)/b,m+=(T*T-m)/b,g+=(D-g)/b});const v=Iv(l,u,f,m),w=C=>v[0]*Math.pow(C,v[1]);return v[0]=Math.exp(v[0]),{coef:v,predict:w,rSquared:rg(i,o,a,g,w)}}function Zr(i,o,a){const[l,u,f,m]=ig(i,o,a),g=l.length;let T,I,k,F,b=0,v=0,w=0,C=0,D=0;for(T=0;TV*(H-=f)*H+U*H+W+m;return{coef:[W-U*f+V*f*f+m,U-2*V*f,V],predict:Y,rSquared:rg(i,o,a,m,Y)}}function _y(i,o,a,l){if(0===l)return ng(i,o,a);if(1===l)return dE(i,o,a);if(2===l)return Zr(i,o,a);const[u,f,m,g]=ig(i,o,a),b=u.length,v=[],w=[],C=l+1;let D,T,I,k,F;for(D=0;DMath.abs(i[l][m])&&(m=u);for(f=l;f=l;f--)i[f][u]-=i[f][l]*i[l][u]/i[l][l]}for(u=o-1;u>=0;--u){for(g=0,f=u+1;f{let U=g+L[0]+L[1]*(V-=m)+L[2]*V*V;for(D=3;D=0;--f)for(g=o[f],b=1,u[f]+=g,m=1;m<=f;++m)b*=(f+1-m)/m,u[f-m]+=g*Math.pow(a,m)*b;return u[0]+=l,u}const aa=2,Cd=1e-12;function Tu(i,o,a,l){const[u,f,m,g]=ig(i,o,a,!0),b=u.length,v=Math.max(2,~~(l*b)),w=new Float64Array(b),C=new Float64Array(b),D=new Float64Array(b).fill(1);for(let T=-1;++T<=aa;){const I=[0,v-1];for(let F=0;Fu[V]-L?z:V]-L||1);for(let xe=z;xe<=V;++xe){const Q=u[xe],J=f[xe],oe=by(Math.abs(L-Q)*ce)*D[xe],we=Q*oe;W+=oe,Y+=we,H+=J*oe,Z+=J*we,te+=Q*we}const[le,ve]=Iv(Y/W,H/W,Z/W,te/W);w[F]=le+ve*L,C[F]=Math.abs(f[F]-w[F]),vy(u,F+1,I)}if(T===aa)break;const k=Mu(C);if(Math.abs(k)=1?Cd:(z=1-L*L)*z}return function Rv(i,o,a,l){const u=i.length,f=[];let v,m=0,g=0,b=[];for(;m=i.length))for(;o>u&&i[f]-l<=l-i[u];)a[0]=++u,a[1]=f,++f}const hE=.5*Math.PI/180;function qf(i,o,a,l){a=a||25,l=Math.max(a,l||200);const u=k=>[k,i(k)],f=o[0],m=o[1],g=m-f,b=g/l,v=[u(f)],w=[];if(a===l){for(let k=1;k0;)w.push(u(f+k/a*g));let C=v[0],D=w[w.length-1];const T=1/g,I=function Nv(i,o){let a=i,l=i;const u=o.length;for(let f=0;fl&&(l=m)}return 1/(l-a)}(C[1],w);for(;D;){const k=u((C[0]+D[0])/2);k[0]-C[0]>=b&&bl(C,k,D,T,I)>hE?w.push(k):(C=D,v.push(D),w.pop()),D=w[w.length-1]}return v}function bl(i,o,a,l,u){const f=Math.atan2(u*(a[1]-i[1]),l*(a[0]-i[0])),m=Math.atan2(u*(o[1]-i[1]),l*(o[0]-i[0]));return Math.abs(f-m)}function Qr(i,o,a){i=+i,o=+o,a=(u=arguments.length)<2?(o=i,i=0,1):u<3?1:+a;for(var l=-1,u=0|Math.max(0,Math.ceil((o-i)/a)),f=new Array(u);++l{const a=i.length;let l=1,u=String(i[0](o));for(;l{},Bn={init:sg,add:sg,rem:sg,idx:0},Yo={values:{init:i=>i.cell.store=!0,value:i=>i.cell.data.values(),idx:-1},count:{value:i=>i.cell.num},__count__:{value:i=>i.missing+i.valid},missing:{value:i=>i.missing},valid:{value:i=>i.valid},sum:{init:i=>i.sum=0,value:i=>i.valid?i.sum:void 0,add:(i,o)=>i.sum+=+o,rem:(i,o)=>i.sum-=o},product:{init:i=>i.product=1,value:i=>i.valid?i.product:void 0,add:(i,o)=>i.product*=o,rem:(i,o)=>i.product/=o},mean:{init:i=>i.mean=0,value:i=>i.valid?i.mean:void 0,add:(i,o)=>(i.mean_d=o-i.mean,i.mean+=i.mean_d/i.valid),rem:(i,o)=>(i.mean_d=o-i.mean,i.mean-=i.valid?i.mean_d/i.valid:i.mean)},average:{value:i=>i.valid?i.mean:void 0,req:["mean"],idx:1},variance:{init:i=>i.dev=0,value:i=>i.valid>1?i.dev/(i.valid-1):void 0,add:(i,o)=>i.dev+=i.mean_d*(o-i.mean),rem:(i,o)=>i.dev-=i.mean_d*(o-i.mean),req:["mean"],idx:1},variancep:{value:i=>i.valid>1?i.dev/i.valid:void 0,req:["variance"],idx:2},stdev:{value:i=>i.valid>1?Math.sqrt(i.dev/(i.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:i=>i.valid>1?Math.sqrt(i.dev/i.valid):void 0,req:["variance"],idx:2},stderr:{value:i=>i.valid>1?Math.sqrt(i.dev/(i.valid*(i.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:i=>i.cell.data.distinct(i.get),req:["values"],idx:3},ci0:{value:i=>i.cell.data.ci0(i.get),req:["values"],idx:3},ci1:{value:i=>i.cell.data.ci1(i.get),req:["values"],idx:3},median:{value:i=>i.cell.data.q2(i.get),req:["values"],idx:3},q1:{value:i=>i.cell.data.q1(i.get),req:["values"],idx:3},q3:{value:i=>i.cell.data.q3(i.get),req:["values"],idx:3},min:{init:i=>i.min=void 0,value:i=>i.min=Number.isNaN(i.min)?i.cell.data.min(i.get):i.min,add:(i,o)=>{(o{o<=i.min&&(i.min=NaN)},req:["values"],idx:4},max:{init:i=>i.max=void 0,value:i=>i.max=Number.isNaN(i.max)?i.cell.data.max(i.get):i.max,add:(i,o)=>{(o>i.max||void 0===i.max)&&(i.max=o)},rem:(i,o)=>{o>=i.max&&(i.max=NaN)},req:["values"],idx:4},argmin:{init:i=>i.argmin=void 0,value:i=>i.argmin||i.cell.data.argmin(i.get),add:(i,o,a)=>{o{o<=i.min&&(i.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:i=>i.argmax=void 0,value:i=>i.argmax||i.cell.data.argmax(i.get),add:(i,o,a)=>{o>i.max&&(i.argmax=a)},rem:(i,o)=>{o>=i.max&&(i.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(i,o)=>{i.exp=0,i.exp_r=o},value:i=>i.valid?i.exp*(1-i.exp_r)/(1-i.exp_r**i.valid):void 0,add:(i,o)=>i.exp=i.exp_r*i.exp+o,rem:(i,o)=>i.exp=(i.exp-o/i.exp_r**(i.valid-1))/i.exp_r},exponentialb:{value:i=>i.valid?i.exp*(1-i.exp_r):void 0,req:["exponential"],idx:1}},Ma=Object.keys(Yo).filter(i=>"__count__"!==i);function Dd(i,o,a){return Yo[i](a,o)}function ag(i,o){return i.idx-o.idx}function ap(){this.valid=0,this.missing=0,this._ops.forEach(i=>null==i.aggregate_param?i.init(this):i.init(this,i.aggregate_param))}function Z2(i,o){null!=i&&""!==i?i==i&&(++this.valid,this._ops.forEach(a=>a.add(this,i,o))):++this.missing}function pt(i,o){null!=i&&""!==i?i==i&&(--this.valid,this._ops.forEach(a=>a.rem(this,i,o))):--this.missing}function Fv(i){return this._out.forEach(o=>i[o.out]=o.value(this)),i}function mE(i,o){const a=o||N.yR,l=function dA(i){const o={};i.forEach(l=>o[l.name]=l);const a=l=>{l.req&&l.req.forEach(u=>{o[u]||a(o[u]=Yo[u]())})};return i.forEach(a),Object.values(o).sort(ag)}(i),u=i.slice().sort(ag);function f(m){this._ops=l,this._out=u,this.cell=m,this.init()}return f.prototype.init=ap,f.prototype.add=Z2,f.prototype.rem=pt,f.prototype.set=Fv,f.prototype.get=a,f.fields=i.map(m=>m.out),f}function xy(i){this._key=i?(0,N.EP)(i):Kt,this.reset()}[...Ma,"__count__"].forEach(i=>{Yo[i]=function sp(i,o){return(a,l)=>(0,N.l7)({name:i,aggregate_param:l,out:a||i},Bn,o)}(i,Yo[i])});const Io=xy.prototype;function Md(i){ze.call(this,null,i),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 Pv(i){ze.call(this,null,i)}function Gf(i,o,a){const l=i;let u=o||[],f=a||[],m={},g=0;return{add:b=>f.push(b),remove:b=>m[l(b)]=++g,size:()=>u.length,data:(b,v)=>(g&&(u=u.filter(w=>!m[l(w)]),m={},g=0),v&&b&&u.sort(b),f.length&&(u=b?(0,N.TS)(b,u,f.sort(b)):u.concat(f),f=[]),u)}}function lp(i){ze.call(this,[],i)}function cp(i){ar.call(this,null,hA,i)}function hA(i){return this.value&&!i.modified()?this.value:(0,N.qu)(i.fields,i.orders)}function lg(i){ze.call(this,null,i)}function pA(i){ze.call(this,null,i)}Io.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},Io.add=function(i){this._add.push(i)},Io.rem=function(i){this._rem.push(i)},Io.values=function(){if(this._get=null,0===this._rem.length)return this._add;const i=this._add,o=this._rem,a=this._key,l=i.length,u=o.length,f=Array(l-u),m={};let g,b,v;for(g=0;g=0;)f=i(o[l])+"",(0,N.nr)(a,f)||(a[f]=1,++u);return u},Io.extent=function(i){if(this._get!==i||!this._ext){const o=this.values(),a=(0,N.dI)(o,i);this._ext=[o[a[0]],o[a[1]]],this._get=i}return this._ext},Io.argmin=function(i){return this.extent(i)[0]||{}},Io.argmax=function(i){return this.extent(i)[1]||{}},Io.min=function(i){const o=this.extent(i)[0];return null!=o?i(o):void 0},Io.max=function(i){const o=this.extent(i)[1];return null!=o?i(o):void 0},Io.quartile=function(i){return(this._get!==i||!this._q)&&(this._q=rE(this.values(),i),this._get=i),this._q},Io.q1=function(i){return this.quartile(i)[0]},Io.q2=function(i){return this.quartile(i)[1]},Io.q3=function(i){return this.quartile(i)[2]},Io.ci=function(i){return(this._get!==i||!this._ci)&&(this._ci=sE(this.values(),1e3,.05,i),this._get=i),this._ci},Io.ci0=function(i){return this.ci(i)[0]},Io.ci1=function(i){return this.ci(i)[1]},Md.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Ma},{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"}]},(0,N.XW)(Md,ze,{transform(i,o){const a=this,l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=i.modified();return a.stamp=l.stamp,a.value&&(u||o.modified(a._inputs,!0))?(a._prev=a.value,a.value=u?a.init(i):Object.create(null),o.visit(o.SOURCE,f=>a.add(f))):(a.value=a.value||a.init(i),o.visit(o.REM,f=>a.rem(f)),o.visit(o.ADD,f=>a.add(f))),l.modifies(a._outputs),a._drop=!1!==i.drop,i.cross&&a._dims.length>1&&(a._drop=!1,a.cross()),o.clean()&&a._drop&&l.clean(!0).runAfter(()=>this.clean()),a.changes(l)},cross(){const i=this,o=i.value,a=i._dnames,l=a.map(()=>({})),u=a.length;function f(g){let b,v,w,C;for(b in g)for(w=g[b].tuple,v=0;v{const V=(0,N.el)(z);return u(z),a.push(V),V}),this.cellkey=i.key?i.key:Wc(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const f=i.fields||[null],m=i.ops||["count"],g=i.aggregate_params||[null],b=i.as||[],v=f.length,w={};let C,D,T,I,k,F,L;for(v!==m.length&&(0,N.vU)("Unmatched number of fields and aggregate ops."),L=0;LmE(z,z.field)),Object.create(null)},cellkey:Wc(),cell(i,o){let a=this.value[i];return a?0===a.num&&this._drop&&a.stamp{const C=l(w);w[g]=C,w[b]=null==C?null:u+f*(1+(C-u)/f)}:w=>w[g]=l(w)),o.modifies(a?m:g)},_bins(i){if(this.value&&!i.modified())return this.value;const o=i.field,a=Au(i),l=a.step;let m,g,u=a.start,f=u+Math.ceil((a.stop-u)/l)*l;null!=(m=i.anchor)&&(g=m-(u+l*Math.floor((m-u)/l)),u+=g,f+=g);const b=function(v){let w=(0,N.He)(o(v));return null==w?null:wf?1/0:(w=Math.max(u,Math.min(w,f-l)),u+l*Math.floor(1e-14+(w-u)/l))};return b.start=u,b.stop=a.stop,b.step=l,this.value=(0,N.ZE)(b,(0,N.Oj)(o),i.name||"bin_"+(0,N.el)(o))}}),lp.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},(0,N.XW)(lp,ze,{transform(i,o){const a=o.fork(o.ALL),l=Gf(Kt,this.value,a.materialize(a.ADD).add),u=i.sort,f=o.changed()||u&&(i.modified("sort")||o.modified(u.fields));return a.visit(a.REM,l.remove),this.modified(f),this.value=a.source=l.data(Fr(u),f),o.source&&o.source.root&&(this.value.root=o.source.root),a}}),(0,N.XW)(cp,ar),lg.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"]}]},(0,N.XW)(lg,ze,{transform(i,o){const a=C=>D=>{for(var I,T=function Lv(i,o,a){switch(o){case"upper":i=i.toUpperCase();break;case"lower":i=i.toLowerCase()}return i.match(a)}(g(D),i.case,f)||[],k=0,F=T.length;ku[C]=1+(u[C]||0)),w=a(C=>u[C]-=1);return l?o.visit(o.SOURCE,v):(o.visit(o.ADD,v),o.visit(o.REM,w)),this._finish(o,b)},_parameterCheck(i,o){let a=!1;return(i.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(i.stopwords||"")+"$","i"),a=!0),(i.modified("pattern")||!this._match)&&(this._match=new RegExp(i.pattern||"[\\w']+","g"),a=!0),(i.modified("field")||o.modified(i.field.fields))&&(a=!0),a&&(this._counts={}),a},_finish(i,o){const a=this._counts,l=this._tuples||(this._tuples={}),u=o[0],f=o[1],m=i.fork(i.NO_SOURCE|i.NO_FIELDS);let g,b,v;for(g in a)b=l[g],v=a[g]||0,!b&&v?(l[g]=b=Ti({}),b[u]=g,b[f]=v,m.add.push(b)):0===v?(b&&m.rem.push(b),a[g]=null,l[g]=null):b[f]!==v&&(b[f]=v,m.mod.push(b));return m.modifies(o)}}),pA.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},(0,N.XW)(pA,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.as||["a","b"],u=l[0],f=l[1],m=!this.value||o.changed(o.ADD_REM)||i.modified("as")||i.modified("filter");let g=this.value;return m?(g&&(a.rem=g),g=o.materialize(o.SOURCE).source,a.add=this.value=function ku(i,o,a,l){for(var b,v,u=[],f={},m=i.length,g=0;gcg(f,o))):typeof l[u]===qc&&l[u](i[u]);return l}function Ad(i){ze.call(this,null,i)}const Iu=[{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 _E(i,o){return i?i.map((a,l)=>o[l]||(0,N.el)(a)):null}function Td(i,o,a){const l=[],u=C=>C(b);let f,m,g,b,v,w;if(null==o)l.push(i.map(a));else for(f={},m=0,g=i.length;mo(a,i),(0,N.Oj)(o),(0,N.el)(o))}function $v(i){ze.call(this,[void 0,void 0],i)}function Ou(i,o){ar.call(this,i),this.parent=o,this.count=0}function Bv(i){ze.call(this,{},i),this._keys=(0,N.Xr)();const o=this._targets=[];o.active=0,o.forEach=a=>{for(let l=0,u=o.active;l(0,N.EP)(o)):(0,N.EP)(i.name,i.as)}function zv(i){ze.call(this,(0,N.Xr)(),i)}function vl(i){ze.call(this,[],i)}function Id(i){ze.call(this,[],i)}function xo(i){ze.call(this,null,i)}function Yf(i){ze.call(this,[],i)}Ad.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:Iu.concat({key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Iu},{name:"weights",type:"number",array:!0}]})},{name:"as",type:"string",array:!0,default:["value","density"]}]},(0,N.XW)(Ad,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS);if(!this.value||o.changed()||i.modified()){const l=cg(i.distribution,function up(i){return()=>i.materialize(i.SOURCE).source}(o)),u=i.steps||i.minsteps||25,f=i.steps||i.maxsteps||200;let m=i.method||"pdf";"pdf"!==m&&"cdf"!==m&&(0,N.vU)("Invalid density method: "+m),!i.extent&&!l.data&&(0,N.vU)("Missing density extent parameter."),m=l[m];const g=i.as||["value","density"],v=qf(m,i.extent||(0,N.We)(l.data()),u,f).map(w=>{const C={};return C[g[0]]=w[0],C[g[1]]=w[1],Ti(C)});this.value&&(a.rem=this.value),this.value=a.add=a.source=v}return a}}),kd.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"}]},(0,N.XW)(kd,ze,{transform(i,o){if(this.value&&!i.modified()&&!o.changed())return o;const a=o.materialize(o.SOURCE).source,l=Td(o.source,i.groupby,N.yR),u=i.smooth||!1,f=i.field,m=i.step||((i,o)=>(0,N.yP)((0,N.We)(i,o))/30)(a,f),g=Fr((I,k)=>f(I)-f(k)),b=i.as||"bin",v=l.length;let T,w=1/0,C=-1/0,D=0;for(;DC&&(C=k),I[++T][b]=k}return this.value={start:w,stop:C,step:m},o.reflow(!0).modifies(b)}}),(0,N.XW)(Xf,ar),$v.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},(0,N.XW)($v,ze,{transform(i,o){const a=this.value,l=i.field,u=o.changed()||o.modified(l.fields)||i.modified("field");let f=a[0],m=a[1];if((u||null==f)&&(f=1/0,m=-1/0),o.visit(u?o.SOURCE:o.ADD,g=>{const b=(0,N.He)(l(g));null!=b&&(bm&&(m=b))}),!Number.isFinite(f)||!Number.isFinite(m)){let g=(0,N.el)(l);g&&(g=` for field "${g}"`),o.dataflow.warn(`Infinite extent${g}: [${f}, ${m}]`),f=m=void 0}this.value=[f,m]}}),(0,N.XW)(Ou,ar,{connect(i){return this.detachSubflow=i.detachSubflow,this.targets().add(i),i.source=this},add(i){this.count+=1,this.value.add.push(i)},rem(i){this.count-=1,this.value.rem.push(i)},mod(i){this.value.mod.push(i)},init(i){this.value.init(i,i.NO_SOURCE)},evaluate(){return this.value}}),(0,N.XW)(Bv,ze,{activate(i){this._targets[this._targets.active++]=i},subflow(i,o,a,l){const u=this.value;let m,g,f=(0,N.nr)(u,i)&&u[i];return f?f.value.stampl&&l.count>0);this.initTargets(a)}},initTargets(i){const o=this._targets,a=o.length,l=i?i.length:0;let u=0;for(;uthis.subflow(b,u,o);return this._group=i.group||{},this.initTargets(),o.visit(o.REM,b=>{const v=Kt(b),w=f.get(v);void 0!==w&&(f.delete(v),g(w).rem(b))}),o.visit(o.ADD,b=>{const v=l(b);f.set(Kt(b),v),g(v).add(b)}),m||o.modified(l.fields)?o.visit(o.MOD,b=>{const v=Kt(b),w=f.get(v),C=l(b);w===C?g(C).mod(b):(f.set(v,C),g(w).rem(b),g(C).add(b))}):o.changed(o.MOD)&&o.visit(o.MOD,b=>{g(f.get(Kt(b))).mod(b)}),m&&o.visit(o.REFLOW,b=>{const v=Kt(b),w=f.get(v),C=l(b);w!==C&&(f.set(v,C),g(w).rem(b),g(C).add(b))}),o.clean()?a.runAfter(()=>{this.clean(),f.clean()}):f.empty>a.cleanThreshold&&a.runAfter(f.clean),o}}),(0,N.XW)(wy,ar),zv.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,N.XW)(zv,ze,{transform(i,o){const a=o.dataflow,l=this.value,u=o.fork(),f=u.add,m=u.rem,g=u.mod,b=i.expr;let v=!0;function w(C){const D=Kt(C),T=b(C,i),I=l.get(D);T&&I?(l.delete(D),f.push(C)):T||I?v&&T&&!I&&g.push(C):(l.set(D,1),m.push(C))}return o.visit(o.REM,C=>{const D=Kt(C);l.has(D)?l.delete(D):m.push(C)}),o.visit(o.ADD,C=>{b(C,i)?f.push(C):l.set(Kt(C),1)}),o.visit(o.MOD,w),i.modified()&&(v=!1,o.visit(o.REFLOW,w)),l.empty>a.cleanThreshold&&a.runAfter(l.clean),u}}),vl.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}]},(0,N.XW)(vl,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.fields,u=_E(l,i.as||[]),f=i.index||null,m=u.length;return a.rem=this.value,o.visit(o.SOURCE,g=>{const b=l.map(I=>I(g)),v=b.reduce((I,k)=>Math.max(I,k.length),0);let C,D,T,w=0;for(;w{for(let C,w=0;wm[l]=a(m,i))}}),(0,N.XW)(Yf,ze,{transform(i,o){const a=o.fork(o.ALL),l=i.generator;let m,g,b,u=this.value,f=i.size-u.length;if(f>0){for(m=[];--f>=0;)m.push(b=Ti(l(i))),u.push(b);a.add=a.add.length?a.materialize(a.ADD).add.concat(m):m}else g=u.slice(0,-f),a.rem=a.rem.length?a.materialize(a.REM).rem.concat(g):g,u=u.slice(-f);return a.source=this.value=u,a}});const dp={value:"value",median:Mu,mean:function dt(i,o){let a=0,l=0;if(void 0===o)for(let u of i)null!=u&&(u=+u)>=u&&(++a,l+=u);else{let u=-1;for(let f of i)null!=(f=o(f,++u,i))&&(f=+f)>=f&&(++a,l+=f)}if(a)return l/a},min:Av,max:Su},vE=[];function Vv(i){ze.call(this,[],i)}function xE(i){Md.call(this,i)}function Ey(i){ze.call(this,null,i)}function Uv(i){ar.call(this,null,Od,i)}function Od(i){return this.value&&!i.modified()?this.value:(0,N.Jy)(i.fields,i.flat)}function Hv(i){ze.call(this,[],i),this._pending=null}function Cy(i,o,a){a.forEach(Ti);const l=o.fork(o.NO_FIELDS&o.NO_SOURCE);return l.rem=i.value,i.value=l.source=l.add=a,i._pending=null,l.rem.length&&l.clean(!0),l}function Sy(i){ze.call(this,{},i)}function qv(i){ar.call(this,null,bA,i)}function bA(i){if(this.value&&!i.modified())return this.value;const o=i.extents,a=o.length;let f,m,l=1/0,u=-1/0;for(f=0;fu&&(u=m[1]);return[l,u]}function dg(i){ar.call(this,null,vA,i)}function vA(i){return this.value&&!i.modified()?this.value:i.values.reduce((o,a)=>o.concat(a),[])}function Dy(i){ze.call(this,null,i)}function xA(i){Md.call(this,i)}function My(i){Bv.call(this,i)}function Ru(i){ze.call(this,null,i)}function EE(i){ze.call(this,null,i)}function fp(i){ze.call(this,null,i)}function CA(i){ze.call(this,null,i)}function Ay(i){ze.call(this,[],i),this.count=0}function CE(i){ze.call(this,null,i)}function Rd(i){ze.call(this,null,i),this.modified(!0)}function hp(i){ze.call(this,null,i)}Vv.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},(0,N.XW)(Vv,ze,{transform(i,o){var D,T,I,k,F,L,z,V,U,W,a=o.fork(o.ALL),l=function yA(i){var a,o=i.method||dp.value;if(null!=dp[o])return o===dp.value?(a=void 0!==i.value?i.value:0,()=>a):dp[o];(0,N.vU)("Unrecognized imputation method: "+o)}(i),u=function ug(i){const o=i.field;return a=>a?o(a):NaN}(i),f=(0,N.el)(i.field),m=(0,N.el)(i.key),g=(i.groupby||[]).map(N.el),b=function jv(i,o,a,l){var v,w,C,D,T,I,k,F,u=L=>L(F),f=[],m=l?l.slice():[],g={},b={};for(m.forEach((L,z)=>g[L]=z+1),D=0,k=i.length;Da.add(f))):(u=a.value=a.value||this.init(i),o.visit(o.REM,f=>a.rem(f)),o.visit(o.ADD,f=>a.add(f))),a.changes(),o.visit(o.SOURCE,f=>{(0,N.l7)(f,u[a.cellkey(f)].tuple)}),o.reflow(l).modifies(this._outputs)},changes(){const i=this._adds,o=this._mods;let a,l;for(a=0,l=this._alen;a{const I=Uc(T,m)[g],k=i.counts?T.length:1;qf(I,w||(0,N.We)(T),C,D).forEach(L=>{const z={};for(let V=0;V(this._pending=(0,N.IX)(u.data),f=>f.touch(this)))}:a.request(i.url,i.format).then(l=>Cy(this,o,(0,N.IX)(l.data)))}}),Sy.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}]},(0,N.XW)(Sy,ze,{transform(i,o){const a=i.fields,l=i.index,u=i.values,f=null==i.default?null:i.default,m=i.modified(),g=a.length;let C,D,T,b=m?o.SOURCE:o.ADD,v=o,w=i.as;return u?(D=u.length,g>1&&!w&&(0,N.vU)('Multi-field lookup requires explicit "as" parameter.'),w&&w.length!==g*D&&(0,N.vU)('The "as" parameter has too few output field names.'),w=w||u.map(N.el),C=function(I){for(var L,z,k=0,F=0;ko.modified(I.fields)),b|=T?o.MOD:0),o.visit(b,C),v.modifies(w)}}),(0,N.XW)(qv,ar),(0,N.XW)(dg,ar),(0,N.XW)(Dy,ze,{transform(i,o){return this.modified(i.modified()),this.value=i,o.fork(o.NO_SOURCE|o.NO_FIELDS)}}),xA.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:Ma,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},(0,N.XW)(xA,Md,{_transform:Md.prototype.transform,transform(i,o){return this._transform(function wA(i,o){const a=i.field,l=i.value,u=("count"===i.op?"__count__":i.op)||"sum",f=(0,N.Oj)(a).concat((0,N.Oj)(l)),m=function hr(i,o,a){const l={},u=[];return a.visit(a.SOURCE,f=>{const m=i(f);l[m]||(l[m]=1,u.push(m))}),u.sort(N.j2),o?u.slice(0,o):u}(a,i.limit||0,o);return o.changed()&&i.set("__pivot__",null,null,!0),{key:i.key,groupby:i.groupby,ops:m.map(()=>u),fields:m.map(g=>function wE(i,o,a,l){return(0,N.ZE)(u=>o(u)===i?a(u):NaN,l,i+"")}(g,a,l,f)),as:m.map(g=>g+""),modified:i.modified.bind(i)}}(i,o),o)}}),(0,N.XW)(My,Bv,{transform(i,o){const a=i.subflow,l=i.field,u=f=>this.subflow(Kt(f),a,o,f);return(i.modified("field")||l&&o.modified((0,N.Oj)(l)))&&(0,N.vU)("PreFacet does not support field modification."),this.initTargets(),l?(o.visit(o.MOD,f=>{const m=u(f);l(f).forEach(g=>m.mod(g))}),o.visit(o.ADD,f=>{const m=u(f);l(f).forEach(g=>m.add(Ti(g)))}),o.visit(o.REM,f=>{const m=u(f);l(f).forEach(g=>m.rem(g))})):(o.visit(o.MOD,f=>u(f).mod(f)),o.visit(o.ADD,f=>u(f).add(f)),o.visit(o.REM,f=>u(f).rem(f))),o.clean()&&o.runAfter(()=>this.clean()),o}}),Ru.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,N.XW)(Ru,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.fields,u=_E(i.fields,i.as||[]),f=l?(g,b)=>function fg(i,o,a,l){for(let u=0,f=a.length;u{const b=Kt(g);a.rem.push(m[b]),m[b]=null}),o.visit(o.ADD,g=>{const b=f(g,Ti({}));m[Kt(g)]=b,a.add.push(b)}),o.visit(o.MOD,g=>{a.mod.push(f(g,m[Kt(g)]))}),a}}),(0,N.XW)(EE,ze,{transform(i,o){return this.value=i.value,i.modified("value")?o.fork(o.NO_SOURCE|o.NO_FIELDS):o.StopPropagation}}),fp.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"]}]},(0,N.XW)(fp,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS),l=i.as||["prob","value"];if(this.value&&!i.modified()&&!o.changed())return a.source=this.value,a;const f=Td(o.materialize(o.SOURCE).source,i.groupby,i.field),m=(i.groupby||[]).map(N.el),g=[],b=i.step||.01,v=i.probs||Qr(b/2,1-1e-14,b),w=v.length;return f.forEach(C=>{const D=py(C,v);for(let T=0;T{const f=Kt(u);a.rem.push(l[f]),l[f]=null}),o.visit(o.ADD,u=>{const f=cy(u);l[Kt(u)]=f,a.add.push(f)}),o.visit(o.MOD,u=>{const f=l[Kt(u)];for(const m in u)f[m]=u[m],a.modifies(m);a.mod.push(f)})),a}}),Ay.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},(0,N.XW)(Ay,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE),l=i.modified("size"),u=i.size,f=this.value.reduce((w,C)=>(w[Kt(C)]=1,w),{});let m=this.value,g=this.count,b=0;function v(w){let C,D;m.length=b&&(C=m[D],f[Kt(C)]&&a.rem.push(C),m[D]=w)),++g}if(o.rem.length&&(o.visit(o.REM,w=>{const C=Kt(w);f[C]&&(f[C]=-1,a.rem.push(w)),--g}),m=m.filter(w=>-1!==f[Kt(w)])),(o.rem.length||l)&&m.length{f[Kt(w)]||v(w)}),b=-1),l&&m.length>u){const w=m.length-u;for(let C=0;C{f[Kt(w)]&&a.mod.push(w)}),o.add.length&&o.visit(o.ADD,v),(o.add.length||b<0)&&(a.add=m.filter(w=>!f[Kt(w)])),this.count=g,this.value=a.source=m,a}}),CE.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"}]},(0,N.XW)(CE,ze,{transform(i,o){if(this.value&&!i.modified())return;const a=o.materialize().fork(o.MOD),l=i.as||"data";return a.rem=this.value?o.rem.concat(this.value):o.rem,this.value=Qr(i.start,i.stop,i.step||1).map(u=>{const f={};return f[l]=u,Ti(f)}),a.add=o.add.concat(this.value),a}}),(0,N.XW)(Rd,ze,{transform(i,o){return this.value=o.source,o.changed()?o.fork(o.NO_SOURCE|o.NO_FIELDS):o.StopPropagation}});const SA=["unit0","unit1"];function Gv(i){ze.call(this,(0,N.Xr)(),i)}function ps(i){ze.call(this,null,i)}hp.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:M2,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:SA}]},(0,N.XW)(hp,ze,{transform(i,o){const a=i.field,l=!1!==i.interval,u="utc"===i.timezone,f=this._floor(i,o),m=(u?Bm:Of)(f.unit).offset,g=i.as||SA,b=g[0],v=g[1],w=f.step;let C=f.start||1/0,D=f.stop||-1/0,T=o.ADD;return(i.modified()||o.changed(o.REM)||o.modified((0,N.Oj)(a)))&&(T=(o=o.reflow(!0)).SOURCE,C=1/0,D=-1/0),o.visit(T,I=>{const k=a(I);let F,L;null==k?(I[b]=null,l&&(I[v]=null)):(I[b]=F=L=f(k),l&&(I[v]=L=m(F,w)),FD&&(D=L))}),f.start=C,f.stop=D,o.modifies(l?g:b)},_floor(i,o){const a="utc"===i.timezone,{units:l,step:u}=i.units?{units:i.units,step:i.step||1}:Q_({extent:i.extent||(0,N.We)(o.materialize(o.SOURCE).source,i.field),maxbins:i.maxbins}),f=T2(l),m=this.value||{},g=(a?J0:$e)(f,u);return g.unit=(0,N.fj)(f),g.units=f,g.step=u,g.start=m.start,g.stop=m.stop,this.value=g}}),(0,N.XW)(Gv,ze,{transform(i,o){const a=o.dataflow,l=i.field,u=this.value,f=g=>u.set(l(g),g);let m=!0;return i.modified("field")||o.modified(l.fields)?(u.clear(),o.visit(o.SOURCE,f)):o.changed()?(o.visit(o.REM,g=>u.delete(l(g))),o.visit(o.ADD,f)):m=!1,this.modified(m),u.empty>a.cleanThreshold&&a.runAfter(u.clean),o.fork()}}),(0,N.XW)(ps,ze,{transform(i,o){(!this.value||i.modified("field")||i.modified("sort")||o.changed()||i.sort&&o.modified(i.sort.fields))&&(this.value=(i.sort?o.source.slice().sort(Fr(i.sort)):o.source).map(i.field))}});const Ko={row_number:function(){return{next:i=>i.index+1}},rank:function(){let i;return{init:()=>i=1,next:o=>{const a=o.index,l=o.data;return a&&o.compare(l[a-1],l[a])?i=a+1:i}}},dense_rank:function(){let i;return{init:()=>i=1,next:o=>{const a=o.index,l=o.data;return a&&o.compare(l[a-1],l[a])?++i:i}}},percent_rank:function(){const i=Ko.rank(),o=i.next;return{init:i.init,next:a=>(o(a)-1)/(a.data.length-1)}},cume_dist:function(){let i;return{init:()=>i=0,next:o=>{const a=o.data,l=o.compare;let u=o.index;if(i0||(0,N.vU)("ntile num must be greater than zero.");const a=Ko.cume_dist(),l=a.next;return{init:a.init,next:u=>Math.ceil(o*l(u))}},lag:function(i,o){return o=+o||1,{next:a=>{const l=a.index-o;return l>=0?i(a.data[l]):null}}},lead:function(i,o){return o=+o||1,{next:a=>{const l=a.index+o,u=a.data;return li(o.data[o.i0])}},last_value:function(i){return{next:o=>i(o.data[o.i1-1])}},nth_value:function(i,o){return(o=+o)>0||(0,N.vU)("nth_value nth must be greater than zero."),{next:a=>{const l=a.i0+(o-1);return lo=null,next:a=>{const l=i(a.data[a.index]);return null!=l?o=l:o}}},next_value:function(i){let o,a;return{init:()=>(o=null,a=-1),next:l=>{const u=l.data;return l.index<=a?o:(a=function Xv(i,o,a){for(let l=o.length;ab[k]=1)}T(i.sort),o.forEach((I,k)=>{const F=a[k],L=l[k],z=u[k]||null,V=(0,N.el)(F),U=pE(I,V,f[k]);if(T(F),m.push(U),(0,N.nr)(Ko,I))g.push(function Q$(i,o,a,l){const u=Ko[i](o,a);return{init:u.init||N.bM,update:function(f,m){m[l]=u.next(f)}}}(I,F,L,U));else{if(null==F&&"count"!==I&&(0,N.vU)("Null aggregate field specified."),"count"===I)return void w.push(U);D=!1;let W=v[V];W||(W=v[V]=[],W.field=F,C.push(W)),W.push(Dd(I,z,U))}}),(w.length||C.length)&&(this.cell=function J2(i,o,a){i=i.map(b=>mE(b,b.field));const l={num:0,agg:null,store:!1,count:o};if(!a)for(var u=i.length,f=l.agg=Array(u),m=0;m0&&!u(f[a],f[a-1])&&(i.i0=o.left(f,f[a])),li.init()),this.cell&&this.cell.init()},MA.update=function(i,o){const a=this.cell,l=this.windows,u=i.data,f=l&&l.length;let m;if(a){for(m=i.p0;mthis.group(u(g));let m=this.state;(!m||a)&&(m=this.state=new Yv(i)),a||o.modified(m.inputs)?(this.value={},o.visit(o.SOURCE,g=>f(g).add(g))):(o.visit(o.REM,g=>f(g).remove(g)),o.visit(o.ADD,g=>f(g).add(g)));for(let g=0,b=this._mlen;g0)for(var b,l=i[0],u=o[0],f=i[a]-l,m=o[a]-u,g=-1;++g<=a;)this._basis.point(this._beta*i[g]+(1-this._beta)*(l+(b=g/a)*f),this._beta*o[g]+(1-this._beta)*(u+b*m));this._x=this._y=null,this._basis.lineEnd()},point:function(i,o){this._x.push(+i),this._y.push(+o)}};const AA=function i(o){function a(l){return 1===o?new hg(l):new Iy(l,o)}return a.beta=function(l){return i(+l)},a}(.85);function pg(i,o,a){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-o),i._y2+i._k*(i._y1-a),i._x2,i._y2)}function TA(i,o){this._context=i,this._k=(1-o)/6}TA.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:pg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2,this._x1=i,this._y1=o;break;case 2:this._point=3;default:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const ME=function i(o){function a(l){return new TA(l,o)}return a.tension=function(l){return i(+l)},a}(0);function mg(i,o){this._context=i,this._k=(1-o)/6}mg.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(i,o){switch(i=+i,o=+o,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:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Oy=function i(o){function a(l){return new mg(l,o)}return a.tension=function(l){return i(+l)},a}(0);function AE(i,o){this._context=i,this._k=(1-o)/6}AE.prototype={areaStart:ac,areaEnd:ac,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(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._x3=i,this._y3=o;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=o);break;case 2:this._point=3,this._x5=i,this._y5=o;break;default:pg(this,i,o)}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Fd=function i(o){function a(l){return new AE(l,o)}return a.tension=function(l){return i(+l)},a}(0),Ry=Math.abs,la=Math.atan2,mp=Math.cos,J$=Math.max,Ny=Math.min,Aa=Math.sin,pr=Math.sqrt,lo=1e-12,lc=Math.PI,Fy=lc/2,gg=2*lc;function gp(i){return i>=1?Fy:i<=-1?-Fy:Math.asin(i)}function Kv(i,o,a){var l=i._x1,u=i._y1,f=i._x2,m=i._y2;if(i._l01_a>lo){var g=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,b=3*i._l01_a*(i._l01_a+i._l12_a);l=(l*g-i._x0*i._l12_2a+i._x2*i._l01_2a)/b,u=(u*g-i._y0*i._l12_2a+i._y2*i._l01_2a)/b}if(i._l23_a>lo){var v=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,w=3*i._l23_a*(i._l23_a+i._l12_a);f=(f*v+i._x1*i._l23_2a-o*i._l12_2a)/w,m=(m*v+i._y1*i._l23_2a-a*i._l12_2a)/w}i._context.bezierCurveTo(l,u,f,m,i._x2,i._y2)}function TE(i,o){this._context=i,this._alpha=o}TE.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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2;break;case 2:this._point=3;default:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const kA=function i(o){function a(l){return o?new TE(l,o):new TA(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function Py(i,o){this._context=i,this._alpha=o}Py.prototype={areaStart:ac,areaEnd:ac,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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=o;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=o);break;case 2:this._point=3,this._x5=i,this._y5=o;break;default:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const Ly=function i(o){function a(l){return o?new Py(l,o):new AE(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function Pd(i,o){this._context=i,this._alpha=o}Pd.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(i,o){if(i=+i,o=+o,this._point){var a=this._x2-i,l=this._y2-o;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(a*a+l*l,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:Kv(this,i,o)}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=i,this._y0=this._y1,this._y1=this._y2,this._y2=o}};const tR=function i(o){function a(l){return o?new Pd(l,o):new mg(l,0)}return a.alpha=function(l){return i(+l)},a}(.5);function kE(i){this._context=i}function IE(i){return new kE(i)}function OE(i){this._context=i}function IA(i){return i<0?-1:1}function OA(i,o,a){var l=i._x1-i._x0,u=o-i._x1,f=(i._y1-i._y0)/(l||u<0&&-0),m=(a-i._y1)/(u||l<0&&-0),g=(f*u+m*l)/(l+u);return(IA(f)+IA(m))*Math.min(Math.abs(f),Math.abs(m),.5*Math.abs(g))||0}function RA(i,o){var a=i._x1-i._x0;return a?(3*(i._y1-i._y0)/a-o)/2:o}function _p(i,o,a){var l=i._x0,f=i._x1,m=i._y1,g=(f-l)/3;i._context.bezierCurveTo(l+g,i._y0+g*o,f-g,m-g*a,f,m)}function Zv(i){this._context=i}function NA(i){this._context=new Fs(i)}function Fs(i){this._context=i}function Qv(i){this._context=i}function Ps(i){var o,l,a=i.length-1,u=new Array(a),f=new Array(a),m=new Array(a);for(u[0]=0,f[0]=2,m[0]=i[0]+2*i[1],o=1;o=0;--o)u[o]=(m[o]-u[o+1])/f[o];for(f[a-1]=(i[a]+u[a-1])/2,o=0;o=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,o){switch(i=+i,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,o):this._context.moveTo(i,o);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(i,o);else{var a=this._x*(1-this._t)+i*this._t;this._context.lineTo(a,this._y),this._context.lineTo(a,o)}}this._x=i,this._y=o}};const Jv=Math.PI,PE=2*Jv,Zf=1e-6,nR=PE-Zf;function $A(i){this._+=i[0];for(let o=1,a=i.length;o=0))throw new Error(`invalid digits: ${i}`);if(o>15)return $A;const a=10**o;return function(l){this._+=l[0];for(let u=1,f=l.length;uZf)if(Math.abs(C*b-v*w)>Zf&&f){let T=l-m,I=u-g,k=b*b+v*v,F=T*T+I*I,L=Math.sqrt(k),z=Math.sqrt(D),V=f*Math.tan((Jv-Math.acos((k+D-F)/(2*L*z)))/2),U=V/z,W=V/L;Math.abs(U-1)>Zf&&this._append`L${o+U*w},${a+U*C}`,this._append`A${f},${f},0,0,${+(C*T>w*I)},${this._x1=o+W*b},${this._y1=a+W*v}`}else this._append`L${this._x1=o},${this._y1=a}`}arc(o,a,l,u,f,m){if(o=+o,a=+a,m=!!m,(l=+l)<0)throw new Error(`negative radius: ${l}`);let g=l*Math.cos(u),b=l*Math.sin(u),v=o+g,w=a+b,C=1^m,D=m?u-f:f-u;null===this._x1?this._append`M${v},${w}`:(Math.abs(this._x1-v)>Zf||Math.abs(this._y1-w)>Zf)&&this._append`L${v},${w}`,l&&(D<0&&(D=D%PE+PE),D>nR?this._append`A${l},${l},0,1,${C},${o-g},${a-b}A${l},${l},0,1,${C},${this._x1=v},${this._y1=w}`:D>Zf&&this._append`A${l},${l},0,${+(D>=Jv)},${C},${this._x1=o+l*Math.cos(f)},${this._y1=a+l*Math.sin(f)}`)}rect(o,a,l,u){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}h${l=+l}v${+u}h${-l}Z`}toString(){return this._}}function ex(){return new yp}function Ld(i){let o=3;return i.digits=function(a){if(!arguments.length)return o;if(null==a)o=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);o=l}return i},()=>new yp(o)}function tx(i){return i.innerRadius}function nx(i){return i.outerRadius}function zy(i){return i.startAngle}function BA(i){return i.endAngle}function zA(i){return i&&i.padAngle}function ix(i,o,a,l,u,f,m){var g=i-a,b=o-l,v=(m?f:-f)/pr(g*g+b*b),w=v*b,C=-v*g,D=i+w,T=o+C,I=a+w,k=l+C,F=(D+I)/2,L=(T+k)/2,z=I-D,V=k-T,U=z*z+V*V,W=u-f,Y=D*k-I*T,H=(V<0?-1:1)*pr(J$(0,W*W*U-Y*Y)),Z=(Y*V-z*H)/U,te=(-Y*z-V*H)/U,ce=(Y*V+z*H)/U,le=(-Y*z+V*H)/U,ve=Z-F,xe=te-L,Q=ce-F,J=le-L;return ve*ve+xe*xe>Q*Q+J*J&&(Z=ce,te=le),{cx:Z,cy:te,x01:-w,y01:-C,x11:Z*(u/W-1),y11:te*(u/W-1)}}function Vy(i){return"object"==typeof i&&"length"in i?i:Array.from(i)}function yg(i){return i[0]}function bg(i){return i[1]}function rx(i,o){var a=tr(!0),l=null,u=IE,f=null,m=Ld(g);function g(b){var v,C,T,w=(b=Vy(b)).length,D=!1;for(null==l&&(f=u(T=m())),v=0;v<=w;++v)!(v=T;--I)g.point(V[I],U[I]);g.lineEnd(),g.areaEnd()}L&&(V[D]=+i(F,D,C),U[D]=+o(F,D,C),g.point(l?+l(F,D,C):V[D],a?+a(F,D,C):U[D]))}if(z)return g=null,z+""||null}function w(){return rx().defined(u).curve(m).context(f)}return i="function"==typeof i?i:void 0===i?yg:tr(+i),o="function"==typeof o?o:tr(void 0===o?0:+o),a="function"==typeof a?a:void 0===a?bg:tr(+a),v.x=function(C){return arguments.length?(i="function"==typeof C?C:tr(+C),l=null,v):i},v.x0=function(C){return arguments.length?(i="function"==typeof C?C:tr(+C),v):i},v.x1=function(C){return arguments.length?(l=null==C?null:"function"==typeof C?C:tr(+C),v):l},v.y=function(C){return arguments.length?(o="function"==typeof C?C:tr(+C),a=null,v):o},v.y0=function(C){return arguments.length?(o="function"==typeof C?C:tr(+C),v):o},v.y1=function(C){return arguments.length?(a=null==C?null:"function"==typeof C?C:tr(+C),v):a},v.lineX0=v.lineY0=function(){return w().x(i).y(o)},v.lineY1=function(){return w().x(i).y(a)},v.lineX1=function(){return w().x(l).y(o)},v.defined=function(C){return arguments.length?(u="function"==typeof C?C:tr(!!C),v):u},v.curve=function(C){return arguments.length?(m=C,null!=f&&(g=m(f)),v):m},v.context=function(C){return arguments.length?(null==C?f=g=null:g=m(f=C),v):f},v}ex.prototype=yp.prototype,pr(3);const ox={draw(i,o){const a=pr(o/lc);i.moveTo(a,0),i.arc(0,0,a,0,gg)}};pr(1/3),Aa(lc/10),Aa(7*lc/10);function $d(i,o){if(typeof document<"u"&&document.createElement){const a=document.createElement("canvas");if(a&&a.getContext)return a.width=i,a.height=o,a}return null}Aa(gg/10),mp(gg/10),pr(3),pr(3),pr(3),pr(12);const lx=Fc(Tf),Bd=lx.right,aR=lx.left,Hy=(Fc(yl),Bd);function Za(i,o,a){i.prototype=o.prototype=a,a.constructor=i}function Ls(i,o){var a=Object.create(i.prototype);for(var l in o)a[l]=o[l];return a}function co(){}var Pu=1/.7,Qa="\\s*([+-]?\\d+)\\s*",Gc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ka="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wy=/^#([0-9a-f]{3,8})$/,ZA=new RegExp(`^rgb\\(${Qa},${Qa},${Qa}\\)$`),Jf=new RegExp(`^rgb\\(${ka},${ka},${ka}\\)$`),QA=new RegExp(`^rgba\\(${Qa},${Qa},${Qa},${Gc}\\)$`),Ja=new RegExp(`^rgba\\(${ka},${ka},${ka},${Gc}\\)$`),cc=new RegExp(`^hsl\\(${Gc},${ka},${ka}\\)$`),Vr=new RegExp(`^hsla\\(${Gc},${ka},${ka},${Gc}\\)$`),HE={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 eh(){return this.rgb().formatHex()}function JA(){return this.rgb().formatRgb()}function vg(i){var o,a;return i=(i+"").trim().toLowerCase(),(o=Wy.exec(i))?(a=o[1].length,o=parseInt(o[1],16),6===a?WE(o):3===a?new Tn(o>>8&15|o>>4&240,o>>4&15|240&o,(15&o)<<4|15&o,1):8===a?cx(o>>24&255,o>>16&255,o>>8&255,(255&o)/255):4===a?cx(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|240&o,((15&o)<<4|15&o)/255):null):(o=ZA.exec(i))?new Tn(o[1],o[2],o[3],1):(o=Jf.exec(i))?new Tn(255*o[1]/100,255*o[2]/100,255*o[3]/100,1):(o=QA.exec(i))?cx(o[1],o[2],o[3],o[4]):(o=Ja.exec(i))?cx(255*o[1]/100,255*o[2]/100,255*o[3]/100,o[4]):(o=cc.exec(i))?eT(o[1],o[2]/100,o[3]/100,1):(o=Vr.exec(i))?eT(o[1],o[2]/100,o[3]/100,o[4]):HE.hasOwnProperty(i)?WE(HE[i]):"transparent"===i?new Tn(NaN,NaN,NaN,0):null}function WE(i){return new Tn(i>>16&255,i>>8&255,255&i,1)}function cx(i,o,a,l){return l<=0&&(i=o=a=NaN),new Tn(i,o,a,l)}function qE(i){return i instanceof co||(i=vg(i)),i?new Tn((i=i.rgb()).r,i.g,i.b,i.opacity):new Tn}function Lu(i,o,a,l){return 1===arguments.length?qE(i):new Tn(i,o,a,l??1)}function Tn(i,o,a,l){this.r=+i,this.g=+o,this.b=+a,this.opacity=+l}function jr(){return`#${Vd(this.r)}${Vd(this.g)}${Vd(this.b)}`}function ux(){const i=el(this.opacity);return`${1===i?"rgb(":"rgba("}${Xc(this.r)}, ${Xc(this.g)}, ${Xc(this.b)}${1===i?")":`, ${i})`}`}function el(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Xc(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Vd(i){return((i=Xc(i))<16?"0":"")+i.toString(16)}function eT(i,o,a,l){return l<=0?i=o=a=NaN:a<=0||a>=1?i=o=NaN:o<=0&&(i=NaN),new $s(i,o,a,l)}function tT(i){if(i instanceof $s)return new $s(i.h,i.s,i.l,i.opacity);if(i instanceof co||(i=vg(i)),!i)return new $s;if(i instanceof $s)return i;var o=(i=i.rgb()).r/255,a=i.g/255,l=i.b/255,u=Math.min(o,a,l),f=Math.max(o,a,l),m=NaN,g=f-u,b=(f+u)/2;return g?(m=o===f?(a-l)/g+6*(a0&&b<1?0:m,new $s(m,g,b,i.opacity)}function wp(i,o,a,l){return 1===arguments.length?tT(i):new $s(i,o,a,l??1)}function $s(i,o,a,l){this.h=+i,this.s=+o,this.l=+a,this.opacity=+l}function uR(i){return(i=(i||0)%360)<0?i+360:i}function GE(i){return Math.max(0,Math.min(1,i||0))}function uc(i,o,a){return 255*(i<60?o+(a-o)*i/60:i<180?a:i<240?o+(a-o)*(240-i)/60:o)}function dx(i,o,a,l,u){var f=i*i,m=f*i;return((1-3*i+3*f-m)*o+(4-6*f+3*m)*a+(1+3*i+3*f-3*m)*l+m*u)/6}function XE(i){var o=i.length-1;return function(a){var l=a<=0?a=0:a>=1?(a=1,o-1):Math.floor(a*o),u=i[l],f=i[l+1];return dx((a-l/o)*o,l>0?i[l-1]:2*u-f,u,f,l=240?i-240:i+120,u,l),uc(i,u,l),uc(i<120?i+240:i-120,u,l),this.opacity)},clamp(){return new $s(uR(this.h),GE(this.s),GE(this.l),el(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 i=el(this.opacity);return`${1===i?"hsl(":"hsla("}${uR(this.h)}, ${100*GE(this.s)}%, ${100*GE(this.l)}%${1===i?")":`, ${i})`}`}}));const qy=i=>()=>i;function Cp(i,o){return function(a){return i+a*o}}function Xy(i,o){var a=o-i;return a?Cp(i,a>180||a<-180?a-360*Math.round(a/360):a):qy(isNaN(i)?o:i)}function ms(i,o){var a=o-i;return a?Cp(i,a):qy(isNaN(i)?o:i)}const Ro=function i(o){var a=function YE(i){return 1==(i=+i)?ms:function(o,a){return a-o?function Gy(i,o,a){return i=Math.pow(i,a),o=Math.pow(o,a)-i,a=1/a,function(l){return Math.pow(i+l*o,a)}}(o,a,i):qy(isNaN(o)?a:o)}}(o);function l(u,f){var m=a((u=Lu(u)).r,(f=Lu(f)).r),g=a(u.g,f.g),b=a(u.b,f.b),v=ms(u.opacity,f.opacity);return function(w){return u.r=m(w),u.g=g(w),u.b=b(w),u.opacity=v(w),u+""}}return l.gamma=i,l}(1);function Sp(i){return function(o){var m,g,a=o.length,l=new Array(a),u=new Array(a),f=new Array(a);for(m=0;ma&&(f=o.slice(a,f),g[m]?g[m]+=f:g[++m]=f),(l=l[0])===(u=u[0])?g[m]?g[m]+=u:g[++m]=u:(g[++m]=null,b.push({i:m,x:dc(l,u)})),a=Dp.lastIndex;return ao&&(a=i,i=o,o=a),function(l){return Math.max(i,Math.min(o,l))}}(i[0],i[D-1])),g=D>2?El:Mp,b=v=null,C}function C(D){return null==D||isNaN(D=+D)?f:(b||(b=g(i.map(l),o,a)))(l(m(D)))}return C.invert=function(D){return m(u((v||(v=g(o,i.map(l),dc)))(D)))},C.domain=function(D){return arguments.length?(i=Array.from(D,xg),w()):i.slice()},C.range=function(D){return arguments.length?(o=Array.from(D),w()):o.slice()},C.rangeRound=function(D){return o=Array.from(D),a=Ky,w()},C.clamp=function(D){return arguments.length?(m=!!D||Bs,w()):m!==Bs},C.interpolate=function(D){return arguments.length?(a=D,w()):a},C.unknown=function(D){return arguments.length?(f=D,C):f},function(D,T){return l=D,u=T,w()}}function Eg(){return wg()(Bs,Bs)}function Ud(i,o){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(o).domain(i)}return this}function Yc(i,o){switch(arguments.length){case 0:break;case 1:"function"==typeof i?this.interpolator(i):this.range(i);break;default:this.domain(i),"function"==typeof o?this.interpolator(o):this.range(o)}return this}function Cg(i,o,a,l){var f,u=fr(i,o,a);switch((l=Qi(l??",f")).type){case"s":var m=Math.max(Math.abs(i),Math.abs(o));return null==l.precision&&!isNaN(f=Dn(u,m))&&(l.precision=f),Ms(l,m);case"":case"e":case"g":case"p":case"r":null==l.precision&&!isNaN(f=Jt(u,Math.max(Math.abs(i),Math.abs(o))))&&(l.precision=f-("e"===l.type));break;case"f":case"%":null==l.precision&&!isNaN(f=Hi(u))&&(l.precision=f-2*("%"===l.type))}return va(l)}function _s(i){var o=i.domain;return i.ticks=function(a){var l=o();return zr(l[0],l[l.length-1],a??10)},i.tickFormat=function(a,l){var u=o();return Cg(u[0],u[u.length-1],a??10,l)},i.nice=function(a){null==a&&(a=10);var b,v,l=o(),u=0,f=l.length-1,m=l[u],g=l[f],w=10;for(g0;){if((v=Ci(m,g,a))===b)return l[u]=m,l[f]=g,o(l);if(v>0)m=Math.floor(m/v)*v,g=Math.ceil(g/v)*v;else{if(!(v<0))break;m=Math.ceil(m*v)/v,g=Math.floor(g*v)/v}b=v}return i},i}function sT(i,o){var m,a=0,l=(i=i.slice()).length-1,u=i[a],f=i[l];return f-i(-o,a)}function lT(i){const o=i(Sg,eC),a=o.domain;let u,f,l=10;function m(){return u=function Dg(i){return i===Math.E?Math.log:10===i&&Math.log10||2===i&&Math.log2||(i=Math.log(i),o=>Math.log(o)/i)}(l),f=function nC(i){return 10===i?Tp:i===Math.E?Math.exp:o=>Math.pow(i,o)}(l),a()[0]<0?(u=hx(u),f=hx(f),i(aT,tC)):i(Sg,eC),o}return o.base=function(g){return arguments.length?(l=+g,m()):l},o.domain=function(g){return arguments.length?(a(g),m()):a()},o.ticks=g=>{const b=a();let v=b[0],w=b[b.length-1];const C=w0){for(;D<=T;++D)for(I=1;Iw)break;L.push(k)}}else for(;D<=T;++D)for(I=l-1;I>=1;--I)if(k=D>0?I/f(-D):I*f(D),!(kw)break;L.push(k)}2*L.length{if(null==g&&(g=10),null==b&&(b=10===l?"s":","),"function"!=typeof b&&(!(l%1)&&null==(b=Qi(b)).precision&&(b.trim=!0),b=va(b)),g===1/0)return b;const v=Math.max(1,l*g/o.ticks().length);return w=>{let C=w/f(Math.round(u(w)));return C*la(sT(a(),{floor:g=>f(Math.floor(u(g))),ceil:g=>f(Math.ceil(u(g)))})),o}function Mg(i){return function(o){return o<0?-Math.pow(-o,i):Math.pow(o,i)}}function uT(i){return i<0?-Math.sqrt(-i):Math.sqrt(i)}function Jy(i){return i<0?-i*i:i*i}function eb(i){var o=i(Bs,Bs),a=1;return o.exponent=function(u){return arguments.length?(a=+u,function l(){return 1===a?i(Bs,Bs):.5===a?i(uT,Jy):i(Mg(a),Mg(1/a))}()):a},_s(o)}function px(){var i=eb(wg());return i.copy=function(){return Ap(i,px()).exponent(i.exponent())},Ud.apply(i,arguments),i}function tb(i){return function(o){return Math.sign(o)*Math.log1p(Math.abs(o/i))}}function nb(i){return function(o){return Math.sign(o)*Math.expm1(Math.abs(o))*i}}function mx(i){var o=1,a=i(tb(o),nb(o));return a.constant=function(l){return arguments.length?i(tb(o=+l),nb(o)):o},_s(a)}function Wd(i,o,a,l,u,f){const m=[[qh,1,vr],[qh,5,5e3],[qh,15,15e3],[qh,30,3e4],[f,1,po],[f,5,5*po],[f,15,15*po],[f,30,30*po],[u,1,xr],[u,3,3*xr],[u,6,6*xr],[u,12,12*xr],[l,1,Wn],[l,2,2*Wn],[a,1,ea],[o,1,Xl],[o,3,3*Xl],[i,1,yu]];function b(v,w,C){const D=Math.abs(w-v)/C,T=Fc(([,,F])=>F).right(m,D);if(T===m.length)return i.every(fr(v/yu,w/yu,C));if(0===T)return Af.every(Math.max(fr(v,w,C),1));const[I,k]=m[D/m[T-1][2]180?w+=360:w-v>180&&(v+=360),D.push({i:C.push(u(C)+"rotate(",null,l)-2,x:dc(v,w)})):w&&C.push(u(C)+"rotate("+w+l)}(v.rotate,w.rotate,C,D),function g(v,w,C,D){v!==w?D.push({i:C.push(u(C)+"skewX(",null,l)-2,x:dc(v,w)}):w&&C.push(u(C)+"skewX("+w+l)}(v.skewX,w.skewX,C,D),function b(v,w,C,D,T,I){if(v!==C||w!==D){var k=T.push(u(T)+"scale(",null,",",null,")");I.push({i:k-4,x:dc(v,C)},{i:k-2,x:dc(w,D)})}else(1!==C||1!==D)&&T.push(u(T)+"scale("+C+","+D+")")}(v.scaleX,v.scaleY,w.scaleX,w.scaleY,C,D),v=w=null,function(T){for(var F,I=-1,k=D.length;++IyT?Math.pow(i,1/3):i/vC+ub}function Tx(i){return i>Fp?i*i*i:vC*(i-ub)}function db(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function bT(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function fb(i,o,a,l){return 1===arguments.length?function Vn(i){if(i instanceof ue)return new ue(i.h,i.c,i.l,i.opacity);if(i instanceof Bu||(i=Ax(i)),0===i.a&&0===i.b)return new ue(NaN,00?l:1:0}const rh="linear",qd="log",pb="pow",zs="sqrt",mb="symlog",Bp="time",zp="utc",Sl="sequential",Vp="diverging",Fg="quantile",Fx="quantize",Px="threshold",Lx="ordinal",$x="point",jp="bin-ordinal",Zo="continuous",Pg="discrete",il="discretizing",fc="interpolating",MC="temporal";function Bx(){const i=Ex().unknown(void 0),o=i.domain,a=i.range;let u,f,l=[0,1],m=!1,g=0,b=0,v=.5;function w(){const C=o().length,D=l[1]k+u*L);return a(D?F.reverse():F)}return delete i.unknown,i.domain=function(C){return arguments.length?(o(C),w()):o()},i.range=function(C){return arguments.length?(l=[+C[0],+C[1]],w()):l.slice()},i.rangeRound=function(C){return l=[+C[0],+C[1]],m=!0,w()},i.bandwidth=function(){return f},i.step=function(){return u},i.round=function(C){return arguments.length?(m=!!C,w()):m},i.padding=function(C){return arguments.length?(b=Math.max(0,Math.min(1,C)),g=b,w()):g},i.paddingInner=function(C){return arguments.length?(g=Math.max(0,Math.min(1,C)),w()):g},i.paddingOuter=function(C){return arguments.length?(b=Math.max(0,Math.min(1,C)),w()):b},i.align=function(C){return arguments.length?(v=Math.max(0,Math.min(1,C)),w()):v},i.invertRange=function(C){if(null==C[0]||null==C[1])return;const D=l[1]l[1-D])?void 0:(L=Math.max(0,Bd(T,k)-1),z=k===F?L:Bd(T,F)-1,k-T[L]>f+1e-10&&++L,D&&(V=L,L=I-z,z=I-V),L>z?void 0:o().slice(L,z+1))},i.invert=function(C){const D=i.invertRange([C,C]);return D&&D[0]},i.copy=function(){return Bx().domain(o()).range(l).round(m).paddingInner(g).paddingOuter(b).align(v)},w()}function CT(i){const o=i.copy;return i.padding=i.paddingOuter,delete i.paddingInner,i.copy=function(){return CT(o())},i}var DT=Array.prototype.map;const ys=Array.prototype.slice,Gd=new Map,Up=Symbol("vega_scale");function Xd(i){return i[Up]=!0,i}function Yn(i,o,a){return arguments.length>1?(Gd.set(i,function $g(i,o,a){const l=function(){const f=o();return f.invertRange||(f.invertRange=f.invert?function No(i){return function(o){let u,a=o[0],l=o[1];return l=l&&a[b]<=u&&(f<0&&(f=b),m=b);if(!(f<0))return l=i.invertExtent(a[f]),u=i.invertExtent(a[m]),[void 0===l[0]?l[1]:l[0],void 0===u[1]?u[0]:u[1]]}}(f):void 0),f.type=i,Xd(f)};return l.metadata=(0,N.Rg)((0,N.IX)(a)),l}(i,o,a)),this):ah(i)?Gd.get(i):void 0}function ah(i){return Gd.has(i)}function Kc(i,o){const a=Gd.get(i);return a&&a.metadata[o]}function AC(i){return Kc(i,Zo)}function gb(i){return Kc(i,Pg)}function TC(i){return Kc(i,il)}function MT(i){return Kc(i,qd)}function TT(i){return Kc(i,fc)}function kT(i){return Kc(i,Fg)}Yn("identity",function oT(i){var o;function a(l){return null==l||isNaN(l=+l)?o:l}return a.invert=a,a.domain=a.range=function(l){return arguments.length?(i=Array.from(l,xg),a):i.slice()},a.unknown=function(l){return arguments.length?(o=l,a):o},a.copy=function(){return oT(i).unknown(o)},i=arguments.length?Array.from(i,xg):[0,1],_s(a)}),Yn(rh,function fx(){var i=Eg();return i.copy=function(){return Ap(i,fx())},Ud.apply(i,arguments),_s(i)},Zo),Yn(qd,function cT(){const i=lT(wg()).domain([1,10]);return i.copy=()=>Ap(i,cT()).base(i.base()),Ud.apply(i,arguments),i},[Zo,qd]),Yn(pb,px,Zo),Yn(zs,function iC(){return px.apply(null,arguments).exponent(.5)},Zo),Yn(mb,function Hd(){var i=mx(wg());return i.copy=function(){return Ap(i,Hd()).constant(i.constant())},Ud.apply(i,arguments)},Zo),Yn(Bp,function rC(){return Ud.apply(zn(gx,Ag,di,Nc,ta,Ri,Va,Bi,qh,Nr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},[Zo,MC]),Yn(zp,function _x(){return Ud.apply(zn(dT,fR,za,Mf,gi,Wi,K0,R1,qh,bo).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},[Zo,MC]),Yn(Sl,oC,[Zo,fc]),Yn(`${Sl}-${rh}`,oC,[Zo,fc]),Yn(`${Sl}-${qd}`,function ib(){var i=lT(tl()).domain([1,10]);return i.copy=function(){return Cl(i,ib()).base(i.base())},Yc.apply(i,arguments)},[Zo,fc,qd]),Yn(`${Sl}-${pb}`,fT,[Zo,fc]),Yn(`${Sl}-${zs}`,function aC(){return fT.apply(null,arguments).exponent(.5)},[Zo,fc]),Yn(`${Sl}-${mb}`,function sC(){var i=mx(tl());return i.copy=function(){return Cl(i,sC()).constant(i.constant())},Yc.apply(i,arguments)},[Zo,fc]),Yn(`${Vp}-${rh}`,function rb(){var i=_s(Ip()(Bs));return i.copy=function(){return Cl(i,rb())},Yc.apply(i,arguments)},[Zo,fc]),Yn(`${Vp}-${qd}`,function Tg(){var i=lT(Ip()).domain([.1,1,10]);return i.copy=function(){return Cl(i,Tg()).base(i.base())},Yc.apply(i,arguments)},[Zo,fc,qd]),Yn(`${Vp}-${pb}`,yx,[Zo,fc]),Yn(`${Vp}-${zs}`,function cC(){return yx.apply(null,arguments).exponent(.5)},[Zo,fc]),Yn(`${Vp}-${mb}`,function hT(){var i=mx(Ip());return i.copy=function(){return Cl(i,hT()).constant(i.constant())},Yc.apply(i,arguments)},[Zo,fc]),Yn(Fg,function uC(){var l,i=[],o=[],a=[];function u(){var m=0,g=Math.max(1,o.length);for(a=new Array(g-1);++m0?a[g-1]:i[0],g=a?[l[a-1],o]:[l[v-1],l[v]]},m.unknown=function(b){return arguments.length&&(f=b),m},m.thresholds=function(){return l.slice()},m.copy=function(){return bx().domain([i,o]).range(u).unknown(f)},Ud.apply(_s(m),arguments)},il),Yn(Px,function dC(){var a,i=[.5],o=[0,1],l=1;function u(f){return null!=f&&f<=f?o[Hy(i,f,0,l)]:a}return u.domain=function(f){return arguments.length?(i=Array.from(f),l=Math.min(i.length,o.length-1),u):i.slice()},u.range=function(f){return arguments.length?(o=Array.from(f),l=Math.min(i.length,o.length-1),u):o.slice()},u.invertExtent=function(f){var m=o.indexOf(f);return[i[m-1],i[m]]},u.unknown=function(f){return arguments.length?(a=f,u):a},u.copy=function(){return dC().domain(i).range(o).unknown(a)},Ud.apply(u,arguments)},il),Yn(jp,function sh(){let i=[],o=[];function a(l){return null==l||l!=l?void 0:o[(Hy(i,l)-1)%o.length]}return a.domain=function(l){return arguments.length?(i=function zx(i){return DT.call(i,N.He)}(l),a):i.slice()},a.range=function(l){return arguments.length?(o=ys.call(l),a):o.slice()},a.tickFormat=function(l,u){return Cg(i[0],(0,N.fj)(i),l??10,u)},a.copy=function(){return sh().domain(a.domain()).range(a.range())},a},[Pg,il]),Yn(Lx,Ex,Pg),Yn("band",Bx,Pg),Yn($x,function ST(){return CT(Bx().paddingInner(1))},Pg);const IT=["clamp","base","constant","exponent"];function Vx(i,o){const a=o[0],l=(0,N.fj)(o)-a;return function(u){return i(a+u*l)}}function _b(i,o,a){return lC(kC(o||"rgb",a),i)}function Bg(i,o){const a=new Array(o),l=o+1;for(let u=0;ui[g]?m[g](i[g]()):0),m):(0,N.a9)(.5)}function kC(i,o){const a=re[function Yd(i){return"interpolate"+i.toLowerCase().split("-").map(o=>o[0].toUpperCase()+o.slice(1)).join("")}(i)];return null!=o&&a&&a.gamma?a.gamma(o):a}function IC(i){const o=i.length/6|0,a=new Array(o);for(let l=0;l1?(Hp[i]=o,this):Hp[i]}OT({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},IC),OT({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"},i=>_b(IC(i)));const jg="symbol",Vu="discrete",_R=i=>(0,N.kJ)(i)?i.map(o=>String(o)):String(i),bs=(i,o)=>i[1]-o[1],NT=(i,o)=>o[1]-i[1];function OC(i,o,a){let l;return(0,N.hj)(o)&&(i.bins&&(o=Math.max(o,i.bins.length)),null!=a&&(o=Math.min(o,Math.floor((0,N.yP)(i.domain())/a||1)+1))),(0,N.Kn)(o)&&(l=o.step,o=o.interval),(0,N.HD)(o)&&(o=i.type===Bp?Of(o):i.type==zp?Bm(o):(0,N.vU)("Only time and utc scales accept interval strings."),l&&(o=o.every(l))),o}function RC(i,o,a){let l=i.range(),u=l[0],f=(0,N.fj)(l),m=bs;if(u>f&&(l=f,f=u,u=l,m=NT),u=Math.floor(u),f=Math.ceil(f),o=o.map(g=>[g,i(g)]).filter(g=>u<=g[1]&&g[1]<=f).sort(m).map(g=>g[0]),a>0&&o.length>1){const g=[o[0],(0,N.fj)(o)];for(;o.length>a&&o.length>=3;)o=o.filter((b,v)=>!(v%2));o.length<3&&(o=g)}return o}function Kd(i,o){return i.bins?RC(i,i.bins):i.ticks?i.ticks(o):i.domain()}function FT(i,o,a,l,u,f){const m=o.type;let g=_R;if(m===Bp||u===Bp)g=i.timeFormat(l);else if(m===zp||u===zp)g=i.utcFormat(l);else if(MT(m)){const b=i.formatFloat(l);if(f||o.bins)g=b;else{const v=jx(o,a,!1);g=w=>v(w)?b(w):""}}else if(o.tickFormat){const b=o.domain();g=i.formatSpan(b[0],b[b.length-1],a,l)}else l&&(g=i.format(l));return g}function jx(i,o,a){const l=Kd(i,o),u=i.base(),f=Math.log(u),m=Math.max(1,u*o/l.length),g=b=>{let v=b/Math.pow(u,Math.round(Math.log(b)/f));return v*ucn[i.type]||i.bins;function LT(i,o,a,l,u,f,m){const g=ju[o.type]&&f!==Bp&&f!==zp?function s3(i,o,a){const l=o[ju[o.type]](),u=l.length;let m,f=u>1?l[1]-l[0]:l[0];for(m=1;m(o,a,l)=>{const u=Wp(l[a+1],Wp(l.max,1/0)),f=LC(o,i),m=LC(u,i);return f&&m?f+" \u2013 "+m:m?"< "+m:"\u2265 "+f},Wp=(i,o)=>i??o,FC=i=>(o,a)=>a?i(o):null,PC=i=>o=>i(o),LC=(i,o)=>Number.isFinite(i)?o(i):null;function lh(i,o,a){a=a||{};const l=Math.max(3,a.maxlen||7),u=function yR(i,o,a,l){const u=l||o.type;return(0,N.HD)(a)&&function AT(i){return Kc(i,MC)}(u)&&(a=a.replace(/%a/g,"%A").replace(/%b/g,"%B")),a||u!==Bp?a||u!==zp?LT(i,o,5,null,a,l,!0):i.utcFormat("%A, %d %B %Y, %X UTC"):i.timeFormat("%A, %d %B %Y, %X")}(i,o,a.format,a.formatType);if(TC(o.type)){const f=Ux(o).slice(1).map(u),m=f.length;return`${m} boundar${1===m?"y":"ies"}: ${f.join(", ")}`}if(gb(o.type)){const f=o.domain(),m=f.length;return`${m} value${1===m?"":"s"}: ${m>l?f.slice(0,l-2).map(u).join(", ")+", ending with "+f.slice(-1).map(u):f.map(u).join(", ")}`}{const f=o.domain();return`values from ${u(f[0])} to ${u((0,N.fj)(f))}`}}let Hx=0;function bb(i){return i&&i.gradient}function $C(i,o,a){const l=i.gradient;let u=i.id,f="radial"===l?"p_":"";return u||(u=i.id="gradient_"+Hx++,"radial"===l?(i.x1=hc(i.x1,.5),i.y1=hc(i.y1,.5),i.r1=hc(i.r1,0),i.x2=hc(i.x2,.5),i.y2=hc(i.y2,.5),i.r2=hc(i.r2,.5),f="p_"):(i.x1=hc(i.x1,0),i.y1=hc(i.y1,0),i.x2=hc(i.x2,1),i.y2=hc(i.y2,0))),o[u]=i,"url("+(a||"")+"#"+f+u+")"}function hc(i,o){return i??o}function qp(i,o){var l,a=[];return l={gradient:"linear",x1:i?i[0]:0,y1:i?i[1]:0,x2:o?o[0]:1,y2:o?o[1]:0,stops:a,stop:function(u,f){return a.push({offset:u,color:f}),l}}}const zT={basis:{curve:function Nd(i){return new hg(i)}},"basis-closed":{curve:function Ya(i){return new eR(i)}},"basis-open":{curve:function DE(i){return new SE(i)}},bundle:{curve:AA,tension:"beta",value:.85},cardinal:{curve:ME,tension:"tension",value:0},"cardinal-open":{curve:Oy,tension:"tension",value:0},"cardinal-closed":{curve:Fd,tension:"tension",value:0},"catmull-rom":{curve:kA,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Ly,tension:"alpha",value:.5},"catmull-rom-open":{curve:tR,tension:"alpha",value:.5},linear:{curve:IE},"linear-closed":{curve:function RE(i){return new OE(i)}},monotone:{horizontal:function FA(i){return new NA(i)},vertical:function NE(i){return new Zv(i)}},natural:{curve:function Fu(i){return new Qv(i)}},step:{curve:function PA(i){return new _g(i,.5)}},"step-after":{curve:function FE(i){return new _g(i,1)}},"step-before":{curve:function LA(i){return new _g(i,0)}}};function qx(i,o,a){var l=(0,N.nr)(zT,i)&&zT[i],u=null;return l&&(u=l.curve||l[o||"vertical"],l.tension&&null!=a&&(u=u[l.tension](a))),u}const BC={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},bR=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,vb=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,zC=/^((\s+,?\s*)|(,\s*))/,VT=/^[01]/;function Gp(i){const o=[];return(i.match(bR)||[]).forEach(l=>{let u=l[0];const f=u.toLowerCase(),m=BC[f],g=function jT(i,o,a){const l=[];for(let u=0;o&&u1&&(k=Math.sqrt(k),a*=k,l*=k);const F=D/a,L=C/a,z=-C/l,V=D/l,U=F*g+L*b,W=z*g+V*b,Y=F*i+L*o,H=z*i+V*o;let te=1/((Y-U)*(Y-U)+(H-W)*(H-W))-.25;te<0&&(te=0);let ce=Math.sqrt(te);f==u&&(ce=-ce);const le=.5*(U+Y)-ce*(H-W),ve=.5*(W+H)+ce*(Y-U),xe=Math.atan2(W-ve,U-le);let J=Math.atan2(H-ve,Y-le)-xe;J<0&&1===f?J+=Zc:J>0&&0===f&&(J-=Zc);const oe=Math.ceil(Math.abs(J/(ch+.001))),we=[];for(let ne=0;ne+i}function Wg(i,o,a){return Math.max(o,Math.min(i,a))}function Vs(){var i=uo,o=mc,a=Gx,l=Hg,u=Hu(0),f=u,m=u,g=u,b=null;function v(w,C,D){var T,I=C??+i.call(this,w),k=D??+o.call(this,w),F=+a.call(this,w),L=+l.call(this,w),z=Math.min(F,L)/2,V=Wg(+u.call(this,w),0,z),U=Wg(+f.call(this,w),0,z),W=Wg(+m.call(this,w),0,z),Y=Wg(+g.call(this,w),0,z);if(b||(b=T=ex()),V<=0&&U<=0&&W<=0&&Y<=0)b.rect(I,k,F,L);else{var H=I+F,Z=k+L;b.moveTo(I+V,k),b.lineTo(H-U,k),b.bezierCurveTo(H-Uu*U,k,H,k+Uu*U,H,k+U),b.lineTo(H,Z-Y),b.bezierCurveTo(H,Z-Uu*Y,H-Uu*Y,Z,H-Y,Z),b.lineTo(I+W,Z),b.bezierCurveTo(I+Uu*W,Z,I,Z-Uu*W,I,Z-W),b.lineTo(I,k+V),b.bezierCurveTo(I,k+Uu*V,I+Uu*V,k,I+V,k),b.closePath()}if(T)return b=null,T+""||null}return v.x=function(w){return arguments.length?(i=Hu(w),v):i},v.y=function(w){return arguments.length?(o=Hu(w),v):o},v.width=function(w){return arguments.length?(a=Hu(w),v):a},v.height=function(w){return arguments.length?(l=Hu(w),v):l},v.cornerRadius=function(w,C,D,T){return arguments.length?(u=Hu(w),f=null!=C?Hu(C):u,g=null!=D?Hu(D):u,m=null!=T?Hu(T):f,v):u},v.context=function(w){return arguments.length?(b=w??null,v):b},v}function Xp(){var i,o,a,l,f,m,g,b,u=null;function v(C,D,T){const I=T/2;if(f){var k=g-D,F=C-m;if(k||F){var L=Math.hypot(k,F),z=(k/=L)*b,V=(F/=L)*b,U=Math.atan2(F,k);u.moveTo(m-z,g-V),u.lineTo(C-k*I,D-F*I),u.arc(C,D,I,U-Math.PI,U),u.lineTo(m+z,g+V),u.arc(m,g,b,U,U+Math.PI)}else u.arc(C,D,I,0,Zc);u.closePath()}else f=1;m=C,g=D,b=I}function w(C){var D,I,F,T=C.length,k=!1;for(null==u&&(u=F=ex()),D=0;D<=T;++D)!(Di.x||0,Kp=i=>i.y||0,Qd=i=>!1!==i.defined,ER=function jA(){var i=tx,o=nx,a=tr(0),l=null,u=zy,f=BA,m=zA,g=null,b=Ld(v);function v(){var w,C,D=+i.apply(this,arguments),T=+o.apply(this,arguments),I=u.apply(this,arguments)-Fy,k=f.apply(this,arguments)-Fy,F=Ry(k-I),L=k>I;if(g||(g=w=b()),Tlo)if(F>gg-lo)g.moveTo(T*mp(I),T*Aa(I)),g.arc(0,0,T,I,k,!L),D>lo&&(g.moveTo(D*mp(k),D*Aa(k)),g.arc(0,0,D,k,I,L));else{var xe,Q,z=I,V=k,U=I,W=k,Y=F,H=F,Z=m.apply(this,arguments)/2,te=Z>lo&&(l?+l.apply(this,arguments):pr(D*D+T*T)),ce=Ny(Ry(T-D)/2,+a.apply(this,arguments)),le=ce,ve=ce;if(te>lo){var J=gp(te/D*Aa(Z)),oe=gp(te/T*Aa(Z));(Y-=2*J)>lo?(U+=J*=L?1:-1,W-=J):(Y=0,U=W=(I+k)/2),(H-=2*oe)>lo?(z+=oe*=L?1:-1,V-=oe):(H=0,z=V=(I+k)/2)}var we=T*mp(z),ne=T*Aa(z),ge=D*mp(W),de=D*Aa(W);if(ce>lo){var Ve,Te=T*mp(V),Pe=T*Aa(V),Ie=D*mp(U),Ne=D*Aa(U);if(F1?0:i<-1?lc:Math.acos(i)}((ft*Dt+Ke*je)/(pr(ft*ft+Ke*Ke)*pr(Dt*Dt+je*je)))/2),it=pr(Ve[0]*Ve[0]+Ve[1]*Ve[1]);le=Ny(ce,(D-it)/(tt-1)),ve=Ny(ce,(T-it)/(tt+1))}else le=ve=0}H>lo?ve>lo?(xe=ix(Ie,Ne,we,ne,T,ve,L),Q=ix(Te,Pe,ge,de,T,ve,L),g.moveTo(xe.cx+xe.x01,xe.cy+xe.y01),velo&&Y>lo?le>lo?(xe=ix(ge,de,Te,Pe,D,-le,L),Q=ix(we,ne,Ie,Ne,D,-le,L),g.lineTo(xe.cx+xe.x01,xe.cy+xe.y01),lei.startAngle||0).endAngle(i=>i.endAngle||0).padAngle(i=>i.padAngle||0).innerRadius(i=>i.innerRadius||0).outerRadius(i=>i.outerRadius||0).cornerRadius(i=>i.cornerRadius||0),ew=UA().x(Yp).y1(Kp).y0(i=>(i.y||0)+(i.height||0)).defined(Qd),Zp=UA().y(Kp).x1(Yp).x0(i=>(i.x||0)+(i.width||0)).defined(Qd),CR=rx().x(Yp).y(Kp).defined(Qd),SR=Vs().x(Yp).y(Kp).width(i=>i.width||0).height(i=>i.height||0).cornerRadius(i=>Zd(i.cornerRadiusTopLeft,i.cornerRadius)||0,i=>Zd(i.cornerRadiusTopRight,i.cornerRadius)||0,i=>Zd(i.cornerRadiusBottomRight,i.cornerRadius)||0,i=>Zd(i.cornerRadiusBottomLeft,i.cornerRadius)||0),qC=function KA(i,o){let a=null,l=Ld(u);function u(){let f;if(a||(a=f=l()),i.apply(this,arguments).draw(a,+o.apply(this,arguments)),f)return a=null,f+""||null}return i="function"==typeof i?i:tr(i||ox),o="function"==typeof o?o:tr(void 0===o?64:+o),u.type=function(f){return arguments.length?(i="function"==typeof f?f:tr(f),u):i},u.size=function(f){return arguments.length?(o="function"==typeof f?f:tr(+f),u):o},u.context=function(f){return arguments.length?(a=f??null,u):a},u}().type(i=>GT(i.shape||"circle")).size(i=>Zd(i.size,64)),Sb=Xp().x(Yp).y(Kp).defined(Qd).size(i=>i.size||1);function GC(i){return i.cornerRadius||i.cornerRadiusTopLeft||i.cornerRadiusTopRight||i.cornerRadiusBottomRight||i.cornerRadiusBottomLeft}function gc(i,o,a,l){return SR.context(i)(o,a,l)}var Mb=1;function iw(){Mb=1}function rw(i,o,a){var l=o.clip,u=i._defs,f=o.clip_id||(o.clip_id="clip"+Mb++),m=u.clipping[f]||(u.clipping[f]={id:f});return(0,N.mf)(l)?m.path=l(null):GC(a)?m.path=gc(null,a,0,0):(m.width=a.width||0,m.height=a.height||0),"url(#"+f+")"}function Fo(i){this.clear(),i&&this.union(i)}function ow(i){this.mark=i,this.bounds=this.bounds||new Fo}function Ab(i){ow.call(this,i),this.items=this.items||[]}function XC(i){this._pending=0,this._loader=i||Pf()}function QT(i){i._pending+=1}function Wu(i){i._pending-=1}function Dl(i,o,a){if(o.stroke&&0!==o.opacity&&0!==o.strokeOpacity){const l=null!=o.strokeWidth?+o.strokeWidth:1;i.expand(l+(a?function JT(i,o){return i.strokeJoin&&"miter"!==i.strokeJoin?0:o}(o,l):0))}return i}Fo.prototype={clone(){return new Fo(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(i){return this.x1===i.x1&&this.y1===i.y1&&this.x2===i.x2&&this.y2===i.y2},set(i,o,a,l){return athis.x2&&(this.x2=i),o>this.y2&&(this.y2=o),this},expand(i){return this.x1-=i,this.y1-=i,this.x2+=i,this.y2+=i,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(i){return this.x1*=i,this.y1*=i,this.x2*=i,this.y2*=i,this},translate(i,o){return this.x1+=i,this.x2+=i,this.y1+=o,this.y2+=o,this},rotate(i,o,a){const l=this.rotatedPoints(i,o,a);return this.clear().add(l[0],l[1]).add(l[2],l[3]).add(l[4],l[5]).add(l[6],l[7])},rotatedPoints(i,o,a){var{x1:l,y1:u,x2:f,y2:m}=this,g=Math.cos(i),b=Math.sin(i),v=o-o*g+a*b,w=a-o*b-a*g;return[g*l-b*u+v,b*l+g*u+w,g*l-b*m+v,b*l+g*m+w,g*f-b*u+v,b*f+g*u+w,g*f-b*m+v,b*f+g*m+w]},union(i){return i.x1this.x2&&(this.x2=i.x2),i.y2>this.y2&&(this.y2=i.y2),this},intersect(i){return i.x1>this.x1&&(this.x1=i.x1),i.y1>this.y1&&(this.y1=i.y1),i.x2=i.x2&&this.y1<=i.y1&&this.y2>=i.y2},alignsWith(i){return i&&(this.x1==i.x1||this.x2==i.x2||this.y1==i.y1||this.y2==i.y2)},intersects(i){return i&&!(this.x2i.x2||this.y2i.y2)},contains(i,o){return!(ithis.x2||othis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},(0,N.XW)(Ab,ow),XC.prototype={pending(){return this._pending},sanitizeURL(i){const o=this;return QT(o),o._loader.sanitize(i,{context:"href"}).then(a=>(Wu(o),a)).catch(()=>(Wu(o),null))},loadImage(i){const o=this,a=typeof Image<"u"?Image:null;return QT(o),o._loader.sanitize(i,{context:"image"}).then(l=>{const u=l.href;if(!u||!a)throw{url:u};const f=new a,m=(0,N.nr)(l,"crossOrigin")?l.crossOrigin:"anonymous";return null!=m&&(f.crossOrigin=m),f.onload=()=>Wu(o),f.onerror=()=>Wu(o),f.src=u,f}).catch(l=>(Wu(o),{complete:!1,width:0,height:0,src:l&&l.url||""}))},ready(){const i=this;return new Promise(o=>{!function a(l){i.pending()?setTimeout(()=>{a(!0)},10):o(l)}(!1)})}};const Kg=Zc-1e-8;let uh,Zg,Jo,Qp,YC,Tb,sw,Jp;const Jd=(i,o)=>uh.add(i,o),aw=(i,o)=>Jd(Zg=i,Jo=o),KC=i=>Jd(i,uh.y1),lw=i=>Jd(uh.x1,i),dh=(i,o)=>YC*i+sw*o,fh=(i,o)=>Tb*i+Jp*o,ZC=(i,o)=>Jd(dh(i,o),fh(i,o)),QC=(i,o)=>aw(dh(i,o),fh(i,o));function kb(i,o){return uh=i,o?(Qp=o*pc,YC=Jp=Math.cos(Qp),Tb=Math.sin(Qp),sw=-Tb):(YC=Jp=1,Qp=Tb=sw=0),qu}const qu={beginPath(){},closePath(){},moveTo:QC,lineTo:QC,rect(i,o,a,l){Qp?(ZC(i+a,o),ZC(i+a,o+l),ZC(i,o+l),QC(i,o)):(Jd(i+a,o+l),aw(i,o))},quadraticCurveTo(i,o,a,l){const u=dh(i,o),f=fh(i,o),m=dh(a,l),g=fh(a,l);Qg(Zg,u,m,KC),Qg(Jo,f,g,lw),aw(m,g)},bezierCurveTo(i,o,a,l,u,f){const m=dh(i,o),g=fh(i,o),b=dh(a,l),v=fh(a,l),w=dh(u,f),C=fh(u,f);Ur(Zg,m,b,w,KC),Ur(Jo,g,v,C,lw),aw(w,C)},arc(i,o,a,l,u,f){if(l+=Qp,u+=Qp,Zg=a*Math.cos(u)+i,Jo=a*Math.sin(u)+o,Math.abs(u-l)>Kg)Jd(i-a,o-a),Jd(i+a,o+a);else{const m=v=>Jd(a*Math.cos(v)+i,a*Math.sin(v)+o);let g,b;if(m(l),m(u),u!==l)if((l%=Zc)<0&&(l+=Zc),(u%=Zc)<0&&(u+=Zc),uu;++b,g-=ch)m(g);else for(g=l-l%ch+ch,b=0;b<4&&g1e-14?(w=m*m+g*f,w>=0&&(w=Math.sqrt(w),b=(-m+w)/f,v=(-m-w)/f)):b=.5*g/m,0D)return!1;k>C&&(C=k)}else if(T>0){if(k0&&(i.globalAlpha=a,i.fillStyle=Jr(i,o,o.fill),!0)}var t_=[];function ef(i,o,a){var l=null!=(l=o.strokeWidth)?l:1;return!(l<=0)&&(a*=null==o.strokeOpacity?1:o.strokeOpacity)>0&&(i.globalAlpha=a,i.strokeStyle=Jr(i,o,o.stroke),i.lineWidth=l,i.lineCap=o.strokeCap||"butt",i.lineJoin=o.strokeJoin||"miter",i.miterLimit=o.strokeMiterLimit||10,i.setLineDash&&(i.setLineDash(o.strokeDash||t_),i.lineDashOffset=o.strokeDashOffset||0),!0)}function Ob(i,o){return i.zindex-o.zindex||i.index-o.index}function d(i){if(!i.zdirty)return i.zitems;var l,u,f,o=i.items,a=[];for(u=0,f=o.length;u=0;)if(l=o(a[u]))return l;if(a===f)for(u=(a=i.items).length;--u>=0;)if(!a[u].zindex&&(l=o(a[u])))return l;return null}function x(i){return function(o,a,l){p(a,u=>{(!l||l.intersects(u.bounds))&&A(i,o,u,u)})}}function S(i){return function(o,a,l){a.items.length&&(!l||l.intersects(a.bounds))&&A(i,o,a.items[0],a.items)}}function A(i,o,a,l){var u=null==a.opacity?1:a.opacity;0!==u&&(i(o,l)||(e_(o,a),a.fill&&ph(o,a,u)&&o.fill(),a.stroke&&ef(o,a,u)&&o.stroke()))}function O(i){return i=i||N.yb,function(o,a,l,u,f,m){return l*=o.pixelRatio,u*=o.pixelRatio,_(a,g=>{const b=g.bounds;if((!b||b.contains(f,m))&&b&&i(o,g,l,u,f,m))return g})}}function P(i,o){return function(a,l,u,f){var w,m=Array.isArray(l)?l[0]:l,g=o??m.fill,b=m.stroke&&a.isPointInStroke;return b&&(w=m.strokeCap,a.lineWidth=m.strokeWidth??1,a.lineCap=w??"butt"),!i(a,l)&&(g&&a.isPointInPath(u,f)||b&&a.isPointInStroke(u,f))}}function B(i){return O(P(i))}function q(i,o){return"translate("+i+","+o+")"}function G(i){return"rotate("+i+")"}function se(i){return q(i.x||0,i.y||0)}function Re(i,o,a){function f(m,g){var b=g.x||0,v=g.y||0,w=g.angle||0;m.translate(b,v),w&&m.rotate(w*=pc),m.beginPath(),o(m,g),w&&m.rotate(-w),m.translate(-b,-v)}return{type:i,tag:"path",nested:!1,attr:function l(m,g){m("transform",function Ee(i){return q(i.x||0,i.y||0)+(i.angle?" "+G(i.angle):"")}(g)),m("d",o(null,g))},bound:function u(m,g){return o(kb(m,g.angle),g),Dl(m,g).translate(g.x||0,g.y||0)},draw:x(f),pick:B(f),isect:a||cw(f)}}var Le=Re("arc",function tw(i,o){return ER.context(i)(o)});function dn(i,o,a){function f(b,v){b.beginPath(),o(b,v)}const m=P(f);return{type:i,tag:"path",nested:!0,attr:function l(b,v){var w=v.mark.items;w.length&&b("d",o(null,w))},bound:function u(b,v){var w=v.items;return 0===w.length?b:(o(kb(b),w),Dl(b,w[0]))},draw:S(f),pick:function g(b,v,w,C,D,T){var I=v.items,k=v.bounds;return!I||!I.length||k&&!k.contains(D,T)?null:m(b,I,w*=b.pixelRatio,C*=b.pixelRatio)?I[0]:null},isect:en,tip:a}}var vi=dn("area",function Db(i,o){const a=o[0];return("horizontal"===a.orient?Zp:ew).curve(qx(a.interpolate||"linear",a.orient,a.tension)).context(i)(o)},function Ye(i,o){for(var m,g,a="horizontal"===i[0].orient?o[1]:o[0],l="horizontal"===i[0].orient?"y":"x",u=i.length,f=1/0;--u>=0;)!1!==i[u].defined&&(g=Math.abs(i[u][l]-a)).5&&o<1.5?.5-Math.abs(o-1):0}function Ml(i,o){const a=ua(o);i("d",gc(null,o,a,a))}function Gu(i,o,a,l){const u=ua(o);i.beginPath(),gc(i,o,(a||0)+u,(l||0)+u)}const dw=P(Gu),tf=P(Gu,!1),tS=P(Gu,!0);var nS={type:"group",tag:"g",nested:!1,attr:function da(i,o){i("transform",se(o))},bound:function Nb(i,o){if(!o.clip&&o.items){const a=o.items,l=a.length;for(let u=0;u{const f=u.x||0,m=u.y||0,g=u.strokeForeground,b=null==u.opacity?1:u.opacity;(u.stroke||u.fill)&&b&&(Gu(i,u,f,m),e_(i,u),u.fill&&ph(i,u,b)&&i.fill(),u.stroke&&!g&&ef(i,u,b)&&i.stroke()),i.save(),i.translate(f,m),u.clip&&ca(i,u),a&&a.translate(-f,-m),p(u,v=>{("group"===v.marktype||null==l||l.includes(v.marktype))&&this.draw(i,v,a,l)}),a&&a.translate(f,m),i.restore(),g&&u.stroke&&b&&(Gu(i,u,f,m),e_(i,u),ef(i,u,b)&&i.stroke())})},pick:function tk(i,o,a,l,u,f){if(o.bounds&&!o.bounds.contains(u,f)||!o.items)return null;const m=a*i.pixelRatio,g=l*i.pixelRatio;return _(o,b=>{let v,w,C;const D=b.bounds;if(D&&!D.contains(u,f))return;w=b.x||0,C=b.y||0;const k=b.clip;if(k&&(uw+(b.width||0)||fC+(b.height||0)))return;if(i.save(),i.translate(w,C),w=u-w,C=f-C,k&&GC(b)&&!tS(i,b,m,g))return i.restore(),null;const F=b.strokeForeground,L=!1!==o.interactive;return L&&F&&b.stroke&&tf(i,b,m,g)?(i.restore(),b):(v=_(b,z=>function nk(i,o,a){return(!1!==i.interactive||"group"===i.marktype)&&i.bounds&&i.bounds.contains(o,a)}(z,w,C)?this.pick(z,a,l,w,C):null),!v&&L&&(b.fill||!F&&b.stroke)&&dw(i,b,m,g)&&(v=b),i.restore(),v||null)})},isect:JC,content:function Rb(i,o,a){i("clip-path",o.clip?rw(a,o,o):null)},background:function fa(i,o){i("class","background"),i("aria-hidden",!0),Ml(i,o)},foreground:function em(i,o){i("class","foreground"),i("aria-hidden",!0),o.strokeForeground?Ml(i,o):i("d","")}},tm={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function fw(i,o){var a=i.image;return(!a||i.url&&i.url!==a.url)&&(a={complete:!1,width:0,height:0},o.loadImage(i.url).then(l=>{i.image=l,i.image.url=i.url})),a}function Fb(i,o){return null!=i.width?i.width:o&&o.width?!1!==i.aspect&&i.height?i.height*o.width/o.height:o.width:0}function iS(i,o){return null!=i.height?i.height:o&&o.height?!1!==i.aspect&&i.width?i.width*o.height/o.width:o.height:0}function n_(i,o){return"center"===i?o/2:"right"===i?o:0}function Pb(i,o){return"middle"===i?o/2:"bottom"===i?o:0}var rk={type:"image",tag:"image",nested:!1,attr:function AR(i,o,a){const l=fw(o,a),u=Fb(o,l),f=iS(o,l),m=(o.x||0)-n_(o.align,u),g=(o.y||0)-Pb(o.baseline,f);i("href",!l.src&&l.toDataURL?l.toDataURL():l.src||"",tm["xmlns:xlink"],"xlink:href"),i("transform",q(m,g)),i("width",u),i("height",f),i("preserveAspectRatio",!1===o.aspect?"none":"xMidYMid")},bound:function ik(i,o){const a=o.image,l=Fb(o,a),u=iS(o,a),f=(o.x||0)-n_(o.align,l),m=(o.y||0)-Pb(o.baseline,u);return i.set(f,m,f+l,m+u)},draw:function TR(i,o,a){p(o,l=>{if(a&&!a.intersects(l.bounds))return;const u=fw(l,this);let f=Fb(l,u),m=iS(l,u);if(0===f||0===m)return;let v,w,C,D,g=(l.x||0)-n_(l.align,f),b=(l.y||0)-Pb(l.baseline,m);!1!==l.aspect&&(w=u.width/u.height,C=l.width/l.height,w==w&&C==C&&w!==C&&(C=0;)if(!1!==i[l].defined&&(u=i[l].x-o[0])*u+(f=i[l].y-o[1])*f{if(!a||a.intersects(l.bounds)){var u=null==l.opacity?1:l.opacity;u&&c3(i,l,u)&&(e_(i,l),i.stroke())}})},pick:O(function d3(i,o,a,l){return!!i.isPointInStroke&&c3(i,o,1)&&i.isPointInStroke(a,l)}),isect:Ib},f3=Re("shape",function a3(i,o){return(o.mark.shape||o.shape).context(i)(o)}),KU=Re("symbol",function DR(i,o){return qC.context(i)(o)},en);const IR=(0,N.$m)();var yc={height:hi,measureWidth:lk,estimateWidth:pw,width:pw,canvas:hw};function hw(i){yc.width=i&&_c?lk:pw}function pw(i,o){return Lb(Jc(i,o),hi(i))}function Lb(i,o){return~~(.8*i.length*o)}function lk(i,o){return hi(i)<=0||!(o=Jc(i,o))?0:$b(o,im(i))}function $b(i,o){const a=`(${o}) ${i}`;let l=IR.get(a);return void 0===l&&(_c.font=o,l=_c.measureText(i).width,IR.set(a,l)),l}function hi(i){return null!=i.fontSize?+i.fontSize||0:11}function Qc(i){return null!=i.lineHeight?i.lineHeight:hi(i)+2}function mh(i){return function mw(i){return(0,N.kJ)(i)?i.length>1?i:i[0]:i}(i.lineBreak&&i.text&&!(0,N.kJ)(i.text)?i.text.split(i.lineBreak):i.text)}function r_(i){const o=mh(i);return((0,N.kJ)(o)?o.length-1:0)*Qc(i)}function Jc(i,o){const a=null==o?"":(o+"").trim();return i.limit>0&&a.length?function _w(i,o){var a=+i.limit,l=function gw(i){if(yc.width===lk){const o=im(i);return a=>$b(a,o)}if(yc.width===pw){const o=hi(i);return a=>Lb(a,o)}return o=>yc.width(i,o)}(i);if(l(o)>>1))>a?m=b+1:g=b;return u+o.slice(m)}for(;m>>1)))Math.max(D,yc.width(o,T)),0)):C=yc.width(o,w),"center"===u?b-=C/2:"right"===u&&(b-=C),i.set(b+=m,v+=g,b+C,v+l),o.angle&&!a)i.rotate(o.angle*pc,m,g);else if(2===a)return i.rotatedPoints(o.angle*pc,m,g);return i}var eu={arc:Le,area:vi,group:nS,image:rk,line:ok,path:kR,rect:GU,rule:i_,shape:f3,symbol:KU,text:{type:"text",tag:"text",nested:!1,attr:function p3(i,o){var b,a=o.dx||0,l=(o.dy||0)+ck(o),u=rS(o),f=u.x1,m=u.y1,g=o.angle||0;i("text-anchor",h3[o.align]||"start"),g?(b=q(f,m)+" "+G(g),(a||l)&&(b+=" "+q(a,l))):b=q(f+a,m+l),i("transform",b)},bound:uk,draw:function m3(i,o,a){p(o,l=>{var f,m,g,b,v,w,C,u=null==l.opacity?1:l.opacity;if(!(a&&!a.intersects(l.bounds)||0===u||l.fontSize<=0||null==l.text||0===l.text.length)){if(i.font=im(l),i.textAlign=l.align||"left",m=(f=rS(l)).x1,g=f.y1,l.angle&&(i.save(),i.translate(m,g),i.rotate(l.angle*pc),m=g=0),m+=l.dx||0,g+=(l.dy||0)+ck(l),w=mh(l),e_(i,l),(0,N.kJ)(w))for(v=Qc(l),b=0;b=0;)if(!1!==i[a].defined&&(l=i[a].x-o[0])*l+(u=i[a].y-o[1])*u<(l=i[a].size||1)*l)return i[a];return null})};function OR(i,o,a){var l=eu[i.mark.marktype];return l.nested&&(i=i.mark),(o||l.bound)(i.bounds||(i.bounds=new Fo),i,a)}var fk={mark:null};function s_(i,o,a){var g,b,v,w,l=eu[i.marktype],u=l.bound,f=i.items,m=f&&f.length;if(l.nested)return m?v=f[0]:(fk.mark=i,v=fk),w=OR(v,u,a),o&&o.union(w)||w;if(o=o||i.bounds&&i.bounds.clear()||new Fo,m)for(g=0,b=f.length;go;)i.removeChild(a[--l]);return i}function NR(i){return"mark-"+i.marktype+(i.role?" role-"+i.role:"")+(i.name?" "+i.name:"")}function mk(i,o){const a=o.getBoundingClientRect();return[i.clientX-a.left-(o.clientLeft||0),i.clientY-a.top-(o.clientTop||0)]}function rm(i,o){this._active=null,this._handlers={},this._loader=i||Pf(),this._tooltip=o||JU}function JU(i,o,a,l){i.element().setAttribute("title",l||"")}function bc(i){this._el=null,this._bgcolor=null,this._loader=new XC(i)}b3.prototype={toJSON(i){return y3(this.root,i||0)},mark(i,o,a){const l=v3(i,o=o||this.root.items[0]);return o.items[a]=l,l.zindex&&(l.group.zdirty=!0),l}},rm.prototype={initialize(i,o,a){return this._el=i,this._obj=a||null,this.origin(o)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(i){return arguments.length?(this._origin=i||[0,0],this):this._origin.slice()},scene(i){return arguments.length?(this._scene=i,this):this._scene},on(){},off(){},_handlerIndex(i,o,a){for(let l=i?i.length:0;--l>=0;)if(i[l].type===o&&(!a||i[l].handler===a))return l;return-1},handlers(i){const o=this._handlers,a=[];if(i)a.push(...o[this.eventName(i)]);else for(const l in o)a.push(...o[l]);return a},eventName(i){const o=i.indexOf(".");return o<0?i:i.slice(0,o)},handleHref(i,o,a){this._loader.sanitize(a,{context:"href"}).then(l=>{const u=new MouseEvent(i.type,i),f=a_(null,"a");for(const m in l)f.setAttribute(m,l[m]);f.dispatchEvent(u)}).catch(()=>{})},handleTooltip(i,o,a){o&&null!=o.tooltip&&(o=function QU(i,o,a,l){var f,m,u=i&&i.mark;if(u&&(f=eu[u.marktype]).tip){for((m=mk(o,a))[0]-=l[0],m[1]-=l[1];i=i.mark.group;)m[0]-=i.x||0,m[1]-=i.y||0;i=f.tip(u.items,m)}return i}(o,i,this.canvas(),this._origin),this._tooltip.call(this._obj,this,i,o,a&&o&&o.tooltip||null))},getItemBoundingClientRect(i){const o=this.canvas();if(!o)return;const a=o.getBoundingClientRect(),l=this._origin,u=i.bounds,f=u.width(),m=u.height();let g=u.x1+l[0]+a.left,b=u.y1+l[1]+a.top;for(;i.mark&&(i=i.mark.group);)g+=i.x||0,b+=i.y||0;return{x:g,y:b,width:f,height:m,left:g,top:b,right:g+f,bottom:b+m}}},bc.prototype={initialize(i,o,a,l,u){return this._el=i,this.resize(o,a,l,u)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(i){return 0===arguments.length?this._bgcolor:(this._bgcolor=i,this)},resize(i,o,a,l){return this._width=i,this._height=o,this._origin=a||[0,0],this._scale=l||1,this},dirty(){},render(i,o){const a=this;return a._call=function(){a._render(i,o)},a._call(),a._call=null,a},_render(){},renderAsync(i,o){const a=this.render(i,o);return this._ready?this._ready.then(()=>a):Promise.resolve(a)},_load(i,o){var a=this,l=a._loader[i](o);if(!a._ready){const u=a._call;a._ready=a._loader.ready().then(f=>{f&&u(),a._ready=null})}return l},sanitizeURL(i){return this._load("sanitizeURL",i)},loadImage(i){return this._load("loadImage",i)}};const w3="dragenter",oS="dragleave",E3="dragover",gk="pointerdown",vt="pointermove",Bb="pointerout",_h="pointerover",In="mousedown",C3="mousemove",wo="mouseout",nf="mouseover",vc="click",FR="mousewheel",_k="touchstart",yk="touchmove",bk="touchend",sS=vt,om=Bb,PR=vc;function sm(i,o){rm.call(this,i,o),this._down=null,this._touch=null,this._first=!0,this._events={}}function D3(i,o){(i=>i===_k||i===yk||i===bk?[_k,yk,bk]:[i])(o).forEach(a=>function M3(i,o){const a=i.canvas();a&&!i._events[o]&&(i._events[o]=1,a.addEventListener(o,i[o]?l=>i[o](l):l=>i.fire(o,l)))}(i,a))}function vw(i,o,a){o.forEach(l=>i.fire(l,a))}function aS(i,o,a){return function(l){const u=this._active,f=this.pickEvent(l);f===u||((!u||!u.exit)&&vw(this,a,l),this._active=f,vw(this,o,l)),vw(this,i,l)}}function A3(i){return function(o){vw(this,i,o),this._active=null}}function lS(i){bc.call(this,i),this._options={},this._redraw=!1,this._dirty=new Fo,this._tempb=new Fo}(0,N.XW)(sm,rm,{initialize(i,o,a){return this._canvas=i&&pk(i,"canvas"),[vc,In,gk,vt,Bb,oS].forEach(l=>D3(this,l)),rm.prototype.initialize.call(this,i,o,a)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:["keydown","keypress","keyup",w3,oS,E3,gk,"pointerup",vt,Bb,_h,In,"mouseup",C3,wo,nf,vc,"dblclick","wheel",FR,_k,yk,bk],DOMMouseScroll(i){this.fire(FR,i)},pointermove:aS([vt,C3],[_h,nf],[Bb,wo]),dragover:aS([E3],[w3],[oS]),pointerout:A3([Bb,wo]),dragleave:A3([oS]),pointerdown(i){this._down=this._active,this.fire(gk,i)},mousedown(i){this._down=this._active,this.fire(In,i)},click(i){this._down===this._active&&(this.fire(vc,i),this._down=null)},touchstart(i){this._touch=this.pickEvent(i.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(_k,i,!0)},touchmove(i){this.fire(yk,i,!0)},touchend(i){this.fire(bk,i,!0),this._touch=null},fire(i,o,a){const l=a?this._touch:this._active,u=this._handlers[i];if(o.vegaType=i,i===PR&&l&&l.href?this.handleHref(o,l,l.href):(i===sS||i===om)&&this.handleTooltip(o,l,i!==om),u)for(let f=0,m=u.length;f=0&&l.splice(u,1),this},pickEvent(i){const o=mk(i,this._canvas),a=this._origin;return this.pick(this._scene,o[0],o[1],o[0]-a[0],o[1]-a[1])},pick(i,o,a,l,u){const f=this.context();return eu[i.marktype].pick.call(this,f,i,o,a,l,u)}});const I3=bc.prototype;function LR(i,o){rm.call(this,i,o);const a=this;a._hrefHandler=$R(a,(l,u)=>{u&&u.href&&a.handleHref(l,u,u.href)}),a._tooltipHandler=$R(a,(l,u)=>{a.handleTooltip(l,u,l.type!==om)})}(0,N.XW)(lS,bc,{initialize(i,o,a,l,u,f){return this._options=f||{},this._canvas=this._options.externalContext?null:$d(1,1),i&&this._canvas&&(mr(i,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),I3.initialize.call(this,i,o,a,l,u)},resize(i,o,a,l){if(I3.resize.call(this,i,o,a,l),this._canvas)!function k3(i,o,a,l,u,f){const m=typeof HTMLElement<"u"&&i instanceof HTMLElement&&null!=i.parentNode,g=i.getContext("2d"),b=m?function T3(){return typeof window<"u"&&window.devicePixelRatio||1}():u;i.width=o*b,i.height=a*b;for(const v in f)g[v]=f[v];return m&&1!==b&&(i.style.width=o+"px",i.style.height=a+"px"),g.pixelRatio=b,g.setTransform(b,0,0,b,b*l[0],b*l[1]),i}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const u=this._options.externalContext;u||(0,N.vU)("CanvasRenderer is missing a valid canvas or context"),u.scale(this._scale,this._scale),u.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(i){const o=this._tempb.clear().union(i.bounds);let a=i.mark.group;for(;a;)o.translate(a.x||0,a.y||0),a=a.mark.group;this._dirty.union(o)},_render(i,o){const a=this.context(),l=this._origin,u=this._width,f=this._height,m=this._dirty,g=((i,o,a)=>(new Fo).set(0,0,o,a).translate(-i[0],-i[1]))(l,u,f);a.save();const b=this._redraw||m.empty()?(this._redraw=!1,g.expand(1)):function r8(i,o,a){return o.expand(1).round(),i.pixelRatio%1&&o.scale(i.pixelRatio).round().scale(1/i.pixelRatio),o.translate(-a[0]%1,-a[1]%1),i.beginPath(),i.rect(o.x1,o.y1,o.width(),o.height()),i.clip(),o}(a,g.intersect(m),l);return this.clear(-l[0],-l[1],u,f),this.draw(a,i,b,o),a.restore(),m.clear(),this},draw(i,o,a,l){if("group"!==o.marktype&&null!=l&&!l.includes(o.marktype))return;const u=eu[o.marktype];o.clip&&function lr(i,o){var a=o.clip;i.save(),(0,N.mf)(a)?(i.beginPath(),a(i),i.clip()):ca(i,o.group)}(i,o),u.draw.call(this,i,o,a,l),o.clip&&i.restore()},clear(i,o,a,l){const u=this._options,f=this.context();"pdf"!==u.type&&!u.externalContext&&f.clearRect(i,o,a,l),null!=this._bgcolor&&(f.fillStyle=this._bgcolor,f.fillRect(i,o,a,l))}});const $R=(i,o)=>a=>{let l=a.target.__data__;l=Array.isArray(l)?l[0]:l,a.vegaType=a.type,o.call(i._obj,a,l)};(0,N.XW)(LR,rm,{initialize(i,o,a){let l=this._svg;return l&&(l.removeEventListener(PR,this._hrefHandler),l.removeEventListener(sS,this._tooltipHandler),l.removeEventListener(om,this._tooltipHandler)),this._svg=l=i&&pk(i,"svg"),l&&(l.addEventListener(PR,this._hrefHandler),l.addEventListener(sS,this._tooltipHandler),l.addEventListener(om,this._tooltipHandler)),rm.prototype.initialize.call(this,i,o,a)},canvas(){return this._svg},on(i,o){const a=this.eventName(i),l=this._handlers;if(this._handlerIndex(l[a],i,o)<0){const f={type:i,handler:o,listener:$R(this,o)};(l[a]||(l[a]=[])).push(f),this._svg&&this._svg.addEventListener(a,f.listener)}return this},off(i,o){const a=this.eventName(i),l=this._handlers[a],u=this._handlerIndex(l,i,o);return u>=0&&(this._svg&&this._svg.removeEventListener(a,l[u].listener),l.splice(u,1)),this}});const O3="aria-hidden",BR="aria-label",zR="role",VR="aria-roledescription",vk="graphics-object",jR="graphics-symbol",xk=(i,o,a)=>({[zR]:i,[VR]:o,[BR]:a||void 0}),R3=(0,N.Rg)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),UR={axis:{desc:"axis",caption:function a8(i){const o=i.datum,a=i.orient,l=o.title?P3(i):null,u=i.context,f=u.scales[o.scale].value,m=u.dataflow.locale(),g=f.type;return("left"===a||"right"===a?"Y":"X")+"-axis"+(l?` titled '${l}'`:"")+` for a ${gb(g)?"discrete":g} scale with ${lh(m,f,i)}`}},legend:{desc:"legend",caption:function l8(i){const o=i.datum,a=o.title?P3(i):null,l=`${o.type||""} legend`.trim(),u=o.scales,f=Object.keys(u),m=i.context,g=m.scales[u[f[0]]].value,b=m.dataflow.locale();return function c8(i){return i.length?i[0].toUpperCase()+i.slice(1):i}(l)+(a?` titled '${a}'`:"")+` for ${function WR(i){return i=i.map(o=>o+("fill"===o||"stroke"===o?" color":"")),i.length<2?i[0]:i.slice(0,-1).join(", ")+" and "+(0,N.fj)(i)}(f)} with ${lh(b,g,i)}`}},"title-text":{desc:"title",caption:i=>`Title text '${F3(i)}'`},"title-subtitle":{desc:"subtitle",caption:i=>`Subtitle text '${F3(i)}'`}},HR={ariaRole:zR,ariaRoleDescription:VR,description:BR};function eo(i,o){const a=!1===o.aria;if(i(O3,a||void 0),a||null==o.description)for(const l in HR)i(HR[l],void 0);else{const l=o.mark.marktype;i(BR,o.description),i(zR,o.ariaRole||("group"===l?vk:jR)),i(VR,o.ariaRoleDescription||`${l} mark`)}}function N3(i){return!1===i.aria?{[O3]:!0}:R3[i.role]?null:UR[i.role]?function s8(i,o){try{const a=i.items[0];return xk(o.role||jR,o.desc,a.description||(o.caption||(()=>""))(a))}catch{return null}}(i,UR[i.role]):function o8(i){const o=i.marktype,a="group"===o||"text"===o||i.items.some(l=>null!=l.description&&!1!==l.aria);return xk(a?vk:jR,`${o} mark container`,i.description)}(i)}function F3(i){return(0,N.IX)(i.text).join(" ")}function P3(i){try{return(0,N.IX)((0,N.fj)(i.items).items[0].text).join(" ")}catch{return null}}const L3=i=>(i+"").replace(/&/g,"&").replace(//g,">"),qR=i=>L3(i).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function GR(){let i="",o="",a="";const l=[],u=()=>o=a="",m=(b,v)=>(null!=v&&(o+=` ${b}="${qR(v)}"`),g),g={open(b){(b=>{o&&(i+=`${o}>${a}`,u()),l.push(b)})(b),o="<"+b;for(var v=arguments.length,w=new Array(v>1?v-1:0),C=1;C${a}`:"/>"):``,u(),g},attr:m,text:b=>(a+=L3(b),g),toString:()=>i};return g}const Ae=i=>ke(GR(),i)+"";function ke(i,o){if(i.open(o.tagName),o.hasAttributes()){const a=o.attributes,l=a.length;for(let u=0;u1&&i.previousSibling!=o}(f,a))&&o.insertBefore(f,a?a.nextSibling:o.firstChild),f}(0,N.XW)(xw,bc,{initialize(i,o,a,l,u){return this._defs={},this._clearDefs(),i&&(this._svg=js(i,0,"svg",es),this._svg.setAttributeNS(B3,"xmlns",es),this._svg.setAttributeNS(B3,"xmlns:xlink",tm["xmlns:xlink"]),this._svg.setAttribute("version",tm.version),this._svg.setAttribute("class","marks"),mr(i,1),this._root=js(this._svg,0,"g",es),Po(this._root,$3),mr(this._svg,1)),this.background(this._bgcolor),zb.initialize.call(this,i,o,a,l,u)},background(i){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",i),zb.background.apply(this,arguments)},resize(i,o,a,l){return zb.resize.call(this,i,o,a,l),this._svg&&(Po(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const i=this._svg,o=this._bgcolor;if(!i)return null;let a;o&&(i.removeAttribute("style"),a=js(i,0,"rect",es),Po(a,{width:this._width,height:this._height,fill:o}));const l=Ae(i);return o&&(i.removeChild(a),this._svg.style.setProperty("background-color",o)),l},_render(i,o){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,i,void 0,o),mr(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(i){i.dirty!==this._dirtyID&&(i.dirty=this._dirtyID,this._dirty.push(i))},isDirty(i){return this._dirtyAll||!i._svg||!i._svg.ownerSVGElement||i.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const i=this._dirty;if(!i.length||!this._dirtyID)return!0;const o=++this._dirtyID;let a,l,u,f,m,g,b;for(m=0,g=i.length;m{v.dirty=o})),!l.zdirty){if(a.exit){f.nested&&l.items.length?(b=l.items[0],b._svg&&this._update(f,b._svg,b)):a._svg&&(b=a._svg.parentNode,b&&b.removeChild(a._svg)),a._svg=null;continue}a=f.nested?l.items[0]:a,a._update!==o&&(a._svg&&a._svg.ownerSVGElement?this._update(f,a._svg,a):(this._dirtyAll=!1,XR(a,o)),a._update=o)}return!this._dirtyAll},mark(i,o,a,l){if(!this.isDirty(o))return o._svg;const u=this._svg,f=o.marktype,m=eu[f],g=!1===o.interactive?"none":null,b="g"===m.tag,v=Vb(o,i,a,"g",u);if("group"!==f&&null!=l&&!l.includes(f))return mr(v,0),o._svg;v.setAttribute("class",NR(o));const w=N3(o);for(const I in w)xc(v,I,w[I]);b||xc(v,"pointer-events",g),xc(v,"clip-path",o.clip?rw(this,o,o.group):null);let C=null,D=0;const T=I=>{const k=this.isDirty(I),F=Vb(I,v,C,m.tag,u);k&&(this._update(m,F,I),b&&function Oa(i,o,a,l){o=o.lastChild.previousSibling;let u,f=0;p(a,m=>{u=i.mark(o,m,u,l),++f}),mr(o,1+f)}(this,F,I,l)),C=F,++D};return m.nested?o.items.length&&T(o.items[0]):p(o,T),mr(v,D),v},_update(i,o,a){Al=o,ol=o.__values__,eo(bh,a),i.attr(bh,a,this);const l=f8[i.type];l&&l.call(this,i,o,a),Al&&this.style(Al,a)},style(i,o){if(null!=o){for(const a in Wt){let l="font"===a?gh(o):o[a];if(l===ol[a])continue;const u=Wt[a];null==l?i.removeAttribute(u):(bb(l)&&(l=$C(l,this._defs.gradient,ZR())),i.setAttribute(u,l+"")),ol[a]=l}for(const a in cS)KR(i,cS[a],o[a])}},defs(){const i=this._svg,o=this._defs;let a=o.el,l=0;for(const u in o.gradient)a||(o.el=a=js(i,1,"defs",es)),l=u8(a,o.gradient[u],l);for(const u in o.clipping)a||(o.el=a=js(i,1,"defs",es)),l=d8(a,o.clipping[u],l);a&&(0===l?(i.removeChild(a),o.el=null):mr(a,l))},_clearDefs(){const i=this._defs;i.gradient={},i.clipping={}}});let Al=null,ol=null;const f8={group(i,o,a){const l=Al=o.childNodes[2];ol=l.__values__,i.foreground(bh,a,this),ol=o.__values__,Al=o.childNodes[1],i.content(bh,a,this);const u=Al=o.childNodes[0];i.background(bh,a,this);const f=!1===a.mark.interactive?"none":null;if(f!==ol.events&&(xc(l,"pointer-events",f),xc(u,"pointer-events",f),ol.events=f),a.strokeForeground&&a.stroke){const m=a.fill;xc(l,"display",null),this.style(u,a),xc(u,"stroke",null),m&&(a.fill=null),ol=l.__values__,this.style(l,a),m&&(a.fill=m),Al=null}else xc(l,"display","none")},image(i,o,a){!1===a.smooth?(KR(o,"image-rendering","optimizeSpeed"),KR(o,"image-rendering","pixelated")):KR(o,"image-rendering",null)},text(i,o,a){const l=mh(a);let u,f,m,g;(0,N.kJ)(l)?(f=l.map(b=>Jc(a,b)),u=f.join("\n"),u!==ol.text&&(mr(o,0),m=o.ownerDocument,g=Qc(a),f.forEach((b,v)=>{const w=a_(m,"tspan",es);w.__data__=a,w.textContent=b,v&&(w.setAttribute("x",0),w.setAttribute("dy",g)),o.appendChild(w)}),ol.text=u)):(f=Jc(a,l),f!==ol.text&&(o.textContent=f,ol.text=f)),xc(o,"font-family",gh(a)),xc(o,"font-size",hi(a)+"px"),xc(o,"font-style",a.fontStyle),xc(o,"font-variant",a.fontVariant),xc(o,"font-weight",a.fontWeight)}};function bh(i,o,a){o!==ol[i]&&(a?function z3(i,o,a,l){null!=a?i.setAttributeNS(l,o,a):i.removeAttributeNS(l,o)}(Al,i,o,a):xc(Al,i,o),ol[i]=o)}function KR(i,o,a){a!==ol[o]&&(null==a?i.style.removeProperty(o):i.style.setProperty(o,a+""),ol[o]=a)}function Po(i,o){for(const a in o)xc(i,a,o[a])}function xc(i,o,a){null!=a?i.setAttribute(o,a):i.removeAttribute(o)}function ZR(){let i;return typeof window>"u"?"":(i=window.location).hash?i.href.slice(0,-i.hash.length):i.href}function V3(i){bc.call(this,i),this._text=null,this._defs={gradient:{},clipping:{}}}(0,N.XW)(V3,bc,{svg(){return this._text},_render(i){const o=GR();o.open("svg",(0,N.l7)({},tm,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const a=this._bgcolor;return a&&"transparent"!==a&&"none"!==a&&o.open("rect",{width:this._width,height:this._height,fill:a}).close(),o.open("g",$3,{transform:"translate("+this._origin+")"}),this.mark(o,i),o.close(),this.defs(o),this._text=o.close()+"",this},mark(i,o){const a=eu[o.marktype],l=a.tag,u=[eo,a.attr];i.open("g",{class:NR(o),"clip-path":o.clip?rw(this,o,o.group):null},N3(o),{"pointer-events":"g"!==l&&!1===o.interactive?"none":null});const f=m=>{const g=this.href(m);if(g&&i.open("a",g),i.open(l,this.attr(o,m,u,"g"!==l?l:null)),"text"===l){const b=mh(m);if((0,N.kJ)(b)){const v={x:0,dy:Qc(m)};for(let w=0;wthis.mark(i,C)),i.close(),b&&w?(v&&(m.fill=null),m.stroke=w,i.open("path",this.attr(o,m,a.foreground,"bgrect")).close(),v&&(m.fill=v)):i.open("path",this.attr(o,m,a.foreground,"bgfore")).close()}i.close(),g&&i.close()};return a.nested?o.items&&o.items.length&&f(o.items[0]):p(o,f),i.close()},href(i){const o=i.href;let a;if(o){if(a=this._hrefs&&this._hrefs[o])return a;this.sanitizeURL(o).then(l=>{l["xlink:href"]=l.href,l.href=null,(this._hrefs||(this._hrefs={}))[o]=l})}return null},attr(i,o,a,l){const u={},f=(m,g,b,v)=>{u[v||m]=g};return Array.isArray(a)?a.forEach(m=>m(f,o,this)):a(f,o,this),l&&function Hr(i,o,a,l,u){let f;if(null==o||("bgrect"===l&&!1===a.interactive&&(i["pointer-events"]="none"),"bgfore"===l&&(!1===a.interactive&&(i["pointer-events"]="none"),i.display="none",null!==o.fill)))return i;"image"===l&&!1===o.smooth&&(f=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),"text"===l&&(i["font-family"]=gh(o),i["font-size"]=hi(o)+"px",i["font-style"]=o.fontStyle,i["font-variant"]=o.fontVariant,i["font-weight"]=o.fontWeight);for(const m in Wt){let g=o[m];const b=Wt[m];"transparent"===g&&("fill"===b||"stroke"===b)||null!=g&&(bb(g)&&(g=$C(g,u.gradient,"")),i[b]=g)}for(const m in cS){const g=o[m];null!=g&&(f=f||[],f.push(`${cS[m]}: ${g};`))}f&&(i.style=f.join(" "))}(u,o,i,l,this._defs),u},defs(i){const o=this._defs.gradient,a=this._defs.clipping;if(Object.keys(o).length+Object.keys(a).length!==0){i.open("defs");for(const u in o){const f=o[u],m=f.stops;"radial"===f.gradient?(i.open("pattern",{id:"p_"+u,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),i.open("rect",{width:"1",height:"1",fill:"url(#"+u+")"}).close(),i.close(),i.open("radialGradient",{id:u,fx:f.x1,fy:f.y1,fr:f.r1,cx:f.x2,cy:f.y2,r:f.r2})):i.open("linearGradient",{id:u,x1:f.x1,x2:f.x2,y1:f.y1,y2:f.y2});for(let g=0;g!sf.svgMarkTypes.includes(u));this._svgRenderer.render(i,sf.svgMarkTypes),this._canvasRenderer.render(i,l)},resize(i,o,a,l){return jb.resize.call(this,i,o,a,l),this._svgRenderer.resize(i,o,a,l),this._canvasRenderer.resize(i,o,a,l),this},background(i){return sf.svgOnTop?this._canvasRenderer.background(i):this._svgRenderer.background(i),this}}),(0,N.XW)(QR,sm,{initialize(i,o,a){const l=js(js(i,0,"div"),sf.svgOnTop?0:1,"div");return sm.prototype.initialize.call(this,l,o,a)}});const l_={Canvas:"canvas",PNG:"png",SVG:"svg",Hybrid:"hybrid",None:"none"},c_={};function hS(i,o){return i=String(i||"").toLowerCase(),arguments.length>1?(c_[i]=o,this):c_[i]}function tN(i,o,a){const l=[],u=(new Fo).union(o),f=i.marktype;return f?nN(i,u,a,l):"group"===f?j3(i,u,a,l):(0,N.vU)("Intersect scene must be mark node or group item.")}function nN(i,o,a,l){if(function p8(i,o,a){return i.bounds&&o.intersects(i.bounds)&&("group"===i.marktype||!1!==i.interactive&&(!a||a(i)))}(i,o,a)){const u=i.items,f=i.marktype,m=u.length;let g=0;if("group"===f)for(;g=0;f--)if(a[f]!=l[f])return!1;for(f=a.length-1;f>=0;f--)if(!iN(i[u=a[f]],o[u],u))return!1;return typeof i==typeof o}(i,o):i==o)}function pS(i,o){return iN(Gp(i),Gp(o))}function q3(){iw(),function BT(){Hx=0}()}const Hb="top",af="left",kl="right",Xu="bottom",Ek="start",Ck="middle",Il="end",X3="x",b8="y",Sk="group",Y3="axis",K3="title",Dk="legend",mS="row-header",Z3="row-footer",Q3="row-title",rN="column-header",ww="column-footer",J3="column-title",oN="none",Mk="all",Wb="each",sN="flush",am="column",u_="row";function aN(i){ze.call(this,null,i)}function Ak(i,o,a){return o(i.bounds.clear(),i,a)}(0,N.XW)(aN,ze,{transform(i,o){const a=o.dataflow,l=i.mark,u=l.marktype,f=eu[u],m=f.bound;let b,g=l.bounds;if(f.nested)l.items.length&&a.dirty(l.items[0]),g=Ak(l,m),l.items.forEach(v=>{v.bounds.clear().union(g)});else if(u===Sk||i.modified())switch(o.visit(o.MOD,v=>a.dirty(v)),g.clear(),l.items.forEach(v=>g.union(Ak(v,m))),l.role){case Y3:case Dk:case K3:o.reflow()}else b=o.changed(o.REM),o.visit(o.ADD,v=>{g.union(Ak(v,m))}),o.visit(o.MOD,v=>{b=b||g.alignsWith(v.bounds),a.dirty(v),g.union(Ak(v,m))}),b&&(g.clear(),l.items.forEach(v=>g.union(v.bounds)));return H3(l),o.modifies("bounds")}});const lN=":vega_identifier:";function cN(i){ze.call(this,0,i)}function iB(i){ze.call(this,null,i)}function dN(i){ze.call(this,null,i)}cN.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,N.XW)(cN,ze,{transform(i,o){const a=function uN(i){return i._signals[lN]||(i._signals[lN]=i.add(0))}(o.dataflow),l=i.as;let u=a.value;return o.visit(o.ADD,f=>f[l]=f[l]||++u),a.set(this.value=u),o}}),(0,N.XW)(iB,ze,{transform(i,o){let a=this.value;a||(a=o.dataflow.scenegraph().mark(i.markdef,function rB(i){const o=i.groups,a=i.parent;return o&&1===o.size?o.get(Object.keys(o.object)[0]):o&&a?o.lookup(a):null}(i),i.index),a.group.context=i.context,i.context.group||(i.context.group=a.group),a.source=this.source,a.clip=i.clip,a.interactive=i.interactive,this.value=a);const l=a.marktype===Sk?Ab:ow;return o.visit(o.ADD,u=>l.call(u,a)),(i.modified("clip")||i.modified("interactive"))&&(a.clip=i.clip,a.interactive=!!i.interactive,a.zdirty=!0,o.reflow()),a.items=o.source,o}});const oB={parity:i=>i.filter((o,a)=>a%2?o.opacity=0:1),greedy:(i,o)=>{let a;return i.filter((l,u)=>u&&sB(a.bounds,l.bounds,o)?l.opacity=0:(a=l,1))}},sB=(i,o,a)=>a>Math.max(o.x1-i.x2,i.x1-o.x2,o.y1-i.y2,i.y1-o.y2),aB=(i,o)=>{for(var f,a=1,l=i.length,u=i[0].bounds;a{const o=i.bounds;return o.width()>1&&o.height()>1},hN=i=>(i.forEach(o=>o.opacity=1),i),lB=(i,o)=>i.reflow(o.modified()).modifies("opacity");function cB(i){ze.call(this,null,i)}(0,N.XW)(dN,ze,{transform(i,o){const a=oB[i.method]||oB.parity,l=i.separation||0;let f,m,u=o.materialize(o.SOURCE).source;if(!u||!u.length)return;if(!i.method)return i.modified("method")&&(hN(u),o=lB(o,i)),o;if(u=u.filter(fN),!u.length)return;if(i.sort&&(u=u.slice().sort(i.sort)),f=hN(u),o=lB(o,i),f.length>=3&&aB(f,l)){do{f=a(f,l)}while(f.length>=3&&aB(f,l));f.length<3&&!(0,N.fj)(u).opacity&&(f.length>1&&((0,N.fj)(f).opacity=0),(0,N.fj)(u).opacity=1)}i.boundScale&&i.boundTolerance>=0&&(m=((i,o,a)=>{var l=i.range(),u=new Fo;return o===Hb||o===Xu?u.set(l[0],-1/0,l[1],1/0):u.set(-1/0,l[0],1/0,l[1]),u.expand(a||1),f=>u.encloses(f.bounds)})(i.boundScale,i.boundOrient,+i.boundTolerance),u.forEach(b=>{m(b)||(b.opacity=0)}));const g=f[0].mark.bounds.clear();return u.forEach(b=>{b.opacity&&g.union(b.bounds)}),o}}),(0,N.XW)(cB,ze,{transform(i,o){const a=o.dataflow;if(o.visit(o.ALL,l=>a.dirty(l)),o.fields&&o.fields.zindex){const l=o.source&&o.source[0];l&&(l.mark.zdirty=!0)}}});const sl=new Fo;function Ew(i,o,a){return i[o]===a?0:(i[o]=a,1)}function C8(i){var o=i.items[0].orient;return o===af||o===kl}function D8(i,o,a,l){var U,W,u=o.items[0],f=u.datum,m=null!=u.translate?u.translate:.5,g=u.orient,b=function S8(i){let o=+i.grid;return[i.ticks?o++:-1,i.labels?o++:-1,o+ +i.domain]}(f),v=u.range,w=u.offset,C=u.position,D=u.minExtent,T=u.maxExtent,I=f.title&&u.items[b[2]].items[0],k=u.titlePadding,F=u.bounds,L=I&&r_(I),z=0,V=0;switch(sl.clear().union(F),F.clear(),(U=b[0])>-1&&F.union(u.items[U].bounds),(U=b[1])>-1&&F.union(u.items[U].bounds),g){case Hb:z=C||0,V=-w,W=Math.max(D,Math.min(T,-F.y1)),F.add(0,-W).add(v,0),I&&Tk(i,I,W,k,L,0,-1,F);break;case af:z=-w,V=C||0,W=Math.max(D,Math.min(T,-F.x1)),F.add(-W,0).add(0,v),I&&Tk(i,I,W,k,L,1,-1,F);break;case kl:z=a+w,V=C||0,W=Math.max(D,Math.min(T,F.x2)),F.add(0,0).add(W,v),I&&Tk(i,I,W,k,L,1,1,F);break;case Xu:z=C||0,V=l+w,W=Math.max(D,Math.min(T,F.y2)),F.add(0,0).add(v,W),I&&Tk(i,I,W,k,0,0,1,F);break;default:z=u.x,V=u.y}return Dl(F.translate(z,V),u),Ew(u,"x",z+m)|Ew(u,"y",V+m)&&(u.bounds=sl,i.dirty(u),u.bounds=F,i.dirty(u)),u.mark.bounds.clear().union(F)}function Tk(i,o,a,l,u,f,m,g){const b=o.bounds;if(o.auto){const v=m*(a+u+l);let w=0,C=0;i.dirty(o),f?w=(o.x||0)-(o.x=v):C=(o.y||0)-(o.y=v),o.mark.bounds.clear().union(b.translate(-w,-C)),i.dirty(o)}g.union(b)}const pN=(i,o)=>Math.floor(Math.min(i,o)),mN=(i,o)=>Math.ceil(Math.max(i,o));function A8(i){return(new Fo).set(0,0,i.width||0,i.height||0)}function uB(i){const o=i.bounds.clone();return o.empty()?o.set(0,0,0,0):o.translate(-(i.x||0),-(i.y||0))}function fo(i,o,a){return((0,N.Kn)(i)?i[o]:i)??(void 0!==a?a:0)}function dB(i){return i<0?Math.ceil(-i):0}function Cw(i,o,a){var Y,H,Z,te,ce,le,ve,xe,Q,J,oe,l=!a.nodirty,u=a.bounds===sN?A8:uB,f=sl.set(0,0,0,0),m=fo(a.align,am),g=fo(a.align,u_),b=fo(a.padding,am),v=fo(a.padding,u_),w=a.columns||o.length,C=w<=0?1:Math.ceil(o.length/w),D=o.length,T=Array(D),I=Array(w),k=0,F=Array(D),L=Array(C),z=0,V=Array(D),U=Array(D),W=Array(D);for(H=0;H1)for(H=0;H0&&(V[H]+=Q/2);if(g&&fo(a.center,u_)&&1!==w)for(H=0;H0&&(U[H]+=J/2);for(H=0;Hu&&(i.warn("Grid headers exceed limit: "+u),o=o.slice(0,u)),k+=f,z=0,U=o.length;z=0&&null==(H=a[V]);V-=D);g?(Z=null==T?H.x:Math.round(H.bounds.x1+T*H.bounds.width()),te=k):(Z=k,te=null==T?H.y:Math.round(H.bounds.y1+T*H.bounds.height())),W.union(Y.bounds.translate(Z-(Y.x||0),te-(Y.y||0))),Y.x=Z,Y.y=te,i.dirty(Y),F=m(F,W[v])}return F}function _N(i,o,a,l,u,f){if(o){i.dirty(o);var m=a,g=a;l?m=Math.round(u.x1+f*u.width()):g=Math.round(u.y1+f*u.height()),o.bounds.translate(m-(o.x||0),g-(o.y||0)),o.mark.bounds.clear().union(o.bounds),o.x=m,o.y=g,i.dirty(o)}}function on(i,o,a,l,u,f,m){const g=function hB(i,o){const a=i[o]||{};return(l,u)=>null!=a[l]?a[l]:null!=i[l]?i[l]:u}(a,o),b=function pB(i,o){let a=-1/0;return i.forEach(l=>{null!=l.offset&&(a=Math.max(a,l.offset))}),a>-1/0?a:o}(i,g("offset",0)),v=g("anchor",Ek),w=v===Il?1:v===Ck?.5:0,C={align:Wb,bounds:g("bounds",sN),columns:"vertical"===g("direction")?1:i.length,padding:g("margin",8),center:g("center"),nodirty:!0};switch(o){case af:C.anchor={x:Math.floor(l.x1)-b,column:Il,y:w*(m||l.height()+2*l.y1),row:v};break;case kl:C.anchor={x:Math.ceil(l.x2)+b,y:w*(m||l.height()+2*l.y1),row:v};break;case Hb:C.anchor={y:Math.floor(u.y1)-b,row:Il,x:w*(f||u.width()+2*u.x1),column:v};break;case Xu:C.anchor={y:Math.ceil(u.y2)+b,x:w*(f||u.width()+2*u.x1),column:v};break;case"top-left":C.anchor={x:b,y:b};break;case"top-right":C.anchor={x:f-b,y:b,column:Il};break;case"bottom-left":C.anchor={x:b,y:m-b,row:Il};break;case"bottom-right":C.anchor={x:f-b,y:m-b,column:Il,row:Il}}return C}function T8(i,o){var b,v,a=o.items[0],l=a.datum,u=a.orient,f=a.bounds,m=a.x,g=a.y;return a._bounds?a._bounds.clear().union(f):a._bounds=f.clone(),f.clear(),function ki(i,o,a){var l=o.padding,u=l-a.x,f=l-a.y;if(o.datum.title){var m=o.items[1].items[0],g=m.anchor,b=o.titlePadding||0,v=l-m.x,w=l-m.y;switch(m.orient){case af:u+=Math.ceil(m.bounds.width())+b;break;case kl:case Xu:break;default:f+=m.bounds.height()+b}switch((u||f)&&Gb(i,a,u,f),m.orient){case af:w+=qb(o,a,m,g,1,1);break;case kl:v+=qb(o,a,m,Il,0,0)+b,w+=qb(o,a,m,g,1,1);break;case Xu:v+=qb(o,a,m,g,0,0),w+=qb(o,a,m,Il,-1,0,1)+b;break;default:v+=qb(o,a,m,g,0,0)}(v||w)&&Gb(i,m,v,w),(v=Math.round(m.bounds.x1-l))<0&&(Gb(i,a,-v,0),Gb(i,m,-v,0))}else(u||f)&&Gb(i,a,u,f)}(i,a,a.items[0].items[0]),f=function Ra(i,o){return i.items.forEach(a=>o.union(a.bounds)),o.x1=i.padding,o.y1=i.padding,o}(a,f),b=2*a.padding,v=2*a.padding,f.empty()||(b=Math.ceil(f.width()+b),v=Math.ceil(f.height()+v)),"symbol"===l.type&&function mB(i){const o=i.reduce((a,l)=>(a[l.column]=Math.max(l.bounds.x2-l.x,a[l.column]||0),a),{});i.forEach(a=>{a.width=o[a.column],a.height=a.bounds.y2-a.y})}(a.items[0].items[0].items[0].items),u!==oN&&(a.x=m=0,a.y=g=0),a.width=b,a.height=v,Dl(f.set(m,g,m+b,g+v),a),a.mark.bounds.clear().union(f),a}function qb(i,o,a,l,u,f,m){const b=a.datum.vgrad,w=("symbol"===i.datum.type||!f&&b||m?o:o.items[0]).bounds[u?"y2":"x2"]-i.padding,C=b&&f?w:0,D=b&&f?0:w,T=u<=0?0:r_(a);return Math.round(l===Ek?C:l===Il?D-T:.5*(w-T))}function Gb(i,o,a,l){o.x+=a,o.y+=l,o.bounds.translate(a,l),o.mark.bounds.translate(a,l),i.dirty(o)}function yN(i){ze.call(this,null,i)}function bN(i,o){let a=0;if(void 0===o)for(let l of i)(l=+l)&&(a+=l);else{let l=-1;for(let u of i)(u=+o(u,++l,i))&&(a+=u)}return a}function vN(i){ze.call(this,null,i)}function vB(i){ze.call(this,null,i)}function Xb(){return Ti({})}function xB(i){ze.call(this,null,i)}function wB(i){ze.call(this,[],i)}(0,N.XW)(yN,ze,{transform(i,o){const a=o.dataflow;return i.mark.items.forEach(l=>{i.layout&&function fB(i,o,a){var w,C,D,T,I,k,F,l=function M8(i){var u,f,o=i.items,a=o.length,l=0;const m={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;l{(D=L.orient||kl)!==oN&&(F[D]||(F[D]=[])).push(L)});for(const L in F){const z=F[L];Cw(i,z,on(z,L,a.legends,g,b,u,f))}v.forEach(L=>{const z=L.bounds;if(z.equals(L._bounds)||(L.bounds=L._bounds,i.dirty(L),L.bounds=z,i.dirty(L)),!a.autosize||"fit"!==a.autosize.type&&"fit-x"!==a.autosize.type&&"fit-y"!==a.autosize.type)m.union(z);else switch(L.orient){case af:case kl:m.add(z.x1,0).add(z.x2,0);break;case Hb:case Xu:m.add(0,z.y1).add(0,z.y2)}})}m.union(g).union(b),w&&m.union(function gB(i,o,a,l,u){var V,f=o.items[0],g=f.orient,b=f.anchor,v=f.offset,w=f.padding,C=f.items[0].items[0],D=f.items[1]&&f.items[1].items[0],T=g===af||g===kl?l:a,I=0,k=0,F=0,L=0,z=0;if(f.frame!==Sk?g===af?(I=u.y2,T=u.y1):g===kl?(I=u.y1,T=u.y2):(I=u.x1,T=u.x2):g===af&&(I=l,T=0),V=b===Ek?I:b===Il?T:(I+T)/2,D&&D.text){switch(g){case Hb:case Xu:z=C.bounds.height()+w;break;case af:L=C.bounds.width()+w;break;case kl:L=-C.bounds.width()-w}sl.clear().union(D.bounds),sl.translate(L-(D.x||0),z-(D.y||0)),Ew(D,"x",L)|Ew(D,"y",z)&&(i.dirty(D),D.bounds.clear().union(sl),D.mark.bounds.clear().union(sl),i.dirty(D)),sl.clear().union(D.bounds)}else sl.clear();switch(sl.union(C.bounds),g){case Hb:k=V,F=u.y1-sl.height()-v;break;case af:k=u.x1-sl.width()-v,F=V;break;case kl:k=u.x2+sl.width()+v,F=V;break;case Xu:k=V,F=u.y2+v;break;default:k=f.x,F=f.y}return Ew(f,"x",k)|Ew(f,"y",F)&&(sl.translate(k,F),i.dirty(f),f.bounds.clear().union(sl),o.bounds.clear().union(sl),i.dirty(f)),f.bounds}(i,w,u,f,m)),o.clip&&m.set(0,0,o.width||0,o.height||0),function bB(i,o,a,l){const u=l.autosize||{},f=u.type;if(i._autosize<1||!f)return;let m=i._width,g=i._height,b=Math.max(0,o.width||0),v=Math.max(0,Math.ceil(-a.x1)),w=Math.max(0,o.height||0),C=Math.max(0,Math.ceil(-a.y1));const D=Math.max(0,Math.ceil(a.x2-b)),T=Math.max(0,Math.ceil(a.y2-w));if("padding"===u.contains){const I=i.padding();m-=I.left+I.right,g-=I.top+I.bottom}f===oN?(v=0,C=0,b=m,w=g):"fit"===f?(b=Math.max(0,m-v-D),w=Math.max(0,g-C-T)):"fit-x"===f?(b=Math.max(0,m-v-D),g=w+C+T):"fit-y"===f?(m=b+v+D,w=Math.max(0,g-C-T)):"pad"===f&&(m=b+v+D,g=w+C+T),i._resizeView(m,g,b,w,[v,C],u.resize)}(i,o,m,a)}(a,l,i)}),function _B(i){return i&&"legend-entry"!==i.mark.role}(i.mark.group)?o.reflow():o}}),(0,N.XW)(vN,ze,{transform(i,o){if(this.value&&!i.modified())return o.StopPropagation;var a=o.dataflow.locale(),l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=this.value,f=i.scale,g=OC(f,null==i.count?i.values?i.values.length:10:i.count,i.minstep),b=i.format||FT(a,f,g,i.formatSpecifier,i.formatType,!!i.values),v=i.values?RC(f,i.values,g):Kd(f,g);return u&&(l.rem=u),u=v.map((w,C)=>Ti({index:C/(v.length-1||1),value:w,label:b(w)})),i.extra&&u.length&&u.push(Ti({index:-1,extra:{value:u[0].value},label:""})),l.source=u,l.add=u,this.value=u,l}}),(0,N.XW)(vB,ze,{transform(i,o){var a=o.dataflow,l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=i.item||Xb,f=i.key||Kt,m=this.value;return(0,N.kJ)(l.encode)&&(l.encode=null),m&&(i.modified("key")||o.modified(f))&&(0,N.vU)("DataJoin does not support modified key function or fields."),m||(o=o.addAll(),this.value=m=function Yu(i){const o=(0,N.Xr)().test(a=>a.exit);return o.lookup=a=>o.get(i(a)),o}(f)),o.visit(o.ADD,g=>{const b=f(g);let v=m.get(b);v?v.exit?(m.empty--,l.add.push(v)):l.mod.push(v):(v=u(g),m.set(b,v),l.add.push(v)),v.datum=g,v.exit=!1}),o.visit(o.MOD,g=>{const b=f(g),v=m.get(b);v&&(v.datum=g,l.mod.push(v))}),o.visit(o.REM,g=>{const b=f(g),v=m.get(b);g===v.datum&&!v.exit&&(l.rem.push(v),v.exit=!0,++m.empty)}),o.changed(o.ADD_MOD)&&l.modifies("datum"),(o.clean()||i.clean&&m.empty>a.cleanThreshold)&&a.runAfter(m.clean),l}}),(0,N.XW)(xB,ze,{transform(i,o){var a=o.fork(o.ADD_REM),l=i.mod||!1,u=i.encoders,f=o.encode;if((0,N.kJ)(f)){if(!a.changed()&&!f.every(C=>u[C]))return o.StopPropagation;f=f[0],a.encode=null}var m="enter"===f,g=u.update||N.k,b=u.enter||N.k,v=u.exit||N.k,w=(f&&!m?u[f]:g)||N.k;if(o.changed(o.ADD)&&(o.visit(o.ADD,C=>{b(C,i),g(C,i)}),a.modifies(b.output),a.modifies(g.output),w!==N.k&&w!==g&&(o.visit(o.ADD,C=>{w(C,i)}),a.modifies(w.output))),o.changed(o.REM)&&v!==N.k&&(o.visit(o.REM,C=>{v(C,i)}),a.modifies(v.output)),m||w!==N.k){const C=o.MOD|(i.modified()?o.REFLOW:0);m?(o.visit(C,D=>{const T=b(D,i)||l;(w(D,i)||T)&&a.mod.push(D)}),a.mod.length&&a.modifies(b.output)):o.visit(C,D=>{(w(D,i)||l)&&a.mod.push(D)}),a.mod.length&&a.modifies(w.output)}return a.changed()?a:o.StopPropagation}}),(0,N.XW)(wB,ze,{transform(i,o){if(null!=this.value&&!i.modified())return o.StopPropagation;var D,T,I,k,F,a=o.dataflow.locale(),l=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=this.value,f=i.type||jg,m=i.scale,g=+i.limit,b=OC(m,null==i.count?5:i.count,i.minstep),w=i.format||LT(a,m,b,f,i.formatSpecifier,i.formatType,!!i.values||f===jg),C=i.values||Ux(m,b);return u&&(l.rem=u),f===jg?(g&&C.length>g?(o.dataflow.warn("Symbol legend count exceeds limit, filtering items."),u=C.slice(0,g-1),F=!0):u=C,(0,N.mf)(I=i.size)?(!i.values&&0===m(u[0])&&(u=u.slice(1)),k=u.reduce((L,z)=>Math.max(L,I(z,i)),0)):I=(0,N.a9)(k=I||8),u=u.map((L,z)=>Ti({index:z,label:w(L,z,u),value:L,offset:k,size:I(L,i)})),F&&u.push(Ti({index:u.length,label:`\u2026${C.length-u.length} entries`,value:F=C[u.length],offset:k,size:I(F,i)}))):"gradient"===f?(D=m.domain(),T=Qo(m,D[0],(0,N.fj)(D)),C.length<3&&!i.values&&D[0]!==(0,N.fj)(D)&&(C=[D[0],(0,N.fj)(D)]),u=C.map((L,z)=>Ti({index:z,label:w(L,z,C),value:L,perc:T(L)}))):(I=C.length-1,T=function $T(i){const o=i.domain(),a=o.length-1;let l=+o[0],u=+(0,N.fj)(o),f=u-l;if(i.type===Px){const m=a?f/a:.1;l-=m,u+=m,f=u-l}return m=>(m-l)/f}(m),u=C.map((L,z)=>Ti({index:z,label:w(L,z,C),value:L,perc:z?T(L):0,perc2:z===I?1:T(C[z+1])}))),l.source=u,l.add=u,this.value=u,l}});const k8=i=>i.source.x,Ik=i=>i.source.y,xN=i=>i.target.x,wN=i=>i.target.y;function Ok(i){ze.call(this,{},i)}Ok.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},(0,N.XW)(Ok,ze,{transform(i,o){var a=i.sourceX||k8,l=i.sourceY||Ik,u=i.targetX||xN,f=i.targetY||wN,m=i.as||"path",b=i.shape||"line",v=SN.get(b+"-"+(i.orient||"vertical"))||SN.get(b);return v||(0,N.vU)("LinkPath unsupported type: "+i.shape+(i.orient?"-"+i.orient:"")),o.visit(o.SOURCE,w=>{w[m]=v(a(w),l(w),u(w),f(w))}),o.reflow(i.modified()).modifies(m)}});const Rk=(i,o,a,l)=>"M"+i+","+o+"L"+a+","+l,EB=(i,o,a,l)=>{var u=a-i,f=l-o,m=Math.hypot(u,f)/2;return"M"+i+","+o+"A"+m+","+m+" "+180*Math.atan2(f,u)/Math.PI+" 0 1 "+a+","+l},CB=(i,o,a,l)=>{const u=a-i,f=l-o,m=.2*(u+f),g=.2*(f-u);return"M"+i+","+o+"C"+(i+m)+","+(o+g)+" "+(a+g)+","+(l-m)+" "+a+","+l},SN=(0,N.Xr)({line:Rk,"line-radial":(i,o,a,l)=>Rk(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),arc:EB,"arc-radial":(i,o,a,l)=>EB(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),curve:CB,"curve-radial":(i,o,a,l)=>CB(o*Math.cos(i),o*Math.sin(i),l*Math.cos(a),l*Math.sin(a)),"orthogonal-horizontal":(i,o,a,l)=>"M"+i+","+o+"V"+l+"H"+a,"orthogonal-vertical":(i,o,a,l)=>"M"+i+","+o+"H"+a+"V"+l,"orthogonal-radial":(i,o,a,l)=>{const u=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a);return"M"+o*u+","+o*f+"A"+o+","+o+" 0 0,"+((Math.abs(a-i)>Math.PI?a<=i:a>i)?1:0)+" "+o*m+","+o*g+"L"+l*m+","+l*g},"diagonal-horizontal":(i,o,a,l)=>{const u=(i+a)/2;return"M"+i+","+o+"C"+u+","+o+" "+u+","+l+" "+a+","+l},"diagonal-vertical":(i,o,a,l)=>{const u=(o+l)/2;return"M"+i+","+o+"C"+i+","+u+" "+a+","+u+" "+a+","+l},"diagonal-radial":(i,o,a,l)=>{const u=Math.cos(i),f=Math.sin(i),m=Math.cos(a),g=Math.sin(a),b=(o+l)/2;return"M"+o*u+","+o*f+"C"+b*u+","+b*f+" "+b*m+","+b*g+" "+l*m+","+l*g}});function vs(i){ze.call(this,null,i)}vs.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},(0,N.XW)(vs,ze,{transform(i,o){var I,k,F,a=i.as||["startAngle","endAngle"],l=a[0],u=a[1],m=i.startAngle||0,g=null!=i.endAngle?i.endAngle:2*Math.PI,b=o.source,v=b.map(i.field||N.kX),w=v.length,C=m,D=(g-m)/bN(v),T=Qr(w);for(i.sort&&T.sort((L,z)=>v[L]-v[z]),I=0;Iu+(f<0?-1:f>0?1:0),0))!==o.length&&a.warn("Log scale domain includes zero: "+(0,N.m8)(o)),o}function DN(i,o,a){return(0,N.mf)(i)&&(o||a)?Vx(i,Nk(o||[0,1],a)):i}function Nk(i,o){return o?i.slice().reverse():i}function MN(i){ze.call(this,null,i)}(0,N.XW)(lm,ze,{transform(i,o){var a=o.dataflow,l=this.value,u=function P8(i){var l,o=i.type,a="";return o===Sl?Sl+"-"+rh:(function L8(i){const o=i.type;return AC(o)&&o!==Bp&&o!==zp&&(i.scheme||i.range&&i.range.length&&i.range.every(N.HD))}(i)&&(a=2===(l=i.rawDomain?i.rawDomain.length:i.domain?i.domain.length+ +(null!=i.domainMid):0)?Sl+"-":3===l?Vp+"-":""),(a+o||rh).toLowerCase())}(i);for(u in(!l||u!==l.type)&&(this.value=l=Yn(u)()),i)if(!F8[u]){if("padding"===u&&Pi(l.type))continue;(0,N.mf)(l[u])?l[u](i[u]):a.warn("Unsupported scale property: "+u)}return function j8(i,o,a){var l=i.type,u=o.round||!1,f=o.range;if(null!=o.rangeStep)f=function U8(i,o,a){return"band"!==i&&i!==$x&&(0,N.vU)("Only band and point scales support rangeStep."),[0,o.rangeStep*DC(a,i===$x?1:(null!=o.paddingInner?o.paddingInner:o.padding)||0,(null!=o.paddingOuter?o.paddingOuter:o.padding)||0)]}(l,o,a);else if(o.scheme&&(f=function TB(i,o,a){var f,l=o.schemeExtent;return(0,N.kJ)(o.scheme)?f=_b(o.scheme,o.interpolate,o.interpolateGamma):(f=Vg(o.scheme.toLowerCase()))||(0,N.vU)(`Unrecognized scheme name: ${o.scheme}`),a=i===Px?a+1:i===jp?a-1:i===Fg||i===Fx?+o.schemeCount||5:a,TT(i)?DN(f,l,o.reverse):(0,N.mf)(f)?Bg(DN(f,l),a):i===Lx?f:f.slice(0,a)}(l,o,a),(0,N.mf)(f))){if(i.interpolator)return i.interpolator(f);(0,N.vU)(`Scale type ${l} does not support interpolating color schemes.`)}if(f&&TT(l))return i.interpolator(_b(Nk(f,o.reverse),o.interpolate,o.interpolateGamma));f&&o.interpolate&&i.interpolate?i.interpolate(kC(o.interpolate,o.interpolateGamma)):(0,N.mf)(i.round)?i.round(u):(0,N.mf)(i.rangeRound)&&i.interpolate(u?Ky:wl),f&&i.range(Nk(f,o.reverse))}(l,i,function V8(i,o,a){let l=o.bins;if(l&&!(0,N.kJ)(l)){const u=i.domain(),f=u[0],m=(0,N.fj)(u),g=l.step;let b=null==l.start?f:l.start,v=null==l.stop?m:l.stop;g||(0,N.vU)("Scale bins parameter missing step property."),bm&&(v=g*Math.floor(m/g)),l=Qr(b,v+g/2,g)}return l?i.bins=l:i.bins&&delete i.bins,i.type===jp&&(l?!o.domain&&!o.domainRaw&&(i.domain(l),a=l.length):i.bins=i.domain()),a}(l,i,function $8(i,o,a){const l=function B8(i,o,a){return o?(i.domain(AB(i.type,o,a)),o.length):-1}(i,o.domainRaw,a);if(l>-1)return l;var g,b,u=o.domain,f=i.type,m=o.zero||void 0===o.zero&&function zi(i){const o=i.type;return!i.bins&&(o===rh||o===pb||o===zs)}(i);if(!u)return 0;if(Pi(f)&&o.padding&&u[0]!==(0,N.fj)(u)&&(u=function z8(i,o,a,l,u,f){var m=Math.abs((0,N.fj)(a)-a[0]),g=m/(m-2*l),b=i===qd?(0,N.dH)(o,null,g):i===zs?(0,N.mK)(o,null,g,.5):i===pb?(0,N.mK)(o,null,g,u||1):i===mb?(0,N.bV)(o,null,g,f||1):(0,N.ay)(o,null,g);return(o=o.slice())[0]=b[0],o[o.length-1]=b[1],o}(f,u,o.range,o.padding,o.exponent,o.constant)),(m||null!=o.domainMin||null!=o.domainMax||null!=o.domainMid)&&(g=(u=u.slice()).length-1||1,m&&(u[0]>0&&(u[0]=0),u[g]<0&&(u[g]=0)),null!=o.domainMin&&(u[0]=o.domainMin),null!=o.domainMax&&(u[g]=o.domainMax),null!=o.domainMid)){const v=(b=o.domainMid)>u[g]?g+1:bk(w);if(null==o)u.push(i.slice());else for(m={},g=0,b=i.length;gI&&(I=T),a&&D.sort(a)}return u.max=I,u}(o.source,i.groupby,f,m),v=0,w=b.length,C=b.max;vi;function lf(i,o){i&&RN.hasOwnProperty(i.type)&&RN[i.type](i,o)}var ON={Feature:function(i,o){lf(i.geometry,o)},FeatureCollection:function(i,o){for(var a=i.features,l=-1,u=a.length;++l0){for(m=o[--a];a>0&&(l=m,u=o[--a],m=l+u,f=u-(m-l),!f););a>0&&(f<0&&o[a-1]<0||f>0&&o[a-1]>0)&&(u=2*f,l=m+u,u==l-m&&(m=l))}return m}}var bn=1e-6,Sw=1e-12,_i=Math.PI,Eo=_i/2,Dw=_i/4,Ol=2*_i,ts=180/_i,pi=_i/180,Vi=Math.abs,ni=Math.atan,ma=Math.atan2,vn=Math.cos,Lk=Math.ceil,X8=Math.exp,gS=(Math,Math.hypot),$k=Math.log,Bk=Math.pow,fn=Math.sin,Ku=Math.sign||function(i){return i>0?1:i<0?-1:0},xi=Math.sqrt,FN=Math.tan;function OB(i){return i>1?0:i<-1?_i:Math.acos(i)}function Na(i){return i>1?Eo:i<-1?-Eo:Math.asin(i)}function Us(){}var PN,LN,$N,BN,zk=new pa,Vk=new pa,d_={point:Us,lineStart:Us,lineEnd:Us,polygonStart:function(){d_.lineStart=K8,d_.lineEnd=NB},polygonEnd:function(){d_.lineStart=d_.lineEnd=d_.point=Us,zk.add(Vi(Vk)),Vk=new pa},result:function(){var i=zk/2;return zk=new pa,i}};function K8(){d_.point=RB}function RB(i,o){d_.point=Z8,PN=$N=i,LN=BN=o}function Z8(i,o){Vk.add(BN*i-$N*o),$N=i,BN=o}function NB(){Z8(PN,LN)}const FB=d_;var Mw=1/0,zN=Mw,_S=-Mw,yS=_S;const VN={point:function KX(i,o){i_S&&(_S=i),oyS&&(yS=o)},lineStart:Us,lineEnd:Us,polygonStart:Us,polygonEnd:Us,result:function(){var i=[[Mw,zN],[_S,yS]];return _S=yS=-(zN=Mw=1/0),i}};var PB,LB,wc,cf,jN=0,f_=0,Aw=0,Uk=0,Hk=0,Tw=0,UN=0,HN=0,bS=0,Zu={point:h_,lineStart:WN,lineEnd:BB,polygonStart:function(){Zu.lineStart=ZX,Zu.lineEnd=QX},polygonEnd:function(){Zu.point=h_,Zu.lineStart=WN,Zu.lineEnd=BB},result:function(){var i=bS?[UN/bS,HN/bS]:Tw?[Uk/Tw,Hk/Tw]:Aw?[jN/Aw,f_/Aw]:[NaN,NaN];return jN=f_=Aw=Uk=Hk=Tw=UN=HN=bS=0,i}};function h_(i,o){jN+=i,f_+=o,++Aw}function WN(){Zu.point=$B}function $B(i,o){Zu.point=uf,h_(wc=i,cf=o)}function uf(i,o){var a=i-wc,l=o-cf,u=xi(a*a+l*l);Uk+=u*(wc+i)/2,Hk+=u*(cf+o)/2,Tw+=u,h_(wc=i,cf=o)}function BB(){Zu.point=h_}function ZX(){Zu.point=cm}function QX(){Wk(PB,LB)}function cm(i,o){Zu.point=Wk,h_(PB=wc=i,LB=cf=o)}function Wk(i,o){var a=i-wc,l=o-cf,u=xi(a*a+l*l);Uk+=u*(wc+i)/2,Hk+=u*(cf+o)/2,Tw+=u,UN+=(u=cf*i-wc*o)*(wc+i),HN+=u*(cf+o),bS+=3*u,h_(wc=i,cf=o)}const zB=Zu;function VB(i){this._context=i}VB.prototype={_radius:4.5,pointRadius:function(i){return this._radius=i,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(i,o){switch(this._point){case 0:this._context.moveTo(i,o),this._point=1;break;case 1:this._context.lineTo(i,o);break;default:this._context.moveTo(i+this._radius,o),this._context.arc(i,o,this._radius,0,Ol)}},result:Us};var Yb,qk,jB,vS,Hs,qN=new pa,um={point:Us,lineStart:function(){um.point=Q8},lineEnd:function(){Yb&&UB(qk,jB),um.point=Us},polygonStart:function(){Yb=!0},polygonEnd:function(){Yb=null},result:function(){var i=+qN;return qN=new pa,i}};function Q8(i,o){um.point=UB,qk=vS=i,jB=Hs=o}function UB(i,o){qN.add(xi((vS-=i)*vS+(Hs-=o)*Hs)),vS=i,Hs=o}const J8=um;let e6,p_,HB,Gk;class WB{constructor(o){this._append=null==o?GN:function t6(i){const o=Math.floor(i);if(!(o>=0))throw new RangeError(`invalid digits: ${i}`);if(o>15)return GN;if(o!==e6){const a=10**o;e6=o,p_=function(u){let f=1;this._+=u[0];for(const m=u.length;f=0))throw new RangeError(`invalid digits: ${g}`);a=b}return null===o&&(f=new WB(a)),m},m.projection(i).digits(a).context(o)}function GB(){var o,i=[];return{point:function(a,l,u){o.push([a,l,u])},lineStart:function(){i.push(o=[])},lineEnd:Us,rejoin:function(){i.length>1&&i.push(i.pop().concat(i.shift()))},result:function(){var a=i;return i=[],o=null,a}}}function kw(i,o){return Vi(i[0]-o[0])=0;--g)u.point((C=w[g])[0],C[1]);else l(D.x,D.p.x,-1,u);D=D.p}w=(D=D.o).z,T=!T}while(!D.v);u.lineEnd()}}}function wS(i){if(o=i.length){for(var o,u,a=0,l=i[0];++a=0?1:-1,ce=te*Z,le=ce>_i,ve=F*Y;if(b.add(ma(ve*te*fn(ce),L*H+ve*vn(ce))),m+=le?Z+te*Ol:Z,le^I>=a^U>=a){var xe=Rw(Ow(T),Ow(V));Yk(xe);var Q=Rw(f,xe);Yk(Q);var J=(le^Z>=0?-1:1)*Na(Q[2]);(l>J||l===J&&(xe[0]||xe[1]))&&(g+=le^Z>=0?1:-1)}}return(m<-bn||m0){for(b||(u.polygonStart(),b=!0),u.lineStart(),Y=0;Y1&&2&U&&W.push(W.pop().concat(W.shift())),w.push(W.filter(n6))}}return D}}function n6(i){return i.length>1}function ZB(i,o){return((i=i.x)[0]<0?i[1]-Eo-bn:Eo-i[1])-((o=o.x)[0]<0?o[1]-Eo-bn:Eo-o[1])}const YN=KB(function(){return!0},function i6(i){var u,o=NaN,a=NaN,l=NaN;return{lineStart:function(){i.lineStart(),u=1},point:function(f,m){var g=f>0?_i:-_i,b=Vi(f-o);Vi(b-_i)0?Eo:-Eo),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(g,a),i.point(f,a),u=0):l!==g&&b>=_i&&(Vi(o-l)bn?ni((fn(o)*(f=vn(l))*fn(a)-fn(l)*(u=vn(o))*fn(i))/(u*f*m)):(o+l)/2}(o,a,f,m),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(g,a),u=0),i.point(o=f,a=m),l=g},lineEnd:function(){i.lineEnd(),o=a=NaN},clean:function(){return 2-u}}},function JB(i,o,a,l){var u;if(null==i)l.point(-_i,u=a*Eo),l.point(0,u),l.point(_i,u),l.point(_i,0),l.point(_i,-u),l.point(0,-u),l.point(-_i,-u),l.point(-_i,0),l.point(-_i,u);else if(Vi(i[0]-o[0])>bn){var f=i[0]0)do{D.point(0===T||3===T?i:a,T>1?l:o)}while((T=(T+C+4)%4)!==I);else D.point(w[0],w[1])}function m(v,w){return Vi(v[0]-i)0?0:3:Vi(v[0]-a)0?2:1:Vi(v[1]-o)0?1:0:w>0?3:2}function g(v,w){return b(v.x,w.x)}function b(v,w){var C=m(v,1),D=m(w,1);return C!==D?C-D:0===C?w[1]-v[1]:1===C?v[0]-w[0]:2===C?v[1]-w[1]:w[0]-v[0]}return function(v){var D,T,I,k,F,L,z,V,U,W,Y,w=v,C=GB(),H={point:Z,lineStart:function ve(){H.point=Q,T&&T.push(I=[]),W=!0,U=!1,z=V=NaN},lineEnd:function xe(){D&&(Q(k,F),L&&U&&C.rejoin(),D.push(C.result())),H.point=Z,U&&w.lineEnd()},polygonStart:function ce(){w=C,D=[],T=[],Y=!0},polygonEnd:function le(){var J=function te(){for(var J=0,oe=0,we=T.length;oel&&(Ne-Pe)*(l-Ie)>(Ve-Ie)*(i-Pe)&&++J:Ve<=l&&(Ne-Pe)*(l-Ie)<(Ve-Ie)*(i-Pe)&&--J;return J}(),oe=Y&&J,we=(D=YB(D)).length;(oe||we)&&(v.polygonStart(),oe&&(v.lineStart(),f(null,null,1,v),v.lineEnd()),we&&XB(D,g,J,f,v),v.polygonEnd()),w=v,D=T=I=null}};function Z(J,oe){u(J,oe)&&w.point(J,oe)}function Q(J,oe){var we=u(J,oe);if(T&&I.push([J,oe]),W)k=J,F=oe,L=we,W=!1,we&&(w.lineStart(),w.point(J,oe));else if(we&&U)w.point(J,oe);else{var ne=[z=Math.max(CS,Math.min(Nw,z)),V=Math.max(CS,Math.min(Nw,V))],ge=[J=Math.max(CS,Math.min(Nw,J)),oe=Math.max(CS,Math.min(Nw,oe))];!function nz(i,o,a,l,u,f){var I,m=i[0],g=i[1],w=0,C=1,D=o[0]-m,T=o[1]-g;if(I=a-m,D||!(I>0)){if(I/=D,D<0){if(I0){if(I>C)return;I>w&&(w=I)}if(I=u-m,D||!(I<0)){if(I/=D,D<0){if(I>C)return;I>w&&(w=I)}else if(D>0){if(I0)){if(I/=T,T<0){if(I0){if(I>C)return;I>w&&(w=I)}if(I=f-g,T||!(I<0)){if(I/=T,T<0){if(I>C)return;I>w&&(w=I)}else if(T>0){if(I0&&(i[0]=m+w*D,i[1]=g+w*T),C<1&&(o[0]=m+C*D,o[1]=g+C*T),!0}}}}}(ne,ge,i,o,a,l)?we&&(w.lineStart(),w.point(J,oe),Y=!1):(U||(w.lineStart(),w.point(ne[0],ne[1])),w.point(ge[0],ge[1]),we||w.lineEnd(),Y=!1)}z=J,V=oe,U=we}return H}}function ZN(i,o){function a(l,u){return l=i(l,u),o(l[0],l[1])}return i.invert&&o.invert&&(a.invert=function(l,u){return(l=o.invert(l,u))&&i.invert(l[0],l[1])}),a}function QN(i,o){return Vi(i)>_i&&(i-=Math.round(i/Ol)*Ol),[i,o]}function s6(i,o,a){return(i%=Ol)?o||a?ZN(a6(i),l6(o,a)):a6(i):o||a?l6(o,a):QN}function JN(i){return function(o,a){return Vi(o+=i)>_i&&(o-=Math.round(o/Ol)*Ol),[o,a]}}function a6(i){var o=JN(i);return o.invert=JN(-i),o}function l6(i,o){var a=vn(i),l=fn(i),u=vn(o),f=fn(o);function m(g,b){var v=vn(b),w=vn(g)*v,C=fn(g)*v,D=fn(b),T=D*a+w*l;return[ma(C*u-T*f,w*a-D*l),Na(T*u+C*f)]}return m.invert=function(g,b){var v=vn(b),w=vn(g)*v,C=fn(g)*v,D=fn(b),T=D*u-C*f;return[ma(C*u+D*f,w*a+T*l),Na(T*a-w*l)]},m}function Zk(i){return function(o){var a=new iz;for(var l in i)a[l]=i[l];return a.stream=o,a}}function iz(){}function rz(i,o,a){var l=i.clipExtent&&i.clipExtent();return i.scale(150).translate([0,0]),null!=l&&i.clipExtent(null),vh(a,i.stream(VN)),o(VN.result()),null!=l&&i.clipExtent(l),i}function eF(i,o,a){return rz(i,function(l){var u=o[1][0]-o[0][0],f=o[1][1]-o[0][1],m=Math.min(u/(l[1][0]-l[0][0]),f/(l[1][1]-l[0][1])),g=+o[0][0]+(u-m*(l[1][0]+l[0][0]))/2,b=+o[0][1]+(f-m*(l[1][1]+l[0][1]))/2;i.scale(150*m).translate([g,b])},a)}function fm(i,o,a){return eF(i,[[0,0],o],a)}function oz(i,o,a){return rz(i,function(l){var u=+o,f=u/(l[1][0]-l[0][0]),m=(u-f*(l[1][0]+l[0][0]))/2,g=-f*l[0][1];i.scale(150*f).translate([m,g])},a)}function sz(i,o,a){return rz(i,function(l){var u=+o,f=u/(l[1][1]-l[0][1]),m=-f*l[0][0],g=(u-f*(l[1][1]+l[0][1]))/2;i.scale(150*f).translate([m,g])},a)}QN.invert=QN,iz.prototype={constructor:iz,point:function(i,o){this.stream.point(i,o)},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 tF=16,c6=vn(30*pi);function nF(i,o){return+o?function tY(i,o){function a(l,u,f,m,g,b,v,w,C,D,T,I,k,F){var L=v-l,z=w-u,V=L*L+z*z;if(V>4*o&&k--){var U=m+D,W=g+T,Y=b+I,H=xi(U*U+W*W+Y*Y),Z=Na(Y/=H),te=Vi(Vi(Y)-1)o||Vi((L*xe+z*Q)/V-.5)>.3||m*D+g*T+b*I0,u=Vi(o)>bn;function m(w,C){return vn(w)*vn(C)>o}function b(w,C,D){var k=[1,0,0],F=Rw(Ow(w),Ow(C)),L=ES(F,F),z=F[0],V=L-z*z;if(!V)return!D&&w;var U=o*L/V,W=-o*z/V,Y=Rw(k,F),H=dm(k,U);Xk(H,dm(F,W));var te=Y,ce=ES(H,te),le=ES(te,te),ve=ce*ce-le*(ES(H,H)-1);if(!(ve<0)){var xe=xi(ve),Q=dm(te,(-ce-xe)/le);if(Xk(Q,H),Q=Iw(Q),!D)return Q;var ge,J=w[0],oe=C[0],we=w[1],ne=C[1];oe0^Q[1]<(Vi(Q[0]-J)_i^(J<=Q[0]&&Q[0]<=oe)){var Ie=dm(te,(-ce+xe)/le);return Xk(Ie,H),[Q,Iw(Ie)]}}}function v(w,C){var D=l?i:_i-i,T=0;return w<-D?T|=1:w>D&&(T|=2),C<-D?T|=4:C>D&&(T|=8),T}return KB(m,function g(w){var C,D,T,I,k;return{lineStart:function(){I=T=!1,k=1},point:function(F,L){var V,z=[F,L],U=m(F,L),W=l?U?0:v(F,L):U?v(F+(F<0?_i:-_i),L):0;if(!C&&(I=T=U)&&w.lineStart(),U!==T&&(!(V=b(C,z))||kw(C,V)||kw(z,V))&&(z[2]=1),U!==T)k=0,U?(w.lineStart(),V=b(z,C),w.point(V[0],V[1])):(V=b(C,z),w.point(V[0],V[1],2),w.lineEnd()),C=V;else if(u&&C&&l^U){var Y;!(W&D)&&(Y=b(z,C,!0))&&(k=0,l?(w.lineStart(),w.point(Y[0][0],Y[0][1]),w.point(Y[1][0],Y[1][1]),w.lineEnd()):(w.point(Y[1][0],Y[1][1]),w.lineEnd(),w.lineStart(),w.point(Y[0][0],Y[0][1],3)))}U&&(!C||!kw(C,z))&&w.point(z[0],z[1]),C=z,T=U,D=W},lineEnd:function(){T&&w.lineEnd(),C=null},clean:function(){return k|(I&&T)<<1}}},function f(w,C,D,T){!function ez(i,o,a,l,u,f){if(a){var m=vn(o),g=fn(o),b=l*a;null==u?(u=o+l*Ol,f=o-b/2):(u=tz(m,u),f=tz(m,f),(l>0?uf)&&(u+=l*Ol));for(var v,w=u;l>0?w>f:w2?J[2]%360*pi:0,xe()):[g*ts,b*ts,v*ts]},le.angle=function(J){return arguments.length?(C=J%360*pi,xe()):C*ts},le.reflectX=function(J){return arguments.length?(D=J?-1:1,xe()):D<0},le.reflectY=function(J){return arguments.length?(T=J?-1:1,xe()):T<0},le.precision=function(J){return arguments.length?(Y=nF(H,W=J*J),Q()):xi(W)},le.fitExtent=function(J,oe){return eF(le,J,oe)},le.fitSize=function(J,oe){return fm(le,J,oe)},le.fitWidth=function(J,oe){return oz(le,J,oe)},le.fitHeight=function(J,oe){return sz(le,J,oe)},function(){return o=i.apply(this,arguments),le.invert=o.invert&&ve,xe()}}function iF(i){var o=0,a=_i/3,l=az(i),u=l(o,a);return u.parallels=function(f){return arguments.length?l(o=f[0]*pi,a=f[1]*pi):[o*ts,a*ts]},u}function h6(i,o){var a=fn(i),l=(a+fn(o))/2;if(Vi(l)2?i[2]*pi:0),o.invert=function(a){return(a=i.invert(a[0]*pi,a[1]*pi))[0]*=ts,a[1]*=ts,a},o}(o.rotate()).invert([0,0]));return f(null==m?[[D[0]-C,D[1]-C],[D[0]+C,D[1]+C]]:i===Jk?[[Math.max(D[0]-C,m),g],[Math.min(D[0]+C,b),v]]:[[m,Math.max(D[1]-C,g)],[b,Math.min(D[1]+C,v)]])}return o.scale=function(C){return arguments.length?(l(C),w()):l()},o.translate=function(C){return arguments.length?(u(C),w()):u()},o.center=function(C){return arguments.length?(a(C),w()):a()},o.clipExtent=function(C){return arguments.length?(null==C?m=g=b=v=null:(m=+C[0][0],g=+C[0][1],b=+C[1][0],v=+C[1][1]),w()):null==m?null:[[m,g],[b,v]]},w()}function eI(i){return FN((Eo+i)/2)}function y6(i,o){var a=vn(i),l=i===o?fn(i):$k(a/vn(o))/$k(eI(o)/eI(i)),u=a*Bk(eI(i),l)/l;if(!l)return Jk;function f(m,g){u>0?g<-Eo+bn&&(g=-Eo+bn):g>Eo-bn&&(g=Eo-bn);var b=u/Bk(eI(g),l);return[b*fn(l*m),u-b*vn(l*m)]}return f.invert=function(m,g){var b=u-g,v=Ku(l)*xi(m*m+b*b),w=ma(m,Vi(b))*Ku(b);return b*l<0&&(w-=_i*Ku(m)*Ku(b)),[w/l,2*ni(Bk(u/v,1/l))-Eo]},f}function AS(i,o){return[i,o]}function v6(i,o){var a=vn(i),l=i===o?fn(i):(a-vn(o))/(o-i),u=a/l+i;if(Vi(l)bn&&--l>0);return[i/(.8707+(f=a*a)*(f*(f*f*f*(.003971-.001529*f)-.013791)-.131979)),a]},$w.invert=MS(Na),C6.invert=MS(function(i){return 2*ni(i)}),gz.invert=function(i,o){return[-o,2*ni(X8(i))-Eo]};var _z=Math.abs,oI=(Math,Math,Math,Math.cos),sI=(Math,Math,Math,Math,Math,Math,Math,Math,Math.sin),df=(Math,1e-6),Zb=Math.PI,bz=Zb/2,cF=(Math,uF(2));function xz(i){return i>1?bz:i<-1?-bz:Math.asin(i)}function uF(i){return i>0?Math.sqrt(i):0}function dY(i,o){var u,a=i*sI(o),l=30;do{o-=u=(o+sI(o)-a)/(1+oI(o))}while(_z(u)>df&&--l>0);return o/2}uF(Zb);var fY=function Ez(i,o,a){function l(u,f){return[i*u*oI(f=dY(a,f)),o*sI(f)]}return l.invert=function(u,f){return f=xz(f/o),[u/(i*oI(f)),xz((2*f+sI(2*f))/a)]},l}(cF/bz,cF,Zb);const pY=qB(),Cz=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function dF(i,o){if(!i||"string"!=typeof i)throw new Error("Projection type must be a name string.");return i=i.toLowerCase(),arguments.length>1?(lI[i]=function mY(i,o){return function a(){const l=o();return l.type=i,l.path=qB().projection(l),l.copy=l.copy||function(){const u=a();return Cz.forEach(f=>{l[f]&&u[f](l[f]())}),u.path.pointRadius(l.path.pointRadius()),u},Xd(l)}}(i,o),this):lI[i]||null}function IS(i){return i&&i.path||pY}const lI={albers:lz,albersusa:function p6(){var i,o,l,f,g,b,a=lz(),u=Qk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),m=Qk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),v={point:function(D,T){b=[D,T]}};function w(D){var T=D[0],I=D[1];return b=null,l.point(T,I),b||(f.point(T,I),b)||(g.point(T,I),b)}function C(){return i=o=null,w}return w.invert=function(D){var T=a.scale(),I=a.translate(),k=(D[0]-I[0])/T,F=(D[1]-I[1])/T;return(F>=.12&&F<.234&&k>=-.425&&k<-.214?u:F>=.166&&F<.234&&k>=-.214&&k<-.115?m:a).invert(D)},w.stream=function(D){return i&&o===D?i:i=function cz(i){var o=i.length;return{point:function(a,l){for(var u=-1;++u2?l[2]+90:90]):[(l=a())[0],l[1],l[2]-90]},a([0,0,90]).scale(159.155)}};for(const i in lI)dF(i,lI[i]);function Sz(i,o,a){var l=Qr(i,o-bn,a).concat(o);return function(u){return l.map(function(f){return[u,f]})}}function fF(i,o,a){var l=Qr(i,o-bn,a).concat(o);return function(u){return l.map(function(f){return[f,u]})}}function hF(){}const ff=[[],[[[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 Dz(){var i=1,o=1,a=g;function l(b,v){return v.map(w=>u(b,w))}function u(b,v){var w=[],C=[];return function f(b,v,w){var T,I,F,L,z,C=new Array,D=new Array;for(T=I=-1,ff[(F=b[0]>=v)<<1].forEach(V);++T=v)<<1].forEach(V);for(ff[F<<0].forEach(V);++I=v)<<1|(L=b[I*i]>=v)<<2].forEach(V);++T=v)<<1|(L=b[I*i+T+1]>=v)<<2|z<<3].forEach(V);ff[F|L<<3].forEach(V)}for(T=-1,ff[(L=b[I*i]>=v)<<2].forEach(V);++T=v)<<2|z<<3].forEach(V);function V(U){var te,ce,W=[U[0][0]+T,U[0][1]+I],Y=[U[1][0]+T,U[1][1]+I],H=m(W),Z=m(Y);(te=D[H])?(ce=C[Z])?(delete D[te.end],delete C[ce.start],te===ce?(te.ring.push(Y),w(te.ring)):C[te.start]=D[ce.end]={start:te.start,end:ce.end,ring:te.ring.concat(ce.ring)}):(delete D[te.end],te.ring.push(Y),D[te.end=Z]=te):(te=C[Z])?(ce=D[H])?(delete C[te.start],delete D[ce.end],te===ce?(te.ring.push(Y),w(te.ring)):C[ce.start]=D[te.end]={start:ce.start,end:te.end,ring:ce.ring.concat(te.ring)}):(delete C[te.start],te.ring.unshift(W),C[te.start=H]=te):C[H]=D[Z]={start:H,end:Z,ring:[W,Y]}}ff[L<<3].forEach(V)}(b,v,D=>{a(D,b,v),function pF(i){for(var o=0,a=i.length,l=i[a-1][1]*i[0][0]-i[a-1][0]*i[0][1];++o0?w.push([D]):C.push(D)}),C.forEach(D=>{for(var k,T=0,I=w.length;T{var F,D=C[0],T=C[1],I=0|D,k=0|T,L=v[k*i+I];D>0&&D0&&T=0&&w>=0||(0,N.vU)("invalid size"),i=v,o=w,l},l.smooth=function(b){return arguments.length?(a=b?g:hF,l):a===g},l}function mF(i,o){for(var u,a=-1,l=o.length;++al!=T>l&&a<(D-v)*(l-w)/(T-w)+v&&(u=-u)}return u}function gY(i,o,a){var l;return function _Y(i,o,a){return(o[0]-i[0])*(a[1]-i[1])==(a[0]-i[0])*(o[1]-i[1])}(i,o,a)&&function yY(i,o,a){return i<=o&&o<=a||a<=o&&o<=i}(i[l=+(i[0]===o[0])],a[l],o[l])}function Mz(i,o,a){return function(l){var u=(0,N.We)(l),f=a?Math.min(u[0],0):u[0],m=u[1],g=m-f,b=o?fr(f,m,i):g/(i+1);return Qr(f+b,m,b)}}function gF(i){ze.call(this,null,i)}function Bw(i,o,a,l,u){const f=i.x1||0,m=i.y1||0,g=o*a<0;function b(C){C.forEach(v)}function v(C){g&&C.reverse(),C.forEach(w)}function w(C){C[0]=(C[0]-f)*o+l,C[1]=(C[1]-m)*a+u}return function(C){return C.coordinates.forEach(b),C}}function OS(i,o,a){const l=i>=0?i:rp(o,a);return Math.round((Math.sqrt(4*l*l+1)-1)/2)}function zw(i){return(0,N.mf)(i)?i:(0,N.a9)(+i)}function _F(){var i=b=>b[0],o=b=>b[1],a=N.kX,l=[-1,-1],u=960,f=500,m=2;function g(b,v){const w=OS(l[0],b,i)>>m,C=OS(l[1],b,o)>>m,D=w?w+2:0,T=C?C+2:0,I=2*D+(u>>m),k=2*T+(f>>m),F=new Float32Array(I*k),L=new Float32Array(I*k);let z=F;b.forEach(U=>{const W=D+(+i(U)>>m),Y=T+(+o(U)>>m);W>=0&&W=0&&Y0&&C>0?(RS(I,k,F,L,w),Vw(I,k,L,F,C),RS(I,k,F,L,w),Vw(I,k,L,F,C),RS(I,k,F,L,w),Vw(I,k,L,F,C)):w>0?(RS(I,k,F,L,w),RS(I,k,L,F,w),RS(I,k,F,L,w),z=L):C>0&&(Vw(I,k,F,L,C),Vw(I,k,L,F,C),Vw(I,k,F,L,C),z=L);const V=v?Math.pow(2,-2*m):1/bN(z);for(let U=0,W=I*k;U>m),y2:T+(f>>m)}}return g.x=function(b){return arguments.length?(i=zw(b),g):i},g.y=function(b){return arguments.length?(o=zw(b),g):o},g.weight=function(b){return arguments.length?(a=zw(b),g):a},g.size=function(b){if(!arguments.length)return[u,f];var v=+b[0],w=+b[1];return v>=0&&w>=0||(0,N.vU)("invalid size"),u=v,f=w,g},g.cellSize=function(b){return arguments.length?((b=+b)>=1||(0,N.vU)("invalid cell size"),m=Math.floor(Math.log(b)/Math.LN2),g):1<=u&&(g>=f&&(b-=a[g-f+m*i]),l[g-u+m*i]=b/Math.min(g+1,i-1+f-g,f))}function Vw(i,o,a,l,u){const f=1+(u<<1);for(let m=0;m=u&&(g>=f&&(b-=a[m+(g-f)*i]),l[m+(g-u)*i]=b/Math.min(g+1,o-1+f-g,f))}function Az(i){ze.call(this,null,i)}gF.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"}]},(0,N.XW)(gF,ze,{transform(i,o){if(this.value&&!o.changed()&&!i.modified())return o.StopPropagation;var a=o.fork(o.NO_SOURCE|o.NO_FIELDS),l=o.materialize(o.SOURCE).source,u=i.field||N.yR,f=Dz().smooth(!1!==i.smooth),m=i.thresholds||function bY(i,o,a){const l=Mz(a.levels||10,a.nice,!1!==a.zero);return"shared"!==a.resolve?l:l(i.map(u=>Su(o(u).values)))}(l,u,i),g=null===i.as?null:i.as||"contour",b=[];return l.forEach(v=>{const w=u(v),C=f.size([w.width,w.height])(w.values,(0,N.kJ)(m)?m:m(w.values));(function Ws(i,o,a,l){let u=l.scale||o.scale,f=l.translate||o.translate;if((0,N.mf)(u)&&(u=u(a,l)),(0,N.mf)(f)&&(f=f(a,l)),(1===u||null==u)&&!f)return;const m=((0,N.hj)(u)?u:u[0])||1,g=((0,N.hj)(u)?u:u[1])||1;i.forEach(Bw(o,m,g,f&&f[0]||0,f&&f[1]||0))})(C,w,v,i),C.forEach(D=>{b.push(Vc(v,Ti(null!=g?{[g]:D}:D)))})}),this.value&&(a.rem=this.value),this.value=a.source=a.add=b,a}}),Az.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 vY=["x","y","weight","size","cellSize","bandwidth"];function uI(i,o){return vY.forEach(a=>null!=o[a]?i[a](o[a]):0),i}function dI(i){ze.call(this,null,i)}(0,N.XW)(Az,ze,{transform(i,o){if(this.value&&!o.changed()&&!i.modified())return o.StopPropagation;var b,a=o.fork(o.NO_SOURCE|o.NO_FIELDS),u=function R6(i,o){var u,f,m,g,b,v,a=[],l=w=>w(g);if(null==o)a.push(i);else for(u={},f=0,m=i.length;fTi(function v(w,C){for(let D=0;Dbn}).map(D)).concat(Qr(Lk(f/v)*v,u,v).filter(function(V){return Vi(V%C)>bn}).map(T))}return L.lines=function(){return z().map(function(V){return{type:"LineString",coordinates:V}})},L.outline=function(){return{type:"Polygon",coordinates:[I(l).concat(k(m).slice(1),I(a).reverse().slice(1),k(g).reverse().slice(1))]}},L.extent=function(V){return arguments.length?L.extentMajor(V).extentMinor(V):L.extentMinor()},L.extentMajor=function(V){return arguments.length?(g=+V[0][1],m=+V[1][1],(l=+V[0][0])>(a=+V[1][0])&&(V=l,l=a,a=V),g>m&&(V=g,g=m,m=V),L.precision(F)):[[l,g],[a,m]]},L.extentMinor=function(V){return arguments.length?(f=+V[0][1],u=+V[1][1],(o=+V[0][0])>(i=+V[1][0])&&(V=o,o=i,i=V),f>u&&(V=f,f=u,u=V),L.precision(F)):[[o,f],[i,u]]},L.step=function(V){return arguments.length?L.stepMajor(V).stepMinor(V):L.stepMinor()},L.stepMajor=function(V){return arguments.length?(w=+V[0],C=+V[1],L):[w,C]},L.stepMinor=function(V){return arguments.length?(b=+V[0],v=+V[1],L):[b,v]},L.precision=function(V){return arguments.length?(F=+V,D=Sz(f,u,90),T=fF(o,i,F),I=Sz(g,m,90),k=fF(l,a,F),L):F},L.extentMajor([[-180,-90+bn],[180,90-bn]]).extentMinor([[-180,-80-bn],[180,80+bn]])}()}function __(i){ze.call(this,null,i)}function N6(i){if(!(0,N.mf)(i))return!1;const o=(0,N.Rg)((0,N.Oj)(i));return o.$x||o.$y||o.$value||o.$max}function Oz(i){ze.call(this,null,i),this.modified(!0)}function xF(i,o,a){(0,N.mf)(i[o])&&i[o](a)}function P6(i,o,a,l){if(isNaN(o)||isNaN(a))return i;var u,C,D,T,I,k,F,L,z,f=i._root,m={data:l},g=i._x0,b=i._y0,v=i._x1,w=i._y1;if(!f)return i._root=m,i;for(;f.length;)if((k=o>=(C=(g+v)/2))?g=C:v=C,(F=a>=(D=(b+w)/2))?b=D:w=D,u=f,!(f=f[L=F<<1|k]))return u[L]=m,i;if(T=+i._x.call(null,f.data),I=+i._y.call(null,f.data),o===T&&a===I)return m.next=f,u?u[L]=m:i._root=m,i;do{u=u?u[L]=new Array(4):i._root=new Array(4),(k=o>=(C=(g+v)/2))?g=C:v=C,(F=a>=(D=(b+w)/2))?b=D:w=D}while((L=F<<1|k)==(z=(I>=D)<<1|T>=C));return u[z]=f,u[L]=m,i}function Rl(i,o,a,l,u){this.node=i,this.x0=o,this.y0=a,this.x1=l,this.y1=u}function V6(i){return i[0]}function IY(i){return i[1]}function Pz(i,o,a){var l=new gI(o??V6,a??IY,NaN,NaN,NaN,NaN);return null==i?l:l.addAll(i)}function gI(i,o,a,l,u,f){this._x=i,this._y=o,this._x0=a,this._y0=l,this._x1=u,this._y1=f,this._root=void 0}function Lz(i){for(var o={data:i.data},a=o;i=i.next;)a=a.next={data:i.data};return o}yF.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},(0,N.XW)(yF,ze,{transform(i,o){var v,a=this._features,l=this._points,u=i.fields,f=u&&u[0],m=u&&u[1],g=i.geojson||!u&&N.yR,b=o.ADD;v=i.modified()||o.changed(o.REM)||o.modified((0,N.Oj)(g))||f&&o.modified((0,N.Oj)(f))||m&&o.modified((0,N.Oj)(m)),(!this.value||v)&&(b=o.SOURCE,this._features=a=[],this._points=l=[]),g&&o.visit(b,w=>a.push(g(w))),f&&m&&(o.visit(b,w=>{var C=f(w),D=m(w);null!=C&&null!=D&&(C=+C)===C&&(D=+D)===D&&l.push([C,D])}),a=a.concat({type:fI,geometry:{type:"MultiPoint",coordinates:l}})),this.value={type:hI,features:a}}}),bF.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},(0,N.XW)(bF,ze,{transform(i,o){var a=o.fork(o.ALL),l=this.value,u=i.field||N.yR,f=i.as||"path",m=a.SOURCE;!l||i.modified()?(this.value=l=IS(i.projection),a.materialize().reflow()):m=u===N.yR||o.modified(u.fields)?a.ADD_MOD:a.ADD;const g=function kz(i,o){const a=i.pointRadius();return i.context(null),null!=o&&i.pointRadius(o),a}(l,i.pointRadius);return a.visit(m,b=>b[f]=l(u(b))),l.pointRadius(g),a.modifies(f)}}),vF.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},(0,N.XW)(vF,ze,{transform(i,o){var b,a=i.projection,l=i.fields[0],u=i.fields[1],f=i.as||["x","y"],m=f[0],g=f[1];function v(w){const C=a([l(w),u(w)]);C?(w[m]=C[0],w[g]=C[1]):(w[m]=void 0,w[g]=void 0)}return i.modified()?o=o.materialize().reflow(!0).visit(o.SOURCE,v):(b=o.modified(l.fields)||o.modified(u.fields),o.visit(b?o.ADD_MOD:o.ADD,v)),o.modifies(f)}}),pI.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"}]},(0,N.XW)(pI,ze,{transform(i,o){var a=o.fork(o.ALL),l=this.value,u=i.as||"shape",f=a.ADD;return(!l||i.modified())&&(this.value=l=function mI(i,o,a){const l=null==a?u=>i(o(u)):u=>{var f=i.pointRadius(),m=i.pointRadius(a)(o(u));return i.pointRadius(f),m};return l.context=u=>(i.context(u),l),l}(IS(i.projection),i.field||(0,N.EP)("datum"),i.pointRadius),a.materialize().reflow(),f=a.SOURCE),a.visit(f,m=>m[u]=l),a.modifies(u)}}),Jb.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}]},(0,N.XW)(Jb,ze,{transform(i,o){var u,a=this.value,l=this.generator;if(!a.length||i.modified())for(const f in i)(0,N.mf)(l[f])&&l[f](i[f]);return u=l(),a.length?o.mod.push(An(a[0],u)):o.add.push(Ti(u)),a[0]=u,o}}),__.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"}]},(0,N.XW)(__,ze,{transform(i,o){if(!o.changed()&&!i.modified())return o.StopPropagation;var a=o.materialize(o.SOURCE).source,l="shared"===i.resolve,u=i.field||N.yR,f=function xY(i,o){let a;return(0,N.mf)(i)?(a=l=>i(l,o),a.dep=N6(i)):i?a=(0,N.a9)(i):(a=l=>l.$value/l.$max||0,a.dep=!0),a}(i.opacity,i),m=function Iz(i,o){let a;return(0,N.mf)(i)?(a=l=>Lu(i(l,o)),a.dep=N6(i)):a=(0,N.a9)(Lu(i||"#888")),a}(i.color,i),g=i.as||"image",b={$x:0,$y:0,$value:0,$max:l?Su(a.map(v=>Su(u(v).values))):0};return a.forEach(v=>{const w=u(v),C=(0,N.l7)({},v,b);l||(C.$max=Su(w.values||[])),v[g]=function wY(i,o,a,l){const u=i.width,m=i.x1||0,g=i.y1||0,b=i.x2||u,v=i.y2||i.height,w=i.values,C=w?F=>w[F]:N.bM,D=$d(b-m,v-g),T=D.getContext("2d"),I=T.getImageData(0,0,b-m,v-g),k=I.data;for(let F=g,L=0;F{null!=i[l]&&xF(a,l,i[l])})):Cz.forEach(l=>{i.modified(l)&&xF(a,l,i[l])}),null!=i.pointRadius&&a.path.pointRadius(i.pointRadius),i.fit&&function F6(i,o){const a=function Rz(i){return 1===(i=(0,N.IX)(i)).length?i[0]:{type:hI,features:i.reduce((o,a)=>o.concat(function CY(i){return i.type===hI?i.features:(0,N.IX)(i).filter(o=>null!=o).map(o=>o.type===fI?o:{type:fI,geometry:o})}(a)),[])}}(o.fit);o.extent?i.fitExtent(o.extent,a):o.size&&i.fitSize(o.size,a)}(a,i),o.fork(o.NO_SOURCE|o.NO_FIELDS)}});var Nl=Pz.prototype=gI.prototype;function al(i){return function(){return i}}function hm(i){return 1e-6*(i()-.5)}function H6(i){return i.x+i.vx}function $z(i){return i.y+i.vy}Nl.copy=function(){var a,l,i=new gI(this._x,this._y,this._x0,this._y0,this._x1,this._y1),o=this._root;if(!o)return i;if(!o.length)return i._root=Lz(o),i;for(a=[{source:o,target:i._root=new Array(4)}];o=a.pop();)for(var u=0;u<4;++u)(l=o.source[u])&&(l.length?a.push({source:l,target:o.target[u]=new Array(4)}):o.target[u]=Lz(l));return i},Nl.add=function SY(i){const o=+this._x.call(null,i),a=+this._y.call(null,i);return P6(this.cover(o,a),o,a,i)},Nl.addAll=function DY(i){var o,a,u,f,l=i.length,m=new Array(l),g=new Array(l),b=1/0,v=1/0,w=-1/0,C=-1/0;for(a=0;aw&&(w=u),fC&&(C=f));if(b>w||v>C)return this;for(this.cover(b,v).cover(w,C),a=0;ai||i>=u||l>o||o>=f;)switch(v=(ow||(g=I.y0)>C||(b=I.x1)=L)<<1|i>=F)&&(I=D[D.length-1],D[D.length-1]=D[D.length-1-k],D[D.length-1-k]=I)}else{var z=i-+this._x.call(null,T.data),V=o-+this._y.call(null,T.data),U=z*z+V*V;if(U=(D=(m+b)/2))?m=D:b=D,(k=C>=(T=(g+v)/2))?g=T:v=T,o=a,!(a=a[F=k<<1|I]))return this;if(!a.length)break;(o[F+1&3]||o[F+2&3]||o[F+3&3])&&(l=o,L=F)}for(;a.data!==i;)if(u=a,!(a=a.next))return this;return(f=a.next)&&delete a.next,u?(f?u.next=f:delete u.next,this):o?(f?o[F]=f:delete o[F],(a=o[0]||o[1]||o[2]||o[3])&&a===(o[3]||o[2]||o[1]||o[0])&&!a.length&&(l?l[L]=a:this._root=a),this):(this._root=f,this)},Nl.removeAll=function B6(i){for(var o=0,a=i.length;o{}};function zz(){for(var l,i=0,o=arguments.length,a={};i=0&&(l=a.slice(u+1),a=a.slice(0,u)),a&&!o.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:l}})}(i+"",a),f=-1,m=l.length;if(!(arguments.length<2)){if(null!=o&&"function"!=typeof o)throw new Error("invalid callback: "+o);for(;++f0)for(var u,f,a=new Array(u),l=0;l=0&&i._call.call(void 0,o),i=i._next;--pm}()}finally{pm=0,function NY(){for(var i,a,o=CF,l=1/0;o;)o._call?(l>o._time&&(l=o._time),i=o,o=o._next):(a=o._next,o._next=null,o=i?i._next=a:CF=a);PS=i,Wz(l)}(),t0=0}}function X6(){var i=_I.now(),o=i-SF;o>EF&&(DF-=o,SF=i)}function Wz(i){pm||(NS&&(NS=clearTimeout(NS)),i-t0>24?(i<1/0&&(NS=setTimeout(G6,i-_I.now()-DF)),FS&&(FS=clearInterval(FS))):(FS||(SF=_I.now(),FS=setInterval(X6,EF)),pm=1,Hz(G6)))}MF.prototype=q6.prototype={constructor:MF,restart:function(i,o,a){if("function"!=typeof i)throw new TypeError("callback is not a function");a=(null==a?cr():+a)+(null==o?0:+o),!this._next&&PS!==this&&(PS?PS._next=this:CF=this,PS=this),this._call=i,this._time=a,Wz()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wz())}};const Y6=4294967296;function LY(i){return i.x}function qz(i){return i.y}var Z6=Math.PI*(3-Math.sqrt(5));function AF(i){return i.index}function Gz(i,o){var a=i.get(o);if(!a)throw new Error("node not found: "+o);return a}const wh={center:function wF(i,o){var a,l=1;function u(){var f,g,m=a.length,b=0,v=0;for(f=0;fT+ce||YI+ce||HD.index){var le=T-Z.x-Z.vx,ve=I-Z.y-Z.vy,xe=le*le+ve*ve;xev.r&&(v.r=v[w].r)}function b(){if(o){var v,C,w=o.length;for(a=new Array(w),v=0;v=g)){(T.data!==o||T.next)&&(0===L&&(U+=(L=hm(a))*L),0===z&&(U+=(z=hm(a))*z),U[o(W,Y,m),W]));for(F=0,g=new Array(L);Fo(l,a):o)}function Uw(i){var o=0,a=i.children,l=a&&a.length;if(l)for(;--l>=0;)o+=a[l].value;else o=1;i.value=o}function Hw(i,o){i instanceof Map?(i=[void 0,i],void 0===o&&(o=zY)):void 0===o&&(o=IF);for(var l,f,m,g,b,a=new Ww(i),u=[a];l=u.pop();)if((m=o(l.data))&&(b=(m=Array.from(m)).length))for(l.children=m,g=b-1;g>=0;--g)u.push(f=m[g]=new Ww(m[g])),f.parent=l,f.depth=l.depth+1;return a.eachBefore(cH)}function IF(i){return i.children}function zY(i){return Array.isArray(i)?i[1]:null}function VY(i){void 0!==i.data.value&&(i.value=i.data.value),i.data=i.data.data}function cH(i){var o=0;do{i.height=o}while((i=i.parent)&&i.height<++o)}function Ww(i){this.data=i,this.depth=this.height=0,this.parent=null}function wI(i){return null==i?null:OF(i)}function OF(i){if("function"!=typeof i)throw new Error;return i}function n0(){return 0}function qw(i){return function(){return i}}mm.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:Kz}]},(0,N.XW)(mm,ze,{transform(i,o){var a=this.value,l=o.changed(o.ADD_REM),u=i.modified(yI),f=i.iterations||300;if(a?(l&&(o.modifies("index"),a.nodes(o.source)),(u||o.changed(o.MOD))&&kF(a,i,0,o)):(this.value=a=function tH(i,o){const a=function Q6(i){var o,a=1,l=.001,u=1-Math.pow(l,1/300),f=0,m=.6,g=new Map,b=q6(C),v=W6("tick","end"),w=function K6(){let i=1;return()=>(i=(1664525*i+1013904223)%Y6)/Y6}();function C(){D(),v.call("tick",o),a1?(null==F?g.delete(k):g.set(k,I(F)),o):g.get(k)},find:function(k,F,L){var U,W,Y,H,Z,z=0,V=i.length;for(null==L?L=1/0:L*=L,z=0;z1?(v.on(k,F),o):v.on(k)}}}(i),l=a.stop,u=a.restart;let f=!1;return a.stopped=()=>f,a.restart=()=>(f=!1,u()),a.stop=()=>(f=!0,l()),kF(a,o,!0).on("end",()=>f=!0)}(o.source,i),a.on("tick",function eH(i,o){return()=>i.touch(o).run()}(o.dataflow,this)),i.static||(l=!0,a.tick()),o.modifies("index")),u||l||i.modified(Yz)||o.changed()&&i.restart)if(a.alpha(Math.max(a.alpha(),i.alpha||1)).alphaDecay(1-Math.pow(a.alphaMin(),1/f)),i.static)for(a.stop();--f>=0;)a.tick();else if(a.stopped()&&a.restart(),!l)return o.StopPropagation;return this.finish(i,o)},finish(i,o){const a=o.dataflow;for(let w,g=this._argops,b=0,v=g.length;b=0;--f)l.push(u[f]);return this},find:function iH(i,o){let a=-1;for(const l of this)if(i.call(o,l,++a,this))return l},sum:function rH(i){return this.eachAfter(function(o){for(var a=+i(o.data)||0,l=o.children,u=l&&l.length;--u>=0;)a+=l[u].value;o.value=a})},sort:function oH(i){return this.eachBefore(function(o){o.children&&o.children.sort(i)})},path:function sH(i){for(var o=this,a=function aH(i,o){if(i===o)return i;var a=i.ancestors(),l=o.ancestors(),u=null;for(i=a.pop(),o=l.pop();i===o;)u=i,i=a.pop(),o=l.pop();return u}(o,i),l=[o];o!==a;)l.push(o=o.parent);for(var u=l.length;i!==a;)l.splice(u,0,i),i=i.parent;return l},ancestors:function lH(){for(var i=this,o=[i];i=i.parent;)o.push(i);return o},descendants:function $Y(){return Array.from(this)},leaves:function BY(){var i=[];return this.eachBefore(function(o){o.children||i.push(o)}),i},links:function vI(){var i=this,o=[];return i.each(function(a){a!==i&&o.push({source:a.parent,target:a})}),o},copy:function Qu(){return Hw(this).eachBefore(VY)},[Symbol.iterator]:function*xI(){var o,l,u,f,i=this,a=[i];do{for(o=a.reverse(),a=[];i=o.pop();)if(yield i,l=i.children)for(u=0,f=l.length;u0&&a*a>l*l+u*u}function Yi(i,o){for(var a=0;a1e-6?(le+Math.sqrt(le*le-4*ce*ve))/(2*ce):ve/le);return{x:l+Y+H*xe,y:u+Z+te*xe,r:xe}}function td(i,o,a){var u,f,g,b,l=i.x-o.x,m=i.y-o.y,v=l*l+m*m;v?(f=o.r+a.r,b=i.r+a.r,(f*=f)>(b*=b)?(u=(v+b-f)/(2*v),g=Math.sqrt(Math.max(0,b/v-u*u)),a.x=i.x-u*l-g*m,a.y=i.y-u*m+g*l):(u=(v+f-b)/(2*v),g=Math.sqrt(Math.max(0,f/v-u*u)),a.x=o.x+u*l-g*m,a.y=o.y+u*m+g*l)):(a.x=o.x+a.r,a.y=o.y)}function Qz(i,o){var a=i.r+o.r-1e-6,l=o.x-i.x,u=o.y-i.y;return a>0&&a*a>l*l+u*u}function is(i){var o=i._,a=i.next._,l=o.r+a.r,u=(o.x*a.r+a.x*o.r)/l,f=(o.y*a.r+a.y*o.r)/l;return u*u+f*f}function SI(i){this._=i,this.next=null,this.previous=null}function $r(i,o){if(!(f=(i=function dH(i){return"object"==typeof i&&"length"in i?i:Array.from(i)}(i)).length))return 0;var a,l,u,f,m,g,b,v,w,C,D;if((a=i[0]).x=0,a.y=0,!(f>1))return a.r;if(a.x=-(l=i[1]).r,l.x=a.r,l.y=0,!(f>2))return a.r+l.r;td(l,a,u=i[2]),a=new SI(a),l=new SI(l),u=new SI(u),a.next=u.previous=l,l.next=a.previous=u,u.next=l.previous=a;e:for(b=3;bfunction e5(i){let o=(i=`${i}`).length;return AI(i,o-1)&&!AI(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}(a(U,W,u))),z=L.map(t5),V=new Set(L).add("");for(const U of z)V.has(U)||(V.add(U),L.push(U),z.push(t5(U)),f.push(LF));m=(U,W)=>L[W],g=(U,W)=>z[W]}for(w=0,b=f.length;w=0&&(T=f[L]).data===LF;--L)T.data=null}if(C.parent=gH,C.eachBefore(function(L){L.depth=L.parent.depth+1,--b}).eachBefore(cH),C.parent=null,b>0)throw new Error("cycle");return C}return l.id=function(u){return arguments.length?(i=wI(u),l):i},l.parentId=function(u){return arguments.length?(o=wI(u),l):o},l.path=function(u){return arguments.length?(a=wI(u),l):a},l}function t5(i){let o=i.length;if(o<2)return"";for(;--o>1&&!AI(i,o););return i.slice(0,o)}function AI(i,o){if("/"===i[o]){let a=0;for(;o>0&&"\\"===i[--o];)++a;if(!(1&a))return!0}return!1}function TI(i,o){return i.parent===o.parent?1:2}function r0(i){var o=i.children;return o?o[0]:i.t}function $F(i){var o=i.children;return o?o[o.length-1]:i.t}function bH(i,o,a){var l=a/(o.i-i.i);o.c-=l,o.s+=a,i.c+=l,o.z+=a,o.m+=a}function n5(i,o,a){return i.a.parent===o.parent?i.a:a}function kI(i,o){this._=i,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=o}function xH(i,o){return i.parent===o.parent?1:2}function VF(i,o){return i+o.x}function CH(i,o){return Math.max(i,o.y)}function II(i,o,a,l,u){for(var m,f=i.children,g=-1,b=f.length,v=i.value&&(u-a)/i.value;++gz&&(z=v),Y=F*F*W,(V=Math.max(z/Y,Y/L))>U){F-=v;break}U=V}m.push(b={value:F,dice:T1?l:1)},a}(HF),qF=function i(o){function a(l,u,f,m,g){if((b=l._squarify)&&b.ratio===o)for(var b,v,w,C,T,D=-1,I=b.length,k=l.value;++D1?l:1)},a}(HF);function RI(i,o,a){const l={};return i.each(u=>{const f=u.data;a(f)&&(l[o(f)]=u)}),i.lookup=l,i}function GF(i){ze.call(this,null,i)}GF.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const o0=i=>i.values;function r5(){const i=[],o={entries:u=>l(a(u,0),0),key:u=>(i.push(u),o)};function a(u,f){if(f>=i.length)return u;const m=u.length,g=i[f++],b={},v={};let C,D,T,w=-1;for(;++wi.length)return u;const m=[];for(const g in u)m.push({key:g,values:l(u[g],f)});return m}return o}function v_(i){ze.call(this,null,i)}(0,N.XW)(GF,ze,{transform(i,o){o.source||(0,N.vU)("Nest transform requires an upstream data source.");var a=i.generate,l=i.modified(),u=o.clone(),f=this.value;return(!f||l||o.changed())&&(f&&f.each(m=>{m.children&&ly(m.data)&&u.rem.push(m.data)}),this.value=f=Hw({values:(0,N.IX)(i.keys).reduce((m,g)=>(m.key(g),m),r5()).entries(u.source)},o0),a&&f.each(m=>{m.children&&(m=Ti(m.data),u.add.push(m),u.source.push(m))}),RI(f,Kt,Kt)),u.source.root=f,u}});const x_=(i,o)=>i.parent===o.parent?1:2;(0,N.XW)(v_,ze,{transform(i,o){(!o.source||!o.source.root)&&(0,N.vU)(this.constructor.name+" transform requires a backing tree data source.");const a=this.layout(i.method),l=this.fields,u=o.source.root,f=i.as||l;i.field?u.sum(i.field):u.count(),i.sort&&u.sort(Fr(i.sort,m=>m.data)),function MH(i,o,a){for(let l,u=0,f=o.length;ufunction o5(i,o,a){const l=i.data,u=o.length-1;for(let f=0;f(i=(1664525*i+1013904223)%EI)/EI}();return f.x=o/2,f.y=a/2,i?f.eachBefore(BS(i)).eachAfter(RF(l,.5,m)).eachBefore(NF(1)):f.eachBefore(BS(DI)).eachAfter(RF(n0,1,m)).eachAfter(RF(l,f.r/Math.min(o,a),m)).eachBefore(NF(Math.min(o,a)/(2*f.r))),f}return u.radius=function(f){return arguments.length?(i=wI(f),u):i},u.size=function(f){return arguments.length?(o=+f[0],a=+f[1],u):[o,a]},u.padding=function(f){return arguments.length?(l="function"==typeof f?f:qw(+f),u):l},u},params:["radius","size","padding"],fields:XF});const VS=["x0","y0","x1","y1","depth","children"];function YF(i){v_.call(this,i)}function KF(i){ze.call(this,null,i)}YF.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:VS.length,default:VS}]},(0,N.XW)(YF,v_,{layout:function FF(){var i=1,o=1,a=0,l=!1;function u(m){var g=m.height+1;return m.x0=m.y0=a,m.x1=i,m.y1=o/g,m.eachBefore(function f(m,g){return function(b){b.children&&b_(b,b.x0,m*(b.depth+1)/g,b.x1,m*(b.depth+2)/g);var v=b.x0,w=b.y0,C=b.x1-a,D=b.y1-a;C=0;--m)l.push(u=a.children[m]=new kI(f[m],m)),u.parent=a;return(o.parent=new kI(null,0)).children=[o],o}(v);if(w.eachAfter(f),w.parent.m=-w.z,w.eachBefore(m),l)v.eachBefore(b);else{var C=v,D=v,T=v;v.eachBefore(function(z){z.xD.x&&(D=z),z.depth>T.depth&&(T=z)});var I=C===D?1:i(C,D)/2,k=I-C.x,F=o/(D.x+I+k),L=a/(T.depth||1);v.eachBefore(function(z){z.x=(z.x+k)*F,z.y=z.depth*L})}return v}function f(v){var w=v.children,C=v.parent.children,D=v.i?C[v.i-1]:null;if(w){!function BF(i){for(var f,o=0,a=0,l=i.children,u=l.length;--u>=0;)(f=l[u]).z+=o,f.m+=o,o+=f.s+(a+=f.c)}(v);var T=(w[0].z+w[w.length-1].z)/2;D?(v.z=D.z+i(v._,D._),v.m=v.z-T):v.z=T}else D&&(v.z=D.z+i(v._,D._));v.parent.A=function g(v,w,C){if(w){for(var U,D=v,T=v,I=w,k=D.parent.children[0],F=D.m,L=T.m,z=I.m,V=k.m;I=$F(I),D=r0(D),I&&D;)k=r0(k),(T=$F(T)).a=v,(U=I.z+z-D.z-F+i(I._,D._))>0&&(bH(n5(I,v,C),v,U),F+=U,L+=U),z+=I.m,F+=D.m,V+=k.m,L+=T.m;I&&!$F(T)&&(T.t=I,T.m+=z-L),D&&!r0(k)&&(k.t=D,k.m+=F-V,C=v)}return C}(v,D,v.parent.A||C[0])}function m(v){v._.x=v.z+v.parent.m,v.m+=v.parent.m}function b(v){v.x*=o,v.y=v.depth*a}return u.separation=function(v){return arguments.length?(i=v,u):i},u.size=function(v){return arguments.length?(l=!1,o=+v[0],a=+v[1],u):l?null:[o,a]},u.nodeSize=function(v){return arguments.length?(l=!0,o=+v[0],a=+v[1],u):l?[o,a]:null},u},cluster:function UF(){var i=xH,o=1,a=1,l=!1;function u(f){var m,g=0;f.eachAfter(function(D){var T=D.children;T?(D.x=function wH(i){return i.reduce(VF,0)/i.length}(T),D.y=function EH(i){return 1+i.reduce(CH,0)}(T)):(D.x=m?g+=i(D,m):0,D.y=0,m=D)});var b=function SH(i){for(var o;o=i.children;)i=o[0];return i}(f),v=function jF(i){for(var o;o=i.children;)i=o[o.length-1];return i}(f),w=b.x-i(b,v)/2,C=v.x+i(v,b)/2;return f.eachAfter(l?function(D){D.x=(D.x-f.x)*o,D.y=(f.y-D.y)*a}:function(D){D.x=(D.x-w)/(C-w)*o,D.y=(1-(f.y?D.y/f.y:1))*a})}return u.separation=function(f){return arguments.length?(i=f,u):i},u.size=function(f){return arguments.length?(l=!1,o=+f[0],a=+f[1],u):l?null:[o,a]},u.nodeSize=function(f){return arguments.length?(l=!0,o=+f[0],a=+f[1],u):l?[o,a]:null},u}},s5=["x","y","depth","children"];function NI(i){v_.call(this,i)}function ZF(i){ze.call(this,[],i)}NI.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:s5.length,default:s5}]},(0,N.XW)(NI,v_,{layout(i){const o=i||"tidy";if((0,N.nr)(AH,o))return AH[o]();(0,N.vU)("Unrecognized Tree layout method: "+o)},params:["size","nodeSize"],fields:s5}),ZF.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},(0,N.XW)(ZF,ze,{transform(i,o){const a=this.value,l=o.source&&o.source.root,u=o.fork(o.NO_SOURCE),f={};return l||(0,N.vU)("TreeLinks transform requires a tree data source."),o.changed(o.ADD_REM)?(u.rem=a,o.visit(o.SOURCE,m=>f[Kt(m)]=1),l.each(m=>{const g=m.data,b=m.parent&&m.parent.data;b&&f[Kt(g)]&&f[Kt(b)]&&u.add.push(Ti({source:b,target:g}))}),this.value=u.add):o.changed(o.MOD)&&(o.visit(o.MOD,m=>f[Kt(m)]=1),a.forEach(m=>{(f[Kt(m.source)]||f[Kt(m.target)])&&u.mod.push(m)})),u}});const a5={binary:function i5(i,o,a,l,u){var m,b,f=i.children,g=f.length,v=new Array(g+1);for(v[0]=b=m=0;m=D-1){var z=f[C];return z.x0=I,z.y0=k,z.x1=F,void(z.y1=L)}for(var V=v[C],U=T/2+V,W=C+1,Y=D-1;W>>1;v[H]L-k){var ce=T?(I*te+F*Z)/T:F;w(C,W,Z,I,k,ce,L),w(W,D,te,ce,k,F,L)}else{var le=T?(k*te+L*Z)/T:L;w(C,W,Z,I,k,F,le),w(W,D,te,I,le,F,L)}}(0,g,i.value,o,a,l,u)},dice:b_,slice:II,slicedice:function WY(i,o,a,l,u){(1&i.depth?II:b_)(i,o,a,l,u)},squarify:WF,resquarify:qF},jS=["x0","y0","x1","y1","depth","children"];function l5(i){v_.call(this,i)}l5.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:jS.length,default:jS}]},(0,N.XW)(l5,v_,{layout(){const i=function DH(){var i=WF,o=!1,a=1,l=1,u=[0],f=n0,m=n0,g=n0,b=n0,v=n0;function w(D){return D.x0=D.y0=0,D.x1=a,D.y1=l,D.eachBefore(C),u=[0],o&&D.eachBefore(MI),D}function C(D){var T=u[D.depth],I=D.x0+T,k=D.y0+T,F=D.x1-T,L=D.y1-T;F{const a=i.tile();a.ratio&&i.tile(a.ratio(o))},i.method=o=>{(0,N.nr)(a5,o)?i.tile(a5[o]):(0,N.vU)("Unrecognized Treemap layout method: "+o)},i},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:jS});const iu=4278190080;function QF(i,o,a){return new Uint32Array(i.getImageData(0,0,o,a).data.buffer)}function FI(i,o,a){if(!o.length)return;const l=o[0].mark.marktype;"group"===l?o.forEach(u=>{u.items.forEach(f=>FI(i,f.items,a))}):eu[l].draw(i,{items:a?o.map(PI):o})}function PI(i){const o=Vc(i,{});return o.stroke&&0!==o.strokeOpacity||o.fill&&0!==o.fillOpacity?{...o,strokeOpacity:1,stroke:"#000",fillOpacity:0}:o}const gm=5,Pl=31,US=32,_m=new Uint32Array(US+1),pf=new Uint32Array(US+1);pf[0]=0,_m[0]=~pf[0];for(let i=1;i<=US;++i)pf[i]=pf[i-1]<<1|1,_m[i]=~pf[i];function LI(i,o,a,l,u,f){let m=a/2;return i-m<0||i+m>u||o-(m=l/2)<0||o+m>f}function w_(i,o,a,l,u,f,m,g){const b=u*f/(2*l),v=i(o-b),w=i(o+b),C=i(a-(f/=2)),D=i(a+f);return m.outOfBounds(v,C,w,D)||m.getRange(v,C,w,D)||g&&g.getRange(v,C,w,D)}const NH=[-1,-1,1,1],FH=[-1,1,-1,1],u5=["right","center","left"],LH=["bottom","middle","top"];function d5(i,o,a,l,u,f,m,g,b,v,w,C){return!(u.outOfBounds(i,a,o,l)||(C&&f||u).getRange(i,a,o,l))}const BH={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},zH={naive:function c5(i,o,a,l){const u=i.width,f=i.height;return function(m){const g=m.datum.datum.items[l].items,b=g.length,v=m.datum.fontSize,w=yc.width(m.datum,m.datum.text);let D,T,I,k,F,L,z,C=0;for(let V=0;V=C&&(C=z,m.x=F,m.y=L);return F=w/2,L=v/2,D=m.x-F,T=m.x+F,I=m.y-L,k=m.y+L,m.align="center",D<0&&T<=u?m.align="left":0<=D&&u=1;)z=(F+L)/2,w_(i,I,k,T,D,z,m,g)?L=z:F=z;if(F>C)return[I,k,F,!0]}}return function(v){const w=v.datum.datum.items[l].items,C=w.length,D=v.datum.fontSize,T=yc.width(v.datum,v.datum.text);let z,V,U,W,Y,H,Z,te,ce,le,ve,xe,Q,J,oe,we,ne,I=a?D:0,k=!1,F=!1,L=0;for(let ge=0;geV&&(ne=z,z=V,V=ne),U>W&&(ne=U,U=W,W=ne),ce=i(z),ve=i(V),le=~~((ce+ve)/2),xe=i(U),J=i(W),Q=~~((xe+J)/2),Z=le;Z>=ce;--Z)for(te=Q;te>=xe;--te)we=b(Z,te,I,T,D),we&&([v.x,v.y,I,k]=we);for(Z=le;Z<=ve;++Z)for(te=Q;te<=J;++te)we=b(Z,te,I,T,D),we&&([v.x,v.y,I,k]=we);!k&&!a&&(oe=Math.abs(V-z+W-U),Y=(z+V)/2,H=(U+W)/2,oe>=L&&!LI(Y,H,T,D,u,f)&&!w_(i,Y,H,D,T,D,m,null)&&(L=oe,v.x=Y,v.y=H,F=!0))}return!(!k&&!F||(Y=T/2,H=D/2,m.setRange(i(v.x-Y),i(v.y-H),i(v.x+Y),i(v.y+H)),v.align="center",v.baseline="middle",0))}},floodfill:function PH(i,o,a,l){const u=i.width,f=i.height,m=o[0],g=o[1],b=i.bitmap();return function(v){const w=v.datum.datum.items[l].items,C=w.length,D=v.datum.fontSize,T=yc.width(v.datum,v.datum.text),I=[];let V,U,W,Y,H,Z,te,ce,le,ve,xe,Q,k=a?D:0,F=!1,L=!1,z=0;for(let J=0;J=1;)xe=(le+ve)/2,w_(i,H,Z,D,T,xe,m,g)?ve=xe:le=xe;le>k&&(v.x=H,v.y=Z,k=le,F=!0)}}!F&&!a&&(Q=Math.abs(U-V+Y-W),H=(V+U)/2,Z=(W+Y)/2,Q>=z&&!LI(H,Z,T,D,u,f)&&!w_(i,H,Z,D,T,D,m,null)&&(z=Q,v.x=H,v.y=Z,L=!0))}return!(!F&&!L||(H=T/2,Z=D/2,m.setRange(i(v.x-H),i(v.y-Z),i(v.x+H),i(v.y+Z)),v.align="center",v.baseline="middle",0))}}};function VH(i,o,a,l,u,f,m,g,b,v,w){if(!i.length)return i;const C=Math.max(l.length,u.length),D=function Eh(i,o){const a=new Float64Array(o),l=i.length;for(let u=0;u[f.x,f.x,f.x,f.y,f.y,f.y];return i?"line"===i||"area"===i?f=>u(f.datum):"line"===o?f=>{const m=f.datum.items[l].items;return u(m.length?m["start"===a?0:m.length-1]:{x:NaN,y:NaN})}:f=>{const m=f.datum.bounds;return[m.x1,(m.x1+m.x2)/2,m.x2,m.y1,(m.y1+m.y2)/2,m.y2]}:u}(I,k,g,b),z=null===v||v===1/0,V=F&&"naive"===w;let U=-1,W=-1;const Y=i.map(ce=>{const le=z?yc.width(ce,ce.text):void 0;return U=Math.max(U,le),W=Math.max(W,ce.fontSize),{datum:ce,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:L(ce),textWidth:le}});v=null===v||v===1/0?Math.max(U,W)+Math.max(...l):v;const H=function OH(i,o,a){const l=Math.max(1,Math.sqrt(i*o/1e6)),u=~~((i+2*a+l)/l),f=~~((o+2*a+l)/l),m=g=>~~((g+a)/l);return m.invert=g=>g*l-a,m.bitmap=()=>function IH(i,o){const a=new Uint32Array(~~((i*o+US)/US));function l(f,m){a[f]|=m}function u(f,m){a[f]&=m}return{array:a,get:(f,m)=>{const g=m*i+f;return a[g>>>gm]&1<<(g&Pl)},set:(f,m)=>{const g=m*i+f;l(g>>>gm,1<<(g&Pl))},clear:(f,m)=>{const g=m*i+f;u(g>>>gm,~(1<<(g&Pl)))},getRange:(f,m,g,b)=>{let w,C,D,T,v=b;for(;v>=m;--v)if(w=v*i+f,C=v*i+g,D=w>>>gm,T=C>>>gm,D===T){if(a[D]&_m[w&Pl]&pf[1+(C&Pl)])return!0}else{if(a[D]&_m[w&Pl]||a[T]&pf[1+(C&Pl)])return!0;for(let I=D+1;I{let v,w,C,D,T;for(;m<=b;++m)if(v=m*i+f,w=m*i+g,C=v>>>gm,D=w>>>gm,C===D)l(C,_m[v&Pl]&pf[1+(w&Pl)]);else for(l(C,_m[v&Pl]),l(D,pf[1+(w&Pl)]),T=C+1;T{let v,w,C,D,T;for(;m<=b;++m)if(v=m*i+f,w=m*i+g,C=v>>>gm,D=w>>>gm,C===D)u(C,pf[v&Pl]|_m[1+(w&Pl)]);else for(u(C,pf[v&Pl]),u(D,_m[1+(w&Pl)]),T=C+1;Tf<0||m<0||b>=o||g>=i}}(u,f),m.ratio=l,m.padding=a,m.width=i,m.height=o,m}(o[0],o[1],v);let Z;if(!V){a&&Y.sort((ve,xe)=>a(ve.datum,xe.datum));let ce=!1;for(let ve=0;veve.datum);Z=f.length||le?function kH(i,o,a,l,u){const f=i.width,m=i.height,g=l||u,b=$d(f,m).getContext("2d"),v=$d(f,m).getContext("2d"),w=g&&$d(f,m).getContext("2d");a.forEach(Z=>FI(b,Z,!1)),FI(v,o,!1),g&&FI(w,o,!0);const C=QF(b,f,m),D=QF(v,f,m),T=g&&QF(w,f,m),I=i.bitmap(),k=g&&i.bitmap();let F,L,z,V,U,W,Y,H;for(L=0;La.set(i(l.boundary[0]),i(l.boundary[3]))),[a,void 0]}(H,m&&Y)}const te=F?zH[w](H,Z,m,b):function $H(i,o,a,l){const u=i.width,f=i.height,m=o[0],g=o[1],b=l.length;return function(v){const w=v.boundary,C=v.datum.fontSize;if(w[2]<0||w[5]<0||w[0]>u||w[3]>f)return!1;let T,I,k,F,L,z,V,U,W,Y,H,Z,te,ce,le,D=v.textWidth??0;for(let ve=0;ve>>2&3)-1,k=0===T&&0===I||l[ve]<0,F=T&&I?Math.SQRT1_2:1,L=l[ve]<0?-1:1,z=w[1+T]+l[ve]*T*F,H=w[4+I]+L*C*I/2+l[ve]*I*F,U=H-C/2,W=H+C/2,Z=i(z),ce=i(U),le=i(W),!D){if(!d5(Z,Z,ce,le,m,g,0,0,0,0,0,k))continue;D=yc.width(v.datum,v.datum.text)}if(Y=z+L*D*T/2,z=Y-D/2,V=Y+D/2,Z=i(z),te=i(V),d5(Z,te,ce,le,m,g,0,0,0,0,0,k))return v.x=T?T*L<0?V:z:Y,v.y=I?I*L<0?W:U:H,v.align=u5[T*L+1],v.baseline=LH[I*L+1],m.setRange(Z,ce,te,le),!0}return!1}}(H,Z,T,D);return Y.forEach(ce=>ce.opacity=+te(ce)),Y}const p5=["x","y","opacity","align","baseline"],m5=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function JF(i){ze.call(this,null,i)}function g5(i,o){var u,f,m,g,b,v,a=[],l=function(w){return w(g)};if(null==o)a.push(i);else for(u={},f=0,m=i.length;f{const m=f.datum;m[u[0]]=f.x,m[u[1]]=f.y,m[u[2]]=f.opacity,m[u[3]]=f.align,m[u[4]]=f.baseline}),o.reflow(l).modifies(u)}}),eP.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}]},(0,N.XW)(eP,ze,{transform(i,o){const a=o.fork(o.NO_SOURCE|o.NO_FIELDS);if(!this.value||o.changed()||i.modified()){const u=g5(o.materialize(o.SOURCE).source,i.groupby),f=(i.groupby||[]).map(N.el),m=f.length,g=i.as||[(0,N.el)(i.x),(0,N.el)(i.y)],b=[];u.forEach(v=>{Tu(v,i.x,i.y,i.bandwidth||.3).forEach(w=>{const C={};for(let D=0;D"poly"===i?o:"quad"===i?2:1)(m,g),v=i.as||[(0,N.el)(i.x),(0,N.el)(i.y)],w=BI[m],C=[];let D=i.extent;(0,N.nr)(BI,m)||(0,N.vU)("Invalid regression method: "+m),null!=D&&"log"===m&&D[0]<=0&&(o.dataflow.warn("Ignoring extent with values <= 0 for log regression."),D=null),u.forEach(T=>{if(T.length<=b)return void o.dataflow.warn("Skipping regression with more parameters than data points.");const k=w(T,i.x,i.y,g);if(i.params)return void C.push(Ti({keys:T.dims,coef:k.coef,rSquared:k.rSquared}));const F=D||(0,N.We)(T,i.x),L=z=>{const V={};for(let U=0;UL([z,k.predict(z)])):qf(k.predict,F,25,200).forEach(L)}),this.value&&(a.rem=this.value),this.value=a.add=a.source=C}return a}});const qs=134217729;function XS(i,o,a,l,u){let f,m,g,b,v=o[0],w=l[0],C=0,D=0;w>v==w>-v?(f=v,v=o[++C]):(f=w,w=l[++D]);let T=0;if(Cv==w>-v?(m=v+f,g=f-(m-v),v=o[++C]):(m=w+f,g=f-(m-w),w=l[++D]),f=m,0!==g&&(u[T++]=g);Cv==w>-v?(m=f+v,b=m-f,g=f-(m-b)+(v-b),v=o[++C]):(m=f+w,b=m-f,g=f-(m-b)+(w-b),w=l[++D]),f=m,0!==g&&(u[T++]=g);for(;C=33306690738754716e-32*v?b:-function GH(i,o,a,l,u,f,m){let g,b,v,w,C,D,T,I,k,F,L,z,V,U,W,Y,H,Z;const te=i-u,ce=a-u,le=o-f,ve=l-f;U=te*ve,D=qs*te,T=D-(D-te),I=te-T,D=qs*ve,k=D-(D-ve),F=ve-k,W=I*F-(U-T*k-I*k-T*F),Y=le*ce,D=qs*le,T=D-(D-le),I=le-T,D=qs*ce,k=D-(D-ce),F=ce-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Gw[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Gw[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Gw[2]=z-(Z-C)+(L-C),Gw[3]=Z;let xe=function UH(i,o){let a=o[0];for(let l=1;l=Q||-xe>=Q||(C=i-te,g=i-(te+C)+(C-u),C=a-ce,v=a-(ce+C)+(C-u),C=o-le,b=o-(le+C)+(C-f),C=l-ve,w=l-(ve+C)+(C-f),0===g&&0===b&&0===v&&0===w)||(Q=11093356479670487e-47*m+33306690738754706e-32*Math.abs(xe),xe+=te*w+ve*g-(le*v+ce*b),xe>=Q||-xe>=Q))return xe;U=g*ve,D=qs*g,T=D-(D-g),I=g-T,D=qs*ve,k=D-(D-ve),F=ve-k,W=I*F-(U-T*k-I*k-T*F),Y=b*ce,D=qs*b,T=D-(D-b),I=b-T,D=qs*ce,k=D-(D-ce),F=ce-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const J=XS(4,Gw,4,Ll,_5);U=te*w,D=qs*te,T=D-(D-te),I=te-T,D=qs*w,k=D-(D-w),F=w-k,W=I*F-(U-T*k-I*k-T*F),Y=le*v,D=qs*le,T=D-(D-le),I=le-T,D=qs*v,k=D-(D-v),F=v-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const oe=XS(J,_5,4,Ll,WH);U=g*w,D=qs*g,T=D-(D-g),I=g-T,D=qs*w,k=D-(D-w),F=w-k,W=I*F-(U-T*k-I*k-T*F),Y=b*v,D=qs*b,T=D-(D-b),I=b-T,D=qs*v,k=D-(D-v),F=v-k,H=I*F-(Y-T*k-I*k-T*F),L=W-H,C=W-L,Ll[0]=W-(L+C)+(C-H),z=U+L,C=z-U,V=U-(z-C)+(L-C),L=V-Y,C=V-L,Ll[1]=V-(L+C)+(C-Y),Z=z+L,C=Z-z,Ll[2]=z-(Z-C)+(L-C),Ll[3]=Z;const we=XS(oe,WH,4,Ll,qH);return qH[we-1]}(i,o,a,l,u,f,v)}ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(8),ct(8),ct(8),ct(4),ct(8),ct(8),ct(8),ct(12),ct(192),ct(192),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(8),ct(4),ct(4),ct(4),ct(8),ct(16),ct(16),ct(16),ct(32),ct(32),ct(48),ct(64),ct(1152),ct(1152),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(4),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(24),ct(1152),ct(1152),ct(1152),ct(1152),ct(1152),ct(2304),ct(2304),ct(3456),ct(5760),ct(8),ct(8),ct(8),ct(16),ct(24),ct(48),ct(48),ct(96),ct(192),ct(384),ct(384),ct(384),ct(768),ct(96),ct(96),ct(96),ct(1152);const MP=Math.pow(2,-52),AP=new Uint32Array(512);class TP{static from(o,a=P5,l=iD){const u=o.length,f=new Float64Array(2*u);for(let m=0;m>1;if(a>0&&"number"!=typeof o[0])throw new Error("Expected coords to contain numbers.");this.coords=o;const l=Math.max(2*a-5,0);this._triangles=new Uint32Array(3*l),this._halfedges=new Int32Array(3*l),this._hashSize=Math.ceil(Math.sqrt(a)),this._hullPrev=new Uint32Array(a),this._hullNext=new Uint32Array(a),this._hullTri=new Uint32Array(a),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(a),this._dists=new Float64Array(a),this.update()}update(){const{coords:o,_hullPrev:a,_hullNext:l,_hullTri:u,_hullHash:f}=this,m=o.length>>1;let g=1/0,b=1/0,v=-1/0,w=-1/0;for(let te=0;tev&&(v=ce),le>w&&(w=le),this._ids[te]=te}const C=(g+v)/2,D=(b+w)/2;let T,I,k;for(let te=0,ce=1/0;te0&&(I=te,ce=le)}let z=o[2*I],V=o[2*I+1],U=1/0;for(let te=0;teve&&(te[ce++]=xe,ve=Q)}return this.hull=te.subarray(0,ce),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(zI(F,L,z,V,W,Y)<0){const te=I,ce=z,le=V;I=k,z=W,V=Y,k=te,W=ce,Y=le}const H=function aK(i,o,a,l,u,f){const m=a-i,g=l-o,b=u-i,v=f-o,w=m*m+g*g,C=b*b+v*v,D=.5/(m*v-g*b);return{x:i+(v*w-g*C)*D,y:o+(m*C-b*w)*D}}(F,L,z,V,W,Y);this._cx=H.x,this._cy=H.y;for(let te=0;te0&&Math.abs(xe-ce)<=MP&&Math.abs(Q-le)<=MP||(ce=xe,le=Q,ve===T||ve===I||ve===k))continue;let J=0;for(let de=0,Te=this._hashKey(xe,Q);de=0;)if(oe=we,oe===J){oe=-1;break}if(-1===oe)continue;let ne=this._addTriangle(oe,ve,l[oe],-1,-1,u[oe]);u[ve]=this._legalize(ne+2),u[oe]=ne,Z++;let ge=l[oe];for(;we=l[ge],zI(xe,Q,o[2*ge],o[2*ge+1],o[2*we],o[2*we+1])<0;)ne=this._addTriangle(ge,ve,we,u[ve],-1,u[ge]),u[ve]=this._legalize(ne+2),l[ge]=ge,Z--,ge=we;if(oe===J)for(;we=a[oe],zI(xe,Q,o[2*we],o[2*we+1],o[2*oe],o[2*oe+1])<0;)ne=this._addTriangle(we,ve,oe,-1,u[oe],u[we]),this._legalize(ne+2),u[we]=ne,l[oe]=oe,Z--,oe=we;this._hullStart=a[ve]=oe,l[oe]=a[ge]=ve,l[ve]=ge,f[this._hashKey(xe,Q)]=ve,f[this._hashKey(o[2*oe],o[2*oe+1])]=oe}this.hull=new Uint32Array(Z);for(let te=0,ce=this._hullStart;te0?3-a:1+a)/4}(o-this._cx,a-this._cy)*this._hashSize)%this._hashSize}_legalize(o){const{_triangles:a,_halfedges:l,coords:u}=this;let f=0,m=0;for(;;){const g=l[o],b=o-o%3;if(m=b+(o+2)%3,-1===g){if(0===f)break;o=AP[--f];continue}const v=g-g%3,C=v+(g+2)%3,D=a[m],T=a[o],I=a[b+(o+1)%3],k=a[C];if(oK(u[2*D],u[2*D+1],u[2*T],u[2*T+1],u[2*I],u[2*I+1],u[2*k],u[2*k+1])){a[o]=k,a[g]=D;const L=l[C];if(-1===L){let V=this._hullStart;do{if(this._hullTri[V]===C){this._hullTri[V]=o;break}V=this._hullPrev[V]}while(V!==this._hullStart)}this._link(o,L),this._link(g,l[m]),this._link(m,C),f=a&&o[i[g]]>m;)i[g+1]=i[g--];i[g+1]=f}else{let f=a+1,m=l;m0(i,a+l>>1,f),o[i[a]]>o[i[l]]&&m0(i,a,l),o[i[f]]>o[i[l]]&&m0(i,f,l),o[i[a]]>o[i[f]]&&m0(i,a,f);const g=i[f],b=o[g];for(;;){do{f++}while(o[i[f]]b);if(m=m-a?(p0(i,o,f,l),p0(i,o,a,m-1)):(p0(i,o,a,m-1),p0(i,o,f,l))}}function m0(i,o,a){const l=i[o];i[o]=i[a],i[a]=l}function P5(i){return i[0]}function iD(i){return i[1]}class Em{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(o,a){this._+=`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(o,a){this._+=`L${this._x1=+o},${this._y1=+a}`}arc(o,a,l){const u=(o=+o)+(l=+l),f=a=+a;if(l<0)throw new Error("negative radius");null===this._x1?this._+=`M${u},${f}`:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+u+","+f),l&&(this._+=`A${l},${l},0,1,1,${o-l},${a}A${l},${l},0,1,1,${this._x1=u},${this._y1=f}`)}rect(o,a,l,u){this._+=`M${this._x0=this._x1=+o},${this._y0=this._y1=+a}h${+l}v${+u}h${-l}Z`}value(){return this._||null}}class kP{constructor(){this._=[]}moveTo(o,a){this._.push([o,a])}closePath(){this._.push(this._[0].slice())}lineTo(o,a){this._.push([o,a])}value(){return this._.length?this._:null}}class IP{constructor(o,[a,l,u,f]=[0,0,960,500]){if(!((u=+u)>=(a=+a)&&(f=+f)>=(l=+l)))throw new Error("invalid bounds");this.delaunay=o,this._circumcenters=new Float64Array(2*o.points.length),this.vectors=new Float64Array(2*o.points.length),this.xmax=u,this.xmin=a,this.ymax=f,this.ymin=l,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:o,hull:a,triangles:l},vectors:u}=this;let f,m;const g=this.circumcenters=this._circumcenters.subarray(0,l.length/3*2);for(let z,V,k=0,F=0,L=l.length;k1;)f-=2;for(let m=2;m0){if(a>=this.ymax)return null;(m=(this.ymax-a)/u)0){if(o>=this.xmax)return null;(m=(this.xmax-o)/l)this.xmax?2:0)|(athis.ymax?8:0)}_simplify(o){if(o&&o.length>4){for(let a=0;a2&&function cK(i){const{triangles:o,coords:a}=i;for(let l=0;l1e-10)return!1}return!0}(o)){this.collinear=Int32Array.from({length:a.length/2},(D,T)=>T).sort((D,T)=>a[2*D]-a[2*T]||a[2*D+1]-a[2*T+1]);const b=this.collinear[0],v=this.collinear[this.collinear.length-1],w=[a[2*b],a[2*b+1],a[2*v],a[2*v+1]],C=1e-8*Math.hypot(w[3]-w[1],w[2]-w[0]);for(let D=0,T=a.length/2;D0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=u[0],m[u[0]]=1,2===u.length&&(m[u[1]]=0,this.triangles[1]=u[1],this.triangles[2]=u[1]))}voronoi(o){return new IP(this,o)}*neighbors(o){const{inedges:a,hull:l,_hullIndex:u,halfedges:f,triangles:m,collinear:g}=this;if(g){const C=g.indexOf(o);return C>0&&(yield g[C-1]),void(C=0&&f!==l&&f!==u;)l=f;return f}_step(o,a,l){const{inedges:u,hull:f,_hullIndex:m,halfedges:g,triangles:b,points:v}=this;if(-1===u[o]||!v.length)return(o+1)%(v.length>>1);let w=o,C=Nn(a-v[2*o],2)+Nn(l-v[2*o+1],2);const D=u[o];let T=D;do{let I=b[T];const k=Nn(a-v[2*I],2)+Nn(l-v[2*I+1],2);if(k>5<<5,D=~~Math.max(Math.abs(z+V),Math.abs(z-V))}else w=w+31>>5<<5;if(D>b&&(b=D),m+w>=rD<<5&&(m=0,g+=b,b=0),g+D>=GI)break;u.translate((m+(w>>1))/f,(g+(D>>1))/f),o.rotate&&u.rotate(o.rotate*qI),u.fillText(o.text,0,0),o.padding&&(u.lineWidth=2*o.padding,u.strokeText(o.text,0,0)),u.restore(),o.width=w,o.height=D,o.xoff=m,o.yoff=g,o.x1=w>>1,o.y1=D>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,m+=w}for(var W=u.getImageData(0,0,(rD<<5)/f,GI/f).data,Y=[];--l>=0;)if((o=a[l]).hasText){for(C=(w=o.width)>>5,D=o.y1-o.y0,T=0;T>5)]|=ce,H|=ce}H?Z=I:(o.y0++,D--,I--,g++)}o.y1=o.y0+Z,o.sprite=Y.slice(0,(o.y1-o.y0)*C)}}}function z5(i,o,a){for(var w,l=i.sprite,u=i.width>>5,f=i.x-(u<<4),m=127&f,g=32-m,b=i.y1-i.y0,v=(i.y+i.y0)*(a>>=5)+(f>>5),C=0;C>>m:0))&o[v+D])return!0;v+=a}return!1}function h7(i,o){var a=i[0],l=i[1];o.x+o.x0l.x&&(l.x=o.x+o.x1),o.y+o.y1>l.y&&(l.y=o.y+o.y1)}function V5(i,o){return i.x+i.x1>o[0].x&&i.x+i.x0o[0].y&&i.y+i.y0=V));)if(k.x=L+Z,k.y=z+te,!(k.x+k.x0<0||k.y+k.y0<0||k.x+k.x1>i[0]||k.y+k.y1>i[1])&&(!F||!z5(k,I,i[0]))&&(!F||V5(k,F))){for(var ne,ce=k.sprite,le=k.width>>5,ve=i[0]>>5,xe=k.x-(le<<4),Q=127&xe,J=32-Q,oe=k.y1-k.y0,we=(k.y+k.y0)*ve+(xe>>5),ge=0;ge>>Q:0);we+=ve}return k.sprite=null,!0}return!1}return C.layout=function(){for(var I=function D(I){I.width=I.height=1;var k=Math.sqrt(I.getContext("2d").getImageData(0,0,1,1).data.length>>2);I.width=(rD<<5)/k,I.height=GI/k;var F=I.getContext("2d");return F.fillStyle=F.strokeStyle="red",F.textAlign="center",{context:F,ratio:k}}($d()),k=function m7(i){for(var o=[],a=-1;++a>5)*i[1]),F=null,L=v.length,z=-1,V=[],U=v.map(Y=>({text:o(Y),font:a(Y),style:u(Y),weight:f(Y),rotate:m(Y),size:~~(l(Y)+1e-14),padding:g(Y),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:Y})).sort((Y,H)=>H.size-Y.size);++z>1,W.y=i[1]*(w()+.5)>>1,C_(I,W,U,z),W.hasText&&T(k,W,F)&&(V.push(W),F?h7(F,W):F=[{x:W.x+W.x0,y:W.y+W.y0},{x:W.x+W.x1,y:W.y+W.y1}],W.x-=i[0]>>1,W.y-=i[1]>>1)}return V},C.words=function(I){return arguments.length?(v=I,C):v},C.size=function(I){return arguments.length?(i=[+I[0],+I[1]],C):i},C.font=function(I){return arguments.length?(a=g0(I),C):a},C.fontStyle=function(I){return arguments.length?(u=g0(I),C):u},C.fontWeight=function(I){return arguments.length?(f=g0(I),C):f},C.rotate=function(I){return arguments.length?(m=g0(I),C):m},C.text=function(I){return arguments.length?(o=g0(I),C):o},C.spiral=function(I){return arguments.length?(b=g7[I]||I,C):b},C.fontSize=function(I){return arguments.length?(l=g0(I),C):l},C.padding=function(I){return arguments.length?(g=g0(I),C):g},C.random=function(I){return arguments.length?(w=I,C):w},C}(),i)}FP.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:U5}]},(0,N.XW)(FP,ze,{transform(i,o){i.size&&(!i.size[0]||!i.size[1])&&(0,N.vU)("Wordcloud size dimensions must be non-zero.");const l=i.modified();if(!(l||o.changed(o.ADD_REM)||_7.some(function a(I){const k=i[I];return(0,N.mf)(k)&&o.modified(k.fields)})))return;const u=o.materialize(o.SOURCE).source,f=this.value,m=i.as||U5;let b,g=i.fontSize||14;if((0,N.mf)(g)?b=i.fontSizeRange:g=(0,N.a9)(g),b){const I=g,k=Yn("sqrt")().domain((0,N.We)(u,I)).range(b);g=F=>k(I(F))}u.forEach(I=>{I[m[0]]=NaN,I[m[1]]=NaN,I[m[3]]=0});const v=f.words(u).text(i.text).size(i.size||[500,500]).padding(i.padding||1).spiral(i.spiral||"archimedean").rotate(i.rotate||0).font(i.font||"sans-serif").fontStyle(i.fontStyle||"normal").fontWeight(i.fontWeight||"normal").fontSize(g).random(oc).layout(),w=f.size(),C=w[0]>>1,D=w[1]>>1,T=v.length;for(let k,F,I=0;Inew Uint8Array(i),dK=i=>new Uint16Array(i),_0=i=>new Uint32Array(i);function oD(i,o,a){const l=(o<257?b7:o<65537?dK:_0)(i);return a&&l.set(a),l}function PP(i,o,a){const l=1<{const u=i[a],f=i[l];return uf?1:0}),function y7(i,o){return Array.from(o,a=>i[a])}(i,o)}(T,D),w)I=o,k=i,o=Array(w+C),i=_0(w+C),function X5(i,o,a,l,u,f,m,g,b){let C,v=0,w=0;for(C=0;v0)for(F=0;Fi,size:()=>a}}function XI(i){ze.call(this,function H5(){let i=8,o=[],a=_0(0),l=oD(0,i),u=oD(0,i);return{data:()=>o,seen:()=>a=function W5(i,o,a){return i.length>=o?i:((a=a||new i.constructor(o)).set(i),a)}(a,o.length),add(f){for(let v,m=0,g=o.length,b=f.length;mo.length,curr:()=>l,prev:()=>u,reset:f=>u[f]=l[f],all:()=>i<257?255:i<65537?65535:4294967295,set(f,m){l[f]|=m},clear(f,m){l[f]&=~m},resize(f,m){(f>l.length||m>i)&&(i=Math.max(m,i),l=oD(f,i,l),u=oD(f,i))}}}(),i),this._indices=null,this._dims=null}function YI(i){ze.call(this,null,i)}XI.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}}]},(0,N.XW)(XI,ze,{transform(i,o){return this._dims?i.modified("fields")||i.fields.some(l=>o.modified(l.fields))?this.reinit(i,o):this.eval(i,o):this.init(i,o)},init(i,o){const a=i.fields,l=i.query,u=this._indices={},f=this._dims=[],m=l.length;let b,v,g=0;for(;g{const f=u.remove(o,a);for(const m in l)l[m].reindex(f)})},update(i,o,a){const l=this._dims,u=i.query,f=o.stamp,m=l.length;let b,v,g=0;for(a.filters=0,v=0;vT)for(F=T,L=Math.min(C,I);FI)for(F=Math.max(C,I),L=D;FC)for(I=C,k=Math.min(v,D);ID)for(I=Math.max(v,D),k=w;Ig[w]&a?null:m[w];return f.filter(f.MOD,v),u&u-1?(f.filter(f.ADD,w=>{const C=g[w]&a;return!C&&C^b[w]&a?m[w]:null}),f.filter(f.REM,w=>{const C=g[w]&a;return!C||C^C^b[w]&a?null:m[w]})):(f.filter(f.ADD,v),f.filter(f.REM,w=>(g[w]&a)===u?m[w]:null)),f.filter(f.SOURCE,w=>v(w._index))}});const y0="Literal",K5="CallExpression";function mf(i){this.type=i}mf.prototype.visit=function(i){let o,a,l;if(i(this))return 1;for(o=function S7(i){switch(i.type){case"ArrayExpression":return i.elements;case"BinaryExpression":case"LogicalExpression":return[i.left,i.right];case K5:return[i.callee].concat(i.arguments);case"ConditionalExpression":return[i.test,i.consequent,i.alternate];case"MemberExpression":return[i.object,i.property];case"ObjectExpression":return i.properties;case"Property":return[i.key,i.value];case"UnaryExpression":return[i.argument];default:return[]}}(this),a=0,l=o.length;a",Sh[Wr]="Identifier",Sh[lu]="Keyword",Sh[ii]="Null",Sh[nd]="Numeric",Sh[Sr]="Punctuator",Sh[S_]="String",Sh[9]="RegularExpression";var id="ArrayExpression",fK="BinaryExpression",D7="CallExpression",M7="ConditionalExpression",J5="Identifier",A7="Literal",eV="LogicalExpression",ZI="MemberExpression",D_="ObjectExpression",hK="Property",T7="UnaryExpression",_a="Unexpected token %0",tV="Unexpected number",nV="Unexpected string",iV="Unexpected identifier",k7="Unexpected reserved word",aD="Unexpected end of input",Dh="Invalid regular expression",lD="Invalid regular expression: missing /",cD="Octal literals are not allowed in strict mode.",b0="Duplicate data property in object literal not allowed in strict mode",Lo="ILLEGAL",Sm="Disabled.",LP=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]"),M_=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 QI(i,o){if(!i)throw new Error("ASSERT: "+o)}function Dm(i){return i>=48&&i<=57}function JI(i){return"0123456789abcdefABCDEF".indexOf(i)>=0}function v0(i){return"01234567".indexOf(i)>=0}function I7(i){return 32===i||9===i||11===i||12===i||160===i||i>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0}function x0(i){return 10===i||13===i||8232===i||8233===i}function uD(i){return 36===i||95===i||i>=65&&i<=90||i>=97&&i<=122||92===i||i>=128&&LP.test(String.fromCharCode(i))}function dD(i){return 36===i||95===i||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||92===i||i>=128&&M_.test(String.fromCharCode(i))}const O7={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 rV(){for(;Ge1114111||"}"!==i)&&rr({},_a,Lo),o<=65535?String.fromCharCode(o):String.fromCharCode(55296+(o-65536>>10),56320+(o-65536&1023))}function BP(){var i,o;for(i=Zt.charCodeAt(Ge++),o=String.fromCharCode(i),92===i&&(117!==Zt.charCodeAt(Ge)&&rr({},_a,Lo),++Ge,(!(i=$P("u"))||"\\"===i||!uD(i.charCodeAt(0)))&&rr({},_a,Lo),o=i);Ge>>="===(m=Zt.substr(Ge,4))?{type:Sr,value:m,start:i,end:Ge+=4}:">>>"===(f=m.substr(0,3))||"<<="===f||">>="===f?{type:Sr,value:f,start:i,end:Ge+=3}:l===(u=f.substr(0,2))[1]&&"+-<>&|".indexOf(l)>=0||"=>"===u?{type:Sr,value:u,start:i,end:Ge+=2}:("//"===u&&rr({},_a,Lo),"<>=!+-*%&|^/".indexOf(l)>=0?(++Ge,{type:Sr,value:l,start:i,end:Ge}):void rr({},_a,Lo))}function N7(){var i,o,a;if(QI(Dm((a=Zt[Ge]).charCodeAt(0))||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),o=Ge,i="","."!==a){if(i=Zt[Ge++],a=Zt[Ge],"0"===i){if("x"===a||"X"===a)return++Ge,function pK(i){let o="";for(;Ge=ll)return{type:sD,start:Ge,end:Ge};const i=Zt.charCodeAt(Ge);return uD(i)?function R7(){var i,o;return i=Ge,o=92===Zt.charCodeAt(Ge)?BP():function oV(){var i,o;for(i=Ge++;Ge=0&&Ge(QI(m=0&&rr({},Dh,a),{value:a,literal:o}}(),l=function gK(i,o){let a=i;o.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,(l,u)=>{if(parseInt(u,16)<=1114111)return"x";rr({},Dh)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(a)}catch{rr({},Dh)}try{return new RegExp(i,o)}catch{return null}}(o.value,a.value),{literal:o.literal+a.literal,value:l,regex:{pattern:o.value,flags:a.value},start:i,end:Ge}}()),lV()):eO(jl())}return a}function CK(){const i=[];if(Ul("("),!or(")"))for(;Ge":case"<=":case">=":case"instanceof":case"in":o=7;break;case"<<":case">>":case">>>":o=8;break;case"+":case"-":o=9;break;case"*":case"/":case"%":o=11}return o}function A_(){var i,o;return i=function hV(){var i,o,a,l,u,f,m,g,b,v;if(i=Cn,b=mD(),0===(u=HP(l=Cn)))return b;for(l.prec=u,jl(),o=[i,Cn],f=[b,l,m=mD()];(u=HP(Cn))>0;){for(;f.length>2&&u<=f[f.length-2].prec;)m=f.pop(),g=f.pop().value,b=f.pop(),o.pop(),a=cV(g,b,m),f.push(a);(l=jl()).prec=u,f.push(l),o.push(Cn),a=mD(),f.push(a)}for(a=f[v=f.length-1],o.pop();v>1;)o.pop(),a=cV(f[v-1].value,f[v-2],a),v-=2;return a}(),or("?")&&(jl(),o=A_(),Ul(":"),i=function uV(i,o,a){const l=new mf(M7);return l.test=i,l.consequent=o,l.alternate=a,l}(i,o,A_())),i}function tO(){const i=A_();if(or(","))throw new Error(Sm);return i}function gD(i){Ge=0,ll=(Zt=i).length,Cn=null,lV();const o=tO();if(Cn.type!==sD)throw new Error("Unexpect token after expression.");return o}var pV={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 mV(i){function a(m,g,b){return v=>function o(m,g,b,v){let w=i(g[0]);return b&&(w=b+"("+w+")",0===b.lastIndexOf("new ",0)&&(w="("+w+")")),w+"."+m+(v<0?"":0===v?"()":"("+g.slice(1).map(i).join(",")+")")}(m,v,g,b)}const l="new Date",u="String",f="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(m){m.length<3&&(0,N.vU)("Missing arguments to clamp function."),m.length>3&&(0,N.vU)("Too many arguments to clamp function.");const g=m.map(i);return"Math.max("+g[1]+", Math.min("+g[2]+","+g[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:l,date:a("getDate",l,0),day:a("getDay",l,0),year:a("getFullYear",l,0),month:a("getMonth",l,0),hours:a("getHours",l,0),minutes:a("getMinutes",l,0),seconds:a("getSeconds",l,0),milliseconds:a("getMilliseconds",l,0),time:a("getTime",l,0),timezoneoffset:a("getTimezoneOffset",l,0),utcdate:a("getUTCDate",l,0),utcday:a("getUTCDay",l,0),utcyear:a("getUTCFullYear",l,0),utcmonth:a("getUTCMonth",l,0),utchours:a("getUTCHours",l,0),utcminutes:a("getUTCMinutes",l,0),utcseconds:a("getUTCSeconds",l,0),utcmilliseconds:a("getUTCMilliseconds",l,0),length:a("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:a("toUpperCase",u,0),lower:a("toLowerCase",u,0),substring:a("substring",u),split:a("split",u),trim:a("trim",u,0),regexp:f,test:a("test",f),if:function(m){m.length<3&&(0,N.vU)("Missing arguments to if function."),m.length>3&&(0,N.vU)("Too many arguments to if function.");const g=m.map(i);return"("+g[0]+"?"+g[1]+":"+g[2]+")"}}}function gV(i){const o=(i=i||{}).allowed?(0,N.Rg)(i.allowed):{},a=i.forbidden?(0,N.Rg)(i.forbidden):{},l=i.constants||pV,u=(i.functions||mV)(C),f=i.globalvar,m=i.fieldvar,g=(0,N.mf)(f)?f:I=>`${f}["${I}"]`;let b={},v={},w=0;function C(I){if((0,N.HD)(I))return I;const k=D[I.type];return null==k&&(0,N.vU)("Unsupported type: "+I.type),k(I)}const D={Literal:I=>I.raw,Identifier:I=>{const k=I.name;return w>0?k:(0,N.nr)(a,k)?(0,N.vU)("Illegal identifier: "+k):(0,N.nr)(l,k)?l[k]:(0,N.nr)(o,k)?k:(b[k]=1,g(k))},MemberExpression:I=>{const k=!I.computed,F=C(I.object);k&&(w+=1);const L=C(I.property);return F===m&&(v[function j7(i){const o=i&&i.length-1;return o&&('"'===i[0]&&'"'===i[o]||"'"===i[0]&&"'"===i[o])?i.slice(1,-1):i}(L)]=1),k&&(w-=1),F+(k?"."+L:"["+L+"]")},CallExpression:I=>{"Identifier"!==I.callee.type&&(0,N.vU)("Illegal callee type: "+I.callee.type);const k=I.callee.name,F=I.arguments,L=(0,N.nr)(u,k)&&u[k];return L||(0,N.vU)("Unrecognized function: "+k),(0,N.mf)(L)?L(F):L+"("+F.map(C).join(",")+")"},ArrayExpression:I=>"["+I.elements.map(C).join(",")+"]",BinaryExpression:I=>"("+C(I.left)+" "+I.operator+" "+C(I.right)+")",UnaryExpression:I=>"("+I.operator+C(I.argument)+")",ConditionalExpression:I=>"("+C(I.test)+"?"+C(I.consequent)+":"+C(I.alternate)+")",LogicalExpression:I=>"("+C(I.left)+I.operator+C(I.right)+")",ObjectExpression:I=>"{"+I.properties.map(C).join(",")+"}",Property:I=>{w+=1;const k=C(I.key);return w-=1,k+":"+C(I.value)}};function T(I){const k={code:C(I),globals:Object.keys(b),fields:Object.keys(v)};return b={},v={},k}return T.functions=u,T.constants=l,T}var U7,Mh,r1,qP,o1,nO=new pa,WP=new pa,Dr={point:Us,lineStart:Us,lineEnd:Us,polygonStart:function(){nO=new pa,Dr.lineStart=s1,Dr.lineEnd=AK},polygonEnd:function(){var i=+nO;WP.add(i<0?Ol+i:i),this.lineStart=this.lineEnd=this.point=Us},sphere:function(){WP.add(Ol)}};function s1(){Dr.point=H7}function AK(){_V(U7,Mh)}function H7(i,o){Dr.point=_V,U7=i,Mh=o,r1=i*=pi,qP=vn(o=(o*=pi)/2+Dw),o1=fn(o)}function _V(i,o){var a=(i*=pi)-r1,l=a>=0?1:-1,u=l*a,f=vn(o=(o*=pi)/2+Dw),m=fn(o),g=o1*m,b=qP*f+g*vn(u),v=g*l*fn(u);nO.add(ma(v,b)),r1=i,qP=f,o1=m}var So,Dc,$o,Fa,T_,yV,bV,a1,_D,gf,_f,cu={point:GP,lineStart:l1,lineEnd:oO,polygonStart:function(){cu.point=vV,cu.lineStart=W7,cu.lineEnd=TK,_D=new pa,Dr.polygonStart()},polygonEnd:function(){Dr.polygonEnd(),cu.point=GP,cu.lineStart=l1,cu.lineEnd=oO,nO<0?(So=-($o=180),Dc=-(Fa=90)):_D>bn?Fa=90:_D<-bn&&(Dc=-90),_f[0]=So,_f[1]=$o},sphere:function(){So=-($o=180),Dc=-(Fa=90)}};function GP(i,o){gf.push(_f=[So=i,$o=i]),oFa&&(Fa=o)}function rO(i,o){var a=Ow([i*pi,o*pi]);if(a1){var l=Rw(a1,a),f=Rw([l[1],-l[0],0],l);Yk(f),f=Iw(f);var v,m=i-T_,g=m>0?1:-1,b=f[0]*ts*g,w=Vi(m)>180;w^(g*T_Fa&&(Fa=v):w^(g*T_<(b=(b+360)%360-180)&&bFa&&(Fa=o)),w?iuu(So,$o)&&($o=i):uu(i,$o)>uu(So,$o)&&(So=i):$o>=So?(i$o&&($o=i)):i>T_?uu(So,i)>uu(So,$o)&&($o=i):uu(i,$o)>uu(So,$o)&&(So=i)}else gf.push(_f=[So=i,$o=i]);oFa&&(Fa=o),a1=a,T_=i}function l1(){cu.point=rO}function oO(){_f[0]=So,_f[1]=$o,cu.point=GP,a1=null}function vV(i,o){if(a1){var a=i-T_;_D.add(Vi(a)>180?a+(a>0?360:-360):a)}else yV=i,bV=o;Dr.point(i,o),rO(i,o)}function W7(){Dr.lineStart()}function TK(){vV(yV,bV),Dr.lineEnd(),Vi(_D)>bn&&(So=-($o=180)),_f[0]=So,_f[1]=$o,a1=null}function uu(i,o){return(o-=i)<0?o+360:o}function XP(i,o){return i[0]-o[0]}function yD(i,o){return i[0]<=i[1]?i[0]<=o&&o<=i[1]:oo.indexOf(a)>=0):o},R_union:function(i,o){var a=(0,N.He)(o[0]),l=(0,N.He)(o[1]);return a>l&&(a=o[1],l=o[0]),i.length?(i[0]>a&&(i[0]=a),i[1]l&&(a=o[1],l=o[0]),i.length?ll&&(i[1]=l),i):[a,l]}};function OV(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to selection functions must be a string literal.");const u=o[0].value,m="unit",g="@"+m,b=":"+u;(o.length>=2&&(0,N.fj)(o).value)===wD&&!(0,N.nr)(l,g)&&(l[g]=a.getData(u).indataRef(a,m)),(0,N.nr)(l,b)||(l[b]=a.getData(u).tuplesRef())}function Z7(i){const o=this.context.data[i];return o?o.values.value:[]}const Tm=i=>function(o,a){return this.context.dataflow.locale()[i](a)(o)},RV=Tm("format"),Q7=Tm("timeFormat"),jK=Tm("utcFormat"),J7=Tm("timeParse"),UK=Tm("utcParse"),S0=new Date(2e3,0,1);function mO(i,o,a){return Number.isInteger(i)&&Number.isInteger(o)?(S0.setYear(2e3),S0.setMonth(i),S0.setDate(o),Q7.call(this,S0,a)):""}const eL="%",NV="$";function tL(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to data functions must be a string literal.");const u=o[0].value,f=":"+u;if(!(0,N.nr)(f,l))try{l[f]=a.getData(u).tuplesRef()}catch{}}function ul(i,o,a,l){if(o[0].type===y0)yO(a,l,o[0].value);else for(i in a.scales)yO(a,l,i)}function yO(i,o,a){const l=eL+a;if(!(0,N.nr)(o,l))try{o[l]=i.scaleRef(a)}catch{}}function yf(i,o){if((0,N.mf)(i))return i;if((0,N.HD)(i)){const a=o.scales[i];return a&&function Lg(i){return i&&!0===i[Up]}(a.value)?a.value:void 0}}function FV(i,o){return function(a,l,u){if(a){const f=yf(a,(u||this).context);return f&&f.path[i](l)}return o(l)}}const qK=FV("area",function iO(i){return WP=new pa,vh(i,Dr),2*WP}),GK=FV("bounds",function xV(i){var o,a,l,u,f,m,g;if(Fa=$o=-(So=Dc=1/0),gf=[],vh(i,cu),a=gf.length){for(gf.sort(XP),o=1,f=[l=gf[0]];ouu(l[0],l[1])&&(l[1]=u[1]),uu(u[0],l[1])>uu(l[0],l[1])&&(l[0]=u[0])):f.push(l=u);for(m=-1/0,o=0,l=f[a=f.length-1];o<=a;l=u,++o)(g=uu(l[1],(u=f[o])[0]))>m&&(m=g,So=u[0],$o=l[1])}return gf=_f=null,So===1/0||Dc===1/0?[[NaN,NaN],[NaN,NaN]]:[[So,Dc],[$o,Fa]]}),XK=FV("centroid",function C0(i){bD=YP=sO=aO=w0=lO=cO=uO=0,wV=new pa,c1=new pa,KP=new pa,vh(i,du);var o=+wV,a=+c1,l=+KP,u=gS(o,a,l);return us9(i,o)}const l9={};function zV(i){return(0,N.kJ)(i)||ArrayBuffer.isView(i)?i:null}function VV(i){return zV(i)||((0,N.HD)(i)?i:null)}const c9=i=>i.data;function u9(i,o){const a=Z7.call(o,i);return a.root&&a.root.lookup||{}}const h9=()=>typeof window<"u"&&window||null;function p9(i,o,a){if(!i)return[];const[l,u]=i,f=(new Fo).set(l[0],l[1],u[0],u[1]);return tN(a||this.context.dataflow.scenegraph().root,f,function EZ(i){let o=null;if(i){const a=(0,N.IX)(i.marktype),l=(0,N.IX)(i.markname);o=u=>(!a.length||a.some(f=>u.marktype===f))&&(!l.length||l.some(f=>u.name===f))}return o}(o))}const bO={random:()=>oc(),cumulativeNormal:sc,cumulativeLogNormal:Hc,cumulativeUniform:Wf,densityNormal:Xa,densityLogNormal:kv,densityUniform:op,quantileNormal:ao,quantileLogNormal:Ed,quantileUniform:cE,sampleNormal:my,sampleLogNormal:Tv,sampleUniform:gy,isArray:N.kJ,isBoolean:N.jn,isDate:N.J_,isDefined:i=>void 0!==i,isNumber:N.hj,isObject:N.Kn,isRegExp:N.Kj,isString:N.HD,isTuple:ly,isValid:i=>null!=i&&i==i,toBoolean:N.sw,toDate:i=>(0,N.ZU)(i),toNumber:N.He,toString:N.BB,indexof:function oZ(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l1?o-1:0),l=1;l1?o-1:0),l=1;l1?o-1:0),l=1;l(0,N.We)(i),inScope:function YK(i){const o=this.context.group;let a=!1;if(o)for(;i;){if(i===o){a=!0;break}i=i.mark.group}return a},intersect:p9,clampRange:N.l$,pinchDistance:function tZ(i){const o=i.touches;return Math.hypot(o[0].clientX-o[1].clientX,o[0].clientY-o[1].clientY)},pinchAngle:function nZ(i){const o=i.touches;return Math.atan2(o[0].clientY-o[1].clientY,o[0].clientX-o[1].clientX)},screen:function vZ(){const i=h9();return i?i.screen:{}},containerSize:function wZ(){const i=this.context.dataflow,o=i.container&&i.container();return o?[o.clientWidth,o.clientHeight]:[void 0,void 0]},windowSize:function xZ(){const i=h9();return i?[i.innerWidth,i.innerHeight]:[void 0,void 0]},bandspace:function uZ(i,o,a){return DC(i||0,o||0,a||0)},setdata:function zK(i,o){const a=this.context.dataflow;return a.pulse(this.context.data[i].input,a.changeset().remove(N.yb).insert(o)),1},pathShape:function bZ(i){let o=null;return function(a){return a?xb(a,o=o||Gp(i)):i}},panLinear:N.Dw,panLog:N.mJ,panPow:N.QA,panSymlog:N.Zw,zoomLinear:N.ay,zoomLog:N.dH,zoomPow:N.mK,zoomSymlog:N.bV,encode:function VK(i,o,a){if(i){const l=this.context.dataflow;l.pulse(i.mark.source,l.changeset().encode(i,o))}return void 0!==a?a:i},modify:function BV(i,o,a,l,u,f){const m=this.context.dataflow,g=this.context.data[i],b=g.input,v=m.stamp();let C,D,w=g.changes;if(!1===m._trigger||!(b.value.length||o||l))return 0;if((!w||w.stamp{g.modified=!0,m.pulse(b,w).run()},!0,1)),a&&(C=!0===a?N.yb:(0,N.kJ)(a)||ly(a)?a:a9(a),w.remove(C)),o&&w.insert(o),l&&(C=a9(l),b.value.some(C)?w.remove(C):w.insert(l)),u)for(D in f)w.modify(u,D,f[D]);return 1},lassoAppend:function CZ(i,o,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const u=(i=(0,N.IX)(i))[i.length-1];return void 0===u||Math.hypot(u[0]-o,u[1]-a)>l?[...i,[o,a]]:i},lassoPath:function SZ(i){return(0,N.IX)(i).reduce((o,a,l)=>{let[u,f]=a;return o+(0==l?`M ${u},${f} `:l===i.length-1?" Z":`L ${u},${f} `)},"")},intersectLasso:function DZ(i,o,a){const{x:l,y:u,mark:f}=a,m=(new Fo).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[b,v]of o)bm.x2&&(m.x2=b),vm.y2&&(m.y2=v);return m.translate(l,u),p9([[m.x1,m.y1],[m.x2,m.y2]],i,f).filter(b=>function MZ(i,o,a){let l=0;for(let u=0,f=a.length-1;uo!=g>o&&i<(m-b)*(o-v)/(g-v)+b&&l++}return 1&l}(b.x,b.y,o))}},AZ=["view","item","group","xy","x","y"],m9="this.",jV={},g9={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:i=>`_[${(0,N.m8)(NV+i)}]`,functions:function kZ(i){const o=mV(i);AZ.forEach(a=>o[a]="event.vega."+a);for(const a in bO)o[a]=m9+a;return(0,N.l7)(o,function nL(i,o,a){o.__bandwidth=u=>u&&u.bandwidth?u.bandwidth():0,a._bandwidth=ul,a._range=ul,a._scale=ul;const l=u=>"_["+(u.type===y0?(0,N.m8)(eL+u.value):(0,N.m8)(eL)+"+"+i(u))+"]";return{_bandwidth:u=>`this.__bandwidth(${l(u[0])})`,_range:u=>`${l(u[0])}.range()`,_scale:u=>`${l(u[0])}(${i(u[1])})`}}(i,bO,jV)),o},constants:pV,visitors:jV},UV=gV(g9);function xs(i,o,a){return 1===arguments.length?bO[i]:(bO[i]=o,a&&(jV[i]=a),UV&&(UV.functions[i]=m9+i),this)}function km(i,o){const a={};let l;try{l=gD(i=(0,N.HD)(i)?i:(0,N.m8)(i)+"")}catch{(0,N.vU)("Expression parse error: "+i)}l.visit(f=>{if(f.type!==K5)return;const m=f.callee.name,g=g9.visitors[m];g&&g(m,f.arguments,o,a)});const u=UV(l);return u.globals.forEach(f=>{const m=NV+f;!(0,N.nr)(a,m)&&o.getSignal(f)&&(a[m]=o.signalRef(f))}),{$expr:(0,N.l7)({code:u.code},o.options.ast?{ast:l}:null),$fields:u.fields,$params:a}}xs("bandwidth",function dZ(i,o){const a=yf(i,(o||this).context);return a&&a.bandwidth?a.bandwidth():0},ul),xs("copy",function fZ(i,o){const a=yf(i,(o||this).context);return a?a.copy():void 0},ul),xs("domain",function hZ(i,o){const a=yf(i,(o||this).context);return a?a.domain():[]},ul),xs("range",function mZ(i,o){const a=yf(i,(o||this).context);return a&&a.range?a.range():[]},ul),xs("invert",function pZ(i,o,a){const l=yf(i,(a||this).context);return l?(0,N.kJ)(o)?(l.invertRange||l.invert)(o):(l.invert||l.invertExtent)(o):void 0},ul),xs("scale",function gZ(i,o,a){const l=yf(i,(a||this).context);return l?l(o):void 0},ul),xs("gradient",function _Z(i,o,a,l,u){i=yf(i,(u||this).context);const f=qp(o,a);let m=i.domain(),g=m[0],b=(0,N.fj)(m),v=N.yR;return b-g?v=Qo(i,g,b):i=(i.interpolator?Yn("sequential")().interpolator(i.interpolator()):Yn("linear")().interpolate(i.interpolate()).range(i.range())).domain([g=0,b=1]),i.ticks&&(m=i.ticks(+l||15),g!==m[0]&&m.unshift(g),b!==(0,N.fj)(m)&&m.push(b)),m.forEach(w=>f.stop(v(w),i(w))),f},ul),xs("geoArea",qK,ul),xs("geoBounds",GK,ul),xs("geoCentroid",XK,ul),xs("geoShape",function yZ(i,o,a){const l=yf(i,(a||this).context);return function(u){return l?l.path.context(u)(o):""}},ul),xs("geoScale",function i9(i,o){const a=yf(i,(o||this).context);return a&&a.scale()},ul),xs("indata",function BK(i,o,a){const l=this.context.data[i]["index:"+o],u=l?l.value.get(a):void 0;return u&&u.count},function n9(i,o,a,l){o[0].type!==y0&&(0,N.vU)("First argument to indata must be a string literal."),o[1].type!==y0&&(0,N.vU)("Second argument to indata must be a string literal.");const u=o[0].value,f=o[1].value,m="@"+f;(0,N.nr)(m,l)||(l[m]=a.getData(u).indataRef(a,f))}),xs("data",Z7,tL),xs("treePath",function d9(i,o,a){const l=u9(i,this),u=l[o],f=l[a];return u&&f?u.path(f).map(c9):void 0},tL),xs("treeAncestors",function f9(i,o){const a=u9(i,this)[o];return a?a.ancestors().map(c9):void 0},tL),xs("vlSelectionTest",function FK(i,o,a){for(var v,w,C,D,T,l=this.context.data[i],u=l?l.values.value:[],f=l?l[JP]&&l[JP].value:void 0,m=a===wD,g=u.length,b=0;b(H[w[te].field]=Z,H),{}))}else T=Th,I=rd(v),(F=(k=m[T]||(m[T]={}))[D]||(k[D]=[])).push(I),a&&(F=g[D]||(g[D]=[])).push({[Th]:I});return o=o||"union",m[Th]?m[Th]=IV[`${Th}_${o}`](...Object.values(m[Th])):Object.keys(m).forEach(H=>{m[H]=Object.keys(m[H]).map(Z=>m[H][Z]).reduce((Z,te)=>void 0===Z?te:IV[`${b[H]}_${o}`](Z,te))}),f=Object.keys(g),a&&f.length&&(m[l?"vlPoint":"vlMulti"]="union"===o?{or:f.reduce((Z,te)=>(Z.push(...g[te]),Z),[])}:{and:f.map(Z=>({or:g[Z]}))}),m},OV),xs("vlSelectionTuples",function pO(i,o){return i.map(a=>(0,N.l7)(o.fields?{values:o.fields.map(l=>AV(l)(a.datum))}:{[Th]:rd(a.datum)},o))});const OZ=(0,N.Rg)(["rule"]),_9=(0,N.Rg)(["group","image","rect"]);function HV(i){return(i+"").toLowerCase()}function vO(i,o,a){a.endsWith(";")||(a="return("+a+");");const l=Function(...o.concat(a));return i&&i.functions?l.bind(i.functions):l}var LZ={operator:(i,o)=>vO(i,["_"],o.code),parameter:(i,o)=>vO(i,["datum","_"],o.code),event:(i,o)=>vO(i,["event"],o.code),handler:(i,o)=>vO(i,["_","event"],`var datum=event.item&&event.item.datum;return ${o.code};`),encode:(i,o)=>{const{marktype:a,channels:l}=o;let u="var o=item,datum=o.datum,m=0,$;";for(const f in l){const m="o["+(0,N.m8)(f)+"]";u+=`$=${l[f].code};if(${m}!==$)${m}=$,m=1;`}return u+=function RZ(i,o){let a="";return OZ[o]||(i.x2&&(i.x?(_9[o]&&(a+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),a+="o.width=o.x2-o.x;"):a+="o.x=o.x2-(o.width||0);"),i.xc&&(a+="o.x=o.xc-(o.width||0)/2;"),i.y2&&(i.y?(_9[o]&&(a+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),a+="o.height=o.y2-o.y;"):a+="o.y=o.y2-(o.height||0);"),i.yc&&(a+="o.y=o.yc-(o.height||0)/2;")),a}(l,a),u+="return m;",vO(i,["item","_"],u)},codegen:{get(i){const o=`[${i.map(N.m8).join("][")}]`,a=Function("_",`return _${o};`);return a.path=o,a},comparator(i,o){let a;const u=Function("a","b","var u, v; return "+i.map((f,m)=>{const g=o[m];let b,v;return f.path?(b=`a${f.path}`,v=`b${f.path}`):((a=a||{})["f"+m]=f,b=`this.f${m}(a)`,v=`this.f${m}(b)`),function PZ(i,o,a,l){return`((u = ${i}) < (v = ${o}) || u == null) && v != null ? ${a}\n : (u > v || v == null) && u != null ? ${l}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${a}\n : v !== v && u === u ? ${l} : `}(b,v,-g,g)}).join("")+"0;");return a?u.bind(a):u}}};function y9(i,o,a){if(!i||!(0,N.Kn)(i))return i;for(let f,l=0,u=b9.length;lu&&u.$tupleid?Kt:u);return o.fn[a]||(o.fn[a]=(0,N.qu)(l,i.$order,o.expr.codegen))}},{key:"$context",parse:function GZ(i,o){return o}},{key:"$subflow",parse:function XZ(i,o){const a=i.$subflow;return function(l,u,f){const m=o.fork().parse(a),g=m.get(a.operators[0].id),b=m.signals.parent;return b&&b.set(f),g.detachSubflow=()=>o.detach(m),g}}},{key:"$tupleid",parse:function YZ(){return Kt}}];const QZ={skip:!0};function v9(i,o,a,l){return new x9(i,o,a,l)}function x9(i,o,a,l){this.dataflow=i,this.transforms=o,this.events=i.events.bind(i),this.expr=l||LZ,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},a&&(this.functions=Object.create(a),this.functions.context=this)}function w9(i){this.dataflow=i.dataflow,this.transforms=i.transforms,this.events=i.events,this.expr=i.expr,this.signals=Object.create(i.signals),this.scales=Object.create(i.scales),this.nodes=Object.create(i.nodes),this.data=Object.create(i.data),this.fn=Object.create(i.fn),i.functions&&(this.functions=Object.create(i.functions),this.functions.context=this)}function kh(i,o){i&&(null==o?i.removeAttribute("aria-label"):i.setAttribute("aria-label",o))}x9.prototype=w9.prototype={fork(){const i=new w9(this);return(this.subcontext||(this.subcontext=[])).push(i),i},detach(i){this.subcontext=this.subcontext.filter(a=>a!==i);const o=Object.keys(i.nodes);for(const a of o)i.nodes[a]._targets=null;for(const a of o)i.nodes[a].detach();i.nodes=null},get(i){return this.nodes[i]},set(i,o){return this.nodes[i]=o},add(i,o){const a=this,l=a.dataflow,u=i.value;if(a.set(i.id,o),function FZ(i){return"collect"===HV(i)}(i.type)&&u&&(u.$ingest?l.ingest(o,u.$ingest,u.$format):u.$request?l.preload(o,u.$request,u.$format):l.pulse(o,l.changeset().insert(u))),i.root&&(a.root=o),i.parent){let f=a.get(i.parent.$ref);f?(l.connect(f,[o]),o.targets().add(f)):(a.unresolved=a.unresolved||[]).push(()=>{f=a.get(i.parent.$ref),l.connect(f,[o]),o.targets().add(f)})}if(i.signal&&(a.signals[i.signal]=o),i.scale&&(a.scales[i.scale]=o),i.data)for(const f in i.data){const m=a.data[f]||(a.data[f]={});i.data[f].forEach(g=>m[g]=o)}},resolve(){return(this.unresolved||[]).forEach(i=>i()),delete this.unresolved,this},operator(i,o){this.add(i,this.dataflow.add(i.value,o))},transform(i,o){this.add(i,this.dataflow.add(this.transforms[HV(o)]))},stream(i,o){this.set(i.id,o)},update(i,o,a,l,u){this.dataflow.on(o,a,l,u,i.options)},operatorExpression(i){return this.expr.operator(this,i)},parameterExpression(i){return this.expr.parameter(this,i)},eventExpression(i){return this.expr.event(this,i)},handlerExpression(i){return this.expr.handler(this,i)},encodeExpression(i){return this.expr.encode(this,i)},parse:function IZ(i){const o=this,a=i.operators||[];return i.background&&(o.background=i.background),i.eventConfig&&(o.eventConfig=i.eventConfig),i.locale&&(o.locale=i.locale),a.forEach(l=>o.parseOperator(l)),a.forEach(l=>o.parseOperatorParameters(l)),(i.streams||[]).forEach(l=>o.parseStream(l)),(i.updates||[]).forEach(l=>o.parseUpdate(l)),o.resolve()},parseOperator:function $Z(i){const o=this;!function NZ(i){return"operator"===HV(i)}(i.type)&&i.type?o.transform(i,i.type):o.operator(i,i.update?o.operatorExpression(i.update):null)},parseOperatorParameters:function BZ(i){const o=this;if(i.params){const a=o.get(i.id);a||(0,N.vU)("Invalid operator id: "+i.id),o.dataflow.connect(a,a.parameters(o.parseParameters(i.params),i.react,i.initonly))}},parseParameters:function zZ(i,o){o=o||{};const a=this;for(const l in i){const u=i[l];o[l]=(0,N.kJ)(u)?u.map(f=>y9(f,a,o)):y9(u,a,o)}return o},parseStream:function KZ(i){var u,o=this,a=null!=i.filter?o.eventExpression(i.filter):void 0,l=null!=i.stream?o.get(i.stream):void 0;i.source?l=o.events(i.source,i.type,a):i.merge&&(l=(u=i.merge.map(f=>o.get(f)))[0].merge.apply(u[0],u.slice(1))),i.between&&(u=i.between.map(f=>o.get(f)),l=l.between(u[0],u[1])),i.filter&&(l=l.filter(a)),null!=i.throttle&&(l=l.throttle(+i.throttle)),null!=i.debounce&&(l=l.debounce(+i.debounce)),null==l&&(0,N.vU)("Invalid stream definition: "+JSON.stringify(i)),i.consume&&l.consume(!0),o.stream(i,l)},parseUpdate:function ZZ(i){var u,o=this,a=(0,N.Kn)(a=i.source)?a.$ref:a,l=o.get(a),f=i.update,m=void 0;l||(0,N.vU)("Source not defined: "+i.source),u=i.target&&i.target.$expr?o.eventExpression(i.target.$expr):o.get(i.target),f&&f.$expr&&(f.$params&&(m=o.parseParameters(f.$params)),f=o.handlerExpression(f.$expr)),o.update(i,l,u,f,m)},getState:function JZ(i){var o=this,a={};if(i.signals){var l=a.signals={};Object.keys(o.signals).forEach(f=>{const m=o.signals[f];i.signals(f,m)&&(l[f]=m.value)})}if(i.data){var u=a.data={};Object.keys(o.data).forEach(f=>{const m=o.data[f];i.data(f,m)&&(u[f]=m.input.value)})}return o.subcontext&&!1!==i.recurse&&(a.subcontext=o.subcontext.map(f=>f.getState(i))),a},setState:function eQ(i){var o=this,a=o.dataflow,l=i.data,u=i.signals;Object.keys(u||{}).forEach(f=>{a.update(o.signals[f],u[f],QZ)}),Object.keys(l||{}).forEach(f=>{a.pulse(o.data[f].input,a.changeset().remove(N.yb).insert(l[f]))}),(i.subcontext||[]).forEach((f,m)=>{const g=o.subcontext[m];g&&g.setState(f)})}};const SD="default";function WV(i,o){const a=i.globalCursor()?typeof document<"u"&&document.body:i.container();if(a)return null==o?a.style.removeProperty("cursor"):a.style.cursor=o}function xO(i,o){var a=i._runtime.data;return(0,N.nr)(a,o)||(0,N.vU)("Unrecognized data set: "+o),a[o]}function DD(i,o){z2(o)||(0,N.vU)("Second argument to changes must be a changeset.");const a=xO(this,i);return a.modified=!0,this.pulse(a.input,o)}function qV(i){var o=i.padding();return Math.max(0,i._viewWidth+o.left+o.right)}function S9(i){var o=i.padding();return Math.max(0,i._viewHeight+o.top+o.bottom)}function iL(i){var o=i.padding(),a=i._origin;return[o.left+a[0],o.top+a[1]]}const T9={trap:!1};function d1(i,o,a,l){i._eventListeners.push({type:a,sources:(0,N.IX)(o),handler:l})}function MD(i,o,a){const l=i._eventConfig&&i._eventConfig[o];return!(!1===l||(0,N.Kn)(l)&&!l[a])||(i.warn(`Blocked ${o} ${a} event listener.`),!1)}function ZV(i){return i.item}function AD(i){return i.item.mark.source}function Wl(i){return function(o,a){return a.vega.view().changeset().encode(a.item,i)}}function Ys(i,o,a){const l=document.createElement(i);for(const u in o)l.setAttribute(u,o[u]);return null!=a&&(l.textContent=a),l}const I9="vega-bind",O9="vega-bind-name",R9="vega-bind-radio";function N9(i,o,a){if(!o)return;const l=a.param;let u=a.state;return u||(u=a.state={elements:null,active:!1,set:null,update:m=>{m!=i.signal(l.signal)&&i.runAsync(null,()=>{u.source=!0,i.signal(l.signal,m)})}},l.debounce&&(u.update=(0,N.Ds)(l.debounce,u.update))),(null==l.input&&l.element?JV:ej)(u,o,l,i),u.active||(i.on(i._signals[l.signal],null,()=>{u.source?u.source=!1:u.set(i.signal(l.signal))}),u.active=!0),u}function JV(i,o,a,l){const u=a.event||"input",f=()=>i.update(o.value);l.signal(a.signal,o.value),o.addEventListener(u,f),d1(l,o,u,f),i.set=m=>{o.value=m,o.dispatchEvent(function iQ(i){return typeof Event<"u"?new Event(i):{type:i}}(u))}}function ej(i,o,a,l){const u=l.signal(a.signal),f=Ys("div",{class:I9}),m="radio"===a.input?f:f.appendChild(Ys("label"));m.appendChild(Ys("span",{class:O9},a.name||a.signal)),o.appendChild(f);let g=F9;switch(a.input){case"checkbox":g=tj;break;case"select":g=nj;break;case"radio":g=rQ;break;case"range":g=P9}g(i,m,a,u)}function F9(i,o,a,l){const u=Ys("input");for(const f in a)"signal"!==f&&"element"!==f&&u.setAttribute("input"===f?"type":f,a[f]);u.setAttribute("name",a.signal),u.value=l,o.appendChild(u),u.addEventListener("input",()=>i.update(u.value)),i.elements=[u],i.set=f=>u.value=f}function tj(i,o,a,l){const u={type:"checkbox",name:a.signal};l&&(u.checked=!0);const f=Ys("input",u);o.appendChild(f),f.addEventListener("change",()=>i.update(f.checked)),i.elements=[f],i.set=m=>f.checked=!!m||null}function nj(i,o,a,l){const u=Ys("select",{name:a.signal}),f=a.labels||[];a.options.forEach((m,g)=>{const b={value:m};rL(m,l)&&(b.selected=!0),u.appendChild(Ys("option",b,(f[g]||m)+""))}),o.appendChild(u),u.addEventListener("change",()=>{i.update(a.options[u.selectedIndex])}),i.elements=[u],i.set=m=>{for(let g=0,b=a.options.length;g{const b={type:"radio",name:a.signal,value:m};rL(m,l)&&(b.checked=!0);const v=Ys("input",b);v.addEventListener("change",()=>i.update(m));const w=Ys("label",{},(f[g]||m)+"");return w.prepend(v),u.appendChild(w),v}),i.set=m=>{const g=i.elements,b=g.length;for(let v=0;v{b.textContent=g.value,i.update(+g.value)};g.addEventListener("input",v),g.addEventListener("change",v),i.elements=[g],i.set=w=>{g.value=w,b.textContent=w}}function rL(i,o){return i===o||i+""==o+""}function ij(i,o,a,l,u,f){return(o=o||new l(i.loader())).initialize(a,qV(i),S9(i),iL(i),u,f).background(i.background())}function rj(i,o){return o?function(){try{o.apply(this,arguments)}catch(a){i.error(a)}}:null}function wO(i,o,a){if("string"==typeof o){if(!(typeof document<"u"))return i.error("DOM document instance not found."),null;if(!(o=document.querySelector(o)))return i.error("Signal bind element not found: "+o),null}if(o&&a)try{o.textContent=""}catch(l){o=null,i.error(l)}return o}const TD=i=>+i||0;function $9(i){return(0,N.Kn)(i)?{top:TD(i.top),bottom:TD(i.bottom),left:TD(i.left),right:TD(i.right)}:(i=>({top:i,bottom:i,left:i,right:i}))(TD(i))}function h1(i,o,a,l){return oL.apply(this,arguments)}function oL(){return(oL=(0,ai.Z)(function*(i,o,a,l){const u=hS(o),f=u&&u.headless;return f||(0,N.vU)("Unrecognized renderer type: "+o),yield i.runAsync(),ij(i,null,null,f,a,l).renderAsync(i._scenegraph.root)})).apply(this,arguments)}function sL(){return(sL=(0,ai.Z)(function*(i,o){i!==l_.Canvas&&i!==l_.SVG&&i!==l_.PNG&&(0,N.vU)("Unrecognized image type: "+i);const a=yield h1(this,i,o);return i===l_.SVG?function z9(i,o){const a=new Blob([i],{type:o});return window.URL.createObjectURL(a)}(a.svg(),"image/svg+xml"):a.canvas().toDataURL("image/png")})).apply(this,arguments)}function aL(){return(aL=(0,ai.Z)(function*(i,o){return(yield h1(this,l_.Canvas,i,o)).canvas()})).apply(this,arguments)}function EO(){return(EO=(0,ai.Z)(function*(i){return(yield h1(this,l_.SVG,i)).svg()})).apply(this,arguments)}var sj="width",aj="height",lL="padding",CO={skip:!0};function H9(i,o){var a=i.autosize(),l=i.padding();return o-(a&&a.contains===lL?l.left+l.right:0)}function W9(i,o){var a=i.autosize(),l=i.padding();return o-(a&&a.contains===lL?l.top+l.bottom:0)}function uQ(i,o){return o.modified&&(0,N.kJ)(o.input.value)&&!i.startsWith("_:vega:_")}function lj(i,o){return!("parent"===i||o instanceof wd.proxy)}function G9(i,o,a,l){const u=i.element();u&&u.setAttribute("title",function uj(i){return null==i?"":(0,N.kJ)(i)?dj(i):(0,N.Kn)(i)&&!(0,N.J_)(i)?function p1(i){return Object.keys(i).map(o=>{const a=i[o];return o+": "+((0,N.kJ)(a)?dj(a):fj(a))}).join("\n")}(i):i+""}(l))}function dj(i){return"["+i.map(fj).join(", ")+"]"}function fj(i){return(0,N.kJ)(i)?"[\u2026]":(0,N.Kn)(i)&&!(0,N.J_)(i)?"{\u2026}":i}function hj(i,o){const a=this;if(o=o||{},xd.call(a),o.loader&&a.loader(o.loader),o.logger&&a.logger(o.logger),null!=o.logLevel&&a.logLevel(o.logLevel),o.locale||i.locale){const f=(0,N.l7)({},i.locale,o.locale);a.locale(GM(f.number,f.time))}a._el=null,a._elBind=null,a._renderType=o.renderer||l_.Canvas,a._scenegraph=new b3;const l=a._scenegraph.root;a._renderer=null,a._tooltip=o.tooltip||G9,a._redraw=!0,a._handler=(new sm).scene(l),a._globalCursor=!1,a._preventDefault=!1,a._timers=[],a._eventListeners=[],a._resizeListeners=[],a._eventConfig=function KV(i){const o=(0,N.l7)({defaults:{}},i),a=(l,u)=>{u.forEach(f=>{(0,N.kJ)(l[f])&&(l[f]=(0,N.Rg)(l[f]))})};return a(o.defaults,["prevent","allow"]),a(o,["view","window","selector"]),o}(i.eventConfig),a.globalCursor(a._eventConfig.globalCursor);const u=function oj(i,o,a){return v9(i,wd,bO,a).parse(o)}(a,i,o.expr);a._runtime=u,a._signals=u.signals,a._bind=(i.bindings||[]).map(f=>({state:null,param:(0,N.l7)({},f)})),u.root&&u.root.set(l),l.source=u.data.root.input,a.pulse(u.data.root.input,a.changeset().insert(l.items)),a._width=a.width(),a._height=a.height(),a._viewWidth=H9(a,a._width),a._viewHeight=W9(a,a._height),a._origin=[0,0],a._resize=0,a._autosize=1,function aQ(i){var o=i._signals,a=o[sj],l=o[aj],u=o[lL];function f(){i._autosize=i._resize=1}i._resizeWidth=i.add(null,g=>{i._width=g.size,i._viewWidth=H9(i,g.size),f()},{size:a}),i._resizeHeight=i.add(null,g=>{i._height=g.size,i._viewHeight=W9(i,g.size),f()},{size:l});const m=i.add(null,f,{pad:u});i._resizeWidth.rank=a.rank+1,i._resizeHeight.rank=l.rank+1,m.rank=u.rank+1}(a),function Do(i){i.add(null,o=>(i._background=o.bg,i._resize=1,o.bg),{bg:i._signals.background})}(a),function Hl(i){const o=i._signals.cursor||(i._signals.cursor=i.add({user:SD,item:null}));i.on(i.events("view","pointermove"),o,(a,l)=>{const u=o.value,f=u?(0,N.HD)(u)?u:u.user:SD,m=l.item&&l.item.cursor||null;return u&&f===u.user&&m==u.item?u:{user:f,item:m}}),i.add(null,function(a){let l=a.cursor,u=this.value;return(0,N.HD)(l)||(u=l.item,l=l.user),WV(i,l&&l!==SD?l:u||l),u},{cursor:o})}(a),a.description(i.description),o.hover&&a.hover(),o.container&&a.initialize(o.container,o.bind),o.watchPixelRatio&&a._watchPixelRatio()}function SO(i,o){return(0,N.nr)(i._signals,o)?i._signals[o]:(0,N.vU)("Unrecognized signal name: "+(0,N.m8)(o))}function pj(i,o){const a=(i._targets||[]).filter(l=>l._update&&l._update.handler===o);return a.length?a[0]:null}function Y9(i,o,a,l){let u=pj(a,l);return u||(u=rj(i,()=>l(o,a.value)),u.handler=l,i.on(a,null,u)),i}function kD(i,o,a){const l=pj(o,a);return l&&o._targets.remove(l),i}(0,N.XW)(hj,xd,{evaluate(i,o,a){var l=this;return(0,ai.Z)(function*(){if(yield xd.prototype.evaluate.call(l,i,o),l._redraw||l._resize)try{l._renderer&&(l._resize&&(l._resize=0,function GV(i){var o=iL(i),a=qV(i),l=S9(i);i._renderer.background(i.background()),i._renderer.resize(a,l,o),i._handler.origin(o),i._resizeListeners.forEach(u=>{try{u(a,l)}catch(f){i.error(f)}})}(l)),yield l._renderer.renderAsync(l._scenegraph.root)),l._redraw=!1}catch(u){l.error(u)}return a&&qo(l,a),l})()},dirty(i){this._redraw=!0,this._renderer&&this._renderer.dirty(i)},description(i){if(arguments.length){const o=null!=i?i+"":null;return o!==this._desc&&kh(this._el,this._desc=o),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(i,o,a){const l=SO(this,i);return 1===arguments.length?l.value:this.update(l,o,a)},width(i){return arguments.length?this.signal("width",i):this.signal("width")},height(i){return arguments.length?this.signal("height",i):this.signal("height")},padding(i){return arguments.length?this.signal("padding",$9(i)):$9(this.signal("padding"))},autosize(i){return arguments.length?this.signal("autosize",i):this.signal("autosize")},background(i){return arguments.length?this.signal("background",i):this.signal("background")},renderer(i){return arguments.length?(hS(i)||(0,N.vU)("Unrecognized renderer type: "+i),i!==this._renderType&&(this._renderType=i,this._resetRenderer()),this):this._renderType},tooltip(i){return arguments.length?(i!==this._tooltip&&(this._tooltip=i,this._resetRenderer()),this):this._tooltip},loader(i){return arguments.length?(i!==this._loader&&(xd.prototype.loader.call(this,i),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(SO(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function lQ(i,o,a,l,u,f){this.runAfter(m=>{let g=0;m._autosize=0,m.width()!==a&&(g=1,m.signal(sj,a,CO),m._resizeWidth.skip(!0)),m.height()!==l&&(g=1,m.signal(aj,l,CO),m._resizeHeight.skip(!0)),m._viewWidth!==i&&(m._resize=1,m._viewWidth=i),m._viewHeight!==o&&(m._resize=1,m._viewHeight=o),(m._origin[0]!==u[0]||m._origin[1]!==u[1])&&(m._resize=1,m._origin=u),g&&m.run("enter"),f&&m.runAfter(b=>b.resize())},!1,1)},addEventListener(i,o,a){let l=o;return a&&!1===a.trap||(l=rj(this,o),l.raw=o),this._handler.on(i,l),this},removeEventListener(i,o){for(var u,f,a=this._handler.handlers(i),l=a.length;--l>=0;)if(u=a[l].handler,i===(f=a[l].type)&&(o===u||o===u.raw)){this._handler.off(f,u);break}return this},addResizeListener(i){const o=this._resizeListeners;return o.includes(i)||o.push(i),this},removeResizeListener(i){var o=this._resizeListeners,a=o.indexOf(i);return a>=0&&o.splice(a,1),this},addSignalListener(i,o){return Y9(this,i,SO(this,i),o)},removeSignalListener(i,o){return kD(this,SO(this,i),o)},addDataListener(i,o){return Y9(this,i,xO(this,i).values,o)},removeDataListener(i,o){return kD(this,xO(this,i).values,o)},globalCursor(i){if(arguments.length){if(this._globalCursor!==!!i){const o=WV(this,null);this._globalCursor=!!i,o&&WV(this,o)}return this}return this._globalCursor},preventDefault(i){return arguments.length?(this._preventDefault=i,this):this._preventDefault},timer:function q9(i,o){this._timers.push(function tQ(i,o,a){var l=new MF,u=o;return null==o?(l.restart(i,o,a),l):(l._restart=l.restart,l.restart=function(f,m,g){m=+m,g=null==g?cr():+g,l._restart(function b(v){v+=u,l._restart(b,u+=m,g),f(v)},m,g)},l.restart(i,o,a),l)}(function a(l){i({timestamp:Date.now(),elapsed:l})},o))},events:function f1(i,o,a){var m,l=this,u=new so(a),f=function(v,w){l.runAsync(null,()=>{"view"===i&&function k9(i,o){var a=i._eventConfig.defaults,l=a.prevent,u=a.allow;return!1!==l&&!0!==u&&(!0===l||!1===u||(l?l[o]:u?!u[o]:i.preventDefault()))}(l,o)&&v.preventDefault(),u.receive(function D9(i,o,a){var f,g,l=i._renderer,u=l&&l.canvas();return u&&(g=iL(i),(f=mk(o.changedTouches?o.changedTouches[0]:o,u))[0]-=g[0],f[1]-=g[1]),o.dataflow=i,o.item=a,o.vega=function M9(i,o,a){const l=o?"group"===o.mark.marktype?o:o.mark.group:null;function u(m){var b,g=l;if(m)for(b=o;b;b=b.mark.group)if(b.mark.name===m){g=b;break}return g&&g.mark&&g.mark.interactive?g:{}}function f(m){if(!m)return a;(0,N.HD)(m)&&(m=u(m));const g=a.slice();for(;m;)g[0]-=m.x||0,g[1]-=m.y||0,m=m.mark&&m.mark.group;return g}return{view:(0,N.a9)(i),item:(0,N.a9)(o||{}),group:u,xy:f,x:m=>f(m)[0],y:m=>f(m)[1]}}(i,a,f),o}(l,v,w))})};if("timer"===i)MD(l,"timer",o)&&l.timer(f,o);else if("view"===i)MD(l,"view",o)&&l.addEventListener(o,f,T9);else if("window"===i?MD(l,"window",o)&&typeof window<"u"&&(m=[window]):typeof document<"u"&&MD(l,"selector",o)&&(m=Array.from(document.querySelectorAll(i))),m){for(var g=0,b=m.length;g=0;)o[l].stop();for(l=a.length;--l>=0;)for(u=(f=a[l]).sources.length;--u>=0;)f.sources[u].removeEventListener(f.type,f.handler);return i&&i.call(this,this._handler,null,null,null),this},hover:function nQ(i,o){return o=[o||"update",(i=[i||"hover"])[0]],this.on(this.events("view","pointerover",ZV),AD,Wl(i)),this.on(this.events("view","pointerout",ZV),AD,Wl(o)),this},data:function Bo(i,o){return arguments.length<2?xO(this,i).values.value:DD.call(this,i,Lf().remove(N.yb).insert(o))},change:DD,insert:function Ih(i,o){return DD.call(this,i,Lf().insert(o))},remove:function C9(i,o){return DD.call(this,i,Lf().remove(o))},scale:function U9(i){var o=this._runtime.scales;return(0,N.nr)(o,i)||(0,N.vU)("Unrecognized scale or projection: "+i),o[i].value},initialize:function sQ(i,o){const a=this,l=a._renderType,u=a._eventConfig.bind,f=hS(l);i=a._el=i?wO(a,i,!0):null,function E9(i){const o=i.container();o&&(o.setAttribute("role","graphics-document"),o.setAttribute("aria-roleDescription","visualization"),kh(o,i.description()))}(a),f||a.error("Unrecognized renderer type: "+l);const m=f.handler||sm,g=i?f.renderer:f.headless;return a._renderer=g?ij(a,a._renderer,i,g):null,a._handler=function oQ(i,o,a,l){const u=new l(i.loader(),rj(i,i.tooltip())).scene(i.scenegraph().root).initialize(a,iL(i),i);return o&&o.handlers().forEach(f=>{u.on(f.type,f.handler)}),u}(a,a._handler,i,m),a._redraw=!0,i&&"none"!==u&&(o=o?a._elBind=wO(a,o,!0):i.appendChild(Ys("form",{class:"vega-bindings"})),a._bind.forEach(b=>{b.param.element&&"container"!==u&&(b.element=wO(a,b.param.element,!!b.param.input))}),a._bind.forEach(b=>{N9(a,b.element||o,b)})),a},toImageURL:function B9(i,o){return sL.apply(this,arguments)},toCanvas:function V9(i,o){return aL.apply(this,arguments)},toSVG:function j9(i){return EO.apply(this,arguments)},getState:function cQ(i){return this._runtime.getState(i||{data:uQ,signals:lj,recurse:!0})},setState:function cj(i){return this.runAsync(null,o=>{o._trigger=!1,o._runtime.setState(i)},o=>{o._trigger=!0}),this},_watchPixelRatio:function X9(){if("canvas"===this.renderer()&&this._renderer._canvas){let i=null;const o=()=>{i?.();const a=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);a.addEventListener("change",o),i=()=>{a.removeEventListener("change",o)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};o()}}});const K9="view",D0="[",k_="]",Z9="{",I_="}",mj=":",cL=",",uL="@",gj=">",Q9=/[[\]{}]/,_j={"*":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 J9,eW;function yj(i,o,a){return J9=o||K9,eW=a||_j,bj(i.trim()).map(dL)}function ID(i,o,a,l,u){const f=i.length;let g,m=0;for(;o=0?--m:l&&l.indexOf(g)>=0&&++m}return o}function bj(i){const o=[],a=i.length;let l=0,u=0;for(;u' after between selector: "+i;l=l.map(dL);const u=dL(i.slice(1).trim());return u.between?{between:l,stream:u}:(u.between=l,u)}(i):function dQ(i){const o={source:J9},a=[];let b,v,l=[0,0],u=0,f=0,m=i.length,g=0;if(i[m-1]===I_){if(g=i.lastIndexOf(Z9),!(g>=0))throw"Unmatched right brace: "+i;try{l=function fQ(i){const o=i.split(cL);if(!i.length||o.length>2)throw i;return o.map(a=>{const l=+a;if(l!=l)throw i;return l})}(i.substring(g+1,m-1))}catch{throw"Invalid throttle specification: "+i}m=(i=i.slice(0,g).trim()).length,g=0}if(!m)throw i;if(i[0]===uL&&(u=++g),b=ID(i,g,mj),b1?(o.type=a[1],u?o.markname=a[0].slice(1):function tW(i){return eW[i]}(a[0])?o.marktype=a[0]:o.source=a[0]):o.type=a[0],"!"===o.type.slice(-1)&&(o.consume=!0,o.type=o.type.slice(0,-1)),null!=v&&(o.filter=v),l[0]&&(o.throttle=l[0]),l[1]&&(o.debounce=l[1]),o}(i)}function vj(i){return(0,N.Kn)(i)?i:{type:i||"pad"}}const DO=i=>+i||0,hQ=i=>({top:i,bottom:i,left:i,right:i});function iW(i){return(0,N.Kn)(i)?i.signal?i:{top:DO(i.top),bottom:DO(i.bottom),left:DO(i.left),right:DO(i.right)}:hQ(DO(i))}const ya=i=>(0,N.Kn)(i)&&!(0,N.kJ)(i)?(0,N.l7)({},i):{value:i};function rs(i,o,a,l){return null!=a?((0,N.Kn)(a)&&!(0,N.kJ)(a)||(0,N.kJ)(a)&&a.length&&(0,N.Kn)(a[0])?i.update[o]=a:i[l||"enter"][o]={value:a},1):0}function dl(i,o,a){for(const l in o)rs(i,l,o[l]);for(const l in a)rs(i,l,a[l],"update")}function OD(i,o,a){for(const l in o)a&&(0,N.nr)(a,l)||(i[l]=(0,N.l7)(i[l]||{},o[l]));return i}function RD(i,o){return o&&(o.enter&&o.enter[i]||o.update&&o.update[i])}const xj="mark",wj="frame",Ej="scope",pQ="axis",Cj="axis-domain",mQ="axis-grid",gQ="axis-label",_Q="axis-tick",rW="axis-title",oW="legend",sW="legend-band",yQ="legend-entry",bQ="legend-gradient",Sj="legend-label",aW="legend-symbol",vQ="legend-title",xQ="title",wQ="title-text",EQ="title-subtitle";function Dj(i,o,a){i[o]=a&&a.signal?{signal:a.signal}:{value:a}}const cW=i=>(0,N.HD)(i)?(0,N.m8)(i):i.signal?`(${i.signal})`:Mj(i);function O_(i){if(null!=i.gradient)return function uW(i){const o=[i.start,i.stop,i.count].map(a=>null==a?null:(0,N.m8)(a));for(;o.length&&null==(0,N.fj)(o);)o.pop();return o.unshift(cW(i.gradient)),`gradient(${o.join(",")})`}(i);let o=i.signal?`(${i.signal})`:i.color?function od(i){return i.c?fL("hcl",i.h,i.c,i.l):i.h||i.s?fL("hsl",i.h,i.s,i.l):i.l||i.a?fL("lab",i.l,i.a,i.b):i.r||i.g||i.b?fL("rgb",i.r,i.g,i.b):null}(i.color):null!=i.field?Mj(i.field):void 0!==i.value?(0,N.m8)(i.value):void 0;return null!=i.scale&&(o=function dW(i,o){const a=cW(i.scale);return null!=i.range?o=`lerp(_range(${a}), ${+i.range})`:(void 0!==o&&(o=`_scale(${a}, ${o})`),i.band&&(o=(o?o+"+":"")+`_bandwidth(${a})`+(1==+i.band?"":"*"+ND(i.band)),i.extra&&(o=`(datum.extra ? _scale(${a}, datum.extra.value) : ${o})`)),null==o&&(o="0")),o}(i,o)),void 0===o&&(o=null),null!=i.exponent&&(o=`pow(${o},${ND(i.exponent)})`),null!=i.mult&&(o+=`*${ND(i.mult)}`),null!=i.offset&&(o+=`+${ND(i.offset)}`),i.round&&(o=`round(${o})`),o}const fL=(i,o,a,l)=>`(${i}(${[o,a,l].map(O_).join(",")})+'')`;function ND(i){return(0,N.Kn)(i)?"("+O_(i)+")":i}function Mj(i){return hL((0,N.Kn)(i)?i:{datum:i})}function hL(i){let o,a,l;if(i.signal)o="datum",l=i.signal;else if(i.group||i.parent){for(a=Math.max(1,i.level||1),o="item";a-- >0;)o+=".mark.group";i.parent?(l=i.parent,o+=".datum"):l=i.group}else i.datum?(o="datum",l=i.datum):(0,N.vU)("Invalid field reference: "+(0,N.m8)(i));return i.signal||(l=(0,N.HD)(l)?(0,N._k)(l).map(N.m8).join("]["):hL(l)),o+"["+l+"]"}function pL(i,o,a,l,u,f){const m={};(f=f||{}).encoders={$encode:m},i=function lW(i,o,a,l,u){const f={},m={};let g,b,v,w;for(b in b="lineBreak","text"===o&&null!=u[b]&&!RD(b,i)&&Dj(f,b,u[b]),("legend"==a||String(a).startsWith("axis"))&&(a=null),w=a===wj?u.group:a===xj?(0,N.l7)({},u.mark,u[o]):null,w)v=RD(b,i)||("fill"===b||"stroke"===b)&&(RD("fill",i)||RD("stroke",i)),v||Dj(f,b,w[b]);for(b in(0,N.IX)(l).forEach(C=>{const D=u.style&&u.style[C];for(const T in D)RD(T,i)||Dj(f,T,D[T])}),i=(0,N.l7)({},i),f)w=f[b],w.signal?(g=g||{})[b]=w:m[b]=w;return i.enter=(0,N.l7)(m,i.enter),g&&(i.update=(0,N.l7)(g,i.update)),i}(i,o,a,l,u.config);for(const g in i)m[g]=Tj(i[g],o,f,u);return f}function Tj(i,o,a,l){const u={},f={};for(const m in i)null!=i[m]&&(u[m]=fW(MO(i[m]),l,a,f));return{$expr:{marktype:o,channels:u},$fields:Object.keys(f),$output:Object.keys(i)}}function MO(i){return(0,N.kJ)(i)?function Aj(i){let o="";return i.forEach(a=>{const l=O_(a);o+=a.test?`(${a.test})?${l}:`:l}),":"===(0,N.fj)(o)&&(o+="null"),o}(i):O_(i)}function fW(i,o,a,l){const u=km(i,o);return u.$fields.forEach(f=>l[f]=1),(0,N.l7)(a,u.$params),u.$expr}const kj="outer",Ij=["value","update","init","react","bind"];function mL(i,o){(0,N.vU)(i+' for "outer" push: '+(0,N.m8)(o))}function Oj(i,o){const a=i.name;if(i.push===kj)o.signals[a]||mL("No prior signal definition",a),Ij.forEach(l=>{void 0!==i[l]&&mL("Invalid property ",l)});else{const l=o.addSignal(a,i.value);!1===i.react&&(l.react=!1),i.bind&&o.addBinding(a,i.bind)}}function gL(i,o,a,l){this.id=-1,this.type=i,this.value=o,this.params=a,l&&(this.parent=l)}function FD(i,o,a,l){return new gL(i,o,a,l)}function _L(i,o){return FD("operator",i,o)}function pn(i){const o={$ref:i.id};return i.id<0&&(i.refs=i.refs||[]).push(o),o}function AO(i,o){return o?{$field:i,$name:o}:{$field:i}}const yL=AO("key");function Rj(i,o){return{$compare:i,$order:o}}function PD(i,o){return(i&&i.signal?"$"+i.signal:i||"")+(i&&o?"_":"")+(o&&o.signal?"$"+o.signal:o||"")}const TO="scope",LD="view";function os(i){return i&&i.signal}function M0(i){if(os(i))return!0;if((0,N.Kn)(i))for(const o in i)if(M0(i[o]))return!0;return!1}function bf(i,o){return i??o}function m1(i){return i&&i.signal||i}const Oh="timer";function R_(i,o){return(i.merge?Im:i.stream?A0:i.type?Om:(0,N.vU)("Invalid stream specification: "+(0,N.m8)(i)))(i,o)}function Im(i,o){const l=kO({merge:i.merge.map(u=>R_(u,o))},i,o);return o.addStream(l).id}function A0(i,o){const l=kO({stream:R_(i.stream,o)},i,o);return o.addStream(l).id}function Om(i,o){let a;i.type===Oh?(a=o.event(Oh,i.throttle),i={between:i.between,filter:i.filter}):a=o.event(function Pn(i){return i===TO?LD:i||LD}(i.source),i.type);const l=kO({stream:a},i,o);return 1===Object.keys(l).length?a:o.addStream(l).id}function kO(i,o,a){let l=o.between;return l&&(2!==l.length&&(0,N.vU)('Stream "between" parameter must have 2 entries: '+(0,N.m8)(o)),i.between=[R_(l[0],a),R_(l[1],a)]),l=o.filter?[].concat(o.filter):[],(o.marktype||o.markname||o.markrole)&&l.push(function mW(i,o,a){const l="event.item";return l+(i&&"*"!==i?"&&"+l+".mark.marktype==='"+i+"'":"")+(a?"&&"+l+".mark.role==='"+a+"'":"")+(o?"&&"+l+".mark.name==='"+o+"'":"")}(o.marktype,o.markname,o.markrole)),o.source===TO&&l.push("inScope(event.item)"),l.length&&(i.filter=km("("+l.join(")&&(")+")",a).$expr),null!=(l=o.throttle)&&(i.throttle=+l),null!=(l=o.debounce)&&(i.debounce=+l),o.consume&&(i.consume=!0),i}const La={code:"_.$value",ast:{type:"Identifier",value:"value"}};function Nh(i){return{signal:"["+i.map(o=>o.scale?'scale("'+o.scale+'")':o.signal)+"]"}}const _r=i=>(o,a,l)=>FD(i,a,o||void 0,l),gW=_r("aggregate"),vL=_r("axisticks"),_W=_r("bound"),Fh=_r("collect"),yW=_r("compare"),DQ=_r("datajoin"),bW=_r("encode"),vW=_r("expression"),xW=_r("facet"),wW=_r("field"),MQ=_r("key"),$D=_r("legendentries"),Pj=_r("load"),xL=_r("mark"),IO=_r("multiextent"),EW=_r("multivalues"),CW=_r("overlap"),SW=_r("params"),Lj=_r("prefacet"),DW=_r("projection"),MW=_r("proxy"),AW=_r("relay"),$j=_r("render"),TW=_r("scale"),T0=_r("sieve"),Bj=_r("sortitems"),kW=_r("viewlayout"),IW=_r("values");let wL=0;const zj={min:"min",max:"max",count:"sum"};function Vj(i,o){const a=o.getScale(i.name).params;let l;for(l in a.domain=RO(i.domain,i,o),null!=i.range&&(a.range=Hj(i,o,a)),null!=i.interpolate&&function BW(i,o){o.interpolate=fu(i.type||i),null!=i.gamma&&(o.interpolateGamma=fu(i.gamma))}(i.interpolate,a),null!=i.nice&&(a.nice=function $W(i){return(0,N.Kn)(i)?{interval:fu(i.interval),step:fu(i.step)}:fu(i)}(i.nice)),null!=i.bins&&(a.bins=function LW(i,o){return i.signal||(0,N.kJ)(i)?g1(i,o):o.objectProperty(i)}(i.bins,o)),i)(0,N.nr)(a,l)||"name"===l||(a[l]=fu(i[l],o))}function fu(i,o){return(0,N.Kn)(i)?i.signal?o.signalRef(i.signal):(0,N.vU)("Unsupported object: "+(0,N.m8)(i)):i}function g1(i,o){return i.signal?o.signalRef(i.signal):i.map(a=>fu(a,o))}function BD(i){(0,N.vU)("Can not find data set: "+(0,N.m8)(i))}function RO(i,o,a){if(i)return i.signal?a.signalRef(i.signal):((0,N.kJ)(i)?OW:i.fields?jj:AQ)(i,o,a);(null!=o.domainMin||null!=o.domainMax)&&(0,N.vU)("No scale domain defined for domainMin/domainMax to override.")}function OW(i,o,a){return i.map(l=>fu(l,a))}function AQ(i,o,a){const l=a.getData(i.data);return l||BD(i.data),gb(o.type)?l.valuesRef(a,i.field,Uj(i.sort,!1)):kT(o.type)?l.domainRef(a,i.field):l.extentRef(a,i.field)}function jj(i,o,a){const l=i.data,u=i.fields.reduce((f,m)=>(m=(0,N.HD)(m)?{data:l,field:m}:(0,N.kJ)(m)||m.signal?function RW(i,o){const a="_:vega:_"+wL++,l=Fh({});if((0,N.kJ)(i))l.value={$ingest:i};else if(i.signal){const u="setdata("+(0,N.m8)(a)+","+i.signal+")";l.params.input=o.signalRef(u)}return o.addDataPipeline(a,[l,T0({})]),{data:a,field:"data"}}(m,a):m,f.push(m),f),[]);return(gb(o.type)?NW:kT(o.type)?FW:PW)(i,a,u)}function NW(i,o,a){const l=Uj(i.sort,!0);let u,f;const m=a.map(v=>{const w=o.getData(v.data);return w||BD(v.data),w.countsRef(o,v.field,l)}),g={groupby:yL,pulse:m};l&&(u=l.op||"count",f=l.field?PD(u,l.field):"count",g.ops=[zj[u]],g.fields=[o.fieldRef(f)],g.as=[f]),u=o.add(gW(g));const b=o.add(Fh({pulse:pn(u)}));return f=o.add(IW({field:yL,sort:o.sortRef(l),pulse:pn(b)})),pn(f)}function Uj(i,o){return i&&(i.field||i.op?i.field||"count"===i.op?o&&i.field&&i.op&&!zj[i.op]&&(0,N.vU)("Multiple domain scales can not be sorted using "+i.op):(0,N.vU)("No field provided for sort aggregate op: "+i.op):(0,N.Kn)(i)?i.field="key":i={field:"key"}),i}function FW(i,o,a){const l=a.map(u=>{const f=o.getData(u.data);return f||BD(u.data),f.domainRef(o,u.field)});return pn(o.add(EW({values:l})))}function PW(i,o,a){const l=a.map(u=>{const f=o.getData(u.data);return f||BD(u.data),f.extentRef(o,u.field)});return pn(o.add(IO({extents:l})))}function Hj(i,o,a){const l=o.config.range;let u=i.range;if(u.signal)return o.signalRef(u.signal);if((0,N.HD)(u)){if(l&&(0,N.nr)(l,u))return Hj(i=(0,N.l7)({},i,{range:l[u]}),o,a);"width"===u?u=[0,{signal:"width"}]:"height"===u?u=gb(i.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,N.vU)("Unrecognized scale range value: "+(0,N.m8)(u))}else{if(u.scheme)return a.scheme=(0,N.kJ)(u.scheme)?g1(u.scheme,o):fu(u.scheme,o),u.extent&&(a.schemeExtent=g1(u.extent,o)),void(u.count&&(a.schemeCount=fu(u.count,o)));if(u.step)return void(a.rangeStep=fu(u.step,o));if(gb(i.type)&&!(0,N.kJ)(u))return RO(u,i,o);(0,N.kJ)(u)||(0,N.vU)("Unsupported range type: "+(0,N.m8)(u))}return u.map(f=>((0,N.kJ)(f)?g1:fu)(f,o))}function Wj(i,o,a){return(0,N.kJ)(i)?i.map(l=>Wj(l,o,a)):(0,N.Kn)(i)?i.signal?a.signalRef(i.signal):"fit"===o?i:(0,N.vU)("Unsupported parameter object: "+(0,N.m8)(i)):i}const vf="top",_1="left",y1="right",N_="bottom",VW="vertical",jW="start",HW="end",EL="index",CL="label",WW="offset",b1="perc",qW="perc2",sd="value",zD="guide-label",SL="guide-title",GW="group-title",XW="group-subtitle",Gj="symbol",NO="gradient",DL="discrete",Xj="size",VD=[Xj,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],$a={name:1,style:1,interactive:1},ji={value:0},ad={value:1},v1="group",Zj="rect",Rm="rule",Qj="symbol",I0="text";function FO(i){return i.type=v1,i.interactive=i.interactive||!1,i}function Mc(i,o){const a=(l,u)=>bf(i[l],bf(o[l],u));return a.isVertical=l=>VW===bf(i.direction,o.direction||(l?o.symbolDirection:o.gradientDirection)),a.gradientLength=()=>bf(i.gradientLength,o.gradientLength||o.gradientWidth),a.gradientThickness=()=>bf(i.gradientThickness,o.gradientThickness||o.gradientHeight),a.entryColumns=()=>bf(i.columns,bf(o.columns,+a.isVertical(!0))),a}function ML(i,o){const a=o&&(o.update&&o.update[i]||o.enter&&o.enter[i]);return a&&a.signal?a:a?a.value:null}function AL(i,o,a){return`item.anchor === '${jW}' ? ${i} : item.anchor === '${HW}' ? ${o} : ${a}`}const jD=AL((0,N.m8)(_1),(0,N.m8)(y1),(0,N.m8)("center"));function PO(i,o){return o?i?(0,N.Kn)(i)?Object.assign({},i,{offset:PO(i.offset,o)}):{value:i,offset:o}:o:i}function hu(i,o){return o?(i.name=o.name,i.style=o.style||i.style,i.interactive=!!o.interactive,i.encode=OD(i.encode,o,$a)):i.interactive=!1,i}function KW(i,o,a,l){const u=Mc(i,a),f=u.isVertical(),m=u.gradientThickness(),g=u.gradientLength();let b,v,w,C,D;f?(v=[0,1],w=[0,0],C=m,D=g):(v=[0,0],w=[1,0],C=g,D=m);const T={enter:b={opacity:ji,x:ji,y:ji,width:ya(C),height:ya(D)},update:(0,N.l7)({},b,{opacity:ad,fill:{gradient:o,start:v,stop:w}}),exit:{opacity:ji}};return dl(T,{stroke:u("gradientStrokeColor"),strokeWidth:u("gradientStrokeWidth")},{opacity:u("gradientOpacity")}),hu({type:Zj,role:bQ,encode:T},l)}function e4(i,o,a,l,u){const f=Mc(i,a),m=f.isVertical(),g=f.gradientThickness(),b=f.gradientLength();let v,w,C,D,T="";m?(v="y",C="y2",w="x",D="width",T="1-"):(v="x",C="x2",w="y",D="height");const I={opacity:ji,fill:{scale:o,field:sd}};I[v]={signal:T+"datum."+b1,mult:b},I[w]=ji,I[C]={signal:T+"datum."+qW,mult:b},I[D]=ya(g);const k={enter:I,update:(0,N.l7)({},I,{opacity:ad}),exit:{opacity:ji}};return dl(k,{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),hu({type:Zj,role:sW,key:sd,from:u,encode:k},l)}const ZW=`datum.${b1}<=0?"${_1}":datum.${b1}>=1?"${y1}":"center"`,kL=`datum.${b1}<=0?"${N_}":datum.${b1}>=1?"${vf}":"middle"`;function UD(i,o,a,l){const u=Mc(i,o),f=u.isVertical(),m=ya(u.gradientThickness()),g=u.gradientLength();let v,w,C,D,b=u("labelOverlap"),T="";const I={enter:v={opacity:ji},update:w={opacity:ad,text:{field:CL}},exit:{opacity:ji}};return dl(I,{fill:u("labelColor"),fillOpacity:u("labelOpacity"),font:u("labelFont"),fontSize:u("labelFontSize"),fontStyle:u("labelFontStyle"),fontWeight:u("labelFontWeight"),limit:bf(i.labelLimit,o.gradientLabelLimit)}),f?(v.align={value:"left"},v.baseline=w.baseline={signal:kL},C="y",D="x",T="1-"):(v.align=w.align={signal:ZW},v.baseline={value:"top"},C="x",D="y"),v[C]=w[C]={signal:T+"datum."+b1,mult:g},v[D]=w[D]=m,m.offset=bf(i.labelOffset,o.gradientLabelOffset)||0,b=b?{separation:u("labelSeparation"),method:b,order:"datum."+EL}:void 0,hu({type:I0,role:Sj,style:zD,key:sd,from:l,encode:I,overlap:b},a)}function LO(i,o,a,l,u){const f=Mc(i,o),m=a.entries,g=!(!m||!m.interactive),b=m?m.name:void 0,v=f("clipHeight"),w=f("symbolOffset"),C={data:"value"},D=`(${u}) ? datum.${WW} : datum.${Xj}`,T=v?ya(v):{field:Xj},I=`datum.${EL}`,k=`max(1, ${u})`;let F,L,z,V,U;T.mult=.5,F={enter:L={opacity:ji,x:{signal:D,mult:.5,offset:w},y:T},update:z={opacity:ad,x:L.x,y:L.y},exit:{opacity:ji}};let W=null,Y=null;i.fill||(W=o.symbolBaseFillColor,Y=o.symbolBaseStrokeColor),dl(F,{fill:f("symbolFillColor",W),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor",Y),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),VD.forEach(ce=>{i[ce]&&(z[ce]=L[ce]={scale:i[ce],field:sd})});const H=hu({type:Qj,role:aW,key:sd,from:C,clip:!!v||void 0,encode:F},a.symbols),Z=ya(w);Z.offset=f("labelOffset"),F={enter:L={opacity:ji,x:{signal:D,offset:Z},y:T},update:z={opacity:ad,text:{field:CL},x:L.x,y:L.y},exit:{opacity:ji}},dl(F,{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")});const te=hu({type:I0,role:Sj,style:zD,key:sd,from:C,encode:F},a.labels);return F={enter:{noBound:{value:!v},width:ji,height:v?ya(v):ji,opacity:ji},exit:{opacity:ji},update:z={opacity:ad,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(V=`ceil(item.mark.items.length / ${k})`,z.row.signal=`${I}%${V}`,z.column.signal=`floor(${I} / ${V})`,U={field:["row",I]}):(z.row.signal=`floor(${I} / ${k})`,z.column.signal=`${I} % ${k}`,U={field:I}),z.column.signal=`(${u})?${z.column.signal}:${I}`,FO({role:Ej,from:l={facet:{data:l,name:"value",groupby:EL}},encode:OD(F,m,$a),marks:[H,te],name:b,interactive:g,sort:U})}const BO='item.orient === "left"',HD='item.orient === "right"',ld=`(${BO} || ${HD})`,IL=`datum.vgrad && ${ld}`,zO=AL('"top"','"bottom"','"middle"'),JW=`datum.vgrad && ${HD} ? (${AL('"right"','"left"','"center"')}) : (${ld} && !(datum.vgrad && ${BO})) ? "left" : ${jD}`,t4=`item._anchor || (${ld} ? "middle" : "start")`,Ph=`${IL} ? (${BO} ? -90 : 90) : 0`,O0=`${ld} ? (datum.vgrad ? (${HD} ? "bottom" : "top") : ${zO}) : "top"`;function eq(i,o){let a;return(0,N.Kn)(i)&&(i.signal?a=i.signal:i.path?a="pathShape("+VO(i.path)+")":i.sphere&&(a="geoShape("+VO(i.sphere)+', {type: "Sphere"})')),a?o.signalRef(a):!!i}function VO(i){return(0,N.Kn)(i)&&i.signal?i.signal:(0,N.m8)(i)}function OL(i){const o=i.role||"";return o.indexOf("axis")&&o.indexOf("legend")&&o.indexOf("title")?i.type===v1?Ej:o||xj:o}function qD(i){return{marktype:i.type,name:i.name||void 0,role:i.role||OL(i),zindex:+i.zindex||void 0,aria:i.aria,description:i.description}}function tq(i,o){return i&&i.signal?o.signalRef(i.signal):!1!==i}function GD(i,o){const a=np(i.type);a||(0,N.vU)("Unrecognized transform type: "+(0,N.m8)(i.type));const l=FD(a.type.toLowerCase(),null,nq(a,i,o));return i.signal&&o.addSignal(i.signal,o.proxy(l)),l.metadata=a.metadata||{},l}function nq(i,o,a){const l={},u=i.params.length;for(let f=0;fi4(i,u,a))):i4(i,l,a)}(i,o,a):"projection"===l?a.projectionRef(o[i.name]):i.array&&!os(u)?u.map(f=>n4(i,f,a)):n4(i,u,a):void(i.required&&(0,N.vU)("Missing required "+(0,N.m8)(o.type)+" parameter: "+(0,N.m8)(i.name)))}function n4(i,o,a){const l=i.type;if(os(o))return rq(l)?(0,N.vU)("Expression references can not be signals."):o4(l)?a.fieldRef(o):oq(l)?a.compareRef(o):a.signalRef(o.signal);{const u=i.expr||o4(l);return u&&r4(o)?a.exprRef(o.expr,o.as):u&&IQ(o)?AO(o.field,o.as):rq(l)?km(o,a):OQ(l)?pn(a.getData(o).values):o4(l)?AO(o):oq(l)?a.compareRef(o):o}}function i4(i,o,a){const l=i.params.length;let u;for(let m=0;mi&&i.expr,IQ=i=>i&&i.field,OQ=i=>"data"===i,rq=i=>"expr"===i,o4=i=>"field"===i,oq=i=>"compare"===i;function R0(i,o){return i.$ref?i:i.data&&i.data.$ref?i.data:pn(o.getData(i.data).output)}function N0(i,o,a,l,u){this.scope=i,this.input=o,this.output=a,this.values=l,this.aggregate=u,this.index={}}function s4(i){return(0,N.HD)(i)?i:null}function a4(i,o,a){const l=PD(a.op,a.field);let u;if(o.ops){for(let f=0,m=o.as.length;fC??"null").join(",")+"),0)",o);b.update=w.$expr,b.params=w.$params}function UO(i,o){const a=OL(i),l=i.type===v1,u=i.from&&i.from.facet,f=i.overlap;let g,b,v,w,C,D,T,m=i.layout||a===Ej||a===wj;const I=a===xj||m||u,k=function RQ(i,o,a){let l,u,f,m,g;return i?(l=i.facet)&&(o||(0,N.vU)("Only group marks can be faceted."),null!=l.field?m=g=R0(l,a):(i.data?g=pn(a.getData(i.data).aggregate):(f=GD((0,N.l7)({type:"aggregate",groupby:(0,N.IX)(l.groupby)},l.aggregate),a),f.params.key=a.keyRef(l.groupby),f.params.pulse=R0(l,a),m=g=pn(a.add(f))),u=a.keyRef(l.groupby,!0))):m=pn(a.add(Fh(null,[{}]))),m||(m=R0(i,a)),{key:u,pulse:m,parent:g}}(i.from,l,o);b=o.add(DQ({key:k.key||(i.key?AO(i.key):void 0),pulse:k.pulse,clean:!l}));const F=pn(b);b=v=o.add(Fh({pulse:F})),b=o.add(xL({markdef:qD(i),interactive:tq(i.interactive,o),clip:eq(i.clip,o),context:{$context:!0},groups:o.lookup(),parent:o.signals.parent?o.signalRef("parent"):null,index:o.markpath(),pulse:pn(b)}));const L=pn(b);b=w=o.add(bW(pL(i.encode,i.type,a,i.style,o,{mod:!1,pulse:L}))),b.params.parent=o.encode(),i.transform&&i.transform.forEach(Y=>{const H=GD(Y,o),Z=H.metadata;(Z.generates||Z.changes)&&(0,N.vU)("Mark transforms should not generate new data."),Z.nomod||(w.params.mod=!0),H.params.pulse=pn(b),o.add(b=H)}),i.sort&&(b=o.add(Bj({sort:o.compareRef(i.sort),pulse:pn(b)})));const z=pn(b);(u||m)&&(m=o.add(kW({layout:o.objectProperty(i.layout),legends:o.legends,mark:L,pulse:z})),D=pn(m));const V=o.add(_W({mark:L,pulse:D||z}));T=pn(V),l&&(I&&(g=o.operators,g.pop(),m&&g.pop()),o.pushState(z,D||T,F),u?function jO(i,o,a){const l=i.from.facet,u=l.name,f=R0(l,o);let m;l.name||(0,N.vU)("Facet must have a name: "+(0,N.m8)(l)),l.data||(0,N.vU)("Facet must reference a data set: "+(0,N.m8)(l)),l.field?m=o.add(Lj({field:o.fieldRef(l.field),pulse:f})):l.groupby?m=o.add(xW({key:o.keyRef(l.groupby),group:pn(o.proxy(a.parent)),pulse:f})):(0,N.vU)("Facet must specify groupby or field: "+(0,N.m8)(l));const g=o.fork(),b=g.add(Fh()),v=g.add(T0({pulse:pn(b)}));g.addData(u,new N0(g,b,b,v)),g.addSignal("parent",null),m.params.subflow={$subflow:g.parse(i).toRuntime()}}(i,o,k):I?function l4(i,o,a){const l=o.add(Lj({pulse:a.pulse})),u=o.fork();u.add(T0()),u.addSignal("parent",null),l.params.subflow={$subflow:u.parse(i).toRuntime()}}(i,o,k):o.parse(i),o.popState(),I&&(m&&g.push(m),g.push(V))),f&&(T=function FL(i,o,a){const l=i.method,u=i.bound,f=i.separation,m={separation:os(f)?a.signalRef(f.signal):f,method:os(l)?a.signalRef(l.signal):l,pulse:o};if(i.order&&(m.sort=a.compareRef({field:i.order})),u){const g=u.tolerance;m.boundTolerance=os(g)?a.signalRef(g.signal):+g,m.boundScale=a.scaleRef(u.scale),m.boundOrient=u.orient}return pn(a.add(CW(m)))}(f,T,o));const U=o.add($j({pulse:T})),W=o.add(T0({pulse:pn(U)},void 0,o.parent()));null!=i.name&&(C=i.name,o.addData(C,new N0(o,v,U,W)),i.on&&i.on.forEach(Y=>{(Y.insert||Y.remove||Y.toggle)&&(0,N.vU)("Marks only support modify triggers."),NL(Y,o,C)}))}function lq(i,o,a){const l={enter:{},update:{}};return dl(l,{orient:i("orient"),offset:i("offset"),padding:i("padding"),titlePadding:i("titlePadding"),cornerRadius:i("cornerRadius"),fill:i("fillColor"),stroke:i("strokeColor"),strokeWidth:a.strokeWidth,strokeDash:a.strokeDash,x:i("legendX"),y:i("legendY"),format:o.format,formatType:o.formatType}),l}function u4(i,o,a){return o[i]?`scale("${o[i]}",datum)`:ML(i,a[0].encode)}N0.fromEntries=function(i,o){const a=o.length,l=o[a-1],u=o[a-2];let f=o[0],m=null,g=1;for(f&&"load"===f.type&&(f=o[1]),i.add(o[0]);gi===N_||i===vf,L0=(i,o,a)=>os(i)?$L(i.signal,o,a):i===_1||i===vf?o:a,ws=(i,o,a)=>os(i)?mq(i.signal,o,a):d4(i)?o:a,Ac=(i,o,a)=>os(i)?p4(i.signal,o,a):d4(i)?a:o,f4=(i,o,a)=>os(i)?m4(i.signal,o,a):i===vf?{value:o}:{value:a},h4=(i,o,a)=>os(i)?NQ(i.signal,o,a):i===y1?{value:o}:{value:a},mq=(i,o,a)=>g4(`${i} === '${vf}' || ${i} === '${N_}'`,o,a),p4=(i,o,a)=>g4(`${i} !== '${vf}' && ${i} !== '${N_}'`,o,a),$L=(i,o,a)=>zL(`${i} === '${_1}' || ${i} === '${vf}'`,o,a),m4=(i,o,a)=>zL(`${i} === '${vf}'`,o,a),NQ=(i,o,a)=>zL(`${i} === '${y1}'`,o,a),g4=(i,o,a)=>(o=null!=o?ya(o):o,a=null!=a?ya(a):a,BL(o)&&BL(a)?{signal:`${i} ? (${o=o?o.signal||(0,N.m8)(o.value):null}) : (${a=a?a.signal||(0,N.m8)(a.value):null})`}:[(0,N.l7)({test:i},o)].concat(a||[])),BL=i=>null==i||1===Object.keys(i).length,zL=(i,o,a)=>({signal:`${i} ? (${x1(o)}) : (${x1(a)})`}),gq=(i,o,a,l,u)=>({signal:(null!=l?`${i} === '${_1}' ? (${x1(l)}) : `:"")+(null!=a?`${i} === '${N_}' ? (${x1(a)}) : `:"")+(null!=u?`${i} === '${y1}' ? (${x1(u)}) : `:"")+(null!=o?`${i} === '${vf}' ? (${x1(o)}) : `:"")+"(null)"}),x1=i=>os(i)?i.signal:null==i?null:(0,N.m8)(i),_q=(i,o)=>0===o?0:os(i)?{signal:`(${i.signal}) * ${o}`}:{value:i*o},$0=(i,o)=>{const a=i.signal;return a&&a.endsWith("(null)")?{signal:a.slice(0,-6)+o.signal}:i};function w1(i,o,a,l){let u;if(o&&(0,N.nr)(o,i))return o[i];if((0,N.nr)(a,i))return a[i];if(i.startsWith("title")){switch(i){case"titleColor":u="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":u=i[5].toLowerCase()+i.slice(6)}return l[SL][u]}if(i.startsWith("label")){switch(i){case"labelColor":u="fill";break;case"labelFont":case"labelFontSize":u=i[5].toLowerCase()+i.slice(6)}return l[zD][u]}return null}function _4(i){const o={};for(const a of i)if(a)for(const l in a)o[l]=1;return Object.keys(o)}function qO(i,o){return{scale:i.scale,range:o}}function VL(i,o,a,l,u){return{signal:'flush(range("'+i+'"), scale("'+i+'", datum.value), '+o+","+a+","+l+","+u+")"}}function jL(i,o){const a=function y4(i,o){var g,b,v,a=o.config,l=a.style,u=a.axis,f="band"===o.scaleType(i.scale)&&a.axisBand,m=i.orient;if(os(m)){const C=_4([a.axisX,a.axisY]),D=_4([a.axisTop,a.axisBottom,a.axisLeft,a.axisRight]);for(v of(g={},C))g[v]=ws(m,w1(v,a.axisX,u,l),w1(v,a.axisY,u,l));for(v of(b={},D))b[v]=gq(m.signal,w1(v,a.axisTop,u,l),w1(v,a.axisBottom,u,l),w1(v,a.axisLeft,u,l),w1(v,a.axisRight,u,l))}else g=m===vf||m===N_?a.axisX:a.axisY,b=a["axis"+m[0].toUpperCase()+m.slice(1)];return g||b||f?(0,N.l7)({},u,g,b,f):u}(i,o),l=i.encode||{},u=l.axis||{},f=u.name||void 0,m=u.interactive,g=u.style,b=Mc(i,a),v=function TL(i){const o=i("tickBand");let l,u,a=i("tickOffset");return o?o.signal?(l={signal:`(${o.signal}) === 'extent' ? 1 : 0.5`},u={signal:`(${o.signal}) === 'extent'`},(0,N.Kn)(a)||(a={signal:`(${o.signal}) === 'extent' ? 0 : ${a}`})):"extent"===o?(l=1,u=!0,a=0):(l=.5,u=!1):(l=i("bandPosition"),u=i("tickExtra")),{extra:u,band:l,offset:a}}(b),w={scale:i.scale,ticks:!!b("ticks"),labels:!!b("labels"),grid:!!b("grid"),domain:!!b("domain"),title:null!=i.title},C=pn(o.add(Fh({},[w]))),D=pn(o.add(vL({scale:o.scaleRef(i.scale),extra:o.property(v.extra),count:o.objectProperty(i.tickCount),values:o.objectProperty(i.values),minstep:o.property(i.tickMinStep),formatType:o.property(i.formatType),formatSpecifier:o.property(i.format)}))),T=[];let I;return w.grid&&T.push(function bq(i,o,a,l,u){const f=Mc(i,o),m=i.orient,g=i.gridScale,b=L0(m,1,-1),v=function vq(i,o){if(1!==o)if((0,N.Kn)(i)){let a=i=(0,N.l7)({},i);for(;null!=a.mult;){if(!(0,N.Kn)(a.mult))return a.mult=os(o)?{signal:`(${a.mult}) * (${o.signal})`}:a.mult*o,i;a=a.mult=(0,N.l7)({},a.mult)}a.mult=o}else i=os(o)?{signal:`(${o.signal}) * (${i||0})`}:o*(i||0);return i}(i.offset,b);let w,C,D;const T={enter:w={opacity:ji},update:D={opacity:ad},exit:C={opacity:ji}};dl(T,{stroke:f("gridColor"),strokeCap:f("gridCap"),strokeDash:f("gridDash"),strokeDashOffset:f("gridDashOffset"),strokeOpacity:f("gridOpacity"),strokeWidth:f("gridWidth")});const I={scale:i.scale,field:sd,band:u.band,extra:u.extra,offset:u.offset,round:f("tickRound")},k=ws(m,{signal:"height"},{signal:"width"}),F=g?{scale:g,range:0,mult:b,offset:v}:{value:0,offset:v},L=g?{scale:g,range:1,mult:b,offset:v}:(0,N.l7)(k,{mult:b,offset:v});return w.x=D.x=ws(m,I,F),w.y=D.y=Ac(m,I,F),w.x2=D.x2=Ac(m,L),w.y2=D.y2=ws(m,L),C.x=ws(m,I),C.y=Ac(m,I),hu({type:Rm,role:mQ,key:sd,from:l,encode:T},a)}(i,a,l.grid,D,v)),w.ticks&&(I=b("tickSize"),T.push(function xq(i,o,a,l,u,f){const m=Mc(i,o),g=i.orient,b=L0(g,-1,1);let v,w,C;const D={enter:v={opacity:ji},update:C={opacity:ad},exit:w={opacity:ji}};dl(D,{stroke:m("tickColor"),strokeCap:m("tickCap"),strokeDash:m("tickDash"),strokeDashOffset:m("tickDashOffset"),strokeOpacity:m("tickOpacity"),strokeWidth:m("tickWidth")});const T=ya(u);T.mult=b;const I={scale:i.scale,field:sd,band:f.band,extra:f.extra,offset:f.offset,round:m("tickRound")};return C.y=v.y=ws(g,ji,I),C.y2=v.y2=ws(g,T),w.x=ws(g,I),C.x=v.x=Ac(g,ji,I),C.x2=v.x2=Ac(g,T),w.y=Ac(g,I),hu({type:Rm,role:_Q,key:sd,from:l,encode:D},a)}(i,a,l.ticks,D,I,v))),w.labels&&(I=w.ticks?I:0,T.push(function b4(i,o,a,l,u,f){const m=Mc(i,o),g=i.orient,b=i.scale,v=L0(g,-1,1),w=m1(m("labelFlush")),C=m1(m("labelFlushOffset")),D=m("labelAlign"),T=m("labelBaseline");let k,I=0===w||!!w;const F=ya(u);F.mult=v,F.offset=ya(m("labelPadding")||0),F.offset.mult=v;const L={scale:b,field:sd,band:.5,offset:PO(f.offset,m("labelOffset"))},z=ws(g,I?VL(b,w,'"left"','"right"','"center"'):{value:"center"},h4(g,"left","right")),V=ws(g,f4(g,"bottom","top"),I?VL(b,w,'"top"','"bottom"','"middle"'):{value:"middle"}),U=VL(b,w,`-(${C})`,C,0);I=I&&C;const W={opacity:ji,x:ws(g,L,F),y:Ac(g,L,F)},Y={enter:W,update:k={opacity:ad,text:{field:CL},x:W.x,y:W.y,align:z,baseline:V},exit:{opacity:ji,x:W.x,y:W.y}};dl(Y,{dx:!D&&I?ws(g,U):null,dy:!T&&I?Ac(g,U):null}),dl(Y,{angle:m("labelAngle"),fill:m("labelColor"),fillOpacity:m("labelOpacity"),font:m("labelFont"),fontSize:m("labelFontSize"),fontWeight:m("labelFontWeight"),fontStyle:m("labelFontStyle"),limit:m("labelLimit"),lineHeight:m("labelLineHeight")},{align:D,baseline:T});const H=m("labelBound");let Z=m("labelOverlap");return Z=Z||H?{separation:m("labelSeparation"),method:Z,order:"datum.index",bound:H?{scale:b,orient:g,tolerance:H}:null}:void 0,k.align!==z&&(k.align=$0(k.align,z)),k.baseline!==V&&(k.baseline=$0(k.baseline,V)),hu({type:I0,role:gQ,style:zD,key:sd,from:l,encode:Y,overlap:Z},a)}(i,a,l.labels,D,I,v))),w.domain&&T.push(function yq(i,o,a,l){const u=Mc(i,o),f=i.orient;let m,g;const b={enter:m={opacity:ji},update:g={opacity:ad},exit:{opacity:ji}};dl(b,{stroke:u("domainColor"),strokeCap:u("domainCap"),strokeDash:u("domainDash"),strokeDashOffset:u("domainDashOffset"),strokeWidth:u("domainWidth"),strokeOpacity:u("domainOpacity")});const v=qO(i,0),w=qO(i,1);return m.x=g.x=ws(f,v,ji),m.x2=g.x2=ws(f,w),m.y=g.y=Ac(f,v,ji),m.y2=g.y2=Ac(f,w),hu({type:Rm,role:Cj,from:l,encode:b},a)}(i,a,l.domain,C)),w.title&&T.push(function wq(i,o,a,l){const u=Mc(i,o),f=i.orient,m=L0(f,-1,1);let g,b;const v={enter:g={opacity:ji,anchor:ya(u("titleAnchor",null)),align:{signal:jD}},update:b=(0,N.l7)({},g,{opacity:ad,text:ya(i.title)}),exit:{opacity:ji}},w={signal:`lerp(range("${i.scale}"), ${AL(0,1,.5)})`};return b.x=ws(f,w),b.y=Ac(f,w),g.angle=ws(f,ji,_q(m,90)),g.baseline=ws(f,f4(f,N_,vf),{value:N_}),b.angle=g.angle,b.baseline=g.baseline,dl(v,{fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit"),lineHeight:u("titleLineHeight")},{align:u("titleAlign"),angle:u("titleAngle"),baseline:u("titleBaseline")}),function xf(i,o,a,l){const u=(g,b)=>null!=g?(a.update[b]=$0(ya(g),a.update[b]),!1):!RD(b,l),f=u(i("titleX"),"x"),m=u(i("titleY"),"y");a.enter.auto=m===f?ya(m):ws(o,ya(m),ya(f))}(u,f,v,a),v.update.align=$0(v.update.align,g.align),v.update.angle=$0(v.update.angle,g.angle),v.update.baseline=$0(v.update.baseline,g.baseline),hu({type:I0,role:rW,style:SL,from:l,encode:v},a)}(i,a,l.title,C)),UO(FO({role:pQ,from:C,encode:OD(XD(b,i),u,$a),marks:T,aria:b("aria"),description:b("description"),zindex:b("zindex"),name:f,interactive:m,style:g}),o)}function XD(i,o){const a={enter:{},update:{}};return dl(a,{orient:i("orient"),offset:i("offset")||0,position:bf(o.position,0),titlePadding:i("titlePadding"),minExtent:i("minExtent"),maxExtent:i("maxExtent"),range:{signal:`abs(span(range("${o.scale}")))`},translate:i("translate"),format:o.format,formatType:o.formatType}),a}function GO(i,o,a){const l=(0,N.IX)(i.signals),u=(0,N.IX)(i.scales);return a||l.forEach(f=>Oj(f,o)),(0,N.IX)(i.projections).forEach(f=>function zW(i,o){const a=o.config.projection||{},l={};for(const u in i)"name"!==u&&(l[u]=Wj(i[u],u,o));for(const u in a)null==l[u]&&(l[u]=Wj(a[u],u,o));o.addProjection(i.name,l)}(f,o)),u.forEach(f=>function OO(i,o){const a=i.type||"linear";ah(a)||(0,N.vU)("Unrecognized scale type: "+(0,N.m8)(a)),o.addScale(i.name,{type:a,domain:void 0})}(f,o)),(0,N.IX)(i.data).forEach(f=>function hq(i,o){const a=[];i.transform&&i.transform.forEach(l=>{a.push(GD(l,o))}),i.on&&i.on.forEach(l=>{NL(l,o,i.name)}),o.addDataPipeline(i.name,function pq(i,o,a){const l=[];let g,b,v,w,C,u=null,f=!1,m=!1;for(i.values?os(i.values)||M0(i.format)?(l.push(WO(o,i)),l.push(u=P0())):l.push(u=P0({$ingest:i.values,$format:i.format})):i.url?M0(i.url)||M0(i.format)?(l.push(WO(o,i)),l.push(u=P0())):l.push(u=P0({$request:i.url,$format:i.format})):i.source&&(u=g=(0,N.IX)(i.source).map(D=>pn(o.getData(D).output)),l.push(null)),b=0,v=a.length;bVj(f,o)),(a||l).forEach(f=>function SQ(i,o){const a=o.getSignal(i.name);let l=i.update;i.init&&(l?(0,N.vU)("Signals can not include both init and update expressions."):(l=i.init,a.initonly=!0)),l&&(l=km(l,o),a.update=l.$expr,a.params=l.$params),i.on&&i.on.forEach(u=>function Rh(i,o,a){const l=i.encode,u={target:a};let f=i.events,m=i.update,g=[];f||(0,N.vU)("Signal update missing events specification."),(0,N.HD)(f)&&(f=yj(f,o.isSubscope()?TO:LD)),f=(0,N.IX)(f).filter(b=>b.signal||b.scale?(g.push(b),0):1),g.length>1&&(g=[Nh(g)]),f.length&&g.push(f.length>1?{merge:f}:f[0]),null!=l&&(m&&(0,N.vU)("Signal encode and update are mutually exclusive."),m="encode(item(),"+(0,N.m8)(l)+")"),u.update=(0,N.HD)(m)?km(m,o):null!=m.expr?km(m.expr,o):null!=m.value?m.value:null!=m.signal?{$expr:La,$params:{$value:o.signalRef(m.signal)}}:(0,N.vU)("Invalid signal update specification."),i.force&&(u.options={force:!0}),g.forEach(b=>o.addUpdate((0,N.l7)(function CQ(i,o){return{source:i.signal?o.signalRef(i.signal):i.scale?o.scaleRef(i.scale):R_(i,o)}}(b,o),u)))}(u,o,a.id))}(f,o)),(0,N.IX)(i.axes).forEach(f=>jL(f,o)),(0,N.IX)(i.marks).forEach(f=>UO(f,o)),(0,N.IX)(i.legends).forEach(f=>function c4(i,o){const a=o.config.legend,l=i.encode||{},u=Mc(i,a),f=l.legend||{},m=f.name||void 0,g=f.interactive,b=f.style,v={};let C,D,T,w=0;VD.forEach(V=>i[V]?(v[V]=i[V],w=w||i[V]):0),w||(0,N.vU)("Missing valid scale for legend.");const I=function sq(i,o){let a=i.type||Gj;return!i.type&&1===function aq(i){return VD.reduce((o,a)=>o+(i[a]?1:0),0)}(i)&&(i.fill||i.stroke)&&(a=AC(o)?NO:TC(o)?DL:Gj),a!==NO?a:TC(o)?DL:NO}(i,o.scaleType(w)),k={title:null!=i.title,scales:v,type:I,vgrad:"symbol"!==I&&u.isVertical()},F=pn(o.add(Fh(null,[k]))),z=pn(o.add($D(D={type:I,scale:o.scaleRef(w),count:o.objectProperty(u("tickCount")),limit:o.property(u("symbolLimit")),values:o.objectProperty(i.values),minstep:o.property(i.tickMinStep),formatType:o.property(i.formatType),formatSpecifier:o.property(i.format)})));return I===NO?(T=[KW(i,w,a,l.gradient),UD(i,a,l.labels,z)],D.count=D.count||o.signalRef(`max(2,2*floor((${m1(u.gradientLength())})/100))`)):I===DL?T=[e4(i,w,a,l.gradient,z),UD(i,a,l.labels,z)]:(C=function $O(i,o){const a=Mc(i,o);return{align:a("gridAlign"),columns:a.entryColumns(),center:{row:!0,column:!1},padding:{row:a("rowPadding"),column:a("columnPadding")}}}(i,a),T=[LO(i,a,l,z,m1(C.columns))],D.size=function cq(i,o,a){const l=m1(u4("size",i,a)),u=m1(u4("strokeWidth",i,a)),f=m1(function uq(i,o,a){return ML("fontSize",i)||function Jj(i,o,a){const l=o.config.style[a];return l&&l[i]}("fontSize",o,a)}(a[1].encode,o,zD));return km(`max(ceil(sqrt(${l})+${u}),${f})`,o)}(i,o,T[0].marks)),T=[FO({role:yQ,from:F,encode:{enter:{x:{value:0},y:{value:0}}},marks:T,layout:C,interactive:g})],k.title&&T.push(function WD(i,o,a,l){const u=Mc(i,o),f={enter:{opacity:ji},update:{opacity:ad,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:ji}};return dl(f,{orient:u("titleOrient"),_anchor:u("titleAnchor"),anchor:{signal:t4},angle:{signal:Ph},align:{signal:JW},baseline:{signal:O0},text:i.title,fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit"),lineHeight:u("titleLineHeight")},{align:u("titleAlign"),baseline:u("titleBaseline")}),hu({type:I0,role:vQ,style:SL,from:l,encode:f},a)}(i,a,l.title,F)),UO(FO({role:oW,from:F,encode:OD(lq(u,i,a),f,$a),marks:T,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:m,interactive:g,style:b}),o)}(f,o)),i.title&&function PL(i,o){const a=Mc(i=(0,N.HD)(i)?{text:i}:i,o.config.title),l=i.encode||{},u=l.group||{},f=u.name||void 0,m=u.interactive,g=u.style,b=[],w=pn(o.add(Fh(null,[{}])));return b.push(function dq(i,o,a,l){const u={value:0},m={enter:{opacity:u},update:{opacity:{value:1}},exit:{opacity:u}};return dl(m,{text:i.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:o("dx"),dy:o("dy"),fill:o("color"),font:o("font"),fontSize:o("fontSize"),fontStyle:o("fontStyle"),fontWeight:o("fontWeight"),lineHeight:o("lineHeight")},{align:o("align"),angle:o("angle"),baseline:o("baseline")}),hu({type:I0,role:wQ,style:GW,from:l,encode:m},a)}(i,a,function LL(i){const o=i.encode;return o&&o.title||(0,N.l7)({name:i.name,interactive:i.interactive,style:i.style},o)}(i),w)),i.subtitle&&b.push(function fq(i,o,a,l){const u={value:0},m={enter:{opacity:u},update:{opacity:{value:1}},exit:{opacity:u}};return dl(m,{text:i.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:o("dx"),dy:o("dy"),fill:o("subtitleColor"),font:o("subtitleFont"),fontSize:o("subtitleFontSize"),fontStyle:o("subtitleFontStyle"),fontWeight:o("subtitleFontWeight"),lineHeight:o("subtitleLineHeight")},{align:o("align"),angle:o("angle"),baseline:o("baseline")}),hu({type:I0,role:EQ,style:XW,from:l,encode:m},a)}(i,a,l.subtitle,w)),UO(FO({role:xQ,from:w,encode:HO(a,u),marks:b,aria:a("aria"),description:a("description"),zindex:a("zindex"),name:f,interactive:m,style:g}),o)}(i.title,o),o.parseLambdas(),o}const Eq=i=>OD({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},i);function B0(i,o){return o&&o.signal?{name:i,update:o.signal}:{name:i,value:o}}function v4(i,o){this.config=i||{},this.options=o||{},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 YD(i){this.config=i.config,this.options=i.options,this.legends=i.legends,this.field=Object.create(i.field),this.signals=Object.create(i.signals),this.lambdas=Object.create(i.lambdas),this.scales=Object.create(i.scales),this.events=Object.create(i.events),this.data=Object.create(i.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++i._nextsub[0],this._nextsub=i._nextsub,this._parent=i._parent.slice(),this._encode=i._encode.slice(),this._lookup=i._lookup.slice(),this._markpath=i._markpath}function UL(i){return((0,N.kJ)(i)?x4:w4)(i)}function x4(i){const o=i.length;let a="[";for(let l=0;l0?",":"")+((0,N.Kn)(u)?u.signal||UL(u):(0,N.m8)(u))}return a+"]"}function w4(i){let l,u,o="{",a=0;for(l in i)u=i[l],o+=(++a>1?",":"")+(0,N.m8)(l)+":"+((0,N.Kn)(u)?u.signal||UL(u):(0,N.m8)(u));return o+"}"}function cd(i,o,a){return(0,N.Kn)(i)||(0,N.vU)("Input Vega specification must be an object."),function Cq(i,o){const a=o.config,l=pn(o.root=o.add(_L())),u=function Sq(i,o){const a=m=>bf(i[m],o[m]),l=[B0("background",a("background")),B0("autosize",vj(a("autosize"))),B0("padding",iW(a("padding"))),B0("width",a("width")||0),B0("height",a("height")||0)],u=l.reduce((m,g)=>(m[g.name]=g,m),{}),f={};return(0,N.IX)(i.signals).forEach(m=>{(0,N.nr)(u,m.name)?m=(0,N.l7)(u[m.name],m):l.push(m),f[m.name]=m}),(0,N.IX)(o.signals).forEach(m=>{!(0,N.nr)(f,m.name)&&!(0,N.nr)(u,m.name)&&l.push(m)}),l}(i,a);u.forEach(v=>Oj(v,o)),o.description=i.description||a.description,o.eventConfig=a.events,o.legends=o.objectProperty(a.legend&&a.legend.layout),o.locale=a.locale;const f=o.add(Fh()),m=o.add(bW(pL(Eq(i.encode),v1,wj,i.style,o,{pulse:pn(f)}))),g=o.add(kW({layout:o.objectProperty(i.layout),legends:o.legends,autosize:o.signalRef("autosize"),mark:l,pulse:pn(m)}));o.operators.pop(),o.pushState(pn(m),pn(g),null),GO(i,o,u),o.operators.push(g);let b=o.add(_W({mark:l,pulse:pn(g)}));return b=o.add($j({pulse:pn(b)})),b=o.add(T0({pulse:pn(b)})),o.addData("root",new N0(o,f,f,b)),o}(i,new v4(o=(0,N.fE)(function E4(){const i="sans-serif",l="#4c78a8",u="#000",f="#888",m="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:l},area:{fill:l},image:null,line:{stroke:l,strokeWidth:2},path:{stroke:l},rect:{fill:l},rule:{stroke:u},shape:{stroke:l},symbol:{fill:l,size:64},text:{fill:u,font:i,fontSize:11},trail:{fill:l,size:2},style:{"guide-label":{fill:u,font:i,fontSize:10},"guide-title":{fill:u,font:i,fontSize:11,fontWeight:"bold"},"group-title":{fill:u,font:i,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:u,font:i,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:m},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:f,grid:!1,gridWidth:1,gridColor:m,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:f,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:m,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:f,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"]}}}(),o,i.config),a)).toRuntime()}v4.prototype=YD.prototype={parse(i){return GO(i,this)},fork(){return new YD(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(i){return this.operators.push(i),i.id=this.id(),i.refs&&(i.refs.forEach(o=>{o.$ref=i.id}),i.refs=null),i},proxy(i){const o=i instanceof gL?pn(i):i;return this.add(MW({value:o}))},addStream(i){return this.streams.push(i),i.id=this.id(),i},addUpdate(i){return this.updates.push(i),i},finish(){let i,o;for(i in this.root&&(this.root.root=!0),this.signals)this.signals[i].signal=i;for(i in this.scales)this.scales[i].scale=i;function a(l,u,f){let m,g;l&&(m=l.data||(l.data={}),g=m[u]||(m[u]=[]),g.push(f))}for(i in this.data){o=this.data[i],a(o.input,i,"input"),a(o.output,i,"output"),a(o.values,i,"values");for(const l in o.index)a(o.index[l],i,"index:"+l)}return this},pushState(i,o,a){this._encode.push(pn(this.add(T0({pulse:i})))),this._parent.push(o),this._lookup.push(a?pn(this.proxy(a)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return(0,N.fj)(this._parent)},encode(){return(0,N.fj)(this._encode)},lookup(){return(0,N.fj)(this._lookup)},markpath(){const i=this._markpath;return++i[i.length-1]},fieldRef(i,o){if((0,N.HD)(i))return AO(i,o);i.signal||(0,N.vU)("Unsupported field reference: "+(0,N.m8)(i));const a=i.signal;let l=this.field[a];if(!l){const u={name:this.signalRef(a)};o&&(u.as=o),this.field[a]=l=pn(this.add(wW(u)))}return l},compareRef(i){let o=!1;const a=f=>os(f)?(o=!0,this.signalRef(f.signal)):function Fj(i){return i&&i.expr}(f)?(o=!0,this.exprRef(f.expr)):f,l=(0,N.IX)(i.field).map(a),u=(0,N.IX)(i.order).map(a);return o?pn(this.add(yW({fields:l,orders:u}))):Rj(l,u)},keyRef(i,o){let a=!1;const u=this.signals;return i=(0,N.IX)(i).map(f=>os(f)?(a=!0,pn(u[f.signal])):f),a?pn(this.add(MQ({fields:i,flat:o}))):function bL(i,o){const a={$key:i};return o&&(a.$flat=!0),a}(i,o)},sortRef(i){if(!i)return i;const o=PD(i.op,i.field),a=i.order||"ascending";return a.signal?pn(this.add(yW({fields:o,orders:this.signalRef(a.signal)}))):Rj(o,a)},event(i,o){const a=i+":"+o;if(!this.events[a]){const l=this.id();this.streams.push({id:l,source:i,type:o}),this.events[a]=l}return this.events[a]},hasOwnSignal(i){return(0,N.nr)(this.signals,i)},addSignal(i,o){this.hasOwnSignal(i)&&(0,N.vU)("Duplicate signal name: "+(0,N.m8)(i));const a=o instanceof gL?o:this.add(_L(o));return this.signals[i]=a},getSignal(i){return this.signals[i]||(0,N.vU)("Unrecognized signal name: "+(0,N.m8)(i)),this.signals[i]},signalRef(i){return this.signals[i]?pn(this.signals[i]):((0,N.nr)(this.lambdas,i)||(this.lambdas[i]=this.add(_L(null))),pn(this.lambdas[i]))},parseLambdas(){const i=Object.keys(this.lambdas);for(let o=0,a=i.length;o{"use strict";var Ds=/("(?:[^\\"]|\\.)*")|[:,]/g;Ba.exports=function(Ct,re){var Ii,sn,yi;return re=re||{},Ii=JSON.stringify([1],void 0,void 0===re.indent?2:re.indent).slice(2,-3),sn=""===Ii?1/0:void 0===re.maxLength?80:re.maxLength,yi=re.replacer,function Zn(Xt,oi,Rt){var On,Ut,si,N,ai,Gr,Yt,Li,dr,Br,Zi,zo;if(Xt&&"function"==typeof Xt.toJSON&&(Xt=Xt.toJSON()),void 0===(Zi=JSON.stringify(Xt,yi)))return Zi;if(Zi.length<=(Yt=sn-oi.length-Rt)&&(dr=Zi.replace(Ds,function(Xr,ei){return ei||Xr+" "})).length<=Yt)return dr;if(null!=yi&&(Xt=JSON.parse(Zi),yi=void 0),"object"==typeof Xt&&null!==Xt){if(Li=oi+Ii,si=[],Ut=0,Array.isArray(Xt))for(Br="[",On="]",Yt=Xt.length;Ut0)return[Br,Ii+si.join(",\n"+Li),On].join("\n"+oi)}return Zi}(Ct,"",0)}},861:(Ba,Ds,tn)=>{"use strict";function Ct(Ii,sn,yi,Zn,Xt,oi,Rt){try{var On=Ii[oi](Rt),Ut=On.value}catch(si){return void yi(si)}On.done?sn(Ut):Promise.resolve(Ut).then(Zn,Xt)}function re(Ii){return function(){var sn=this,yi=arguments;return new Promise(function(Zn,Xt){var oi=Ii.apply(sn,yi);function Rt(Ut){Ct(oi,Zn,Xt,Rt,On,"next",Ut)}function On(Ut){Ct(oi,Zn,Xt,Rt,On,"throw",Ut)}Rt(void 0)})}}tn.d(Ds,{Z:()=>re})}},Ba=>{Ba(Ba.s=733)}]); \ No newline at end of file