UNPKG

sksim

Version:

SKSim: Signal K data stream generator.

7 lines 908 kB
import{a as _,b as ae,f as Wt}from"./chunk-EQDQRRRY.js";function Su(t,n){return Object.is(t,n)}var st=null,la=!1,Au=1,Dt=Symbol("SIGNAL");function Ie(t){let n=st;return st=t,n}function Sg(){return st}function GD(){return la}var er={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Hs(t){if(la)throw new Error("");if(st===null)return;st.consumerOnSignalRead(t);let n=st.nextProducerIndex++;if(Gs(st),n<st.producerNode.length&&st.producerNode[n]!==t&&da(st)){let e=st.producerNode[n];$s(e,st.producerIndexOfThis[n])}st.producerNode[n]!==t&&(st.producerNode[n]=t,st.producerIndexOfThis[n]=da(st)?Fg(t,st,n):0),st.producerLastReadVersion[n]=t.version}function WD(){Au++}function Ru(t){if(!(da(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===Au)){if(!t.producerMustRecompute(t)&&!ha(t)){Mu(t);return}t.producerRecomputeValue(t),Mu(t)}}function Ag(t){if(t.liveConsumerNode===void 0)return;let n=la;la=!0;try{for(let e of t.liveConsumerNode)e.dirty||Og(e)}finally{la=n}}function Rg(){return st?.consumerAllowSignalWrites!==!1}function Og(t){t.dirty=!0,Ag(t),t.consumerMarkedDirty?.(t)}function Mu(t){t.dirty=!1,t.lastCleanEpoch=Au}function Ur(t){return t&&(t.nextProducerIndex=0),Ie(t)}function ua(t,n){if(Ie(n),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(da(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)$s(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function ha(t){Gs(t);for(let n=0;n<t.producerNode.length;n++){let e=t.producerNode[n],i=t.producerLastReadVersion[n];if(i!==e.version||(Ru(e),i!==e.version))return!0}return!1}function Hr(t){if(Gs(t),da(t))for(let n=0;n<t.producerNode.length;n++)$s(t.producerNode[n],t.producerIndexOfThis[n]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function Fg(t,n,e){if(Ng(t),t.liveConsumerNode.length===0&&Pg(t))for(let i=0;i<t.producerNode.length;i++)t.producerIndexOfThis[i]=Fg(t.producerNode[i],t,i);return t.liveConsumerIndexOfThis.push(e),t.liveConsumerNode.push(n)-1}function $s(t,n){if(Ng(t),t.liveConsumerNode.length===1&&Pg(t))for(let i=0;i<t.producerNode.length;i++)$s(t.producerNode[i],t.producerIndexOfThis[i]);let e=t.liveConsumerNode.length-1;if(t.liveConsumerNode[n]=t.liveConsumerNode[e],t.liveConsumerIndexOfThis[n]=t.liveConsumerIndexOfThis[e],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,n<t.liveConsumerNode.length){let i=t.liveConsumerIndexOfThis[n],r=t.liveConsumerNode[n];Gs(r),r.producerIndexOfThis[i]=n}}function da(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Gs(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function Ng(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function Pg(t){return t.producerNode!==void 0}function Ou(t){let n=Object.create(qD);n.computation=t;let e=()=>{if(Ru(n),Hs(n),n.value===Us)throw n.error;return n.value};return e[Dt]=n,e}var Eu=Symbol("UNSET"),ku=Symbol("COMPUTING"),Us=Symbol("ERRORED"),qD=ae(_({},er),{value:Eu,dirty:!0,error:null,equal:Su,producerMustRecompute(t){return t.value===Eu||t.value===ku},producerRecomputeValue(t){if(t.value===ku)throw new Error("Detected cycle in computations.");let n=t.value;t.value=ku;let e=Ur(t),i;try{i=t.computation()}catch(r){i=Us,t.error=r}finally{ua(t,e)}if(n!==Eu&&n!==Us&&i!==Us&&t.equal(n,i)){t.value=n;return}t.value=i,t.version++}});function QD(){throw new Error}var Lg=QD;function Vg(){Lg()}function Bg(t){Lg=t}var YD=null;function jg(t){let n=Object.create(Fu);n.value=t;let e=()=>(Hs(n),n.value);return e[Dt]=n,e}function Ws(t,n){Rg()||Vg(),t.equal(t.value,n)||(t.value=n,ZD(t))}function zg(t,n){Rg()||Vg(),Ws(t,n(t.value))}var Fu=ae(_({},er),{equal:Su,value:void 0});function ZD(t){t.version++,WD(),Ag(t),YD?.()}function Ug(t,n,e){let i=Object.create(XD);e&&(i.consumerAllowSignalWrites=!0),i.fn=t,i.schedule=n;let r=c=>{i.cleanupFn=c};function o(c){return c.fn===null&&c.schedule===null}function a(c){o(c)||(Hr(c),c.cleanupFn(),c.fn=null,c.schedule=null,c.cleanupFn=Tu)}let s=()=>{if(i.fn===null)return;if(GD())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(i.dirty=!1,i.hasRun&&!ha(i))return;i.hasRun=!0;let c=Ur(i);try{i.cleanupFn(),i.cleanupFn=Tu,i.fn(r)}finally{ua(i,c)}};return i.ref={notify:()=>Og(i),run:s,cleanup:()=>i.cleanupFn(),destroy:()=>a(i),[Dt]:i},i.ref}var Tu=()=>{},XD=ae(_({},er),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:t=>{t.schedule!==null&&t.schedule(t.ref)},hasRun:!1,cleanupFn:Tu});function J(t){return typeof t=="function"}function $r(t){let e=t(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var qs=$r(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: ${e.map((i,r)=>`${r+1}) ${i.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function tr(t,n){if(t){let e=t.indexOf(n);0<=e&&t.splice(e,1)}}var ue=class t{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(J(i))try{i()}catch(o){n=o instanceof qs?o.errors:[o]}let{_teardowns:r}=this;if(r){this._teardowns=null;for(let o of r)try{Hg(o)}catch(a){n=n??[],a instanceof qs?n=[...n,...a.errors]:n.push(a)}}if(n)throw new qs(n)}}add(n){var e;if(n&&n!==this)if(this.closed)Hg(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._teardowns=(e=this._teardowns)!==null&&e!==void 0?e:[]).push(n)}}_hasParent(n){let{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){let{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&tr(e,n)}remove(n){let{_teardowns:e}=this;e&&tr(e,n),n instanceof t&&n._removeParent(this)}};ue.EMPTY=(()=>{let t=new ue;return t.closed=!0,t})();var Nu=ue.EMPTY;function Qs(t){return t instanceof ue||t&&"closed"in t&&J(t.remove)&&J(t.add)&&J(t.unsubscribe)}function Hg(t){J(t)?t():t.unsubscribe()}var mi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Gr={setTimeout(...t){let{delegate:n}=Gr;return(n?.setTimeout||setTimeout)(...t)},clearTimeout(t){let{delegate:n}=Gr;return(n?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Ys(t){Gr.setTimeout(()=>{let{onUnhandledError:n}=mi;if(n)n(t);else throw t})}function ir(){}var $g=Pu("C",void 0,void 0);function Gg(t){return Pu("E",void 0,t)}function Wg(t){return Pu("N",t,void 0)}function Pu(t,n,e){return{kind:t,value:n,error:e}}var nr=null;function Wr(t){if(mi.useDeprecatedSynchronousErrorHandling){let n=!nr;if(n&&(nr={errorThrown:!1,error:null}),t(),n){let{errorThrown:e,error:i}=nr;if(nr=null,e)throw i}}else t()}function qg(t){mi.useDeprecatedSynchronousErrorHandling&&nr&&(nr.errorThrown=!0,nr.error=t)}var rr=class extends ue{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Qs(n)&&n.add(this)):this.destination=KD}static create(n,e,i){return new or(n,e,i)}next(n){this.isStopped?Vu(Wg(n),this):this._next(n)}error(n){this.isStopped?Vu(Gg(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Vu($g,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()}}},or=class extends rr{constructor(n,e,i){super();let r;if(J(n))r=n;else if(n){({next:r,error:e,complete:i}=n);let o;this&&mi.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe()):o=n,r=r?.bind(o),e=e?.bind(o),i=i?.bind(o)}this.destination={next:r?Lu(r,this):ir,error:Lu(e??Qg,this),complete:i?Lu(i,this):ir}}};function Lu(t,n){return(...e)=>{try{t(...e)}catch(i){mi.useDeprecatedSynchronousErrorHandling?qg(i):Ys(i)}}}function Qg(t){throw t}function Vu(t,n){let{onStoppedNotification:e}=mi;e&&Gr.setTimeout(()=>e(t,n))}var KD={closed:!0,next:ir,error:Qg,complete:ir};var qr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function At(t){return t}function Bu(...t){return ju(t)}function ju(t){return t.length===0?At:t.length===1?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}var ne=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=eI(e)?e:new or(e,i,r);return Wr(()=>{let{operator:a,source:s}=this;o.add(a?a.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return i=Yg(i),new i((r,o)=>{let a;a=this.subscribe(s=>{try{e(s)}catch(c){o(c),a?.unsubscribe()}},o,r)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[qr](){return this}pipe(...e){return ju(e)(this)}toPromise(e){return e=Yg(e),new e((i,r)=>{let o;this.subscribe(a=>o=a,a=>r(a),()=>i(o))})}}return t.create=n=>new t(n),t})();function Yg(t){var n;return(n=t??mi.Promise)!==null&&n!==void 0?n:Promise}function JD(t){return t&&J(t.next)&&J(t.error)&&J(t.complete)}function eI(t){return t&&t instanceof rr||JD(t)&&Qs(t)}function zu(t){return J(t?.lift)}function se(t){return n=>{if(zu(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}var re=class extends rr{constructor(n,e,i,r,o){super(n),this.onFinalize=o,this._next=e?function(a){try{e(a)}catch(s){n.error(s)}}:super._next,this._error=r?function(a){try{r(a)}catch(s){n.error(s)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;let{closed:e}=this;super.unsubscribe(),!e&&((n=this.onFinalize)===null||n===void 0||n.call(this))}};function Qr(){return se((t,n)=>{let e=null;t._refCount++;let i=new re(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let r=t._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}var ar=class extends ne{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,zu(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){let n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new ue;let e=this.getSubject();n.add(this.source.subscribe(new re(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=ue.EMPTY)}return n}refCount(){return Qr()(this)}};var Yr={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Yr;i&&(n=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=n(o=>{e=void 0,t(o)});return new ue(()=>e?.(r))},requestAnimationFrame(...t){let{delegate:n}=Yr;return(n?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:n}=Yr;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var Zg=$r(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var w=(()=>{class t extends ne{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new Zs(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Zg}next(e){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){let i=this.observers.slice();for(let r of i)r.next(e)}})}error(e){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:r,observers:o}=this;return i||r?Nu:(o.push(e),new ue(()=>tr(o,e)))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new ne;return e.source=this,e}}return t.create=(n,e)=>new Zs(n,e),t})(),Zs=class extends w{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,n)}error(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.call(e,n)}complete(){var n,e;(e=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||e===void 0||e.call(n)}_subscribe(n){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(n))!==null&&i!==void 0?i:Nu}};var et=class extends w{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){let{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}};var ma={now(){return(ma.delegate||Date).now()},delegate:void 0};var Xs=class extends w{constructor(n=1/0,e=1/0,i=ma){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:a}=this;e||(i.push(n),!r&&i.push(o.now()+a)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let a=0;a<o.length&&!n.closed;a+=i?1:2)n.next(o[a]);return this._checkFinalizedStatuses(n),e}_trimBuffer(){let{_bufferSize:n,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*n;if(n<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let a=e.now(),s=0;for(let c=1;c<i.length&&i[c]<=a;c+=2)s=c;s&&i.splice(0,s+1)}}};var Uu=class extends w{constructor(){super(...arguments),this._value=null,this._hasValue=!1,this._isComplete=!1}_checkFinalizedStatuses(n){let{hasError:e,_hasValue:i,_value:r,thrownError:o,isStopped:a,_isComplete:s}=this;e?n.error(o):(a||s)&&(i&&n.next(r),n.complete())}next(n){this.isStopped||(this._value=n,this._hasValue=!0)}complete(){let{_hasValue:n,_value:e,_isComplete:i}=this;i||(this._isComplete=!0,n&&super.next(e),super.complete())}};var Ks=class extends ue{constructor(n,e){super()}schedule(n,e=0){return this}};var pa={setInterval(...t){let{delegate:n}=pa;return(n?.setInterval||setInterval)(...t)},clearInterval(t){let{delegate:n}=pa;return(n?.clearInterval||clearInterval)(t)},delegate:void 0};var Zr=class extends Ks{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;let i=this.id,r=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return pa.setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return e;pa.clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(n,e);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let i=!1,r;try{this.work(n)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:n,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,tr(i,this),n!=null&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,super.unsubscribe()}}};var Xr=class t{constructor(n,e=t.now){this.schedulerActionCtor=n,this.now=e}schedule(n,e=0,i){return new this.schedulerActionCtor(this,n).schedule(i,e)}};Xr.now=ma.now;var Kr=class extends Xr{constructor(n,e=Xr.now){super(n,e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(n){let{actions:e}=this;if(this._active){e.push(n);return}let i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=e.shift());if(this._active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}};var fa=new Kr(Zr),Js=fa;var ec=class extends Zr{constructor(n,e){super(n,e),this.scheduler=n,this.work=e}requestAsyncId(n,e,i=0){return i!==null&&i>0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=Yr.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,i=0){if(i!=null&&i>0||i==null&&this.delay>0)return super.recycleAsyncId(n,e,i);n.actions.length===0&&(Yr.cancelAnimationFrame(e),n._scheduled=void 0)}};var tc=class extends Kr{flush(n){this._active=!0,this._scheduled=void 0;let{actions:e}=this,i,r=-1;n=n||e.shift();let o=e.length;do if(i=n.execute(n.state,n.delay))break;while(++r<o&&(n=e.shift()));if(this._active=!1,i){for(;++r<o&&(n=e.shift());)n.unsubscribe();throw i}}};var Xg=new tc(ec);var ct=new ne(t=>t.complete());function ic(t){return t&&J(t.schedule)}function Hu(t){return t[t.length-1]}function nc(t){return J(Hu(t))?t.pop():void 0}function Fi(t){return ic(Hu(t))?t.pop():void 0}function Kg(t,n){return typeof Hu(t)=="number"?t.pop():n}function e_(t,n,e,i){function r(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(u){try{d(i.next(u))}catch(h){a(h)}}function c(u){try{d(i.throw(u))}catch(h){a(h)}}function d(u){u.done?o(u.value):r(u.value).then(s,c)}d((i=i.apply(t,n||[])).next())})}function Jg(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function sr(t){return this instanceof sr?(this.v=t,this):new sr(t)}function t_(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(t,n||[]),r,o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(m){i[m]&&(r[m]=function(p){return new Promise(function(y,C){o.push([m,p,y,C])>1||s(m,p)})})}function s(m,p){try{c(i[m](p))}catch(y){h(o[0][3],y)}}function c(m){m.value instanceof sr?Promise.resolve(m.value.v).then(d,u):h(o[0][2],m)}function d(m){s("next",m)}function u(m){s("throw",m)}function h(m,p){m(p),o.shift(),o.length&&s(o[0][0],o[0][1])}}function i_(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof Jg=="function"?Jg(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=t[o]&&function(a){return new Promise(function(s,c){a=t[o](a),r(s,c,a.done,a.value)})}}function r(o,a,s,c){Promise.resolve(c).then(function(d){o({value:d,done:s})},a)}}var Jr=t=>t&&typeof t.length=="number"&&typeof t!="function";function rc(t){return J(t?.then)}function oc(t){return J(t[qr])}function ac(t){return Symbol.asyncIterator&&J(t?.[Symbol.asyncIterator])}function sc(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function tI(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cc=tI();function lc(t){return J(t?.[cc])}function dc(t){return t_(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:i,done:r}=yield sr(e.read());if(r)return yield sr(void 0);yield yield sr(i)}}finally{e.releaseLock()}})}function uc(t){return J(t?.getReader)}function je(t){if(t instanceof ne)return t;if(t!=null){if(oc(t))return iI(t);if(Jr(t))return nI(t);if(rc(t))return rI(t);if(ac(t))return n_(t);if(lc(t))return oI(t);if(uc(t))return aI(t)}throw sc(t)}function iI(t){return new ne(n=>{let e=t[qr]();if(J(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function nI(t){return new ne(n=>{for(let e=0;e<t.length&&!n.closed;e++)n.next(t[e]);n.complete()})}function rI(t){return new ne(n=>{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ys)})}function oI(t){return new ne(n=>{for(let e of t)if(n.next(e),n.closed)return;n.complete()})}function n_(t){return new ne(n=>{sI(t,n).catch(e=>n.error(e))})}function aI(t){return n_(dc(t))}function sI(t,n){var e,i,r,o;return e_(this,void 0,void 0,function*(){try{for(e=i_(t);i=yield e.next(),!i.done;){let a=i.value;if(n.next(a),n.closed)return}}catch(a){r={error:a}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}n.complete()})}function Vt(t,n,e,i=0,r=!1){let o=n.schedule(function(){e(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(o),!r)return o}function hc(t,n=0){return se((e,i)=>{e.subscribe(new re(i,r=>Vt(i,t,()=>i.next(r),n),()=>Vt(i,t,()=>i.complete(),n),r=>Vt(i,t,()=>i.error(r),n)))})}function mc(t,n=0){return se((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function r_(t,n){return je(t).pipe(mc(n),hc(n))}function o_(t,n){return je(t).pipe(mc(n),hc(n))}function a_(t,n){return new ne(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}function s_(t,n){return new ne(e=>{let i;return Vt(e,n,()=>{i=t[cc](),Vt(e,n,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),()=>J(i?.return)&&i.return()})}function pc(t,n){if(!t)throw new Error("Iterable cannot be null");return new ne(e=>{Vt(e,n,()=>{let i=t[Symbol.asyncIterator]();Vt(e,n,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function c_(t,n){return pc(dc(t),n)}function l_(t,n){if(t!=null){if(oc(t))return r_(t,n);if(Jr(t))return a_(t,n);if(rc(t))return o_(t,n);if(ac(t))return pc(t,n);if(lc(t))return s_(t,n);if(uc(t))return c_(t,n)}throw sc(t)}function Oe(t,n){return n?l_(t,n):je(t)}function z(...t){let n=Fi(t);return Oe(t,n)}function Ni(t,n){let e=J(t)?t:()=>t,i=r=>r.error(e());return new ne(n?r=>n.schedule(i,0,r):i)}function eo(t){return!!t&&(t instanceof ne||J(t.lift)&&J(t.subscribe))}var tn=$r(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function d_(t){return t instanceof Date&&!isNaN(t)}function G(t,n){return se((e,i)=>{let r=0;e.subscribe(new re(i,o=>{i.next(t.call(n,o,r++))}))})}var{isArray:cI}=Array;function lI(t,n){return cI(n)?t(...n):t(n)}function to(t){return G(n=>lI(t,n))}var{isArray:dI}=Array,{getPrototypeOf:uI,prototype:hI,keys:mI}=Object;function fc(t){if(t.length===1){let n=t[0];if(dI(n))return{args:n,keys:null};if(pI(n)){let e=mI(n);return{args:e.map(i=>n[i]),keys:e}}}return{args:t,keys:null}}function pI(t){return t&&typeof t=="object"&&uI(t)===hI}function gc(t,n){return t.reduce((e,i,r)=>(e[i]=n[r],e),{})}function cr(...t){let n=Fi(t),e=nc(t),{args:i,keys:r}=fc(t);if(i.length===0)return Oe([],n);let o=new ne(fI(i,n,r?a=>gc(r,a):At));return e?o.pipe(to(e)):o}function fI(t,n,e=At){return i=>{u_(n,()=>{let{length:r}=t,o=new Array(r),a=r,s=r;for(let c=0;c<r;c++)u_(n,()=>{let d=Oe(t[c],n),u=!1;d.subscribe(new re(i,h=>{o[c]=h,u||(u=!0,s--),s||i.next(e(o.slice()))},()=>{--a||i.complete()}))},i)},i)}}function u_(t,n,e){t?Vt(e,t,n):n()}function h_(t,n,e,i,r,o,a,s){let c=[],d=0,u=0,h=!1,m=()=>{h&&!c.length&&!d&&n.complete()},p=C=>d<i?y(C):c.push(C),y=C=>{o&&n.next(C),d++;let j=!1;je(e(C,u++)).subscribe(new re(n,X=>{r?.(X),o?p(X):n.next(X)},()=>{j=!0},void 0,()=>{if(j)try{for(d--;c.length&&d<i;){let X=c.shift();a?Vt(n,a,()=>y(X)):y(X)}m()}catch(X){n.error(X)}}))};return t.subscribe(new re(n,p,()=>{h=!0,m()})),()=>{s?.()}}function Xe(t,n,e=1/0){return J(n)?Xe((i,r)=>G((o,a)=>n(i,o,r,a))(je(t(i,r))),e):(typeof n=="number"&&(e=n),se((i,r)=>h_(i,r,t,e)))}function Pi(t=1/0){return Xe(At,t)}function m_(){return Pi(1)}function Sn(...t){return m_()(Oe(t,Fi(t)))}function Li(t){return new ne(n=>{je(t()).subscribe(n)})}function ga(...t){let n=nc(t),{args:e,keys:i}=fc(t),r=new ne(o=>{let{length:a}=e;if(!a){o.complete();return}let s=new Array(a),c=a,d=a;for(let u=0;u<a;u++){let h=!1;je(e[u]).subscribe(new re(o,m=>{h||(h=!0,d--),s[u]=m},()=>c--,void 0,()=>{(!c||!h)&&(d||o.next(i?gc(i,s):s),o.complete())}))}});return n?r.pipe(to(n)):r}var gI=["addListener","removeListener"],_I=["addEventListener","removeEventListener"],bI=["on","off"];function pi(t,n,e,i){if(J(e)&&(i=e,e=void 0),i)return pi(t,n,e).pipe(to(i));let[r,o]=wI(t)?_I.map(a=>s=>t[a](n,s,e)):vI(t)?gI.map(p_(t,n)):yI(t)?bI.map(p_(t,n)):[];if(!r&&Jr(t))return Xe(a=>pi(a,n,e))(je(t));if(!r)throw new TypeError("Invalid event target");return new ne(a=>{let s=(...c)=>a.next(1<c.length?c:c[0]);return r(s),()=>o(s)})}function p_(t,n){return e=>i=>t[e](n,i)}function vI(t){return J(t.addListener)&&J(t.removeListener)}function yI(t){return J(t.on)&&J(t.off)}function wI(t){return J(t.addEventListener)&&J(t.removeEventListener)}function lr(t=0,n,e=Js){let i=-1;return n!=null&&(ic(n)?e=n:i=n),new ne(r=>{let o=d_(t)?+t-e.now():t;o<0&&(o=0);let a=0;return e.schedule(function(){r.closed||(r.next(a++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function xI(t=0,n=fa){return t<0&&(t=0),lr(t,t,n)}function rt(...t){let n=Fi(t),e=Kg(t,1/0),i=t;return i.length?i.length===1?je(i[0]):Pi(e)(Oe(i,n)):ct}function xe(t,n){return se((e,i)=>{let r=0;e.subscribe(new re(i,o=>t.call(n,o,r++)&&i.next(o)))})}function f_(t){return se((n,e)=>{let i=!1,r=null,o=null,a=!1,s=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let d=r;r=null,e.next(d)}a&&e.complete()},c=()=>{o=null,a&&e.complete()};n.subscribe(new re(e,d=>{i=!0,r=d,o||je(t(d)).subscribe(o=new re(e,s,c))},()=>{a=!0,(!i||!o||o.closed)&&e.complete()}))})}function _c(t,n=Js){return f_(()=>lr(t,n))}function ii(t){return se((n,e)=>{let i=null,r=!1,o;i=n.subscribe(new re(e,void 0,void 0,a=>{o=je(t(a,ii(t)(n))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function g_(t,n,e,i,r){return(o,a)=>{let s=e,c=n,d=0;o.subscribe(new re(a,u=>{let h=d++;c=s?t(c,u,h):(s=!0,u),i&&a.next(c)},r&&(()=>{s&&a.next(c),a.complete()})))}}function nn(t,n){return J(n)?Xe(t,n,1):Xe(t,1)}function rn(t,n=fa){return se((e,i)=>{let r=null,o=null,a=null,s=()=>{if(r){r.unsubscribe(),r=null;let d=o;o=null,i.next(d)}};function c(){let d=a+t,u=n.now();if(u<d){r=this.schedule(void 0,d-u),i.add(r);return}s()}e.subscribe(new re(i,d=>{o=d,a=n.now(),r||(r=n.schedule(c,t),i.add(r))},()=>{s(),i.complete()},void 0,()=>{o=r=null}))})}function An(t){return se((n,e)=>{let i=!1;n.subscribe(new re(e,r=>{i=!0,e.next(r)},()=>{i||e.next(t),e.complete()}))})}function Ue(t){return t<=0?()=>ct:se((n,e)=>{let i=0;n.subscribe(new re(e,r=>{++i<=t&&(e.next(r),t<=i&&e.complete())}))})}function io(t,n=At){return t=t??CI,se((e,i)=>{let r,o=!0;e.subscribe(new re(i,a=>{let s=n(a);(o||!t(r,s))&&(o=!1,r=s,i.next(a))}))})}function CI(t,n){return t===n}function bc(t=DI){return se((n,e)=>{let i=!1;n.subscribe(new re(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(t())))})}function DI(){return new tn}function Vi(t){return se((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}function on(t,n){let e=arguments.length>=2;return i=>i.pipe(t?xe((r,o)=>t(r,o,i)):At,Ue(1),e?An(n):bc(()=>new tn))}function no(t){return t<=0?()=>ct:se((n,e)=>{let i=[];n.subscribe(new re(e,r=>{i.push(r),t<i.length&&i.shift()},()=>{for(let r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function $u(t,n){let e=arguments.length>=2;return i=>i.pipe(t?xe((r,o)=>t(r,o,i)):At,no(1),e?An(n):bc(()=>new tn))}function vc(){return se((t,n)=>{let e,i=!1;t.subscribe(new re(n,r=>{let o=e;e=r,i&&n.next([o,r]),i=!0}))})}function Gu(t,n){return se(g_(t,n,arguments.length>=2,!0))}function _a(t={}){let{connector:n=()=>new w,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=t;return o=>{let a=null,s=null,c=null,d=0,u=!1,h=!1,m=()=>{s?.unsubscribe(),s=null},p=()=>{m(),a=c=null,u=h=!1},y=()=>{let C=a;p(),C?.unsubscribe()};return se((C,j)=>{d++,!h&&!u&&m();let X=c=c??n();j.add(()=>{d--,d===0&&!h&&!u&&(s=Wu(y,r))}),X.subscribe(j),a||(a=new or({next:Ee=>X.next(Ee),error:Ee=>{h=!0,m(),s=Wu(p,e,Ee),X.error(Ee)},complete:()=>{u=!0,m(),s=Wu(p,i),X.complete()}}),Oe(C).subscribe(a))})(o)}}function Wu(t,n,...e){return n===!0?(t(),null):n===!1?null:n(...e).pipe(Ue(1)).subscribe(()=>t())}function yc(t,n,e){var i,r;let o,a=!1;return t&&typeof t=="object"?(o=(i=t.bufferSize)!==null&&i!==void 0?i:1/0,n=(r=t.windowTime)!==null&&r!==void 0?r:1/0,a=!!t.refCount,e=t.scheduler):o=t??1/0,_a({connector:()=>new Xs(o,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function dr(t){return xe((n,e)=>t<=e)}function Ke(...t){let n=Fi(t);return se((e,i)=>{(n?Sn(t,e,n):Sn(t,e)).subscribe(i)})}function qe(t,n){return se((e,i)=>{let r=null,o=0,a=!1,s=()=>a&&!r&&i.complete();e.subscribe(new re(i,c=>{r?.unsubscribe();let d=0,u=o++;je(t(c,u)).subscribe(r=new re(i,h=>i.next(n?n(c,h,u,d++):h),()=>{r=null,s()}))},()=>{a=!0,s()}))})}function he(t){return se((n,e)=>{je(t).subscribe(new re(e,()=>e.complete(),ir)),!e.closed&&n.subscribe(e)})}function qu(t,n=!1){return se((e,i)=>{let r=0;e.subscribe(new re(i,o=>{let a=t(o,r++);(a||n)&&i.next(o),!a&&i.complete()}))})}function He(t,n,e){let i=J(t)||n||e?{next:t,error:n,complete:e}:t;return i?se((r,o)=>{var a;(a=i.subscribe)===null||a===void 0||a.call(i);let s=!0;r.subscribe(new re(o,c=>{var d;(d=i.next)===null||d===void 0||d.call(i,c),o.next(c)},()=>{var c;s=!1,(c=i.complete)===null||c===void 0||c.call(i),o.complete()},c=>{var d;s=!1,(d=i.error)===null||d===void 0||d.call(i,c),o.error(c)},()=>{var c,d;s&&((c=i.unsubscribe)===null||c===void 0||c.call(i)),(d=i.finalize)===null||d===void 0||d.call(i)}))}):At}var cb="https://g.co/ng/security#xss",$=class extends Error{code;constructor(n,e){super(dl(n,e)),this.code=n}};function dl(t,n){return`${`NG0${Math.abs(t)}`}${n?": "+n:""}`}var lb=Symbol("InputSignalNode#UNSET"),II=ae(_({},Fu),{transformFn:void 0,applyValueToInputSignal(t,n){Ws(t,n)}});function db(t,n){let e=Object.create(II);e.value=t,e.transformFn=n?.transform;function i(){if(Hs(e),e.value===lb)throw new $(-950,!1);return e.value}return i[Dt]=e,i}function Aa(t){return{toString:t}.toString()}var wc="__parameters__";function EI(t){return function(...e){if(t){let i=t(...e);for(let r in i)this[r]=i[r]}}}function ub(t,n,e){return Aa(()=>{let i=EI(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;let a=new r(...o);return s.annotation=a,s;function s(c,d,u){let h=c.hasOwnProperty(wc)?c[wc]:Object.defineProperty(c,wc,{value:[]})[wc];for(;h.length<=u;)h.push(null);return(h[u]=h[u]||[]).push(a),c}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}var Qt=globalThis;function Ve(t){for(let n in t)if(t[n]===Ve)return n;throw Error("Could not find renamed property on target object.")}function kI(t,n){for(let e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Ot(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(Ot).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let n=t.toString();if(n==null)return""+n;let e=n.indexOf(` `);return e===-1?n:n.substring(0,e)}function ah(t,n){return t==null||t===""?n===null?"":n:n==null||n===""?t:t+" "+n}var MI=Ve({__forward_ref__:Ve});function $e(t){return t.__forward_ref__=$e,t.toString=function(){return Ot(this())},t}function yt(t){return hb(t)?t():t}function hb(t){return typeof t=="function"&&t.hasOwnProperty(MI)&&t.__forward_ref__===$e}function v(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function I(t){return{providers:t.providers||[],imports:t.imports||[]}}function ul(t){return __(t,pb)||__(t,fb)}function mb(t){return ul(t)!==null}function __(t,n){return t.hasOwnProperty(n)?t[n]:null}function TI(t){let n=t&&(t[pb]||t[fb]);return n||null}function b_(t){return t&&(t.hasOwnProperty(v_)||t.hasOwnProperty(SI))?t[v_]:null}var pb=Ve({\u0275prov:Ve}),v_=Ve({\u0275inj:Ve}),fb=Ve({ngInjectableDef:Ve}),SI=Ve({ngInjectorDef:Ve}),f=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,e){this._desc=n,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=v({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function gb(t){return t&&!!t.\u0275providers}var AI=Ve({\u0275cmp:Ve}),RI=Ve({\u0275dir:Ve}),OI=Ve({\u0275pipe:Ve}),FI=Ve({\u0275mod:Ve}),Fc=Ve({\u0275fac:Ve}),wa=Ve({__NG_ELEMENT_ID__:Ve}),y_=Ve({__NG_ENV_ID__:Ve});function uo(t){return typeof t=="string"?t:t==null?"":String(t)}function NI(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():uo(t)}function PI(t,n){let e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new $(-200,t)}function fm(t,n){throw new $(-201,!1)}var De=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(De||{}),sh;function _b(){return sh}function ni(t){let n=sh;return sh=t,n}function bb(t,n,e){let i=ul(t);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&De.Optional)return null;if(n!==void 0)return n;fm(t,"Injector")}var LI={},Ca=LI,ch="__NG_DI_FLAG__",Nc="ngTempTokenPath",VI="ngTokenPath",BI=/\n/gm,jI="\u0275",w_="__source",co;function zI(){return co}function Rn(t){let n=co;return co=t,n}function UI(t,n=De.Default){if(co===void 0)throw new $(-203,!1);return co===null?bb(t,void 0,n):co.get(t,n&De.Optional?null:void 0,n)}function F(t,n=De.Default){return(_b()||UI)(yt(t),n)}function l(t,n=De.Default){return F(t,hl(n))}function hl(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function lh(t){let n=[];for(let e=0;e<t.length;e++){let i=yt(t[e]);if(Array.isArray(i)){if(i.length===0)throw new $(900,!1);let r,o=De.Default;for(let a=0;a<i.length;a++){let s=i[a],c=HI(s);typeof c=="number"?c===-1?r=s.token:o|=c:r=s}n.push(F(r,o))}else n.push(F(i))}return n}function vb(t,n){return t[ch]=n,t.prototype[ch]=n,t}function HI(t){return t[ch]}function $I(t,n,e,i){let r=t[Nc];throw n[w_]&&r.unshift(n[w_]),t.message=GI(` `+t.message,r,e,i),t[VI]=r,t[Nc]=null,t}function GI(t,n,e,i=null){t=t&&t.charAt(0)===` `&&t.charAt(1)==jI?t.slice(2):t;let r=Ot(n);if(Array.isArray(n))r=n.map(Ot).join(" -> ");else if(typeof n=="object"){let o=[];for(let a in n)if(n.hasOwnProperty(a)){let s=n[a];o.push(a+":"+(typeof s=="string"?JSON.stringify(s):Ot(s)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(BI,` `)}`}var Co=vb(ub("Optional"),8);var ml=vb(ub("SkipSelf"),4);function ho(t,n){let e=t.hasOwnProperty(Fc);return e?t[Fc]:null}function WI(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],o=n[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}function qI(t){return t.flat(Number.POSITIVE_INFINITY)}function gm(t,n){t.forEach(e=>Array.isArray(e)?gm(e,n):n(e))}function yb(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Pc(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function QI(t,n){let e=[];for(let i=0;i<t;i++)e.push(n);return e}function YI(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(r===1)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;){let o=r-2;t[r]=t[o],r--}t[n]=e,t[n+1]=i}}function pl(t,n,e){let i=Ra(t,n);return i>=0?t[i|1]=e:(i=~i,YI(t,i,n,e)),i}function Qu(t,n){let e=Ra(t,n);if(e>=0)return t[e|1]}function Ra(t,n){return ZI(t,n,1)}function ZI(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){let o=i+(r-i>>1),a=t[o<<e];if(n===a)return o<<e;a>n?r=o:i=o+1}return~(r<<e)}var an={},Rt=[],mo=new f(""),wb=new f("",-1),xb=new f(""),Lc=class{get(n,e=Ca){if(e===Ca){let i=new Error(`NullInjectorError: No provider for ${Ot(n)}!`);throw i.name="NullInjectorError",i}return e}};function Cb(t,n){let e=t[FI]||null;if(!e&&n===!0)throw new Error(`Type ${Ot(t)} does not have '\u0275mod' property.`);return e}function sn(t){return t[AI]||null}function _m(t){return t[RI]||null}function Db(t){return t[OI]||null}function Ib(t){let n=sn(t)||_m(t)||Db(t);return n!==null&&n.standalone}function fl(t){return{\u0275providers:t}}function XI(...t){return{\u0275providers:Eb(!0,t),\u0275fromNgModule:!0}}function Eb(t,...n){let e=[],i=new Set,r,o=a=>{e.push(a)};return gm(n,a=>{let s=a;dh(s,o,[],i)&&(r||=[],r.push(s))}),r!==void 0&&kb(r,o),e}function kb(t,n){for(let e=0;e<t.length;e++){let{ngModule:i,providers:r}=t[e];bm(r,o=>{n(o,i)})}}function dh(t,n,e,i){if(t=yt(t),!t)return!1;let r=null,o=b_(t),a=!o&&sn(t);if(!o&&!a){let c=t.ngModule;if(o=b_(c),o)r=c;else return!1}else{if(a&&!a.standalone)return!1;r=t}let s=i.has(r);if(a){if(s)return!1;if(i.add(r),a.dependencies){let c=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let d of c)dh(d,n,e,i)}}else if(o){if(o.imports!=null&&!s){i.add(r);let d;try{gm(o.imports,u=>{dh(u,n,e,i)&&(d||=[],d.push(u))})}finally{}d!==void 0&&kb(d,n)}if(!s){let d=ho(r)||(()=>new r);n({provide:r,useFactory:d,deps:Rt},r),n({provide:xb,useValue:r,multi:!0},r),n({provide:mo,useValue:()=>F(r),multi:!0},r)}let c=o.providers;if(c!=null&&!s){let d=t;bm(c,u=>{n(u,d)})}}else return!1;return r!==t&&t.providers!==void 0}function bm(t,n){for(let e of t)gb(e)&&(e=e.\u0275providers),Array.isArray(e)?bm(e,n):n(e)}var KI=Ve({provide:String,useValue:Ve});function Mb(t){return t!==null&&typeof t=="object"&&KI in t}function JI(t){return!!(t&&t.useExisting)}function eE(t){return!!(t&&t.useFactory)}function po(t){return typeof t=="function"}function tE(t){return!!t.useClass}var gl=new f(""),Mc={},iE={},Yu;function _l(){return Yu===void 0&&(Yu=new Lc),Yu}var lt=class{},Da=class extends lt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,hh(n,a=>this.processProvider(a)),this.records.set(wb,ro(void 0,this)),r.has("environment")&&this.records.set(lt,ro(void 0,this));let o=this.records.get(gl);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(xb,Rt,De.Self))}destroy(){va(this),this._destroyed=!0;let n=Ie(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ie(n)}}onDestroy(n){return va(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){va(this);let e=Rn(this),i=ni(void 0),r;try{return n()}finally{Rn(e),ni(i)}}get(n,e=Ca,i=De.Default){if(va(this),n.hasOwnProperty(y_))return n[y_](this);i=hl(i);let r,o=Rn(this),a=ni(void 0);try{if(!(i&De.SkipSelf)){let c=this.records.get(n);if(c===void 0){let d=sE(n)&&ul(n);d&&this.injectableDefInScope(d)?c=ro(uh(n),Mc):c=null,this.records.set(n,c)}if(c!=null)return this.hydrate(n,c)}let s=i&De.Self?_l():this.parent;return e=i&De.Optional&&e===Ca?null:e,s.get(n,e)}catch(s){if(s.name==="NullInjectorError"){if((s[Nc]=s[Nc]||[]).unshift(Ot(n)),o)throw s;return $I(s,n,"R3InjectorError",this.source)}else throw s}finally{ni(a),Rn(o)}}resolveInjectorInitializers(){let n=Ie(null),e=Rn(this),i=ni(void 0),r;try{let o=this.get(mo,Rt,De.Self);for(let a of o)a()}finally{Rn(e),ni(i),Ie(n)}}toString(){let n=[],e=this.records;for(let i of e.keys())n.push(Ot(i));return`R3Injector[${n.join(", ")}]`}processProvider(n){n=yt(n);let e=po(n)?n:yt(n&&n.provide),i=rE(n);if(!po(n)&&n.multi===!0){let r=this.records.get(e);r||(r=ro(void 0,Mc,!0),r.factory=()=>lh(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){let i=Ie(null);try{return e.value===Mc&&(e.value=iE,e.value=e.factory()),typeof e.value=="object"&&e.value&&aE(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Ie(i)}}injectableDefInScope(n){if(!n.providedIn)return!1;let e=yt(n.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(n){let e=this._onDestroyHooks.indexOf(n);e!==-1&&this._onDestroyHooks.splice(e,1)}};function uh(t){let n=ul(t),e=n!==null?n.factory:ho(t);if(e!==null)return e;if(t instanceof f)throw new $(204,!1);if(t instanceof Function)return nE(t);throw new $(204,!1)}function nE(t){if(t.length>0)throw new $(204,!1);let e=TI(t);return e!==null?()=>e.factory(t):()=>new t}function rE(t){if(Mb(t))return ro(void 0,t.useValue);{let n=Tb(t);return ro(n,Mc)}}function Tb(t,n,e){let i;if(po(t)){let r=yt(t);return ho(r)||uh(r)}else if(Mb(t))i=()=>yt(t.useValue);else if(eE(t))i=()=>t.useFactory(...lh(t.deps||[]));else if(JI(t))i=()=>F(yt(t.useExisting));else{let r=yt(t&&(t.useClass||t.provide));if(oE(t))i=()=>new r(...lh(t.deps));else return ho(r)||uh(r)}return i}function va(t){if(t.destroyed)throw new $(205,!1)}function ro(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function oE(t){return!!t.deps}function aE(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function sE(t){return typeof t=="function"||typeof t=="object"&&t instanceof f}function hh(t,n){for(let e of t)Array.isArray(e)?hh(e,n):e&&gb(e)?hh(e.\u0275providers,n):n(e)}function zt(t,n){t instanceof Da&&va(t);let e,i=Rn(t),r=ni(void 0);try{return n()}finally{Rn(i),ni(r)}}function Sb(){return _b()!==void 0||zI()!=null}function bl(t){if(!Sb())throw new $(-203,!1)}function cE(t){let n=Qt.ng;if(n&&n.\u0275compilerFacade)return n.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function lE(t){return typeof t=="function"}var $i=0,fe=1,ee=2,kt=3,_i=4,Ut=5,fo=6,Vc=7,It=8,go=9,cn=10,Qe=11,Ia=12,x_=13,Do=14,Yt=15,hr=16,oo=17,ln=18,vl=19,Ab=20,On=21,Tc=22,mr=23,qt=24,Bt=25,vm=1;var pr=7,Bc=8,_o=9,Et=10,jc=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(jc||{});function Fn(t){return Array.isArray(t)&&typeof t[vm]=="object"}function mn(t){return Array.isArray(t)&&t[vm]===!0}function Rb(t){return(t.flags&4)!==0}function yl(t){return t.componentOffset>-1}function ym(t){return(t.flags&1)===1}function dn(t){return!!t.template}function mh(t){return(t[ee]&512)!==0}var ph=class{previousValue;currentValue;firstChange;constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function Ob(t,n,e,i){n!==null?n.applyValueToInputSignal(n,i):t[e]=i}var Pe=(()=>{let t=()=>Fb;return t.ngInherit=!0,t})();function Fb(t){return t.type.prototype.ngOnChanges&&(t.setInput=uE),dE}function dE(){let t=Pb(this),n=t?.current;if(n){let e=t.previous;if(e===an)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function uE(t,n,e,i,r){let o=this.declaredInputs[i],a=Pb(t)||hE(t,{previous:an,current:null}),s=a.current||(a.current={}),c=a.previous,d=c[o];s[o]=new ph(d&&d.currentValue,e,c===an),Ob(t,n,r,e)}var Nb="__ngSimpleChanges__";function Pb(t){return t[Nb]||null}function hE(t,n){return t[Nb]=n}var C_=null;var Bi=function(t,n,e){C_?.(t,n,e)},Lb="svg",mE="math";function zi(t){for(;Array.isArray(t);)t=t[$i];return t}function pE(t){for(;Array.isArray(t);){if(typeof t[vm]=="object")return t;t=t[$i]}return null}function Vb(t,n){return zi(n[t])}function ri(t,n){return zi(n[t.index])}function wm(t,n){return t.data[n]}function fE(t,n){return t[n]}function Pn(t,n){let e=n[t];return Fn(e)?e:e[$i]}function gE(t){return(t[ee]&4)===4}function xm(t){return(t[ee]&128)===128}function _E(t){return mn(t[kt])}function bo(t,n){return n==null?null:t[n]}function Bb(t){t[oo]=0}function Cm(t){t[ee]&1024||(t[ee]|=1024,xm(t)&&Oa(t))}function bE(t,n){for(;t>0;)n=n[Do],t--;return n}function wl(t){return!!(t[ee]&9216||t[qt]?.dirty)}function fh(t){t[cn].changeDetectionScheduler?.notify(9),t[ee]&64&&(t[ee]|=1024),wl(t)&&Oa(t)}function Oa(t){t[cn].changeDetectionScheduler?.notify(0);let n=fr(t);for(;n!==null&&!(n[ee]&8192||(n[ee]|=8192,!xm(n)));)n=fr(n)}function jb(t,n){if((t[ee]&256)===256)throw new $(911,!1);t[On]===null&&(t[On]=[]),t[On].push(n)}function vE(t,n){if(t[On]===null)return;let e=t[On].indexOf(n);e!==-1&&t[On].splice(e,1)}function fr(t){let n=t[kt];return mn(n)?n[kt]:n}var ye={lFrame:Yb(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var gh=!1;function yE(){return ye.lFrame.elementDepthCount}function wE(){ye.lFrame.elementDepthCount++}function xE(){ye.lFrame.elementDepthCount--}function zb(){return ye.bindingsEnabled}function Ub(){return ye.skipHydrationRootTNode!==null}function CE(t){return ye.skipHydrationRootTNode===t}function DE(){ye.skipHydrationRootTNode=null}function ge(){return ye.lFrame.lView}function Je(){return ye.lFrame.tView}function W(t){return ye.lFrame.contextLView=t,t[It]}function q(t){return ye.lFrame.contextLView=null,t}function gt(){let t=Hb();for(;t!==null&&t.type===64;)t=t.parent;return t}function Hb(){return ye.lFrame.currentTNode}function IE(){let t=ye.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function Fa(t,n){let e=ye.lFrame;e.currentTNode=t,e.isParent=n}function $b(){return ye.lFrame.isParent}function Gb(){ye.lFrame.isParent=!1}function EE(){return ye.lFrame.contextLView}function Wb(){return gh}function zc(t){let n=gh;return gh=t,n}function kE(){let t=ye.lFrame,n=t.bindingRootIndex;return n===-1&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function ME(){return ye.lFrame.bindingIndex}function TE(t){return ye.lFrame.bindingIndex=t}function Ln(){return ye.lFrame.bindingIndex++}function Dm(t){let n=ye.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function SE(){return ye.lFrame.inI18n}function AE(t,n){let e=ye.lFrame;e.bindingIndex=e.bindingRootIndex=t,_h(n)}function RE(){return ye.lFrame.currentDirectiveIndex}function _h(t){ye.lFrame.currentDirectiveIndex=t}function Im(t){let n=ye.lFrame.currentDirectiveIndex;return n===-1?null:t[n]}function Em(){return ye.lFrame.currentQueryIndex}function xl(t){ye.lFrame.currentQueryIndex=t}function OE(t){let n=t[fe];return n.type===2?n.declTNode:n.type===1?t[Ut]:null}function qb(t,n,e){if(e&De.SkipSelf){let r=n,o=t;for(;r=r.parent,r===null&&!(e&De.Host);)if(r=OE(o),r===null||(o=o[Do],r.type&10))break;if(r===null)return!1;n=r,t=o}let i=ye.lFrame=Qb();return i.currentTNode=n,i.lView=t,!0}function km(t){let n=Qb(),e=t[fe];ye.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function Qb(){let t=ye.lFrame,n=t===null?null:t.child;return n===null?Yb(t):n}function Yb(t){let 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:t,child:null,inI18n:!1};return t!==null&&(t.child=n),n}function Zb(){let t=ye.lFrame;return ye.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Xb=Zb;function Mm(){let t=Zb();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function FE(t){return(ye.lFrame.contextLView=bE(t,ye.lFrame.contextLView))[It]}function pn(){return ye.lFrame.selectedIndex}function gr(t){ye.lFrame.selectedIndex=t}function Na(){let t=ye.lFrame;return wm(t.tView,t.selectedIndex)}function yi(){ye.lFrame.currentNamespace=Lb}function Tm(){NE()}function NE(){ye.lFrame.currentNamespace=null}function PE(){return ye.lFrame.currentNamespace}var Kb=!0;function Sm(){return Kb}function Am(t){Kb=t}function LE(t,n,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){let a=Fb(n);(e.preOrderHooks??=[]).push(t,a),(e.preOrderCheckHooks??=[]).push(t,a)}r&&(e.preOrderHooks??=[]).push(0-t,r),o&&((e.preOrderHooks??=[]).push(t,o),(e.preOrderCheckHooks??=[]).push(t,o))}function Rm(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e<i;e++){let o=t.data[e].type.prototype,{ngAfterContentInit:a,ngAfterContentChecked:s,ngAfterViewInit:c,ngAfterViewChecked:d,ngOnDestroy:u}=o;a&&(t.contentHooks??=[]).push(-e,a),s&&((t.contentHooks??=[]).push(e,s),(t.contentCheckHooks??=[]).push(e,s)),c&&(t.viewHooks??=[]).push(-e,c),d&&((t.viewHooks??=[]).push(e,d),(t.viewCheckHooks??=[]).push(e,d)),u!=null&&(t.destroyHooks??=[]).push(e,u)}}function Sc(t,n,e){Jb(t,n,3,e)}function Ac(t,n,e,i){(t[ee]&3)===e&&Jb(t,n,e,i)}functi