@whoz-oss/coday-client 0.29.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,109 @@
1
+ var pT=Object.defineProperty,mT=Object.defineProperties;var gT=Object.getOwnPropertyDescriptors;var cl=Object.getOwnPropertySymbols;var Cb=Object.prototype.hasOwnProperty,wb=Object.prototype.propertyIsEnumerable;var _b=(n,t,e)=>t in n?pT(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,E=(n,t)=>{for(var e in t||={})Cb.call(t,e)&&_b(n,e,t[e]);if(cl)for(var e of cl(t))wb.call(t,e)&&_b(n,e,t[e]);return n},X=(n,t)=>mT(n,gT(t));var Nh=(n,t)=>{var e={};for(var r in n)Cb.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&cl)for(var r of cl(n))t.indexOf(r)<0&&wb.call(n,r)&&(e[r]=n[r]);return e};var xe=(n,t,e)=>new Promise((r,i)=>{var o=c=>{try{a(e.next(c))}catch(l){i(l)}},s=c=>{try{a(e.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((e=e.apply(n,t)).next())});var Fh;function ll(){return Fh}function jn(n){let t=Fh;return Fh=n,t}var Eb=Symbol("NotFound");function bo(n){return n===Eb||n?.name==="\u0275NotFound"}var Ct=null,dl=!1,Lh=1,vT=null,wt=Symbol("SIGNAL");function ee(n){let t=Ct;return Ct=n,t}function pl(){return Ct}var _o={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 Co(n){if(dl)throw new Error("");if(Ct===null)return;Ct.consumerOnSignalRead(n);let t=Ct.producersTail;if(t!==void 0&&t.producer===n)return;let e,r=Ct.recomputing;if(r&&(e=t!==void 0?t.nextProducer:Ct.producers,e!==void 0&&e.producer===n)){Ct.producersTail=e,e.lastReadVersion=n.version;return}let i=n.consumersTail;if(i!==void 0&&i.consumer===Ct&&(!r||bT(i,Ct)))return;let o=Eo(Ct),s={producer:n,consumer:Ct,nextProducer:e,prevConsumer:i,lastReadVersion:n.version,nextConsumer:void 0};Ct.producersTail=s,t!==void 0?t.nextProducer=s:Ct.producers=s,o&&Tb(n,s)}function Sb(){Lh++}function ml(n){if(!(Eo(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===Lh)){if(!n.producerMustRecompute(n)&&!oa(n)){hl(n);return}n.producerRecomputeValue(n),hl(n)}}function Vh(n){if(n.consumers===void 0)return;let t=dl;dl=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let r=e.consumer;r.dirty||yT(r)}}finally{dl=t}}function jh(){return Ct?.consumerAllowSignalWrites!==!1}function yT(n){n.dirty=!0,Vh(n),n.consumerMarkedDirty?.(n)}function hl(n){n.dirty=!1,n.lastCleanEpoch=Lh}function wo(n){return n&&Db(n),ee(n)}function Db(n){n.producersTail=void 0,n.recomputing=!0}function ia(n,t){ee(t),n&&Mb(n)}function Mb(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(Eo(n))do e=Bh(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function oa(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,r=t.lastReadVersion;if(r!==e.version||(ml(e),r!==e.version))return!0}return!1}function sa(n){if(Eo(n)){let t=n.producers;for(;t!==void 0;)t=Bh(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function Tb(n,t){let e=n.consumersTail,r=Eo(n);if(e!==void 0?(t.nextConsumer=e.nextConsumer,e.nextConsumer=t):(t.nextConsumer=void 0,n.consumers=t),t.prevConsumer=e,n.consumersTail=t,!r)for(let i=n.producers;i!==void 0;i=i.nextProducer)Tb(i.producer,i)}function Bh(n){let t=n.producer,e=n.nextProducer,r=n.nextConsumer,i=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,r!==void 0?r.prevConsumer=i:t.consumersTail=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!Eo(t)){let o=t.producers;for(;o!==void 0;)o=Bh(o)}return e}function Eo(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function gl(n){vT?.(n)}function bT(n,t){let e=t.producersTail;if(e!==void 0){let r=t.producers;do{if(r===n)return!0;if(r===e)break;r=r.nextProducer}while(r!==void 0)}return!1}function vl(n,t){return Object.is(n,t)}function yl(n,t){let e=Object.create(_T);e.computation=n,t!==void 0&&(e.equal=t);let r=()=>{if(ml(e),Co(e),e.value===ra)throw e.error;return e.value};return r[wt]=e,gl(e),r}var ul=Symbol("UNSET"),fl=Symbol("COMPUTING"),ra=Symbol("ERRORED"),_T=X(E({},_o),{value:ul,dirty:!0,error:null,equal:vl,kind:"computed",producerMustRecompute(n){return n.value===ul||n.value===fl},producerRecomputeValue(n){if(n.value===fl)throw new Error("");let t=n.value;n.value=fl;let e=wo(n),r,i=!1;try{r=n.computation(),ee(null),i=t!==ul&&t!==ra&&r!==ra&&n.equal(t,r)}catch(o){r=ra,n.error=o}finally{ia(n,e)}if(i){n.value=t;return}n.value=r,n.version++}});function CT(){throw new Error}var xb=CT;function Ib(n){xb(n)}function Uh(n){xb=n}var wT=null;function Hh(n,t){let e=Object.create(bl);e.value=n,t!==void 0&&(e.equal=t);let r=()=>kb(e);return r[wt]=e,gl(e),[r,s=>So(e,s),s=>$h(e,s)]}function kb(n){return Co(n),n.value}function So(n,t){jh()||Ib(n),n.equal(n.value,t)||(n.value=t,ET(n))}function $h(n,t){jh()||Ib(n),So(n,t(n.value))}var bl=X(E({},_o),{equal:vl,value:void 0,kind:"signal"});function ET(n){n.version++,Sb(),Vh(n),wT?.(n)}function q(n){return typeof n=="function"}function Do(n){let e=n(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var _l=Do(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:
2
+ ${e.map((r,i)=>`${i+1}) ${r.toString()}`).join(`
3
+ `)}`:"",this.name="UnsubscriptionError",this.errors=e});function Ei(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Re=class n{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: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:r}=this;if(q(r))try{r()}catch(o){t=o instanceof _l?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{Ab(o)}catch(s){t=t??[],s instanceof _l?t=[...t,...s.errors]:t.push(s)}}if(t)throw new _l(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Ab(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&Ei(e,t)}remove(t){let{_finalizers:e}=this;e&&Ei(e,t),t instanceof n&&t._removeParent(this)}};Re.EMPTY=(()=>{let n=new Re;return n.closed=!0,n})();var zh=Re.EMPTY;function Cl(n){return n instanceof Re||n&&"closed"in n&&q(n.remove)&&q(n.add)&&q(n.unsubscribe)}function Ab(n){q(n)?n():n.unsubscribe()}var _n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Mo={setTimeout(n,t,...e){let{delegate:r}=Mo;return r?.setTimeout?r.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Mo;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function wl(n){Mo.setTimeout(()=>{let{onUnhandledError:t}=_n;if(t)t(n);else throw n})}function aa(){}var Ob=Wh("C",void 0,void 0);function Rb(n){return Wh("E",void 0,n)}function Pb(n){return Wh("N",n,void 0)}function Wh(n,t,e){return{kind:n,value:t,error:e}}var Si=null;function To(n){if(_n.useDeprecatedSynchronousErrorHandling){let t=!Si;if(t&&(Si={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:r}=Si;if(Si=null,e)throw r}}else n()}function Nb(n){_n.useDeprecatedSynchronousErrorHandling&&Si&&(Si.errorThrown=!0,Si.error=n)}var Di=class extends Re{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Cl(t)&&t.add(this)):this.destination=MT}static create(t,e,r){return new pr(t,e,r)}next(t){this.isStopped?qh(Pb(t),this):this._next(t)}error(t){this.isStopped?qh(Rb(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?qh(Ob,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()}}},ST=Function.prototype.bind;function Gh(n,t){return ST.call(n,t)}var Yh=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(r){El(r)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(r){El(r)}else El(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){El(e)}}},pr=class extends Di{constructor(t,e,r){super();let i;if(q(t)||!t)i={next:t??void 0,error:e??void 0,complete:r??void 0};else{let o;this&&_n.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&Gh(t.next,o),error:t.error&&Gh(t.error,o),complete:t.complete&&Gh(t.complete,o)}):i=t}this.destination=new Yh(i)}};function El(n){_n.useDeprecatedSynchronousErrorHandling?Nb(n):wl(n)}function DT(n){throw n}function qh(n,t){let{onStoppedNotification:e}=_n;e&&Mo.setTimeout(()=>e(n,t))}var MT={closed:!0,next:aa,error:DT,complete:aa};var xo=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Tt(n){return n}function Zh(...n){return Kh(n)}function Kh(n){return n.length===0?Tt:n.length===1?n[0]:function(e){return n.reduce((r,i)=>i(r),e)}}var te=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let r=new n;return r.source=this,r.operator=e,r}subscribe(e,r,i){let o=xT(e)?e:new pr(e,r,i);return To(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(r){e.error(r)}}forEach(e,r){return r=Fb(r),new r((i,o)=>{let s=new pr({next:a=>{try{e(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)}[xo](){return this}pipe(...e){return Kh(e)(this)}toPromise(e){return e=Fb(e),new e((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return n.create=t=>new n(t),n})();function Fb(n){var t;return(t=n??_n.Promise)!==null&&t!==void 0?t:Promise}function TT(n){return n&&q(n.next)&&q(n.error)&&q(n.complete)}function xT(n){return n&&n instanceof Di||TT(n)&&Cl(n)}function Qh(n){return q(n?.lift)}function oe(n){return t=>{if(Qh(t))return t.lift(function(e){try{return n(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ne(n,t,e,r,i){return new Xh(n,t,e,r,i)}var Xh=class extends Di{constructor(t,e,r,i,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(c){t.error(c)}}:super._next,this._error=i?function(a){try{i(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:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function Io(){return oe((n,t)=>{let e=null;n._refCount++;let r=ne(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){e=null;return}let i=n._connection,o=e;e=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});n.subscribe(r),r.closed||(e=n.connect())})}var ko=class extends te{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Qh(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Re;let e=this.getSubject();t.add(this.source.subscribe(ne(e,void 0,()=>{this._teardown(),e.complete()},r=>{this._teardown(),e.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Re.EMPTY)}return t}refCount(){return Io()(this)}};var Lb=Do(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var A=(()=>{class n extends te{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let r=new Sl(this,this);return r.operator=e,r}_throwIfClosed(){if(this.closed)throw new Lb}next(e){To(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(e)}})}error(e){To(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:r}=this;for(;r.length;)r.shift().error(e)}})}complete(){To(()=>{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=this.currentObservers=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:r,isStopped:i,observers:o}=this;return r||i?zh:(this.currentObservers=null,o.push(e),new Re(()=>{this.currentObservers=null,Ei(o,e)}))}_checkFinalizedStatuses(e){let{hasError:r,thrownError:i,isStopped:o}=this;r?e.error(i):o&&e.complete()}asObservable(){let e=new te;return e.source=this,e}}return n.create=(t,e)=>new Sl(t,e),n})(),Sl=class extends A{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.next)===null||r===void 0||r.call(e,t)}error(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.error)===null||r===void 0||r.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,r;return(r=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&r!==void 0?r:zh}};var Z=class extends A{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:r}=this;if(t)throw e;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Jh={now(){return(Jh.delegate||Date).now()},delegate:void 0};var Dl=class extends Re{constructor(t,e){super()}schedule(t,e=0){return this}};var ca={setInterval(n,t,...e){let{delegate:r}=ca;return r?.setInterval?r.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=ca;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var Ml=class extends Dl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var r;if(this.closed)return this;this.state=t;let i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,e)),this.pending=!0,this.delay=e,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,r=0){return ca.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,e,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return e;e!=null&&ca.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(t,e);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r=!1,i;try{this.work(t)}catch(o){r=!0,i=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:r}=e;this.work=this.state=this.scheduler=null,this.pending=!1,Ei(r,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var Ao=class n{constructor(t,e=n.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,r){return new this.schedulerActionCtor(this,t).schedule(r,e)}};Ao.now=Jh.now;var Tl=class extends Ao{constructor(t,e=Ao.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}};var la=new Tl(Ml),Vb=la;var Et=new te(n=>n.complete());function xl(n){return n&&q(n.schedule)}function ep(n){return n[n.length-1]}function Il(n){return q(ep(n))?n.pop():void 0}function Bn(n){return xl(ep(n))?n.pop():void 0}function jb(n,t){return typeof ep(n)=="number"?n.pop():t}function Ub(n,t,e,r){function i(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{l(r.next(d))}catch(u){s(u)}}function c(d){try{l(r.throw(d))}catch(u){s(u)}}function l(d){d.done?o(d.value):i(d.value).then(a,c)}l((r=r.apply(n,t||[])).next())})}function Bb(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mi(n){return this instanceof Mi?(this.v=n,this):new Mi(n)}function Hb(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(v){return Promise.resolve(v).then(h,u)}}function a(h,v){r[h]&&(i[h]=function(_){return new Promise(function(D,M){o.push([h,_,D,M])>1||c(h,_)})},v&&(i[h]=v(i[h])))}function c(h,v){try{l(r[h](v))}catch(_){p(o[0][3],_)}}function l(h){h.value instanceof Mi?Promise.resolve(h.value.v).then(d,u):p(o[0][2],h)}function d(h){c("next",h)}function u(h){c("throw",h)}function p(h,v){h(v),o.shift(),o.length&&c(o[0][0],o[0][1])}}function $b(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Bb=="function"?Bb(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=n[o]&&function(s){return new Promise(function(a,c){s=n[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var Oo=n=>n&&typeof n.length=="number"&&typeof n!="function";function kl(n){return q(n?.then)}function Al(n){return q(n[xo])}function Ol(n){return Symbol.asyncIterator&&q(n?.[Symbol.asyncIterator])}function Rl(n){return new TypeError(`You provided ${n!==null&&typeof n=="object"?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function IT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Pl=IT();function Nl(n){return q(n?.[Pl])}function Fl(n){return Hb(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:r,done:i}=yield Mi(e.read());if(i)return yield Mi(void 0);yield yield Mi(r)}}finally{e.releaseLock()}})}function Ll(n){return q(n?.getReader)}function Ae(n){if(n instanceof te)return n;if(n!=null){if(Al(n))return kT(n);if(Oo(n))return AT(n);if(kl(n))return OT(n);if(Ol(n))return zb(n);if(Nl(n))return RT(n);if(Ll(n))return PT(n)}throw Rl(n)}function kT(n){return new te(t=>{let e=n[xo]();if(q(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function AT(n){return new te(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function OT(n){return new te(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,wl)})}function RT(n){return new te(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function zb(n){return new te(t=>{NT(n,t).catch(e=>t.error(e))})}function PT(n){return zb(Fl(n))}function NT(n,t){var e,r,i,o;return Ub(this,void 0,void 0,function*(){try{for(e=$b(n);r=yield e.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=e.return)&&(yield o.call(e))}finally{if(i)throw i.error}}t.complete()})}function Ut(n,t,e,r=0,i=!1){let o=t.schedule(function(){e(),i?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(o),!i)return o}function Vl(n,t=0){return oe((e,r)=>{e.subscribe(ne(r,i=>Ut(r,n,()=>r.next(i),t),()=>Ut(r,n,()=>r.complete(),t),i=>Ut(r,n,()=>r.error(i),t)))})}function jl(n,t=0){return oe((e,r)=>{r.add(n.schedule(()=>e.subscribe(r),t))})}function Wb(n,t){return Ae(n).pipe(jl(t),Vl(t))}function Gb(n,t){return Ae(n).pipe(jl(t),Vl(t))}function qb(n,t){return new te(e=>{let r=0;return t.schedule(function(){r===n.length?e.complete():(e.next(n[r++]),e.closed||this.schedule())})})}function Yb(n,t){return new te(e=>{let r;return Ut(e,t,()=>{r=n[Pl](),Ut(e,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){e.error(s);return}o?e.complete():e.next(i)},0,!0)}),()=>q(r?.return)&&r.return()})}function Bl(n,t){if(!n)throw new Error("Iterable cannot be null");return new te(e=>{Ut(e,t,()=>{let r=n[Symbol.asyncIterator]();Ut(e,t,()=>{r.next().then(i=>{i.done?e.complete():e.next(i.value)})},0,!0)})})}function Zb(n,t){return Bl(Fl(n),t)}function Kb(n,t){if(n!=null){if(Al(n))return Wb(n,t);if(Oo(n))return qb(n,t);if(kl(n))return Gb(n,t);if(Ol(n))return Bl(n,t);if(Nl(n))return Yb(n,t);if(Ll(n))return Zb(n,t)}throw Rl(n)}function Ve(n,t){return t?Kb(n,t):Ae(n)}function P(...n){let t=Bn(n);return Ve(n,t)}function jr(n,t){let e=q(n)?n:()=>n,r=i=>i.error(e());return new te(t?i=>t.schedule(r,0,i):r)}function Ul(n){return!!n&&(n instanceof te||q(n.lift)&&q(n.subscribe))}var mr=Do(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function Qb(n){return n instanceof Date&&!isNaN(n)}function V(n,t){return oe((e,r)=>{let i=0;e.subscribe(ne(r,o=>{r.next(n.call(t,o,i++))}))})}var{isArray:FT}=Array;function LT(n,t){return FT(t)?n(...t):n(t)}function Ro(n){return V(t=>LT(n,t))}var{isArray:VT}=Array,{getPrototypeOf:jT,prototype:BT,keys:UT}=Object;function Hl(n){if(n.length===1){let t=n[0];if(VT(t))return{args:t,keys:null};if(HT(t)){let e=UT(t);return{args:e.map(r=>t[r]),keys:e}}}return{args:n,keys:null}}function HT(n){return n&&typeof n=="object"&&jT(n)===BT}function $l(n,t){return n.reduce((e,r,i)=>(e[r]=t[i],e),{})}function gr(...n){let t=Bn(n),e=Il(n),{args:r,keys:i}=Hl(n);if(r.length===0)return Ve([],t);let o=new te($T(r,t,i?s=>$l(i,s):Tt));return e?o.pipe(Ro(e)):o}function $T(n,t,e=Tt){return r=>{Xb(t,()=>{let{length:i}=n,o=new Array(i),s=i,a=i;for(let c=0;c<i;c++)Xb(t,()=>{let l=Ve(n[c],t),d=!1;l.subscribe(ne(r,u=>{o[c]=u,d||(d=!0,a--),a||r.next(e(o.slice()))},()=>{--s||r.complete()}))},r)},r)}}function Xb(n,t,e){n?Ut(e,n,t):t()}function Jb(n,t,e,r,i,o,s,a){let c=[],l=0,d=0,u=!1,p=()=>{u&&!c.length&&!l&&t.complete()},h=_=>l<r?v(_):c.push(_),v=_=>{o&&t.next(_),l++;let D=!1;Ae(e(_,d++)).subscribe(ne(t,M=>{i?.(M),o?h(M):t.next(M)},()=>{D=!0},void 0,()=>{if(D)try{for(l--;c.length&&l<r;){let M=c.shift();s?Ut(t,s,()=>v(M)):v(M)}p()}catch(M){t.error(M)}}))};return n.subscribe(ne(t,h,()=>{u=!0,p()})),()=>{a?.()}}function ze(n,t,e=1/0){return q(t)?ze((r,i)=>V((o,s)=>t(r,o,i,s))(Ae(n(r,i))),e):(typeof t=="number"&&(e=t),oe((r,i)=>Jb(r,i,n,e)))}function Br(n=1/0){return ze(Tt,n)}function e_(){return Br(1)}function Ur(...n){return e_()(Ve(n,Bn(n)))}function da(n){return new te(t=>{Ae(n()).subscribe(t)})}function ua(...n){let t=Il(n),{args:e,keys:r}=Hl(n),i=new te(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let d=0;d<s;d++){let u=!1;Ae(e[d]).subscribe(ne(o,p=>{u||(u=!0,l--),a[d]=p},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(r?$l(r,a):a),o.complete())}))}});return t?i.pipe(Ro(t)):i}var zT=["addListener","removeListener"],WT=["addEventListener","removeEventListener"],GT=["on","off"];function fa(n,t,e,r){if(q(e)&&(r=e,e=void 0),r)return fa(n,t,e).pipe(Ro(r));let[i,o]=ZT(n)?WT.map(s=>a=>n[s](t,a,e)):qT(n)?zT.map(t_(n,t)):YT(n)?GT.map(t_(n,t)):[];if(!i&&Oo(n))return ze(s=>fa(s,t,e))(Ae(n));if(!i)throw new TypeError("Invalid event target");return new te(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return i(a),()=>o(a)})}function t_(n,t){return e=>r=>n[e](t,r)}function qT(n){return q(n.addListener)&&q(n.removeListener)}function YT(n){return q(n.on)&&q(n.off)}function ZT(n){return q(n.addEventListener)&&q(n.removeEventListener)}function ha(n=0,t,e=Vb){let r=-1;return t!=null&&(xl(t)?e=t:r=t),new te(i=>{let o=Qb(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function tp(...n){let t=Bn(n),e=jb(n,1/0),r=n;return r.length?r.length===1?Ae(r[0]):Br(e)(Ve(r,t)):Et}function Pe(n,t){return oe((e,r)=>{let i=0;e.subscribe(ne(r,o=>n.call(t,o,i++)&&r.next(o)))})}function n_(n){return oe((t,e)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let l=i;i=null,e.next(l)}s&&e.complete()},c=()=>{o=null,s&&e.complete()};t.subscribe(ne(e,l=>{r=!0,i=l,o||Ae(n(l)).subscribe(o=ne(e,a,c))},()=>{s=!0,(!r||!o||o.closed)&&e.complete()}))})}function zl(n,t=la){return n_(()=>ha(n,t))}function xt(n){return oe((t,e)=>{let r=null,i=!1,o;r=t.subscribe(ne(e,void 0,void 0,s=>{o=Ae(n(s,xt(n)(t))),r?(r.unsubscribe(),r=null,o.subscribe(e)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(e))})}function r_(n,t,e,r,i){return(o,s)=>{let a=e,c=t,l=0;o.subscribe(ne(s,d=>{let u=l++;c=a?n(c,d,u):(a=!0,d),r&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function Un(n,t){return q(t)?ze(n,t,1):ze(n,1)}function pa(n,t=la){return oe((e,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,r.next(l)}};function c(){let l=s+n,d=t.now();if(d<l){i=this.schedule(void 0,l-d),r.add(i);return}a()}e.subscribe(ne(r,l=>{o=l,s=t.now(),i||(i=t.schedule(c,n),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function Hr(n){return oe((t,e)=>{let r=!1;t.subscribe(ne(e,i=>{r=!0,e.next(i)},()=>{r||e.next(n),e.complete()}))})}function It(n){return n<=0?()=>Et:oe((t,e)=>{let r=0;t.subscribe(ne(e,i=>{++r<=n&&(e.next(i),n<=r&&e.complete())}))})}function Wl(n){return V(()=>n)}function Gl(n,t=Tt){return n=n??KT,oe((e,r)=>{let i,o=!0;e.subscribe(ne(r,s=>{let a=t(s);(o||!n(i,a))&&(o=!1,i=a,r.next(s))}))})}function KT(n,t){return n===t}function ql(n=QT){return oe((t,e)=>{let r=!1;t.subscribe(ne(e,i=>{r=!0,e.next(i)},()=>r?e.complete():e.error(n())))})}function QT(){return new mr}function vr(n){return oe((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function yr(n,t){let e=arguments.length>=2;return r=>r.pipe(n?Pe((i,o)=>n(i,o,r)):Tt,It(1),e?Hr(t):ql(()=>new mr))}function Po(n){return n<=0?()=>Et:oe((t,e)=>{let r=[];t.subscribe(ne(e,i=>{r.push(i),n<r.length&&r.shift()},()=>{for(let i of r)e.next(i);e.complete()},void 0,()=>{r=null}))})}function np(n,t){let e=arguments.length>=2;return r=>r.pipe(n?Pe((i,o)=>n(i,o,r)):Tt,Po(1),e?Hr(t):ql(()=>new mr))}function rp(n,t){return oe(r_(n,t,arguments.length>=2,!0))}function op(n={}){let{connector:t=()=>new A,resetOnError:e=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=n;return o=>{let s,a,c,l=0,d=!1,u=!1,p=()=>{a?.unsubscribe(),a=void 0},h=()=>{p(),s=c=void 0,d=u=!1},v=()=>{let _=s;h(),_?.unsubscribe()};return oe((_,D)=>{l++,!u&&!d&&p();let M=c=c??t();D.add(()=>{l--,l===0&&!u&&!d&&(a=ip(v,i))}),M.subscribe(D),!s&&l>0&&(s=new pr({next:G=>M.next(G),error:G=>{u=!0,p(),a=ip(h,e,G),M.error(G)},complete:()=>{d=!0,p(),a=ip(h,r),M.complete()}}),Ae(_).subscribe(s))})(o)}}function ip(n,t,...e){if(t===!0){n();return}if(t===!1)return;let r=new pr({next:()=>{r.unsubscribe(),n()}});return Ae(t(...e)).subscribe(r)}function ma(n){return Pe((t,e)=>n<=e)}function br(...n){let t=Bn(n);return oe((e,r)=>{(t?Ur(n,e,t):Ur(n,e)).subscribe(r)})}function Ze(n,t){return oe((e,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();e.subscribe(ne(r,c=>{i?.unsubscribe();let l=0,d=o++;Ae(n(c,d)).subscribe(i=ne(r,u=>r.next(t?t(c,u,d,l++):u),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function F(n){return oe((t,e)=>{Ae(n).subscribe(ne(e,()=>e.complete(),aa)),!e.closed&&t.subscribe(e)})}function Yl(n,t=!1){return oe((e,r)=>{let i=0;e.subscribe(ne(r,o=>{let s=n(o,i++);(s||t)&&r.next(o),!s&&r.complete()}))})}function ge(n,t,e){let r=q(n)||t||e?{next:n,error:t,complete:e}:n;return r?oe((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(ne(o,c=>{var l;(l=r.next)===null||l===void 0||l.call(r,c),o.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),o.complete()},c=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,c),o.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)}))}):Tt}function i_(n){let t=ee(null);try{return n()}finally{ee(t)}}var Xl="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",S=class extends Error{code;constructor(t,e){super(Wr(t,e)),this.code=t}};function XT(n){return`NG0${Math.abs(n)}`}function Wr(n,t){return`${XT(n)}${t?": "+t:""}`}var Gr=globalThis;function Ie(n){for(let t in n)if(n[t]===Ie)return t;throw Error("")}function a_(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function Cr(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(Cr).join(", ")}]`;if(n==null)return""+n;let t=n.overriddenName||n.name;if(t)return`${t}`;let e=n.toString();if(e==null)return""+e;let r=e.indexOf(`
4
+ `);return r>=0?e.slice(0,r):e}function Jl(n,t){return n?t?`${n} ${t}`:n:t||""}var JT=Ie({__forward_ref__:Ie});function Ht(n){return n.__forward_ref__=Ht,n.toString=function(){return Cr(this())},n}function mt(n){return vp(n)?n():n}function vp(n){return typeof n=="function"&&n.hasOwnProperty(JT)&&n.__forward_ref__===Ht}function C(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ve(n){return{providers:n.providers||[],imports:n.imports||[]}}function ba(n){return ex(n,ed)}function yp(n){return ba(n)!==null}function ex(n,t){return n.hasOwnProperty(t)&&n[t]||null}function tx(n){let t=n?.[ed]??null;return t||null}function ap(n){return n&&n.hasOwnProperty(Kl)?n[Kl]:null}var ed=Ie({\u0275prov:Ie}),Kl=Ie({\u0275inj:Ie}),T=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,e){this._desc=t,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=C({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function bp(n){return n&&!!n.\u0275providers}var _p=Ie({\u0275cmp:Ie}),Cp=Ie({\u0275dir:Ie}),wp=Ie({\u0275pipe:Ie}),Ep=Ie({\u0275mod:Ie}),va=Ie({\u0275fac:Ie}),Ai=Ie({__NG_ELEMENT_ID__:Ie}),o_=Ie({__NG_ENV_ID__:Ie});function qr(n){return typeof n=="string"?n:n==null?"":String(n)}function c_(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():qr(n)}var l_=Ie({ngErrorCode:Ie}),nx=Ie({ngErrorMessage:Ie}),rx=Ie({ngTokenPath:Ie});function Sp(n,t){return d_("",-200,t)}function td(n,t){throw new S(-201,!1)}function d_(n,t,e){let r=new S(t,n);return r[l_]=t,r[nx]=n,e&&(r[rx]=e),r}function ix(n){return n[l_]}var cp;function u_(){return cp}function kt(n){let t=cp;return cp=n,t}function Dp(n,t,e){let r=ba(n);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(e&8)return null;if(t!==void 0)return t;td(n,"Injector")}var ox={},Ti=ox,sx="__NG_DI_FLAG__",lp=class{injector;constructor(t){this.injector=t}retrieve(t,e){let r=xi(e)||0;try{return this.injector.get(t,r&8?null:Ti,r)}catch(i){if(bo(i))return i;throw i}}};function ax(n,t=0){let e=ll();if(e===void 0)throw new S(-203,!1);if(e===null)return Dp(n,void 0,t);{let r=cx(t),i=e.retrieve(n,r);if(bo(i)){if(r.optional)return null;throw i}return i}}function N(n,t=0){return(u_()||ax)(mt(n),t)}function f(n,t){return N(n,xi(t))}function xi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function cx(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function dp(n){let t=[];for(let e=0;e<n.length;e++){let r=mt(n[e]);if(Array.isArray(r)){if(r.length===0)throw new S(900,!1);let i,o=0;for(let s=0;s<r.length;s++){let a=r[s],c=lx(a);typeof c=="number"?c===-1?i=a.token:o|=c:i=a}t.push(N(i,o))}else t.push(N(r))}return t}function lx(n){return n[sx]}function $r(n,t){let e=n.hasOwnProperty(va);return e?n[va]:null}function f_(n,t,e){if(n.length!==t.length)return!1;for(let r=0;r<n.length;r++){let i=n[r],o=t[r];if(e&&(i=e(i),o=e(o)),o!==i)return!1}return!0}function h_(n){return n.flat(Number.POSITIVE_INFINITY)}function nd(n,t){n.forEach(e=>Array.isArray(e)?nd(e,t):t(e))}function Mp(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function _a(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function p_(n,t){let e=[];for(let r=0;r<n;r++)e.push(t);return e}function m_(n,t,e,r){let i=n.length;if(i==t)n.push(e,r);else if(i===1)n.push(r,n[0]),n[0]=e;else{for(i--,n.push(n[i-1],n[i]);i>t;){let o=i-2;n[i]=n[o],i--}n[t]=e,n[t+1]=r}}function rd(n,t,e){let r=Fo(n,t);return r>=0?n[r|1]=e:(r=~r,m_(n,r,t,e)),r}function id(n,t){let e=Fo(n,t);if(e>=0)return n[e|1]}function Fo(n,t){return dx(n,t,1)}function dx(n,t,e){let r=0,i=n.length>>e;for(;i!==r;){let o=r+(i-r>>1),s=n[o<<e];if(t===s)return o<<e;s>t?i=o:r=o+1}return~(i<<e)}var Yr={},At=[],Hn=new T(""),Tp=new T("",-1),xp=new T(""),ya=class{get(t,e=Ti){if(e===Ti){let i=d_("",-201);throw i.name="\u0275NotFound",i}return e}};function Ip(n){return n[Ep]||null}function $n(n){return n[_p]||null}function kp(n){return n[Cp]||null}function g_(n){return n[wp]||null}function Cn(n){return{\u0275providers:n}}function v_(n){return Cn([{provide:Hn,multi:!0,useValue:n}])}function od(...n){return{\u0275providers:Ap(!0,n),\u0275fromNgModule:!0}}function Ap(n,...t){let e=[],r=new Set,i,o=s=>{e.push(s)};return nd(t,s=>{let a=s;Ql(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&y_(i,o),e}function y_(n,t){for(let e=0;e<n.length;e++){let{ngModule:r,providers:i}=n[e];Op(i,o=>{t(o,r)})}}function Ql(n,t,e,r){if(n=mt(n),!n)return!1;let i=null,o=ap(n),s=!o&&$n(n);if(!o&&!s){let c=n.ngModule;if(o=ap(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=n}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)Ql(l,t,e,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let l;try{nd(o.imports,d=>{Ql(d,t,e,r)&&(l||=[],l.push(d))})}finally{}l!==void 0&&y_(l,t)}if(!a){let l=$r(i)||(()=>new i);t({provide:i,useFactory:l,deps:At},i),t({provide:xp,useValue:i,multi:!0},i),t({provide:Hn,useValue:()=>N(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=n;Op(c,d=>{t(d,l)})}}else return!1;return i!==n&&n.providers!==void 0}function Op(n,t){for(let e of n)bp(e)&&(e=e.\u0275providers),Array.isArray(e)?Op(e,t):t(e)}var ux=Ie({provide:String,useValue:Ie});function b_(n){return n!==null&&typeof n=="object"&&ux in n}function fx(n){return!!(n&&n.useExisting)}function hx(n){return!!(n&&n.useFactory)}function Ii(n){return typeof n=="function"}function __(n){return!!n.useClass}var Ca=new T(""),Zl={},s_={},sp;function Lo(){return sp===void 0&&(sp=new ya),sp}var Fe=class{},ki=class extends Fe{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,r,i){super(),this.parent=e,this.source=r,this.scopes=i,fp(t,s=>this.processProvider(s)),this.records.set(Tp,No(void 0,this)),i.has("environment")&&this.records.set(Fe,No(void 0,this));let o=this.records.get(Ca);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(xp,At,{self:!0}))}retrieve(t,e){let r=xi(e)||0;try{return this.get(t,Ti,r)}catch(i){if(bo(i))return i;throw i}}destroy(){ga(this),this._destroyed=!0;let t=ee(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of e)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ee(t)}}onDestroy(t){return ga(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){ga(this);let e=jn(this),r=kt(void 0),i;try{return t()}finally{jn(e),kt(r)}}get(t,e=Ti,r){if(ga(this),t.hasOwnProperty(o_))return t[o_](this);let i=xi(r),o,s=jn(this),a=kt(void 0);try{if(!(i&4)){let l=this.records.get(t);if(l===void 0){let d=yx(t)&&ba(t);d&&this.injectableDefInScope(d)?l=No(up(t),Zl):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,i)}let c=i&2?Lo():this.parent;return e=i&8&&e===Ti?null:e,c.get(t,e)}catch(c){let l=ix(c);throw l===-200||l===-201?new S(l,null):c}finally{kt(a),jn(s)}}resolveInjectorInitializers(){let t=ee(null),e=jn(this),r=kt(void 0),i;try{let o=this.get(Hn,At,{self:!0});for(let s of o)s()}finally{jn(e),kt(r),ee(t)}}toString(){let t=[],e=this.records;for(let r of e.keys())t.push(Cr(r));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=mt(t);let e=Ii(t)?t:mt(t&&t.provide),r=mx(t);if(!Ii(t)&&t.multi===!0){let i=this.records.get(e);i||(i=No(void 0,Zl,!0),i.factory=()=>dp(i.multi),this.records.set(e,i)),e=t,i.multi.push(t)}this.records.set(e,r)}hydrate(t,e,r){let i=ee(null);try{if(e.value===s_)throw Sp(Cr(t));return e.value===Zl&&(e.value=s_,e.value=e.factory(void 0,r)),typeof e.value=="object"&&e.value&&vx(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{ee(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=mt(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function up(n){let t=ba(n),e=t!==null?t.factory:$r(n);if(e!==null)return e;if(n instanceof T)throw new S(204,!1);if(n instanceof Function)return px(n);throw new S(204,!1)}function px(n){if(n.length>0)throw new S(204,!1);let e=tx(n);return e!==null?()=>e.factory(n):()=>new n}function mx(n){if(b_(n))return No(void 0,n.useValue);{let t=Rp(n);return No(t,Zl)}}function Rp(n,t,e){let r;if(Ii(n)){let i=mt(n);return $r(i)||up(i)}else if(b_(n))r=()=>mt(n.useValue);else if(hx(n))r=()=>n.useFactory(...dp(n.deps||[]));else if(fx(n))r=(i,o)=>N(mt(n.useExisting),o!==void 0&&o&8?8:void 0);else{let i=mt(n&&(n.useClass||n.provide));if(gx(n))r=()=>new i(...dp(n.deps));else return $r(i)||up(i)}return r}function ga(n){if(n.destroyed)throw new S(205,!1)}function No(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function gx(n){return!!n.deps}function vx(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function yx(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function fp(n,t){for(let e of n)Array.isArray(e)?fp(e,t):e&&bp(e)?fp(e.\u0275providers,t):t(e)}function ft(n,t){let e;n instanceof ki?(ga(n),e=n):e=new lp(n);let r,i=jn(e),o=kt(void 0);try{return t()}finally{jn(i),kt(o)}}function C_(){return u_()!==void 0||ll()!=null}var wn=0,Y=1,re=2,nt=3,sn=4,Ot=5,Oi=6,Vo=7,Ke=8,Zr=9,zn=10,Le=11,jo=12,Pp=13,Ri=14,Rt=15,Kr=16,Pi=17,Wn=18,wa=19,Np=20,_r=21,sd=22,Ea=23,Jt=24,Ni=25,Fi=26,Ye=27,w_=1,Fp=6,Qr=7,Sa=8,Li=9,Je=10;function Gn(n){return Array.isArray(n)&&typeof n[w_]=="object"}function En(n){return Array.isArray(n)&&n[w_]===!0}function Lp(n){return(n.flags&4)!==0}function Xr(n){return n.componentOffset>-1}function Da(n){return(n.flags&1)===1}function qn(n){return!!n.template}function Bo(n){return(n[re]&512)!==0}function Vi(n){return(n[re]&256)===256}var E_="svg",S_="math";function an(n){for(;Array.isArray(n);)n=n[wn];return n}function Vp(n,t){return an(t[n])}function Sn(n,t){return an(t[n.index])}function Ma(n,t){return n.data[t]}function D_(n,t){return n[t]}function jp(n,t,e,r){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=r}function cn(n,t){let e=t[n];return Gn(e)?e:e[wn]}function M_(n){return(n[re]&4)===4}function ad(n){return(n[re]&128)===128}function T_(n){return En(n[nt])}function ln(n,t){return t==null?null:n[t]}function Bp(n){n[Pi]=0}function Up(n){n[re]&1024||(n[re]|=1024,ad(n)&&Uo(n))}function x_(n,t){for(;n>0;)t=t[Ri],n--;return t}function Ta(n){return!!(n[re]&9216||n[Jt]?.dirty)}function cd(n){n[zn].changeDetectionScheduler?.notify(8),n[re]&64&&(n[re]|=1024),Ta(n)&&Uo(n)}function Uo(n){n[zn].changeDetectionScheduler?.notify(0);let t=zr(n);for(;t!==null&&!(t[re]&8192||(t[re]|=8192,!ad(t)));)t=zr(t)}function Hp(n,t){if(Vi(n))throw new S(911,!1);n[_r]===null&&(n[_r]=[]),n[_r].push(t)}function I_(n,t){if(n[_r]===null)return;let e=n[_r].indexOf(t);e!==-1&&n[_r].splice(e,1)}function zr(n){let t=n[nt];return En(t)?t[nt]:t}function $p(n){return n[Vo]??=[]}function zp(n){return n.cleanup??=[]}function k_(n,t,e,r){let i=$p(t);i.push(e),n.firstCreatePass&&zp(n).push(r,i.length-1)}var de={lFrame:U_(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var hp=!1;function A_(){return de.lFrame.elementDepthCount}function O_(){de.lFrame.elementDepthCount++}function Wp(){de.lFrame.elementDepthCount--}function Gp(){return de.bindingsEnabled}function qp(){return de.skipHydrationRootTNode!==null}function Yp(n){return de.skipHydrationRootTNode===n}function Zp(){de.skipHydrationRootTNode=null}function Q(){return de.lFrame.lView}function Be(){return de.lFrame.tView}function I(n){return de.lFrame.contextLView=n,n[Ke]}function k(n){return de.lFrame.contextLView=null,n}function rt(){let n=Kp();for(;n!==null&&n.type===64;)n=n.parent;return n}function Kp(){return de.lFrame.currentTNode}function R_(){let n=de.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function Ho(n,t){let e=de.lFrame;e.currentTNode=n,e.isParent=t}function Qp(){return de.lFrame.isParent}function Xp(){de.lFrame.isParent=!1}function Jp(){return hp}function em(n){let t=hp;return hp=n,t}function tm(){let n=de.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function P_(){return de.lFrame.bindingIndex}function N_(n){return de.lFrame.bindingIndex=n}function Jr(){return de.lFrame.bindingIndex++}function ld(n){let t=de.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function F_(){return de.lFrame.inI18n}function L_(n,t){let e=de.lFrame;e.bindingIndex=e.bindingRootIndex=n,dd(t)}function V_(){return de.lFrame.currentDirectiveIndex}function dd(n){de.lFrame.currentDirectiveIndex=n}function j_(n){let t=de.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function nm(){return de.lFrame.currentQueryIndex}function ud(n){de.lFrame.currentQueryIndex=n}function bx(n){let t=n[Y];return t.type===2?t.declTNode:t.type===1?n[Ot]:null}function rm(n,t,e){if(e&4){let i=t,o=n;for(;i=i.parent,i===null&&!(e&1);)if(i=bx(o),i===null||(o=o[Ri],i.type&10))break;if(i===null)return!1;t=i,n=o}let r=de.lFrame=B_();return r.currentTNode=t,r.lView=n,!0}function fd(n){let t=B_(),e=n[Y];de.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function B_(){let n=de.lFrame,t=n===null?null:n.child;return t===null?U_(n):t}function U_(n){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:n,child:null,inI18n:!1};return n!==null&&(n.child=t),t}function H_(){let n=de.lFrame;return de.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var im=H_;function hd(){let n=H_();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function $_(n){return(de.lFrame.contextLView=x_(n,de.lFrame.contextLView))[Ke]}function Yn(){return de.lFrame.selectedIndex}function ei(n){de.lFrame.selectedIndex=n}function xa(){let n=de.lFrame;return Ma(n.tView,n.selectedIndex)}function z_(){return de.lFrame.currentNamespace}var W_=!0;function pd(){return W_}function md(n){W_=n}function pp(n,t=null,e=null,r){let i=om(n,t,e,r);return i.resolveInjectorInitializers(),i}function om(n,t=null,e=null,r,i=new Set){let o=[e||At,od(n)];return r=r||(typeof n=="object"?void 0:Cr(n)),new ki(o,t||Lo(),r||null,i)}var ce=class n{static THROW_IF_NOT_FOUND=Ti;static NULL=new ya;static create(t,e){if(Array.isArray(t))return pp({name:""},e,t,"");{let r=t.name??"";return pp({name:r},t.parent,t.providers,r)}}static \u0275prov=C({token:n,providedIn:"any",factory:()=>N(Tp)});static __NG_ELEMENT_ID__=-1},z=new T(""),dn=(()=>{class n{static __NG_ELEMENT_ID__=_x;static __NG_ENV_ID__=e=>e}return n})(),mp=class extends dn{_lView;constructor(t){super(),this._lView=t}get destroyed(){return Vi(this._lView)}onDestroy(t){let e=this._lView;return Hp(e,t),()=>I_(e,t)}};function _x(){return new mp(Q())}var St=class{_console=console;handleError(t){this._console.error("ERROR",t)}},Pt=new T("",{providedIn:"root",factory:()=>{let n=f(Fe),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(St),t.handleError(e))}}}),G_={provide:Hn,useValue:()=>void f(St),multi:!0},Cx=new T("",{providedIn:"root",factory:()=>{let n=f(z).defaultView;if(!n)return;let t=f(Pt),e=o=>{t(o.reason),o.preventDefault()},r=o=>{o.error?t(o.error):t(new Error(o.message,{cause:o})),o.preventDefault()},i=()=>{n.addEventListener("unhandledrejection",e),n.addEventListener("error",r)};typeof Zone<"u"?Zone.root.run(i):i(),f(dn).onDestroy(()=>{n.removeEventListener("error",r),n.removeEventListener("unhandledrejection",e)})}});function sm(){return Cn([v_(()=>void f(Cx))])}function am(n){return typeof n=="function"&&n[wt]!==void 0}function Nt(n,t){let[e,r,i]=Hh(n,t?.equal),o=e,s=o[wt];return o.set=r,o.update=i,o.asReadonly=q_.bind(o),o}function q_(){let n=this[wt];if(n.readonlyFn===void 0){let t=()=>this();t[wt]=n,n.readonlyFn=t}return n.readonlyFn}function cm(n){return am(n)&&typeof n.set=="function"}var wr=class{},$o=new T("",{providedIn:"root",factory:()=>!1});var lm=new T(""),dm=new T("");var gd=(()=>{class n{view;node;constructor(e,r){this.view=e,this.node=r}static __NG_ELEMENT_ID__=wx}return n})();function wx(){return new gd(Q(),rt())}var Zn=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Z(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new te(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),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=C({token:n,providedIn:"root",factory:()=>new n})}return n})(),vd=(()=>{class n{internalPendingTasks=f(Zn);scheduler=f(wr);errorHandler=f(Pt);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let r=this.add();e().catch(this.errorHandler).finally(r)}static \u0275prov=C({token:n,providedIn:"root",factory:()=>new n})}return n})();function Ia(...n){}var um=(()=>{class n{static \u0275prov=C({token:n,providedIn:"root",factory:()=>new gp})}return n})(),gp=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let e=t.zone,r=this.queues.get(e);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let r=this.queues.get(e);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[e,r]of this.queues)e===null?t||=this.flushQueue(r):t||=e.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let e=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,e=!0,r.run());return e}};function Va(n){return{toString:n}.toString()}function kx(n){return typeof n=="function"}var Td=class{previousValue;currentValue;firstChange;constructor(t,e,r){this.previousValue=t,this.currentValue=e,this.firstChange=r}isFirstChange(){return this.firstChange}};function TC(n,t,e,r){t!==null?t.applyValueToInputSignal(t,r):n[e]=r}var Qe=(()=>{let n=()=>xC;return n.ngInherit=!0,n})();function xC(n){return n.type.prototype.ngOnChanges&&(n.setInput=Ox),Ax}function Ax(){let n=kC(this),t=n?.current;if(t){let e=n.previous;if(e===Yr)n.previous=t;else for(let r in t)e[r]=t[r];n.current=null,this.ngOnChanges(t)}}function Ox(n,t,e,r,i){let o=this.declaredInputs[r],s=kC(n)||Rx(n,{previous:Yr,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new Td(l&&l.currentValue,e,c===Yr),TC(n,t,i,e)}var IC="__ngSimpleChanges__";function kC(n){return n[IC]||null}function Rx(n,t){return n[IC]=t}var Y_=[];var Oe=function(n,t=null,e){for(let r=0;r<Y_.length;r++){let i=Y_[r];i(n,t,e)}};function Px(n,t,e){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let s=xC(t);(e.preOrderHooks??=[]).push(n,s),(e.preOrderCheckHooks??=[]).push(n,s)}i&&(e.preOrderHooks??=[]).push(0-n,i),o&&((e.preOrderHooks??=[]).push(n,o),(e.preOrderCheckHooks??=[]).push(n,o))}function AC(n,t){for(let e=t.directiveStart,r=t.directiveEnd;e<r;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:l,ngOnDestroy:d}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),c&&(n.viewHooks??=[]).push(-e,c),l&&((n.viewHooks??=[]).push(e,l),(n.viewCheckHooks??=[]).push(e,l)),d!=null&&(n.destroyHooks??=[]).push(e,d)}}function wd(n,t,e){OC(n,t,3,e)}function Ed(n,t,e,r){(n[re]&3)===e&&OC(n,t,e,r)}function fm(n,t){let e=n[re];(e&3)===t&&(e&=16383,e+=1,n[re]=e)}function OC(n,t,e,r){let i=r!==void 0?n[Pi]&65535:0,o=r??-1,s=t.length-1,a=0;for(let c=i;c<s;c++)if(typeof t[c+1]=="number"){if(a=t[c],r!=null&&a>=r)break}else t[c]<0&&(n[Pi]+=65536),(a<o||o==-1)&&(Nx(n,e,t,c),n[Pi]=(n[Pi]&4294901760)+c+2),c++}function Z_(n,t){Oe(4,n,t);let e=ee(null);try{t.call(n)}finally{ee(e),Oe(5,n,t)}}function Nx(n,t,e,r){let i=e[r]<0,o=e[r+1],s=i?-e[r]:e[r],a=n[s];i?n[re]>>14<n[Pi]>>16&&(n[re]&3)===t&&(n[re]+=16384,Z_(a,o)):Z_(a,o)}var Wo=-1,Bi=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,r,i){this.factory=t,this.name=i,this.canSeeViewProviders=e,this.injectImpl=r}};function Fx(n){return(n.flags&8)!==0}function Lx(n){return(n.flags&16)!==0}function Vx(n,t,e){let r=0;for(;r<e.length;){let i=e[r];if(typeof i=="number"){if(i!==0)break;r++;let o=e[r++],s=e[r++],a=e[r++];n.setAttribute(t,s,a,o)}else{let o=i,s=e[++r];jx(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),r++}}return r}function RC(n){return n===3||n===4||n===6}function jx(n){return n.charCodeAt(0)===64}function Go(n,t){if(!(t===null||t.length===0))if(n===null||n.length===0)n=t.slice();else{let e=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?e=i:e===0||(e===-1||e===2?K_(n,e,i,null,t[++r]):K_(n,e,i,null,null))}}return n}function K_(n,t,e,r,i){let o=0,s=n.length;if(t===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===e){i!==null&&(n[o+1]=i);return}o++,i!==null&&o++}s!==-1&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),i!==null&&n.splice(o++,0,i)}function PC(n){return n!==Wo}function xd(n){return n&32767}function Bx(n){return n>>16}function Id(n,t){let e=Bx(n),r=t;for(;e>0;)r=r[Ri],e--;return r}var wm=!0;function kd(n){let t=wm;return wm=n,t}var Ux=256,NC=Ux-1,FC=5,Hx=0,Kn={};function $x(n,t,e){let r;typeof e=="string"?r=e.charCodeAt(0)||0:e.hasOwnProperty(Ai)&&(r=e[Ai]),r==null&&(r=e[Ai]=Hx++);let i=r&NC,o=1<<i;t.data[n+(i>>FC)]|=o}function Ad(n,t){let e=LC(n,t);if(e!==-1)return e;let r=t[Y];r.firstCreatePass&&(n.injectorIndex=t.length,hm(r.data,n),hm(t,null),hm(r.blueprint,null));let i=sg(n,t),o=n.injectorIndex;if(PC(i)){let s=xd(i),a=Id(i,t),c=a[Y].data;for(let l=0;l<8;l++)t[o+l]=a[s+l]|c[s+l]}return t[o+8]=i,o}function hm(n,t){n.push(0,0,0,0,0,0,0,0,t)}function LC(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function sg(n,t){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let e=0,r=null,i=t;for(;i!==null;){if(r=HC(i),r===null)return Wo;if(e++,i=i[Ri],r.injectorIndex!==-1)return r.injectorIndex|e<<16}return Wo}function Em(n,t,e){$x(n,t,e)}function zx(n,t){if(t==="class")return n.classes;if(t==="style")return n.styles;let e=n.attrs;if(e){let r=e.length,i=0;for(;i<r;){let o=e[i];if(RC(o))break;if(o===0)i=i+2;else if(typeof o=="number")for(i++;i<r&&typeof e[i]=="string";)i++;else{if(o===t)return e[i+1];i=i+2}}}return null}function VC(n,t,e){if(e&8||n!==void 0)return n;td(t,"NodeInjector")}function jC(n,t,e,r){if(e&8&&r===void 0&&(r=null),(e&3)===0){let i=n[Zr],o=kt(void 0);try{return i?i.get(t,r,e&8):Dp(t,r,e&8)}finally{kt(o)}}return VC(r,t,e)}function BC(n,t,e,r=0,i){if(n!==null){if(t[re]&2048&&!(r&2)){let s=Yx(n,t,e,r,Kn);if(s!==Kn)return s}let o=UC(n,t,e,r,Kn);if(o!==Kn)return o}return jC(t,e,r,i)}function UC(n,t,e,r,i){let o=Gx(e);if(typeof o=="function"){if(!rm(t,n,r))return r&1?VC(i,e,r):jC(t,e,r,i);try{let s;if(s=o(r),s==null&&!(r&8))td(e);else return s}finally{im()}}else if(typeof o=="number"){let s=null,a=LC(n,t),c=Wo,l=r&1?t[Rt][Ot]:null;for((a===-1||r&4)&&(c=a===-1?sg(n,t):t[a+8],c===Wo||!X_(r,!1)?a=-1:(s=t[Y],a=xd(c),t=Id(c,t)));a!==-1;){let d=t[Y];if(Q_(o,a,d.data)){let u=Wx(a,t,e,s,r,l);if(u!==Kn)return u}c=t[a+8],c!==Wo&&X_(r,t[Y].data[a+8]===l)&&Q_(o,a,t)?(s=d,a=xd(c),t=Id(c,t)):a=-1}}return i}function Wx(n,t,e,r,i,o){let s=t[Y],a=s.data[n+8],c=r==null?Xr(a)&&wm:r!=s&&(a.type&3)!==0,l=i&1&&o===a,d=Sd(a,s,e,c,l);return d!==null?Oa(t,s,d,a,i):Kn}function Sd(n,t,e,r,i){let o=n.providerIndexes,s=t.data,a=o&1048575,c=n.directiveStart,l=n.directiveEnd,d=o>>20,u=r?a:a+d,p=i?a+d:l;for(let h=u;h<p;h++){let v=s[h];if(h<c&&e===v||h>=c&&v.type===e)return h}if(i){let h=s[c];if(h&&qn(h)&&h.type===e)return c}return null}function Oa(n,t,e,r,i){let o=n[e],s=t.data;if(o instanceof Bi){let a=o;if(a.resolving){let h=c_(s[e]);throw Sp(h)}let c=kd(a.canSeeViewProviders);a.resolving=!0;let l=s[e].type||s[e],d,u=a.injectImpl?kt(a.injectImpl):null,p=rm(n,r,0);try{o=n[e]=a.factory(void 0,i,s,n,r),t.firstCreatePass&&e>=r.directiveStart&&Px(e,s[e],t)}finally{u!==null&&kt(u),kd(c),a.resolving=!1,im()}}return o}function Gx(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(Ai)?n[Ai]:void 0;return typeof t=="number"?t>=0?t&NC:qx:t}function Q_(n,t,e){let r=1<<n;return!!(e[t+(n>>FC)]&r)}function X_(n,t){return!(n&2)&&!(n&1&&t)}var ji=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,r){return BC(this._tNode,this._lView,t,xi(r),e)}};function qx(){return new ji(rt(),Q())}function ht(n){return Va(()=>{let t=n.prototype.constructor,e=t[va]||Sm(t),r=Object.prototype,i=Object.getPrototypeOf(n.prototype).constructor;for(;i&&i!==r;){let o=i[va]||Sm(i);if(o&&o!==e)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Sm(n){return vp(n)?()=>{let t=Sm(mt(n));return t&&t()}:$r(n)}function Yx(n,t,e,r,i){let o=n,s=t;for(;o!==null&&s!==null&&s[re]&2048&&!Bo(s);){let a=UC(o,s,e,r|2,Kn);if(a!==Kn)return a;let c=o.parent;if(!c){let l=s[Np];if(l){let d=l.get(e,Kn,r);if(d!==Kn)return d}c=HC(s),s=s[Ri]}o=c}return i}function HC(n){let t=n[Y],e=t.type;return e===2?t.declTNode:e===1?n[Ot]:null}function qd(n){return zx(rt(),n)}function Zx(){return Qo(rt(),Q())}function Qo(n,t){return new ue(Sn(n,t))}var ue=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Zx}return n})();function Kx(n){return n instanceof ue?n.nativeElement:n}function Qx(){return this._results[Symbol.iterator]()}var qo=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new A}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;let r=h_(t);(this._changesDetected=!f_(this._results,r,e))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Qx};function $C(n){return(n.flags&128)===128}var ag=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(ag||{}),zC=new Map,Xx=0;function Jx(){return Xx++}function eI(n){zC.set(n[wa],n)}function Dm(n){zC.delete(n[wa])}var J_="__ngContext__";function Yo(n,t){Gn(t)?(n[J_]=t[wa],eI(t)):n[J_]=t}function WC(n){return qC(n[jo])}function GC(n){return qC(n[sn])}function qC(n){for(;n!==null&&!En(n);)n=n[sn];return n}var Mm;function cg(n){Mm=n}function lg(){if(Mm!==void 0)return Mm;if(typeof document<"u")return document;throw new S(210,!1)}var Xo=new T("",{providedIn:"root",factory:()=>tI}),tI="ng",Yd=new T(""),ri=new T("",{providedIn:"platform",factory:()=>"unknown"});var ii=new T(""),Jo=new T("",{providedIn:"root",factory:()=>lg().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var nI="h",rI="b";var YC="r";var ZC="di";var KC=!1,QC=new T("",{providedIn:"root",factory:()=>KC});var Zd=new T("");var iI=(n,t,e,r)=>{};function oI(n,t,e,r){iI(n,t,e,r)}function Kd(n){return(n.flags&32)===32}var sI=()=>null;function XC(n,t,e=!1){return sI(n,t,e)}function JC(n,t){let e=n.contentQueries;if(e!==null){let r=ee(null);try{for(let i=0;i<e.length;i+=2){let o=e[i],s=e[i+1];if(s!==-1){let a=n.data[s];ud(o),a.contentQueries(2,t[s],s)}}}finally{ee(r)}}}function Tm(n,t,e){ud(0);let r=ee(null);try{t(n,e)}finally{ee(r)}}function e0(n,t,e){if(Lp(t)){let r=ee(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;s<o;s++){let a=n.data[s];if(a.contentQueries){let c=e[s];a.contentQueries(1,c,s)}}}finally{ee(r)}}}var Er=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(Er||{}),yd;function aI(){if(yd===void 0&&(yd=null,Gr.trustedTypes))try{yd=Gr.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return yd}function Qd(n){return aI()?.createHTML(n)||n}var bd;function cI(){if(bd===void 0&&(bd=null,Gr.trustedTypes))try{bd=Gr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return bd}function eC(n){return cI()?.createHTML(n)||n}var Sr=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Xl})`}},xm=class extends Sr{getTypeName(){return"HTML"}},Im=class extends Sr{getTypeName(){return"Style"}},km=class extends Sr{getTypeName(){return"Script"}},Am=class extends Sr{getTypeName(){return"URL"}},Om=class extends Sr{getTypeName(){return"ResourceURL"}};function fn(n){return n instanceof Sr?n.changingThisBreaksApplicationSecurity:n}function Dr(n,t){let e=t0(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Xl})`)}return e===t}function t0(n){return n instanceof Sr&&n.getTypeName()||null}function dg(n){return new xm(n)}function ug(n){return new Im(n)}function fg(n){return new km(n)}function hg(n){return new Am(n)}function pg(n){return new Om(n)}function lI(n){let t=new Pm(n);return dI()?new Rm(t):t}var Rm=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(Qd(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},Pm=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=Qd(t),e}};function dI(){try{return!!new window.DOMParser().parseFromString(Qd(""),"text/html")}catch{return!1}}var uI=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ja(n){return n=String(n),n.match(uI)?n:"unsafe:"+n}function Mr(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Ba(...n){let t={};for(let e of n)for(let r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}var n0=Mr("area,br,col,hr,img,wbr"),r0=Mr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),i0=Mr("rp,rt"),fI=Ba(i0,r0),hI=Ba(r0,Mr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),pI=Ba(i0,Mr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),tC=Ba(n0,hI,pI,fI),o0=Mr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),mI=Mr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),gI=Mr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),vI=Ba(o0,mI,gI),yI=Mr("script,style,template"),Nm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,r=!0,i=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?r=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,r&&e.firstChild){i.push(e),e=CI(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=_I(e);if(o){e=o;break}e=i.pop()}}return this.buf.join("")}startElement(t){let e=nC(t).toLowerCase();if(!tC.hasOwnProperty(e))return this.sanitizedSomething=!0,!yI.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let r=t.attributes;for(let i=0;i<r.length;i++){let o=r.item(i),s=o.name,a=s.toLowerCase();if(!vI.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let c=o.value;o0[a]&&(c=ja(c)),this.buf.push(" ",s,'="',rC(c),'"')}return this.buf.push(">"),!0}endElement(t){let e=nC(t).toLowerCase();tC.hasOwnProperty(e)&&!n0.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(rC(t))}};function bI(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function _I(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw s0(t);return t}function CI(n){let t=n.firstChild;if(t&&bI(n,t))throw s0(t);return t}function nC(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function s0(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var wI=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,EI=/([^\#-~ |!])/g;function rC(n){return n.replace(/&/g,"&amp;").replace(wI,function(t){let e=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((e-55296)*1024+(r-56320)+65536)+";"}).replace(EI,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var _d;function Xd(n,t){let e=null;try{_d=_d||lI(n);let r=t?String(t):"";e=_d.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=e.innerHTML,e=_d.getInertBodyElement(r)}while(r!==o);let a=new Nm().sanitizeChildren(iC(e)||e);return Qd(a)}finally{if(e){let r=iC(e)||e;for(;r.firstChild;)r.firstChild.remove()}}}function iC(n){return"content"in n&&SI(n)?n.content:null}function SI(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var gt=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n})(gt||{});function es(n){let t=a0();return t?eC(t.sanitize(gt.HTML,n)||""):Dr(n,"HTML")?eC(fn(n)):Xd(lg(),qr(n))}function Hi(n){let t=a0();return t?t.sanitize(gt.URL,n)||"":Dr(n,"URL")?fn(n):ja(qr(n))}function a0(){let n=Q();return n&&n[zn].sanitizer}function c0(n){return n instanceof Function?n():n}function DI(n,t,e){let r=n.length;for(;;){let i=n.indexOf(t,e);if(i===-1)return i;if(i===0||n.charCodeAt(i-1)<=32){let o=t.length;if(i+o===r||n.charCodeAt(i+o)<=32)return i}e=i+1}}var l0="ng-template";function MI(n,t,e,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&DI(t[i+1].toLowerCase(),e,0)!==-1)return!0}else if(mg(n))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&typeof(o=t[i])=="string";)if(o.toLowerCase()===e)return!0}return!1}function mg(n){return n.type===4&&n.value!==l0}function TI(n,t,e){let r=n.type===4&&!e?l0:n.value;return t===r}function xI(n,t,e){let r=4,i=n.attrs,o=i!==null?AI(i):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="number"){if(!s&&!Dn(r)&&!Dn(c))return!1;if(s&&Dn(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==""&&!TI(n,c,e)||c===""&&t.length===1){if(Dn(r))return!1;s=!0}}else if(r&8){if(i===null||!MI(n,i,c,e)){if(Dn(r))return!1;s=!0}}else{let l=t[++a],d=II(c,i,mg(n),e);if(d===-1){if(Dn(r))return!1;s=!0;continue}if(l!==""){let u;if(d>o?u="":u=i[d+1].toLowerCase(),r&2&&l!==u){if(Dn(r))return!1;s=!0}}}}return Dn(r)||s}function Dn(n){return(n&1)===0}function II(n,t,e,r){if(t===null)return-1;let i=0;if(r||!e){let o=!1;for(;i<t.length;){let s=t[i];if(s===n)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return OI(t,n)}function d0(n,t,e=!1){for(let r=0;r<t.length;r++)if(xI(n,t[r],e))return!0;return!1}function kI(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function AI(n){for(let t=0;t<n.length;t++){let e=n[t];if(RC(e))return t}return n.length}function OI(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let r=n[e];if(typeof r=="number")return-1;if(r===t)return e;e++}return-1}function RI(n,t){e:for(let e=0;e<t.length;e++){let r=t[e];if(n.length===r.length){for(let i=0;i<n.length;i++)if(n[i]!==r[i])continue e;return!0}}return!1}function oC(n,t){return n?":not("+t.trim()+")":t}function PI(n){let t=n[0],e=1,r=2,i="",o=!1;for(;e<n.length;){let s=n[e];if(typeof s=="string")if(r&2){let a=n[++e];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!Dn(s)&&(t+=oC(o,i),i=""),r=s,o=o||!Dn(r);e++}return i!==""&&(t+=oC(o,i)),t}function NI(n){return n.map(PI).join(",")}function FI(n){let t=[],e=[],r=1,i=2;for(;r<n.length;){let o=n[r];if(typeof o=="string")i===2?o!==""&&t.push(o,n[++r]):i===8&&e.push(o);else{if(!Dn(i))break;i=o}r++}return e.length&&t.push(1,...e),t}var $t={};function LI(n,t){return n.createText(t)}function VI(n,t,e){n.setValue(t,e)}function u0(n,t,e){return n.createElement(t,e)}function Od(n,t,e,r,i){n.insertBefore(t,e,r,i)}function f0(n,t,e){n.appendChild(t,e)}function sC(n,t,e,r,i){r!==null?Od(n,t,e,r,i):f0(n,t,e)}function h0(n,t,e,r){n.removeChild(null,t,e,r)}function jI(n,t,e){n.setAttribute(t,"style",e)}function BI(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function p0(n,t,e){let{mergedAttrs:r,classes:i,styles:o}=e;r!==null&&Vx(n,t,r),i!==null&&BI(n,t,i),o!==null&&jI(n,t,o)}function gg(n,t,e,r,i,o,s,a,c,l,d){let u=Ye+r,p=u+i,h=UI(u,p),v=typeof l=="function"?l():l;return h[Y]={type:n,blueprint:h,template:e,queries:null,viewQuery:a,declTNode:t,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:p,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:c,consts:v,incompleteFirstPass:!1,ssrId:d}}function UI(n,t){let e=[];for(let r=0;r<t;r++)e.push(r<n?null:$t);return e}function HI(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=gg(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function vg(n,t,e,r,i,o,s,a,c,l,d){let u=t.blueprint.slice();return u[wn]=i,u[re]=r|4|128|8|64|1024,(l!==null||n&&n[re]&2048)&&(u[re]|=2048),Bp(u),u[nt]=u[Ri]=n,u[Ke]=e,u[zn]=s||n&&n[zn],u[Le]=a||n&&n[Le],u[Zr]=c||n&&n[Zr]||null,u[Ot]=o,u[wa]=Jx(),u[Oi]=d,u[Np]=l,u[Rt]=t.type==2?n[Rt]:u,u}function $I(n,t,e){let r=Sn(t,n),i=HI(e),o=n[zn].rendererFactory,s=yg(n,vg(n,i,null,m0(e),r,t,null,o.createRenderer(r,e),null,null,null));return n[t.index]=s}function m0(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function g0(n,t,e,r){if(e===0)return-1;let i=t.length;for(let o=0;o<e;o++)t.push(r),n.blueprint.push(r),n.data.push(null);return i}function yg(n,t){return n[jo]?n[Pp][sn]=t:n[jo]=t,n[Pp]=t,t}function y(n=1){v0(Be(),Q(),Yn()+n,!1)}function v0(n,t,e,r){if(!r)if((t[re]&3)===3){let o=n.preOrderCheckHooks;o!==null&&wd(t,o,e)}else{let o=n.preOrderHooks;o!==null&&Ed(t,o,0,e)}ei(e)}var Jd=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(Jd||{});function Fm(n,t,e,r){let i=ee(null);try{let[o,s,a]=n.inputs[e],c=null;(s&Jd.SignalBased)!==0&&(c=t[o][wt]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(t,r)),n.setInput!==null?n.setInput(t,c,r,e,o):TC(t,c,o,r)}finally{ee(i)}}var Qn=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(Qn||{}),zI;function bg(n,t){return zI(n,t)}var Ua=new Set;var y0=new T("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1})});function aC(n,t,e,r){let i=n?.[Fi]?.enter;if(t!==null&&i&&i.has(e.index)){let o=r.get(y0);for(let s of i.get(e.index).animateFns)o.queue.add(s)}}function zo(n,t,e,r,i,o,s,a){if(i!=null){let c,l=!1;En(i)?c=i:Gn(i)&&(l=!0,i=i[wn]);let d=an(i);n===0&&r!==null?(aC(a,r,o,e),s==null?f0(t,r,d):Od(t,r,d,s||null,!0)):n===1&&r!==null?(aC(a,r,o,e),Od(t,r,d,s||null,!0)):n===2?cC(a,o,e,u=>{h0(t,d,l,u)}):n===3&&cC(a,o,e,()=>{t.destroyNode(d)}),c!=null&&nk(t,n,e,c,o,r,s)}}function WI(n,t){let e=n.get(y0);if(Array.isArray(t))for(let r of t)e.queue.add(r);else e.queue.add(t)}function GI(n,t){b0(n,t),t[wn]=null,t[Ot]=null}function qI(n,t,e,r,i,o){r[wn]=i,r[Ot]=t,tu(n,r,e,1,i,o)}function b0(n,t){t[zn].changeDetectionScheduler?.notify(9),tu(n,t,t[Le],2,null,null)}function YI(n){let t=n[jo];if(!t)return pm(n[Y],n);for(;t;){let e=null;if(Gn(t))e=t[jo];else{let r=t[Je];r&&(e=r)}if(!e){for(;t&&!t[sn]&&t!==n;)Gn(t)&&pm(t[Y],t),t=t[nt];t===null&&(t=n),Gn(t)&&pm(t[Y],t),e=t&&t[sn]}t=e}}function _g(n,t){let e=n[Li],r=e.indexOf(t);e.splice(r,1)}function eu(n,t){if(Vi(t))return;let e=t[Le];e.destroyNode&&tu(n,t,e,3,null,null),YI(t)}function pm(n,t){if(Vi(t))return;let e=ee(null);try{t[re]&=-129,t[re]|=256,t[Jt]&&sa(t[Jt]),QI(n,t),KI(n,t),t[Y].type===1&&t[Le].destroy();let r=t[Kr];if(r!==null&&En(t[nt])){r!==t[nt]&&_g(r,t);let i=t[Wn];i!==null&&i.detachView(n)}Dm(t)}finally{ee(e)}}function cC(n,t,e,r){let i=n?.[Fi];if(i==null||i.leave==null||!i.leave.has(t.index))return r(!1);if(i.skipLeaveAnimations)return i.skipLeaveAnimations=!1,r(!1);WI(e,()=>{if(i.leave&&i.leave.has(t.index)){let s=i.leave.get(t.index),a=[];if(s)for(let c=0;c<s.animateFns.length;c++){let l=s.animateFns[c],{promise:d}=l();a.push(d)}i.running=Promise.allSettled(a),ZI(n,r)}else n&&Ua.delete(n),r(!1)})}function ZI(n,t){let e=n[Fi]?.running;if(e){e.then(()=>{n[Fi].running=void 0,Ua.delete(n),t(!0)});return}t(!1)}function KI(n,t){let e=n.cleanup,r=t[Vo];if(e!==null)for(let s=0;s<e.length-1;s+=2)if(typeof e[s]=="string"){let a=e[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[e[s+1]];e[s].call(a)}r!==null&&(t[Vo]=null);let i=t[_r];if(i!==null){t[_r]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=t[Ea];if(o!==null){t[Ea]=null;for(let s of o)s.destroy()}}function QI(n,t){let e;if(n!=null&&(e=n.destroyHooks)!=null)for(let r=0;r<e.length;r+=2){let i=t[e[r]];if(!(i instanceof Bi)){let o=e[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],c=o[s+1];Oe(4,a,c);try{c.call(a)}finally{Oe(5,a,c)}}else{Oe(4,i,o);try{o.call(i)}finally{Oe(5,i,o)}}}}}function _0(n,t,e){return XI(n,t.parent,e)}function XI(n,t,e){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return e[wn];if(Xr(r)){let{encapsulation:i}=n.data[r.directiveStart+r.componentOffset];if(i===Er.None||i===Er.Emulated)return null}return Sn(r,e)}function C0(n,t,e){return ek(n,t,e)}function JI(n,t,e){return n.type&40?Sn(n,e):null}var ek=JI,lC;function Cg(n,t,e,r){let i=_0(n,r,t),o=t[Le],s=r.parent||t[Ot],a=C0(s,r,t);if(i!=null)if(Array.isArray(e))for(let c=0;c<e.length;c++)sC(o,i,e[c],a,!1);else sC(o,i,e,a,!1);lC!==void 0&&lC(o,r,t,e,i)}function ka(n,t){if(t!==null){let e=t.type;if(e&3)return Sn(t,n);if(e&4)return Lm(-1,n[t.index]);if(e&8){let r=t.child;if(r!==null)return ka(n,r);{let i=n[t.index];return En(i)?Lm(-1,i):an(i)}}else{if(e&128)return ka(n,t.next);if(e&32)return bg(t,n)()||an(n[t.index]);{let r=w0(n,t);if(r!==null){if(Array.isArray(r))return r[0];let i=zr(n[Rt]);return ka(i,r)}else return ka(n,t.next)}}}return null}function w0(n,t){if(t!==null){let r=n[Rt][Ot],i=t.projection;return r.projection[i]}return null}function Lm(n,t){let e=Je+n+1;if(e<t.length){let r=t[e],i=r[Y].firstChild;if(i!==null)return ka(r,i)}return t[Qr]}function wg(n,t,e,r,i,o,s){for(;e!=null;){let a=r[Zr];if(e.type===128){e=e.next;continue}let c=r[e.index],l=e.type;if(s&&t===0&&(c&&Yo(an(c),r),e.flags|=2),!Kd(e))if(l&8)wg(n,t,e.child,r,i,o,!1),zo(t,n,a,i,c,e,o,r);else if(l&32){let d=bg(e,r),u;for(;u=d();)zo(t,n,a,i,u,e,o,r);zo(t,n,a,i,c,e,o,r)}else l&16?E0(n,t,r,e,i,o):zo(t,n,a,i,c,e,o,r);e=s?e.projectionNext:e.next}}function tu(n,t,e,r,i,o){wg(e,r,n.firstChild,t,i,o,!1)}function tk(n,t,e){let r=t[Le],i=_0(n,e,t),o=e.parent||t[Ot],s=C0(o,e,t);E0(r,0,t,e,i,s)}function E0(n,t,e,r,i,o){let s=e[Rt],c=s[Ot].projection[r.projection];if(Array.isArray(c))for(let l=0;l<c.length;l++){let d=c[l];zo(t,n,e[Zr],i,d,r,o,e)}else{let l=c,d=s[nt];$C(r)&&(l.flags|=128),wg(n,t,l,d,i,o,!0)}}function nk(n,t,e,r,i,o,s){let a=r[Qr],c=an(r);a!==c&&zo(t,n,e,o,a,i,s);for(let l=Je;l<r.length;l++){let d=r[l];tu(d[Y],d,n,t,o,a)}}function rk(n,t,e,r,i){if(t)i?n.addClass(e,r):n.removeClass(e,r);else{let o=r.indexOf("-")===-1?void 0:Qn.DashCase;i==null?n.removeStyle(e,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=Qn.Important),n.setStyle(e,r,i,o))}}function S0(n,t,e,r,i){let o=Yn(),s=r&2;try{ei(-1),s&&t.length>Ye&&v0(n,t,Ye,!1),Oe(s?2:0,i,e),e(r,i)}finally{ei(o),Oe(s?3:1,i,e)}}function Eg(n,t,e){lk(n,t,e),(e.flags&64)===64&&dk(n,t,e)}function nu(n,t,e=Sn){let r=t.localNames;if(r!==null){let i=t.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?e(t,n):n[s];n[i++]=a}}}function ik(n,t,e,r){let o=r.get(QC,KC)||e===Er.ShadowDom,s=n.selectRootElement(t,o);return ok(s),s}function ok(n){sk(n)}var sk=()=>null;function ak(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function D0(n,t,e,r,i,o){let s=t[Y];if(Sg(n,s,t,e,r)){Xr(n)&&ck(t,n.index);return}n.type&3&&(e=ak(e)),M0(n,t,e,r,i,o)}function M0(n,t,e,r,i,o){if(n.type&3){let s=Sn(n,t);r=o!=null?o(r,n.value||"",e):r,i.setProperty(s,e,r)}else n.type&12}function ck(n,t){let e=cn(t,n);e[re]&16||(e[re]|=64)}function lk(n,t,e){let r=e.directiveStart,i=e.directiveEnd;Xr(e)&&$I(t,e,n.data[r+e.componentOffset]),n.firstCreatePass||Ad(e,t);let o=e.initialInputs;for(let s=r;s<i;s++){let a=n.data[s],c=Oa(t,n,s,e);if(Yo(c,t),o!==null&&pk(t,s-r,c,a,e,o),qn(a)){let l=cn(e.index,t);l[Ke]=Oa(t,n,s,e)}}}function dk(n,t,e){let r=e.directiveStart,i=e.directiveEnd,o=e.index,s=V_();try{ei(o);for(let a=r;a<i;a++){let c=n.data[a],l=t[a];dd(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&uk(c,l)}}finally{ei(-1),dd(s)}}function uk(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function T0(n,t){let e=n.directiveRegistry,r=null;if(e)for(let i=0;i<e.length;i++){let o=e[i];d0(t,o.selectors,!1)&&(r??=[],qn(o)?r.unshift(o):r.push(o))}return r}function fk(n,t,e,r,i,o){let s=Sn(n,t);hk(t[Le],s,o,n.value,e,r,i)}function hk(n,t,e,r,i,o,s){if(o==null)n.removeAttribute(t,i,e);else{let a=s==null?qr(o):s(o,r||"",i);n.setAttribute(t,i,a,e)}}function pk(n,t,e,r,i,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],l=s[a+1];Fm(r,e,c,l)}}function x0(n,t,e,r,i){let o=Ye+e,s=t[Y],a=i(s,t,n,r,e);t[o]=a,Ho(n,!0);let c=n.type===2;return c?(p0(t[Le],a,n),(A_()===0||Da(n))&&Yo(a,t),O_()):Yo(a,t),pd()&&(!c||!Kd(n))&&Cg(s,t,a,n),n}function I0(n){let t=n;return Qp()?Xp():(t=t.parent,Ho(t,!1)),t}function mk(n,t){let e=n[Zr];if(!e)return;let r;try{r=e.get(Pt,null)}catch{r=null}r?.(t)}function Sg(n,t,e,r,i){let o=n.inputs?.[r],s=n.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let l=s[c],d=s[c+1],u=t.data[l];Fm(u,e[l],d,i),a=!0}if(o)for(let c of o){let l=e[c],d=t.data[c];Fm(d,l,r,i),a=!0}return a}function gk(n,t){let e=cn(t,n),r=e[Y];vk(r,e);let i=e[wn];i!==null&&e[Oi]===null&&(e[Oi]=XC(i,e[Zr])),Oe(18),Dg(r,e,e[Ke]),Oe(19,e[Ke])}function vk(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function Dg(n,t,e){fd(t);try{let r=n.viewQuery;r!==null&&Tm(1,r,e);let i=n.template;i!==null&&S0(n,t,i,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[Wn]?.finishViewCreation(n),n.staticContentQueries&&JC(n,t),n.staticViewQueries&&Tm(2,n.viewQuery,e);let o=n.components;o!==null&&yk(t,o)}catch(r){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),r}finally{t[re]&=-5,hd()}}function yk(n,t){for(let e=0;e<t.length;e++)gk(n,t[e])}function Ha(n,t,e,r){let i=ee(null);try{let o=t.tView,a=n[re]&4096?4096:16,c=vg(n,o,e,a,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=n[t.index];c[Kr]=l;let d=n[Wn];return d!==null&&(c[Wn]=d.createEmbeddedView(o)),Dg(o,c,e),c}finally{ee(i)}}function Zo(n,t){return!t||t.firstChild===null||$C(n)}function Ra(n,t,e,r,i=!1){for(;e!==null;){if(e.type===128){e=i?e.projectionNext:e.next;continue}let o=t[e.index];o!==null&&r.push(an(o)),En(o)&&k0(o,r);let s=e.type;if(s&8)Ra(n,t,e.child,r);else if(s&32){let a=bg(e,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=w0(t,e);if(Array.isArray(a))r.push(...a);else{let c=zr(t[Rt]);Ra(c[Y],c,a,r,!0)}}e=i?e.projectionNext:e.next}return r}function k0(n,t){for(let e=Je;e<n.length;e++){let r=n[e],i=r[Y].firstChild;i!==null&&Ra(r[Y],r,i,t)}n[Qr]!==n[wn]&&t.push(n[Qr])}function A0(n){if(n[Ni]!==null){for(let t of n[Ni])t.impl.addSequence(t);n[Ni].length=0}}var O0=[];function bk(n){return n[Jt]??_k(n)}function _k(n){let t=O0.pop()??Object.create(wk);return t.lView=n,t}function Ck(n){n.lView[Jt]!==n&&(n.lView=null,O0.push(n))}var wk=X(E({},_o),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{Uo(n.lView)},consumerOnSignalRead(){this.lView[Jt]=this}});function Ek(n){let t=n[Jt]??Object.create(Sk);return t.lView=n,t}var Sk=X(E({},_o),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=zr(n.lView);for(;t&&!R0(t[Y]);)t=zr(t);t&&Up(t)},consumerOnSignalRead(){this.lView[Jt]=this}});function R0(n){return n.type!==2}function P0(n){if(n[Ea]===null)return;let t=!0;for(;t;){let e=!1;for(let r of n[Ea])r.dirty&&(e=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=e&&!!(n[re]&8192)}}var Dk=100;function N0(n,t=0){let r=n[zn].rendererFactory,i=!1;i||r.begin?.();try{Mk(n,t)}finally{i||r.end?.()}}function Mk(n,t){let e=Jp();try{em(!0),Vm(n,t);let r=0;for(;Ta(n);){if(r===Dk)throw new S(103,!1);r++,Vm(n,1)}}finally{em(e)}}function Tk(n,t,e,r){if(Vi(t))return;let i=t[re],o=!1,s=!1;fd(t);let a=!0,c=null,l=null;o||(R0(n)?(l=bk(t),c=wo(l)):pl()===null?(a=!1,l=Ek(t),c=wo(l)):t[Jt]&&(sa(t[Jt]),t[Jt]=null));try{Bp(t),N_(n.bindingStartIndex),e!==null&&S0(n,t,e,2,r);let d=(i&3)===3;if(!o)if(d){let h=n.preOrderCheckHooks;h!==null&&wd(t,h,null)}else{let h=n.preOrderHooks;h!==null&&Ed(t,h,0,null),fm(t,0)}if(s||xk(t),P0(t),F0(t,0),n.contentQueries!==null&&JC(n,t),!o)if(d){let h=n.contentCheckHooks;h!==null&&wd(t,h)}else{let h=n.contentHooks;h!==null&&Ed(t,h,1),fm(t,1)}kk(n,t);let u=n.components;u!==null&&V0(t,u,0);let p=n.viewQuery;if(p!==null&&Tm(2,p,r),!o)if(d){let h=n.viewCheckHooks;h!==null&&wd(t,h)}else{let h=n.viewHooks;h!==null&&Ed(t,h,2),fm(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[sd]){for(let h of t[sd])h();t[sd]=null}o||(A0(t),t[re]&=-73)}catch(d){throw o||Uo(t),d}finally{l!==null&&(ia(l,c),a&&Ck(l)),hd()}}function F0(n,t){for(let e=WC(n);e!==null;e=GC(e))for(let r=Je;r<e.length;r++){let i=e[r];L0(i,t)}}function xk(n){for(let t=WC(n);t!==null;t=GC(t)){if(!(t[re]&2))continue;let e=t[Li];for(let r=0;r<e.length;r++){let i=e[r];Up(i)}}}function Ik(n,t,e){Oe(18);let r=cn(t,n);L0(r,e),Oe(19,r[Ke])}function L0(n,t){ad(n)&&Vm(n,t)}function Vm(n,t){let r=n[Y],i=n[re],o=n[Jt],s=!!(t===0&&i&16);if(s||=!!(i&64&&t===0),s||=!!(i&1024),s||=!!(o?.dirty&&oa(o)),s||=!1,o&&(o.dirty=!1),n[re]&=-9217,s)Tk(r,n,r.template,n[Ke]);else if(i&8192){let a=ee(null);try{P0(n),F0(n,1);let c=r.components;c!==null&&V0(n,c,1),A0(n)}finally{ee(a)}}}function V0(n,t,e){for(let r=0;r<t.length;r++)Ik(n,t[r],e)}function kk(n,t){let e=n.hostBindingOpCodes;if(e!==null)try{for(let r=0;r<e.length;r++){let i=e[r];if(i<0)ei(~i);else{let o=i,s=e[++r],a=e[++r];L_(s,o);let c=t[o];Oe(24,c),a(2,c),Oe(25,c)}}}finally{ei(-1)}}function Mg(n,t){let e=Jp()?64:1088;for(n[zn].changeDetectionScheduler?.notify(t);n;){n[re]|=e;let r=zr(n);if(Bo(n)&&!r)return n;n=r}return null}function j0(n,t,e,r){return[n,!0,0,t,null,r,null,e,null,null]}function B0(n,t){let e=Je+t;if(e<n.length)return n[e]}function $a(n,t,e,r=!0){let i=t[Y];if(Ak(i,t,n,e),r){let s=Lm(e,n),a=t[Le],c=a.parentNode(n[Qr]);c!==null&&qI(i,n[Ot],a,t,c,s)}let o=t[Oi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function U0(n,t){let e=Pa(n,t);return e!==void 0&&eu(e[Y],e),e}function Pa(n,t){if(n.length<=Je)return;let e=Je+t,r=n[e];if(r){let i=r[Kr];i!==null&&i!==n&&_g(i,r),t>0&&(n[e-1][sn]=r[sn]);let o=_a(n,Je+t);GI(r[Y],r);let s=o[Wn];s!==null&&s.detachView(o[Y]),r[nt]=null,r[sn]=null,r[re]&=-129}return r}function Ak(n,t,e,r){let i=Je+r,o=e.length;r>0&&(e[i-1][sn]=t),r<o-Je?(t[sn]=e[i],Mp(e,Je+r,t)):(e.push(t),t[sn]=null),t[nt]=e;let s=t[Kr];s!==null&&e!==s&&H0(s,t);let a=t[Wn];a!==null&&a.insertView(n),cd(t),t[re]|=128}function H0(n,t){let e=n[Li],r=t[nt];if(Gn(r))n[re]|=2;else{let i=r[nt][Rt];t[Rt]!==i&&(n[re]|=2)}e===null?n[Li]=[t]:e.push(t)}var ti=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[Y];return Ra(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[Ke]}set context(t){this._lView[Ke]=t}get destroyed(){return Vi(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[nt];if(En(t)){let e=t[Sa],r=e?e.indexOf(this):-1;r>-1&&(Pa(t,r),_a(e,r))}this._attachedToViewContainer=!1}eu(this._lView[Y],this._lView)}onDestroy(t){Hp(this._lView,t)}markForCheck(){Mg(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[re]&=-129}reattach(){cd(this._lView),this._lView[re]|=128}detectChanges(){this._lView[re]|=1024,N0(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new S(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Bo(this._lView),e=this._lView[Kr];e!==null&&!t&&_g(e,this._lView),b0(this._lView[Y],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new S(902,!1);this._appRef=t;let e=Bo(this._lView),r=this._lView[Kr];r!==null&&!e&&H0(r,this._lView),cd(this._lView)}};var Tn=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Ok;constructor(e,r,i){this._declarationLView=e,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,i){let o=Ha(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:r,dehydratedView:i});return new ti(o)}}return n})();function Ok(){return Tg(rt(),Q())}function Tg(n,t){return n.type&4?new Tn(t,n,Qo(n,t)):null}function ts(n,t,e,r,i){let o=n.data[t];if(o===null)o=Rk(n,t,e,r,i),F_()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=r,o.attrs=i;let s=R_();o.injectorIndex=s===null?-1:s.injectorIndex}return Ho(o,!0),o}function Rk(n,t,e,r,i){let o=Kp(),s=Qp(),a=s?o:o&&o.parent,c=n.data[t]=Nk(n,a,e,t,r,i);return Pk(n,c,o,s),c}function Pk(n,t,e,r){n.firstChild===null&&(n.firstChild=t),e!==null&&(r?e.child==null&&t.parent!==null&&(e.child=t):e.next===null&&(e.next=t,t.prev=e))}function Nk(n,t,e,r,i,o){let s=t?t.injectorIndex:-1,a=0;return qp()&&(a|=128),{type:e,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var U8=new RegExp(`^(\\d+)*(${rI}|${nI})*(.*)`);function Fk(n){let t=n[Fp]??[],r=n[nt][Le],i=[];for(let o of t)o.data[ZC]!==void 0?i.push(o):Lk(o,r);n[Fp]=i}function Lk(n,t){let e=0,r=n.firstChild;if(r){let i=n.data[YC];for(;e<i;){let o=r.nextSibling;h0(t,r,!1),r=o,e++}}}var Vk=()=>null,jk=()=>null;function Rd(n,t){return Vk(n,t)}function $0(n,t,e){return jk(n,t,e)}var z0=class{},ru=class{},jm=class{resolveComponentFactory(t){throw new S(917,!1)}},za=class{static NULL=new jm},et=class{},it=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>Bk()}return n})();function Bk(){let n=Q(),t=rt(),e=cn(t.index,n);return(Gn(e)?e:n)[Le]}var W0=(()=>{class n{static \u0275prov=C({token:n,providedIn:"root",factory:()=>null})}return n})();var Dd={},Bm=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,r){let i=this.injector.get(t,Dd,r);return i!==Dd||e===Dd?i:this.parentInjector.get(t,e,r)}};function Pd(n,t,e){let r=e?n.styles:null,i=e?n.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)i=Jl(i,a);else if(o==2){let c=a,l=t[++s];r=Jl(r,c+": "+l+";")}}e?n.styles=r:n.stylesWithoutHost=r,e?n.classes=i:n.classesWithoutHost=i}function ye(n,t=0){let e=Q();if(e===null)return N(n,t);let r=rt();return BC(r,e,mt(n),t)}function xg(){let n="invalid";throw new Error(n)}function G0(n,t,e,r,i){let o=r===null?null:{"":-1},s=i(n,e);if(s!==null){let a=s,c=null,l=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,c,l]=d.resolveHostDirectives(s);break}$k(n,t,e,a,o,c,l)}o!==null&&r!==null&&Uk(e,r,o)}function Uk(n,t,e){let r=n.localNames=[];for(let i=0;i<t.length;i+=2){let o=e[t[i+1]];if(o==null)throw new S(-301,!1);r.push(t[i],o)}}function Hk(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function $k(n,t,e,r,i,o,s){let a=r.length,c=!1;for(let p=0;p<a;p++){let h=r[p];!c&&qn(h)&&(c=!0,Hk(n,e,p)),Em(Ad(e,t),n,h.type)}Zk(e,n.data.length,a);for(let p=0;p<a;p++){let h=r[p];h.providersResolver&&h.providersResolver(h)}let l=!1,d=!1,u=g0(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let p=0;p<a;p++){let h=r[p];if(e.mergedAttrs=Go(e.mergedAttrs,h.hostAttrs),Wk(n,e,t,u,h),Yk(u,h,i),s!==null&&s.has(h)){let[_,D]=s.get(h);e.directiveToIndex.set(h.type,[u,_+e.directiveStart,D+e.directiveStart])}else(o===null||!o.has(h))&&e.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(e.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(e.flags|=64);let v=h.type.prototype;!l&&(v.ngOnChanges||v.ngOnInit||v.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),l=!0),!d&&(v.ngOnChanges||v.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),d=!0),u++}zk(n,e,o)}function zk(n,t,e){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=n.data[r];if(e===null||!e.has(i))dC(0,t,i,r),dC(1,t,i,r),fC(t,r,!1);else{let o=e.get(i);uC(0,t,o,r),uC(1,t,o,r),fC(t,r,!0)}}}function dC(n,t,e,r){let i=n===0?e.inputs:e.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;n===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(r),q0(t,o)}}function uC(n,t,e,r){let i=n===0?e.inputs:e.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;n===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),q0(t,s)}}function q0(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function fC(n,t,e){let{attrs:r,inputs:i,hostDirectiveInputs:o}=n;if(r===null||!e&&i===null||e&&o===null||mg(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c=="number")break;if(!e&&i.hasOwnProperty(c)){let l=i[c];for(let d of l)if(d===t){s??=[],s.push(c,r[a+1]);break}}else if(e&&o.hasOwnProperty(c)){let l=o[c];for(let d=0;d<l.length;d+=2)if(l[d]===t){s??=[],s.push(l[d+1],r[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function Wk(n,t,e,r,i){n.data[r]=i;let o=i.factory||(i.factory=$r(i.type,!0)),s=new Bi(o,qn(i),ye,null);n.blueprint[r]=s,e[r]=s,Gk(n,t,r,g0(n,e,i.hostVars,$t),i)}function Gk(n,t,e,r,i){let o=i.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;qk(s)!=a&&s.push(a),s.push(e,r,o)}}function qk(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function Yk(n,t,e){if(e){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)e[t.exportAs[r]]=n;qn(t)&&(e[""]=n)}}function Zk(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function Y0(n,t,e,r,i,o,s,a){let c=t[Y],l=c.consts,d=ln(l,s),u=ts(c,n,e,r,d);return o&&G0(c,t,u,ln(l,a),i),u.mergedAttrs=Go(u.mergedAttrs,u.attrs),u.attrs!==null&&Pd(u,u.attrs,!1),u.mergedAttrs!==null&&Pd(u,u.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,u),u}function Z0(n,t){AC(n,t),Lp(t)&&n.queries.elementEnd(t)}function Kk(n,t,e,r,i,o){let s=t.consts,a=ln(s,i),c=ts(t,n,e,r,a);if(c.mergedAttrs=Go(c.mergedAttrs,c.attrs),o!=null){let l=ln(s,o);c.localNames=[];for(let d=0;d<l.length;d+=2)c.localNames.push(l[d],-1)}return c.attrs!==null&&Pd(c,c.attrs,!1),c.mergedAttrs!==null&&Pd(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}function Qk(n,t,e){return n[t]=e}function un(n,t,e){if(e===$t)return!1;let r=n[t];return Object.is(r,e)?!1:(n[t]=e,!0)}function Xk(n,t,e,r){let i=un(n,t,e);return un(n,t+1,r)||i}function Md(n,t,e){return function r(i){let o=Xr(n)?cn(n.index,t):t;Mg(o,5);let s=t[Ke],a=hC(t,s,e,i),c=r.__ngNextListenerFn__;for(;c;)a=hC(t,s,c,i)&&a,c=c.__ngNextListenerFn__;return a}}function hC(n,t,e,r){let i=ee(null);try{return Oe(6,t,e),e(r)!==!1}catch(o){return mk(n,o),!1}finally{Oe(7,t,e),ee(i)}}function K0(n,t,e,r,i,o,s,a){let c=Da(n),l=!1,d=null;if(!r&&c&&(d=eA(t,e,o,n.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,l=!0}else{let u=Sn(n,e),p=r?r(u):u;oI(e,p,o,a);let h=i.listen(p,o,a);if(!Jk(o)){let v=r?_=>r(an(_[n.index])):n.index;Q0(v,t,e,o,a,h,!1)}}return l}function Jk(n){return n.startsWith("animation")||n.startsWith("transition")}function eA(n,t,e,r){let i=n.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===e&&i[o+1]===r){let a=t[Vo],c=i[o+2];return a&&a.length>c?a[c]:null}typeof s=="string"&&(o+=2)}return null}function Q0(n,t,e,r,i,o,s){let a=t.firstCreatePass?zp(t):null,c=$p(e),l=c.length;c.push(i,o),a&&a.push(r,n,l,(l+1)*(s?-1:1))}function pC(n,t,e,r,i,o){let s=t[e],a=t[Y],l=a.data[e].outputs[r],u=s[l].subscribe(o);Q0(n.index,a,t,i,o,u,!0)}var Um=Symbol("BINDING");var Nd=class extends za{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=$n(t);return new ni(e,this.ngModule)}};function tA(n){return Object.keys(n).map(t=>{let[e,r,i]=n[t],o={propName:e,templateName:t,isSignal:(r&Jd.SignalBased)!==0};return i&&(o.transform=i),o})}function nA(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function rA(n,t,e){let r=t instanceof Fe?t:t?.injector;return r&&n.getStandaloneInjector!==null&&(r=n.getStandaloneInjector(r)||r),r?new Bm(e,r):e}function iA(n){let t=n.get(et,null);if(t===null)throw new S(407,!1);let e=n.get(W0,null),r=n.get(wr,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:r,ngReflect:!1}}function oA(n,t){let e=X0(n);return u0(t,e,e==="svg"?E_:e==="math"?S_:null)}function X0(n){return(n.selectors[0][0]||"div").toLowerCase()}var ni=class extends ru{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=tA(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=nA(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=NI(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,r,i,o,s){Oe(22);let a=ee(null);try{let c=this.componentDef,l=sA(r,c,s,o),d=rA(c,i||this.ngModule,t),u=iA(d),p=u.rendererFactory.createRenderer(null,c),h=r?ik(p,r,c.encapsulation,d):oA(c,p),v=s?.some(mC)||o?.some(M=>typeof M!="function"&&M.bindings.some(mC)),_=vg(null,l,null,512|m0(c),null,null,u,p,d,null,XC(h,d,!0));_[Ye]=h,fd(_);let D=null;try{let M=Y0(Ye,_,2,"#host",()=>l.directiveRegistry,!0,0);p0(p,h,M),Yo(h,_),Eg(l,_,M),e0(l,M,_),Z0(l,M),e!==void 0&&cA(M,this.ngContentSelectors,e),D=cn(M.index,_),_[Ke]=D[Ke],Dg(l,_,null)}catch(M){throw D!==null&&Dm(D),Dm(_),M}finally{Oe(23),hd()}return new Fd(this.componentType,_,!!v)}finally{ee(a)}}};function sA(n,t,e,r){let i=n?["ng-version","20.3.4"]:FI(t.selectors[0]),o=null,s=null,a=0;if(e)for(let d of e)a+=d[Um].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(r)for(let d=0;d<r.length;d++){let u=r[d];if(typeof u!="function")for(let p of u.bindings){a+=p[Um].requiredVars;let h=d+1;p.create&&(p.targetIdx=h,(o??=[]).push(p)),p.update&&(p.targetIdx=h,(s??=[]).push(p))}}let c=[t];if(r)for(let d of r){let u=typeof d=="function"?d:d.type,p=kp(u);c.push(p)}return gg(0,null,aA(o,s),1,a,c,null,null,null,[i],null)}function aA(n,t){return!n&&!t?null:e=>{if(e&1&&n)for(let r of n)r.create();if(e&2&&t)for(let r of t)r.update()}}function mC(n){let t=n[Um].kind;return t==="input"||t==="twoWay"}var Fd=class extends z0{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,r){super(),this._rootLView=e,this._hasInputBindings=r,this._tNode=Ma(e[Y],Ye),this.location=Qo(this._tNode,e),this.instance=cn(this._tNode.index,e)[Ke],this.hostView=this.changeDetectorRef=new ti(e,void 0),this.componentType=t}setInput(t,e){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let i=this._rootLView,o=Sg(r,i[Y],i,t,e);this.previousInputValues.set(t,e);let s=cn(r.index,i);Mg(s,1)}get injector(){return new ji(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function cA(n,t,e){let r=n.projection=[];for(let i=0;i<t.length;i++){let o=e[i];r.push(o!=null&&o.length?Array.from(o):null)}}var xn=(()=>{class n{static __NG_ELEMENT_ID__=lA}return n})();function lA(){let n=rt();return ew(n,Q())}var dA=xn,J0=class extends dA{_lContainer;_hostTNode;_hostLView;constructor(t,e,r){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=r}get element(){return Qo(this._hostTNode,this._hostLView)}get injector(){return new ji(this._hostTNode,this._hostLView)}get parentInjector(){let t=sg(this._hostTNode,this._hostLView);if(PC(t)){let e=Id(t,this._hostLView),r=xd(t),i=e[Y].data[r+8];return new ji(i,e)}else return new ji(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=gC(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Je}createEmbeddedView(t,e,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=Rd(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,i,Zo(this._hostTNode,s)),a}createComponent(t,e,r,i,o,s,a){let c=t&&!kx(t),l;if(c)l=e;else{let D=e||{};l=D.index,r=D.injector,i=D.projectableNodes,o=D.environmentInjector||D.ngModuleRef,s=D.directives,a=D.bindings}let d=c?t:new ni($n(t)),u=r||this.parentInjector;if(!o&&d.ngModule==null){let M=(c?u:this.parentInjector).get(Fe,null);M&&(o=M)}let p=$n(d.componentType??{}),h=Rd(this._lContainer,p?.id??null),v=h?.firstChild??null,_=d.create(u,i,v,o,s,a);return this.insertImpl(_.hostView,l,Zo(this._hostTNode,h)),_}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,r){let i=t._lView;if(T_(i)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=i[nt],l=new J0(c,c[Ot],c[nt]);l.detach(l.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return $a(s,i,o,r),t.attachToViewContainerRef(),Mp(mm(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=gC(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),r=Pa(this._lContainer,e);r&&(_a(mm(this._lContainer),e),eu(r[Y],r))}detach(t){let e=this._adjustIndex(t,-1),r=Pa(this._lContainer,e);return r&&_a(mm(this._lContainer),e)!=null?new ti(r):null}_adjustIndex(t,e=0){return t??this.length+e}};function gC(n){return n[Sa]}function mm(n){return n[Sa]||(n[Sa]=[])}function ew(n,t){let e,r=t[n.index];return En(r)?e=r:(e=j0(r,t,null,n),t[n.index]=e,yg(t,e)),fA(e,t,n,r),new J0(e,n,t)}function uA(n,t){let e=n[Le],r=e.createComment(""),i=Sn(t,n),o=e.parentNode(i);return Od(e,o,r,e.nextSibling(i),!1),r}var fA=mA,hA=()=>!1;function pA(n,t,e){return hA(n,t,e)}function mA(n,t,e,r){if(n[Qr])return;let i;e.type&8?i=an(r):i=uA(t,e),n[Qr]=i}var Hm=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},$m=class n{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(e!==null){let r=t.contentQueries!==null?t.contentQueries[0]:e.length,i=[];for(let o=0;o<r;o++){let s=e.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new n(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)Ig(t,e).matches!==null&&this.queries[e].setDirty()}},Ld=class{flags;read;predicate;constructor(t,e,r=null){this.flags=e,this.read=r,typeof t=="string"?this.predicate=EA(t):this.predicate=t}},zm=class n{queries;constructor(t=[]){this.queries=t}elementStart(t,e){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let r=0;r<this.length;r++){let i=e!==null?e.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,e!==null?e.push(o):e=[o])}return e!==null?new n(e):null}template(t,e){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},Wm=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,e=-1){this.metadata=t,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new n(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let e=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==e;)r=r.parent;return e===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(t,e,gA(e,o)),this.matchTNodeWithReadOption(t,e,Sd(e,t,o,!1,!1))}else r===Tn?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Sd(e,t,r,!1,!1))}matchTNodeWithReadOption(t,e,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===ue||i===xn||i===Tn&&e.type&4)this.addMatch(e.index,-2);else{let o=Sd(e,t,i,!1,!1);o!==null&&this.addMatch(e.index,o)}else this.addMatch(e.index,r)}}addMatch(t,e){this.matches===null?this.matches=[t,e]:this.matches.push(t,e)}};function gA(n,t){let e=n.localNames;if(e!==null){for(let r=0;r<e.length;r+=2)if(e[r]===t)return e[r+1]}return null}function vA(n,t){return n.type&11?Qo(n,t):n.type&4?Tg(n,t):null}function yA(n,t,e,r){return e===-1?vA(t,n):e===-2?bA(n,t,r):Oa(n,n[Y],e,t)}function bA(n,t,e){if(e===ue)return Qo(t,n);if(e===Tn)return Tg(t,n);if(e===xn)return ew(t,n)}function tw(n,t,e,r){let i=t[Wn].queries[r];if(i.matches===null){let o=n.data,s=e.matches,a=[];for(let c=0;s!==null&&c<s.length;c+=2){let l=s[c];if(l<0)a.push(null);else{let d=o[l];a.push(yA(t,d,s[c+1],e.metadata.read))}}i.matches=a}return i.matches}function Gm(n,t,e,r){let i=n.queries.getByIndex(e),o=i.matches;if(o!==null){let s=tw(n,t,i,e);for(let a=0;a<o.length;a+=2){let c=o[a];if(c>0)r.push(s[a/2]);else{let l=o[a+1],d=t[-c];for(let u=Je;u<d.length;u++){let p=d[u];p[Kr]===p[nt]&&Gm(p[Y],p,l,r)}if(d[Li]!==null){let u=d[Li];for(let p=0;p<u.length;p++){let h=u[p];Gm(h[Y],h,l,r)}}}}}return r}function _A(n,t){return n[Wn].queries[t].queryList}function nw(n,t,e){let r=new qo((e&4)===4);return k_(n,t,r,r.destroy),(t[Wn]??=new $m).queries.push(new Hm(r))-1}function CA(n,t,e){let r=Be();return r.firstCreatePass&&(rw(r,new Ld(n,t,e),-1),(t&2)===2&&(r.staticViewQueries=!0)),nw(r,Q(),t)}function wA(n,t,e,r){let i=Be();if(i.firstCreatePass){let o=rt();rw(i,new Ld(t,e,r),o.index),SA(i,n),(e&2)===2&&(i.staticContentQueries=!0)}return nw(i,Q(),e)}function EA(n){return n.split(",").map(t=>t.trim())}function rw(n,t,e){n.queries===null&&(n.queries=new zm),n.queries.track(new Wm(t,e))}function SA(n,t){let e=n.contentQueries||(n.contentQueries=[]),r=e.length?e[e.length-1]:-1;t!==r&&e.push(n.queries.length-1,t)}function Ig(n,t){return n.queries.getByIndex(t)}function DA(n,t){let e=n[Y],r=Ig(e,t);return r.crossesNgTemplate?Gm(e,n,t,[]):tw(e,n,r,t)}var vC=new Set;function en(n){vC.has(n)||(vC.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var Xn=class{},iu=class{};var Vd=class extends Xn{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new Nd(this);constructor(t,e,r,i=!0){super(),this.ngModuleType=t,this._parent=e;let o=Ip(t);this._bootstrapComponents=c0(o.bootstrap),this._r3Injector=om(t,e,[{provide:Xn,useValue:this},{provide:za,useValue:this.componentFactoryResolver},...r],Cr(t),new Set(["environment"])),i&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},jd=class extends iu{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new Vd(this.moduleType,t,[])}};var Na=class extends Xn{injector;componentFactoryResolver=new Nd(this);instance=null;constructor(t){super();let e=new ki([...t.providers,{provide:Xn,useValue:this},{provide:za,useValue:this.componentFactoryResolver}],t.parent||Lo(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function ns(n,t,e=null){return new Na({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var MA=(()=>{class n{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let r=Ap(!1,e.type),i=r.length>0?ns([r],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=C({token:n,providedIn:"environment",factory:()=>new n(N(Fe))})}return n})();function H(n){return Va(()=>{let t=iw(n),e=X(E({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===ag.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(MA).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||Er.Emulated,styles:n.styles||At,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&en("NgStandalone"),ow(e);let r=n.dependencies;return e.directiveDefs=yC(r,TA),e.pipeDefs=yC(r,g_),e.id=kA(e),e})}function TA(n){return $n(n)||kp(n)}function Ce(n){return Va(()=>({type:n.type,bootstrap:n.bootstrap||At,declarations:n.declarations||At,imports:n.imports||At,exports:n.exports||At,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function xA(n,t){if(n==null)return Yr;let e={};for(let r in n)if(n.hasOwnProperty(r)){let i=n[r],o,s,a,c;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,c=i[3]||null):(o=i,s=i,a=Jd.None,c=null),e[o]=[r,a,c],t[o]=s}return e}function IA(n){if(n==null)return Yr;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function fe(n){return Va(()=>{let t=iw(n);return ow(t),t})}function kg(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone??!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function iw(n){let t={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputConfig:n.inputs||Yr,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||At,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:xA(n.inputs,t),outputs:IA(n.outputs),debugInfo:null}}function ow(n){n.features?.forEach(t=>t(n))}function yC(n,t){return n?()=>{let e=typeof n=="function"?n():n,r=[];for(let i of e){let o=t(i);o!==null&&r.push(o)}return r}:null}function kA(n){let t=0,e=typeof n.consts=="function"?"":n.consts,r=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,e,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery];for(let o of r.join("|"))t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function AA(n){return Object.getPrototypeOf(n.prototype).constructor}function Ne(n){let t=AA(n.type),e=!0,r=[n];for(;t;){let i;if(qn(n))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new S(903,!1);i=t.\u0275dir}if(i){if(e){r.push(i);let s=n;s.inputs=gm(n.inputs),s.declaredInputs=gm(n.declaredInputs),s.outputs=gm(n.outputs);let a=i.hostBindings;a&&FA(n,a);let c=i.viewQuery,l=i.contentQueries;if(c&&PA(n,c),l&&NA(n,l),OA(n,i),a_(n.outputs,i.outputs),qn(i)&&i.data.animation){let d=n.data;d.animation=(d.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===Ne&&(e=!1)}}t=Object.getPrototypeOf(t)}RA(r)}function OA(n,t){for(let e in t.inputs){if(!t.inputs.hasOwnProperty(e)||n.inputs.hasOwnProperty(e))continue;let r=t.inputs[e];r!==void 0&&(n.inputs[e]=r,n.declaredInputs[e]=t.declaredInputs[e])}}function RA(n){let t=0,e=null;for(let r=n.length-1;r>=0;r--){let i=n[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Go(i.hostAttrs,e=Go(e,i.hostAttrs))}}function gm(n){return n===Yr?{}:n===At?[]:n}function PA(n,t){let e=n.viewQuery;e?n.viewQuery=(r,i)=>{t(r,i),e(r,i)}:n.viewQuery=t}function NA(n,t){let e=n.contentQueries;e?n.contentQueries=(r,i,o)=>{t(r,i,o),e(r,i,o)}:n.contentQueries=t}function FA(n,t){let e=n.hostBindings;e?n.hostBindings=(r,i)=>{t(r,i),e(r,i)}:n.hostBindings=t}function sw(n,t,e,r,i,o,s,a){if(e.firstCreatePass){n.mergedAttrs=Go(n.mergedAttrs,n.attrs);let d=n.tView=gg(2,n,i,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),d.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),Ho(n,!1);let c=VA(e,t,n,r);pd()&&Cg(e,t,c,n),Yo(c,t);let l=j0(c,t,c,n);t[r+Ye]=l,yg(t,l),pA(l,n,t)}function LA(n,t,e,r,i,o,s,a,c,l,d){let u=e+Ye,p;return t.firstCreatePass?(p=ts(t,u,4,s||null,a||null),Gp()&&G0(t,n,p,ln(t.consts,l),T0),AC(t,p)):p=t.data[u],sw(p,n,t,e,r,i,o,c),Da(p)&&Eg(t,n,p),l!=null&&nu(n,p,d),p}function Fa(n,t,e,r,i,o,s,a,c,l,d){let u=e+Ye,p;if(t.firstCreatePass){if(p=ts(t,u,4,s||null,a||null),l!=null){let h=ln(t.consts,l);p.localNames=[];for(let v=0;v<h.length;v+=2)p.localNames.push(h[v],-1)}}else p=t.data[u];return sw(p,n,t,e,r,i,o,c),l!=null&&nu(n,p,d),p}function ou(n,t,e,r,i,o,s,a){let c=Q(),l=Be(),d=ln(l.consts,o);return LA(c,l,n,t,e,r,i,d,void 0,s,a),ou}var VA=jA;function jA(n,t,e,r){return md(!0),t[Le].createComment("")}var su=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(su||{}),$i=new T(""),aw=!1,qm=class extends A{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,C_()&&(this.destroyRef=f(dn,{optional:!0})??void 0,this.pendingTasks=f(Zn,{optional:!0})??void 0)}emit(t){let e=ee(null);try{super.next(t)}finally{ee(e)}}subscribe(t,e,r){let i=t,o=e||(()=>null),s=r;if(t&&typeof t=="object"){let c=t;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:i,error:o,complete:s});return t instanceof Re&&t.add(a),a}wrapInTimeout(t){return e=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(e)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},U=qm;function cw(n){let t,e;function r(){n=Ia;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{n(),r()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{n(),r()})),()=>r()}function bC(n){return queueMicrotask(()=>n()),()=>{n=Ia}}var Ag="isAngularZone",Bd=Ag+"_ID",BA=0,$=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new U(!1);onMicrotaskEmpty=new U(!1);onStable=new U(!1);onError=new U(!1);constructor(t){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=aw}=t;if(typeof Zone>"u")throw new S(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,$A(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Ag)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new S(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new S(909,!1)}run(t,e,r){return this._inner.run(t,e,r)}runTask(t,e,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,UA,Ia,Ia);try{return o.runTask(s,e,r)}finally{o.cancelTask(s)}}runGuarded(t,e,r){return this._inner.runGuarded(t,e,r)}runOutsideAngular(t){return this._outer.run(t)}},UA={};function Og(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function HA(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){cw(()=>{n.callbackScheduled=!1,Ym(n),n.isCheckStableRunning=!0,Og(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),Ym(n)}function $A(n){let t=()=>{HA(n)},e=BA++;n._inner=n._inner.fork({name:"angular",properties:{[Ag]:!0,[Bd]:e,[Bd+e]:!0},onInvokeTask:(r,i,o,s,a,c)=>{if(zA(c))return r.invokeTask(o,s,a,c);try{return _C(n),r.invokeTask(o,s,a,c)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),CC(n)}},onInvoke:(r,i,o,s,a,c,l)=>{try{return _C(n),r.invoke(o,s,a,c,l)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!WA(c)&&t(),CC(n)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Ym(n),Og(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function Ym(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function _C(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function CC(n){n._nesting--,Og(n)}var Ud=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;run(t,e,r){return t.apply(e,r)}runGuarded(t,e,r){return t.apply(e,r)}runOutsideAngular(t){return t()}runTask(t,e,r,i){return t.apply(e,r)}};function zA(n){return lw(n,"__ignore_ng_zone__")}function WA(n){return lw(n,"__scheduler_tick__")}function lw(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var Rg=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=C({token:n,providedIn:"root",factory:()=>new n})}return n})(),dw=[0,1,2,3],uw=(()=>{class n{ngZone=f($);scheduler=f(wr);errorHandler=f(St,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){f($i,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Oe(16),this.executing=!0;for(let r of dw)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Oe(17)}register(e){let{view:r}=e;r!==void 0?((r[Ni]??=[]).push(e),Uo(r),r[re]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,r){return r?r.run(su.AFTER_NEXT_RENDER,e):e()}static \u0275prov=C({token:n,providedIn:"root",factory:()=>new n})}return n})(),Hd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,r,i,o,s=null){this.impl=t,this.hooks=e,this.view=r,this.once=i,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[Ni];t&&(this.view[Ni]=t.filter(e=>e!==this))}};function vt(n,t){let e=t?.injector??f(ce);return en("NgAfterNextRender"),qA(n,e,t,!0)}function GA(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function qA(n,t,e,r){let i=t.get(Rg);i.impl??=t.get(uw);let o=t.get($i,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(dn):null,a=t.get(gd,null,{optional:!0}),c=new Hd(i.impl,GA(n),a?.view,r,s,o?.snapshot(null));return i.impl.register(c),c}var au=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"platform"})}return n})();var Pg=new T("");function Tr(n){return!!n&&typeof n.then=="function"}function cu(n){return!!n&&typeof n.subscribe=="function"}var Ng=new T("");function lu(n){return Cn([{provide:Ng,multi:!0,useValue:n}])}var Fg=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,r)=>{this.resolve=e,this.reject=r});appInits=f(Ng,{optional:!0})??[];injector=f(ce);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let i of this.appInits){let o=ft(this.injector,i);if(Tr(o))e.push(o);else if(cu(o)){let s=new Promise((a,c)=>{o.subscribe({complete:a,error:c})});e.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{r()}).catch(i=>{this.reject(i)}),e.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Wa=new T("");function fw(){Uh(()=>{let n="";throw new S(600,n)})}function hw(n){return n.isBoundToModule}var YA=10;var Ft=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=f(Pt);afterRenderManager=f(Rg);zonelessEnabled=f($o);rootEffectScheduler=f(um);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new A;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=f(Zn);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(V(e=>!e))}constructor(){f($i,{optional:!0})}whenStable(){let e;return new Promise(r=>{e=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{e.unsubscribe()})}_injector=f(Fe);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,r){return this.bootstrapImpl(e,r)}bootstrapImpl(e,r,i=ce.NULL){return this._injector.get($).run(()=>{Oe(10);let s=e instanceof ru;if(!this._injector.get(Fg).done){let v="";throw new S(405,v)}let c;s?c=e:c=this._injector.get(za).resolveComponentFactory(e),this.componentTypes.push(c.componentType);let l=hw(c)?void 0:this._injector.get(Xn),d=r||c.selector,u=c.create(i,[],d,l),p=u.location.nativeElement,h=u.injector.get(Pg,null);return h?.registerApplication(p),u.onDestroy(()=>{this.detachView(u.hostView),Aa(this.components,u),h?.unregisterApplication(p)}),this._loadComponent(u),Oe(11,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Oe(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(su.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new S(101,!1);let e=ee(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ee(e),this.afterTick.next(),Oe(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(et,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<YA;)Oe(14),this.synchronizeOnce(),Oe(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:i}of this.allViews){if(!r&&!Ta(i))continue;let o=r&&!this.zonelessEnabled?0:1;N0(i,o),e=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>Ta(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){let r=e;Aa(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(i){this.internalErrorHandler(i)}this.components.push(e),this._injector.get(Wa,[]).forEach(i=>i(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Aa(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new S(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Aa(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function We(n,t,e,r){let i=Q(),o=Jr();if(un(i,o,t)){let s=Be(),a=xa();fk(a,i,n,t,e,r)}return We}var Y8=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var Zm=class{destroy(t){}updateValue(t,e){}swap(t,e){let r=Math.min(t,e),i=Math.max(t,e),o=this.detach(i);if(i-r>1){let s=this.detach(r);this.attach(r,o),this.attach(i,s)}else this.attach(r,o)}move(t,e){this.attach(e,this.detach(t,!0))}};function vm(n,t,e,r,i){return n===e&&Object.is(t,r)?1:Object.is(i(n,t),i(e,r))?-1:0}function ZA(n,t,e){let r,i,o=0,s=n.length-1,a=void 0;if(Array.isArray(t)){let c=t.length-1;for(;o<=s&&o<=c;){let l=n.at(o),d=t[o],u=vm(o,l,o,d,e);if(u!==0){u<0&&n.updateValue(o,d),o++;continue}let p=n.at(s),h=t[c],v=vm(s,p,c,h,e);if(v!==0){v<0&&n.updateValue(s,h),s--,c--;continue}let _=e(o,l),D=e(s,p),M=e(o,d);if(Object.is(M,D)){let G=e(c,h);Object.is(G,_)?(n.swap(o,s),n.updateValue(s,h),c--,s--):n.move(s,o),n.updateValue(o,d),o++;continue}if(r??=new $d,i??=EC(n,o,s,e),Km(n,r,o,M))n.updateValue(o,d),o++,s++;else if(i.has(M))r.set(_,n.detach(o)),s--;else{let G=n.create(o,t[o]);n.attach(o,G),o++,s++}}for(;o<=c;)wC(n,r,e,o,t[o]),o++}else if(t!=null){let c=t[Symbol.iterator](),l=c.next();for(;!l.done&&o<=s;){let d=n.at(o),u=l.value,p=vm(o,d,o,u,e);if(p!==0)p<0&&n.updateValue(o,u),o++,l=c.next();else{r??=new $d,i??=EC(n,o,s,e);let h=e(o,u);if(Km(n,r,o,h))n.updateValue(o,u),o++,s++,l=c.next();else if(!i.has(h))n.attach(o,n.create(o,u)),o++,s++,l=c.next();else{let v=e(o,d);r.set(v,n.detach(o)),s--}}}for(;!l.done;)wC(n,r,e,n.length,l.value),l=c.next()}for(;o<=s;)n.destroy(n.detach(s--));r?.forEach(c=>{n.destroy(c)})}function Km(n,t,e,r){return t!==void 0&&t.has(r)?(n.attach(e,t.get(r)),t.delete(r),!0):!1}function wC(n,t,e,r,i){if(Km(n,t,r,e(r,i)))n.updateValue(r,i);else{let o=n.create(r,i);n.attach(r,o)}}function EC(n,t,e,r){let i=new Set;for(let o=t;o<=e;o++)i.add(r(o,n.at(o)));return i}var $d=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(r);)r=i.get(r);i.set(r,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,r]of this.kvMap)if(t(r,e),this._vMap!==void 0){let i=this._vMap;for(;i.has(r);)r=i.get(r),t(r,e)}}};function O(n,t,e,r,i,o,s,a){en("NgControlFlow");let c=Q(),l=Be(),d=ln(l.consts,o);return Fa(c,l,n,t,e,r,i,d,256,s,a),Lg}function Lg(n,t,e,r,i,o,s,a){en("NgControlFlow");let c=Q(),l=Be(),d=ln(l.consts,o);return Fa(c,l,n,t,e,r,i,d,512,s,a),Lg}function R(n,t){en("NgControlFlow");let e=Q(),r=Jr(),i=e[r]!==$t?e[r]:-1,o=i!==-1?zd(e,Ye+i):void 0,s=0;if(un(e,r,n)){let a=ee(null);try{if(o!==void 0&&U0(o,s),n!==-1){let c=Ye+n,l=zd(e,c),d=eg(e[Y],c),u=$0(l,d,e),p=Ha(e,d,t,{dehydratedView:u});$a(l,p,s,Zo(d,u))}}finally{ee(a)}}else if(o!==void 0){let a=B0(o,s);a!==void 0&&(a[Ke]=t)}}var Qm=class{lContainer;$implicit;$index;constructor(t,e,r){this.lContainer=t,this.$implicit=e,this.$index=r}get $count(){return this.lContainer.length-Je}};function Vg(n,t){return t}var Xm=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,r){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=r}};function ot(n,t,e,r,i,o,s,a,c,l,d,u,p){en("NgControlFlow");let h=Q(),v=Be(),_=c!==void 0,D=Q(),M=a?s.bind(D[Rt][Ke]):s,G=new Xm(_,M);D[Ye+n]=G,Fa(h,v,n+1,t,e,r,i,ln(v.consts,o),256),_&&Fa(h,v,n+2,c,l,d,u,ln(v.consts,p),512)}var Jm=class extends Zm{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,r){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=r}get length(){return this.lContainer.length-Je}at(t){return this.getLView(t)[Ke].$implicit}attach(t,e){let r=e[Oi];this.needsIndexUpdate||=t!==this.length,$a(this.lContainer,e,t,Zo(this.templateTNode,r))}detach(t,e){return this.needsIndexUpdate||=t!==this.length-1,e&&KA(this.lContainer,t),QA(this.lContainer,t)}create(t,e){let r=Rd(this.lContainer,this.templateTNode.tView.ssrId),i=Ha(this.hostLView,this.templateTNode,new Qm(this.lContainer,e,t),{dehydratedView:r});return this.operationsCounter?.recordCreate(),i}destroy(t){eu(t[Y],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[Ke].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[Ke].$index=t}getLView(t){return XA(this.lContainer,t)}};function st(n){let t=ee(null),e=Yn();try{let r=Q(),i=r[Y],o=r[e],s=e+1,a=zd(r,s);if(o.liveCollection===void 0){let l=eg(i,s);o.liveCollection=new Jm(a,r,l)}else o.liveCollection.reset();let c=o.liveCollection;if(ZA(c,n,o.trackByFn),c.updateIndexes(),o.hasEmptyBlock){let l=Jr(),d=c.length===0;if(un(r,l,d)){let u=e+2,p=zd(r,u);if(d){let h=eg(i,u),v=$0(p,h,r),_=Ha(r,h,void 0,{dehydratedView:v});$a(p,_,0,Zo(h,v))}else i.firstUpdatePass&&Fk(p),U0(p,0)}}}finally{ee(t)}}function zd(n,t){return n[t]}function KA(n,t){if(n.length<=Je)return;let e=Je+t,r=n[e];r&&r[Fi]&&(r[Fi].skipLeaveAnimations=!0)}function QA(n,t){return Pa(n,t)}function XA(n,t){return B0(n,t)}function eg(n,t){return Ma(n,t)}function j(n,t,e){let r=Q(),i=Jr();if(un(r,i,t)){let o=Be(),s=xa();D0(s,r,n,t,r[Le],e)}return j}function tg(n,t,e,r,i){Sg(t,n,e,i?"class":"style",r)}function m(n,t,e,r){let i=Q(),o=i[Y],s=n+Ye,a=o.firstCreatePass?Y0(s,i,2,t,T0,Gp(),e,r):o.data[s];if(x0(a,i,n,t,pw),Da(a)){let c=i[Y];Eg(c,i,a),e0(c,a,i)}return r!=null&&nu(i,a),m}function g(){let n=Be(),t=rt(),e=I0(t);return n.firstCreatePass&&Z0(n,e),Yp(e)&&Zp(),Wp(),e.classesWithoutHost!=null&&Fx(e)&&tg(n,e,Q(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&Lx(e)&&tg(n,e,Q(),e.stylesWithoutHost,!1),g}function ie(n,t,e,r){return m(n,t,e,r),g(),ie}function he(n,t,e,r){let i=Q(),o=i[Y],s=n+Ye,a=o.firstCreatePass?Kk(s,o,2,t,e,r):o.data[s];return x0(a,i,n,t,pw),r!=null&&nu(i,a),he}function pe(){let n=rt(),t=I0(n);return Yp(t)&&Zp(),Wp(),pe}function In(n,t,e,r){return he(n,t,e,r),pe(),In}var pw=(n,t,e,r,i)=>(md(!0),u0(t[Le],r,z_()));function J(){return Q()}function rs(n,t,e){let r=Q(),i=Jr();if(un(r,i,t)){let o=Be(),s=xa();M0(s,r,n,t,r[Le],e)}return rs}var Ga="en-US";var JA=Ga;function mw(n){typeof n=="string"&&(JA=n.toLowerCase().replace(/_/g,"-"))}function x(n,t,e){let r=Q(),i=Be(),o=rt();return gw(i,r,r[Le],o,n,t,e),x}function Jn(n,t,e){let r=Q(),i=Be(),o=rt();return(o.type&3||e)&&K0(o,i,r,e,r[Le],n,t,Md(o,r,t)),Jn}function gw(n,t,e,r,i,o,s){let a=!0,c=null;if((r.type&3||s)&&(c??=Md(r,t,o),K0(r,n,t,s,e,i,o,c)&&(a=!1)),a){let l=r.outputs?.[i],d=r.hostDirectiveOutputs?.[i];if(d&&d.length)for(let u=0;u<d.length;u+=2){let p=d[u],h=d[u+1];c??=Md(r,t,o),pC(r,t,p,h,i,c)}if(l&&l.length)for(let u of l)c??=Md(r,t,o),pC(r,t,u,i,i,c)}}function w(n=1){return $_(n)}function eO(n,t){let e=null,r=kI(n);for(let i=0;i<t.length;i++){let o=t[i];if(o==="*"){e=i;continue}if(r===null?d0(n,o,!0):RI(r,o))return i}return e}function yt(n){let t=Q()[Rt][Ot];if(!t.projection){let e=n?n.length:1,r=t.projection=p_(e,null),i=r.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?eO(o,n):0;s!==null&&(i[s]?i[s].projectionNext=o:r[s]=o,i[s]=o)}o=o.next}}}function Ge(n,t=0,e,r,i,o){let s=Q(),a=Be(),c=r?n+1:null;c!==null&&Fa(s,a,c,r,i,o,null,e);let l=ts(a,Ye+n,16,null,e||null);l.projection===null&&(l.projection=t),Xp();let u=!s[Oi]||qp();s[Rt][Ot].projection[l.projection]===null&&c!==null?tO(s,a,c):u&&!Kd(l)&&tk(a,s,l)}function tO(n,t,e){let r=Ye+e,i=t.data[r],o=n[r],s=Rd(o,i.tView.ssrId),a=Ha(n,i,void 0,{dehydratedView:s});$a(o,a,0,Zo(i,s))}function zi(n,t,e,r){wA(n,t,e,r)}function zt(n,t,e){CA(n,t,e)}function at(n){let t=Q(),e=Be(),r=nm();ud(r+1);let i=Ig(e,r);if(n.dirty&&M_(t)===((i.metadata.flags&2)===2)){if(i.matches===null)n.reset([]);else{let o=DA(t,r);n.reset(o,Kx),n.notifyOnChanges()}return!0}return!1}function ct(){return _A(Q(),nm())}function Cd(n,t){return n<<17|t<<2}function Ui(n){return n>>17&32767}function nO(n){return(n&2)==2}function rO(n,t){return n&131071|t<<17}function ng(n){return n|2}function Ko(n){return(n&131068)>>2}function ym(n,t){return n&-131069|t<<2}function iO(n){return(n&1)===1}function rg(n){return n|1}function oO(n,t,e,r,i,o){let s=o?t.classBindings:t.styleBindings,a=Ui(s),c=Ko(s);n[r]=e;let l=!1,d;if(Array.isArray(e)){let u=e;d=u[1],(d===null||Fo(u,d)>0)&&(l=!0)}else d=e;if(i)if(c!==0){let p=Ui(n[a+1]);n[r+1]=Cd(p,a),p!==0&&(n[p+1]=ym(n[p+1],r)),n[a+1]=rO(n[a+1],r)}else n[r+1]=Cd(a,0),a!==0&&(n[a+1]=ym(n[a+1],r)),a=r;else n[r+1]=Cd(c,0),a===0?a=r:n[c+1]=ym(n[c+1],r),c=r;l&&(n[r+1]=ng(n[r+1])),SC(n,d,r,!0),SC(n,d,r,!1),sO(t,d,n,r,o),s=Cd(a,c),o?t.classBindings=s:t.styleBindings=s}function sO(n,t,e,r,i){let o=i?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&Fo(o,t)>=0&&(e[r+1]=rg(e[r+1]))}function SC(n,t,e,r){let i=n[e+1],o=t===null,s=r?Ui(i):Ko(i),a=!1;for(;s!==0&&(a===!1||o);){let c=n[s],l=n[s+1];aO(c,t)&&(a=!0,n[s+1]=r?rg(l):ng(l)),s=r?Ui(l):Ko(l)}a&&(n[e+1]=r?ng(i):rg(i))}function aO(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?Fo(n,t)>=0:!1}var Mn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function cO(n){return n.substring(Mn.key,Mn.keyEnd)}function lO(n){return dO(n),vw(n,yw(n,0,Mn.textEnd))}function vw(n,t){let e=Mn.textEnd;return e===t?-1:(t=Mn.keyEnd=uO(n,Mn.key=t,e),yw(n,t,e))}function dO(n){Mn.key=0,Mn.keyEnd=0,Mn.value=0,Mn.valueEnd=0,Mn.textEnd=n.length}function yw(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function uO(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function Wi(n,t,e){return bw(n,t,e,!1),Wi}function le(n,t){return bw(n,t,null,!0),le}function qa(n){hO(bO,fO,n,!0)}function fO(n,t){for(let e=lO(t);e>=0;e=vw(t,e))rd(n,cO(t),!0)}function bw(n,t,e,r){let i=Q(),o=Be(),s=ld(2);if(o.firstUpdatePass&&Cw(o,n,s,r),t!==$t&&un(i,s,t)){let a=o.data[Yn()];ww(o,a,i,i[Le],n,i[s+1]=CO(t,e),r,s)}}function hO(n,t,e,r){let i=Be(),o=ld(2);i.firstUpdatePass&&Cw(i,null,o,r);let s=Q();if(e!==$t&&un(s,o,e)){let a=i.data[Yn()];if(Ew(a,r)&&!_w(i,o)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(e=Jl(c,e||"")),tg(i,a,s,e,r)}else _O(i,a,s,s[Le],s[o+1],s[o+1]=yO(n,t,e),r,o)}}function _w(n,t){return t>=n.expandoStartIndex}function Cw(n,t,e,r){let i=n.data;if(i[e+1]===null){let o=i[Yn()],s=_w(n,e);Ew(o,r)&&t===null&&!s&&(t=!1),t=pO(i,o,t,r),oO(i,o,t,e,s,r)}}function pO(n,t,e,r){let i=j_(n),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(e=bm(null,n,t,e,r),e=La(e,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==i)if(e=bm(i,n,t,e,r),o===null){let c=mO(n,t,r);c!==void 0&&Array.isArray(c)&&(c=bm(null,n,t,c[1],r),c=La(c,t.attrs,r),gO(n,t,r,c))}else o=vO(n,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),e}function mO(n,t,e){let r=e?t.classBindings:t.styleBindings;if(Ko(r)!==0)return n[Ui(r)]}function gO(n,t,e,r){let i=e?t.classBindings:t.styleBindings;n[Ui(i)]=r}function vO(n,t,e){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++){let s=n[o].hostAttrs;r=La(r,s,e)}return La(r,t.attrs,e)}function bm(n,t,e,r,i){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(a===-1?a=e.directiveStart:a++;a<s&&(o=t[a],r=La(r,o.hostAttrs,i),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),r}function La(n,t,e){let r=e?1:2,i=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?i=s:i===r&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),rd(n,s,e?!0:t[++o]))}return n===void 0?null:n}function yO(n,t,e){if(e==null||e==="")return At;let r=[],i=fn(e);if(Array.isArray(i))for(let o=0;o<i.length;o++)n(r,i[o],!0);else if(typeof i=="object")for(let o in i)i.hasOwnProperty(o)&&n(r,o,i[o]);else typeof i=="string"&&t(r,i);return r}function bO(n,t,e){let r=String(t);r!==""&&!r.includes(" ")&&rd(n,r,e)}function _O(n,t,e,r,i,o,s,a){i===$t&&(i=At);let c=0,l=0,d=0<i.length?i[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let p=c<i.length?i[c+1]:void 0,h=l<o.length?o[l+1]:void 0,v=null,_;d===u?(c+=2,l+=2,p!==h&&(v=u,_=h)):u===null||d!==null&&d<u?(c+=2,v=d):(l+=2,v=u,_=h),v!==null&&ww(n,t,e,r,v,_,s,a),d=c<i.length?i[c]:null,u=l<o.length?o[l]:null}}function ww(n,t,e,r,i,o,s,a){if(!(t.type&3))return;let c=n.data,l=c[a+1],d=iO(l)?DC(c,t,e,i,Ko(l),s):void 0;if(!Wd(d)){Wd(o)||nO(l)&&(o=DC(c,null,e,i,a,s));let u=Vp(Yn(),e);rk(r,s,u,i,o)}}function DC(n,t,e,r,i,o){let s=t===null,a;for(;i>0;){let c=n[i],l=Array.isArray(c),d=l?c[1]:c,u=d===null,p=e[i+1];p===$t&&(p=u?At:void 0);let h=u?id(p,r):d===r?p:void 0;if(l&&!Wd(h)&&(h=id(c,r)),Wd(h)&&(a=h,s))return a;let v=n[i+1];i=s?Ui(v):Ko(v)}if(t!==null){let c=o?t.residualClasses:t.residualStyles;c!=null&&(a=id(c,r))}return a}function Wd(n){return n!==void 0}function CO(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=Cr(fn(n)))),n}function Ew(n,t){return(n.flags&(t?8:16))!==0}function b(n,t=""){let e=Q(),r=Be(),i=n+Ye,o=r.firstCreatePass?ts(r,i,1,t,null):r.data[i],s=wO(r,e,o,t,n);e[i]=s,pd()&&Cg(r,e,s,o),Ho(o,!1)}var wO=(n,t,e,r,i)=>(md(!0),LI(t[Le],r));function EO(n,t,e,r=""){return un(n,Jr(),e)?t+qr(e)+r:$t}function SO(n,t,e,r,i,o=""){let s=P_(),a=Xk(n,s,e,i);return ld(2),a?t+qr(e)+r+qr(i)+o:$t}function Ue(n){return ke("",n),Ue}function ke(n,t,e){let r=Q(),i=EO(r,n,t,e);return i!==$t&&Sw(r,Yn(),i),ke}function is(n,t,e,r,i){let o=Q(),s=SO(o,n,t,e,r,i);return s!==$t&&Sw(o,Yn(),s),is}function Sw(n,t,e){let r=Vp(t,n);VI(n[Le],r,e)}function be(n,t,e){cm(t)&&(t=t());let r=Q(),i=Jr();if(un(r,i,t)){let o=Be(),s=xa();D0(s,r,n,t,r[Le],e)}return be}function we(n,t){let e=cm(n);return e&&n.set(t),e}function _e(n,t){let e=Q(),r=Be(),i=rt();return gw(r,e,e[Le],i,n,t),_e}function DO(n,t,e){let r=Be();if(r.firstCreatePass){let i=qn(n);ig(e,r.data,r.blueprint,i,!0),ig(t,r.data,r.blueprint,i,!1)}}function ig(n,t,e,r,i){if(n=mt(n),Array.isArray(n))for(let o=0;o<n.length;o++)ig(n[o],t,e,r,i);else{let o=Be(),s=Q(),a=rt(),c=Ii(n)?n:mt(n.provide),l=Rp(n),d=a.providerIndexes&1048575,u=a.directiveStart,p=a.providerIndexes>>20;if(Ii(n)||!n.multi){let h=new Bi(l,i,ye,null),v=Cm(c,t,i?d:d+p,u);v===-1?(Em(Ad(a,s),o,c),_m(o,n,t.length),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),e.push(h),s.push(h)):(e[v]=h,s[v]=h)}else{let h=Cm(c,t,d+p,u),v=Cm(c,t,d,d+p),_=h>=0&&e[h],D=v>=0&&e[v];if(i&&!D||!i&&!_){Em(Ad(a,s),o,c);let M=xO(i?TO:MO,e.length,i,r,l,n);!i&&D&&(e[v].providerFactory=M),_m(o,n,t.length,0),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),e.push(M),s.push(M)}else{let M=Dw(e[i?v:h],l,!i&&r);_m(o,n,h>-1?h:v,M)}!i&&r&&D&&e[v].componentProviders++}}}function _m(n,t,e,r){let i=Ii(t),o=__(t);if(i||o){let c=(o?mt(t.useClass):t).prototype.ngOnDestroy;if(c){let l=n.destroyHooks||(n.destroyHooks=[]);if(!i&&t.multi){let d=l.indexOf(e);d===-1?l.push(e,[r,c]):l[d+1].push(r,c)}else l.push(e,c)}}}function Dw(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Cm(n,t,e,r){for(let i=e;i<r;i++)if(t[i]===n)return i;return-1}function MO(n,t,e,r,i){return og(this.multi,[])}function TO(n,t,e,r,i){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,c=Oa(r,r[Y],this.providerFactory.index,i);s=c.slice(0,a),og(o,s);for(let l=a;l<c.length;l++)s.push(c[l])}else s=[],og(o,s);return s}function og(n,t){for(let e=0;e<n.length;e++){let r=n[e];t.push(r())}return t}function xO(n,t,e,r,i,o){let s=new Bi(n,e,ye,null);return s.multi=[],s.index=t,s.componentProviders=0,Dw(s,i,r&&!e),s}function lt(n,t=[]){return e=>{e.providersResolver=(r,i)=>DO(r,i?i(n):n,t)}}function jg(n,t,e,r){return Mw(Q(),tm(),n,t,e,r)}function IO(n,t){let e=n[t];return e===$t?void 0:e}function Mw(n,t,e,r,i,o){let s=t+e;return un(n,s,i)?Qk(n,s+1,o?r.call(o,i):r(i)):IO(n,s+1)}function Bg(n,t){let e=Be(),r,i=n+Ye;e.firstCreatePass?(r=kO(t,e.pipeRegistry),e.data[i]=r,r.onDestroy&&(e.destroyHooks??=[]).push(i,r.onDestroy)):r=e.data[i];let o=r.factory||(r.factory=$r(r.type,!0)),s,a=kt(ye);try{let c=kd(!1),l=o();return kd(c),jp(e,Q(),i,l),l}finally{kt(a)}}function kO(n,t){if(t)for(let e=t.length-1;e>=0;e--){let r=t[e];if(n===r.name)return r}}function Ug(n,t,e){let r=n+Ye,i=Q(),o=D_(i,r);return AO(i,r)?Mw(i,tm(),t,o.transform,e,o):o.transform(e)}function AO(n,t){return n[Y].data[t].pure}var Gd=class{ngModuleFactory;componentFactories;constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}},Hg=(()=>{class n{compileModuleSync(e){return new jd(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let r=this.compileModuleSync(e),i=Ip(e),o=c0(i.declarations).reduce((s,a)=>{let c=$n(a);return c&&s.push(new ni(c)),s},[]);return new Gd(r,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var OO=(()=>{class n{zone=f($);changeDetectionScheduler=f(wr);applicationRef=f(Ft);applicationErrorHandler=f(Pt);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Tw=new T("",{factory:()=>!1});function $g({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new $(X(E({},Wg()),{scheduleInRootZone:e})),[{provide:$,useFactory:n},{provide:Hn,multi:!0,useFactory:()=>{let r=f(OO,{optional:!0});return()=>r.initialize()}},{provide:Hn,multi:!0,useFactory:()=>{let r=f(RO);return()=>{r.initialize()}}},t===!0?{provide:lm,useValue:!0}:[],{provide:dm,useValue:e??aw},{provide:Pt,useFactory:()=>{let r=f($),i=f(Fe),o;return s=>{r.runOutsideAngular(()=>{i.destroyed&&!o?setTimeout(()=>{throw s}):(o??=i.get(St),o.handleError(s))})}}}]}function zg(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,r=$g({ngZoneFactory:()=>{let i=Wg(n);return i.scheduleInRootZone=e,i.shouldCoalesceEventChangeDetection&&en("NgZone_CoalesceEvent"),new $(i)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return Cn([{provide:Tw,useValue:!0},{provide:$o,useValue:!1},r])}function Wg(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var RO=(()=>{class n{subscription=new Re;initialized=!1;zone=f($);pendingTasks=f(Zn);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{$.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{$.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var xw=(()=>{class n{applicationErrorHandler=f(Pt);appRef=f(Ft);taskService=f(Zn);ngZone=f($);zonelessEnabled=f($o);tracing=f($i,{optional:!0});disableScheduling=f(lm,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Re;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Bd):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(f(dm,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Ud||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let r=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?bC:cw;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Bd+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.taskService.remove(e),this.applicationErrorHandler(r)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,bC(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function PO(){return typeof $localize<"u"&&$localize.locale||Ga}var du=new T("",{providedIn:"root",factory:()=>f(du,{optional:!0,skipSelf:!0})||PO()});function tt(n){return i_(n)}function os(n,t){return yl(n,t?.equal)}var Iw=class{[wt];constructor(t){this[wt]=t}destroy(){this[wt].destroy()}};var Ow=Symbol("InputSignalNode#UNSET"),XO=X(E({},bl),{transformFn:void 0,applyValueToInputSignal(n,t){So(n,t)}});function Rw(n,t){let e=Object.create(XO);e.value=n,e.transformFn=t?.transform;function r(){if(Co(e),e.value===Ow){let i=null;throw new S(-950,i)}return e.value}return r[wt]=e,r}var Za=class{attributeName;constructor(t){this.attributeName=t}__NG_ELEMENT_ID__=()=>qd(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},JO=new T("");JO.__NG_ELEMENT_ID__=n=>{let t=rt();if(t===null)throw new S(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new S(204,!1)};function kw(n,t){return Rw(n,t)}function eR(n){return Rw(Ow,n)}var Pw=(kw.required=eR,kw);var Gg=new T(""),tR=new T("");function Ya(n){return!n.moduleRef}function nR(n){let t=Ya(n)?n.r3Injector:n.moduleRef.injector,e=t.get($);return e.run(()=>{Ya(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let r=t.get(Pt),i;if(e.runOutsideAngular(()=>{i=e.onError.subscribe({next:r})}),Ya(n)){let o=()=>t.destroy(),s=n.platformInjector.get(Gg);s.add(o),t.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(Gg);s.add(o),n.moduleRef.onDestroy(()=>{Aa(n.allPlatformModules,n.moduleRef),i.unsubscribe(),s.delete(o)})}return iR(r,e,()=>{let o=t.get(Zn),s=o.add(),a=t.get(Fg);return a.runInitializers(),a.donePromise.then(()=>{let c=t.get(du,Ga);if(mw(c||Ga),!t.get(tR,!0))return Ya(n)?t.get(Ft):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Ya(n)){let d=t.get(Ft);return n.rootComponent!==void 0&&d.bootstrap(n.rootComponent),d}else return rR?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>void o.remove(s))})})}var rR;function iR(n,t,e){try{let r=e();return Tr(r)?r.catch(i=>{throw t.runOutsideAngular(()=>n(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>n(r)),r}}var uu=null;function oR(n=[],t){return ce.create({name:t,providers:[{provide:Ca,useValue:"platform"},{provide:Gg,useValue:new Set([()=>uu=null])},...n]})}function sR(n=[]){if(uu)return uu;let t=oR(n);return uu=t,fw(),aR(t),t}function aR(n){let t=n.get(Yd,null);ft(n,()=>{t?.forEach(e=>e())})}var Dt=(()=>{class n{static __NG_ELEMENT_ID__=cR}return n})();function cR(n){return lR(rt(),Q(),(n&16)===16)}function lR(n,t,e){if(Xr(n)&&!e){let r=cn(n.index,t);return new ti(r,r)}else if(n.type&175){let r=t[Rt];return new ti(r,t)}return null}function Nw(n){let{rootComponent:t,appProviders:e,platformProviders:r,platformRef:i}=n;Oe(8);try{let o=i?.injector??sR(r),s=[$g({}),{provide:wr,useExisting:xw},G_,...e||[]],a=new Na({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return nR({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Oe(9)}}function Lt(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function Zg(n,t=NaN){return!isNaN(parseFloat(n))&&!isNaN(Number(n))?Number(n):t}function fu(n,t){let e=$n(n),r=t.elementInjector||Lo();return new ni(e).create(r,t.projectableNodes,t.hostElement,t.environmentInjector,t.directives,t.bindings)}function Fw(n){let t=$n(n);if(!t)return null;let e=new ni(t);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}var jw=null;function hn(){return jw}function Kg(n){jw??=n}var Ka=class{},Qa=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(Bw),providedIn:"platform"})}return n})(),Qg=new T(""),Bw=(()=>{class n extends Qa{_location;_history;_doc=f(z);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return hn().getBaseHref(this._doc)}onPopState(e){let r=hn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){let r=hn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,r,i){this._history.pushState(e,r,i)}replaceState(e,r,i){this._history.replaceState(e,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>new n,providedIn:"platform"})}return n})();function hu(n,t){return n?t?n.endsWith("/")?t.startsWith("/")?n+t.slice(1):n+t:t.startsWith("/")?n+t:`${n}/${t}`:n:t}function Lw(n){let t=n.search(/#|\?|$/);return n[t-1]==="/"?n.slice(0,t-1)+n.slice(t):n}function kn(n){return n&&n[0]!=="?"?`?${n}`:n}var xr=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(mu),providedIn:"root"})}return n})(),pu=new T(""),mu=(()=>{class n extends xr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??f(z).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return hu(this._baseHref,e)}path(e=!1){let r=this._platformLocation.pathname+kn(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${r}${i}`:r}pushState(e,r,i,o){let s=this.prepareExternalUrl(i+kn(o));this._platformLocation.pushState(e,r,s)}replaceState(e,r,i,o){let s=this.prepareExternalUrl(i+kn(o));this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||n)(N(Qa),N(pu,8))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),er=(()=>{class n{_subject=new A;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=fR(Lw(Vw(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+kn(r))}normalize(e){return n.stripTrailingSlash(uR(this._basePath,Vw(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",i=null){this._locationStrategy.pushState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kn(r)),i)}replaceState(e,r="",i=null){this._locationStrategy.replaceState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kn(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(i=>i(e,r))}subscribe(e,r,i){return this._subject.subscribe({next:e,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=kn;static joinWithSlash=hu;static stripTrailingSlash=Lw;static \u0275fac=function(r){return new(r||n)(N(xr))};static \u0275prov=C({token:n,factory:()=>dR(),providedIn:"root"})}return n})();function dR(){return new er(N(xr))}function uR(n,t){if(!n||!t.startsWith(n))return t;let e=t.substring(n.length);return e===""||["/",";","?","#"].includes(e[0])?e:t}function Vw(n){return n.replace(/\/index.html$/,"")}function fR(n){if(new RegExp("^(https?:)?//").test(n)){let[,e]=n.split(/\/\/[^\/]+/);return e}return n}var tv=(()=>{class n extends xr{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(e){let r=hu(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,i,o){let s=this.prepareExternalUrl(i+kn(o))||this._platformLocation.pathname;this._platformLocation.pushState(e,r,s)}replaceState(e,r,i,o){let s=this.prepareExternalUrl(i+kn(o))||this._platformLocation.pathname;this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||n)(N(Qa),N(pu,8))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();var Xg=/\s+/,Uw=[],nv=(()=>{class n{_ngEl;_renderer;initialClasses=Uw;rawClass;stateMap=new Map;constructor(e,r){this._ngEl=e,this._renderer=r}set klass(e){this.initialClasses=e!=null?e.trim().split(Xg):Uw}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(Xg):e}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let r of e)this._updateState(r,!0);else if(e!=null)for(let r of Object.keys(e))this._updateState(r,!!e[r]);this._applyStateDiff()}_updateState(e,r){let i=this.stateMap.get(e);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(e,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let r=e[0],i=e[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(e,r){e=e.trim(),e.length>0&&e.split(Xg).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||n)(ye(ue),ye(it))};static \u0275dir=fe({type:n,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return n})();function pR(n,t){return new S(2100,!1)}var Jg=class{createSubscription(t,e,r){return tt(()=>t.subscribe({next:e,error:r}))}dispose(t){tt(()=>t.unsubscribe())}},ev=class{createSubscription(t,e,r){return t.then(i=>e?.(i),i=>r?.(i)),{unsubscribe:()=>{e=null,r=null}}}dispose(t){t.unsubscribe()}},mR=new ev,gR=new Jg,rv=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=f(Pt);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,r=>this._updateLatestValue(e,r),r=>this.applicationErrorHandler(r))}_selectStrategy(e){if(Tr(e))return mR;if(cu(e))return gR;throw pR(n,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,r){e===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||n)(ye(Dt,16))};static \u0275pipe=kg({name:"async",type:n,pure:!1})}return n})();var Gt=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})();function Xa(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let r=e.indexOf("="),[i,o]=r==-1?[e,""]:[e.slice(0,r),e.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var Gi=class{};var ov="browser";function Hw(n){return n===ov}var $w=(()=>{class n{static \u0275prov=C({token:n,providedIn:"root",factory:()=>new iv(f(z),window)})}return n})(),iv=class{document;window;offset=()=>[0,0];constructor(t,e){this.document=t,this.window=e}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t,e){this.window.scrollTo(X(E({},e),{left:t[0],top:t[1]}))}scrollToAnchor(t,e){let r=yR(this.document,t);r&&(this.scrollToElement(r,e),r.focus())}setHistoryScrollRestoration(t){try{this.window.history.scrollRestoration=t}catch{console.warn(Wr(2400,!1))}}scrollToElement(t,e){let r=t.getBoundingClientRect(),i=r.left+this.window.pageXOffset,o=r.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(X(E({},e),{left:i-s[0],top:o-s[1]}))}};function yR(n,t){let e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if(typeof n.createTreeWalker=="function"&&n.body&&typeof n.body.attachShadow=="function"){let r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){let o=i.shadowRoot;if(o){let s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}i=r.nextNode()}}return null}var vu=new T(""),dv=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(i=>{i.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new S(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||n)(N(vu),N($))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),Ja=class{_doc;constructor(t){this._doc=t}manager},sv="ng-app-id";function zw(n){for(let t of n)t.remove()}function Ww(n,t){let e=t.createElement("style");return e.textContent=n,e}function bR(n,t,e,r){let i=n.head?.querySelectorAll(`style[${sv}="${t}"],link[${sv}="${t}"]`);if(i)for(let o of i)o.removeAttribute(sv),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function cv(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var uv=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,bR(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,Ww);r?.forEach(i=>this.addUsage(i,this.external,cv))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(zw(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])zw(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,Ww(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,cv(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||n)(N(z),N(Xo),N(Jo,8),N(ri))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),av={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},fv=/%COMP%/g;var qw="%COMP%",_R=`_nghost-${qw}`,CR=`_ngcontent-${qw}`,wR=!0,ER=new T("",{providedIn:"root",factory:()=>wR});function SR(n){return CR.replace(fv,n)}function DR(n){return _R.replace(fv,n)}function Yw(n,t){return t.map(e=>e.replace(fv,n))}var nc=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,r,i,o,s,a,c,l=null,d=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=c,this.nonce=l,this.tracingService=d,this.platformIsServer=!1,this.defaultRenderer=new ec(e,s,c,this.platformIsServer,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof gu?i.applyToHost(e):i instanceof tc&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.platformIsServer,p=this.tracingService;switch(r.encapsulation){case Er.Emulated:o=new gu(c,l,r,this.appId,d,s,a,u,p);break;case Er.ShadowDom:return new lv(c,l,e,r,s,a,this.nonce,u,p);default:o=new tc(c,l,r,d,s,a,u,p);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||n)(N(dv),N(uv),N(Xo),N(ER),N(z),N(ri),N($),N(Jo),N($i,8))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),ec=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,r,i,o){this.eventManager=t,this.doc=e,this.ngZone=r,this.platformIsServer=i,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(av[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Gw(t)?t.content:t).appendChild(e)}insertBefore(t,e,r){t&&(Gw(t)?t.content:t).insertBefore(e,r)}removeChild(t,e){e.remove()}selectRootElement(t,e){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new S(-5104,!1);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,i){if(i){e=i+":"+e;let o=av[i];o?t.setAttributeNS(o,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){let i=av[r];i?t.removeAttributeNS(i,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,i){i&(Qn.DashCase|Qn.Important)?t.style.setProperty(e,r,i&Qn.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&Qn.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t!=null&&(t[e]=r)}setValue(t,e){t.nodeValue=e}listen(t,e,r,i){if(typeof t=="string"&&(t=hn().getGlobalEventTarget(this.doc,t),!t))throw new S(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,i)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function Gw(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var lv=class extends ec{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,r,i,o,s,a,c,l){super(t,o,s,c,l),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=i.styles;d=Yw(i.id,d);for(let p of d){let h=document.createElement("style");a&&h.setAttribute("nonce",a),h.textContent=p,this.shadowRoot.appendChild(h)}let u=i.getExternalStyles?.();if(u)for(let p of u){let h=cv(p,o);a&&h.setAttribute("nonce",a),this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,r){return super.insertBefore(this.nodeOrShadowRoot(t),e,r)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},tc=class extends ec{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,r,i,o,s,a,c,l){super(t,o,s,a,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let d=r.styles;this.styles=l?Yw(l,d):d,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ua.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},gu=class extends tc{contentAttr;hostAttr;constructor(t,e,r,i,o,s,a,c,l){let d=i+"-"+r.id;super(t,e,r,o,s,a,c,l,d),this.contentAttr=SR(d),this.hostAttr=DR(d)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}};var yu=class n extends Ka{supportsDOMEvents=!0;static makeCurrent(){Kg(new n)}onAndCancel(t,e,r,i){return t.addEventListener(e,r,i),()=>{t.removeEventListener(e,r,i)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=MR();return e==null?null:TR(e)}resetBaseElement(){rc=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Xa(document.cookie,t)}},rc=null;function MR(){return rc=rc||document.head.querySelector("base"),rc?rc.getAttribute("href"):null}function TR(n){return new URL(n,document.baseURI).pathname}var xR=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),Kw=(()=>{class n extends Ja{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||n)(N(z))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),Zw=["alt","control","meta","shift"],IR={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},kR={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Qw=(()=>{class n extends Ja{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=n.parseEventName(r),a=n.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>hn().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=n._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Zw.forEach(l=>{let d=r.indexOf(l);d>-1&&(r.splice(d,1),s+=l+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=IR[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Zw.forEach(s=>{if(s!==i){let a=kR[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{n.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||n)(N(z))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();function hv(n,t,e){let r=E({rootComponent:n,platformRef:e?.platformRef},AR(t));return Nw(r)}function AR(n){return{appProviders:[...FR,...n?.providers??[]],platformProviders:NR}}function OR(){yu.makeCurrent()}function RR(){return new St}function PR(){return cg(document),document}var NR=[{provide:ri,useValue:ov},{provide:Yd,useValue:OR,multi:!0},{provide:z,useFactory:PR}];var FR=[{provide:Ca,useValue:"root"},{provide:St,useFactory:RR},{provide:vu,useClass:Kw,multi:!0,deps:[z]},{provide:vu,useClass:Qw,multi:!0,deps:[z]},nc,uv,dv,{provide:et,useExisting:nc},{provide:Gi,useClass:xR},[]];var cs=class{},ic=class{},oi=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
5
+ `).forEach(e=>{let r=e.indexOf(":");if(r>0){let i=e.slice(0,r),o=e.slice(r+1).trim();this.addHeaderEntry(i,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,e);let i=(t.op==="a"?this.headers.get(e):void 0)||[];i.push(...r),this.headers.set(e,i);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(t,e){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(t,e){let r=(Array.isArray(e)?e:[e]).map(o=>o.toString()),i=t.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(t,i)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var _u=class{encodeKey(t){return Xw(t)}encodeValue(t){return Xw(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function LR(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(i=>{let o=i.indexOf("="),[s,a]=o==-1?[t.decodeKey(i),""]:[t.decodeKey(i.slice(0,o)),t.decodeValue(i.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}var VR=/%(\d[a-f0-9])/gi,jR={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Xw(n){return encodeURIComponent(n).replace(VR,(t,e)=>jR[e]??t)}function bu(n){return`${n}`}var Ir=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new _u,t.fromString){if(t.fromObject)throw new S(2805,!1);this.map=LR(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let r=t.fromObject[e],i=Array.isArray(r)?r.map(bu):[bu(r)];this.map.set(e,i)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(r=>{let i=t[r];Array.isArray(i)?i.forEach(o=>{e.push({param:r,value:o,op:"a"})}):e.push({param:r,value:i,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(bu(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],i=r.indexOf(bu(t.value));i!==-1&&r.splice(i,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var Cu=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function BR(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Jw(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function eE(n){return typeof Blob<"u"&&n instanceof Blob}function tE(n){return typeof FormData<"u"&&n instanceof FormData}function UR(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var nE="Content-Type",rE="Accept",iE="X-Request-URL",oE="text/plain",sE="application/json",HR=`${sE}, ${oE}, */*`,ss=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,r,i){this.url=e,this.method=t.toUpperCase();let o;if(BR(this.method)||i?(this.body=r!==void 0?r:null,o=i):o=r,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new S(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new oi,this.context??=new Cu,!this.params)this.params=new Ir,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),c=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+c+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Jw(this.body)||eE(this.body)||tE(this.body)||UR(this.body)?this.body:this.body instanceof Ir?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||tE(this.body)?null:eE(this.body)?this.body.type||null:Jw(this.body)?null:typeof this.body=="string"?oE:this.body instanceof Ir?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?sE:null}clone(t={}){let e=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,l=t.redirect||this.redirect,d=t.credentials||this.credentials,u=t.referrer||this.referrer,p=t.integrity||this.integrity,h=t.transferCache??this.transferCache,v=t.timeout??this.timeout,_=t.body!==void 0?t.body:this.body,D=t.withCredentials??this.withCredentials,M=t.reportProgress??this.reportProgress,G=t.headers||this.headers,Ee=t.params||this.params,me=t.context??this.context;return t.setHeaders!==void 0&&(G=Object.keys(t.setHeaders).reduce((bt,qe)=>bt.set(qe,t.setHeaders[qe]),G)),t.setParams&&(Ee=Object.keys(t.setParams).reduce((bt,qe)=>bt.set(qe,t.setParams[qe]),Ee)),new n(e,r,_,{params:Ee,headers:G,context:me,reportProgress:M,responseType:i,withCredentials:D,transferCache:h,keepalive:o,cache:a,priority:s,timeout:v,mode:c,redirect:l,credentials:d,referrer:u,integrity:p})}},qi=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(qi||{}),ls=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,r="OK"){this.headers=t.headers||new oi,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},wu=class n extends ls{constructor(t={}){super(t)}type=qi.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},oc=class n extends ls{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=qi.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected})}},as=class extends ls{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},$R=200,zR=204;function pv(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer}}var tr=(()=>{class n{handler;constructor(e){this.handler=e}request(e,r,i={}){let o;if(e instanceof ss)o=e;else{let c;i.headers instanceof oi?c=i.headers:c=new oi(i.headers);let l;i.params&&(i.params instanceof Ir?l=i.params:l=new Ir({fromObject:i.params})),o=new ss(e,r,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:l,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,credentials:i.credentials,referrer:i.referrer,integrity:i.integrity,timeout:i.timeout})}let s=P(o).pipe(Un(c=>this.handler.handle(c)));if(e instanceof ss||i.observe==="events")return s;let a=s.pipe(Pe(c=>c instanceof oc));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(V(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new S(2806,!1);return c.body}));case"blob":return a.pipe(V(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new S(2807,!1);return c.body}));case"text":return a.pipe(V(c=>{if(c.body!==null&&typeof c.body!="string")throw new S(2808,!1);return c.body}));case"json":default:return a.pipe(V(c=>c.body))}case"response":return a;default:throw new S(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new Ir().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,i={}){return this.request("PATCH",e,pv(i,r))}post(e,r,i={}){return this.request("POST",e,pv(i,r))}put(e,r,i={}){return this.request("PUT",e,pv(i,r))}static \u0275fac=function(r){return new(r||n)(N(cs))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();var WR=new T("");function GR(n,t){return t(n)}function qR(n,t,e){return(r,i)=>ft(e,()=>t(r,o=>n(o,i)))}var aE=new T(""),cE=new T(""),lE=new T("",{providedIn:"root",factory:()=>!0});var Eu=(()=>{class n extends cs{backend;injector;chain=null;pendingTasks=f(vd);contributeToStability=f(lE);constructor(e,r){super(),this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(aE),...this.injector.get(cE,[])]));this.chain=r.reduceRight((i,o)=>qR(i,o,this.injector),GR)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,i=>this.backend.handle(i)).pipe(vr(r))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||n)(N(ic),N(Fe))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();var YR=/^\)\]\}',?\n/,ZR=RegExp(`^${iE}:`,"m");function KR(n){return"responseURL"in n&&n.responseURL?n.responseURL:ZR.test(n.getAllResponseHeaders())?n.getResponseHeader(iE):null}var mv=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new S(-2800,!1);let r=this.xhrFactory;return P(null).pipe(Ze(()=>new te(o=>{let s=r.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((D,M)=>s.setRequestHeader(D,M.join(","))),e.headers.has(rE)||s.setRequestHeader(rE,HR),!e.headers.has(nE)){let D=e.detectContentTypeHeader();D!==null&&s.setRequestHeader(nE,D)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let D=e.responseType.toLowerCase();s.responseType=D!=="json"?D:"text"}let a=e.serializeBody(),c=null,l=()=>{if(c!==null)return c;let D=s.statusText||"OK",M=new oi(s.getAllResponseHeaders()),G=KR(s)||e.url;return c=new wu({headers:M,status:s.status,statusText:D,url:G}),c},d=()=>{let{headers:D,status:M,statusText:G,url:Ee}=l(),me=null;M!==zR&&(me=typeof s.response>"u"?s.responseText:s.response),M===0&&(M=me?$R:0);let bt=M>=200&&M<300;if(e.responseType==="json"&&typeof me=="string"){let qe=me;me=me.replace(YR,"");try{me=me!==""?JSON.parse(me):null}catch(He){me=qe,bt&&(bt=!1,me={error:He,text:me})}}bt?(o.next(new oc({body:me,headers:D,status:M,statusText:G,url:Ee||void 0})),o.complete()):o.error(new as({error:me,headers:D,status:M,statusText:G,url:Ee||void 0}))},u=D=>{let{url:M}=l(),G=new as({error:D,status:s.status||0,statusText:s.statusText||"Unknown Error",url:M||void 0});o.error(G)},p=u;e.timeout&&(p=D=>{let{url:M}=l(),G=new as({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:M||void 0});o.error(G)});let h=!1,v=D=>{h||(o.next(l()),h=!0);let M={type:qi.DownloadProgress,loaded:D.loaded};D.lengthComputable&&(M.total=D.total),e.responseType==="text"&&s.responseText&&(M.partialText=s.responseText),o.next(M)},_=D=>{let M={type:qi.UploadProgress,loaded:D.loaded};D.lengthComputable&&(M.total=D.total),o.next(M)};return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",p),s.addEventListener("abort",u),e.reportProgress&&(s.addEventListener("progress",v),a!==null&&s.upload&&s.upload.addEventListener("progress",_)),s.send(a),o.next({type:qi.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",p),e.reportProgress&&(s.removeEventListener("progress",v),a!==null&&s.upload&&s.upload.removeEventListener("progress",_)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||n)(N(Gi))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),dE=new T(""),QR="XSRF-TOKEN",XR=new T("",{providedIn:"root",factory:()=>QR}),JR="X-XSRF-TOKEN",eP=new T("",{providedIn:"root",factory:()=>JR}),sc=class{},tP=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,r){this.doc=e,this.cookieName=r}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Xa(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||n)(N(z),N(XR))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();function nP(n,t){let e=n.url.toLowerCase();if(!f(dE)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let r=f(sc).getToken(),i=f(eP);return r!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,r)})),t(n)}function gv(...n){let t=[tr,mv,Eu,{provide:cs,useExisting:Eu},{provide:ic,useFactory:()=>f(WR,{optional:!0})??f(mv)},{provide:aE,useValue:nP,multi:!0},{provide:dE,useValue:!0},{provide:sc,useClass:tP}];for(let e of n)t.push(...e.\u0275providers);return Cn(t)}var uE=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||n)(N(z))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Yi=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:function(r){let i=null;return r?i=new(r||n):i=N(iP),i},providedIn:"root"})}return n})(),iP=(()=>{class n extends Yi{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case gt.NONE:return r;case gt.HTML:return Dr(r,"HTML")?fn(r):Xd(this._doc,String(r)).toString();case gt.STYLE:return Dr(r,"Style")?fn(r):r;case gt.SCRIPT:if(Dr(r,"Script"))return fn(r);throw new S(5200,!1);case gt.URL:return Dr(r,"URL")?fn(r):ja(String(r));case gt.RESOURCE_URL:if(Dr(r,"ResourceURL"))return fn(r);throw new S(5201,!1);default:throw new S(5202,!1)}}bypassSecurityTrustHtml(e){return dg(e)}bypassSecurityTrustStyle(e){return ug(e)}bypassSecurityTrustScript(e){return fg(e)}bypassSecurityTrustUrl(e){return hg(e)}bypassSecurityTrustResourceUrl(e){return pg(e)}static \u0275fac=function(r){return new(r||n)(N(z))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ae="primary",bc=Symbol("RouteTitle"),Cv=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Qi(n){return new Cv(n)}function _E(n,t,e){let r=e.path.split("/");if(r.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||r.length<n.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:n.slice(0,r.length),posParams:i}}function oP(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!nr(n[e],t[e]))return!1;return!0}function nr(n,t){let e=n?wv(n):void 0,r=t?wv(t):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!CE(n[i],t[i]))return!1;return!0}function wv(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function CE(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),r=[...t].sort();return e.every((i,o)=>r[o]===i)}else return n===t}function wE(n){return n.length>0?n[n.length-1]:null}function Ar(n){return Ul(n)?n:Tr(n)?Ve(Promise.resolve(n)):P(n)}var sP={exact:SE,subset:DE},EE={exact:aP,subset:cP,ignored:()=>!0};function hE(n,t,e){return sP[e.paths](n.root,t.root,e.matrixParams)&&EE[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function aP(n,t){return nr(n,t)}function SE(n,t,e){if(!Zi(n.segments,t.segments)||!Mu(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!n.children[r]||!SE(n.children[r],t.children[r],e))return!1;return!0}function cP(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>CE(n[e],t[e]))}function DE(n,t,e){return ME(n,t,t.segments,e)}function ME(n,t,e,r){if(n.segments.length>e.length){let i=n.segments.slice(0,e.length);return!(!Zi(i,e)||t.hasChildren()||!Mu(i,e,r))}else if(n.segments.length===e.length){if(!Zi(n.segments,e)||!Mu(n.segments,e,r))return!1;for(let i in t.children)if(!n.children[i]||!DE(n.children[i],t.children[i],r))return!1;return!0}else{let i=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!Zi(n.segments,i)||!Mu(n.segments,i,r)||!n.children[ae]?!1:ME(n.children[ae],t,o,r)}}function Mu(n,t,e){return t.every((r,i)=>EE[e](n[i].parameters,r.parameters))}var ir=class{root;queryParams;fragment;_queryParamMap;constructor(t=new Me([],{}),e={},r=null){this.root=t,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=Qi(this.queryParams),this._queryParamMap}toString(){return uP.serialize(this)}},Me=class{segments;children;parent=null;constructor(t,e){this.segments=t,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Tu(this)}},si=class{path;parameters;_parameterMap;constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Qi(this.parameters),this._parameterMap}toString(){return xE(this)}};function lP(n,t){return Zi(n,t)&&n.every((e,r)=>nr(e.parameters,t[r].parameters))}function Zi(n,t){return n.length!==t.length?!1:n.every((e,r)=>e.path===t[r].path)}function dP(n,t){let e=[];return Object.entries(n.children).forEach(([r,i])=>{r===ae&&(e=e.concat(t(i,r)))}),Object.entries(n.children).forEach(([r,i])=>{r!==ae&&(e=e.concat(t(i,r)))}),e}var Xi=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>new ai,providedIn:"root"})}return n})(),ai=class{parse(t){let e=new Sv(t);return new ir(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${ac(t.root,!0)}`,r=pP(t.queryParams),i=typeof t.fragment=="string"?`#${fP(t.fragment)}`:"";return`${e}${r}${i}`}},uP=new ai;function Tu(n){return n.segments.map(t=>xE(t)).join("/")}function ac(n,t){if(!n.hasChildren())return Tu(n);if(t){let e=n.children[ae]?ac(n.children[ae],!1):"",r=[];return Object.entries(n.children).forEach(([i,o])=>{i!==ae&&r.push(`${i}:${ac(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=dP(n,(r,i)=>i===ae?[ac(n.children[ae],!1)]:[`${i}:${ac(r,!1)}`]);return Object.keys(n.children).length===1&&n.children[ae]!=null?`${Tu(n)}/${e[0]}`:`${Tu(n)}/(${e.join("//")})`}}function TE(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Su(n){return TE(n).replace(/%3B/gi,";")}function fP(n){return encodeURI(n)}function Ev(n){return TE(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function xu(n){return decodeURIComponent(n)}function pE(n){return xu(n.replace(/\+/g,"%20"))}function xE(n){return`${Ev(n.path)}${hP(n.parameters)}`}function hP(n){return Object.entries(n).map(([t,e])=>`;${Ev(t)}=${Ev(e)}`).join("")}function pP(n){let t=Object.entries(n).map(([e,r])=>Array.isArray(r)?r.map(i=>`${Su(e)}=${Su(i)}`).join("&"):`${Su(e)}=${Su(r)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var mP=/^[^\/()?;#]+/;function vv(n){let t=n.match(mP);return t?t[0]:""}var gP=/^[^\/()?;=#]+/;function vP(n){let t=n.match(gP);return t?t[0]:""}var yP=/^[^=?&#]+/;function bP(n){let t=n.match(yP);return t?t[0]:""}var _P=/^[^&#]+/;function CP(n){let t=n.match(_P);return t?t[0]:""}var Sv=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Me([],{}):new Me([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r[ae]=new Me(t,e)),r}parseSegment(){let t=vv(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(t),new si(xu(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=vP(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=vv(this.remaining);i&&(r=i,this.capture(r))}t[xu(e)]=xu(r)}parseQueryParam(t){let e=bP(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=CP(this.remaining);s&&(r=s,this.capture(r))}let i=pE(e),o=pE(r);if(t.hasOwnProperty(i)){let s=t[i];Array.isArray(s)||(s=[s],t[i]=s),s.push(o)}else t[i]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=vv(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ae);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[ae]:new Me([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new S(4011,!1)}};function IE(n){return n.segments.length>0?new Me([],{[ae]:n}):n}function kE(n){let t={};for(let[r,i]of Object.entries(n.children)){let o=kE(i);if(r===ae&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[r]=o)}let e=new Me(n.segments,t);return wP(e)}function wP(n){if(n.numberOfChildren===1&&n.children[ae]){let t=n.children[ae];return new Me(n.segments.concat(t.segments),t.children)}return n}function ms(n){return n instanceof ir}function AE(n,t,e=null,r=null){let i=OE(n);return RE(i,t,e,r)}function OE(n){let t;function e(o){let s={};for(let c of o.children){let l=e(c);s[c.outlet]=l}let a=new Me(o.url,s);return o===n&&(t=a),a}let r=e(n.root),i=IE(r);return t??i}function RE(n,t,e,r){let i=n;for(;i.parent;)i=i.parent;if(t.length===0)return yv(i,i,i,e,r);let o=EP(t);if(o.toRoot())return yv(i,i,new Me([],{}),e,r);let s=SP(o,i,n),a=s.processChildren?lc(s.segmentGroup,s.index,o.commands):NE(s.segmentGroup,s.index,o.commands);return yv(i,s.segmentGroup,a,e,r)}function Iu(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function uc(n){return typeof n=="object"&&n!=null&&n.outlets}function yv(n,t,e,r,i){let o={};r&&Object.entries(r).forEach(([c,l])=>{o[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`});let s;n===t?s=e:s=PE(n,t,e);let a=IE(kE(s));return new ir(a,o,i)}function PE(n,t,e){let r={};return Object.entries(n.children).forEach(([i,o])=>{o===t?r[i]=e:r[i]=PE(o,t,e)}),new Me(n.segments,r)}var ku=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&Iu(r[0]))throw new S(4003,!1);let i=r.find(uc);if(i&&i!==wE(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function EP(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new ku(!0,0,n);let t=0,e=!1,r=n.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new ku(e,t,r)}var fs=class{segmentGroup;processChildren;index;constructor(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r}};function SP(n,t,e){if(n.isAbsolute)return new fs(t,!0,0);if(!e)return new fs(t,!1,NaN);if(e.parent===null)return new fs(e,!0,0);let r=Iu(n.commands[0])?0:1,i=e.segments.length-1+r;return DP(e,i,n.numberOfDoubleDots)}function DP(n,t,e){let r=n,i=t,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new fs(r,!1,i-o)}function MP(n){return uc(n[0])?n[0].outlets:{[ae]:n}}function NE(n,t,e){if(n??=new Me([],{}),n.segments.length===0&&n.hasChildren())return lc(n,t,e);let r=TP(n,t,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<n.segments.length){let o=new Me(n.segments.slice(0,r.pathIndex),{});return o.children[ae]=new Me(n.segments.slice(r.pathIndex),n.children),lc(o,0,i)}else return r.match&&i.length===0?new Me(n.segments,{}):r.match&&!n.hasChildren()?Dv(n,t,e):r.match?lc(n,0,i):Dv(n,t,e)}function lc(n,t,e){if(e.length===0)return new Me(n.segments,{});{let r=MP(e),i={};if(Object.keys(r).some(o=>o!==ae)&&n.children[ae]&&n.numberOfChildren===1&&n.children[ae].segments.length===0){let o=lc(n.children[ae],t,e);return new Me(n.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=NE(n.children[o],t,s))}),Object.entries(n.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new Me(n.segments,i)}}function TP(n,t,e){let r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};for(;i<n.segments.length;){if(r>=e.length)return o;let s=n.segments[i],a=e[r];if(uc(a))break;let c=`${a}`,l=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!gE(c,l,s))return o;r+=2}else{if(!gE(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Dv(n,t,e){let r=n.segments.slice(0,t),i=0;for(;i<e.length;){let o=e[i];if(uc(o)){let c=xP(o.outlets);return new Me(r,c)}if(i===0&&Iu(e[0])){let c=n.segments[t];r.push(new si(c.path,mE(e[0]))),i++;continue}let s=uc(o)?o.outlets[ae]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&Iu(a)?(r.push(new si(s,mE(a))),i+=2):(r.push(new si(s,{})),i++)}return new Me(r,{})}function xP(n){let t={};return Object.entries(n).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(t[e]=Dv(new Me([],{}),0,r))}),t}function mE(n){let t={};return Object.entries(n).forEach(([e,r])=>t[e]=`${r}`),t}function gE(n,t,e){return n==e.path&&nr(t,e.parameters)}var hs="imperative",dt=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(dt||{}),nn=class{id;url;constructor(t,e){this.id=t,this.url=e}},ci=class extends nn{type=dt.NavigationStart;navigationTrigger;restoredState;constructor(t,e,r="imperative",i=null){super(t,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},On=class extends nn{urlAfterRedirects;type=dt.NavigationEnd;constructor(t,e,r){super(t,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Vt=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})(Vt||{}),gs=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(gs||{}),rr=class extends nn{reason;code;type=dt.NavigationCancel;constructor(t,e,r,i){super(t,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},or=class extends nn{reason;code;type=dt.NavigationSkipped;constructor(t,e,r,i){super(t,e),this.reason=r,this.code=i}},vs=class extends nn{error;target;type=dt.NavigationError;constructor(t,e,r,i){super(t,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fc=class extends nn{urlAfterRedirects;state;type=dt.RoutesRecognized;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Au=class extends nn{urlAfterRedirects;state;type=dt.GuardsCheckStart;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ou=class extends nn{urlAfterRedirects;state;shouldActivate;type=dt.GuardsCheckEnd;constructor(t,e,r,i,o){super(t,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ru=class extends nn{urlAfterRedirects;state;type=dt.ResolveStart;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Pu=class extends nn{urlAfterRedirects;state;type=dt.ResolveEnd;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nu=class{route;type=dt.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Fu=class{route;type=dt.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Lu=class{snapshot;type=dt.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Vu=class{snapshot;type=dt.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ju=class{snapshot;type=dt.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Bu=class{snapshot;type=dt.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ys=class{routerEvent;position;anchor;type=dt.Scroll;constructor(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},hc=class{},bs=class{url;navigationBehaviorOptions;constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function IP(n){return!(n instanceof hc)&&!(n instanceof bs)}function kP(n,t){return n.providers&&!n._injector&&(n._injector=ns(n.providers,t,`Route: ${n.path}`)),n._injector??t}function An(n){return n.outlet||ae}function AP(n,t){let e=n.filter(r=>An(r)===t);return e.push(...n.filter(r=>An(r)!==t)),e}function ws(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Uu=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return ws(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Ji(this.rootInjector)}},Ji=(()=>{class n{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Uu(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||n)(N(Fe))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Hu=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=Mv(t,this._root);return e?e.children.map(r=>r.value):[]}firstChild(t){let e=Mv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Tv(t,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return Tv(t,this._root).map(e=>e.value)}};function Mv(n,t){if(n===t.value)return t;for(let e of t.children){let r=Mv(n,e);if(r)return r}return null}function Tv(n,t){if(n===t.value)return[t];for(let e of t.children){let r=Tv(n,e);if(r.length)return r.unshift(t),r}return[]}var tn=class{value;children;constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function us(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var pc=class extends Hu{snapshot;constructor(t,e){super(t),this.snapshot=e,Nv(this,t)}toString(){return this.snapshot.toString()}};function FE(n){let t=OP(n),e=new Z([new si("",{})]),r=new Z({}),i=new Z({}),o=new Z({}),s=new Z(""),a=new kr(e,r,o,s,i,ae,n,t.root);return a.snapshot=t.root,new pc(new tn(a,[]),t)}function OP(n){let t={},e={},r={},o=new Ki([],t,r,"",e,ae,n,null,{});return new mc("",new tn(o,[]))}var kr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,e,r,i,o,s,a,c){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(V(l=>l[bc]))??P(void 0),this.url=t,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(V(t=>Qi(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(V(t=>Qi(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function $u(n,t,e="emptyOnly"){let r,{routeConfig:i}=n;return t!==null&&(e==="always"||i?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:E(E({},t.params),n.params),data:E(E({},t.data),n.data),resolve:E(E(E(E({},n.data),t.data),i?.data),n._resolvedData)}:r={params:E({},n.params),data:E({},n.data),resolve:E(E({},n.data),n._resolvedData??{})},i&&VE(i)&&(r.resolve[bc]=i.title),r}var Ki=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[bc]}constructor(t,e,r,i,o,s,a,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Qi(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Qi(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},mc=class extends Hu{url;constructor(t,e){super(e),this.url=t,Nv(this,e)}toString(){return LE(this._root)}};function Nv(n,t){t.value._routerState=n,t.children.forEach(e=>Nv(n,e))}function LE(n){let t=n.children.length>0?` { ${n.children.map(LE).join(", ")} } `:"";return`${n.value}${t}`}function bv(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,nr(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),nr(t.params,e.params)||n.paramsSubject.next(e.params),oP(t.url,e.url)||n.urlSubject.next(e.url),nr(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function xv(n,t){let e=nr(n.params,t.params)&&lP(n.url,t.url),r=!n.parent!=!t.parent;return e&&!r&&(!n.parent||xv(n.parent,t.parent))}function VE(n){return typeof n.title=="string"||n.title===null}var jE=new T(""),_c=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=ae;activateEvents=new U;deactivateEvents=new U;attachEvents=new U;detachEvents=new U;routerOutletData=Pw(void 0);parentContexts=f(Ji);location=f(xn);changeDetector=f(Dt);inputBinder=f(Cc,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Iv(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Qe]})}return n})(),Iv=class{route;childContexts;parent;outletData;constructor(t,e,r,i){this.route=t,this.childContexts=e,this.parent=r,this.outletData=i}get(t,e){return t===kr?this.route:t===Ji?this.childContexts:t===jE?this.outletData:this.parent.get(t,e)}},Cc=new T(""),Fv=(()=>{class n{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=gr([r.queryParams,r.params,r.data]).pipe(Ze(([o,s,a],c)=>(a=E(E(E({},o),s),a),c===0?P(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=Fw(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),Lv=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&ie(0,"router-outlet")},dependencies:[_c],encapsulation:2})}return n})();function Vv(n){let t=n.children&&n.children.map(Vv),e=t?X(E({},n),{children:t}):E({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==ae&&(e.component=Lv),e}function RP(n,t,e){let r=gc(n,t._root,e?e._root:void 0);return new pc(r,t)}function gc(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=t.value;let i=PP(n,t,e);return new tn(r,i)}else{if(n.shouldAttach(t.value)){let o=n.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>gc(n,a)),s}}let r=NP(t.value),i=t.children.map(o=>gc(n,o));return new tn(r,i)}}function PP(n,t,e){return t.children.map(r=>{for(let i of e.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return gc(n,r,i);return gc(n,r)})}function NP(n){return new kr(new Z(n.url),new Z(n.params),new Z(n.queryParams),new Z(n.fragment),new Z(n.data),n.outlet,n.component,n)}var _s=class{redirectTo;navigationBehaviorOptions;constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},BE="ngNavigationCancelingError";function zu(n,t){let{redirectTo:e,navigationBehaviorOptions:r}=ms(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=UE(!1,Vt.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function UE(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[BE]=!0,e.cancellationCode=t,e}function FP(n){return HE(n)&&ms(n.url)}function HE(n){return!!n&&n[BE]}var LP=(n,t,e,r)=>V(i=>(new kv(t,i.targetRouterState,i.currentRouterState,e,r).activate(n),i)),kv=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,e,r,i,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),bv(this.futureState.root),this.activateChildRoutes(e,r,t)}deactivateChildRoutes(t,e,r){let i=us(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(t,e,r){let i=t.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let r=e.getContext(t.value.outlet),i=r&&t.value.component?r.children:e,o=us(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let r=e.getContext(t.value.outlet),i=r&&t.value.component?r.children:e,o=us(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,e,r){let i=us(e);t.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new Bu(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Vu(t.value.snapshot))}activateRoutes(t,e,r){let i=t.value,o=e?e.value:null;if(bv(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),bv(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}},Wu=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},ps=class{component;route;constructor(t,e){this.component=t,this.route=e}};function VP(n,t,e){let r=n._root,i=t?t._root:null;return cc(r,i,e,[r.value])}function jP(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Es(n,t){let e=Symbol(),r=t.get(n,e);return r===e?typeof n=="function"&&!yp(n)?n:t.get(n):r}function cc(n,t,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=us(t);return n.children.forEach(s=>{BP(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>dc(a,e.getContext(s),i)),i}function BP(n,t,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=UP(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Wu(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?cc(n,t,a?a.children:null,r,i):cc(n,t,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new ps(a.outlet.component,s))}else s&&dc(t,a,i),i.canActivateChecks.push(new Wu(r)),o.component?cc(n,null,a?a.children:null,r,i):cc(n,null,e,r,i);return i}function UP(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!Zi(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Zi(n.url,t.url)||!nr(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xv(n,t)||!nr(n.queryParams,t.queryParams);case"paramsChange":default:return!xv(n,t)}}function dc(n,t,e){let r=us(n),i=n.value;Object.entries(r).forEach(([o,s])=>{i.component?t?dc(s,t.children.getContext(o),e):dc(s,null,e):dc(s,t,e)}),i.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new ps(t.outlet.component,i)):e.canDeactivateChecks.push(new ps(null,i)):e.canDeactivateChecks.push(new ps(null,i))}function wc(n){return typeof n=="function"}function HP(n){return typeof n=="boolean"}function $P(n){return n&&wc(n.canLoad)}function zP(n){return n&&wc(n.canActivate)}function WP(n){return n&&wc(n.canActivateChild)}function GP(n){return n&&wc(n.canDeactivate)}function qP(n){return n&&wc(n.canMatch)}function $E(n){return n instanceof mr||n?.name==="EmptyError"}var Du=Symbol("INITIAL_VALUE");function Cs(){return Ze(n=>gr(n.map(t=>t.pipe(It(1),br(Du)))).pipe(V(t=>{for(let e of t)if(e!==!0){if(e===Du)return Du;if(e===!1||YP(e))return e}return!0}),Pe(t=>t!==Du),It(1)))}function YP(n){return ms(n)||n instanceof _s}function ZP(n,t){return ze(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?P(X(E({},e),{guardsResult:!0})):KP(s,r,i,n).pipe(ze(a=>a&&HP(a)?QP(r,o,n,t):P(a)),V(a=>X(E({},e),{guardsResult:a})))})}function KP(n,t,e,r){return Ve(n).pipe(ze(i=>nN(i.component,i.route,e,t,r)),yr(i=>i!==!0,!0))}function QP(n,t,e,r){return Ve(t).pipe(Un(i=>Ur(JP(i.route.parent,r),XP(i.route,r),tN(n,i.path,e),eN(n,i.route,e))),yr(i=>i!==!0,!0))}function XP(n,t){return n!==null&&t&&t(new ju(n)),P(!0)}function JP(n,t){return n!==null&&t&&t(new Lu(n)),P(!0)}function eN(n,t,e){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return P(!0);let i=r.map(o=>da(()=>{let s=ws(t)??e,a=Es(o,s),c=zP(a)?a.canActivate(t,n):ft(s,()=>a(t,n));return Ar(c).pipe(yr())}));return P(i).pipe(Cs())}function tN(n,t,e){let r=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>jP(s)).filter(s=>s!==null).map(s=>da(()=>{let a=s.guards.map(c=>{let l=ws(s.node)??e,d=Es(c,l),u=WP(d)?d.canActivateChild(r,n):ft(l,()=>d(r,n));return Ar(u).pipe(yr())});return P(a).pipe(Cs())}));return P(o).pipe(Cs())}function nN(n,t,e,r,i){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return P(!0);let s=o.map(a=>{let c=ws(t)??i,l=Es(a,c),d=GP(l)?l.canDeactivate(n,t,e,r):ft(c,()=>l(n,t,e,r));return Ar(d).pipe(yr())});return P(s).pipe(Cs())}function rN(n,t,e,r){let i=t.canLoad;if(i===void 0||i.length===0)return P(!0);let o=i.map(s=>{let a=Es(s,n),c=$P(a)?a.canLoad(t,e):ft(n,()=>a(t,e));return Ar(c)});return P(o).pipe(Cs(),zE(r))}function zE(n){return Zh(ge(t=>{if(typeof t!="boolean")throw zu(n,t)}),V(t=>t===!0))}function iN(n,t,e,r){let i=t.canMatch;if(!i||i.length===0)return P(!0);let o=i.map(s=>{let a=Es(s,n),c=qP(a)?a.canMatch(t,e):ft(n,()=>a(t,e));return Ar(c)});return P(o).pipe(Cs(),zE(r))}var vc=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},yc=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function ds(n){return jr(new vc(n))}function oN(n){return jr(new S(4e3,!1))}function sN(n){return jr(UE(!1,Vt.GuardRejected))}var Av=class{urlSerializer;urlTree;constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return P(r);if(i.numberOfChildren>1||!i.children[ae])return oN(`${t.redirectTo}`);i=i.children[ae]}}applyRedirectCommands(t,e,r,i,o){return aN(e,i,o).pipe(V(s=>{if(s instanceof ir)throw new yc(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),t,r);if(s[0]==="/")throw new yc(a);return a}))}applyRedirectCreateUrlTree(t,e,r,i){let o=this.createSegmentGroup(t,e.root,r,i);return new ir(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let r={};return Object.entries(t).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(t,e,r,i){let o=this.createSegments(t,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,r,i)}),new Me(o,s)}createSegments(t,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(t,o,i):this.findOrReturn(o,r))}findPosParam(t,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(t,e){let r=0;for(let i of e){if(i.path===t.path)return e.splice(r),i;r++}return t}};function aN(n,t,e){if(typeof n=="string")return P(n);let r=n,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,params:l,data:d,title:u}=t;return Ar(ft(e,()=>r({params:l,data:d,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,title:u})))}var Ov={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function cN(n,t,e,r,i){let o=WE(n,t,e);return o.matched?(r=kP(t,r),iN(r,t,e,i).pipe(V(s=>s===!0?o:E({},Ov)))):P(o)}function WE(n,t,e){if(t.path==="**")return lN(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?E({},Ov):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(t.matcher||_E)(e,n,t);if(!i)return E({},Ov);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?E(E({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function lN(n){return{matched:!0,parameters:n.length>0?wE(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function vE(n,t,e,r){return e.length>0&&fN(n,e,r)?{segmentGroup:new Me(t,uN(r,new Me(e,n.children))),slicedSegments:[]}:e.length===0&&hN(n,e,r)?{segmentGroup:new Me(n.segments,dN(n,e,r,n.children)),slicedSegments:e}:{segmentGroup:new Me(n.segments,n.children),slicedSegments:e}}function dN(n,t,e,r){let i={};for(let o of e)if(qu(n,t,o)&&!r[An(o)]){let s=new Me([],{});i[An(o)]=s}return E(E({},r),i)}function uN(n,t){let e={};e[ae]=t;for(let r of n)if(r.path===""&&An(r)!==ae){let i=new Me([],{});e[An(r)]=i}return e}function fN(n,t,e){return e.some(r=>qu(n,t,r)&&An(r)!==ae)}function hN(n,t,e){return e.some(r=>qu(n,t,r))}function qu(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function pN(n,t,e){return t.length===0&&!n.children[e]}var Rv=class{};function mN(n,t,e,r,i,o,s="emptyOnly"){return new Pv(n,t,e,r,i,s,o).recognize()}var gN=31,Pv=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,e,r,i,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Av(this.urlSerializer,this.urlTree)}noMatchError(t){return new S(4002,`'${t.segmentGroup}'`)}recognize(){let t=vE(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(V(({children:e,rootSnapshot:r})=>{let i=new tn(r,e),o=new mc("",i),s=AE(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){let e=new Ki([],Object.freeze({}),Object.freeze(E({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),ae,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,ae,e).pipe(V(r=>({children:r,rootSnapshot:e})),xt(r=>{if(r instanceof yc)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof vc?this.noMatchError(r):r}))}processSegmentGroup(t,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,e,r,o):this.processSegment(t,e,r,r.segments,i,!0,o).pipe(V(s=>s instanceof tn?[s]:[]))}processChildren(t,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return Ve(o).pipe(Un(s=>{let a=r.children[s],c=AP(e,s);return this.processSegmentGroup(t,c,a,s,i)}),rp((s,a)=>(s.push(...a),s)),Hr(null),np(),ze(s=>{if(s===null)return ds(r);let a=GE(s);return vN(a),P(a)}))}processSegment(t,e,r,i,o,s,a){return Ve(e).pipe(Un(c=>this.processSegmentAgainstRoute(c._injector??t,e,c,r,i,o,s,a).pipe(xt(l=>{if(l instanceof vc)return P(null);throw l}))),yr(c=>!!c),xt(c=>{if($E(c))return pN(r,i,o)?P(new Rv):ds(r);throw c}))}processSegmentAgainstRoute(t,e,r,i,o,s,a,c){return An(r)!==s&&(s===ae||!qu(i,o,r))?ds(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,i,r,o,s,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,i,e,r,o,s,c):ds(i)}expandSegmentAgainstRouteUsingRedirect(t,e,r,i,o,s,a){let{matched:c,parameters:l,consumedSegments:d,positionalParamSegments:u,remainingSegments:p}=WE(e,i,o);if(!c)return ds(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>gN&&(this.allowRedirects=!1));let h=new Ki(o,l,Object.freeze(E({},this.urlTree.queryParams)),this.urlTree.fragment,yE(i),An(i),i.component??i._loadedComponent??null,i,bE(i)),v=$u(h,a,this.paramsInheritanceStrategy);return h.params=Object.freeze(v.params),h.data=Object.freeze(v.data),this.applyRedirects.applyRedirectCommands(d,i.redirectTo,u,h,t).pipe(Ze(D=>this.applyRedirects.lineralizeSegments(i,D)),ze(D=>this.processSegment(t,r,e,D.concat(p),s,!1,a)))}matchSegmentAgainstRoute(t,e,r,i,o,s){let a=cN(e,r,i,t,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(Ze(c=>c.matched?(t=r._injector??t,this.getChildConfig(t,r,i).pipe(Ze(({routes:l})=>{let d=r._loadedInjector??t,{parameters:u,consumedSegments:p,remainingSegments:h}=c,v=new Ki(p,u,Object.freeze(E({},this.urlTree.queryParams)),this.urlTree.fragment,yE(r),An(r),r.component??r._loadedComponent??null,r,bE(r)),_=$u(v,s,this.paramsInheritanceStrategy);v.params=Object.freeze(_.params),v.data=Object.freeze(_.data);let{segmentGroup:D,slicedSegments:M}=vE(e,p,h,l);if(M.length===0&&D.hasChildren())return this.processChildren(d,l,D,v).pipe(V(Ee=>new tn(v,Ee)));if(l.length===0&&M.length===0)return P(new tn(v,[]));let G=An(r)===o;return this.processSegment(d,l,D,M,G?ae:o,!0,v).pipe(V(Ee=>new tn(v,Ee instanceof tn?[Ee]:[])))}))):ds(e)))}getChildConfig(t,e,r){return e.children?P({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?P({routes:e._loadedRoutes,injector:e._loadedInjector}):rN(t,e,r,this.urlSerializer).pipe(ze(i=>i?this.configLoader.loadChildren(t,e).pipe(ge(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):sN(e))):P({routes:[],injector:t})}};function vN(n){n.sort((t,e)=>t.value.outlet===ae?-1:e.value.outlet===ae?1:t.value.outlet.localeCompare(e.value.outlet))}function yN(n){let t=n.value.routeConfig;return t&&t.path===""}function GE(n){let t=[],e=new Set;for(let r of n){if(!yN(r)){t.push(r);continue}let i=t.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):t.push(r)}for(let r of e){let i=GE(r.children);t.push(new tn(r.value,i))}return t.filter(r=>!e.has(r))}function yE(n){return n.data||{}}function bE(n){return n.resolve||{}}function bN(n,t,e,r,i,o){return ze(s=>mN(n,t,e,r,s.extractedUrl,i,o).pipe(V(({state:a,tree:c})=>X(E({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function _N(n,t){return ze(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return P(e);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let l of qE(c))s.add(l);let a=0;return Ve(s).pipe(Un(c=>o.has(c)?CN(c,r,n,t):(c.data=$u(c,c.parent,n).resolve,P(void 0))),ge(()=>a++),Po(1),ze(c=>a===s.size?P(e):Et))})}function qE(n){let t=n.children.map(e=>qE(e)).flat();return[n,...t]}function CN(n,t,e,r){let i=n.routeConfig,o=n._resolve;return i?.title!==void 0&&!VE(i)&&(o[bc]=i.title),da(()=>(n.data=$u(n,n.parent,e).resolve,wN(o,n,t,r).pipe(V(s=>(n._resolvedData=s,n.data=E(E({},n.data),s),null)))))}function wN(n,t,e,r){let i=wv(n);if(i.length===0)return P({});let o={};return Ve(i).pipe(ze(s=>EN(n[s],t,e,r).pipe(yr(),ge(a=>{if(a instanceof _s)throw zu(new ai,a);o[s]=a}))),Po(1),V(()=>o),xt(s=>$E(s)?Et:jr(s)))}function EN(n,t,e,r){let i=ws(t)??r,o=Es(n,i),s=o.resolve?o.resolve(t,e):ft(i,()=>o(t,e));return Ar(s)}function _v(n){return Ze(t=>{let e=n(t);return e?Ve(e).pipe(V(()=>t)):P(t)})}var jv=(()=>{class n{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===ae);return r}getResolvedTitleForRoute(e){return e.data[bc]}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(YE),providedIn:"root"})}return n})(),YE=(()=>{class n extends jv{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||n)(N(uE))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),eo=new T("",{providedIn:"root",factory:()=>({})}),to=new T(""),Yu=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(Hg);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return P(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Ar(ft(e,()=>r.loadComponent())).pipe(V(KE),Ze(QE),ge(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),vr(()=>{this.componentLoaders.delete(r)})),o=new ko(i,()=>new A).pipe(Io());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return P({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=ZE(r,this.compiler,e,this.onLoadEndListener).pipe(vr(()=>{this.childrenLoaders.delete(r)})),s=new ko(o,()=>new A).pipe(Io());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ZE(n,t,e,r){return Ar(ft(e,()=>n.loadChildren())).pipe(V(KE),Ze(QE),ze(i=>i instanceof iu||Array.isArray(i)?P(i):Ve(t.compileModuleAsync(i))),V(i=>{r&&r(n);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(to,[],{optional:!0,self:!0}).flat()),{routes:s.map(Vv),injector:o}}))}function SN(n){return n&&typeof n=="object"&&"default"in n}function KE(n){return SN(n)?n.default:n}function QE(n){return P(n)}var Zu=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(DN),providedIn:"root"})}return n})(),DN=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Bv=new T(""),Uv=new T("");function XE(n,t,e){let r=n.get(Uv),i=n.get(z);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(l=>setTimeout(l));let o,s=new Promise(l=>{o=l}),a=i.startViewTransition(()=>(o(),MN(n)));a.ready.catch(l=>{});let{onViewTransitionCreated:c}=r;return c&&ft(n,()=>c({transition:a,from:t,to:e})),s}function MN(n){return new Promise(t=>{vt({read:()=>setTimeout(t)},{injector:n})})}var Hv=new T(""),Ku=(()=>{class n{currentNavigation=Nt(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new A;transitionAbortWithErrorSubject=new A;configLoader=f(Yu);environmentInjector=f(Fe);destroyRef=f(dn);urlSerializer=f(Xi);rootContexts=f(Ji);location=f(er);inputBindingEnabled=f(Cc,{optional:!0})!==null;titleStrategy=f(jv);options=f(eo,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(Zu);createViewTransition=f(Bv,{optional:!0});navigationErrorHandler=f(Hv,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>P(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Nu(i)),r=i=>this.events.next(new Fu(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;tt(()=>{this.transitions?.next(X(E({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new Z(null),this.transitions.pipe(Pe(r=>r!==null),Ze(r=>{let i=!1;return P(r).pipe(Ze(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",Vt.SupersededByNewNavigation),Et;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?X(E({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new or(o.id,this.urlSerializer.serialize(o.rawUrl),"",gs.IgnoredSameUrlNavigation)),o.resolve(!1),Et;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return P(o).pipe(Ze(c=>(this.events.next(new ci(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?Et:Promise.resolve(c))),bN(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),ge(c=>{r.targetSnapshot=c.targetSnapshot,r.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation.update(d=>(d.finalUrl=c.urlAfterRedirects,d));let l=new fc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(l)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:c,extractedUrl:l,source:d,restoredState:u,extras:p}=o,h=new ci(c,this.urlSerializer.serialize(l),d,u);this.events.next(h);let v=FE(this.rootComponentType).snapshot;return this.currentTransition=r=X(E({},o),{targetSnapshot:v,urlAfterRedirects:l,extras:X(E({},p),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(_=>(_.finalUrl=l,_)),P(r)}else return this.events.next(new or(o.id,this.urlSerializer.serialize(o.extractedUrl),"",gs.IgnoredByUrlHandlingStrategy)),o.resolve(!1),Et}),ge(o=>{let s=new Au(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),V(o=>(this.currentTransition=r=X(E({},o),{guards:VP(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),ZP(this.environmentInjector,o=>this.events.next(o)),ge(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw zu(this.urlSerializer,o.guardsResult);let s=new Ou(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),Pe(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",Vt.GuardRejected),!1)),_v(o=>{if(o.guards.canActivateChecks.length!==0)return P(o).pipe(ge(s=>{let a=new Ru(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),Ze(s=>{let a=!1;return P(s).pipe(_N(this.paramsInheritanceStrategy,this.environmentInjector),ge({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",Vt.NoDataFromResolver)}}))}),ge(s=>{let a=new Pu(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),_v(o=>{let s=a=>{let c=[];if(a.routeConfig?.loadComponent){let l=ws(a)??this.environmentInjector;c.push(this.configLoader.loadComponent(l,a.routeConfig).pipe(ge(d=>{a.component=d}),V(()=>{})))}for(let l of a.children)c.push(...s(l));return c};return gr(s(o.targetSnapshot.root)).pipe(Hr(null),It(1))}),_v(()=>this.afterPreactivation()),Ze(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?Ve(a).pipe(V(()=>r)):P(r)}),V(o=>{let s=RP(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=X(E({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),ge(()=>{this.events.next(new hc)}),LP(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),It(1),F(new te(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(Pe(()=>!i&&!r.targetRouterState),ge(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",Vt.Aborted)}))),ge({next:o=>{i=!0,this.lastSuccessfulNavigation=tt(this.currentNavigation),this.events.next(new On(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),F(this.transitionAbortWithErrorSubject.pipe(ge(o=>{throw o}))),vr(()=>{i||this.cancelNavigationTransition(r,"",Vt.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),xt(o=>{if(this.destroyed)return r.resolve(!1),Et;if(i=!0,HE(o))this.events.next(new rr(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),FP(o)?this.events.next(new bs(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new vs(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=ft(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof _s){let{message:c,cancellationCode:l}=zu(this.urlSerializer,a);this.events.next(new rr(r.id,this.urlSerializer.serialize(r.extractedUrl),c,l)),this.events.next(new bs(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return Et}))}))}cancelNavigationTransition(e,r,i){let o=new rr(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=tt(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function TN(n){return n!==hs}var JE=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(xN),providedIn:"root"})}return n})(),Gu=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},xN=(()=>{class n extends Gu{static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),eS=(()=>{class n{urlSerializer=f(Xi);options=f(eo,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(er);urlHandlingStrategy=f(Zu);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new ir;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof ir?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=FE(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:()=>f(IN),providedIn:"root"})}return n})(),IN=(()=>{class n extends eS{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ci?this.updateStateMemento():e instanceof or?this.commitTransition(r):e instanceof fc?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof hc?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof rr&&e.code!==Vt.SupersededByNewNavigation&&e.code!==Vt.Redirect?this.restoreHistory(r):e instanceof vs?this.restoreHistory(r,!0):e instanceof On&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=E(E({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=E(E({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Qu(n,t){n.events.pipe(Pe(e=>e instanceof On||e instanceof rr||e instanceof vs||e instanceof or),V(e=>e instanceof On||e instanceof or?0:(e instanceof rr?e.code===Vt.Redirect||e.code===Vt.SupersededByNewNavigation:!1)?2:1),Pe(e=>e!==2),It(1)).subscribe(()=>{t()})}var kN={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},AN={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Or=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(au);stateManager=f(eS);options=f(eo,{optional:!0})||{};pendingTasks=f(Zn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Ku);urlSerializer=f(Xi);location=f(er);urlHandlingStrategy=f(Zu);injector=f(Fe);_events=new A;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(JE);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(to,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Cc,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Re;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=tt(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof rr&&r.code!==Vt.Redirect&&r.code!==Vt.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof On)this.navigated=!0;else if(r instanceof bs){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=E({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||TN(i.source)},s);this.scheduleNavigation(a,hs,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}IP(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),hs,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let c=E({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(Pt)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return tt(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Vv),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,l=c?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=E(E({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let u;try{let p=i?i.snapshot:this.routerState.snapshot.root;u=OE(p)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),u=this.currentUrlTree.root}return RE(u,e,d,l??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=ms(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,hs,null,r)}navigate(e,r={skipLocationChange:!1}){return ON(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=E({},kN):r===!1?i=E({},AN):i=r,ms(e))return hE(this.currentUrlTree,e,i);let o=this.parseUrl(e);return hE(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,l;s?(a=s.resolve,c=s.reject,l=s.promise):l=new Promise((u,p)=>{a=u,c=p});let d=this.pendingTasks.add();return Qu(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(u=>Promise.reject(u))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ON(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new S(4008,!1)}var Ec=class{};var tS=(()=>{class n{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(Pe(e=>e instanceof On),Un(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=ns(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Ve(i).pipe(Br())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=this.loader.loadChildren(e,r):i=P(null);let o=i.pipe(ze(s=>s===null?P(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return Ve([o,s]).pipe(Br())}else return o})}static \u0275fac=function(r){return new(r||n)(N(Or),N(Fe),N(Ec),N(Yu))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),nS=new T(""),RN=(()=>{class n{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=hs;restoredId=0;store={};constructor(e,r,i,o,s={}){this.urlSerializer=e,this.transitions=r,this.viewportScroller=i,this.zone=o,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ci?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof On?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof or&&e.code===gs.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ys&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,r){this.zone.runOutsideAngular(()=>xe(this,null,function*(){yield new Promise(i=>{setTimeout(i),typeof requestAnimationFrame<"u"&&requestAnimationFrame(i)}),this.zone.run(()=>{this.transitions.events.next(new ys(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){xg()};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();function zv(n,...t){return Cn([{provide:to,multi:!0,useValue:n},[],{provide:kr,useFactory:rS,deps:[Or]},{provide:Wa,multi:!0,useFactory:iS},t.map(e=>e.\u0275providers)])}function rS(n){return n.routerState.root}function Sc(n,t){return{\u0275kind:n,\u0275providers:t}}function iS(){let n=f(ce);return t=>{let e=n.get(Ft);if(t!==e.components[0])return;let r=n.get(Or),i=n.get(oS);n.get(Wv)===1&&r.initialNavigation(),n.get(cS,null,{optional:!0})?.setUpPreloading(),n.get(nS,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var oS=new T("",{factory:()=>new A}),Wv=new T("",{providedIn:"root",factory:()=>1});function sS(){let n=[{provide:Zd,useValue:!0},{provide:Wv,useValue:0},lu(()=>{let t=f(ce);return t.get(Qg,Promise.resolve()).then(()=>new Promise(r=>{let i=t.get(Or),o=t.get(oS);Qu(i,()=>{r(!0)}),t.get(Ku).afterPreactivation=()=>(r(!0),o.closed?P(void 0):o),i.initialNavigation()}))})];return Sc(2,n)}function aS(){let n=[lu(()=>{f(Or).setUpLocationChangeListener()}),{provide:Wv,useValue:2}];return Sc(3,n)}var cS=new T("");function lS(n){return Sc(0,[{provide:cS,useExisting:tS},{provide:Ec,useExisting:n}])}function dS(){return Sc(8,[Fv,{provide:Cc,useExisting:Fv}])}function uS(n){en("NgRouterViewTransitions");let t=[{provide:Bv,useValue:XE},{provide:Uv,useValue:E({skipNextTransition:!!n?.skipInitialTransition},n)}];return Sc(9,t)}var fS=[er,{provide:Xi,useClass:ai},Or,Ji,{provide:kr,useFactory:rS,deps:[Or]},Yu,[]],Gv=(()=>{class n{constructor(){}static forRoot(e,r){return{ngModule:n,providers:[fS,[],{provide:to,multi:!0,useValue:e},[],r?.errorHandler?{provide:Hv,useValue:r.errorHandler}:[],{provide:eo,useValue:r||{}},r?.useHash?NN():FN(),PN(),r?.preloadingStrategy?lS(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?LN(r):[],r?.bindToComponentInputs?dS().\u0275providers:[],r?.enableViewTransitions?uS().\u0275providers:[],VN()]}}static forChild(e){return{ngModule:n,providers:[{provide:to,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})();function PN(){return{provide:nS,useFactory:()=>{let n=f($w),t=f($),e=f(eo),r=f(Ku),i=f(Xi);return e.scrollOffset&&n.setOffset(e.scrollOffset),new RN(i,r,n,t,e)}}}function NN(){return{provide:xr,useClass:tv}}function FN(){return{provide:xr,useClass:mu}}function LN(n){return[n.initialNavigation==="disabled"?aS().\u0275providers:[],n.initialNavigation==="enabledBlocking"?sS().\u0275providers:[]]}var $v=new T("");function VN(){return[{provide:$v,useFactory:iS},{provide:Wa,multi:!0,useExisting:$v}]}var se=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(se||{}),pn="*";function qv(n,t){return{type:se.Trigger,name:n,definitions:t,options:{}}}function Xu(n,t=null){return{type:se.Animate,styles:t,timings:n}}function hS(n,t=null){return{type:se.Sequence,steps:n,options:t}}function li(n){return{type:se.Style,styles:n,offset:null}}function Ju(n,t,e=null){return{type:se.Transition,expr:n,animation:t,options:e}}var sr=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(t=0,e=0){this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},no=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(t){this.players=t;let e=0,r=0,i=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++r==o&&this._onDestroy()}),s.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(r=>{let i=r.totalTime?Math.min(1,e/r.totalTime):1;r.setPosition(i)})}getPosition(){let t=this.players.reduce((e,r)=>e===null||r.totalTime>e.totalTime?r:e,null);return t!=null?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},Ss="!";function pS(n){return new S(3e3,!1)}function UN(){return new S(3100,!1)}function HN(){return new S(3101,!1)}function $N(n){return new S(3001,!1)}function zN(n){return new S(3003,!1)}function WN(n){return new S(3004,!1)}function gS(n,t){return new S(3005,!1)}function vS(){return new S(3006,!1)}function yS(){return new S(3007,!1)}function bS(n,t){return new S(3008,!1)}function _S(n){return new S(3002,!1)}function CS(n,t,e,r,i){return new S(3010,!1)}function wS(){return new S(3011,!1)}function ES(){return new S(3012,!1)}function SS(){return new S(3200,!1)}function DS(){return new S(3202,!1)}function MS(){return new S(3013,!1)}function TS(n){return new S(3014,!1)}function xS(n){return new S(3015,!1)}function IS(n){return new S(3016,!1)}function kS(n,t){return new S(3404,!1)}function GN(n){return new S(3502,!1)}function AS(n){return new S(3503,!1)}function OS(){return new S(3300,!1)}function RS(n){return new S(3504,!1)}function PS(n){return new S(3301,!1)}function NS(n,t){return new S(3302,!1)}function FS(n){return new S(3303,!1)}function LS(n,t){return new S(3400,!1)}function VS(n){return new S(3401,!1)}function jS(n){return new S(3402,!1)}function BS(n,t){return new S(3505,!1)}function Rr(n){switch(n.length){case 0:return new sr;case 1:return n[0];default:return new no(n)}}function Qv(n,t,e=new Map,r=new Map){let i=[],o=[],s=-1,a=null;if(t.forEach(c=>{let l=c.get("offset"),d=l==s,u=d&&a||new Map;c.forEach((p,h)=>{let v=h,_=p;if(h!=="offset")switch(v=n.normalizePropertyName(v,i),_){case Ss:_=e.get(h);break;case pn:_=r.get(h);break;default:_=n.normalizeStyleValue(h,v,_,i);break}u.set(v,_)}),d||o.push(u),a=u,s=l}),i.length)throw GN(i);return o}function ef(n,t,e,r){switch(t){case"start":n.onStart(()=>r(e&&Yv(e,"start",n)));break;case"done":n.onDone(()=>r(e&&Yv(e,"done",n)));break;case"destroy":n.onDestroy(()=>r(e&&Yv(e,"destroy",n)));break}}function Yv(n,t,e){let r=e.totalTime,i=!!e.disabled,o=tf(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,r??n.totalTime,i),s=n._data;return s!=null&&(o._data=s),o}function tf(n,t,e,r,i="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function qt(n,t,e){let r=n.get(t);return r||n.set(t,r=e),r}function Xv(n){let t=n.indexOf(":"),e=n.substring(1,t),r=n.slice(t+1);return[e,r]}var qN=typeof document>"u"?null:document.documentElement;function nf(n){let t=n.parentNode||n.host||null;return t===qN?null:t}function YN(n){return n.substring(1,6)=="ebkit"}var ro=null,mS=!1;function US(n){ro||(ro=ZN()||{},mS=ro.style?"WebkitAppearance"in ro.style:!1);let t=!0;return ro.style&&!YN(n)&&(t=n in ro.style,!t&&mS&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ro.style)),t}function ZN(){return typeof document<"u"?document.body:null}function Jv(n,t){for(;t;){if(t===n)return!0;t=nf(t)}return!1}function ey(n,t,e){if(e)return Array.from(n.querySelectorAll(t));let r=n.querySelector(t);return r?[r]:[]}var KN=1e3,ty="{{",QN="}}",ny="ng-enter",rf="ng-leave",Dc="ng-trigger",Mc=".ng-trigger",ry="ng-animating",of=".ng-animating";function ar(n){if(typeof n=="number")return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Zv(parseFloat(t[1]),t[2])}function Zv(n,t){switch(t){case"s":return n*KN;default:return n}}function Tc(n,t,e){return n.hasOwnProperty("duration")?n:JN(n,t,e)}var XN=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function JN(n,t,e){let r,i=0,o="";if(typeof n=="string"){let s=n.match(XN);if(s===null)return t.push(pS(n)),{duration:0,delay:0,easing:""};r=Zv(parseFloat(s[1]),s[2]);let a=s[3];a!=null&&(i=Zv(parseFloat(a),s[4]));let c=s[5];c&&(o=c)}else r=n;if(!e){let s=!1,a=t.length;r<0&&(t.push(UN()),s=!0),i<0&&(t.push(HN()),s=!0),s&&t.splice(a,0,pS(n))}return{duration:r,delay:i,easing:o}}function HS(n){return n.length?n[0]instanceof Map?n:n.map(t=>new Map(Object.entries(t))):[]}function Rn(n,t,e){t.forEach((r,i)=>{let o=sf(i);e&&!e.has(i)&&e.set(i,n.style[o]),n.style[o]=r})}function di(n,t){t.forEach((e,r)=>{let i=sf(r);n.style[i]=""})}function Ds(n){return Array.isArray(n)?n.length==1?n[0]:hS(n):n}function $S(n,t,e){let r=t.params||{},i=iy(n);i.length&&i.forEach(o=>{r.hasOwnProperty(o)||e.push($N(o))})}var Kv=new RegExp(`${ty}\\s*(.+?)\\s*${QN}`,"g");function iy(n){let t=[];if(typeof n=="string"){let e;for(;e=Kv.exec(n);)t.push(e[1]);Kv.lastIndex=0}return t}function Ms(n,t,e){let r=`${n}`,i=r.replace(Kv,(o,s)=>{let a=t[s];return a==null&&(e.push(zN(s)),a=""),a.toString()});return i==r?n:i}var e1=/-+([a-z0-9])/g;function sf(n){return n.replace(e1,(...t)=>t[1].toUpperCase())}function zS(n,t){return n===0||t===0}function WS(n,t,e){if(e.size&&t.length){let r=t[0],i=[];if(e.forEach((o,s)=>{r.has(s)||i.push(s),r.set(s,o)}),i.length)for(let o=1;o<t.length;o++){let s=t[o];i.forEach(a=>s.set(a,af(n,a)))}}return t}function Yt(n,t,e){switch(t.type){case se.Trigger:return n.visitTrigger(t,e);case se.State:return n.visitState(t,e);case se.Transition:return n.visitTransition(t,e);case se.Sequence:return n.visitSequence(t,e);case se.Group:return n.visitGroup(t,e);case se.Animate:return n.visitAnimate(t,e);case se.Keyframes:return n.visitKeyframes(t,e);case se.Style:return n.visitStyle(t,e);case se.Reference:return n.visitReference(t,e);case se.AnimateChild:return n.visitAnimateChild(t,e);case se.AnimateRef:return n.visitAnimateRef(t,e);case se.Query:return n.visitQuery(t,e);case se.Stagger:return n.visitStagger(t,e);default:throw WN(t.type)}}function af(n,t){return window.getComputedStyle(n)[t]}var Cy=(()=>{class n{validateStyleProperty(e){return US(e)}containsElement(e,r){return Jv(e,r)}getParentElement(e){return nf(e)}query(e,r,i){return ey(e,r,i)}computeStyle(e,r,i){return i||""}animate(e,r,i,o,s,a=[],c){return new sr(i,o)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})(),oo=class{static NOOP=new Cy},so=class{};var t1=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),ff=class extends so{normalizePropertyName(t,e){return sf(t)}normalizeStyleValue(t,e,r,i){let o="",s=r.toString().trim();if(t1.has(e)&&r!==0&&r!=="0")if(typeof r=="number")o="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(gS(t,r))}return s+o}};var hf="*";function n1(n,t){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(r=>r1(r,e,t)):e.push(n),e}function r1(n,t,e){if(n[0]==":"){let c=i1(n,e);if(typeof c=="function"){t.push(c);return}n=c}let r=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(r==null||r.length<4)return e.push(xS(n)),t;let i=r[1],o=r[2],s=r[3];t.push(GS(i,s));let a=i==hf&&s==hf;o[0]=="<"&&!a&&t.push(GS(s,i))}function i1(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,r)=>parseFloat(r)>parseFloat(e);case":decrement":return(e,r)=>parseFloat(r)<parseFloat(e);default:return t.push(IS(n)),"* => *"}}var cf=new Set(["true","1"]),lf=new Set(["false","0"]);function GS(n,t){let e=cf.has(n)||lf.has(n),r=cf.has(t)||lf.has(t);return(i,o)=>{let s=n==hf||n==i,a=t==hf||t==o;return!s&&e&&typeof i=="boolean"&&(s=i?cf.has(n):lf.has(n)),!a&&r&&typeof o=="boolean"&&(a=o?cf.has(t):lf.has(t)),s&&a}}var nD=":self",o1=new RegExp(`s*${nD}s*,?`,"g");function rD(n,t,e,r){return new dy(n).build(t,e,r)}var qS="",dy=class{_driver;constructor(t){this._driver=t}build(t,e,r){let i=new uy(e);return this._resetContextStyleTimingState(i),Yt(this,Ds(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector=qS,t.collectedStyles=new Map,t.collectedStyles.set(qS,new Map),t.currentTime=0}visitTrigger(t,e){let r=e.queryCount=0,i=e.depCount=0,o=[],s=[];return t.name.charAt(0)=="@"&&e.errors.push(vS()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),a.type==se.State){let c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,o.push(this.visitState(c,e))}),c.name=l}else if(a.type==se.Transition){let c=this.visitTransition(a,e);r+=c.queryCount,i+=c.depCount,s.push(c)}else e.errors.push(yS())}),{type:se.Trigger,name:t.name,states:o,transitions:s,queryCount:r,depCount:i,options:null}}visitState(t,e){let r=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(r.containsDynamicStyles){let o=new Set,s=i||{};r.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{iy(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&e.errors.push(bS(t.name,[...o.values()]))}return{type:se.State,name:t.name,style:r,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;let r=Yt(this,Ds(t.animation),e),i=n1(t.expr,e.errors);return{type:se.Transition,matchers:i,animation:r,queryCount:e.queryCount,depCount:e.depCount,options:io(t.options)}}visitSequence(t,e){return{type:se.Sequence,steps:t.steps.map(r=>Yt(this,r,e)),options:io(t.options)}}visitGroup(t,e){let r=e.currentTime,i=0,o=t.steps.map(s=>{e.currentTime=r;let a=Yt(this,s,e);return i=Math.max(i,e.currentTime),a});return e.currentTime=i,{type:se.Group,steps:o,options:io(t.options)}}visitAnimate(t,e){let r=l1(t.timings,e.errors);e.currentAnimateTimings=r;let i,o=t.styles?t.styles:li({});if(o.type==se.Keyframes)i=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;let l={};r.easing&&(l.easing=r.easing),s=li(l)}e.currentTime+=r.duration+r.delay;let c=this.visitStyle(s,e);c.isEmptyStep=a,i=c}return e.currentAnimateTimings=null,{type:se.Animate,timings:r,style:i,options:null}}visitStyle(t,e){let r=this._makeStyleAst(t,e);return this._validateStyleAst(r,e),r}_makeStyleAst(t,e){let r=[],i=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of i)typeof a=="string"?a===pn?r.push(a):e.errors.push(_S(a)):r.push(new Map(Object.entries(a)));let o=!1,s=null;return r.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(ty)>=0){o=!0;break}}}),{type:se.Style,styles:r,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){let r=e.currentAnimateTimings,i=e.currentTime,o=e.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let l=e.collectedStyles.get(e.currentQuerySelector),d=l.get(c),u=!0;d&&(o!=i&&o>=d.startTime&&i<=d.endTime&&(e.errors.push(CS(c,d.startTime,d.endTime,o,i)),u=!1),o=d.startTime),u&&l.set(c,{startTime:o,endTime:i}),e.options&&$S(a,e.options,e.errors)})})}visitKeyframes(t,e){let r={type:se.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(wS()),r;let i=1,o=0,s=[],a=!1,c=!1,l=0,d=t.steps.map(M=>{let G=this._makeStyleAst(M,e),Ee=G.offset!=null?G.offset:c1(G.styles),me=0;return Ee!=null&&(o++,me=G.offset=Ee),c=c||me<0||me>1,a=a||me<l,l=me,s.push(me),G});c&&e.errors.push(ES()),a&&e.errors.push(SS());let u=t.steps.length,p=0;o>0&&o<u?e.errors.push(DS()):o==0&&(p=i/(u-1));let h=u-1,v=e.currentTime,_=e.currentAnimateTimings,D=_.duration;return d.forEach((M,G)=>{let Ee=p>0?G==h?1:p*G:s[G],me=Ee*D;e.currentTime=v+_.delay+me,_.duration=me,this._validateStyleAst(M,e),M.offset=Ee,r.styles.push(M)}),r}visitReference(t,e){return{type:se.Reference,animation:Yt(this,Ds(t.animation),e),options:io(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:se.AnimateChild,options:io(t.options)}}visitAnimateRef(t,e){return{type:se.AnimateRef,animation:this.visitReference(t.animation,e),options:io(t.options)}}visitQuery(t,e){let r=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;let[o,s]=s1(t.selector);e.currentQuerySelector=r.length?r+" "+o:o,qt(e.collectedStyles,e.currentQuerySelector,new Map);let a=Yt(this,Ds(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=r,{type:se.Query,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:io(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(MS());let r=t.timings==="full"?{duration:0,delay:0,easing:"full"}:Tc(t.timings,e.errors,!0);return{type:se.Stagger,animation:Yt(this,Ds(t.animation),e),timings:r,options:null}}};function s1(n){let t=!!n.split(/\s*,\s*/).find(e=>e==nD);return t&&(n=n.replace(o1,"")),n=n.replace(/@\*/g,Mc).replace(/@\w+/g,e=>Mc+"-"+e.slice(1)).replace(/:animating/g,of),[n,t]}function a1(n){return n?E({},n):null}var uy=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(t){this.errors=t}};function c1(n){if(typeof n=="string")return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let r=e;t=parseFloat(r.get("offset")),r.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}function l1(n,t){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let o=Tc(n,t).duration;return oy(o,0,"")}let e=n;if(e.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=oy(0,0,"");return o.dynamic=!0,o.strValue=e,o}let i=Tc(e,t);return oy(i.duration,i.delay,i.easing)}function io(n){return n?(n=E({},n),n.params&&(n.params=a1(n.params))):n={},n}function oy(n,t,e){return{duration:n,delay:t,easing:e}}function wy(n,t,e,r,i,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var Ic=class{_map=new Map;get(t){return this._map.get(t)||[]}append(t,e){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}},d1=1,u1=":enter",f1=new RegExp(u1,"g"),h1=":leave",p1=new RegExp(h1,"g");function iD(n,t,e,r,i,o=new Map,s=new Map,a,c,l=[]){return new fy().buildKeyframes(n,t,e,r,i,o,s,a,c,l)}var fy=class{buildKeyframes(t,e,r,i,o,s,a,c,l,d=[]){l=l||new Ic;let u=new hy(t,e,l,i,o,d,[]);u.options=c;let p=c.delay?ar(c.delay):0;u.currentTimeline.delayNextStep(p),u.currentTimeline.setStyles([s],null,u.errors,c),Yt(this,r,u);let h=u.timelines.filter(v=>v.containsAnimation());if(h.length&&a.size){let v;for(let _=h.length-1;_>=0;_--){let D=h[_];if(D.element===e){v=D;break}}v&&!v.allowOnlyTimelineStyles()&&v.setStyles([a],null,u.errors,c)}return h.length?h.map(v=>v.buildKeyframes()):[wy(e,[],[],[],0,p,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){let r=e.subInstructions.get(e.element);if(r){let i=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(r,i,i.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){let r=e.createSubContext(t.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,r),this.visitReference(t.animation,r),e.transformIntoNewTimeline(r.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,r){for(let i of t){let o=i?.delay;if(o){let s=typeof o=="number"?o:ar(Ms(o,i?.params??{},e.errors));r.delayNextStep(s)}}}_visitSubInstructions(t,e,r){let o=e.currentTimeline.currentTime,s=r.duration!=null?ar(r.duration):null,a=r.delay!=null?ar(r.delay):null;return s!==0&&t.forEach(c=>{let l=e.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Yt(this,t.animation,e),e.previousNode=t}visitSequence(t,e){let r=e.subContextCount,i=e,o=t.options;if(o&&(o.params||o.delay)&&(i=e.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==se.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=pf);let s=ar(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Yt(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){let r=[],i=e.currentTimeline.currentTime,o=t.options&&t.options.delay?ar(t.options.delay):0;t.steps.forEach(s=>{let a=e.createSubContext(t.options);o&&a.delayNextStep(o),Yt(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let r=t.strValue,i=e.params?Ms(r,e.params,e.errors):r;return Tc(i,e.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){let r=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;r.delay&&(e.incrementTime(r.delay),i.snapshotCurrentStyles());let o=t.style;o.type==se.Keyframes?this.visitKeyframes(o,e):(e.incrementTime(r.duration),this.visitStyle(o,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){let r=e.currentTimeline,i=e.currentAnimateTimings;!i&&r.hasCurrentStyleProperties()&&r.forwardFrame();let o=i&&i.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(o):r.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){let r=e.currentAnimateTimings,i=e.currentTimeline.duration,o=r.duration,a=e.createSubContext().currentTimeline;a.easing=r.easing,t.styles.forEach(c=>{let l=c.offset||0;a.forwardTime(l*o),a.setStyles(c.styles,c.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(i+o),e.previousNode=t}visitQuery(t,e){let r=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?ar(i.delay):0;o&&(e.previousNode.type===se.Style||r==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pf);let s=r,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=a.length;let c=null;a.forEach((l,d)=>{e.currentQueryIndex=d;let u=e.createSubContext(t.options,l);o&&u.delayNextStep(o),l===e.element&&(c=u.currentTimeline),Yt(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe();let p=u.currentTimeline.currentTime;s=Math.max(s,p)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),c&&(e.currentTimeline.mergeTimelineCollectedStyles(c),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let r=e.parentContext,i=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1),c=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=r.currentStaggerTime;break}let d=e.currentTimeline;c&&d.delayNextStep(c);let u=d.currentTime;Yt(this,t.animation,e),e.previousNode=t,r.currentStaggerTime=i.currentTime-u+(i.startTime-r.currentTimeline.startTime)}},pf={},hy=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=pf;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(t,e,r,i,o,s,a,c){this._driver=t,this.element=e,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=s,this.timelines=a,this.currentTimeline=c||new mf(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;let r=t,i=this.options;r.duration!=null&&(i.duration=ar(r.duration)),r.delay!=null&&(i.delay=ar(r.delay));let o=r.params;if(o){let s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Ms(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let e=this.options.params;if(e){let r=t.params={};Object.keys(e).forEach(i=>{r[i]=e[i]})}}return t}createSubContext(t=null,e,r){let i=e||this.element,o=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=pf,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,r){let i={duration:e??t.duration,delay:this.currentTimeline.currentTime+(r??0)+t.delay,easing:""},o=new py(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,r,i,o,s){let a=[];if(i&&a.push(this.element),t.length>0){t=t.replace(f1,"."+this._enterClassName),t=t.replace(p1,"."+this._leaveClassName);let c=r!=1,l=this._driver.query(this.element,t,c);r!==0&&(l=r<0?l.slice(l.length+r,l.length):l.slice(0,r)),a.push(...l)}return!o&&a.length==0&&s.push(TS(e)),a}},mf=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(t,e,r,i){this._driver=t,this.element=e,this.startTime=r,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new n(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=d1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,r]of this._globalTimelineStyles)this._backFill.set(e,r||pn),this._currentKeyframe.set(e,pn);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,r,i){e&&this._previousKeyframe.set("easing",e);let o=i&&i.params||{},s=m1(t,this._globalTimelineStyles);for(let[a,c]of s){let l=Ms(c,o,r);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??pn),this._updateStyle(a,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,r)=>{let i=this._styleSummary.get(r);(!i||e.time>i.time)&&this._updateStyle(r,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,e=new Set,r=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let l=new Map([...this._backFill,...a]);l.forEach((d,u)=>{d===Ss?t.add(u):d===pn&&e.add(u)}),r||l.set("offset",c/this.duration),i.push(l)});let o=[...t.values()],s=[...e.values()];if(r){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return wy(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)}},py=class extends mf{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(t,e,r,i,o,s,a=!1){super(t,e,s.delay),this.keyframes=r,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:r,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],s=r+e,a=e/s,c=new Map(t[0]);c.set("offset",0),o.push(c);let l=new Map(t[0]);l.set("offset",YS(a)),o.push(l);let d=t.length-1;for(let u=1;u<=d;u++){let p=new Map(t[u]),h=p.get("offset"),v=e+h*r;p.set("offset",YS(v/s)),o.push(p)}r=s,e=0,i="",t=o}return wy(this.element,t,this.preStyleProps,this.postStyleProps,r,e,i,!0)}};function YS(n,t=3){let e=Math.pow(10,t-1);return Math.round(n*e)/e}function m1(n,t){let e=new Map,r;return n.forEach(i=>{if(i==="*"){r??=t.keys();for(let o of r)e.set(o,pn)}else for(let[o,s]of i)e.set(o,s)}),e}function ZS(n,t,e,r,i,o,s,a,c,l,d,u,p){return{type:0,element:n,triggerName:t,isRemovalTransition:i,fromState:e,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:p}}var sy={},gf=class{_triggerName;ast;_stateStyles;constructor(t,e,r){this._triggerName=t,this.ast=e,this._stateStyles=r}match(t,e,r,i){return g1(this.ast.matchers,t,e,r,i)}buildStyles(t,e,r){let i=this._stateStyles.get("*");return t!==void 0&&(i=this._stateStyles.get(t?.toString())||i),i?i.buildStyles(e,r):new Map}build(t,e,r,i,o,s,a,c,l,d){let u=[],p=this.ast.options&&this.ast.options.params||sy,h=a&&a.params||sy,v=this.buildStyles(r,h,u),_=c&&c.params||sy,D=this.buildStyles(i,_,u),M=new Set,G=new Map,Ee=new Map,me=i==="void",bt={params:oD(_,p),delay:this.ast.options?.delay},qe=d?[]:iD(t,e,this.ast.animation,o,s,v,D,bt,l,u),He=0;return qe.forEach(Bt=>{He=Math.max(Bt.duration+Bt.delay,He)}),u.length?ZS(e,this._triggerName,r,i,me,v,D,[],[],G,Ee,He,u):(qe.forEach(Bt=>{let _i=Bt.element,yo=qt(G,_i,new Set);Bt.preStyleProps.forEach(Ci=>yo.add(Ci));let gb=qt(Ee,_i,new Set);Bt.postStyleProps.forEach(Ci=>gb.add(Ci)),_i!==e&&M.add(_i)}),ZS(e,this._triggerName,r,i,me,v,D,qe,[...M.values()],G,Ee,He))}};function g1(n,t,e,r,i){return n.some(o=>o(t,e,r,i))}function oD(n,t){let e=E({},t);return Object.entries(n).forEach(([r,i])=>{i!=null&&(e[r]=i)}),e}var my=class{styles;defaultParams;normalizer;constructor(t,e,r){this.styles=t,this.defaultParams=e,this.normalizer=r}buildStyles(t,e){let r=new Map,i=oD(t,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=Ms(s,i,e));let c=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,c,s,e),r.set(a,s)})}),r}};function v1(n,t,e){return new gy(n,t,e)}var gy=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(t,e,r){this.name=t,this.ast=e,this._normalizer=r,e.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new my(i.style,o,r))}),KS(this.states,"true","1"),KS(this.states,"false","0"),e.transitions.forEach(i=>{this.transitionFactories.push(new gf(t,i,this.states))}),this.fallbackTransition=y1(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,r,i){return this.transitionFactories.find(s=>s.match(t,e,r,i))||null}matchStyles(t,e,r){return this.fallbackTransition.buildStyles(t,e,r)}};function y1(n,t,e){let r=[(s,a)=>!0],i={type:se.Sequence,steps:[],options:null},o={type:se.Transition,animation:i,matchers:r,options:null,queryCount:0,depCount:0};return new gf(n,o,t)}function KS(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}var b1=new Ic,vy=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(t,e,r){this.bodyNode=t,this._driver=e,this._normalizer=r}register(t,e){let r=[],i=[],o=rD(this._driver,e,r,i);if(r.length)throw AS(r);this._animations.set(t,o)}_buildPlayer(t,e,r){let i=t.element,o=Qv(this._normalizer,t.keyframes,e,r);return this._driver.animate(i,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,r={}){let i=[],o=this._animations.get(t),s,a=new Map;if(o?(s=iD(this._driver,e,o,ny,rf,new Map,new Map,r,b1,i),s.forEach(d=>{let u=qt(a,d.element,new Map);d.postStyleProps.forEach(p=>u.set(p,null))})):(i.push(OS()),s=[]),i.length)throw RS(i);a.forEach((d,u)=>{d.forEach((p,h)=>{d.set(h,this._driver.computeStyle(u,h,pn))})});let c=s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),l=Rr(c);return this._playersById.set(t,l),l.onDestroy(()=>this.destroy(t)),this.players.push(l),l}destroy(t){let e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);let r=this.players.indexOf(e);r>=0&&this.players.splice(r,1)}_getPlayer(t){let e=this._playersById.get(t);if(!e)throw PS(t);return e}listen(t,e,r,i){let o=tf(e,"","","");return ef(this._getPlayer(t),r,o,i),()=>{}}command(t,e,r,i){if(r=="register"){this.register(t,i[0]);return}if(r=="create"){let s=i[0]||{};this.create(t,e,s);return}let o=this._getPlayer(t);switch(r){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t);break}}},QS="ng-animate-queued",_1=".ng-animate-queued",ay="ng-animate-disabled",C1=".ng-animate-disabled",w1="ng-star-inserted",E1=".ng-star-inserted",S1=[],sD={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},D1={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Pn="__ng_removed",kc=class{namespaceId;value;options;get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;let r=t&&t.hasOwnProperty("value"),i=r?t.value:t;if(this.value=T1(i),r){let o=t,{value:s}=o,a=Nh(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let e=t.params;if(e){let r=this.options.params;Object.keys(e).forEach(i=>{r[i]==null&&(r[i]=e[i])})}}},xc="void",cy=new kc(xc),yy=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(t,e,r){this.id=t,this.hostElement=e,this._engine=r,this._hostClassName="ng-tns-"+t,mn(e,this._hostClassName)}listen(t,e,r,i){if(!this._triggers.has(e))throw NS(r,e);if(r==null||r.length==0)throw FS(e);if(!x1(r))throw LS(r,e);let o=qt(this._elementListeners,t,[]),s={name:e,phase:r,callback:i};o.push(s);let a=qt(this._engine.statesByElement,t,new Map);return a.has(e)||(mn(t,Dc),mn(t,Dc+"-"+e),a.set(e,cy)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return this._triggers.has(t)?!1:(this._triggers.set(t,e),!0)}_getTrigger(t){let e=this._triggers.get(t);if(!e)throw VS(t);return e}trigger(t,e,r,i=!0){let o=this._getTrigger(e),s=new Ac(this.id,e,t),a=this._engine.statesByElement.get(t);a||(mn(t,Dc),mn(t,Dc+"-"+e),this._engine.statesByElement.set(t,a=new Map));let c=a.get(e),l=new kc(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(e,l),c||(c=cy),!(l.value===xc)&&c.value===l.value){if(!A1(c.params,l.params)){let _=[],D=o.matchStyles(c.value,c.params,_),M=o.matchStyles(l.value,l.params,_);_.length?this._engine.reportError(_):this._engine.afterFlush(()=>{di(t,D),Rn(t,M)})}return}let p=qt(this._engine.playersByElement,t,[]);p.forEach(_=>{_.namespaceId==this.id&&_.triggerName==e&&_.queued&&_.destroy()});let h=o.matchTransition(c.value,l.value,t,l.params),v=!1;if(!h){if(!i)return;h=o.fallbackTransition,v=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:c,toState:l,player:s,isFallbackTransition:v}),v||(mn(t,QS),s.onStart(()=>{Ts(t,QS)})),s.onDone(()=>{let _=this.players.indexOf(s);_>=0&&this.players.splice(_,1);let D=this._engine.playersByElement.get(t);if(D){let M=D.indexOf(s);M>=0&&D.splice(M,1)}}),this.players.push(s),p.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,r)=>{this._elementListeners.set(r,e.filter(i=>i.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let e=this._engine.playersByElement.get(t);e&&(e.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){let r=this._engine.driver.query(t,Mc,!0);r.forEach(i=>{if(i[Pn])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(s=>s.triggerLeaveAnimation(i,e,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(t,e,r,i){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){let d=this.trigger(t,l,xc,i);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),r&&Rr(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let e=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(e&&r){let i=new Set;e.forEach(o=>{let s=o.name;if(i.has(s))return;i.add(s);let c=this._triggers.get(s).fallbackTransition,l=r.get(s)||cy,d=new kc(xc),u=new Ac(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:c,fromState:l,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){let r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(r.totalAnimations){let o=r.players.length?r.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else{let s=t;for(;s=s.parentNode;)if(r.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)r.markElementAsRemoved(this.id,t,!1,e);else{let o=t[Pn];(!o||o===sD)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,e))}}insertNode(t,e){mn(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(r=>{let i=r.player;if(i.destroyed)return;let o=r.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==r.triggerName){let c=tf(o,r.triggerName,r.fromState.value,r.toState.value);c._data=t,ef(r.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(r)}),this._queue=[],e.sort((r,i)=>{let o=r.transition.ast.depCount,s=i.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(r.element,i.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},by=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(t,e)=>{};_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,r){this.bodyNode=t,this.driver=e,this._normalizer=r}get queuedPlayers(){let t=[];return this._namespaceList.forEach(e=>{e.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,e){let r=new yy(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(r,e):(this.newHostElements.set(e,r),this.collectEnterElement(e)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,e){let r=this._namespaceList,i=this.namespacesByHostElement;if(r.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){let c=i.get(a);if(c){let l=r.indexOf(c);r.splice(l+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||r.unshift(t)}else r.push(t);return i.set(e,t),t}register(t,e){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,e)),r}registerTrigger(t,e,r){let i=this._namespaceLookup[t];i&&i.register(e,r)&&this.totalAnimations++}destroy(t,e){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let r=this._fetchNamespace(t);this.namespacesByHostElement.delete(r.hostElement);let i=this._namespaceList.indexOf(r);i>=0&&this._namespaceList.splice(i,1),r.destroy(e),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let e=new Set,r=this.statesByElement.get(t);if(r){for(let i of r.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&e.add(o)}}return e}trigger(t,e,r,i){if(df(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,r,i),!0}return!1}insertNode(t,e,r,i){if(!df(e))return;let o=e[Pn];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.insertNode(e,r)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),mn(t,ay)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Ts(t,ay))}removeNode(t,e,r){if(df(e)){let i=t?this._fetchNamespace(t):null;i?i.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r);let o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,r)}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,r,i,o){this.collectedLeaveElements.push(e),e[Pn]={namespaceId:t,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,r,i,o){return df(e)?this._fetchNamespace(t).listen(e,r,i,o):()=>{}}_buildInstruction(t,e,r,i,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,i,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,Mc,!0);e.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(t,of,!0),e.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){let e=this.playersByElement.get(t);e&&e.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){let e=this.playersByQueriedElement.get(t);e&&e.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Rr(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[Pn];if(e&&e.setForRemoval){if(t[Pn]=sD,e.namespaceId){this.destroyInnerAnimations(t);let r=this._fetchNamespace(e.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(ay)&&this.markElementAsDisabled(t,!1),this.driver.query(t,C1,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,i)=>this._balanceNamespaceList(r,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;r<this.collectedEnterElements.length;r++){let i=this.collectedEnterElements[r];mn(i,w1)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let r=[];try{e=this._flushAnimations(r,t)}finally{for(let i=0;i<r.length;i++)r[i]()}}else for(let r=0;r<this.collectedLeaveElements.length;r++){let i=this.collectedLeaveElements[r];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(r=>r()),this._flushFns=[],this._whenQuietFns.length){let r=this._whenQuietFns;this._whenQuietFns=[],e.length?Rr(e).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(t){throw jS(t)}_flushAnimations(t,e){let r=new Ic,i=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(L=>{d.add(L);let W=this.driver.query(L,_1,!0);for(let K=0;K<W.length;K++)d.add(W[K])});let u=this.bodyNode,p=Array.from(this.statesByElement.keys()),h=eD(p,this.collectedEnterElements),v=new Map,_=0;h.forEach((L,W)=>{let K=ny+_++;v.set(W,K),L.forEach(Se=>mn(Se,K))});let D=[],M=new Set,G=new Set;for(let L=0;L<this.collectedLeaveElements.length;L++){let W=this.collectedLeaveElements[L],K=W[Pn];K&&K.setForRemoval&&(D.push(W),M.add(W),K.hasAnimation?this.driver.query(W,E1,!0).forEach(Se=>M.add(Se)):G.add(W))}let Ee=new Map,me=eD(p,Array.from(M));me.forEach((L,W)=>{let K=rf+_++;Ee.set(W,K),L.forEach(Se=>mn(Se,K))}),t.push(()=>{h.forEach((L,W)=>{let K=v.get(W);L.forEach(Se=>Ts(Se,K))}),me.forEach((L,W)=>{let K=Ee.get(W);L.forEach(Se=>Ts(Se,K))}),D.forEach(L=>{this.processLeaveNode(L)})});let bt=[],qe=[];for(let L=this._namespaceList.length-1;L>=0;L--)this._namespaceList[L].drainQueuedTransitions(e).forEach(K=>{let Se=K.player,ut=K.element;if(bt.push(Se),this.collectedEnterElements.length){let _t=ut[Pn];if(_t&&_t.setForMove){if(_t.previousTriggersValues&&_t.previousTriggersValues.has(K.triggerName)){let wi=_t.previousTriggersValues.get(K.triggerName),on=this.statesByElement.get(K.element);if(on&&on.has(K.triggerName)){let al=on.get(K.triggerName);al.value=wi,on.set(K.triggerName,al)}}Se.destroy();return}}let Vn=!u||!this.driver.containsElement(u,ut),Xt=Ee.get(ut),Vr=v.get(ut),$e=this._buildInstruction(K,r,Vr,Xt,Vn);if($e.errors&&$e.errors.length){qe.push($e);return}if(Vn){Se.onStart(()=>di(ut,$e.fromStyles)),Se.onDestroy(()=>Rn(ut,$e.toStyles)),i.push(Se);return}if(K.isFallbackTransition){Se.onStart(()=>di(ut,$e.fromStyles)),Se.onDestroy(()=>Rn(ut,$e.toStyles)),i.push(Se);return}let bb=[];$e.timelines.forEach(_t=>{_t.stretchStartingKeyframe=!0,this.disabledNodes.has(_t.element)||bb.push(_t)}),$e.timelines=bb,r.append(ut,$e.timelines);let hT={instruction:$e,player:Se,element:ut};s.push(hT),$e.queriedElements.forEach(_t=>qt(a,_t,[]).push(Se)),$e.preStyleProps.forEach((_t,wi)=>{if(_t.size){let on=c.get(wi);on||c.set(wi,on=new Set),_t.forEach((al,Ph)=>on.add(Ph))}}),$e.postStyleProps.forEach((_t,wi)=>{let on=l.get(wi);on||l.set(wi,on=new Set),_t.forEach((al,Ph)=>on.add(Ph))})});if(qe.length){let L=[];qe.forEach(W=>{L.push(BS(W.triggerName,W.errors))}),bt.forEach(W=>W.destroy()),this.reportError(L)}let He=new Map,Bt=new Map;s.forEach(L=>{let W=L.element;r.has(W)&&(Bt.set(W,W),this._beforeAnimationBuild(L.player.namespaceId,L.instruction,He))}),i.forEach(L=>{let W=L.element;this._getPreviousPlayers(W,!1,L.namespaceId,L.triggerName,null).forEach(Se=>{qt(He,W,[]).push(Se),Se.destroy()})});let _i=D.filter(L=>tD(L,c,l)),yo=new Map;JS(yo,this.driver,G,l,pn).forEach(L=>{tD(L,c,l)&&_i.push(L)});let Ci=new Map;h.forEach((L,W)=>{JS(Ci,this.driver,new Set(L),c,Ss)}),_i.forEach(L=>{let W=yo.get(L),K=Ci.get(L);yo.set(L,new Map([...W?.entries()??[],...K?.entries()??[]]))});let Rh=[],vb=[],yb={};s.forEach(L=>{let{element:W,player:K,instruction:Se}=L;if(r.has(W)){if(d.has(W)){K.onDestroy(()=>Rn(W,Se.toStyles)),K.disabled=!0,K.overrideTotalTime(Se.totalTime),i.push(K);return}let ut=yb;if(Bt.size>1){let Xt=W,Vr=[];for(;Xt=Xt.parentNode;){let $e=Bt.get(Xt);if($e){ut=$e;break}Vr.push(Xt)}Vr.forEach($e=>Bt.set($e,ut))}let Vn=this._buildAnimation(K.namespaceId,Se,He,o,Ci,yo);if(K.setRealPlayer(Vn),ut===yb)Rh.push(K);else{let Xt=this.playersByElement.get(ut);Xt&&Xt.length&&(K.parentPlayer=Rr(Xt)),i.push(K)}}else di(W,Se.fromStyles),K.onDestroy(()=>Rn(W,Se.toStyles)),vb.push(K),d.has(W)&&i.push(K)}),vb.forEach(L=>{let W=o.get(L.element);if(W&&W.length){let K=Rr(W);L.setRealPlayer(K)}}),i.forEach(L=>{L.parentPlayer?L.syncPlayerEvents(L.parentPlayer):L.destroy()});for(let L=0;L<D.length;L++){let W=D[L],K=W[Pn];if(Ts(W,rf),K&&K.hasAnimation)continue;let Se=[];if(a.size){let Vn=a.get(W);Vn&&Vn.length&&Se.push(...Vn);let Xt=this.driver.query(W,of,!0);for(let Vr=0;Vr<Xt.length;Vr++){let $e=a.get(Xt[Vr]);$e&&$e.length&&Se.push(...$e)}}let ut=Se.filter(Vn=>!Vn.destroyed);ut.length?I1(this,W,ut):this.processLeaveNode(W)}return D.length=0,Rh.forEach(L=>{this.players.push(L),L.onDone(()=>{L.destroy();let W=this.players.indexOf(L);this.players.splice(W,1)}),L.play()}),Rh}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,r,i,o){let s=[];if(e){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let c=!o||o==xc;a.forEach(l=>{l.queued||!c&&l.triggerName!=i||s.push(l)})}}return(r||i)&&(s=s.filter(a=>!(r&&r!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(t,e,r){let i=e.triggerName,o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:i;for(let c of e.timelines){let l=c.element,d=l!==o,u=qt(r,l,[]);this._getPreviousPlayers(l,d,s,a,e.toState).forEach(h=>{let v=h.getRealPlayer();v.beforeDestroy&&v.beforeDestroy(),h.destroy(),u.push(h)})}di(o,e.fromStyles)}_buildAnimation(t,e,r,i,o,s){let a=e.triggerName,c=e.element,l=[],d=new Set,u=new Set,p=e.timelines.map(v=>{let _=v.element;d.add(_);let D=_[Pn];if(D&&D.removedBeforeQueried)return new sr(v.duration,v.delay);let M=_!==c,G=k1((r.get(_)||S1).map(He=>He.getRealPlayer())).filter(He=>{let Bt=He;return Bt.element?Bt.element===_:!1}),Ee=o.get(_),me=s.get(_),bt=Qv(this._normalizer,v.keyframes,Ee,me),qe=this._buildPlayer(v,bt,G);if(v.subTimeline&&i&&u.add(_),M){let He=new Ac(t,a,_);He.setRealPlayer(qe),l.push(He)}return qe});l.forEach(v=>{qt(this.playersByQueriedElement,v.element,[]).push(v),v.onDone(()=>M1(this.playersByQueriedElement,v.element,v))}),d.forEach(v=>mn(v,ry));let h=Rr(p);return h.onDestroy(()=>{d.forEach(v=>Ts(v,ry)),Rn(c,e.toStyles)}),u.forEach(v=>{qt(i,v,[]).push(h)}),h}_buildPlayer(t,e,r){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,r):new sr(t.duration,t.delay)}},Ac=class{namespaceId;triggerName;element;_player=new sr;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(t,e,r){this.namespaceId=t,this.triggerName=e,this.element=r}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,r)=>{e.forEach(i=>ef(t,r,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){qt(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let e=this._player;e.triggerCallback&&e.triggerCallback(t)}};function M1(n,t,e){let r=n.get(t);if(r){if(r.length){let i=r.indexOf(e);r.splice(i,1)}r.length==0&&n.delete(t)}return r}function T1(n){return n??null}function df(n){return n&&n.nodeType===1}function x1(n){return n=="start"||n=="done"}function XS(n,t){let e=n.style.display;return n.style.display=t??"none",e}function JS(n,t,e,r,i){let o=[];e.forEach(c=>o.push(XS(c)));let s=[];r.forEach((c,l)=>{let d=new Map;c.forEach(u=>{let p=t.computeStyle(l,u,i);d.set(u,p),(!p||p.length==0)&&(l[Pn]=D1,s.push(l))}),n.set(l,d)});let a=0;return e.forEach(c=>XS(c,o[a++])),s}function eD(n,t){let e=new Map;if(n.forEach(a=>e.set(a,[])),t.length==0)return e;let r=1,i=new Set(t),o=new Map;function s(a){if(!a)return r;let c=o.get(a);if(c)return c;let l=a.parentNode;return e.has(l)?c=l:i.has(l)?c=r:c=s(l),o.set(a,c),c}return t.forEach(a=>{let c=s(a);c!==r&&e.get(c).push(a)}),e}function mn(n,t){n.classList?.add(t)}function Ts(n,t){n.classList?.remove(t)}function I1(n,t,e){Rr(e).onDone(()=>n.processLeaveNode(t))}function k1(n){let t=[];return aD(n,t),t}function aD(n,t){for(let e=0;e<n.length;e++){let r=n[e];r instanceof no?aD(r.players,t):t.push(r)}}function A1(n,t){let e=Object.keys(n),r=Object.keys(t);if(e.length!=r.length)return!1;for(let i=0;i<e.length;i++){let o=e[i];if(!t.hasOwnProperty(o)||n[o]!==t[o])return!1}return!0}function tD(n,t,e){let r=e.get(n);if(!r)return!1;let i=t.get(n);return i?r.forEach(o=>i.add(o)):t.set(n,r),e.delete(n),!0}var xs=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(t,e)=>{};constructor(t,e,r){this._driver=e,this._normalizer=r,this._transitionEngine=new by(t.body,e,r),this._timelineEngine=new vy(t.body,e,r),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(t,e,r,i,o){let s=t+"-"+i,a=this._triggerCache[s];if(!a){let c=[],l=[],d=rD(this._driver,o,c,l);if(c.length)throw kS(i,c);a=v1(i,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,i,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,r,i){this._transitionEngine.insertNode(t,e,r,i)}onRemove(t,e,r){this._transitionEngine.removeNode(t,e,r)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,r,i){if(r.charAt(0)=="@"){let[o,s]=Xv(r),a=i;this._timelineEngine.command(o,e,s,a)}else this._transitionEngine.trigger(t,e,r,i)}listen(t,e,r,i,o){if(r.charAt(0)=="@"){let[s,a]=Xv(r);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,r,i,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function O1(n,t){let e=null,r=null;return Array.isArray(t)&&t.length?(e=ly(t[0]),t.length>1&&(r=ly(t[t.length-1]))):t instanceof Map&&(e=ly(t)),e||r?new R1(n,e,r):null}var R1=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,r,i){this._element=e,this._startStyles=r,this._endStyles=i;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rn(this._element,this._initialStyles),this._endStyles&&(Rn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(di(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(di(this._element,this._endStyles),this._endStyles=null),Rn(this._element,this._initialStyles),this._state=3)}}return n})();function ly(n){let t=null;return n.forEach((e,r)=>{P1(r)&&(t=t||new Map,t.set(r,e))}),t}function P1(n){return n==="display"||n==="position"}var vf=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(t,e,r,i){this.element=t,this.keyframes=e,this.options=r,this._specialStyles=i,this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let e=[];return t.forEach(r=>{e.push(Object.fromEntries(r))}),e}_triggerWebAnimation(t,e,r){return t.animate(this._convertKeyframesToObject(e),r)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,i)=>{i!=="offset"&&t.set(i,this._finished?r:af(this.element,i))}),this.currentSnapshot=t}triggerCallback(t){let e=t==="start"?this._onStartFns:this._onDoneFns;e.forEach(r=>r()),e.length=0}},yf=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,e){return Jv(t,e)}getParentElement(t){return nf(t)}query(t,e,r){return ey(t,e,r)}computeStyle(t,e,r){return af(t,e)}animate(t,e,r,i,o,s=[]){let a=i==0?"both":"forwards",c={duration:r,delay:i,fill:a};o&&(c.easing=o);let l=new Map,d=s.filter(h=>h instanceof vf);zS(r,i)&&d.forEach(h=>{h.currentSnapshot.forEach((v,_)=>l.set(_,v))});let u=HS(e).map(h=>new Map(h));u=WS(t,u,l);let p=O1(t,u);return new vf(t,u,c,p)}};var uf="@",cD="@.disabled",bf=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(t,e,r,i){this.namespaceId=t,this.delegate=e,this.engine=r,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,r,i=!0){this.delegate.insertBefore(t,e,r),this.engine.onInsert(this.namespaceId,e,t,i)}removeChild(t,e,r,i){if(i){this.delegate.removeChild(t,e,r);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,r,i){this.delegate.setAttribute(t,e,r,i)}removeAttribute(t,e,r){this.delegate.removeAttribute(t,e,r)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,r,i){this.delegate.setStyle(t,e,r,i)}removeStyle(t,e,r){this.delegate.removeStyle(t,e,r)}setProperty(t,e,r){e.charAt(0)==uf&&e==cD?this.disableAnimations(t,!!r):this.delegate.setProperty(t,e,r)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,r,i){return this.delegate.listen(t,e,r,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}},_y=class extends bf{factory;constructor(t,e,r,i,o){super(e,r,i,o),this.factory=t,this.namespaceId=e}setProperty(t,e,r){e.charAt(0)==uf?e.charAt(1)=="."&&e==cD?(r=r===void 0?!0:!!r,this.disableAnimations(t,r)):this.engine.process(this.namespaceId,t,e.slice(1),r):this.delegate.setProperty(t,e,r)}listen(t,e,r,i){if(e.charAt(0)==uf){let o=N1(t),s=e.slice(1),a="";return s.charAt(0)!=uf&&([s,a]=F1(s)),this.engine.listen(this.namespaceId,o,s,a,c=>{let l=c._data||-1;this.factory.scheduleListenerCallback(l,r,c)})}return this.delegate.listen(t,e,r,i)}};function N1(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function F1(n){let t=n.indexOf("."),e=n.substring(0,t),r=n.slice(t+1);return[e,r]}var _f=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(t,e,r){this.delegate=t,this.engine=e,this._zone=r,e.onRemovalComplete=(i,o)=>{o?.removeChild(null,i)}}createRenderer(t,e){let i=this.delegate.createRenderer(t,e);if(!t||!e?.data?.animation){let l=this._rendererCache,d=l.get(i);if(!d){let u=()=>l.delete(i);d=new bf("",i,this.engine,u),l.set(i,d)}return d}let o=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,t,l.name,l)};return e.data.animation.forEach(a),new _y(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,r){if(t>=0&&t<this._microtaskId){this._zone.run(()=>e(r));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([e,r])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(t){this.engine.flush(),this.delegate.componentReplaced?.(t)}};var V1=(()=>{class n extends xs{constructor(e,r,i){super(e,r,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(r){return new(r||n)(N(z),N(oo),N(so))};static \u0275prov=C({token:n,factory:n.\u0275fac})}return n})();function j1(){return new ff}function B1(n,t,e){return new _f(n,t,e)}var lD=[{provide:so,useFactory:j1},{provide:xs,useClass:V1},{provide:et,useFactory:B1,deps:[nc,xs,$]}],nQ=[{provide:oo,useClass:Cy},{provide:ii,useValue:"NoopAnimations"},...lD],U1=[{provide:oo,useFactory:()=>new yf},{provide:ii,useFactory:()=>"BrowserAnimations"},...lD];function dD(){return en("NgEagerAnimations"),[...U1]}function Oc(n){return n.buttons===0||n.detail===0}function Rc(n){let t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var Ey;function uD(){if(Ey==null){let n=typeof document<"u"?document.head:null;Ey=!!(n&&(n.createShadowRoot||n.attachShadow))}return Ey}function Sy(n){if(uD()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Zt(n){return n.composedPath?n.composedPath()[0]:n.target}var Dy;try{Dy=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Dy=!1}var je=(()=>{class n{_platformId=f(ri);isBrowser=this._platformId?Hw(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Dy)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Pc;function fD(){if(Pc==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Pc=!0}))}finally{Pc=Pc||!1}return Pc}function Is(n){return fD()?n:!!n.capture}function Nc(n,t=0){return hD(n)?Number(n):arguments.length===2?t:0}function hD(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function cr(n){return n instanceof ue?n.nativeElement:n}var pD=new T("cdk-input-modality-detector-options"),mD={ignoreKeys:[18,17,224,91,16]},gD=650,My={passive:!0,capture:!0},vD=(()=>{class n{_platform=f(je);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Z(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(r=>r===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Zt(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<gD||(this._modality.next(Oc(e)?"keyboard":"mouse"),this._mostRecentTarget=Zt(e))};_onTouchstart=e=>{if(Rc(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Zt(e)};constructor(){let e=f($),r=f(z),i=f(pD,{optional:!0});if(this._options=E(E({},mD),i),this.modalityDetected=this._modality.pipe(ma(1)),this.modalityChanged=this.modalityDetected.pipe(Gl()),this._platform.isBrowser){let o=f(et).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[o.listen(r,"keydown",this._onKeydown,My),o.listen(r,"mousedown",this._onMousedown,My),o.listen(r,"touchstart",this._onTouchstart,My)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Fc=(function(n){return n[n.IMMEDIATE=0]="IMMEDIATE",n[n.EVENTUAL=1]="EVENTUAL",n})(Fc||{}),yD=new T("cdk-focus-monitor-default-options"),Cf=Is({passive:!0,capture:!0}),Lc=(()=>{class n{_ngZone=f($);_platform=f(je);_inputModalityDetector=f(vD);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=f(z);_stopInputModalityDetector=new A;constructor(){let e=f(yD,{optional:!0});this._detectionMode=e?.detectionMode||Fc.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let r=Zt(e);for(let i=r;i;i=i.parentElement)e.type==="focus"?this._onFocus(e,i):this._onBlur(e,i)};monitor(e,r=!1){let i=cr(e);if(!this._platform.isBrowser||i.nodeType!==1)return P();let o=Sy(i)||this._document,s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new A,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let r=cr(e),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(e,r,i){let o=cr(e),s=this._document.activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,c])=>this._originChanged(a,r,c)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((e,r)=>this.stopMonitoring(r))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Fc.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,r){e.classList.toggle("cdk-focused",!!r),e.classList.toggle("cdk-touch-focused",r==="touch"),e.classList.toggle("cdk-keyboard-focused",r==="keyboard"),e.classList.toggle("cdk-mouse-focused",r==="mouse"),e.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(e,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&r,this._detectionMode===Fc.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?gD:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(e,r){let i=this._elementInfo.get(r),o=Zt(e);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(e,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&e.relatedTarget instanceof Node&&r.contains(e.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(e,r){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(r))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let r=e.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Cf),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Cf)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(F(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let r=e.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Cf),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Cf),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,r,i){this._setClasses(e,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(e){let r=[];return this._elementInfo.forEach((i,o)=>{(o===e||i.checkChildren&&o.contains(e))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let o=e.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var wf=new WeakMap,lr=(()=>{class n{_appRef;_injector=f(ce);_environmentInjector=f(Fe);load(e){let r=this._appRef=this._appRef||this._injector.get(Ft),i=wf.get(r);i||(i={loaders:new Set,refs:[]},wf.set(r,i),r.onDestroy(()=>{wf.get(r)?.refs.forEach(o=>o.destroy()),wf.delete(r)})),i.loaders.has(e)||(i.loaders.add(e),i.refs.push(fu(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var bD=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
6
+ `],encapsulation:2,changeDetection:0})}return n})();function ks(n){return Array.isArray(n)?n:[n]}var _D=new Set,ao,Ef=(()=>{class n{_platform=f(je);_nonce=f(Jo,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):$1}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&H1(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function H1(n,t){if(!_D.has(n))try{ao||(ao=document.createElement("style"),t&&ao.setAttribute("nonce",t),ao.setAttribute("type","text/css"),document.head.appendChild(ao)),ao.sheet&&(ao.sheet.insertRule(`@media ${n} {body{ }}`,0),_D.add(n))}catch(e){console.error(e)}}function $1(n){return{matches:n==="all"||n==="",media:n,addListener:()=>{},removeListener:()=>{}}}var Vc=(()=>{class n{_mediaMatcher=f(Ef);_zone=f($);_queries=new Map;_destroySubject=new A;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return CD(ks(e)).some(i=>this._registerQuery(i).mql.matches)}observe(e){let i=CD(ks(e)).map(s=>this._registerQuery(s).observable),o=gr(i);return o=Ur(o.pipe(It(1)),o.pipe(ma(1),pa(0))),o.pipe(V(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:c,query:l})=>{a.matches=a.matches||c,a.breakpoints[l]=c}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let r=this._mediaMatcher.matchMedia(e),o={observable:new te(s=>{let a=c=>this._zone.run(()=>s.next(c));return r.addListener(a),()=>{r.removeListener(a)}}).pipe(br(r),V(({matches:s})=>({query:e,matches:s})),F(this._destroySubject)),mql:r};return this._queries.set(e,o),o}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function CD(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}var Df=(()=>{class n{_platform=f(je);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return W1(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let r=z1(J1(e));if(r&&(wD(r)===-1||!this.isVisible(r)))return!1;let i=e.nodeName.toLowerCase(),o=wD(e);return e.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Q1(e)?!1:i==="audio"?e.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,r){return X1(e)&&!this.isDisabled(e)&&(r?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function z1(n){try{return n.frameElement}catch{return null}}function W1(n){return!!(n.offsetWidth||n.offsetHeight||typeof n.getClientRects=="function"&&n.getClientRects().length)}function G1(n){let t=n.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function q1(n){return Z1(n)&&n.type=="hidden"}function Y1(n){return K1(n)&&n.hasAttribute("href")}function Z1(n){return n.nodeName.toLowerCase()=="input"}function K1(n){return n.nodeName.toLowerCase()=="a"}function DD(n){if(!n.hasAttribute("tabindex")||n.tabIndex===void 0)return!1;let t=n.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function wD(n){if(!DD(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function Q1(n){let t=n.nodeName.toLowerCase(),e=t==="input"&&n.type;return e==="text"||e==="password"||t==="select"||t==="textarea"}function X1(n){return q1(n)?!1:G1(n)||Y1(n)||n.hasAttribute("contenteditable")||DD(n)}function J1(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}var Sf=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_enabled=!0;constructor(t,e,r,i,o=!1,s){this._element=t,this._checker=e,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let r=this._getFirstTabbableElement(e);return r?.focus(t),!!r}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let r=0;r<e.length;r++){let i=e[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[r]):null;if(i)return i}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let r=e.length-1;r>=0;r--){let i=e[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[r]):null;if(i)return i}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?vt(t,{injector:this._injector}):setTimeout(t)}},xy=(()=>{class n{_checker=f(Df);_ngZone=f($);_document=f(z);_injector=f(ce);constructor(){f(lr).load(bD)}create(e,r=!1){return new Sf(e,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var MD=new T("liveAnnouncerElement",{providedIn:"root",factory:TD});function TD(){return null}var xD=new T("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),eF=0,Iy=(()=>{class n{_ngZone=f($);_defaultOptions=f(xD,{optional:!0});_liveElement;_document=f(z);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=f(MD,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...r){let i=this._defaultOptions,o,s;return r.length===1&&typeof r[0]=="number"?s=r[0]:[o,s]=r,this.clear(),clearTimeout(this._previousTimeout),o||(o=i&&i.politeness?i.politeness:"polite"),s==null&&i&&(s=i.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",r=this._document.getElementsByClassName(e),i=this._document.createElement("div");for(let o=0;o<r.length;o++)r[o].remove();return i.classList.add(e),i.classList.add("cdk-visually-hidden"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-live","polite"),i.id=`cdk-live-announcer-${eF++}`,this._document.body.appendChild(i),i}_exposeAnnouncerToModals(e){let r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let i=0;i<r.length;i++){let o=r[i],s=o.getAttribute("aria-owns");s?s.indexOf(e)===-1&&o.setAttribute("aria-owns",s+" "+e):o.setAttribute("aria-owns",e)}}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ui=(function(n){return n[n.NONE=0]="NONE",n[n.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",n[n.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",n})(ui||{}),ED="cdk-high-contrast-black-on-white",SD="cdk-high-contrast-white-on-black",Ty="cdk-high-contrast-active",ky=(()=>{class n{_platform=f(je);_hasCheckedHighContrastMode;_document=f(z);_breakpointSubscription;constructor(){this._breakpointSubscription=f(Vc).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return ui.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let r=this._document.defaultView||window,i=r&&r.getComputedStyle?r.getComputedStyle(e):null,o=(i&&i.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return ui.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return ui.BLACK_ON_WHITE}return ui.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Ty,ED,SD),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===ui.BLACK_ON_WHITE?e.add(Ty,ED):r===ui.WHITE_ON_BLACK&&e.add(Ty,SD)}}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ay={},jc=(()=>{class n{_appId=f(Xo);getId(e){return this._appId!=="ng"&&(e+=this._appId),Ay.hasOwnProperty(e)||(Ay[e]=0),`${e}${Ay[e]++}`}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ID(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}var Nn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(Nn||{}),Mf,co;function Tf(){if(co==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return co=!1,co;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)co=!0;else{let n=Element.prototype.scrollTo;n?co=!/\{\s*\[native code\]\s*\}/.test(n.toString()):co=!1}}return co}function As(){if(typeof document!="object"||!document)return Nn.NORMAL;if(Mf==null){let n=document.createElement("div"),t=n.style;n.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),r=e.style;r.width="2px",r.height="1px",n.appendChild(e),document.body.appendChild(n),Mf=Nn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,Mf=n.scrollLeft===0?Nn.NEGATED:Nn.INVERTED),n.remove()}return Mf}function Oy(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var kD={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var tF=new T("MATERIAL_ANIMATIONS");var AD=null;function nF(){return f(tF,{optional:!0})?.animationsDisabled||f(ii,{optional:!0})==="NoopAnimations"?"di-disabled":(AD??=f(Ef).matchMedia("(prefers-reduced-motion)").matches,AD?"reduced-motion":"enabled")}function Pr(){return nF()!=="enabled"}function Xe(n){return n==null?"":typeof n=="string"?n:`${n}px`}function lo(n){return n!=null&&`${n}`!="false"}var gn=(function(n){return n[n.FADING_IN=0]="FADING_IN",n[n.VISIBLE=1]="VISIBLE",n[n.FADING_OUT=2]="FADING_OUT",n[n.HIDDEN=3]="HIDDEN",n})(gn||{}),Ry=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=gn.HIDDEN;constructor(t,e,r,i=!1){this._renderer=t,this.element=e,this.config=r,this._animationForciblyDisabledThroughCss=i}fadeOut(){this._renderer.fadeOutRipple(this)}},OD=Is({passive:!0,capture:!0}),Py=class{_events=new Map;addHandler(t,e,r,i){let o=this._events.get(e);if(o){let s=o.get(r);s?s.add(i):o.set(r,new Set([i]))}else this._events.set(e,new Map([[r,new Set([i])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,OD)})}removeHandler(t,e,r){let i=this._events.get(t);if(!i)return;let o=i.get(e);o&&(o.delete(r),o.size===0&&i.delete(e),i.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,OD)))}_delegateEventHandler=t=>{let e=Zt(t);e&&this._events.get(t.type)?.forEach((r,i)=>{(i===e||i.contains(e))&&r.forEach(o=>o.handleEvent(t))})}},Bc={enterDuration:225,exitDuration:150},rF=800,RD=Is({passive:!0,capture:!0}),PD=["mousedown","touchstart"],ND=["mouseup","mouseleave","touchend","touchcancel"],iF=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}
7
+ `],encapsulation:2,changeDetection:0})}return n})(),xf=class n{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new Py;constructor(t,e,r,i,o){this._target=t,this._ngZone=e,this._platform=i,i.isBrowser&&(this._containerElement=cr(r)),o&&o.get(lr).load(iF)}fadeInRipple(t,e,r={}){let i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=E(E({},Bc),r.animation);r.centered&&(t=i.left+i.width/2,e=i.top+i.height/2);let s=r.radius||oF(t,e,i),a=t-i.left,c=e-i.top,l=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${c-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,r.color!=null&&(d.style.backgroundColor=r.color),d.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),p=u.transitionProperty,h=u.transitionDuration,v=p==="none"||h==="0s"||h==="0s, 0s"||i.width===0&&i.height===0,_=new Ry(this,d,r,v);d.style.transform="scale3d(1, 1, 1)",_.state=gn.FADING_IN,r.persistent||(this._mostRecentTransientRipple=_);let D=null;return!v&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let M=()=>{D&&(D.fallbackTimer=null),clearTimeout(Ee),this._finishRippleTransition(_)},G=()=>this._destroyRipple(_),Ee=setTimeout(G,l+100);d.addEventListener("transitionend",M),d.addEventListener("transitioncancel",G),D={onTransitionEnd:M,onTransitionCancel:G,fallbackTimer:Ee}}),this._activeRipples.set(_,D),(v||!l)&&this._finishRippleTransition(_),_}fadeOutRipple(t){if(t.state===gn.FADING_OUT||t.state===gn.HIDDEN)return;let e=t.element,r=E(E({},Bc),t.config.animation);e.style.transitionDuration=`${r.exitDuration}ms`,e.style.opacity="0",t.state=gn.FADING_OUT,(t._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=cr(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,PD.forEach(r=>{n._eventManager.addHandler(this._ngZone,r,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{ND.forEach(e=>{this._triggerElement.addEventListener(e,this,RD)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===gn.FADING_IN?this._startFadeOutTransition(t):t.state===gn.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:r}=t.config;t.state=gn.VISIBLE,!r&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=gn.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),t.element.remove()}_onMousedown(t){let e=Oc(t),r=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+rF;!this._target.rippleDisabled&&!e&&!r&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Rc(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let r=0;r<e.length;r++)this.fadeInRipple(e[r].clientX,e[r].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===gn.VISIBLE||t.config.terminateOnPointerUp&&t.state===gn.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(PD.forEach(e=>n._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(ND.forEach(e=>t.removeEventListener(e,this,RD)),this._pointerUpEventsRegistered=!1))}};function oF(n,t,e){let r=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),i=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(r*r+i*i)}var FD=new T("mat-ripple-global-options");var sF={capture:!0},aF=["focus","mousedown","mouseenter","touchstart"],Ny="mat-ripple-loader-uninitialized",Fy="mat-ripple-loader-class-name",LD="mat-ripple-loader-centered",If="mat-ripple-loader-disabled",VD=(()=>{class n{_document=f(z);_animationsDisabled=Pr();_globalRippleOptions=f(FD,{optional:!0});_platform=f(je);_ngZone=f($);_injector=f(ce);_eventCleanups;_hosts=new Map;constructor(){let e=f(et).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>aF.map(r=>e.listen(this._document,r,this._onInteraction,sF)))}ngOnDestroy(){let e=this._hosts.keys();for(let r of e)this.destroyRipple(r);this._eventCleanups.forEach(r=>r())}configureRipple(e,r){e.setAttribute(Ny,this._globalRippleOptions?.namespace??""),(r.className||!e.hasAttribute(Fy))&&e.setAttribute(Fy,r.className||""),r.centered&&e.setAttribute(LD,""),r.disabled&&e.setAttribute(If,"")}setDisabled(e,r){let i=this._hosts.get(e);i?(i.target.rippleDisabled=r,!r&&!i.hasSetUpEvents&&(i.hasSetUpEvents=!0,i.renderer.setupTriggerEvents(e))):r?e.setAttribute(If,""):e.removeAttribute(If)}_onInteraction=e=>{let r=Zt(e);if(r instanceof HTMLElement){let i=r.closest(`[${Ny}="${this._globalRippleOptions?.namespace??""}"]`);i&&this._createRipple(i)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let r=this._document.createElement("span");r.classList.add("mat-ripple",e.getAttribute(Fy)),e.append(r);let i=this._globalRippleOptions,o=this._animationsDisabled?0:i?.animation?.enterDuration??Bc.enterDuration,s=this._animationsDisabled?0:i?.animation?.exitDuration??Bc.exitDuration,a={rippleDisabled:this._animationsDisabled||i?.disabled||e.hasAttribute(If),rippleConfig:{centered:e.hasAttribute(LD),terminateOnPointerUp:i?.terminateOnPointerUp,animation:{enterDuration:o,exitDuration:s}}},c=new xf(a,this._ngZone,r,this._platform,this._injector),l=!a.rippleDisabled;l&&c.setupTriggerEvents(e),this._hosts.set(e,{target:a,renderer:c,hasSetUpEvents:l}),e.removeAttribute(Ny)}destroyRipple(e){let r=this._hosts.get(e);r&&(r.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var jD=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["structural-styles"]],decls:0,vars:0,template:function(r,i){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}
8
+ `],encapsulation:2,changeDetection:0})}return n})();var cF=["mat-icon-button",""],lF=["*"],dF=new T("MAT_BUTTON_CONFIG");function BD(n){return n==null?void 0:Zg(n)}var Ly=(()=>{class n{_elementRef=f(ue);_ngZone=f($);_animationsDisabled=Pr();_config=f(dF,{optional:!0});_focusMonitor=f(Lc);_cleanupClick;_renderer=f(it);_rippleLoader=f(VD);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){f(lr).load(jD);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",r){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(r,i){r&2&&(We("disabled",i._getDisabledAttribute())("aria-disabled",i._getAriaDisabled())("tabindex",i._getTabIndex()),qa(i.color?"mat-"+i.color:""),le("mat-mdc-button-disabled",i.disabled)("mat-mdc-button-disabled-interactive",i.disabledInteractive)("mat-unthemed",!i.color)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",Lt],disabled:[2,"disabled","disabled",Lt],ariaDisabled:[2,"aria-disabled","ariaDisabled",Lt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Lt],tabIndex:[2,"tabIndex","tabIndex",BD],_tabindex:[2,"tabindex","_tabindex",BD]}})}return n})(),Nr=(()=>{class n extends Ly{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[Ne],attrs:cF,ngContentSelectors:lF,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,i){r&1&&(yt(),In(0,"span",0),Ge(1),In(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}
9
+ `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}}
10
+ `],encapsulation:2,changeDetection:0})}return n})();var uF=new T("cdk-dir-doc",{providedIn:"root",factory:fF});function fF(){return f(z)}var hF=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function UD(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?hF.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var uo=(()=>{class n{get value(){return this.valueSignal()}valueSignal=Nt("ltr");change=new U;constructor(){let e=f(uF,{optional:!0});if(e){let r=e.body?e.body.dir:null,i=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(UD(r||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var fi=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})();var pt=(()=>{class n{constructor(){f(ky)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[fi,fi]})}return n})();var HD=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[pt,pt]})}return n})();var pF=["matButton",""],mF=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],gF=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var $D=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),zD=(()=>{class n extends Ly{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=vF(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let r=this._elementRef.nativeElement.classList,i=this._appearance?$D.get(this._appearance):null,o=$D.get(e);i&&r.remove(...i),r.add(...o),this._appearance=e}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[Ne],attrs:pF,ngContentSelectors:gF,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,i){r&1&&(yt(mF),In(0,"span",0),Ge(1),he(2,"span",1),Ge(3,1),pe(),Ge(4,2),In(5,"span",2)(6,"span",3)),r&2&&le("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus>.mat-focus-indicator::before,.mat-mdc-raised-button:focus>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus>.mat-focus-indicator::before,.mat-tonal-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}
11
+ `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}}
12
+ `],encapsulation:2,changeDetection:0})}return n})();function vF(n){return n.hasAttribute("mat-raised-button")?"elevated":n.hasAttribute("mat-stroked-button")?"outlined":n.hasAttribute("mat-flat-button")?"filled":n.hasAttribute("mat-button")?"text":null}var Os=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[pt,HD,pt]})}return n})();var Uc=class{_attachedHost;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},Rs=class extends Uc{component;viewContainerRef;injector;projectableNodes;constructor(t,e,r,i){super(),this.component=t,this.viewContainerRef=e,this.injector=r,this.projectableNodes=i}},Ps=class extends Uc{templateRef;viewContainerRef;context;injector;constructor(t,e,r,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},Vy=class extends Uc{element;constructor(t){super(),this.element=t instanceof ue?t.nativeElement:t}},Ns=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Rs)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof Ps)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof Vy)return this._attachedPortal=t,this.attachDomPortal(t)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},kf=class extends Ns{outletElement;_appRef;_defaultInjector;constructor(t,e,r){super(),this.outletElement=t,this._appRef=e,this._defaultInjector=r}attachComponentPortal(t){let e;if(t.viewContainerRef){let r=t.injector||t.viewContainerRef.injector,i=r.get(Xn,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let r=this._appRef,i=t.injector||this._defaultInjector||ce.NULL,o=i.get(Fe,r.injector);e=fu(t.component,{elementInjector:i,environmentInjector:o,projectableNodes:t.projectableNodes||void 0}),r.attachView(e.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,r=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=e.indexOf(r);i!==-1&&e.remove(i)}),this._attachedPortal=t,r}attachDomPortal=t=>{let e=t.element;e.parentNode;let r=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(r,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(e,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var jy=(()=>{class n extends Ns{_moduleRef=f(Xn,{optional:!0});_document=f(z);_viewContainerRef=f(xn);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new U;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let r=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,i=r.createComponent(e.component,{index:r.length,injector:e.injector||r.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(e){e.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=e=>{let r=e.element;r.parentNode;let i=this._document.createComment("dom-portal");e.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=e,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ne]})}return n})();var Af=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})();var yF=20,Fs=(()=>{class n{_ngZone=f($);_platform=f(je);_renderer=f(et).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new A;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let r=this.scrollContainers.get(e);r&&(r.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=yF){return this._platform.isBrowser?new te(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=e>0?this._scrolled.pipe(zl(e)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):P()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(e,r){let i=this.getAncestorScrollContainers(e);return this.scrolled(r).pipe(Pe(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(e){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,e)&&r.push(o)}),r}_scrollableContainsElement(e,r){let i=cr(r),o=e.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ls=(()=>{class n{elementRef=f(ue);scrollDispatcher=f(Fs);ngZone=f($);dir=f(uo,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new A;_renderer=f(it);_cleanupScroll;_elementScrolled=new A;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let r=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=i?e.end:e.start),e.right==null&&(e.right=i?e.start:e.end),e.bottom!=null&&(e.top=r.scrollHeight-r.clientHeight-e.bottom),i&&As()!=Nn.NORMAL?(e.left!=null&&(e.right=r.scrollWidth-r.clientWidth-e.left),As()==Nn.INVERTED?e.left=e.right:As()==Nn.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=r.scrollWidth-r.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let r=this.elementRef.nativeElement;Tf()?r.scrollTo(e):(e.top!=null&&(r.scrollTop=e.top),e.left!=null&&(r.scrollLeft=e.left))}measureScrollOffset(e){let r="left",i="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?i:r:e=="end"&&(e=s?r:i),s&&As()==Nn.INVERTED?e==r?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&As()==Nn.NEGATED?e==r?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==r?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),bF=20,fo=(()=>{class n{_platform=f(je);_listeners;_viewportSize;_change=new A;_document=f(z);constructor(){let e=f($),r=f(et).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,r=this._getWindow(),i=e.documentElement,o=i.getBoundingClientRect(),s=-o.top||e.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||e.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(e=bF){return e>0?this._change.pipe(zl(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Hc=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})(),By=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[fi,Hc,fi,Hc]})}return n})();var GD=Tf();function JD(n){return new Of(n.get(fo),n.get(z))}var Of=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,e){this._viewportRuler=t,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Xe(-this._previousScrollPosition.left),t.style.top=Xe(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,r=t.style,i=e.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),GD&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),GD&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,r=this._viewportRuler.getViewportSize();return e.scrollHeight>r.height||e.scrollWidth>r.width}};function eM(n,t){return new Rf(n.get(Fs),n.get($),n.get(fo),t)}var Rf=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,r,i){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=r,this._config=i}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(Pe(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var $c=class{enable(){}disable(){}attach(){}};function Uy(n,t){return t.some(e=>{let r=n.bottom<e.top,i=n.top>e.bottom,o=n.right<e.left,s=n.left>e.right;return r||i||o||s})}function qD(n,t){return t.some(e=>{let r=n.top<e.top,i=n.bottom>e.bottom,o=n.left<e.left,s=n.right>e.right;return r||i||o||s})}function jf(n,t){return new Pf(n.get(Fs),n.get(fo),n.get($),t)}var Pf=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,r,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=r,this._config=i}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Uy(e,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},tM=(()=>{class n{_injector=f(ce);constructor(){}noop=()=>new $c;close=e=>eM(this._injector,e);block=()=>JD(this._injector);reposition=e=>jf(this._injector,e);static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Vs=class{positionStrategy;scrollStrategy=new $c;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(t){if(t){let e=Object.keys(t);for(let r of e)t[r]!==void 0&&(this[r]=t[r])}}};var Nf=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var nM=(()=>{class n{_attachedOverlays=[];_document=f(z);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let r=this._attachedOverlays.indexOf(e);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),rM=(()=>{class n extends nM{_ngZone=f($);_renderer=f(et).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),iM=(()=>{class n extends nM{_platform=f(je);_ngZone=f($);_renderer=f(et).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let r=this._document.body,i={capture:!0},o=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[o.listen(r,"pointerdown",this._pointerDownListener,i),o.listen(r,"click",this._clickListener,i),o.listen(r,"auxclick",this._clickListener,i),o.listen(r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=Zt(e)};_clickListener=e=>{let r=Zt(e),i=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(YD(a.overlayElement,r)||YD(a.overlayElement,i))break;let c=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>c.next(e)):c.next(e)}};static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function YD(n,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===n)return!0;r=e&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var oM=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
13
+ `],encapsulation:2,changeDetection:0})}return n})(),sM=(()=>{class n{_platform=f(je);_containerElement;_document=f(z);_styleLoader=f(lr);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Oy()){let i=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(e),Oy()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(oM)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Hy=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,r,i){this._renderer=e,this._ngZone=r,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let t=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ff=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new A;_attachments=new A;_detachments=new A;_positionStrategy;_scrollStrategy;_locationChanges=Re.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new A;_outsidePointerEvents=new A;_afterNextRenderRef;constructor(t,e,r,i,o,s,a,c,l,d=!1,u,p){this._portalOutlet=t,this._host=e,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=l,this._animationsDisabled=d,this._injector=u,this._renderer=p,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=vt(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,t&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=E(E({},this._config),t),this._updateElementSize()}setDirection(t){this._config=X(E({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=Xe(this._config.width),t.height=Xe(this._config.height),t.minWidth=Xe(this._config.minWidth),t.minHeight=Xe(this._config.minHeight),t.maxWidth=Xe(this._config.maxWidth),t.maxHeight=Xe(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Hy(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(t))}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(t,e,r){let i=ks(e||[]).filter(o=>!!o);i.length&&(r?t.classList.add(...i):t.classList.remove(...i))}_detachContentWhenEmpty(){let t=!1;try{this._detachContentAfterRenderRef=vt(()=>{t=!0,this._detachContent()},{injector:this._injector})}catch(e){if(t)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let t=this._scrollStrategy;t?.disable(),t?.detach?.()}},ZD="cdk-overlay-connected-position-bounding-box",_F=/([A-Za-z%]+)$/;function aM(n,t){return new Lf(t,n.get(fo),n.get(z),n.get(je),n.get(sM))}var Lf=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new A;_resizeSubscription=Re.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,r,i,o){this._viewportRuler=e,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(ZD),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(t,i,a),l=this._getOverlayPoint(c,e,a),d=this._getOverlayFit(l,e,r,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(d,l,r)){o.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:l,originPoint:c,position:a,overlayRect:e})}if(o.length){let a=null,c=-1;for(let l of o){let d=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);d>c&&(c=d,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ho(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(ZD),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,r){let i;if(r.originX=="center")i=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;i=r.originX=="start"?s:a}e.left<0&&(i-=e.left);let o;return r.originY=="center"?o=t.top+t.height/2:o=r.originY=="top"?t.top:t.bottom,e.top<0&&(o-=e.top),{x:i,y:o}}_getOverlayPoint(t,e,r){let i;r.overlayX=="center"?i=-e.width/2:r.overlayX==="start"?i=this._isRtl()?-e.width:0:i=this._isRtl()?0:-e.width;let o;return r.overlayY=="center"?o=-e.height/2:o=r.overlayY=="top"?0:-e.height,{x:t.x+i,y:t.y+o}}_getOverlayFit(t,e,r,i){let o=QD(e),{x:s,y:a}=t,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let d=0-s,u=s+o.width-r.width,p=0-a,h=a+o.height-r.height,v=this._subtractOverflows(o.width,d,u),_=this._subtractOverflows(o.height,p,h),D=v*_;return{visibleArea:D,isCompletelyWithinViewport:o.width*o.height===D,fitsInViewportVertically:_===o.height,fitsInViewportHorizontally:v==o.width}}_canFitWithFlexibleDimensions(t,e,r){if(this._hasFlexibleDimensions){let i=r.bottom-e.y,o=r.right-e.x,s=KD(this._overlayRef.getConfig().minHeight),a=KD(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportVertically||s!=null&&s<=i,l=t.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(t,e,r){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let i=QD(e),o=this._viewportRect,s=Math.max(t.x+i.width-o.width,0),a=Math.max(t.y+i.height-o.height,0),c=Math.max(o.top-r.top-t.y,0),l=Math.max(o.left-r.left-t.x,0),d=0,u=0;return i.width<=o.width?d=l||-s:d=t.x<this._viewportMargin?o.left-r.left-t.x:0,i.height<=o.height?u=c||-a:u=t.y<this._viewportMargin?o.top-r.top-t.y:0,this._previousPushAmount={x:d,y:u},{x:t.x+d,y:t.y+u}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!CF(this._lastScrollVisibility,r)){let i=new Nf(t,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=t.overlayY;t.overlayX==="center"?r="center":this._isRtl()?r=t.overlayX==="start"?"right":"left":r=t.overlayX==="start"?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(t,e){let r=this._viewportRect,i=this._isRtl(),o,s,a;if(e.overlayY==="top")s=t.y,o=r.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=r.height-t.y+this._viewportMargin*2,o=r.height-a+this._viewportMargin;else{let h=Math.min(r.bottom-t.y+r.top,t.y),v=this._lastBoundingBoxSize.height;o=h*2,s=t.y-h,o>v&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-v/2)}let c=e.overlayX==="start"&&!i||e.overlayX==="end"&&i,l=e.overlayX==="end"&&!i||e.overlayX==="start"&&i,d,u,p;if(l)p=r.width-t.x+this._viewportMargin*2,d=t.x-this._viewportMargin;else if(c)u=t.x,d=r.right-t.x;else{let h=Math.min(r.right-t.x+r.left,t.x),v=this._lastBoundingBoxSize.width;d=h*2,u=t.x-h,d>v&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-v/2)}return{top:s,left:u,bottom:a,right:p,width:d,height:o}}_setBoundingBoxStyles(t,e){let r=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=Xe(r.height),i.top=Xe(r.top),i.bottom=Xe(r.bottom),i.width=Xe(r.width),i.left=Xe(r.left),i.right=Xe(r.right),e.overlayX==="center"?i.alignItems="center":i.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?i.justifyContent="center":i.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=Xe(o)),s&&(i.maxWidth=Xe(s))}this._lastBoundingBoxSize=r,ho(this._boundingBox.style,i)}_resetBoundingBoxStyles(){ho(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ho(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let d=this._viewportRuler.getViewportScrollPosition();ho(r,this._getExactOverlayY(e,t,d)),ho(r,this._getExactOverlayX(e,t,d))}else r.position="static";let a="",c=this._getOffset(e,"x"),l=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),r.transform=a.trim(),s.maxHeight&&(i?r.maxHeight=Xe(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=Xe(s.maxWidth):o&&(r.maxWidth="")),ho(this._pane.style,r)}_getExactOverlayY(t,e,r){let i={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),t.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=Xe(o.y);return i}_getExactOverlayX(t,e,r){let i={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=t.overlayX==="end"?"left":"right":s=t.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=Xe(o.x);return i}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:qD(t,r),isOriginOutsideView:Uy(t,r),isOverlayClipped:qD(e,r),isOverlayOutsideView:Uy(e,r)}}_subtractOverflows(t,...e){return e.reduce((r,i)=>r-Math.max(i,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+t-this._viewportMargin,bottom:r.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&ks(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof ue)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,r=t.height||0;return{top:t.y,bottom:t.y+r,left:t.x,right:t.x+e,height:r,width:e}}};function ho(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function KD(n){if(typeof n!="number"&&n!=null){let[t,e]=n.split(_F);return!e||e==="px"?parseFloat(t):null}return n||null}function QD(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}function CF(n,t){return n===t?!0:n.isOriginClipped===t.isOriginClipped&&n.isOriginOutsideView===t.isOriginOutsideView&&n.isOverlayClipped===t.isOverlayClipped&&n.isOverlayOutsideView===t.isOverlayOutsideView}var XD="cdk-global-overlay-wrapper";function Bf(n){return new Vf}var Vf=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(XD),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=r,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,p=this._overlayRef.getConfig().direction==="rtl",h="",v="",_="";c?_="flex-start":d==="center"?(_="center",p?v=u:h=u):p?d==="left"||d==="end"?(_="flex-end",h=u):(d==="right"||d==="start")&&(_="flex-start",v=u):d==="left"||d==="start"?(_="flex-start",h=u):(d==="right"||d==="end")&&(_="flex-end",v=u),t.position=this._cssPosition,t.marginLeft=c?"0":h,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=c?"0":v,e.justifyContent=_,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,r=e.style;e.classList.remove(XD),r.justifyContent=r.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},cM=(()=>{class n{_injector=f(ce);constructor(){}global(){return Bf()}flexibleConnectedTo(e){return aM(this._injector,e)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Uf(n,t){n.get(lr).load(oM);let e=n.get(sM),r=n.get(z),i=n.get(jc),o=n.get(Ft),s=n.get(uo),a=r.createElement("div"),c=r.createElement("div");c.id=i.getId("cdk-overlay-"),c.classList.add("cdk-overlay-pane"),a.appendChild(c),e.getContainerElement().appendChild(a);let l=new kf(c,o,n),d=new Vs(t),u=n.get(it,null,{optional:!0})||n.get(et).createRenderer(null,null);return d.direction=d.direction||s.value,new Ff(l,a,c,d,n.get($),n.get(rM),r,n.get(er),n.get(iM),t?.disableAnimations??n.get(ii,null,{optional:!0})==="NoopAnimations",n.get(Fe),u)}var lM=(()=>{class n{scrollStrategies=f(tM);_positionBuilder=f(cM);_injector=f(ce);constructor(){}create(e){return Uf(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var wF=new T("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let n=f(ce);return()=>jf(n)}});function EF(n){let t=f(ce);return()=>jf(t)}var SF={provide:wF,useFactory:EF},$y=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({providers:[lM,SF],imports:[fi,Af,By,By]})}return n})();function DF(n,t){if(n&1){let e=J();m(0,"div",1)(1,"button",2),x("click",function(){I(e);let i=w();return k(i.action())}),b(2),g()()}if(n&2){let e=w();y(2),ke(" ",e.data.action," ")}}var MF=["label"];function TF(n,t){}var xF=Math.pow(2,31)-1,zc=class{_overlayRef;instance;containerInstance;_afterDismissed=new A;_afterOpened=new A;_onAction=new A;_durationTimeoutId;_dismissedByAction=!1;constructor(t,e){this._overlayRef=e,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,xF))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},dM=new T("MatSnackBarData"),js=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},IF=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return n})(),kF=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return n})(),AF=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return n})(),uM=(()=>{class n{snackBarRef=f(zc);data=f(dM);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(r,i){r&1&&(m(0,"div",0),b(1),g(),O(2,DF,3,1,"div",1)),r&2&&(y(),ke(" ",i.data.message,`
14
+ `),y(),R(i.hasAction?2:-1))},dependencies:[zD,IF,kF,AF],styles:[`.mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}
15
+ `],encapsulation:2,changeDetection:0})}return n})(),zy="_mat-snack-bar-enter",Wy="_mat-snack-bar-exit",OF=(()=>{class n extends Ns{_ngZone=f($);_elementRef=f(ue);_changeDetectorRef=f(Dt);_platform=f(je);_animationsDisabled=Pr();snackBarConfig=f(js);_document=f(z);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=f(ce);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new A;_onExit=new A;_onEnter=new A;_animationState="void";_live;_label;_role;_liveElementId=f(jc).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),r}attachTemplatePortal(e){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),r}attachDomPortal=e=>{this._assertNotAttached();let r=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),r};onAnimationEnd(e){e===Wy?this._completeExit():e===zy&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?vt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(zy)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(zy)},200)))}exit(){return this._destroyed?P(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?vt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Wy)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Wy),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(s=>e.classList.add(s)):e.classList.add(r)),this._exposeToModals();let i=this._label.nativeElement,o="mdc-snackbar__label";i.classList.toggle(o,!i.querySelector(`.${o}`))}_exposeToModals(){let e=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let i=0;i<r.length;i++){let o=r[i],s=o.getAttribute("aria-owns");this._trackedModals.add(o),s?s.indexOf(e)===-1&&o.setAttribute("aria-owns",s+" "+e):o.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let r=e.getAttribute("aria-owns");if(r){let i=r.replace(this._liveElementId,"").trim();i.length>0?e.setAttribute("aria-owns",i):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,r=e.querySelector("[aria-hidden]"),i=e.querySelector("[aria-live]");if(r&&i){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&r.contains(document.activeElement)&&(o=document.activeElement),r.removeAttribute("aria-hidden"),i.appendChild(r),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,i){if(r&1&&(zt(jy,7),zt(MF,7)),r&2){let o;at(o=ct())&&(i._portalOutlet=o.first),at(o=ct())&&(i._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(r,i){r&1&&x("animationend",function(s){return i.onAnimationEnd(s.animationName)})("animationcancel",function(s){return i.onAnimationEnd(s.animationName)}),r&2&&le("mat-snack-bar-container-enter",i._animationState==="visible")("mat-snack-bar-container-exit",i._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!i._animationsDisabled)},features:[Ne],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,i){r&1&&(m(0,"div",1)(1,"div",2,0)(3,"div",3),ou(4,TF,0,0,"ng-template",4),g(),ie(5,"div"),g()()),r&2&&(y(5),We("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[jy],styles:[`@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}
16
+ `],encapsulation:2})}return n})();function RF(){return new js}var PF=new T("mat-snack-bar-default-options",{providedIn:"root",factory:RF}),Gy=(()=>{class n{_live=f(Iy);_injector=f(ce);_breakpointObserver=f(Vc);_parentSnackBar=f(n,{optional:!0,skipSelf:!0});_defaultConfig=f(PF);_animationsDisabled=Pr();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=uM;snackBarContainerComponent=OF;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(){}openFromComponent(e,r){return this._attach(e,r)}openFromTemplate(e,r){return this._attach(e,r)}open(e,r="",i){let o=E(E({},this._defaultConfig),i);return o.data={message:e,action:r},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,r){let i=r&&r.viewContainerRef&&r.viewContainerRef.injector,o=ce.create({parent:i||this._injector,providers:[{provide:js,useValue:r}]}),s=new Rs(this.snackBarContainerComponent,r.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=r,a.instance}_attach(e,r){let i=E(E(E({},new js),this._defaultConfig),r),o=this._createOverlay(i),s=this._attachSnackBarContainer(o,i),a=new zc(s,o);if(e instanceof Tn){let c=new Ps(e,null,{$implicit:i.data,snackBarRef:a});a.instance=s.attachTemplatePortal(c)}else{let c=this._createInjector(i,a),l=new Rs(e,void 0,c),d=s.attachComponentPortal(l);a.instance=d.instance}return this._breakpointObserver.observe(kD.HandsetPortrait).pipe(F(o.detachments())).subscribe(c=>{o.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),i.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(a,i),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,r){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),r.duration&&r.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(r.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let r=new Vs;r.direction=e.direction;let i=Bf(this._injector),o=e.direction==="rtl",s=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!o||e.horizontalPosition==="end"&&o,a=!s&&e.horizontalPosition!=="center";return s?i.left("0"):a?i.right("0"):i.centerHorizontally(),e.verticalPosition==="top"?i.top("0"):i.bottom("0"),r.positionStrategy=i,r.disableAnimations=this._animationsDisabled,Uf(this._injector,r)}_createInjector(e,r){let i=e&&e.viewContainerRef&&e.viewContainerRef.injector;return ce.create({parent:i||this._injector,providers:[{provide:zc,useValue:r},{provide:dM,useValue:e.data}]})}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var fM=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({providers:[Gy],imports:[$y,Af,Os,pt,uM,pt]})}return n})();function Ky(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var mo=Ky();function bM(n){mo=n}var Yc={exec:()=>null};function Te(n,t=""){let e=typeof n=="string"?n:n.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(jt.caret,"$1"),e=e.replace(i,s),r},getRegex:()=>new RegExp(e,t)};return r}var jt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},NF=/^(?:[ \t]*(?:\n|$))+/,FF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,LF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,VF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qy=/(?:[*+-]|\d{1,9}[.)])/,_M=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,CM=Te(_M).replace(/bull/g,Qy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jF=Te(_M).replace(/bull/g,Qy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,BF=/^[^\n]+/,Jy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,UF=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Jy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),HF=Te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qy).getRegex(),Gf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",eb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$F=Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",eb).replace("tag",Gf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wM=Te(Xy).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gf).getRegex(),zF=Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wM).getRegex(),tb={blockquote:zF,code:FF,def:UF,fences:LF,heading:VF,hr:Zc,html:$F,lheading:CM,list:HF,newline:NF,paragraph:wM,table:Yc,text:BF},hM=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gf).getRegex(),WF=X(E({},tb),{lheading:jF,table:hM,paragraph:Te(Xy).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hM).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gf).getRegex()}),GF=X(E({},tb),{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",eb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Yc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(Xy).replace("hr",Zc).replace("heading",` *#{1,6} *[^
17
+ ]`).replace("lheading",CM).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),qF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,YF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,EM=/^( {2,}|\\)\n(?!\s*$)/,ZF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qf=/[\p{P}\p{S}]/u,nb=/[\s\p{P}\p{S}]/u,SM=/[^\s\p{P}\p{S}]/u,KF=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,nb).getRegex(),DM=/(?!~)[\p{P}\p{S}]/u,QF=/(?!~)[\s\p{P}\p{S}]/u,XF=/(?:[^\s\p{P}\p{S}]|~)/u,JF=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,MM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,eL=Te(MM,"u").replace(/punct/g,qf).getRegex(),tL=Te(MM,"u").replace(/punct/g,DM).getRegex(),TM="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nL=Te(TM,"gu").replace(/notPunctSpace/g,SM).replace(/punctSpace/g,nb).replace(/punct/g,qf).getRegex(),rL=Te(TM,"gu").replace(/notPunctSpace/g,XF).replace(/punctSpace/g,QF).replace(/punct/g,DM).getRegex(),iL=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,SM).replace(/punctSpace/g,nb).replace(/punct/g,qf).getRegex(),oL=Te(/\\(punct)/,"gu").replace(/punct/g,qf).getRegex(),sL=Te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aL=Te(eb).replace("(?:-->|$)","-->").getRegex(),cL=Te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",aL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$f=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,lL=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$f).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xM=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",$f).replace("ref",Jy).getRegex(),IM=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",Jy).getRegex(),dL=Te("reflink|nolink(?!\\()","g").replace("reflink",xM).replace("nolink",IM).getRegex(),pM=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rb={_backpedal:Yc,anyPunctuation:oL,autolink:sL,blockSkip:JF,br:EM,code:YF,del:Yc,emStrongLDelim:eL,emStrongRDelimAst:nL,emStrongRDelimUnd:iL,escape:qF,link:lL,nolink:IM,punctuation:KF,reflink:xM,reflinkSearch:dL,tag:cL,text:ZF,url:Yc},uL=X(E({},rb),{link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",$f).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$f).getRegex()}),qy=X(E({},rb),{emStrongRDelimAst:rL,emStrongLDelim:tL,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",pM).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",pM).getRegex()}),fL=X(E({},qy),{br:Te(EM).replace("{2,}","*").getRegex(),text:Te(qy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Hf={normal:tb,gfm:WF,pedantic:GF},Wc={normal:rb,gfm:qy,breaks:fL,pedantic:uL},hL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mM=n=>hL[n];function dr(n,t){if(t){if(jt.escapeTest.test(n))return n.replace(jt.escapeReplace,mM)}else if(jt.escapeTestNoEncode.test(n))return n.replace(jt.escapeReplaceNoEncode,mM);return n}function gM(n){try{n=encodeURI(n).replace(jt.percentDecode,"%")}catch{return null}return n}function vM(n,t){let e=n.replace(jt.findPipe,(o,s,a)=>{let c=!1,l=s;for(;--l>=0&&a[l]==="\\";)c=!c;return c?"|":" |"}),r=e.split(jt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(jt.slashPipe,"|");return r}function Gc(n,t,e){let r=n.length;if(r===0)return"";let i=0;for(;i<r;){let o=n.charAt(r-i-1);if(o===t&&!e)i++;else if(o!==t&&e)i++;else break}return n.slice(0,r-i)}function pL(n,t){if(n.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<n.length;r++)if(n[r]==="\\")r++;else if(n[r]===t[0])e++;else if(n[r]===t[1]&&(e--,e<0))return r;return e>0?-2:-1}function yM(n,t,e,r,i){let o=t.href,s=t.title||null,a=n[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:n[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}function mL(n,t,e){let r=n.match(e.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
18
+ `).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=i.length?o.slice(i.length):o}).join(`
19
+ `)}var zf=class{options;rules;lexer;constructor(n){this.options=n||mo}space(n){let t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(n){let t=this.rules.block.code.exec(n);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Gc(e,`
20
+ `)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],r=mL(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(n){let t=this.rules.block.heading.exec(n);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let r=Gc(e,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(e=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(n){let t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:Gc(t[0],`
21
+ `)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=Gc(t[0],`
22
+ `).split(`
23
+ `),r="",i="",o=[];for(;e.length>0;){let s=!1,a=[],c;for(c=0;c<e.length;c++)if(this.rules.other.blockquoteStart.test(e[c]))a.push(e[c]),s=!0;else if(!s)a.push(e[c]);else break;e=e.slice(c);let l=a.join(`
24
+ `),d=l.replace(this.rules.other.blockquoteSetextReplace,`
25
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
26
+ ${l}`:l,i=i?`${i}
27
+ ${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=u,e.length===0)break;let p=o.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let h=p,v=h.raw+`
28
+ `+e.join(`
29
+ `),_=this.blockquote(v);o[o.length-1]=_,r=r.substring(0,r.length-h.raw.length)+_.raw,i=i.substring(0,i.length-h.text.length)+_.text;break}else if(p?.type==="list"){let h=p,v=h.raw+`
30
+ `+e.join(`
31
+ `),_=this.list(v);o[o.length-1]=_,r=r.substring(0,r.length-p.raw.length)+_.raw,i=i.substring(0,i.length-h.raw.length)+_.raw,e=v.substring(o.at(-1).raw.length).split(`
32
+ `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(n){let t=this.rules.block.list.exec(n);if(t){let e=t[1].trim(),r=e.length>1,i={type:"list",raw:"",ordered:r,start:r?+e.slice(0,-1):"",loose:!1,items:[]};e=r?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=r?e:"[*+-]");let o=this.rules.other.listItemRegex(e),s=!1;for(;n;){let c=!1,l="",d="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;l=t[0],n=n.substring(l.length);let u=t[2].split(`
33
+ `,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),p=n.split(`
34
+ `,1)[0],h=!u.trim(),v=0;if(this.options.pedantic?(v=2,d=u.trimStart()):h?v=t[1].length+1:(v=t[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,d=u.slice(v),v+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(l+=p+`
35
+ `,n=n.substring(p.length+1),c=!0),!c){let M=this.rules.other.nextBulletRegex(v),G=this.rules.other.hrRegex(v),Ee=this.rules.other.fencesBeginRegex(v),me=this.rules.other.headingBeginRegex(v),bt=this.rules.other.htmlBeginRegex(v);for(;n;){let qe=n.split(`
36
+ `,1)[0],He;if(p=qe,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),He=p):He=p.replace(this.rules.other.tabCharGlobal," "),Ee.test(p)||me.test(p)||bt.test(p)||M.test(p)||G.test(p))break;if(He.search(this.rules.other.nonSpaceChar)>=v||!p.trim())d+=`
37
+ `+He.slice(v);else{if(h||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ee.test(u)||me.test(u)||G.test(u))break;d+=`
38
+ `+p}!h&&!p.trim()&&(h=!0),l+=qe+`
39
+ `,n=n.substring(qe.length+1),u=He.slice(v)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0));let _=null,D;this.options.gfm&&(_=this.rules.other.listIsTask.exec(d),_&&(D=_[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:l,task:!!_,checked:D,loose:!1,text:d,tokens:[]}),i.raw+=l}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){let l=i.items[c].tokens.filter(u=>u.type==="space"),d=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));i.loose=d}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(n){let t=this.rules.block.html.exec(n);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(n){let t=this.rules.block.def.exec(n);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:i}}}table(n){let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=vM(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
40
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<e.length;s++)o.header.push({text:e[s],tokens:this.lexer.inline(e[s]),header:!0,align:o.align[s]});for(let s of i)o.rows.push(vM(s,o.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[c]})));return o}}lheading(n){let t=this.rules.block.lheading.exec(n);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(n){let t=this.rules.block.paragraph.exec(n);if(t){let e=t[1].charAt(t[1].length-1)===`
41
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(n){let t=this.rules.block.text.exec(n);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(n){let t=this.rules.inline.escape.exec(n);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(n){let t=this.rules.inline.tag.exec(n);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(n){let t=this.rules.inline.link.exec(n);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let o=Gc(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=pL(t[2],"()");if(o===-2)return;if(o>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r=r.slice(1):r=r.slice(1,-1)),yM(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(n,t){let e;if((e=this.rules.inline.reflink.exec(n))||(e=this.rules.inline.nolink.exec(n))){let r=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let o=e[0].charAt(0);return{type:"text",raw:o,text:o}}return yM(e,i,e[0],this.lexer,this.rules)}}emStrong(n,t,e=""){let r=this.rules.inline.emStrongLDelim.exec(n);if(!(!r||r[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!e||this.rules.inline.punctuation.exec(e))){let i=[...r[0]].length-1,o,s,a=i,c=0,l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*n.length+i);(r=l.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){a+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){c+=s;continue}if(a-=s,a>0)continue;s=Math.min(s,s+a+c);let d=[...r[0]][0].length,u=n.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let h=u.slice(1,-1);return{type:"em",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(n){let t=this.rules.inline.code.exec(n);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),i=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&i&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(n){let t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]}}del(n){let t=this.rules.inline.del.exec(n);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(n){let t=this.rules.inline.autolink.exec(n);if(t){let e,r;return t[2]==="@"?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let e,r;if(t[2]==="@")e=t[0],r="mailto:"+e;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);e=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(n){let t=this.rules.inline.text.exec(n);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Fn=class Yy{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||mo,this.options.tokenizer=this.options.tokenizer||new zf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:jt,block:Hf.normal,inline:Wc.normal};this.options.pedantic?(e.block=Hf.pedantic,e.inline=Wc.pedantic):this.options.gfm&&(e.block=Hf.gfm,this.options.breaks?e.inline=Wc.breaks:e.inline=Wc.gfm),this.tokenizer.rules=e}static get rules(){return{block:Hf,inline:Wc}}static lex(t,e){return new Yy(e).lex(t)}static lexInline(t,e){return new Yy(e).inlineTokens(t)}lex(t){t=t.replace(jt.carriageReturn,`
42
+ `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(jt.tabCharGlobal," ").replace(jt.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,e))?(t=t.substring(i.raw.length),e.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=e.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
43
+ `:e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
44
+ `)?"":`
45
+ `)+i.raw,s.text+=`
46
+ `+i.text,this.inlineQueue.at(-1).src=s.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
47
+ `)?"":`
48
+ `)+i.raw,s.text+=`
49
+ `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let s=1/0,a=t.slice(1),c;this.options.extensions.startBlock.forEach(l=>{c=l.call({lexer:this},a),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let s=e.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
50
+ `)?"":`
51
+ `)+i.raw,s.text+=`
52
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=e.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
53
+ `)?"":`
54
+ `)+i.raw,s.text+=`
55
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r=t,i=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)a.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let o=!1,s="";for(;t;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(l=>(a=l.call({lexer:this},t,e))?(t=t.substring(a.raw.length),e.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let l=e.at(-1);a.type==="text"&&l?.type==="text"?(l.raw+=a.raw,l.text+=a.text):e.push(a);continue}if(a=this.tokenizer.emStrong(t,r,s)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),e.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),e.push(a);continue}let c=t;if(this.options.extensions?.startInline){let l=1/0,d=t.slice(1),u;this.options.extensions.startInline.forEach(p=>{u=p.call({lexer:this},d),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(a=this.tokenizer.inlineText(c)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let l=e.at(-1);l?.type==="text"?(l.raw+=a.raw,l.text+=a.text):e.push(a);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return e}},Wf=class{options;parser;constructor(n){this.options=n||mo}space(n){return""}code({text:n,lang:t,escaped:e}){let r=(t||"").match(jt.notSpaceStart)?.[0],i=n.replace(jt.endingNewline,"")+`
56
+ `;return r?'<pre><code class="language-'+dr(r)+'">'+(e?i:dr(i,!0))+`</code></pre>
57
+ `:"<pre><code>"+(e?i:dr(i,!0))+`</code></pre>
58
+ `}blockquote({tokens:n}){return`<blockquote>
59
+ ${this.parser.parse(n)}</blockquote>
60
+ `}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}>
61
+ `}hr(n){return`<hr>
62
+ `}list(n){let t=n.ordered,e=n.start,r="";for(let s=0;s<n.items.length;s++){let a=n.items[s];r+=this.listitem(a)}let i=t?"ol":"ul",o=t&&e!==1?' start="'+e+'"':"";return"<"+i+o+`>
63
+ `+r+"</"+i+`>
64
+ `}listitem(n){let t="";if(n.task){let e=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=e+" "+dr(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:e+" ",text:e+" ",escaped:!0}):t+=e+" "}return t+=this.parser.parse(n.tokens,!!n.loose),`<li>${t}</li>
65
+ `}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
66
+ `}table(n){let t="",e="";for(let i=0;i<n.header.length;i++)e+=this.tablecell(n.header[i]);t+=this.tablerow({text:e});let r="";for(let i=0;i<n.rows.length;i++){let o=n.rows[i];e="";for(let s=0;s<o.length;s++)e+=this.tablecell(o[s]);r+=this.tablerow({text:e})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
67
+ <thead>
68
+ `+t+`</thead>
69
+ `+r+`</table>
70
+ `}tablerow({text:n}){return`<tr>
71
+ ${n}</tr>
72
+ `}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
73
+ `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${dr(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:t,tokens:e}){let r=this.parser.parseInline(e),i=gM(n);if(i===null)return r;n=i;let o='<a href="'+n+'"';return t&&(o+=' title="'+dr(t)+'"'),o+=">"+r+"</a>",o}image({href:n,title:t,text:e,tokens:r}){r&&(e=this.parser.parseInline(r,this.parser.textRenderer));let i=gM(n);if(i===null)return dr(e);n=i;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${dr(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:dr(n.text)}},ib=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},Ln=class Zy{options;renderer;textRenderer;constructor(t){this.options=t||mo,this.options.renderer=this.options.renderer||new Wf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ib}static parse(t,e){return new Zy(e).parse(t)}static parseInline(t,e){return new Zy(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let a=o,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){r+=c||"";continue}}let s=o;switch(s.type){case"space":{r+=this.renderer.space(s);continue}case"hr":{r+=this.renderer.hr(s);continue}case"heading":{r+=this.renderer.heading(s);continue}case"code":{r+=this.renderer.code(s);continue}case"table":{r+=this.renderer.table(s);continue}case"blockquote":{r+=this.renderer.blockquote(s);continue}case"list":{r+=this.renderer.list(s);continue}case"html":{r+=this.renderer.html(s);continue}case"def":{r+=this.renderer.def(s);continue}case"paragraph":{r+=this.renderer.paragraph(s);continue}case"text":{let a=s,c=this.renderer.text(a);for(;i+1<t.length&&t[i+1].type==="text";)a=t[++i],c+=`
74
+ `+this.renderer.text(a);e?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=a||"";continue}}let s=o;switch(s.type){case"escape":{r+=e.text(s);break}case"html":{r+=e.html(s);break}case"link":{r+=e.link(s);break}case"image":{r+=e.image(s);break}case"strong":{r+=e.strong(s);break}case"em":{r+=e.em(s);break}case"codespan":{r+=e.codespan(s);break}case"br":{r+=e.br(s);break}case"del":{r+=e.del(s);break}case"text":{r+=e.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},qc=class{options;block;constructor(n){this.options=n||mo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?Fn.lex:Fn.lexInline}provideParser(){return this.block?Ln.parse:Ln.parseInline}},gL=class{defaults=Ky();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ln;Renderer=Wf;TextRenderer=ib;Lexer=Fn;Tokenizer=zf;Hooks=qc;constructor(...n){this.use(...n)}walkTokens(n,t){let e=[];for(let r of n)switch(e=e.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let o of i.header)e=e.concat(this.walkTokens(o.tokens,t));for(let o of i.rows)for(let s of o)e=e.concat(this.walkTokens(s.tokens,t));break}case"list":{let i=r;e=e.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let s=i[o].flat(1/0);e=e.concat(this.walkTokens(s,t))}):i.tokens&&(e=e.concat(this.walkTokens(i.tokens,t)))}}return e}use(...n){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(e=>{let r=E({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=t.renderers[i.name];o?t.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),e.renderer){let i=this.defaults.renderer||new Wf(this.defaults);for(let o in e.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=e.renderer[s],c=i[s];i[s]=(...l)=>{let d=a.apply(i,l);return d===!1&&(d=c.apply(i,l)),d||""}}r.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new zf(this.defaults);for(let o in e.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=e.tokenizer[s],c=i[s];i[s]=(...l)=>{let d=a.apply(i,l);return d===!1&&(d=c.apply(i,l)),d}}r.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new qc;for(let o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=e.hooks[s],c=i[s];qc.passThroughHooks.has(o)?i[s]=l=>{if(this.defaults.async&&qc.passThroughHooksRespectAsync.has(o))return xe(this,null,function*(){let u=yield a.call(i,l);return c.call(i,u)});let d=a.call(i,l);return c.call(i,d)}:i[s]=(...l)=>{if(this.defaults.async)return xe(this,null,function*(){let u=yield a.apply(i,l);return u===!1&&(u=yield c.apply(i,l)),u});let d=a.apply(i,l);return d===!1&&(d=c.apply(i,l)),d}}r.hooks=i}if(e.walkTokens){let i=this.defaults.walkTokens,o=e.walkTokens;r.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults=E(E({},this.defaults),r)}),this}setOptions(n){return this.defaults=E(E({},this.defaults),n),this}lexer(n,t){return Fn.lex(n,t??this.defaults)}parser(n,t){return Ln.parse(n,t??this.defaults)}parseMarkdown(n){return(t,e)=>{let r=E({},e),i=E(E({},this.defaults),r),o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=n),i.async)return xe(this,null,function*(){let s=i.hooks?yield i.hooks.preprocess(t):t,a=yield(i.hooks?yield i.hooks.provideLexer():n?Fn.lex:Fn.lexInline)(s,i),c=i.hooks?yield i.hooks.processAllTokens(a):a;i.walkTokens&&(yield Promise.all(this.walkTokens(c,i.walkTokens)));let l=yield(i.hooks?yield i.hooks.provideParser():n?Ln.parse:Ln.parseInline)(c,i);return i.hooks?yield i.hooks.postprocess(l):l}).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():n?Fn.lex:Fn.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let a=(i.hooks?i.hooks.provideParser():n?Ln.parse:Ln.parseInline)(s,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(s){return o(s)}}}onError(n,t){return e=>{if(e.message+=`
75
+ Please report this to https://github.com/markedjs/marked.`,n){let r="<p>An error occurred:</p><pre>"+dr(e.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(e);throw e}}},po=new gL;function De(n,t){return po.parse(n,t)}De.options=De.setOptions=function(n){return po.setOptions(n),De.defaults=po.defaults,bM(De.defaults),De};De.getDefaults=Ky;De.defaults=mo;De.use=function(...n){return po.use(...n),De.defaults=po.defaults,bM(De.defaults),De};De.walkTokens=function(n,t){return po.walkTokens(n,t)};De.parseInline=po.parseInline;De.Parser=Ln;De.parser=Ln.parse;De.Renderer=Wf;De.TextRenderer=ib;De.Lexer=Fn;De.lexer=Fn.lex;De.Tokenizer=zf;De.Hooks=qc;De.parse=De;var lte=De.options,dte=De.setOptions,ute=De.use,fte=De.walkTokens,hte=De.parseInline;var pte=Ln.parse,mte=Fn.lex;var Yf;function vL(){if(Yf===void 0&&(Yf=null,typeof window<"u")){let n=window;n.trustedTypes!==void 0&&(Yf=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return Yf}function Kc(n){return vL()?.createHTML(n)||n}function kM(n){return Error(`Unable to find icon with the name "${n}"`)}function yL(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function AM(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function OM(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}var Fr=class{url;svgText;options;svgElement;constructor(t,e,r){this.url=t,this.svgText=e,this.options=r}},PM=(()=>{class n{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,r,i,o){this._httpClient=e,this._sanitizer=r,this._errorHandler=o,this._document=i}addSvgIcon(e,r,i){return this.addSvgIconInNamespace("",e,r,i)}addSvgIconLiteral(e,r,i){return this.addSvgIconLiteralInNamespace("",e,r,i)}addSvgIconInNamespace(e,r,i,o){return this._addSvgIconConfig(e,r,new Fr(i,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,r,i,o){let s=this._sanitizer.sanitize(gt.HTML,i);if(!s)throw OM(i);let a=Kc(s);return this._addSvgIconConfig(e,r,new Fr("",a,o))}addSvgIconSet(e,r){return this.addSvgIconSetInNamespace("",e,r)}addSvgIconSetLiteral(e,r){return this.addSvgIconSetLiteralInNamespace("",e,r)}addSvgIconSetInNamespace(e,r,i){return this._addSvgIconSetConfig(e,new Fr(r,null,i))}addSvgIconSetLiteralInNamespace(e,r,i){let o=this._sanitizer.sanitize(gt.HTML,r);if(!o)throw OM(r);let s=Kc(o);return this._addSvgIconSetConfig(e,new Fr("",s,i))}registerFontClassAlias(e,r=e){return this._fontCssClassesByAlias.set(e,r),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let r=this._sanitizer.sanitize(gt.RESOURCE_URL,e);if(!r)throw AM(e);let i=this._cachedIconsByUrl.get(r);return i?P(Zf(i)):this._loadSvgIconFromConfig(new Fr(e,null)).pipe(ge(o=>this._cachedIconsByUrl.set(r,o)),V(o=>Zf(o)))}getNamedSvgIcon(e,r=""){let i=RM(r,e),o=this._svgIconConfigs.get(i);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(r,e),o)return this._svgIconConfigs.set(i,o),this._getSvgFromConfig(o);let s=this._iconSetConfigs.get(r);return s?this._getSvgFromIconSetConfigs(e,s):jr(kM(i))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?P(Zf(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(V(r=>Zf(r)))}_getSvgFromIconSetConfigs(e,r){let i=this._extractIconWithNameFromAnySet(e,r);if(i)return P(i);let o=r.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(xt(a=>{let l=`Loading icon set URL: ${this._sanitizer.sanitize(gt.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(l)),P(null)})));return ua(o).pipe(V(()=>{let s=this._extractIconWithNameFromAnySet(e,r);if(!s)throw kM(e);return s}))}_extractIconWithNameFromAnySet(e,r){for(let i=r.length-1;i>=0;i--){let o=r[i];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(ge(r=>e.svgText=r),V(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?P(null):this._fetchIcon(e).pipe(ge(r=>e.svgText=r))}_extractSvgIconFromSet(e,r,i){let o=e.querySelector(`[id="${r}"]`);if(!o)return null;let s=o.cloneNode(!0);if(s.removeAttribute("id"),s.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(s,i);if(s.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(s),i);let a=this._svgElementFromString(Kc("<svg></svg>"));return a.appendChild(s),this._setSvgAttributes(a,i)}_svgElementFromString(e){let r=this._document.createElement("DIV");r.innerHTML=e;let i=r.querySelector("svg");if(!i)throw Error("<svg> tag not found");return i}_toSvgElement(e){let r=this._svgElementFromString(Kc("<svg></svg>")),i=e.attributes;for(let o=0;o<i.length;o++){let{name:s,value:a}=i[o];s!=="id"&&r.setAttribute(s,a)}for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===this._document.ELEMENT_NODE&&r.appendChild(e.childNodes[o].cloneNode(!0));return r}_setSvgAttributes(e,r){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),r&&r.viewBox&&e.setAttribute("viewBox",r.viewBox),e}_fetchIcon(e){let{url:r,options:i}=e,o=i?.withCredentials??!1;if(!this._httpClient)throw yL();if(r==null)throw Error(`Cannot fetch icon from URL "${r}".`);let s=this._sanitizer.sanitize(gt.RESOURCE_URL,r);if(!s)throw AM(r);let a=this._inProgressUrlFetches.get(s);if(a)return a;let c=this._httpClient.get(s,{responseType:"text",withCredentials:o}).pipe(V(l=>Kc(l)),vr(()=>this._inProgressUrlFetches.delete(s)),op());return this._inProgressUrlFetches.set(s,c),c}_addSvgIconConfig(e,r,i){return this._svgIconConfigs.set(RM(e,r),i),this}_addSvgIconSetConfig(e,r){let i=this._iconSetConfigs.get(e);return i?i.push(r):this._iconSetConfigs.set(e,[r]),this}_svgElementFromConfig(e){if(!e.svgElement){let r=this._svgElementFromString(e.svgText);this._setSvgAttributes(r,e.options),e.svgElement=r}return e.svgElement}_getIconConfigFromResolvers(e,r){for(let i=0;i<this._resolvers.length;i++){let o=this._resolvers[i](r,e);if(o)return bL(o)?new Fr(o.url,null,o.options):new Fr(o,null)}}static \u0275fac=function(r){return new(r||n)(N(tr,8),N(Yi),N(z,8),N(St))};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Zf(n){return n.cloneNode(!0)}function RM(n,t){return n+":"+t}function bL(n){return!!(n.url&&n.options)}var _L=["*"],CL=new T("MAT_ICON_DEFAULT_OPTIONS"),wL=new T("mat-icon-location",{providedIn:"root",factory:EL});function EL(){let n=f(z),t=n?n.location:null;return{getPathname:()=>t?t.pathname+t.search:""}}var NM=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],SL=NM.map(n=>`[${n}]`).join(", "),DL=/^url\(['"]?#(.*?)['"]?\)$/,vn=(()=>{class n{_elementRef=f(ue);_iconRegistry=f(PM);_location=f(wL);_errorHandler=f(St);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let r=this._cleanupFontValue(e);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let r=this._cleanupFontValue(e);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Re.EMPTY;constructor(){let e=f(new Za("aria-hidden"),{optional:!0}),r=f(CL,{optional:!0});r&&(r.color&&(this.color=this._defaultColor=r.color),r.fontSet&&(this.fontSet=r.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let r=e.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,r=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let i=e.childNodes[r];(i.nodeType!==1||i.nodeName.toLowerCase()==="svg")&&i.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(i=>i.length>0);this._previousFontSetClass.forEach(i=>e.classList.remove(i)),r.forEach(i=>e.classList.add(i)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let r=this._elementsWithExternalReferences;r&&r.forEach((i,o)=>{i.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let r=e.querySelectorAll(SL),i=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<r.length;o++)NM.forEach(s=>{let a=r[o],c=a.getAttribute(s),l=c?c.match(DL):null;if(l){let d=i.get(a);d||(d=[],i.set(a,d)),d.push({name:s,value:l[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[r,i]=this._splitIconName(e);r&&(this._svgNamespace=r),i&&(this._svgName=i),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(i,r).pipe(It(1)).subscribe(o=>this._setSvgElement(o),o=>{let s=`Error retrieving icon ${r}:${i}! ${o.message}`;this._errorHandler.handleError(new Error(s))})}}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,i){r&2&&(We("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),qa(i.color?"mat-"+i.color:""),le("mat-icon-inline",i.inline)("mat-icon-no-color",i.color!=="primary"&&i.color!=="accent"&&i.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",Lt],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:_L,decls:1,vars:0,template:function(r,i){r&1&&(yt(),Ge(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}
76
+ `],encapsulation:2,changeDetection:0})}return n})(),Kf=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[pt,pt]})}return n})();var ML=(n,t)=>t.label;function TL(n,t){if(n&1){let e=J();m(0,"button",2),x("click",function(i){let o=I(e).$implicit,s=w();return k(s.executeAction(o,i))}),m(1,"mat-icon"),b(2),g()()}if(n&2){let e=t.$implicit;We("title",e.tooltip||e.label),y(),We("aria-label",e.label),y(),Ue(e.icon)}}var Qf=class n{actions=[];executeAction(t,e){e.stopPropagation(),t.action()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-message-context-menu"]],inputs:{actions:"actions"},decls:3,vars:0,consts:[[1,"context-menu-wrapper"],["mat-icon-button",""],["mat-icon-button","",3,"click"]],template:function(e,r){e&1&&(m(0,"div",0),ot(1,TL,3,3,"button",1,ML),g()),e&2&&(y(),st(r.actions))},dependencies:[Gt,Nr,vn],styles:[".context-menu-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}button[_ngcontent-%COMP%]{transform:scale(.75)}"]})};var Xf=class n{snackBar=f(Gy);success(t,e=2e3){this.snackBar.open(t,"",{duration:e,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]})}error(t,e=3e3){this.snackBar.open(t,"",{duration:e,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]})}info(t,e=2e3){this.snackBar.open(t,"",{duration:e,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var Mt=class n{STORAGE_KEY="coday-preferences";voiceLanguageSubject=new Z("en-US");voiceLanguage$=this.voiceLanguageSubject.asObservable();enterToSendSubject=new Z(!0);enterToSend$=this.enterToSendSubject.asObservable();voiceAnnounceEnabledSubject=new Z(!1);voiceAnnounceEnabled$=this.voiceAnnounceEnabledSubject.asObservable();voiceModeSubject=new Z("speech");voiceMode$=this.voiceModeSubject.asObservable();voiceReadFullTextSubject=new Z(!1);voiceReadFullText$=this.voiceReadFullTextSubject.asObservable();voiceVolumeSubject=new Z(.8);voiceVolume$=this.voiceVolumeSubject.asObservable();voiceRateSubject=new Z(1.2);voiceRate$=this.voiceRateSubject.asObservable();selectedVoiceSubject=new Z(null);selectedVoice$=this.selectedVoiceSubject.asObservable();printTechnicalMessagesSubject=new Z(!1);printTechnicalMessages$=this.printTechnicalMessagesSubject.asObservable();hideTechnicalMessagesSubject=new Z(!0);hideTechnicalMessages$=this.hideTechnicalMessagesSubject.asObservable();constructor(){console.log("[PREFERENCES] Initializing preferences service");let t=this.getPreference("voiceLanguage","en-US")??"en-US";this.voiceLanguageSubject.next(t),console.log("[PREFERENCES] Voice language initialized to:",t);let e=this.getPreference("useEnterToSend",!0)??!0;this.enterToSendSubject.next(e),console.log("[PREFERENCES] Enter to send initialized to:",e);let r=this.getPreference("voiceAnnounceEnabled",!1)??!1;this.voiceAnnounceEnabledSubject.next(r);let i=this.getPreference("voiceMode","speech")??"speech";this.voiceModeSubject.next(i);let o=this.getPreference("voiceReadFullText",!1)??!1;this.voiceReadFullTextSubject.next(o);let s=this.getPreference("voiceVolume",.8)??.8;this.voiceVolumeSubject.next(s);let a=this.getPreference("voiceRate",1.2)??1.2;this.voiceRateSubject.next(a);let c=this.getPreference("selectedVoice",null)??null;this.selectedVoiceSubject.next(c);let l=this.getPreference("printTechnicalMessages",!1)??!1;this.printTechnicalMessagesSubject.next(l);let d=this.getPreference("hideTechnicalMessages",!0)??!0;this.hideTechnicalMessagesSubject.next(d),console.log("[PREFERENCES] All preferences initialized successfully")}getPreference(t,e){try{let r=localStorage.getItem(this.STORAGE_KEY);if(!r)return e;let i=JSON.parse(r);return i[t]!==void 0?i[t]:e}catch{return e}}setPreference(t,e){try{let r=localStorage.getItem(this.STORAGE_KEY),i=r?JSON.parse(r):{};i[t]=e,localStorage.setItem(this.STORAGE_KEY,JSON.stringify(i)),t==="voiceLanguage"&&this.voiceLanguageSubject.next(e),t==="useEnterToSend"&&this.enterToSendSubject.next(e),t==="voiceAnnounceEnabled"&&this.voiceAnnounceEnabledSubject.next(e),t==="voiceMode"&&this.voiceModeSubject.next(e),t==="voiceReadFullText"&&this.voiceReadFullTextSubject.next(e),t==="voiceVolume"&&this.voiceVolumeSubject.next(e),t==="voiceRate"&&this.voiceRateSubject.next(e),t==="selectedVoice"&&this.selectedVoiceSubject.next(e),t==="printTechnicalMessages"&&this.printTechnicalMessagesSubject.next(e),t==="hideTechnicalMessages"&&this.hideTechnicalMessagesSubject.next(e)}catch(r){console.error("Failed to set preference:",r)}}setVoiceLanguage(t){console.log("[PREFERENCES] Setting voice language to:",t),this.setPreference("voiceLanguage",t)}getVoiceLanguage(){return this.getPreference("voiceLanguage","en-US")??"en-US"}setEnterToSend(t){console.log("[PREFERENCES] Setting Enter to send to:",t),this.setPreference("useEnterToSend",t)}getEnterToSend(){return this.getPreference("useEnterToSend",!1)??!1}setVoiceAnnounceEnabled(t){console.log("[PREFERENCES] Setting voice announce enabled to:",t),this.setPreference("voiceAnnounceEnabled",t)}getVoiceAnnounceEnabled(){return this.getPreference("voiceAnnounceEnabled",!1)??!1}setVoiceMode(t){console.log("[PREFERENCES] Setting voice mode to:",t),this.setPreference("voiceMode",t)}getVoiceMode(){return this.getPreference("voiceMode","speech")??"speech"}setVoiceReadFullText(t){console.log("[PREFERENCES] Setting voice read full text to:",t),this.setPreference("voiceReadFullText",t)}getVoiceReadFullText(){return this.getPreference("voiceReadFullText",!1)??!1}setVoiceVolume(t){let e=Math.max(0,Math.min(1,t));console.log("[PREFERENCES] Setting voice volume to:",e),this.setPreference("voiceVolume",e)}getVoiceVolume(){return this.getPreference("voiceVolume",.8)??.8}setVoiceRate(t){let e=Math.max(.5,Math.min(2,t));console.log("[PREFERENCES] Setting voice rate to:",e),this.setPreference("voiceRate",e)}getVoiceRate(){return this.getPreference("voiceRate",1.2)??1.2}setSelectedVoice(t){console.log("[PREFERENCES] Setting selected voice to:",t),this.setPreference("selectedVoice",t)}getSelectedVoice(){return this.getPreference("selectedVoice",null)??null}setPrintTechnicalMessages(t){console.log("[PREFERENCES] Setting print technical messages to:",t),this.setPreference("printTechnicalMessages",t)}getPrintTechnicalMessages(){return this.getPreference("printTechnicalMessages",!1)??!1}setHideTechnicalMessages(t){console.log("[PREFERENCES] Setting hide technical messages to:",t),this.setPreference("hideTechnicalMessages",t)}getHideTechnicalMessages(){return this.getPreference("hideTechnicalMessages",!0)??!0}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var xL=n=>({"user-message-wrapper":n});function IL(n,t){if(n&1&&(m(0,"div",5)(1,"div",8),b(2),g()()),n&2){let e=w(2);y(2),ke(" ",e.message.speaker," ")}}function kL(n,t){if(n&1&&(m(0,"div",7),ie(1,"app-message-context-menu",9),g()),n&2){let e=w(2);y(),j("actions",e.actions)}}function AL(n,t){if(n&1&&(O(0,IL,3,1,"div",5),ie(1,"div",6),O(2,kL,2,1,"div",7)),n&2){let e=w();R(e.shouldShowSpeaker?0:-1),y(),j("innerHTML",e.renderedContent,es),y(),R(e.isLongMessage&&e.shouldShowActions&&e.message.role==="assistant"?2:-1)}}function OL(n,t){if(n&1&&(m(0,"a",11),b(1,"view"),g()),n&2){let e=w(2);j("href",e.eventLink,Hi)}}function RL(n,t){if(n&1&&(m(0,"div",2),ie(1,"span",10),O(2,OL,2,1,"a",11),g()),n&2){let e=w();y(),j("innerHTML",e.renderedContent,es),y(),R(e.eventLink?2:-1)}}function PL(n,t){if(n&1&&(m(0,"div",3),ie(1,"app-message-context-menu",9),g()),n&2){let e=w();y(),j("actions",e.actions)}}function NL(n,t){if(n&1&&(m(0,"div",4),ie(1,"app-message-context-menu",9),g()),n&2){let e=w();y(),j("actions",e.actions)}}var Jf=class n{destroy$=new A;message;canDelete=!0;copyRequested=new U;deleteRequested=new U;renderedContent="";shouldHideTechnical=!1;sanitizer=f(Yi);notificationService=f(Xf);preferencesService=f(Mt);get messageClasses(){return{[this.message.role]:!0,[this.message.type]:!0,"hidden-technical":this.shouldHideTechnical&&this.message.type==="technical"}}ngOnInit(){return xe(this,null,function*(){yield this.renderMarkdown(),this.preferencesService.hideTechnicalMessages$.pipe(F(this.destroy$)).subscribe(t=>{this.shouldHideTechnical=t}),this.shouldHideTechnical=this.preferencesService.getHideTechnicalMessages()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}get shouldShowSpeaker(){return!1}get shouldShowActions(){return this.message.role==="user"||this.message.role==="assistant"}get isSimplified(){return this.message.role!=="user"&&this.message.role!=="assistant"}get isLongMessage(){let t=this.extractTextContent();return t.length>1e3||t.split(`
77
+ `).length>20}get actions(){let t=[];return this.message.role==="user"&&this.canDelete&&t.push({icon:"delete",label:"Delete from here",tooltip:"Delete this message and all following messages",action:()=>this.onDelete(),destructive:!0}),t.push({icon:"content_copy",label:"Copy message",tooltip:"Copy message content to clipboard",action:()=>this.onCopy()}),t}get eventLink(){if(!this.message.eventId)return null;let e=new URLSearchParams(window.location.search).get("clientId");return e?`/api/event/${this.message.eventId}?clientId=${e}`:null}renderMarkdown(){return xe(this,null,function*(){try{let t=yield this.renderRichContent(this.message.content);this.renderedContent=this.sanitizer.bypassSecurityTrustHtml(t)}catch(t){console.error("Error parsing rich content:",t);let e=this.extractTextContent();this.renderedContent=this.sanitizer.bypassSecurityTrustHtml(e)}})}renderRichContent(t){return xe(this,null,function*(){let e=[];for(let r of t)if(r.type==="text"){let i=yield De.parse(r.content);e.push(`<div class="text-part">${i}</div>`)}else if(r.type==="image"){let i=`data:${r.mimeType};base64,${r.content}`,o=r.source||"Image",s=`
78
+ <div class="image-content">
79
+ <img src="${i}"
80
+ alt="${o}"
81
+ class="message-image"
82
+ style="max-width: 100%; height: auto; margin: 8px 0; border-radius: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); transition: transform 0.2s ease, box-shadow 0.2s ease;"
83
+ onclick="window.open(this.src, '_blank')" />
84
+ </div>
85
+ `;e.push(s)}return e.join("")})}onCopy(){let t=this.extractTextContent();t.trim()&&navigator.clipboard.writeText(t).then(()=>{console.log("[CHAT-MESSAGE] Message copied to clipboard"),this.notificationService.success("Message copied to clipboard")}).catch(e=>{console.error("[CHAT-MESSAGE] Failed to copy message:",e),this.notificationService.error("Failed to copy message")}),this.copyRequested.emit(this.message)}onDelete(){console.log("[CHAT-MESSAGE] Delete requested for message:",this.message.id),this.deleteRequested.emit(this.message)}extractTextContent(){return this.message.content.filter(t=>t.type==="text").map(t=>t.content).join(`
86
+
87
+ `)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-chat-message"]],inputs:{message:"message",canDelete:"canDelete"},outputs:{copyRequested:"copyRequested",deleteRequested:"deleteRequested"},decls:6,vars:8,consts:[[1,"message-wrapper",3,"ngClass"],[1,"message",3,"ngClass"],[1,"simple-content","markdown-content"],[1,"actions","assistant-top-actions"],[1,"actions","user-top-actions"],[1,"message-header"],[1,"content","markdown-content",3,"innerHTML"],[1,"actions","bottom-actions"],[1,"speaker"],[3,"actions"],[3,"innerHTML"],["target","_blank",1,"event-link",3,"href"]],template:function(e,r){e&1&&(m(0,"div",0)(1,"div",1),O(2,AL,3,3),O(3,RL,3,2,"div",2),g(),O(4,PL,2,1,"div",3),O(5,NL,2,1,"div",4),g()),e&2&&(j("ngClass",jg(6,xL,r.message.role==="user")),y(),j("ngClass",r.messageClasses),y(),R(r.isSimplified?-1:2),y(),R(r.isSimplified?3:-1),y(),R(!r.isLongMessage&&r.shouldShowActions&&r.message.role==="assistant"?4:-1),y(),R(r.shouldShowActions&&r.message.role==="user"?5:-1))},dependencies:[Qf,nv],styles:[".message-wrapper[_ngcontent-%COMP%]{margin:0;display:flex;align-items:flex-start;gap:.5rem}.message-wrapper.user-message-wrapper[_ngcontent-%COMP%]{margin:.75rem 0;flex-direction:row-reverse;align-items:flex-start}.message[_ngcontent-%COMP%]{position:relative}.message.user[_ngcontent-%COMP%]{padding:1rem 1.25rem;background:var(--color-message-user);border-radius:18px 18px 6px;border:1px solid var(--glass-border);box-shadow:none;backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);width:fit-content;max-width:75%;min-width:120px;word-wrap:break-word;transition:transform .2s ease,box-shadow .2s ease}.message.user[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 12px 40px #1f268733}.message.assistant[_ngcontent-%COMP%]{background:transparent;border:none;box-shadow:none;border-radius:0;margin-left:0;margin-right:auto;padding:.5rem 0;width:100%;max-width:none;min-width:0}.message.system[_ngcontent-%COMP%], .message.technical[_ngcontent-%COMP%]{padding:.5rem .75rem;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;margin:.5rem 0;font-family:SF Mono,Monaco,Menlo,monospace;font-size:.85rem;color:var(--color-text-secondary);max-width:none;width:auto;min-width:auto}.message.system[_ngcontent-%COMP%]:hover, .message.technical[_ngcontent-%COMP%]:hover{transform:none;box-shadow:none}.message.hidden-technical[_ngcontent-%COMP%]{display:none!important}.message.error[_ngcontent-%COMP%]{padding:1rem 1.25rem;background:#ff3b301f;border-left:3px solid var(--color-error);color:var(--color-error)}.message.warning[_ngcontent-%COMP%]{padding:1rem 1.25rem;background:#ff95001f;border-left:3px solid var(--color-warning);color:var(--color-warning)}.message-header[_ngcontent-%COMP%]{margin-bottom:.5rem}.speaker[_ngcontent-%COMP%]{font-weight:600;font-size:.85rem;color:var(--color-text-secondary, #6272a4)}.content[_ngcontent-%COMP%]{line-height:1.5}.context-menu-top[_ngcontent-%COMP%]{top:.5rem;right:.5rem;z-index:10}.context-menu-bottom[_ngcontent-%COMP%]{bottom:.5rem;right:.5rem;z-index:10}.user-top-actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding-top:.5rem;opacity:0;transition:opacity .2s ease}.user-message-wrapper[_ngcontent-%COMP%]:hover .user-top-actions[_ngcontent-%COMP%]{opacity:1}.assistant-top-actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding-top:.5rem;opacity:0;transition:opacity .2s ease}.message-wrapper[_ngcontent-%COMP%]:hover .assistant-top-actions[_ngcontent-%COMP%]{opacity:1}.simple-content[_ngcontent-%COMP%]{display:flex}.simple-content[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]{margin-left:5px;font-size:.9em;color:var(--color-link, #3498db);text-decoration:none}.simple-content[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.text-part[_ngcontent-%COMP%]{margin:4px 0}.image-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin:1em 0}.message-image[_ngcontent-%COMP%]{display:block;max-width:100%;height:auto;margin:8px 0;border-radius:12px;cursor:pointer;box-shadow:var(--glass-shadow);transition:transform .3s ease,box-shadow .3s ease;border:1px solid var(--glass-border)}.message-image[_ngcontent-%COMP%]:hover{transform:scale(1.02) translateY(-2px);box-shadow:0 16px 48px #00000026}@media (max-width: 768px){.message-image[_ngcontent-%COMP%]{border-radius:4px;margin:6px 0}}@media (max-width: 480px){.message-image[_ngcontent-%COMP%]{margin:4px 0}}"]})};var Bs=class n{unreadCountSubject=new Z(0);unreadCount$=this.unreadCountSubject.asObservable();constructor(){console.log("[UNREAD] Service initialized")}addUnread(){let e=this.unreadCountSubject.value+1;this.unreadCountSubject.next(e),console.log("[UNREAD] Added unread message, total:",e)}markAllAsRead(){this.unreadCountSubject.value>0&&(this.unreadCountSubject.next(0),console.log("[UNREAD] Marked all messages as read"))}getCurrentCount(){return this.unreadCountSubject.value}reset(){this.unreadCountSubject.next(0),console.log("[UNREAD] Counter reset")}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var Us=class n{destroy$=new A;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new Z(!1);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=f(Mt);constructor(){this.initializeSpeechSynthesis(),this.subscribeToPreferences()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.stopSpeech()}initializeSpeechSynthesis(){if(!("speechSynthesis"in window)){console.warn("[VOICE-SERVICE] Speech synthesis not available"),this.voices=new Promise(t=>t([]));return}this.voices=new Promise((t,e)=>{let r=speechSynthesis.getVoices();if(r.length)t(r);else{let i=setTimeout(()=>{e("no voices found")},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let o=speechSynthesis.getVoices();o.length&&(clearTimeout(i),t(o))})}}),console.log("[VOICE-SERVICE] Speech synthesis initialized")}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe(F(this.destroy$)).subscribe(t=>{this.volume=t,console.log("[VOICE-SERVICE] Volume updated to:",t)}),this.preferencesService.voiceRate$.pipe(F(this.destroy$)).subscribe(t=>{this.rate=t,console.log("[VOICE-SERVICE] Rate updated to:",t)}),this.preferencesService.voiceLanguage$.pipe(F(this.destroy$)).subscribe(t=>{this.language=t,console.log("[VOICE-SERVICE] Language updated to:",t),this.updateSelectedVoiceForLanguage()}),this.preferencesService.selectedVoice$.pipe(F(this.destroy$)).subscribe(t=>{this.setSelectedVoice(t)}),this.volume=this.preferencesService.getVoiceVolume(),this.rate=this.preferencesService.getVoiceRate(),this.language=this.preferencesService.getVoiceLanguage(),this.setSelectedVoice(this.preferencesService.getSelectedVoice())}isReady(){return"speechSynthesis"in window&&this.selectedVoice!==void 0}isSpeaking(){return speechSynthesis.speaking}speak(t,e){return xe(this,null,function*(){if(!this.selectedVoice)return console.warn("[VOICE-SERVICE] No voice selected"),!1;if(!t.trim())return console.warn("[VOICE-SERVICE] No text to speak"),!1;let r=this.extractPlainText(t);if(!r.trim())return console.warn("[VOICE-SERVICE] No text to speak after markdown cleaning"),!1;this.stopSpeech();try{let i=new SpeechSynthesisUtterance(r);i.voice=this.selectedVoice,i.lang=this.selectedVoice.lang,i.volume=this.volume,i.rate=this.rate,this.currentOnEndCallback=e||null,e&&(i.onend=()=>{this.currentOnEndCallback===e&&(this.currentOnEndCallback=null,e())},i.onerror=()=>{this.currentOnEndCallback===e&&(this.currentOnEndCallback=null,e())}),this.currentUtterance=i,this.speakingSubject.next(!0);let o=i.onend,s=i.onerror;return i.onend=a=>{this.speakingSubject.next(!1),o&&o.call(i,a)},i.onerror=a=>{this.speakingSubject.next(!1),s&&s.call(i,a)},speechSynthesis.speak(i),console.log("[VOICE-SERVICE] Started speaking:",t.substring(0,50)+"..."),!0}catch(i){return console.error("[VOICE-SERVICE] Error speaking:",i),!1}})}stopSpeech(){if(this.currentUtterance||speechSynthesis.speaking){if(speechSynthesis.cancel(),this.currentUtterance=null,this.currentOnEndCallback){let t=this.currentOnEndCallback;this.currentOnEndCallback=null,t()}this.speakingSubject.next(!1),console.log("[VOICE-SERVICE] Speech stopped")}}ding(){try{let t=new(window.AudioContext||window.webkitAudioContext),e=t.createOscillator(),r=t.createGain();e.connect(r),r.connect(t.destination),e.frequency.setValueAtTime(800,t.currentTime),r.gain.setValueAtTime(.1,t.currentTime),r.gain.exponentialRampToValueAtTime(.01,t.currentTime+.1),e.start(t.currentTime),e.stop(t.currentTime+.1),console.log("[VOICE-SERVICE] Notification sound played")}catch(t){console.error("[VOICE-SERVICE] Notification sound failed:",t)}}getVoicesForLanguage(){return xe(this,null,function*(){try{let t=this.language.slice(0,2),e=yield this.voices;if(!e||e.length===0)return console.warn("[VOICE-SERVICE] No voices available on system"),[];let r=e.filter(i=>i.lang.toLowerCase().startsWith(t)).sort((i,o)=>i.localService&&!o.localService?-1:!i.localService&&o.localService?1:i.name.localeCompare(o.name));return console.log("[VOICE-SERVICE] Found matching voices:",r.length,"for language:",t),r.map(i=>({name:i.name,lang:i.lang,localService:i.localService,default:i.default,displayName:this.formatVoiceDisplayName(i)}))}catch(t){return console.error("[VOICE-SERVICE] Error getting voices for language:",t),[]}})}formatVoiceDisplayName(t){let e=t.localService?"\u{1F3E0}":"\u2601\uFE0F",r=t.default?" \u2B50":"";return`${e} ${t.name} (${t.lang})${r}`}setSelectedVoice(t){return xe(this,null,function*(){if(!t){this.selectedVoice=void 0;return}let[e,r]=t.split("|");if(!e||!r){this.selectedVoice=void 0;return}let i=(yield this.voices)?.find(o=>o.name===e&&o.lang===r);i?(this.selectedVoice=i,console.log("[VOICE-SERVICE] Selected voice:",i.name,i.lang)):(this.selectedVoice=void 0,console.warn("[VOICE-SERVICE] Voice not found:",e,r))})}updateSelectedVoiceForLanguage(){return xe(this,null,function*(){let t=yield this.getVoicesForLanguage();if(t.length===0){console.warn("[VOICE-SERVICE] No voices available for language:",this.language),this.selectedVoice=void 0,this.preferencesService.setSelectedVoice(null);return}let e=this.preferencesService.getSelectedVoice();if(e){let[i,o]=e.split("|"),s=o?.slice(0,2),a=this.language.slice(0,2);if(s===a&&t.some(l=>l.name===i&&l.lang===o)){console.log("[VOICE-SERVICE] Keeping current voice for language:",e);return}}let r=t[0];if(r){let i=`${r.name}|${r.lang}`;this.preferencesService.setSelectedVoice(i),console.log("[VOICE-SERVICE] Auto-selected voice for language change:",r.displayName)}})}testSelectedVoice(){setTimeout(()=>{if(!this.selectedVoice){console.log("[VOICE-SERVICE] No voice selected for test");return}this.stopSpeech();let t=this.getTestText();t&&this.speak(t)},100)}getTestText(){let t=this.language.slice(0,2),e={fr:"Bonjour, ceci est un test de la voix s\xE9lectionn\xE9e.",en:"Hello, this is a test of the selected voice.",es:"Hola, esta es una prueba de la voz seleccionada.",de:"Hallo, dies ist ein Test der ausgew\xE4hlten Stimme.",it:"Ciao, questo \xE8 un test della voce selezionata.",pt:"Ol\xE1, este \xE9 um teste da voz selecionada.",ja:"\u3053\u3093\u306B\u3061\u306F\u3001\u3053\u308C\u306F\u9078\u629E\u3055\u308C\u305F\u97F3\u58F0\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002",ko:"\uC548\uB155\uD558\uC138\uC694, \uC774\uAC83\uC740 \uC120\uD0DD\uB41C \uC74C\uC131\uC758 \uD14C\uC2A4\uD2B8\uC785\uB2C8\uB2E4.",zh:"\u4F60\u597D\uFF0C\u8FD9\u662F\u6240\u9009\u8BED\u97F3\u7684\u6D4B\u8BD5\u3002",ru:"\u041F\u0440\u0438\u0432\u0435\u0442, \u044D\u0442\u043E \u0442\u0435\u0441\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0433\u043E\u043B\u043E\u0441\u0430.",ar:"\u0645\u0631\u062D\u0628\u0627\u060C \u0647\u0630\u0627 \u0627\u062E\u062A\u0628\u0627\u0631 \u0644\u0644\u0635\u0648\u062A \u0627\u0644\u0645\u062D\u062F\u062F."};return e[t]||e.en||"Hello, this is a test."}extractPlainText(t){let e=t.replace(/[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|⭐/gu,"").replace(/```[\s\S]*?```/g,"code block").replace(/`([^`]+)`/g,"$1").replace(/\*\*\*(.*?)\*\*\*/g,"$1").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/~~(.*?)~~/g,"$1").replace(/#{1,6}\s*(.*)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/https?:\/\/[^\s]+/g,"link").replace(/&nbsp;/g," ").replace(/&amp;/g,"and").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');return e=this.addNaturalPunctuation(e),e.replace(/\s+/g," ").trim()}addNaturalPunctuation(t){return t.replace(/\n+/g,`
88
+ `).split(`
89
+ `).map(e=>this.addPeriodIfNeeded(e.trim())).filter(e=>e.length>0).join(" ")}addPeriodIfNeeded(t){return t?/[.!?;:]$/.test(t)?t:t+".":""}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};function LM(n,t=80){if(n.length<=t)return n;try{if(n.trim().startsWith("{")||n.trim().startsWith("[")){let e=JSON.parse(n),r=JSON.stringify(e);return r.length<=t?r:r.substring(0,t)+`...(${r.length} chars)`}}catch{}return n.substring(0,t)+"..."}var Kt=class{constructor(t,e){this.type=e;if(t.timestamp)this.timestamp=t.timestamp;else{let r=Math.random().toString(36).substring(2,7);this.timestamp=`${new Date().toISOString()}-${r}`}this.parentKey=t.parentKey,this.length=0}timestamp;parentKey;static type;length},eh=class extends Kt{invite;constructor(t,e){super(t,e),this.invite=t.invite}buildAnswer(t){return new hi({answer:t,parentKey:this.timestamp,invite:this.invite})}},Hs=class n extends Kt{static type="heartbeat";constructor(t){super(t,n.type)}},$s=class n extends eh{defaultValue;static type="invite";constructor(t){super(t,n.type),this.defaultValue=t.defaultValue}},ob="InviteEventDefault",hi=class n extends Kt{answer;invite;static type="answer";constructor(t){super(t,n.type),this.answer=t.answer??"No answer",this.invite=t.invite}},zs=class n extends Kt{speaker;text;static type="text";constructor(t){super(t,n.type),this.speaker=t.speaker,this.text=t.text}},Ws=class n extends Kt{warning;static type="warn";constructor(t){super(t,n.type),this.warning=t.warning}},Lr=class n extends Kt{error;static type="error";constructor(t){super(t,n.type),this.error=t.error}},Gs=class n extends eh{options;optionalQuestion;static type="choice";constructor(t){super(t,n.type),this.options=t.options,this.optionalQuestion=t.optionalQuestion}},qs=class n extends Kt{toolRequestId;name;args;static type="tool_request";constructor(t){super(t,n.type),this.toolRequestId=t.toolRequestId??this.timestamp,this.name=t.name,this.args=t.args,this.length=this.args.length+this.name.length+this.toolRequestId.length+20}buildResponse(t){return new go({output:t,toolRequestId:this.toolRequestId,parentKey:this.timestamp})}toSingleLineString(t=50){let e=LM(this.args,t);return`\u{1F527} ${this.name}(${e})`}},go=class n extends Kt{toolRequestId;output;static type="tool_response";constructor(t){if(super(t,n.type),this.toolRequestId=t.toolRequestId||this.timestamp||new Date().toISOString(),this.output=t.output,typeof this.output=="string")this.length=this.output.length+this.toolRequestId.length+20;else if(this.output.type==="text")this.length=this.output.content.length+this.toolRequestId.length+20;else if(this.output.type==="image"){let e=(this.output.width??0)*(this.output.height??0)/750;this.length=(e?e*3.5:this.output.content.length)+this.toolRequestId.length+20}else this.length=this.toolRequestId.length+20}getTextOutput(){return typeof this.output=="string"?this.output:this.output.type==="text"?this.output.content:this.output.type==="image"?`[Image: ${this.output.mimeType}]`:""}toSingleLineString(t=50){let e=this.getTextOutput(),r=LM(e,t),i=typeof this.output!="string"&&this.output.type==="image"?" [image]":"";return`\u2B91 ${r}${i}`}},pi=class n extends Kt{projectName;static type="project_selected";constructor(t){super(t,n.type),this.projectName=t.projectName}},mi=class n extends Kt{threadId;threadName;static type="thread_selected";constructor(t){super(t,n.type),this.threadId=t.threadId,this.threadName=t.threadName}},vo=class n extends Kt{static type="thinking";static debounce=5e3;constructor(t){super(t,n.type)}},Ys=class n extends Kt{role;name;content;static type="message";constructor(t){super(t,n.type),this.role=t.role,this.name=t.name,this.content=t.content,this.length=this.content.map(e=>{if(e.type==="text")return e.content.length;if(e.type==="image"){let r=(e.width||0)*(e.height||0)/750;return r?r*3.5:e.content.length}return 0}).reduce((e,r)=>e+r,0)}getTextContent(){return this.content.filter(t=>t.type==="text").map(t=>t.content).join(`
90
+ `)}},FL={[Ys.type]:Ys,[hi.type]:hi,[Gs.type]:Gs,[Lr.type]:Lr,[Hs.type]:Hs,[$s.type]:$s,[pi.type]:pi,[mi.type]:mi,[qs.type]:qs,[go.type]:go,[zs.type]:zs,[vo.type]:vo,[Ws.type]:Ws};function VM(n){let t=FL[n.type];return t?new t(n):void 0}var ur=class n{clientId;http=f(tr);constructor(){this.clientId=this.getOrCreateClientId()}getOrCreateClientId(){let e=new URLSearchParams(window.location.search).get("clientId");if(!e){e=Math.random().toString(36).substring(2,15);let r=new URL(window.location.href);r.searchParams.set("clientId",e),window.history.pushState({},"",r)}return e}getClientId(){return this.clientId}sendEvent(t){return this.http.post(`/api/message?clientId=${this.clientId}`,t,{observe:"response",responseType:"text"}).pipe(ge(e=>{e.status!==200&&console.warn("[API] Unexpected status:",e.status)}),V(e=>e.body))}stopExecution(){return this.http.post(`/api/stop?clientId=${this.clientId}`,{})}getEventDetails(t){return this.http.get(`/api/event/${t}?clientId=${this.clientId}`,{responseType:"text"})}getEventsUrl(){return`/events?clientId=${this.clientId}`}getSessionState(){return this.http.get(`/api/session/state?clientId=${this.clientId}`).pipe(ge(t=>console.log("[API] Session state received:",t)))}deleteMessage(t){let e=`/api/thread/message/${encodeURIComponent(t)}?clientId=${this.clientId}`;return this.http.delete(e).pipe(ge(r=>console.log("[API] Delete message response:",r)))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var Zs=class n{eventSource=null;eventsSubject=new A;connectionStatusSubject=new Z({connected:!1,reconnectAttempts:0,maxAttempts:3});reconnectAttempts=0;MAX_RECONNECT_ATTEMPTS=3;RECONNECT_DELAY=2e3;events$=this.eventsSubject.asObservable();connectionStatus$=this.connectionStatusSubject.asObservable();codayApi=f(ur);ngZone=f($);connect(){console.log("[SSE] Setting up new EventSource"),this.eventSource&&(console.log("[SSE] Closing existing EventSource"),this.eventSource.close());let t=this.codayApi.getEventsUrl();this.eventSource=new EventSource(t),this.eventSource.onmessage=e=>{this.ngZone.run(()=>{console.log("[SSE] Message received:",e.data.substring(0,100)),this.reconnectAttempts=0,this.updateConnectionStatus(!0,0);try{let r=JSON.parse(e.data),i=VM(r);i?(console.log("[SSE] Event:",i.type),this.eventsSubject.next(i)):console.warn("[SSE] Failed to build event:",r.type)}catch(r){console.error("[SSE] Parse error:",r.message)}})},this.eventSource.onopen=()=>{this.ngZone.run(()=>{console.log("[SSE] Connection established"),this.reconnectAttempts=0,this.updateConnectionStatus(!0,0)})},this.eventSource.onerror=e=>{this.ngZone.run(()=>{console.log("[SSE] EventSource error:",e),this.eventSource?.readyState===EventSource.CLOSED&&(console.log("[SSE] Connection closed"),this.updateConnectionStatus(!1,this.reconnectAttempts),this.reconnectAttempts<this.MAX_RECONNECT_ATTEMPTS?(console.log(`[SSE] Attempting reconnect ${this.reconnectAttempts+1}/${this.MAX_RECONNECT_ATTEMPTS}`),this.eventsSubject.next(new Lr({error:new Error(`Connection lost. Attempting to reconnect (${this.reconnectAttempts+1}/${this.MAX_RECONNECT_ATTEMPTS})...`)})),setTimeout(()=>{this.reconnectAttempts++,this.connect()},this.RECONNECT_DELAY)):(console.log("[SSE] Max reconnection attempts reached"),this.eventsSubject.next(new Lr({error:new Error("Connection lost permanently. Please refresh the page.")}))))})}}disconnect(){this.eventSource&&(console.log("[SSE] Disconnecting EventSource"),this.eventSource.close(),this.eventSource=null,this.updateConnectionStatus(!1,0))}isConnected(){return this.connectionStatusSubject.value.connected}updateConnectionStatus(t,e){this.connectionStatusSubject.next({connected:t,reconnectAttempts:e,maxAttempts:this.MAX_RECONNECT_ATTEMPTS})}ngOnDestroy(){this.disconnect(),this.eventsSubject.complete(),this.connectionStatusSubject.complete()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var Qt=class n{destroy$=new A;messagesSubject=new Z([]);isThinkingSubject=new Z(!1);currentChoiceSubject=new Z(null);projectTitleSubject=new Z("Coday");currentInviteEventSubject=new Z(null);messageToRestoreSubject=new Z("");currentChoiceEvent=null;thinkingTimeout=null;messages$=this.messagesSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();projectTitle$=this.projectTitleSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();connectionStatus$;tabTitleService=null;codayApi=f(ur);eventStream=f(Zs);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling()}setTabTitleService(t){this.tabTitleService=t}start(){this.eventStream.connect()}stop(){this.codayApi.stopExecution().subscribe({next:()=>console.log("[CODAY] Stop signal sent"),error:t=>console.error("[CODAY] Error stopping:",t)})}resetMessages(){console.log("[CODAY] Resetting messages for context change"),this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.stopThinking()}sendMessage(t){let e=this.currentInviteEventSubject.value;if(e){let r=e.buildAnswer(t);this.currentInviteEventSubject.next(null),this.codayApi.sendEvent(r).subscribe({error:i=>console.error("[CODAY] Send error:",i)})}else{let r=new hi({answer:t});this.codayApi.sendEvent(r).subscribe({error:i=>console.error("[CODAY] Send error:",i)})}}sendChoice(t){if(this.currentChoiceEvent){let e=this.currentChoiceEvent.buildAnswer(t);console.log("[CODAY-CHOICE] Choice sent successfully, clearing UI"),this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.codayApi.sendEvent(e).subscribe({next:()=>{},error:r=>{console.error("[CODAY-CHOICE] Choice error:",r)}})}else console.error("[CODAY-CHOICE] No choice event available for choice:",t)}deleteMessage(t){console.log("[CODAY] Deleting message:",t);let e=this.messagesSubject.value.find(i=>i.id===t),r=this.extractTextContentFromMessage(e);return this.codayApi.deleteMessage(t).pipe(ge(i=>{i.success?(console.log("[CODAY] Message deleted successfully, updating local messages"),this.removeMessagesFromIndex(t),r.trim()&&(console.log("[CODAY] Restoring deleted message content to textarea"),this.messageToRestoreSubject.next(r))):console.warn("[CODAY] Failed to delete message:",i.error)}))}getCurrentMessages(){return this.messagesSubject.value}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}initializeEventHandling(){this.eventStream.events$.pipe(F(this.destroy$)).subscribe({next:t=>this.handleEvent(t),error:t=>console.error("[CODAY] Event stream error:",t),complete:()=>console.log("[CODAY] Event stream completed")})}handleEvent(t){t instanceof Ys?this.handleMessageEvent(t):t instanceof zs?this.handleTextEvent(t):t instanceof hi?this.handleAnswerEvent(t):t instanceof Lr?this.handleErrorEvent(t):t instanceof Ws?this.handleWarnEvent(t):t instanceof vo?this.handleThinkingEvent(t):t instanceof qs?this.handleToolRequestEvent(t):t instanceof go?this.handleToolResponseEvent(t):t instanceof Gs?this.handleChoiceEvent(t):t instanceof pi?this.handleProjectSelectedEvent(t):t instanceof mi?this.handleThreadSelectedEvent(t):t instanceof Hs?this.handleHeartBeatEvent(t):t instanceof $s?this.handleInviteEvent(t):console.warn("[CODAY] Unhandled event type:",t.type)}handleMessageEvent(t){let e={id:t.timestamp,role:t.role,speaker:t.name,content:t.content,timestamp:new Date,type:"text"};this.addMessage(e)}handleTextEvent(t){let e={id:t.timestamp,role:t.speaker?"assistant":"system",speaker:t.speaker||"System",content:[{type:"text",content:t.text}],timestamp:new Date,type:t.speaker?"text":"technical"};this.addMessage(e)}handleAnswerEvent(t){let e={id:t.timestamp,role:"user",speaker:"User",content:[{type:"text",content:t.answer}],timestamp:new Date,type:"text"};this.addMessage(e)}handleErrorEvent(t){let e={id:t.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Error: ${JSON.stringify(t.error)}`}],timestamp:new Date,type:"error"};this.addMessage(e)}handleWarnEvent(t){let e={id:t.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Warning: ${JSON.stringify(t.warning)}`}],timestamp:new Date,type:"warning"};this.addMessage(e)}handleThinkingEvent(t){if(this.currentInviteEventSubject.value){console.log("[CODAY] Ignoring ThinkingEvent - active invite waiting for user response");return}if(this.currentChoiceEvent){console.log("[CODAY] Ignoring ThinkingEvent - active choice waiting for user response");return}this.clearThinkingTimeout(),this.isThinkingSubject.next(!0),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(!1),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive()},vo.debounce+1e3)}handleToolRequestEvent(t){let e={id:t.timestamp,role:"system",speaker:"System",content:[{type:"text",content:t.toSingleLineString()}],timestamp:new Date,type:"technical",eventId:t.timestamp};this.addMessage(e)}handleToolResponseEvent(t){let e={id:t.timestamp,role:"system",speaker:"System",content:[{type:"text",content:t.toSingleLineString()}],timestamp:new Date,type:"technical",eventId:t.timestamp};this.addMessage(e)}handleChoiceEvent(t){this.stopThinking(),this.currentChoiceEvent=t,this.tabTitleService?.setSystemInactive();let e=t.options.map(i=>({value:i,label:i})),r=t.optionalQuestion?`${t.optionalQuestion} ${t.invite}`:t.invite;this.currentChoiceSubject.next({options:e,label:r})}handleProjectSelectedEvent(t){console.log("[CODAY] Project selected:",t.projectName),this.resetMessages(),this.projectTitleSubject.next(t.projectName||"Coday")}handleThreadSelectedEvent(t){console.log("[CODAY] Thread selected:",t.threadId,t.threadName)}handleHeartBeatEvent(t){}handleInviteEvent(t){this.stopThinking();let e=this.messagesSubject.value,r=e[e.length-1];if(!(!(t.invite===ob)&&r&&r.role==="assistant"&&r.content.some(s=>s.type==="text"&&s.content.includes(t.invite)))&&t.invite!==ob){let s={id:t.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:t.invite}],timestamp:new Date,type:"text"};this.addMessage(s)}else console.log("[CODAY] Invite already displayed in last message, skipping duplicate");this.currentInviteEventSubject.next(t),this.tabTitleService?.setSystemInactive()}addMessage(t){let r=[...this.messagesSubject.value,t];this.messagesSubject.next(r)}removeMessagesFromIndex(t){let e=this.messagesSubject.value,r=e.findIndex(o=>o.id===t);if(r===-1){console.warn("[CODAY] Message not found for local deletion:",t);return}if(r===0){console.warn("[CODAY] Cannot delete first message locally");return}let i=e.slice(0,r);console.log(`[CODAY] Locally removed ${e.length-i.length} messages from index ${r}`),this.messagesSubject.next(i),this.stopThinking()}extractTextContentFromMessage(t){return t?t.content.filter(e=>e.type==="text").map(e=>e.content).join(`
91
+
92
+ `):""}clearThinkingTimeout(){this.thinkingTimeout&&(clearTimeout(this.thinkingTimeout),this.thinkingTimeout=null)}stopThinking(){this.clearThinkingTimeout(),this.isThinkingSubject.next(!1),this.tabTitleService&&this.tabTitleService.setSystemInactive()}ngOnDestroy(){this.clearThinkingTimeout(),this.destroy$.next(),this.destroy$.complete(),this.currentInviteEventSubject.complete(),this.messageToRestoreSubject.complete(),this.eventStream.disconnect()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var LL=(n,t)=>t.id;function VL(n,t){if(n&1){let e=J();m(0,"app-chat-message",3),x("copyRequested",function(i){I(e);let o=w();return k(o.onCopyMessage(i))})("deleteRequested",function(i){I(e);let o=w();return k(o.onDeleteMessage(i))}),g()}if(n&2){let e=t.$implicit,r=t.$index,i=w();j("message",e)("canDelete",i.canDeleteMessage(r))}}function jL(n,t){if(n&1){let e=J();m(0,"button",4),x("click",function(){I(e);let i=w();return k(i.goToBottom())}),m(1,"mat-icon",5),b(2,"arrow_downward"),g()()}}var th=class n{messages=[];isThinking=!1;copyRequested=new U;stopRequested=new U;lastMessageCount=0;destroy$=new A;isTracking=!0;showGoToBottom=!1;scrollContainer=null;lastScrollTop=0;NEAR_BOTTOM_THRESHOLD=100;scrollCheckTimeout;MESSAGE_FRESHNESS_THRESHOLD=300*1e3;elementRef=f(ue);unreadService=f(Bs);voiceSynthesisService=f(Us);preferencesService=f(Mt);codayService=f(Qt);ngOnInit(){this.findScrollContainer(),this.setupFocusListeners()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.scrollCheckTimeout&&clearTimeout(this.scrollCheckTimeout),window.removeEventListener("focus",this.handleWindowFocus),window.removeEventListener("blur",this.handleWindowBlur)}ngAfterViewChecked(){if(this.messages.length!==this.lastMessageCount){console.log("[CHAT-HISTORY] Message count changed:",this.lastMessageCount,"->",this.messages.length);let t=this.messages.length-this.lastMessageCount;t>0&&(this.handleNewMessages(t),this.handleVoiceAnnouncement(t)),this.lastMessageCount=this.messages.length,this.isTracking&&this.scrollToBottom()}this.scrollContainer||this.findScrollContainer()}scrollToBottom(){try{this.scrollContainer||this.findScrollContainer(),this.scrollContainer&&setTimeout(()=>{this.scrollContainer&&this.scrollContainer.scrollTo({top:this.scrollContainer.scrollHeight,behavior:"smooth"})},50)}catch(t){console.error("Error scrolling to bottom:",t)}}trackByMessageId(t,e){return e.id}onCopyMessage(t){let e=t.content.filter(r=>r.type==="text").map(r=>r.content).join(`
93
+
94
+ `);navigator.clipboard.writeText(e).then(()=>console.log("Message copied")).catch(r=>console.error("Failed to copy:",r)),this.copyRequested.emit(t)}onStop(){this.stopRequested.emit()}canDeleteMessage(t){return!(t===0||this.isThinking)}onDeleteMessage(t){if(console.log("[CHAT-HISTORY] Delete requested for message:",t.id),this.messages.findIndex(i=>i.id===t.id)===0){console.warn("[CHAT-HISTORY] Cannot delete first message");return}if(this.isThinking){console.warn("[CHAT-HISTORY] Cannot delete message while agent is thinking");return}if(t.role!=="user"){console.warn("[CHAT-HISTORY] Can only delete user messages");return}confirm(`Delete this message and all following messages?
95
+
96
+ This action cannot be undone once you post another message.`)&&(console.log("[CHAT-HISTORY] Proceeding with message deletion"),this.codayService.deleteMessage(t.id).subscribe({next:i=>{i.success?console.log("[CHAT-HISTORY] Message deleted successfully"):(console.error("[CHAT-HISTORY] Failed to delete message:",i.error),alert(`Failed to delete message: ${i.error}`))},error:i=>{console.error("[CHAT-HISTORY] Error deleting message:",i),alert(`Error deleting message: ${i.message||"Unknown error"}`)}}))}onScroll(){}findScrollContainer(){let t=this.elementRef.nativeElement;this.scrollContainer=t.closest(".chat-wrapper"),this.scrollContainer?(console.log("[CHAT-HISTORY] Scroll container found"),this.scrollContainer.addEventListener("scroll",this.handleScroll.bind(this)),this.lastScrollTop=this.scrollContainer.scrollTop,this.checkScrollPosition()):(console.warn("[CHAT-HISTORY] Scroll container not found"),setTimeout(()=>this.findScrollContainer(),100))}handleScroll=()=>{if(!this.scrollContainer)return;let t=this.scrollContainer.scrollTop,e=t>this.lastScrollTop?"down":"up",r=Math.abs(t-this.lastScrollTop);if(r<5){this.lastScrollTop=t;return}console.log("[CHAT-HISTORY] Scroll direction:",e,"delta:",r,"position:",t),e==="up"&&this.isTracking&&r>10&&(console.log("[CHAT-HISTORY] User scrolled up significantly - exiting tracking mode"),this.isTracking=!1,this.showGoToBottom=!0),this.checkScrollPosition(),this.lastScrollTop=t,clearTimeout(this.scrollCheckTimeout),this.scrollCheckTimeout=setTimeout(()=>{},150)};checkScrollPosition(){if(!this.scrollContainer)return;let{scrollTop:t,scrollHeight:e,clientHeight:r}=this.scrollContainer,o=e-t-r<=this.NEAR_BOTTOM_THRESHOLD;o&&!this.isTracking&&(console.log("[CHAT-HISTORY] Near bottom - entering tracking mode"),this.isTracking=!0,this.showGoToBottom=!1,this.unreadService.markAllAsRead()),!this.isTracking&&!o&&(this.showGoToBottom=!0)}goToBottom(){console.log("[CHAT-HISTORY] Go to bottom clicked"),this.scrollToBottom(),this.isTracking=!0,this.showGoToBottom=!1,this.unreadService.markAllAsRead()}handleNewMessages(t){let r=this.messages.slice(-t).filter(o=>o.role==="assistant");if(r.length===0){console.log("[CHAT-HISTORY] No new assistant messages to count");return}if(this.shouldMarkNewMessagesAsUnread()){console.log("[CHAT-HISTORY] Marking",r.length,"new assistant messages as unread");for(let o=0;o<r.length;o++)this.unreadService.addUnread()}else console.log("[CHAT-HISTORY] New assistant messages are considered read (user is focused and tracking)")}shouldMarkNewMessagesAsUnread(){return document.hasFocus()?this.isTracking?!1:(console.log("[CHAT-HISTORY] User is not tracking (scrolled up) -> unread"),!0):(console.log("[CHAT-HISTORY] Tab does not have focus -> unread"),!0)}setupFocusListeners(){window.addEventListener("focus",this.handleWindowFocus),window.addEventListener("blur",this.handleWindowBlur)}handleWindowFocus=()=>{console.log("[CHAT-HISTORY] Window gained focus"),this.isTracking&&(console.log("[CHAT-HISTORY] User is tracking and focused -> marking messages as read"),this.unreadService.markAllAsRead())};handleWindowBlur=()=>{console.log("[CHAT-HISTORY] Window lost focus")};handleVoiceAnnouncement(t){if(!this.preferencesService.getVoiceAnnounceEnabled())return;let i=this.messages.slice(-t).filter(a=>a.role==="assistant");if(i.length===0){console.log("[CHAT-HISTORY] No new assistant messages to announce");return}let o=i[i.length-1];if(!o){console.warn("[CHAT-HISTORY] No last assistant message found");return}if(!this.isMessageRecentEnoughForAnnouncement(o)){console.log("[CHAT-HISTORY] Message too old for voice announcement");return}if(this.preferencesService.getVoiceMode()==="notification")console.log("[CHAT-HISTORY] Playing notification sound for new assistant message"),this.voiceSynthesisService.ding();else{let a=this.extractTextContentFromMessage(o);if(a.trim()){console.log("[CHAT-HISTORY] Announcing new assistant message via speech");let l=this.preferencesService.getVoiceReadFullText()?a:this.extractPartialText(a);this.voiceSynthesisService.speak(l).then(d=>{d||console.warn("[CHAT-HISTORY] Failed to announce message via speech")}).catch(d=>{console.error("[CHAT-HISTORY] Error during voice announcement:",d)})}}}isMessageRecentEnoughForAnnouncement(t){try{let e=t.timestamp.getTime();return Date.now()-e<=this.MESSAGE_FRESHNESS_THRESHOLD}catch(e){return console.warn("[CHAT-HISTORY] Error checking message freshness:",e),!0}}extractTextContentFromMessage(t){return t.content.filter(e=>e.type==="text").map(e=>e.content).join(`
97
+
98
+ `)}extractPartialText(t){return t.split(`
99
+ `).filter(s=>s.trim().length>0).reduce((s,a)=>{if(s.paragraphs>=3)return s;let c=a.length>80?1:0;return{paragraphs:s.paragraphs+c,text:s.text+(s.text?`
100
+ `:"")+a}},{paragraphs:0,text:""}).text||t}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-chat-history"]],hostBindings:function(e,r){e&1&&x("scroll",function(){return r.onScroll()})},inputs:{messages:"messages",isThinking:"isThinking"},outputs:{copyRequested:"copyRequested",stopRequested:"stopRequested"},decls:4,vars:1,consts:[[1,"chat-history"],[3,"message","canDelete"],["title","Go to bottom",1,"go-to-bottom-btn"],[3,"copyRequested","deleteRequested","message","canDelete"],["title","Go to bottom",1,"go-to-bottom-btn",3,"click"],["fontSet","material-icons-outlined"]],template:function(e,r){e&1&&(m(0,"div",0),ot(1,VL,1,2,"app-chat-message",1,LL),O(3,jL,3,0,"button",2),g()),e&2&&(y(),st(r.messages),y(2),R(r.showGoToBottom?3:-1))},dependencies:[Jf,vn],styles:[".go-to-bottom-btn[_ngcontent-%COMP%]{position:fixed;bottom:120px;right:2rem;z-index:1000;width:48px;height:48px;border-radius:50%;border:none;background:var(--color-primary, #007acc);color:var(--color-text-inverse, #ffffff);font-size:1.2rem;font-weight:700;cursor:pointer;box-shadow:0 4px 12px #00000026;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.go-to-bottom-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #005a9e);transform:scale(1.05);box-shadow:0 6px 16px #0003}.go-to-bottom-btn[_ngcontent-%COMP%]:active{transform:scale(.95)}@media (max-width: 768px){.go-to-bottom-btn[_ngcontent-%COMP%]{right:1rem;bottom:100px;width:40px;height:40px;font-size:1rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;position:static!important}.chat-history[_ngcontent-%COMP%]{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;position:static!important}.go-to-bottom-btn[_ngcontent-%COMP%]{display:none!important}}"]})};var YM=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||n)(ye(it),ye(ue))};static \u0275dir=fe({type:n})}return n})(),nl=(()=>{class n extends YM{static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275dir=fe({type:n,features:[Ne]})}return n})(),ea=new T("");var BL={provide:ea,useExisting:Ht(()=>fr),multi:!0};function UL(){let n=hn()?hn().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var HL=new T(""),fr=(()=>{class n extends YM{_compositionMode;_composing=!1;constructor(e,r,i){super(e,r),this._compositionMode=i,this._compositionMode==null&&(this._compositionMode=!UL())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||n)(ye(it),ye(ue),ye(HL,8))};static \u0275dir=fe({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){r&1&&x("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},standalone:!1,features:[lt([BL]),Ne]})}return n})();function $L(n){return n==null||zL(n)===0}function zL(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var cb=new T(""),ZM=new T("");function WL(n){return $L(n.value)?{required:!0}:null}function jM(n){return null}function KM(n){return n!=null}function QM(n){return Tr(n)?Ve(n):n}function XM(n){let t={};return n.forEach(e=>{t=e!=null?E(E({},t),e):t}),Object.keys(t).length===0?null:t}function JM(n,t){return t.map(e=>e(n))}function GL(n){return!n.validate}function eT(n){return n.map(t=>GL(t)?t:e=>t.validate(e))}function qL(n){if(!n)return null;let t=n.filter(KM);return t.length==0?null:function(e){return XM(JM(e,t))}}function lb(n){return n!=null?qL(eT(n)):null}function YL(n){if(!n)return null;let t=n.filter(KM);return t.length==0?null:function(e){let r=JM(e,t).map(QM);return ua(r).pipe(V(XM))}}function db(n){return n!=null?YL(eT(n)):null}function BM(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ZL(n){return n._rawValidators}function KL(n){return n._rawAsyncValidators}function sb(n){return n?Array.isArray(n)?n:[n]:[]}function rh(n,t){return Array.isArray(n)?n.includes(t):n===t}function UM(n,t){let e=sb(t);return sb(n).forEach(i=>{rh(e,i)||e.push(i)}),e}function HM(n,t){return sb(t).filter(e=>!rh(n,e))}var ih=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=lb(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=db(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},Xs=class extends ih{name;get formDirective(){return null}get path(){return null}},Js=class extends ih{_parent=null;name=null;valueAccessor=null},oh=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},QL={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},xre=X(E({},QL),{"[class.ng-submitted]":"isSubmitted"}),yn=(()=>{class n extends oh{constructor(e){super(e)}static \u0275fac=function(r){return new(r||n)(ye(Js,2))};static \u0275dir=fe({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){r&2&&le("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},standalone:!1,features:[Ne]})}return n})(),dh=(()=>{class n extends oh{constructor(e){super(e)}static \u0275fac=function(r){return new(r||n)(ye(Xs,10))};static \u0275dir=fe({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,i){r&2&&le("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},standalone:!1,features:[Ne]})}return n})();var Qc="VALID",nh="INVALID",Ks="PENDING",Xc="DISABLED",gi=class{},sh=class extends gi{value;source;constructor(t,e){super(),this.value=t,this.source=e}},el=class extends gi{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},tl=class extends gi{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},Qs=class extends gi{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ab=class extends gi{source;constructor(t){super(),this.source=t}},ah=class extends gi{source;constructor(t){super(),this.source=t}};function tT(n){return(uh(n)?n.validators:n)||null}function XL(n){return Array.isArray(n)?lb(n):n||null}function nT(n,t){return(uh(t)?t.asyncValidators:n)||null}function JL(n){return Array.isArray(n)?db(n):n||null}function uh(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function eV(n,t,e){let r=n.controls;if(!(t?Object.keys(r):r).length)throw new S(1e3,"");if(!r[e])throw new S(1001,"")}function tV(n,t,e){n._forEachChild((r,i)=>{if(e[i]===void 0)throw new S(1002,"")})}var ch=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return tt(this.statusReactive)}set status(t){tt(()=>this.statusReactive.set(t))}_status=os(()=>this.statusReactive());statusReactive=Nt(void 0);get valid(){return this.status===Qc}get invalid(){return this.status===nh}get pending(){return this.status==Ks}get disabled(){return this.status===Xc}get enabled(){return this.status!==Xc}errors;get pristine(){return tt(this.pristineReactive)}set pristine(t){tt(()=>this.pristineReactive.set(t))}_pristine=os(()=>this.pristineReactive());pristineReactive=Nt(!0);get dirty(){return!this.pristine}get touched(){return tt(this.touchedReactive)}set touched(t){tt(()=>this.touchedReactive.set(t))}_touched=os(()=>this.touchedReactive());touchedReactive=Nt(!1);get untouched(){return!this.touched}_events=new A;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(UM(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(UM(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(HM(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(HM(t,this._rawAsyncValidators))}hasValidator(t){return rh(this._rawValidators,t)}hasAsyncValidator(t){return rh(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(X(E({},t),{sourceControl:r})),e&&t.emitEvent!==!1&&this._events.next(new tl(!0,r))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r),e&&t.emitEvent!==!1&&this._events.next(new tl(!1,r))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(X(E({},t),{sourceControl:r})),e&&t.emitEvent!==!1&&this._events.next(new el(!1,r))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),e&&t.emitEvent!==!1&&this._events.next(new el(!0,r))}markAsPending(t={}){this.status=Ks;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Qs(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(X(E({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Xc,this.errors=null,this._forEachChild(i=>{i.disable(X(E({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new sh(this.value,r)),this._events.next(new Qs(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(X(E({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Qc,this._forEachChild(r=>{r.enable(X(E({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(X(E({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Qc||this.status===Ks)&&this._runAsyncValidator(r,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new sh(this.value,e)),this._events.next(new Qs(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(X(E({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Xc:Qc}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Ks,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let r=QM(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,i)=>r&&r._find(i),this)}getError(t,e){let r=e?this.get(e):this;return r&&r.errors?r.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new Qs(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,r)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?Xc:this.errors?nh:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ks)?Ks:this._anyControlsHaveStatus(nh)?nh:Qc}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),i&&this._events.next(new el(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new tl(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){uh(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=XL(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=JL(this._rawAsyncValidators)}},lh=class extends ch{constructor(t,e,r){super(tT(e),nT(r,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,r={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){tV(this,!0,t),Object.keys(t).forEach(r=>{eV(this,!0,r),this.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(r=>{let i=this.controls[r];i&&i.patchValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((r,i)=>{r.reset(t?t[i]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new ah(this))}getRawValue(){return this._reduceChildren({},(t,e,r)=>(t[r]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&t(r,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&t(r))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,r,i)=>((r.enabled||this.disabled)&&(e[i]=r.value),e))}_reduceChildren(t,e){let r=t;return this._forEachChild((i,o)=>{r=e(r,i,o)}),r}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var fh=new T("",{providedIn:"root",factory:()=>hh}),hh="always";function nV(n,t){return[...t.path,n]}function rT(n,t,e=hh){iT(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),iV(n,t),sV(n,t),oV(n,t),rV(n,t)}function $M(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function rV(n,t){if(t.valueAccessor.setDisabledState){let e=r=>{t.valueAccessor.setDisabledState(r)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function iT(n,t){let e=ZL(n);t.validator!==null?n.setValidators(BM(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let r=KL(n);t.asyncValidator!==null?n.setAsyncValidators(BM(r,t.asyncValidator)):typeof r=="function"&&n.setAsyncValidators([r]);let i=()=>n.updateValueAndValidity();$M(t._rawValidators,i),$M(t._rawAsyncValidators,i)}function iV(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&oT(n,t)})}function oV(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&oT(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function oT(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function sV(n,t){let e=(r,i)=>{t.valueAccessor.writeValue(r),i&&t.viewToModelUpdate(r)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function aV(n,t){n==null,iT(n,t)}function cV(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function lV(n){return Object.getPrototypeOf(n.constructor)===nl}function dV(n,t){n._syncPendingControls(),t.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function uV(n,t){if(!t)return null;Array.isArray(t);let e,r,i;return t.forEach(o=>{o.constructor===fr?e=o:lV(o)?r=o:i=o}),i||r||e||null}var fV={provide:Xs,useExisting:Ht(()=>rl)},Jc=Promise.resolve(),rl=(()=>{class n extends Xs{callSetDisabledState;get submitted(){return tt(this.submittedReactive)}_submitted=os(()=>this.submittedReactive());submittedReactive=Nt(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(e,r,i){super(),this.callSetDisabledState=i,this.form=new lh({},lb(e),db(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Jc.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),rT(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Jc.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Jc.then(()=>{let r=this._findContainer(e.path),i=new lh({});aV(i,e),r.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Jc.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){Jc.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),dV(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ab(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||n)(ye(cb,10),ye(ZM,10),ye(fh,8))};static \u0275dir=fe({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,i){r&1&&x("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[lt([fV]),Ne]})}return n})();function zM(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function WM(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var hV=class extends ch{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,r){super(tT(e),nT(r,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),uh(e)&&(e.nonNullable||e.initialValueIsDefault)&&(WM(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new ah(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){zM(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){zM(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){WM(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var pV={provide:Js,useExisting:Ht(()=>rn)},GM=Promise.resolve(),rn=(()=>{class n extends Js{_changeDetectorRef;callSetDisabledState;control=new hV;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;constructor(e,r,i,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=e,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=uV(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),cV(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){rT(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){GM.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,i=r!==0&&Lt(r);GM.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?nV(e,this._parent):[e]}static \u0275fac=function(r){return new(r||n)(ye(Xs,9),ye(cb,10),ye(ZM,10),ye(ea,10),ye(Dt,8),ye(fh,8))};static \u0275dir=fe({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[lt([pV]),Ne,Qe]})}return n})();var ph=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})();var mV={provide:ea,useExisting:Ht(()=>il),multi:!0};var gV=(()=>{class n{_accessors=[];add(e,r){this._accessors.push([e,r])}remove(e){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===e){this._accessors.splice(r,1);return}}select(e){this._accessors.forEach(r=>{this._isSameGroup(r,e)&&r[1]!==e&&r[1].fireUncheck(e.value)})}_isSameGroup(e,r){return e[0].control?e[0]._parent===r._control._parent&&e[1].name===r.name:!1}static \u0275fac=function(r){return new(r||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),il=(()=>{class n extends nl{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=f(fh,{optional:!0})??hh;constructor(e,r,i,o){super(e,r),this._registry=i,this._injector=o}ngOnInit(){this._control=this._injector.get(Js),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(r){return new(r||n)(ye(it),ye(ue),ye(gV),ye(ce))};static \u0275dir=fe({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(r,i){r&1&&x("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[lt([mV]),Ne]})}return n})(),vV={provide:ea,useExisting:Ht(()=>ub),multi:!0},ub=(()=>{class n extends nl{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=r=>{e(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275dir=fe({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(r,i){r&1&&x("change",function(s){return i.onChange(s.target.value)})("input",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},standalone:!1,features:[lt([vV]),Ne]})}return n})();var yV={provide:ea,useExisting:Ht(()=>hr),multi:!0};function sT(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function bV(n){return n.split(":")[0]}var hr=(()=>{class n extends nl{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=f(Ft).injector;destroyRef=f(dn);cdr=f(Dt);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,vt({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let r=this._getOptionId(e),i=sT(r,e);this.setProperty("value",i)}registerOnChange(e){this.onChange=r=>{this.value=this._getOptionValue(r),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),e))return r;return null}_getOptionValue(e){let r=bV(e);return this._optionMap.has(r)?this._optionMap.get(r):e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275dir=fe({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){r&1&&x("change",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[lt([yV]),Ne]})}return n})(),vi=(()=>{class n{_element;_renderer;_select;id;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(sT(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(r){return new(r||n)(ye(ue),ye(it),ye(hr,9))};static \u0275dir=fe({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),_V={provide:ea,useExisting:Ht(()=>aT),multi:!0};function qM(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function CV(n){return n.split(":")[0]}var aT=(()=>{class n extends nl{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let r;if(Array.isArray(e)){let i=e.map(o=>this._getOptionId(o));r=(o,s)=>{o._setSelected(i.indexOf(s.toString())>-1)}}else r=(i,o)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(e){this.onChange=r=>{let i=[],o=r.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let c=s[a],l=this._getOptionValue(c.value);i.push(l)}}else{let s=r.options;for(let a=0;a<s.length;a++){let c=s[a];if(c.selected){let l=this._getOptionValue(c.value);i.push(l)}}}this.value=i,e(i)}}_registerOption(e){let r=(this._idCounter++).toString();return this._optionMap.set(r,e),r}_getOptionId(e){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,e))return r;return null}_getOptionValue(e){let r=CV(e);return this._optionMap.has(r)?this._optionMap.get(r)._value:e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275dir=fe({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){r&1&&x("change",function(s){return i.onChange(s.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[lt([_V]),Ne]})}return n})(),yi=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(qM(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(qM(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||n)(ye(ue),ye(it),ye(aT,9))};static \u0275dir=fe({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var wV=(()=>{class n{_validator=jM;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):jM,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||n)};static \u0275dir=fe({type:n,features:[Qe]})}return n})();var EV={provide:cb,useExisting:Ht(()=>ol),multi:!0};var ol=(()=>{class n extends wV{required;inputName="required";normalizeInput=Lt;createValidator=e=>WL;enabled(e){return e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275dir=fe({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,i){r&2&&We("required",i._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[lt([EV]),Ne]})}return n})();var SV=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({})}return n})();var bn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:fh,useValue:e.callSetDisabledState??hh}]}}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[SV]})}return n})();var DV=["messageInput"];function MV(n,t){n&1&&(m(0,"div",2),ie(1,"span",5),b(2," Recording... Release to stop "),g())}function TV(n,t){if(n&1){let e=J();m(0,"button",7),x("click",function(){I(e);let i=w(2);return k(i.onStopClick())}),m(1,"mat-icon"),b(2,"stop"),g()()}}function xV(n,t){if(n&1){let e=J();m(0,"button",8),x("mousedown",function(i){I(e);let o=w(2);return k(o.onVoiceButtonMouseDown(i))})("mouseup",function(){I(e);let i=w(2);return k(i.onVoiceButtonMouseUp())})("mouseleave",function(){I(e);let i=w(2);return k(i.onVoiceButtonMouseLeave())})("touchstart",function(i){I(e);let o=w(2);return k(o.onVoiceButtonTouchStart(i))})("touchend",function(i){I(e);let o=w(2);return k(o.onVoiceButtonTouchEnd(i))})("keydown",function(i){I(e);let o=w(2);return k(o.onVoiceButtonKeyDown(i))})("keyup",function(i){I(e);let o=w(2);return k(o.onVoiceButtonKeyUp(i))}),m(1,"mat-icon"),b(2),g()(),m(3,"button",9),x("click",function(){I(e);let i=w(2);return k(i.sendMessage())}),m(4,"mat-icon"),b(5,"send"),g()()}if(n&2){let e=w(2);le("recording",e.isRecording)("hidden",e.message.trim()),y(2),Ue(e.isRecording?"fiber_manual_record":"mic"),y(),le("hidden",e.isDisabled||!e.message.trim())("active",!!e.message.trim()&&!e.isDisabled),j("disabled",e.isDisabled||!e.message.trim())("title",e.getSendButtonTooltip())}}function IV(n,t){if(n&1&&O(0,TV,3,0,"button",6)(1,xV,6,11),n&2){let e=w();R(e.isThinking?0:1)}}var mh=class n{static MIN_TEXTAREA_LINES=2;static MAX_TEXTAREA_LINES=15;isDisabled=!1;showWelcome=!1;isThinking=!1;isStarting=!1;isSessionInitializing=!1;isStopping=!1;messageSubmitted=new U;voiceRecordingToggled=new U;heightChanged=new U;stopRequested=new U;messageInput;message="";isRecording=!1;isFocused=!1;recognition=null;sessionHadTranscript=!1;pendingLineBreaksTimeout=null;useEnterToSend=!1;currentInvite="";subscriptions=[];thinkingPhrases=["Processing request...","Thinking...","Working on it..."];currentThinkingPhrase="Processing request...";thinkingPhraseIndex=0;thinkingInterval=null;preferencesService=f(Mt);codayService=f(Qt);ngOnInit(){this.initializeVoiceInput(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.subscriptions.push(this.preferencesService.voiceLanguage$.subscribe(()=>this.updateRecognitionLanguage())),this.subscriptions.push(this.preferencesService.enterToSend$.subscribe(t=>{this.useEnterToSend=t})),this.subscribeToInviteEvents(),this.subscribeToMessageRestore()}ngAfterViewInit(){this.adjustTextareaHeight(),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),200)})}ngOnChanges(t){t.isThinking&&(t.isThinking.currentValue?this.startThinkingAnimation():(this.stopThinkingAnimation(),this.isStopping=!1,t.isThinking.previousValue&&(console.log("[CHAT-TEXTAREA] Thinking ended, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})))),t.isSessionInitializing&&!t.isSessionInitializing.currentValue&&t.isSessionInitializing.previousValue&&(console.log("[CHAT-TEXTAREA] Session initialization completed, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})),t.isStarting&&!t.isStarting.currentValue&&t.isStarting.previousValue&&this.isThinking&&(this.thinkingPhraseIndex===0?(console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index 0 - restarting animation"),this.stopThinkingAnimation(),this.startThinkingAnimation()):console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index",this.thinkingPhraseIndex,"- continuing without restart"))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[],this.clearPendingLineBreaks(),this.stopThinkingAnimation()}onKeyDown(t){t.key==="Enter"&&(this.useEnterToSend?!t.shiftKey&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),this.sendMessage()):(navigator.platform.toLowerCase().includes("mac")?t.metaKey:t.ctrlKey)&&!t.shiftKey&&(t.preventDefault(),this.sendMessage()))}onInput(){this.adjustTextareaHeight()}sendMessage(){this.isDisabled||(this.messageSubmitted.emit(this.message.trim()),this.message="",setTimeout(()=>this.adjustTextareaHeight(),0))}onStopClick(){this.isStopping=!0,this.stopRequested.emit()}toggleVoiceRecording(){console.log("Toggle voice recording called - using push-to-talk mode instead")}onVoiceButtonMouseDown(t){t.preventDefault(),this.startRecording()}onVoiceButtonMouseUp(){this.stopRecording()}onVoiceButtonMouseLeave(){this.stopRecording()}onVoiceButtonTouchStart(t){t.preventDefault(),this.startRecording()}onVoiceButtonTouchEnd(t){t.preventDefault(),this.stopRecording()}onVoiceButtonKeyDown(t){(t.code==="Space"||t.key===" "||t.keyCode===32)&&(t.preventDefault(),this.isRecording||this.startRecording())}onVoiceButtonKeyUp(t){(t.code==="Space"||t.key===" "||t.keyCode===32)&&(t.preventDefault(),this.stopRecording())}initializeVoiceInput(){let t=window.SpeechRecognition||window.webkitSpeechRecognition;if(console.log("[SPEECH] speechRecognition",t),!t){console.warn("[SPEECH] Speech Recognition API not available");return}this.recognition=new t,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.maxAlternatives=1,this.recognition.lang=this.getSelectedLanguage();try{"grammars"in this.recognition&&(this.recognition.serviceURI=void 0)}catch{console.log("[SPEECH] Advanced speech recognition parameters not supported")}this.recognition.onresult=e=>{let r="";for(let i=e.resultIndex;i<e.results.length;i++){let o=e.results[i][0].transcript;e.results[i].isFinal&&(r+=o)}if(r){let i=this.improveTranscriptPunctuation(r.trim());this.sessionHadTranscript=!0,console.log("[SPEECH] onresult ending, appending to textarea",this.isRecording),this.appendToTextarea(i)}},this.recognition.onend=()=>{console.log("[SPEECH] Recognition ended. Was recording:",this.isRecording),this.isRecording=!1,this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onerror=e=>{console.error("[SPEECH] Speech recognition error:",e.error),console.log("[SPEECH] Error details:",{error:e.error,message:e.message,timeStamp:e.timeStamp}),this.isRecording=!1,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onstart=()=>{console.log("[SPEECH] Recognition started successfully")},this.recognition.onspeechstart=()=>{console.log("[SPEECH] Speech detected")},this.recognition.onspeechend=()=>{console.log("[SPEECH] Speech ended")}}startRecording(){return xe(this,null,function*(){if(!(!this.recognition||this.isRecording))try{this.isRecording=!0,this.sessionHadTranscript=!1,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording),this.recognition.start(),console.log("[SPEECH] Started recording")}catch(t){console.error("[SPEECH] Failed to start recording:",t),this.isRecording=!1,this.voiceRecordingToggled.emit(this.isRecording)}})}stopRecording(){if(!this.recognition||!this.isRecording){console.log("[SPEECH] stopRecording not recording");return}try{console.log("[SPEECH] stopRecording recognition stop"),this.recognition.stop(),this.schedulePendingLineBreaks()}catch(t){console.error("[SPEECH] Failed to stop recording:",t)}}getSelectedLanguage(){return this.preferencesService.getVoiceLanguage()}updateRecognitionLanguage(){if(this.recognition){let t=this.getSelectedLanguage();this.recognition.lang=t,console.log("[SPEECH] Language changed to:",t)}}improveTranscriptPunctuation(t){let e=t;return/[.!?]$/.test(e.trim())||(e=e.trim()+"."),e=e.charAt(0).toUpperCase()+e.slice(1),e=e.replace(/\s+/g," "),e=e+" ",e}appendToTextarea(t){let e=this.message,r=e?`${e}${t}`:t;if(this.message=r,this.messageInput?.nativeElement){this.messageInput.nativeElement.focus();let i=this.message.length;this.messageInput.nativeElement.setSelectionRange(i,i)}setTimeout(()=>this.adjustTextareaHeight(),0)}schedulePendingLineBreaks(){this.clearPendingLineBreaks(),this.pendingLineBreaksTimeout=window.setTimeout(()=>{this.sessionHadTranscript&&(console.log("[SPEECH] Adding line breaks after transcript session"),this.appendToTextarea(`
101
+
102
+ `),this.sessionHadTranscript=!1),this.pendingLineBreaksTimeout=null},500)}clearPendingLineBreaks(){this.pendingLineBreaksTimeout&&(clearTimeout(this.pendingLineBreaksTimeout),this.pendingLineBreaksTimeout=null)}adjustTextareaHeight(){let t=this.messageInput?.nativeElement;if(!t)return;let e=window.getComputedStyle(t),r=parseFloat(e.fontSize),i=parseFloat(e.lineHeight)||r*1.5,o=i*n.MIN_TEXTAREA_LINES+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s=i*n.MAX_TEXTAREA_LINES+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom);t.style.height="auto";let a=t.scrollHeight;a<o?a=o:a>s&&(a=s),t.style.height=`${a}px`;let c=t.parentElement?.offsetHeight||a+32;this.heightChanged.emit(c)}getSendButtonShortcut(){return this.useEnterToSend?"Enter":navigator.platform.toLowerCase().includes("mac")?"\u2318+Enter":"Ctrl+Enter"}getSendButtonTooltip(){return this.useEnterToSend?"Send message (Enter) - Shift+Enter for new line":`Send message (${navigator.platform.toLowerCase().includes("mac")?"Cmd+Enter":"Ctrl+Enter"}) - Enter for new line`}getPlaceholder(){return this.isSessionInitializing?"Initializing session...":this.isThinking?this.isStopping?"Stopping...":this.isStarting?"Starting...":this.currentThinkingPhrase:this.showWelcome?"How can I help you today?":this.currentInvite?"Type your message here...":"Type your prompt here"}startThinkingAnimation(){this.thinkingPhraseIndex=0,this.currentThinkingPhrase=this.thinkingPhrases[0]||"Thinking...",this.thinkingInterval=window.setInterval(()=>{this.thinkingPhraseIndex<this.thinkingPhrases.length-1&&(this.thinkingPhraseIndex++,this.currentThinkingPhrase=this.thinkingPhrases[this.thinkingPhraseIndex]||"Thinking...")},2e3)}stopThinkingAnimation(){this.thinkingInterval&&(clearInterval(this.thinkingInterval),this.thinkingInterval=null),this.thinkingPhraseIndex=0,this.currentThinkingPhrase="Thinking..."}subscribeToInviteEvents(){this.subscriptions.push(this.codayService.currentInviteEvent$.subscribe(t=>{t?this.handleInviteEvent(t.invite,t.defaultValue):this.currentInvite=""}))}handleInviteEvent(t,e){this.currentInvite=t,e&&(this.message=e,setTimeout(()=>this.adjustTextareaHeight(),0)),this.messageInput?.nativeElement&&this.messageInput.nativeElement.focus()}subscribeToMessageRestore(){this.subscriptions.push(this.codayService.messageToRestore$.subscribe(t=>{t.trim()&&(console.log("[CHAT-TEXTAREA] Restoring message content:",t.substring(0,50)+"..."),this.restoreMessageContent(t))}))}restoreMessageContent(t){this.message=t,this.messageInput?.nativeElement&&(this.messageInput.nativeElement.focus(),setTimeout(()=>{let e=this.messageInput.nativeElement,r=this.message.length;e.setSelectionRange(r,r)},0)),setTimeout(()=>this.adjustTextareaHeight(),10)}focusTextarea(){let t=this.messageInput?.nativeElement;console.log("[CHAT-TEXTAREA] focusTextarea called",{hasElement:!!t,isDisabled:this.isDisabled,isThinking:this.isThinking,elementDisabled:t?.disabled,isSessionInitializing:this.isSessionInitializing}),t&&!t.disabled?(t.focus(),console.log("[CHAT-TEXTAREA] Textarea focused successfully")):console.log("[CHAT-TEXTAREA] Focus blocked - element disabled or not available")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-chat-textarea"]],viewQuery:function(e,r){if(e&1&&zt(DV,7),e&2){let i;at(i=ct())&&(r.messageInput=i.first)}},inputs:{isDisabled:"isDisabled",showWelcome:"showWelcome",isThinking:"isThinking",isStarting:"isStarting",isSessionInitializing:"isSessionInitializing"},outputs:{messageSubmitted:"messageSubmitted",voiceRecordingToggled:"voiceRecordingToggled",heightChanged:"heightChanged",stopRequested:"stopRequested"},features:[Qe],decls:6,vars:11,consts:[["messageInput",""],[1,"chat-input-container"],[1,"recording-indicator"],[1,"input-row","grouped-input"],[1,"message-input",3,"ngModelChange","keydown","input","focus","blur","ngModel","placeholder","disabled"],[1,"recording-dot"],["mat-icon-button","","title","Stop generation","type","button",1,"stop-btn"],["mat-icon-button","","title","Stop generation","type","button",1,"stop-btn",3,"click"],["mat-icon-button","","tabindex","0","title","Hold mouse click, touch, or spacebar to speak",1,"voice-btn",3,"mousedown","mouseup","mouseleave","touchstart","touchend","keydown","keyup"],["mat-icon-button","","type","button",1,"send-btn",3,"click","disabled","title"]],template:function(e,r){if(e&1){let i=J();m(0,"div",1),O(1,MV,3,0,"div",2),m(2,"div",3)(3,"textarea",4,0),_e("ngModelChange",function(s){return I(i),we(r.message,s)||(r.message=s),k(s)}),x("keydown",function(s){return I(i),k(r.onKeyDown(s))})("input",function(){return I(i),k(r.onInput())})("focus",function(){return I(i),k(r.isFocused=!0)})("blur",function(){return I(i),k(r.isFocused=!1)}),g(),O(5,IV,2,1),g()()}e&2&&(y(),R(r.isRecording?1:-1),y(),le("focused",r.isFocused)("welcome-mode",r.showWelcome)("is-thinking",r.isThinking),y(),be("ngModel",r.message),j("placeholder",r.getPlaceholder())("disabled",r.isDisabled||r.isThinking),y(2),R(r.isSessionInitializing?-1:5))},dependencies:[bn,fr,yn,rn,Nr,vn],styles:['@keyframes _ngcontent-%COMP%_gradientBorderShift{0%{background-position:0 0}50%{background-position:100% 0}to{background-position:0 0}}.chat-input-container[_ngcontent-%COMP%]{flex-shrink:0;width:100%;position:relative}.thinking-progress[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;height:3px;z-index:1}.thinking-progress[_ngcontent-%COMP%] .mdc-linear-progress__bar-inner{border-top-width:3px}.input-row.grouped-input[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--glass-bg);border-radius:16px;padding:0 .15rem 0 1.25rem;position:relative;transition:border-color .2s,box-shadow .2s,background .3s}.input-row[_ngcontent-%COMP%]{position:relative;background:var(--glass-bg, #1e1e1e)!important;background-clip:padding-box}.input-row[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:-2px;border-radius:inherit;background-size:200% 100%;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px;pointer-events:none;z-index:-1;animation:_ngcontent-%COMP%_gradientBorderShift 3s ease-in-out infinite}.input-row.is-thinking[_ngcontent-%COMP%]:before{inset:0;mask:none;padding:0;opacity:.15;z-index:0;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% 100%;animation:_ngcontent-%COMP%_gradientBorderShift 3s ease-in-out infinite}.input-row.is-thinking[_ngcontent-%COMP%] .message-input[_ngcontent-%COMP%], .input-row.is-thinking[_ngcontent-%COMP%] .stop-btn[_ngcontent-%COMP%]{position:relative;z-index:1}.input-row.grouped-input.focused[_ngcontent-%COMP%]:not(.is-thinking){box-shadow:0 0 0 4px #007aff1a}.input-row.grouped-input.focused[_ngcontent-%COMP%]:not(.is-thinking):before{background:var(--color-primary);animation:none}.message-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent!important;box-shadow:none;font-size:1rem;padding:1rem 0;color:var(--color-text);resize:none;min-height:36px;max-height:180px;border-radius:16px;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,system-ui,sans-serif;line-height:1.5}.message-input[_ngcontent-%COMP%]:focus{outline:none;border:none;box-shadow:none}.message-input[_ngcontent-%COMP%]:disabled{background-color:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;opacity:.6}.message-input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);transition:opacity .3s ease-in-out}.message-input[_ngcontent-%COMP%]:disabled::placeholder{animation:_ngcontent-%COMP%_thinkingPulsate 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_thinkingPulsate{0%,to{opacity:.6}50%{opacity:1}}.voice-btn[_ngcontent-%COMP%], .send-btn[_ngcontent-%COMP%], .stop-btn[_ngcontent-%COMP%]{margin:0 .5rem 0 .08rem}.voice-btn[_ngcontent-%COMP%]:hover:not(.recording), .send-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.voice-btn.recording[_ngcontent-%COMP%]{background:#ff3b3024;color:var(--color-error)}.send-btn[_ngcontent-%COMP%]{background:var(--color-primary)}.stop-btn[_ngcontent-%COMP%]{transition:background .18s,transform .12s}.stop-btn[_ngcontent-%COMP%]:hover{opacity:.85;transform:scale(1.05)}.stop-btn[_ngcontent-%COMP%]:active{transform:scale(.95)}.voice-btn[_ngcontent-%COMP%]{transition:background .18s,box-shadow .18s,transform .12s,opacity .5s;position:relative}.voice-btn.recording[_ngcontent-%COMP%]{background:#ff3b3012;color:var(--color-error);animation:_ngcontent-%COMP%_pulse 1.5s infinite}.voice-btn.recording[_ngcontent-%COMP%]:hover{background:#ff3b301c}.send-btn[_ngcontent-%COMP%]{transition:background .18s,box-shadow .18s,transform .12s,opacity .4s,margin-left .4s;position:relative}.send-btn.active[_ngcontent-%COMP%]{background:transparent;opacity:1}.send-btn[_ngcontent-%COMP%]:not(.active){color:var(--color-secondary);background:transparent;opacity:0;margin-left:calc(-.5rem - 36px)}.send-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:#fff;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-primary, #3b82f6) 20%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 80%,var(--color-primary, #3b82f6) 100%);background-size:300% auto;animation:_ngcontent-%COMP%_sendButtonGradientShift 6s ease-in-out infinite;box-shadow:0 4px 14px #007aff30;transform:scale(1.2)}.send-btn[_ngcontent-%COMP%]:active:not(:disabled){transform:scale(1.3);box-shadow:0 4px 24px #007aff30}.recording-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-top:.2rem;margin-bottom:.2rem;color:var(--color-error, #ff5555);font-size:.9rem;position:absolute;top:-1.5rem}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes _ngcontent-%COMP%_sendButtonGradientShift{0%{background-position:0% center}50%{background-position:50% 10%}to{background-position:0% center}}@media print{.thinking-progress[_ngcontent-%COMP%], .stop-btn[_ngcontent-%COMP%], .voice-btn[_ngcontent-%COMP%], .send-btn[_ngcontent-%COMP%], .recording-indicator[_ngcontent-%COMP%]{display:none!important}}']})};var kV=["choiceSelect"],AV=(n,t)=>t.value;function OV(n,t){if(n&1&&(m(0,"option",7),b(1),g()),n&2){let e=t.$implicit;j("value",e.value),y(),ke(" ",e.label," ")}}function RV(n,t){if(n&1){let e=J();m(0,"form",2),x("ngSubmit",function(){I(e);let i=w();return k(i.onSubmit())}),ie(1,"div",3),Bg(2,"async"),m(3,"div",4)(4,"select",5,0),_e("ngModelChange",function(i){I(e);let o=w();return we(o.selectedValue,i)||(o.selectedValue=i),k(i)}),x("change",function(){I(e);let i=w();return k(i.onSelectChange())})("keydown.enter",function(){I(e);let i=w();return k(i.onSubmit())})("focus",function(){I(e);let i=w();return k(i.isFocused=!0)})("blur",function(){I(e);let i=w();return k(i.isFocused=!1)}),m(6,"option",6),b(7,"-- Select an option --"),g(),ot(8,OV,2,2,"option",7,AV),g(),m(10,"button",8)(11,"mat-icon"),b(12,"send"),g()()()()}if(n&2){let e=w();y(),j("innerHTML",Ug(2,5,e.renderedLabel$),es),y(2),le("focused",e.isFocused),y(),be("ngModel",e.selectedValue),y(4),st(e.options),y(2),j("disabled",!e.selectedValue)}}var gh=class n{options=[];set labelHtml(t){typeof t=="object"?this.renderedLabelSubject.next(t):this.renderLabelMarkdown(t)}isVisible=!1;choiceSelected=new U;selectElement;selectedValue="";isFocused=!1;renderedLabelSubject=new Z("");renderedLabel$=this.renderedLabelSubject.asObservable();sanitizer=f(Yi);ngOnDestroy(){this.renderedLabelSubject.complete()}ngAfterViewInit(){this.isVisible&&this.selectElement&&setTimeout(()=>this.focusSelect(),100)}ngOnChanges(t){t.isVisible&&(console.log("[CHOICE-SELECT] isVisible changed:",t.isVisible.previousValue,"->",t.isVisible.currentValue),t.isVisible.currentValue&&!t.isVisible.previousValue&&(console.log("[CHOICE-SELECT] Component becoming visible, setting focus..."),setTimeout(()=>this.focusSelect(),150)))}focusSelect(){this.selectElement?.nativeElement&&(this.selectElement.nativeElement.focus(),console.log("[CHOICE-SELECT] Focus set on select element"))}onSubmit(){this.selectedValue?(console.log("[CHOICE-SELECT] Choice selected:",this.selectedValue),this.choiceSelected.emit(this.selectedValue),this.selectedValue=""):console.warn("[CHOICE-SELECT] No choice selected")}onSelectChange(){console.log("[CHOICE-SELECT] Selection changed to:",this.selectedValue)}renderLabelMarkdown(t){return xe(this,null,function*(){if(!t){this.renderedLabelSubject.next(this.sanitizer.bypassSecurityTrustHtml(""));return}try{let e=yield De.parse(t);this.renderedLabelSubject.next(this.sanitizer.bypassSecurityTrustHtml(e))}catch(e){console.error("[CHOICE-SELECT] Error parsing label markdown:",e),this.renderedLabelSubject.next(this.sanitizer.bypassSecurityTrustHtml(t))}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-choice-select"]],viewQuery:function(e,r){if(e&1&&zt(kV,5),e&2){let i;at(i=ct())&&(r.selectElement=i.first)}},inputs:{options:"options",labelHtml:"labelHtml",isVisible:"isVisible"},outputs:{choiceSelected:"choiceSelected"},features:[Qe],decls:1,vars:1,consts:[["choiceSelect",""],[1,"choice-form"],[1,"choice-form",3,"ngSubmit"],[1,"choice-label",3,"innerHTML"],[1,"select-button-row"],["name","choice","required","",1,"choice-select-inline",3,"ngModelChange","change","keydown.enter","focus","blur","ngModel"],["value","","disabled",""],[3,"value"],["type","submit","mat-icon-button","","title","Submit selection",1,"submit-btn",3,"disabled"]],template:function(e,r){e&1&&O(0,RV,13,7,"form",1),e&2&&R(r.isVisible?0:-1)},dependencies:[bn,ph,vi,yi,hr,yn,dh,ol,rn,rl,Kf,vn,Os,Nr,rv],styles:[`@keyframes _ngcontent-%COMP%_gradientBorderShift{0%{background-position:0 0}50%{background-position:100% 0}to{background-position:0 0}}.choice-form[_ngcontent-%COMP%]{width:100%;flex-shrink:0;position:relative}.choice-label[_ngcontent-%COMP%]{display:block;margin-bottom:1rem;font-weight:500;color:var(--color-text, #374151);font-size:1rem}.select-button-row[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--glass-bg);border-radius:16px;padding:0 .15rem 0 1.25rem;position:relative;transition:border-color .2s,box-shadow .2s;--select-arrow-icon: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M7 10l5 5 5-5z"/></svg>')}.select-button-row[_ngcontent-%COMP%]{position:relative;background:var(--glass-bg, #1e1e1e)!important;background-clip:padding-box}.select-button-row[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:-2px;border-radius:inherit;background-size:200% 100%;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px;pointer-events:none;z-index:-1;animation:_ngcontent-%COMP%_gradientBorderShift 3s ease-in-out infinite}.select-button-row.focused[_ngcontent-%COMP%]{box-shadow:0 0 0 4px #007aff1a}.select-button-row.focused[_ngcontent-%COMP%]:before{background:var(--color-primary);animation:none}.choice-select-inline[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent!important;box-shadow:none;font-size:1rem;padding:1rem 3rem 1rem 0;color:var(--color-text);border-radius:16px;font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,system-ui,sans-serif;cursor:pointer;line-height:1.5;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:var(--select-arrow-icon);background-repeat:no-repeat;background-position:right 3.5rem center;background-size:36px 36px}.choice-select-inline[_ngcontent-%COMP%]:focus{outline:none;border:none;box-shadow:none}.choice-select-inline[_ngcontent-%COMP%]:disabled{background-color:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;opacity:.6}.choice-select-inline[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:disabled{color:var(--color-text-secondary, #9ca3af);font-style:italic}.submit-btn[_ngcontent-%COMP%]{margin:0 .5rem 0 .08rem;background:var(--color-primary);transition:background .18s,box-shadow .18s,transform .12s,opacity .4s;position:relative}.submit-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:#fff;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-primary, #3b82f6) 20%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 80%,var(--color-primary, #3b82f6) 100%);background-size:300% auto;animation:_ngcontent-%COMP%_sendButtonGradientShift 6s ease-in-out infinite;box-shadow:0 4px 14px #007aff30;transform:scale(1.2)}.submit-btn[_ngcontent-%COMP%]:active:not(:disabled){transform:scale(1.3);box-shadow:0 4px 24px #007aff30}.submit-btn[_ngcontent-%COMP%]:disabled{background:var(--color-text-secondary);cursor:not-allowed;opacity:.5;box-shadow:none}@keyframes _ngcontent-%COMP%_sendButtonGradientShift{0%{background-position:0% center}50%{background-position:50% 10%}to{background-position:0% center}}@media (max-width: 480px){.choice-form[_ngcontent-%COMP%]{max-width:none}.select-button-row[_ngcontent-%COMP%]{flex-direction:row}}@media print{.submit-btn[_ngcontent-%COMP%]{display:none!important}}`]})};var vh={projects:{list:null,current:null,canCreate:!0},threads:{list:null,current:null}},bi=class n{destroy$=new A;sessionStateSubject=new Z(vh);isInitializingSubject=new Z(!0);sessionState$=this.sessionStateSubject.asObservable();isInitializing$=this.isInitializingSubject.asObservable();codayApi=f(ur);eventStream=f(Zs);constructor(){console.log("[SESSION-STATE] Service initializing"),this.setupEventListeners(),this.initializeState()}initializeState(){console.log("[SESSION-STATE] Fetching initial state with retry mechanism");let t=Date.now(),e=2e4,r=2e3,i=0,o=!1;ha(0,r).pipe(Yl(()=>{let s=Date.now()-t,a=s<e;return o?(console.log("[SESSION-STATE] Valid state found, stopping retry mechanism"),!1):a?!0:(console.log(`[SESSION-STATE] Retry timeout reached after ${s}ms`),!1)},!0),Ze(()=>{i++;let s=Date.now()-t;return console.log(`[SESSION-STATE] Attempt #${i} (${s}ms elapsed) to refresh state...`),this.codayApi.getSessionState().pipe(ge(a=>{console.log("[SESSION-STATE] State fetched successfully:",a),this.sessionStateSubject.next(a);let c=a.projects.list!==null&&a.projects.list.length>0,l=a.threads.list!==null&&a.threads.list.length>0,d=a.projects.current!==null;c||l||d?(console.log("[SESSION-STATE] Valid state detected:"),console.log("[SESSION-STATE] - Has projects:",c),console.log("[SESSION-STATE] - Has threads:",l),console.log("[SESSION-STATE] - Has current project:",d),o=!0):console.log("[SESSION-STATE] State is empty (no projects/threads/current), will retry...")}),V(()=>!0),xt(a=>(console.warn(`[SESSION-STATE] Attempt #${i} failed:`,a.message||a),P(!1))))}),F(this.destroy$)).subscribe({next:()=>{},error:s=>{console.error("[SESSION-STATE] Unexpected error in retry mechanism:",s),this.sessionStateSubject.next(vh)},complete:()=>{let s=Date.now()-t;console.log(`[SESSION-STATE] Initialization completed after ${i} attempts in ${s}ms`);let a=this.sessionStateSubject.value;!a.projects.list&&!a.threads.list&&!a.projects.current&&(console.log("[SESSION-STATE] No valid state found after retries, using default state"),this.sessionStateSubject.next(vh)),this.isInitializingSubject.next(!1),console.log("[SESSION-STATE] Initialization flag set to false - UI can now be enabled")}})}setupEventListeners(){this.eventStream.events$.pipe(F(this.destroy$)).subscribe({next:t=>this.handleEvent(t),error:t=>console.error("[SESSION-STATE] Event stream error:",t)})}handleEvent(t){console.log("[SESSION-STATE] Event received:",t.type,t);let e=!1;t instanceof pi?(console.log("[SESSION-STATE] Project selected event received"),e=!0):t instanceof mi&&(console.log("[SESSION-STATE] Thread selected event received:",t.threadName),e=!0),e&&(console.log("[SESSION-STATE] Triggering state refresh due to event:",t.type),this.refreshState().subscribe({error:r=>console.error("[SESSION-STATE] Auto-refresh failed:",r)}))}refreshState(){return console.log("[SESSION-STATE] Refreshing state via CodayApiService"),this.codayApi.getSessionState().pipe(ge(t=>{console.log("[SESSION-STATE] State refreshed:",t),this.sessionStateSubject.next(t)}),xt(t=>{console.error("[SESSION-STATE] Error fetching state:",t);let e=E({},vh);return t.status===404?console.warn("[SESSION-STATE] Client not found, using default state"):t.status===400?console.error("[SESSION-STATE] Bad request, check clientId"):console.error("[SESSION-STATE] Server error:",t.status),this.sessionStateSubject.next(e),P(e)}))}getProjects$(){return this.sessionState$.pipe(V(t=>t.projects))}getThreads$(){return this.sessionState$.pipe(V(t=>t.threads))}getCurrentProject(){return this.sessionStateSubject.value.projects.current}getCurrentThread(){return this.sessionStateSubject.value.threads.current}isProjectLocked(){return!this.sessionStateSubject.value.projects.canCreate}getCurrentState(){return this.sessionStateSubject.value}hasProjectSelected(){return this.getCurrentProject()!==null}hasThreadSelected(){return this.getCurrentThread()!==null}getAvailableProjects(){return this.sessionStateSubject.value.projects.list}getAvailableThreads(){return this.sessionStateSubject.value.threads.list}ngOnDestroy(){console.log("[SESSION-STATE] Service destroying"),this.destroy$.next(),this.destroy$.complete(),this.sessionStateSubject.complete(),this.isInitializingSubject.complete()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var yh=class n{maxFileSize=5*1024*1024;supportedTypes=["image/png","image/jpeg","image/gif","image/webp"];validateFile(t){if(!this.supportedTypes.includes(t.type))throw new Error(`Unsupported file type: ${t.type}`);if(t.size>this.maxFileSize)throw new Error(`File too large: ${(t.size/1024/1024).toFixed(1)}MB exceeds 5MB limit`)}fileToBase64(t){return xe(this,null,function*(){return new Promise((e,r)=>{let i=new FileReader;i.onload=()=>{let o=i.result;if(!o){r(new Error("Failed to read file"));return}let s=o.split(",")[1];if(!s){r(new Error("Invalid file format"));return}e(s)},i.onerror=r,i.readAsDataURL(t)})})}uploadImage(t,e){return xe(this,null,function*(){console.log("[IMAGE-UPLOAD] uploadImage - file:",t.name,t.type,t.size),console.log("[IMAGE-UPLOAD] uploadImage - clientId:",e);try{console.log("[IMAGE-UPLOAD] Validating file..."),this.validateFile(t),console.log("[IMAGE-UPLOAD] Converting to base64...");let r=yield this.fileToBase64(t);console.log("[IMAGE-UPLOAD] Base64 length:",r.length),console.log("[IMAGE-UPLOAD] Sending upload request...");let i=yield fetch("/api/files/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:e,content:r,mimeType:t.type,filename:t.name})});if(console.log("[IMAGE-UPLOAD] Response status:",i.status),!i.ok){let s=yield i.json();throw console.log("[IMAGE-UPLOAD] Upload error response:",s),new Error(s.error||"Upload failed")}let o=yield i.json();return console.log("[IMAGE-UPLOAD] Upload success result:",o),{success:!0,processedSize:o.processedSize,dimensions:o.dimensions}}catch(r){return console.log("[IMAGE-UPLOAD] Upload failed:",r),{success:!1,error:r instanceof Error?r.message:"Upload failed"}}})}hasImageFiles(t){if(console.log("[IMAGE-UPLOAD] hasImageFiles - dataTransfer:",t),!t)return console.log("[IMAGE-UPLOAD] hasImageFiles - no dataTransfer"),!1;if(console.log("[IMAGE-UPLOAD] hasImageFiles - types:",Array.from(t.types)),!Array.from(t.types).includes("Files"))return console.log("[IMAGE-UPLOAD] hasImageFiles - no Files type"),!1;let e=Array.from(t.files||[]);console.log("[IMAGE-UPLOAD] hasImageFiles - files:",e.map(i=>({name:i.name,type:i.type})));let r=e.some(i=>this.supportedTypes.includes(i.type));return console.log("[IMAGE-UPLOAD] hasImageFiles - result:",r),r}filterImageFiles(t){return Array.from(t).filter(r=>this.supportedTypes.includes(r.type))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var bh=class n{ATTENTION_EMOJI="\u{1F534}";isSystemActive=!1;systemActiveTimer=null;SYSTEM_ACTIVE_TIMEOUT=4e3;unreadService=f(Bs);codayService=f(Qt);constructor(){this.initializeTitleUpdates()}initializeTitleUpdates(){gr([this.codayService.projectTitle$,this.unreadService.unreadCount$]).subscribe(([t,e])=>{this.updateTitle(t,e)})}updateTitle(t,e){let r;this.isSystemActive?r=`\u23F3${e>0?` (${e}) `:" "}${t}`:e>0?r=`${this.ATTENTION_EMOJI} (${e}) ${t}`:r=t,document.title=r,console.log("[TAB-TITLE] Updated to:",r)}setSystemActive(){console.log("[TAB-TITLE] System active - showing hourglass"),this.isSystemActive=!0,this.systemActiveTimer&&clearTimeout(this.systemActiveTimer),this.systemActiveTimer=setTimeout(()=>{console.log("[TAB-TITLE] System active timeout - hiding hourglass"),this.isSystemActive=!1,this.forceUpdateTitle()},this.SYSTEM_ACTIVE_TIMEOUT),this.forceUpdateTitle()}setSystemInactive(){console.log("[TAB-TITLE] System inactive - hiding hourglass"),this.isSystemActive=!1,this.systemActiveTimer&&(clearTimeout(this.systemActiveTimer),this.systemActiveTimer=null),this.forceUpdateTitle()}forceUpdateTitle(){let t=this.codayService.getCurrentProjectTitle(),e=this.unreadService.getCurrentCount();this.updateTitle(t,e)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var PV=["inputSection"];function NV(n,t){if(n&1&&(m(0,"div",2),b(1),g()),n&2){let e=w();y(),is(" \u26A0\uFE0F Connection lost. Reconnecting... (",e.connectionStatus.reconnectAttempts,"/",e.connectionStatus.maxAttempts,") ")}}function FV(n,t){if(n&1&&(m(0,"div",3)(1,"h1",10),b(2),g()()),n&2){let e=w();y(2),Ue(e.currentWelcomeMessage)}}function LV(n,t){if(n&1&&(m(0,"div",14),b(1),g()),n&2){let e=w(2);le("error",e.uploadStatus.isError),y(),ke(" ",e.uploadStatus.message," ")}}function VV(n,t){if(n&1){let e=J();m(0,"div",4)(1,"div",11)(2,"app-chat-history",12),x("copyRequested",function(i){I(e);let o=w();return k(o.onCopyMessage(i))})("stopRequested",function(){I(e);let i=w();return k(i.onStopRequested())}),g(),O(3,LV,2,3,"div",13),g()()}if(n&2){let e=w();y(2),j("messages",e.messages)("isThinking",e.isThinking),y(),R(e.uploadStatus.message?3:-1)}}function jV(n,t){if(n&1){let e=J();m(0,"app-chat-textarea",15),x("messageSubmitted",function(i){I(e);let o=w();return k(o.onMessageSubmitted(i))})("voiceRecordingToggled",function(i){I(e);let o=w();return k(o.onVoiceToggled(i))})("heightChanged",function(i){I(e);let o=w();return k(o.onInputHeightChanged(i))})("stopRequested",function(){I(e);let i=w();return k(i.onStopRequested())}),g()}if(n&2){let e=w();j("isDisabled",!e.isConnected||e.isSessionInitializing)("isSessionInitializing",e.isSessionInitializing)("showWelcome",!e.userHasSentMessage)("isThinking",e.isThinking)("isStarting",e.isStartingFirstMessage)}}function BV(n,t){if(n&1){let e=J();m(0,"app-choice-select",16),x("choiceSelected",function(i){I(e);let o=w();return k(o.onChoiceSelected(i))}),g()}if(n&2){let e=w();j("options",e.currentChoice.options)("labelHtml",e.currentChoice.label)("isVisible",!!e.currentChoice)}}var _h=class n{destroy$=new A;inputSection;messages=[];isThinking=!1;isStartingFirstMessage=!1;currentChoice=null;connectionStatus=null;isConnected=!1;isSessionInitializing=!0;userHasSentMessage=!1;showConnectionStatus=!1;hasEverConnected=!1;inputSectionHeight=80;uploadStatus={message:"",isError:!1};clientId;isDragOver=!1;welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;codayService=f(Qt);codayApiService=f(ur);sessionStateService=f(bi);imageUploadService=f(yh);titleService=f(bh);preferencesService=f(Mt);constructor(){this.clientId=this.codayApiService.getClientId(),console.log("[MAIN-APP] Constructor - clientId:",this.clientId),console.log("[MAIN-APP] SessionStateService injected and will initialize:",!!this.sessionStateService)}ngOnInit(){this.setupPrintHandlers(),this.startWelcomeRotation(),this.codayService.messages$.pipe(F(this.destroy$)).subscribe(t=>{console.log("[MAIN-APP] Messages updated:",t.length),this.messages=t,t.length>0&&t.some(e=>e.role==="user")&&!this.userHasSentMessage&&(console.log("[MAIN-APP] Messages loaded from thread, hiding welcome message"),this.userHasSentMessage=!0,this.stopWelcomeRotation()),t.length===0&&this.userHasSentMessage&&(console.log("[MAIN-APP] Messages cleared, showing welcome message again"),this.userHasSentMessage=!1,this.startWelcomeRotation())}),this.codayService.isThinking$.pipe(F(this.destroy$)).subscribe(t=>{this.isThinking=t,t&&(this.isStartingFirstMessage=!1)}),this.codayService.currentChoice$.pipe(F(this.destroy$)).subscribe(t=>{this.currentChoice=t}),this.sessionStateService.isInitializing$.pipe(F(this.destroy$)).subscribe(t=>{console.log("[MAIN-APP] Session initialization state changed:",t),this.isSessionInitializing=t}),this.codayService.connectionStatus$.pipe(F(this.destroy$)).subscribe(t=>{this.connectionStatus=t,this.isConnected=t.connected,t.connected&&!this.hasEverConnected&&(this.hasEverConnected=!0,this.showConnectionStatus=!0),!t.connected&&!this.hasEverConnected?setTimeout(()=>{!this.isConnected&&!this.hasEverConnected&&(this.showConnectionStatus=!0)},2e3):!t.connected&&this.hasEverConnected?this.showConnectionStatus=!0:t.connected&&(this.showConnectionStatus=!0)}),this.codayService.setTabTitleService(this.titleService),this.codayService.start()}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint),this.stopWelcomeRotation()}startWelcomeRotation(){this.userHasSentMessage||(this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex]},3e3))}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0)}onMessageSubmitted(t){console.log("[MAIN-APP] Sending message:",t),this.userHasSentMessage||(this.userHasSentMessage=!0,this.stopWelcomeRotation(),this.isStartingFirstMessage=!0),this.isThinking=!0,this.codayService.sendMessage(t)}onVoiceToggled(t){console.log("[VOICE] Recording:",t)}onChoiceSelected(t){console.log("choosing selected",t),this.codayService.sendChoice(t)}onCopyMessage(t){console.log("[COPY] Message copied:",t.id)}onStopRequested(){this.codayService.stop()}onInputHeightChanged(t){console.log("[MAIN-APP] Input height changed:",t),this.inputSectionHeight=t}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let t=this.inputSection.nativeElement.offsetHeight;t!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",t),this.inputSectionHeight=t)}}onDragEnter(t){t.preventDefault(),this.imageUploadService.hasImageFiles(t.dataTransfer)&&(console.log("[MAIN-APP] Image files detected - showing drag overlay"),this.isDragOver=!0)}onDragOver(t){t.preventDefault(),this.imageUploadService.hasImageFiles(t.dataTransfer)&&(t.dataTransfer.dropEffect="copy")}onDragLeave(t){(t.target===document.body||!document.body.contains(t.relatedTarget))&&(console.log("[MAIN-APP] Leaving application area - hiding drag overlay"),this.isDragOver=!1)}onDrop(t){return xe(this,null,function*(){if(t.preventDefault(),this.isDragOver=!1,console.log("[MAIN-APP] Files dropped:",t.dataTransfer?.files?.length||0),!this.clientId){this.showUploadError("No client ID available for upload");return}let e=this.imageUploadService.filterImageFiles(t.dataTransfer?.files||[]);if(e.length===0){this.showUploadError("No valid image files found");return}console.log("[MAIN-APP] Uploading",e.length,"image(s)");for(let r of e)try{this.showUploadStatus(`Uploading ${r.name}...`);let i=yield this.imageUploadService.uploadImage(r,this.clientId);i.success?this.showUploadSuccess(`${r.name} uploaded successfully`):this.showUploadError(`Failed to upload ${r.name}: ${i.error}`)}catch(i){console.error("[MAIN-APP] Upload error:",i),this.showUploadError(`Failed to upload ${r.name}: ${i instanceof Error?i.message:"Unknown error"}`)}})}showUploadStatus(t){this.uploadStatus={message:t,isError:!1}}showUploadSuccess(t){this.uploadStatus={message:`\u2705 ${t}`,isError:!1},setTimeout(()=>{this.uploadStatus={message:"",isError:!1}},3e3)}showUploadError(t){this.uploadStatus={message:t,isError:!0},setTimeout(()=>{this.uploadStatus={message:"",isError:!1}},5e3)}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint)}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let t=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",t),t?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical")};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical")};static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-main"]],viewQuery:function(e,r){if(e&1&&zt(PV,5),e&2){let i;at(i=ct())&&(r.inputSection=i.first)}},hostBindings:function(e,r){e&1&&x("dragenter",function(o){return r.onDragEnter(o)})("dragover",function(o){return r.onDragOver(o)})("dragleave",function(o){return r.onDragLeave(o)})("drop",function(o){return r.onDrop(o)})},decls:10,vars:4,consts:[["inputSection",""],[1,"app"],[1,"connection-status"],[1,"welcome-section"],[1,"chat-wrapper"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"],[1,"choice-overlay",3,"options","labelHtml","isVisible"],[1,"welcome-title"],[1,"chat-center"],[3,"copyRequested","stopRequested","messages","isThinking"],[1,"upload-status",3,"error"],[1,"upload-status"],[3,"messageSubmitted","voiceRecordingToggled","heightChanged","stopRequested","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"],[1,"choice-overlay",3,"choiceSelected","options","labelHtml","isVisible"]],template:function(e,r){e&1&&(m(0,"div",1),O(1,NV,2,2,"div",2),O(2,FV,3,1,"div",3)(3,VV,4,3,"div",4),m(4,"div",5,0)(6,"div",6)(7,"div",7),O(8,jV,1,5,"app-chat-textarea",8),O(9,BV,1,3,"app-choice-select",9),g()()()()),e&2&&(y(),R(r.showConnectionStatus&&r.connectionStatus&&!r.connectionStatus.connected?1:-1),y(),R(!r.userHasSentMessage||r.messages.length===2?2:3),y(6),R(r.currentChoice?-1:8),y(),R(r.currentChoice?9:-1))},dependencies:[th,mh,gh],styles:['[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center}.app.drag-over[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;border:3px dashed var(--color-primary);border-radius:16px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);pointer-events:none;z-index:100}.connection-status[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:1001;padding:.75rem 1rem;text-align:center;font-size:.9rem;background:var(--color-error);color:var(--color-text-inverse);border-bottom:1px solid rgba(255,255,255,.2);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 4px 16px #0000001a}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 1rem}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%}.welcome-title[_ngcontent-%COMP%]{font-size:clamp(2.5rem,6vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:inline-block;min-height:1.2em}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 1rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media (max-width: 768px){.chat-wrapper[_ngcontent-%COMP%]{padding:.75rem 1rem}.input-section[_ngcontent-%COMP%]{padding:.75rem}.input-section[_ngcontent-%COMP%] > app-chat-textarea[_ngcontent-%COMP%]{max-width:none}.choice-overlay[_ngcontent-%COMP%]{padding:.75rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;position:static!important}.app[_ngcontent-%COMP%]{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;display:block!important;flex-direction:column!important;position:static!important}.chat-wrapper[_ngcontent-%COMP%]{flex:none!important;height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;overflow-y:visible!important;overflow-x:visible!important;padding:0!important;margin:0!important;position:static!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%], .connection-status[_ngcontent-%COMP%], .upload-status[_ngcontent-%COMP%]{display:none!important}}'],data:{animation:[qv("slideIn",[Ju(":enter",[li({transform:"translateY(100%)",opacity:0}),Xu("300ms ease-out",li({transform:"translateY(0)",opacity:1}))]),Ju(":leave",[Xu("200ms ease-in",li({transform:"translateY(100%)",opacity:0}))])])]}})};var cT=[{path:"",component:_h},{path:"**",redirectTo:""}];var lT={providers:[sm(),zg({eventCoalescing:!0}),zv(cT),gv(),dD(),od(fM)]};var Eh=["*"],HV=["content"],$V=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],zV=["mat-drawer","mat-drawer-content","*"];function WV(n,t){if(n&1){let e=J();m(0,"div",1),x("click",function(){I(e);let i=w();return k(i._onBackdropClicked())}),g()}if(n&2){let e=w();le("mat-drawer-shown",e._isShowingBackdrop())}}function GV(n,t){n&1&&(m(0,"mat-drawer-content"),Ge(1,2),g())}var qV=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],YV=["mat-sidenav","mat-sidenav-content","*"];function ZV(n,t){if(n&1){let e=J();m(0,"div",1),x("click",function(){I(e);let i=w();return k(i._onBackdropClicked())}),g()}if(n&2){let e=w();le("mat-drawer-shown",e._isShowingBackdrop())}}function KV(n,t){n&1&&(m(0,"mat-sidenav-content"),Ge(1,2),g())}var QV=`.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}
103
+ `;var XV=new T("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:JV}),pb=new T("MAT_DRAWER_CONTAINER");function JV(){return!1}var Ch=(()=>{class n extends Ls{_platform=f(je);_changeDetectorRef=f(Dt);_container=f(hb);constructor(){let e=f(ue),r=f(Fs),i=f($);super(e,r,i)}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;let{start:e,end:r}=this._container;return e!=null&&e.mode!=="over"&&e.opened||r!=null&&r.mode!=="over"&&r.opened}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(r,i){r&2&&(Wi("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px"),le("mat-drawer-content-hidden",i._shouldBeHidden()))},features:[lt([{provide:Ls,useExisting:n}]),Ne],ngContentSelectors:Eh,decls:1,vars:0,template:function(r,i){r&1&&(yt(),Ge(0))},encapsulation:2,changeDetection:0})}return n})(),fb=(()=>{class n{_elementRef=f(ue);_focusTrapFactory=f(xy);_focusMonitor=f(Lc);_platform=f(je);_ngZone=f($);_renderer=f(it);_interactivityChecker=f(Df);_doc=f(z);_container=f(pb,{optional:!0});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached;_anchor;get position(){return this._position}set position(e){e=e==="end"?"end":"start",e!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}_position="start";get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}_mode="over";get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=lo(e)}_disableClose=!1;get autoFocus(){let e=this._autoFocus;return e??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(e){(e==="true"||e==="false"||e==null)&&(e=lo(e)),this._autoFocus=e}_autoFocus;get opened(){return this._opened()}set opened(e){this.toggle(lo(e))}_opened=Nt(!1);_openedVia;_animationStarted=new A;_animationEnd=new A;openedChange=new U(!0);_openedStream=this.openedChange.pipe(Pe(e=>e),V(()=>{}));openedStart=this._animationStarted.pipe(Pe(()=>this.opened),Wl(void 0));_closedStream=this.openedChange.pipe(Pe(e=>!e),V(()=>{}));closedStart=this._animationStarted.pipe(Pe(()=>!this.opened),Wl(void 0));_destroyed=new A;onPositionChanged=new U;_content;_modeChanged=new A;_injector=f(ce);_changeDetectorRef=f(Dt);constructor(){this.openedChange.pipe(F(this._destroyed)).subscribe(e=>{e?(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement,this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{let e=this._elementRef.nativeElement;fa(e,"keydown").pipe(Pe(r=>r.keyCode===27&&!this.disableClose&&!ID(r)),F(this._destroyed)).subscribe(r=>this._ngZone.run(()=>{this.close(),r.stopPropagation(),r.preventDefault()})),this._eventCleanups=[this._renderer.listen(e,"transitionrun",this._handleTransitionEvent),this._renderer.listen(e,"transitionend",this._handleTransitionEvent),this._renderer.listen(e,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this.opened)})}_forceFocus(e,r){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),e.removeAttribute("tabindex")},o=this._renderer.listen(e,"blur",i),s=this._renderer.listen(e,"mousedown",i)})),e.focus(r)}_focusByCssSelector(e,r){let i=this._elementRef.nativeElement.querySelector(e);i&&this._forceFocus(i,r)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":vt(()=>{!this._focusTrap.focusInitialElement()&&typeof e.focus=="function"&&e.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(e){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){let e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,r){e&&r&&(this._openedVia=r);let i=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),i}_setOpen(e,r,i){return e===this.opened?Promise.resolve(e?"open":"close"):(this._opened.set(e),this._container?._transitionsEnabled?this._setIsAnimating(!0):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next()}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",e),!e&&r&&this._restoreFocus(i),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(o=>{this.openedChange.pipe(It(1)).subscribe(s=>o(s?"open":"close"))}))}_setIsAnimating(e){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",e)}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop&&this.opened)}_updatePositionInParent(e){if(!this._platform.isBrowser)return;let r=this._elementRef.nativeElement,i=r.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),i.insertBefore(this._anchor,r)),i.appendChild(r)):this._anchor&&this._anchor.parentNode.insertBefore(r,this._anchor)}_handleTransitionEvent=e=>{let r=this._elementRef.nativeElement;e.target===r&&this._ngZone.run(()=>{e.type==="transitionrun"?this._animationStarted.next(e):(e.type==="transitionend"&&this._setIsAnimating(!1),this._animationEnd.next(e))})};static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["mat-drawer"]],viewQuery:function(r,i){if(r&1&&zt(HV,5),r&2){let o;at(o=ct())&&(i._content=o.first)}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(r,i){r&2&&(We("align",null)("tabIndex",i.mode!=="side"?"-1":null),Wi("visibility",!i._container&&!i.opened?"hidden":null),le("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side"))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:Eh,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(r,i){r&1&&(yt(),m(0,"div",1,0),Ge(2),g())},dependencies:[Ls],encapsulation:2,changeDetection:0})}return n})(),hb=(()=>{class n{_dir=f(uo,{optional:!0});_element=f(ue);_ngZone=f($);_changeDetectorRef=f(Dt);_animationDisabled=Pr();_transitionsEnabled=!1;_allDrawers;_drawers=new qo;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=lo(e)}_autosize=f(XV);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:lo(e)}_backdropOverride;backdropClick=new U;_start;_end;_left;_right;_destroyed=new A;_doCheckSubject=new A;_contentMargins={left:null,right:null};_contentMarginChanges=new A;get scrollable(){return this._userContent||this._content}_injector=f(ce);constructor(){let e=f(je),r=f(fo);this._dir?.change.pipe(F(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),r.change().pipe(F(this._destroyed)).subscribe(()=>this.updateContentMargins()),!this._animationDisabled&&e.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=!0},200)})}ngAfterContentInit(){this._allDrawers.changes.pipe(br(this._allDrawers),F(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(r=>!r._container||r._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(br(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(pa(10),F(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,r=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let i=this._left._getWidth();e+=i,r-=i}}if(this._right&&this._right.opened){if(this._right.mode=="side")r+=this._right._getWidth();else if(this._right.mode=="push"){let i=this._right._getWidth();r+=i,e-=i}}e=e||null,r=r||null,(e!==this._contentMargins.left||r!==this._contentMargins.right)&&(this._contentMargins={left:e,right:r},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(F(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe(F(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e.onPositionChanged.pipe(F(this._drawers.changes)).subscribe(()=>{vt({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(e){e._modeChanged.pipe(F(tp(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let r=this._element.nativeElement.classList,i="mat-drawer-container-has-open";e?r.add(i):r.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{e.position=="end"?(this._end!=null,this._end=e):(this._start!=null,this._start=e)}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._drawerHasBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(e){return e!=null&&e.opened}_drawerHasBackdrop(e){return this._backdropOverride==null?!!e&&e.mode!=="side":this._backdropOverride}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=H({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(r,i,o){if(r&1&&(zi(o,Ch,5),zi(o,fb,5)),r&2){let s;at(s=ct())&&(i._content=s.first),at(s=ct())&&(i._allDrawers=s)}},viewQuery:function(r,i){if(r&1&&zt(Ch,5),r&2){let o;at(o=ct())&&(i._userContent=o.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(r,i){r&2&&le("mat-drawer-container-explicit-backdrop",i._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[lt([{provide:pb,useExisting:n}])],ngContentSelectors:zV,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,i){r&1&&(yt($V),O(0,WV,1,2,"div",0),Ge(1),Ge(2,1),O(3,GV,2,0,"mat-drawer-content")),r&2&&(R(i.hasBackdrop?0:-1),y(3),R(i._content?-1:3))},dependencies:[Ch],styles:[`.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}
104
+ `],encapsulation:2,changeDetection:0})}return n})(),wh=(()=>{class n extends Ch{static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275cmp=H({type:n,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],features:[lt([{provide:Ls,useExisting:n}]),Ne],ngContentSelectors:Eh,decls:1,vars:0,template:function(r,i){r&1&&(yt(),Ge(0))},encapsulation:2,changeDetection:0})}return n})(),mb=(()=>{class n extends fb{get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(e){this._fixedInViewport=lo(e)}_fixedInViewport=!1;get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(e){this._fixedTopGap=Nc(e)}_fixedTopGap=0;get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(e){this._fixedBottomGap=Nc(e)}_fixedBottomGap=0;static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275cmp=H({type:n,selectors:[["mat-sidenav"]],hostAttrs:[1,"mat-drawer","mat-sidenav"],hostVars:16,hostBindings:function(r,i){r&2&&(We("tabIndex",i.mode!=="side"?"-1":null)("align",null),Wi("top",i.fixedInViewport?i.fixedTopGap:null,"px")("bottom",i.fixedInViewport?i.fixedBottomGap:null,"px"),le("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side")("mat-sidenav-fixed",i.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[lt([{provide:fb,useExisting:n}]),Ne],ngContentSelectors:Eh,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(r,i){r&1&&(yt(),m(0,"div",1,0),Ge(2),g())},dependencies:[Ls],encapsulation:2,changeDetection:0})}return n})(),dT=(()=>{class n extends hb{_allDrawers=void 0;_content=void 0;static \u0275fac=(()=>{let e;return function(i){return(e||(e=ht(n)))(i||n)}})();static \u0275cmp=H({type:n,selectors:[["mat-sidenav-container"]],contentQueries:function(r,i,o){if(r&1&&(zi(o,wh,5),zi(o,mb,5)),r&2){let s;at(s=ct())&&(i._content=s.first),at(s=ct())&&(i._allDrawers=s)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(r,i){r&2&&le("mat-drawer-container-explicit-backdrop",i._backdropOverride)},exportAs:["matSidenavContainer"],features:[lt([{provide:pb,useExisting:n},{provide:hb,useExisting:n}]),Ne],ngContentSelectors:YV,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(r,i){r&1&&(yt(qV),O(0,ZV,1,2,"div",0),Ge(1),Ge(2,1),O(3,KV,2,0,"mat-sidenav-content")),r&2&&(R(i.hasBackdrop?0:-1),y(3),R(i._content?-1:3))},dependencies:[wh],styles:[QV],encapsulation:2,changeDetection:0})}return n})(),uT=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[pt,Hc,Hc,pt]})}return n})();var fT=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Ce({type:n});static \u0275inj=ve({imports:[pt,pt]})}return n})();var Sh=class n{http=f(tr);getUserConfig(){return this.http.get("/api/config/user").pipe(ge(t=>console.log("[CONFIG-API] User config retrieved:",t)))}updateUserConfig(t){return this.http.put("/api/config/user",t).pipe(ge(e=>console.log("[CONFIG-API] User config updated:",e)))}getProjectConfig(t){return this.http.get(`/api/config/project/${encodeURIComponent(t)}`).pipe(ge(e=>console.log("[CONFIG-API] Project config retrieved:",e)))}updateProjectConfig(t,e){return this.http.put(`/api/config/project/${encodeURIComponent(t)}`,e).pipe(ge(r=>console.log("[CONFIG-API] Project config updated:",r)))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var na=class n{currentThemeSubject=new Z("light");currentTheme$=this.currentThemeSubject.asObservable();preferences=f(Mt);constructor(){console.log("[THEME] Initializing theme service"),this.initializeTheme(),this.setupSystemThemeListener()}initializeTheme(){let t=this.preferences.getPreference("theme","light")??"light";console.log("[THEME] Loaded saved theme:",t),this.applyTheme(t)}setTheme(t){this.preferences.setPreference("theme",t),this.applyTheme(t)}getCurrentTheme(){return this.currentThemeSubject.value}applyTheme(t){if(console.log("[THEME] Applying theme:",t),this.currentThemeSubject.next(t),t==="system")if(typeof window<"u"&&window.matchMedia){let r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";console.log("[THEME] System theme resolved to:",r),this.setDocumentTheme(r)}else console.log("[THEME] matchMedia not available, defaulting to light theme"),this.setDocumentTheme("light");else this.setDocumentTheme(t)}setDocumentTheme(t){console.log("[THEME] Setting document theme to:",t),typeof document<"u"&&document.documentElement&&(t==="dark"?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"))}setupSystemThemeListener(){typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.getCurrentTheme()==="system"&&this.setDocumentTheme(t.matches?"dark":"light")})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};var tj=(n,t)=>t.code,nj=(n,t)=>t.name+t.lang;function rj(n,t){if(n&1&&(m(0,"option",16),b(1),g()),n&2){let e=t.$implicit;j("value",e.code),y(),is("",e.flag," ",e.label)}}function ij(n,t){n&1&&(m(0,"option",23),b(1,"Loading voices..."),g())}function oj(n,t){n&1&&(m(0,"option",23),b(1,"No voice available"),g())}function sj(n,t){if(n&1&&(m(0,"option",16),b(1),g()),n&2){let e=t.$implicit;j("value",e.name+"|"+e.lang),y(),ke(" ",e.displayName," ")}}var sl=class n{destroy$=new A;selectedTheme="light";selectedVoiceLanguage="en-US";useEnterToSend=!1;printTechnicalMessages=!1;hideTechnicalMessages=!1;voiceAnnounceEnabled=!1;voiceMode="speech";voiceReadFullText=!1;voiceVolume=80;voiceRate=120;availableVoices=[];selectedVoiceId=null;loadingVoices=!1;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=f(Mt);voiceSynthesisService=f(Us);themeService=f(na);ngOnInit(){this.selectedTheme=this.themeService.getCurrentTheme(),this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.hideTechnicalMessages=this.preferencesService.getHideTechnicalMessages(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(F(this.destroy$)).subscribe(t=>{this.selectedTheme=t}),this.preferencesService.voiceLanguage$.pipe(F(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t}),this.preferencesService.enterToSend$.pipe(F(this.destroy$)).subscribe(t=>{this.useEnterToSend=t}),this.preferencesService.printTechnicalMessages$.pipe(F(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t}),this.preferencesService.hideTechnicalMessages$.pipe(F(this.destroy$)).subscribe(t=>{this.hideTechnicalMessages=t}),this.preferencesService.voiceAnnounceEnabled$.pipe(F(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t}),this.preferencesService.voiceMode$.pipe(F(this.destroy$)).subscribe(t=>{this.voiceMode=t}),this.preferencesService.voiceReadFullText$.pipe(F(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t}),this.preferencesService.voiceVolume$.pipe(F(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100)}),this.preferencesService.voiceRate$.pipe(F(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100)}),this.preferencesService.selectedVoice$.pipe(F(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t}),this.preferencesService.voiceLanguage$.pipe(F(this.destroy$)).subscribe(()=>{this.loadAvailableVoices()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme(this.selectedTheme)}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage)}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend)}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages)}onHideTechnicalMessagesChange(){console.log("[OPTIONS] Hide technical messages changed to:",this.hideTechnicalMessages),this.preferencesService.setHideTechnicalMessages(this.hideTechnicalMessages)}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled)}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode)}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText)}onVoiceVolumeChange(){let t=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",t),this.preferencesService.setVoiceVolume(t)}onVoiceRateChange(){let t=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",t),this.preferencesService.setVoiceRate(t)}loadAvailableVoices(){return xe(this,null,function*(){this.loadingVoices=!0;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language")}catch(t){console.error("[OPTIONS] Error loading voices:",t),this.availableVoices=[]}finally{this.loadingVoices=!1}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId)}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-options-panel"]],decls:131,vars:34,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],["type","radio","name","hideTechnical",3,"ngModelChange","change","value","ngModel"],["type","radio","name","printTechnical",3,"ngModelChange","change","value","ngModel"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"]],template:function(e,r){e&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),b(4,"palette"),g(),m(5,"span"),b(6,"Appearance"),g()(),m(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),_e("ngModelChange",function(o){return we(r.selectedTheme,o)||(r.selectedTheme=o),o}),x("change",function(){return r.onThemeChange()}),g(),ie(11,"span",7),b(12," Light "),g(),m(13,"label",5)(14,"input",8),_e("ngModelChange",function(o){return we(r.selectedTheme,o)||(r.selectedTheme=o),o}),x("change",function(){return r.onThemeChange()}),g(),ie(15,"span",7),b(16," Dark "),g(),m(17,"label",5)(18,"input",9),_e("ngModelChange",function(o){return we(r.selectedTheme,o)||(r.selectedTheme=o),o}),x("change",function(){return r.onThemeChange()}),g(),ie(19,"span",7),b(20," System "),g()()()(),m(21,"div",1)(22,"div",2)(23,"mat-icon"),b(24,"chat_bubble_outline"),g(),m(25,"span"),b(26,"Messaging"),g()(),m(27,"div",3)(28,"span",10),b(29,"Send message behavior:"),g(),m(30,"div",4)(31,"label",5)(32,"input",11),_e("ngModelChange",function(o){return we(r.useEnterToSend,o)||(r.useEnterToSend=o),o}),x("change",function(){return r.onEnterToSendChange()}),g(),ie(33,"span",7),b(34," Enter to send "),g(),m(35,"label",5)(36,"input",11),_e("ngModelChange",function(o){return we(r.useEnterToSend,o)||(r.useEnterToSend=o),o}),x("change",function(){return r.onEnterToSendChange()}),g(),ie(37,"span",7),b(38," Enter for new line "),g()()(),m(39,"div",3)(40,"span",10),b(41,"Technical messages display:"),g(),m(42,"div",4)(43,"label",5)(44,"input",12),_e("ngModelChange",function(o){return we(r.hideTechnicalMessages,o)||(r.hideTechnicalMessages=o),o}),x("change",function(){return r.onHideTechnicalMessagesChange()}),g(),ie(45,"span",7),b(46," Show technical messages "),g(),m(47,"label",5)(48,"input",12),_e("ngModelChange",function(o){return we(r.hideTechnicalMessages,o)||(r.hideTechnicalMessages=o),o}),x("change",function(){return r.onHideTechnicalMessagesChange()}),g(),ie(49,"span",7),b(50," Hide technical messages "),g()()(),m(51,"div",3)(52,"span",10),b(53,"Technical messages in print:"),g(),m(54,"div",4)(55,"label",5)(56,"input",13),_e("ngModelChange",function(o){return we(r.printTechnicalMessages,o)||(r.printTechnicalMessages=o),o}),x("change",function(){return r.onPrintTechnicalMessagesChange()}),g(),ie(57,"span",7),b(58," Include technical messages "),g(),m(59,"label",5)(60,"input",13),_e("ngModelChange",function(o){return we(r.printTechnicalMessages,o)||(r.printTechnicalMessages=o),o}),x("change",function(){return r.onPrintTechnicalMessagesChange()}),g(),ie(61,"span",7),b(62," Exclude technical messages "),g()()()(),m(63,"div",1)(64,"div",2)(65,"mat-icon"),b(66,"record_voice_over"),g(),m(67,"span"),b(68,"Voice & Speech"),g()(),m(69,"div",3)(70,"label",14),b(71,"Voice recognition language:"),g(),m(72,"select",15),_e("ngModelChange",function(o){return we(r.selectedVoiceLanguage,o)||(r.selectedVoiceLanguage=o),o}),x("change",function(){return r.onVoiceLanguageChange()}),ot(73,rj,2,3,"option",16,tj),g()(),m(75,"div",3)(76,"span",10),b(77,"Automatic announcement:"),g(),m(78,"div",4)(79,"label",5)(80,"input",17),_e("ngModelChange",function(o){return we(r.voiceAnnounceEnabled,o)||(r.voiceAnnounceEnabled=o),o}),x("change",function(){return r.onVoiceAnnounceEnabledChange()}),g(),ie(81,"span",7),b(82," Enabled "),g(),m(83,"label",5)(84,"input",17),_e("ngModelChange",function(o){return we(r.voiceAnnounceEnabled,o)||(r.voiceAnnounceEnabled=o),o}),x("change",function(){return r.onVoiceAnnounceEnabledChange()}),g(),ie(85,"span",7),b(86," Disabled "),g()()(),m(87,"div",3)(88,"span",10),b(89,"Voice mode:"),g(),m(90,"div",4)(91,"label",5)(92,"input",18),_e("ngModelChange",function(o){return we(r.voiceMode,o)||(r.voiceMode=o),o}),x("change",function(){return r.onVoiceModeChange()}),g(),ie(93,"span",7),b(94," Voice synthesis "),g(),m(95,"label",5)(96,"input",19),_e("ngModelChange",function(o){return we(r.voiceMode,o)||(r.voiceMode=o),o}),x("change",function(){return r.onVoiceModeChange()}),g(),ie(97,"span",7),b(98," Sound notification "),g()()(),m(99,"div",3)(100,"span",10),b(101,"Message reading:"),g(),m(102,"div",4)(103,"label",5)(104,"input",20),_e("ngModelChange",function(o){return we(r.voiceReadFullText,o)||(r.voiceReadFullText=o),o}),x("change",function(){return r.onVoiceReadFullTextChange()}),g(),ie(105,"span",7),b(106," Full message "),g(),m(107,"label",5)(108,"input",20),_e("ngModelChange",function(o){return we(r.voiceReadFullText,o)||(r.voiceReadFullText=o),o}),x("change",function(){return r.onVoiceReadFullTextChange()}),g(),ie(109,"span",7),b(110," First paragraphs only "),g()()(),m(111,"div",3)(112,"label",21),b(113,"Selected voice:"),g(),m(114,"select",22),_e("ngModelChange",function(o){return we(r.selectedVoiceId,o)||(r.selectedVoiceId=o),o}),x("change",function(){return r.onSelectedVoiceChange()}),O(115,ij,2,0,"option",23),O(116,oj,2,0,"option",23),ot(117,sj,2,2,"option",16,nj),g(),ie(119,"div",10),m(120,"a",24),x("click",function(){return r.testVoice()}),m(121,"span",25),b(122,"Test voice"),g()()(),m(123,"div",3)(124,"label",26),b(125),g(),m(126,"input",27),_e("ngModelChange",function(o){return we(r.voiceVolume,o)||(r.voiceVolume=o),o}),x("input",function(){return r.onVoiceVolumeChange()}),g()(),m(127,"div",3)(128,"label",28),b(129),g(),m(130,"input",29),_e("ngModelChange",function(o){return we(r.voiceRate,o)||(r.voiceRate=o),o}),x("input",function(){return r.onVoiceRateChange()}),g()()()()),e&2&&(y(10),be("ngModel",r.selectedTheme),y(4),be("ngModel",r.selectedTheme),y(4),be("ngModel",r.selectedTheme),y(14),j("value",!0),be("ngModel",r.useEnterToSend),y(4),j("value",!1),be("ngModel",r.useEnterToSend),y(8),j("value",!1),be("ngModel",r.hideTechnicalMessages),y(4),j("value",!0),be("ngModel",r.hideTechnicalMessages),y(8),j("value",!0),be("ngModel",r.printTechnicalMessages),y(4),j("value",!1),be("ngModel",r.printTechnicalMessages),y(12),be("ngModel",r.selectedVoiceLanguage),y(),st(r.voiceLanguageOptions),y(7),j("value",!0),be("ngModel",r.voiceAnnounceEnabled),y(4),j("value",!1),be("ngModel",r.voiceAnnounceEnabled),y(8),be("ngModel",r.voiceMode),y(4),be("ngModel",r.voiceMode),y(8),j("value",!0),be("ngModel",r.voiceReadFullText),y(4),j("value",!1),be("ngModel",r.voiceReadFullText),y(6),be("ngModel",r.selectedVoiceId),j("disabled",r.loadingVoices||r.availableVoices.length===0),y(),R(r.loadingVoices?115:-1),y(),R(!r.loadingVoices&&r.availableVoices.length===0?116:-1),y(),st(r.availableVoices),y(8),ke("Volume: ",r.voiceVolume,"%"),y(),be("ngModel",r.voiceVolume),y(3),ke("Speed: ",r.voiceRate,"%"),y(),be("ngModel",r.voiceRate))},dependencies:[bn,vi,yi,fr,ub,hr,il,yn,rn,vn],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}']})};var aj=(n,t)=>t.label,cj=(n,t)=>t.id;function lj(n,t){if(n&1){let e=J();he(0,"button",7),Jn("click",function(){let i=I(e).$implicit,o=w(3);return k(o.selectThread(i.id))}),he(1,"span",8),b(2),pe()()}if(n&2){let e=t.$implicit,r=w(3);le("current",e.id===(r.threads==null?null:r.threads.current)),rs("title",e.name),y(2),Ue(e.name)}}function dj(n,t){if(n&1&&(he(0,"div",3)(1,"div",5),b(2),pe(),ot(3,lj,3,4,"button",6,cj),pe()),n&2){let e=t.$implicit;y(2),Ue(e.label),y(),st(e.threads)}}function uj(n,t){n&1&&(he(0,"div",4),b(1,"No existing threads"),pe())}function fj(n,t){if(n&1&&(he(0,"div",1),ot(1,dj,5,1,"div",3,aj),O(3,uj,2,0,"div",4),pe()),n&2){let e=w();y(),st(e.getGroupedThreads()),y(2),R(e.hasThreadsAvailable()?-1:3)}}function hj(n,t){n&1&&(he(0,"span",9),b(1,"No project selected"),pe())}function pj(n,t){n&1&&(he(0,"span",9),b(1,"Loading..."),pe())}function mj(n,t){if(n&1&&(he(0,"div",2),O(1,hj,2,0,"span",9)(2,pj,2,0,"span",9),pe()),n&2){let e=w();y(),R(e.hasProjectSelected()?2:1)}}var Dh=class n{destroy$=new A;threads=null;projects=null;sessionState=f(bi);codayService=f(Qt);ngOnInit(){this.sessionState.getThreads$().pipe(F(this.destroy$)).subscribe(t=>{console.log("[THREAD-SELECTOR] Threads updated:",t),this.threads=t}),this.sessionState.getProjects$().pipe(F(this.destroy$)).subscribe(t=>{console.log("[THREAD-SELECTOR] Projects updated:",t),this.projects=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}selectThread(t){console.log("[THREAD-SELECTOR] Selecting thread:",t),this.codayService.sendMessage(`thread select ${t}`)}createNewThread(){console.log("[THREAD-SELECTOR] Creating new thread"),this.codayService.sendMessage("thread new")}canShowDropdown(){return this.hasProjectSelected()&&this.isThreadManagementAvailable()}isThreadManagementAvailable(){return this.hasProjectSelected()}hasProjectSelected(){return!!this.projects?.current}getAvailableThreads(){return this.threads?.list?[...this.threads.list].sort((t,e)=>new Date(e.modifiedDate).getTime()-new Date(t.modifiedDate).getTime()):[]}getGroupedThreads(){let t=this.getAvailableThreads();if(t.length===0)return[];let e=new Map,r=new Date;r.setHours(0,0,0,0);for(let o of t){let s=new Date(o.modifiedDate);s.setHours(0,0,0,0);let a=r.getTime()-s.getTime(),c=Math.floor(a/(1e3*60*60*24)),l;c===0?l="Today":c===1?l="Yesterday":c<7?l="This Week":c<30?l="This Month":c<90?l="Last 3 Months":l="Older",e.has(l)||e.set(l,[]),e.get(l).push(o)}return["Today","Yesterday","This Week","This Month","Last 3 Months","Older"].filter(o=>e.has(o)).map(o=>({label:o,threads:e.get(o)}))}hasThreadsAvailable(){return!!(this.threads?.list&&this.threads.list.length>0)}getCurrentThreadName(){if(!this.threads?.current||!this.threads?.list)return null;let t=this.threads.list.find(e=>e.id===this.threads.current);return t?t.name:null}formatDate(t){try{let e=new Date(t),i=new Date().getTime()-e.getTime(),o=Math.floor(i/(1e3*60*60*24));return o===0?"Today":o===1?"Yesterday":o<7?`${o} days ago`:e.toLocaleDateString("en-EN",{day:"numeric",month:"short"})}catch{return"No date"}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-thread-selector"]],decls:3,vars:1,consts:[["tabindex","0","role","application","aria-label","Thread selector",1,"thread-selector",3,"click","keydown"],["role","menu","aria-label","Thread selection",1,"thread-list"],[1,"thread-disabled"],[1,"thread-group"],[1,"thread-empty"],[1,"thread-group-header"],["type","button","role","menuitem",1,"thread-item",3,"current","title"],["type","button","role","menuitem",1,"thread-item",3,"click","title"],[1,"thread-name"],[1,"disabled-text"]],template:function(e,r){e&1&&(he(0,"div",0),Jn("click",function(o){return o.stopPropagation()})("keydown",function(o){return o.stopPropagation()}),O(1,fj,4,1,"div",1)(2,mj,3,1,"div",2),pe()),e&2&&(y(),R(r.canShowDropdown()?1:2))},dependencies:[Gt],styles:[".thread-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.thread-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;max-height:none;overflow:visible}.thread-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:.5rem}.thread-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.thread-group-header[_ngcontent-%COMP%]{padding:.5rem 1rem .25rem;font-size:.75rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.5px;position:sticky;top:0;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);z-index:1}.thread-item[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:.7rem 1rem;background:transparent;border:none;color:var(--color-text);text-align:left;cursor:pointer;transition:background-color .2s ease;gap:.5rem;border-radius:0}.thread-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.thread-item[_ngcontent-%COMP%]:active{transform:scale(.98)}.thread-item.current[_ngcontent-%COMP%]{background:var(--color-primary-light);color:var(--color-primary-text);font-weight:600}.thread-item.new-thread-item[_ngcontent-%COMP%]{margin-bottom:.25rem}.thread-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:transparent;border:none;text-decoration:none;cursor:pointer;transition:all .2s ease;gap:.5rem;font-size:.875rem;font-weight:400;padding:0 1rem}.thread-link[_ngcontent-%COMP%]:hover:not(.new-thread-link){color:var(--color-primary-hover, var(--color-primary));text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}.thread-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.thread-link.new-thread-link[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:600;font-size:.95rem}.thread-link.new-thread-link[_ngcontent-%COMP%] .thread-name[_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite}.thread-link.new-thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-primary);animation:_ngcontent-%COMP%_iconPulse 3s ease-in-out infinite}.thread-link.new-thread-link[_ngcontent-%COMP%]:hover{transform:translate(4px)}.thread-link.new-thread-link[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_iconPulse 1.5s ease-in-out infinite}.thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}@keyframes _ngcontent-%COMP%_iconPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.05)}}.thread-name[_ngcontent-%COMP%]{flex:1;font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}.current-indicator[_ngcontent-%COMP%]{color:var(--color-success);font-weight:700;flex-shrink:0;font-size:1rem}.thread-separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border);margin:.25rem 0}.thread-empty[_ngcontent-%COMP%]{padding:1.5rem 1rem;text-align:center;color:var(--color-text-muted);font-size:.8rem;font-style:italic}.thread-disabled[_ngcontent-%COMP%]{padding:1.5rem 1rem}.thread-disabled[_ngcontent-%COMP%] .disabled-text[_ngcontent-%COMP%]{display:block;color:var(--color-text-muted);font-size:.85rem;font-style:italic;text-align:center}@media (max-width: 768px){.thread-item[_ngcontent-%COMP%]{padding:.6rem .8rem}.thread-name[_ngcontent-%COMP%]{font-size:.8rem}}"]})};function gj(n,t){n&1&&(m(0,"div",5),ie(1,"div",7),m(2,"p"),b(3,"Loading configuration..."),g()())}function vj(n,t){if(n&1&&(m(0,"div",10),b(1),g()),n&2){let e=w(3);y(),ke(" \u274C ",e.errorMessage," ")}}function yj(n,t){if(n&1){let e=J();m(0,"div",6)(1,"textarea",8),_e("ngModelChange",function(i){I(e);let o=w(2);return we(o.jsonContent,i)||(o.jsonContent=i),k(i)}),g(),m(2,"div",9),O(3,vj,2,1,"div",10),g(),m(4,"div",11)(5,"button",12),x("click",function(){I(e);let i=w(2);return k(i.onCancel())}),b(6," Cancel "),g(),m(7,"button",13),x("click",function(){I(e);let i=w(2);return k(i.onSave())}),b(8),g()()()}if(n&2){let e=w(2);y(),be("ngModel",e.jsonContent),y(2),R(e.errorMessage?3:-1),y(2),j("disabled",e.isSaving),y(2),j("disabled",e.isSaving),y(),ke(" ",e.isSaving?"Saving...":"Save"," ")}}function bj(n,t){if(n&1){let e=J();m(0,"div",1),x("click",function(){I(e);let i=w();return k(i.onCancel())})("keyup.escape",function(){I(e);let i=w();return k(i.onCancel())}),m(1,"div",2),x("click",function(i){return I(e),k(i.stopPropagation())})("keydown.enter",function(i){return I(e),k(i.stopPropagation())}),m(2,"div",3)(3,"h2"),b(4),g(),m(5,"button",4),x("click",function(){I(e);let i=w();return k(i.onCancel())}),b(6,"\u2715"),g()(),O(7,gj,4,0,"div",5),O(8,yj,9,5,"div",6),g()()}if(n&2){let e=w();y(4),Ue(e.getTitle()),y(3),R(e.isLoading?7:-1),y(),R(e.isLoading?-1:8)}}var Mh=class n{configType="user";projectName;isOpen=!1;initialContent="";isLoading=!1;isSaving=!1;isOpenChange=new U;save=new U;closeEditor=new U;jsonContent="";errorMessage="";ngOnChanges(){this.initialContent&&(this.jsonContent=this.initialContent)}onSave(){this.errorMessage="";let t;try{t=JSON.parse(this.jsonContent)}catch(e){this.errorMessage=`Invalid JSON syntax: ${e instanceof Error?e.message:"Unknown error"}`;return}this.save.emit(t)}onCancel(){this.errorMessage="",this.closeEditor.emit()}getTitle(){return this.configType==="user"?"User Configuration":`Project Configuration: ${this.projectName||"Unknown"}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-json-editor"]],inputs:{configType:"configType",projectName:"projectName",isOpen:"isOpen",initialContent:"initialContent",isLoading:"isLoading",isSaving:"isSaving"},outputs:{isOpenChange:"isOpenChange",save:"save",closeEditor:"closeEditor"},features:[Qe],decls:1,vars:1,consts:[["tabindex","0","role","dialog","aria-modal","true","aria-label","JSON Editor",1,"json-editor-overlay"],["tabindex","0","role","dialog","aria-modal","true","aria-label","JSON Editor",1,"json-editor-overlay",3,"click","keyup.escape"],["tabindex","-1",1,"json-editor-modal",3,"click","keydown.enter"],[1,"editor-header"],["title","Close",1,"close-btn",3,"click"],[1,"loading-state"],[1,"editor-content"],[1,"spinner"],["spellcheck","false","placeholder","Enter JSON configuration...",1,"json-textarea",3,"ngModelChange","ngModel"],[1,"messages"],[1,"error-message"],[1,"editor-actions"],[1,"btn","btn-secondary",3,"click","disabled"],[1,"btn","btn-primary",3,"click","disabled"]],template:function(e,r){e&1&&O(0,bj,9,3,"div",0),e&2&&R(r.isOpen?0:-1)},dependencies:[Gt,bn,fr,yn,rn],styles:[".json-editor-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1600;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.json-editor-modal[_ngcontent-%COMP%]{background:var(--color-bg);border-radius:8px;box-shadow:0 4px 20px #0000004d;width:90%;max-width:800px;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.editor-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-bottom:1px solid var(--color-border);background:var(--color-bg-secondary)}.editor-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:var(--color-text)}.editor-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--color-text-secondary);padding:.25rem .5rem;line-height:1;border-radius:4px;transition:all .2s}.editor-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-text)}.loading-state[_ngcontent-%COMP%]{padding:3rem;display:flex;flex-direction:column;align-items:center;gap:1rem;color:var(--color-text-secondary)}.loading-state[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:40px;height:40px;border:3px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.editor-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;padding:1.5rem;gap:1rem}.json-textarea[_ngcontent-%COMP%]{flex:1;min-height:300px;max-height:80vh;padding:1rem;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.875rem;line-height:1.5;background:var(--color-code-bg);color:var(--color-text);border:1px solid var(--color-border);border-radius:4px;resize:vertical;outline:none;transition:border-color .2s}.json-textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.json-textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.6}.messages[_ngcontent-%COMP%]{min-height:2rem;display:flex;flex-direction:column;gap:.5rem}.error-message[_ngcontent-%COMP%], .success-message[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:4px;font-size:.875rem;line-height:1.4}.error-message[_ngcontent-%COMP%]{background:#dc26261a;color:#dc2626;border:1px solid rgba(220,38,38,.3)}.success-message[_ngcontent-%COMP%]{background:#22c55e1a;color:#22c55e;border:1px solid rgba(34,197,94,.3)}.editor-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.75rem;padding-top:.5rem;border-top:1px solid var(--color-border)}.btn[_ngcontent-%COMP%]{padding:.625rem 1.25rem;border:none;border-radius:4px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn-secondary[_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text);border:1px solid var(--color-border)}.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.btn-primary[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}@media (max-width: 768px){.json-editor-modal[_ngcontent-%COMP%]{width:95%;max-height:95vh}.editor-content[_ngcontent-%COMP%]{padding:1rem}.json-textarea[_ngcontent-%COMP%]{min-height:250px;max-height:70vh;font-size:.8125rem}}"]})};var _j=(n,t)=>t.uuid;function Cj(n,t){n&1&&(he(0,"div",3),In(1,"div",7),he(2,"p"),b(3,"Loading webhooks..."),pe()())}function wj(n,t){if(n&1&&(he(0,"div",4)(1,"p"),b(2),pe()()),n&2){let e=w();y(2),ke("\u274C ",e.errorMessage)}}function Ej(n,t){n&1&&(he(0,"div",5)(1,"p"),b(2,"No webhooks configured yet."),pe(),he(3,"p",8),b(4,"Create your first webhook to enable programmatic AI interactions."),pe()())}function Sj(n,t){if(n&1){let e=J();he(0,"tr")(1,"td",9),b(2),pe(),he(3,"td",10),b(4),pe(),he(5,"td",11)(6,"span",12),b(7),pe()(),he(8,"td",13)(9,"div",14)(10,"span",15),b(11),pe(),he(12,"span",16),b(13),pe()()(),he(14,"td",17)(15,"button",18),Jn("click",function(){let i=I(e).$implicit,o=w(2);return k(o.onCopyUrl(i))}),b(16," \u{1F4CB} "),pe(),he(17,"button",19),Jn("click",function(){let i=I(e).$implicit,o=w(2);return k(o.onEditClick(i))}),b(18," \u270F\uFE0F "),pe(),he(19,"button",20),Jn("click",function(){let i=I(e).$implicit,o=w(2);return k(o.onDeleteClick(i))}),b(20," \u{1F5D1}\uFE0F "),pe()()()}if(n&2){let e=t.$implicit,r=w(2);y(2),Ue(e.name),y(2),Ue(e.project),y(2),le("type-free",e.commandType==="free")("type-template",e.commandType==="template"),y(),ke(" ",r.getCommandTypeLabel(e.commandType)," "),y(4),Ue(r.formatDate(e.createdAt)),y(2),ke("by ",e.createdBy)}}function Dj(n,t){if(n&1&&(he(0,"div",6)(1,"table")(2,"thead")(3,"tr")(4,"th"),b(5,"Name"),pe(),he(6,"th"),b(7,"Project"),pe(),he(8,"th"),b(9,"Type"),pe(),he(10,"th"),b(11,"Created"),pe(),he(12,"th"),b(13,"Actions"),pe()()(),he(14,"tbody"),ot(15,Sj,21,9,"tr",null,_j),pe()()()),n&2){let e=w();y(15),st(e.webhooks)}}var Th=class n{set webhooks(t){console.log("[WEBHOOK-LIST] Received webhooks:",t),this._webhooks=t}get webhooks(){return this._webhooks}_webhooks=[];isLoading=!1;errorMessage="";create=new U;edit=new U;deleteWebhook=new U;copyUrl=new U;onCreateClick(){this.create.emit()}onEditClick(t){this.edit.emit(t)}onDeleteClick(t){this.deleteWebhook.emit(t)}onCopyUrl(t){let e=`${window.location.origin}/api/webhook/${t.uuid}`;navigator.clipboard.writeText(e).then(()=>{this.copyUrl.emit(e)}).catch(r=>{console.error("Failed to copy URL:",r)})}formatDate(t){let e=typeof t=="string"?new Date(t):t;return e.toLocaleDateString()+" "+e.toLocaleTimeString()}getCommandTypeLabel(t){if(!t)return console.warn("[WEBHOOK-LIST] commandType is missing!",t),"Unknown";let e=t==="free"?"Free Form":"Template";return console.log("[WEBHOOK-LIST] getCommandTypeLabel called with:",t,"\u2192",e),e}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-webhook-list"]],inputs:{webhooks:"webhooks",isLoading:"isLoading",errorMessage:"errorMessage"},outputs:{create:"create",edit:"edit",deleteWebhook:"deleteWebhook",copyUrl:"copyUrl"},decls:10,vars:5,consts:[[1,"webhook-list-container"],[1,"list-header"],[1,"btn-create",3,"click","disabled"],[1,"loading-state"],[1,"error-state"],[1,"empty-state"],[1,"webhook-table"],[1,"spinner"],[1,"hint"],[1,"name-cell"],[1,"project-cell"],[1,"type-cell"],[1,"type-badge"],[1,"date-cell"],[1,"date-info"],[1,"date"],[1,"creator"],[1,"actions-cell"],["title","Copy webhook URL",1,"btn-action","btn-copy",3,"click"],["title","Edit webhook",1,"btn-action","btn-edit",3,"click"],["title","Delete webhook",1,"btn-action","btn-delete",3,"click"]],template:function(e,r){e&1&&(he(0,"div",0)(1,"div",1)(2,"h2"),b(3,"Webhooks"),pe(),he(4,"button",2),Jn("click",function(){return r.onCreateClick()}),b(5," \u2795 New Webhook "),pe()(),O(6,Cj,4,0,"div",3),O(7,wj,3,1,"div",4),O(8,Ej,5,0,"div",5),O(9,Dj,17,0,"div",6),pe()),e&2&&(y(4),rs("disabled",r.isLoading),y(2),R(r.isLoading?6:-1),y(),R(r.errorMessage&&!r.isLoading?7:-1),y(),R(!r.isLoading&&!r.errorMessage&&r.webhooks.length===0?8:-1),y(),R(!r.isLoading&&!r.errorMessage&&r.webhooks.length>0?9:-1))},dependencies:[Gt],styles:[".webhook-list-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;min-height:400px}.list-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.list-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;color:var(--color-text)}.btn-create[_ngcontent-%COMP%]{padding:.5rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:.9rem;transition:background .2s}.btn-create[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}.btn-create[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center;color:var(--color-text-secondary)}.loading-state[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:40px;height:40px;border:4px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite;margin-bottom:1rem}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.error-state[_ngcontent-%COMP%]{color:var(--color-error)}.empty-state[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{font-size:.9rem;margin-top:.5rem}.webhook-table[_ngcontent-%COMP%]{overflow-x:auto}.webhook-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px}.webhook-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{background:var(--color-bg-hover)}.webhook-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.75rem;text-align:left;font-weight:600;color:var(--color-text);border-bottom:2px solid var(--color-border);font-size:.9rem}.webhook-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border);transition:background .2s}.webhook-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.webhook-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.webhook-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem;color:var(--color-text);font-size:.9rem}.webhook-table[_ngcontent-%COMP%] .name-cell[_ngcontent-%COMP%]{font-weight:500;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.webhook-table[_ngcontent-%COMP%] .project-cell[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.webhook-table[_ngcontent-%COMP%] .type-cell[_ngcontent-%COMP%]{min-width:100px}.webhook-table[_ngcontent-%COMP%] .type-cell[_ngcontent-%COMP%] .type-badge[_ngcontent-%COMP%]{display:inline-block;padding:.25rem .5rem;border-radius:12px;font-size:.75rem;font-weight:500}.webhook-table[_ngcontent-%COMP%] .type-cell[_ngcontent-%COMP%] .type-badge.type-free[_ngcontent-%COMP%]{background:var(--color-info);color:var(--color-text)}.webhook-table[_ngcontent-%COMP%] .type-cell[_ngcontent-%COMP%] .type-badge.type-template[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.webhook-table[_ngcontent-%COMP%] .date-cell[_ngcontent-%COMP%] .date-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.webhook-table[_ngcontent-%COMP%] .date-cell[_ngcontent-%COMP%] .date-info[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:.85rem}.webhook-table[_ngcontent-%COMP%] .date-cell[_ngcontent-%COMP%] .date-info[_ngcontent-%COMP%] .creator[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary)}.webhook-table[_ngcontent-%COMP%] .actions-cell[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.webhook-table[_ngcontent-%COMP%] .btn-action[_ngcontent-%COMP%]{display:inline-block;padding:.4rem .6rem;margin-left:.25rem;background:transparent;border:1px solid var(--color-border);border-radius:4px;cursor:pointer;font-size:1rem;transition:all .2s}.webhook-table[_ngcontent-%COMP%] .btn-action[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);transform:scale(1.1)}.webhook-table[_ngcontent-%COMP%] .btn-action.btn-copy[_ngcontent-%COMP%]:hover, .webhook-table[_ngcontent-%COMP%] .btn-action.btn-edit[_ngcontent-%COMP%]:hover{border-color:var(--color-primary)}.webhook-table[_ngcontent-%COMP%] .btn-action.btn-delete[_ngcontent-%COMP%]:hover{border-color:var(--color-error)}@media (max-width: 768px){.webhook-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{font-size:.8rem}.webhook-table[_ngcontent-%COMP%] .name-cell[_ngcontent-%COMP%]{max-width:120px}.webhook-table[_ngcontent-%COMP%] .date-info[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:.75rem}.webhook-table[_ngcontent-%COMP%] .date-info[_ngcontent-%COMP%] .creator[_ngcontent-%COMP%]{display:none}}"]})};function Mj(n,t){if(n&1&&(m(0,"div",1),b(1),g()),n&2){let e=w();y(),ke("\u274C ",e.errorMessage)}}function Tj(n,t){if(n&1){let e=J();m(0,"input",20),_e("ngModelChange",function(i){I(e);let o=w();return we(o.project,i)||(o.project=i),k(i)}),g()}if(n&2){let e=w();be("ngModel",e.project),j("disabled",e.isSaving)}}function xj(n,t){if(n&1&&(m(0,"option",23),b(1),g()),n&2){let e=t.$implicit;j("value",e),y(),Ue(e)}}function Ij(n,t){if(n&1){let e=J();m(0,"select",21),_e("ngModelChange",function(i){I(e);let o=w();return we(o.project,i)||(o.project=i),k(i)}),m(1,"option",22),b(2,"Select a project..."),g(),ot(3,xj,2,2,"option",23,Vg),g()}if(n&2){let e=w();be("ngModel",e.project),j("disabled",e.isSaving),y(3),st(e.availableProjects)}}function kj(n,t){if(n&1){let e=J();m(0,"div",3)(1,"label",24),b(2,"Commands *"),g(),m(3,"textarea",25),_e("ngModelChange",function(i){I(e);let o=w();return we(o.commands,i)||(o.commands=i),k(i)}),g(),m(4,"small",6),b(5," One command per line. Use double braces around placeholder names for dynamic values. "),g()()}if(n&2){let e=w();y(3),be("ngModel",e.commands),j("disabled",e.isSaving)}}function Aj(n,t){n&1&&(m(0,"div",16)(1,"p")(2,"strong"),b(3,"\u2139\uFE0F Free Form Webhook"),g(),ie(4,"br"),b(5," Callers will provide prompts in the request body using the "),m(6,"code"),b(7,"prompts"),g(),b(8," array field. "),g()())}var xh=class n{webhook;isSaving=!1;availableProjects=[];save=new U;cancelForm=new U;name="";project="";commandType="template";commands="";errorMessage="";get isEditMode(){return!!this.webhook}get formTitle(){return this.isEditMode?"Edit Webhook":"Create Webhook"}ngOnChanges(t){t.webhook&&this.webhook&&(this.name=this.webhook.name,this.project=this.webhook.project,this.commandType=this.webhook.commandType,this.commands=this.webhook.commands?.join(`
105
+ `)??"")}onCommandTypeChange(){this.commandType==="free"&&(this.commands="")}onSave(){if(this.errorMessage="",!this.name.trim()){this.errorMessage="Webhook name is required";return}if(!this.project.trim()){this.errorMessage="Project is required";return}if(this.commandType==="template"&&this.commands.trim().split(`
106
+ `).filter(i=>i.trim()).length===0){this.errorMessage="Template webhooks must have at least one command";return}let t=this.commandType==="template"?this.commands.trim().split(`
107
+ `).filter(r=>r.trim()):void 0,e=E({name:this.name.trim(),project:this.project.trim(),commandType:this.commandType},t&&{commands:t});this.save.emit(e)}onCancel(){this.cancelForm.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-webhook-form"]],inputs:{webhook:"webhook",isSaving:"isSaving",availableProjects:"availableProjects"},outputs:{save:"save",cancelForm:"cancelForm"},features:[Qe],decls:43,vars:15,consts:[[1,"webhook-form-container"],[1,"error-message"],[3,"ngSubmit"],[1,"form-group"],["for","name"],["type","text","id","name","name","name","placeholder","e.g., CI Pipeline Webhook","required","",3,"ngModelChange","ngModel","disabled"],[1,"hint"],["for","project"],["type","text","id","project","name","project","placeholder","e.g., my-project","required","",3,"ngModel","disabled"],["id","project","name","project","required","",3,"ngModel","disabled"],[1,"field-label"],[1,"radio-group"],[1,"radio-option"],["type","radio","name","commandType","value","template",3,"ngModelChange","change","ngModel","disabled"],[1,"radio-label"],["type","radio","name","commandType","value","free",3,"ngModelChange","change","ngModel","disabled"],[1,"info-box"],[1,"form-actions"],["type","button",1,"btn-cancel",3,"click","disabled"],["type","submit",1,"btn-save",3,"disabled"],["type","text","id","project","name","project","placeholder","e.g., my-project","required","",3,"ngModelChange","ngModel","disabled"],["id","project","name","project","required","",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],["for","commands"],["id","commands","name","commands","rows","6","placeholder","Enter commands, one per line (use double braces for placeholders)","required","",3,"ngModelChange","ngModel","disabled"]],template:function(e,r){e&1&&(m(0,"div",0)(1,"h2"),b(2),g(),O(3,Mj,2,1,"div",1),m(4,"form",2),x("ngSubmit",function(){return r.onSave()}),m(5,"div",3)(6,"label",4),b(7,"Name *"),g(),m(8,"input",5),_e("ngModelChange",function(o){return we(r.name,o)||(r.name=o),o}),g(),m(9,"small",6),b(10,"A descriptive name for this webhook"),g()(),m(11,"div",3)(12,"label",7),b(13,"Project *"),g(),O(14,Tj,1,2,"input",8),O(15,Ij,5,2,"select",9),m(16,"small",6),b(17,"The project context for this webhook"),g()(),m(18,"div",3)(19,"span",10),b(20,"Command Type *"),g(),m(21,"div",11)(22,"label",12)(23,"input",13),_e("ngModelChange",function(o){return we(r.commandType,o)||(r.commandType=o),o}),x("change",function(){return r.onCommandTypeChange()}),g(),m(24,"span",14)(25,"strong"),b(26,"Template"),g(),m(27,"small"),b(28,"Pre-defined commands with placeholders"),g()()(),m(29,"label",12)(30,"input",15),_e("ngModelChange",function(o){return we(r.commandType,o)||(r.commandType=o),o}),x("change",function(){return r.onCommandTypeChange()}),g(),m(31,"span",14)(32,"strong"),b(33,"Free Form"),g(),m(34,"small"),b(35,"Caller provides prompts in request body"),g()()()()(),O(36,kj,6,2,"div",3),O(37,Aj,9,0,"div",16),m(38,"div",17)(39,"button",18),x("click",function(){return r.onCancel()}),b(40,"Cancel"),g(),m(41,"button",19),b(42),g()()()()),e&2&&(y(2),Ue(r.formTitle),y(),R(r.errorMessage?3:-1),y(5),be("ngModel",r.name),j("disabled",r.isSaving),y(6),R(r.availableProjects.length===0?14:-1),y(),R(r.availableProjects.length>0?15:-1),y(8),be("ngModel",r.commandType),j("disabled",r.isSaving),y(7),be("ngModel",r.commandType),j("disabled",r.isSaving),y(6),R(r.commandType==="template"?36:-1),y(),R(r.commandType==="free"?37:-1),y(2),j("disabled",r.isSaving),y(2),j("disabled",r.isSaving),y(),ke(" ",r.isSaving?"Saving...":"Save Webhook"," "))},dependencies:[Gt,bn,ph,vi,yi,fr,hr,il,yn,dh,ol,rn,rl],styles:[".webhook-form-container[_ngcontent-%COMP%]{padding:1.5rem;background:var(--color-bg);border-radius:8px;max-width:600px;margin:0 auto}.webhook-form-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 1.5rem;font-size:1.5rem;color:var(--color-text)}.error-message[_ngcontent-%COMP%]{padding:.75rem;background:#ff00001a;border-left:4px solid var(--color-error);color:var(--color-error);margin-bottom:1rem;border-radius:4px;font-size:.9rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%]{font-weight:500;color:var(--color-text);font-size:.95rem}.form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{padding:.75rem;border:1px solid var(--color-border);border-radius:4px;font-size:.95rem;background:var(--color-bg);color:var(--color-text);font-family:inherit;transition:border-color .2s}.form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus, .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus, .form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary)}.form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:disabled, .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled, .form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]::placeholder, .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::placeholder, .form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary)}.form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.9rem}.form-group[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin-top:-.25rem}.form-group[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg);padding:.125rem .25rem;border-radius:3px;font-size:.8rem}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem;border:2px solid var(--color-border);border-radius:6px;cursor:pointer;transition:all .2s}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:.25rem;cursor:pointer}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:disabled{cursor:not-allowed}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%] .radio-label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%] .radio-label[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-text);font-size:.95rem}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%] .radio-label[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.85rem}.radio-group[_ngcontent-%COMP%] .radio-option[_ngcontent-%COMP%]:has(input:checked){border-color:var(--color-primary);background:rgba(var(--color-primary-rgb),.05)}.info-box[_ngcontent-%COMP%]{padding:1rem;background:var(--color-bg-hover);border-left:4px solid var(--color-primary);border-radius:4px;font-size:.9rem}.info-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--color-text);line-height:1.6}.info-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem}.info-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg);padding:.125rem .25rem;border-radius:3px;font-size:.85rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-border)}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.75rem 1.5rem;border:none;border-radius:4px;font-size:.95rem;font-weight:500;cursor:pointer;transition:all .2s}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.form-actions[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%]{background:transparent;border:1px solid var(--color-border);color:var(--color-text)}.form-actions[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.form-actions[_ngcontent-%COMP%] .btn-save[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.form-actions[_ngcontent-%COMP%] .btn-save[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover)}@media (max-width: 768px){.webhook-form-container[_ngcontent-%COMP%]{padding:1rem}.webhook-form-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.25rem}.form-actions[_ngcontent-%COMP%]{flex-direction:column-reverse}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}"]})};var Ih=class n{http=f(tr);BASE_URL="/api/webhooks";listWebhooks(){return this.http.get(this.BASE_URL)}getWebhook(t){return this.http.get(`${this.BASE_URL}/${t}`)}createWebhook(t){return this.http.post(this.BASE_URL,t)}updateWebhook(t,e){return this.http.put(`${this.BASE_URL}/${t}`,e)}deleteWebhook(t){return this.http.delete(`${this.BASE_URL}/${t}`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})};function Oj(n,t){if(n&1){let e=J();m(0,"button",12),x("click",function(){I(e);let i=w(2);return k(i.onFormCancel())}),b(1," \u2190 Back "),g()}}function Rj(n,t){if(n&1&&(m(0,"div",7),b(1),g()),n&2){let e=w(2);y(),ke(" \u2705 ",e.successMessage," ")}}function Pj(n,t){if(n&1&&(m(0,"div",8),b(1),g()),n&2){let e=w(2);y(),ke(" \u274C ",e.errorMessage," ")}}function Nj(n,t){if(n&1){let e=J();m(0,"app-webhook-list",13),x("create",function(){I(e);let i=w(2);return k(i.onCreateClick())})("edit",function(i){I(e);let o=w(2);return k(o.onEditClick(i))})("deleteWebhook",function(i){I(e);let o=w(2);return k(o.onDeleteClick(i))})("copyUrl",function(i){I(e);let o=w(2);return k(o.onCopyUrl(i))}),g()}if(n&2){let e=w(2);j("webhooks",e.webhooks)("isLoading",e.isLoading)("errorMessage",e.errorMessage)}}function Fj(n,t){if(n&1){let e=J();m(0,"app-webhook-form",14),x("save",function(i){I(e);let o=w(2);return k(o.onFormSave(i))})("cancelForm",function(){I(e);let i=w(2);return k(i.onFormCancel())}),g()}if(n&2){let e=w(2);j("webhook",e.editingWebhook)("isSaving",e.isSaving)("availableProjects",e.availableProjects)}}function Lj(n,t){if(n&1){let e=J();m(0,"div",0)(1,"button",1),x("click",function(){I(e);let i=w();return k(i.onCloseClick())}),g(),m(2,"div",2)(3,"div",3),O(4,Oj,2,0,"button",4),m(5,"h1",5),b(6),g(),m(7,"button",6),x("click",function(){I(e);let i=w();return k(i.onCloseClick())}),b(8,"\u2715"),g()(),O(9,Rj,2,1,"div",7),O(10,Pj,2,1,"div",8),m(11,"div",9),O(12,Nj,1,3,"app-webhook-list",10),O(13,Fj,1,3,"app-webhook-form",11),g()()()}if(n&2){let e=w();y(4),R(e.currentView==="form"?4:-1),y(2),ke(" ",e.currentView==="list"?"Webhook Management":e.editingWebhook?"Edit Webhook":"Create Webhook"," "),y(3),R(e.successMessage?9:-1),y(),R(e.errorMessage&&e.currentView==="list"?10:-1),y(2),R(e.currentView==="list"?12:-1),y(),R(e.currentView==="form"?13:-1)}}var kh=class n{isOpen=!1;availableProjects=[];isOpenChange=new U;closeModal=new U;webhookApi=f(Ih);webhooks=[];isLoading=!1;errorMessage="";currentView="list";editingWebhook;isSaving=!1;successMessage="";ngOnChanges(t){let e=t.isOpen;if(e){let r=e.currentValue,i=e.previousValue;r===!0&&i===!1&&(this.loadWebhooks(),this.currentView="list",this.editingWebhook=void 0),r===!1&&i===!0&&this.clearState()}}clearState(){this.webhooks=[],this.errorMessage="",this.successMessage="",this.currentView="list",this.editingWebhook=void 0,this.isLoading=!1,this.isSaving=!1}handleError(t,e){return console.error(e,t),`${e}: ${t.error?.error||t.message||"Unknown error"}`}loadWebhooks(){this.isLoading=!0,this.errorMessage="",this.webhookApi.listWebhooks().subscribe({next:t=>{this.webhooks=t,this.isLoading=!1},error:t=>{this.errorMessage=this.handleError(t,"Failed to load webhooks"),this.isLoading=!1}})}onCreateClick(){this.currentView="form",this.editingWebhook=void 0,this.errorMessage="",this.successMessage=""}onEditClick(t){this.currentView="form",this.editingWebhook=t,this.errorMessage="",this.successMessage=""}onDeleteClick(t){confirm(`Are you sure you want to delete webhook "${t.name}"?
108
+
109
+ This action cannot be undone.`)&&this.webhookApi.deleteWebhook(t.uuid).subscribe({next:()=>{this.showSuccess(`Webhook "${t.name}" deleted successfully`),this.loadWebhooks()},error:r=>{this.errorMessage=this.handleError(r,"Failed to delete webhook")}})}onCopyUrl(t){this.showSuccess("Webhook URL copied to clipboard!")}onFormSave(t){this.isSaving=!0,this.errorMessage="",this.editingWebhook?this.webhookApi.updateWebhook(this.editingWebhook.uuid,t).subscribe({next:e=>{this.isSaving=!1,this.showSuccess(`Webhook "${e.webhook.name}" updated successfully`),this.currentView="list",this.editingWebhook=void 0,this.loadWebhooks()},error:e=>{this.errorMessage=this.handleError(e,"Failed to update webhook"),this.isSaving=!1}}):this.webhookApi.createWebhook(t).subscribe({next:e=>{this.isSaving=!1,this.showSuccess(`Webhook "${e.name}" created successfully`),this.currentView="list",this.loadWebhooks()},error:e=>{this.errorMessage=this.handleError(e,"Failed to create webhook"),this.isSaving=!1}})}onFormCancel(){this.currentView="list",this.editingWebhook=void 0,this.errorMessage=""}showSuccess(t){this.successMessage=t,setTimeout(()=>this.successMessage="",3e3)}onCloseClick(){this.isOpenChange.emit(!1),this.closeModal.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-webhook-manager"]],inputs:{isOpen:"isOpen",availableProjects:"availableProjects"},outputs:{isOpenChange:"isOpenChange",closeModal:"closeModal"},features:[Qe],decls:1,vars:1,consts:[["role","dialog","aria-modal","true","aria-labelledby","modal-title",1,"modal-backdrop-wrapper"],["aria-label","Close modal","type","button",1,"modal-backdrop",3,"click"],[1,"modal-container"],[1,"modal-header"],["title","Back to list",1,"btn-back"],["id","modal-title",1,"modal-title"],["title","Close",1,"btn-close",3,"click"],[1,"success-message"],[1,"error-message"],[1,"modal-body"],[3,"webhooks","isLoading","errorMessage"],[3,"webhook","isSaving","availableProjects"],["title","Back to list",1,"btn-back",3,"click"],[3,"create","edit","deleteWebhook","copyUrl","webhooks","isLoading","errorMessage"],[3,"save","cancelForm","webhook","isSaving","availableProjects"]],template:function(e,r){e&1&&O(0,Lj,14,6,"div",0),e&2&&R(r.isOpen?0:-1)},dependencies:[Gt,Th,xh],styles:[".modal-backdrop-wrapper[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1600;padding:1rem}.modal-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:#00000080;border:none;padding:0;cursor:pointer;z-index:1}.modal-container[_ngcontent-%COMP%]{position:relative;z-index:2;background:var(--color-bg);border-radius:8px;box-shadow:0 4px 20px #0000004d;max-width:900px;width:100%;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.modal-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--color-border);background:var(--color-bg-hover)}.modal-header[_ngcontent-%COMP%] .btn-back[_ngcontent-%COMP%]{padding:.5rem 1rem;background:transparent;border:1px solid var(--color-border);border-radius:4px;color:var(--color-text);cursor:pointer;font-size:.9rem;transition:all .2s}.modal-header[_ngcontent-%COMP%] .btn-back[_ngcontent-%COMP%]:hover{background:var(--color-bg);border-color:var(--color-primary)}.modal-header[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{flex:1;margin:0;font-size:1.25rem;color:var(--color-text)}.modal-header[_ngcontent-%COMP%] .btn-close[_ngcontent-%COMP%]{padding:.5rem;background:transparent;border:none;font-size:1.5rem;color:var(--color-text-secondary);cursor:pointer;transition:color .2s}.modal-header[_ngcontent-%COMP%] .btn-close[_ngcontent-%COMP%]:hover{color:var(--color-error)}.success-message[_ngcontent-%COMP%], .error-message[_ngcontent-%COMP%]{padding:.75rem 1.5rem;font-size:.9rem}.success-message[_ngcontent-%COMP%]{background:#00c8001a;color:var(--color-success);border-bottom:1px solid rgba(0,200,0,.3)}.error-message[_ngcontent-%COMP%]{background:#ff00001a;color:var(--color-error);border-bottom:1px solid rgba(255,0,0,.3)}.modal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:0}@media (max-width: 768px){.modal-container[_ngcontent-%COMP%]{max-width:100%;max-height:100vh;border-radius:0}}"]})};var Vj=["*"],jj=(n,t)=>t.name;function Bj(n,t){n&1&&(m(0,"a",7),ie(1,"img",8),g()),n&2&&(y(),We("src","CODAY-Logo.png",Hi))}function Uj(n,t){if(n&1){let e=J();m(0,"button",6),x("click",function(){I(e);let i=w();return k(i.toggle())}),m(1,"mat-icon"),b(2,"menu"),g()(),O(3,Bj,2,1,"a",7)}if(n&2){let e=w();y(3),R(e.isOpen?-1:3)}}function Hj(n,t){if(n&1&&(m(0,"option",31),b(1),g()),n&2){let e=t.$implicit;j("value",e.name),y(),Ue(e.name)}}function $j(n,t){if(n&1){let e=J();m(0,"div",13)(1,"select",30),_e("ngModelChange",function(i){I(e);let o=w(2);return we(o.selectedProjectName,i)||(o.selectedProjectName=i),k(i)}),x("change",function(i){I(e);let o=w(2);return k(o.onProjectChange(i))}),ot(2,Hj,2,2,"option",31,jj),g(),m(4,"mat-icon",32),b(5,"expand_more"),g()()}if(n&2){let e=w(2);y(),be("ngModel",e.selectedProjectName),j("title","Select project"),y(),st(e.getProjectList())}}function zj(n,t){if(n&1&&(m(0,"h2",14),b(1),g()),n&2){let e=w(2);y(),Ue(e.getProjectDisplayName())}}function Wj(n,t){n&1&&(m(0,"mat-icon",23),b(1,"keyboard_arrow_up"),g())}function Gj(n,t){n&1&&(m(0,"mat-icon",24),b(1,"forum"),g())}function qj(n,t){n&1&&(m(0,"div",26),ie(1,"app-thread-selector",33),g())}function Yj(n,t){n&1&&(m(0,"mat-icon",23),b(1,"keyboard_arrow_up"),g())}function Zj(n,t){n&1&&(m(0,"mat-icon",24),b(1,"tune"),g())}function Kj(n,t){n&1&&(m(0,"div",27)(1,"div",34),ie(2,"app-options-panel",35),g()())}function Qj(n,t){if(n&1){let e=J();m(0,"div",21)(1,"button",22),x("click",function(i){return I(e),w(3).openProjectConfig(),k(i.stopPropagation())}),m(2,"mat-icon",24),b(3,"settings_applications"),g(),m(4,"span",25),b(5,"Project Configuration"),g()()()}}function Xj(n,t){if(n&1){let e=J();m(0,"div",21)(1,"button",36),x("click",function(i){return I(e),w(3).openProjectConfig(),k(i.stopPropagation())}),m(2,"mat-icon",24),b(3,"settings_applications"),g(),m(4,"span",25),b(5,"Project config (No project)"),g()()()}}function Jj(n,t){if(n&1){let e=J();O(0,Qj,6,0,"div",21)(1,Xj,6,0,"div",21),m(2,"div",21)(3,"button",22),x("click",function(i){return I(e),w(2).openWebhooks(),k(i.stopPropagation())}),m(4,"mat-icon",24),b(5,"webhook"),g(),m(6,"span",25),b(7,"Webhooks"),g()()()}if(n&2){let e=w(2);R(e.hasProject()?0:1)}}function e2(n,t){if(n&1){let e=J();m(0,"mat-sidenav",9),x("closed",function(){I(e);let i=w();return k(i.close())}),m(1,"div",10),ie(2,"img",11),m(3,"div",12),O(4,$j,6,2,"div",13)(5,zj,2,1,"h2",14),g(),m(6,"button",15),x("click",function(){I(e);let i=w();return k(i.close())}),m(7,"mat-icon"),b(8,"close"),g()()(),m(9,"div",16)(10,"a",17),x("click",function(){I(e);let i=w();return k(i.createNewThread())}),m(11,"mat-icon",18),b(12,"play_circle"),g(),m(13,"span",19),b(14,"Start a new thread"),g()()(),m(15,"div",20)(16,"div",21)(17,"button",22),x("click",function(){I(e);let i=w();return k(i.toggleSection("threads"))}),O(18,Wj,2,0,"mat-icon",23)(19,Gj,2,0,"mat-icon",24),m(20,"span",25),b(21,"Threads"),g()(),O(22,qj,2,0,"div",26),g(),m(23,"div",21)(24,"button",22),x("click",function(){I(e);let i=w();return k(i.toggleSection("config"))}),O(25,Yj,2,0,"mat-icon",23)(26,Zj,2,0,"mat-icon",24),m(27,"span",25),b(28,"Preferences"),g()(),O(29,Kj,3,0,"div",27),m(30,"div",21)(31,"button",22),x("click",function(i){return I(e),w().openUserConfig(),k(i.stopPropagation())}),m(32,"mat-icon",24),b(33,"settings"),g(),m(34,"span",25),b(35,"User Configuration"),g()()(),m(36,"div",21)(37,"a",28),ie(38,"img",29),m(39,"span",25),b(40,"Contribute on GitHub"),g()()(),O(41,Jj,8,1),g()()()}if(n&2){let e=w();j("opened",e.isOpen),y(2),We("src","CODAY-Logo.png",Hi),y(2),R(e.canShowProjectSelector()?4:5),y(11),le("has-footer",!0),y(2),le("active",e.expandedSections.threads),y(),R(e.expandedSections.threads?18:19),y(4),R(e.expandedSections.threads?22:-1),y(2),le("active",e.expandedSections.config),y(),R(e.expandedSections.config?25:26),y(4),R(e.expandedSections.config?29:-1),y(9),We("src","CODAY-Logo.png",Hi),y(3),R(e.isAdmin?41:-1)}}function t2(n,t){if(n&1){let e=J();m(0,"div",2)(1,"mat-icon",37),b(2,"warning"),g(),m(3,"span",38),b(4),g(),m(5,"button",39),x("click",function(){I(e);let i=w();return k(i.configErrorMessage="")}),m(6,"mat-icon"),b(7,"close"),g()()()}if(n&2){let e=w();y(4),Ue(e.configErrorMessage)}}function n2(n,t){if(n&1){let e=J();m(0,"app-json-editor",40),x("save",function(i){I(e);let o=w();return k(o.onProjectConfigSave(i))})("closeEditor",function(){I(e);let i=w();return k(i.onProjectConfigCancel())}),g()}if(n&2){let e=w();j("configType","project")("projectName",e.getCurrentProjectName())("isOpen",e.isProjectConfigOpen)("initialContent",e.projectConfigJson)("isLoading",e.isLoadingProjectConfig)("isSaving",e.isSavingProjectConfig)}}var Ah=class n{destroy$=new A;isOpen=!1;isUserConfigOpen=!1;isProjectConfigOpen=!1;isWebhooksOpen=!1;isProjectSelectorExpanded=!1;projects=null;selectedProjectName="";isAdmin=!1;userConfigJson="";projectConfigJson="";isLoadingUserConfig=!1;isLoadingProjectConfig=!1;isSavingUserConfig=!1;isSavingProjectConfig=!1;configSuccessMessage="";configErrorMessage="";expandedSections={threads:!0,config:!1};sessionState=f(bi);configApi=f(Sh);codayService=f(Qt);ngOnInit(){console.log("[SIDENAV] SessionState service injected:",!!this.sessionState),this.sessionState.getProjects$().pipe(F(this.destroy$)).subscribe(t=>{console.log("[SIDENAV] Projects updated:",t),this.projects=t,this.selectedProjectName=t?.current||""}),this.configApi.getUserConfig().pipe(F(this.destroy$)).subscribe({next:t=>{this.isAdmin=t.temp_groups?.includes("CODAY_ADMIN")??!1,console.log("[SIDENAV] User admin status:",this.isAdmin)},error:t=>{console.error("[SIDENAV] Error loading user config for roles:",t),this.isAdmin=!1}})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}toggle(){this.isOpen=!this.isOpen}close(){this.isOpen=!1}openUserConfig(){console.log("[SIDENAV] openUserConfig called"),this.isLoadingUserConfig=!0,this.configSuccessMessage="",this.configErrorMessage="",this.configApi.getUserConfig().pipe(F(this.destroy$)).subscribe({next:t=>{console.log("[SIDENAV] User config loaded, opening modal"),this.userConfigJson=JSON.stringify(t,null,2),this.isLoadingUserConfig=!1,this.isUserConfigOpen=!0,console.log("[SIDENAV] isUserConfigOpen set to:",this.isUserConfigOpen)},error:t=>{console.error("[SIDENAV] Error loading user config:",t),this.isLoadingUserConfig=!1,this.configErrorMessage=t?.error?.error||"Failed to load user configuration"}})}openProjectConfig(){let t=this.getCurrentProjectName();if(!t){console.error("[SIDENAV] No project selected"),this.configErrorMessage="No project selected. Please select a project first.";return}this.isLoadingProjectConfig=!0,this.configSuccessMessage="",this.configErrorMessage="",this.configApi.getProjectConfig(t).pipe(F(this.destroy$)).subscribe({next:e=>{this.projectConfigJson=JSON.stringify(e,null,2),this.isLoadingProjectConfig=!1,this.isProjectConfigOpen=!0,this.close()},error:e=>{console.error("[SIDENAV] Error loading project config:",e),this.isLoadingProjectConfig=!1,this.configErrorMessage=e?.error?.error||"Failed to load project configuration"}})}hasProject(){return this.sessionState.hasProjectSelected()}getCurrentProjectName(){return this.sessionState.getCurrentProject()}onUserConfigSave(t){this.isSavingUserConfig=!0,this.configErrorMessage="",this.configApi.updateUserConfig(t).pipe(F(this.destroy$)).subscribe({next:e=>{console.log("[SIDENAV] User config saved successfully"),this.isSavingUserConfig=!1,this.configSuccessMessage=e.message??"Configuration saved successfully",setTimeout(()=>{this.isUserConfigOpen=!1,this.configSuccessMessage=""},1500)},error:e=>{console.error("[SIDENAV] Error saving user config:",e),this.isSavingUserConfig=!1,this.configErrorMessage=e?.error?.error||"Failed to save user configuration"}})}onProjectConfigSave(t){let e=this.getCurrentProjectName();if(!e){console.error("[SIDENAV] No project selected"),this.configErrorMessage="No project selected. Cannot save configuration.";return}this.isSavingProjectConfig=!0,this.configErrorMessage="",this.configApi.updateProjectConfig(e,t).pipe(F(this.destroy$)).subscribe({next:r=>{console.log("[SIDENAV] Project config saved successfully"),this.isSavingProjectConfig=!1,this.configSuccessMessage=r.message??"Configuration saved successfully",setTimeout(()=>{this.isProjectConfigOpen=!1,this.configSuccessMessage=""},1500)},error:r=>{console.error("[SIDENAV] Error saving project config:",r),this.isSavingProjectConfig=!1,this.configErrorMessage=r?.error?.error||"Failed to save project configuration"}})}onUserConfigCancel(){this.isUserConfigOpen=!1,this.configSuccessMessage="",this.configErrorMessage=""}onProjectConfigCancel(){this.isProjectConfigOpen=!1,this.configSuccessMessage="",this.configErrorMessage=""}openWebhooks(){this.isWebhooksOpen=!0,this.close()}getAvailableProjects(){return[]}toggleProjectSelector(){this.canShowProjectSelector()&&(this.isProjectSelectorExpanded=!this.isProjectSelectorExpanded)}canShowProjectSelector(){return!!(this.projects?.canCreate&&this.projects?.list&&this.projects.list.length>0)}onProjectChange(t){let r=t.target.value;r&&r!==this.projects?.current&&(console.log("[SIDENAV] Selecting project:",r),this.codayService.sendMessage(`config select-project ${r}`))}getProjectDisplayName(){return this.sessionState.getCurrentProject()||"Coday"}getProjectList(){return this.projects?.list||[]}toggleSection(t){let e=this.expandedSections[t];Object.keys(this.expandedSections).forEach(r=>{this.expandedSections[r]=!1}),this.expandedSections[t]=!e}createNewThread(){console.log("[SIDENAV] Creating new thread"),this.codayService.sendMessage("thread new")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-sidenav"]],ngContentSelectors:Vj,decls:9,vars:12,consts:[[1,"sidenav-container",3,"hasBackdrop"],["mode","push","position","start",1,"app-sidenav",3,"opened"],["role","alert",1,"error-notification"],[3,"save","closeEditor","configType","isOpen","initialContent","isLoading","isSaving"],[3,"configType","projectName","isOpen","initialContent","isLoading","isSaving"],[3,"isOpenChange","closeModal","isOpen","availableProjects"],["mat-icon-button","","title","Menu","type","button",1,"sidenav-toggle-btn",3,"click"],["href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer","title","Contribute on GitHub",1,"sidenav-logo-btn"],["alt","Coday",1,"logo"],["mode","push","position","start",1,"app-sidenav",3,"closed","opened"],[1,"sidenav-header"],["alt","Coday",1,"sidenav-logo"],[1,"header-title-section"],[1,"select-wrapper"],[1,"sidenav-title"],["mat-icon-button","",1,"close-btn",3,"click"],[1,"new-thread-section"],["role","button","tabindex","0",1,"new-thread-link",3,"click"],["fontSet","material-icons-outlined"],[1,"new-thread-text"],[1,"sidenav-sections"],[1,"section-container"],["type","button",1,"section-toggle",3,"click"],[1,"arrow-icon","expanded"],[1,"section-icon"],[1,"section-label"],[1,"section-content","threads"],[1,"section-content"],["href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer","title","Contribute on GitHub",1,"section-toggle","contribute-btn"],["alt","Coday",1,"contribute-logo"],[1,"project-select",3,"ngModelChange","change","ngModel","title"],[3,"value"],[1,"select-arrow"],[1,"sidenav-thread-selector"],[1,"preference-item"],[1,"inline-panel"],["type","button","disabled","",1,"section-toggle",3,"click"],[1,"error-icon"],[1,"error-text"],["aria-label","Close error message","mat-icon-button","",1,"error-close",3,"click"],[3,"save","closeEditor","configType","projectName","isOpen","initialContent","isLoading","isSaving"]],template:function(e,r){e&1&&(yt(),O(0,Uj,4,1),m(1,"mat-sidenav-container",0),O(2,e2,42,15,"mat-sidenav",1),m(3,"mat-sidenav-content"),Ge(4),g()(),O(5,t2,8,1,"div",2),m(6,"app-json-editor",3),x("save",function(o){return r.onUserConfigSave(o)})("closeEditor",function(){return r.onUserConfigCancel()}),g(),O(7,n2,1,6,"app-json-editor",4),m(8,"app-webhook-manager",5),x("isOpenChange",function(o){return r.isWebhooksOpen=o})("closeModal",function(){return r.isWebhooksOpen=!1}),g()),e&2&&(R(r.hasProject()&&!r.isOpen?0:-1),y(),j("hasBackdrop",!1),y(),R(r.hasProject()?2:-1),y(3),R(r.configErrorMessage?5:-1),y(),j("configType","user")("isOpen",r.isUserConfigOpen)("initialContent",r.userConfigJson)("isLoading",r.isLoadingUserConfig)("isSaving",r.isSavingUserConfig),y(),R(r.hasProject()?7:-1),y(),j("isOpen",r.isWebhooksOpen)("availableProjects",r.getAvailableProjects()))},dependencies:[bn,vi,yi,hr,yn,rn,uT,mb,dT,wh,Kf,vn,Os,Nr,fT,sl,Dh,Mh,kh],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.sidenav-container[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1400;transition:width;display:flex}.sidenav-container[_ngcontent-%COMP%] mat-sidenav[_ngcontent-%COMP%]{position:relative!important;transition:width;width:310px;flex-shrink:0}.sidenav-container[_ngcontent-%COMP%] mat-sidenav[_ngcontent-%COMP%]:not(.mat-drawer-opened){width:0!important}.sidenav-container[_ngcontent-%COMP%] mat-sidenav-content[_ngcontent-%COMP%]{width:100%;margin:0!important}[_nghost-%COMP%] .mat-drawer-backdrop{pointer-events:auto}[_nghost-%COMP%] .mat-drawer-content{pointer-events:auto!important;background:transparent!important;overflow:visible!important}.sidenav-toggle-btn[_ngcontent-%COMP%]{position:fixed!important;top:1.5rem!important;left:1rem!important;z-index:1500!important;color:var(--color-text-secondary)}.sidenav-logo-btn[_ngcontent-%COMP%]{position:fixed!important;bottom:1rem!important;left:1rem!important;z-index:1500!important;width:56px!important;height:56px!important;border-radius:50%!important;border:1px solid var(--glass-border)!important;padding:4px!important;background:var(--glass-bg)!important;backdrop-filter:var(--glass-backdrop-blur)!important;-webkit-backdrop-filter:var(--glass-backdrop-blur)!important;box-shadow:var(--glass-shadow)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;cursor:pointer!important;pointer-events:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;text-decoration:none!important}.sidenav-logo-btn[_ngcontent-%COMP%]:hover{transform:scale(1.08) translateY(-2px)!important;box-shadow:0 16px 48px #0003!important;border-color:var(--color-primary)!important}.sidenav-logo-btn[_ngcontent-%COMP%]:active{transform:scale(.96)!important}.sidenav-logo-btn[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:2px}.app-sidenav[_ngcontent-%COMP%]{width:310px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border-radius:0;overflow-y:auto!important;overflow-x:hidden;display:flex;flex-direction:column}.app-sidenav[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.app-sidenav[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.app-sidenav[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-text-secondary);border-radius:4px}.app-sidenav[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text)}.sidenav-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:1.5rem 1rem .5rem;position:relative}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:4px;flex-shrink:0}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;min-width:0}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .sidenav-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%]{flex:1;position:relative;display:flex;align-items:center;min-width:0}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%] .project-select[_ngcontent-%COMP%]{flex:1;min-width:0;padding:.5rem 2.5rem .5rem .75rem;font-size:1.25rem;font-weight:600;color:var(--color-text);background:transparent;border:1px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s;outline:none;font-family:inherit;appearance:none;-webkit-appearance:none;-moz-appearance:none}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%] .project-select[_ngcontent-%COMP%]:hover{background-color:var(--color-bg-hover);border-color:var(--glass-border)}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%] .project-select[_ngcontent-%COMP%]:focus{background-color:var(--color-bg-hover);border-color:var(--color-primary)}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%] .project-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text);padding:.5rem}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .select-wrapper[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--color-text-secondary);font-size:20px;width:20px;height:20px}.sidenav-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{color:var(--color-text-secondary);flex-shrink:0}.new-thread-section[_ngcontent-%COMP%]{padding:1rem 1rem .5rem}.new-thread-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:transparent;border:none;text-decoration:none;cursor:pointer;transition:all .2s ease;gap:.5rem;font-size:.95rem;font-weight:600;padding:0}.new-thread-link[_ngcontent-%COMP%] .new-thread-text[_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-primary);animation:_ngcontent-%COMP%_iconPulse 3s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%]:hover{transform:translate(4px)}.new-thread-link[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_iconPulse 1.5s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}@keyframes _ngcontent-%COMP%_iconPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.05)}}.sidenav-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:0}.sidenav-sections[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.sidenav-sections[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.sidenav-sections[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-text-secondary);border-radius:4px}.sidenav-sections[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text)}.contribute-btn[_ngcontent-%COMP%]{text-decoration:none}.contribute-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.contribute-btn[_ngcontent-%COMP%] .contribute-logo[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:2px;flex-shrink:0}.section-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-shrink:0}.section-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;background:transparent;border:none;cursor:pointer;transition:background-color .2s;text-align:left;width:100%}.section-toggle.active[_ngcontent-%COMP%], .section-toggle[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.section-toggle.active[_ngcontent-%COMP%]{border-top:1px solid var(--color-border)}.section-toggle[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);transition:transform .2s ease;transform:rotate(0)}.section-toggle[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary)}.section-toggle[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;color:var(--color-text)}.section-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:.5rem 0;animation:_ngcontent-%COMP%_slideDown .2s ease;max-height:calc(100vh - 300px);overflow-y:auto;overflow-x:hidden;border-bottom:1px solid var(--color-border)}.section-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.section-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.section-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-text-secondary);border-radius:3px}.section-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text)}.section-content.threads[_ngcontent-%COMP%]{padding-top:0}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.config-links[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:.5rem 1rem;margin-bottom:1rem}.sidenav-item[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.sidenav-item[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)!important}.sidenav-item[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.sidenav-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary)}.sidenav-item[_ngcontent-%COMP%] .item-text[_ngcontent-%COMP%]{flex:1;font-size:.9rem}.sidenav-item[_ngcontent-%COMP%] .disabled-hint[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-secondary);font-style:italic}.sidenav-link[_ngcontent-%COMP%]{color:var(--color-primary);text-decoration:none;border:none;background:transparent;padding:0;font-size:.875rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;gap:.5rem}.sidenav-link[_ngcontent-%COMP%]:hover:not(.disabled){color:var(--color-primary-hover, var(--color-primary));text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}.sidenav-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.sidenav-link.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed;color:var(--color-text-secondary)}.sidenav-link.disabled[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.sidenav-link[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%], .sidenav-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:var(--color-primary)}.sidenav-link[_ngcontent-%COMP%] .item-text[_ngcontent-%COMP%]{font-size:.875rem}.sidenav-item-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-radius:8px}.sidenav-item-wrapper[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary)}.sidenav-item-wrapper[_ngcontent-%COMP%] .item-text[_ngcontent-%COMP%]{flex:1;font-size:.9rem;color:var(--color-text)}.sidenav-item-wrapper[_ngcontent-%COMP%] .inline-selector[_ngcontent-%COMP%], .sidenav-item-wrapper[_ngcontent-%COMP%] .inline-panel[_ngcontent-%COMP%]{flex-shrink:0}.preference-item[_ngcontent-%COMP%]{padding-bottom:1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border)}.preference-item[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem;padding:0 1rem}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%] .item-text[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.preference-item[_ngcontent-%COMP%] .preference-content[_ngcontent-%COMP%]{padding:0 1rem}.sidenav-project-selector[_ngcontent-%COMP%], .sidenav-thread-selector[_ngcontent-%COMP%]{width:100%}.error-notification[_ngcontent-%COMP%]{position:fixed;top:5rem;left:50%;transform:translate(-50%);z-index:2000;display:flex;align-items:center;gap:.75rem;background:#ff3b3026;backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid rgba(255,59,48,.3);border-radius:16px;padding:1rem 1.5rem;box-shadow:var(--glass-shadow);animation:_ngcontent-%COMP%_errorSlideDown .3s cubic-bezier(.4,0,.2,1)}.error-notification[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{font-size:1.2rem;flex-shrink:0;color:#c00}.error-notification[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%]{flex:1;color:#c00;font-size:.9rem;font-weight:500}.error-notification[_ngcontent-%COMP%] .error-close[_ngcontent-%COMP%]{color:#c00}@keyframes _ngcontent-%COMP%_errorSlideDown{0%{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%)}}@media (max-width: 480px){.app-sidenav[_ngcontent-%COMP%]{width:280px}.sidenav-toggle-btn[_ngcontent-%COMP%]{left:.5rem!important;top:.5rem!important}.error-notification[_ngcontent-%COMP%]{left:1rem;right:1rem;transform:none;max-width:calc(100vw - 2rem)}}body.dark[_nghost-%COMP%] .app-sidenav[_ngcontent-%COMP%], body.dark [_nghost-%COMP%] .app-sidenav[_ngcontent-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .app-sidenav[_ngcontent-%COMP%]{background:#242830f2;border-right-color:#b4c8ff17}body.dark[_nghost-%COMP%] .sidenav-header[_ngcontent-%COMP%], body.dark [_nghost-%COMP%] .sidenav-header[_ngcontent-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .sidenav-header[_ngcontent-%COMP%]{background:#242830b3}"]})};var Oh=class n{title="client";themeService=f(na);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-root"]],decls:2,vars:0,template:function(e,r){e&1&&(m(0,"app-sidenav"),ie(1,"router-outlet"),g())},dependencies:[Gv,_c,Ah],encapsulation:2})};hv(Oh,lT).catch(n=>console.error(n));