UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge.

4 lines • 172 kB
import{a as G,b as z}from"./chunk-B4AJQJMI.js";function v(e){return typeof e=="function"}function Gt(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ar=Gt(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription: ${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=n});function pt(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var $=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(v(r))try{r()}catch(i){t=i instanceof Ar?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{Uc(i)}catch(s){t=t??[],s instanceof Ar?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Ar(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Uc(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&pt(n,t)}remove(t){let{_finalizers:n}=this;n&&pt(n,t),t instanceof e&&t._removeParent(this)}};$.EMPTY=(()=>{let e=new $;return e.closed=!0,e})();var Li=$.EMPTY;function Rr(e){return e instanceof $||e&&"closed"in e&&v(e.remove)&&v(e.add)&&v(e.unsubscribe)}function Uc(e){v(e)?e():e.unsubscribe()}var pe={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var zt={setTimeout(e,t,...n){let{delegate:r}=zt;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=zt;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function kr(e){zt.setTimeout(()=>{let{onUnhandledError:t}=pe;if(t)t(e);else throw e})}function Pe(){}var Wc=Fi("C",void 0,void 0);function qc(e){return Fi("E",void 0,e)}function Gc(e){return Fi("N",e,void 0)}function Fi(e,t,n){return{kind:e,value:t,error:n}}var ht=null;function Qt(e){if(pe.useDeprecatedSynchronousErrorHandling){let t=!ht;if(t&&(ht={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=ht;if(ht=null,n)throw r}}else e()}function zc(e){pe.useDeprecatedSynchronousErrorHandling&&ht&&(ht.errorThrown=!0,ht.error=e)}var gt=class extends ${constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Rr(t)&&t.add(this)):this.destination=Ah}static create(t,n,r){return new he(t,n,r)}next(t){this.isStopped?Vi(Gc(t),this):this._next(t)}error(t){this.isStopped?Vi(qc(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Vi(Wc,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Sh=Function.prototype.bind;function ji(e,t){return Sh.call(e,t)}var Hi=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Or(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Or(r)}else Or(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Or(n)}}},he=class extends gt{constructor(t,n,r){super();let o;if(v(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&pe.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&ji(t.next,i),error:t.error&&ji(t.error,i),complete:t.complete&&ji(t.complete,i)}):o=t}this.destination=new Hi(o)}};function Or(e){pe.useDeprecatedSynchronousErrorHandling?zc(e):kr(e)}function xh(e){throw e}function Vi(e,t){let{onStoppedNotification:n}=pe;n&&zt.setTimeout(()=>n(e,t))}var Ah={closed:!0,next:Pe,error:xh,complete:Pe};var Zt=typeof Symbol=="function"&&Symbol.observable||"@@observable";function K(e){return e}function Rh(...e){return Bi(e)}function Bi(e){return e.length===0?K:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var _=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){let i=Oh(n)?n:new he(n,r,o);return Qt(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Qc(r),new r((o,i)=>{let s=new he({next:a=>{try{n(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Zt](){return this}pipe(...n){return Bi(n)(this)}toPromise(n){return n=Qc(n),new n((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=t=>new e(t),e})();function Qc(e){var t;return(t=e??pe.Promise)!==null&&t!==void 0?t:Promise}function kh(e){return e&&v(e.next)&&v(e.error)&&v(e.complete)}function Oh(e){return e&&e instanceof gt||kh(e)&&Rr(e)}var Zc=Gt(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var oe=(()=>{class e extends _{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Pr(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Zc}next(n){Qt(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Qt(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Qt(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:o,observers:i}=this;return r||o?Li:(this.currentObservers=null,i.push(n),new $(()=>{this.currentObservers=null,pt(i,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:o,isStopped:i}=this;r?n.error(o):i&&n.complete()}asObservable(){let n=new _;return n.source=this,n}}return e.create=(t,n)=>new Pr(t,n),e})(),Pr=class extends oe{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:Li}};var Le=Gt(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Ph(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=new he({next:s=>{r(s),i.unsubscribe()},error:o,complete:()=>{n?r(t.defaultValue):o(new Le)}});e.subscribe(i)})}function Lh(e){return v(e?.lift)}function D(e){return t=>{if(Lh(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function I(e,t,n,r,o){return new $i(e,t,n,r,o)}var $i=class extends gt{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function Fe(e,t){return D((n,r)=>{let o=0;n.subscribe(I(r,i=>{r.next(e.call(t,i,o++))}))})}var Lr=class extends ${constructor(t,n){super()}schedule(t,n=0){return this}};var bn={setInterval(e,t,...n){let{delegate:r}=bn;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=bn;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var Yt=class extends Lr{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;let o=this.id,i=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return bn.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&bn.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(t,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r=!1,o;try{this.work(t)}catch(i){r=!0,o=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){let{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,pt(r,this),t!=null&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}};var _n={now(){return(_n.delegate||Date).now()},delegate:void 0};var Kt=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Kt.now=_n.now;var Jt=class extends Kt{constructor(t,n=Kt.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var je=new Jt(Yt),Yc=je;function Fr(e){return e&&v(e.schedule)}function Kc(e){return e instanceof Date&&!isNaN(e)}function mt(e=0,t,n=Yc){let r=-1;return t!=null&&(Fr(t)?n=t:r=t),new _(o=>{let i=Kc(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function Fh(e=0,t=je){return e<0&&(e=0),mt(e,e,t)}function Jc(e,t=je){return D((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let l=i;i=null,r.next(l)}};function c(){let l=s+e,u=t.now();if(u<l){o=this.schedule(void 0,l-u),r.add(o);return}a()}n.subscribe(I(r,l=>{i=l,s=t.now(),o||(o=t.schedule(c,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function Xc(e,t=K){return e=e??jh,D((n,r)=>{let o,i=!0;n.subscribe(I(r,s=>{let a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}function jh(e,t){return e===t}function tl(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function el(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yt(e){return this instanceof yt?(this.v=e,this):new yt(e)}function nl(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(f){return function(h){return Promise.resolve(h).then(f,d)}}function a(f,h){r[f]&&(o[f]=function(w){return new Promise(function(k,O){i.push([f,w,k,O])>1||c(f,w)})},h&&(o[f]=h(o[f])))}function c(f,h){try{l(r[f](h))}catch(w){p(i[0][3],w)}}function l(f){f.value instanceof yt?Promise.resolve(f.value.v).then(u,d):p(i[0][2],f)}function u(f){c("next",f)}function d(f){c("throw",f)}function p(f,h){f(h),i.shift(),i.length&&c(i[0][0],i[0][1])}}function rl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof el=="function"?el(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}var Xt=e=>e&&typeof e.length=="number"&&typeof e!="function";function jr(e){return v(e?.then)}function Vr(e){return v(e[Zt])}function Hr(e){return Symbol.asyncIterator&&v(e?.[Symbol.asyncIterator])}function Br(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Vh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var $r=Vh();function Ur(e){return v(e?.[$r])}function Wr(e){return nl(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield yt(n.read());if(o)return yield yt(void 0);yield yield yt(r)}}finally{n.releaseLock()}})}function qr(e){return v(e?.getReader)}function M(e){if(e instanceof _)return e;if(e!=null){if(Vr(e))return Hh(e);if(Xt(e))return Bh(e);if(jr(e))return $h(e);if(Hr(e))return ol(e);if(Ur(e))return Uh(e);if(qr(e))return Wh(e)}throw Br(e)}function Hh(e){return new _(t=>{let n=e[Zt]();if(v(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Bh(e){return new _(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function $h(e){return new _(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,kr)})}function Uh(e){return new _(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function ol(e){return new _(t=>{qh(e,t).catch(n=>t.error(n))})}function Wh(e){return ol(Wr(e))}function qh(e,t){var n,r,o,i;return tl(this,void 0,void 0,function*(){try{for(n=rl(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function ne(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function il(e,t,n,r,o,i,s,a){let c=[],l=0,u=0,d=!1,p=()=>{d&&!c.length&&!l&&t.complete()},f=w=>l<r?h(w):c.push(w),h=w=>{i&&t.next(w),l++;let k=!1;M(n(w,u++)).subscribe(I(t,O=>{o?.(O),i?f(O):t.next(O)},()=>{k=!0},void 0,()=>{if(k)try{for(l--;c.length&&l<r;){let O=c.shift();s?ne(t,s,()=>h(O)):h(O)}p()}catch(O){t.error(O)}}))};return e.subscribe(I(t,f,()=>{d=!0,p()})),()=>{a?.()}}function ge(e,t,n=1/0){return v(t)?ge((r,o)=>Fe((i,s)=>t(r,i,o,s))(M(e(r,o))),n):(typeof t=="number"&&(n=t),D((r,o)=>il(r,o,e,n)))}function Mn(e=1/0){return ge(K,e)}function sl(){return Mn(1)}function Ui(e){return e[e.length-1]}function Ke(e){return v(Ui(e))?e.pop():void 0}function Me(e){return Fr(Ui(e))?e.pop():void 0}function al(e,t){return typeof Ui(e)=="number"?e.pop():t}function Gr(e,t=0){return D((n,r)=>{n.subscribe(I(r,o=>ne(r,e,()=>r.next(o),t),()=>ne(r,e,()=>r.complete(),t),o=>ne(r,e,()=>r.error(o),t)))})}function zr(e,t=0){return D((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function cl(e,t){return M(e).pipe(zr(t),Gr(t))}function ll(e,t){return M(e).pipe(zr(t),Gr(t))}function ul(e,t){return new _(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function dl(e,t){return new _(n=>{let r;return ne(n,t,()=>{r=e[$r](),ne(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>v(r?.return)&&r.return()})}function Qr(e,t){if(!e)throw new Error("Iterable cannot be null");return new _(n=>{ne(n,t,()=>{let r=e[Symbol.asyncIterator]();ne(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function fl(e,t){return Qr(Wr(e),t)}function pl(e,t){if(e!=null){if(Vr(e))return cl(e,t);if(Xt(e))return ul(e,t);if(jr(e))return ll(e,t);if(Hr(e))return Qr(e,t);if(Ur(e))return dl(e,t);if(qr(e))return fl(e,t)}throw Br(e)}function Ne(e,t){return t?pl(e,t):M(e)}function Je(...e){return sl()(Ne(e,Me(e)))}function hl(...e){let t=Me(e);return D((n,r)=>{(t?Je(e,n,t):Je(e,n)).subscribe(r)})}var en={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=en;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let o=t(i=>{n=void 0,e(i)});return new $(()=>n?.(o))},requestAnimationFrame(...e){let{delegate:t}=en;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=en;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};var Nn=class extends oe{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Zr=class extends oe{constructor(t=1/0,n=1/0,r=_n){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;s<i.length&&!t.closed;s+=r?1:2)t.next(i[s]);return this._checkFinalizedStatuses(t),n}_trimBuffer(){let{_bufferSize:t,_timestampProvider:n,_buffer:r,_infiniteTimeWindow:o}=this,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){let s=n.now(),a=0;for(let c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}};var Yr=class extends Yt{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=en.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&n===t._scheduled&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(en.cancelAnimationFrame(n),t._scheduled=void 0)}};var Kr=class extends Jt{flush(t){this._active=!0;let n;t?n=t.id:(n=this._scheduled,this._scheduled=void 0);let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var Gh=new Kr(Yr);var Ve=new _(e=>e.complete());function Wi(...e){let t=Me(e);return Ne(e,t)}function zh(e,t){let n=v(e)?e:()=>e,r=o=>o.error(n());return new _(t?o=>t.schedule(r,0,o):r)}function Qh(e){return!!e&&(e instanceof _||v(e.lift)&&v(e.subscribe))}function Zh(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=!1,s;e.subscribe({next:a=>{s=a,i=!0},error:o,complete:()=>{i?r(s):n?r(t.defaultValue):o(new Le)}})})}var{isArray:Yh}=Array;function Kh(e,t){return Yh(t)?e(...t):e(t)}function tn(e){return Fe(t=>Kh(e,t))}var{isArray:Jh}=Array,{getPrototypeOf:Xh,prototype:eg,keys:tg}=Object;function Jr(e){if(e.length===1){let t=e[0];if(Jh(t))return{args:t,keys:null};if(ng(t)){let n=tg(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function ng(e){return e&&typeof e=="object"&&Xh(e)===eg}function Xr(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function rg(...e){let t=Me(e),n=Ke(e),{args:r,keys:o}=Jr(e);if(r.length===0)return Ne([],t);let i=new _(og(r,t,o?s=>Xr(o,s):K));return n?i.pipe(tn(n)):i}function og(e,t,n=K){return r=>{gl(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let c=0;c<o;c++)gl(t,()=>{let l=Ne(e[c],t),u=!1;l.subscribe(I(r,d=>{i[c]=d,u||(u=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function gl(e,t,n){e?ne(n,e,t):t()}function ig(e){return new _(t=>{M(e()).subscribe(t)})}function sg(...e){let t=Ke(e),{args:n,keys:r}=Jr(e),o=new _(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u<s;u++){let d=!1;M(n[u]).subscribe(I(i,p=>{d||(d=!0,l--),a[u]=p},()=>c--,void 0,()=>{(!c||!d)&&(l||i.next(r?Xr(r,a):a),i.complete())}))}});return t?o.pipe(tn(t)):o}var ag=["addListener","removeListener"],cg=["addEventListener","removeEventListener"],lg=["on","off"];function qi(e,t,n,r){if(v(n)&&(r=n,n=void 0),r)return qi(e,t,n).pipe(tn(r));let[o,i]=fg(e)?cg.map(s=>a=>e[s](t,a,n)):ug(e)?ag.map(ml(e,t)):dg(e)?lg.map(ml(e,t)):[];if(!o&&Xt(e))return ge(s=>qi(s,t,n))(M(e));if(!o)throw new TypeError("Invalid event target");return new _(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return o(a),()=>i(a)})}function ml(e,t){return n=>r=>e[n](t,r)}function ug(e){return v(e.addListener)&&v(e.removeListener)}function dg(e){return v(e.on)&&v(e.off)}function fg(e){return v(e.addEventListener)&&v(e.removeEventListener)}function pg(...e){let t=Me(e),n=al(e,1/0),r=e;return r.length?r.length===1?M(r[0]):Mn(n)(Ne(r,t)):Ve}var{isArray:hg}=Array;function eo(e){return e.length===1&&hg(e[0])?e[0]:e}function Sn(e,t){return D((n,r)=>{let o=0;n.subscribe(I(r,i=>e.call(t,i,o++)&&r.next(i)))})}function gg(...e){return e=eo(e),e.length===1?M(e[0]):new _(mg(e))}function mg(e){return t=>{let n=[];for(let r=0;n&&!t.closed&&r<e.length;r++)n.push(M(e[r]).subscribe(I(t,o=>{if(n){for(let i=0;i<n.length;i++)i!==r&&n[i].unsubscribe();n=null}t.next(o)})))}}function yg(...e){let t=Ke(e),n=eo(e);return n.length?new _(r=>{let o=n.map(()=>[]),i=n.map(()=>!1);r.add(()=>{o=i=null});for(let s=0;!r.closed&&s<n.length;s++)M(n[s]).subscribe(I(r,a=>{if(o[s].push(a),o.every(c=>c.length)){let c=o.map(l=>l.shift());r.next(t?t(...c):c),o.some((l,u)=>!l.length&&i[u])&&r.complete()}},()=>{i[s]=!0,!o[s].length&&r.complete()}));return()=>{o=i=null}}):Ve}function yl(e){return D((t,n)=>{let r=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let l=o;o=null,n.next(l)}s&&n.complete()},c=()=>{i=null,s&&n.complete()};t.subscribe(I(n,l=>{r=!0,o=l,i||M(e(l)).subscribe(i=I(n,a,c))},()=>{s=!0,(!r||!i||i.closed)&&n.complete()}))})}function vg(e,t=je){return yl(()=>mt(e,t))}function vl(e){return D((t,n)=>{let r=null,o=!1,i;r=t.subscribe(I(n,void 0,void 0,s=>{i=M(e(s,vl(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function Eg(e,t){return v(t)?ge(e,t,1):ge(e,1)}function El(e){return D((t,n)=>{let r=!1;t.subscribe(I(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function nn(e){return e<=0?()=>Ve:D((t,n)=>{let r=0;t.subscribe(I(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function Il(){return D((e,t)=>{e.subscribe(I(t,Pe))})}function Dl(e){return Fe(()=>e)}function Gi(e,t){return t?n=>Je(t.pipe(nn(1),Il()),n.pipe(Gi(e))):ge((n,r)=>M(e(n,r)).pipe(nn(1),Dl(n)))}function Ig(e,t=je){let n=mt(e,t);return Gi(()=>n)}function Cl(e=Dg){return D((t,n)=>{let r=!1;t.subscribe(I(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function Dg(){return new Le}function Cg(...e){return t=>Je(t,Wi(...e))}function wg(e){return D((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function Tg(e,t){let n=arguments.length>=2;return r=>r.pipe(e?Sn((o,i)=>e(o,i,r)):K,nn(1),n?El(t):Cl(()=>new Le))}function bg(e){return e<=0?()=>Ve:D((t,n)=>{let r=[];t.subscribe(I(n,o=>{r.push(o),e<r.length&&r.shift()},()=>{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function wl(e={}){let{connector:t=()=>new oe,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,c,l=0,u=!1,d=!1,p=()=>{a?.unsubscribe(),a=void 0},f=()=>{p(),s=c=void 0,u=d=!1},h=()=>{let w=s;f(),w?.unsubscribe()};return D((w,k)=>{l++,!d&&!u&&p();let O=c=c??t();k.add(()=>{l--,l===0&&!d&&!u&&(a=zi(h,o))}),O.subscribe(k),!s&&l>0&&(s=new he({next:_e=>O.next(_e),error:_e=>{d=!0,p(),a=zi(f,n,_e),O.error(_e)},complete:()=>{u=!0,p(),a=zi(f,r),O.complete()}}),M(w).subscribe(s))})(i)}}function zi(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new he({next:()=>{r.unsubscribe(),e()}});return M(t(...n)).subscribe(r)}function _g(e,t,n){let r,o=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e:r=e??1/0,wl({connector:()=>new Zr(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Mg(e){return Sn((t,n)=>e<=n)}function Tl(e,t){return D((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(I(r,c=>{o?.unsubscribe();let l=0,u=i++;M(e(c,u)).subscribe(o=I(r,d=>r.next(t?t(c,d,u,l++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function bl(e){return D((t,n)=>{M(e).subscribe(I(n,()=>n.complete(),Pe)),!n.closed&&t.subscribe(n)})}function Ng(e,t,n){let r=v(e)||t||n?{next:e,error:t,complete:n}:e;return r?D((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(I(i,c=>{var l;(l=r.next)===null||l===void 0||l.call(r,c),i.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},c=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,c),i.error(c)},()=>{var c,l;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):K}function Sg(...e){let t=Ke(e);return D((n,r)=>{let o=e.length,i=new Array(o),s=e.map(()=>!1),a=!1;for(let c=0;c<o;c++)M(e[c]).subscribe(I(r,l=>{i[c]=l,!a&&!s[c]&&(s[c]=!0,(a=s.every(K))&&(s=null))},Pe));n.subscribe(I(r,c=>{if(a){let l=[c,...i];r.next(t?t(...l):l)}}))})}var Z=null,to=!1,Qi=1,xg=null,j=Symbol("SIGNAL");function m(e){let t=Z;return Z=e,t}function no(){return Z}var Xe={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function et(e){if(to)throw new Error("");if(Z===null)return;Z.consumerOnSignalRead(e);let t=Z.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Z.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Z.producers,n!==void 0&&n.producer===e)){Z.producersTail=n,n.lastReadVersion=e.version;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Z&&(!r||Rg(o,Z)))return;let i=on(Z),s={producer:e,consumer:Z,nextProducer:n,prevConsumer:o,lastReadVersion:e.version,nextConsumer:void 0};Z.producersTail=s,t!==void 0?t.nextProducer=s:Z.producers=s,i&&Sl(e,s)}function _l(){Qi++}function It(e){if(!(on(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Qi)){if(!e.producerMustRecompute(e)&&!xn(e)){rn(e);return}e.producerRecomputeValue(e),rn(e)}}function Zi(e){if(e.consumers===void 0)return;let t=to;to=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||Ag(r)}}finally{to=t}}function Yi(){return Z?.consumerAllowSignalWrites!==!1}function Ag(e){e.dirty=!0,Zi(e),e.consumerMarkedDirty?.(e)}function rn(e){e.dirty=!1,e.lastCleanEpoch=Qi}function tt(e){return e&&Ml(e),m(e)}function Ml(e){e.producersTail=void 0,e.recomputing=!0}function Dt(e,t){m(t),e&&Nl(e)}function Nl(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(on(e))do n=Ki(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function xn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(It(n),r!==n.version))return!0}return!1}function Ct(e){if(on(e)){let t=e.producers;for(;t!==void 0;)t=Ki(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Sl(e,t){let n=e.consumersTail,r=on(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Sl(o.producer,o)}function Ki(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:t.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(t.consumers=r,!on(t)){let i=t.producers;for(;i!==void 0;)i=Ki(i)}return n}function on(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function An(e){xg?.(e)}function Rg(e,t){let n=t.producersTail;if(n!==void 0){let r=t.producers;do{if(r===e)return!0;if(r===n)break;r=r.nextProducer}while(r!==void 0)}return!1}function Rn(e,t){return Object.is(e,t)}function kn(e,t){let n=Object.create(kg);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(It(n),et(n),n.value===Se)throw n.error;return n.value};return r[j]=n,An(n),r}var vt=Symbol("UNSET"),Et=Symbol("COMPUTING"),Se=Symbol("ERRORED"),kg=z(G({},Xe),{value:vt,dirty:!0,error:null,equal:Rn,kind:"computed",producerMustRecompute(e){return e.value===vt||e.value===Et},producerRecomputeValue(e){if(e.value===Et)throw new Error("");let t=e.value;e.value=Et;let n=tt(e),r,o=!1;try{r=e.computation(),m(null),o=t!==vt&&t!==Se&&r!==Se&&e.equal(t,r)}catch(i){r=Se,e.error=i}finally{Dt(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Og(){throw new Error}var xl=Og;function Al(e){xl(e)}function Ji(e){xl=e}var Pg=null;function Xi(e,t){let n=Object.create(oo);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Rl(n);return r[j]=n,An(n),[r,s=>nt(n,s),s=>ro(n,s)]}function Rl(e){return et(e),e.value}function nt(e,t){Yi()||Al(e),e.equal(e.value,t)||(e.value=t,Lg(e))}function ro(e,t){Yi()||Al(e),nt(e,t(e.value))}var oo=z(G({},Xe),{equal:Rn,value:void 0,kind:"signal"});function Lg(e){e.version++,_l(),Zi(e),Pg?.(e)}var es=z(G({},Xe),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function ts(e){if(e.dirty=!1,e.version>0&&!xn(e))return;e.version++;let t=tt(e);try{e.cleanup(),e.fn()}finally{Dt(e,t)}}var ns;function io(){return ns}function xe(e){let t=ns;return ns=e,t}var kl=Symbol("NotFound");function sn(e){return e===kl||e?.name==="\u0275NotFound"}function rs(e,t,n){let r=Object.create(Fg);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(It(r),et(r),r.value===Se)throw r.error;return r.value};return i[j]=r,An(r),i}function Ol(e,t){It(e),nt(e,t),rn(e)}function Pl(e,t){if(It(e),e.value===Se)throw e.error;ro(e,t),rn(e)}var Fg=z(G({},Xe),{value:vt,dirty:!0,error:null,equal:Rn,kind:"linkedSignal",producerMustRecompute(e){return e.value===vt||e.value===Et},producerRecomputeValue(e){if(e.value===Et)throw new Error("");let t=e.value;e.value=Et;let n=tt(e),r,o=!1;try{let i=e.source(),s=t!==vt&&t!==Se,a=s?{source:e.sourceValue,value:t}:void 0;r=e.computation(i,a),e.sourceValue=i,m(null),o=s&&r!==Se&&e.equal(t,r)}catch(i){r=Se,e.error=i}finally{Dt(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Ll(e){let t=m(null);try{return e()}finally{m(t)}}var po="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",b=class extends Error{code;constructor(t,n){super(Hn(t,n)),this.code=t}};function jg(e){return`NG0${Math.abs(e)}`}function Hn(e,t){return`${jg(e)}${t?": "+t:""}`}var Re=globalThis;function S(e){for(let t in e)if(e[t]===S)return t;throw Error("")}function Bl(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Bn(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(Bn).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function ho(e,t){return e?t?`${e} ${t}`:e:t||""}var Vg=S({__forward_ref__:S});function go(e){return e.__forward_ref__=go,e}function U(e){return ms(e)?e():e}function ms(e){return typeof e=="function"&&e.hasOwnProperty(Vg)&&e.__forward_ref__===go}function Q(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function $l(e){return{providers:e.providers||[],imports:e.imports||[]}}function $n(e){return Bg(e,mo)}function Hg(e){return $n(e)!==null}function Bg(e,t){return e.hasOwnProperty(t)&&e[t]||null}function $g(e){let t=e?.[mo]??null;return t||null}function is(e){return e&&e.hasOwnProperty(ao)?e[ao]:null}var mo=S({\u0275prov:S}),ao=S({\u0275inj:S}),x=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=Q({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ys(e){return e&&!!e.\u0275providers}var vs=S({\u0275cmp:S}),Es=S({\u0275dir:S}),Is=S({\u0275pipe:S}),Ds=S({\u0275mod:S}),Pn=S({\u0275fac:S}),Mt=S({__NG_ELEMENT_ID__:S}),Fl=S({__NG_ENV_ID__:S});function Cs(e){return vo(e,"@NgModule"),e[Ds]||null}function We(e){return vo(e,"@Component"),e[vs]||null}function yo(e){return vo(e,"@Directive"),e[Es]||null}function Ul(e){return vo(e,"@Pipe"),e[Is]||null}function vo(e,t){if(e==null)throw new b(-919,!1)}function q(e){return typeof e=="string"?e:e==null?"":String(e)}var Wl=S({ngErrorCode:S}),Ug=S({ngErrorMessage:S}),Wg=S({ngTokenPath:S});function ws(e,t){return ql("",-200,t)}function Eo(e,t){throw new b(-201,!1)}function ql(e,t,n){let r=new b(t,e);return r[Wl]=t,r[Ug]=e,n&&(r[Wg]=n),r}function qg(e){return e[Wl]}var ss;function Gl(){return ss}function J(e){let t=ss;return ss=e,t}function Ts(e,t,n){let r=$n(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Eo(e,"")}var Gg={},wt=Gg,zg="__NG_DI_FLAG__",as=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Tt(n)||0;try{return this.injector.get(t,r&8?null:wt,r)}catch(o){if(sn(o))return o;throw o}}};function Qg(e,t=0){let n=io();if(n===void 0)throw new b(-203,!1);if(n===null)return Ts(e,void 0,t);{let r=Zg(t),o=n.retrieve(e,r);if(sn(o)){if(r.optional)return null;throw o}return o}}function Ae(e,t=0){return(Gl()||Qg)(U(e),t)}function T(e,t){return Ae(e,Tt(t))}function Tt(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Zg(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function cs(e){let t=[];for(let n=0;n<e.length;n++){let r=U(e[n]);if(Array.isArray(r)){if(r.length===0)throw new b(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=Yg(a);typeof c=="number"?c===-1?o=a.token:i|=c:o=a}t.push(Ae(o,i))}else t.push(Ae(r))}return t}function Yg(e){return e[zg]}function rt(e,t){let n=e.hasOwnProperty(Pn);return n?e[Pn]:null}function zl(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let o=e[r],i=t[r];if(n&&(o=n(o),i=n(i)),i!==o)return!1}return!0}function Ql(e){return e.flat(Number.POSITIVE_INFINITY)}function Io(e,t){e.forEach(n=>Array.isArray(n)?Io(n,t):t(n))}function bs(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Un(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Zl(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function Yl(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(o===1)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function Do(e,t,n){let r=cn(e,t);return r>=0?e[r|1]=n:(r=~r,Yl(e,r,t,n)),r}function Co(e,t){let n=cn(e,t);if(n>=0)return e[n|1]}function cn(e,t){return Kg(e,t,1)}function Kg(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<<n];if(t===s)return i<<n;s>t?o=i:r=i+1}return~(o<<n)}var ve={},Y=[],Wn=new x(""),_s=new x("",-1),Ms=new x(""),Ln=class{get(t,n=wt){if(n===wt){let o=ql("",-201);throw o.name="\u0275NotFound",o}return n}};function Ns(e){return{\u0275providers:e}}function Kl(...e){return{\u0275providers:Ss(!0,e),\u0275fromNgModule:!0}}function Ss(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return Io(t,s=>{let a=s;co(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&Jl(o,i),n}function Jl(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];xs(o,i=>{t(i,r)})}}function co(e,t,n,r){if(e=U(e),!e)return!1;let o=null,i=is(e),s=!i&&We(e);if(!i&&!s){let c=e.ngModule;if(i=is(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)co(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;Io(i.imports,u=>{co(u,t,n,r)&&(l||=[],l.push(u))}),l!==void 0&&Jl(l,t)}if(!a){let l=rt(o)||(()=>new o);t({provide:o,useFactory:l,deps:Y},o),t({provide:Ms,useValue:o,multi:!0},o),t({provide:Wn,useValue:()=>Ae(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;xs(c,u=>{t(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function xs(e,t){for(let n of e)ys(n)&&(n=n.\u0275providers),Array.isArray(n)?xs(n,t):t(n)}var Jg=S({provide:String,useValue:S});function Xl(e){return e!==null&&typeof e=="object"&&Jg in e}function Xg(e){return!!(e&&e.useExisting)}function em(e){return!!(e&&e.useFactory)}function bt(e){return typeof e=="function"}function eu(e){return!!e.useClass}var As=new x(""),so={},jl={},os;function ln(){return os===void 0&&(os=new Ln),os}var ae=class{},_t=class extends ae{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,us(t,s=>this.processProvider(s)),this.records.set(_s,an(void 0,this)),o.has("environment")&&this.records.set(ae,an(void 0,this));let i=this.records.get(As);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ms,Y,{self:!0}))}retrieve(t,n){let r=Tt(n)||0;try{return this.get(t,wt,r)}catch(o){if(sn(o))return o;throw o}}destroy(){On(this),this._destroyed=!0;let t=m(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),m(t)}}onDestroy(t){return On(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){On(this);let n=xe(this),r=J(void 0),o;try{return t()}finally{xe(n),J(r)}}get(t,n=wt,r){if(On(this),t.hasOwnProperty(Fl))return t[Fl](this);let o=Tt(r),i,s=xe(this),a=J(void 0);try{if(!(o&4)){let l=this.records.get(t);if(l===void 0){let u=im(t)&&$n(t);u&&this.injectableDefInScope(u)?l=an(ls(t),so):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,o)}let c=o&2?ln():this.parent;return n=o&8&&n===wt?null:n,c.get(t,n)}catch(c){let l=qg(c);throw l===-200||l===-201?new b(l,null):c}finally{J(a),xe(s)}}resolveInjectorInitializers(){let t=m(null),n=xe(this),r=J(void 0),o;try{let i=this.get(Wn,Y,{self:!0});for(let s of i)s()}finally{xe(n),J(r),m(t)}}toString(){return"R3Injector[...]"}processProvider(t){t=U(t);let n=bt(t)?t:U(t&&t.provide),r=nm(t);if(!bt(t)&&t.multi===!0){let o=this.records.get(n);o||(o=an(void 0,so,!0),o.factory=()=>cs(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=m(null);try{if(n.value===jl)throw ws("");return n.value===so&&(n.value=jl,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&om(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{m(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=U(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function ls(e){let t=$n(e),n=t!==null?t.factory:rt(e);if(n!==null)return n;if(e instanceof x)throw new b(-204,!1);if(e instanceof Function)return tm(e);throw new b(-204,!1)}function tm(e){if(e.length>0)throw new b(-204,!1);let n=$g(e);return n!==null?()=>n.factory(e):()=>new e}function nm(e){if(Xl(e))return an(void 0,e.useValue);{let t=Rs(e);return an(t,so)}}function Rs(e,t,n){let r;if(bt(e)){let o=U(e);return rt(o)||ls(o)}else if(Xl(e))r=()=>U(e.useValue);else if(em(e))r=()=>e.useFactory(...cs(e.deps||[]));else if(Xg(e))r=(o,i)=>Ae(U(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=U(e&&(e.useClass||e.provide));if(rm(e))r=()=>new o(...cs(e.deps));else return rt(o)||ls(o)}return r}function On(e){if(e.destroyed)throw new b(-205,!1)}function an(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function rm(e){return!!e.deps}function om(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function im(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function us(e,t){for(let n of e)Array.isArray(n)?us(n,t):n&&ys(n)?us(n.\u0275providers,t):t(n)}function wo(e,t){let n;e instanceof _t?(On(e),n=e):n=new as(e);let r,o=xe(n),i=J(void 0);try{return t()}finally{xe(o),J(i)}}function tu(){return Gl()!==void 0||io()!=null}var Ee=0,y=1,E=2,W=3,ce=4,X=5,Nt=6,un=7,V=8,ie=9,Ie=10,R=11,dn=12,ks=13,St=14,ee=15,st=16,xt=17,ke=18,qe=19,Os=20,Be=21,To=22,ot=23,se=24,At=25,Ge=26,P=27,nu=1,Ps=6,at=7,qn=8,Rt=9,F=10;function ze(e){return Array.isArray(e)&&typeof e[nu]=="object"}function De(e){return Array.isArray(e)&&e[nu]===!0}function Ls(e){return(e.flags&4)!==0}function Qe(e){return e.componentOffset>-1}function fn(e){return(e.flags&1)===1}function Ce(e){return!!e.template}function pn(e){return(e[E]&512)!==0}function kt(e){return(e[E]&256)===256}var Fs="svg",ru="math";function le(e){for(;Array.isArray(e);)e=e[Ee];return e}function js(e,t){return le(t[e])}function ue(e,t){return le(t[e.index])}function bo(e,t){return e.data[t]}function Gn(e,t){return e[t]}function zn(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function de(e,t){let n=t[e];return ze(n)?n:n[Ee]}function ou(e){return(e[E]&4)===4}function _o(e){return(e[E]&128)===128}function iu(e){return De(e[W])}function fe(e,t){return t==null?null:e[t]}function Vs(e){e[xt]=0}function Hs(e){e[E]&1024||(e[E]|=1024,_o(e)&&Ot(e))}function su(e,t){for(;e>0;)t=t[St],e--;return t}function Qn(e){return!!(e[E]&9216||e[se]?.dirty)}function Mo(e){e[Ie].changeDetectionScheduler?.notify(8),e[E]&64&&(e[E]|=1024),Qn(e)&&Ot(e)}function Ot(e){e[Ie].changeDetectionScheduler?.notify(0);let t=it(e);for(;t!==null&&!(t[E]&8192||(t[E]|=8192,!_o(t)));)t=it(t)}function Bs(e,t){if(kt(e))throw new b(911,!1);e[Be]===null&&(e[Be]=[]),e[Be].push(t)}function au(e,t){if(e[Be]===null)return;let n=e[Be].indexOf(t);n!==-1&&e[Be].splice(n,1)}function it(e){let t=e[W];return De(t)?t[W]:t}function $s(e){return e[un]??=[]}function Us(e){return e.cleanup??=[]}function cu(e,t,n,r){let o=$s(t);o.push(n),e.firstCreatePass&&Us(e).push(r,o.length-1)}var C={lFrame:Iu(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var ds=!1;function lu(){return C.lFrame.elementDepthCount}function uu(){C.lFrame.elementDepthCount++}function Ws(){C.lFrame.elementDepthCount--}function No(){return C.bindingsEnabled}function qs(){return C.skipHydrationRootTNode!==null}function Gs(e){return C.skipHydrationRootTNode===e}function zs(){C.skipHydrationRootTNode=null}function g(){return C.lFrame.lView}function L(){return C.lFrame.tView}function du(e){return C.lFrame.contextLView=e,e[V]}function fu(e){return C.lFrame.contextLView=null,e}function H(){let e=Qs();for(;e!==null&&e.type===64;)e=e.parent;return e}function Qs(){return C.lFrame.currentTNode}function pu(){let e=C.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Pt(e,t){let n=C.lFrame;n.currentTNode=e,n.isParent=t}function Zs(){return C.lFrame.isParent}function Ys(){C.lFrame.isParent=!1}function Ks(){return C.lFrame.contextLView}function Js(){return ds}function Fn(e){let t=ds;return ds=e,t}function ct(){let e=C.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Zn(){return C.lFrame.bindingIndex}function hu(e){return C.lFrame.bindingIndex=e}function lt(){return C.lFrame.bindingIndex++}function Lt(e){let t=C.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function gu(){return C.lFrame.inI18n}function mu(e,t){let n=C.lFrame;n.bindingIndex=n.bindingRootIndex=e,So(t)}function yu(){return C.lFrame.currentDirectiveIndex}function So(e){C.lFrame.currentDirectiveIndex=e}function vu(e){let t=C.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function xo(){return C.lFrame.currentQueryIndex}function Yn(e){C.lFrame.currentQueryIndex=e}function sm(e){let t=e[y];return t.type===2?t.declTNode:t.type===1?e[X]:null}function Xs(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=sm(i),o===null||(i=i[St],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=C.lFrame=Eu();return r.currentTNode=t,r.lView=e,!0}function Ao(e){let t=Eu(),n=e[y];C.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Eu(){let e=C.lFrame,t=e===null?null:e.child;return t===null?Iu(e):t}function Iu(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Du(){let e=C.lFrame;return C.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ea=Du;function Ro(){let e=Du();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 Cu(e){return(C.lFrame.contextLView=su(e,C.lFrame.contextLView))[V]}function re(){return C.lFrame.selectedIndex}function ut(e){C.lFrame.selectedIndex=e}function Kn(){let e=C.lFrame;return bo(e.tView,e.selectedIndex)}function wu(){C.lFrame.currentNamespace=Fs}function Tu(){am()}function am(){C.lFrame.currentNamespace=null}function bu(){return C.lFrame.currentNamespace}var _u=!0;function ko(){return _u}function Jn(e){_u=e}function fs(e,t=null,n=null,r){let o=ta(e,t,n,r);return o.resolveInjectorInitializers(),o}function ta(e,t=null,n=null,r,o=new Set){let i=[n||Y,Kl(e)],s;return new _t(i,t||ln(),s||null,o)}var me=class e{static THROW_IF_NOT_FOUND=wt;static NULL=new Ln;static create(t,n){if(Array.isArray(t))return fs({name:""},n,t,"");{let r=t.name??"";return fs({name:r},t.parent,t.providers,r)}}static \u0275prov=Q({token:e,providedIn:"any",factory:()=>Ae(_s)});static __NG_ELEMENT_ID__=-1},na=new x(""),dt=(()=>{class e{static __NG_ELEMENT_ID__=cm;static __NG_ENV_ID__=n=>n}return e})(),lo=class extends dt{_lView;constructor(t){super(),this._lView=t}get destroyed(){return kt(this._lView)}onDestroy(t){let n=this._lView;return Bs(n,t),()=>au(n,t)}};function cm(){return new lo(g())}var Mu=!1,Nu=new x(""),Ft=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Nn(!1);debugTaskTracker=T(Nu,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new _(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=Q({token:e,providedIn:"root",factory:()=>new e})}return e})(),ps=class extends oe{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,tu()&&(this.destroyRef=T(dt,{optional:!0})??void 0,this.pendingTasks=T(Ft,{optional:!0})??void 0)}emit(t){let n=m(null);try{super.next(t)}finally{m(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let c=t;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof $&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},He=ps;function uo(...e){}function ra(e){let t,n;function r(){e=uo;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch(o){}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Su(e){return queueMicrotask(()=>e()),()=>{e=uo}}var oa="isAngularZone",jn=oa+"_ID",lm=0,ye=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new He(!1);onMicrotaskEmpty=new He(!1);onStable=new He(!1);onError=new He(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection