@whoz-oss/coday-client 0.76.0 → 0.78.0
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.
- package/browser/index.html +1 -1
- package/browser/main-NLBPFXOU.js +387 -0
- package/package.json +1 -1
- package/browser/main-7LAOMSA6.js +0 -387
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
var QR=Object.defineProperty,KR=Object.defineProperties;var ZR=Object.getOwnPropertyDescriptors;var np=Object.getOwnPropertySymbols;var ME=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable;var SE=(n,t,e)=>t in n?QR(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,M=(n,t)=>{for(var e in t||={})ME.call(t,e)&&SE(n,e,t[e]);if(np)for(var e of np(t))TE.call(t,e)&&SE(n,e,t[e]);return n},de=(n,t)=>KR(n,ZR(t));var M_=(n,t)=>{var e={};for(var i in n)ME.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&np)for(var i of np(n))t.indexOf(i)<0&&TE.call(n,i)&&(e[i]=n[i]);return e};var pe=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{a(e.next(l))}catch(c){r(c)}},s=l=>{try{a(e.throw(l))}catch(c){r(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(n,t)).next())});var T_;function ip(){return T_}function Er(n){let t=T_;return T_=n,t}var DE=Symbol("NotFound");function cl(n){return n===DE||n?.name==="\u0275NotFound"}var Dn=null,rp=!1,D_=1,XR=null,tn=Symbol("SIGNAL");function Ie(n){let t=Dn;return Dn=n,t}function lp(){return Dn}var Us={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 $s(n){if(rp)throw new Error("");if(Dn===null)return;Dn.consumerOnSignalRead(n);let t=Dn.producersTail;if(t!==void 0&&t.producer===n)return;let e,i=Dn.recomputing;if(i&&(e=t!==void 0?t.nextProducer:Dn.producers,e!==void 0&&e.producer===n)){Dn.producersTail=e,e.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===Dn&&(!i||eN(r,Dn)))return;let o=dl(Dn),s={producer:n,consumer:Dn,nextProducer:e,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};Dn.producersTail=s,t!==void 0?t.nextProducer=s:Dn.producers=s,o&&OE(n,s)}function IE(){D_++}function cp(n){if(!(dl(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===D_)){if(!n.producerMustRecompute(n)&&!Gs(n)){ap(n);return}n.producerRecomputeValue(n),ap(n)}}function I_(n){if(n.consumers===void 0)return;let t=rp;rp=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||JR(i)}}finally{rp=t}}function k_(){return Dn?.consumerAllowSignalWrites!==!1}function JR(n){n.dirty=!0,I_(n),n.consumerMarkedDirty?.(n)}function ap(n){n.dirty=!1,n.lastCleanEpoch=D_}function qo(n){return n&&kE(n),Ie(n)}function kE(n){n.producersTail=void 0,n.recomputing=!0}function Ws(n,t){Ie(t),n&&AE(n)}function AE(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(dl(n))do e=A_(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function Gs(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,i=t.lastReadVersion;if(i!==e.version||(cp(e),i!==e.version))return!0}return!1}function Yo(n){if(dl(n)){let t=n.producers;for(;t!==void 0;)t=A_(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function OE(n,t){let e=n.consumersTail,i=dl(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,!i)for(let r=n.producers;r!==void 0;r=r.nextProducer)OE(r.producer,r)}function A_(n){let t=n.producer,e=n.nextProducer,i=n.nextConsumer,r=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,i!==void 0?i.prevConsumer=r:t.consumersTail=r,r!==void 0)r.nextConsumer=i;else if(t.consumers=i,!dl(t)){let o=t.producers;for(;o!==void 0;)o=A_(o)}return e}function dl(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function dp(n){XR?.(n)}function eN(n,t){let e=t.producersTail;if(e!==void 0){let i=t.producers;do{if(i===n)return!0;if(i===e)break;i=i.nextProducer}while(i!==void 0)}return!1}function up(n,t){return Object.is(n,t)}function md(n,t){let e=Object.create(tN);e.computation=n,t!==void 0&&(e.equal=t);let i=()=>{if(cp(e),$s(e),e.value===ud)throw e.error;return e.value};return i[tn]=e,dp(e),i}var op=Symbol("UNSET"),sp=Symbol("COMPUTING"),ud=Symbol("ERRORED"),tN=de(M({},Us),{value:op,dirty:!0,error:null,equal:up,kind:"computed",producerMustRecompute(n){return n.value===op||n.value===sp},producerRecomputeValue(n){if(n.value===sp)throw new Error("");let t=n.value;n.value=sp;let e=qo(n),i,r=!1;try{i=n.computation(),Ie(null),r=t!==op&&t!==ud&&i!==ud&&n.equal(t,i)}catch(o){i=ud,n.error=o}finally{Ws(n,e)}if(r){n.value=t;return}n.value=i,n.version++}});function nN(){throw new Error}var PE=nN;function RE(n){PE(n)}function O_(n){PE=n}var iN=null;function P_(n,t){let e=Object.create(pd);e.value=n,t!==void 0&&(e.equal=t);let i=()=>NE(e);return i[tn]=e,dp(e),[i,s=>ul(e,s),s=>R_(e,s)]}function NE(n){return $s(n),n.value}function ul(n,t){k_()||RE(n),n.equal(n.value,t)||(n.value=t,rN(n))}function R_(n,t){k_()||RE(n),ul(n,t(n.value))}var pd=de(M({},Us),{equal:up,value:void 0,kind:"signal"});function rN(n){n.version++,IE(),I_(n),iN?.(n)}function Ce(n){return typeof n=="function"}function ml(n){let e=n(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var mp=ml(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:
|
|
2
|
+
${e.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=e});function qs(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var ze=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:i}=this;if(Ce(i))try{i()}catch(o){t=o instanceof mp?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{FE(o)}catch(s){t=t??[],s instanceof mp?t=[...t,...s.errors]:t.push(s)}}if(t)throw new mp(t)}}add(t){var e;if(t&&t!==this)if(this.closed)FE(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)&&qs(e,t)}remove(t){let{_finalizers:e}=this;e&&qs(e,t),t instanceof n&&t._removeParent(this)}};ze.EMPTY=(()=>{let n=new ze;return n.closed=!0,n})();var N_=ze.EMPTY;function pp(n){return n instanceof ze||n&&"closed"in n&&Ce(n.remove)&&Ce(n.add)&&Ce(n.unsubscribe)}function FE(n){Ce(n)?n():n.unsubscribe()}var Qi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var pl={setTimeout(n,t,...e){let{delegate:i}=pl;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=pl;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function fp(n){pl.setTimeout(()=>{let{onUnhandledError:t}=Qi;if(t)t(n);else throw n})}function fd(){}var LE=F_("C",void 0,void 0);function jE(n){return F_("E",void 0,n)}function VE(n){return F_("N",n,void 0)}function F_(n,t,e){return{kind:n,value:t,error:e}}var Ys=null;function fl(n){if(Qi.useDeprecatedSynchronousErrorHandling){let t=!Ys;if(t&&(Ys={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Ys;if(Ys=null,e)throw i}}else n()}function BE(n){Qi.useDeprecatedSynchronousErrorHandling&&Ys&&(Ys.errorThrown=!0,Ys.error=n)}var Qs=class extends ze{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,pp(t)&&t.add(this)):this.destination=aN}static create(t,e,i){return new Ki(t,e,i)}next(t){this.isStopped?j_(VE(t),this):this._next(t)}error(t){this.isStopped?j_(jE(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?j_(LE,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()}}},oN=Function.prototype.bind;function L_(n,t){return oN.call(n,t)}var V_=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){hp(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){hp(i)}else hp(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){hp(e)}}},Ki=class extends Qs{constructor(t,e,i){super();let r;if(Ce(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&Qi.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&L_(t.next,o),error:t.error&&L_(t.error,o),complete:t.complete&&L_(t.complete,o)}):r=t}this.destination=new V_(r)}};function hp(n){Qi.useDeprecatedSynchronousErrorHandling?BE(n):fp(n)}function sN(n){throw n}function j_(n,t){let{onStoppedNotification:e}=Qi;e&&pl.setTimeout(()=>e(n,t))}var aN={closed:!0,next:fd,error:sN,complete:fd};var hl=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ln(n){return n}function B_(...n){return z_(n)}function z_(n){return n.length===0?Ln:n.length===1?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var ge=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=cN(e)?e:new Ki(e,i,r);return fl(()=>{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(i){e.error(i)}}forEach(e,i){return i=zE(i),new i((r,o)=>{let s=new Ki({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[hl](){return this}pipe(...e){return z_(e)(this)}toPromise(e){return e=zE(e),new e((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function zE(n){var t;return(t=n??Qi.Promise)!==null&&t!==void 0?t:Promise}function lN(n){return n&&Ce(n.next)&&Ce(n.error)&&Ce(n.complete)}function cN(n){return n&&n instanceof Qs||lN(n)&&pp(n)}function H_(n){return Ce(n?.lift)}function Ae(n){return t=>{if(H_(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ke(n,t,e,i,r){return new U_(n,t,e,i,r)}var U_=class extends Qs{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function gl(){return Ae((n,t)=>{let e=null;n._refCount++;let i=ke(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){e=null;return}let r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}var vl=class extends ge{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,H_(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 ze;let e=this.getSubject();t.add(this.source.subscribe(ke(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=ze.EMPTY)}return t}refCount(){return gl()(this)}};var HE=ml(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var P=(()=>{class n extends ge{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new gp(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new HE}next(e){fl(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){fl(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){fl(()=>{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:i,isStopped:r,observers:o}=this;return i||r?N_:(this.currentObservers=null,o.push(e),new ze(()=>{this.currentObservers=null,qs(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new ge;return e.source=this,e}}return n.create=(t,e)=>new gp(t,e),n})(),gp=class extends P{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.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,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:N_}};var ae=class extends P{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:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}};var hd={now(){return(hd.delegate||Date).now()},delegate:void 0};var gd=class extends P{constructor(t=1/0,e=1/0,i=hd){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(t),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!t.closed;s+=i?1:2)t.next(o[s]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*t;if(t<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=e.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}};var vp=class extends ze{constructor(t,e){super()}schedule(t,e=0){return this}};var vd={setInterval(n,t,...e){let{delegate:i}=vd;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=vd;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var _p=class extends vp{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var i;if(this.closed)return this;this.state=t;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return vd.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return e;e!=null&&vd.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(t,e);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i=!1,r;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,qs(i,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var _l=class n{constructor(t,e=n.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};_l.now=hd.now;var bp=class extends _l{constructor(t,e=_l.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}};var _d=new bp(_p),UE=_d;var mn=new ge(n=>n.complete());function yp(n){return n&&Ce(n.schedule)}function $_(n){return n[n.length-1]}function Cp(n){return Ce($_(n))?n.pop():void 0}function Sr(n){return yp($_(n))?n.pop():void 0}function $E(n,t){return typeof $_(n)=="number"?n.pop():t}function GE(n,t,e,i){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(p){try{c(i.next(p))}catch(h){s(h)}}function l(p){try{c(i.throw(p))}catch(h){s(h)}}function c(p){p.done?o(p.value):r(p.value).then(a,l)}c((i=i.apply(n,t||[])).next())})}function WE(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ks(n){return this instanceof Ks?(this.v=n,this):new Ks(n)}function qE(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(v){return function(y){return Promise.resolve(y).then(v,h)}}function a(v,y){i[v]&&(r[v]=function(T){return new Promise(function(F,L){o.push([v,T,F,L])>1||l(v,T)})},y&&(r[v]=y(r[v])))}function l(v,y){try{c(i[v](y))}catch(T){_(o[0][3],T)}}function c(v){v.value instanceof Ks?Promise.resolve(v.value.v).then(p,h):_(o[0][2],v)}function p(v){l("next",v)}function h(v){l("throw",v)}function _(v,y){v(y),o.shift(),o.length&&l(o[0][0],o[0][1])}}function YE(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 WE=="function"?WE(n):n[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var bl=n=>n&&typeof n.length=="number"&&typeof n!="function";function wp(n){return Ce(n?.then)}function xp(n){return Ce(n[hl])}function Ep(n){return Symbol.asyncIterator&&Ce(n?.[Symbol.asyncIterator])}function Sp(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 dN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Mp=dN();function Tp(n){return Ce(n?.[Mp])}function Dp(n){return qE(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield Ks(e.read());if(r)return yield Ks(void 0);yield yield Ks(i)}}finally{e.releaseLock()}})}function Ip(n){return Ce(n?.getReader)}function rt(n){if(n instanceof ge)return n;if(n!=null){if(xp(n))return uN(n);if(bl(n))return mN(n);if(wp(n))return pN(n);if(Ep(n))return QE(n);if(Tp(n))return fN(n);if(Ip(n))return hN(n)}throw Sp(n)}function uN(n){return new ge(t=>{let e=n[hl]();if(Ce(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function mN(n){return new ge(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function pN(n){return new ge(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,fp)})}function fN(n){return new ge(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function QE(n){return new ge(t=>{gN(n,t).catch(e=>t.error(e))})}function hN(n){return QE(Dp(n))}function gN(n,t){var e,i,r,o;return GE(this,void 0,void 0,function*(){try{for(e=YE(n);i=yield e.next(),!i.done;){let s=i.value;if(t.next(s),t.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})}function ni(n,t,e,i=0,r=!1){let o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function kp(n,t=0){return Ae((e,i)=>{e.subscribe(ke(i,r=>ni(i,n,()=>i.next(r),t),()=>ni(i,n,()=>i.complete(),t),r=>ni(i,n,()=>i.error(r),t)))})}function Ap(n,t=0){return Ae((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function KE(n,t){return rt(n).pipe(Ap(t),kp(t))}function ZE(n,t){return rt(n).pipe(Ap(t),kp(t))}function XE(n,t){return new ge(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function JE(n,t){return new ge(e=>{let i;return ni(e,t,()=>{i=n[Mp](),ni(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){e.error(s);return}o?e.complete():e.next(r)},0,!0)}),()=>Ce(i?.return)&&i.return()})}function Op(n,t){if(!n)throw new Error("Iterable cannot be null");return new ge(e=>{ni(e,t,()=>{let i=n[Symbol.asyncIterator]();ni(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function eS(n,t){return Op(Dp(n),t)}function tS(n,t){if(n!=null){if(xp(n))return KE(n,t);if(bl(n))return XE(n,t);if(wp(n))return ZE(n,t);if(Ep(n))return Op(n,t);if(Tp(n))return JE(n,t);if(Ip(n))return eS(n,t)}throw Sp(n)}function yt(n,t){return t?tS(n,t):rt(n)}function W(...n){let t=Sr(n);return yt(n,t)}function pi(n,t){let e=Ce(n)?n:()=>n,i=r=>r.error(e());return new ge(t?r=>t.schedule(i,0,r):i)}function Pp(n){return!!n&&(n instanceof ge||Ce(n.lift)&&Ce(n.subscribe))}var fi=ml(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function W_(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=!1,s;n.subscribe({next:a=>{s=a,o=!0},error:r,complete:()=>{o?i(s):e?i(t.defaultValue):r(new fi)}})})}function G_(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=new Ki({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new fi)}});n.subscribe(o)})}function nS(n){return n instanceof Date&&!isNaN(n)}function z(n,t){return Ae((e,i)=>{let r=0;e.subscribe(ke(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:vN}=Array;function _N(n,t){return vN(t)?n(...t):n(t)}function yl(n){return z(t=>_N(n,t))}var{isArray:bN}=Array,{getPrototypeOf:yN,prototype:CN,keys:wN}=Object;function Rp(n){if(n.length===1){let t=n[0];if(bN(t))return{args:t,keys:null};if(xN(t)){let e=wN(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function xN(n){return n&&typeof n=="object"&&yN(n)===CN}function Np(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function In(...n){let t=Sr(n),e=Cp(n),{args:i,keys:r}=Rp(n);if(i.length===0)return yt([],t);let o=new ge(EN(i,t,r?s=>Np(r,s):Ln));return e?o.pipe(yl(e)):o}function EN(n,t,e=Ln){return i=>{iS(t,()=>{let{length:r}=n,o=new Array(r),s=r,a=r;for(let l=0;l<r;l++)iS(t,()=>{let c=yt(n[l],t),p=!1;c.subscribe(ke(i,h=>{o[l]=h,p||(p=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}function iS(n,t,e){n?ni(e,n,t):t()}function rS(n,t,e,i,r,o,s,a){let l=[],c=0,p=0,h=!1,_=()=>{h&&!l.length&&!c&&t.complete()},v=T=>c<i?y(T):l.push(T),y=T=>{o&&t.next(T),c++;let F=!1;rt(e(T,p++)).subscribe(ke(t,L=>{r?.(L),o?v(L):t.next(L)},()=>{F=!0},void 0,()=>{if(F)try{for(c--;l.length&&c<i;){let L=l.shift();s?ni(t,s,()=>y(L)):y(L)}_()}catch(L){t.error(L)}}))};return n.subscribe(ke(t,v,()=>{h=!0,_()})),()=>{a?.()}}function Ft(n,t,e=1/0){return Ce(t)?Ft((i,r)=>z((o,s)=>t(i,o,r,s))(rt(n(i,r))),e):(typeof t=="number"&&(e=t),Ae((i,r)=>rS(i,r,n,e)))}function Qo(n=1/0){return Ft(Ln,n)}function oS(){return Qo(1)}function Ko(...n){return oS()(yt(n,Sr(n)))}function Zi(n){return new ge(t=>{rt(n()).subscribe(t)})}function bd(...n){let t=Cp(n),{args:e,keys:i}=Rp(n),r=new ge(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let p=0;p<s;p++){let h=!1;rt(e[p]).subscribe(ke(o,_=>{h||(h=!0,c--),a[p]=_},()=>l--,void 0,()=>{(!l||!h)&&(c||o.next(i?Np(i,a):a),o.complete())}))}});return t?r.pipe(yl(t)):r}var SN=["addListener","removeListener"],MN=["addEventListener","removeEventListener"],TN=["on","off"];function yd(n,t,e,i){if(Ce(e)&&(i=e,e=void 0),i)return yd(n,t,e).pipe(yl(i));let[r,o]=kN(n)?MN.map(s=>a=>n[s](t,a,e)):DN(n)?SN.map(sS(n,t)):IN(n)?TN.map(sS(n,t)):[];if(!r&&bl(n))return Ft(s=>yd(s,t,e))(rt(n));if(!r)throw new TypeError("Invalid event target");return new ge(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return r(a),()=>o(a)})}function sS(n,t){return e=>i=>n[e](t,i)}function DN(n){return Ce(n.addListener)&&Ce(n.removeListener)}function IN(n){return Ce(n.on)&&Ce(n.off)}function kN(n){return Ce(n.addEventListener)&&Ce(n.removeEventListener)}function aS(n=0,t,e=UE){let i=-1;return t!=null&&(yp(t)?e=t:i=t),new ge(r=>{let o=nS(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function Xi(...n){let t=Sr(n),e=$E(n,1/0),i=n;return i.length?i.length===1?rt(i[0]):Qo(e)(yt(i,t)):mn}function ue(n,t){return Ae((e,i)=>{let r=0;e.subscribe(ke(i,o=>n.call(t,o,r++)&&i.next(o)))})}function lS(n){return Ae((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(ke(e,c=>{i=!0,r=c,o||rt(n(c)).subscribe(o=ke(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}function Fp(n,t=_d){return lS(()=>aS(n,t))}function nn(n){return Ae((t,e)=>{let i=null,r=!1,o;i=t.subscribe(ke(e,void 0,void 0,s=>{o=rt(n(s,nn(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function cS(n,t,e,i,r){return(o,s)=>{let a=e,l=t,c=0;o.subscribe(ke(s,p=>{let h=c++;l=a?n(l,p,h):(a=!0,p),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function Mr(n,t){return Ce(t)?Ft(n,t,1):Ft(n,1)}function Zs(n,t=_d){return Ae((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=s+n,p=t.now();if(p<c){r=this.schedule(void 0,c-p),i.add(r);return}a()}e.subscribe(ke(i,c=>{o=c,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function Zo(n){return Ae((t,e)=>{let i=!1;t.subscribe(ke(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function Ye(n){return n<=0?()=>mn:Ae((t,e)=>{let i=0;t.subscribe(ke(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function Lp(n){return z(()=>n)}function Xo(n,t=Ln){return n=n??AN,Ae((e,i)=>{let r,o=!0;e.subscribe(ke(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function AN(n,t){return n===t}function jp(n=ON){return Ae((t,e)=>{let i=!1;t.subscribe(ke(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function ON(){return new fi}function ao(n){return Ae((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function Ti(n,t){let e=arguments.length>=2;return i=>i.pipe(n?ue((r,o)=>n(r,o,i)):Ln,Ye(1),e?Zo(t):jp(()=>new fi))}function Cl(n){return n<=0?()=>mn:Ae((t,e)=>{let i=[];t.subscribe(ke(e,r=>{i.push(r),n<i.length&&i.shift()},()=>{for(let r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function q_(n,t){let e=arguments.length>=2;return i=>i.pipe(n?ue((r,o)=>n(r,o,i)):Ln,Cl(1),e?Zo(t):jp(()=>new fi))}function Xs(){return Ae((n,t)=>{let e,i=!1;n.subscribe(ke(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Y_(n,t){return Ae(cS(n,t,arguments.length>=2,!0))}function Cd(n={}){let{connector:t=()=>new P,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,c=0,p=!1,h=!1,_=()=>{a?.unsubscribe(),a=void 0},v=()=>{_(),s=l=void 0,p=h=!1},y=()=>{let T=s;v(),T?.unsubscribe()};return Ae((T,F)=>{c++,!h&&!p&&_();let L=l=l??t();F.add(()=>{c--,c===0&&!h&&!p&&(a=Q_(y,r))}),L.subscribe(F),!s&&c>0&&(s=new Ki({next:ve=>L.next(ve),error:ve=>{h=!0,_(),a=Q_(v,e,ve),L.error(ve)},complete:()=>{p=!0,_(),a=Q_(v,i),L.complete()}}),rt(T).subscribe(s))})(o)}}function Q_(n,t,...e){if(t===!0){n();return}if(t===!1)return;let i=new Ki({next:()=>{i.unsubscribe(),n()}});return rt(t(...e)).subscribe(i)}function Tr(n,t,e){let i,r=!1;return n&&typeof n=="object"?{bufferSize:i=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=n:i=n??1/0,Cd({connector:()=>new gd(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function wd(n){return ue((t,e)=>n<=e)}function Ht(...n){let t=Sr(n);return Ae((e,i)=>{(t?Ko(n,e,t):Ko(n,e)).subscribe(i)})}function lt(n,t){return Ae((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(ke(i,l=>{r?.unsubscribe();let c=0,p=o++;rt(n(l,p)).subscribe(r=ke(i,h=>i.next(t?t(l,h,p,c++):h),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function $(n){return Ae((t,e)=>{rt(n).subscribe(ke(e,()=>e.complete(),fd)),!e.closed&&t.subscribe(e)})}function K_(n,t=!1){return Ae((e,i)=>{let r=0;e.subscribe(ke(i,o=>{let s=n(o,r++);(s||t)&&i.next(o),!s&&i.complete()}))})}function Oe(n,t,e){let i=Ce(n)||t||e?{next:n,error:t,complete:e}:n;return i?Ae((r,o)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let a=!0;r.subscribe(ke(o,l=>{var c;(c=i.next)===null||c===void 0||c.call(i,l),o.next(l)},()=>{var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),o.complete()},l=>{var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),o.error(l)},()=>{var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Ln}function dS(n){let t=Ie(null);try{return n()}finally{Ie(t)}}var uS=de(M({},Us),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function mS(n){if(n.dirty=!1,n.version>0&&!Gs(n))return;n.version++;let t=qo(n);try{n.cleanup(),n.fn()}finally{Ws(n,t)}}var Hp="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",O=class extends Error{code;constructor(t,e){super(uo(t,e)),this.code=t}};function PN(n){return`NG0${Math.abs(n)}`}function uo(n,t){return`${PN(n)}${t?": "+t:""}`}var Ii=globalThis;function Je(n){for(let t in n)if(n[t]===Je)return t;throw Error("")}function hS(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function co(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(co).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 i=e.indexOf(`
|
|
4
|
+
`);return i>=0?e.slice(0,i):e}function Up(n,t){return n?t?`${n} ${t}`:n:t||""}var RN=Je({__forward_ref__:Je});function Ct(n){return n.__forward_ref__=Ct,n.toString=function(){return co(this())},n}function rn(n){return ab(n)?n():n}function ab(n){return typeof n=="function"&&n.hasOwnProperty(RN)&&n.__forward_ref__===Ct}function x(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function J(n){return{providers:n.providers||[],imports:n.imports||[]}}function Td(n){return NN(n,$p)}function lb(n){return Td(n)!==null}function NN(n,t){return n.hasOwnProperty(t)&&n[t]||null}function FN(n){let t=n?.[$p]??null;return t||null}function X_(n){return n&&n.hasOwnProperty(Bp)?n[Bp]:null}var $p=Je({\u0275prov:Je}),Bp=Je({\u0275inj:Je}),A=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=x({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function cb(n){return n&&!!n.\u0275providers}var db=Je({\u0275cmp:Je}),ub=Je({\u0275dir:Je}),mb=Je({\u0275pipe:Je}),pb=Je({\u0275mod:Je}),Ed=Je({\u0275fac:Je}),ia=Je({__NG_ELEMENT_ID__:Je}),pS=Je({__NG_ENV_ID__:Je});function ts(n){return typeof n=="string"?n:n==null?"":String(n)}function gS(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():ts(n)}var vS=Je({ngErrorCode:Je}),LN=Je({ngErrorMessage:Je}),jN=Je({ngTokenPath:Je});function fb(n,t){return _S("",-200,t)}function Wp(n,t){throw new O(-201,!1)}function _S(n,t,e){let i=new O(t,n);return i[vS]=t,i[LN]=n,e&&(i[jN]=e),i}function VN(n){return n[vS]}var J_;function bS(){return J_}function jn(n){let t=J_;return J_=n,t}function hb(n,t,e){let i=Td(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&8)return null;if(t!==void 0)return t;Wp(n,"Injector")}var BN={},Js=BN,zN="__NG_DI_FLAG__",eb=class{injector;constructor(t){this.injector=t}retrieve(t,e){let i=ea(e)||0;try{return this.injector.get(t,i&8?null:Js,i)}catch(r){if(cl(r))return r;throw r}}};function HN(n,t=0){let e=ip();if(e===void 0)throw new O(-203,!1);if(e===null)return hb(n,void 0,t);{let i=UN(t),r=e.retrieve(n,i);if(cl(r)){if(i.optional)return null;throw r}return r}}function te(n,t=0){return(bS()||HN)(rn(n),t)}function d(n,t){return te(n,ea(t))}function ea(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function UN(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function tb(n){let t=[];for(let e=0;e<n.length;e++){let i=rn(n[e]);if(Array.isArray(i)){if(i.length===0)throw new O(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=$N(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}t.push(te(r,o))}else t.push(te(i))}return t}function $N(n){return n[zN]}function Jo(n,t){let e=n.hasOwnProperty(Ed);return e?n[Ed]:null}function yS(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=t[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}function CS(n){return n.flat(Number.POSITIVE_INFINITY)}function Gp(n,t){n.forEach(e=>Array.isArray(e)?Gp(e,t):t(e))}function gb(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function Dd(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function wS(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function xS(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(r===1)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;){let o=r-2;n[r]=n[o],r--}n[t]=e,n[t+1]=i}}function qp(n,t,e){let i=xl(n,t);return i>=0?n[i|1]=e:(i=~i,xS(n,i,t,e)),i}function Yp(n,t){let e=xl(n,t);if(e>=0)return n[e|1]}function xl(n,t){return WN(n,t,1)}function WN(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<e];if(t===s)return o<<e;s>t?r=o:i=o+1}return~(r<<e)}var Ji={},kn=[],Dr=new A(""),vb=new A("",-1),_b=new A(""),Sd=class{get(t,e=Js){if(e===Js){let r=_S("",-201);throw r.name="\u0275NotFound",r}return e}};function bb(n){return n[pb]||null}function Ir(n){return n[db]||null}function Qp(n){return n[ub]||null}function ES(n){return n[mb]||null}function er(n){return{\u0275providers:n}}function SS(n){return er([{provide:Dr,multi:!0,useValue:n}])}function Kp(...n){return{\u0275providers:yb(!0,n),\u0275fromNgModule:!0}}function yb(n,...t){let e=[],i=new Set,r,o=s=>{e.push(s)};return Gp(t,s=>{let a=s;zp(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&MS(r,o),e}function MS(n,t){for(let e=0;e<n.length;e++){let{ngModule:i,providers:r}=n[e];Cb(r,o=>{t(o,i)})}}function zp(n,t,e,i){if(n=rn(n),!n)return!1;let r=null,o=X_(n),s=!o&&Ir(n);if(!o&&!s){let l=n.ngModule;if(o=X_(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)zp(c,t,e,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;try{Gp(o.imports,p=>{zp(p,t,e,i)&&(c||=[],c.push(p))})}finally{}c!==void 0&&MS(c,t)}if(!a){let c=Jo(r)||(()=>new r);t({provide:r,useFactory:c,deps:kn},r),t({provide:_b,useValue:r,multi:!0},r),t({provide:Dr,useValue:()=>te(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;Cb(l,p=>{t(p,c)})}}else return!1;return r!==n&&n.providers!==void 0}function Cb(n,t){for(let e of n)cb(e)&&(e=e.\u0275providers),Array.isArray(e)?Cb(e,t):t(e)}var GN=Je({provide:String,useValue:Je});function TS(n){return n!==null&&typeof n=="object"&&GN in n}function qN(n){return!!(n&&n.useExisting)}function YN(n){return!!(n&&n.useFactory)}function ta(n){return typeof n=="function"}function DS(n){return!!n.useClass}var Id=new A(""),Vp={},fS={},Z_;function El(){return Z_===void 0&&(Z_=new Sd),Z_}var pt=class{},na=class extends pt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,ib(t,s=>this.processProvider(s)),this.records.set(vb,wl(void 0,this)),r.has("environment")&&this.records.set(pt,wl(void 0,this));let o=this.records.get(Id);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(_b,kn,{self:!0}))}retrieve(t,e){let i=ea(e)||0;try{return this.get(t,Js,i)}catch(r){if(cl(r))return r;throw r}}destroy(){xd(this),this._destroyed=!0;let t=Ie(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ie(t)}}onDestroy(t){return xd(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){xd(this);let e=Er(this),i=jn(void 0),r;try{return t()}finally{Er(e),jn(i)}}get(t,e=Js,i){if(xd(this),t.hasOwnProperty(pS))return t[pS](this);let r=ea(i),o,s=Er(this),a=jn(void 0);try{if(!(r&4)){let c=this.records.get(t);if(c===void 0){let p=JN(t)&&Td(t);p&&this.injectableDefInScope(p)?c=wl(nb(t),Vp):c=null,this.records.set(t,c)}if(c!=null)return this.hydrate(t,c,r)}let l=r&2?El():this.parent;return e=r&8&&e===Js?null:e,l.get(t,e)}catch(l){let c=VN(l);throw c===-200||c===-201?new O(c,null):l}finally{jn(a),Er(s)}}resolveInjectorInitializers(){let t=Ie(null),e=Er(this),i=jn(void 0),r;try{let o=this.get(Dr,kn,{self:!0});for(let s of o)s()}finally{Er(e),jn(i),Ie(t)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(co(i));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=rn(t);let e=ta(t)?t:rn(t&&t.provide),i=KN(t);if(!ta(t)&&t.multi===!0){let r=this.records.get(e);r||(r=wl(void 0,Vp,!0),r.factory=()=>tb(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e,i){let r=Ie(null);try{if(e.value===fS)throw fb(co(t));return e.value===Vp&&(e.value=fS,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&XN(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Ie(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=rn(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 nb(n){let t=Td(n),e=t!==null?t.factory:Jo(n);if(e!==null)return e;if(n instanceof A)throw new O(204,!1);if(n instanceof Function)return QN(n);throw new O(204,!1)}function QN(n){if(n.length>0)throw new O(204,!1);let e=FN(n);return e!==null?()=>e.factory(n):()=>new n}function KN(n){if(TS(n))return wl(void 0,n.useValue);{let t=wb(n);return wl(t,Vp)}}function wb(n,t,e){let i;if(ta(n)){let r=rn(n);return Jo(r)||nb(r)}else if(TS(n))i=()=>rn(n.useValue);else if(YN(n))i=()=>n.useFactory(...tb(n.deps||[]));else if(qN(n))i=(r,o)=>te(rn(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=rn(n&&(n.useClass||n.provide));if(ZN(n))i=()=>new r(...tb(n.deps));else return Jo(r)||nb(r)}return i}function xd(n){if(n.destroyed)throw new O(205,!1)}function wl(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function ZN(n){return!!n.deps}function XN(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function JN(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function ib(n,t){for(let e of n)Array.isArray(e)?ib(e,t):e&&cb(e)?ib(e.\u0275providers,t):t(e)}function pn(n,t){let e;n instanceof na?(xd(n),e=n):e=new eb(n);let i,r=Er(e),o=jn(void 0);try{return t()}finally{Er(r),jn(o)}}function IS(){return bS()!==void 0||ip()!=null}var tr=0,be=1,Te=2,on=3,ki=4,Vn=5,ra=6,Sl=7,Ut=8,ns=9,kr=10,ft=11,Ml=12,xb=13,oa=14,Bn=15,is=16,sa=17,Ar=18,kd=19,Eb=20,lo=21,Zp=22,mo=23,hi=24,aa=25,la=26,Mt=27,kS=1,Sb=6,rs=7,Ad=8,ca=9,Qt=10;function Or(n){return Array.isArray(n)&&typeof n[kS]=="object"}function nr(n){return Array.isArray(n)&&n[kS]===!0}function Mb(n){return(n.flags&4)!==0}function os(n){return n.componentOffset>-1}function Tl(n){return(n.flags&1)===1}function ir(n){return!!n.template}function Dl(n){return(n[Te]&512)!==0}function da(n){return(n[Te]&256)===256}var Tb="svg",AS="math";function Ai(n){for(;Array.isArray(n);)n=n[tr];return n}function Db(n,t){return Ai(t[n])}function rr(n,t){return Ai(t[n.index])}function Od(n,t){return n.data[t]}function Xp(n,t){return n[t]}function Ib(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}function Oi(n,t){let e=t[n];return Or(e)?e:e[tr]}function OS(n){return(n[Te]&4)===4}function Jp(n){return(n[Te]&128)===128}function PS(n){return nr(n[on])}function Pi(n,t){return t==null?null:n[t]}function kb(n){n[sa]=0}function Ab(n){n[Te]&1024||(n[Te]|=1024,Jp(n)&&ss(n))}function RS(n,t){for(;n>0;)t=t[oa],n--;return t}function Pd(n){return!!(n[Te]&9216||n[hi]?.dirty)}function ef(n){n[kr].changeDetectionScheduler?.notify(8),n[Te]&64&&(n[Te]|=1024),Pd(n)&&ss(n)}function ss(n){n[kr].changeDetectionScheduler?.notify(0);let t=es(n);for(;t!==null&&!(t[Te]&8192||(t[Te]|=8192,!Jp(t)));)t=es(t)}function Ob(n,t){if(da(n))throw new O(911,!1);n[lo]===null&&(n[lo]=[]),n[lo].push(t)}function NS(n,t){if(n[lo]===null)return;let e=n[lo].indexOf(t);e!==-1&&n[lo].splice(e,1)}function es(n){let t=n[on];return nr(t)?t[on]:t}function Pb(n){return n[Sl]??=[]}function Rb(n){return n.cleanup??=[]}function FS(n,t,e,i){let r=Pb(t);r.push(e),n.firstCreatePass&&Rb(n).push(i,r.length-1)}var Re={lFrame:YS(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var rb=!1;function LS(){return Re.lFrame.elementDepthCount}function jS(){Re.lFrame.elementDepthCount++}function Nb(){Re.lFrame.elementDepthCount--}function tf(){return Re.bindingsEnabled}function Fb(){return Re.skipHydrationRootTNode!==null}function Lb(n){return Re.skipHydrationRootTNode===n}function jb(){Re.skipHydrationRootTNode=null}function Ee(){return Re.lFrame.lView}function kt(){return Re.lFrame.tView}function E(n){return Re.lFrame.contextLView=n,n[Ut]}function S(n){return Re.lFrame.contextLView=null,n}function sn(){let n=Vb();for(;n!==null&&n.type===64;)n=n.parent;return n}function Vb(){return Re.lFrame.currentTNode}function VS(){let n=Re.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function Il(n,t){let e=Re.lFrame;e.currentTNode=n,e.isParent=t}function Bb(){return Re.lFrame.isParent}function zb(){Re.lFrame.isParent=!1}function BS(){return Re.lFrame.contextLView}function Hb(){return rb}function kl(n){let t=rb;return rb=n,t}function nf(){let n=Re.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function zS(){return Re.lFrame.bindingIndex}function HS(n){return Re.lFrame.bindingIndex=n}function as(){return Re.lFrame.bindingIndex++}function rf(n){let t=Re.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function US(){return Re.lFrame.inI18n}function $S(n,t){let e=Re.lFrame;e.bindingIndex=e.bindingRootIndex=n,of(t)}function WS(){return Re.lFrame.currentDirectiveIndex}function of(n){Re.lFrame.currentDirectiveIndex=n}function GS(n){let t=Re.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function sf(){return Re.lFrame.currentQueryIndex}function Rd(n){Re.lFrame.currentQueryIndex=n}function eF(n){let t=n[be];return t.type===2?t.declTNode:t.type===1?n[Vn]:null}function Ub(n,t,e){if(e&4){let r=t,o=n;for(;r=r.parent,r===null&&!(e&1);)if(r=eF(o),r===null||(o=o[oa],r.type&10))break;if(r===null)return!1;t=r,n=o}let i=Re.lFrame=qS();return i.currentTNode=t,i.lView=n,!0}function af(n){let t=qS(),e=n[be];Re.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function qS(){let n=Re.lFrame,t=n===null?null:n.child;return t===null?YS(n):t}function YS(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 QS(){let n=Re.lFrame;return Re.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var $b=QS;function lf(){let n=QS();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 KS(n){return(Re.lFrame.contextLView=RS(n,Re.lFrame.contextLView))[Ut]}function Pr(){return Re.lFrame.selectedIndex}function ls(n){Re.lFrame.selectedIndex=n}function Nd(){let n=Re.lFrame;return Od(n.tView,n.selectedIndex)}function or(){Re.lFrame.currentNamespace=Tb}function Al(){tF()}function tF(){Re.lFrame.currentNamespace=null}function ZS(){return Re.lFrame.currentNamespace}var XS=!0;function cf(){return XS}function Fd(n){XS=n}function ob(n,t=null,e=null,i){let r=Wb(n,t,e,i);return r.resolveInjectorInitializers(),r}function Wb(n,t=null,e=null,i,r=new Set){let o=[e||kn,Kp(n)];return i=i||(typeof n=="object"?void 0:co(n)),new na(o,t||El(),i||null,r)}var me=class n{static THROW_IF_NOT_FOUND=Js;static NULL=new Sd;static create(t,e){if(Array.isArray(t))return ob({name:""},e,t,"");{let i=t.name??"";return ob({name:i},t.parent,t.providers,i)}}static \u0275prov=x({token:n,providedIn:"any",factory:()=>te(vb)});static __NG_ELEMENT_ID__=-1},le=new A(""),an=(()=>{class n{static __NG_ELEMENT_ID__=nF;static __NG_ENV_ID__=e=>e}return n})(),Md=class extends an{_lView;constructor(t){super(),this._lView=t}get destroyed(){return da(this._lView)}onDestroy(t){let e=this._lView;return Ob(e,t),()=>NS(e,t)}};function nF(){return new Md(Ee())}var yn=class{_console=console;handleError(t){this._console.error("ERROR",t)}},zn=new A("",{providedIn:"root",factory:()=>{let n=d(pt),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(yn),t.handleError(e))}}}),JS={provide:Dr,useValue:()=>void d(yn),multi:!0},iF=new A("",{providedIn:"root",factory:()=>{let n=d(le).defaultView;if(!n)return;let t=d(zn),e=o=>{t(o.reason),o.preventDefault()},i=o=>{o.error?t(o.error):t(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{n.addEventListener("unhandledrejection",e),n.addEventListener("error",i)};typeof Zone<"u"?Zone.root.run(r):r(),d(an).onDestroy(()=>{n.removeEventListener("error",i),n.removeEventListener("unhandledrejection",e)})}});function Gb(){return er([SS(()=>void d(iF))])}function Rr(n){return typeof n=="function"&&n[tn]!==void 0}function Fe(n,t){let[e,i,r]=P_(n,t?.equal),o=e,s=o[tn];return o.set=i,o.update=r,o.asReadonly=qb.bind(o),o}function qb(){let n=this[tn];if(n.readonlyFn===void 0){let t=()=>this();t[tn]=n,n.readonlyFn=t}return n.readonlyFn}function Yb(n){return Rr(n)&&typeof n.set=="function"}var Di=class{},Ol=new A("",{providedIn:"root",factory:()=>!1});var Qb=new A(""),Kb=new A("");var ua=(()=>{class n{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=rF}return n})();function rF(){return new ua(Ee(),sn())}var Nr=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ae(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new ge(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=x({token:n,providedIn:"root",factory:()=>new n})}return n})(),Pl=(()=>{class n{internalPendingTasks=d(Nr);scheduler=d(Di);errorHandler=d(zn);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let i=this.add();e().catch(this.errorHandler).finally(i)}static \u0275prov=x({token:n,providedIn:"root",factory:()=>new n})}return n})();function ma(...n){}var Ld=(()=>{class n{static \u0275prov=x({token:n,providedIn:"root",factory:()=>new sb})}return n})(),sb=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,i=this.queues.get(e);i.has(t)&&(i.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let i=this.queues.get(e);i.has(t)||i.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[e,i]of this.queues)e===null?t||=this.flushQueue(i):t||=e.run(()=>this.flushQueue(i));t||(this.dirtyEffectCount=0)}}flushQueue(t){let e=!1;for(let i of t)i.dirty&&(this.dirtyEffectCount--,e=!0,i.run());return e}};function qd(n){return{toString:n}.toString()}function dF(n){return typeof n=="function"}var bf=class{previousValue;currentValue;firstChange;constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function FM(n,t,e,i){t!==null?t.applyValueToInputSignal(t,i):n[e]=i}var We=(()=>{let n=()=>LM;return n.ngInherit=!0,n})();function LM(n){return n.type.prototype.ngOnChanges&&(n.setInput=mF),uF}function uF(){let n=VM(this),t=n?.current;if(t){let e=n.previous;if(e===Ji)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function mF(n,t,e,i,r){let o=this.declaredInputs[i],s=VM(n)||pF(n,{previous:Ji,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new bf(c&&c.currentValue,e,l===Ji),FM(n,t,r,e)}var jM="__ngSimpleChanges__";function VM(n){return n[jM]||null}function pF(n,t){return n[jM]=t}var eM=[];var ot=function(n,t=null,e){for(let i=0;i<eM.length;i++){let r=eM[i];r(n,t,e)}};function fF(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=LM(t);(e.preOrderHooks??=[]).push(n,s),(e.preOrderCheckHooks??=[]).push(n,s)}r&&(e.preOrderHooks??=[]).push(0-n,r),o&&((e.preOrderHooks??=[]).push(n,o),(e.preOrderCheckHooks??=[]).push(n,o))}function BM(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:p}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),l&&(n.viewHooks??=[]).push(-e,l),c&&((n.viewHooks??=[]).push(e,c),(n.viewCheckHooks??=[]).push(e,c)),p!=null&&(n.destroyHooks??=[]).push(e,p)}}function hf(n,t,e){zM(n,t,3,e)}function gf(n,t,e,i){(n[Te]&3)===e&&zM(n,t,e,i)}function Zb(n,t){let e=n[Te];(e&3)===t&&(e&=16383,e+=1,n[Te]=e)}function zM(n,t,e,i){let r=i!==void 0?n[sa]&65535:0,o=i??-1,s=t.length-1,a=0;for(let l=r;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],i!=null&&a>=i)break}else t[l]<0&&(n[sa]+=65536),(a<o||o==-1)&&(hF(n,e,t,l),n[sa]=(n[sa]&4294901760)+l+2),l++}function tM(n,t){ot(4,n,t);let e=Ie(null);try{t.call(n)}finally{Ie(e),ot(5,n,t)}}function hF(n,t,e,i){let r=e[i]<0,o=e[i+1],s=r?-e[i]:e[i],a=n[s];r?n[Te]>>14<n[sa]>>16&&(n[Te]&3)===t&&(n[Te]+=16384,tM(a,o)):tM(a,o)}var Nl=-1,fa=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,i,r){this.factory=t,this.name=r,this.canSeeViewProviders=e,this.injectImpl=i}};function gF(n){return(n.flags&8)!==0}function vF(n){return(n.flags&16)!==0}function _F(n,t,e){let i=0;for(;i<e.length;){let r=e[i];if(typeof r=="number"){if(r!==0)break;i++;let o=e[i++],s=e[i++],a=e[i++];n.setAttribute(t,s,a,o)}else{let o=r,s=e[++i];bF(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function HM(n){return n===3||n===4||n===6}function bF(n){return n.charCodeAt(0)===64}function Fl(n,t){if(!(t===null||t.length===0))if(n===null||n.length===0)n=t.slice();else{let e=-1;for(let i=0;i<t.length;i++){let r=t[i];typeof r=="number"?e=r:e===0||(e===-1||e===2?nM(n,e,r,null,t[++i]):nM(n,e,r,null,null))}}return n}function nM(n,t,e,i,r){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){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),r!==null&&n.splice(o++,0,r)}function UM(n){return n!==Nl}function yf(n){return n&32767}function yF(n){return n>>16}function Cf(n,t){let e=yF(n),i=t;for(;e>0;)i=i[oa],e--;return i}var cy=!0;function wf(n){let t=cy;return cy=n,t}var CF=256,$M=CF-1,WM=5,wF=0,Fr={};function xF(n,t,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(ia)&&(i=e[ia]),i==null&&(i=e[ia]=wF++);let r=i&$M,o=1<<r;t.data[n+(r>>WM)]|=o}function xf(n,t){let e=GM(n,t);if(e!==-1)return e;let i=t[be];i.firstCreatePass&&(n.injectorIndex=t.length,Xb(i.data,n),Xb(t,null),Xb(i.blueprint,null));let r=Yy(n,t),o=n.injectorIndex;if(UM(r)){let s=yf(r),a=Cf(r,t),l=a[be].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Xb(n,t){n.push(0,0,0,0,0,0,0,0,t)}function GM(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function Yy(n,t){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;r!==null;){if(i=ZM(r),i===null)return Nl;if(e++,r=r[oa],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return Nl}function dy(n,t,e){xF(n,t,e)}function EF(n,t){if(t==="class")return n.classes;if(t==="style")return n.styles;let e=n.attrs;if(e){let i=e.length,r=0;for(;r<i;){let o=e[r];if(HM(o))break;if(o===0)r=r+2;else if(typeof o=="number")for(r++;r<i&&typeof e[r]=="string";)r++;else{if(o===t)return e[r+1];r=r+2}}}return null}function qM(n,t,e){if(e&8||n!==void 0)return n;Wp(t,"NodeInjector")}function YM(n,t,e,i){if(e&8&&i===void 0&&(i=null),(e&3)===0){let r=n[ns],o=jn(void 0);try{return r?r.get(t,i,e&8):hb(t,i,e&8)}finally{jn(o)}}return qM(i,t,e)}function QM(n,t,e,i=0,r){if(n!==null){if(t[Te]&2048&&!(i&2)){let s=DF(n,t,e,i,Fr);if(s!==Fr)return s}let o=KM(n,t,e,i,Fr);if(o!==Fr)return o}return YM(t,e,i,r)}function KM(n,t,e,i,r){let o=MF(e);if(typeof o=="function"){if(!Ub(t,n,i))return i&1?qM(r,e,i):YM(t,e,i,r);try{let s;if(s=o(i),s==null&&!(i&8))Wp(e);else return s}finally{$b()}}else if(typeof o=="number"){let s=null,a=GM(n,t),l=Nl,c=i&1?t[Bn][Vn]:null;for((a===-1||i&4)&&(l=a===-1?Yy(n,t):t[a+8],l===Nl||!rM(i,!1)?a=-1:(s=t[be],a=yf(l),t=Cf(l,t)));a!==-1;){let p=t[be];if(iM(o,a,p.data)){let h=SF(a,t,e,s,i,c);if(h!==Fr)return h}l=t[a+8],l!==Nl&&rM(i,t[be].data[a+8]===c)&&iM(o,a,t)?(s=p,a=yf(l),t=Cf(l,t)):a=-1}}return r}function SF(n,t,e,i,r,o){let s=t[be],a=s.data[n+8],l=i==null?os(a)&&cy:i!=s&&(a.type&3)!==0,c=r&1&&o===a,p=vf(a,s,e,l,c);return p!==null?Bd(t,s,p,a,r):Fr}function vf(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,p=o>>20,h=i?a:a+p,_=r?a+p:c;for(let v=h;v<_;v++){let y=s[v];if(v<l&&e===y||v>=l&&y.type===e)return v}if(r){let v=s[l];if(v&&ir(v)&&v.type===e)return l}return null}function Bd(n,t,e,i,r){let o=n[e],s=t.data;if(o instanceof fa){let a=o;if(a.resolving){let v=gS(s[e]);throw fb(v)}let l=wf(a.canSeeViewProviders);a.resolving=!0;let c=s[e].type||s[e],p,h=a.injectImpl?jn(a.injectImpl):null,_=Ub(n,i,0);try{o=n[e]=a.factory(void 0,r,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&fF(e,s[e],t)}finally{h!==null&&jn(h),wf(l),a.resolving=!1,$b()}}return o}function MF(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(ia)?n[ia]:void 0;return typeof t=="number"?t>=0?t&$M:TF:t}function iM(n,t,e){let i=1<<n;return!!(e[t+(n>>WM)]&i)}function rM(n,t){return!(n&2)&&!(n&1&&t)}var pa=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return QM(this._tNode,this._lView,t,ea(i),e)}};function TF(){return new pa(sn(),Ee())}function ht(n){return qd(()=>{let t=n.prototype.constructor,e=t[Ed]||uy(t),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[Ed]||uy(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function uy(n){return ab(n)?()=>{let t=uy(rn(n));return t&&t()}:Jo(n)}function DF(n,t,e,i,r){let o=n,s=t;for(;o!==null&&s!==null&&s[Te]&2048&&!Dl(s);){let a=KM(o,s,e,i|2,Fr);if(a!==Fr)return a;let l=o.parent;if(!l){let c=s[Eb];if(c){let p=c.get(e,Fr,i);if(p!==Fr)return p}l=ZM(s),s=s[oa]}o=l}return r}function ZM(n){let t=n[be],e=t.type;return e===2?t.declTNode:e===1?n[Vn]:null}function jf(n){return EF(sn(),n)}function IF(){return Bl(sn(),Ee())}function Bl(n,t){return new Z(rr(n,t))}var Z=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=IF}return n})();function XM(n){return n instanceof Z?n.nativeElement:n}function kF(){return this._results[Symbol.iterator]()}var po=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 P}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 i=CS(t);(this._changesDetected=!yS(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[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]=kF};function JM(n){return(n.flags&128)===128}var Qy=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(Qy||{}),eT=new Map,AF=0;function OF(){return AF++}function PF(n){eT.set(n[kd],n)}function my(n){eT.delete(n[kd])}var oM="__ngContext__";function Ll(n,t){Or(t)?(n[oM]=t[kd],PF(t)):n[oM]=t}function tT(n){return iT(n[Ml])}function nT(n){return iT(n[ki])}function iT(n){for(;n!==null&&!nr(n);)n=n[ki];return n}var py;function Ky(n){py=n}function Zy(){if(py!==void 0)return py;if(typeof document<"u")return document;throw new O(210,!1)}var us=new A("",{providedIn:"root",factory:()=>RF}),RF="ng",Vf=new A(""),ms=new A("",{providedIn:"platform",factory:()=>"unknown"});var ps=new A(""),zl=new A("",{providedIn:"root",factory:()=>Zy().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var NF="h",FF="b";var rT="r";var oT="di";var sT=!1,aT=new A("",{providedIn:"root",factory:()=>sT});var Bf=new A("");var LF=(n,t,e,i)=>{};function jF(n,t,e,i){LF(n,t,e,i)}function zf(n){return(n.flags&32)===32}var VF=()=>null;function lT(n,t,e=!1){return VF(n,t,e)}function cT(n,t){let e=n.contentQueries;if(e!==null){let i=Ie(null);try{for(let r=0;r<e.length;r+=2){let o=e[r],s=e[r+1];if(s!==-1){let a=n.data[s];Rd(o),a.contentQueries(2,t[s],s)}}}finally{Ie(i)}}}function fy(n,t,e){Rd(0);let i=Ie(null);try{t(n,e)}finally{Ie(i)}}function Xy(n,t,e){if(Mb(t)){let i=Ie(null);try{let r=t.directiveStart,o=t.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=e[s];a.contentQueries(1,l,s)}}}finally{Ie(i)}}}var fo=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(fo||{}),df;function BF(){if(df===void 0&&(df=null,Ii.trustedTypes))try{df=Ii.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return df}function Hf(n){return BF()?.createHTML(n)||n}var uf;function zF(){if(uf===void 0&&(uf=null,Ii.trustedTypes))try{uf=Ii.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return uf}function sM(n){return zF()?.createHTML(n)||n}var ho=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Hp})`}},hy=class extends ho{getTypeName(){return"HTML"}},gy=class extends ho{getTypeName(){return"Style"}},vy=class extends ho{getTypeName(){return"Script"}},_y=class extends ho{getTypeName(){return"URL"}},by=class extends ho{getTypeName(){return"ResourceURL"}};function Ni(n){return n instanceof ho?n.changingThisBreaksApplicationSecurity:n}function go(n,t){let e=dT(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Hp})`)}return e===t}function dT(n){return n instanceof ho&&n.getTypeName()||null}function Jy(n){return new hy(n)}function e0(n){return new gy(n)}function t0(n){return new vy(n)}function n0(n){return new _y(n)}function i0(n){return new by(n)}function HF(n){let t=new Cy(n);return UF()?new yy(t):t}var yy=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(Hf(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},Cy=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=Hf(t),e}};function UF(){try{return!!new window.DOMParser().parseFromString(Hf(""),"text/html")}catch{return!1}}var $F=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Yd(n){return n=String(n),n.match($F)?n:"unsafe:"+n}function vo(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Qd(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var uT=vo("area,br,col,hr,img,wbr"),mT=vo("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),pT=vo("rp,rt"),WF=Qd(pT,mT),GF=Qd(mT,vo("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")),qF=Qd(pT,vo("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")),aM=Qd(uT,GF,qF,WF),fT=vo("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),YF=vo("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"),QF=vo("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"),KF=Qd(fT,YF,QF),ZF=vo("script,style,template"),wy=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,i=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild){r.push(e),e=eL(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=JF(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=lM(t).toLowerCase();if(!aM.hasOwnProperty(e))return this.sanitizedSomething=!0,!ZF.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=t.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!KF.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;fT[a]&&(l=Yd(l)),this.buf.push(" ",s,'="',cM(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=lM(t).toLowerCase();aM.hasOwnProperty(e)&&!uT.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(cM(t))}};function XF(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function JF(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw hT(t);return t}function eL(n){let t=n.firstChild;if(t&&XF(n,t))throw hT(t);return t}function lM(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function hT(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var tL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,nL=/([^\#-~ |!])/g;function cM(n){return n.replace(/&/g,"&").replace(tL,function(t){let e=t.charCodeAt(0),i=t.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(nL,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var mf;function Uf(n,t){let e=null;try{mf=mf||HF(n);let i=t?String(t):"";e=mf.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=mf.getInertBodyElement(i)}while(i!==o);let a=new wy().sanitizeChildren(dM(e)||e);return Hf(a)}finally{if(e){let i=dM(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function dM(n){return"content"in n&&iL(n)?n.content:null}function iL(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var Cn=(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})(Cn||{});function ii(n){let t=gT();return t?sM(t.sanitize(Cn.HTML,n)||""):go(n,"HTML")?sM(Ni(n)):Uf(Zy(),ts(n))}function ga(n){let t=gT();return t?t.sanitize(Cn.URL,n)||"":go(n,"URL")?Ni(n):Yd(ts(n))}function gT(){let n=Ee();return n&&n[kr].sanitizer}var rL=/^>|^->|<!--|-->|--!>|<!-$/g,oL=/(<|>)/g,sL="\u200B$1\u200B";function aL(n){return n.replace(rL,t=>t.replace(oL,sL))}function r0(n){return n.ownerDocument}function vT(n){return n instanceof Function?n():n}function lL(n,t,e){let i=n.length;for(;;){let r=n.indexOf(t,e);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}var _T="ng-template";function cL(n,t,e,i){let r=0;if(i){for(;r<t.length&&typeof t[r]=="string";r+=2)if(t[r]==="class"&&lL(t[r+1].toLowerCase(),e,0)!==-1)return!0}else if(o0(n))return!1;if(r=t.indexOf(1,r),r>-1){let o;for(;++r<t.length&&typeof(o=t[r])=="string";)if(o.toLowerCase()===e)return!0}return!1}function o0(n){return n.type===4&&n.value!==_T}function dL(n,t,e){let i=n.type===4&&!e?_T:n.value;return t===i}function uL(n,t,e){let i=4,r=n.attrs,o=r!==null?fL(r):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!sr(i)&&!sr(l))return!1;if(s&&sr(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!dL(n,l,e)||l===""&&t.length===1){if(sr(i))return!1;s=!0}}else if(i&8){if(r===null||!cL(n,r,l,e)){if(sr(i))return!1;s=!0}}else{let c=t[++a],p=mL(l,r,o0(n),e);if(p===-1){if(sr(i))return!1;s=!0;continue}if(c!==""){let h;if(p>o?h="":h=r[p+1].toLowerCase(),i&2&&c!==h){if(sr(i))return!1;s=!0}}}}return sr(i)||s}function sr(n){return(n&1)===0}function mL(n,t,e,i){if(t===null)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let s=t[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++r];for(;typeof a=="string";)a=t[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return hL(t,n)}function bT(n,t,e=!1){for(let i=0;i<t.length;i++)if(uL(n,t[i],e))return!0;return!1}function pL(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function fL(n){for(let t=0;t<n.length;t++){let e=n[t];if(HM(e))return t}return n.length}function hL(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let i=n[e];if(typeof i=="number")return-1;if(i===t)return e;e++}return-1}function gL(n,t){e:for(let e=0;e<t.length;e++){let i=t[e];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function uM(n,t){return n?":not("+t.trim()+")":t}function vL(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let s=n[e];if(typeof s=="string")if(i&2){let a=n[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!sr(s)&&(t+=uM(o,r),r=""),i=s,o=o||!sr(i);e++}return r!==""&&(t+=uM(o,r)),t}function _L(n){return n.map(vL).join(",")}function bL(n){let t=[],e=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&t.push(o,n[++i]):r===8&&e.push(o);else{if(!sr(r))break;r=o}i++}return e.length&&t.push(1,...e),t}var ri={};function yL(n,t){return n.createText(t)}function CL(n,t,e){n.setValue(t,e)}function wL(n,t){return n.createComment(aL(t))}function yT(n,t,e){return n.createElement(t,e)}function Ef(n,t,e,i,r){n.insertBefore(t,e,i,r)}function CT(n,t,e){n.appendChild(t,e)}function mM(n,t,e,i,r){i!==null?Ef(n,t,e,i,r):CT(n,t,e)}function wT(n,t,e,i){n.removeChild(null,t,e,i)}function xL(n,t,e){n.setAttribute(t,"style",e)}function EL(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function xT(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;i!==null&&_F(n,t,i),r!==null&&EL(n,t,r),o!==null&&xL(n,t,o)}function s0(n,t,e,i,r,o,s,a,l,c,p){let h=Mt+i,_=h+r,v=SL(h,_),y=typeof c=="function"?c():c;return v[be]={type:n,blueprint:v,template:e,queries:null,viewQuery:a,declTNode:t,data:v.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:_,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:l,consts:y,incompleteFirstPass:!1,ssrId:p}}function SL(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:ri);return e}function ML(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=s0(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function a0(n,t,e,i,r,o,s,a,l,c,p){let h=t.blueprint.slice();return h[tr]=r,h[Te]=i|4|128|8|64|1024,(c!==null||n&&n[Te]&2048)&&(h[Te]|=2048),kb(h),h[on]=h[oa]=n,h[Ut]=e,h[kr]=s||n&&n[kr],h[ft]=a||n&&n[ft],h[ns]=l||n&&n[ns]||null,h[Vn]=o,h[kd]=OF(),h[ra]=p,h[Eb]=c,h[Bn]=t.type==2?n[Bn]:h,h}function TL(n,t,e){let i=rr(t,n),r=ML(e),o=n[kr].rendererFactory,s=l0(n,a0(n,r,null,ET(e),i,t,null,o.createRenderer(i,e),null,null,null));return n[t.index]=s}function ET(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function ST(n,t,e,i){if(e===0)return-1;let r=t.length;for(let o=0;o<e;o++)t.push(i),n.blueprint.push(i),n.data.push(null);return r}function l0(n,t){return n[Ml]?n[xb][ki]=t:n[Ml]=t,n[xb]=t,t}function f(n=1){MT(kt(),Ee(),Pr()+n,!1)}function MT(n,t,e,i){if(!i)if((t[Te]&3)===3){let o=n.preOrderCheckHooks;o!==null&&hf(t,o,e)}else{let o=n.preOrderHooks;o!==null&&gf(t,o,0,e)}ls(e)}var $f=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})($f||{});function xy(n,t,e,i){let r=Ie(null);try{let[o,s,a]=n.inputs[e],l=null;(s&$f.SignalBased)!==0&&(l=t[o][tn]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(t,i)),n.setInput!==null?n.setInput(t,l,i,e,o):FM(t,l,o,i)}finally{Ie(r)}}var Lr=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(Lr||{}),DL;function c0(n,t){return DL(n,t)}var Kd=new Set;var TT=new A("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1})});function pM(n,t,e,i){let r=n?.[la]?.enter;if(t!==null&&r&&r.has(e.index)){let o=i.get(TT);for(let s of r.get(e.index).animateFns)o.queue.add(s)}}function Rl(n,t,e,i,r,o,s,a){if(r!=null){let l,c=!1;nr(r)?l=r:Or(r)&&(c=!0,r=r[tr]);let p=Ai(r);n===0&&i!==null?(pM(a,i,o,e),s==null?CT(t,i,p):Ef(t,i,p,s||null,!0)):n===1&&i!==null?(pM(a,i,o,e),Ef(t,i,p,s||null,!0)):n===2?fM(a,o,e,h=>{wT(t,p,c,h)}):n===3&&fM(a,o,e,()=>{t.destroyNode(p)}),l!=null&&BL(t,n,e,l,o,i,s)}}function IL(n,t){let e=n.get(TT);if(Array.isArray(t))for(let i of t)e.queue.add(i);else e.queue.add(t)}function kL(n,t){DT(n,t),t[tr]=null,t[Vn]=null}function AL(n,t,e,i,r,o){i[tr]=r,i[Vn]=t,Gf(n,i,e,1,r,o)}function DT(n,t){t[kr].changeDetectionScheduler?.notify(9),Gf(n,t,t[ft],2,null,null)}function OL(n){let t=n[Ml];if(!t)return Jb(n[be],n);for(;t;){let e=null;if(Or(t))e=t[Ml];else{let i=t[Qt];i&&(e=i)}if(!e){for(;t&&!t[ki]&&t!==n;)Or(t)&&Jb(t[be],t),t=t[on];t===null&&(t=n),Or(t)&&Jb(t[be],t),e=t&&t[ki]}t=e}}function d0(n,t){let e=n[ca],i=e.indexOf(t);e.splice(i,1)}function Wf(n,t){if(da(t))return;let e=t[ft];e.destroyNode&&Gf(n,t,e,3,null,null),OL(t)}function Jb(n,t){if(da(t))return;let e=Ie(null);try{t[Te]&=-129,t[Te]|=256,t[hi]&&Yo(t[hi]),NL(n,t),RL(n,t),t[be].type===1&&t[ft].destroy();let i=t[is];if(i!==null&&nr(t[on])){i!==t[on]&&d0(i,t);let r=t[Ar];r!==null&&r.detachView(n)}my(t)}finally{Ie(e)}}function fM(n,t,e,i){let r=n?.[la];if(r==null||r.leave==null||!r.leave.has(t.index))return i(!1);if(r.skipLeaveAnimations)return r.skipLeaveAnimations=!1,i(!1);IL(e,()=>{if(r.leave&&r.leave.has(t.index)){let s=r.leave.get(t.index),a=[];if(s)for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:p}=c();a.push(p)}r.running=Promise.allSettled(a),PL(n,i)}else n&&Kd.delete(n),i(!1)})}function PL(n,t){let e=n[la]?.running;if(e){e.then(()=>{n[la].running=void 0,Kd.delete(n),t(!0)});return}t(!1)}function RL(n,t){let e=n.cleanup,i=t[Sl];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?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[e[s+1]];e[s].call(a)}i!==null&&(t[Sl]=null);let r=t[lo];if(r!==null){t[lo]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=t[mo];if(o!==null){t[mo]=null;for(let s of o)s.destroy()}}function NL(n,t){let e;if(n!=null&&(e=n.destroyHooks)!=null)for(let i=0;i<e.length;i+=2){let r=t[e[i]];if(!(r instanceof fa)){let o=e[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];ot(4,a,l);try{l.call(a)}finally{ot(5,a,l)}}else{ot(4,r,o);try{o.call(r)}finally{ot(5,r,o)}}}}}function IT(n,t,e){return FL(n,t.parent,e)}function FL(n,t,e){let i=t;for(;i!==null&&i.type&168;)t=i,i=t.parent;if(i===null)return e[tr];if(os(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===fo.None||r===fo.Emulated)return null}return rr(i,e)}function kT(n,t,e){return jL(n,t,e)}function LL(n,t,e){return n.type&40?rr(n,e):null}var jL=LL,hM;function u0(n,t,e,i){let r=IT(n,i,t),o=t[ft],s=i.parent||t[Vn],a=kT(s,i,t);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)mM(o,r,e[l],a,!1);else mM(o,r,e,a,!1);hM!==void 0&&hM(o,i,t,e,r)}function jd(n,t){if(t!==null){let e=t.type;if(e&3)return rr(t,n);if(e&4)return Ey(-1,n[t.index]);if(e&8){let i=t.child;if(i!==null)return jd(n,i);{let r=n[t.index];return nr(r)?Ey(-1,r):Ai(r)}}else{if(e&128)return jd(n,t.next);if(e&32)return c0(t,n)()||Ai(n[t.index]);{let i=AT(n,t);if(i!==null){if(Array.isArray(i))return i[0];let r=es(n[Bn]);return jd(r,i)}else return jd(n,t.next)}}}return null}function AT(n,t){if(t!==null){let i=n[Bn][Vn],r=t.projection;return i.projection[r]}return null}function Ey(n,t){let e=Qt+n+1;if(e<t.length){let i=t[e],r=i[be].firstChild;if(r!==null)return jd(i,r)}return t[rs]}function m0(n,t,e,i,r,o,s){for(;e!=null;){let a=i[ns];if(e.type===128){e=e.next;continue}let l=i[e.index],c=e.type;if(s&&t===0&&(l&&Ll(Ai(l),i),e.flags|=2),!zf(e))if(c&8)m0(n,t,e.child,i,r,o,!1),Rl(t,n,a,r,l,e,o,i);else if(c&32){let p=c0(e,i),h;for(;h=p();)Rl(t,n,a,r,h,e,o,i);Rl(t,n,a,r,l,e,o,i)}else c&16?OT(n,t,i,e,r,o):Rl(t,n,a,r,l,e,o,i);e=s?e.projectionNext:e.next}}function Gf(n,t,e,i,r,o){m0(e,i,n.firstChild,t,r,o,!1)}function VL(n,t,e){let i=t[ft],r=IT(n,e,t),o=e.parent||t[Vn],s=kT(o,e,t);OT(i,0,t,e,r,s)}function OT(n,t,e,i,r,o){let s=e[Bn],l=s[Vn].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let p=l[c];Rl(t,n,e[ns],r,p,i,o,e)}else{let c=l,p=s[on];JM(i)&&(c.flags|=128),m0(n,t,c,p,r,o,!0)}}function BL(n,t,e,i,r,o,s){let a=i[rs],l=Ai(i);a!==l&&Rl(t,n,e,o,a,r,s);for(let c=Qt;c<i.length;c++){let p=i[c];Gf(p[be],p,n,t,o,a)}}function zL(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=i.indexOf("-")===-1?void 0:Lr.DashCase;r==null?n.removeStyle(e,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Lr.Important),n.setStyle(e,i,r,o))}}function PT(n,t,e,i,r){let o=Pr(),s=i&2;try{ls(-1),s&&t.length>Mt&&MT(n,t,Mt,!1),ot(s?2:0,r,e),e(i,r)}finally{ls(o),ot(s?3:1,r,e)}}function qf(n,t,e){qL(n,t,e),(e.flags&64)===64&&YL(n,t,e)}function Zd(n,t,e=rr){let i=t.localNames;if(i!==null){let r=t.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?e(t,n):n[s];n[r++]=a}}}function HL(n,t,e,i){let o=i.get(aT,sT)||e===fo.ShadowDom,s=n.selectRootElement(t,o);return UL(s),s}function UL(n){$L(n)}var $L=()=>null;function WL(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function RT(n,t,e,i,r,o){let s=t[be];if(g0(n,s,t,e,i)){os(n)&&GL(t,n.index);return}n.type&3&&(e=WL(e)),NT(n,t,e,i,r,o)}function NT(n,t,e,i,r,o){if(n.type&3){let s=rr(n,t);i=o!=null?o(i,n.value||"",e):i,r.setProperty(s,e,i)}else n.type&12}function GL(n,t){let e=Oi(t,n);e[Te]&16||(e[Te]|=64)}function qL(n,t,e){let i=e.directiveStart,r=e.directiveEnd;os(e)&&TL(t,e,n.data[i+e.componentOffset]),n.firstCreatePass||xf(e,t);let o=e.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Bd(t,n,s,e);if(Ll(l,t),o!==null&&XL(t,s-i,l,a,e,o),ir(a)){let c=Oi(e.index,t);c[Ut]=Bd(t,n,s,e)}}}function YL(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=WS();try{ls(o);for(let a=i;a<r;a++){let l=n.data[a],c=t[a];of(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&QL(l,c)}}finally{ls(-1),of(s)}}function QL(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function p0(n,t){let e=n.directiveRegistry,i=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];bT(t,o.selectors,!1)&&(i??=[],ir(o)?i.unshift(o):i.push(o))}return i}function KL(n,t,e,i,r,o){let s=rr(n,t);ZL(t[ft],s,o,n.value,e,i,r)}function ZL(n,t,e,i,r,o,s){if(o==null)n.removeAttribute(t,r,e);else{let a=s==null?ts(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function XL(n,t,e,i,r,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];xy(i,e,l,c)}}function f0(n,t,e,i,r){let o=Mt+e,s=t[be],a=r(s,t,n,i,e);t[o]=a,Il(n,!0);let l=n.type===2;return l?(xT(t[ft],a,n),(LS()===0||Tl(n))&&Ll(a,t),jS()):Ll(a,t),cf()&&(!l||!zf(n))&&u0(s,t,a,n),n}function h0(n){let t=n;return Bb()?zb():(t=t.parent,Il(t,!1)),t}function JL(n,t){let e=n[ns];if(!e)return;let i;try{i=e.get(zn,null)}catch{i=null}i?.(t)}function g0(n,t,e,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],p=s[l+1],h=t.data[c];xy(h,e[c],p,r),a=!0}if(o)for(let l of o){let c=e[l],p=t.data[l];xy(p,c,i,r),a=!0}return a}function e2(n,t){let e=Oi(t,n),i=e[be];t2(i,e);let r=e[tr];r!==null&&e[ra]===null&&(e[ra]=lT(r,e[ns])),ot(18),v0(i,e,e[Ut]),ot(19,e[Ut])}function t2(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function v0(n,t,e){af(t);try{let i=n.viewQuery;i!==null&&fy(1,i,e);let r=n.template;r!==null&&PT(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[Ar]?.finishViewCreation(n),n.staticContentQueries&&cT(n,t),n.staticViewQueries&&fy(2,n.viewQuery,e);let o=n.components;o!==null&&n2(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[Te]&=-5,lf()}}function n2(n,t){for(let e=0;e<t.length;e++)e2(n,t[e])}function Xd(n,t,e,i){let r=Ie(null);try{let o=t.tView,a=n[Te]&4096?4096:16,l=a0(n,o,e,a,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[t.index];l[is]=c;let p=n[Ar];return p!==null&&(l[Ar]=p.createEmbeddedView(o)),v0(o,l,e),l}finally{Ie(r)}}function jl(n,t){return!t||t.firstChild===null||JM(n)}function zd(n,t,e,i,r=!1){for(;e!==null;){if(e.type===128){e=r?e.projectionNext:e.next;continue}let o=t[e.index];o!==null&&i.push(Ai(o)),nr(o)&&FT(o,i);let s=e.type;if(s&8)zd(n,t,e.child,i);else if(s&32){let a=c0(e,t),l;for(;l=a();)i.push(l)}else if(s&16){let a=AT(t,e);if(Array.isArray(a))i.push(...a);else{let l=es(t[Bn]);zd(l[be],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}function FT(n,t){for(let e=Qt;e<n.length;e++){let i=n[e],r=i[be].firstChild;r!==null&&zd(i[be],i,r,t)}n[rs]!==n[tr]&&t.push(n[rs])}function LT(n){if(n[aa]!==null){for(let t of n[aa])t.impl.addSequence(t);n[aa].length=0}}var jT=[];function i2(n){return n[hi]??r2(n)}function r2(n){let t=jT.pop()??Object.create(s2);return t.lView=n,t}function o2(n){n.lView[hi]!==n&&(n.lView=null,jT.push(n))}var s2=de(M({},Us),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{ss(n.lView)},consumerOnSignalRead(){this.lView[hi]=this}});function a2(n){let t=n[hi]??Object.create(l2);return t.lView=n,t}var l2=de(M({},Us),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=es(n.lView);for(;t&&!VT(t[be]);)t=es(t);t&&Ab(t)},consumerOnSignalRead(){this.lView[hi]=this}});function VT(n){return n.type!==2}function BT(n){if(n[mo]===null)return;let t=!0;for(;t;){let e=!1;for(let i of n[mo])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));t=e&&!!(n[Te]&8192)}}var c2=100;function zT(n,t=0){let i=n[kr].rendererFactory,r=!1;r||i.begin?.();try{d2(n,t)}finally{r||i.end?.()}}function d2(n,t){let e=Hb();try{kl(!0),Sy(n,t);let i=0;for(;Pd(n);){if(i===c2)throw new O(103,!1);i++,Sy(n,1)}}finally{kl(e)}}function u2(n,t,e,i){if(da(t))return;let r=t[Te],o=!1,s=!1;af(t);let a=!0,l=null,c=null;o||(VT(n)?(c=i2(t),l=qo(c)):lp()===null?(a=!1,c=a2(t),l=qo(c)):t[hi]&&(Yo(t[hi]),t[hi]=null));try{kb(t),HS(n.bindingStartIndex),e!==null&&PT(n,t,e,2,i);let p=(r&3)===3;if(!o)if(p){let v=n.preOrderCheckHooks;v!==null&&hf(t,v,null)}else{let v=n.preOrderHooks;v!==null&&gf(t,v,0,null),Zb(t,0)}if(s||m2(t),BT(t),HT(t,0),n.contentQueries!==null&&cT(n,t),!o)if(p){let v=n.contentCheckHooks;v!==null&&hf(t,v)}else{let v=n.contentHooks;v!==null&&gf(t,v,1),Zb(t,1)}f2(n,t);let h=n.components;h!==null&&$T(t,h,0);let _=n.viewQuery;if(_!==null&&fy(2,_,i),!o)if(p){let v=n.viewCheckHooks;v!==null&&hf(t,v)}else{let v=n.viewHooks;v!==null&&gf(t,v,2),Zb(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[Zp]){for(let v of t[Zp])v();t[Zp]=null}o||(LT(t),t[Te]&=-73)}catch(p){throw o||ss(t),p}finally{c!==null&&(Ws(c,l),a&&o2(c)),lf()}}function HT(n,t){for(let e=tT(n);e!==null;e=nT(e))for(let i=Qt;i<e.length;i++){let r=e[i];UT(r,t)}}function m2(n){for(let t=tT(n);t!==null;t=nT(t)){if(!(t[Te]&2))continue;let e=t[ca];for(let i=0;i<e.length;i++){let r=e[i];Ab(r)}}}function p2(n,t,e){ot(18);let i=Oi(t,n);UT(i,e),ot(19,i[Ut])}function UT(n,t){Jp(n)&&Sy(n,t)}function Sy(n,t){let i=n[be],r=n[Te],o=n[hi],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(o?.dirty&&Gs(o)),s||=!1,o&&(o.dirty=!1),n[Te]&=-9217,s)u2(i,n,i.template,n[Ut]);else if(r&8192){let a=Ie(null);try{BT(n),HT(n,1);let l=i.components;l!==null&&$T(n,l,1),LT(n)}finally{Ie(a)}}}function $T(n,t,e){for(let i=0;i<t.length;i++)p2(n,t[i],e)}function f2(n,t){let e=n.hostBindingOpCodes;if(e!==null)try{for(let i=0;i<e.length;i++){let r=e[i];if(r<0)ls(~r);else{let o=r,s=e[++i],a=e[++i];$S(s,o);let l=t[o];ot(24,l),a(2,l),ot(25,l)}}}finally{ls(-1)}}function _0(n,t){let e=Hb()?64:1088;for(n[kr].changeDetectionScheduler?.notify(t);n;){n[Te]|=e;let i=es(n);if(Dl(n)&&!i)return n;n=i}return null}function WT(n,t,e,i){return[n,!0,0,t,null,i,null,e,null,null]}function GT(n,t){let e=Qt+t;if(e<n.length)return n[e]}function Jd(n,t,e,i=!0){let r=t[be];if(h2(r,t,n,e),i){let s=Ey(e,n),a=t[ft],l=a.parentNode(n[rs]);l!==null&&AL(r,n[Vn],a,t,l,s)}let o=t[ra];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function qT(n,t){let e=Hd(n,t);return e!==void 0&&Wf(e[be],e),e}function Hd(n,t){if(n.length<=Qt)return;let e=Qt+t,i=n[e];if(i){let r=i[is];r!==null&&r!==n&&d0(r,i),t>0&&(n[e-1][ki]=i[ki]);let o=Dd(n,Qt+t);kL(i[be],i);let s=o[Ar];s!==null&&s.detachView(o[be]),i[on]=null,i[ki]=null,i[Te]&=-129}return i}function h2(n,t,e,i){let r=Qt+i,o=e.length;i>0&&(e[r-1][ki]=t),i<o-Qt?(t[ki]=e[r],gb(e,Qt+i,t)):(e.push(t),t[ki]=null),t[on]=e;let s=t[is];s!==null&&e!==s&&YT(s,t);let a=t[Ar];a!==null&&a.insertView(n),ef(t),t[Te]|=128}function YT(n,t){let e=n[ca],i=t[on];if(Or(i))n[Te]|=2;else{let r=i[on][Bn];t[Bn]!==r&&(n[Te]|=2)}e===null?n[ca]=[t]:e.push(t)}var cs=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[be];return zd(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[Ut]}set context(t){this._lView[Ut]=t}get destroyed(){return da(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[on];if(nr(t)){let e=t[Ad],i=e?e.indexOf(this):-1;i>-1&&(Hd(t,i),Dd(e,i))}this._attachedToViewContainer=!1}Wf(this._lView[be],this._lView)}onDestroy(t){Ob(this._lView,t)}markForCheck(){_0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Te]&=-129}reattach(){ef(this._lView),this._lView[Te]|=128}detectChanges(){this._lView[Te]|=1024,zT(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new O(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Dl(this._lView),e=this._lView[is];e!==null&&!t&&d0(e,this._lView),DT(this._lView[be],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new O(902,!1);this._appRef=t;let e=Dl(this._lView),i=this._lView[is];i!==null&&!e&&YT(i,this._lView),ef(this._lView)}};var An=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=g2;constructor(e,i,r){this._declarationLView=e,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,i){return this.createEmbeddedViewImpl(e,i)}createEmbeddedViewImpl(e,i,r){let o=Xd(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:r});return new cs(o)}}return n})();function g2(){return Yf(sn(),Ee())}function Yf(n,t){return n.type&4?new An(t,n,Bl(n,t)):null}function Hl(n,t,e,i,r){let o=n.data[t];if(o===null)o=v2(n,t,e,i,r),US()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=i,o.attrs=r;let s=VS();o.injectorIndex=s===null?-1:s.injectorIndex}return Il(o,!0),o}function v2(n,t,e,i,r){let o=Vb(),s=Bb(),a=s?o:o&&o.parent,l=n.data[t]=b2(n,a,e,t,i,r);return _2(n,l,o,s),l}function _2(n,t,e,i){n.firstChild===null&&(n.firstChild=t),e!==null&&(i?e.child==null&&t.parent!==null&&(e.child=t):e.next===null&&(e.next=t,t.prev=e))}function b2(n,t,e,i,r,o){let s=t?t.injectorIndex:-1,a=0;return Fb()&&(a|=128),{type:e,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,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 Oee=new RegExp(`^(\\d+)*(${FF}|${NF})*(.*)`);function y2(n){let t=n[Sb]??[],i=n[on][ft],r=[];for(let o of t)o.data[oT]!==void 0?r.push(o):C2(o,i);n[Sb]=r}function C2(n,t){let e=0,i=n.firstChild;if(i){let r=n.data[rT];for(;e<r;){let o=i.nextSibling;wT(t,i,!1),i=o,e++}}}var w2=()=>null,x2=()=>null;function Sf(n,t){return w2(n,t)}function QT(n,t,e){return x2(n,t,e)}var KT=class{},Qf=class{},My=class{resolveComponentFactory(t){throw new O(917,!1)}},eu=class{static NULL=new My},jt=class{},et=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>E2()}return n})();function E2(){let n=Ee(),t=sn(),e=Oi(t.index,n);return(Or(e)?e:n)[ft]}var ZT=(()=>{class n{static \u0275prov=x({token:n,providedIn:"root",factory:()=>null})}return n})();var _f={},Ty=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,_f,i);return r!==_f||e===_f?r:this.parentInjector.get(t,e,i)}};function Mf(n,t,e){let i=e?n.styles:null,r=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)r=Up(r,a);else if(o==2){let l=a,c=t[++s];i=Up(i,l+": "+c+";")}}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function De(n,t=0){let e=Ee();if(e===null)return te(n,t);let i=sn();return QM(i,e,rn(n),t)}function b0(){let n="invalid";throw new Error(n)}function XT(n,t,e,i,r){let o=i===null?null:{"":-1},s=r(n,e);if(s!==null){let a=s,l=null,c=null;for(let p of s)if(p.resolveHostDirectives!==null){[a,l,c]=p.resolveHostDirectives(s);break}T2(n,t,e,a,o,l,c)}o!==null&&i!==null&&S2(e,i,o)}function S2(n,t,e){let i=n.localNames=[];for(let r=0;r<t.length;r+=2){let o=e[t[r+1]];if(o==null)throw new O(-301,!1);i.push(t[r],o)}}function M2(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function T2(n,t,e,i,r,o,s){let a=i.length,l=!1;for(let _=0;_<a;_++){let v=i[_];!l&&ir(v)&&(l=!0,M2(n,e,_)),dy(xf(e,t),n,v.type)}P2(e,n.data.length,a);for(let _=0;_<a;_++){let v=i[_];v.providersResolver&&v.providersResolver(v)}let c=!1,p=!1,h=ST(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let _=0;_<a;_++){let v=i[_];if(e.mergedAttrs=Fl(e.mergedAttrs,v.hostAttrs),I2(n,e,t,h,v),O2(h,v,r),s!==null&&s.has(v)){let[T,F]=s.get(v);e.directiveToIndex.set(v.type,[h,T+e.directiveStart,F+e.directiveStart])}else(o===null||!o.has(v))&&e.directiveToIndex.set(v.type,h);v.contentQueries!==null&&(e.flags|=4),(v.hostBindings!==null||v.hostAttrs!==null||v.hostVars!==0)&&(e.flags|=64);let y=v.type.prototype;!c&&(y.ngOnChanges||y.ngOnInit||y.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),c=!0),!p&&(y.ngOnChanges||y.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),p=!0),h++}D2(n,e,o)}function D2(n,t,e){for(let i=t.directiveStart;i<t.directiveEnd;i++){let r=n.data[i];if(e===null||!e.has(r))gM(0,t,r,i),gM(1,t,r,i),_M(t,i,!1);else{let o=e.get(r);vM(0,t,o,i),vM(1,t,o,i),_M(t,i,!0)}}}function gM(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(i),JT(t,o)}}function vM(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),JT(t,s)}}function JT(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function _M(n,t,e){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!e&&r===null||e&&o===null||o0(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<i.length;){let l=i[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!e&&r.hasOwnProperty(l)){let c=r[l];for(let p of c)if(p===t){s??=[],s.push(l,i[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let c=o[l];for(let p=0;p<c.length;p+=2)if(c[p]===t){s??=[],s.push(c[p+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function I2(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Jo(r.type,!0)),s=new fa(o,ir(r),De,null);n.blueprint[i]=s,e[i]=s,k2(n,t,i,ST(n,e,r.hostVars,ri),r)}function k2(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;A2(s)!=a&&s.push(a),s.push(e,i,o)}}function A2(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function O2(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;ir(t)&&(e[""]=n)}}function P2(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function y0(n,t,e,i,r,o,s,a){let l=t[be],c=l.consts,p=Pi(c,s),h=Hl(l,n,e,i,p);return o&&XT(l,t,h,Pi(c,a),r),h.mergedAttrs=Fl(h.mergedAttrs,h.attrs),h.attrs!==null&&Mf(h,h.attrs,!1),h.mergedAttrs!==null&&Mf(h,h.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,h),h}function C0(n,t){BM(n,t),Mb(t)&&n.queries.elementEnd(t)}function R2(n,t,e,i,r,o){let s=t.consts,a=Pi(s,r),l=Hl(t,n,e,i,a);if(l.mergedAttrs=Fl(l.mergedAttrs,l.attrs),o!=null){let c=Pi(s,o);l.localNames=[];for(let p=0;p<c.length;p+=2)l.localNames.push(c[p],-1)}return l.attrs!==null&&Mf(l,l.attrs,!1),l.mergedAttrs!==null&&Mf(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function w0(n){return tD(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function eD(n,t){if(Array.isArray(n))for(let e=0;e<n.length;e++)t(n[e]);else{let e=n[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value)}}function tD(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function nD(n,t,e){return n[t]=e}function Ri(n,t,e){if(e===ri)return!1;let i=n[t];return Object.is(i,e)?!1:(n[t]=e,!0)}function iD(n,t,e,i){let r=Ri(n,t,e);return Ri(n,t+1,i)||r}function ey(n,t,e){return function i(r){let o=os(n)?Oi(n.index,t):t;_0(o,5);let s=t[Ut],a=bM(t,s,e,r),l=i.__ngNextListenerFn__;for(;l;)a=bM(t,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function bM(n,t,e,i){let r=Ie(null);try{return ot(6,t,e),e(i)!==!1}catch(o){return JL(n,o),!1}finally{ot(7,t,e),Ie(r)}}function N2(n,t,e,i,r,o,s,a){let l=Tl(n),c=!1,p=null;if(!i&&l&&(p=L2(t,e,o,n.index)),p!==null){let h=p.__ngLastListenerFn__||p;h.__ngNextListenerFn__=s,p.__ngLastListenerFn__=s,c=!0}else{let h=rr(n,e),_=i?i(h):h;jF(e,_,o,a);let v=r.listen(_,o,a);if(!F2(o)){let y=i?T=>i(Ai(T[n.index])):n.index;rD(y,t,e,o,a,v,!1)}}return c}function F2(n){return n.startsWith("animation")||n.startsWith("transition")}function L2(n,t,e,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===i){let a=t[Sl],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function rD(n,t,e,i,r,o,s){let a=t.firstCreatePass?Rb(t):null,l=Pb(e),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function yM(n,t,e,i,r,o){let s=t[e],a=t[be],c=a.data[e].outputs[i],h=s[c].subscribe(o);rD(n.index,a,t,r,o,h,!0)}var Dy=Symbol("BINDING");var Tf=class extends eu{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Ir(t);return new ds(e,this.ngModule)}};function j2(n){return Object.keys(n).map(t=>{let[e,i,r]=n[t],o={propName:e,templateName:t,isSignal:(i&$f.SignalBased)!==0};return r&&(o.transform=r),o})}function V2(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function B2(n,t,e){let i=t instanceof pt?t:t?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Ty(e,i):e}function z2(n){let t=n.get(jt,null);if(t===null)throw new O(407,!1);let e=n.get(ZT,null),i=n.get(Di,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function H2(n,t){let e=oD(n);return yT(t,e,e==="svg"?Tb:e==="math"?AS:null)}function oD(n){return(n.selectors[0][0]||"div").toLowerCase()}var ds=class extends Qf{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=j2(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=V2(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=_L(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,i,r,o,s){ot(22);let a=Ie(null);try{let l=this.componentDef,c=U2(i,l,s,o),p=B2(l,r||this.ngModule,t),h=z2(p),_=h.rendererFactory.createRenderer(null,l),v=i?HL(_,i,l.encapsulation,p):H2(l,_),y=s?.some(CM)||o?.some(L=>typeof L!="function"&&L.bindings.some(CM)),T=a0(null,c,null,512|ET(l),null,null,h,_,p,null,lT(v,p,!0));T[Mt]=v,af(T);let F=null;try{let L=y0(Mt,T,2,"#host",()=>c.directiveRegistry,!0,0);xT(_,v,L),Ll(v,T),qf(c,T,L),Xy(c,L,T),C0(c,L),e!==void 0&&W2(L,this.ngContentSelectors,e),F=Oi(L.index,T),T[Ut]=F[Ut],v0(c,T,null)}catch(L){throw F!==null&&my(F),my(T),L}finally{ot(23),lf()}return new Df(this.componentType,T,!!y)}finally{Ie(a)}}};function U2(n,t,e,i){let r=n?["ng-version","20.3.4"]:bL(t.selectors[0]),o=null,s=null,a=0;if(e)for(let p of e)a+=p[Dy].requiredVars,p.create&&(p.targetIdx=0,(o??=[]).push(p)),p.update&&(p.targetIdx=0,(s??=[]).push(p));if(i)for(let p=0;p<i.length;p++){let h=i[p];if(typeof h!="function")for(let _ of h.bindings){a+=_[Dy].requiredVars;let v=p+1;_.create&&(_.targetIdx=v,(o??=[]).push(_)),_.update&&(_.targetIdx=v,(s??=[]).push(_))}}let l=[t];if(i)for(let p of i){let h=typeof p=="function"?p:p.type,_=Qp(h);l.push(_)}return s0(0,null,$2(o,s),1,a,l,null,null,null,[r],null)}function $2(n,t){return!n&&!t?null:e=>{if(e&1&&n)for(let i of n)i.create();if(e&2&&t)for(let i of t)i.update()}}function CM(n){let t=n[Dy].kind;return t==="input"||t==="twoWay"}var Df=class extends KT{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=Od(e[be],Mt),this.location=Bl(this._tNode,e),this.instance=Oi(this._tNode.index,e)[Ut],this.hostView=this.changeDetectorRef=new cs(e,void 0),this.componentType=t}setInput(t,e){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let r=this._rootLView,o=g0(i,r[be],r,t,e);this.previousInputValues.set(t,e);let s=Oi(i.index,r);_0(s,1)}get injector(){return new pa(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function W2(n,t,e){let i=n.projection=[];for(let r=0;r<t.length;r++){let o=e[r];i.push(o!=null&&o.length?Array.from(o):null)}}var Hn=(()=>{class n{static __NG_ELEMENT_ID__=G2}return n})();function G2(){let n=sn();return aD(n,Ee())}var q2=Hn,sD=class extends q2{_lContainer;_hostTNode;_hostLView;constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return Bl(this._hostTNode,this._hostLView)}get injector(){return new pa(this._hostTNode,this._hostLView)}get parentInjector(){let t=Yy(this._hostTNode,this._hostLView);if(UM(t)){let e=Cf(t,this._hostLView),i=yf(t),r=e[be].data[i+8];return new pa(r,e)}else return new pa(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=wM(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Qt}createEmbeddedView(t,e,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Sf(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,jl(this._hostTNode,s)),a}createComponent(t,e,i,r,o,s,a){let l=t&&!dF(t),c;if(l)c=e;else{let F=e||{};c=F.index,i=F.injector,r=F.projectableNodes,o=F.environmentInjector||F.ngModuleRef,s=F.directives,a=F.bindings}let p=l?t:new ds(Ir(t)),h=i||this.parentInjector;if(!o&&p.ngModule==null){let L=(l?h:this.parentInjector).get(pt,null);L&&(o=L)}let _=Ir(p.componentType??{}),v=Sf(this._lContainer,_?.id??null),y=v?.firstChild??null,T=p.create(h,r,y,o,s,a);return this.insertImpl(T.hostView,c,jl(this._hostTNode,v)),T}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,i){let r=t._lView;if(PS(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[on],c=new sD(l,l[Vn],l[on]);c.detach(c.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return Jd(s,r,o,i),t.attachToViewContainerRef(),gb(ty(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=wM(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=Hd(this._lContainer,e);i&&(Dd(ty(this._lContainer),e),Wf(i[be],i))}detach(t){let e=this._adjustIndex(t,-1),i=Hd(this._lContainer,e);return i&&Dd(ty(this._lContainer),e)!=null?new cs(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function wM(n){return n[Ad]}function ty(n){return n[Ad]||(n[Ad]=[])}function aD(n,t){let e,i=t[n.index];return nr(i)?e=i:(e=WT(i,t,null,n),t[n.index]=e,l0(t,e)),Q2(e,t,n,i),new sD(e,n,t)}function Y2(n,t){let e=n[ft],i=e.createComment(""),r=rr(t,n),o=e.parentNode(r);return Ef(e,o,i,e.nextSibling(r),!1),i}var Q2=X2,K2=()=>!1;function Z2(n,t,e){return K2(n,t,e)}function X2(n,t,e,i){if(n[rs])return;let r;e.type&8?r=Ai(i):r=Y2(t,e),n[rs]=r}var Iy=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},ky=class n{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(e!==null){let i=t.contentQueries!==null?t.contentQueries[0]:e.length,r=[];for(let o=0;o<i;o++){let s=e.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}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++)E0(t,e).matches!==null&&this.queries[e].setDirty()}},If=class{flags;read;predicate;constructor(t,e,i=null){this.flags=e,this.read=i,typeof t=="string"?this.predicate=ij(t):this.predicate=t}},Ay=class n{queries;constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].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 i=0;i<this.length;i++){let r=e!==null?e.length:0,o=this.getByIndex(i).embeddedTView(t,r);o&&(o.indexInDeclarationView=i,e!==null?e.push(o):e=[o])}return e!==null?new n(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},Oy=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,i=t.parent;for(;i!==null&&i.type&8&&i.index!==e;)i=i.parent;return e===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(t,e,J2(e,o)),this.matchTNodeWithReadOption(t,e,vf(e,t,o,!1,!1))}else i===An?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,vf(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===Z||r===Hn||r===An&&e.type&4)this.addMatch(e.index,-2);else{let o=vf(e,t,r,!1,!1);o!==null&&this.addMatch(e.index,o)}else this.addMatch(e.index,i)}}addMatch(t,e){this.matches===null?this.matches=[t,e]:this.matches.push(t,e)}};function J2(n,t){let e=n.localNames;if(e!==null){for(let i=0;i<e.length;i+=2)if(e[i]===t)return e[i+1]}return null}function ej(n,t){return n.type&11?Bl(n,t):n.type&4?Yf(n,t):null}function tj(n,t,e,i){return e===-1?ej(t,n):e===-2?nj(n,t,i):Bd(n,n[be],e,t)}function nj(n,t,e){if(e===Z)return Bl(t,n);if(e===An)return Yf(t,n);if(e===Hn)return aD(t,n)}function lD(n,t,e,i){let r=t[Ar].queries[i];if(r.matches===null){let o=n.data,s=e.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let p=o[c];a.push(tj(t,p,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function Py(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(o!==null){let s=lD(n,t,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],p=t[-l];for(let h=Qt;h<p.length;h++){let _=p[h];_[is]===_[on]&&Py(_[be],_,c,i)}if(p[ca]!==null){let h=p[ca];for(let _=0;_<h.length;_++){let v=h[_];Py(v[be],v,c,i)}}}}}return i}function x0(n,t){return n[Ar].queries[t].queryList}function cD(n,t,e){let i=new po((e&4)===4);return FS(n,t,i,i.destroy),(t[Ar]??=new ky).queries.push(new Iy(i))-1}function dD(n,t,e){let i=kt();return i.firstCreatePass&&(mD(i,new If(n,t,e),-1),(t&2)===2&&(i.staticViewQueries=!0)),cD(i,Ee(),t)}function uD(n,t,e,i){let r=kt();if(r.firstCreatePass){let o=sn();mD(r,new If(t,e,i),o.index),rj(r,n),(e&2)===2&&(r.staticContentQueries=!0)}return cD(r,Ee(),e)}function ij(n){return n.split(",").map(t=>t.trim())}function mD(n,t,e){n.queries===null&&(n.queries=new Ay),n.queries.track(new Oy(t,e))}function rj(n,t){let e=n.contentQueries||(n.contentQueries=[]),i=e.length?e[e.length-1]:-1;t!==i&&e.push(n.queries.length-1,t)}function E0(n,t){return n.queries.getByIndex(t)}function pD(n,t){let e=n[be],i=E0(e,t);return i.crossesNgTemplate?Py(e,n,t,[]):lD(e,n,i,t)}function fD(n,t,e){let i,r=md(()=>{i._dirtyCounter();let o=oj(i,n);if(t&&o===void 0)throw new O(-951,!1);return o});return i=r[tn],i._dirtyCounter=Fe(0),i._flatValue=void 0,r}function S0(n){return fD(!0,!1,n)}function M0(n){return fD(!0,!0,n)}function hD(n,t){let e=n[tn];e._lView=Ee(),e._queryIndex=t,e._queryList=x0(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function oj(n,t){let e=n._lView,i=n._queryIndex;if(e===void 0||i===void 0||e[Te]&4)return t?void 0:kn;let r=x0(e,i),o=pD(e,i);return r.reset(o,XM),t?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var xM=new Set;function gi(n){xM.has(n)||(xM.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var jr=class{},Kf=class{};var kf=class extends jr{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new Tf(this);constructor(t,e,i,r=!0){super(),this.ngModuleType=t,this._parent=e;let o=bb(t);this._bootstrapComponents=vT(o.bootstrap),this._r3Injector=Wb(t,e,[{provide:jr,useValue:this},{provide:eu,useValue:this.componentFactoryResolver},...i],co(t),new Set(["environment"])),r&&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)}},Af=class extends Kf{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new kf(this.moduleType,t,[])}};var Ud=class extends jr{injector;componentFactoryResolver=new Tf(this);instance=null;constructor(t){super();let e=new na([...t.providers,{provide:jr,useValue:this},{provide:eu,useValue:this.componentFactoryResolver}],t.parent||El(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Ul(n,t,e=null){return new Ud({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var sj=(()=>{class n{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let i=yb(!1,e.type),r=i.length>0?Ul([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=x({token:n,providedIn:"environment",factory:()=>new n(te(pt))})}return n})();function R(n){return qd(()=>{let t=gD(n),e=de(M({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===Qy.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?r=>r.get(sj).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||fo.Emulated,styles:n.styles||kn,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&gi("NgStandalone"),vD(e);let i=n.dependencies;return e.directiveDefs=EM(i,aj),e.pipeDefs=EM(i,ES),e.id=dj(e),e})}function aj(n){return Ir(n)||Qp(n)}function ee(n){return qd(()=>({type:n.type,bootstrap:n.bootstrap||kn,declarations:n.declarations||kn,imports:n.imports||kn,exports:n.exports||kn,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function lj(n,t){if(n==null)return Ji;let e={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=$f.None,l=null),e[o]=[i,a,l],t[o]=s}return e}function cj(n){if(n==null)return Ji;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function X(n){return qd(()=>{let t=gD(n);return vD(t),t})}function $l(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 gD(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||Ji,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||kn,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:lj(n.inputs,t),outputs:cj(n.outputs),debugInfo:null}}function vD(n){n.features?.forEach(t=>t(n))}function EM(n,t){return n?()=>{let e=typeof n=="function"?n():n,i=[];for(let r of e){let o=t(r);o!==null&&i.push(o)}return i}:null}function dj(n){let t=0,e=typeof n.consts=="function"?"":n.consts,i=[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 i.join("|"))t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function uj(n){return Object.getPrototypeOf(n.prototype).constructor}function Le(n){let t=uj(n.type),e=!0,i=[n];for(;t;){let r;if(ir(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new O(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=ny(n.inputs),s.declaredInputs=ny(n.declaredInputs),s.outputs=ny(n.outputs);let a=r.hostBindings;a&&gj(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&fj(n,l),c&&hj(n,c),mj(n,r),hS(n.outputs,r.outputs),ir(r)&&r.data.animation){let p=n.data;p.animation=(p.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===Le&&(e=!1)}}t=Object.getPrototypeOf(t)}pj(i)}function mj(n,t){for(let e in t.inputs){if(!t.inputs.hasOwnProperty(e)||n.inputs.hasOwnProperty(e))continue;let i=t.inputs[e];i!==void 0&&(n.inputs[e]=i,n.declaredInputs[e]=t.declaredInputs[e])}}function pj(n){let t=0,e=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Fl(r.hostAttrs,e=Fl(e,r.hostAttrs))}}function ny(n){return n===Ji?{}:n===kn?[]:n}function fj(n,t){let e=n.viewQuery;e?n.viewQuery=(i,r)=>{t(i,r),e(i,r)}:n.viewQuery=t}function hj(n,t){let e=n.contentQueries;e?n.contentQueries=(i,r,o)=>{t(i,r,o),e(i,r,o)}:n.contentQueries=t}function gj(n,t){let e=n.hostBindings;e?n.hostBindings=(i,r)=>{t(i,r),e(i,r)}:n.hostBindings=t}function T0(n){let t=e=>{let i=Array.isArray(n);e.hostDirectives===null?(e.resolveHostDirectives=vj,e.hostDirectives=i?n.map(Ry):[n]):i?e.hostDirectives.unshift(...n.map(Ry)):e.hostDirectives.unshift(n)};return t.ngInherit=!0,t}function vj(n){let t=[],e=!1,i=null,r=null;for(let o=0;o<n.length;o++){let s=n[o];if(s.hostDirectives!==null){let a=t.length;i??=new Map,r??=new Map,_D(s,t,i),r.set(s,[a,t.length-1])}o===0&&ir(s)&&(e=!0,t.push(s))}for(let o=e?1:0;o<n.length;o++)t.push(n[o]);return[t,i,r]}function _D(n,t,e){if(n.hostDirectives!==null)for(let i of n.hostDirectives)if(typeof i=="function"){let r=i();for(let o of r)SM(Ry(o),t,e)}else SM(i,t,e)}function SM(n,t,e){let i=Qp(n.directive);_j(i.declaredInputs,n.inputs),_D(i,t,e),e.set(i,n),t.push(i)}function Ry(n){return typeof n=="function"?{directive:rn(n),inputs:Ji,outputs:Ji}:{directive:rn(n.directive),inputs:MM(n.inputs),outputs:MM(n.outputs)}}function MM(n){if(n===void 0||n.length===0)return Ji;let t={};for(let e=0;e<n.length;e+=2)t[n[e]]=n[e+1];return t}function _j(n,t){for(let e in t)if(t.hasOwnProperty(e)){let i=t[e],r=n[e];n[i]=r}}function bD(n,t,e,i,r,o,s,a){if(e.firstCreatePass){n.mergedAttrs=Fl(n.mergedAttrs,n.attrs);let p=n.tView=s0(2,n,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),p.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),Il(n,!1);let l=yj(e,t,n,i);cf()&&u0(e,t,l,n),Ll(l,t);let c=WT(l,t,l,n);t[i+Mt]=c,l0(t,c),Z2(c,n,t)}function bj(n,t,e,i,r,o,s,a,l,c,p){let h=e+Mt,_;return t.firstCreatePass?(_=Hl(t,h,4,s||null,a||null),tf()&&XT(t,n,_,Pi(t.consts,c),p0),BM(t,_)):_=t.data[h],bD(_,n,t,e,i,r,o,l),Tl(_)&&qf(t,n,_),c!=null&&Zd(n,_,p),_}function $d(n,t,e,i,r,o,s,a,l,c,p){let h=e+Mt,_;if(t.firstCreatePass){if(_=Hl(t,h,4,s||null,a||null),c!=null){let v=Pi(t.consts,c);_.localNames=[];for(let y=0;y<v.length;y+=2)_.localNames.push(v[y],-1)}}else _=t.data[h];return bD(_,n,t,e,i,r,o,l),c!=null&&Zd(n,_,p),_}function wt(n,t,e,i,r,o,s,a){let l=Ee(),c=kt(),p=Pi(c.consts,o);return bj(l,c,n,t,e,i,r,p,void 0,s,a),wt}var yj=Cj;function Cj(n,t,e,i){return Fd(!0),t[ft].createComment("")}var Zf=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(Zf||{}),fs=new A(""),yD=!1,Ny=class extends P{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,IS()&&(this.destroyRef=d(an,{optional:!0})??void 0,this.pendingTasks=d(Nr,{optional:!0})??void 0)}emit(t){let e=Ie(null);try{super.next(t)}finally{Ie(e)}}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&typeof t=="object"){let l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return t instanceof ze&&t.add(a),a}wrapInTimeout(t){return e=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{t(e)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},U=Ny;function CD(n){let t,e;function i(){n=ma;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{n(),i()})),()=>i()}function TM(n){return queueMicrotask(()=>n()),()=>{n=ma}}var D0="isAngularZone",Of=D0+"_ID",wj=0,Y=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:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=yD}=t;if(typeof Zone>"u")throw new O(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=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,Sj(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(D0)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new O(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new O(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,xj,ma,ma);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},xj={};function I0(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 Ej(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){CD(()=>{n.callbackScheduled=!1,Fy(n),n.isCheckStableRunning=!0,I0(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),Fy(n)}function Sj(n){let t=()=>{Ej(n)},e=wj++;n._inner=n._inner.fork({name:"angular",properties:{[D0]:!0,[Of]:e,[Of+e]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(Mj(l))return i.invokeTask(o,s,a,l);try{return DM(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),IM(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return DM(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!Tj(l)&&t(),IM(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Fy(n),I0(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function Fy(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function DM(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function IM(n){n._nesting--,I0(n)}var Pf=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}};function Mj(n){return wD(n,"__ignore_ng_zone__")}function Tj(n){return wD(n,"__scheduler_tick__")}function wD(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var Xf=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=x({token:n,providedIn:"root",factory:()=>new n})}return n})(),k0=[0,1,2,3],A0=(()=>{class n{ngZone=d(Y);scheduler=d(Di);errorHandler=d(yn,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){d(fs,{optional:!0})}execute(){let e=this.sequences.size>0;e&&ot(16),this.executing=!0;for(let i of k0)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[i]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[i];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&ot(17)}register(e){let{view:i}=e;i!==void 0?((i[aa]??=[]).push(e),ss(i),i[Te]|=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,i){return i?i.run(Zf.AFTER_NEXT_RENDER,e):e()}static \u0275prov=x({token:n,providedIn:"root",factory:()=>new n})}return n})(),Wd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,i,r,o,s=null){this.impl=t,this.hooks=e,this.view=i,this.once=r,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?.[aa];t&&(this.view[aa]=t.filter(e=>e!==this))}};function ln(n,t){let e=t?.injector??d(me);return gi("NgAfterNextRender"),Ij(n,e,t,!0)}function Dj(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function Ij(n,t,e,i){let r=t.get(Xf);r.impl??=t.get(A0);let o=t.get(fs,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(an):null,a=t.get(ua,null,{optional:!0}),l=new Wd(r.impl,Dj(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var Jf=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"platform"})}return n})();var O0=new A("");function _o(n){return!!n&&typeof n.then=="function"}function eh(n){return!!n&&typeof n.subscribe=="function"}var Wl=new A("");function th(n){return er([{provide:Wl,multi:!0,useValue:n}])}var P0=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=d(Wl,{optional:!0})??[];injector=d(me);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=pn(this.injector,r);if(_o(o))e.push(o);else if(eh(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),e.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),tu=new A("");function xD(){O_(()=>{let n="";throw new O(600,n)})}function ED(n){return n.isBoundToModule}var kj=10;var Un=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=d(zn);afterRenderManager=d(Xf);zonelessEnabled=d(Ol);rootEffectScheduler=d(Ld);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new P;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=d(Nr);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(z(e=>!e))}constructor(){d(fs,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=d(pt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,r=me.NULL){return this._injector.get(Y).run(()=>{ot(10);let s=e instanceof Qf;if(!this._injector.get(P0).done){let y="";throw new O(405,y)}let l;s?l=e:l=this._injector.get(eu).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let c=ED(l)?void 0:this._injector.get(jr),p=i||l.selector,h=l.create(r,[],p,c),_=h.location.nativeElement,v=h.injector.get(O0,null);return v?.registerApplication(_),h.onDestroy(()=>{this.detachView(h.hostView),Vd(this.components,h),v?.unregisterApplication(_)}),this._loadComponent(h),ot(11,h),h})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){ot(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Zf.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new O(101,!1);let e=Ie(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ie(e),this.afterTick.next(),ot(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(jt,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<kj;)ot(14),this.synchronizeOnce(),ot(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let i=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!i&&!Pd(r))continue;let o=i&&!this.zonelessEnabled?0:1;zT(r,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})=>Pd(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;Vd(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(e),this._injector.get(tu,[]).forEach(r=>r(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),()=>Vd(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new O(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Vd(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function ne(n,t,e,i){let r=Ee(),o=as();if(Ri(r,o,t)){let s=kt(),a=Nd();KL(a,r,n,t,e,i)}return ne}var Vee=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var Ly=class{destroy(t){}updateValue(t,e){}swap(t,e){let i=Math.min(t,e),r=Math.max(t,e),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(t,e){this.attach(e,this.detach(t,!0))}};function iy(n,t,e,i,r){return n===e&&Object.is(t,i)?1:Object.is(r(n,t),r(e,i))?-1:0}function Aj(n,t,e){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let c=n.at(o),p=t[o],h=iy(o,c,o,p,e);if(h!==0){h<0&&n.updateValue(o,p),o++;continue}let _=n.at(s),v=t[l],y=iy(s,_,l,v,e);if(y!==0){y<0&&n.updateValue(s,v),s--,l--;continue}let T=e(o,c),F=e(s,_),L=e(o,p);if(Object.is(L,F)){let ve=e(l,v);Object.is(ve,T)?(n.swap(o,s),n.updateValue(s,v),l--,s--):n.move(s,o),n.updateValue(o,p),o++;continue}if(i??=new Rf,r??=AM(n,o,s,e),jy(n,i,o,L))n.updateValue(o,p),o++,s++;else if(r.has(L))i.set(T,n.detach(o)),s--;else{let ve=n.create(o,t[o]);n.attach(o,ve),o++,s++}}for(;o<=l;)kM(n,i,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let p=n.at(o),h=c.value,_=iy(o,p,o,h,e);if(_!==0)_<0&&n.updateValue(o,h),o++,c=l.next();else{i??=new Rf,r??=AM(n,o,s,e);let v=e(o,h);if(jy(n,i,o,v))n.updateValue(o,h),o++,s++,c=l.next();else if(!r.has(v))n.attach(o,n.create(o,h)),o++,s++,c=l.next();else{let y=e(o,p);i.set(y,n.detach(o)),s--}}}for(;!c.done;)kM(n,i,e,n.length,c.value),c=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function jy(n,t,e,i){return t!==void 0&&t.has(i)?(n.attach(e,t.get(i)),t.delete(i),!0):!1}function kM(n,t,e,i,r){if(jy(n,t,i,e(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function AM(n,t,e,i){let r=new Set;for(let o=t;o<=e;o++)r.add(i(o,n.at(o)));return r}var Rf=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 i=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,i]of this.kvMap)if(t(i,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),t(i,e)}}};function I(n,t,e,i,r,o,s,a){gi("NgControlFlow");let l=Ee(),c=kt(),p=Pi(c.consts,o);return $d(l,c,n,t,e,i,r,p,256,s,a),R0}function R0(n,t,e,i,r,o,s,a){gi("NgControlFlow");let l=Ee(),c=kt(),p=Pi(c.consts,o);return $d(l,c,n,t,e,i,r,p,512,s,a),R0}function k(n,t){gi("NgControlFlow");let e=Ee(),i=as(),r=e[i]!==ri?e[i]:-1,o=r!==-1?Nf(e,Mt+r):void 0,s=0;if(Ri(e,i,n)){let a=Ie(null);try{if(o!==void 0&&qT(o,s),n!==-1){let l=Mt+n,c=Nf(e,l),p=Hy(e[be],l),h=QT(c,p,e),_=Xd(e,p,t,{dehydratedView:h});Jd(c,_,s,jl(p,h))}}finally{Ie(a)}}else if(o!==void 0){let a=GT(o,s);a!==void 0&&(a[Ut]=t)}}var Vy=class{lContainer;$implicit;$index;constructor(t,e,i){this.lContainer=t,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-Qt}};function hs(n){return n}function N0(n,t){return t}var By=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,i){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=i}};function st(n,t,e,i,r,o,s,a,l,c,p,h,_){gi("NgControlFlow");let v=Ee(),y=kt(),T=l!==void 0,F=Ee(),L=a?s.bind(F[Bn][Ut]):s,ve=new By(T,L);F[Mt+n]=ve,$d(v,y,n+1,t,e,i,r,Pi(y.consts,o),256),T&&$d(v,y,n+2,l,c,p,h,Pi(y.consts,_),512)}var zy=class extends Ly{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,i){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=i}get length(){return this.lContainer.length-Qt}at(t){return this.getLView(t)[Ut].$implicit}attach(t,e){let i=e[ra];this.needsIndexUpdate||=t!==this.length,Jd(this.lContainer,e,t,jl(this.templateTNode,i))}detach(t,e){return this.needsIndexUpdate||=t!==this.length-1,e&&Oj(this.lContainer,t),Pj(this.lContainer,t)}create(t,e){let i=Sf(this.lContainer,this.templateTNode.tView.ssrId),r=Xd(this.hostLView,this.templateTNode,new Vy(this.lContainer,e,t),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(t){Wf(t[be],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[Ut].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[Ut].$index=t}getLView(t){return Rj(this.lContainer,t)}};function at(n){let t=Ie(null),e=Pr();try{let i=Ee(),r=i[be],o=i[e],s=e+1,a=Nf(i,s);if(o.liveCollection===void 0){let c=Hy(r,s);o.liveCollection=new zy(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(Aj(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let c=as(),p=l.length===0;if(Ri(i,c,p)){let h=e+2,_=Nf(i,h);if(p){let v=Hy(r,h),y=QT(_,v,i),T=Xd(i,v,void 0,{dehydratedView:y});Jd(_,T,0,jl(v,y))}else r.firstUpdatePass&&y2(_),qT(_,0)}}}finally{Ie(t)}}function Nf(n,t){return n[t]}function Oj(n,t){if(n.length<=Qt)return;let e=Qt+t,i=n[e];i&&i[la]&&(i[la].skipLeaveAnimations=!0)}function Pj(n,t){return Hd(n,t)}function Rj(n,t){return GT(n,t)}function Hy(n,t){return Od(n,t)}function D(n,t,e){let i=Ee(),r=as();if(Ri(i,r,t)){let o=kt(),s=Nd();RT(s,i,n,t,i[ft],e)}return D}function Uy(n,t,e,i,r){g0(t,n,e,r?"class":"style",i)}function u(n,t,e,i){let r=Ee(),o=r[be],s=n+Mt,a=o.firstCreatePass?y0(s,r,2,t,p0,tf(),e,i):o.data[s];if(f0(a,r,n,t,SD),Tl(a)){let l=r[be];qf(l,r,a),Xy(l,a,r)}return i!=null&&Zd(r,a),u}function m(){let n=kt(),t=sn(),e=h0(t);return n.firstCreatePass&&C0(n,e),Lb(e)&&jb(),Nb(),e.classesWithoutHost!=null&&gF(e)&&Uy(n,e,Ee(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&vF(e)&&Uy(n,e,Ee(),e.stylesWithoutHost,!1),m}function H(n,t,e,i){return u(n,t,e,i),m(),H}function fn(n,t,e,i){let r=Ee(),o=r[be],s=n+Mt,a=o.firstCreatePass?R2(s,o,2,t,e,i):o.data[s];return f0(a,r,n,t,SD),i!=null&&Zd(r,a),fn}function hn(){let n=sn(),t=h0(n);return Lb(t)&&jb(),Nb(),hn}function wn(n,t,e,i){return fn(n,t,e,i),hn(),wn}var SD=(n,t,e,i,r)=>(Fd(!0),yT(t[ft],i,ZS()));function F0(n,t,e){let i=Ee(),r=i[be],o=n+Mt,s=r.firstCreatePass?y0(o,i,8,"ng-container",p0,tf(),t,e):r.data[o];if(f0(s,i,n,"ng-container",Nj),Tl(s)){let a=i[be];qf(a,i,s),Xy(a,s,i)}return e!=null&&Zd(i,s),F0}function L0(){let n=kt(),t=sn(),e=h0(t);return n.firstCreatePass&&C0(n,e),L0}function Gl(n,t,e){return F0(n,t,e),L0(),Gl}var Nj=(n,t,e,i,r)=>(Fd(!0),wL(t[ft],""));function V(){return Ee()}function $n(n,t,e){let i=Ee(),r=as();if(Ri(i,r,t)){let o=kt(),s=Nd();NT(s,i,n,t,i[ft],e)}return $n}var pf=void 0;function Fj(n){let t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&e===0?1:5}var Lj=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],pf,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],pf,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",pf,"{1} 'at' {0}",pf],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Fj],ry={};function vi(n){let t=jj(n),e=OM(t);if(e)return e;let i=t.split("-")[0];if(e=OM(i),e)return e;if(i==="en")return Lj;throw new O(701,!1)}function OM(n){return n in ry||(ry[n]=Ii.ng&&Ii.ng.common&&Ii.ng.common.locales&&Ii.ng.common.locales[n]),ry[n]}var $t=(function(n){return n[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",n})($t||{});function jj(n){return n.toLowerCase().replace(/_/g,"-")}var nu="en-US";var Vj=nu;function MD(n){typeof n=="string"&&(Vj=n.toLowerCase().replace(/_/g,"-"))}function w(n,t,e){let i=Ee(),r=kt(),o=sn();return TD(r,i,i[ft],o,n,t,e),w}function TD(n,t,e,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=ey(i,t,o),N2(i,n,t,s,e,r,o,l)&&(a=!1)),a){let c=i.outputs?.[r],p=i.hostDirectiveOutputs?.[r];if(p&&p.length)for(let h=0;h<p.length;h+=2){let _=p[h],v=p[h+1];l??=ey(i,t,o),yM(i,t,_,v,r,l)}if(c&&c.length)for(let h of c)l??=ey(i,t,o),yM(i,t,h,r,r,l)}}function b(n=1){return KS(n)}function Bj(n,t){let e=null,i=pL(n);for(let r=0;r<t.length;r++){let o=t[r];if(o==="*"){e=r;continue}if(i===null?bT(n,o,!0):gL(i,o))return r}return e}function Ge(n){let t=Ee()[Bn][Vn];if(!t.projection){let e=n?n.length:1,i=t.projection=wS(e,null),r=i.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?Bj(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function we(n,t=0,e,i,r,o){let s=Ee(),a=kt(),l=i?n+1:null;l!==null&&$d(s,a,l,i,r,o,null,e);let c=Hl(a,Mt+n,16,null,e||null);c.projection===null&&(c.projection=t),zb();let h=!s[ra]||Fb();s[Bn][Vn].projection[c.projection]===null&&l!==null?zj(s,a,l):h&&!zf(c)&&VL(a,s,c)}function zj(n,t,e){let i=Mt+e,r=t.data[i],o=n[i],s=Sf(o,r.tView.ssrId),a=Xd(n,r,void 0,{dehydratedView:s});Jd(o,a,0,jl(r,s))}function cn(n,t,e,i){uD(n,t,e,i)}function xe(n,t,e){dD(n,t,e)}function re(n){let t=Ee(),e=kt(),i=sf();Rd(i+1);let r=E0(e,i);if(n.dirty&&OS(t)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=pD(t,i);n.reset(o,XM),n.notifyOnChanges()}return!0}return!1}function oe(){return x0(Ee(),sf())}function j0(n,t,e,i,r){hD(t,uD(n,e,i,r))}function ql(n,t,e,i){hD(n,dD(t,e,i))}function nh(n=1){Rd(sf()+n)}function oi(n){let t=BS();return Xp(t,Mt+n)}function ff(n,t){return n<<17|t<<2}function ha(n){return n>>17&32767}function Hj(n){return(n&2)==2}function Uj(n,t){return n&131071|t<<17}function $y(n){return n|2}function Vl(n){return(n&131068)>>2}function oy(n,t){return n&-131069|t<<2}function $j(n){return(n&1)===1}function Wy(n){return n|1}function Wj(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=ha(s),l=Vl(s);n[i]=e;let c=!1,p;if(Array.isArray(e)){let h=e;p=h[1],(p===null||xl(h,p)>0)&&(c=!0)}else p=e;if(r)if(l!==0){let _=ha(n[a+1]);n[i+1]=ff(_,a),_!==0&&(n[_+1]=oy(n[_+1],i)),n[a+1]=Uj(n[a+1],i)}else n[i+1]=ff(a,0),a!==0&&(n[a+1]=oy(n[a+1],i)),a=i;else n[i+1]=ff(l,0),a===0?a=i:n[l+1]=oy(n[l+1],i),l=i;c&&(n[i+1]=$y(n[i+1])),PM(n,p,i,!0),PM(n,p,i,!1),Gj(t,p,n,i,o),s=ff(a,l),o?t.classBindings=s:t.styleBindings=s}function Gj(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&xl(o,t)>=0&&(e[i+1]=Wy(e[i+1]))}function PM(n,t,e,i){let r=n[e+1],o=t===null,s=i?ha(r):Vl(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];qj(l,t)&&(a=!0,n[s+1]=i?Wy(c):$y(c)),s=i?ha(c):Vl(c)}a&&(n[e+1]=i?$y(r):Wy(r))}function qj(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?xl(n,t)>=0:!1}var ar={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Yj(n){return n.substring(ar.key,ar.keyEnd)}function Qj(n){return Kj(n),DD(n,ID(n,0,ar.textEnd))}function DD(n,t){let e=ar.textEnd;return e===t?-1:(t=ar.keyEnd=Zj(n,ar.key=t,e),ID(n,t,e))}function Kj(n){ar.key=0,ar.keyEnd=0,ar.value=0,ar.valueEnd=0,ar.textEnd=n.length}function ID(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function Zj(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function Fi(n,t,e){return kD(n,t,e,!1),Fi}function j(n,t){return kD(n,t,null,!0),j}function si(n){Jj(oV,Xj,n,!0)}function Xj(n,t){for(let e=Qj(t);e>=0;e=DD(t,e))qp(n,Yj(t),!0)}function kD(n,t,e,i){let r=Ee(),o=kt(),s=rf(2);if(o.firstUpdatePass&&OD(o,n,s,i),t!==ri&&Ri(r,s,t)){let a=o.data[Pr()];PD(o,a,r,r[ft],n,r[s+1]=aV(t,e),i,s)}}function Jj(n,t,e,i){let r=kt(),o=rf(2);r.firstUpdatePass&&OD(r,null,o,i);let s=Ee();if(e!==ri&&Ri(s,o,e)){let a=r.data[Pr()];if(RD(a,i)&&!AD(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=Up(l,e||"")),Uy(r,a,s,e,i)}else sV(r,a,s,s[ft],s[o+1],s[o+1]=rV(n,t,e),i,o)}}function AD(n,t){return t>=n.expandoStartIndex}function OD(n,t,e,i){let r=n.data;if(r[e+1]===null){let o=r[Pr()],s=AD(n,e);RD(o,i)&&t===null&&!s&&(t=!1),t=eV(r,o,t,i),Wj(r,o,t,e,s,i)}}function eV(n,t,e,i){let r=GS(n),o=i?t.residualClasses:t.residualStyles;if(r===null)(i?t.classBindings:t.styleBindings)===0&&(e=sy(null,n,t,e,i),e=Gd(e,t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==r)if(e=sy(r,n,t,e,i),o===null){let l=tV(n,t,i);l!==void 0&&Array.isArray(l)&&(l=sy(null,n,t,l[1],i),l=Gd(l,t.attrs,i),nV(n,t,i,l))}else o=iV(n,t,i)}return o!==void 0&&(i?t.residualClasses=o:t.residualStyles=o),e}function tV(n,t,e){let i=e?t.classBindings:t.styleBindings;if(Vl(i)!==0)return n[ha(i)]}function nV(n,t,e,i){let r=e?t.classBindings:t.styleBindings;n[ha(r)]=i}function iV(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=Gd(i,s,e)}return Gd(i,t.attrs,e)}function sy(n,t,e,i,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(a===-1?a=e.directiveStart:a++;a<s&&(o=t[a],i=Gd(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),i}function Gd(n,t,e){let i=e?1:2,r=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),qp(n,s,e?!0:t[++o]))}return n===void 0?null:n}function rV(n,t,e){if(e==null||e==="")return kn;let i=[],r=Ni(e);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else typeof r=="string"&&t(i,r);return i}function oV(n,t,e){let i=String(t);i!==""&&!i.includes(" ")&&qp(n,i,e)}function sV(n,t,e,i,r,o,s,a){r===ri&&(r=kn);let l=0,c=0,p=0<r.length?r[0]:null,h=0<o.length?o[0]:null;for(;p!==null||h!==null;){let _=l<r.length?r[l+1]:void 0,v=c<o.length?o[c+1]:void 0,y=null,T;p===h?(l+=2,c+=2,_!==v&&(y=h,T=v)):h===null||p!==null&&p<h?(l+=2,y=p):(c+=2,y=h,T=v),y!==null&&PD(n,t,e,i,y,T,s,a),p=l<r.length?r[l]:null,h=c<o.length?o[c]:null}}function PD(n,t,e,i,r,o,s,a){if(!(t.type&3))return;let l=n.data,c=l[a+1],p=$j(c)?RM(l,t,e,r,Vl(c),s):void 0;if(!Ff(p)){Ff(o)||Hj(c)&&(o=RM(l,null,e,r,a,s));let h=Db(Pr(),e);zL(i,s,h,r,o)}}function RM(n,t,e,i,r,o){let s=t===null,a;for(;r>0;){let l=n[r],c=Array.isArray(l),p=c?l[1]:l,h=p===null,_=e[r+1];_===ri&&(_=h?kn:void 0);let v=h?Yp(_,i):p===i?_:void 0;if(c&&!Ff(v)&&(v=Yp(l,i)),Ff(v)&&(a=v,s))return a;let y=n[r+1];r=s?ha(y):Vl(y)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=Yp(l,i))}return a}function Ff(n){return n!==void 0}function aV(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=co(Ni(n)))),n}function RD(n,t){return(n.flags&(t?8:16))!==0}function g(n,t=""){let e=Ee(),i=kt(),r=n+Mt,o=i.firstCreatePass?Hl(i,r,1,t,null):i.data[r],s=lV(i,e,o,t,n);e[r]=s,cf()&&u0(i,e,s,o),Il(o,!1)}var lV=(n,t,e,i,r)=>(Fd(!0),yL(t[ft],i));function ND(n,t,e,i=""){return Ri(n,as(),e)?t+ts(e)+i:ri}function cV(n,t,e,i,r,o=""){let s=zS(),a=iD(n,s,e,r);return rf(2),a?t+ts(e)+i+ts(r)+o:ri}function K(n){return Se("",n),K}function Se(n,t,e){let i=Ee(),r=ND(i,n,t,e);return r!==ri&&FD(i,Pr(),r),Se}function Vr(n,t,e,i,r){let o=Ee(),s=cV(o,n,t,e,i,r);return s!==ri&&FD(o,Pr(),s),Vr}function FD(n,t,e){let i=Db(t,n);CL(n[ft],i,e)}function G(n,t,e){Yb(t)&&(t=t());let i=Ee(),r=as();if(Ri(i,r,t)){let o=kt(),s=Nd();RT(s,i,n,t,i[ft],e)}return G}function Q(n,t){let e=Yb(n);return e&&n.set(t),e}function q(n,t){let e=Ee(),i=kt(),r=sn();return TD(i,e,e[ft],r,n,t),q}function bo(n,t,e=""){return ND(Ee(),n,t,e)}function dV(n,t,e){let i=kt();if(i.firstCreatePass){let r=ir(n);Gy(e,i.data,i.blueprint,r,!0),Gy(t,i.data,i.blueprint,r,!1)}}function Gy(n,t,e,i,r){if(n=rn(n),Array.isArray(n))for(let o=0;o<n.length;o++)Gy(n[o],t,e,i,r);else{let o=kt(),s=Ee(),a=sn(),l=ta(n)?n:rn(n.provide),c=wb(n),p=a.providerIndexes&1048575,h=a.directiveStart,_=a.providerIndexes>>20;if(ta(n)||!n.multi){let v=new fa(c,r,De,null),y=ly(l,t,r?p:p+_,h);y===-1?(dy(xf(a,s),o,l),ay(o,n,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(v),s.push(v)):(e[y]=v,s[y]=v)}else{let v=ly(l,t,p+_,h),y=ly(l,t,p,p+_),T=v>=0&&e[v],F=y>=0&&e[y];if(r&&!F||!r&&!T){dy(xf(a,s),o,l);let L=pV(r?mV:uV,e.length,r,i,c,n);!r&&F&&(e[y].providerFactory=L),ay(o,n,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(L),s.push(L)}else{let L=LD(e[r?y:v],c,!r&&i);ay(o,n,v>-1?v:y,L)}!r&&i&&F&&e[y].componentProviders++}}}function ay(n,t,e,i){let r=ta(t),o=DS(t);if(r||o){let l=(o?rn(t.useClass):t).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let p=c.indexOf(e);p===-1?c.push(e,[i,l]):c[p+1].push(i,l)}else c.push(e,l)}}}function LD(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function ly(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function uV(n,t,e,i,r){return qy(this.multi,[])}function mV(n,t,e,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Bd(i,i[be],this.providerFactory.index,r);s=l.slice(0,a),qy(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],qy(o,s);return s}function qy(n,t){for(let e=0;e<n.length;e++){let i=n[e];t.push(i())}return t}function pV(n,t,e,i,r,o){let s=new fa(n,e,De,null);return s.multi=[],s.index=t,s.componentProviders=0,LD(s,r,i&&!e),s}function je(n,t=[]){return e=>{e.providersResolver=(i,r)=>dV(i,r?r(n):n,t)}}function V0(n,t,e,i){return VD(Ee(),nf(),n,t,e,i)}function jD(n,t){let e=n[t];return e===ri?void 0:e}function VD(n,t,e,i,r,o){let s=t+e;return Ri(n,s,r)?nD(n,s+1,o?i.call(o,r):i(r)):jD(n,s+1)}function fV(n,t,e,i,r,o,s){let a=t+e;return iD(n,a,r,o)?nD(n,a+2,s?i.call(s,r,o):i(r,o)):jD(n,a+2)}function gs(n,t){let e=kt(),i,r=n+Mt;e.firstCreatePass?(i=hV(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??=[]).push(r,i.onDestroy)):i=e.data[r];let o=i.factory||(i.factory=Jo(i.type,!0)),s,a=jn(De);try{let l=wf(!1),c=o();return wf(l),Ib(e,Ee(),r,c),c}finally{jn(a)}}function hV(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}function B0(n,t,e){let i=n+Mt,r=Ee(),o=Xp(r,i);return BD(r,i)?VD(r,nf(),t,o.transform,e,o):o.transform(e)}function Yl(n,t,e,i){let r=n+Mt,o=Ee(),s=Xp(o,r);return BD(o,r)?fV(o,nf(),t,s.transform,e,i,s):s.transform(e,i)}function BD(n,t){return n[be].data[t].pure}function iu(n,t){return Yf(n,t)}var Lf=class{ngModuleFactory;componentFactories;constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}},z0=(()=>{class n{compileModuleSync(e){return new Af(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let i=this.compileModuleSync(e),r=bb(e),o=vT(r.declarations).reduce((s,a)=>{let l=Ir(a);return l&&s.push(new ds(l)),s},[]);return new Lf(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var gV=(()=>{class n{zone=d(Y);changeDetectionScheduler=d(Di);applicationRef=d(Un);applicationErrorHandler=d(zn);_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(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zD=new A("",{factory:()=>!1});function H0({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new Y(de(M({},$0()),{scheduleInRootZone:e})),[{provide:Y,useFactory:n},{provide:Dr,multi:!0,useFactory:()=>{let i=d(gV,{optional:!0});return()=>i.initialize()}},{provide:Dr,multi:!0,useFactory:()=>{let i=d(vV);return()=>{i.initialize()}}},t===!0?{provide:Qb,useValue:!0}:[],{provide:Kb,useValue:e??yD},{provide:zn,useFactory:()=>{let i=d(Y),r=d(pt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(yn),o.handleError(s))})}}}]}function U0(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,i=H0({ngZoneFactory:()=>{let r=$0(n);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&gi("NgZone_CoalesceEvent"),new Y(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return er([{provide:zD,useValue:!0},{provide:Ol,useValue:!1},i])}function $0(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var vV=(()=>{class n{subscription=new ze;initialized=!1;zone=d(Y);pendingTasks=d(Nr);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(()=>{Y.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Y.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var HD=(()=>{class n{applicationErrorHandler=d(zn);appRef=d(Un);taskService=d(Nr);ngZone=d(Y);zonelessEnabled=d(Ol);tracing=d(fs,{optional:!0});disableScheduling=d(Qb,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ze;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Of):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(d(Kb,{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 Pf||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let i=!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,i=!0;break}case 12:{this.appRef.dirtyFlags|=16,i=!0;break}case 13:{this.appRef.dirtyFlags|=2,i=!0;break}case 11:{i=!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(i))return;let r=this.useMicrotaskScheduler?TM:CD;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>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(Of+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(i){this.taskService.remove(e),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,TM(()=>{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(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function _V(){return typeof $localize<"u"&&$localize.locale||nu}var ru=new A("",{providedIn:"root",factory:()=>d(ru,{optional:!0,skipSelf:!0})||_V()});function Vt(n){return dS(n)}function Kt(n,t){return md(n,t?.equal)}var W0=class{[tn];constructor(t){this[tn]=t}destroy(){this[tn].destroy()}};function yo(n,t){let e=t?.injector??d(me),i=t?.manualCleanup!==!0?e.get(an):null,r,o=e.get(ua,null,{optional:!0}),s=e.get(Di);return o!==null?(r=CV(o.view,s,n),i instanceof Md&&i._lView===o.view&&(i=null)):r=wV(n,e.get(Ld),s),r.injector=e,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new W0(r)}var UD=de(M({},uS),{cleanupFns:void 0,zone:null,onDestroyFn:ma,run(){let n=kl(!1);try{mS(this)}finally{kl(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=Ie(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],Ie(n)}}}),bV=de(M({},UD),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Yo(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),yV=de(M({},UD),{consumerMarkedDirty(){this.view[Te]|=8192,ss(this.view),this.notifier.notify(13)},destroy(){Yo(this),this.onDestroyFn(),this.cleanup(),this.view[mo]?.delete(this)}});function CV(n,t,e){let i=Object.create(yV);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=t,i.fn=$D(i,e),n[mo]??=new Set,n[mo].add(i),i.consumerMarkedDirty(i),i}function wV(n,t,e){let i=Object.create(bV);return i.fn=$D(i,n),i.scheduler=t,i.notifier=e,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function $D(n,t){return()=>{t(e=>(n.cleanupFns??=[]).push(e))}}var ZD=Symbol("InputSignalNode#UNSET"),BV=de(M({},pd),{transformFn:void 0,applyValueToInputSignal(n,t){ul(n,t)}});function XD(n,t){let e=Object.create(BV);e.value=n,e.transformFn=t?.transform;function i(){if($s(e),e.value===ZD){let r=null;throw new O(-950,r)}return e.value}return i[tn]=e,i}var _i=class{attributeName;constructor(t){this.attributeName=t}__NG_ELEMENT_ID__=()=>jf(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},zV=new A("");zV.__NG_ELEMENT_ID__=n=>{let t=sn();if(t===null)throw new O(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new O(204,!1)};function WD(n,t){return XD(n,t)}function HV(n){return XD(ZD,n)}var JD=(WD.required=HV,WD);function GD(n,t){return S0(t)}function UV(n,t){return M0(t)}var su=(GD.required=UV,GD);function qD(n,t){return S0(t)}function $V(n,t){return M0(t)}var eI=(qD.required=$V,qD);var q0=new A(""),WV=new A("");function ou(n){return!n.moduleRef}function GV(n){let t=ou(n)?n.r3Injector:n.moduleRef.injector,e=t.get(Y);return e.run(()=>{ou(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=t.get(zn),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:i})}),ou(n)){let o=()=>t.destroy(),s=n.platformInjector.get(q0);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(q0);s.add(o),n.moduleRef.onDestroy(()=>{Vd(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return YV(i,e,()=>{let o=t.get(Nr),s=o.add(),a=t.get(P0);return a.runInitializers(),a.donePromise.then(()=>{let l=t.get(ru,nu);if(MD(l||nu),!t.get(WV,!0))return ou(n)?t.get(Un):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(ou(n)){let p=t.get(Un);return n.rootComponent!==void 0&&p.bootstrap(n.rootComponent),p}else return qV?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>void o.remove(s))})})}var qV;function YV(n,t,e){try{let i=e();return _o(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n(i)),i}}var ih=null;function QV(n=[],t){return me.create({name:t,providers:[{provide:Id,useValue:"platform"},{provide:q0,useValue:new Set([()=>ih=null])},...n]})}function KV(n=[]){if(ih)return ih;let t=QV(n);return ih=t,xD(),ZV(t),t}function ZV(n){let t=n.get(Vf,null);pn(n,()=>{t?.forEach(e=>e())})}var Qe=(()=>{class n{static __NG_ELEMENT_ID__=XV}return n})();function XV(n){return JV(sn(),Ee(),(n&16)===16)}function JV(n,t,e){if(os(n)&&!e){let i=Oi(n.index,t);return new cs(i,i)}else if(n.type&175){let i=t[Bn];return new cs(i,t)}return null}var Y0=class{constructor(){}supports(t){return w0(t)}create(t){return new Q0(t)}},eB=(n,t)=>t,Q0=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(t){this._trackByFn=t||eB}forEachItem(t){let e;for(e=this._itHead;e!==null;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){let s=!i||e&&e.currentIndex<YD(i,r,o)?e:i,a=YD(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(e=e._next,s.previousIndex==null)r++;else{o||(o=[]);let c=a-r,p=l-r;if(c!=p){for(let _=0;_<c;_++){let v=_<o.length?o[_]:o[_]=0,y=v+_;p<=y&&y<c&&(o[_]=v+1)}let h=s.previousIndex;o[h]=p-c}}a!==l&&t(s,a,l)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;e!==null;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;e!==null;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;e!==null;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;e!==null;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;e!==null;e=e._nextIdentityChange)t(e)}diff(t){if(t==null&&(t=[]),!w0(t))throw new O(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._itHead,i=!1,r,o,s;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,o,s,a),i=!0):(i&&(e=this._verifyReinsertion(e,o,s,a)),Object.is(e.item,o)||this._addIdentityChange(e,o)),e=e._next}else r=0,eD(t,a=>{s=this._trackByFn(r,a),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,a,s,r),i=!0):(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):(t=this._linkedRecords===null?null:this._linkedRecords.get(i,r),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new K0(e,i),o,r)),t}_verifyReinsertion(t,e,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;t!==null;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){let r=e===null?this._itHead:e._next;return t._next=r,t._prev=e,r===null?this._itTail=t:r._prev=t,e===null?this._itHead=t:e._next=t,this._linkedRecords===null&&(this._linkedRecords=new rh),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let e=t._prev,i=t._next;return e===null?this._itHead=i:e._next=i,i===null?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new rh),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},K0=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(t,e){this.item=t,this.trackById=e}},Z0=class{_head=null;_tail=null;add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;i!==null;i=i._nextDup)if((e===null||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){let e=t._prevDup,i=t._nextDup;return e===null?this._head=i:e._nextDup=i,i===null?this._tail=e:i._prevDup=e,this._head===null}},rh=class{map=new Map;put(t){let e=t.trackById,i=this.map.get(e);i||(i=new Z0,this.map.set(e,i)),i.add(t)}get(t,e){let i=t,r=this.map.get(i);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function YD(n,t,e){let i=n.previousIndex;if(i===null)return i;let r=0;return e&&i<e.length&&(r=e[i]),i+t+r}function QD(){return new oh([new Y0])}var oh=(()=>{class n{factories;static \u0275prov=x({token:n,providedIn:"root",factory:QD});constructor(e){this.factories=e}static create(e,i){if(i!=null){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:()=>{let i=d(n,{optional:!0,skipSelf:!0});return n.create(e,i||QD())}}}find(e){let i=this.factories.find(r=>r.supports(e));if(i!=null)return i;throw new O(901,!1)}}return n})();function tI(n){let{rootComponent:t,appProviders:e,platformProviders:i,platformRef:r}=n;ot(8);try{let o=r?.injector??KV(i),s=[H0({}),{provide:Di,useExisting:HD},JS,...e||[]],a=new Ud({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return GV({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{ot(9)}}function ie(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function ai(n,t=NaN){return!isNaN(parseFloat(n))&&!isNaN(Number(n))?Number(n):t}var G0=Symbol("NOT_SET"),nI=new Set,tB=de(M({},pd),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:G0,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(n){if(this.sequence.lastPhase=this.phase,!this.dirty)return this.signal;if(this.dirty=!1,this.value!==G0&&!Gs(this))return this.signal;try{for(let r of this.cleanup??nI)r()}finally{this.cleanup?.clear()}let t=[];n!==void 0&&t.push(n),t.push(this.registerCleanupFn);let e=qo(this),i;try{i=this.userFn.apply(null,t)}finally{Ws(this,e)}return(this.value===G0||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),X0=class extends Wd{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];constructor(t,e,i,r,o,s=null){super(t,[void 0,void 0,void 0,void 0],i,!1,o.get(an),s),this.scheduler=r;for(let a of k0){let l=e[a];if(l===void 0)continue;let c=Object.create(tB);c.sequence=this,c.phase=a,c.userFn=l,c.dirty=!0,c.signal=()=>($s(c),c.value),c.signal[tn]=c,c.registerCleanupFn=p=>(c.cleanup??=new Set).add(p),this.nodes[a]=c,this.hooks[a]=p=>c.phaseFn(p)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let t of this.nodes)if(t)try{for(let e of t.cleanup??nI)e()}finally{Yo(t)}}};function iI(n,t){let e=t?.injector??d(me),i=e.get(Di),r=e.get(Xf),o=e.get(fs,null,{optional:!0});r.impl??=e.get(A0);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=e.get(ua,null,{optional:!0}),l=new X0(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,e,o?.snapshot(null));return r.impl.register(l),l}function sh(n,t){let e=Ir(n),i=t.elementInjector||El();return new ds(e).create(i,t.projectableNodes,t.hostElement,t.environmentInjector,t.directives,t.bindings)}function rI(n){let t=Ir(n);if(!t)return null;let e=new ds(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 aI=null;function Li(){return aI}function tC(n){aI??=n}var au=class{},lu=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(lI),providedIn:"platform"})}return n})(),nC=new A(""),lI=(()=>{class n extends lu{_location;_history;_doc=d(le);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Li().getBaseHref(this._doc)}onPopState(e){let i=Li().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=Li().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.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,i,r){this._history.pushState(e,i,r)}replaceState(e,i,r){this._history.replaceState(e,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>new n,providedIn:"platform"})}return n})();function ah(n,t){return n?t?n.endsWith("/")?t.startsWith("/")?n+t.slice(1):n+t:t.startsWith("/")?n+t:`${n}/${t}`:n:t}function oI(n){let t=n.search(/#|\?|$/);return n[t-1]==="/"?n.slice(0,t-1)+n.slice(t):n}function lr(n){return n&&n[0]!=="?"?`?${n}`:n}var Co=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(ch),providedIn:"root"})}return n})(),lh=new A(""),ch=(()=>{class n extends Co{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??d(le).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 ah(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+lr(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+lr(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+lr(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||n)(te(lu),te(lh,8))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Br=(()=>{class n{_subject=new P;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._basePath=rB(oI(sI(i))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+lr(i))}normalize(e){return n.stripTrailingSlash(iB(this._basePath,sI(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+lr(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+lr(i)),r)}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(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i??void 0,complete:r??void 0})}static normalizeQueryParams=lr;static joinWithSlash=ah;static stripTrailingSlash=oI;static \u0275fac=function(i){return new(i||n)(te(Co))};static \u0275prov=x({token:n,factory:()=>nB(),providedIn:"root"})}return n})();function nB(){return new Br(te(Co))}function iB(n,t){if(!n||!t.startsWith(n))return t;let e=t.substring(n.length);return e===""||["/",";","?","#"].includes(e[0])?e:t}function sI(n){return n.replace(/\/index.html$/,"")}function rB(n){if(new RegExp("^(https?:)?//").test(n)){let[,e]=n.split(/\/\/[^\/]+/);return e}return n}var cC=(()=>{class n extends Co{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,i!=null&&(this._baseHref=i)}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 i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(e){let i=ah(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+lr(o))||this._platformLocation.pathname;this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+lr(o))||this._platformLocation.pathname;this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||n)(te(lu),te(lh,8))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();var On=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(On||{}),ct=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(ct||{}),li=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(li||{}),xo={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function pI(n){return vi(n)[$t.LocaleId]}function fI(n,t,e){let i=vi(n),r=[i[$t.DayPeriodsFormat],i[$t.DayPeriodsStandalone]],o=ji(r,t);return ji(o,e)}function hI(n,t,e){let i=vi(n),r=[i[$t.DaysFormat],i[$t.DaysStandalone]],o=ji(r,t);return ji(o,e)}function gI(n,t,e){let i=vi(n),r=[i[$t.MonthsFormat],i[$t.MonthsStandalone]],o=ji(r,t);return ji(o,e)}function vI(n,t){let i=vi(n)[$t.Eras];return ji(i,t)}function cu(n,t){let e=vi(n);return ji(e[$t.DateFormat],t)}function du(n,t){let e=vi(n);return ji(e[$t.TimeFormat],t)}function uu(n,t){let i=vi(n)[$t.DateTimeFormat];return ji(i,t)}function mu(n,t){let e=vi(n),i=e[$t.NumberSymbols][t];if(typeof i>"u"){if(t===xo.CurrencyDecimal)return e[$t.NumberSymbols][xo.Decimal];if(t===xo.CurrencyGroup)return e[$t.NumberSymbols][xo.Group]}return i}function _I(n){if(!n[$t.ExtraData])throw new O(2303,!1)}function bI(n){let t=vi(n);return _I(t),(t[$t.ExtraData][2]||[]).map(i=>typeof i=="string"?iC(i):[iC(i[0]),iC(i[1])])}function yI(n,t,e){let i=vi(n);_I(i);let r=[i[$t.ExtraData][0],i[$t.ExtraData][1]],o=ji(r,t)||[];return ji(o,e)||[]}function ji(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new O(2304,!1)}function iC(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var oB=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,dh={},sB=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function CI(n,t,e,i){let r=hB(n);t=wo(e,t)||t;let s=[],a;for(;t;)if(a=sB.exec(t),a){s=s.concat(a.slice(1));let p=s.pop();if(!p)break;t=p}else{s.push(t);break}let l=r.getTimezoneOffset();i&&(l=xI(i,l),r=fB(r,i));let c="";return s.forEach(p=>{let h=mB(p);c+=h?h(r,e,l):p==="''"?"'":p.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function hh(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function wo(n,t){let e=pI(n);if(dh[e]??={},dh[e][t])return dh[e][t];let i="";switch(t){case"shortDate":i=cu(n,li.Short);break;case"mediumDate":i=cu(n,li.Medium);break;case"longDate":i=cu(n,li.Long);break;case"fullDate":i=cu(n,li.Full);break;case"shortTime":i=du(n,li.Short);break;case"mediumTime":i=du(n,li.Medium);break;case"longTime":i=du(n,li.Long);break;case"fullTime":i=du(n,li.Full);break;case"short":let r=wo(n,"shortTime"),o=wo(n,"shortDate");i=uh(uu(n,li.Short),[r,o]);break;case"medium":let s=wo(n,"mediumTime"),a=wo(n,"mediumDate");i=uh(uu(n,li.Medium),[s,a]);break;case"long":let l=wo(n,"longTime"),c=wo(n,"longDate");i=uh(uu(n,li.Long),[l,c]);break;case"full":let p=wo(n,"fullTime"),h=wo(n,"fullDate");i=uh(uu(n,li.Full),[p,h]);break}return i&&(dh[e][t]=i),i}function uh(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return t!=null&&i in t?t[i]:e})),n}function cr(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,o=e));let s=String(n);for(;s.length<t;)s="0"+s;return i&&(s=s.slice(s.length-t)),o+s}function aB(n,t){return cr(n,3).substring(0,t)}function Zt(n,t,e=0,i=!1,r=!1){return function(o,s){let a=lB(n,o);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return aB(a,t);let l=mu(s,xo.MinusSign);return cr(a,t,l,i,r)}}function lB(n,t){switch(n){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new O(2301,!1)}}function xt(n,t,e=On.Format,i=!1){return function(r,o){return cB(r,o,n,t,e,i)}}function cB(n,t,e,i,r,o){switch(e){case 2:return gI(t,r,i)[n.getMonth()];case 1:return hI(t,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let c=bI(t),p=yI(t,r,i),h=c.findIndex(_=>{if(Array.isArray(_)){let[v,y]=_,T=s>=v.hours&&a>=v.minutes,F=s<y.hours||s===y.hours&&a<y.minutes;if(v.hours<y.hours){if(T&&F)return!0}else if(T||F)return!0}else if(_.hours===s&&_.minutes===a)return!0;return!1});if(h!==-1)return p[h]}return fI(t,r,i)[s<12?0:1];case 3:return vI(t,i)[n.getFullYear()<=0?0:1];default:let l=e;throw new O(2302,!1)}}function mh(n){return function(t,e,i){let r=-1*i,o=mu(e,xo.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+cr(s,2,o)+cr(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+cr(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+cr(s,2,o)+":"+cr(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+cr(s,2,o)+":"+cr(Math.abs(r%60),2,o);default:throw new O(2310,!1)}}}var dB=0,fh=4;function uB(n){let t=hh(n,dB,1).getDay();return hh(n,0,1+(t<=fh?fh:fh+7)-t)}function wI(n){let t=n.getDay(),e=t===0?-3:fh-t;return hh(n.getFullYear(),n.getMonth(),n.getDate()+e)}function rC(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=wI(e),s=uB(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return cr(r,n,mu(i,xo.MinusSign))}}function ph(n,t=!1){return function(e,i){let o=wI(e).getFullYear();return cr(o,n,mu(i,xo.MinusSign),t)}}var oC={};function mB(n){if(oC[n])return oC[n];let t;switch(n){case"G":case"GG":case"GGG":t=xt(3,ct.Abbreviated);break;case"GGGG":t=xt(3,ct.Wide);break;case"GGGGG":t=xt(3,ct.Narrow);break;case"y":t=Zt(0,1,0,!1,!0);break;case"yy":t=Zt(0,2,0,!0,!0);break;case"yyy":t=Zt(0,3,0,!1,!0);break;case"yyyy":t=Zt(0,4,0,!1,!0);break;case"Y":t=ph(1);break;case"YY":t=ph(2,!0);break;case"YYY":t=ph(3);break;case"YYYY":t=ph(4);break;case"M":case"L":t=Zt(1,1,1);break;case"MM":case"LL":t=Zt(1,2,1);break;case"MMM":t=xt(2,ct.Abbreviated);break;case"MMMM":t=xt(2,ct.Wide);break;case"MMMMM":t=xt(2,ct.Narrow);break;case"LLL":t=xt(2,ct.Abbreviated,On.Standalone);break;case"LLLL":t=xt(2,ct.Wide,On.Standalone);break;case"LLLLL":t=xt(2,ct.Narrow,On.Standalone);break;case"w":t=rC(1);break;case"ww":t=rC(2);break;case"W":t=rC(1,!0);break;case"d":t=Zt(2,1);break;case"dd":t=Zt(2,2);break;case"c":case"cc":t=Zt(7,1);break;case"ccc":t=xt(1,ct.Abbreviated,On.Standalone);break;case"cccc":t=xt(1,ct.Wide,On.Standalone);break;case"ccccc":t=xt(1,ct.Narrow,On.Standalone);break;case"cccccc":t=xt(1,ct.Short,On.Standalone);break;case"E":case"EE":case"EEE":t=xt(1,ct.Abbreviated);break;case"EEEE":t=xt(1,ct.Wide);break;case"EEEEE":t=xt(1,ct.Narrow);break;case"EEEEEE":t=xt(1,ct.Short);break;case"a":case"aa":case"aaa":t=xt(0,ct.Abbreviated);break;case"aaaa":t=xt(0,ct.Wide);break;case"aaaaa":t=xt(0,ct.Narrow);break;case"b":case"bb":case"bbb":t=xt(0,ct.Abbreviated,On.Standalone,!0);break;case"bbbb":t=xt(0,ct.Wide,On.Standalone,!0);break;case"bbbbb":t=xt(0,ct.Narrow,On.Standalone,!0);break;case"B":case"BB":case"BBB":t=xt(0,ct.Abbreviated,On.Format,!0);break;case"BBBB":t=xt(0,ct.Wide,On.Format,!0);break;case"BBBBB":t=xt(0,ct.Narrow,On.Format,!0);break;case"h":t=Zt(3,1,-12);break;case"hh":t=Zt(3,2,-12);break;case"H":t=Zt(3,1);break;case"HH":t=Zt(3,2);break;case"m":t=Zt(4,1);break;case"mm":t=Zt(4,2);break;case"s":t=Zt(5,1);break;case"ss":t=Zt(5,2);break;case"S":t=Zt(6,1);break;case"SS":t=Zt(6,2);break;case"SSS":t=Zt(6,3);break;case"Z":case"ZZ":case"ZZZ":t=mh(0);break;case"ZZZZZ":t=mh(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=mh(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=mh(2);break;default:return null}return oC[n]=t,t}function xI(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function pB(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function fB(n,t,e){let r=n.getTimezoneOffset(),o=xI(t,r);return pB(n,-1*(o-r))}function hB(n){if(cI(n))return n;if(typeof n=="number"&&!isNaN(n))return new Date(n);if(typeof n=="string"){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[r,o=1,s=1]=n.split("-").map(a=>+a);return hh(r,o-1,s)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(oB))return gB(i)}let t=new Date(n);if(!cI(t))throw new O(2311,!1);return t}function gB(n){let t=new Date(0),e=0,i=0,r=n[8]?t.setUTCFullYear:t.setFullYear,o=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(t,s,a,l,c),t}function cI(n){return n instanceof Date&&!isNaN(n.valueOf())}var sC=/\s+/,dI=[],va=(()=>{class n{_ngEl;_renderer;initialClasses=dI;rawClass;stateMap=new Map;constructor(e,i){this._ngEl=e,this._renderer=i}set klass(e){this.initialClasses=e!=null?e.trim().split(sC):dI}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(sC):e}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let i of e)this._updateState(i,!0);else if(e!=null)for(let i of Object.keys(e))this._updateState(i,!!e[i]);this._applyStateDiff()}_updateState(e,i){let r=this.stateMap.get(e);r!==void 0?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){e=e.trim(),e.length>0&&e.split(sC).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(i){return new(i||n)(De(Z),De(et))};static \u0275dir=X({type:n,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return n})();var gh=class{$implicit;ngForOf;index;count;constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Ql=(()=>{class n{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(r.previousIndex==null)i.createEmbeddedView(this._template,new gh(r.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)i.remove(o===null?void 0:o);else if(o!==null){let a=i.get(o);i.move(a,s),uI(a,r)}});for(let r=0,o=i.length;r<o;r++){let a=i.get(r).context;a.index=r,a.count=o,a.ngForOf=this._ngForOf}e.forEachIdentityChange(r=>{let o=i.get(r.currentIndex);uI(o,r)})}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||n)(De(Hn),De(An),De(oh))};static \u0275dir=X({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return n})();function uI(n,t){n.context.$implicit=t.item}var pu=(()=>{class n{_viewContainer;_context=new vh;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,i){this._viewContainer=e,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){mI(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){mI(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||n)(De(Hn),De(An))};static \u0275dir=X({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return n})(),vh=class{$implicit=null;ngIf=null};function mI(n,t){if(n&&!n.createEmbeddedView)throw new O(2020,!1)}var fu=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(e,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(De(Hn))};static \u0275dir=X({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[We]})}return n})();function EI(n,t){return new O(2100,!1)}var aC=class{createSubscription(t,e,i){return Vt(()=>t.subscribe({next:e,error:i}))}dispose(t){Vt(()=>t.unsubscribe())}},lC=class{createSubscription(t,e,i){return t.then(r=>e?.(r),r=>i?.(r)),{unsubscribe:()=>{e=null,i=null}}}dispose(t){t.unsubscribe()}},vB=new lC,_B=new aC,dC=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=d(zn);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,i=>this._updateLatestValue(e,i),i=>this.applicationErrorHandler(i))}_selectStrategy(e){if(_o(e))return vB;if(eh(e))return _B;throw EI(n,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||n)(De(Qe,16))};static \u0275pipe=$l({name:"async",type:n,pure:!1})}return n})();var bB="mediumDate",SI=new A(""),MI=new A(""),uC=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(e==null||e===""||e!==e)return null;try{let s=i??this.defaultOptions?.dateFormat??bB,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return CI(e,s,o||this.locale,a)}catch(s){throw EI(n,s.message)}}static \u0275fac=function(i){return new(i||n)(De(ru,16),De(SI,24),De(MI,24))};static \u0275pipe=$l({name:"date",type:n,pure:!0})}return n})();var tt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();function hu(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let i=e.indexOf("="),[r,o]=i==-1?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var _a=class{};var pC="browser";function TI(n){return n===pC}var DI=(()=>{class n{static \u0275prov=x({token:n,providedIn:"root",factory:()=>new mC(d(le),window)})}return n})(),mC=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(de(M({},e),{left:t[0],top:t[1]}))}scrollToAnchor(t,e){let i=yB(this.document,t);i&&(this.scrollToElement(i,e),i.focus())}setHistoryScrollRestoration(t){try{this.window.history.scrollRestoration=t}catch{console.warn(uo(2400,!1))}}scrollToElement(t,e){let i=t.getBoundingClientRect(),r=i.left+this.window.pageXOffset,o=i.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(de(M({},e),{left:r-s[0],top:o-s[1]}))}};function yB(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 i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT),r=i.currentNode;for(;r;){let o=r.shadowRoot;if(o){let s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}var bh=new A(""),bC=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r,o){return this._findPluginFor(i).addEventListener(e,i,r,o)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(o=>o.supports(e)),!i)throw new O(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(te(bh),te(Y))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),gu=class{_doc;constructor(t){this._doc=t}manager},hC="ng-app-id";function II(n){for(let t of n)t.remove()}function kI(n,t){let e=t.createElement("style");return e.textContent=n,e}function CB(n,t,e,i){let r=n.head?.querySelectorAll(`style[${hC}="${t}"],link[${hC}="${t}"]`);if(r)for(let o of r)o.removeAttribute(hC),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function vC(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var yC=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,r,o={}){this.doc=e,this.appId=i,this.nonce=r,CB(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let r of e)this.addUsage(r,this.inline,kI);i?.forEach(r=>this.addUsage(r,this.external,vC))}removeStyles(e,i){for(let r of e)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,i,r){let o=i.get(e);o?o.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(e,this.doc)))})}removeUsage(e,i){let r=i.get(e);r&&(r.usage--,r.usage<=0&&(II(r.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])II(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(e,kI(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(e,vC(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||n)(te(le),te(us),te(zl,8),te(ms))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),gC={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"},CC=/%COMP%/g;var OI="%COMP%",wB=`_nghost-${OI}`,xB=`_ngcontent-${OI}`,EB=!0,SB=new A("",{providedIn:"root",factory:()=>EB});function MB(n){return xB.replace(CC,n)}function TB(n){return wB.replace(CC,n)}function PI(n,t){return t.map(e=>e.replace(CC,n))}var bu=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,r,o,s,a,l,c=null,p=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=p,this.platformIsServer=!1,this.defaultRenderer=new vu(e,s,l,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof _h?r.applyToHost(e):r instanceof _u&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.platformIsServer,_=this.tracingService;switch(i.encapsulation){case fo.Emulated:o=new _h(l,c,i,this.appId,p,s,a,h,_);break;case fo.ShadowDom:return new _C(l,c,e,i,s,a,this.nonce,h,_);default:o=new _u(l,c,i,p,s,a,h,_);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||n)(te(bC),te(yC),te(us),te(SB),te(le),te(ms),te(Y),te(zl),te(fs,8))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),vu=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,i,r,o){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(gC[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(AI(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(AI(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new O(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=gC[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=gC[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Lr.DashCase|Lr.Important)?t.style.setProperty(e,i,r&Lr.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Lr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i,r){if(typeof t=="string"&&(t=Li().getGlobalEventTarget(this.doc,t),!t))throw new O(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,r)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function AI(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var _C=class extends vu{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,i,r,o,s,a,l,c){super(t,o,s,l,c),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let p=r.styles;p=PI(r.id,p);for(let _ of p){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=_,this.shadowRoot.appendChild(v)}let h=r.getExternalStyles?.();if(h)for(let _ of h){let v=vC(_,o);a&&v.setAttribute("nonce",a),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},_u=class extends vu{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,r,o,s,a,l,c){super(t,o,s,a,l),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let p=i.styles;this.styles=c?PI(c,p):p,this.styleUrls=i.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Kd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},_h=class extends _u{contentAttr;hostAttr;constructor(t,e,i,r,o,s,a,l,c){let p=r+"-"+i.id;super(t,e,i,o,s,a,l,c,p),this.contentAttr=MB(p),this.hostAttr=TB(p)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}};var yh=class n extends au{supportsDOMEvents=!0;static makeCurrent(){tC(new n)}onAndCancel(t,e,i,r){return t.addEventListener(e,i,r),()=>{t.removeEventListener(e,i,r)}}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=DB();return e==null?null:IB(e)}resetBaseElement(){yu=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hu(document.cookie,t)}},yu=null;function DB(){return yu=yu||document.head.querySelector("base"),yu?yu.getAttribute("href"):null}function IB(n){return new URL(n,document.baseURI).pathname}var kB=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),NI=(()=>{class n extends gu{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r,o){return e.addEventListener(i,r,o),()=>this.removeEventListener(e,i,r,o)}removeEventListener(e,i,r,o){return e.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(te(le))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),RI=["alt","control","meta","shift"],AB={"\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"},OB={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},FI=(()=>{class n extends gu{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Li().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),RI.forEach(c=>{let p=i.indexOf(c);p>-1&&(i.splice(p,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=AB[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),RI.forEach(s=>{if(s!==r){let a=OB[s];a(e)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||n)(te(le))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();function wC(n,t,e){let i=M({rootComponent:n,platformRef:e?.platformRef},PB(t));return tI(i)}function PB(n){return{appProviders:[...jB,...n?.providers??[]],platformProviders:LB}}function RB(){yh.makeCurrent()}function NB(){return new yn}function FB(){return Ky(document),document}var LB=[{provide:ms,useValue:pC},{provide:Vf,useValue:RB,multi:!0},{provide:le,useFactory:FB}];var jB=[{provide:Id,useValue:"root"},{provide:yn,useFactory:NB},{provide:bh,useClass:NI,multi:!0,deps:[le]},{provide:bh,useClass:FI,multi:!0,deps:[le]},bu,yC,bC,{provide:jt,useExisting:bu},{provide:_a,useClass:kB},[]];var Xl=class{},Cu=class{},vs=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 i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=e.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}: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 i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);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 i=t.toLowerCase();this.maybeSetNormalizedName(t,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var wh=class{encodeKey(t){return LI(t)}encodeValue(t){return LI(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function VB(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var BB=/%(\d[a-f0-9])/gi,zB={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function LI(n){return encodeURIComponent(n).replace(BB,(t,e)=>zB[e]??t)}function Ch(n){return`${n}`}var Eo=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new wh,t.fromString){if(t.fromObject)throw new O(2805,!1);this.map=VB(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(Ch):[Ch(i)];this.map.set(e,r)})):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(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,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(i=>e+"="+this.encoder.encodeValue(i)).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(Ch(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=this.map.get(t.param)||[],r=i.indexOf(Ch(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var xh=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 HB(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function jI(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function VI(n){return typeof Blob<"u"&&n instanceof Blob}function BI(n){return typeof FormData<"u"&&n instanceof FormData}function UB(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var zI="Content-Type",HI="Accept",UI="X-Request-URL",$I="text/plain",WI="application/json",$B=`${WI}, ${$I}, */*`,Kl=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,i,r){this.url=e,this.method=t.toUpperCase();let o;if(HB(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,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 O(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 vs,this.context??=new xh,!this.params)this.params=new Eo,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||jI(this.body)||VI(this.body)||BI(this.body)||UB(this.body)?this.body:this.body instanceof Eo?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||BI(this.body)?null:VI(this.body)?this.body.type||null:jI(this.body)?null:typeof this.body=="string"?$I:this.body instanceof Eo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?WI:null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,l=t.mode||this.mode,c=t.redirect||this.redirect,p=t.credentials||this.credentials,h=t.referrer||this.referrer,_=t.integrity||this.integrity,v=t.transferCache??this.transferCache,y=t.timeout??this.timeout,T=t.body!==void 0?t.body:this.body,F=t.withCredentials??this.withCredentials,L=t.reportProgress??this.reportProgress,ve=t.headers||this.headers,Ve=t.params||this.params,_e=t.context??this.context;return t.setHeaders!==void 0&&(ve=Object.keys(t.setHeaders).reduce((Lt,vt)=>Lt.set(vt,t.setHeaders[vt]),ve)),t.setParams&&(Ve=Object.keys(t.setParams).reduce((Lt,vt)=>Lt.set(vt,t.setParams[vt]),Ve)),new n(e,i,T,{params:Ve,headers:ve,context:_e,reportProgress:L,responseType:r,withCredentials:F,transferCache:v,keepalive:o,cache:a,priority:s,timeout:y,mode:l,redirect:c,credentials:p,referrer:h,integrity:_})}},ba=(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})(ba||{}),Jl=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new vs,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},Eh=class n extends Jl{constructor(t={}){super(t)}type=ba.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})}},wu=class n extends Jl{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=ba.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})}},Zl=class extends Jl{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}},WB=200,GB=204;function xC(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 dt=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Kl)o=e;else{let l;r.headers instanceof vs?l=r.headers:l=new vs(r.headers);let c;r.params&&(r.params instanceof Eo?c=r.params:c=new Eo({fromObject:r.params})),o=new Kl(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let s=W(o).pipe(Mr(l=>this.handler.handle(l)));if(e instanceof Kl||r.observe==="events")return s;let a=s.pipe(ue(l=>l instanceof wu));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(z(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new O(2806,!1);return l.body}));case"blob":return a.pipe(z(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new O(2807,!1);return l.body}));case"text":return a.pipe(z(l=>{if(l.body!==null&&typeof l.body!="string")throw new O(2808,!1);return l.body}));case"json":default:return a.pipe(z(l=>l.body))}case"response":return a;default:throw new O(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new Eo().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,xC(r,i))}post(e,i,r={}){return this.request("POST",e,xC(r,i))}put(e,i,r={}){return this.request("PUT",e,xC(r,i))}static \u0275fac=function(i){return new(i||n)(te(Xl))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();var qB=new A("");function YB(n,t){return t(n)}function QB(n,t,e){return(i,r)=>pn(e,()=>t(i,o=>n(o,r)))}var GI=new A(""),qI=new A(""),YI=new A("",{providedIn:"root",factory:()=>!0});var Sh=(()=>{class n extends Xl{backend;injector;chain=null;pendingTasks=d(Pl);contributeToStability=d(YI);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(GI),...this.injector.get(qI,[])]));this.chain=i.reduceRight((r,o)=>QB(r,o,this.injector),YB)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(ao(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(te(Cu),te(pt))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();var KB=/^\)\]\}',?\n/,ZB=RegExp(`^${UI}:`,"m");function XB(n){return"responseURL"in n&&n.responseURL?n.responseURL:ZB.test(n.getAllResponseHeaders())?n.getResponseHeader(UI):null}var EC=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new O(-2800,!1);let i=this.xhrFactory;return W(null).pipe(lt(()=>new ge(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((F,L)=>s.setRequestHeader(F,L.join(","))),e.headers.has(HI)||s.setRequestHeader(HI,$B),!e.headers.has(zI)){let F=e.detectContentTypeHeader();F!==null&&s.setRequestHeader(zI,F)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let F=e.responseType.toLowerCase();s.responseType=F!=="json"?F:"text"}let a=e.serializeBody(),l=null,c=()=>{if(l!==null)return l;let F=s.statusText||"OK",L=new vs(s.getAllResponseHeaders()),ve=XB(s)||e.url;return l=new Eh({headers:L,status:s.status,statusText:F,url:ve}),l},p=()=>{let{headers:F,status:L,statusText:ve,url:Ve}=c(),_e=null;L!==GB&&(_e=typeof s.response>"u"?s.responseText:s.response),L===0&&(L=_e?WB:0);let Lt=L>=200&&L<300;if(e.responseType==="json"&&typeof _e=="string"){let vt=_e;_e=_e.replace(KB,"");try{_e=_e!==""?JSON.parse(_e):null}catch(St){_e=vt,Lt&&(Lt=!1,_e={error:St,text:_e})}}Lt?(o.next(new wu({body:_e,headers:F,status:L,statusText:ve,url:Ve||void 0})),o.complete()):o.error(new Zl({error:_e,headers:F,status:L,statusText:ve,url:Ve||void 0}))},h=F=>{let{url:L}=c(),ve=new Zl({error:F,status:s.status||0,statusText:s.statusText||"Unknown Error",url:L||void 0});o.error(ve)},_=h;e.timeout&&(_=F=>{let{url:L}=c(),ve=new Zl({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:L||void 0});o.error(ve)});let v=!1,y=F=>{v||(o.next(c()),v=!0);let L={type:ba.DownloadProgress,loaded:F.loaded};F.lengthComputable&&(L.total=F.total),e.responseType==="text"&&s.responseText&&(L.partialText=s.responseText),o.next(L)},T=F=>{let L={type:ba.UploadProgress,loaded:F.loaded};F.lengthComputable&&(L.total=F.total),o.next(L)};return s.addEventListener("load",p),s.addEventListener("error",h),s.addEventListener("timeout",_),s.addEventListener("abort",h),e.reportProgress&&(s.addEventListener("progress",y),a!==null&&s.upload&&s.upload.addEventListener("progress",T)),s.send(a),o.next({type:ba.Sent}),()=>{s.removeEventListener("error",h),s.removeEventListener("abort",h),s.removeEventListener("load",p),s.removeEventListener("timeout",_),e.reportProgress&&(s.removeEventListener("progress",y),a!==null&&s.upload&&s.upload.removeEventListener("progress",T)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(te(_a))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),QI=new A(""),JB="XSRF-TOKEN",e3=new A("",{providedIn:"root",factory:()=>JB}),t3="X-XSRF-TOKEN",n3=new A("",{providedIn:"root",factory:()=>t3}),xu=class{},i3=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=hu(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(te(le),te(e3))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();function r3(n,t){let e=n.url.toLowerCase();if(!d(QI)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=d(xu).getToken(),r=d(n3);return i!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}function SC(...n){let t=[dt,EC,Sh,{provide:Xl,useExisting:Sh},{provide:Cu,useFactory:()=>d(qB,{optional:!0})??d(EC)},{provide:GI,useValue:r3,multi:!0},{provide:QI,useValue:!0},{provide:xu,useClass:i3}];for(let e of n)t.push(...e.\u0275providers);return er(t)}var KI=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(i){return new(i||n)(te(le))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var bi=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=te(s3),r},providedIn:"root"})}return n})(),s3=(()=>{class n extends bi{_doc;constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case Cn.NONE:return i;case Cn.HTML:return go(i,"HTML")?Ni(i):Uf(this._doc,String(i)).toString();case Cn.STYLE:return go(i,"Style")?Ni(i):i;case Cn.SCRIPT:if(go(i,"Script"))return Ni(i);throw new O(5200,!1);case Cn.URL:return go(i,"URL")?Ni(i):Yd(String(i));case Cn.RESOURCE_URL:if(go(i,"ResourceURL"))return Ni(i);throw new O(5201,!1);default:throw new O(5202,!1)}}bypassSecurityTrustHtml(e){return Jy(e)}bypassSecurityTrustStyle(e){return e0(e)}bypassSecurityTrustScript(e){return t0(e)}bypassSecurityTrustUrl(e){return n0(e)}bypassSecurityTrustResourceUrl(e){return i0(e)}static \u0275fac=function(i){return new(i||n)(te(le))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ne="primary",Fu=Symbol("RouteTitle"),kC=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 wa(n){return new kC(n)}function ok(n,t,e){let i=e.path.split("/");if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.length<n.length))return null;let r={};for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(s[0]===":")r[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:n.slice(0,i.length),posParams:r}}function a3(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!zr(n[e],t[e]))return!1;return!0}function zr(n,t){let e=n?AC(n):void 0,i=t?AC(t):void 0;if(!e||!i||e.length!=i.length)return!1;let r;for(let o=0;o<e.length;o++)if(r=e[o],!sk(n[r],t[r]))return!1;return!0}function AC(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function sk(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),i=[...t].sort();return e.every((r,o)=>i[o]===r)}else return n===t}function ak(n){return n.length>0?n[n.length-1]:null}function So(n){return Pp(n)?n:_o(n)?yt(Promise.resolve(n)):W(n)}var l3={exact:ck,subset:dk},lk={exact:c3,subset:d3,ignored:()=>!0};function XI(n,t,e){return l3[e.paths](n.root,t.root,e.matrixParams)&&lk[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function c3(n,t){return zr(n,t)}function ck(n,t,e){if(!ya(n.segments,t.segments)||!Dh(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!ck(n.children[i],t.children[i],e))return!1;return!0}function d3(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>sk(n[e],t[e]))}function dk(n,t,e){return uk(n,t,t.segments,e)}function uk(n,t,e,i){if(n.segments.length>e.length){let r=n.segments.slice(0,e.length);return!(!ya(r,e)||t.hasChildren()||!Dh(r,e,i))}else if(n.segments.length===e.length){if(!ya(n.segments,e)||!Dh(n.segments,e,i))return!1;for(let r in t.children)if(!n.children[r]||!dk(n.children[r],t.children[r],i))return!1;return!0}else{let r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!ya(n.segments,r)||!Dh(n.segments,r,i)||!n.children[Ne]?!1:uk(n.children[Ne],t,o,i)}}function Dh(n,t,e){return t.every((i,r)=>lk[e](n[r].parameters,i.parameters))}var Ur=class{root;queryParams;fragment;_queryParamMap;constructor(t=new Ke([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=wa(this.queryParams),this._queryParamMap}toString(){return p3.serialize(this)}},Ke=class{segments;children;parent=null;constructor(t,e){this.segments=t,this.children=e,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Ih(this)}},_s=class{path;parameters;_parameterMap;constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=wa(this.parameters),this._parameterMap}toString(){return pk(this)}};function u3(n,t){return ya(n,t)&&n.every((e,i)=>zr(e.parameters,t[i].parameters))}function ya(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function m3(n,t){let e=[];return Object.entries(n.children).forEach(([i,r])=>{i===Ne&&(e=e.concat(t(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==Ne&&(e=e.concat(t(r,i)))}),e}var xa=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>new bs,providedIn:"root"})}return n})(),bs=class{parse(t){let e=new PC(t);return new Ur(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Eu(t.root,!0)}`,i=g3(t.queryParams),r=typeof t.fragment=="string"?`#${f3(t.fragment)}`:"";return`${e}${i}${r}`}},p3=new bs;function Ih(n){return n.segments.map(t=>pk(t)).join("/")}function Eu(n,t){if(!n.hasChildren())return Ih(n);if(t){let e=n.children[Ne]?Eu(n.children[Ne],!1):"",i=[];return Object.entries(n.children).forEach(([r,o])=>{r!==Ne&&i.push(`${r}:${Eu(o,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=m3(n,(i,r)=>r===Ne?[Eu(n.children[Ne],!1)]:[`${r}:${Eu(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[Ne]!=null?`${Ih(n)}/${e[0]}`:`${Ih(n)}/(${e.join("//")})`}}function mk(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Mh(n){return mk(n).replace(/%3B/gi,";")}function f3(n){return encodeURI(n)}function OC(n){return mk(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function kh(n){return decodeURIComponent(n)}function JI(n){return kh(n.replace(/\+/g,"%20"))}function pk(n){return`${OC(n.path)}${h3(n.parameters)}`}function h3(n){return Object.entries(n).map(([t,e])=>`;${OC(t)}=${OC(e)}`).join("")}function g3(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(r=>`${Mh(e)}=${Mh(r)}`).join("&"):`${Mh(e)}=${Mh(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var v3=/^[^\/()?;#]+/;function MC(n){let t=n.match(v3);return t?t[0]:""}var _3=/^[^\/()?;=#]+/;function b3(n){let t=n.match(_3);return t?t[0]:""}var y3=/^[^=?&#]+/;function C3(n){let t=n.match(y3);return t?t[0]:""}var w3=/^[^&#]+/;function x3(n){let t=n.match(w3);return t?t[0]:""}var PC=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ke([],{}):new Ke([],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 i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Ne]=new Ke(t,e)),i}parseSegment(){let t=MC(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new O(4009,!1);return this.capture(t),new _s(kh(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=b3(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let r=MC(this.remaining);r&&(i=r,this.capture(i))}t[kh(e)]=kh(i)}parseQueryParam(t){let e=C3(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let s=x3(this.remaining);s&&(i=s,this.capture(i))}let r=JI(e),o=JI(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=MC(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new O(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Ne);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[Ne]:new Ke([],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 O(4011,!1)}};function fk(n){return n.segments.length>0?new Ke([],{[Ne]:n}):n}function hk(n){let t={};for(let[i,r]of Object.entries(n.children)){let o=hk(r);if(i===Ne&&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[i]=o)}let e=new Ke(n.segments,t);return E3(e)}function E3(n){if(n.numberOfChildren===1&&n.children[Ne]){let t=n.children[Ne];return new Ke(n.segments.concat(t.segments),t.children)}return n}function oc(n){return n instanceof Ur}function gk(n,t,e=null,i=null){let r=vk(n);return _k(r,t,e,i)}function vk(n){let t;function e(o){let s={};for(let l of o.children){let c=e(l);s[l.outlet]=c}let a=new Ke(o.url,s);return o===n&&(t=a),a}let i=e(n.root),r=fk(i);return t??r}function _k(n,t,e,i){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return TC(r,r,r,e,i);let o=S3(t);if(o.toRoot())return TC(r,r,new Ke([],{}),e,i);let s=M3(o,r,n),a=s.processChildren?Mu(s.segmentGroup,s.index,o.commands):yk(s.segmentGroup,s.index,o.commands);return TC(r,s.segmentGroup,a,e,i)}function Ah(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Du(n){return typeof n=="object"&&n!=null&&n.outlets}function TC(n,t,e,i,r){let o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;n===t?s=e:s=bk(n,t,e);let a=fk(hk(s));return new Ur(a,o,r)}function bk(n,t,e){let i={};return Object.entries(n.children).forEach(([r,o])=>{o===t?i[r]=e:i[r]=bk(o,t,e)}),new Ke(n.segments,i)}var Oh=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Ah(i[0]))throw new O(4003,!1);let r=i.find(Du);if(r&&r!==ak(i))throw new O(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function S3(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new Oh(!0,0,n);let t=0,e=!1,i=n.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new Oh(e,t,i)}var nc=class{segmentGroup;processChildren;index;constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function M3(n,t,e){if(n.isAbsolute)return new nc(t,!0,0);if(!e)return new nc(t,!1,NaN);if(e.parent===null)return new nc(e,!0,0);let i=Ah(n.commands[0])?0:1,r=e.segments.length-1+i;return T3(e,r,n.numberOfDoubleDots)}function T3(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new O(4005,!1);r=i.segments.length}return new nc(i,!1,r-o)}function D3(n){return Du(n[0])?n[0].outlets:{[Ne]:n}}function yk(n,t,e){if(n??=new Ke([],{}),n.segments.length===0&&n.hasChildren())return Mu(n,t,e);let i=I3(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){let o=new Ke(n.segments.slice(0,i.pathIndex),{});return o.children[Ne]=new Ke(n.segments.slice(i.pathIndex),n.children),Mu(o,0,r)}else return i.match&&r.length===0?new Ke(n.segments,{}):i.match&&!n.hasChildren()?RC(n,t,e):i.match?Mu(n,0,r):RC(n,t,e)}function Mu(n,t,e){if(e.length===0)return new Ke(n.segments,{});{let i=D3(e),r={};if(Object.keys(i).some(o=>o!==Ne)&&n.children[Ne]&&n.numberOfChildren===1&&n.children[Ne].segments.length===0){let o=Mu(n.children[Ne],t,e);return new Ke(n.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=yk(n.children[o],t,s))}),Object.entries(n.children).forEach(([o,s])=>{i[o]===void 0&&(r[o]=s)}),new Ke(n.segments,r)}}function I3(n,t,e){let i=0,r=t,o={match:!1,pathIndex:0,commandIndex:0};for(;r<n.segments.length;){if(i>=e.length)return o;let s=n.segments[r],a=e[i];if(Du(a))break;let l=`${a}`,c=i<e.length-1?e[i+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!tk(l,c,s))return o;i+=2}else{if(!tk(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function RC(n,t,e){let i=n.segments.slice(0,t),r=0;for(;r<e.length;){let o=e[r];if(Du(o)){let l=k3(o.outlets);return new Ke(i,l)}if(r===0&&Ah(e[0])){let l=n.segments[t];i.push(new _s(l.path,ek(e[0]))),r++;continue}let s=Du(o)?o.outlets[Ne]:`${o}`,a=r<e.length-1?e[r+1]:null;s&&a&&Ah(a)?(i.push(new _s(s,ek(a))),r+=2):(i.push(new _s(s,{})),r++)}return new Ke(i,{})}function k3(n){let t={};return Object.entries(n).forEach(([e,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=RC(new Ke([],{}),0,i))}),t}function ek(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function tk(n,t,e){return n==e.path&&zr(t,e.parameters)}var ic="imperative",dn=(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})(dn||{}),Ci=class{id;url;constructor(t,e){this.id=t,this.url=e}},ys=class extends Ci{type=dn.NavigationStart;navigationTrigger;restoredState;constructor(t,e,i="imperative",r=null){super(t,e),this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},ur=class extends Ci{urlAfterRedirects;type=dn.NavigationEnd;constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Wn=(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})(Wn||{}),sc=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(sc||{}),Hr=class extends Ci{reason;code;type=dn.NavigationCancel;constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},$r=class extends Ci{reason;code;type=dn.NavigationSkipped;constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r}},ac=class extends Ci{error;target;type=dn.NavigationError;constructor(t,e,i,r){super(t,e),this.error=i,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Iu=class extends Ci{urlAfterRedirects;state;type=dn.RoutesRecognized;constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ph=class extends Ci{urlAfterRedirects;state;type=dn.GuardsCheckStart;constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Rh=class extends Ci{urlAfterRedirects;state;shouldActivate;type=dn.GuardsCheckEnd;constructor(t,e,i,r,o){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Nh=class extends Ci{urlAfterRedirects;state;type=dn.ResolveStart;constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Fh=class extends Ci{urlAfterRedirects;state;type=dn.ResolveEnd;constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Lh=class{route;type=dn.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},jh=class{route;type=dn.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Vh=class{snapshot;type=dn.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Bh=class{snapshot;type=dn.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},zh=class{snapshot;type=dn.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Hh=class{snapshot;type=dn.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},lc=class{routerEvent;position;anchor;type=dn.Scroll;constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},ku=class{},cc=class{url;navigationBehaviorOptions;constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function A3(n){return!(n instanceof ku)&&!(n instanceof cc)}function O3(n,t){return n.providers&&!n._injector&&(n._injector=Ul(n.providers,t,`Route: ${n.path}`)),n._injector??t}function dr(n){return n.outlet||Ne}function P3(n,t){let e=n.filter(i=>dr(i)===t);return e.push(...n.filter(i=>dr(i)!==t)),e}function mc(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 Uh=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return mc(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Ea(this.rootInjector)}},Ea=(()=>{class n{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,i){let r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Uh(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(i){return new(i||n)(te(pt))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),$h=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=NC(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=NC(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=FC(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return FC(t,this._root).map(e=>e.value)}};function NC(n,t){if(n===t.value)return t;for(let e of t.children){let i=NC(n,e);if(i)return i}return null}function FC(n,t){if(n===t.value)return[t];for(let e of t.children){let i=FC(n,e);if(i.length)return i.unshift(t),i}return[]}var yi=class{value;children;constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function tc(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var Au=class extends $h{snapshot;constructor(t,e){super(t),this.snapshot=e,$C(this,t)}toString(){return this.snapshot.toString()}};function Ck(n){let t=R3(n),e=new ae([new _s("",{})]),i=new ae({}),r=new ae({}),o=new ae({}),s=new ae(""),a=new wi(e,i,o,s,r,Ne,n,t.root);return a.snapshot=t.root,new Au(new yi(a,[]),t)}function R3(n){let t={},e={},i={},o=new Ca([],t,i,"",e,Ne,n,null,{});return new Ou("",new yi(o,[]))}var wi=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,e,i,r,o,s,a,l){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(z(c=>c[Fu]))??W(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(z(t=>wa(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(z(t=>wa(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Wh(n,t,e="emptyOnly"){let i,{routeConfig:r}=n;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:M(M({},t.params),n.params),data:M(M({},t.data),n.data),resolve:M(M(M(M({},n.data),t.data),r?.data),n._resolvedData)}:i={params:M({},n.params),data:M({},n.data),resolve:M(M({},n.data),n._resolvedData??{})},r&&xk(r)&&(i.resolve[Fu]=r.title),i}var Ca=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Fu]}constructor(t,e,i,r,o,s,a,l,c){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=wa(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=wa(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},Ou=class extends $h{url;constructor(t,e){super(e),this.url=t,$C(this,e)}toString(){return wk(this._root)}};function $C(n,t){t.value._routerState=n,t.children.forEach(e=>$C(n,e))}function wk(n){let t=n.children.length>0?` { ${n.children.map(wk).join(", ")} } `:"";return`${n.value}${t}`}function DC(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,zr(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),zr(t.params,e.params)||n.paramsSubject.next(e.params),a3(t.url,e.url)||n.urlSubject.next(e.url),zr(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function LC(n,t){let e=zr(n.params,t.params)&&u3(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||LC(n.parent,t.parent))}function xk(n){return typeof n.title=="string"||n.title===null}var Ek=new A(""),Lu=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Ne;activateEvents=new U;deactivateEvents=new U;attachEvents=new U;detachEvents=new U;routerOutletData=JD(void 0);parentContexts=d(Ea);location=d(Hn);changeDetector=d(Qe);inputBinder=d(ju,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(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 O(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new O(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new O(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,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,i){if(this.isActivated)throw new O(4013,!1);this._activatedRoute=e;let r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new jC(e,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[We]})}return n})(),jC=class{route;childContexts;parent;outletData;constructor(t,e,i,r){this.route=t,this.childContexts=e,this.parent=i,this.outletData=r}get(t,e){return t===wi?this.route:t===Ea?this.childContexts:t===Ek?this.outletData:this.parent.get(t,e)}},ju=new A(""),WC=(()=>{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:i}=e,r=In([i.queryParams,i.params,i.data]).pipe(lt(([o,s,a],l)=>(a=M(M(M({},o),s),a),l===0?W(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let s=rI(i.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,r)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),GC=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,r){i&1&&H(0,"router-outlet")},dependencies:[Lu],encapsulation:2})}return n})();function qC(n){let t=n.children&&n.children.map(qC),e=t?de(M({},n),{children:t}):M({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Ne&&(e.component=GC),e}function N3(n,t,e){let i=Pu(n,t._root,e?e._root:void 0);return new Au(i,t)}function Pu(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let r=F3(n,t,e);return new yi(i,r)}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=>Pu(n,a)),s}}let i=L3(t.value),r=t.children.map(o=>Pu(n,o));return new yi(i,r)}}function F3(n,t,e){return t.children.map(i=>{for(let r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Pu(n,i,r);return Pu(n,i)})}function L3(n){return new wi(new ae(n.url),new ae(n.params),new ae(n.queryParams),new ae(n.fragment),new ae(n.data),n.outlet,n.component,n)}var dc=class{redirectTo;navigationBehaviorOptions;constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Sk="ngNavigationCancelingError";function Gh(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=oc(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=Mk(!1,Wn.Redirect);return r.url=e,r.navigationBehaviorOptions=i,r}function Mk(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Sk]=!0,e.cancellationCode=t,e}function j3(n){return Tk(n)&&oc(n.url)}function Tk(n){return!!n&&n[Sk]}var V3=(n,t,e,i)=>z(r=>(new VC(t,r.targetRouterState,r.currentRouterState,e,i).activate(n),r)),VC=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,e,i,r,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),DC(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let r=tc(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){let r=t.value,o=e?e.value:null;if(r===o)if(r.component){let s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=tc(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){let s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=tc(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let r=tc(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new Hh(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Bh(t.value.snapshot))}activateRoutes(t,e,i){let r=t.value,o=e?e.value:null;if(DC(r),r===o)if(r.component){let s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,i);else if(r.component){let s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),DC(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,i)}},qh=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},rc=class{component;route;constructor(t,e){this.component=t,this.route=e}};function B3(n,t,e){let i=n._root,r=t?t._root:null;return Su(i,r,e,[i.value])}function z3(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function pc(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!lb(n)?n:t.get(n):i}function Su(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=tc(t);return n.children.forEach(s=>{H3(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Tu(a,e.getContext(s),r)),r}function H3(n,t,e,i,r={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 l=U3(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new qh(i)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Su(n,t,a?a.children:null,i,r):Su(n,t,e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new rc(a.outlet.component,s))}else s&&Tu(t,a,r),r.canActivateChecks.push(new qh(i)),o.component?Su(n,null,a?a.children:null,i,r):Su(n,null,e,i,r);return r}function U3(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!ya(n.url,t.url);case"pathParamsOrQueryParamsChange":return!ya(n.url,t.url)||!zr(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!LC(n,t)||!zr(n.queryParams,t.queryParams);case"paramsChange":default:return!LC(n,t)}}function Tu(n,t,e){let i=tc(n),r=n.value;Object.entries(i).forEach(([o,s])=>{r.component?t?Tu(s,t.children.getContext(o),e):Tu(s,null,e):Tu(s,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new rc(t.outlet.component,r)):e.canDeactivateChecks.push(new rc(null,r)):e.canDeactivateChecks.push(new rc(null,r))}function Vu(n){return typeof n=="function"}function $3(n){return typeof n=="boolean"}function W3(n){return n&&Vu(n.canLoad)}function G3(n){return n&&Vu(n.canActivate)}function q3(n){return n&&Vu(n.canActivateChild)}function Y3(n){return n&&Vu(n.canDeactivate)}function Q3(n){return n&&Vu(n.canMatch)}function Dk(n){return n instanceof fi||n?.name==="EmptyError"}var Th=Symbol("INITIAL_VALUE");function uc(){return lt(n=>In(n.map(t=>t.pipe(Ye(1),Ht(Th)))).pipe(z(t=>{for(let e of t)if(e!==!0){if(e===Th)return Th;if(e===!1||K3(e))return e}return!0}),ue(t=>t!==Th),Ye(1)))}function K3(n){return oc(n)||n instanceof dc}function Z3(n,t){return Ft(e=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?W(de(M({},e),{guardsResult:!0})):X3(s,i,r,n).pipe(Ft(a=>a&&$3(a)?J3(i,o,n,t):W(a)),z(a=>de(M({},e),{guardsResult:a})))})}function X3(n,t,e,i){return yt(n).pipe(Ft(r=>rz(r.component,r.route,e,t,i)),Ti(r=>r!==!0,!0))}function J3(n,t,e,i){return yt(t).pipe(Mr(r=>Ko(tz(r.route.parent,i),ez(r.route,i),iz(n,r.path,e),nz(n,r.route,e))),Ti(r=>r!==!0,!0))}function ez(n,t){return n!==null&&t&&t(new zh(n)),W(!0)}function tz(n,t){return n!==null&&t&&t(new Vh(n)),W(!0)}function nz(n,t,e){let i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||i.length===0)return W(!0);let r=i.map(o=>Zi(()=>{let s=mc(t)??e,a=pc(o,s),l=G3(a)?a.canActivate(t,n):pn(s,()=>a(t,n));return So(l).pipe(Ti())}));return W(r).pipe(uc())}function iz(n,t,e){let i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>z3(s)).filter(s=>s!==null).map(s=>Zi(()=>{let a=s.guards.map(l=>{let c=mc(s.node)??e,p=pc(l,c),h=q3(p)?p.canActivateChild(i,n):pn(c,()=>p(i,n));return So(h).pipe(Ti())});return W(a).pipe(uc())}));return W(o).pipe(uc())}function rz(n,t,e,i,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return W(!0);let s=o.map(a=>{let l=mc(t)??r,c=pc(a,l),p=Y3(c)?c.canDeactivate(n,t,e,i):pn(l,()=>c(n,t,e,i));return So(p).pipe(Ti())});return W(s).pipe(uc())}function oz(n,t,e,i){let r=t.canLoad;if(r===void 0||r.length===0)return W(!0);let o=r.map(s=>{let a=pc(s,n),l=W3(a)?a.canLoad(t,e):pn(n,()=>a(t,e));return So(l)});return W(o).pipe(uc(),Ik(i))}function Ik(n){return B_(Oe(t=>{if(typeof t!="boolean")throw Gh(n,t)}),z(t=>t===!0))}function sz(n,t,e,i){let r=t.canMatch;if(!r||r.length===0)return W(!0);let o=r.map(s=>{let a=pc(s,n),l=Q3(a)?a.canMatch(t,e):pn(n,()=>a(t,e));return So(l)});return W(o).pipe(uc(),Ik(i))}var Ru=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},Nu=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function ec(n){return pi(new Ru(n))}function az(n){return pi(new O(4e3,!1))}function lz(n){return pi(Mk(!1,Wn.GuardRejected))}var BC=class{urlSerializer;urlTree;constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return W(i);if(r.numberOfChildren>1||!r.children[Ne])return az(`${t.redirectTo}`);r=r.children[Ne]}}applyRedirectCommands(t,e,i,r,o){return cz(e,r,o).pipe(z(s=>{if(s instanceof Ur)throw new Nu(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),t,i);if(s[0]==="/")throw new Nu(a);return a}))}applyRedirectCreateUrlTree(t,e,i,r){let o=this.createSegmentGroup(t,e.root,i,r);return new Ur(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);i[r]=e[a]}else i[r]=o}),i}createSegmentGroup(t,e,i,r){let o=this.createSegments(t,e.segments,i,r),s={};return Object.entries(e.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(t,l,i,r)}),new Ke(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path[0]===":"?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){let r=i[e.path.substring(1)];if(!r)throw new O(4001,!1);return r}findOrReturn(t,e){let i=0;for(let r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}};function cz(n,t,e){if(typeof n=="string")return W(n);let i=n,{queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,params:c,data:p,title:h}=t;return So(pn(e,()=>i({params:c,data:p,queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,title:h})))}var zC={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function dz(n,t,e,i,r){let o=kk(n,t,e);return o.matched?(i=O3(t,i),sz(i,t,e,r).pipe(z(s=>s===!0?o:M({},zC)))):W(o)}function kk(n,t,e){if(t.path==="**")return uz(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?M({},zC):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||ok)(e,n,t);if(!r)return M({},zC);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?M(M({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function uz(n){return{matched:!0,parameters:n.length>0?ak(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function nk(n,t,e,i){return e.length>0&&fz(n,e,i)?{segmentGroup:new Ke(t,pz(i,new Ke(e,n.children))),slicedSegments:[]}:e.length===0&&hz(n,e,i)?{segmentGroup:new Ke(n.segments,mz(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new Ke(n.segments,n.children),slicedSegments:e}}function mz(n,t,e,i){let r={};for(let o of e)if(Qh(n,t,o)&&!i[dr(o)]){let s=new Ke([],{});r[dr(o)]=s}return M(M({},i),r)}function pz(n,t){let e={};e[Ne]=t;for(let i of n)if(i.path===""&&dr(i)!==Ne){let r=new Ke([],{});e[dr(i)]=r}return e}function fz(n,t,e){return e.some(i=>Qh(n,t,i)&&dr(i)!==Ne)}function hz(n,t,e){return e.some(i=>Qh(n,t,i))}function Qh(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function gz(n,t,e){return t.length===0&&!n.children[e]}var HC=class{};function vz(n,t,e,i,r,o,s="emptyOnly"){return new UC(n,t,e,i,r,s,o).recognize()}var _z=31,UC=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,e,i,r,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new BC(this.urlSerializer,this.urlTree)}noMatchError(t){return new O(4002,`'${t.segmentGroup}'`)}recognize(){let t=nk(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(z(({children:e,rootSnapshot:i})=>{let r=new yi(i,e),o=new Ou("",r),s=gk(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){let e=new Ca([],Object.freeze({}),Object.freeze(M({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Ne,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,Ne,e).pipe(z(i=>({children:i,rootSnapshot:e})),nn(i=>{if(i instanceof Nu)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Ru?this.noMatchError(i):i}))}processSegmentGroup(t,e,i,r,o){return i.segments.length===0&&i.hasChildren()?this.processChildren(t,e,i,o):this.processSegment(t,e,i,i.segments,r,!0,o).pipe(z(s=>s instanceof yi?[s]:[]))}processChildren(t,e,i,r){let o=[];for(let s of Object.keys(i.children))s==="primary"?o.unshift(s):o.push(s);return yt(o).pipe(Mr(s=>{let a=i.children[s],l=P3(e,s);return this.processSegmentGroup(t,l,a,s,r)}),Y_((s,a)=>(s.push(...a),s)),Zo(null),q_(),Ft(s=>{if(s===null)return ec(i);let a=Ak(s);return bz(a),W(a)}))}processSegment(t,e,i,r,o,s,a){return yt(e).pipe(Mr(l=>this.processSegmentAgainstRoute(l._injector??t,e,l,i,r,o,s,a).pipe(nn(c=>{if(c instanceof Ru)return W(null);throw c}))),Ti(l=>!!l),nn(l=>{if(Dk(l))return gz(i,r,o)?W(new HC):ec(i);throw l}))}processSegmentAgainstRoute(t,e,i,r,o,s,a,l){return dr(i)!==s&&(s===Ne||!Qh(r,o,i))?ec(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,i,o,s,l):ec(r)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s,a){let{matched:l,parameters:c,consumedSegments:p,positionalParamSegments:h,remainingSegments:_}=kk(e,r,o);if(!l)return ec(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>_z&&(this.allowRedirects=!1));let v=new Ca(o,c,Object.freeze(M({},this.urlTree.queryParams)),this.urlTree.fragment,ik(r),dr(r),r.component??r._loadedComponent??null,r,rk(r)),y=Wh(v,a,this.paramsInheritanceStrategy);return v.params=Object.freeze(y.params),v.data=Object.freeze(y.data),this.applyRedirects.applyRedirectCommands(p,r.redirectTo,h,v,t).pipe(lt(F=>this.applyRedirects.lineralizeSegments(r,F)),Ft(F=>this.processSegment(t,i,e,F.concat(_),s,!1,a)))}matchSegmentAgainstRoute(t,e,i,r,o,s){let a=dz(e,i,r,t,this.urlSerializer);return i.path==="**"&&(e.children={}),a.pipe(lt(l=>l.matched?(t=i._injector??t,this.getChildConfig(t,i,r).pipe(lt(({routes:c})=>{let p=i._loadedInjector??t,{parameters:h,consumedSegments:_,remainingSegments:v}=l,y=new Ca(_,h,Object.freeze(M({},this.urlTree.queryParams)),this.urlTree.fragment,ik(i),dr(i),i.component??i._loadedComponent??null,i,rk(i)),T=Wh(y,s,this.paramsInheritanceStrategy);y.params=Object.freeze(T.params),y.data=Object.freeze(T.data);let{segmentGroup:F,slicedSegments:L}=nk(e,_,v,c);if(L.length===0&&F.hasChildren())return this.processChildren(p,c,F,y).pipe(z(Ve=>new yi(y,Ve)));if(c.length===0&&L.length===0)return W(new yi(y,[]));let ve=dr(i)===o;return this.processSegment(p,c,F,L,ve?Ne:o,!0,y).pipe(z(Ve=>new yi(y,Ve instanceof yi?[Ve]:[])))}))):ec(e)))}getChildConfig(t,e,i){return e.children?W({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?W({routes:e._loadedRoutes,injector:e._loadedInjector}):oz(t,e,i,this.urlSerializer).pipe(Ft(r=>r?this.configLoader.loadChildren(t,e).pipe(Oe(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):lz(e))):W({routes:[],injector:t})}};function bz(n){n.sort((t,e)=>t.value.outlet===Ne?-1:e.value.outlet===Ne?1:t.value.outlet.localeCompare(e.value.outlet))}function yz(n){let t=n.value.routeConfig;return t&&t.path===""}function Ak(n){let t=[],e=new Set;for(let i of n){if(!yz(i)){t.push(i);continue}let r=t.find(o=>i.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...i.children),e.add(r)):t.push(i)}for(let i of e){let r=Ak(i.children);t.push(new yi(i.value,r))}return t.filter(i=>!e.has(i))}function ik(n){return n.data||{}}function rk(n){return n.resolve||{}}function Cz(n,t,e,i,r,o){return Ft(s=>vz(n,t,e,i,s.extractedUrl,r,o).pipe(z(({state:a,tree:l})=>de(M({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function wz(n,t){return Ft(e=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return W(e);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of Ok(l))s.add(c);let a=0;return yt(s).pipe(Mr(l=>o.has(l)?xz(l,i,n,t):(l.data=Wh(l,l.parent,n).resolve,W(void 0))),Oe(()=>a++),Cl(1),Ft(l=>a===s.size?W(e):mn))})}function Ok(n){let t=n.children.map(e=>Ok(e)).flat();return[n,...t]}function xz(n,t,e,i){let r=n.routeConfig,o=n._resolve;return r?.title!==void 0&&!xk(r)&&(o[Fu]=r.title),Zi(()=>(n.data=Wh(n,n.parent,e).resolve,Ez(o,n,t,i).pipe(z(s=>(n._resolvedData=s,n.data=M(M({},n.data),s),null)))))}function Ez(n,t,e,i){let r=AC(n);if(r.length===0)return W({});let o={};return yt(r).pipe(Ft(s=>Sz(n[s],t,e,i).pipe(Ti(),Oe(a=>{if(a instanceof dc)throw Gh(new bs,a);o[s]=a}))),Cl(1),z(()=>o),nn(s=>Dk(s)?mn:pi(s)))}function Sz(n,t,e,i){let r=mc(t)??i,o=pc(n,r),s=o.resolve?o.resolve(t,e):pn(r,()=>o(t,e));return So(s)}function IC(n){return lt(t=>{let e=n(t);return e?yt(e).pipe(z(()=>t)):W(t)})}var YC=(()=>{class n{buildTitle(e){let i,r=e.root;for(;r!==void 0;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Ne);return i}getResolvedTitleForRoute(e){return e.data[Fu]}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(Pk),providedIn:"root"})}return n})(),Pk=(()=>{class n extends YC{title;constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||n)(te(KI))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Sa=new A("",{providedIn:"root",factory:()=>({})}),Ma=new A(""),Kh=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=d(z0);loadComponent(e,i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return W(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let r=So(pn(e,()=>i.loadComponent())).pipe(z(Nk),lt(Fk),Oe(s=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=s}),ao(()=>{this.componentLoaders.delete(i)})),o=new vl(r,()=>new P).pipe(gl());return this.componentLoaders.set(i,o),o}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return W({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=Rk(i,this.compiler,e,this.onLoadEndListener).pipe(ao(()=>{this.childrenLoaders.delete(i)})),s=new vl(o,()=>new P).pipe(gl());return this.childrenLoaders.set(i,s),s}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Rk(n,t,e,i){return So(pn(e,()=>n.loadChildren())).pipe(z(Nk),lt(Fk),Ft(r=>r instanceof Kf||Array.isArray(r)?W(r):yt(t.compileModuleAsync(r))),z(r=>{i&&i(n);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(e).injector,s=o.get(Ma,[],{optional:!0,self:!0}).flat()),{routes:s.map(qC),injector:o}}))}function Mz(n){return n&&typeof n=="object"&&"default"in n}function Nk(n){return Mz(n)?n.default:n}function Fk(n){return W(n)}var Zh=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(Tz),providedIn:"root"})}return n})(),Tz=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),QC=new A(""),KC=new A("");function Lk(n,t,e){let i=n.get(KC),r=n.get(le);if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),Dz(n)));a.ready.catch(c=>{});let{onViewTransitionCreated:l}=i;return l&&pn(n,()=>l({transition:a,from:t,to:e})),s}function Dz(n){return new Promise(t=>{ln({read:()=>setTimeout(t)},{injector:n})})}var ZC=new A(""),Xh=(()=>{class n{currentNavigation=Fe(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new P;transitionAbortWithErrorSubject=new P;configLoader=d(Kh);environmentInjector=d(pt);destroyRef=d(an);urlSerializer=d(xa);rootContexts=d(Ea);location=d(Br);inputBindingEnabled=d(ju,{optional:!0})!==null;titleStrategy=d(YC);options=d(Sa,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=d(Zh);createViewTransition=d(QC,{optional:!0});navigationErrorHandler=d(ZC,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>W(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=r=>this.events.next(new Lh(r)),i=r=>this.events.next(new jh(r));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;Vt(()=>{this.transitions?.next(de(M({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:i}))})}setupNavigations(e){return this.transitions=new ae(null),this.transitions.pipe(ue(i=>i!==null),lt(i=>{let r=!1;return W(i).pipe(lt(o=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",Wn.SupersededByNewNavigation),mn;this.currentTransition=i,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?de(M({},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 $r(o.id,this.urlSerializer.serialize(o.rawUrl),"",sc.IgnoredSameUrlNavigation)),o.resolve(!1),mn;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return W(o).pipe(lt(l=>(this.events.next(new ys(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?mn:Promise.resolve(l))),Cz(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),Oe(l=>{i.targetSnapshot=l.targetSnapshot,i.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=l.urlAfterRedirects,p));let c=new Iu(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:l,extractedUrl:c,source:p,restoredState:h,extras:_}=o,v=new ys(l,this.urlSerializer.serialize(c),p,h);this.events.next(v);let y=Ck(this.rootComponentType).snapshot;return this.currentTransition=i=de(M({},o),{targetSnapshot:y,urlAfterRedirects:c,extras:de(M({},_),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(T=>(T.finalUrl=c,T)),W(i)}else return this.events.next(new $r(o.id,this.urlSerializer.serialize(o.extractedUrl),"",sc.IgnoredByUrlHandlingStrategy)),o.resolve(!1),mn}),Oe(o=>{let s=new Ph(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),z(o=>(this.currentTransition=i=de(M({},o),{guards:B3(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),i)),Z3(this.environmentInjector,o=>this.events.next(o)),Oe(o=>{if(i.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Gh(this.urlSerializer,o.guardsResult);let s=new Rh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),ue(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",Wn.GuardRejected),!1)),IC(o=>{if(o.guards.canActivateChecks.length!==0)return W(o).pipe(Oe(s=>{let a=new Nh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),lt(s=>{let a=!1;return W(s).pipe(wz(this.paramsInheritanceStrategy,this.environmentInjector),Oe({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",Wn.NoDataFromResolver)}}))}),Oe(s=>{let a=new Fh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),IC(o=>{let s=a=>{let l=[];if(a.routeConfig?.loadComponent){let c=mc(a)??this.environmentInjector;l.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(Oe(p=>{a.component=p}),z(()=>{})))}for(let c of a.children)l.push(...s(c));return l};return In(s(o.targetSnapshot.root)).pipe(Zo(null),Ye(1))}),IC(()=>this.afterPreactivation()),lt(()=>{let{currentSnapshot:o,targetSnapshot:s}=i,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?yt(a).pipe(z(()=>i)):W(i)}),z(o=>{let s=N3(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=i=de(M({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),i}),Oe(()=>{this.events.next(new ku)}),V3(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),Ye(1),$(new ge(o=>{let s=i.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(ue(()=>!r&&!i.targetRouterState),Oe(()=>{this.cancelNavigationTransition(i,i.abortController.signal.reason+"",Wn.Aborted)}))),Oe({next:o=>{r=!0,this.lastSuccessfulNavigation=Vt(this.currentNavigation),this.events.next(new ur(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),$(this.transitionAbortWithErrorSubject.pipe(Oe(o=>{throw o}))),ao(()=>{r||this.cancelNavigationTransition(i,"",Wn.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),nn(o=>{if(this.destroyed)return i.resolve(!1),mn;if(r=!0,Tk(o))this.events.next(new Hr(i.id,this.urlSerializer.serialize(i.extractedUrl),o.message,o.cancellationCode)),j3(o)?this.events.next(new cc(o.url,o.navigationBehaviorOptions)):i.resolve(!1);else{let s=new ac(i.id,this.urlSerializer.serialize(i.extractedUrl),o,i.targetSnapshot??void 0);try{let a=pn(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof dc){let{message:l,cancellationCode:c}=Gh(this.urlSerializer,a);this.events.next(new Hr(i.id,this.urlSerializer.serialize(i.extractedUrl),l,c)),this.events.next(new cc(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(a)}}return mn}))}))}cancelNavigationTransition(e,i,r){let o=new Hr(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);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))),i=Vt(this.currentNavigation),r=i?.targetBrowserUrl??i?.extractedUrl;return e.toString()!==r?.toString()&&!i?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Iz(n){return n!==ic}var jk=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(kz),providedIn:"root"})}return n})(),Yh=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},kz=(()=>{class n extends Yh{static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Vk=(()=>{class n{urlSerializer=d(xa);options=d(Sa,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=d(Br);urlHandlingStrategy=d(Zh);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Ur;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:i,targetBrowserUrl:r}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,i):i,s=r??o;return s instanceof Ur?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:i,initialUrl:r}){i&&e?(this.currentUrlTree=i,this.rawUrlTree=this.urlHandlingStrategy.merge(i,r),this.routerState=e):this.rawUrlTree=r}routerState=Ck(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(i){return new(i||n)};static \u0275prov=x({token:n,factory:()=>d(Az),providedIn:"root"})}return n})(),Az=(()=>{class n extends Vk{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(i=>{i.type==="popstate"&&setTimeout(()=>{e(i.url,i.state,"popstate")})})}handleRouterEvent(e,i){e instanceof ys?this.updateStateMemento():e instanceof $r?this.commitTransition(i):e instanceof Iu?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof ku?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof Hr&&e.code!==Wn.SupersededByNewNavigation&&e.code!==Wn.Redirect?this.restoreHistory(i):e instanceof ac?this.restoreHistory(i,!0):e instanceof ur&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:i,id:r}){let{replaceUrl:o,state:s}=i;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,l=M(M({},s),this.generateNgRouterState(r,a));this.location.replaceState(e,"",l)}else{let a=M(M({},s),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Jh(n,t){n.events.pipe(ue(e=>e instanceof ur||e instanceof Hr||e instanceof ac||e instanceof $r),z(e=>e instanceof ur||e instanceof $r?0:(e instanceof Hr?e.code===Wn.Redirect||e.code===Wn.SupersededByNewNavigation:!1)?2:1),ue(e=>e!==2),Ye(1)).subscribe(()=>{t()})}var Oz={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Pz={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},xn=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=d(Jf);stateManager=d(Vk);options=d(Sa,{optional:!0})||{};pendingTasks=d(Nr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=d(Xh);urlSerializer=d(xa);location=d(Br);urlHandlingStrategy=d(Zh);injector=d(pt);_events=new P;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=d(jk);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=d(Ma,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!d(ju,{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 ze;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let r=this.navigationTransitions.currentTransition,o=Vt(this.navigationTransitions.currentNavigation);if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(i,o),i instanceof Hr&&i.code!==Wn.Redirect&&i.code!==Wn.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof ur)this.navigated=!0;else if(i instanceof cc){let s=i.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),l=M({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Iz(r.source)},s);this.scheduleNavigation(a,ic,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}A3(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortWithErrorSubject.next(r)}});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),ic,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i,r)=>{this.navigateToSyncWithBrowser(e,r,i)})}navigateToSyncWithBrowser(e,i,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=M({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o).catch(l=>{this.disposed||this.injector.get(zn)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Vt(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(qC),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,i={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=M(M({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let h;try{let _=r?r.snapshot:this.routerState.snapshot.root;h=vk(_)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),h=this.currentUrlTree.root}return _k(h,e,p,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){let r=oc(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,ic,null,i)}navigate(e,i={skipLocationChange:!1}){return Rz(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let r;if(i===!0?r=M({},Oz):i===!1?r=M({},Pz):r=i,oc(e))return XI(this.currentUrlTree,e,r);let o=this.parseUrl(e);return XI(this.currentUrlTree,o,r)}removeEmptyProps(e){return Object.entries(e).reduce((i,[r,o])=>(o!=null&&(i[r]=o),i),{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((h,_)=>{a=h,l=_});let p=this.pendingTasks.add();return Jh(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(h=>Promise.reject(h))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Rz(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new O(4008,!1)}var Bu=class{};var Bk=(()=>{class n{router;injector;preloadingStrategy;loader;subscription;constructor(e,i,r,o){this.router=e,this.injector=i,this.preloadingStrategy=r,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(ue(e=>e instanceof ur),Mr(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let r=[];for(let o of i){o.providers&&!o._injector&&(o._injector=Ul(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)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return yt(r).pipe(Qo())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;i.loadChildren&&i.canLoad===void 0?r=this.loader.loadChildren(e,i):r=W(null);let o=r.pipe(Ft(s=>s===null?W(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(i.loadComponent&&!i._loadedComponent){let s=this.loader.loadComponent(e,i);return yt([o,s]).pipe(Qo())}else return o})}static \u0275fac=function(i){return new(i||n)(te(xn),te(pt),te(Bu),te(Kh))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zk=new A(""),Nz=(()=>{class n{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=ic;restoredId=0;store={};constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,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 ys?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof ur?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof $r&&e.code===sc.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 lc&&(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,i){this.zone.runOutsideAngular(()=>pe(this,null,function*(){yield new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new lc(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(i){b0()};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();function JC(n,...t){return er([{provide:Ma,multi:!0,useValue:n},[],{provide:wi,useFactory:Hk,deps:[xn]},{provide:tu,multi:!0,useFactory:Uk},t.map(e=>e.\u0275providers)])}function Hk(n){return n.routerState.root}function zu(n,t){return{\u0275kind:n,\u0275providers:t}}function Uk(){let n=d(me);return t=>{let e=n.get(Un);if(t!==e.components[0])return;let i=n.get(xn),r=n.get($k);n.get(ew)===1&&i.initialNavigation(),n.get(qk,null,{optional:!0})?.setUpPreloading(),n.get(zk,null,{optional:!0})?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var $k=new A("",{factory:()=>new P}),ew=new A("",{providedIn:"root",factory:()=>1});function Wk(){let n=[{provide:Bf,useValue:!0},{provide:ew,useValue:0},th(()=>{let t=d(me);return t.get(nC,Promise.resolve()).then(()=>new Promise(i=>{let r=t.get(xn),o=t.get($k);Jh(r,()=>{i(!0)}),t.get(Xh).afterPreactivation=()=>(i(!0),o.closed?W(void 0):o),r.initialNavigation()}))})];return zu(2,n)}function Gk(){let n=[th(()=>{d(xn).setUpLocationChangeListener()}),{provide:ew,useValue:2}];return zu(3,n)}var qk=new A("");function Yk(n){return zu(0,[{provide:qk,useExisting:Bk},{provide:Bu,useExisting:n}])}function Qk(){return zu(8,[WC,{provide:ju,useExisting:WC}])}function Kk(n){gi("NgRouterViewTransitions");let t=[{provide:QC,useValue:Lk},{provide:KC,useValue:M({skipNextTransition:!!n?.skipInitialTransition},n)}];return zu(9,t)}var Zk=[Br,{provide:xa,useClass:bs},xn,Ea,{provide:wi,useFactory:Hk,deps:[xn]},Kh,[]],tw=(()=>{class n{constructor(){}static forRoot(e,i){return{ngModule:n,providers:[Zk,[],{provide:Ma,multi:!0,useValue:e},[],i?.errorHandler?{provide:ZC,useValue:i.errorHandler}:[],{provide:Sa,useValue:i||{}},i?.useHash?Lz():jz(),Fz(),i?.preloadingStrategy?Yk(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?Vz(i):[],i?.bindToComponentInputs?Qk().\u0275providers:[],i?.enableViewTransitions?Kk().\u0275providers:[],Bz()]}}static forChild(e){return{ngModule:n,providers:[{provide:Ma,multi:!0,useValue:e}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();function Fz(){return{provide:zk,useFactory:()=>{let n=d(DI),t=d(Y),e=d(Sa),i=d(Xh),r=d(xa);return e.scrollOffset&&n.setOffset(e.scrollOffset),new Nz(r,i,n,t,e)}}}function Lz(){return{provide:Co,useClass:cC}}function jz(){return{provide:Co,useClass:ch}}function Vz(n){return[n.initialNavigation==="disabled"?Gk().\u0275providers:[],n.initialNavigation==="enabledBlocking"?Wk().\u0275providers:[]]}var XC=new A("");function Bz(){return[{provide:XC,useFactory:Uk},{provide:tu,multi:!0,useExisting:XC}]}var Pe=(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})(Pe||{}),Vi="*";function nw(n,t){return{type:Pe.Trigger,name:n,definitions:t,options:{}}}function eg(n,t=null){return{type:Pe.Animate,styles:t,timings:n}}function Xk(n,t=null){return{type:Pe.Sequence,steps:n,options:t}}function Cs(n){return{type:Pe.Style,styles:n,offset:null}}function tg(n,t,e=null){return{type:Pe.Transition,expr:n,animation:t,options:e}}var Wr=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(i=>i()),e.length=0}},Ta=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(t){this.players=t;let e=0,i=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(i=>{let r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){let t=this.players.reduce((e,i)=>e===null||i.totalTime>e.totalTime?i: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(i=>i()),e.length=0}},fc="!";function Jk(n){return new O(3e3,!1)}function Uz(){return new O(3100,!1)}function $z(){return new O(3101,!1)}function Wz(n){return new O(3001,!1)}function Gz(n){return new O(3003,!1)}function qz(n){return new O(3004,!1)}function tA(n,t){return new O(3005,!1)}function nA(){return new O(3006,!1)}function iA(){return new O(3007,!1)}function rA(n,t){return new O(3008,!1)}function oA(n){return new O(3002,!1)}function sA(n,t,e,i,r){return new O(3010,!1)}function aA(){return new O(3011,!1)}function lA(){return new O(3012,!1)}function cA(){return new O(3200,!1)}function dA(){return new O(3202,!1)}function uA(){return new O(3013,!1)}function mA(n){return new O(3014,!1)}function pA(n){return new O(3015,!1)}function fA(n){return new O(3016,!1)}function hA(n,t){return new O(3404,!1)}function Yz(n){return new O(3502,!1)}function gA(n){return new O(3503,!1)}function vA(){return new O(3300,!1)}function _A(n){return new O(3504,!1)}function bA(n){return new O(3301,!1)}function yA(n,t){return new O(3302,!1)}function CA(n){return new O(3303,!1)}function wA(n,t){return new O(3400,!1)}function xA(n){return new O(3401,!1)}function EA(n){return new O(3402,!1)}function SA(n,t){return new O(3505,!1)}function Mo(n){switch(n.length){case 0:return new Wr;case 1:return n[0];default:return new Ta(n)}}function sw(n,t,e=new Map,i=new Map){let r=[],o=[],s=-1,a=null;if(t.forEach(l=>{let c=l.get("offset"),p=c==s,h=p&&a||new Map;l.forEach((_,v)=>{let y=v,T=_;if(v!=="offset")switch(y=n.normalizePropertyName(y,r),T){case fc:T=e.get(v);break;case Vi:T=i.get(v);break;default:T=n.normalizeStyleValue(v,y,T,r);break}h.set(y,T)}),p||o.push(h),a=h,s=c}),r.length)throw Yz(r);return o}function ng(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&iw(e,"start",n)));break;case"done":n.onDone(()=>i(e&&iw(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&iw(e,"destroy",n)));break}}function iw(n,t,e){let i=e.totalTime,r=!!e.disabled,o=ig(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,i??n.totalTime,r),s=n._data;return s!=null&&(o._data=s),o}function ig(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function ci(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function aw(n){let t=n.indexOf(":"),e=n.substring(1,t),i=n.slice(t+1);return[e,i]}var Qz=typeof document>"u"?null:document.documentElement;function rg(n){let t=n.parentNode||n.host||null;return t===Qz?null:t}function Kz(n){return n.substring(1,6)=="ebkit"}var Da=null,eA=!1;function MA(n){Da||(Da=Zz()||{},eA=Da.style?"WebkitAppearance"in Da.style:!1);let t=!0;return Da.style&&!Kz(n)&&(t=n in Da.style,!t&&eA&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Da.style)),t}function Zz(){return typeof document<"u"?document.body:null}function lw(n,t){for(;t;){if(t===n)return!0;t=rg(t)}return!1}function cw(n,t,e){if(e)return Array.from(n.querySelectorAll(t));let i=n.querySelector(t);return i?[i]:[]}var Xz=1e3,dw="{{",Jz="}}",uw="ng-enter",og="ng-leave",Hu="ng-trigger",Uu=".ng-trigger",mw="ng-animating",sg=".ng-animating";function Gr(n){if(typeof n=="number")return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:rw(parseFloat(t[1]),t[2])}function rw(n,t){switch(t){case"s":return n*Xz;default:return n}}function $u(n,t,e){return n.hasOwnProperty("duration")?n:tH(n,t,e)}var eH=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function tH(n,t,e){let i,r=0,o="";if(typeof n=="string"){let s=n.match(eH);if(s===null)return t.push(Jk(n)),{duration:0,delay:0,easing:""};i=rw(parseFloat(s[1]),s[2]);let a=s[3];a!=null&&(r=rw(parseFloat(a),s[4]));let l=s[5];l&&(o=l)}else i=n;if(!e){let s=!1,a=t.length;i<0&&(t.push(Uz()),s=!0),r<0&&(t.push($z()),s=!0),s&&t.splice(a,0,Jk(n))}return{duration:i,delay:r,easing:o}}function TA(n){return n.length?n[0]instanceof Map?n:n.map(t=>new Map(Object.entries(t))):[]}function mr(n,t,e){t.forEach((i,r)=>{let o=ag(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i})}function ws(n,t){t.forEach((e,i)=>{let r=ag(i);n.style[r]=""})}function hc(n){return Array.isArray(n)?n.length==1?n[0]:Xk(n):n}function DA(n,t,e){let i=t.params||{},r=pw(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(Wz(o))})}var ow=new RegExp(`${dw}\\s*(.+?)\\s*${Jz}`,"g");function pw(n){let t=[];if(typeof n=="string"){let e;for(;e=ow.exec(n);)t.push(e[1]);ow.lastIndex=0}return t}function gc(n,t,e){let i=`${n}`,r=i.replace(ow,(o,s)=>{let a=t[s];return a==null&&(e.push(Gz(s)),a=""),a.toString()});return r==i?n:r}var nH=/-+([a-z0-9])/g;function ag(n){return n.replace(nH,(...t)=>t[1].toUpperCase())}function IA(n,t){return n===0||t===0}function kA(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;o<t.length;o++){let s=t[o];r.forEach(a=>s.set(a,lg(n,a)))}}return t}function di(n,t,e){switch(t.type){case Pe.Trigger:return n.visitTrigger(t,e);case Pe.State:return n.visitState(t,e);case Pe.Transition:return n.visitTransition(t,e);case Pe.Sequence:return n.visitSequence(t,e);case Pe.Group:return n.visitGroup(t,e);case Pe.Animate:return n.visitAnimate(t,e);case Pe.Keyframes:return n.visitKeyframes(t,e);case Pe.Style:return n.visitStyle(t,e);case Pe.Reference:return n.visitReference(t,e);case Pe.AnimateChild:return n.visitAnimateChild(t,e);case Pe.AnimateRef:return n.visitAnimateRef(t,e);case Pe.Query:return n.visitQuery(t,e);case Pe.Stagger:return n.visitStagger(t,e);default:throw qz(t.type)}}function lg(n,t){return window.getComputedStyle(n)[t]}var kw=(()=>{class n{validateStyleProperty(e){return MA(e)}containsElement(e,i){return lw(e,i)}getParentElement(e){return rg(e)}query(e,i,r){return cw(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new Wr(r,o)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})(),ka=class{static NOOP=new kw},Aa=class{};var iH=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"]),pg=class extends Aa{normalizePropertyName(t,e){return ag(t)}normalizeStyleValue(t,e,i,r){let o="",s=i.toString().trim();if(iH.has(e)&&i!==0&&i!=="0")if(typeof i=="number")o="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(tA(t,i))}return s+o}};var fg="*";function rH(n,t){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(i=>oH(i,e,t)):e.push(n),e}function oH(n,t,e){if(n[0]==":"){let l=sH(n,e);if(typeof l=="function"){t.push(l);return}n=l}let i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return e.push(pA(n)),t;let r=i[1],o=i[2],s=i[3];t.push(AA(r,s));let a=r==fg&&s==fg;o[0]=="<"&&!a&&t.push(AA(s,r))}function sH(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i)<parseFloat(e);default:return t.push(fA(n)),"* => *"}}var cg=new Set(["true","1"]),dg=new Set(["false","0"]);function AA(n,t){let e=cg.has(n)||dg.has(n),i=cg.has(t)||dg.has(t);return(r,o)=>{let s=n==fg||n==r,a=t==fg||t==o;return!s&&e&&typeof r=="boolean"&&(s=r?cg.has(n):dg.has(n)),!a&&i&&typeof o=="boolean"&&(a=o?cg.has(t):dg.has(t)),s&&a}}var zA=":self",aH=new RegExp(`s*${zA}s*,?`,"g");function HA(n,t,e,i){return new bw(n).build(t,e,i)}var OA="",bw=class{_driver;constructor(t){this._driver=t}build(t,e,i){let r=new yw(e);return this._resetContextStyleTimingState(r),di(this,hc(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector=OA,t.collectedStyles=new Map,t.collectedStyles.set(OA,new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0,o=[],s=[];return t.name.charAt(0)=="@"&&e.errors.push(nA()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),a.type==Pe.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(p=>{l.name=p,o.push(this.visitState(l,e))}),l.name=c}else if(a.type==Pe.Transition){let l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(iA())}),{type:Pe.Trigger,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){let i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){let o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{pw(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&e.errors.push(rA(t.name,[...o.values()]))}return{type:Pe.State,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;let i=di(this,hc(t.animation),e),r=rH(t.expr,e.errors);return{type:Pe.Transition,matchers:r,animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Ia(t.options)}}visitSequence(t,e){return{type:Pe.Sequence,steps:t.steps.map(i=>di(this,i,e)),options:Ia(t.options)}}visitGroup(t,e){let i=e.currentTime,r=0,o=t.steps.map(s=>{e.currentTime=i;let a=di(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:Pe.Group,steps:o,options:Ia(t.options)}}visitAnimate(t,e){let i=uH(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:Cs({});if(o.type==Pe.Keyframes)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;let c={};i.easing&&(c.easing=i.easing),s=Cs(c)}e.currentTime+=i.duration+i.delay;let l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:Pe.Animate,timings:i,style:r,options:null}}visitStyle(t,e){let i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){let i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)typeof a=="string"?a===Vi?i.push(a):e.errors.push(oA(a)):i.push(new Map(Object.entries(a)));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let l of a.values())if(l.toString().indexOf(dw)>=0){o=!0;break}}}),{type:Pe.Style,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){let i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),p=c.get(l),h=!0;p&&(o!=r&&o>=p.startTime&&r<=p.endTime&&(e.errors.push(sA(l,p.startTime,p.endTime,o,r)),h=!1),o=p.startTime),h&&c.set(l,{startTime:o,endTime:r}),e.options&&DA(a,e.options,e.errors)})})}visitKeyframes(t,e){let i={type:Pe.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(aA()),i;let r=1,o=0,s=[],a=!1,l=!1,c=0,p=t.steps.map(L=>{let ve=this._makeStyleAst(L,e),Ve=ve.offset!=null?ve.offset:dH(ve.styles),_e=0;return Ve!=null&&(o++,_e=ve.offset=Ve),l=l||_e<0||_e>1,a=a||_e<c,c=_e,s.push(_e),ve});l&&e.errors.push(lA()),a&&e.errors.push(cA());let h=t.steps.length,_=0;o>0&&o<h?e.errors.push(dA()):o==0&&(_=r/(h-1));let v=h-1,y=e.currentTime,T=e.currentAnimateTimings,F=T.duration;return p.forEach((L,ve)=>{let Ve=_>0?ve==v?1:_*ve:s[ve],_e=Ve*F;e.currentTime=y+T.delay+_e,T.duration=_e,this._validateStyleAst(L,e),L.offset=Ve,i.styles.push(L)}),i}visitReference(t,e){return{type:Pe.Reference,animation:di(this,hc(t.animation),e),options:Ia(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:Pe.AnimateChild,options:Ia(t.options)}}visitAnimateRef(t,e){return{type:Pe.AnimateRef,animation:this.visitReference(t.animation,e),options:Ia(t.options)}}visitQuery(t,e){let i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;let[o,s]=lH(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,ci(e.collectedStyles,e.currentQuerySelector,new Map);let a=di(this,hc(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:Pe.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Ia(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(uA());let i=t.timings==="full"?{duration:0,delay:0,easing:"full"}:$u(t.timings,e.errors,!0);return{type:Pe.Stagger,animation:di(this,hc(t.animation),e),timings:i,options:null}}};function lH(n){let t=!!n.split(/\s*,\s*/).find(e=>e==zA);return t&&(n=n.replace(aH,"")),n=n.replace(/@\*/g,Uu).replace(/@\w+/g,e=>Uu+"-"+e.slice(1)).replace(/:animating/g,sg),[n,t]}function cH(n){return n?M({},n):null}var yw=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 dH(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 i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}function uH(n,t){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let o=$u(n,t).duration;return fw(o,0,"")}let e=n;if(e.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=fw(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=$u(e,t);return fw(r.duration,r.delay,r.easing)}function Ia(n){return n?(n=M({},n),n.params&&(n.params=cH(n.params))):n={},n}function fw(n,t,e){return{duration:n,delay:t,easing:e}}function Aw(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Gu=class{_map=new Map;get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}},mH=1,pH=":enter",fH=new RegExp(pH,"g"),hH=":leave",gH=new RegExp(hH,"g");function UA(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return new Cw().buildKeyframes(n,t,e,i,r,o,s,a,l,c)}var Cw=class{buildKeyframes(t,e,i,r,o,s,a,l,c,p=[]){c=c||new Gu;let h=new ww(t,e,c,r,o,p,[]);h.options=l;let _=l.delay?Gr(l.delay):0;h.currentTimeline.delayNextStep(_),h.currentTimeline.setStyles([s],null,h.errors,l),di(this,i,h);let v=h.timelines.filter(y=>y.containsAnimation());if(v.length&&a.size){let y;for(let T=v.length-1;T>=0;T--){let F=v[T];if(F.element===e){y=F;break}}y&&!y.allowOnlyTimelineStyles()&&y.setStyles([a],null,h.errors,l)}return v.length?v.map(y=>y.buildKeyframes()):[Aw(e,[],[],[],0,_,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){let i=e.subInstructions.get(e.element);if(i){let r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){let i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(let r of t){let o=r?.delay;if(o){let s=typeof o=="number"?o:Gr(gc(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime,s=i.duration!=null?Gr(i.duration):null,a=i.delay!=null?Gr(i.delay):null;return s!==0&&t.forEach(l=>{let c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),di(this,t.animation,e),e.previousNode=t}visitSequence(t,e){let i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==Pe.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=hg);let s=Gr(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>di(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){let i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?Gr(t.options.delay):0;t.steps.forEach(s=>{let a=e.createSubContext(t.options);o&&a.delayNextStep(o),di(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let i=t.strValue,r=e.params?gc(i,e.params,e.errors):i;return $u(r,e.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){let i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());let o=t.style;o.type==Pe.Keyframes?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){let i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();let o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){let i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){let i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Gr(r.delay):0;o&&(e.previousNode.type===Pe.Style||i==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=hg);let s=i,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,p)=>{e.currentQueryIndex=p;let h=e.createSubContext(t.options,c);o&&h.delayNextStep(o),c===e.element&&(l=h.currentTimeline),di(this,t.animation,h),h.currentTimeline.applyStylesToKeyframe();let _=h.currentTimeline.currentTime;s=Math.max(s,_)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1),l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let p=e.currentTimeline;l&&p.delayNextStep(l);let h=p.currentTime;di(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-h+(r.startTime-i.currentTimeline.startTime)}},hg={},ww=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=hg;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.currentTimeline=l||new gg(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;let i=t,r=this.options;i.duration!=null&&(r.duration=Gr(i.duration)),i.delay!=null&&(r.delay=Gr(i.delay));let o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=gc(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let e=this.options.params;if(e){let i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){let r=e||this.element,o=new n(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=hg,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){let r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new xw(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=t.replace(fH,"."+this._enterClassName),t=t.replace(gH,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,t,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&a.length==0&&s.push(mA(e)),a}},gg=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,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,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+=mH,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,i]of this._globalTimelineStyles)this._backFill.set(e,i||Vi),this._currentKeyframe.set(e,Vi);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},s=vH(t,this._globalTimelineStyles);for(let[a,l]of s){let c=gc(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Vi),this._updateStyle(a,c)}}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,i)=>{let r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,e=new Set,i=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((p,h)=>{p===fc?t.add(h):p===Vi&&e.add(h)}),i||c.set("offset",l/this.duration),r.push(c)});let o=[...t.values()],s=[...e.values()];if(i){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Aw(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},xw=class extends gg{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],s=i+e,a=e/s,l=new Map(t[0]);l.set("offset",0),o.push(l);let c=new Map(t[0]);c.set("offset",PA(a)),o.push(c);let p=t.length-1;for(let h=1;h<=p;h++){let _=new Map(t[h]),v=_.get("offset"),y=e+v*i;_.set("offset",PA(y/s)),o.push(_)}i=s,e=0,r="",t=o}return Aw(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}};function PA(n,t=3){let e=Math.pow(10,t-1);return Math.round(n*e)/e}function vH(n,t){let e=new Map,i;return n.forEach(r=>{if(r==="*"){i??=t.keys();for(let o of i)e.set(o,Vi)}else for(let[o,s]of r)e.set(o,s)}),e}function RA(n,t,e,i,r,o,s,a,l,c,p,h,_){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:p,totalTime:h,errors:_}}var hw={},vg=class{_triggerName;ast;_stateStyles;constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return _H(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return t!==void 0&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,p){let h=[],_=this.ast.options&&this.ast.options.params||hw,v=a&&a.params||hw,y=this.buildStyles(i,v,h),T=l&&l.params||hw,F=this.buildStyles(r,T,h),L=new Set,ve=new Map,Ve=new Map,_e=r==="void",Lt={params:$A(T,_),delay:this.ast.options?.delay},vt=p?[]:UA(t,e,this.ast.animation,o,s,y,F,Lt,c,h),St=0;return vt.forEach(Sn=>{St=Math.max(Sn.duration+Sn.delay,St)}),h.length?RA(e,this._triggerName,i,r,_e,y,F,[],[],ve,Ve,St,h):(vt.forEach(Sn=>{let io=Sn.element,Wo=ci(ve,io,new Set);Sn.preStyleProps.forEach(Yi=>Wo.add(Yi));let un=ci(Ve,io,new Set);Sn.postStyleProps.forEach(Yi=>un.add(Yi)),io!==e&&L.add(io)}),RA(e,this._triggerName,i,r,_e,y,F,vt,[...L.values()],ve,Ve,St))}};function _H(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}function $A(n,t){let e=M({},t);return Object.entries(n).forEach(([i,r])=>{r!=null&&(e[i]=r)}),e}var Ew=class{styles;defaultParams;normalizer;constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){let i=new Map,r=$A(t,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=gc(s,r,e));let l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}};function bH(n,t,e){return new Sw(n,t,e)}var Sw=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,e.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new Ew(r.style,o,i))}),NA(this.states,"true","1"),NA(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new vg(t,r,this.states))}),this.fallbackTransition=yH(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}};function yH(n,t,e){let i=[(s,a)=>!0],r={type:Pe.Sequence,steps:[],options:null},o={type:Pe.Transition,animation:r,matchers:i,options:null,queryCount:0,depCount:0};return new vg(n,o,t)}function NA(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 CH=new Gu,Mw=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i}register(t,e){let i=[],r=[],o=HA(this._driver,e,i,r);if(i.length)throw gA(i);this._animations.set(t,o)}_buildPlayer(t,e,i){let r=t.element,o=sw(this._normalizer,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){let r=[],o=this._animations.get(t),s,a=new Map;if(o?(s=UA(this._driver,e,o,uw,og,new Map,new Map,i,CH,r),s.forEach(p=>{let h=ci(a,p.element,new Map);p.postStyleProps.forEach(_=>h.set(_,null))})):(r.push(vA()),s=[]),r.length)throw _A(r);a.forEach((p,h)=>{p.forEach((_,v)=>{p.set(v,this._driver.computeStyle(h,v,Vi))})});let l=s.map(p=>{let h=a.get(p.element);return this._buildPlayer(p,new Map,h)}),c=Mo(l);return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){let e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);let i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){let e=this._playersById.get(t);if(!e)throw bA(t);return e}listen(t,e,i,r){let o=ig(e,"","","");return ng(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if(i=="register"){this.register(t,r[0]);return}if(i=="create"){let s=r[0]||{};this.create(t,e,s);return}let o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t);break}}},FA="ng-animate-queued",wH=".ng-animate-queued",gw="ng-animate-disabled",xH=".ng-animate-disabled",EH="ng-star-inserted",SH=".ng-star-inserted",MH=[],WA={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},TH={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},pr="__ng_removed",qu=class{namespaceId;value;options;get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;let i=t&&t.hasOwnProperty("value"),r=i?t.value:t;if(this.value=IH(r),i){let o=t,{value:s}=o,a=M_(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let e=t.params;if(e){let i=this.options.params;Object.keys(e).forEach(r=>{i[r]==null&&(i[r]=e[r])})}}},Wu="void",vw=new qu(Wu),Tw=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this._hostClassName="ng-tns-"+t,Bi(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw yA(i,e);if(i==null||i.length==0)throw CA(e);if(!kH(i))throw wA(i,e);let o=ci(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);let a=ci(this._engine.statesByElement,t,new Map);return a.has(e)||(Bi(t,Hu),Bi(t,Hu+"-"+e),a.set(e,vw)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,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 xA(t);return e}trigger(t,e,i,r=!0){let o=this._getTrigger(e),s=new Yu(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Bi(t,Hu),Bi(t,Hu+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e),c=new qu(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=vw),!(c.value===Wu)&&l.value===c.value){if(!PH(l.params,c.params)){let T=[],F=o.matchStyles(l.value,l.params,T),L=o.matchStyles(c.value,c.params,T);T.length?this._engine.reportError(T):this._engine.afterFlush(()=>{ws(t,F),mr(t,L)})}return}let _=ci(this._engine.playersByElement,t,[]);_.forEach(T=>{T.namespaceId==this.id&&T.triggerName==e&&T.queued&&T.destroy()});let v=o.matchTransition(l.value,c.value,t,c.params),y=!1;if(!v){if(!r)return;v=o.fallbackTransition,y=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:v,fromState:l,toState:c,player:s,isFallbackTransition:y}),y||(Bi(t,FA),s.onStart(()=>{vc(t,FA)})),s.onDone(()=>{let T=this.players.indexOf(s);T>=0&&this.players.splice(T,1);let F=this._engine.playersByElement.get(t);if(F){let L=F.indexOf(s);L>=0&&F.splice(L,1)}}),this.players.push(s),_.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){let i=this._engine.driver.query(t,Uu,!0);i.forEach(r=>{if(r[pr])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let p=this.trigger(t,c,Wu,r);p&&a.push(p)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&Mo(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){let r=new Set;e.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=i.get(s)||vw,p=new qu(Wu),h=new Yu(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:p,player:h,isFallbackTransition:!0})})}}removeNode(t,e){let i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){let o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{let o=t[pr];(!o||o===WA)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Bi(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){let l=ig(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,ng(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{let o=i.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},Dw=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,i){this.bodyNode=t,this.driver=e,this._normalizer=i}get queuedPlayers(){let t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){let i=new Tw(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){let i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){let l=r.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(t);this.namespacesByHostElement.delete(i.hostElement);let r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(e),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let e=new Set,i=this.statesByElement.get(t);if(i){for(let r of i.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}}return e}trigger(t,e,i,r){if(ug(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!ug(e))return;let o=e[pr];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,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Bi(t,gw)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),vc(t,gw))}removeNode(t,e,i){if(ug(e)){let r=t?this._fetchNamespace(t):null;r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i);let o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,i)}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[pr]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return ug(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,Uu,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(t,sg,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){let e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){let e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Mo(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[pr];if(e&&e.setForRemoval){if(t[pr]=WA,e.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(gw)&&this.markElementAsDisabled(t,!1),this.driver.query(t,xH,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let r=this.collectedEnterElements[i];Bi(r,EH)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{e=this._flushAnimations(i,t)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let r=this.collectedLeaveElements[i];this.processLeaveNode(r)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],e.length?Mo(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw EA(t)}_flushAnimations(t,e){let i=new Gu,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,p=new Set;this.disabledNodes.forEach(se=>{p.add(se);let fe=this.driver.query(se,wH,!0);for(let ye=0;ye<fe.length;ye++)p.add(fe[ye])});let h=this.bodyNode,_=Array.from(this.statesByElement.keys()),v=VA(_,this.collectedEnterElements),y=new Map,T=0;v.forEach((se,fe)=>{let ye=uw+T++;y.set(fe,ye),se.forEach(Ue=>Bi(Ue,ye))});let F=[],L=new Set,ve=new Set;for(let se=0;se<this.collectedLeaveElements.length;se++){let fe=this.collectedLeaveElements[se],ye=fe[pr];ye&&ye.setForRemoval&&(F.push(fe),L.add(fe),ye.hasAnimation?this.driver.query(fe,SH,!0).forEach(Ue=>L.add(Ue)):ve.add(fe))}let Ve=new Map,_e=VA(_,Array.from(L));_e.forEach((se,fe)=>{let ye=og+T++;Ve.set(fe,ye),se.forEach(Ue=>Bi(Ue,ye))}),t.push(()=>{v.forEach((se,fe)=>{let ye=y.get(fe);se.forEach(Ue=>vc(Ue,ye))}),_e.forEach((se,fe)=>{let ye=Ve.get(fe);se.forEach(Ue=>vc(Ue,ye))}),F.forEach(se=>{this.processLeaveNode(se)})});let Lt=[],vt=[];for(let se=this._namespaceList.length-1;se>=0;se--)this._namespaceList[se].drainQueuedTransitions(e).forEach(ye=>{let Ue=ye.player,zt=ye.element;if(Lt.push(Ue),this.collectedEnterElements.length){let qt=zt[pr];if(qt&&qt.setForMove){if(qt.previousTriggersValues&&qt.previousTriggersValues.has(ye.triggerName)){let ei=qt.previousTriggersValues.get(ye.triggerName),Fn=this.statesByElement.get(ye.element);if(Fn&&Fn.has(ye.triggerName)){let Go=Fn.get(ye.triggerName);Go.value=ei,Fn.set(ye.triggerName,Go)}}Ue.destroy();return}}let it=!h||!this.driver.containsElement(h,zt),Mn=Ve.get(zt),_t=y.get(zt),bt=this._buildInstruction(ye,i,_t,Mn,it);if(bt.errors&&bt.errors.length){vt.push(bt);return}if(it){Ue.onStart(()=>ws(zt,bt.fromStyles)),Ue.onDestroy(()=>mr(zt,bt.toStyles)),r.push(Ue);return}if(ye.isFallbackTransition){Ue.onStart(()=>ws(zt,bt.fromStyles)),Ue.onDestroy(()=>mr(zt,bt.toStyles)),r.push(Ue);return}let Dt=[];bt.timelines.forEach(qt=>{qt.stretchStartingKeyframe=!0,this.disabledNodes.has(qt.element)||Dt.push(qt)}),bt.timelines=Dt,i.append(zt,bt.timelines);let Bs={instruction:bt,player:Ue,element:zt};s.push(Bs),bt.queriedElements.forEach(qt=>ci(a,qt,[]).push(Ue)),bt.preStyleProps.forEach((qt,ei)=>{if(qt.size){let Fn=l.get(ei);Fn||l.set(ei,Fn=new Set),qt.forEach((Go,nl)=>Fn.add(nl))}}),bt.postStyleProps.forEach((qt,ei)=>{let Fn=c.get(ei);Fn||c.set(ei,Fn=new Set),qt.forEach((Go,nl)=>Fn.add(nl))})});if(vt.length){let se=[];vt.forEach(fe=>{se.push(SA(fe.triggerName,fe.errors))}),Lt.forEach(fe=>fe.destroy()),this.reportError(se)}let St=new Map,Sn=new Map;s.forEach(se=>{let fe=se.element;i.has(fe)&&(Sn.set(fe,fe),this._beforeAnimationBuild(se.player.namespaceId,se.instruction,St))}),r.forEach(se=>{let fe=se.element;this._getPreviousPlayers(fe,!1,se.namespaceId,se.triggerName,null).forEach(Ue=>{ci(St,fe,[]).push(Ue),Ue.destroy()})});let io=F.filter(se=>BA(se,l,c)),Wo=new Map;jA(Wo,this.driver,ve,c,Vi).forEach(se=>{BA(se,l,c)&&io.push(se)});let Yi=new Map;v.forEach((se,fe)=>{jA(Yi,this.driver,new Set(se),l,fc)}),io.forEach(se=>{let fe=Wo.get(se),ye=Yi.get(se);Wo.set(se,new Map([...fe?.entries()??[],...ye?.entries()??[]]))});let Vs=[],tl=[],Ym={};s.forEach(se=>{let{element:fe,player:ye,instruction:Ue}=se;if(i.has(fe)){if(p.has(fe)){ye.onDestroy(()=>mr(fe,Ue.toStyles)),ye.disabled=!0,ye.overrideTotalTime(Ue.totalTime),r.push(ye);return}let zt=Ym;if(Sn.size>1){let Mn=fe,_t=[];for(;Mn=Mn.parentNode;){let bt=Sn.get(Mn);if(bt){zt=bt;break}_t.push(Mn)}_t.forEach(bt=>Sn.set(bt,zt))}let it=this._buildAnimation(ye.namespaceId,Ue,St,o,Yi,Wo);if(ye.setRealPlayer(it),zt===Ym)Vs.push(ye);else{let Mn=this.playersByElement.get(zt);Mn&&Mn.length&&(ye.parentPlayer=Mo(Mn)),r.push(ye)}}else ws(fe,Ue.fromStyles),ye.onDestroy(()=>mr(fe,Ue.toStyles)),tl.push(ye),p.has(fe)&&r.push(ye)}),tl.forEach(se=>{let fe=o.get(se.element);if(fe&&fe.length){let ye=Mo(fe);se.setRealPlayer(ye)}}),r.forEach(se=>{se.parentPlayer?se.syncPlayerEvents(se.parentPlayer):se.destroy()});for(let se=0;se<F.length;se++){let fe=F[se],ye=fe[pr];if(vc(fe,og),ye&&ye.hasAnimation)continue;let Ue=[];if(a.size){let it=a.get(fe);it&&it.length&&Ue.push(...it);let Mn=this.driver.query(fe,sg,!0);for(let _t=0;_t<Mn.length;_t++){let bt=a.get(Mn[_t]);bt&&bt.length&&Ue.push(...bt)}}let zt=Ue.filter(it=>!it.destroyed);zt.length?AH(this,fe,zt):this.processLeaveNode(fe)}return F.length=0,Vs.forEach(se=>{this.players.push(se),se.onDone(()=>{se.destroy();let fe=this.players.indexOf(se);this.players.splice(fe,1)}),se.play()}),Vs}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let l=!o||o==Wu;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){let r=e.triggerName,o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:r;for(let l of e.timelines){let c=l.element,p=c!==o,h=ci(i,c,[]);this._getPreviousPlayers(c,p,s,a,e.toState).forEach(v=>{let y=v.getRealPlayer();y.beforeDestroy&&y.beforeDestroy(),v.destroy(),h.push(v)})}ws(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){let a=e.triggerName,l=e.element,c=[],p=new Set,h=new Set,_=e.timelines.map(y=>{let T=y.element;p.add(T);let F=T[pr];if(F&&F.removedBeforeQueried)return new Wr(y.duration,y.delay);let L=T!==l,ve=OH((i.get(T)||MH).map(St=>St.getRealPlayer())).filter(St=>{let Sn=St;return Sn.element?Sn.element===T:!1}),Ve=o.get(T),_e=s.get(T),Lt=sw(this._normalizer,y.keyframes,Ve,_e),vt=this._buildPlayer(y,Lt,ve);if(y.subTimeline&&r&&h.add(T),L){let St=new Yu(t,a,T);St.setRealPlayer(vt),c.push(St)}return vt});c.forEach(y=>{ci(this.playersByQueriedElement,y.element,[]).push(y),y.onDone(()=>DH(this.playersByQueriedElement,y.element,y))}),p.forEach(y=>Bi(y,mw));let v=Mo(_);return v.onDestroy(()=>{p.forEach(y=>vc(y,mw)),mr(l,e.toStyles)}),h.forEach(y=>{ci(r,y,[]).push(v)}),v}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new Wr(t.duration,t.delay)}},Yu=class{namespaceId;triggerName;element;_player=new Wr;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>ng(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ci(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 DH(n,t,e){let i=n.get(t);if(i){if(i.length){let r=i.indexOf(e);i.splice(r,1)}i.length==0&&n.delete(t)}return i}function IH(n){return n??null}function ug(n){return n&&n.nodeType===1}function kH(n){return n=="start"||n=="done"}function LA(n,t){let e=n.style.display;return n.style.display=t??"none",e}function jA(n,t,e,i,r){let o=[];e.forEach(l=>o.push(LA(l)));let s=[];i.forEach((l,c)=>{let p=new Map;l.forEach(h=>{let _=t.computeStyle(c,h,r);p.set(h,_),(!_||_.length==0)&&(c[pr]=TH,s.push(c))}),n.set(c,p)});let a=0;return e.forEach(l=>LA(l,o[a++])),s}function VA(n,t){let e=new Map;if(n.forEach(a=>e.set(a,[])),t.length==0)return e;let i=1,r=new Set(t),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;let c=a.parentNode;return e.has(c)?l=c:r.has(c)?l=i:l=s(c),o.set(a,l),l}return t.forEach(a=>{let l=s(a);l!==i&&e.get(l).push(a)}),e}function Bi(n,t){n.classList?.add(t)}function vc(n,t){n.classList?.remove(t)}function AH(n,t,e){Mo(e).onDone(()=>n.processLeaveNode(t))}function OH(n){let t=[];return GA(n,t),t}function GA(n,t){for(let e=0;e<n.length;e++){let i=n[e];i instanceof Ta?GA(i.players,t):t.push(i)}}function PH(n,t){let e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r<e.length;r++){let o=e[r];if(!t.hasOwnProperty(o)||n[o]!==t[o])return!1}return!0}function BA(n,t,e){let i=e.get(n);if(!i)return!1;let r=t.get(n);return r?i.forEach(o=>r.add(o)):t.set(n,i),e.delete(n),!0}var _c=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(t,e)=>{};constructor(t,e,i){this._driver=e,this._normalizer=i,this._transitionEngine=new Dw(t.body,e,i),this._timelineEngine=new Mw(t.body,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){let s=t+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],p=HA(this._driver,o,l,c);if(l.length)throw hA(r,l);a=bH(r,p,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i){this._transitionEngine.removeNode(t,e,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if(i.charAt(0)=="@"){let[o,s]=aw(i),a=r;this._timelineEngine.command(o,e,s,a)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if(i.charAt(0)=="@"){let[s,a]=aw(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function RH(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=_w(t[0]),t.length>1&&(i=_w(t[t.length-1]))):t instanceof Map&&(e=_w(t)),e||i?new NH(n,e,i):null}var NH=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&mr(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(mr(this._element,this._initialStyles),this._endStyles&&(mr(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(ws(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ws(this._element,this._endStyles),this._endStyles=null),mr(this._element,this._initialStyles),this._state=3)}}return n})();function _w(n){let t=null;return n.forEach((e,i)=>{FH(i)&&(t=t||new Map,t.set(i,e))}),t}function FH(n){return n==="display"||n==="position"}var _g=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,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;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(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){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((i,r)=>{r!=="offset"&&t.set(r,this._finished?i:lg(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){let e=t==="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},bg=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,e){return lw(t,e)}getParentElement(t){return rg(t)}query(t,e,i){return cw(t,e,i)}computeStyle(t,e,i){return lg(t,e)}animate(t,e,i,r,o,s=[]){let a=r==0?"both":"forwards",l={duration:i,delay:r,fill:a};o&&(l.easing=o);let c=new Map,p=s.filter(v=>v instanceof _g);IA(i,r)&&p.forEach(v=>{v.currentSnapshot.forEach((y,T)=>c.set(T,y))});let h=TA(e).map(v=>new Map(v));h=kA(t,h,c);let _=RH(t,h);return new _g(t,h,l,_)}};var mg="@",qA="@.disabled",yg=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r}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,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i,r){if(r){this.delegate.removeChild(t,e,i);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,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){e.charAt(0)==mg&&e==qA?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i,r){return this.delegate.listen(t,e,i,r)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}},Iw=class extends yg{factory;constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){e.charAt(0)==mg?e.charAt(1)=="."&&e==qA?(i=i===void 0?!0:!!i,this.disableAnimations(t,i)):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i,r){if(e.charAt(0)==mg){let o=LH(t),s=e.slice(1),a="";return s.charAt(0)!=mg&&([s,a]=jH(s)),this.engine.listen(this.namespaceId,o,s,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,i,l)})}return this.delegate.listen(t,e,i,r)}};function LH(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function jH(n){let t=n.indexOf("."),e=n.substring(0,t),i=n.slice(t+1);return[e,i]}var Cg=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(t,e,i){this.delegate=t,this.engine=e,this._zone=i,e.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(t,e){let r=this.delegate.createRenderer(t,e);if(!t||!e?.data?.animation){let c=this._rendererCache,p=c.get(r);if(!p){let h=()=>c.delete(r);p=new yg("",r,this.engine,h),c.set(r,p)}return p}let o=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,t,c.name,c)};return e.data.animation.forEach(a),new Iw(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,i){if(t>=0&&t<this._microtaskId){this._zone.run(()=>e(i));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([e,i])}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 BH=(()=>{class n extends _c{constructor(e,i,r){super(e,i,r)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||n)(te(le),te(ka),te(Aa))};static \u0275prov=x({token:n,factory:n.\u0275fac})}return n})();function zH(){return new pg}function HH(n,t,e){return new Cg(n,t,e)}var YA=[{provide:Aa,useFactory:zH},{provide:_c,useClass:BH},{provide:jt,useFactory:HH,deps:[bu,_c,Y]}],sde=[{provide:ka,useClass:kw},{provide:ps,useValue:"NoopAnimations"},...YA],UH=[{provide:ka,useFactory:()=>new bg},{provide:ps,useFactory:()=>"BrowserAnimations"},...YA];function QA(){return gi("NgEagerAnimations"),[...UH]}function Qu(n){return n.buttons===0||n.detail===0}function Ku(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 Ow;function KA(){if(Ow==null){let n=typeof document<"u"?document.head:null;Ow=!!(n&&(n.createShadowRoot||n.attachShadow))}return Ow}function Pw(n){if(KA()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Zu(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){let t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function Gn(n){return n.composedPath?n.composedPath()[0]:n.target}var Rw;try{Rw=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Rw=!1}var He=(()=>{class n{_platformId=d(ms);isBrowser=this._platformId?TI(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||Rw)&&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(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Xu;function ZA(){if(Xu==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Xu=!0}))}finally{Xu=Xu||!1}return Xu}function bc(n){return ZA()?n:!!n.capture}function To(n,t=0){return XA(n)?Number(n):arguments.length===2?t:0}function XA(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function xi(n){return n instanceof Z?n.nativeElement:n}var JA=new A("cdk-input-modality-detector-options"),e1={ignoreKeys:[18,17,224,91,16]},t1=650,Nw={passive:!0,capture:!0},n1=(()=>{class n{_platform=d(He);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ae(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(i=>i===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Gn(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<t1||(this._modality.next(Qu(e)?"keyboard":"mouse"),this._mostRecentTarget=Gn(e))};_onTouchstart=e=>{if(Ku(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Gn(e)};constructor(){let e=d(Y),i=d(le),r=d(JA,{optional:!0});if(this._options=M(M({},e1),r),this.modalityDetected=this._modality.pipe(wd(1)),this.modalityChanged=this.modalityDetected.pipe(Xo()),this._platform.isBrowser){let o=d(jt).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[o.listen(i,"keydown",this._onKeydown,Nw),o.listen(i,"mousedown",this._onMousedown,Nw),o.listen(i,"touchstart",this._onTouchstart,Nw)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ju=(function(n){return n[n.IMMEDIATE=0]="IMMEDIATE",n[n.EVENTUAL=1]="EVENTUAL",n})(Ju||{}),i1=new A("cdk-focus-monitor-default-options"),wg=bc({passive:!0,capture:!0}),fr=(()=>{class n{_ngZone=d(Y);_platform=d(He);_inputModalityDetector=d(n1);_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=d(le);_stopInputModalityDetector=new P;constructor(){let e=d(i1,{optional:!0});this._detectionMode=e?.detectionMode||Ju.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let i=Gn(e);for(let r=i;r;r=r.parentElement)e.type==="focus"?this._onFocus(e,r):this._onBlur(e,r)};monitor(e,i=!1){let r=xi(e);if(!this._platform.isBrowser||r.nodeType!==1)return W();let o=Pw(r)||this._document,s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;let a={checkChildren:i,subject:new P,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let i=xi(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){let o=xi(e),s=this._document.activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),typeof o.focus=="function"&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_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===Ju.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused",i==="touch"),e.classList.toggle("cdk-keyboard-focused",i==="keyboard"),e.classList.toggle("cdk-mouse-focused",i==="mouse"),e.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&i,this._detectionMode===Ju.IMMEDIATE){clearTimeout(this._originTimeoutId);let r=this._originFromTouchInteraction?t1:1;this._originTimeoutId=setTimeout(()=>this._origin=null,r)}})}_onFocus(e,i){let r=this._elementInfo.get(i),o=Gn(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){let r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,wg),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,wg)}),this._rootNodeFocusListenerCount.set(i,r+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe($(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,wg),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,wg),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if(r!=="mouse"||!i||i===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(i))return!0}return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var xg=new WeakMap,At=(()=>{class n{_appRef;_injector=d(me);_environmentInjector=d(pt);load(e){let i=this._appRef=this._appRef||this._injector.get(Un),r=xg.get(i);r||(r={loaders:new Set,refs:[]},xg.set(i,r),i.onDestroy(()=>{xg.get(i)?.refs.forEach(o=>o.destroy()),xg.delete(i)})),r.loaders.has(e)||(r.loaders.add(e),r.refs.push(sh(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var xs=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(i,r){},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 yc(n){return Array.isArray(n)?n:[n]}var r1=new Set,Oa,Eg=(()=>{class n{_platform=d(He);_nonce=d(zl,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):WH}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&$H(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function $H(n,t){if(!r1.has(n))try{Oa||(Oa=document.createElement("style"),t&&Oa.setAttribute("nonce",t),Oa.setAttribute("type","text/css"),document.head.appendChild(Oa)),Oa.sheet&&(Oa.sheet.insertRule(`@media ${n} {body{ }}`,0),r1.add(n))}catch(e){console.error(e)}}function WH(n){return{matches:n==="all"||n==="",media:n,addListener:()=>{},removeListener:()=>{}}}var em=(()=>{class n{_mediaMatcher=d(Eg);_zone=d(Y);_queries=new Map;_destroySubject=new P;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return o1(yc(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let r=o1(yc(e)).map(s=>this._registerQuery(s).observable),o=In(r);return o=Ko(o.pipe(Ye(1)),o.pipe(wd(1),Zs(0))),o.pipe(z(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),o={observable:new ge(s=>{let a=l=>this._zone.run(()=>s.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(Ht(i),z(({matches:s})=>({query:e,matches:s})),$(this._destroySubject)),mql:i};return this._queries.set(e,o),o}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function o1(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}var GH=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Sg=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[GH]})}return n})();var Ss=(()=>{class n{_platform=d(He);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return YH(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=qH(nU(e));if(i&&(s1(i)===-1||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=s1(e);return e.hasAttribute("contenteditable")?o!==-1:r==="iframe"||r==="object"||this._platform.WEBKIT&&this._platform.IOS&&!eU(e)?!1:r==="audio"?e.hasAttribute("controls")?o!==-1:!1:r==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,i){return tU(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function qH(n){try{return n.frameElement}catch{return null}}function YH(n){return!!(n.offsetWidth||n.offsetHeight||typeof n.getClientRects=="function"&&n.getClientRects().length)}function QH(n){let t=n.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function KH(n){return XH(n)&&n.type=="hidden"}function ZH(n){return JH(n)&&n.hasAttribute("href")}function XH(n){return n.nodeName.toLowerCase()=="input"}function JH(n){return n.nodeName.toLowerCase()=="a"}function c1(n){if(!n.hasAttribute("tabindex")||n.tabIndex===void 0)return!1;let t=n.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function s1(n){if(!c1(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function eU(n){let t=n.nodeName.toLowerCase(),e=t==="input"&&n.type;return e==="text"||e==="password"||t==="select"||t==="textarea"}function tU(n){return KH(n)?!1:QH(n)||ZH(n)||n.hasAttribute("contenteditable")||c1(n)}function nU(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}var Mg=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,i,r,o=!1,s){this._element=t,this._checker=e,this._ngZone=i,this._document=r,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 i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}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 i=0;i<e.length;i++){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=e.length-1;i>=0;i--){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}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?ln(t,{injector:this._injector}):setTimeout(t)}},tm=(()=>{class n{_checker=d(Ss);_ngZone=d(Y);_document=d(le);_injector=d(me);constructor(){d(At).load(xs)}create(e,i=!1){return new Mg(e,this._checker,this._ngZone,this._document,i,this._injector)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var d1=new A("liveAnnouncerElement",{providedIn:"root",factory:u1});function u1(){return null}var m1=new A("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),iU=0,nm=(()=>{class n{_ngZone=d(Y);_defaultOptions=d(m1,{optional:!0});_liveElement;_document=d(le);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d(d1,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...i){let r=this._defaultOptions,o,s;return i.length===1&&typeof i[0]=="number"?s=i[0]:[o,s]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),s==null&&r&&(s=r.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",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o<i.length;o++)i[o].remove();return r.classList.add(e),r.classList.add("cdk-visually-hidden"),r.setAttribute("aria-atomic","true"),r.setAttribute("aria-live","polite"),r.id=`cdk-live-announcer-${iU++}`,this._document.body.appendChild(r),r}_exposeAnnouncerToModals(e){let i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],s=o.getAttribute("aria-owns");s?s.indexOf(e)===-1&&o.setAttribute("aria-owns",s+" "+e):o.setAttribute("aria-owns",e)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Es=(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})(Es||{}),a1="cdk-high-contrast-black-on-white",l1="cdk-high-contrast-white-on-black",Fw="cdk-high-contrast-active",Tg=(()=>{class n{_platform=d(He);_hasCheckedHighContrastMode;_document=d(le);_breakpointSubscription;constructor(){this._breakpointSubscription=d(em).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Es.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Es.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Es.BLACK_ON_WHITE}return Es.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Fw,a1,l1),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===Es.BLACK_ON_WHITE?e.add(Fw,a1):i===Es.WHITE_ON_BLACK&&e.add(Fw,l1)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),im=(()=>{class n{constructor(){d(Tg)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Sg]})}return n})();var Lw={},ut=(()=>{class n{_appId=d(us);getId(e){return this._appId!=="ng"&&(e+=this._appId),Lw.hasOwnProperty(e)||(Lw[e]=0),`${e}${Lw[e]++}`}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var rU=200,Dg=class{_letterKeyStream=new P;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new P;selectedItem=this._selectedItem;constructor(t,e){let i=typeof e?.debounceInterval=="number"?e.debounceInterval:rU;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(t),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(t){this._selectedItemIndex=t}setItems(t){this._items=t}handleKey(t){let e=t.keyCode;t.key&&t.key.length===1?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(t){this._letterKeyStream.pipe(Oe(e=>this._pressedLetters.push(e)),Zs(t),ue(()=>this._pressedLetters.length>0),z(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let i=1;i<this._items.length+1;i++){let r=(this._selectedItemIndex+i)%this._items.length,o=this._items[r];if(!this._skipPredicateFn?.(o)&&o.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(o);break}}this._pressedLetters=[]})}};function gn(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}var Ig=class{_items;_activeItemIndex=Fe(-1);_activeItem=Fe(null);_wrap=!1;_typeaheadSubscription=ze.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=t=>t.disabled;constructor(t,e){this._items=t,t instanceof po?this._itemChangesSubscription=t.changes.subscribe(i=>this._itemsChanged(i.toArray())):Rr(t)&&(this._effectRef=yo(()=>this._itemsChanged(t()),{injector:e}))}tabOut=new P;change=new P;skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Dg(e,{debounceInterval:typeof t=="number"?t:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}withPageUpDown(t=!0,e=10){return this._pageUpAndDown={enabled:t,delta:e},this}setActiveItem(t){let e=this._activeItem();this.updateActiveItem(t),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(t){let e=t.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o<s?o:s-1,-1);break}else return;default:(r||gn(t,"shiftKey"))&&this._typeahead?.handleKey(t);return}this._typeahead?.reset(),t.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){let e=this._getItemsArray(),i=typeof t=="number"?t:e.indexOf(t),r=e[i];this._activeItem.set(r??null),this._activeItemIndex.set(i),this._typeahead?.setCurrentSelectedItemIndex(i)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){let e=this._getItemsArray();for(let i=1;i<=e.length;i++){let r=(this._activeItemIndex()+t*i+e.length)%e.length,o=e[r];if(!this._skipPredicateFn(o)){this.setActiveItem(r);return}}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex()+t,t)}_setActiveItemByIndex(t,e){let i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(t+=e,!i[t])return;this.setActiveItem(t)}}_getItemsArray(){return Rr(this._items)?this._items():this._items instanceof po?this._items.toArray():this._items}_itemsChanged(t){this._typeahead?.setItems(t);let e=this._activeItem();if(e){let i=t.indexOf(e);i>-1&&i!==this._activeItemIndex()&&(this._activeItemIndex.set(i),this._typeahead?.setCurrentSelectedItemIndex(i))}}};var sm=class extends Ig{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}};var h1=" ";function Bw(n,t,e){let i=Pg(n,t);e=e.trim(),!i.some(r=>r.trim()===e)&&(i.push(e),n.setAttribute(t,i.join(h1)))}function Rg(n,t,e){let i=Pg(n,t);e=e.trim();let r=i.filter(o=>o!==e);r.length?n.setAttribute(t,r.join(h1)):n.removeAttribute(t)}function Pg(n,t){return n.getAttribute(t)?.match(/\S+/g)??[]}var g1="cdk-describedby-message",Og="cdk-describedby-host",Vw=0,v1=(()=>{class n{_platform=d(He);_document=d(le);_messageRegistry=new Map;_messagesContainer=null;_id=`${Vw++}`;constructor(){d(At).load(xs),this._id=d(us)+"-"+Vw++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;let o=jw(i,r);typeof i!="string"?(f1(i,this._id),this._messageRegistry.set(o,{messageElement:i,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;let o=jw(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),typeof i=="string"){let s=this._messageRegistry.get(o);s&&s.referenceCount===0&&this._deleteMessageElement(o)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${Og}="${this._id}"]`);for(let i=0;i<e.length;i++)this._removeCdkDescribedByReferenceIds(e[i]),e[i].removeAttribute(Og);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,i){let r=this._document.createElement("div");f1(r,this._id),r.textContent=e,i&&r.setAttribute("role",i),this._createMessagesContainer(),this._messagesContainer.appendChild(r),this._messageRegistry.set(jw(e,i),{messageElement:r,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",i=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let o=0;o<i.length;o++)i[o].remove();let r=this._document.createElement("div");r.style.visibility="hidden",r.classList.add(e),r.classList.add("cdk-visually-hidden"),this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._messagesContainer=r}_removeCdkDescribedByReferenceIds(e){let i=Pg(e,"aria-describedby").filter(r=>r.indexOf(g1)!=0);e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let r=this._messageRegistry.get(i);Bw(e,"aria-describedby",r.messageElement.id),e.setAttribute(Og,this._id),r.referenceCount++}_removeMessageReference(e,i){let r=this._messageRegistry.get(i);r.referenceCount--,Rg(e,"aria-describedby",r.messageElement.id),e.removeAttribute(Og)}_isElementDescribedByMessage(e,i){let r=Pg(e,"aria-describedby"),o=this._messageRegistry.get(i),s=o&&o.messageElement.id;return!!s&&r.indexOf(s)!=-1}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&typeof i=="object")return!0;let r=i==null?"":`${i}`.trim(),o=e.getAttribute("aria-label");return r?!o||o.trim()!==r:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function jw(n,t){return typeof n=="string"?`${t||""}/${n}`:n}function f1(n,t){n.id||(n.id=`${g1}-${t}-${Vw++}`)}var hr=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(hr||{}),Ng,Pa;function Fg(){if(Pa==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Pa=!1,Pa;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Pa=!0;else{let n=Element.prototype.scrollTo;n?Pa=!/\{\s*\[native code\]\s*\}/.test(n.toString()):Pa=!1}}return Pa}function Cc(){if(typeof document!="object"||!document)return hr.NORMAL;if(Ng==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"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),Ng=hr.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,Ng=n.scrollLeft===0?hr.NEGATED:hr.INVERTED),n.remove()}return Ng}function zw(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var wc,_1=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Hw(){if(wc)return wc;if(typeof document!="object"||!document)return wc=new Set(_1),wc;let n=document.createElement("input");return wc=new Set(_1.filter(t=>(n.setAttribute("type",t),n.type===t))),wc}var b1={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 oU=new A("MATERIAL_ANIMATIONS");var y1=null;function Uw(){return d(oU,{optional:!0})?.animationsDisabled||d(ps,{optional:!0})==="NoopAnimations"?"di-disabled":(y1??=d(Eg).matchMedia("(prefers-reduced-motion)").matches,y1?"reduced-motion":"enabled")}function mt(){return Uw()!=="enabled"}function Wt(n){return n==null?"":typeof n=="string"?n:`${n}px`}function Ei(n){return n!=null&&`${n}`!="false"}var zi=(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})(zi||{}),$w=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=zi.HIDDEN;constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r}fadeOut(){this._renderer.fadeOutRipple(this)}},C1=bc({passive:!0,capture:!0}),Ww=class{_events=new Map;addHandler(t,e,i,r){let o=this._events.get(e);if(o){let s=o.get(i);s?s.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,C1)})}removeHandler(t,e,i){let r=this._events.get(t);if(!r)return;let o=r.get(e);o&&(o.delete(i),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,C1)))}_delegateEventHandler=t=>{let e=Gn(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}},am={enterDuration:225,exitDuration:150},sU=800,w1=bc({passive:!0,capture:!0}),x1=["mousedown","touchstart"],E1=["mouseup","mouseleave","touchend","touchcancel"],aU=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(i,r){},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})(),lm=class n{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new Ww;constructor(t,e,i,r,o){this._target=t,this._ngZone=e,this._platform=r,r.isBrowser&&(this._containerElement=xi(i)),o&&o.get(At).load(aU)}fadeInRipple(t,e,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=M(M({},am),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=i.radius||lU(t,e,r),a=t-r.left,l=e-r.top,c=o.enterDuration,p=document.createElement("div");p.classList.add("mat-ripple-element"),p.style.left=`${a-s}px`,p.style.top=`${l-s}px`,p.style.height=`${s*2}px`,p.style.width=`${s*2}px`,i.color!=null&&(p.style.backgroundColor=i.color),p.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(p);let h=window.getComputedStyle(p),_=h.transitionProperty,v=h.transitionDuration,y=_==="none"||v==="0s"||v==="0s, 0s"||r.width===0&&r.height===0,T=new $w(this,p,i,y);p.style.transform="scale3d(1, 1, 1)",T.state=zi.FADING_IN,i.persistent||(this._mostRecentTransientRipple=T);let F=null;return!y&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let L=()=>{F&&(F.fallbackTimer=null),clearTimeout(Ve),this._finishRippleTransition(T)},ve=()=>this._destroyRipple(T),Ve=setTimeout(ve,c+100);p.addEventListener("transitionend",L),p.addEventListener("transitioncancel",ve),F={onTransitionEnd:L,onTransitionCancel:ve,fallbackTimer:Ve}}),this._activeRipples.set(T,F),(y||!c)&&this._finishRippleTransition(T),T}fadeOutRipple(t){if(t.state===zi.FADING_OUT||t.state===zi.HIDDEN)return;let e=t.element,i=M(M({},am),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=zi.FADING_OUT,(t._animationForciblyDisabledThroughCss||!i.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=xi(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,x1.forEach(i=>{n._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{E1.forEach(e=>{this._triggerElement.addEventListener(e,this,w1)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===zi.FADING_IN?this._startFadeOutTransition(t):t.state===zi.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=zi.VISIBLE,!i&&(!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=zi.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=Qu(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+sU;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Ku(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===zi.VISIBLE||t.config.terminateOnPointerUp&&t.state===zi.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(x1.forEach(e=>n._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(E1.forEach(e=>t.removeEventListener(e,this,w1)),this._pointerUpEventsRegistered=!1))}};function lU(n,t,e){let i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}var Gw=new A("mat-ripple-global-options"),Ms=(()=>{class n{_elementRef=d(Z);_animationsDisabled=mt();color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=d(Y),i=d(He),r=d(Gw,{optional:!0}),o=d(me);this._globalOptions=r||{},this._rippleRenderer=new lm(this,e,this._elementRef,i,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:M(M(M({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,i,M(M({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,M(M({},this.rippleConfig),e))}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,r){i&2&&j("mat-ripple-unbounded",r.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return n})();var cU={capture:!0},dU=["focus","mousedown","mouseenter","touchstart"],qw="mat-ripple-loader-uninitialized",Yw="mat-ripple-loader-class-name",S1="mat-ripple-loader-centered",Lg="mat-ripple-loader-disabled",M1=(()=>{class n{_document=d(le);_animationsDisabled=mt();_globalRippleOptions=d(Gw,{optional:!0});_platform=d(He);_ngZone=d(Y);_injector=d(me);_eventCleanups;_hosts=new Map;constructor(){let e=d(jt).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>dU.map(i=>e.listen(this._document,i,this._onInteraction,cU)))}ngOnDestroy(){let e=this._hosts.keys();for(let i of e)this.destroyRipple(i);this._eventCleanups.forEach(i=>i())}configureRipple(e,i){e.setAttribute(qw,this._globalRippleOptions?.namespace??""),(i.className||!e.hasAttribute(Yw))&&e.setAttribute(Yw,i.className||""),i.centered&&e.setAttribute(S1,""),i.disabled&&e.setAttribute(Lg,"")}setDisabled(e,i){let r=this._hosts.get(e);r?(r.target.rippleDisabled=i,!i&&!r.hasSetUpEvents&&(r.hasSetUpEvents=!0,r.renderer.setupTriggerEvents(e))):i?e.setAttribute(Lg,""):e.removeAttribute(Lg)}_onInteraction=e=>{let i=Gn(e);if(i instanceof HTMLElement){let r=i.closest(`[${qw}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let i=this._document.createElement("span");i.classList.add("mat-ripple",e.getAttribute(Yw)),e.append(i);let r=this._globalRippleOptions,o=this._animationsDisabled?0:r?.animation?.enterDuration??am.enterDuration,s=this._animationsDisabled?0:r?.animation?.exitDuration??am.exitDuration,a={rippleDisabled:this._animationsDisabled||r?.disabled||e.hasAttribute(Lg),rippleConfig:{centered:e.hasAttribute(S1),terminateOnPointerUp:r?.terminateOnPointerUp,animation:{enterDuration:o,exitDuration:s}}},l=new lm(a,this._ngZone,i,this._platform,this._injector),c=!a.rippleDisabled;c&&l.setupTriggerEvents(e),this._hosts.set(e,{target:a,renderer:l,hasSetUpEvents:c}),e.removeAttribute(qw)}destroyRipple(e){let i=this._hosts.get(e);i&&(i.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var qr=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["structural-styles"]],decls:0,vars:0,template:function(i,r){},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 uU=["mat-icon-button",""],mU=["*"],pU=new A("MAT_BUTTON_CONFIG");function T1(n){return n==null?void 0:ai(n)}var jg=(()=>{class n{_elementRef=d(Z);_ngZone=d(Y);_animationsDisabled=mt();_config=d(pU,{optional:!0});_focusMonitor=d(fr);_cleanupClick;_renderer=d(et);_rippleLoader=d(M1);_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(){d(At).load(qr);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",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_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(i){return new(i||n)};static \u0275dir=X({type:n,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(i,r){i&2&&(ne("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled())("tabindex",r._getTabIndex()),si(r.color?"mat-"+r.color:""),j("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("mat-unthemed",!r.color)("_mat-animation-noopable",r._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",ie],disabled:[2,"disabled","disabled",ie],ariaDisabled:[2,"aria-disabled","ariaDisabled",ie],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie],tabIndex:[2,"tabIndex","tabIndex",T1],_tabindex:[2,"tabindex","_tabindex",T1]}})}return n})(),Gt=(()=>{class n extends jg{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({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:[Le],attrs:uU,ngContentSelectors:mU,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(i,r){i&1&&(Ge(),wn(0,"span",0),we(1),wn(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 fU=new A("cdk-dir-doc",{providedIn:"root",factory:hU});function hU(){return d(le)}var gU=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function D1(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?gU.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var En=(()=>{class n{get value(){return this.valueSignal()}valueSignal=Fe("ltr");change=new U;constructor(){let e=d(fU,{optional:!0});if(e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(D1(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ts=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();var Me=(()=>{class n{constructor(){d(Tg)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Ts,Ts]})}return n})();var xc=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Me]})}return n})();var vU=["matButton",""],A1=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],O1=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],_U=["mat-fab",""];var I1=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"]]]),Pn=(()=>{class n extends jg{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=bU(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let i=this._elementRef.nativeElement.classList,r=this._appearance?I1.get(this._appearance):null,o=I1.get(e);r&&i.remove(...r),i.add(...o),this._appearance=e}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({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:[Le],attrs:vU,ngContentSelectors:O1,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(i,r){i&1&&(Ge(A1),wn(0,"span",0),we(1),fn(2,"span",1),we(3,1),hn(),we(4,2),wn(5,"span",2)(6,"span",3)),i&2&&j("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._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 bU(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 yU=new A("mat-mdc-fab-default-options",{providedIn:"root",factory:P1});function P1(){return{color:"accent"}}var k1=P1(),Vg=(()=>{class n extends jg{_options=d(yU,{optional:!0});_isFab=!0;extended;constructor(){super(),this._options=this._options||k1,this.color=this._options.color||k1.color}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["button","mat-fab",""],["a","mat-fab",""],["button","matFab",""],["a","matFab",""]],hostAttrs:[1,"mdc-fab","mat-mdc-fab-base","mat-mdc-fab"],hostVars:4,hostBindings:function(i,r){i&2&&j("mdc-fab--extended",r.extended)("mat-mdc-extended-fab",r.extended)},inputs:{extended:[2,"extended","extended",ie]},exportAs:["matButton","matAnchor"],features:[Le],attrs:_U,ngContentSelectors:O1,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(i,r){i&1&&(Ge(A1),wn(0,"span",0),we(1),fn(2,"span",1),we(3,1),hn(),we(4,2),wn(5,"span",2)(6,"span",3)),i&2&&j("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:[`.mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus>.mat-focus-indicator::before{content:""}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mat-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mat-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mat-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mat-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mat-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mat-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-fab-touch-target-size, 48px);display:var(--mat-fab-touch-target-display, block);left:50%;width:var(--mat-fab-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mat-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mat-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mat-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mat-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mat-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mat-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-fab-small-touch-target-size, 48px);display:var(--mat-fab-small-touch-target-display);left:50%;width:var(--mat-fab-small-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;box-shadow:var(--mat-fab-extended-container-elevation-shadow, var(--mat-sys-level3));height:var(--mat-fab-extended-container-height, 56px);border-radius:var(--mat-fab-extended-container-shape, var(--mat-sys-corner-large));font-family:var(--mat-fab-extended-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-fab-extended-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mat-fab-extended-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-fab-extended-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-mdc-extended-fab:hover{box-shadow:var(--mat-fab-extended-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mat-fab-extended-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mat-fab-extended-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}
|
|
13
|
+
`],encapsulation:2,changeDetection:0})}return n})();var vn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,xc,Me]})}return n})();var cm=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}},Do=class extends cm{component;viewContainerRef;injector;projectableNodes;constructor(t,e,i,r){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.projectableNodes=r}},Io=class extends cm{templateRef;viewContainerRef;context;injector;constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}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()}},Qw=class extends cm{element;constructor(t){super(),this.element=t instanceof Z?t.nativeElement:t}},Is=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Do)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof Io)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof Qw)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)}},Bg=class extends Is{outletElement;_appRef;_defaultInjector;constructor(t,e,i){super(),this.outletElement=t,this._appRef=e,this._defaultInjector=i}attachComponentPortal(t){let e;if(t.viewContainerRef){let i=t.injector||t.viewContainerRef.injector,r=i.get(jr,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:i,ngModuleRef:r,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let i=this._appRef,r=t.injector||this._defaultInjector||me.NULL,o=r.get(pt,i.injector);e=sh(t.component,{elementInjector:r,environmentInjector:o,projectableNodes:t.projectableNodes||void 0}),i.attachView(e.hostView),this.setDisposeFn(()=>{i.viewCount>0&&i.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);r!==-1&&e.remove(r)}),this._attachedPortal=t,i}attachDomPortal=t=>{let e=t.element;e.parentNode;let i=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var ks=(()=>{class n extends Is{_moduleRef=d(jr,{optional:!0});_document=d(le);_viewContainerRef=d(Hn);_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 i=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,r=i.createComponent(e.component,{index:i.length,injector:e.injector||i.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(r.hostView.rootNodes[0]),super.setDisposeFn(()=>r.destroy()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=e=>{let i=e.element;i.parentNode;let r=this._document.createComment("dom-portal");e.setAttachedHost(this),i.parentNode.insertBefore(r,i),this._getRootNode().appendChild(i),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(i,r)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Le]})}return n})();var ko=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();var CU=20,Ec=(()=>{class n{_ngZone=d(Y);_platform=d(He);_renderer=d(jt).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new P;_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 i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=CU){return this._platform.isBrowser?new ge(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(Fp(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):W()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(ue(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_scrollableContainsElement(e,i){let r=xi(i),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),As=(()=>{class n{elementRef=d(Z);scrollDispatcher=d(Ec);ngZone=d(Y);dir=d(En,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new P;_renderer=d(et);_cleanupScroll;_elementScrolled=new P;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 i=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=r?e.end:e.start),e.right==null&&(e.right=r?e.start:e.end),e.bottom!=null&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&Cc()!=hr.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),Cc()==hr.INVERTED?e.left=e.right:Cc()==hr.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;Fg()?i.scrollTo(e):(e.top!=null&&(i.scrollTop=e.top),e.left!=null&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",r="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?r:i:e=="end"&&(e=s?i:r),s&&Cc()==hr.INVERTED?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&Cc()==hr.NEGATED?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),wU=20,Ao=(()=>{class n{_platform=d(He);_listeners;_viewportSize;_change=new P;_document=d(le);constructor(){let e=d(Y),i=d(jt).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=o=>this._change.next(o);this._listeners=[i.listen("window","resize",r),i.listen("window","orientationchange",r)]}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:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),s=-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(e=wU){return e>0?this._change.pipe(Fp(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(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ra=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})(),Kw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Ts,Ra,Ts,Ra]})}return n})();var R1=Fg();function Tc(n){return new zg(n.get(Ao),n.get(le))}var zg=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=Wt(-this._previousScrollPosition.left),t.style.top=Wt(-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,i=t.style,r=e.style,o=i.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),R1&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),R1&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};function z1(n,t){return new Hg(n.get(Ec),n.get(Y),n.get(Ao),t)}var Hg=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(ue(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 dm=class{enable(){}disable(){}attach(){}};function Zw(n,t){return t.some(e=>{let i=n.bottom<e.top,r=n.top>e.bottom,o=n.right<e.left,s=n.left>e.right;return i||r||o||s})}function N1(n,t){return t.some(e=>{let i=n.top<e.top,r=n.bottom>e.bottom,o=n.left<e.left,s=n.right>e.right;return i||r||o||s})}function La(n,t){return new Ug(n.get(Ec),n.get(Ao),n.get(Y),t)}var Ug=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r}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:i,height:r}=this._viewportRuler.getViewportSize();Zw(e,[{width:i,height:r,bottom:r,right:i,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}},H1=(()=>{class n{_injector=d(me);constructor(){}noop=()=>new dm;close=e=>z1(this._injector,e);block=()=>Tc(this._injector);reposition=e=>La(this._injector,e);static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Oo=class{positionStrategy;scrollStrategy=new dm;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 i of e)t[i]!==void 0&&(this[i]=t[i])}}};var $g=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var U1=(()=>{class n{_attachedOverlays=[];_document=d(le);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),$1=(()=>{class n extends U1{_ngZone=d(Y);_renderer=d(jt).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 i=this._attachedOverlays;for(let r=i.length-1;r>-1;r--)if(i[r]._keydownEvents.observers.length>0){this._ngZone.run(()=>i[r]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),W1=(()=>{class n extends U1{_platform=d(He);_ngZone=d(Y);_renderer=d(jt).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let i=this._document.body,r={capture:!0},o=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[o.listen(i,"pointerdown",this._pointerDownListener,r),o.listen(i,"click",this._clickListener,r),o.listen(i,"auxclick",this._clickListener,r),o.listen(i,"contextmenu",this._clickListener,r)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.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=Gn(e)};_clickListener=e=>{let i=Gn(e),r=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:i;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(F1(a.overlayElement,i)||F1(a.overlayElement,r))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(e)):l.next(e)}};static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function F1(n,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=t;for(;i;){if(i===n)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var G1=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(i,r){},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}
|
|
14
|
+
`],encapsulation:2,changeDetection:0})}return n})(),qg=(()=>{class n{_platform=d(He);_containerElement;_document=d(le);_styleLoader=d(At);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||zw()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let i=this._document.createElement("div");i.classList.add(e),zw()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}_loadStyles(){this._styleLoader.load(G1)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Xw=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,i,r){this._renderer=e,this._ngZone=i,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",r)}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()}},Sc=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new P;_attachments=new P;_detachments=new P;_positionStrategy;_scrollStrategy;_locationChanges=ze.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new P;_outsidePointerEvents=new P;_afterNextRenderRef;constructor(t,e,i,r,o,s,a,l,c,p=!1,h,_){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=p,this._injector=h,this._renderer=_,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.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=ln(()=>{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=M(M({},this._config),t),this._updateElementSize()}setDirection(t){this._config=de(M({},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=Wt(this._config.width),t.height=Wt(this._config.height),t.minWidth=Wt(this._config.minWidth),t.minHeight=Wt(this._config.minHeight),t.maxWidth=Wt(this._config.maxWidth),t.maxHeight=Wt(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Xw(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,i){let r=yc(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenEmpty(){let t=!1;try{this._detachContentAfterRenderRef=ln(()=>{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?.()}},L1="cdk-overlay-connected-position-bounding-box",EU=/([A-Za-z%]+)$/;function Jw(n,t){return new Wg(t,n.get(Ao),n.get(le),n.get(He),n.get(qg))}var Wg=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 P;_resizeSubscription=ze.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(L1),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,i=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),p=this._getOverlayFit(c,e,i,a);if(p.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(p,c,i)){o.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleArea<p.visibleArea)&&(s={overlayFit:p,overlayPoint:c,originPoint:l,position:a,overlayRect:e})}if(o.length){let a=null,l=-1;for(let c of o){let p=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);p>l&&(l=p,a=c)}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&&Na(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(L1),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,i){let r;if(i.originX=="center")r=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r=i.originX=="start"?s:a}e.left<0&&(r-=e.left);let o;return i.originY=="center"?o=t.top+t.height/2:o=i.originY=="top"?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r;i.overlayX=="center"?r=-e.width/2:i.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let o;return i.overlayY=="center"?o=-e.height/2:o=i.overlayY=="top"?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){let o=V1(e),{x:s,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let p=0-s,h=s+o.width-i.width,_=0-a,v=a+o.height-i.height,y=this._subtractOverflows(o.width,p,h),T=this._subtractOverflows(o.height,_,v),F=y*T;return{visibleArea:F,isCompletelyWithinViewport:o.width*o.height===F,fitsInViewportVertically:T===o.height,fitsInViewportHorizontally:y==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let r=i.bottom-e.y,o=i.right-e.x,s=j1(this._overlayRef.getConfig().minHeight),a=j1(this._overlayRef.getConfig().minWidth),l=t.fitsInViewportVertically||s!=null&&s<=r,c=t.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=V1(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),l=Math.max(o.top-i.top-t.y,0),c=Math.max(o.left-i.left-t.x,0),p=0,h=0;return r.width<=o.width?p=c||-s:p=t.x<this._viewportMargin?o.left-i.left-t.x:0,r.height<=o.height?h=l||-a:h=t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:p,y:h},{x:t.x+p,y:t.y+h}}_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 i=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!SU(this._lastScrollVisibility,i)){let r=new $g(t,i);this._positionChanges.next(r)}this._lastScrollVisibility=i}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,r=t.overlayY;t.overlayX==="center"?i="center":this._isRtl()?i=t.overlayX==="start"?"right":"left":i=t.overlayX==="start"?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${i} ${r}`}_calculateBoundingBoxRect(t,e){let i=this._viewportRect,r=this._isRtl(),o,s,a;if(e.overlayY==="top")s=t.y,o=i.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=i.height-t.y+this._viewportMargin*2,o=i.height-a+this._viewportMargin;else{let v=Math.min(i.bottom-t.y+i.top,t.y),y=this._lastBoundingBoxSize.height;o=v*2,s=t.y-v,o>y&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-y/2)}let l=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,c=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,p,h,_;if(c)_=i.width-t.x+this._viewportMargin*2,p=t.x-this._viewportMargin;else if(l)h=t.x,p=i.right-t.x;else{let v=Math.min(i.right-t.x+i.left,t.x),y=this._lastBoundingBoxSize.width;p=v*2,h=t.x-v,p>y&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-y/2)}return{top:s,left:h,bottom:a,right:_,width:p,height:o}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Wt(i.height),r.top=Wt(i.top),r.bottom=Wt(i.bottom),r.width=Wt(i.width),r.left=Wt(i.left),r.right=Wt(i.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=Wt(o)),s&&(r.maxWidth=Wt(s))}this._lastBoundingBoxSize=i,Na(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Na(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Na(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let p=this._viewportRuler.getViewportScrollPosition();Na(i,this._getExactOverlayY(e,t,p)),Na(i,this._getExactOverlayX(e,t,p))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=Wt(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=Wt(s.maxWidth):o&&(i.maxWidth="")),Na(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),t.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=Wt(o.y);return r}_getExactOverlayX(t,e,i){let r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i));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;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=Wt(o.x);return r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:N1(t,i),isOriginOutsideView:Zw(t,i),isOverlayClipped:N1(e,i),isOverlayOutsideView:Zw(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.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&&yc(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 Z)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}};function Na(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function j1(n){if(typeof n!="number"&&n!=null){let[t,e]=n.split(EU);return!e||e==="px"?parseFloat(t):null}return n||null}function V1(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 SU(n,t){return n===t?!0:n.isOriginClipped===t.isOriginClipped&&n.isOriginOutsideView===t.isOriginOutsideView&&n.isOverlayClipped===t.isOverlayClipped&&n.isOverlayOutsideView===t.isOverlayOutsideView}var B1="cdk-global-overlay-wrapper";function Os(n){return new Gg}var Gg=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(B1),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,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=i,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),p=this._xPosition,h=this._xOffset,_=this._overlayRef.getConfig().direction==="rtl",v="",y="",T="";l?T="flex-start":p==="center"?(T="center",_?y=h:v=h):_?p==="left"||p==="end"?(T="flex-end",v=h):(p==="right"||p==="start")&&(T="flex-start",y=h):p==="left"||p==="start"?(T="flex-start",v=h):(p==="right"||p==="end")&&(T="flex-end",y=h),t.position=this._cssPosition,t.marginLeft=l?"0":v,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":y,e.justifyContent=T,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(B1),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},q1=(()=>{class n{_injector=d(me);constructor(){}global(){return Os()}flexibleConnectedTo(e){return Jw(this._injector,e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ja(n,t){n.get(At).load(G1);let e=n.get(qg),i=n.get(le),r=n.get(ut),o=n.get(Un),s=n.get(En),a=i.createElement("div"),l=i.createElement("div");l.id=r.getId("cdk-overlay-"),l.classList.add("cdk-overlay-pane"),a.appendChild(l),e.getContainerElement().appendChild(a);let c=new Bg(l,o,n),p=new Oo(t),h=n.get(et,null,{optional:!0})||n.get(jt).createRenderer(null,null);return p.direction=p.direction||s.value,new Sc(c,a,l,p,n.get(Y),n.get($1),i,n.get(Br),n.get(W1),t?.disableAnimations??n.get(ps,null,{optional:!0})==="NoopAnimations",n.get(pt),h)}var Y1=(()=>{class n{scrollStrategies=d(H1);_positionBuilder=d(q1);_injector=d(me);constructor(){}create(e){return ja(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),MU=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Q1=new A("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let n=d(me);return()=>La(n)}}),Mc=(()=>{class n{elementRef=d(Z);constructor(){}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return n})(),Yg=(()=>{class n{_dir=d(En,{optional:!0});_injector=d(me);_overlayRef;_templatePortal;_backdropSubscription=ze.EMPTY;_attachSubscription=ze.EMPTY;_detachSubscription=ze.EMPTY;_positionSubscription=ze.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=d(Q1);_disposeOnNavigation=!1;_ngZone=d(Y);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}backdropClick=new U;positionChange=new U;attach=new U;detach=new U;overlayKeydown=new U;overlayOutsideClick=new U;constructor(){let e=d(An),i=d(Hn);this._templatePortal=new Io(e,i),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=MU);let e=this._overlayRef=ja(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!gn(i)&&(i.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{let r=this._getOriginElement(),o=Gn(i);(!r||r!==o&&!r.contains(o))&&this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Oo({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=Jw(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Mc?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Mc?this.origin.elementRef.nativeElement:this.origin instanceof Z?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(K_(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ie],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",ie],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ie],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ie],push:[2,"cdkConnectedOverlayPush","push",ie],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ie]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[We]})}return n})();function TU(n){let t=d(me);return()=>La(t)}var DU={provide:Q1,useFactory:TU},Po=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[Y1,DU],imports:[Ts,ko,Kw,Kw]})}return n})();function IU(n,t){if(n&1){let e=V();u(0,"div",1)(1,"button",2),w("click",function(){E(e);let r=b();return S(r.action())}),g(2),m()()}if(n&2){let e=b();f(2),Se(" ",e.data.action," ")}}var kU=["label"];function AU(n,t){}var OU=Math.pow(2,31)-1,um=class{_overlayRef;instance;containerInstance;_afterDismissed=new P;_afterOpened=new P;_onAction=new P;_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,OU))}_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}},K1=new A("MatSnackBarData"),Dc=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},PU=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return n})(),RU=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return n})(),NU=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return n})(),Z1=(()=>{class n{snackBarRef=d(um);data=d(K1);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({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(i,r){i&1&&(u(0,"div",0),g(1),m(),I(2,IU,3,1,"div",1)),i&2&&(f(),Se(" ",r.data.message,`
|
|
15
|
+
`),f(),k(r.hasAction?2:-1))},dependencies:[Pn,PU,RU,NU],styles:[`.mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}
|
|
16
|
+
`],encapsulation:2,changeDetection:0})}return n})(),ex="_mat-snack-bar-enter",tx="_mat-snack-bar-exit",FU=(()=>{class n extends Is{_ngZone=d(Y);_elementRef=d(Z);_changeDetectorRef=d(Qe);_platform=d(He);_animationsDisabled=mt();snackBarConfig=d(Dc);_document=d(le);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=d(me);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new P;_onExit=new P;_onEnter=new P;_animationState="void";_live;_label;_role;_liveElementId=d(ut).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 i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}attachDomPortal=e=>{this._assertNotAttached();let i=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),i};onAnimationEnd(e){e===tx?this._completeExit():e===ex&&(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?ln(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(ex)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(ex)},200)))}exit(){return this._destroyed?W(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?ln(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(tx)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(tx),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,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(s=>e.classList.add(s)):e.classList.add(i)),this._exposeToModals();let r=this._label.nativeElement,o="mdc-snackbar__label";r.classList.toggle(o,!r.querySelector(`.${o}`))}_exposeToModals(){let e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],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 i=e.getAttribute("aria-owns");if(i){let r=i.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):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,i=e.querySelector("[aria-hidden]"),r=e.querySelector("[aria-live]");if(i&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&i.contains(document.activeElement)&&(o=document.activeElement),i.removeAttribute("aria-hidden"),r.appendChild(i),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(i,r){if(i&1&&(xe(ks,7),xe(kU,7)),i&2){let o;re(o=oe())&&(r._portalOutlet=o.first),re(o=oe())&&(r._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(i,r){i&1&&w("animationend",function(s){return r.onAnimationEnd(s.animationName)})("animationcancel",function(s){return r.onAnimationEnd(s.animationName)}),i&2&&j("mat-snack-bar-container-enter",r._animationState==="visible")("mat-snack-bar-container-exit",r._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!r._animationsDisabled)},features:[Le],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(i,r){i&1&&(u(0,"div",1)(1,"div",2,0)(3,"div",3),wt(4,AU,0,0,"ng-template",4),m(),H(5,"div"),m()()),i&2&&(f(5),ne("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[ks],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}
|
|
17
|
+
`],encapsulation:2})}return n})();function LU(){return new Dc}var jU=new A("mat-snack-bar-default-options",{providedIn:"root",factory:LU}),mm=(()=>{class n{_live=d(nm);_injector=d(me);_breakpointObserver=d(em);_parentSnackBar=d(n,{optional:!0,skipSelf:!0});_defaultConfig=d(jU);_animationsDisabled=mt();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=Z1;snackBarContainerComponent=FU;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,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){let o=M(M({},this._defaultConfig),r);return o.data={message:e,action:i},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,i){let r=i&&i.viewContainerRef&&i.viewContainerRef.injector,o=me.create({parent:r||this._injector,providers:[{provide:Dc,useValue:i}]}),s=new Do(this.snackBarContainerComponent,i.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){let r=M(M(M({},new Dc),this._defaultConfig),i),o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new um(s,o);if(e instanceof An){let l=new Io(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(l)}else{let l=this._createInjector(r,a),c=new Do(e,void 0,l),p=s.attachComponentPortal(c);a.instance=p.instance}return this._breakpointObserver.observe(b1.HandsetPortrait).pipe($(o.detachments())).subscribe(l=>{o.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let i=new Oo;i.direction=e.direction;let r=Os(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?r.left("0"):a?r.right("0"):r.centerHorizontally(),e.verticalPosition==="top"?r.top("0"):r.bottom("0"),i.positionStrategy=r,i.disableAnimations=this._animationsDisabled,ja(this._injector,i)}_createInjector(e,i){let r=e&&e.viewContainerRef&&e.viewContainerRef.injector;return me.create({parent:r||this._injector,providers:[{provide:um,useValue:i},{provide:K1,useValue:e.data}]})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ic=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[mm],imports:[Po,ko,vn,Me,Z1,Me]})}return n})();function VU(n,t){}var Ps=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var ix=(()=>{class n extends Is{_elementRef=d(Z);_focusTrapFactory=d(tm);_config;_interactivityChecker=d(Ss);_ngZone=d(Y);_focusMonitor=d(fr);_renderer=d(et);_changeDetectorRef=d(Qe);_injector=d(me);_platform=d(He);_document=d(le);_portalOutlet;_focusTrapped=new P;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=d(Ps,{optional:!0})||new Ps,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}attachDomPortal=e=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{o(),s(),e.removeAttribute("tabindex")},o=this._renderer.listen(e,"blur",r),s=this._renderer.listen(e,"mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(e){this._isDestroyed||ln(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let r=Zu(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,i=Zu();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Zu()))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(i,r){if(i&1&&xe(ks,7),i&2){let o;re(o=oe())&&(r._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,r){i&2&&ne("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[Le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,r){i&1&&wt(0,VU,0,0,"ng-template",0)},dependencies:[ks],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
18
|
+
`],encapsulation:2})}return n})(),pm=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new P;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(t,e){this.overlayRef=t,this.config=e,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!gn(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=t.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(t,e){if(this._canClose(t)){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}_canClose(t){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(t,e,this.componentInstance))}},BU=new A("DialogScrollStrategy",{providedIn:"root",factory:()=>{let n=d(me);return()=>Tc(n)}}),zU=new A("DialogData"),HU=new A("DefaultDialogConfig");function UU(n){let t=Fe(n),e=new U;return{valueSignal:t,get value(){return t()},change:e,ngOnDestroy(){e.complete()}}}var rx=(()=>{class n{_injector=d(me);_defaultOptions=d(HU,{optional:!0});_parentDialog=d(n,{optional:!0,skipSelf:!0});_overlayContainer=d(qg);_idGenerator=d(ut);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new P;_afterOpenedAtThisLevel=new P;_ariaHiddenElements=new Map;_scrollStrategy=d(BU);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Zi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ht(void 0)));constructor(){}open(e,i){let r=this._defaultOptions||new Ps;i=M(M({},r),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let o=this._getOverlayConfig(i),s=ja(this._injector,o),a=new pm(s,i),l=this._attachContainer(s,a,i);if(a.containerInstance=l,!this.openDialogs.length){let c=this._overlayContainer.getContainerElement();l._focusTrapped?l._focusTrapped.pipe(Ye(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(c)}):this._hideNonDialogContentFromAssistiveTechnology(c)}return this._attachDialogContent(e,a,l,i),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){nx(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){nx(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),nx(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Oo({positionStrategy:e.positionStrategy||Os().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){let o=r.injector||r.viewContainerRef?.injector,s=[{provide:Ps,useValue:r},{provide:pm,useValue:i},{provide:Sc,useValue:e}],a;r.container?typeof r.container=="function"?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=ix;let l=new Do(a,r.viewContainerRef,me.create({parent:o||this._injector,providers:s}));return e.attach(l).instance}_attachDialogContent(e,i,r,o){if(e instanceof An){let s=this._createInjector(o,i,r,void 0),a={$implicit:o.data,dialogRef:i};o.templateContext&&(a=M(M({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),r.attachTemplatePortal(new Io(e,null,a,s))}else{let s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new Do(e,o.viewContainerRef,s));i.componentRef=a,i.componentInstance=a.instance}}_createInjector(e,i,r,o){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:zU,useValue:e.data},{provide:pm,useValue:i}];return e.providers&&(typeof e.providers=="function"?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(En,null,{optional:!0}))&&a.push({provide:En,useValue:UU(e.direction)}),me.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){let o=i[r];o!==e&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function nx(n,t){let e=n.length;for(;e--;)t(n[e])}var X1=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[rx],imports:[Po,ko,im,ko]})}return n})();function $U(n,t){}var hm=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},ox="mdc-dialog--open",J1="mdc-dialog--opening",eO="mdc-dialog--closing",WU=150,GU=75,iO=(()=>{class n extends ix{_animationStateChanged=new U;_animationsEnabled=!mt();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?nO(this._config.enterAnimationDuration)??WU:0;_exitAnimationDuration=this._animationsEnabled?nO(this._config.exitAnimationDuration)??GU:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(tO,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(J1,ox)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(ox),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(ox),this._animationsEnabled?(this._hostElement.style.setProperty(tO,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(eO)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(J1,eO)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,r){i&2&&($n("id",r._config.id),ne("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),j("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},features:[Le],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,r){i&1&&(u(0,"div",0)(1,"div",1),wt(2,$U,0,0,"ng-template",2),m()())},dependencies:[ks],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
|
|
19
|
+
`],encapsulation:2})}return n})(),tO="--mat-dialog-transition-duration";function nO(n){return n==null?null:typeof n=="number"?n:n.endsWith("ms")?To(n.substring(0,n.length-2)):n.endsWith("s")?To(n.substring(0,n.length-1))*1e3:n==="0"?0:null}var fm=(function(n){return n[n.OPEN=0]="OPEN",n[n.CLOSING=1]="CLOSING",n[n.CLOSED=2]="CLOSED",n})(fm||{}),Si=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new P;_beforeClosed=new P;_result;_closeFallbackTimeout;_state=fm.OPEN;_closeInteractionType;constructor(t,e,i){this._ref=t,this._config=e,this._containerInstance=i,this.disableClose=e.disableClose,this.id=t.id,t.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(ue(r=>r.state==="opened"),Ye(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(ue(r=>r.state==="closed"),Ye(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Xi(this.backdropClick(),this.keydownEvents().pipe(ue(r=>r.keyCode===27&&!this.disableClose&&!gn(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),rO(this,r.type==="keydown"?"keyboard":"mouse"))})}close(t){let e=this._config.closePredicate;e&&!e(t,this._config,this.componentInstance)||(this._result=t,this._containerInstance._animationStateChanged.pipe(ue(i=>i.state==="closing"),Ye(1)).subscribe(i=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),i.totalTime+100)}),this._state=fm.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=fm.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function rO(n,t,e){return n._closeInteractionType=t,n.close(e)}var Yr=new A("MatMdcDialogData"),Qg=new A("mat-mdc-dialog-default-options"),oO=new A("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let n=d(me);return()=>Tc(n)}}),gr=(()=>{class n{_defaultOptions=d(Qg,{optional:!0});_scrollStrategy=d(oO);_parentDialog=d(n,{optional:!0,skipSelf:!0});_idGenerator=d(ut);_injector=d(me);_dialog=d(rx);_animationsDisabled=mt();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new P;_afterOpenedAtThisLevel=new P;dialogConfigClass=hm;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=Zi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ht(void 0)));constructor(){this._dialogRefConstructor=Si,this._dialogContainerType=iO,this._dialogDataToken=Yr}open(e,i){let r;i=M(M({},this._defaultOptions||new hm),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,de(M({},i),{positionStrategy:Os(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||i.enterAnimationDuration?.toLocaleString()==="0"||i.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Ps,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,l)=>(r=new this._dialogRefConstructor(s,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentRef=o.componentRef,r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var sO=(()=>{class n{_dialogRef=d(Si,{optional:!0});_elementRef=d(Z);_dialog=d(gr);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=qU(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n})}return n})(),Ro=(()=>{class n extends sO{id=d(ut).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,r){i&2&&$n("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Le]})}return n})(),No=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[T0([As])]})}return n})(),Fo=(()=>{class n extends sO{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,r){i&2&&j("mat-mdc-dialog-actions-align-start",r.align==="start")("mat-mdc-dialog-actions-align-center",r.align==="center")("mat-mdc-dialog-actions-align-end",r.align==="end")},inputs:{align:"align"},features:[Le]})}return n})();function qU(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}var Va=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[gr],imports:[X1,Po,ko,Me,Me]})}return n})();var kc=class n{baseUrl="/api/projects";http=d(dt);listProjects(){return this.http.get(this.baseUrl)}getProject(t){return this.http.get(`${this.baseUrl}/${t}`)}getProjectConfig(t){return this.http.get(`${this.baseUrl}/${t}/config`)}updateProjectConfig(t,e){return this.http.put(`${this.baseUrl}/${t}/config`,e)}createProject(t,e){return this.http.post(this.baseUrl,{name:t,path:e})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var qe=class n{selectedProjectIdSubject=new ae(null);isLoadingSubject=new ae(!1);refreshTriggerSubject=new ae(void 0);hasInitialized=!1;isLoading$=this.isLoadingSubject.asObservable();projectApi=d(kc);projectListCall=this.refreshTriggerSubject.pipe(lt(()=>this.projectApi.listProjects()),Tr({bufferSize:1,refCount:!0}));projectList$=this.projectListCall.pipe(z(t=>t.projects));forcedProject$=this.projectListCall.pipe(z(t=>t.forcedProject));selectedProject$=In([this.selectedProjectIdSubject,this.forcedProject$]).pipe(lt(([t,e])=>{let i=e??t;return i?this.projectApi.getProject(i):W(null)}),Oe(t=>{t&&t.name!==this.selectedProjectIdSubject.value&&(console.log("[PROJECT-STATE] Backend returned different project name:",t.name),this.selectedProjectIdSubject.next(t.name))}),Tr({bufferSize:1,refCount:!0}));selectProject(t){console.log("[PROJECT-STATE] Explicit project selection:",t),this.forcedProject$.pipe(Ye(1)).subscribe(e=>this.selectedProjectIdSubject.next(e??t))}getSelectedProjectId(){return this.selectedProjectIdSubject.value}getSelectedProjectIdOrThrow(){let t=this.selectedProjectIdSubject.value;if(!t)throw new Error("[PROJECT_STATE] No project selected");return t}clearSelection(){console.log("[PROJECT-STATE] Clearing project selection"),this.selectedProjectIdSubject.next(null)}initializeDefaultProject(){return pe(this,null,function*(){if(this.hasInitialized){console.log("[PROJECT-STATE] Already initialized, skipping");return}this.hasInitialized=!0;let t=yield this.projectApi.listProjects().pipe(Ye(1)).toPromise();if(!t){console.log("[PROJECT-STATE] No response from project API");return}let{defaultProject:e,forcedProject:i}=t;e&&!i?(console.log("[PROJECT-STATE] Initializing with default project:",e),this.selectedProjectIdSubject.next(e)):i?(console.log("[PROJECT-STATE] Initializing with forced project:",i),this.selectedProjectIdSubject.next(i)):console.log("[PROJECT-STATE] No default project, staying on selection page")})}createProject(t,e){return this.isLoadingSubject.next(!0),this.projectApi.createProject(t,e).pipe(Oe(()=>{this.isLoadingSubject.next(!1),this.refreshTriggerSubject.next()}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function Kg(n){n||(n=d(an));let t=new ge(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe($(t))}function qn(n,t){let i=!t?.manualCleanup?t?.injector?.get(an)??d(an):null,r=YU(t?.equal),o;t?.requireSync?o=Fe({kind:0},{equal:r}):o=Fe({kind:1,value:t?.initialValue},{equal:r});let s,a=n.subscribe({next:l=>o.set({kind:1,value:l}),error:l=>{o.set({kind:2,error:l}),s?.()},complete:()=>{s?.()}});if(t?.requireSync&&o().kind===0)throw new O(601,!1);return s=i?.onDestroy(a.unsubscribe.bind(a)),Kt(()=>{let l=o();switch(l.kind){case 1:return l.value;case 2:throw l.error;case 0:throw new O(601,!1)}},{equal:t?.equal})}function YU(n=Object.is){return(t,e)=>t.kind===1&&e.kind===1&&n(t.value,e.value)}var Zg;function QU(){if(Zg===void 0&&(Zg=null,typeof window<"u")){let n=window;n.trustedTypes!==void 0&&(Zg=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return Zg}function gm(n){return QU()?.createHTML(n)||n}function aO(n){return Error(`Unable to find icon with the name "${n}"`)}function KU(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function lO(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function cO(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}var Lo=class{url;svgText;options;svgElement;constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}},uO=(()=>{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,i,r,o){this._httpClient=e,this._sanitizer=i,this._errorHandler=o,this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,o){return this._addSvgIconConfig(e,i,new Lo(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){let s=this._sanitizer.sanitize(Cn.HTML,r);if(!s)throw cO(r);let a=gm(s);return this._addSvgIconConfig(e,i,new Lo("",a,o))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Lo(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){let o=this._sanitizer.sanitize(Cn.HTML,i);if(!o)throw cO(i);let s=gm(o);return this._addSvgIconSetConfig(e,new Lo("",s,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let i=this._sanitizer.sanitize(Cn.RESOURCE_URL,e);if(!i)throw lO(e);let r=this._cachedIconsByUrl.get(i);return r?W(Xg(r)):this._loadSvgIconFromConfig(new Lo(e,null)).pipe(Oe(o=>this._cachedIconsByUrl.set(i,o)),z(o=>Xg(o)))}getNamedSvgIcon(e,i=""){let r=dO(i,e),o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(i,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);let s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):pi(aO(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?W(Xg(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(z(i=>Xg(i)))}_getSvgFromIconSetConfigs(e,i){let r=this._extractIconWithNameFromAnySet(e,i);if(r)return W(r);let o=i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(nn(a=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(Cn.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),W(null)})));return bd(o).pipe(z(()=>{let s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw aO(e);return s}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){let o=i[r];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(Oe(i=>e.svgText=i),z(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?W(null):this._fetchIcon(e).pipe(Oe(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){let o=e.querySelector(`[id="${i}"]`);if(!o)return null;let s=o.cloneNode(!0);if(s.removeAttribute("id"),s.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(s,r);if(s.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(s),r);let a=this._svgElementFromString(gm("<svg></svg>"));return a.appendChild(s),this._setSvgAttributes(a,r)}_svgElementFromString(e){let i=this._document.createElement("DIV");i.innerHTML=e;let r=i.querySelector("svg");if(!r)throw Error("<svg> tag not found");return r}_toSvgElement(e){let i=this._svgElementFromString(gm("<svg></svg>")),r=e.attributes;for(let o=0;o<r.length;o++){let{name:s,value:a}=r[o];s!=="id"&&i.setAttribute(s,a)}for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===this._document.ELEMENT_NODE&&i.appendChild(e.childNodes[o].cloneNode(!0));return i}_setSvgAttributes(e,i){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),i&&i.viewBox&&e.setAttribute("viewBox",i.viewBox),e}_fetchIcon(e){let{url:i,options:r}=e,o=r?.withCredentials??!1;if(!this._httpClient)throw KU();if(i==null)throw Error(`Cannot fetch icon from URL "${i}".`);let s=this._sanitizer.sanitize(Cn.RESOURCE_URL,i);if(!s)throw lO(i);let a=this._inProgressUrlFetches.get(s);if(a)return a;let l=this._httpClient.get(s,{responseType:"text",withCredentials:o}).pipe(z(c=>gm(c)),ao(()=>this._inProgressUrlFetches.delete(s)),Cd());return this._inProgressUrlFetches.set(s,l),l}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(dO(e,i),r),this}_addSvgIconSetConfig(e,i){let r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){let i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;r<this._resolvers.length;r++){let o=this._resolvers[r](i,e);if(o)return ZU(o)?new Lo(o.url,null,o.options):new Lo(o,null)}}static \u0275fac=function(i){return new(i||n)(te(dt,8),te(bi),te(le,8),te(yn))};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Xg(n){return n.cloneNode(!0)}function dO(n,t){return n+":"+t}function ZU(n){return!!(n.url&&n.options)}var XU=["*"],JU=new A("MAT_ICON_DEFAULT_OPTIONS"),e$=new A("mat-icon-location",{providedIn:"root",factory:t$});function t$(){let n=d(le),t=n?n.location:null;return{getPathname:()=>t?t.pathname+t.search:""}}var mO=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],n$=mO.map(n=>`[${n}]`).join(", "),i$=/^url\(['"]?#(.*?)['"]?\)$/,$e=(()=>{class n{_elementRef=d(Z);_iconRegistry=d(uO);_location=d(e$);_errorHandler=d(yn);_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 i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=ze.EMPTY;constructor(){let e=d(new _i("aria-hidden"),{optional:!0}),i=d(JU,{optional:!0});i&&(i.color&&(this.color=this._defaultColor=i.color),i.fontSet&&(this.fontSet=i.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let r=e.childNodes[i];(r.nodeType!==1||r.nodeName.toLowerCase()==="svg")&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.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 i=this._elementsWithExternalReferences;i&&i.forEach((r,o)=>{r.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(n$),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<i.length;o++)mO.forEach(s=>{let a=i[o],l=a.getAttribute(s),c=l?l.match(i$):null;if(c){let p=r.get(a);p||(p=[],r.set(a,p)),p.push({name:s,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Ye(1)).subscribe(o=>this._setSvgElement(o),o=>{let s=`Error retrieving icon ${i}:${r}! ${o.message}`;this._errorHandler.handleError(new Error(s))})}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(i,r){i&2&&(ne("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),si(r.color?"mat-"+r.color:""),j("mat-icon-inline",r.inline)("mat-icon-no-color",r.color!=="primary"&&r.color!=="accent"&&r.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",ie],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:XU,decls:1,vars:0,template:function(i,r){i&1&&(Ge(),we(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}
|
|
20
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Ot=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Me]})}return n})();function dx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var za=dx();function bO(n){za=n}var ym={exec:()=>null};function Ze(n,t=""){let e=typeof n=="string"?n:n.source,i={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Yn.caret,"$1"),e=e.replace(r,s),i},getRegex:()=>new RegExp(e,t)};return i}var Yn={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")},r$=/^(?:[ \t]*(?:\n|$))+/,o$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,s$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cm=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,a$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ux=/(?:[*+-]|\d{1,9}[.)])/,yO=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,CO=Ze(yO).replace(/bull/g,ux).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(),l$=Ze(yO).replace(/bull/g,ux).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(),mx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,c$=/^[^\n]+/,px=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,d$=Ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",px).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),u$=Ze(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ux).getRegex(),nv="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",fx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,m$=Ze("^ {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",fx).replace("tag",nv).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wO=Ze(mx).replace("hr",Cm).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",nv).getRegex(),p$=Ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wO).getRegex(),hx={blockquote:p$,code:o$,def:d$,fences:s$,heading:a$,hr:Cm,html:m$,lheading:CO,list:u$,newline:r$,paragraph:wO,table:ym,text:c$},pO=Ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cm).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",nv).getRegex(),f$=de(M({},hx),{lheading:l$,table:pO,paragraph:Ze(mx).replace("hr",Cm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pO).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",nv).getRegex()}),h$=de(M({},hx),{html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fx).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:ym,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ze(mx).replace("hr",Cm).replace("heading",` *#{1,6} *[^
|
|
21
|
+
]`).replace("lheading",CO).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),g$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,v$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xO=/^( {2,}|\\)\n(?!\s*$)/,_$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,iv=/[\p{P}\p{S}]/u,gx=/[\s\p{P}\p{S}]/u,EO=/[^\s\p{P}\p{S}]/u,b$=Ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gx).getRegex(),SO=/(?!~)[\p{P}\p{S}]/u,y$=/(?!~)[\s\p{P}\p{S}]/u,C$=/(?:[^\s\p{P}\p{S}]|~)/u,w$=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,MO=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,x$=Ze(MO,"u").replace(/punct/g,iv).getRegex(),E$=Ze(MO,"u").replace(/punct/g,SO).getRegex(),TO="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",S$=Ze(TO,"gu").replace(/notPunctSpace/g,EO).replace(/punctSpace/g,gx).replace(/punct/g,iv).getRegex(),M$=Ze(TO,"gu").replace(/notPunctSpace/g,C$).replace(/punctSpace/g,y$).replace(/punct/g,SO).getRegex(),T$=Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,EO).replace(/punctSpace/g,gx).replace(/punct/g,iv).getRegex(),D$=Ze(/\\(punct)/,"gu").replace(/punct/g,iv).getRegex(),I$=Ze(/^<(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(),k$=Ze(fx).replace("(?:-->|$)","-->").getRegex(),A$=Ze("^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",k$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ev=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,O$=Ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ev).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),DO=Ze(/^!?\[(label)\]\[(ref)\]/).replace("label",ev).replace("ref",px).getRegex(),IO=Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",px).getRegex(),P$=Ze("reflink|nolink(?!\\()","g").replace("reflink",DO).replace("nolink",IO).getRegex(),fO=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vx={_backpedal:ym,anyPunctuation:D$,autolink:I$,blockSkip:w$,br:xO,code:v$,del:ym,emStrongLDelim:x$,emStrongRDelimAst:S$,emStrongRDelimUnd:T$,escape:g$,link:O$,nolink:IO,punctuation:b$,reflink:DO,reflinkSearch:P$,tag:A$,text:_$,url:ym},R$=de(M({},vx),{link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",ev).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ev).getRegex()}),ax=de(M({},vx),{emStrongRDelimAst:M$,emStrongLDelim:E$,url:Ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",fO).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:Ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",fO).getRegex()}),N$=de(M({},ax),{br:Ze(xO).replace("{2,}","*").getRegex(),text:Ze(ax.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Jg={normal:hx,gfm:f$,pedantic:h$},vm={normal:vx,gfm:ax,breaks:N$,pedantic:R$},F$={"&":"&","<":"<",">":">",'"':""","'":"'"},hO=n=>F$[n];function Qr(n,t){if(t){if(Yn.escapeTest.test(n))return n.replace(Yn.escapeReplace,hO)}else if(Yn.escapeTestNoEncode.test(n))return n.replace(Yn.escapeReplaceNoEncode,hO);return n}function gO(n){try{n=encodeURI(n).replace(Yn.percentDecode,"%")}catch{return null}return n}function vO(n,t){let e=n.replace(Yn.findPipe,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=e.split(Yn.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(Yn.slashPipe,"|");return i}function _m(n,t,e){let i=n.length;if(i===0)return"";let r=0;for(;r<i;){let o=n.charAt(i-r-1);if(o===t&&!e)r++;else if(o!==t&&e)r++;else break}return n.slice(0,i-r)}function L$(n,t){if(n.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===t[0])e++;else if(n[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function _O(n,t,e,i,r){let o=t.href,s=t.title||null,a=n[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function j$(n,t,e){let i=n.match(e.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
|
|
22
|
+
`).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=r.length?o.slice(r.length):o}).join(`
|
|
23
|
+
`)}var tv=class{options;rules;lexer;constructor(n){this.options=n||za}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:_m(e,`
|
|
24
|
+
`)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=j$(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:i}}}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 i=_m(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.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:_m(t[0],`
|
|
25
|
+
`)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=_m(t[0],`
|
|
26
|
+
`).split(`
|
|
27
|
+
`),i="",r="",o=[];for(;e.length>0;){let s=!1,a=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))a.push(e[l]),s=!0;else if(!s)a.push(e[l]);else break;e=e.slice(l);let c=a.join(`
|
|
28
|
+
`),p=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
29
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
30
|
+
${c}`:c,r=r?`${r}
|
|
31
|
+
${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=h,e.length===0)break;let _=o.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let v=_,y=v.raw+`
|
|
32
|
+
`+e.join(`
|
|
33
|
+
`),T=this.blockquote(y);o[o.length-1]=T,i=i.substring(0,i.length-v.raw.length)+T.raw,r=r.substring(0,r.length-v.text.length)+T.text;break}else if(_?.type==="list"){let v=_,y=v.raw+`
|
|
34
|
+
`+e.join(`
|
|
35
|
+
`),T=this.list(y);o[o.length-1]=T,i=i.substring(0,i.length-_.raw.length)+T.raw,r=r.substring(0,r.length-v.raw.length)+T.raw,e=y.substring(o.at(-1).raw.length).split(`
|
|
36
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:o,text:r}}}list(n){let t=this.rules.block.list.exec(n);if(t){let e=t[1].trim(),i=e.length>1,r={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let o=this.rules.other.listItemRegex(e),s=!1;for(;n;){let l=!1,c="",p="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;c=t[0],n=n.substring(c.length);let h=t[2].split(`
|
|
37
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,L=>" ".repeat(3*L.length)),_=n.split(`
|
|
38
|
+
`,1)[0],v=!h.trim(),y=0;if(this.options.pedantic?(y=2,p=h.trimStart()):v?y=t[1].length+1:(y=t[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=h.slice(y),y+=t[1].length),v&&this.rules.other.blankLine.test(_)&&(c+=_+`
|
|
39
|
+
`,n=n.substring(_.length+1),l=!0),!l){let L=this.rules.other.nextBulletRegex(y),ve=this.rules.other.hrRegex(y),Ve=this.rules.other.fencesBeginRegex(y),_e=this.rules.other.headingBeginRegex(y),Lt=this.rules.other.htmlBeginRegex(y);for(;n;){let vt=n.split(`
|
|
40
|
+
`,1)[0],St;if(_=vt,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),St=_):St=_.replace(this.rules.other.tabCharGlobal," "),Ve.test(_)||_e.test(_)||Lt.test(_)||L.test(_)||ve.test(_))break;if(St.search(this.rules.other.nonSpaceChar)>=y||!_.trim())p+=`
|
|
41
|
+
`+St.slice(y);else{if(v||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ve.test(h)||_e.test(h)||ve.test(h))break;p+=`
|
|
42
|
+
`+_}!v&&!_.trim()&&(v=!0),c+=vt+`
|
|
43
|
+
`,n=n.substring(vt.length+1),h=St.slice(y)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let T=null,F;this.options.gfm&&(T=this.rules.other.listIsTask.exec(p),T&&(F=T[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!T,checked:F,loose:!1,text:p,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){let c=r.items[l].tokens.filter(h=>h.type==="space"),p=c.length>0&&c.some(h=>this.rules.other.anyLine.test(h.raw));r.loose=p}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}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," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=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:i,title:r}}}table(n){let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=vO(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
44
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let s of i)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 r)o.rows.push(vO(s,o.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[l]})));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)===`
|
|
45
|
+
`?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=_m(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=L$(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 i=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),_O(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.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 i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[i.toLowerCase()];if(!r){let o=e[0].charAt(0);return{type:"text",raw:o,text:o}}return _O(e,r,e[0],this.lexer,this.rules)}}emStrong(n,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!(!i||i[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!e||this.rules.inline.punctuation.exec(e))){let r=[...i[0]].length-1,o,s,a=r,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*n.length+r);(i=c.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){a+=s;continue}else if((i[5]||i[6])&&r%3&&!((r+s)%3)){l+=s;continue}if(a-=s,a>0)continue;s=Math.min(s,s+a+l);let p=[...i[0]][0].length,h=n.slice(0,r+i.index+p+s);if(Math.min(r,s)%2){let v=h.slice(1,-1);return{type:"em",raw:h,text:v,tokens:this.lexer.inlineTokens(v)}}let _=h.slice(2,-2);return{type:"strong",raw:h,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(n){let t=this.rules.inline.code.exec(n);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(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,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,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}}}},vr=class lx{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||za,this.options.tokenizer=this.options.tokenizer||new tv,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:Yn,block:Jg.normal,inline:vm.normal};this.options.pedantic?(e.block=Jg.pedantic,e.inline=vm.pedantic):this.options.gfm&&(e.block=Jg.gfm,this.options.breaks?e.inline=vm.breaks:e.inline=vm.gfm),this.tokenizer.rules=e}static get rules(){return{block:Jg,inline:vm}}static lex(t,e){return new lx(e).lex(t)}static lexInline(t,e){return new lx(e).inlineTokens(t)}lex(t){t=t.replace(Yn.carriageReturn,`
|
|
46
|
+
`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){for(this.options.pedantic&&(t=t.replace(Yn.tabCharGlobal," ").replace(Yn.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let s=e.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
|
|
47
|
+
`:e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
48
|
+
`)?"":`
|
|
49
|
+
`)+r.raw,s.text+=`
|
|
50
|
+
`+r.text,this.inlineQueue.at(-1).src=s.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
51
|
+
`)?"":`
|
|
52
|
+
`)+r.raw,s.text+=`
|
|
53
|
+
`+r.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},e.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let s=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=e.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
54
|
+
`)?"":`
|
|
55
|
+
`)+r.raw,s.text+=`
|
|
56
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(r),i=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
57
|
+
`)?"":`
|
|
58
|
+
`)+r.raw,s.text+=`
|
|
59
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(r);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 i=t,r=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,s="";for(;t;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.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 c=e.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):e.push(a);continue}if(a=this.tokenizer.emStrong(t,i,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 l=t;if(this.options.extensions?.startInline){let c=1/0,p=t.slice(1),h;this.options.extensions.startInline.forEach(_=>{h=_.call({lexer:this},p),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let c=e.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):e.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},Ac=class{options;parser;constructor(n){this.options=n||za}space(n){return""}code({text:n,lang:t,escaped:e}){let i=(t||"").match(Yn.notSpaceStart)?.[0],r=n.replace(Yn.endingNewline,"")+`
|
|
60
|
+
`;return i?'<pre><code class="language-'+Qr(i)+'">'+(e?r:Qr(r,!0))+`</code></pre>
|
|
61
|
+
`:"<pre><code>"+(e?r:Qr(r,!0))+`</code></pre>
|
|
62
|
+
`}blockquote({tokens:n}){return`<blockquote>
|
|
63
|
+
${this.parser.parse(n)}</blockquote>
|
|
64
|
+
`}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}>
|
|
65
|
+
`}hr(n){return`<hr>
|
|
66
|
+
`}list(n){let t=n.ordered,e=n.start,i="";for(let s=0;s<n.items.length;s++){let a=n.items[s];i+=this.listitem(a)}let r=t?"ol":"ul",o=t&&e!==1?' start="'+e+'"':"";return"<"+r+o+`>
|
|
67
|
+
`+i+"</"+r+`>
|
|
68
|
+
`}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+" "+Qr(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>
|
|
69
|
+
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
|
70
|
+
`}table(n){let t="",e="";for(let r=0;r<n.header.length;r++)e+=this.tablecell(n.header[r]);t+=this.tablerow({text:e});let i="";for(let r=0;r<n.rows.length;r++){let o=n.rows[r];e="";for(let s=0;s<o.length;s++)e+=this.tablecell(o[s]);i+=this.tablerow({text:e})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
71
|
+
<thead>
|
|
72
|
+
`+t+`</thead>
|
|
73
|
+
`+i+`</table>
|
|
74
|
+
`}tablerow({text:n}){return`<tr>
|
|
75
|
+
${n}</tr>
|
|
76
|
+
`}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
|
|
77
|
+
`}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>${Qr(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 i=this.parser.parseInline(e),r=gO(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return t&&(o+=' title="'+Qr(t)+'"'),o+=">"+i+"</a>",o}image({href:n,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let r=gO(n);if(r===null)return Qr(e);n=r;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${Qr(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Qr(n.text)}},_x=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""}},_r=class cx{options;renderer;textRenderer;constructor(t){this.options=t||za,this.options.renderer=this.options.renderer||new Ac,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _x}static parse(t,e){return new cx(e).parse(t)}static parseInline(t,e){return new cx(e).parseInline(t)}parse(t,e=!0){let i="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let a=o,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){i+=l||"";continue}}let s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,l=this.renderer.text(a);for(;r+1<t.length&&t[r+1].type==="text";)a=t[++r],l+=`
|
|
78
|
+
`+this.renderer.text(a);e?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;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 i}parseInline(t,e=this.renderer){let i="";for(let r=0;r<t.length;r++){let o=t[r];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)){i+=a||"";continue}}let s=o;switch(s.type){case"escape":{i+=e.text(s);break}case"html":{i+=e.html(s);break}case"link":{i+=e.link(s);break}case"image":{i+=e.image(s);break}case"strong":{i+=e.strong(s);break}case"em":{i+=e.em(s);break}case"codespan":{i+=e.codespan(s);break}case"br":{i+=e.br(s);break}case"del":{i+=e.del(s);break}case"text":{i+=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 i}},bm=class{options;block;constructor(n){this.options=n||za}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?vr.lex:vr.lexInline}provideParser(){return this.block?_r.parse:_r.parseInline}},V$=class{defaults=dx();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=_r;Renderer=Ac;TextRenderer=_x;Lexer=vr;Tokenizer=tv;Hooks=bm;constructor(...n){this.use(...n)}walkTokens(n,t){let e=[];for(let i of n)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)e=e.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let s of o)e=e.concat(this.walkTokens(s.tokens,t));break}case"list":{let r=i;e=e.concat(this.walkTokens(r.items,t));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let s=r[o].flat(1/0);e=e.concat(this.walkTokens(s,t))}):r.tokens&&(e=e.concat(this.walkTokens(r.tokens,t)))}}return e}use(...n){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(e=>{let i=M({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),e.renderer){let r=this.defaults.renderer||new Ac(this.defaults);for(let o in e.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=e.renderer[s],l=r[s];r[s]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p||""}}i.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new tv(this.defaults);for(let o in e.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=e.tokenizer[s],l=r[s];r[s]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}i.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new bm;for(let o in e.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=e.hooks[s],l=r[s];bm.passThroughHooks.has(o)?r[s]=c=>{if(this.defaults.async&&bm.passThroughHooksRespectAsync.has(o))return pe(this,null,function*(){let h=yield a.call(r,c);return l.call(r,h)});let p=a.call(r,c);return l.call(r,p)}:r[s]=(...c)=>{if(this.defaults.async)return pe(this,null,function*(){let h=yield a.apply(r,c);return h===!1&&(h=yield l.apply(r,c)),h});let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}i.hooks=r}if(e.walkTokens){let r=this.defaults.walkTokens,o=e.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults=M(M({},this.defaults),i)}),this}setOptions(n){return this.defaults=M(M({},this.defaults),n),this}lexer(n,t){return vr.lex(n,t??this.defaults)}parser(n,t){return _r.parse(n,t??this.defaults)}parseMarkdown(n){return(t,e)=>{let i=M({},e),r=M(M({},this.defaults),i),o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.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(r.hooks&&(r.hooks.options=r,r.hooks.block=n),r.async)return pe(this,null,function*(){let s=r.hooks?yield r.hooks.preprocess(t):t,a=yield(r.hooks?yield r.hooks.provideLexer():n?vr.lex:vr.lexInline)(s,r),l=r.hooks?yield r.hooks.processAllTokens(a):a;r.walkTokens&&(yield Promise.all(this.walkTokens(l,r.walkTokens)));let c=yield(r.hooks?yield r.hooks.provideParser():n?_r.parse:_r.parseInline)(l,r);return r.hooks?yield r.hooks.postprocess(c):c}).catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let s=(r.hooks?r.hooks.provideLexer():n?vr.lex:vr.lexInline)(t,r);r.hooks&&(s=r.hooks.processAllTokens(s)),r.walkTokens&&this.walkTokens(s,r.walkTokens);let a=(r.hooks?r.hooks.provideParser():n?_r.parse:_r.parseInline)(s,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(s){return o(s)}}}onError(n,t){return e=>{if(e.message+=`
|
|
79
|
+
Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Qr(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},Ba=new V$;function nt(n,t){return Ba.parse(n,t)}nt.options=nt.setOptions=function(n){return Ba.setOptions(n),nt.defaults=Ba.defaults,bO(nt.defaults),nt};nt.getDefaults=dx;nt.defaults=za;nt.use=function(...n){return Ba.use(...n),nt.defaults=Ba.defaults,bO(nt.defaults),nt};nt.walkTokens=function(n,t){return Ba.walkTokens(n,t)};nt.parseInline=Ba.parseInline;nt.Parser=_r;nt.parser=_r.parse;nt.Renderer=Ac;nt.TextRenderer=_x;nt.Lexer=vr;nt.lexer=vr.lex;nt.Tokenizer=tv;nt.Hooks=bm;nt.parse=nt;var ege=nt.options,tge=nt.setOptions,nge=nt.use,ige=nt.walkTokens,rge=nt.parseInline;var oge=_r.parse,sge=vr.lex;var{entries:jO,setPrototypeOf:kO,isFrozen:B$,getPrototypeOf:z$,getOwnPropertyDescriptor:H$}=Object,{freeze:Kn,seal:Ui,create:Sx}=Object,{apply:Mx,construct:Tx}=typeof Reflect<"u"&&Reflect;Kn||(Kn=function(t){return t});Ui||(Ui=function(t){return t});Mx||(Mx=function(t,e){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return t.apply(e,r)});Tx||(Tx=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return new t(...i)});var rv=Zn(Array.prototype.forEach),U$=Zn(Array.prototype.lastIndexOf),AO=Zn(Array.prototype.pop),wm=Zn(Array.prototype.push),$$=Zn(Array.prototype.splice),sv=Zn(String.prototype.toLowerCase),bx=Zn(String.prototype.toString),yx=Zn(String.prototype.match),xm=Zn(String.prototype.replace),W$=Zn(String.prototype.indexOf),G$=Zn(String.prototype.trim),br=Zn(Object.prototype.hasOwnProperty),Qn=Zn(RegExp.prototype.test),Em=q$(TypeError);function Zn(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return Mx(n,t,i)}}function q$(n){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Tx(n,e)}}function Be(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sv;kO&&kO(n,null);let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=e(r);o!==r&&(B$(t)||(t[i]=o),r=o)}n[r]=!0}return n}function Y$(n){for(let t=0;t<n.length;t++)br(n,t)||(n[t]=null);return n}function Kr(n){let t=Sx(null);for(let[e,i]of jO(n))br(n,e)&&(Array.isArray(i)?t[e]=Y$(i):i&&typeof i=="object"&&i.constructor===Object?t[e]=Kr(i):t[e]=i);return t}function Sm(n,t){for(;n!==null;){let i=H$(n,t);if(i){if(i.get)return Zn(i.get);if(typeof i.value=="function")return Zn(i.value)}n=z$(n)}function e(){return null}return e}var OO=Kn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Cx=Kn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wx=Kn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Q$=Kn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xx=Kn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),K$=Kn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),PO=Kn(["#text"]),RO=Kn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ex=Kn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),NO=Kn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ov=Kn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z$=Ui(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X$=Ui(/<%[\w\W]*|[\w\W]*%>/gm),J$=Ui(/\$\{[\w\W]*/gm),e5=Ui(/^data-[\-\w.\u00B7-\uFFFF]+$/),t5=Ui(/^aria-[\-\w]+$/),VO=Ui(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),n5=Ui(/^(?:\w+script|data):/i),i5=Ui(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),BO=Ui(/^html$/i),r5=Ui(/^[a-z][.\w]*(-[.\w]+)+$/i),FO=Object.freeze({__proto__:null,ARIA_ATTR:t5,ATTR_WHITESPACE:i5,CUSTOM_ELEMENT:r5,DATA_ATTR:e5,DOCTYPE_NAME:BO,ERB_EXPR:X$,IS_ALLOWED_URI:VO,IS_SCRIPT_OR_DATA:n5,MUSTACHE_EXPR:Z$,TMPLIT_EXPR:J$}),Mm={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},o5=function(){return typeof window>"u"?null:window},s5=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},LO=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function zO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o5(),t=he=>zO(he);if(t.version="3.3.1",t.removed=[],!n||!n.document||n.document.nodeType!==Mm.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n,i=e,r=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:p=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:h,DOMParser:_,trustedTypes:v}=n,y=l.prototype,T=Sm(y,"cloneNode"),F=Sm(y,"remove"),L=Sm(y,"nextSibling"),ve=Sm(y,"childNodes"),Ve=Sm(y,"parentNode");if(typeof s=="function"){let he=e.createElement("template");he.content&&he.content.ownerDocument&&(e=he.content.ownerDocument)}let _e,Lt="",{implementation:vt,createNodeIterator:St,createDocumentFragment:Sn,getElementsByTagName:io}=e,{importNode:Wo}=i,un=LO();t.isSupported=typeof jO=="function"&&typeof Ve=="function"&&vt&&vt.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Yi,ERB_EXPR:Vs,TMPLIT_EXPR:tl,DATA_ATTR:Ym,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:ye,CUSTOM_ELEMENT:Ue}=FO,{IS_ALLOWED_URI:zt}=FO,it=null,Mn=Be({},[...OO,...Cx,...wx,...xx,...PO]),_t=null,bt=Be({},[...RO,...Ex,...NO,...ov]),Dt=Object.seal(Sx(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Bs=null,qt=null,ei=Object.seal(Sx(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Fn=!0,Go=!0,nl=!1,aE=!0,il=!1,Qm=!0,zs=!1,g_=!1,v_=!1,rl=!1,Km=!1,Zm=!1,lE=!0,cE=!1,zR="user-content-",__=!0,cd=!1,ol={},wr=null,b_=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),dE=null,uE=Be({},["audio","video","img","source","image","track"]),y_=null,mE=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xm="http://www.w3.org/1998/Math/MathML",Jm="http://www.w3.org/2000/svg",ro="http://www.w3.org/1999/xhtml",sl=ro,C_=!1,w_=null,HR=Be({},[Xm,Jm,ro],bx),ep=Be({},["mi","mo","mn","ms","mtext"]),tp=Be({},["annotation-xml"]),UR=Be({},["title","style","font","a","script"]),dd=null,$R=["application/xhtml+xml","text/html"],WR="text/html",en=null,al=null,GR=e.createElement("form"),pE=function(C){return C instanceof RegExp||C instanceof Function},x_=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(al&&al===C)){if((!C||typeof C!="object")&&(C={}),C=Kr(C),dd=$R.indexOf(C.PARSER_MEDIA_TYPE)===-1?WR:C.PARSER_MEDIA_TYPE,en=dd==="application/xhtml+xml"?bx:sv,it=br(C,"ALLOWED_TAGS")?Be({},C.ALLOWED_TAGS,en):Mn,_t=br(C,"ALLOWED_ATTR")?Be({},C.ALLOWED_ATTR,en):bt,w_=br(C,"ALLOWED_NAMESPACES")?Be({},C.ALLOWED_NAMESPACES,bx):HR,y_=br(C,"ADD_URI_SAFE_ATTR")?Be(Kr(mE),C.ADD_URI_SAFE_ATTR,en):mE,dE=br(C,"ADD_DATA_URI_TAGS")?Be(Kr(uE),C.ADD_DATA_URI_TAGS,en):uE,wr=br(C,"FORBID_CONTENTS")?Be({},C.FORBID_CONTENTS,en):b_,Bs=br(C,"FORBID_TAGS")?Be({},C.FORBID_TAGS,en):Kr({}),qt=br(C,"FORBID_ATTR")?Be({},C.FORBID_ATTR,en):Kr({}),ol=br(C,"USE_PROFILES")?C.USE_PROFILES:!1,Fn=C.ALLOW_ARIA_ATTR!==!1,Go=C.ALLOW_DATA_ATTR!==!1,nl=C.ALLOW_UNKNOWN_PROTOCOLS||!1,aE=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,il=C.SAFE_FOR_TEMPLATES||!1,Qm=C.SAFE_FOR_XML!==!1,zs=C.WHOLE_DOCUMENT||!1,rl=C.RETURN_DOM||!1,Km=C.RETURN_DOM_FRAGMENT||!1,Zm=C.RETURN_TRUSTED_TYPE||!1,v_=C.FORCE_BODY||!1,lE=C.SANITIZE_DOM!==!1,cE=C.SANITIZE_NAMED_PROPS||!1,__=C.KEEP_CONTENT!==!1,cd=C.IN_PLACE||!1,zt=C.ALLOWED_URI_REGEXP||VO,sl=C.NAMESPACE||ro,ep=C.MATHML_TEXT_INTEGRATION_POINTS||ep,tp=C.HTML_INTEGRATION_POINTS||tp,Dt=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&pE(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Dt.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&pE(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Dt.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Dt.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),il&&(Go=!1),Km&&(rl=!0),ol&&(it=Be({},PO),_t=[],ol.html===!0&&(Be(it,OO),Be(_t,RO)),ol.svg===!0&&(Be(it,Cx),Be(_t,Ex),Be(_t,ov)),ol.svgFilters===!0&&(Be(it,wx),Be(_t,Ex),Be(_t,ov)),ol.mathMl===!0&&(Be(it,xx),Be(_t,NO),Be(_t,ov))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?ei.tagCheck=C.ADD_TAGS:(it===Mn&&(it=Kr(it)),Be(it,C.ADD_TAGS,en))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?ei.attributeCheck=C.ADD_ATTR:(_t===bt&&(_t=Kr(_t)),Be(_t,C.ADD_ATTR,en))),C.ADD_URI_SAFE_ATTR&&Be(y_,C.ADD_URI_SAFE_ATTR,en),C.FORBID_CONTENTS&&(wr===b_&&(wr=Kr(wr)),Be(wr,C.FORBID_CONTENTS,en)),C.ADD_FORBID_CONTENTS&&(wr===b_&&(wr=Kr(wr)),Be(wr,C.ADD_FORBID_CONTENTS,en)),__&&(it["#text"]=!0),zs&&Be(it,["html","head","body"]),it.table&&(Be(it,["tbody"]),delete Bs.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Em('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Em('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_e=C.TRUSTED_TYPES_POLICY,Lt=_e.createHTML("")}else _e===void 0&&(_e=s5(v,r)),_e!==null&&typeof Lt=="string"&&(Lt=_e.createHTML(""));Kn&&Kn(C),al=C}},fE=Be({},[...Cx,...wx,...Q$]),hE=Be({},[...xx,...K$]),qR=function(C){let B=Ve(C);(!B||!B.tagName)&&(B={namespaceURI:sl,tagName:"template"});let ce=sv(C.tagName),It=sv(B.tagName);return w_[C.namespaceURI]?C.namespaceURI===Jm?B.namespaceURI===ro?ce==="svg":B.namespaceURI===Xm?ce==="svg"&&(It==="annotation-xml"||ep[It]):!!fE[ce]:C.namespaceURI===Xm?B.namespaceURI===ro?ce==="math":B.namespaceURI===Jm?ce==="math"&&tp[It]:!!hE[ce]:C.namespaceURI===ro?B.namespaceURI===Jm&&!tp[It]||B.namespaceURI===Xm&&!ep[It]?!1:!hE[ce]&&(UR[ce]||!fE[ce]):!!(dd==="application/xhtml+xml"&&w_[C.namespaceURI]):!1},xr=function(C){wm(t.removed,{element:C});try{Ve(C).removeChild(C)}catch{F(C)}},Hs=function(C,B){try{wm(t.removed,{attribute:B.getAttributeNode(C),from:B})}catch{wm(t.removed,{attribute:null,from:B})}if(B.removeAttribute(C),C==="is")if(rl||Km)try{xr(B)}catch{}else try{B.setAttribute(C,"")}catch{}},gE=function(C){let B=null,ce=null;if(v_)C="<remove></remove>"+C;else{let Yt=yx(C,/^[\r\n\t ]+/);ce=Yt&&Yt[0]}dd==="application/xhtml+xml"&&sl===ro&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let It=_e?_e.createHTML(C):C;if(sl===ro)try{B=new _().parseFromString(It,dd)}catch{}if(!B||!B.documentElement){B=vt.createDocument(sl,"template",null);try{B.documentElement.innerHTML=C_?Lt:It}catch{}}let Tn=B.body||B.documentElement;return C&&ce&&Tn.insertBefore(e.createTextNode(ce),Tn.childNodes[0]||null),sl===ro?io.call(B,zs?"html":"body")[0]:zs?B.documentElement:Tn},vE=function(C){return St.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},E_=function(C){return C instanceof h&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof p)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},_E=function(C){return typeof a=="function"&&C instanceof a};function oo(he,C,B){rv(he,ce=>{ce.call(t,C,B,al)})}let bE=function(C){let B=null;if(oo(un.beforeSanitizeElements,C,null),E_(C))return xr(C),!0;let ce=en(C.nodeName);if(oo(un.uponSanitizeElement,C,{tagName:ce,allowedTags:it}),Qm&&C.hasChildNodes()&&!_E(C.firstElementChild)&&Qn(/<[/\w!]/g,C.innerHTML)&&Qn(/<[/\w!]/g,C.textContent)||C.nodeType===Mm.progressingInstruction||Qm&&C.nodeType===Mm.comment&&Qn(/<[/\w]/g,C.data))return xr(C),!0;if(!(ei.tagCheck instanceof Function&&ei.tagCheck(ce))&&(!it[ce]||Bs[ce])){if(!Bs[ce]&&CE(ce)&&(Dt.tagNameCheck instanceof RegExp&&Qn(Dt.tagNameCheck,ce)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(ce)))return!1;if(__&&!wr[ce]){let It=Ve(C)||C.parentNode,Tn=ve(C)||C.childNodes;if(Tn&&It){let Yt=Tn.length;for(let ti=Yt-1;ti>=0;--ti){let so=T(Tn[ti],!0);so.__removalCount=(C.__removalCount||0)+1,It.insertBefore(so,L(C))}}}return xr(C),!0}return C instanceof l&&!qR(C)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Qn(/<\/no(script|embed|frames)/i,C.innerHTML)?(xr(C),!0):(il&&C.nodeType===Mm.text&&(B=C.textContent,rv([Yi,Vs,tl],It=>{B=xm(B,It," ")}),C.textContent!==B&&(wm(t.removed,{element:C.cloneNode()}),C.textContent=B)),oo(un.afterSanitizeElements,C,null),!1)},yE=function(C,B,ce){if(lE&&(B==="id"||B==="name")&&(ce in e||ce in GR))return!1;if(!(Go&&!qt[B]&&Qn(Ym,B))){if(!(Fn&&Qn(se,B))){if(!(ei.attributeCheck instanceof Function&&ei.attributeCheck(B,C))){if(!_t[B]||qt[B]){if(!(CE(C)&&(Dt.tagNameCheck instanceof RegExp&&Qn(Dt.tagNameCheck,C)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(C))&&(Dt.attributeNameCheck instanceof RegExp&&Qn(Dt.attributeNameCheck,B)||Dt.attributeNameCheck instanceof Function&&Dt.attributeNameCheck(B,C))||B==="is"&&Dt.allowCustomizedBuiltInElements&&(Dt.tagNameCheck instanceof RegExp&&Qn(Dt.tagNameCheck,ce)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(ce))))return!1}else if(!y_[B]){if(!Qn(zt,xm(ce,ye,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&C!=="script"&&W$(ce,"data:")===0&&dE[C])){if(!(nl&&!Qn(fe,xm(ce,ye,"")))){if(ce)return!1}}}}}}}return!0},CE=function(C){return C!=="annotation-xml"&&yx(C,Ue)},wE=function(C){oo(un.beforeSanitizeAttributes,C,null);let{attributes:B}=C;if(!B||E_(C))return;let ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_t,forceKeepAttr:void 0},It=B.length;for(;It--;){let Tn=B[It],{name:Yt,namespaceURI:ti,value:so}=Tn,ll=en(Yt),S_=so,bn=Yt==="value"?S_:G$(S_);if(ce.attrName=ll,ce.attrValue=bn,ce.keepAttr=!0,ce.forceKeepAttr=void 0,oo(un.uponSanitizeAttribute,C,ce),bn=ce.attrValue,cE&&(ll==="id"||ll==="name")&&(Hs(Yt,C),bn=zR+bn),Qm&&Qn(/((--!?|])>)|<\/(style|title|textarea)/i,bn)){Hs(Yt,C);continue}if(ll==="attributename"&&yx(bn,"href")){Hs(Yt,C);continue}if(ce.forceKeepAttr)continue;if(!ce.keepAttr){Hs(Yt,C);continue}if(!aE&&Qn(/\/>/i,bn)){Hs(Yt,C);continue}il&&rv([Yi,Vs,tl],EE=>{bn=xm(bn,EE," ")});let xE=en(C.nodeName);if(!yE(xE,ll,bn)){Hs(Yt,C);continue}if(_e&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!ti)switch(v.getAttributeType(xE,ll)){case"TrustedHTML":{bn=_e.createHTML(bn);break}case"TrustedScriptURL":{bn=_e.createScriptURL(bn);break}}if(bn!==S_)try{ti?C.setAttributeNS(ti,Yt,bn):C.setAttribute(Yt,bn),E_(C)?xr(C):AO(t.removed)}catch{Hs(Yt,C)}}oo(un.afterSanitizeAttributes,C,null)},YR=function he(C){let B=null,ce=vE(C);for(oo(un.beforeSanitizeShadowDOM,C,null);B=ce.nextNode();)oo(un.uponSanitizeShadowNode,B,null),bE(B),wE(B),B.content instanceof o&&he(B.content);oo(un.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(he){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,ce=null,It=null,Tn=null;if(C_=!he,C_&&(he="<!-->"),typeof he!="string"&&!_E(he))if(typeof he.toString=="function"){if(he=he.toString(),typeof he!="string")throw Em("dirty is not a string, aborting")}else throw Em("toString is not a function");if(!t.isSupported)return he;if(g_||x_(C),t.removed=[],typeof he=="string"&&(cd=!1),cd){if(he.nodeName){let so=en(he.nodeName);if(!it[so]||Bs[so])throw Em("root node is forbidden and cannot be sanitized in-place")}}else if(he instanceof a)B=gE("<!---->"),ce=B.ownerDocument.importNode(he,!0),ce.nodeType===Mm.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?B=ce:B.appendChild(ce);else{if(!rl&&!il&&!zs&&he.indexOf("<")===-1)return _e&&Zm?_e.createHTML(he):he;if(B=gE(he),!B)return rl?null:Zm?Lt:""}B&&v_&&xr(B.firstChild);let Yt=vE(cd?he:B);for(;It=Yt.nextNode();)bE(It),wE(It),It.content instanceof o&&YR(It.content);if(cd)return he;if(rl){if(Km)for(Tn=Sn.call(B.ownerDocument);B.firstChild;)Tn.appendChild(B.firstChild);else Tn=B;return(_t.shadowroot||_t.shadowrootmode)&&(Tn=Wo.call(i,Tn,!0)),Tn}let ti=zs?B.outerHTML:B.innerHTML;return zs&&it["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Qn(BO,B.ownerDocument.doctype.name)&&(ti="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
|
|
80
|
+
`+ti),il&&rv([Yi,Vs,tl],so=>{ti=xm(ti,so," ")}),_e&&Zm?_e.createHTML(ti):ti},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};x_(he),g_=!0},t.clearConfig=function(){al=null,g_=!1},t.isValidAttribute=function(he,C,B){al||x_({});let ce=en(he),It=en(C);return yE(ce,It,B)},t.addHook=function(he,C){typeof C=="function"&&wm(un[he],C)},t.removeHook=function(he,C){if(C!==void 0){let B=U$(un[he],C);return B===-1?void 0:$$(un[he],B,1)[0]}return AO(un[he])},t.removeHooks=function(he){un[he]=[]},t.removeAllHooks=function(){un=LO()},t}var HO=zO();var Zr=class n{renderer;constructor(){this.renderer=new Ac,this.configureRenderer()}configureRenderer(){let t=this.renderer.link.bind(this.renderer);this.renderer.link=e=>{let i=this.isExternalLink(e.href),r=t(e);if(i){r=r.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ');let o=e.title?`${e.text} - ${e.title} (opens in new tab)`:`${e.text} (opens in new tab)`;r=r.replace("<a ",`<a aria-label="${this.escapeHtml(o)}" `),r=r.replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')}return r}}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch{return!1}}escapeHtml(t){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.replace(/[&<>"']/g,i=>e[i]||i)}parse(t){return pe(this,null,function*(){let e=yield nt.parse(t,{renderer:this.renderer,breaks:!0,gfm:!0});return HO.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i})})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var a5=["buttonContainer"],l5=(n,t)=>t.value;function c5(n,t){n&1&&(u(0,"mat-icon",8),g(1,"keyboard_return"),m())}function d5(n,t){if(n&1){let e=V();u(0,"button",6),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.onOptionClick(r.value))}),u(1,"span",7),g(2),m(),I(3,c5,2,0,"mat-icon",8),m()}if(n&2){let e=t.$implicit,i=t.$index,r=b(2);j("highlighted",i===r.highlightedIndex),D("disabled",e.disabled)("id","choice-option-"+i),ne("aria-selected",i===r.highlightedIndex),f(2),K(e.label),f(),k(i===r.highlightedIndex?3:-1)}}function u5(n,t){if(n&1&&(u(0,"div",5)(1,"mat-icon"),g(2,"search"),m(),u(3,"span"),g(4),m()()),n&2){let e=b(2);f(4),K(e.searchText)}}function m5(n,t){if(n&1){let e=V();u(0,"div",1),H(1,"div",2),gs(2,"async"),u(3,"div",3,0),w("keydown",function(r){E(e);let o=b();return S(o.onKeyDown(r))}),st(5,d5,4,7,"button",4,l5),m(),I(7,u5,5,1,"div",5),m()}if(n&2){let e=b();f(),D("innerHTML",B0(2,3,e.renderedLabel$),ii),f(2),ne("aria-activedescendant","choice-option-"+e.highlightedIndex),f(2),at(e.options),f(2),k(e.searchText?7:-1)}}var Oc=class n{options=[];set labelHtml(t){typeof t=="object"?this.renderedLabelSubject.next(t):this.renderLabelMarkdown(t)}isVisible=!1;choiceSelected=new U;buttonContainer;highlightedIndex=0;searchText="";searchTimeout;destroy$=new P;renderedLabelSubject=new ae("");renderedLabel$=this.renderedLabelSubject.asObservable();sanitizer=d(bi);markdownService=d(Zr);ngOnDestroy(){this.renderedLabelSubject.complete(),this.destroy$.next(),this.destroy$.complete(),this.searchTimeout&&clearTimeout(this.searchTimeout)}ngAfterViewInit(){this.isVisible&&this.buttonContainer&&setTimeout(()=>this.focusContainer(),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..."),this.highlightedIndex=0,setTimeout(()=>this.focusContainer(),150))),t.options&&!t.options.firstChange&&(this.highlightedIndex=0)}focusContainer(){this.buttonContainer?.nativeElement&&(this.buttonContainer.nativeElement.focus(),console.log("[CHOICE-SELECT] Focus set on button container"))}onKeyDown(t){if(this.options.filter(i=>!i.disabled).length!==0)switch(t.key){case"ArrowDown":t.preventDefault(),this.moveHighlight(1);break;case"ArrowUp":t.preventDefault(),this.moveHighlight(-1);break;case"Enter":case" ":t.preventDefault(),this.selectHighlighted();break;case"Home":t.preventDefault(),this.highlightFirst();break;case"End":t.preventDefault(),this.highlightLast();break;case"Escape":t.preventDefault();break;default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&this.handleTypeAhead(t.key);break}}moveHighlight(t){let e=this.options.map((o,s)=>({opt:o,idx:s})).filter(({opt:o})=>!o.disabled).map(({idx:o})=>o);if(e.length===0)return;let r=e.findIndex(o=>o===this.highlightedIndex)+t;if(r>=0&&r<e.length){let o=e[r];o!==void 0&&(this.highlightedIndex=o,this.scrollToHighlighted())}else if(t===1&&r>=e.length){let o=e[0];o!==void 0&&(this.highlightedIndex=o,this.scrollToHighlighted())}else if(t===-1&&r<0){let o=e[e.length-1];o!==void 0&&(this.highlightedIndex=o,this.scrollToHighlighted())}}highlightFirst(){let t=this.options.findIndex(e=>!e.disabled);t>=0&&(this.highlightedIndex=t,this.scrollToHighlighted())}highlightLast(){let t=this.options.map((e,i)=>({opt:e,idx:i})).filter(({opt:e})=>!e.disabled).map(({idx:e})=>e);if(t.length>0){let e=t[t.length-1];e!==void 0&&(this.highlightedIndex=e,this.scrollToHighlighted())}}scrollToHighlighted(){setTimeout(()=>{let t=document.getElementById("choice-option-"+this.highlightedIndex);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})},0)}selectHighlighted(){let t=this.options[this.highlightedIndex];t&&!t.disabled&&this.onOptionClick(t.value)}handleTypeAhead(t){this.searchText+=t.toLowerCase();let e=this.options.findIndex(i=>!i.disabled&&i.label.toLowerCase().startsWith(this.searchText));e>=0&&(this.highlightedIndex=e,this.scrollToHighlighted()),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchText=""},1e3)}onOptionClick(t){console.log("[CHOICE-SELECT] Choice selected:",t),this.choiceSelected.emit(t)}renderLabelMarkdown(t){return pe(this,null,function*(){if(!t){this.renderedLabelSubject.next(this.sanitizer.bypassSecurityTrustHtml(""));return}try{let e=yield this.markdownService.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=R({type:n,selectors:[["app-choice-select"]],viewQuery:function(e,i){if(e&1&&xe(a5,5),e&2){let r;re(r=oe())&&(i.buttonContainer=r.first)}},inputs:{options:"options",labelHtml:"labelHtml",isVisible:"isVisible"},outputs:{choiceSelected:"choiceSelected"},features:[We],decls:1,vars:1,consts:[["buttonContainer",""],[1,"choice-container"],[1,"choice-label",3,"innerHTML"],["role","listbox","tabindex","0",1,"choice-buttons",3,"keydown"],["type","button","role","option",1,"choice-button",3,"highlighted","disabled","id"],[1,"search-indicator"],["type","button","role","option",1,"choice-button",3,"click","disabled","id"],[1,"choice-button-label"],[1,"choice-button-icon"]],template:function(e,i){e&1&&I(0,m5,8,5,"div",1),e&2&&k(i.isVisible?0:-1)},dependencies:[Ot,$e,dC],styles:[".choice-container[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:1rem}.choice-label[_ngcontent-%COMP%]{display:block;font-weight:500;color:var(--color-text);font-size:1rem;line-height:1.5}.choice-label[_ngcontent-%COMP%] p{margin:0 0 .5rem}.choice-label[_ngcontent-%COMP%] p:last-child{margin-bottom:0}.choice-label[_ngcontent-%COMP%] code{background:var(--color-code-bg);padding:.2em .4em;border-radius:4px;font-family:monospace;font-size:.9em}.choice-label[_ngcontent-%COMP%] strong{font-weight:600}.choice-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;max-height:400px;overflow-y:auto;padding:.5rem;background:var(--color-background);border:2px solid var(--color-border);border-radius:12px;outline:none}.choice-buttons[_ngcontent-%COMP%]:focus-within{border-color:var(--color-primary);box-shadow:0 0 0 3px #007aff1a}.choice-buttons[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.choice-buttons[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--color-background);border-radius:4px}.choice-buttons[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}.choice-buttons[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary)}.choice-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.75rem 1rem;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,system-ui,sans-serif;font-size:1rem;text-align:left;cursor:pointer;transition:all .2s ease}.choice-button[_ngcontent-%COMP%]:hover:not(:disabled):not(.highlighted){background:var(--color-bg-hover);border-color:var(--color-primary);transform:translate(2px)}.choice-button.highlighted[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff;border-color:var(--color-primary);box-shadow:0 2px 8px #007aff4d}.choice-button.highlighted[_ngcontent-%COMP%] .choice-button-icon[_ngcontent-%COMP%]{color:#fff}.choice-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.choice-button[_ngcontent-%COMP%]:focus{outline:none}.choice-button-label[_ngcontent-%COMP%]{flex:1;line-height:1.5}.choice-button-icon[_ngcontent-%COMP%]{flex-shrink:0;margin-left:.5rem;font-size:1.2rem;width:1.2rem;height:1.2rem}.search-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--color-primary);color:#fff;border-radius:8px;font-size:.9rem;font-weight:500;animation:_ngcontent-%COMP%_fadeIn .2s ease}.search-indicator[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem;color:#fff}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 480px){.choice-container[_ngcontent-%COMP%]{gap:.75rem}.choice-label[_ngcontent-%COMP%]{font-size:.95rem}.choice-buttons[_ngcontent-%COMP%]{max-height:300px;gap:.375rem}.choice-button[_ngcontent-%COMP%]{font-size:.95rem;padding:.625rem .875rem}}@media print{.choice-buttons[_ngcontent-%COMP%]{max-height:none;overflow:visible}.search-indicator[_ngcontent-%COMP%]{display:none!important}}"]})};var Pc=class n{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;ngOnInit(){this.startWelcomeRotation()}ngOnDestroy(){this.stopWelcomeRotation()}startWelcomeRotation(){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)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(e,i){e&1&&(fn(0,"h1",0),g(1),hn()),e&2&&(f(),K(i.currentWelcomeMessage))},styles:[".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}@media (max-width: 768px){.welcome-title[_ngcontent-%COMP%]{font-size:clamp(2rem,5vw,3rem)}}@media (max-width: 480px){.welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,2rem)}}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"]})};var ZO=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(De(et),De(Z))};static \u0275dir=X({type:n})}return n})(),Ua=(()=>{class n extends ZO{static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,features:[Le]})}return n})(),ui=new A(""),p5={provide:ui,useExisting:Ct(()=>kx),multi:!0},kx=(()=>{class n extends Ua{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&w("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[je([p5]),Le]})}return n})(),f5={provide:ui,useExisting:Ct(()=>Et),multi:!0};function h5(){let n=Li()?Li().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var g5=new A(""),Et=(()=>{class n extends ZO{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!h5())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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(i){return new(i||n)(De(et),De(Z),De(g5,8))};static \u0275dir=X({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(i,r){i&1&&w("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[je([f5]),Le]})}return n})();function Ax(n){return n==null||Ox(n)===0}function Ox(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var yr=new A(""),Px=new A(""),v5=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Fc=class{static min(t){return XO(t)}static max(t){return JO(t)}static required(t){return eP(t)}static requiredTrue(t){return _5(t)}static email(t){return b5(t)}static minLength(t){return y5(t)}static maxLength(t){return tP(t)}static pattern(t){return C5(t)}static nullValidator(t){return lv()}static compose(t){return aP(t)}static composeAsync(t){return lP(t)}};function XO(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function JO(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function eP(n){return Ax(n.value)?{required:!0}:null}function _5(n){return n.value===!0?null:{required:!0}}function b5(n){return Ax(n.value)||v5.test(n.value)?null:{email:!0}}function y5(n){return t=>{let e=t.value?.length??Ox(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function tP(n){return t=>{let e=t.value?.length??Ox(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function C5(n){if(!n)return lv;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ax(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function lv(n){return null}function nP(n){return n!=null}function iP(n){return _o(n)?yt(n):n}function rP(n){let t={};return n.forEach(e=>{t=e!=null?M(M({},t),e):t}),Object.keys(t).length===0?null:t}function oP(n,t){return t.map(e=>e(n))}function w5(n){return!n.validate}function sP(n){return n.map(t=>w5(t)?t:e=>t.validate(e))}function aP(n){if(!n)return null;let t=n.filter(nP);return t.length==0?null:function(e){return rP(oP(e,t))}}function Rx(n){return n!=null?aP(sP(n)):null}function lP(n){if(!n)return null;let t=n.filter(nP);return t.length==0?null:function(e){let i=oP(e,t).map(iP);return bd(i).pipe(z(rP))}}function Nx(n){return n!=null?lP(sP(n)):null}function UO(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function cP(n){return n._rawValidators}function dP(n){return n._rawAsyncValidators}function Dx(n){return n?Array.isArray(n)?n:[n]:[]}function cv(n,t){return Array.isArray(n)?n.includes(t):n===t}function $O(n,t){let e=Dx(t);return Dx(n).forEach(r=>{cv(e,r)||e.push(r)}),e}function WO(n,t){return Dx(t).filter(e=>!cv(n,e))}var dv=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=Rx(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Nx(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}},Ha=class extends dv{name;get formDirective(){return null}get path(){return null}},Xr=class extends dv{_parent=null;name=null;valueAccessor=null},Ix=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}},x5={"[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"},nve=de(M({},x5),{"[class.ng-submitted]":"isSubmitted"}),Pt=(()=>{class n extends Ix{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(De(Xr,2))};static \u0275dir=X({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&j("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Le]})}return n})();var Tm="VALID",av="INVALID",Rc="PENDING",Dm="DISABLED",Rs=class{},uv=class extends Rs{value;source;constructor(t,e){super(),this.value=t,this.source=e}},km=class extends Rs{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},Am=class extends Rs{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},Nc=class extends Rs{status;source;constructor(t,e){super(),this.status=t,this.source=e}},mv=class extends Rs{source;constructor(t){super(),this.source=t}},pv=class extends Rs{source;constructor(t){super(),this.source=t}};function uP(n){return(bv(n)?n.validators:n)||null}function E5(n){return Array.isArray(n)?Rx(n):n||null}function mP(n,t){return(bv(t)?t.asyncValidators:n)||null}function S5(n){return Array.isArray(n)?Nx(n):n||null}function bv(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function M5(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new O(1e3,"");if(!i[e])throw new O(1001,"")}function T5(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new O(1002,"")})}var fv=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 Vt(this.statusReactive)}set status(t){Vt(()=>this.statusReactive.set(t))}_status=Kt(()=>this.statusReactive());statusReactive=Fe(void 0);get valid(){return this.status===Tm}get invalid(){return this.status===av}get pending(){return this.status==Rc}get disabled(){return this.status===Dm}get enabled(){return this.status!==Dm}errors;get pristine(){return Vt(this.pristineReactive)}set pristine(t){Vt(()=>this.pristineReactive.set(t))}_pristine=Kt(()=>this.pristineReactive());pristineReactive=Fe(!0);get dirty(){return!this.pristine}get touched(){return Vt(this.touchedReactive)}set touched(t){Vt(()=>this.touchedReactive.set(t))}_touched=Kt(()=>this.touchedReactive());touchedReactive=Fe(!1);get untouched(){return!this.touched}_events=new P;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($O(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators($O(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(WO(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(WO(t,this._rawAsyncValidators))}hasValidator(t){return cv(this._rawValidators,t)}hasAsyncValidator(t){return cv(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(de(M({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new Am(!0,i))}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 i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new Am(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(de(M({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new km(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new km(!0,i))}markAsPending(t={}){this.status=Rc;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Nc(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(de(M({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Dm,this.errors=null,this._forEachChild(r=>{r.disable(de(M({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new uv(this.value,i)),this._events.next(new Nc(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(de(M({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Tm,this._forEachChild(i=>{i.enable(de(M({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(de(M({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!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 i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Tm||this.status===Rc)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new uv(this.value,e)),this._events.next(new Nc(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(de(M({},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()?Dm:Tm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Rc,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=iP(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{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((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.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,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new Nc(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?Dm:this.errors?av:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Rc)?Rc:this._anyControlsHaveStatus(av)?av:Tm}_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 i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new km(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new Am(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){bv(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=E5(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=S5(this._rawAsyncValidators)}},hv=class extends fv{constructor(t,e,i){super(uP(e),mP(i,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,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.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,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){T5(this,!0,t),Object.keys(t).forEach(i=>{M5(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new pv(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_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 Om=new A("",{providedIn:"root",factory:()=>yv}),yv="always";function D5(n,t){return[...t.path,n]}function gv(n,t,e=yv){Fx(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),k5(n,t),O5(n,t),A5(n,t),I5(n,t)}function GO(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),_v(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function vv(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function I5(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Fx(n,t){let e=cP(n);t.validator!==null?n.setValidators(UO(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=dP(n);t.asyncValidator!==null?n.setAsyncValidators(UO(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();vv(t._rawValidators,r),vv(t._rawAsyncValidators,r)}function _v(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=cP(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=dP(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return vv(t._rawValidators,i),vv(t._rawAsyncValidators,i),e}function k5(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&pP(n,t)})}function A5(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&pP(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function pP(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function O5(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function fP(n,t){n==null,Fx(n,t)}function P5(n,t){return _v(n,t)}function R5(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function N5(n){return Object.getPrototypeOf(n.constructor)===Ua}function hP(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function F5(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===Et?e=o:N5(o)?i=o:r=o}),r||i||e||null}function L5(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var j5={provide:Ha,useExisting:Ct(()=>Pm)},Im=Promise.resolve(),Pm=(()=>{class n extends Ha{callSetDisabledState;get submitted(){return Vt(this.submittedReactive)}_submitted=Kt(()=>this.submittedReactive());submittedReactive=Fe(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new hv({},Rx(e),Nx(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Im.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),gv(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Im.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Im.then(()=>{let i=this._findContainer(e.path),r=new hv({});fP(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Im.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Im.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),hP(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new mv(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(i){return new(i||n)(De(yr,10),De(Px,10),De(Om,8))};static \u0275dir=X({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&w("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[je([j5]),Le]})}return n})();function qO(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function YO(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var gP=class extends fv{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(uP(e),mP(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),bv(e)&&(e.nonNullable||e.initialValueIsDefault)&&(YO(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(i=>i(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 pv(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){qO(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){qO(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){YO(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 V5=n=>n instanceof gP;var B5={provide:Xr,useExisting:Ct(()=>Tt)},QO=Promise.resolve(),Tt=(()=>{class n extends Xr{_changeDetectorRef;callSetDisabledState;control=new gP;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=F5(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),R5(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(){gv(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){QO.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&ie(i);QO.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?D5(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(De(Ha,9),De(yr,10),De(Px,10),De(ui,10),De(Qe,8),De(Om,8))};static \u0275dir=X({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:[je([B5]),Le,We]})}return n})();var z5={provide:ui,useExisting:Ct(()=>Rm),multi:!0},Rm=(()=>{class n extends Ua{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&w("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[je([z5]),Le]})}return n})(),H5={provide:ui,useExisting:Ct(()=>$a),multi:!0};var U5=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),$a=(()=>{class n extends Ua{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=d(Om,{optional:!0})??yv;constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o}ngOnInit(){this._control=this._injector.get(Xr),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(i){return new(i||n)(De(et),De(Z),De(U5),De(me))};static \u0275dir=X({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&w("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[je([H5]),Le]})}return n})(),$5={provide:ui,useExisting:Ct(()=>Lx),multi:!0},Lx=(()=>{class n extends Ua{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&w("change",function(s){return r.onChange(s.target.value)})("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[je([$5]),Le]})}return n})();var W5={provide:Ha,useExisting:Ct(()=>Nm)},Nm=(()=>{class n extends Ha{callSetDisabledState;get submitted(){return Vt(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Kt(()=>this._submittedReactive());_submittedReactive=Fe(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new U;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(_v(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return gv(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){GO(e.control||null,e,!1),L5(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),hP(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new mv(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(GO(i||null,e),V5(r)&&(gv(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);fP(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&P5(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Fx(this.form,this),this._oldForm&&_v(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(De(yr,10),De(Px,10),De(Om,8))};static \u0275dir=X({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&w("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[je([W5]),Le,We]})}return n})();var G5={provide:ui,useExisting:Ct(()=>Cv),multi:!0};function vP(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function q5(n){return n.split(":")[0]}var Cv=(()=>{class n extends Ua{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=d(Un).injector;destroyRef=d(an);cdr=d(Qe);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,ln({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=vP(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=q5(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&w("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[je([G5]),Le]})}return n})(),wv=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(vP(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(i){return new(i||n)(De(Z),De(et),De(Cv,9))};static \u0275dir=X({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Y5={provide:ui,useExisting:Ct(()=>_P),multi:!0};function KO(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Q5(n){return n.split(":")[0]}var _P=(()=>{class n extends Ua{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Q5(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&w("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[je([Y5]),Le]})}return n})(),xv=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(KO(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(KO(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(i){return new(i||n)(De(Z),De(et),De(_P,9))};static \u0275dir=X({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function K5(n){return typeof n=="number"?n:parseInt(n,10)}function bP(n){return typeof n=="number"?n:parseFloat(n)}var Ev=(()=>{class n{_validator=lv;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lv,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,features:[We]})}return n})(),Z5={provide:yr,useExisting:Ct(()=>jx),multi:!0},jx=(()=>{class n extends Ev{max;inputName="max";normalizeInput=e=>bP(e);createValidator=e=>JO(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ne("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[je([Z5]),Le]})}return n})(),X5={provide:yr,useExisting:Ct(()=>Fm),multi:!0},Fm=(()=>{class n extends Ev{min;inputName="min";normalizeInput=e=>bP(e);createValidator=e=>XO(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ne("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[je([X5]),Le]})}return n})(),J5={provide:yr,useExisting:Ct(()=>Wa),multi:!0};var Wa=(()=>{class n extends Ev{required;inputName="required";normalizeInput=ie;createValidator=e=>eP;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&ne("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[je([J5]),Le]})}return n})();var e4={provide:yr,useExisting:Ct(()=>Vx),multi:!0},Vx=(()=>{class n extends Ev{maxlength;inputName="maxlength";normalizeInput=e=>K5(e);createValidator=e=>tP(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275dir=X({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ne("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[je([e4]),Le]})}return n})();var t4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();var Rt=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Om,useValue:e.callSetDisabledState??yv}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[t4]})}return n})();var n4=["inputElement"];function i4(n,t){if(n&1&&(u(0,"span",3),g(1),m()),n&2){let e=b();f(),K(e.label)}}function r4(n,t){if(n&1&&(u(0,"small",5),g(1),m()),n&2){let e=b();f(),K(e.hint)}}var Sv=class n{label="";placeholder="";hint="";isDisabled=!1;value="";autoFocus=!0;valueChange=new U;enterPressed=new U;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100)}onValueChange(t){this.valueChange.emit(t)}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim())}focus(){this.inputElement?.nativeElement.focus()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-text-input"]],viewQuery:function(e,i){if(e&1&&xe(n4,5),e&2){let r;re(r=oe())&&(i.inputElement=r.first)}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(e,i){if(e&1){let r=V();u(0,"div",1)(1,"label",2),I(2,i4,2,1,"span",3),u(3,"input",4,0),q("ngModelChange",function(s){return E(r),Q(i.inputValue,s)||(i.inputValue=s),S(s)}),w("ngModelChange",function(s){return E(r),S(i.onValueChange(s))})("keydown.enter",function(){return E(r),S(i.onEnter())}),m()(),I(5,r4,2,1,"small",5),m()}e&2&&(f(2),k(i.label?2:-1),f(),G("ngModel",i.inputValue),D("placeholder",i.placeholder)("disabled",i.isDisabled),f(2),k(i.hint?5:-1))},dependencies:[Rt,Et,Pt,Tt,tt],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media (max-width: 768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"]})};var o4=["nameInput"],s4=["pathInput"];function a4(n,t){if(n&1&&(u(0,"div",7),g(1),m()),n&2){let e=b();f(),K(e.errorMessage)}}var Mv=class n{isCreating=!1;create=new U;cancelled=new U;nameInput;pathInput;projectName="";projectPath="";errorMessage="";isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onNameEnter(){this.projectName.trim()&&setTimeout(()=>this.pathInput?.focus(),50)}onCreate(){this.isValid()?(this.errorMessage="",this.create.emit({name:this.projectName.trim(),path:this.projectPath.trim()})):this.errorMessage="Both name and path are required"}onCancel(){this.cancelled.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-project-create"]],viewQuery:function(e,i){if(e&1&&(xe(o4,5),xe(s4,5)),e&2){let r;re(r=oe())&&(i.nameInput=r.first),re(r=oe())&&(i.pathInput=r.first)}},inputs:{isCreating:"isCreating"},outputs:{create:"create",cancelled:"cancelled"},decls:14,vars:10,consts:[["nameInput",""],["pathInput",""],[1,"project-create"],[1,"create-title"],[1,"create-form"],["label","Project Name","placeholder","my-project",3,"valueChange","enterPressed","value","isDisabled","autoFocus"],["label","Project Path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled","autoFocus"],[1,"error-message"],[1,"form-actions"],["matButton","",3,"click","disabled"],["matButton","filled",3,"click","disabled"]],template:function(e,i){if(e&1){let r=V();u(0,"div",2)(1,"h3",3),g(2,"Create New Project"),m(),u(3,"div",4)(4,"app-text-input",5,0),w("valueChange",function(s){return E(r),S(i.projectName=s)})("enterPressed",function(){return E(r),S(i.onNameEnter())}),m(),u(6,"app-text-input",6,1),w("valueChange",function(s){return E(r),S(i.projectPath=s)})("enterPressed",function(){return E(r),S(i.onCreate())}),m(),I(8,a4,2,1,"div",7),m(),u(9,"div",8)(10,"button",9),w("click",function(){return E(r),S(i.onCancel())}),g(11,"Cancel"),m(),u(12,"button",10),w("click",function(){return E(r),S(i.onCreate())}),g(13),m()()()}e&2&&(f(4),D("value",i.projectName)("isDisabled",i.isCreating)("autoFocus",!0),f(2),D("value",i.projectPath)("isDisabled",i.isCreating)("autoFocus",!1),f(2),k(i.errorMessage?8:-1),f(2),D("disabled",i.isCreating),f(2),D("disabled",!i.isValid()||i.isCreating),f(),Se(" ",i.isCreating?"Creating...":"Create Project"," "))},dependencies:[tt,Sv,Pn],styles:[".project-create[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;animation:_ngcontent-%COMP%_slideIn .3s ease-out}.create-title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text);text-align:center}.create-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.error-message[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc26261a;border:1px solid rgba(220,38,38,.3);border-radius:8px;color:var(--color-error);font-size:.9rem;text-align:center}.form-actions[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:flex-end;margin-top:.5rem}@keyframes _ngcontent-%COMP%_slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 768px){.project-create[_ngcontent-%COMP%]{gap:1.25rem;padding:.75rem}.create-title[_ngcontent-%COMP%]{font-size:1.3rem}.form-actions[_ngcontent-%COMP%]{flex-direction:column-reverse;gap:.75rem}}@media (max-width: 480px){.project-create[_ngcontent-%COMP%]{gap:1rem;padding:.5rem}.create-title[_ngcontent-%COMP%]{font-size:1.2rem}}"]})};function l4(n,t){if(n&1){let e=V();u(0,"app-project-create",10),w("create",function(r){E(e);let o=b();return S(o.onCreateProject(r))})("cancelled",function(){E(e);let r=b();return S(r.closeCreateForm())}),m()}if(n&2){let e=b();D("isCreating",e.isCreating)}}function c4(n,t){n&1&&(u(0,"div",6),H(1,"div",11),u(2,"p",12),g(3,"Loading projects..."),m()())}function d4(n,t){if(n&1&&(u(0,"div",7)(1,"p",13),g(2),m()()),n&2){let e=b();f(2),K(e.error)}}function u4(n,t){if(n&1){let e=V();u(0,"app-choice-select",14),w("choiceSelected",function(r){E(e);let o=b();return S(o.selectProject(r))}),m()}if(n&2){let e=b();D("options",e.projectOptions())("labelHtml","Select a project to continue")("isVisible",!0)}}function m4(n,t){if(n&1){let e=V();u(0,"div",9)(1,"p",15),g(2,"No projects available."),m(),u(3,"button",16),w("click",function(){E(e);let r=b();return S(r.openCreateForm())}),g(4,"Create your first project"),m()()}}var Tv=class n{isLoading=!1;error=null;showCreateForm=!1;isCreating=!1;router=d(xn);projectStateService=d(qe);projects=qn(this.projectStateService.projectList$);forcedProject=qn(this.projectStateService.forcedProject$);projectOptions=Kt(()=>{let t=this.projects();if(!t)return[];let e=t.filter(s=>!s.volatile),i=t.filter(s=>s.volatile),o=[...e,...i].map(s=>({value:s.name,label:s.volatile?`${s.name} \u{1F538}temp`:s.name}));return t.length>0&&o.push({value:"__new_project__",label:"New project..."}),o});showCreateButton=Kt(()=>!this.forcedProject());constructor(){this.projectStateService.selectedProject$.pipe(Kg(),ue(t=>!!t),ue(()=>this.router.url.split("?")[0]==="/"),Ye(1)).subscribe(t=>{console.log(`\u{1F43C} navigate to ${t.name}`),this.router.navigate(["project",t.name])})}selectProject(t){if(t==="__new_project__"){this.openCreateForm();return}this.projectStateService.selectProject(t)}openCreateForm(){this.showCreateForm=!0}closeCreateForm(){this.showCreateForm=!1,this.isCreating=!1}onCreateProject(t){this.isCreating=!0,this.error=null,this.projectStateService.createProject(t.name,t.path).subscribe({next:e=>{console.log("[PROJECT-SELECTION] Project created:",e.message),this.isCreating=!1,this.closeCreateForm(),this.selectProject(t.name)},error:e=>{console.error("[PROJECT-SELECTION] Error creating project:",e),this.error=e.error?.error||"Failed to create project",this.isCreating=!1}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-project-selection"]],decls:11,vars:1,consts:[[1,"project-selection"],[1,"centered-content"],[1,"welcome-section"],[1,"choice-section"],[1,"choice-glass"],[3,"isCreating"],[1,"loading-container"],[1,"error-container"],[3,"options","labelHtml","isVisible"],[1,"no-projects-container"],[3,"create","cancelled","isCreating"],[1,"loading-spinner"],[1,"loading-text"],[1,"error-text"],[3,"choiceSelected","options","labelHtml","isVisible"],[1,"no-projects-text"],["matButton","filled","color","primary",3,"click"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"div",2),H(3,"app-welcome-message"),m(),u(4,"div",3)(5,"div",4),I(6,l4,1,1,"app-project-create",5)(7,c4,4,0,"div",6)(8,d4,3,1,"div",7)(9,u4,1,3,"app-choice-select",8)(10,m4,5,0,"div",9),m()()()()),e&2&&(f(6),k(i.showCreateForm?6:i.isLoading?7:i.error?8:i.projects()&&i.projects().length>0?9:10))},dependencies:[tt,Oc,Pc,Mv,Pn],styles:[".project-selection[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100vh;width:100%;overflow:hidden;background:var(--color-bg);padding:2rem}.centered-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3rem;width:100%;max-width:800px;animation:_ngcontent-%COMP%_fadeIn .6s ease-out}.welcome-section[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUp .8s ease-out}.choice-section[_ngcontent-%COMP%]{width:100%;animation:_ngcontent-%COMP%_slideUp .8s ease-out .2s both}.choice-glass[_ngcontent-%COMP%]{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;padding:1.5rem;box-shadow:0 4px 6px #0000001a;transition:all .3s ease}.choice-glass[_ngcontent-%COMP%]:hover{box-shadow:0 8px 12px #00000026}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem}.loading-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 1s linear infinite}.loading-text[_ngcontent-%COMP%]{color:var(--color-text-secondary);margin:0}.error-container[_ngcontent-%COMP%]{padding:2rem;text-align:center}.error-text[_ngcontent-%COMP%]{color:var(--color-error);margin:0}.no-projects-container[_ngcontent-%COMP%]{padding:2rem;text-align:center}.no-projects-text[_ngcontent-%COMP%]{color:var(--color-text);margin:0 0 1rem;font-size:1.1rem}.no-projects-hint[_ngcontent-%COMP%]{color:var(--color-text-secondary);margin:0;font-size:.9rem}.create-action[_ngcontent-%COMP%]{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--color-border);display:flex;justify-content:center}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media (max-width: 768px){.project-selection[_ngcontent-%COMP%]{padding:1.5rem}.centered-content[_ngcontent-%COMP%]{gap:2rem}.choice-glass[_ngcontent-%COMP%]{padding:1rem}}@media (max-width: 480px){.project-selection[_ngcontent-%COMP%]{padding:1rem}.centered-content[_ngcontent-%COMP%]{gap:1.5rem}.choice-glass[_ngcontent-%COMP%]{padding:.75rem}.create-action[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem}}"]})};var Bt=class n{STORAGE_KEY="coday-preferences";isDesktopApp=!1;electronStorage=null;voiceLanguageSubject=new ae("en-US");voiceLanguage$=this.voiceLanguageSubject.asObservable();enterToSendSubject=new ae(!0);enterToSend$=this.enterToSendSubject.asObservable();voiceAnnounceEnabledSubject=new ae(!1);voiceAnnounceEnabled$=this.voiceAnnounceEnabledSubject.asObservable();voiceModeSubject=new ae("speech");voiceMode$=this.voiceModeSubject.asObservable();voiceReadFullTextSubject=new ae(!1);voiceReadFullText$=this.voiceReadFullTextSubject.asObservable();voiceVolumeSubject=new ae(.8);voiceVolume$=this.voiceVolumeSubject.asObservable();voiceRateSubject=new ae(1.2);voiceRate$=this.voiceRateSubject.asObservable();selectedVoiceSubject=new ae(null);selectedVoice$=this.selectedVoiceSubject.asObservable();printTechnicalMessagesSubject=new ae(!1);printTechnicalMessages$=this.printTechnicalMessagesSubject.asObservable();hideTechnicalMessagesSubject=new ae(!0);hideTechnicalMessages$=this.hideTechnicalMessagesSubject.asObservable();hideWarningMessagesSubject=new ae(!1);hideWarningMessages$=this.hideWarningMessagesSubject.asObservable();agentNotificationEnabledSubject=new ae(!1);agentNotificationEnabled$=this.agentNotificationEnabledSubject.asObservable();notificationSoundEnabledSubject=new ae(!1);notificationSoundEnabled$=this.notificationSoundEnabledSubject.asObservable();browserNotificationEnabledSubject=new ae(!1);browserNotificationEnabled$=this.browserNotificationEnabledSubject.asObservable();constructor(){console.log("[PREFERENCES] Initializing preferences service"),typeof window<"u"&&window.codayDesktop?.storage&&(this.isDesktopApp=!0,this.electronStorage=window.codayDesktop.storage,console.log("[PREFERENCES] Running in desktop app mode with persistent storage")),this.initializePreferences()}initializePreferences(){this.isDesktopApp?this.loadPreferencesAsync():this.loadPreferencesSync()}loadPreferencesSync(){let t=this.getPreferenceSync("voiceLanguage","en-US")??"en-US";this.voiceLanguageSubject.next(t),console.log("[PREFERENCES] Voice language initialized to:",t);let e=this.getPreferenceSync("useEnterToSend",!0)??!0;this.enterToSendSubject.next(e),console.log("[PREFERENCES] Enter to send initialized to:",e);let i=this.getPreferenceSync("voiceAnnounceEnabled",!1)??!1;this.voiceAnnounceEnabledSubject.next(i);let r=this.getPreferenceSync("voiceMode","speech")??"speech";this.voiceModeSubject.next(r);let o=this.getPreferenceSync("voiceReadFullText",!1)??!1;this.voiceReadFullTextSubject.next(o);let s=this.getPreferenceSync("voiceVolume",.8)??.8;this.voiceVolumeSubject.next(s);let a=this.getPreferenceSync("voiceRate",1.2)??1.2;this.voiceRateSubject.next(a);let l=this.getPreferenceSync("selectedVoice",null)??null;this.selectedVoiceSubject.next(l);let c=this.getPreferenceSync("printTechnicalMessages",!1)??!1;this.printTechnicalMessagesSubject.next(c);let p=this.getPreferenceSync("hideTechnicalMessages",!0)??!0;this.hideTechnicalMessagesSubject.next(p);let h=this.getPreferenceSync("hideWarningMessages",!1)??!1;this.hideWarningMessagesSubject.next(h);let _=this.getPreferenceSync("agentNotificationEnabled",!1)??!1;this.agentNotificationEnabledSubject.next(_);let v=this.getPreferenceSync("notificationSoundEnabled",!0)??!0;this.notificationSoundEnabledSubject.next(v);let y=this.getPreferenceSync("browserNotificationEnabled",!1)??!1;this.browserNotificationEnabledSubject.next(y),console.log("[PREFERENCES] All preferences initialized successfully")}loadPreferencesAsync(){return pe(this,null,function*(){let t=(yield this.getPreferenceAsync("voiceLanguage","en-US"))??"en-US";this.voiceLanguageSubject.next(t),console.log("[PREFERENCES] Voice language initialized to:",t);let e=(yield this.getPreferenceAsync("useEnterToSend",!0))??!0;this.enterToSendSubject.next(e),console.log("[PREFERENCES] Enter to send initialized to:",e);let i=(yield this.getPreferenceAsync("voiceAnnounceEnabled",!1))??!1;this.voiceAnnounceEnabledSubject.next(i);let r=(yield this.getPreferenceAsync("voiceMode","speech"))??"speech";this.voiceModeSubject.next(r);let o=(yield this.getPreferenceAsync("voiceReadFullText",!1))??!1;this.voiceReadFullTextSubject.next(o);let s=(yield this.getPreferenceAsync("voiceVolume",.8))??.8;this.voiceVolumeSubject.next(s);let a=(yield this.getPreferenceAsync("voiceRate",1.2))??1.2;this.voiceRateSubject.next(a);let l=(yield this.getPreferenceAsync("selectedVoice",null))??null;this.selectedVoiceSubject.next(l);let c=(yield this.getPreferenceAsync("printTechnicalMessages",!1))??!1;this.printTechnicalMessagesSubject.next(c);let p=(yield this.getPreferenceAsync("hideTechnicalMessages",!0))??!0;this.hideTechnicalMessagesSubject.next(p);let h=(yield this.getPreferenceAsync("hideWarningMessages",!1))??!1;this.hideWarningMessagesSubject.next(h);let _=(yield this.getPreferenceAsync("agentNotificationEnabled",!1))??!1;this.agentNotificationEnabledSubject.next(_);let v=(yield this.getPreferenceAsync("notificationSoundEnabled",!0))??!0;this.notificationSoundEnabledSubject.next(v);let y=(yield this.getPreferenceAsync("browserNotificationEnabled",!1))??!1;this.browserNotificationEnabledSubject.next(y),console.log("[PREFERENCES] All preferences initialized successfully (async)")})}getPreference(t,e){return this.getPreferenceSync(t,e)}getPreferenceSync(t,e){try{let i=localStorage.getItem(this.STORAGE_KEY);if(!i)return e;let r=JSON.parse(i);return r[t]!==void 0?r[t]:e}catch{return e}}getPreferenceAsync(t,e){return pe(this,null,function*(){if(!this.electronStorage)return this.getPreferenceSync(t,e);try{let i=yield this.electronStorage.get(this.STORAGE_KEY);if(!i)return e;let r=JSON.parse(i);return r[t]!==void 0?r[t]:e}catch{return e}})}setPreference(t,e){this.isDesktopApp?this.setPreferenceAsync(t,e):this.setPreferenceSync(t,e)}setPreferenceSync(t,e){try{let i=localStorage.getItem(this.STORAGE_KEY),r=i?JSON.parse(i):{};r[t]=e,localStorage.setItem(this.STORAGE_KEY,JSON.stringify(r)),this.updateSubject(t,e)}catch(i){console.error("Failed to set preference:",i)}}setPreferenceAsync(t,e){return pe(this,null,function*(){if(!this.electronStorage){this.setPreferenceSync(t,e);return}try{let i=yield this.electronStorage.get(this.STORAGE_KEY),r=i?JSON.parse(i):{};r[t]=e,yield this.electronStorage.set(this.STORAGE_KEY,JSON.stringify(r)),this.updateSubject(t,e)}catch(i){console.error("Failed to set preference:",i)}})}updateSubject(t,e){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),t==="hideWarningMessages"&&this.hideWarningMessagesSubject.next(e),t==="agentNotificationEnabled"&&this.agentNotificationEnabledSubject.next(e),t==="notificationSoundEnabled"&&this.notificationSoundEnabledSubject.next(e),t==="browserNotificationEnabled"&&this.browserNotificationEnabledSubject.next(e)}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}setHideWarningMessages(t){console.log("[PREFERENCES] Setting hide warning messages to:",t),this.setPreference("hideWarningMessages",t)}getHideWarningMessages(){return this.getPreference("hideWarningMessages",!1)??!1}setAgentNotificationEnabled(t){console.log("[PREFERENCES] Setting agent notification enabled to:",t),this.setPreference("agentNotificationEnabled",t)}getAgentNotificationEnabled(){return this.getPreference("agentNotificationEnabled",!1)??!1}setNotificationSoundEnabled(t){console.log("[PREFERENCES] Setting notification sound enabled to:",t),this.setPreference("notificationSoundEnabled",t)}getNotificationSoundEnabled(){return this.getPreference("notificationSoundEnabled",!0)??!0}setBrowserNotificationEnabled(t){console.log("[PREFERENCES] Setting browser notification enabled to:",t),this.setPreference("browserNotificationEnabled",t)}getBrowserNotificationEnabled(){return this.getPreference("browserNotificationEnabled",!1)??!1}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function Bx(n,t=80){if(n.length<=t)return n;try{if(n.trim().startsWith("{")||n.trim().startsWith("[")){let e=JSON.parse(n),i=JSON.stringify(e);return i.length<=t?i:i.substring(0,t)+`...(${i.length} chars)`}}catch{}return n.substring(0,t)+"..."}var _n=class{constructor(t,e){this.type=e;if(t.timestamp)this.timestamp=t.timestamp;else{let i=Math.random().toString(36).substring(2,7);this.timestamp=`${new Date().toISOString()}-${i}`}this.parentKey=t.parentKey,this.length=0}timestamp;parentKey;static type;length},Dv=class extends _n{invite;constructor(t,e){super(t,e),this.invite=t.invite}buildAnswer(t){return new Mi({answer:t,parentKey:this.timestamp,invite:this.invite})}},Lc=class n extends _n{static type="heartbeat";constructor(t){super(t,n.type)}},jo=class n extends Dv{defaultValue;static type="invite";constructor(t){super(t,n.type),this.defaultValue=t.defaultValue}},zx="InviteEventDefault",Mi=class n extends _n{answer;invite;static type="answer";constructor(t){super(t,n.type),this.answer=t.answer??"No answer",this.invite=t.invite}},Ga=class n extends _n{speaker;text;static type="text";constructor(t){super(t,n.type),this.speaker=t.speaker,this.text=t.text}},jc=class n extends _n{chunk;static type="text_chunk";constructor(t){super(t,n.type),this.chunk=t.chunk,this.length=this.chunk.length}},qa=class n extends _n{warning;static type="warn";constructor(t){super(t,n.type),this.warning=t.warning}},Cr=class n extends _n{error;static type="error";constructor(t){super(t,n.type),this.error=t.error}},Vo=class n extends Dv{options;optionalQuestion;static type="choice";constructor(t){super(t,n.type),this.options=t.options,this.optionalQuestion=t.optionalQuestion}},Bo=class n extends _n{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 Jr({output:t,toolRequestId:this.toolRequestId,parentKey:this.timestamp})}toSingleLineString(t=50){let e=Bx(this.args,t);return`\u{1F527} ${this.name}(${e})`}},Jr=class n extends _n{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(),i=Bx(e,t),r=typeof this.output!="string"&&this.output.type==="image"?" [image]":"";return`\u2B91 ${i}${r}`}},Ns=class n extends _n{static type="thinking";static debounce=5e3;constructor(t){super(t,n.type)}},Ya=class n extends _n{summary;static type="summary";constructor(t){super(t,n.type),this.summary=t.summary,this.length=this.summary.length}toSingleLineString(t=80){return`\u{1F4CB} Summary: ${Bx(this.summary,t)}`}},zo=class n extends _n{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 i=(e.width||0)*(e.height||0)/750;return i?i*3.5:e.content.length}return 0}).reduce((e,i)=>e+i,0)}getTextContent(){return this.content.filter(t=>t.type==="text").map(t=>t.content).join(`
|
|
81
|
+
`)}},Vc=class n extends _n{threadId;name;static type="thread_update";constructor(t){super(t,n.type),this.threadId=t.threadId,this.name=t.name}},Fs=class n extends _n{filename;operation;size;mimeType;static type="file";constructor(t){super(t,n.type),this.filename=t.filename,this.operation=t.operation,this.size=t.size,this.mimeType=t.mimeType}toSingleLineString(){let t=this.operation==="created"?"\u{1F4C4}":this.operation==="updated"?"\u{1F4DD}":"\u{1F5D1}\uFE0F",e=this.size?` (${(this.size/1024).toFixed(1)} KB)`:"";return`${t} ${this.operation}: ${this.filename}${e}`}},Bc=class n extends _n{authUrl;state;integrationName;static type="oauth_request";constructor(t){super(t,n.type),this.authUrl=t.authUrl,this.state=t.state,this.integrationName=t.integrationName}},eo=class n extends _n{code;state;integrationName;error;errorDescription;static type="oauth_callback";constructor(t){super(t,n.type),this.code=t.code,this.state=t.state,this.integrationName=t.integrationName,this.error=t.error,this.errorDescription=t.errorDescription}},p4={[zo.type]:zo,[Mi.type]:Mi,[Vo.type]:Vo,[Cr.type]:Cr,[Lc.type]:Lc,[jo.type]:jo,[Bo.type]:Bo,[Jr.type]:Jr,[Ga.type]:Ga,[jc.type]:jc,[Ns.type]:Ns,[qa.type]:qa,[Vc.type]:Vc,[Ya.type]:Ya,[Fs.type]:Fs,[Bc.type]:Bc,[eo.type]:eo};function Hx(n){let t=p4[n.type];return t?new t(n):void 0}var n_e=[{id:"builtin-plan",name:"plan",description:"Build a plan to complete the given task",source:"builtin",commands:[`@ We start a 3 phase process to build a comprehensive execution plan for the following task:
|
|
82
|
+
|
|
83
|
+
<task>
|
|
84
|
+
{{PARAMETERS}}
|
|
85
|
+
</task>
|
|
86
|
+
|
|
87
|
+
There will be 3 phases:
|
|
88
|
+
1. Research and understanding
|
|
89
|
+
2. Clarifying questions
|
|
90
|
+
3. Plan creation
|
|
91
|
+
|
|
92
|
+
Do not try to do all at once, wait for my request at each time.
|
|
93
|
+
|
|
94
|
+
Now we start with phase 1:
|
|
95
|
+
|
|
96
|
+
1. **Analyze the request** to identify:
|
|
97
|
+
- Core requirements and objectives
|
|
98
|
+
- Implicit assumptions or expectations
|
|
99
|
+
- Technical scope and constraints
|
|
100
|
+
|
|
101
|
+
2. **Research relevant context** using available tools:
|
|
102
|
+
- Use whatever tools you have available (file reading, API calls, search, etc.)
|
|
103
|
+
- Gather information about existing patterns, structures, and conventions
|
|
104
|
+
- Identify relevant files, modules, or resources
|
|
105
|
+
- Document key findings briefly
|
|
106
|
+
|
|
107
|
+
3. **Assess feasibility**:
|
|
108
|
+
- Identify potential challenges or blockers
|
|
109
|
+
- Note any dependencies or prerequisites
|
|
110
|
+
- Consider alternative approaches if applicable
|
|
111
|
+
|
|
112
|
+
Do not assume you have specific tools - use what's available to you.
|
|
113
|
+
|
|
114
|
+
Do not produce any document at this stage as you will have access to the accumulated research results later.
|
|
115
|
+
`,`@ let's continue with Phase 2: Clarifying Questions regarding the initial task.
|
|
116
|
+
|
|
117
|
+
<task>
|
|
118
|
+
{{PARAMETERS}}
|
|
119
|
+
</task>
|
|
120
|
+
|
|
121
|
+
Based on your research and understanding:
|
|
122
|
+
|
|
123
|
+
1. **Identify ambiguities** or missing information that could impact the completion of the task
|
|
124
|
+
- no boundaries
|
|
125
|
+
- insufficient definition of done
|
|
126
|
+
- lack of pre-requisites
|
|
127
|
+
|
|
128
|
+
2. **Ask focused questions** if clarification is needed:
|
|
129
|
+
- Use the 'invite' or 'choice' tools for user input
|
|
130
|
+
- Keep questions concise and specific
|
|
131
|
+
- Prioritize questions that significantly impact the approach
|
|
132
|
+
|
|
133
|
+
3. **Skip this phase** if the requirements are clear enough to proceed
|
|
134
|
+
|
|
135
|
+
Remember: Only ask questions that are truly necessary to create a solid plan.`,`@ finish with Phase 3: Plan Creation
|
|
136
|
+
|
|
137
|
+
Break down the task into 3-10 clear, actionable steps. Each step should be substantial enough to represent meaningful progress, but focused enough to be completed in one session.
|
|
138
|
+
|
|
139
|
+
Create a detailed execution plan:
|
|
140
|
+
- if you have access to the exchange area, save the plan there as 'plan.md'.
|
|
141
|
+
- otherwise, output the plan in the conversation.
|
|
142
|
+
- do not write any other document
|
|
143
|
+
|
|
144
|
+
The plan must follow this Markdown structure:
|
|
145
|
+
|
|
146
|
+
# Execution Plan: [Task Title]
|
|
147
|
+
|
|
148
|
+
## Overview
|
|
149
|
+
1-2 sentence summary of what will be accomplished.
|
|
150
|
+
|
|
151
|
+
## Context
|
|
152
|
+
Key information and constraints identified during research:
|
|
153
|
+
- Relevant patterns/conventions found
|
|
154
|
+
- Constraints or limitations
|
|
155
|
+
- Dependencies or prerequisites
|
|
156
|
+
- Key resources or materials involved
|
|
157
|
+
|
|
158
|
+
## Steps
|
|
159
|
+
|
|
160
|
+
### Step 1: [Step Title]
|
|
161
|
+
- **What to do**: Clear description of the action to take
|
|
162
|
+
- **Resources needed**: List files, tools, information, or materials required
|
|
163
|
+
- **Expected outcome**: What should be produced or achieved
|
|
164
|
+
- **Validation**: How to verify this step is complete
|
|
165
|
+
- **Dependencies**: Which previous steps must complete first (or "None")
|
|
166
|
+
|
|
167
|
+
### Step 2: [Step Title]
|
|
168
|
+
[Same structure as Step 1]
|
|
169
|
+
|
|
170
|
+
[Continue for all steps...]
|
|
171
|
+
|
|
172
|
+
## Success Criteria
|
|
173
|
+
How to verify the task is fully complete:
|
|
174
|
+
1. Objective measures of completion
|
|
175
|
+
2. Quality checks or review points
|
|
176
|
+
3. Final validation steps
|
|
177
|
+
|
|
178
|
+
## Risks & Considerations
|
|
179
|
+
- Potential challenges or obstacles
|
|
180
|
+
- Alternative approaches considered
|
|
181
|
+
- Areas requiring special attention
|
|
182
|
+
- Future improvements or follow-up items
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
After outputting the plan in the right place (in exchange or in conversation or according to user directives):
|
|
187
|
+
- do not produce other outputs nor documents
|
|
188
|
+
- do not start executing the plan`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-execute-plan",name:"execute-plan",description:"Execute a previously created plan step by step, with validation and progress tracking.",source:"builtin",commands:[`@ Execute the plan from the exchange area or outlined previously in the conversation:
|
|
189
|
+
|
|
190
|
+
## Preparation
|
|
191
|
+
1. **Load the plan**: Read from exchange area (plan.md) or use previously discussed plan
|
|
192
|
+
2. **Review**: Understand the overall objective, context, and step sequence
|
|
193
|
+
3. **Pre-check**: Verify prerequisites are met; report any obvious issues
|
|
194
|
+
|
|
195
|
+
## Step-by-Step Execution
|
|
196
|
+
|
|
197
|
+
For each step in order:
|
|
198
|
+
|
|
199
|
+
1. **Announce**: State which step you're starting and what you'll do
|
|
200
|
+
2. **Check dependencies**: Verify required previous steps are complete
|
|
201
|
+
3. **Execute**: Perform the actions specified in the step
|
|
202
|
+
4. **Validate**: Apply the validation criteria from the plan
|
|
203
|
+
5. **Report**: Confirm completion and note any deviations
|
|
204
|
+
|
|
205
|
+
**For significant or risky steps**: Ask user confirmation before proceeding (use 'choice' tool)
|
|
206
|
+
|
|
207
|
+
## Issue Handling
|
|
208
|
+
|
|
209
|
+
If a step fails:
|
|
210
|
+
- Report the issue clearly
|
|
211
|
+
- Suggest solutions (retry, skip if non-critical, or stop)
|
|
212
|
+
- Use 'choice' tool to ask how to proceed if needed
|
|
213
|
+
|
|
214
|
+
## Completion
|
|
215
|
+
|
|
216
|
+
1. **Final verification**: Apply success criteria from the plan
|
|
217
|
+
2. **Summary**: Report what was accomplished, any deviations, validation results, and next steps
|
|
218
|
+
|
|
219
|
+
## Guidelines
|
|
220
|
+
- Follow the plan's order unless circumstances require adaptation
|
|
221
|
+
- Communicate progress clearly at each step, without excessive details
|
|
222
|
+
- Ask for guidance when the plan is unclear or issues arise`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-re-prompt",name:"re-prompt",description:"Transform a vague request into a detailed, actionable prompt",source:"builtin",commands:[`@ I need you to analyze and reformulate the following request to make it more precise and actionable.
|
|
223
|
+
|
|
224
|
+
## User's initial request
|
|
225
|
+
|
|
226
|
+
{{PARAMETERS}}
|
|
227
|
+
|
|
228
|
+
## Your task
|
|
229
|
+
|
|
230
|
+
1. **Analyze the request** to identify:
|
|
231
|
+
- What is explicitly stated
|
|
232
|
+
- What is implicit or assumed
|
|
233
|
+
- What information is missing or ambiguous
|
|
234
|
+
- The likely intent behind the request
|
|
235
|
+
|
|
236
|
+
2. **Ask clarifying questions** if needed:
|
|
237
|
+
- If the request is too vague or has multiple interpretations
|
|
238
|
+
- If critical information is missing
|
|
239
|
+
- Use the 'invite' or 'choice' tools to gather necessary details
|
|
240
|
+
|
|
241
|
+
3. **Reformulate the request** into a clear, detailed, and actionable prompt:
|
|
242
|
+
- Make implicit requirements explicit
|
|
243
|
+
- Add relevant context from the current project
|
|
244
|
+
- Specify expected outcomes or deliverables
|
|
245
|
+
- Break down complex requests into clear steps if needed
|
|
246
|
+
- Use precise technical terminology when appropriate
|
|
247
|
+
|
|
248
|
+
4. **Present the reformulated request** and ask for confirmation:
|
|
249
|
+
- Show the enhanced version clearly
|
|
250
|
+
- Explain key changes or additions you made
|
|
251
|
+
- Ask if this matches the user's intent
|
|
252
|
+
|
|
253
|
+
The goal is to transform a rough idea into a well-defined request that will produce better AI responses.`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-memory-learn",name:"memory-learn",description:"Extract and memorize new knowledge gained from recent context",source:"builtin",commands:[`@ Learn about the following topic and memorize relevant insights if defined:
|
|
254
|
+
|
|
255
|
+
<topic>
|
|
256
|
+
{{PARAMETERS}}
|
|
257
|
+
</topic>
|
|
258
|
+
|
|
259
|
+
If no specific topic is provided, extract learnings from the entire recent conversation context.
|
|
260
|
+
|
|
261
|
+
## Process
|
|
262
|
+
|
|
263
|
+
1. **Identify new knowledge**: From the recent conversation context, identify what you learned that:
|
|
264
|
+
- Was not in the initially given context
|
|
265
|
+
- Is specific to this user or project (not generic knowledge)
|
|
266
|
+
- Is useful and worth remembering
|
|
267
|
+
- Represents understanding, not just file copies
|
|
268
|
+
|
|
269
|
+
2. **Organize insights**: Split the knowledge into cohesive subjects, each with:
|
|
270
|
+
- **Title**: Short and descriptive (one sentence maximum)
|
|
271
|
+
- **Content**: Detailed explanation of what was learned
|
|
272
|
+
- Length: at most 3 paragraphs or short extracts and notes
|
|
273
|
+
- Format: Well-structured markdown
|
|
274
|
+
- Focus: Specific patterns, decisions, constraints, or insights
|
|
275
|
+
|
|
276
|
+
3. **Check for redundancy**: Before memorizing:
|
|
277
|
+
- Review the list of existing memories to avoid duplication
|
|
278
|
+
- If a similar memory exists, consider updating it instead of creating a new one
|
|
279
|
+
- delete memories if needed
|
|
280
|
+
|
|
281
|
+
4. **Memorize**: Use the memorization tools to save each subject:
|
|
282
|
+
- Choose appropriate level if available (PROJECT or USER)
|
|
283
|
+
- Ensure clear structure and completeness
|
|
284
|
+
- Memorize one subject at a time
|
|
285
|
+
|
|
286
|
+
## Guidelines
|
|
287
|
+
- Focus on actionable insights, not generic facts
|
|
288
|
+
- Ensure memories are self-contained and clear
|
|
289
|
+
- Avoid redundancy with existing memories
|
|
290
|
+
- Prioritize quality over quantity`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-memory-curate",name:"memory-curate",description:"Analyze and clean up the memory system by consolidating redundancies and removing outdated information",source:"builtin",commands:[`@ we start a 4 phase memory curation process. Complete only the requested phase at each time.
|
|
291
|
+
|
|
292
|
+
Phase 1: Analyze redundancies
|
|
293
|
+
|
|
294
|
+
Review all current memories to identify:
|
|
295
|
+
|
|
296
|
+
1. **Redundant memories** that:
|
|
297
|
+
- Cover similar or overlapping topics
|
|
298
|
+
- Contain duplicate information
|
|
299
|
+
- Could be consolidated for better clarity
|
|
300
|
+
|
|
301
|
+
2. **For each group of redundant memories**:
|
|
302
|
+
- List the memory titles involved
|
|
303
|
+
- Explain the redundancy briefly
|
|
304
|
+
- Propose a consolidation approach
|
|
305
|
+
|
|
306
|
+
Do not make changes yet - just analyze and report findings.`,`@ Phase 2: Consolidate redundancies
|
|
307
|
+
|
|
308
|
+
Based on the analysis from Phase 1:
|
|
309
|
+
|
|
310
|
+
1. **For each identified redundancy**:
|
|
311
|
+
- Delete the individual redundant memories using deleteMemory
|
|
312
|
+
- Create a new consolidated memory that:
|
|
313
|
+
- Maintains all critical details from the originals
|
|
314
|
+
- Provides clear, well-structured content
|
|
315
|
+
- Uses appropriate level (PROJECT or USER)
|
|
316
|
+
- Explain your consolidation reasoning
|
|
317
|
+
|
|
318
|
+
2. **Be proactive but careful**: Preserve important details while eliminating duplication.`,`@ Phase 3: Check for outdated information
|
|
319
|
+
|
|
320
|
+
Review remaining memories for accuracy and relevance:
|
|
321
|
+
|
|
322
|
+
1. **Compare each memory against**:
|
|
323
|
+
- Other memories for inconsistencies
|
|
324
|
+
- Current project context for outdated information
|
|
325
|
+
- Core documentation for misalignments
|
|
326
|
+
|
|
327
|
+
2. **For each problematic memory**:
|
|
328
|
+
- List the memory title with brief explanation of the issue
|
|
329
|
+
- Take appropriate action:
|
|
330
|
+
- Delete if outdated or incorrect
|
|
331
|
+
- Update if incomplete or partially incorrect
|
|
332
|
+
- Consolidate if it fits better elsewhere
|
|
333
|
+
- Explain your reasoning clearly
|
|
334
|
+
|
|
335
|
+
Be thorough in your analysis.`,`@ Phase 4: Final verification
|
|
336
|
+
|
|
337
|
+
Verify the memory system's overall health:
|
|
338
|
+
|
|
339
|
+
1. **Review the current state**:
|
|
340
|
+
- Check overall structure and organization
|
|
341
|
+
- Verify each memory for completeness and validity
|
|
342
|
+
- Confirm proper categorization (PROJECT vs USER)
|
|
343
|
+
|
|
344
|
+
2. **Document the results**:
|
|
345
|
+
- Summarize what was consolidated or removed
|
|
346
|
+
- List any remaining issues or concerns
|
|
347
|
+
- Provide recommendations for maintaining memory quality
|
|
348
|
+
|
|
349
|
+
This ensures the memory system stays efficient and valuable.`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""}];var h_e=[zo.type,Bo.type,Jr.type,Ya.type,jo.type,Vo.type,Mi.type];var yP={CONFLUENCE:[],GIT:[],GITLAB:[],JIRA:[],SLACK:[],ZENDESK:[],BASECAMP:[]},P_e=Object.keys(yP).filter(n=>yP[n]?.length===0);var to=class n{eventSource=null;eventsSubject=new P;connectionStatusSubject=new ae({connected:!1,reconnectAttempts:0,maxAttempts:3});reconnectAttempts=0;MAX_RECONNECT_ATTEMPTS=3;RECONNECT_DELAY=2e3;events$=this.eventsSubject.asObservable();connectionStatus$=this.connectionStatusSubject.asObservable();ngZone=d(Y);connectToThread(t,e){console.log("[SSE] Connecting to thread event stream:",t,e),this.eventSource&&(console.log("[SSE] Closing existing EventSource"),this.eventSource.close());let i=`/api/projects/${t}/threads/${e}/event-stream`;console.log("[SSE] EventSource URL:",i),this.eventSource=new EventSource(i),this.setupEventHandlers()}setupEventHandlers(){this.eventSource&&(this.eventSource.onmessage=t=>{this.ngZone.run(()=>{console.log("[SSE] Message received:",t.data.substring(0,100)),this.reconnectAttempts=0,this.updateConnectionStatus(!0,0);try{let e=JSON.parse(t.data),i=Hx(e);i?(console.log("[SSE] Event:",i.type),this.eventsSubject.next(i)):console.warn("[SSE] Failed to build event:",e.type)}catch(e){console.error("[SSE] Parse error:",e.message)}})},this.eventSource.onopen=()=>{this.ngZone.run(()=>{console.log("[SSE] Connection established"),this.reconnectAttempts=0,this.updateConnectionStatus(!0,0)})},this.eventSource.onerror=t=>{this.ngZone.run(()=>{console.log("[SSE] EventSource error:",t),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 Cr({error:new Error(`Connection lost. Attempting to reconnect (${this.reconnectAttempts+1}/${this.MAX_RECONNECT_ATTEMPTS})...`)})),setTimeout(()=>{this.reconnectAttempts++,console.warn("[SSE] Reconnection may not work properly with thread-based connections")},this.RECONNECT_DELAY)):(console.log("[SSE] Max reconnection attempts reached"),this.eventsSubject.next(new Cr({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))}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=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ls=class n{http=d(dt);projectState=d(qe);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/threads`}listThreads(){return this.http.get(this.getBaseUrl())}getThread(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createThread(t){let e=t?{name:t}:{};return this.http.post(this.getBaseUrl(),e)}updateThread(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,{name:e})}starThread(t){return this.http.post(`${this.getBaseUrl()}/${t}/star`,{})}unstarThread(t){return this.http.delete(`${this.getBaseUrl()}/${t}/star`)}deleteThread(t){return this.http.delete(`${this.getBaseUrl()}/${t}`)}stopThread(t){return this.http.post(`${this.getBaseUrl()}/${t}/stop`,{})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Rn=class n{selectedThreadIdSubject=new ae(null);isLoadingSubject=new ae(!1);isLoadingThreadListSubject=new ae(!1);refreshThreadListSubject=new P;threadListSubject=new ae([]);hasLoadedOncePerProject=new Map;currentProjectName=null;isLoading$=this.isLoadingSubject.asObservable();isLoadingThreadList$=this.isLoadingThreadListSubject.asObservable();threadApi=d(Ls);projectStateService=d(qe);projectName$=this.projectStateService.selectedProject$.pipe(z(t=>t?.name),Xo());constructor(){In([this.projectName$,this.refreshThreadListSubject.asObservable().pipe(Ht(void 0))]).pipe(Oe(([t])=>{t!==this.currentProjectName&&(console.log("[THREAD_STATE] Project changed, clearing thread list"),this.threadListSubject.next([]),this.currentProjectName=t),t?this.hasLoadedOncePerProject.get(t)?console.log("[THREAD_STATE] Refreshing thread list for project",t,"(no spinner)"):(console.log("[THREAD_STATE] Initial load for project",t,"- showing spinner"),this.isLoadingThreadListSubject.next(!0)):(console.log("[THREAD_STATE] No project selected, hiding spinner"),this.isLoadingThreadListSubject.next(!1))}),lt(([t])=>t?(console.log("[THREAD_STATE] Fetching threads for project:",t),this.threadApi.listThreads().pipe(z(e=>({threads:e,projectName:t})),nn(e=>(console.error("[THREAD_STATE] Error loading thread list:",e),W({threads:[],projectName:t}))))):(console.log("[THREAD_STATE] No project selected, returning empty list"),W({threads:[],projectName:null}))),Oe(({threads:t,projectName:e})=>{console.log("[THREAD_STATE] Thread list loaded:",t.length,"threads for project",e),e&&this.hasLoadedOncePerProject.set(e,!0),this.isLoadingThreadListSubject.next(!1),this.threadListSubject.next(t)})).subscribe()}threadList$=this.threadListSubject.asObservable();selectedThread$=In([this.projectName$,this.selectedThreadIdSubject.pipe(Xo())]).pipe(Oe(([t,e])=>{console.log("\u{1F43C} combineLatest emitted:",{projectName:t,threadId:e})}),lt(([t,e])=>!t||!e?(console.log("\u{1F43C} null"),W(null)):(console.log("\u{1F43C} loading thread:",e),this.isLoadingSubject.next(!0),this.threadApi.getThread(e).pipe(Oe(i=>{console.log("\u{1F43C} loaded thread:",i?.id)}),Tr({bufferSize:1,refCount:!0})))),Oe(()=>{console.log("\u{1F43C} finished loading"),this.isLoadingSubject.next(!1)}));selectThread(t){this.selectedThreadIdSubject.next(t)}getSelectedThreadId(){return this.selectedThreadIdSubject.value}getSelectedThreadIdOrThrow(){let t=this.selectedThreadIdSubject.value;if(!t)throw new Error("[THREAD_STATE] No thread selected");return t}clearSelection(){this.selectedThreadIdSubject.next(null)}stop(){let t=this.selectedThreadIdSubject.value;if(!t){console.error("[THREAD_STATE] Cannot stop: no thread selected");return}console.log("[THREAD_STATE] Stopping thread:",t),this.threadApi.stopThread(t).subscribe({next:e=>console.log("[THREAD_STATE] Stop signal sent:",e.message),error:e=>console.error("[THREAD_STATE] Error stopping thread:",e)})}refreshThreadList(){console.log("[THREAD_STATE] Manually refreshing thread list"),this.refreshThreadListSubject.next()}renameThread(t,e){let i=e.trim();return!i||i.length===0?(console.error("[THREAD_STATE] Cannot rename thread: name is empty after trimming"),pi(()=>new Error("Thread name cannot be empty"))):(console.log("[THREAD_STATE] Renaming thread:",t,"to:",i),this.threadApi.updateThread(t,i).pipe(Oe(r=>{console.log("[THREAD_STATE] Thread renamed successfully:",r),this.refreshThreadList()}),nn(r=>(console.error("[THREAD_STATE] Error renaming thread:",r),pi(()=>r)))))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var zc=class n{http=d(dt);projectState=d(qe);threadState=d(Rn);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/threads/${this.threadState.getSelectedThreadIdOrThrow()}/messages`}getMessages(){return this.http.get(this.getBaseUrl())}sendMessage(t){return this.http.post(this.getBaseUrl(),t,{responseType:"text"})}getMessage(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}deleteMessage(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}getFormattedMessage(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}/formatted`,{responseType:"text"})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Wi=class n{destroy$=new P;currentProject=null;currentThread=null;messagesSubject=new ae([]);isThinkingSubject=new ae(!1);currentChoiceSubject=new ae(null);projectTitleSubject=new ae("Coday");currentInviteEventSubject=new ae(null);messageToRestoreSubject=new ae("");threadUpdateEventSubject=new ae(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new ae("");messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=d(to);messageApi=d(zc);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling()}setTabTitleService(t){this.tabTitleService=t}connectToThread(t,e){this.currentProject=t,this.currentThread=e,this.eventStream.connectToThread(t,e),setTimeout(()=>this.processUnansweredInvites(),500)}processUnansweredInvites(){let t=this.messagesSubject.value,e=t.filter(i=>i.type==="text"&&i.parentKey===void 0&&i.invite!==void 0).filter(i=>!t.some(r=>r.type==="text"&&r.role==="user"&&r.parentKey===i.id));e.length>0&&console.log("[CODAY] Found",e.length,"unanswered invite(s)")}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.stopThinking()}sendMessage(t){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}this.isThinkingSubject.next(!0),this.tabTitleService?.setSystemActive();let e=this.currentInviteEventSubject.value;if(e){let i=e.buildAnswer(t);this.currentInviteEventSubject.next(null),this.messageApi.sendMessage(i).subscribe({error:r=>{console.error("[CODAY] Send error:",r),this.stopThinking()}})}else{let i=new Mi({answer:t});this.messageApi.sendMessage(i).subscribe({error:r=>{console.error("[CODAY] Send error:",r),this.stopThinking()}})}}sendChoice(t){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.isThinkingSubject.next(!0),this.tabTitleService?.setSystemActive();let e=this.currentChoiceEvent.buildAnswer(t);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(e).subscribe({next:()=>{},error:i=>{console.error("[CODAY-CHOICE] Choice error:",i),this.stopThinking()}})}else console.error("[CODAY-CHOICE] No choice event available for choice:",t)}deleteMessage(t){let e=this.messagesSubject.value.find(r=>r.id===t),i=this.extractTextContentFromMessage(e);return this.messageApi.deleteMessage(t).pipe(Oe(r=>{r.success&&(this.removeMessagesFromIndex(t),i.trim()&&this.messageToRestoreSubject.next(i))}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(!0),this.tabTitleService?.setSystemActive()}initializeEventHandling(){this.eventStream.events$.pipe($(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 zo?this.handleMessageEvent(t):t instanceof jc?this.handleTextChunkEvent(t):t instanceof Ga?this.handleTextEvent(t):t instanceof Mi?this.handleAnswerEvent(t):t instanceof Cr?this.handleErrorEvent(t):t instanceof qa?this.handleWarnEvent(t):t instanceof Ns?this.handleThinkingEvent(t):t instanceof Bo?this.handleToolRequestEvent(t):t instanceof Jr?this.handleToolResponseEvent(t):t instanceof Vo?this.handleChoiceEvent(t):t instanceof Lc?this.handleHeartBeatEvent(t):t instanceof jo?this.handleInviteEvent(t):t instanceof Vc?this.handleThreadUpdateEvent(t):t instanceof Bc||t instanceof eo||console.warn("[CODAY] Unhandled event type:",t.type)}handleThreadUpdateEvent(t){this.threadUpdateEventSubject.next(t)}handleMessageEvent(t){t.role==="assistant"&&this.accumulatedChunks&&(this.accumulatedChunks="",this.streamingTextSubject.next(""));let e={id:t.timestamp,role:t.role,speaker:t.name,content:t.content,timestamp:new Date,type:"text"};this.addMessage(e)}handleTextChunkEvent(t){this.accumulatedChunks+=t.chunk,this.streamingTextSubject.next(this.accumulatedChunks)}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",parentKey:t.parentKey,invite:t.invite};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){this.currentInviteEventSubject.value||this.currentChoiceEvent||(this.clearThinkingTimeout(),this.isThinkingSubject.next(!0),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(!1),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive()},Ns.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(r=>({value:r,label:r})),i=t.optionalQuestion?`${t.optionalQuestion} ${t.invite}`:t.invite;this.currentChoiceSubject.next({options:e,label:i})}handleHeartBeatEvent(t){}handleInviteEvent(t){this.stopThinking();let e=this.messagesSubject.value,i=e[e.length-1];if(!(!(t.invite===zx)&&i&&i.role==="assistant"&&i.content.some(s=>s.type==="text"&&s.content.includes(t.invite)))&&t.invite!==zx){let s={id:t.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:t.invite}],timestamp:new Date,type:"text"};this.addMessage(s)}this.currentInviteEventSubject.next(t),this.tabTitleService?.setSystemInactive()}addMessage(t){let i=[...this.messagesSubject.value,t];this.messagesSubject.next(i)}removeMessagesFromIndex(t){let e=this.messagesSubject.value,i=e.findIndex(o=>o.id===t);if(i===-1||i===0)return;let r=e.slice(0,i);this.messagesSubject.next(r),this.stopThinking()}extractTextContentFromMessage(t){return t?t.content.filter(e=>e.type==="text").map(e=>e.content).join(`
|
|
350
|
+
|
|
351
|
+
`):""}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.threadUpdateEventSubject.complete(),this.streamingTextSubject.complete(),this.eventStream.disconnect()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Hc=class n{http=d(dt);agentsCache=new Map;getAgents(t){let e=this.agentsCache.get(t);return e?W(e):this.http.get(`/api/projects/${t}/agents`).pipe(Oe(i=>{this.agentsCache.set(t,i)}))}getAgentsAutocomplete(t,e){return this.getAgents(t).pipe(z(i=>{if(!e)return i;let r=e.toLowerCase();return i.filter(o=>{let s=o.name.toLowerCase(),a=o.description?.toLowerCase()||"";return s.includes(r)||a.includes(r)})}))}clearCache(t){this.agentsCache.delete(t)}clearAllCache(){this.agentsCache.clear()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Gi=class n{http=d(dt);projectState=d(qe);promptsCache=new Map;getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let i=this.promptsCache.get(t);return i?W(this.filterPromptsForAutocomplete(i,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(z(r=>(this.promptsCache.set(t,r),this.filterPromptsForAutocomplete(r,e))))}filterPromptsForAutocomplete(t,e){let i=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(i)||o.description.toLowerCase().includes(i)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear()}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(z(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(z(i=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),i)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(z(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Iv=class n{sanitizer=d(bi);transform(t,e){if(!e||!t)return t;let i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`(${i})`,"gi"),o=t.replace(r,"<strong>$1</strong>");return this.sanitizer.bypassSecurityTrustHtml(o)}static \u0275fac=function(e){return new(e||n)};static \u0275pipe=$l({name:"highlight",type:n,pure:!0})};var h4=["messageInput"],g4=["fileInput"],v4=(n,t)=>t.name;function _4(n,t){n&1&&(u(0,"div",3),H(1,"span",7),g(2," Recording... Click mic to stop "),m())}function b4(n,t){if(n&1&&(u(0,"span",12),g(1),m()),n&2){let e=b().$implicit,i=b(2);f(),K(" "+(i.getParameterFormat(e)||""))}}function y4(n,t){if(n&1){let e=V();u(0,"div",9),w("click",function(){let r=E(e).$index,o=b(2);return S(o.selectAutocompleteItemByClick(r))})("keydown.enter",function(){let r=E(e).$index,o=b(2);return S(o.selectAutocompleteItemByClick(r))})("keydown.space",function(){let r=E(e).$index,o=b(2);return S(o.selectAutocompleteItemByClick(r))})("mouseenter",function(){let r=E(e).$index,o=b(2);return S(o.selectedAutocompleteIndex=r)}),u(1,"div",10),H(2,"span",11),gs(3,"highlight"),I(4,b4,2,1,"span",12),m(),H(5,"div",13),gs(6,"highlight"),m()}if(n&2){let e=t.$implicit,i=t.$index,r=b(2);j("selected",i===r.selectedAutocompleteIndex),ne("aria-selected",i===r.selectedAutocompleteIndex),f(2),D("innerHTML",Yl(3,6,r.autocompleteTrigger+e.name,r.getAutocompleteQuery()),ii),f(2),k(r.hasParameterFormat(e)?4:-1),f(),D("innerHTML",Yl(6,9,e.description,r.getAutocompleteQuery()),ii)}}function C4(n,t){if(n&1&&(u(0,"div",4),st(1,y4,7,12,"div",8,v4),m()),n&2){let e=b();f(),at(e.autocompleteItems)}}function w4(n,t){if(n&1){let e=V();u(0,"button",15),w("click",function(){E(e);let r=b(2);return S(r.onStopClick())}),u(1,"mat-icon"),g(2,"stop"),m()()}}function x4(n,t){if(n&1){let e=V();u(0,"button",18),w("click",function(){E(e);let r=b(3);return S(r.triggerFileUpload())}),u(1,"mat-icon"),g(2,"attach_file"),m()(),u(3,"input",19,1),w("change",function(r){E(e);let o=b(3);return S(o.onFileInputChange(r))}),m()}if(n&2){let e=b(3);D("disabled",e.isDisabled||e.isLocallyDisabled)}}function E4(n,t){if(n&1){let e=V();u(0,"button",16),w("click",function(){E(e);let r=b(2);return S(r.sendMessage())}),u(1,"mat-icon"),g(2,"send"),m()(),I(3,x4,5,1),u(4,"button",17),w("click",function(){E(e);let r=b(2);return S(r.toggleRecording())}),u(5,"mat-icon"),g(6),m()()}if(n&2){let e=b(2);j("hidden",e.isDisabled||!e.message.trim()||e.isLocallyDisabled)("active",!!e.message.trim()&&!e.isDisabled&&!e.isLocallyDisabled),D("disabled",e.isDisabled||!e.message.trim()||e.isLocallyDisabled)("title",e.getSendButtonTooltip()),f(3),k(e.showWelcome?-1:3),f(),j("recording",e.isRecording)("hidden",e.message.trim()),D("title",e.isRecording?"Click to stop recording":"Click to start recording"),f(2),K(e.isRecording?"fiber_manual_record":"mic")}}function S4(n,t){if(n&1&&I(0,w4,3,0,"button",14)(1,E4,7,13),n&2){let e=b();k(e.isThinking?0:1)}}var Uc=class n{static MIN_TEXTAREA_LINES=2;static MAX_TEXTAREA_LINES=15;isDisabled=!1;showWelcome=!1;isThinking=!1;isStarting=!1;isSessionInitializing=!1;isStopping=!1;isLocallyDisabled=!1;filesPasted=new U;messageSubmitted=new U;voiceRecordingToggled=new U;heightChanged=new U;stopRequested=new U;messageInput;fileInput;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;autocompleteVisible=!1;autocompleteTrigger=null;autocompleteItems=[];selectedAutocompleteIndex=0;preferencesService=d(Bt);codayService=d(Wi);agentApiService=d(Hc);promptApiService=d(Gi);projectStateService=d(qe);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,this.isLocallyDisabled=!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"),this.isLocallyDisabled=!1,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){if(this.autocompleteVisible)switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedAutocompleteIndex=Math.min(this.selectedAutocompleteIndex+1,this.autocompleteItems.length-1),this.scrollSelectedItemIntoView();return;case"ArrowUp":t.preventDefault(),this.selectedAutocompleteIndex=Math.max(this.selectedAutocompleteIndex-1,0),this.scrollSelectedItemIntoView();return;case"Tab":case"Enter":if(!this.message.includes(" ")){t.preventDefault(),this.selectAutocompleteItem();return}break;case"Escape":t.preventDefault(),this.hideAutocomplete();return}t.key==="Enter"&&(this.useEnterToSend?!t.shiftKey&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),this.sendMessage(!0)):(navigator.platform.toLowerCase().includes("mac")?t.metaKey:t.ctrlKey)&&!t.shiftKey&&(t.preventDefault(),this.sendMessage(!0)))}onInput(){this.adjustTextareaHeight(),this.checkForAutocomplete()}onPaste(t){let e=t.clipboardData?.items;if(!e)return;let i=Array.from(e).filter(o=>o.kind==="file");if(!i.length)return;t.preventDefault();let r=i.reduce((o,s)=>{let a=s.getAsFile();return a?[...o,a]:o},[]);r.length&&this.filesPasted.emit(r)}triggerFileUpload(){console.log("[CHAT-TEXTAREA] Triggering file upload"),this.fileInput?.nativeElement?.click()}onFileInputChange(t){let e=t.target,i=e.files;if(!i||i.length===0){console.log("[CHAT-TEXTAREA] No files selected");return}console.log("[CHAT-TEXTAREA] Files selected:",i.length);let r=Array.from(i);this.filesPasted.emit(r),e.value=""}onDocumentClick(t){if(!this.autocompleteVisible)return;let e=t.target,i=document.querySelector(".autocomplete-popup"),r=this.messageInput?.nativeElement;i&&!i.contains(e)&&r&&!r.contains(e)&&this.hideAutocomplete()}sendMessage(t=!1){let e=this.message.trim();!this.isDisabled&&!this.isLocallyDisabled&&(t||e)&&(this.isLocallyDisabled=!0,this.messageSubmitted.emit(e),this.message="",setTimeout(()=>this.adjustTextareaHeight(),0))}onStopClick(){this.isStopping=!0,this.stopRequested.emit()}toggleRecording(){this.isRecording?this.stopRecording():this.startRecording()}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 i="";for(let r=e.resultIndex;r<e.results.length;r++){let o=e.results[r][0].transcript;e.results[r].isFinal&&(i+=o)}if(i){let r=this.improveTranscriptPunctuation(i.trim());this.sessionHadTranscript=!0,console.log("[SPEECH] onresult ending, appending to textarea",this.isRecording),this.appendToTextarea(r)}},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 pe(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;if(this.message=e?`${e}${t}`:t,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(`
|
|
352
|
+
|
|
353
|
+
`),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),i=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||i*1.5,o=r*n.MIN_TEXTAREA_LINES+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s=r*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 l=t.parentElement?.offsetHeight??a+32;this.heightChanged.emit(l)}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?"Processing request...":this.currentThinkingPhrase:this.showWelcome?"How can I help you today?":"Type '@' for agents, '/' for commands, or just your message..."}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,this.isLocallyDisabled=!1,e&&(this.message=e,setTimeout(()=>this.adjustTextareaHeight(),0)),setTimeout(()=>{this.messageInput?.nativeElement&&this.messageInput.nativeElement.focus()},50)}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,i=this.message.length;e.setSelectionRange(i,i)},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")}checkForAutocomplete(){let t=this.message;if(t.startsWith("@")){let e=t.substring(1);if(e.includes(" ")){this.hideAutocomplete();return}this.showAgentAutocomplete(e);return}if(t.startsWith("/")){let e=t.substring(1);if(e.includes(" ")){this.hideAutocomplete();return}this.showPromptAutocomplete(e);return}this.hideAutocomplete()}showAgentAutocomplete(t){this.autocompleteTrigger="@";try{let e=this.projectStateService.getSelectedProjectIdOrThrow();this.agentApiService.getAgentsAutocomplete(e,t).subscribe({next:i=>{this.autocompleteItems=i,this.autocompleteVisible=i.length>0,this.selectedAutocompleteIndex=0},error:i=>{console.error("[AUTOCOMPLETE] Error loading agents:",i),this.hideAutocomplete()}})}catch{console.warn("[AUTOCOMPLETE] No project selected, cannot load agents"),this.hideAutocomplete()}}showPromptAutocomplete(t){this.autocompleteTrigger="/";try{let e=this.projectStateService.getSelectedProjectIdOrThrow();this.promptApiService.getPromptsAutocomplete(e,t).subscribe({next:i=>{this.autocompleteItems=i,this.autocompleteVisible=i.length>0,this.selectedAutocompleteIndex=0},error:i=>{console.error("[AUTOCOMPLETE] Error loading prompts:",i),this.hideAutocomplete()}})}catch{console.warn("[AUTOCOMPLETE] No project selected, cannot load prompts"),this.hideAutocomplete()}}hideAutocomplete(){this.autocompleteVisible=!1,this.autocompleteItems=[],this.selectedAutocompleteIndex=0}selectAutocompleteItem(){let t=this.autocompleteItems[this.selectedAutocompleteIndex];if(!t)return;let e=null;if(this.autocompleteTrigger==="/"){let i=t,r=i.parameterFormat;if(console.log(i),r===void 0)this.message=`/${t.name}`;else if(r==="")this.message=`/${t.name} `;else{this.message=`/${t.name} ${r}`;let o=this.message.indexOf('=""');o!==-1&&(e=o+2)}}else this.message=`@${t.name} `;this.hideAutocomplete(),setTimeout(()=>{if(this.messageInput?.nativeElement)if(this.messageInput.nativeElement.focus(),e!==null)this.messageInput.nativeElement.setSelectionRange(e,e);else{let i=this.message.length;this.messageInput.nativeElement.setSelectionRange(i,i)}},0)}selectAutocompleteItemByClick(t){this.selectedAutocompleteIndex=t,this.selectAutocompleteItem()}getAutocompleteQuery(){return this.message.substring(1).split(" ")[0]??""}getParameterFormat(t){return t.parameterFormat}hasParameterFormat(t){return this.autocompleteTrigger==="/"&&t.parameterFormat!==void 0}scrollSelectedItemIntoView(){setTimeout(()=>{let t=document.querySelector(".autocomplete-popup");if(!t)return;let e=t.querySelector(".autocomplete-item.selected");e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-chat-textarea"]],viewQuery:function(e,i){if(e&1&&(xe(h4,7),xe(g4,5)),e&2){let r;re(r=oe())&&(i.messageInput=r.first),re(r=oe())&&(i.fileInput=r.first)}},hostBindings:function(e,i){e&1&&w("paste",function(o){return i.onPaste(o)})("click",function(o){return i.onDocumentClick(o)},r0)},inputs:{isDisabled:"isDisabled",showWelcome:"showWelcome",isThinking:"isThinking",isStarting:"isStarting",isSessionInitializing:"isSessionInitializing"},outputs:{filesPasted:"filesPasted",messageSubmitted:"messageSubmitted",voiceRecordingToggled:"voiceRecordingToggled",heightChanged:"heightChanged",stopRequested:"stopRequested"},features:[We],decls:7,vars:12,consts:[["messageInput",""],["fileInput",""],[1,"chat-input-container"],[1,"recording-indicator"],[1,"autocomplete-popup"],[1,"input-row","grouped-input"],[1,"message-input",3,"ngModelChange","keydown","input","focus","blur","ngModel","placeholder","disabled"],[1,"recording-dot"],["role","option","tabindex","0",1,"autocomplete-item",3,"selected"],["role","option","tabindex","0",1,"autocomplete-item",3,"click","keydown.enter","keydown.space","mouseenter"],[1,"item-name"],[3,"innerHTML"],[1,"parameter-format"],[1,"item-description",3,"innerHTML"],["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","","type","button",1,"send-btn",3,"click","disabled","title"],["mat-icon-button","","tabindex","0",1,"voice-btn",3,"click","title"],["mat-icon-button","","title","Upload files (images or documents)","type","button",1,"upload-btn",3,"click","disabled"],["type","file","multiple","","accept","image/*,application/pdf,.pdf,.doc,.docx,.txt,.md,.json,.yaml,.yml,.csv,.xml,.html",2,"display","none",3,"change"]],template:function(e,i){if(e&1){let r=V();u(0,"div",2),I(1,_4,3,0,"div",3),I(2,C4,3,0,"div",4),u(3,"div",5)(4,"textarea",6,0),q("ngModelChange",function(s){return E(r),Q(i.message,s)||(i.message=s),S(s)}),w("keydown",function(s){return E(r),S(i.onKeyDown(s))})("input",function(){return E(r),S(i.onInput())})("focus",function(){return E(r),S(i.isFocused=!0)})("blur",function(){return E(r),S(i.isFocused=!1)}),m(),I(6,S4,2,1),m()()}e&2&&(f(),k(i.isRecording?1:-1),f(),k(i.autocompleteVisible?2:-1),f(),j("focused",i.isFocused)("welcome-mode",i.showWelcome)("is-thinking",i.isThinking),f(),G("ngModel",i.message),D("placeholder",i.getPlaceholder())("disabled",i.isDisabled||i.isThinking||i.isLocallyDisabled),f(2),k(i.isSessionInitializing?-1:6))},dependencies:[Rt,Et,Pt,Tt,Gt,$e,Iv],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:70vh;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,system-ui,sans-serif;line-height:1.5}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary)}.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%], .upload-btn[_ngcontent-%COMP%]{margin:0 .5rem 0 .08rem}.upload-btn[_ngcontent-%COMP%]{color:var(--color-text-secondary);transition:color .2s,transform .2s}.upload-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--color-primary);transform:scale(1.1)}.upload-btn[_ngcontent-%COMP%]:active:not(:disabled){transform:scale(1.15)}.upload-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.voice-btn.recording[_ngcontent-%COMP%]{color:var(--color-error);animation:_ngcontent-%COMP%_pulse 1.5s infinite}.send-btn[_ngcontent-%COMP%]{transition:background .18s,box-shadow .18s,transform .12s,opacity .4s,margin-left .4s;position:relative}.send-btn.active[_ngcontent-%COMP%]{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: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}}.autocomplete-popup[_ngcontent-%COMP%]{position:absolute;bottom:100%;left:0;right:0;margin-bottom:.5rem;background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);border-radius:12px;box-shadow:0 8px 32px #00000026;border:1px solid var(--color-border);max-height:400px;max-width:500px;overflow-y:auto;z-index:100}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]{padding:.75rem 1rem;cursor:pointer;transition:background .2s;border-left:3px solid transparent}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]:hover, .autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item.selected[_ngcontent-%COMP%]{background:var(--color-bg-hover)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item.selected[_ngcontent-%COMP%]{border-left-color:var(--color-primary)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%]{font-weight:600;color:var(--color-text);margin-bottom:.25rem;font-family:SF Mono,Monaco,Menlo,Cascadia Code,Consolas,monospace;font-size:.95rem}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%] strong{font-weight:700;color:var(--color-primary);background:var(--color-primary-light, rgba(99, 102, 241, .1));padding:0 2px;border-radius:2px}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%] .parameter-format[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-weight:400;opacity:.7}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);line-height:1.3}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%] strong{font-weight:700;color:var(--color-primary);background:var(--color-primary-light, rgba(99, 102, 241, .1))}@media print{.thinking-progress[_ngcontent-%COMP%], .stop-btn[_ngcontent-%COMP%], .voice-btn[_ngcontent-%COMP%], .send-btn[_ngcontent-%COMP%], .upload-btn[_ngcontent-%COMP%], .recording-indicator[_ngcontent-%COMP%], .autocomplete-popup[_ngcontent-%COMP%]{display:none!important}}']})};var M4=(n,t)=>t.label;function T4(n,t){if(n&1){let e=V();u(0,"button",2),w("click",function(r){let o=E(e).$implicit,s=b();return S(s.executeAction(o,r))}),u(1,"mat-icon"),g(2),m()()}if(n&2){let e=t.$implicit;ne("title",e.tooltip||e.label),f(),ne("aria-label",e.label),f(),K(e.icon)}}var kv=class n{actions=[];executeAction(t,e){e.stopPropagation(),t.action()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({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,i){e&1&&(u(0,"div",0),st(1,T4,3,3,"button",1,M4),m()),e&2&&(f(),at(i.actions))},dependencies:[tt,Gt,$e],styles:[".context-menu-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}.context-menu-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transform:scale(.75)}"]})};var Av=class n{snackBar=d(mm);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=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var D4=n=>({"user-message-wrapper":n});function I4(n,t){if(n&1&&(u(0,"div",5)(1,"div",8),g(2),m()()),n&2){let e=b(2);f(2),Se(" ",e.message.speaker," ")}}function k4(n,t){if(n&1&&(u(0,"div",7),H(1,"app-message-context-menu",9),m()),n&2){let e=b(2);f(),D("actions",e.actions)}}function A4(n,t){if(n&1&&(I(0,I4,3,1,"div",5),H(1,"div",6),I(2,k4,2,1,"div",7)),n&2){let e=b();k(e.shouldShowSpeaker?0:-1),f(),D("innerHTML",e.renderedContent,ii),f(),k(e.isLongMessage&&e.shouldShowActions&&e.message.role==="assistant"?2:-1)}}function O4(n,t){if(n&1&&(u(0,"a",11),g(1,"view"),m()),n&2){let e=b(2);D("href",e.eventLink,ga)}}function P4(n,t){if(n&1&&(u(0,"div",2),H(1,"span",10),I(2,O4,2,1,"a",11),m()),n&2){let e=b();f(),D("innerHTML",e.renderedContent,ii),f(),k(e.eventLink?2:-1)}}function R4(n,t){if(n&1&&(u(0,"div",3),H(1,"app-message-context-menu",9),m()),n&2){let e=b();f(),D("actions",e.actions)}}function N4(n,t){if(n&1&&(u(0,"div",4),H(1,"app-message-context-menu",9),m()),n&2){let e=b();f(),D("actions",e.actions)}}var Ov=class n{destroy$=new P;message;canDelete=!0;copyRequested=new U;deleteRequested=new U;renderedContent="";shouldHideTechnical=!1;shouldHideWarning=!1;sanitizer=d(bi);notificationService=d(Av);preferencesService=d(Bt);projectState=d(qe);threadState=d(Rn);markdownService=d(Zr);get messageClasses(){return{[this.message.role]:!0,[this.message.type]:!0,"hidden-technical":this.shouldHideTechnical&&this.message.type==="technical","hidden-warning":this.shouldHideWarning&&this.message.type==="warning"}}ngOnInit(){return pe(this,null,function*(){yield this.renderMarkdown(),this.preferencesService.hideTechnicalMessages$.pipe($(this.destroy$)).subscribe(t=>{this.shouldHideTechnical=t}),this.preferencesService.hideWarningMessages$.pipe($(this.destroy$)).subscribe(t=>{this.shouldHideWarning=t}),this.shouldHideTechnical=this.preferencesService.getHideTechnicalMessages(),this.shouldHideWarning=this.preferencesService.getHideWarningMessages()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}get shouldShowSpeaker(){return this.message.role==="user"?this.message.speaker.startsWith("@"):this.message.role==="assistant"}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(`
|
|
354
|
+
`).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 t=this.projectState.getSelectedProjectId(),e=this.threadState.getSelectedThreadId();return!t||!e?null:`/api/projects/${t}/threads/${e}/messages/${encodeURIComponent(this.message.eventId)}/formatted`}renderMarkdown(){return pe(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 pe(this,null,function*(){let e=[];for(let i of t)if(i.type==="text"){let r=yield this.markdownService.parse(i.content);e.push(`<div class="text-part">${r}</div>`)}else if(i.type==="image"){let r=`data:${i.mimeType};base64,${i.content}`,o=i.source||"Image",s=`
|
|
355
|
+
<div class="image-content">
|
|
356
|
+
<img src="${r}"
|
|
357
|
+
alt="${o}"
|
|
358
|
+
class="message-image"
|
|
359
|
+
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;"
|
|
360
|
+
onclick="window.open(this.src, '_blank')" />
|
|
361
|
+
</div>
|
|
362
|
+
`;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(`
|
|
363
|
+
|
|
364
|
+
`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({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,i){e&1&&(u(0,"div",0)(1,"div",1),I(2,A4,3,3),I(3,P4,3,2,"div",2),m(),I(4,R4,2,1,"div",3),I(5,N4,2,1,"div",4),m()),e&2&&(D("ngClass",V0(6,D4,i.message.role==="user")),f(),D("ngClass",i.messageClasses),f(),k(i.isSimplified?-1:2),f(),k(i.isSimplified?3:-1),f(),k(!i.isLongMessage&&i.shouldShowActions&&i.message.role==="assistant"?4:-1),f(),k(i.shouldShowActions&&i.message.role==="user"?5:-1))},dependencies:[kv,va],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: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%], .message.hidden-warning[_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 $c=class n{unreadCountSubject=new ae(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=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Wc=class n{destroy$=new P;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new ae(!1);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=d(Bt);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 i=speechSynthesis.getVoices();if(i.length)t(i);else{let r=setTimeout(()=>{e("no voices found")},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let o=speechSynthesis.getVoices();o.length&&(clearTimeout(r),t(o))})}}),console.log("[VOICE-SERVICE] Speech synthesis initialized")}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe($(this.destroy$)).subscribe(t=>{this.volume=t,console.log("[VOICE-SERVICE] Volume updated to:",t)}),this.preferencesService.voiceRate$.pipe($(this.destroy$)).subscribe(t=>{this.rate=t,console.log("[VOICE-SERVICE] Rate updated to:",t)}),this.preferencesService.voiceLanguage$.pipe($(this.destroy$)).subscribe(t=>{this.language=t,console.log("[VOICE-SERVICE] Language updated to:",t),this.updateSelectedVoiceForLanguage()}),this.preferencesService.selectedVoice$.pipe($(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 pe(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 i=this.extractPlainText(t);if(!i.trim())return console.warn("[VOICE-SERVICE] No text to speak after markdown cleaning"),!1;this.stopSpeech();try{let r=new SpeechSynthesisUtterance(i);r.voice=this.selectedVoice,r.lang=this.selectedVoice.lang,r.volume=this.volume,r.rate=this.rate,this.currentOnEndCallback=e||null,e&&(r.onend=()=>{this.currentOnEndCallback===e&&(this.currentOnEndCallback=null,e())},r.onerror=()=>{this.currentOnEndCallback===e&&(this.currentOnEndCallback=null,e())}),this.currentUtterance=r,this.speakingSubject.next(!0);let o=r.onend,s=r.onerror;return r.onend=a=>{this.speakingSubject.next(!1),o&&o.call(r,a)},r.onerror=a=>{this.speakingSubject.next(!1),s&&s.call(r,a)},speechSynthesis.speak(r),console.log("[VOICE-SERVICE] Started speaking:",t.substring(0,50)+"..."),!0}catch(r){return console.error("[VOICE-SERVICE] Error speaking:",r),!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(),i=t.createGain();e.connect(i),i.connect(t.destination),e.frequency.setValueAtTime(800,t.currentTime),i.gain.setValueAtTime(.1,t.currentTime),i.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 pe(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 i=e.filter(r=>r.lang.toLowerCase().startsWith(t)).sort((r,o)=>r.localService&&!o.localService?-1:!r.localService&&o.localService?1:r.name.localeCompare(o.name));return console.log("[VOICE-SERVICE] Found matching voices:",i.length,"for language:",t),i.map(r=>({name:r.name,lang:r.lang,localService:r.localService,default:r.default,displayName:this.formatVoiceDisplayName(r)}))}catch(t){return console.error("[VOICE-SERVICE] Error getting voices for language:",t),[]}})}formatVoiceDisplayName(t){let e=t.localService?"\u{1F3E0}":"\u2601\uFE0F",i=t.default?" \u2B50":"";return`${e} ${t.name} (${t.lang})${i}`}setSelectedVoice(t){return pe(this,null,function*(){if(!t){this.selectedVoice=void 0;return}let[e,i]=t.split("|");if(!e||!i){this.selectedVoice=void 0;return}let r=(yield this.voices)?.find(o=>o.name===e&&o.lang===i);r?(this.selectedVoice=r,console.log("[VOICE-SERVICE] Selected voice:",r.name,r.lang)):(this.selectedVoice=void 0,console.warn("[VOICE-SERVICE] Voice not found:",e,i))})}updateSelectedVoiceForLanguage(){return pe(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[r,o]=e.split("|"),s=o?.slice(0,2),a=this.language.slice(0,2);if(s===a&&t.some(c=>c.name===r&&c.lang===o)){console.log("[VOICE-SERVICE] Keeping current voice for language:",e);return}}let i=t[0];if(i){let r=`${i.name}|${i.lang}`;this.preferencesService.setSelectedVoice(r),console.log("[VOICE-SERVICE] Auto-selected voice for language change:",i.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(/ /g," ").replace(/&/g,"and").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"');return e=this.addNaturalPunctuation(e),e.replace(/\s+/g," ").trim()}addNaturalPunctuation(t){return t.replace(/\n+/g,`
|
|
365
|
+
`).split(`
|
|
366
|
+
`).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=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Pv=class n{thinkingPhrases=["Processing request...","Thinking...","Working on it..."];currentThinkingPhrase="Processing request...";thinkingPhraseIndex=0;thinkingInterval=null;ngOnInit(){this.startThinkingAnimation()}ngOnDestroy(){this.stopThinkingAnimation()}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..."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-thinking-loader"]],decls:8,vars:1,consts:[[1,"message-wrapper"],[1,"message","assistant","thinking-message"],[1,"content"],[1,"thinking-loader"],[1,"logo-container"],["src","CODAY-Logo.png","alt","Coday Logo",1,"coday-logo"],[1,"thinking-text"]],template:function(e,i){e&1&&(fn(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),wn(5,"img",5),hn(),fn(6,"p",6),g(7),hn()()()()()),e&2&&(f(7),K(i.currentThinkingPhrase))},dependencies:[tt],styles:[".message-wrapper[_ngcontent-%COMP%]{margin:0;display:flex;align-items:flex-start;gap:.5rem}.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.thinking-message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{line-height:1.5}.thinking-loader[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:.75rem 0}.logo-container[_ngcontent-%COMP%]{position:relative;width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.coday-logo[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;animation:_ngcontent-%COMP%_pulse 2s ease-in-out infinite;filter:drop-shadow(0 1px 4px rgba(0,0,0,.1))}.thinking-text[_ngcontent-%COMP%]{font-size:.95rem;font-weight:400;color:var(--color-text-secondary);margin:0;animation:_ngcontent-%COMP%_fadeInOut 2s ease-in-out infinite;letter-spacing:.01em;font-style:italic}@keyframes _ngcontent-%COMP%_pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}}@keyframes _ngcontent-%COMP%_fadeInOut{0%,to{opacity:.6}50%{opacity:1}}@media (max-width: 768px){.logo-container[_ngcontent-%COMP%]{width:28px;height:28px}.thinking-text[_ngcontent-%COMP%]{font-size:.875rem}.thinking-loader[_ngcontent-%COMP%]{gap:.75rem}}@media print{.thinking-loader[_ngcontent-%COMP%]{display:none!important}}"]})};var F4=(n,t)=>t.id;function L4(n,t){if(n&1){let e=V();u(0,"app-chat-message",4),w("copyRequested",function(r){E(e);let o=b();return S(o.onCopyMessage(r))})("deleteRequested",function(r){E(e);let o=b();return S(o.onDeleteMessage(r))}),m()}if(n&2){let e=t.$implicit,i=t.$index,r=b();D("message",e)("canDelete",r.canDeleteMessage(i))}}function j4(n,t){if(n&1&&(u(0,"div",2),H(1,"div",5),m()),n&2){let e=b();f(),D("innerHTML",e.renderedStreamingText,ii)}}function V4(n,t){n&1&&H(0,"app-thinking-loader")}function B4(n,t){if(n&1){let e=V();u(0,"button",6),w("click",function(){E(e);let r=b();return S(r.goToBottom())}),u(1,"mat-icon",7),g(2,"arrow_downward"),m()()}}var Rv=class n{messages=[];streamingText="";isThinking=!1;copyRequested=new U;stopRequested=new U;lastMessageCount=0;destroy$=new P;renderedStreamingText="";isTracking=!0;showGoToBottom=!1;scrollContainer=null;lastScrollTop=0;NEAR_BOTTOM_THRESHOLD=100;scrollCheckTimeout;isProgrammaticScroll=!1;MESSAGE_FRESHNESS_THRESHOLD=300*1e3;elementRef=d(Z);unreadService=d($c);voiceSynthesisService=d(Wc);preferencesService=d(Bt);codayService=d(Wi);markdownService=d(Zr);sanitizer=d(bi);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)}ngOnChanges(t){t.streamingText&&(this.renderStreamingText(),this.streamingText&&this.isTracking&&setTimeout(()=>this.scrollToBottom(),0))}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&&(this.isProgrammaticScroll=!0,setTimeout(()=>{this.scrollContainer&&this.scrollContainer.scrollTo({top:this.scrollContainer.scrollHeight,behavior:"smooth"}),setTimeout(()=>{this.isProgrammaticScroll=!1},600)},50))}catch(t){console.error("Error scrolling to bottom:",t)}}trackByMessageId(t,e){return e.id}onCopyMessage(t){let e=t.content.filter(i=>i.type==="text").map(i=>i.content).join(`
|
|
367
|
+
|
|
368
|
+
`);navigator.clipboard.writeText(e).then(()=>console.log("Message copied")).catch(i=>console.error("Failed to copy:",i)),this.copyRequested.emit(t)}onStop(){this.stopRequested.emit()}canDeleteMessage(t){return t===0?!1:!this.isThinking}onDeleteMessage(t){if(console.log("[CHAT-HISTORY] Delete requested for message:",t.id),this.messages.findIndex(r=>r.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?
|
|
369
|
+
|
|
370
|
+
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:r=>{r.success?console.log("[CHAT-HISTORY] Message deleted successfully"):(console.error("[CHAT-HISTORY] Failed to delete message:",r.error),alert(`Failed to delete message: ${r.error}`))},error:r=>{console.error("[CHAT-HISTORY] Error deleting message:",r),alert(`Error deleting message: ${r.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;if(Math.abs(t-this.lastScrollTop)<1){this.lastScrollTop=t;return}if(this.isProgrammaticScroll){this.lastScrollTop=t;return}console.log("[CHAT-HISTORY] User scroll detected - disabling auto-scroll"),this.isTracking&&(this.isTracking=!1,this.showGoToBottom=!0),clearTimeout(this.scrollCheckTimeout),this.scrollCheckTimeout=setTimeout(()=>{this.checkScrollPosition()},500),this.lastScrollTop=t};checkScrollPosition(){if(!this.scrollContainer)return;let{scrollTop:t,scrollHeight:e,clientHeight:i}=this.scrollContainer,o=e-t-i<=this.NEAR_BOTTOM_THRESHOLD;o&&!this.isTracking&&(console.log("[CHAT-HISTORY] Near bottom - re-enabling auto-scroll"),this.isTracking=!0,this.showGoToBottom=!1,this.unreadService.markAllAsRead()),!this.isTracking&&!o&&(this.showGoToBottom=!0)}goToBottom(){console.log("[CHAT-HISTORY] Go to bottom clicked - re-enabling auto-scroll"),this.scrollToBottom(),this.isTracking=!0,this.showGoToBottom=!1,this.unreadService.markAllAsRead()}handleNewMessages(t){let i=this.messages.slice(-t).filter(o=>o.role==="assistant");if(i.length===0){console.log("[CHAT-HISTORY] No new assistant messages to count");return}if(this.shouldMarkNewMessagesAsUnread()){console.log("[CHAT-HISTORY] Marking",i.length,"new assistant messages as unread");for(let o=0;o<i.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 r=this.messages.slice(-t).filter(a=>a.role==="assistant");if(r.length===0){console.log("[CHAT-HISTORY] No new assistant messages to announce");return}let o=r[r.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 c=this.preferencesService.getVoiceReadFullText()?a:this.extractPartialText(a);this.voiceSynthesisService.speak(c).then(p=>{p||console.warn("[CHAT-HISTORY] Failed to announce message via speech")}).catch(p=>{console.error("[CHAT-HISTORY] Error during voice announcement:",p)})}}}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(`
|
|
371
|
+
|
|
372
|
+
`)}extractPartialText(t){return t.split(`
|
|
373
|
+
`).filter(s=>s.trim().length>0).reduce((s,a)=>{if(s.paragraphs>=3)return s;let l=a.length>80?1:0;return{paragraphs:s.paragraphs+l,text:s.text+(s.text?`
|
|
374
|
+
`:"")+a}},{paragraphs:0,text:""}).text||t}renderStreamingText(){return pe(this,null,function*(){if(!this.streamingText){this.renderedStreamingText="";return}try{let t=yield this.markdownService.parse(this.streamingText);this.renderedStreamingText=this.sanitizer.bypassSecurityTrustHtml(t)}catch(t){console.error("[CHAT-HISTORY] Error rendering streaming text markdown:",t),this.renderedStreamingText=this.sanitizer.bypassSecurityTrustHtml(this.streamingText)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-chat-history"]],hostBindings:function(e,i){e&1&&w("scroll",function(){return i.onScroll()})},inputs:{messages:"messages",streamingText:"streamingText",isThinking:"isThinking"},outputs:{copyRequested:"copyRequested",stopRequested:"stopRequested"},features:[We],decls:6,vars:3,consts:[[1,"chat-history"],[3,"message","canDelete"],[1,"streaming-message","message","assistant"],["mat-fab","","color","primary","title","Go to bottom",1,"go-to-bottom-btn"],[3,"copyRequested","deleteRequested","message","canDelete"],[1,"content","markdown-content",3,"innerHTML"],["mat-fab","","color","primary","title","Go to bottom",1,"go-to-bottom-btn",3,"click"],["fontSet","material-icons-outlined"]],template:function(e,i){e&1&&(u(0,"div",0),st(1,L4,1,2,"app-chat-message",1,F4),I(3,j4,2,1,"div",2),I(4,V4,1,0,"app-thinking-loader"),I(5,B4,3,0,"button",3),m()),e&2&&(f(),at(i.messages),f(2),k(i.streamingText?3:-1),f(),k(i.isThinking?4:-1),f(),k(i.showGoToBottom?5:-1))},dependencies:[Ov,$e,Pv,Vg],styles:[".streaming-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}.streaming-message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{color:var(--color-text);line-height:1.5}.go-to-bottom-btn[_ngcontent-%COMP%]{position:fixed!important;bottom:120px!important;right:2rem!important;z-index:1000!important}@media (max-width: 768px){.go-to-bottom-btn[_ngcontent-%COMP%]{right:1rem!important;bottom:100px!important}}@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 Nv=class n{http=d(dt);projectState=d(qe);threadState=d(Rn);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/threads/${this.threadState.getSelectedThreadIdOrThrow()}/files`}uploadFile(t){let e=this.projectState.getSelectedProjectIdOrThrow(),i=this.threadState.getSelectedThreadIdOrThrow();return new ge(r=>{let o=new FileReader;o.onload=()=>{let a=o.result.split(",")[1];this.http.post(`/api/projects/${e}/threads/${i}/upload`,{content:a,mimeType:t.type||"application/octet-stream",filename:t.name}).subscribe({next:l=>{r.next({success:l.success,filename:l.filename}),r.complete()},error:l=>r.error(l)})},o.onerror=()=>r.error(new Error("Failed to read file")),o.readAsDataURL(t)})}listFiles(){return this.http.get(this.getBaseUrl()).pipe(z(t=>t.files))}downloadFile(t){let e=encodeURIComponent(t);return this.http.get(`${this.getBaseUrl()}/${e}`,{responseType:"blob"})}deleteFile(t){let e=encodeURIComponent(t);return this.http.delete(`${this.getBaseUrl()}/${e}`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Gc=class n{fileApi=d(Nv);eventStream=d(to);filesSignal=Fe([]);isLoadingSignal=Fe(!1);currentProjectSignal=Fe(null);currentThreadSignal=Fe(null);files=Kt(()=>this.filesSignal());isLoading=Kt(()=>this.isLoadingSignal());fileCount=Kt(()=>this.filesSignal().length);constructor(){this.subscribeToFileEvents()}initializeForThread(t,e){this.currentProjectSignal.set(t),this.currentThreadSignal.set(e),this.refreshFileList()}clear(){this.filesSignal.set([]),this.currentProjectSignal.set(null),this.currentThreadSignal.set(null)}refreshFileList(){this.isLoadingSignal.set(!0),this.fileApi.listFiles().subscribe({next:t=>{let e=t.map(i=>de(M({},i),{lastModified:new Date(i.lastModified)})).sort((i,r)=>r.lastModified.getTime()-i.lastModified.getTime());this.filesSignal.set(e),this.isLoadingSignal.set(!1)},error:t=>{console.error("[FILE_EXCHANGE_STATE] Error loading files:",t),this.isLoadingSignal.set(!1)}})}uploadFile(t){return pe(this,null,function*(){return new Promise(e=>{this.fileApi.uploadFile(t).subscribe({next:()=>{this.refreshFileList(),e({success:!0})},error:i=>{console.error("[FILE_EXCHANGE_STATE] Upload error:",i),e({success:!1,error:i.message||"Upload failed"})}})})})}downloadAllFiles(){let t=this.filesSignal();if(t.length===0){console.warn("[FILE_EXCHANGE_STATE] No files to download");return}t.forEach((e,i)=>{setTimeout(()=>{this.downloadFile(e.filename)},i*300)})}downloadFile(t){this.fileApi.downloadFile(t).subscribe({next:e=>{let i=window.URL.createObjectURL(e),r=document.createElement("a");r.href=i,r.download=t,r.click(),window.URL.revokeObjectURL(i)},error:e=>{console.error("[FILE_EXCHANGE_STATE] Download error:",e)}})}deleteFile(t){return pe(this,null,function*(){return new Promise(e=>{this.fileApi.deleteFile(t).subscribe({next:()=>{this.refreshFileList(),e({success:!0})},error:i=>{console.error("[FILE_EXCHANGE_STATE] Delete error:",i),e({success:!1,error:i.message||"Delete failed"})}})})})}subscribeToFileEvents(){this.eventStream.events$.pipe(ue(t=>t instanceof Fs),Kg()).subscribe(t=>{this.handleFileEvent(t)})}handleFileEvent(t){let e=this.filesSignal();switch(t.operation){case"created":{let i=t.timestamp,r=t.timestamp.lastIndexOf("-");if(r>0){let s=t.timestamp.substring(r+1);s.length===5&&/^[a-z0-9]+$/.test(s)&&(i=t.timestamp.substring(0,r))}let o={filename:t.filename,size:t.size||0,lastModified:new Date(i)};this.filesSignal.set([o,...e]);break}case"updated":{let i=e.filter(l=>l.filename!==t.filename),r=e.find(l=>l.filename===t.filename),o=t.timestamp,s=t.timestamp.lastIndexOf("-");if(s>0){let l=t.timestamp.substring(s+1);l.length===5&&/^[a-z0-9]+$/.test(l)&&(o=t.timestamp.substring(0,s))}let a={filename:t.filename,size:t.size||r?.size||0,lastModified:new Date(o)};this.filesSignal.set([a,...i]);break}case"deleted":{let i=e.filter(r=>r.filename!==t.filename);this.filesSignal.set(i);break}}}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var z4=["determinateSpinner"];function H4(n,t){if(n&1&&(or(),u(0,"svg",11),H(1,"circle",12),m()),n&2){let e=b();ne("viewBox",e._viewBox()),f(),Fi("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),ne("r",e._circleRadius())}}var U4=new A("mat-progress-spinner-default-options",{providedIn:"root",factory:$4});function $4(){return{diameter:CP}}var CP=100,W4=10,Fv=(()=>{class n{_elementRef=d(Z);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=d(U4),i=Uw(),r=this._elementRef.nativeElement;this._noopAnimations=i==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=r.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&i==="reduced-motion"&&r.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}_diameter=CP;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-W4)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(i,r){if(i&1&&xe(z4,5),i&2){let o;re(o=oe())&&(r._determinateCircle=o.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(i,r){i&2&&(ne("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),si("mat-"+r.color),Fi("width",r.diameter,"px")("height",r.diameter,"px")("--mat-progress-spinner-size",r.diameter+"px")("--mat-progress-spinner-active-indicator-width",r.diameter+"px"),j("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",ai],diameter:[2,"diameter","diameter",ai],strokeWidth:[2,"strokeWidth","strokeWidth",ai]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(i,r){if(i&1&&(wt(0,H4,2,8,"ng-template",null,0,iu),u(2,"div",2,1),or(),u(4,"svg",3),H(5,"circle",4),m()(),Al(),u(6,"div",5)(7,"div",6)(8,"div",7),Gl(9,8),m(),u(10,"div",9),Gl(11,8),m(),u(12,"div",10),Gl(13,8),m()()()),i&2){let o=oi(1);f(4),ne("viewBox",r._viewBox()),f(),Fi("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),ne("r",r._circleRadius()),f(4),D("ngTemplateOutlet",o),f(2),D("ngTemplateOutlet",o),f(2),D("ngTemplateOutlet",o)}},dependencies:[fu],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}
|
|
375
|
+
`],encapsulation:2,changeDetection:0})}return n})();var Lv=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me]})}return n})();function G4(n,t){if(n&1&&H(0,"div",1),n&2){let e=b();D("innerHTML",e.renderedContent,ii)}}function q4(n,t){if(n&1&&H(0,"iframe",2),n&2){let e=b();D("srcdoc",e.content,ii)}}function Y4(n,t){if(n&1&&(u(0,"pre",3),g(1),m()),n&2){let e=b();f(),K(e.content)}}var jv=class n{content="";format="text";renderedContent="";sanitizer=d(bi);markdownService=d(Zr);ngOnChanges(t){(t.content||t.format)&&this.renderContent()}renderContent(){this.format==="markdown"?this.renderMarkdown():this.format==="json"&&this.formatJson()}renderMarkdown(){return pe(this,null,function*(){try{let t=yield this.markdownService.parse(this.content);this.renderedContent=this.sanitizer.bypassSecurityTrustHtml(t)}catch(t){console.error("[CONTENT_RENDERER] Error rendering markdown:",t),this.content=this.content}})}formatJson(){try{let t=JSON.parse(this.content);this.content=JSON.stringify(t,null,2)}catch(t){console.error("[CONTENT_RENDERER] Error formatting JSON:",t)}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-content-renderer"]],inputs:{content:"content",format:"format"},features:[We],decls:4,vars:2,consts:[[1,"content-renderer",3,"ngClass"],[1,"markdown-content",3,"innerHTML"],["sandbox","allow-same-origin",1,"html-viewer",3,"srcdoc"],[1,"code-content"]],template:function(e,i){e&1&&(u(0,"div",0),I(1,G4,1,1,"div",1)(2,q4,1,1,"iframe",2)(3,Y4,2,1,"pre",3),m()),e&2&&(D("ngClass","format-"+i.format),f(),k(i.format==="markdown"?1:i.format==="html"?2:3))},dependencies:[tt,va],styles:[".content-renderer[_ngcontent-%COMP%]{width:100%;height:100%;overflow:auto;padding:1rem}.markdown-content[_ngcontent-%COMP%]{line-height:1.6;color:var(--color-text)}.code-content[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:.9rem;line-height:1.5;margin:0;white-space:pre-wrap;word-wrap:break-word;color:var(--color-text)}.format-json[_ngcontent-%COMP%] .code-content[_ngcontent-%COMP%]{color:var(--color-code-text, #d63384)}.format-yaml[_ngcontent-%COMP%] .code-content[_ngcontent-%COMP%], .format-text[_ngcontent-%COMP%] .code-content[_ngcontent-%COMP%]{color:var(--color-text)}.html-viewer[_ngcontent-%COMP%]{width:100%;height:100%;min-height:400px;border:1px solid var(--color-border);border-radius:8px;background:#fff}"]})};var qc=class n{http=d(dt);MAX_FILE_SIZE=20*1024*1024;isViewable(t){return t<=this.MAX_FILE_SIZE}isFormatViewable(t){let e=t.split(".").pop()?.toLowerCase();return!(e&&["pdf","png","jpg","jpeg","gif","webp","zip","tar","gz","exe","bin","doc","docx","xls","xlsx","ppt","pptx"].includes(e))}detectFormat(t){switch(t.split(".").pop()?.toLowerCase()){case"md":return"markdown";case"json":return"json";case"yaml":case"yml":return"yaml";case"html":case"htm":return"html";default:return"text"}}loadFileContent(t,e,i){let r=`/api/projects/${t}/threads/${e}/files/${encodeURIComponent(i)}`,o=this.detectFormat(i);return this.http.get(r,{responseType:"text",observe:"response"}).pipe(z(s=>{let a=s.body||"",l=new Blob([a]).size;return{content:a,format:o,filename:i,size:l}}),nn(s=>(console.error("[CONTENT_VIEWER] Error loading file:",i,s),pi(()=>new Error(`Failed to load file: ${s.message||"Unknown error"}`)))))}formatSize(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function Q4(n,t){if(n&1){let e=V();u(0,"button",12),w("click",function(){E(e);let r=b();return S(r.download())}),u(1,"mat-icon"),g(2,"download"),m()()}}function K4(n,t){n&1&&(u(0,"div",9),H(1,"mat-spinner",13),u(2,"p"),g(3,"Loading file content..."),m()())}function Z4(n,t){if(n&1){let e=V();u(0,"div",10)(1,"mat-icon",14),g(2,"error_outline"),m(),u(3,"p",15),g(4),m(),u(5,"button",16),w("click",function(){E(e);let r=b();return S(r.download())}),u(6,"mat-icon"),g(7,"download"),m(),g(8," Download instead "),m()()}if(n&2){let e=b();f(4),K(e.error)}}function X4(n,t){if(n&1&&H(0,"app-content-renderer",11),n&2){let e=b();D("content",e.fileContent.content)("format",e.fileContent.format)}}var Vv=class n{destroy$=new P;file;projectName;threadId;closeViewer=new U;contentService=d(qc);eventStream=d(to);fileContent=null;isLoading=!1;error="";ngOnInit(){this.loadContent(),this.subscribeToFileEvents()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}loadContent(){if(!this.contentService.isViewable(this.file.size)){this.error=`File too large to view (${this.contentService.formatSize(this.file.size)}). Maximum size: 20 MB.`;return}this.isLoading=!0,this.error="",this.contentService.loadFileContent(this.projectName,this.threadId,this.file.filename).subscribe({next:t=>{console.log("[CONTENT_VIEWER] Content loaded:",t.filename),this.fileContent=t,this.isLoading=!1},error:t=>{console.error("[CONTENT_VIEWER] Error loading content:",t),this.error=t.message||"Failed to load file content",this.isLoading=!1}})}onClose(){this.closeViewer.emit()}download(){let t=new Blob([this.fileContent?.content||""],{type:"text/plain"}),e=window.URL.createObjectURL(t),i=document.createElement("a");i.href=e,i.download=this.file.filename,i.click(),window.URL.revokeObjectURL(e)}formatSize(t){return this.contentService.formatSize(t)}subscribeToFileEvents(){this.eventStream.events$.pipe(ue(t=>t instanceof Fs),ue(t=>t.filename===this.file.filename),ue(t=>t.operation==="updated"),$(this.destroy$)).subscribe(t=>{console.log("[CONTENT_VIEWER] File updated event received, reloading:",t.filename),t.size&&(this.file.size=t.size),this.loadContent()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-content-viewer"]],inputs:{file:"file",projectName:"projectName",threadId:"threadId"},outputs:{closeViewer:"closeViewer"},decls:16,vars:6,consts:[[1,"viewer-container"],[1,"viewer-header"],[1,"header-info"],[1,"filename"],[1,"file-size"],[1,"header-actions"],["mat-icon-button","","title","Download","type","button"],["mat-icon-button","","title","Close","type","button",3,"click"],[1,"viewer-content"],[1,"loading-state"],[1,"error-state"],[3,"content","format"],["mat-icon-button","","title","Download","type","button",3,"click"],["diameter","48"],[1,"error-icon"],[1,"error-message"],["mat-raised-button","","color","primary","type","button",3,"click"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),g(4),m(),u(5,"span",4),g(6),m()(),u(7,"div",5),I(8,Q4,3,0,"button",6),u(9,"button",7),w("click",function(){return i.onClose()}),u(10,"mat-icon"),g(11,"chevron_right"),m()()()(),u(12,"div",8),I(13,K4,4,0,"div",9),I(14,Z4,9,1,"div",10),I(15,X4,1,2,"app-content-renderer",11),m()()),e&2&&(f(4),K(i.file.filename),f(2),K(i.formatSize(i.file.size)),f(2),k(i.fileContent&&!i.isLoading&&!i.error?8:-1),f(5),k(i.isLoading?13:-1),f(),k(i.error?14:-1),f(),k(i.fileContent&&!i.isLoading&&!i.error?15:-1))},dependencies:[tt,Ot,$e,vn,Pn,Gt,Lv,Fv,jv],styles:[".viewer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:var(--color-bg)}.viewer-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--color-border);background:var(--color-bg);flex-shrink:0}.header-info[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.filename[_ngcontent-%COMP%]{font-weight:500;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-size[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary)}.header-actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-shrink:0}.viewer-content[_ngcontent-%COMP%]{flex:1;overflow:auto;background:var(--color-bg)}.loading-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:1rem;color:var(--color-text-secondary)}.error-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:1rem;padding:2rem;text-align:center}.error-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{color:var(--color-text);margin:0;max-width:400px}"]})};var J4=Math.pow(10,8)*24*60*60*1e3,Owe=-J4,Bv=6048e5,xP=864e5;var e8=3600;var EP=e8*24,Pwe=EP*7,t8=EP*365.2425,n8=t8/12,Rwe=n8*3,Ux=Symbol.for("constructDateFrom");function Xt(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&Ux in n?n[Ux](t):n instanceof Date?new n.constructor(t):new Date(t)}function Nt(n,t){return Xt(t||n,n)}function SP(n,t,e){let i=Nt(n,e?.in);return isNaN(t)?Xt(e?.in||n,NaN):(t&&i.setDate(i.getDate()+t),i)}var i8={};function js(){return i8}function Ho(n,t){let e=js(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,r=Nt(n,t?.in),o=r.getDay(),s=(o<i?7:0)+o-i;return r.setDate(r.getDate()-s),r.setHours(0,0,0,0),r}function Qa(n,t){return Ho(n,de(M({},t),{weekStartsOn:1}))}function zv(n,t){let e=Nt(n,t?.in),i=e.getFullYear(),r=Xt(e,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);let o=Qa(r),s=Xt(e,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);let a=Qa(s);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function $x(n){let t=Nt(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function Yc(n,...t){let e=Xt.bind(null,n||t.find(i=>typeof i=="object"));return t.map(e)}function Qc(n,t){let e=Nt(n,t?.in);return e.setHours(0,0,0,0),e}function Hv(n,t,e){let[i,r]=Yc(e?.in,n,t),o=Qc(i),s=Qc(r),a=+o-$x(o),l=+s-$x(s);return Math.round((a-l)/xP)}function MP(n,t){let e=zv(n,t),i=Xt(t?.in||n,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Qa(i)}function TP(n){return Xt(n,Date.now())}function DP(n,t,e){let[i,r]=Yc(e?.in,n,t);return+Qc(i)==+Qc(r)}function IP(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function kP(n){return!(!IP(n)&&typeof n!="number"||isNaN(+Nt(n)))}function OP(n,t,e){let[i,r]=Yc(e?.in,n,t),o=AP(i,r),s=Math.abs(Hv(i,r));i.setDate(i.getDate()-o*s);let a=+(AP(i,r)===-o),l=o*(s-a);return l===0?0:l}function AP(n,t){let e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function PP(n,t){let e=Nt(n,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}var r8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},RP=(n,t,e)=>{let i,r=r8[n];return typeof r=="string"?i=r:t===1?i=r.one:i=r.other.replace("{{count}}",t.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function Uv(n){return(t={})=>{let e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}var o8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},s8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},a8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NP={date:Uv({formats:o8,defaultWidth:"full"}),time:Uv({formats:s8,defaultWidth:"full"}),dateTime:Uv({formats:a8,defaultWidth:"full"})};var l8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FP=(n,t,e,i)=>l8[n];function Kc(n){return(t,e)=>{let i=e?.context?String(e.context):"standalone",r;if(i==="formatting"&&n.formattingValues){let s=n.defaultFormattingWidth||n.defaultWidth,a=e?.width?String(e.width):s;r=n.formattingValues[a]||n.formattingValues[s]}else{let s=n.defaultWidth,a=e?.width?String(e.width):n.defaultWidth;r=n.values[a]||n.values[s]}let o=n.argumentCallback?n.argumentCallback(t):t;return r[o]}}var c8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},d8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},u8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},m8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},p8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},f8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},h8=(n,t)=>{let e=Number(n),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},LP={ordinalNumber:h8,era:Kc({values:c8,defaultWidth:"wide"}),quarter:Kc({values:d8,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Kc({values:u8,defaultWidth:"wide"}),day:Kc({values:m8,defaultWidth:"wide"}),dayPeriod:Kc({values:p8,defaultWidth:"wide",formattingValues:f8,defaultFormattingWidth:"wide"})};function Zc(n){return(t,e={})=>{let i=e.width,r=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],o=t.match(r);if(!o)return null;let s=o[0],a=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(a)?v8(a,h=>h.test(s)):g8(a,h=>h.test(s)),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;let p=t.slice(s.length);return{value:c,rest:p}}}function g8(n,t){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function v8(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function jP(n){return(t,e={})=>{let i=t.match(n.matchPattern);if(!i)return null;let r=i[0],o=t.match(n.parsePattern);if(!o)return null;let s=n.valueCallback?n.valueCallback(o[0]):o[0];s=e.valueCallback?e.valueCallback(s):s;let a=t.slice(r.length);return{value:s,rest:a}}}var _8=/^(\d+)(th|st|nd|rd)?/i,b8=/\d+/i,y8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},C8={any:[/^b/i,/^(a|c)/i]},w8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},x8={any:[/1/i,/2/i,/3/i,/4/i]},E8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},S8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},M8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},T8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},D8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},I8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},VP={ordinalNumber:jP({matchPattern:_8,parsePattern:b8,valueCallback:n=>parseInt(n,10)}),era:Zc({matchPatterns:y8,defaultMatchWidth:"wide",parsePatterns:C8,defaultParseWidth:"any"}),quarter:Zc({matchPatterns:w8,defaultMatchWidth:"wide",parsePatterns:x8,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Zc({matchPatterns:E8,defaultMatchWidth:"wide",parsePatterns:S8,defaultParseWidth:"any"}),day:Zc({matchPatterns:M8,defaultMatchWidth:"wide",parsePatterns:T8,defaultParseWidth:"any"}),dayPeriod:Zc({matchPatterns:D8,defaultMatchWidth:"any",parsePatterns:I8,defaultParseWidth:"any"})};var Wx={code:"en-US",formatDistance:RP,formatLong:NP,formatRelative:FP,localize:LP,match:VP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function BP(n,t){let e=Nt(n,t?.in);return Hv(e,PP(e))+1}function zP(n,t){let e=Nt(n,t?.in),i=+Qa(e)-+MP(e);return Math.round(i/Bv)+1}function $v(n,t){let e=Nt(n,t?.in),i=e.getFullYear(),r=js(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=Xt(t?.in||n,0);s.setFullYear(i+1,0,o),s.setHours(0,0,0,0);let a=Ho(s,t),l=Xt(t?.in||n,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);let c=Ho(l,t);return+e>=+a?i+1:+e>=+c?i:i-1}function HP(n,t){let e=js(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,r=$v(n,t),o=Xt(t?.in||n,0);return o.setFullYear(r,0,i),o.setHours(0,0,0,0),Ho(o,t)}function UP(n,t){let e=Nt(n,t?.in),i=+Ho(e,t)-+HP(e,t);return Math.round(i/Bv)+1}function Xe(n,t){let e=n<0?"-":"",i=Math.abs(n).toString().padStart(t,"0");return e+i}var Uo={y(n,t){let e=n.getFullYear(),i=e>0?e:1-e;return Xe(t==="yy"?i%100:i,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):Xe(e+1,2)},d(n,t){return Xe(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return Xe(n.getHours()%12||12,t.length)},H(n,t){return Xe(n.getHours(),t.length)},m(n,t){return Xe(n.getMinutes(),t.length)},s(n,t){return Xe(n.getSeconds(),t.length)},S(n,t){let e=t.length,i=n.getMilliseconds(),r=Math.trunc(i*Math.pow(10,e-3));return Xe(r,t.length)}};var Xc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gx={G:function(n,t,e){let i=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let i=n.getFullYear(),r=i>0?i:1-i;return e.ordinalNumber(r,{unit:"year"})}return Uo.y(n,t)},Y:function(n,t,e,i){let r=$v(n,i),o=r>0?r:1-r;if(t==="YY"){let s=o%100;return Xe(s,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):Xe(o,t.length)},R:function(n,t){let e=zv(n);return Xe(e,t.length)},u:function(n,t){let e=n.getFullYear();return Xe(e,t.length)},Q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return Xe(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return Xe(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(n,t,e){let i=n.getMonth();switch(t){case"M":case"MM":return Uo.M(n,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(n,t,e){let i=n.getMonth();switch(t){case"L":return String(i+1);case"LL":return Xe(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(n,t,e,i){let r=UP(n,i);return t==="wo"?e.ordinalNumber(r,{unit:"week"}):Xe(r,t.length)},I:function(n,t,e){let i=zP(n);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):Xe(i,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Uo.d(n,t)},D:function(n,t,e){let i=BP(n);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):Xe(i,t.length)},E:function(n,t,e){let i=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(n,t,e,i){let r=n.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Xe(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})}},c:function(n,t,e,i){let r=n.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Xe(o,t.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})}},i:function(n,t,e){let i=n.getDay(),r=i===0?7:i;switch(t){case"i":return String(r);case"ii":return Xe(r,t.length);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(n,t,e){let r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){let i=n.getHours(),r;switch(i===12?r=Xc.noon:i===0?r=Xc.midnight:r=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(n,t,e){let i=n.getHours(),r;switch(i>=17?r=Xc.evening:i>=12?r=Xc.afternoon:i>=4?r=Xc.morning:r=Xc.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let i=n.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return Uo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Uo.H(n,t)},K:function(n,t,e){let i=n.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},k:function(n,t,e){let i=n.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Uo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Uo.s(n,t)},S:function(n,t){return Uo.S(n,t)},X:function(n,t,e){let i=n.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return WP(i);case"XXXX":case"XX":return Ka(i);case"XXXXX":case"XXX":default:return Ka(i,":")}},x:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"x":return WP(i);case"xxxx":case"xx":return Ka(i);case"xxxxx":case"xxx":default:return Ka(i,":")}},O:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$P(i,":");case"OOOO":default:return"GMT"+Ka(i,":")}},z:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$P(i,":");case"zzzz":default:return"GMT"+Ka(i,":")}},t:function(n,t,e){let i=Math.trunc(+n/1e3);return Xe(i,t.length)},T:function(n,t,e){return Xe(+n,t.length)}};function $P(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),r=Math.trunc(i/60),o=i%60;return o===0?e+String(r):e+String(r)+t+Xe(o,2)}function WP(n,t){return n%60===0?(n>0?"-":"+")+Xe(Math.abs(n)/60,2):Ka(n,t)}function Ka(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),r=Xe(Math.trunc(i/60),2),o=Xe(i%60,2);return e+r+t+o}var GP=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},qP=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},k8=(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],i=e[1],r=e[2];if(!r)return GP(n,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",GP(i,t)).replace("{{time}}",qP(r,t))},YP={p:qP,P:k8};var A8=/^D+$/,O8=/^Y+$/,P8=["D","DD","YY","YYYY"];function QP(n){return A8.test(n)}function KP(n){return O8.test(n)}function ZP(n,t,e){let i=R8(n,t,e);if(console.warn(i),P8.includes(n))throw new RangeError(i)}function R8(n,t,e){let i=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var N8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L8=/^'([^]*?)'?$/,j8=/''/g,V8=/[a-zA-Z]/;function qx(n,t,e){let i=js(),r=e?.locale??i.locale??Wx,o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Nt(n,e?.in);if(!kP(a))throw new RangeError("Invalid time value");let l=t.match(F8).map(p=>{let h=p[0];if(h==="p"||h==="P"){let _=YP[h];return _(p,r.formatLong)}return p}).join("").match(N8).map(p=>{if(p==="''")return{isToken:!1,value:"'"};let h=p[0];if(h==="'")return{isToken:!1,value:B8(p)};if(Gx[h])return{isToken:!0,value:p};if(h.match(V8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:p}});r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));let c={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return l.map(p=>{if(!p.isToken)return p.value;let h=p.value;(!e?.useAdditionalWeekYearTokens&&KP(h)||!e?.useAdditionalDayOfYearTokens&&QP(h))&&ZP(h,t,String(n));let _=Gx[h[0]];return _(a,h,r.localize,c)}).join("")}function B8(n){let t=n.match(L8);return t?t[1].replace(j8,"'"):n}function XP(n,t,e){return SP(n,-t,e)}function JP(n,t){return DP(Xt(t?.in||n,n),XP(TP(t?.in||n),1))}function eR(n){if(!n||isNaN(n.getTime()))return"unknown";let t=new Date,e=qx(n,"HH:mm:ss"),i=t.getTime()-n.getTime(),r=Math.floor(i/(1e3*60));if(r<1)return`just now (${e})`;if(r<60)return`${r} min ago (${e})`;let o=Math.floor(i/(1e3*60*60));if(o<24)return`${o}h ago (${e})`;if(JP(n))return`yesterday ${e}`;let s=OP(t,n);return s<7?`${s}d ago ${e}`:`${qx(n,"dd/MM/yyyy")} ${e}`}var z8=(n,t)=>t.filename;function H8(n,t){if(n&1){let e=V();u(0,"button",11),w("click",function(){E(e);let r=b(2);return S(r.downloadAll())}),u(1,"mat-icon"),g(2,"download_for_offline"),m()()}}function U8(n,t){n&1&&(u(0,"div",10),H(1,"span",12),u(2,"span",13),g(3,"Loading files..."),m()())}function $8(n,t){n&1&&(u(0,"div",14)(1,"mat-icon",15),g(2,"folder_open"),m(),u(3,"p",16),g(4,"No files in exchange space"),m(),u(5,"p",17),g(6,"Upload files to share with the agent"),m()())}function W8(n,t){if(n&1){let e=V();u(0,"button",28),w("click",function(){E(e);let r=b().$implicit,o=b(4);return S(o.viewFile(r))}),u(1,"mat-icon"),g(2,"visibility"),m()()}}function G8(n,t){if(n&1){let e=V();u(0,"div",18)(1,"div",19)(2,"mat-icon",20),g(3),m(),u(4,"div",21)(5,"span",22),g(6),m(),u(7,"span",23),g(8),m()()(),u(9,"div",24),I(10,W8,3,0,"button",25),u(11,"button",26),w("click",function(){let r=E(e).$implicit,o=b(4);return S(o.download(r))}),u(12,"mat-icon"),g(13,"download"),m()(),u(14,"button",27),w("click",function(){let r=E(e).$implicit,o=b(4);return S(o.delete(r))}),u(15,"mat-icon"),g(16,"delete"),m()()()()}if(n&2){let e=t.$implicit,i=b(4);f(3),K(i.getFileIcon(e.filename)),f(2),D("title",e.filename),f(),K(e.filename),f(2),Vr("",i.formatSize(e.size)," \u2022 ",i.formatDate(e.lastModified)),f(2),k(i.canViewFile(e)?10:-1)}}function q8(n,t){if(n&1&&st(0,G8,17,6,"div",18,z8),n&2){let e=b(3);at(e.files())}}function Y8(n,t){if(n&1&&I(0,$8,7,0,"div",14)(1,q8,2,0),n&2){let e=b(2);k(e.files().length===0?0:1)}}function Q8(n,t){if(n&1){let e=V();u(0,"div",0)(1,"div",2)(2,"div",3)(3,"h3",4),g(4,"Exchange"),m(),u(5,"span",5),g(6),m()(),u(7,"div",6),I(8,H8,3,0,"button",7),u(9,"button",8),w("click",function(){E(e);let r=b();return S(r.close())}),u(10,"mat-icon"),g(11,"chevron_right"),m()()()(),u(12,"div",9),I(13,U8,4,0,"div",10)(14,Y8,2,1),m()()}if(n&2){let e=b();f(6),Se("(",e.files().length,")"),f(2),k(e.files().length>0?8:-1),f(5),k(e.isLoading()?13:14)}}function K8(n,t){if(n&1){let e=V();u(0,"app-content-viewer",29),w("closeViewer",function(){E(e);let r=b();return S(r.backToList())}),m()}if(n&2){let e=b();D("file",e.currentFile)("projectName",e.projectName)("threadId",e.threadId)}}var Wv=class n{projectName;threadId;closeDrawer=new U;fileExchangeState=d(Gc);contentViewerService=d(qc);files=this.fileExchangeState.files;isLoading=this.fileExchangeState.isLoading;viewerState="list";currentFile=null;close(){this.viewerState==="content"?this.backToList():this.closeDrawer.emit()}viewFile(t){this.currentFile=t,this.viewerState="content"}backToList(){this.viewerState="list",this.currentFile=null}downloadAll(){this.fileExchangeState.downloadAllFiles()}download(t){this.fileExchangeState.downloadFile(t.filename)}delete(t){return pe(this,null,function*(){if(!confirm(`Delete file "${t.filename}"?`))return;let i=yield this.fileExchangeState.deleteFile(t.filename);i.success||alert(`Failed to delete file: ${i.error}`)})}getFileIcon(t){switch(t.split(".").pop()?.toLowerCase()){case"pdf":return"picture_as_pdf";case"csv":case"xlsx":case"xls":return"table_chart";case"txt":case"md":return"description";case"jpg":case"jpeg":case"png":case"gif":case"webp":return"image";case"zip":case"tar":case"gz":return"folder_zip";default:return"insert_drive_file"}}formatSize(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}formatDate(t){return eR(t)}canViewFile(t){return this.contentViewerService.isFormatViewable(t.filename)&&this.contentViewerService.isViewable(t.size)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-file-exchange-drawer"]],inputs:{projectName:"projectName",threadId:"threadId"},outputs:{closeDrawer:"closeDrawer"},decls:2,vars:2,consts:[[1,"file-drawer-container"],[3,"file","projectName","threadId"],[1,"drawer-header"],[1,"header-left"],[1,"drawer-title"],[1,"file-count"],[1,"header-actions"],["mat-icon-button","","title","Download all files","type","button",1,"download-all-btn"],["mat-icon-button","","title","Close","type","button",1,"close-btn",3,"click"],[1,"file-list"],[1,"file-loading"],["mat-icon-button","","title","Download all files","type","button",1,"download-all-btn",3,"click"],[1,"loading-spinner"],[1,"loading-text"],[1,"file-empty"],[1,"empty-icon"],[1,"empty-text"],[1,"empty-hint"],[1,"file-item"],[1,"file-info"],[1,"file-icon"],[1,"file-details"],[1,"file-name",3,"title"],[1,"file-meta"],[1,"file-actions"],["mat-icon-button","","title","View","type","button",1,"action-btn","view-btn"],["mat-icon-button","","title","Download","type","button",1,"action-btn","download-btn",3,"click"],["mat-icon-button","","title","Delete","type","button",1,"action-btn","delete-btn",3,"click"],["mat-icon-button","","title","View","type","button",1,"action-btn","view-btn",3,"click"],[3,"closeViewer","file","projectName","threadId"]],template:function(e,i){e&1&&(I(0,Q8,15,3,"div",0),I(1,K8,1,3,"app-content-viewer",1)),e&2&&(k(i.viewerState==="list"?0:-1),f(),k(i.viewerState==="content"&&i.currentFile?1:-1))},dependencies:[tt,Ot,$e,vn,Gt,Vv],styles:[".file-drawer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);color:var(--color-text)}.drawer-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--color-border);flex-shrink:0}.header-left[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.5rem}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.drawer-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:var(--color-text)}.file-count[_ngcontent-%COMP%]{font-size:.9rem;color:var(--color-text-secondary)}.download-all-btn[_ngcontent-%COMP%]{color:var(--color-primary)}.download-all-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.close-btn[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.close-btn[_ngcontent-%COMP%]:hover{color:var(--color-text);background:var(--color-bg-hover)}.file-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:.5rem}.file-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;gap:1rem;color:var(--color-text-secondary)}.loading-spinner[_ngcontent-%COMP%]{display:inline-block;width:32px;height:32px;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)}}.loading-text[_ngcontent-%COMP%]{font-size:.9rem}.file-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center;color:var(--color-text-secondary)}.empty-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px;margin-bottom:1rem;opacity:.5}.empty-text[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:500}.empty-hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;opacity:.7}.file-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.75rem;border-radius:8px;transition:background .2s;gap:1rem}.file-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.file-item[_ngcontent-%COMP%]:hover .file-actions[_ngcontent-%COMP%]{opacity:1}.file-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex:1;min-width:0}.file-icon[_ngcontent-%COMP%]{flex-shrink:0;color:var(--color-primary);font-size:28px;width:28px;height:28px}.file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0}.file-name[_ngcontent-%COMP%]{font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-meta[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.file-actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-shrink:0;opacity:0;transition:opacity .2s}.action-btn[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.action-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.action-btn.view-btn[_ngcontent-%COMP%]:hover, .action-btn.download-btn[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.action-btn.delete-btn[_ngcontent-%COMP%]:hover{color:var(--color-error)}@media (max-width: 768px){.file-actions[_ngcontent-%COMP%]{opacity:1}.file-item[_ngcontent-%COMP%]{padding:1rem .75rem}.drawer-header[_ngcontent-%COMP%]{padding:.75rem}}"]})};var qv=["*"],Z8=["content"],X8=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],J8=["mat-drawer","mat-drawer-content","*"];function eW(n,t){if(n&1){let e=V();u(0,"div",1),w("click",function(){E(e);let r=b();return S(r._onBackdropClicked())}),m()}if(n&2){let e=b();j("mat-drawer-shown",e._isShowingBackdrop())}}function tW(n,t){n&1&&(u(0,"mat-drawer-content"),we(1,2),m())}var nW=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],iW=["mat-sidenav","mat-sidenav-content","*"];function rW(n,t){if(n&1){let e=V();u(0,"div",1),w("click",function(){E(e);let r=b();return S(r._onBackdropClicked())}),m()}if(n&2){let e=b();j("mat-drawer-shown",e._isShowingBackdrop())}}function oW(n,t){n&1&&(u(0,"mat-sidenav-content"),we(1,2),m())}var sW=`.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}
|
|
376
|
+
`;var aW=new A("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:lW}),Yx=new A("MAT_DRAWER_CONTAINER");function lW(){return!1}var Jc=(()=>{class n extends As{_platform=d(He);_changeDetectorRef=d(Qe);_container=d(jm);constructor(){let e=d(Z),i=d(Ec),r=d(Y);super(e,i,r)}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;let{start:e,end:i}=this._container;return e!=null&&e.mode!=="over"&&e.opened||i!=null&&i.mode!=="over"&&i.opened}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(i,r){i&2&&(Fi("margin-left",r._container._contentMargins.left,"px")("margin-right",r._container._contentMargins.right,"px"),j("mat-drawer-content-hidden",r._shouldBeHidden()))},features:[je([{provide:As,useExisting:n}]),Le],ngContentSelectors:qv,decls:1,vars:0,template:function(i,r){i&1&&(Ge(),we(0))},encapsulation:2,changeDetection:0})}return n})(),Lm=(()=>{class n{_elementRef=d(Z);_focusTrapFactory=d(tm);_focusMonitor=d(fr);_platform=d(He);_ngZone=d(Y);_renderer=d(et);_interactivityChecker=d(Ss);_doc=d(le);_container=d(Yx,{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=Ei(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=Ei(e)),this._autoFocus=e}_autoFocus;get opened(){return this._opened()}set opened(e){this.toggle(Ei(e))}_opened=Fe(!1);_openedVia;_animationStarted=new P;_animationEnd=new P;openedChange=new U(!0);_openedStream=this.openedChange.pipe(ue(e=>e),z(()=>{}));openedStart=this._animationStarted.pipe(ue(()=>this.opened),Lp(void 0));_closedStream=this.openedChange.pipe(ue(e=>!e),z(()=>{}));closedStart=this._animationStarted.pipe(ue(()=>!this.opened),Lp(void 0));_destroyed=new P;onPositionChanged=new U;_content;_modeChanged=new P;_injector=d(me);_changeDetectorRef=d(Qe);constructor(){this.openedChange.pipe($(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;yd(e,"keydown").pipe(ue(i=>i.keyCode===27&&!this.disableClose&&!gn(i)),$(this._destroyed)).subscribe(i=>this._ngZone.run(()=>{this.close(),i.stopPropagation(),i.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,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{o(),s(),e.removeAttribute("tabindex")},o=this._renderer.listen(e,"blur",r),s=this._renderer.listen(e,"mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":ln(()=>{!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,i){e&&i&&(this._openedVia=i);let r=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),r}_setOpen(e,i,r){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&&i&&this._restoreFocus(r),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(o=>{this.openedChange.pipe(Ye(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 i=this._elementRef.nativeElement,r=i.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,i)),r.appendChild(i)):this._anchor&&this._anchor.parentNode.insertBefore(i,this._anchor)}_handleTransitionEvent=e=>{let i=this._elementRef.nativeElement;e.target===i&&this._ngZone.run(()=>{e.type==="transitionrun"?this._animationStarted.next(e):(e.type==="transitionend"&&this._setIsAnimating(!1),this._animationEnd.next(e))})};static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-drawer"]],viewQuery:function(i,r){if(i&1&&xe(Z8,5),i&2){let o;re(o=oe())&&(r._content=o.first)}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(i,r){i&2&&(ne("align",null)("tabIndex",r.mode!=="side"?"-1":null),Fi("visibility",!r._container&&!r.opened?"hidden":null),j("mat-drawer-end",r.position==="end")("mat-drawer-over",r.mode==="over")("mat-drawer-push",r.mode==="push")("mat-drawer-side",r.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:qv,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(i,r){i&1&&(Ge(),u(0,"div",1,0),we(2),m())},dependencies:[As],encapsulation:2,changeDetection:0})}return n})(),jm=(()=>{class n{_dir=d(En,{optional:!0});_element=d(Z);_ngZone=d(Y);_changeDetectorRef=d(Qe);_animationDisabled=mt();_transitionsEnabled=!1;_allDrawers;_drawers=new po;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=Ei(e)}_autosize=d(aW);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:Ei(e)}_backdropOverride;backdropClick=new U;_start;_end;_left;_right;_destroyed=new P;_doCheckSubject=new P;_contentMargins={left:null,right:null};_contentMarginChanges=new P;get scrollable(){return this._userContent||this._content}_injector=d(me);constructor(){let e=d(He),i=d(Ao);this._dir?.change.pipe($(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),i.change().pipe($(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(Ht(this._allDrawers),$(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(i=>!i._container||i._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Ht(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(Zs(10),$(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,i=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let r=this._left._getWidth();e+=r,i-=r}}if(this._right&&this._right.opened){if(this._right.mode=="side")i+=this._right._getWidth();else if(this._right.mode=="push"){let r=this._right._getWidth();i+=r,e-=r}}e=e||null,i=i||null,(e!==this._contentMargins.left||i!==this._contentMargins.right)&&(this._contentMargins={left:e,right:i},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe($(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe($(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e.onPositionChanged.pipe($(this._drawers.changes)).subscribe(()=>{ln({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(e){e._modeChanged.pipe($(Xi(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let i=this._element.nativeElement.classList,r="mat-drawer-container-has-open";e?i.add(r):i.remove(r)}_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(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(i,r,o){if(i&1&&(cn(o,Jc,5),cn(o,Lm,5)),i&2){let s;re(s=oe())&&(r._content=s.first),re(s=oe())&&(r._allDrawers=s)}},viewQuery:function(i,r){if(i&1&&xe(Jc,5),i&2){let o;re(o=oe())&&(r._userContent=o.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(i,r){i&2&&j("mat-drawer-container-explicit-backdrop",r._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[je([{provide:Yx,useExisting:n}])],ngContentSelectors:J8,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(i,r){i&1&&(Ge(X8),I(0,eW,1,2,"div",0),we(1),we(2,1),I(3,tW,2,0,"mat-drawer-content")),i&2&&(k(r.hasBackdrop?0:-1),f(3),k(r._content?-1:3))},dependencies:[Jc],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}
|
|
377
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Gv=(()=>{class n extends Jc{static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],features:[je([{provide:As,useExisting:n}]),Le],ngContentSelectors:qv,decls:1,vars:0,template:function(i,r){i&1&&(Ge(),we(0))},encapsulation:2,changeDetection:0})}return n})(),Qx=(()=>{class n extends Lm{get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(e){this._fixedInViewport=Ei(e)}_fixedInViewport=!1;get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(e){this._fixedTopGap=To(e)}_fixedTopGap=0;get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(e){this._fixedBottomGap=To(e)}_fixedBottomGap=0;static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-sidenav"]],hostAttrs:[1,"mat-drawer","mat-sidenav"],hostVars:16,hostBindings:function(i,r){i&2&&(ne("tabIndex",r.mode!=="side"?"-1":null)("align",null),Fi("top",r.fixedInViewport?r.fixedTopGap:null,"px")("bottom",r.fixedInViewport?r.fixedBottomGap:null,"px"),j("mat-drawer-end",r.position==="end")("mat-drawer-over",r.mode==="over")("mat-drawer-push",r.mode==="push")("mat-drawer-side",r.mode==="side")("mat-sidenav-fixed",r.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[je([{provide:Lm,useExisting:n}]),Le],ngContentSelectors:qv,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(i,r){i&1&&(Ge(),u(0,"div",1,0),we(2),m())},dependencies:[As],encapsulation:2,changeDetection:0})}return n})(),tR=(()=>{class n extends jm{_allDrawers=void 0;_content=void 0;static \u0275fac=(()=>{let e;return function(r){return(e||(e=ht(n)))(r||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-sidenav-container"]],contentQueries:function(i,r,o){if(i&1&&(cn(o,Gv,5),cn(o,Qx,5)),i&2){let s;re(s=oe())&&(r._content=s.first),re(s=oe())&&(r._allDrawers=s)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(i,r){i&2&&j("mat-drawer-container-explicit-backdrop",r._backdropOverride)},exportAs:["matSidenavContainer"],features:[je([{provide:Yx,useExisting:n},{provide:jm,useExisting:n}]),Le],ngContentSelectors:iW,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(i,r){i&1&&(Ge(nW),I(0,rW,1,2,"div",0),we(1),we(2,1),I(3,oW,2,0,"mat-sidenav-content")),i&2&&(k(r.hasBackdrop?0:-1),f(3),k(r._content?-1:3))},dependencies:[Gv],styles:[sW],encapsulation:2,changeDetection:0})}return n})(),Yv=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Ra,Ra,Me]})}return n})();var iR="mat-badge-content",cW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,r){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
|
|
378
|
+
`],encapsulation:2,changeDetection:0})}return n})(),rR=(()=>{class n{_ngZone=d(Y);_elementRef=d(Z);_ariaDescriber=d(v1);_renderer=d(et);_animationsDisabled=mt();_idGenerator=d(ut);get color(){return this._color}set color(e){this._setColor(e),this._color=e}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(e){this._updateRenderedContent(e)}_content;get description(){return this._description}set description(e){this._updateDescription(e)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=d(Ss);_document=d(le);constructor(){let e=d(At);e.load(cW),e.load(xs)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let e=this._renderer.createElement("span"),i="mat-badge-active";return e.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),e.setAttribute("aria-hidden","true"),e.classList.add(iR),this._animationsDisabled&&e.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(e),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{e.classList.add(i)})}):e.classList.add(i),e}_updateRenderedContent(e){let i=`${e??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!e||this._isHostInteractive())&&this._removeInlineDescription(),this._description=e,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,e):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(e){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),e&&i.add(`mat-badge-${e}`)}_clearExistingBadges(){let e=this._elementRef.nativeElement.querySelectorAll(`:scope > .${iR}`);for(let i of Array.from(e))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,r){i&2&&j("mat-badge-overlap",r.overlap)("mat-badge-above",r.isAbove())("mat-badge-below",!r.isAbove())("mat-badge-before",!r.isAfter())("mat-badge-after",r.isAfter())("mat-badge-small",r.size==="small")("mat-badge-medium",r.size==="medium")("mat-badge-large",r.size==="large")("mat-badge-hidden",r.hidden||!r.content)("mat-badge-disabled",r.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",ie],disabled:[2,"matBadgeDisabled","disabled",ie],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",ie]}})}return n})(),oR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[im,Me,Me]})}return n})();var ed=class n{ATTENTION_EMOJI="\u{1F534}";isSystemActive=!1;systemActiveTimer=null;SYSTEM_ACTIVE_TIMEOUT=4e3;unreadService=d($c);project=d(qe);constructor(){this.initializeTitleUpdates()}initializeTitleUpdates(){In([this.project.selectedProject$,this.unreadService.unreadCount$]).subscribe(([t,e])=>{this.updateTitle(t?.name??"...",e)})}updateTitle(t,e){let i;this.isSystemActive?i=`\u23F3${e>0?` (${e}) `:" "}${t}`:e>0?i=`${this.ATTENTION_EMOJI} (${e}) ${t}`:i=t,document.title=i,console.log("[TAB-TITLE] Updated to:",i)}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.project.getSelectedProjectId()??"...",e=this.unreadService.getCurrentCount();this.updateTitle(t,e)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var Qv=class n{http=d(dt);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 pe(this,null,function*(){return new Promise((e,i)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(!o){i(new Error("Failed to read file"));return}let s=o.split(",")[1];if(!s){i(new Error("Invalid file format"));return}e(s)},r.onerror=i,r.readAsDataURL(t)})})}getUploadUrl(t,e){return`/api/projects/${t}/threads/${e}/upload`}uploadImage(t,e,i){console.log("[IMAGE-UPLOAD] uploadImage - file:",t.name,t.type,t.size),console.log("[IMAGE-UPLOAD] uploadImage - project:",e,"thread:",i);try{console.log("[IMAGE-UPLOAD] Validating file..."),this.validateFile(t)}catch(r){return console.log("[IMAGE-UPLOAD] Validation failed:",r),W({success:!1,error:r instanceof Error?r.message:"Validation failed"})}return new ge(r=>{console.log("[IMAGE-UPLOAD] Converting to base64..."),this.fileToBase64(t).then(o=>{console.log("[IMAGE-UPLOAD] Base64 length:",o.length),console.log("[IMAGE-UPLOAD] Sending upload request..."),this.http.post(this.getUploadUrl(e,i),{content:o,mimeType:t.type,filename:t.name}).pipe(z(s=>(console.log("[IMAGE-UPLOAD] Upload success result:",s),{success:!0,processedSize:s.processedSize,dimensions:s.dimensions})),nn(s=>{console.log("[IMAGE-UPLOAD] Upload failed:",s);let a=s.error?.error||s.message||"Upload failed";return W({success:!1,error:a})})).subscribe({next:s=>{r.next(s),r.complete()},error:s=>r.error(s)})}).catch(o=>{console.log("[IMAGE-UPLOAD] Base64 conversion failed:",o),r.next({success:!1,error:o instanceof Error?o.message:"Failed to read file"}),r.complete()})})}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(r=>({name:r.name,type:r.type})));let i=e.some(r=>this.supportedTypes.includes(r.type));return console.log("[IMAGE-UPLOAD] hasImageFiles - result:",i),i}filterImageFiles(t){return Array.from(t).filter(i=>this.supportedTypes.includes(i.type))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var td=class n{pendingFirstMessage=null;setPendingFirstMessage(t){console.log("[FIRST-MESSAGE-STATE] Storing pending first message:",t.substring(0,50)+"..."),this.pendingFirstMessage=t}consumePendingFirstMessage(){let t=this.pendingFirstMessage;return t?(console.log("[FIRST-MESSAGE-STATE] Consuming pending first message:",t.substring(0,50)+"..."),this.pendingFirstMessage=null):console.log("[FIRST-MESSAGE-STATE] No pending first message to consume"),t}hasPendingFirstMessage(){return this.pendingFirstMessage!==null}clear(){this.pendingFirstMessage&&(console.log("[FIRST-MESSAGE-STATE] Clearing pending first message"),this.pendingFirstMessage=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var uW=["inputSection"];function mW(n,t){if(n&1){let e=V();u(0,"button",18),w("click",function(){E(e);let r=b();return S(r.toggleFileDrawer())}),u(1,"mat-icon"),g(2,"folder_open"),m()()}if(n&2){let e=b();j("has-files",e.fileCount>0),D("title",bo("Files Exchange",e.fileCount>0?" ("+e.fileCount+" file"+(e.fileCount>1?"s":"")+")":""))("matBadge",e.fileCount>0?e.fileCount:null)}}function pW(n,t){if(n&1&&(u(0,"div",5),g(1),m()),n&2){let e=b();f(),Vr(" \u26A0\uFE0F Connection lost. Reconnecting... (",e.connectionStatus.reconnectAttempts,"/",e.connectionStatus.maxAttempts,") ")}}function fW(n,t){if(n&1&&(u(0,"div",19),g(1),m()),n&2){let e=b();j("error",e.uploadStatus.isError),f(),Se(" ",e.uploadStatus.message," ")}}function hW(n,t){if(n&1){let e=V();u(0,"app-chat-textarea",20),w("messageSubmitted",function(r){E(e);let o=b();return S(o.onMessageSubmitted(r))})("voiceRecordingToggled",function(r){E(e);let o=b();return S(o.onVoiceToggled(r))})("heightChanged",function(r){E(e);let o=b();return S(o.onInputHeightChanged(r))})("stopRequested",function(){E(e);let r=b();return S(r.onStopRequested())})("filesPasted",function(r){E(e);let o=b();return S(o.onFilesPasted(r))}),m()}if(n&2){let e=b();D("isDisabled",!e.isConnected)("isSessionInitializing",!1)("showWelcome",!1)("isThinking",e.isThinking)("isStarting",!1)}}function gW(n,t){if(n&1){let e=V();u(0,"app-choice-select",21),w("choiceSelected",function(r){E(e);let o=b();return S(o.onChoiceSelected(r))}),m()}if(n&2){let e=b();D("options",e.currentChoice.options)("labelHtml",e.currentChoice.label)("isVisible",!!e.currentChoice)}}function vW(n,t){n&1&&(u(0,"div",17)(1,"div",22)(2,"div",23),g(3,"\u{1F4CE}"),m(),u(4,"div",24),g(5,"Drop files here to upload"),m(),u(6,"div",25),g(7,"Images will be added to conversation, other files to exchange space"),m()()())}var Kv=class n{projectName;threadId;destroy$=new P;inputSection;messages=[];streamingText="";isThinking=!1;currentChoice=null;connectionStatus=null;isConnected=!1;showConnectionStatus=!1;hasEverConnected=!1;inputSectionHeight=80;uploadStatus={message:"",isError:!1};isDragOver=!1;isFileDrawerOpen=!1;get fileCount(){return this.fileExchangeState.fileCount()}pendingFirstMessage=null;subscriptions=[];codayService=d(Wi);preferencesService=d(Bt);titleService=d(ed);elementRef=d(Z);threadState=d(Rn);imageUploadService=d(Qv);fileExchangeState=d(Gc);firstMessageState=d(td);ngOnInit(){if(console.log("[THREAD] Initializing with project:",this.projectName,"thread:",this.threadId),!this.projectName||!this.threadId){console.error("[THREAD] Missing required inputs: projectName or threadId");return}this.setupPrintHandlers(),this.initializeThreadConnection()}ngOnChanges(t){console.log("[THREAD] ngOnChanges called",t),t.threadId&&(console.log("[THREAD] threadId changed:",{firstChange:t.threadId.firstChange,previousValue:t.threadId.previousValue,currentValue:t.threadId.currentValue}),t.threadId.firstChange||(console.log("[THREAD] Reconnecting to new thread"),this.initializeThreadConnection()))}initializeThreadConnection(){console.log("[THREAD] Initializing connection for thread:",this.threadId),this.fileExchangeState.initializeForThread(this.projectName,this.threadId),this.codayService.messages$.pipe($(this.destroy$)).subscribe(e=>{console.log("[THREAD] Messages updated:",e.length),this.messages=e}),this.codayService.streamingText$.pipe($(this.destroy$)).subscribe(e=>{this.streamingText=e}),this.codayService.isThinking$.pipe($(this.destroy$)).subscribe(e=>{this.isThinking=e}),this.codayService.currentChoice$.pipe($(this.destroy$)).subscribe(e=>{this.currentChoice=e}),this.codayService.connectionStatus$.pipe($(this.destroy$)).subscribe(e=>{this.connectionStatus=e,this.isConnected=e.connected,e.connected&&!this.hasEverConnected&&(this.hasEverConnected=!0,this.showConnectionStatus=!0),!e.connected&&!this.hasEverConnected?setTimeout(()=>{!this.isConnected&&!this.hasEverConnected&&(this.showConnectionStatus=!0)},2e3):!e.connected&&this.hasEverConnected?this.showConnectionStatus=!0:e.connected&&(this.showConnectionStatus=!0)}),this.codayService.threadUpdateEvent$.pipe($(this.destroy$)).subscribe(e=>{e&&(console.log("[THREAD] Thread update event received:",e),this.threadState.refreshThreadList())}),this.codayService.resetMessages(),this.codayService.setTabTitleService(this.titleService),console.log("[THREAD] Connecting to thread event stream"),this.codayService.connectToThread(this.projectName,this.threadId);let t=this.firstMessageState.consumePendingFirstMessage();t?(console.log("[THREAD] First message pending:",t.substring(0,50)+"..."),this.pendingFirstMessage=t,this.codayService.setThinkingForPendingMessage(),this.subscribeToFirstInvite()):console.log("[THREAD] No first message found in state service")}ngAfterViewChecked(){if(this.inputSection?.nativeElement){let t=this.inputSection.nativeElement.offsetHeight;t!==this.inputSectionHeight&&t>0&&(this.inputSectionHeight=t)}}ngOnDestroy(){console.log("[THREAD] Destroying component"),this.destroy$.next(),this.destroy$.complete(),this.fileExchangeState.clear(),this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[],window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint)}onMessageSubmitted(t){console.log("[THREAD] Sending message:",t),this.codayService.sendMessage(t)}onVoiceToggled(t){console.log("[VOICE] Recording:",t)}onChoiceSelected(t){console.log("[THREAD] Choice selected:",t),this.codayService.sendChoice(t)}onCopyMessage(t){console.log("[COPY] Message copied:",t.id)}onStopRequested(){this.threadState.stop()}onInputHeightChanged(t){console.log("[THREAD] Input height changed:",t),this.inputSectionHeight=t}onFilesPasted(t){console.log("[THREAD] File(s) pasted:",t.length);let e=this.imageUploadService.filterImageFiles(t),i=t.filter(r=>!r.type.startsWith("image/"));e.length&&this.uploadFilesSequentially(e,0),i.length&&this.uploadFilesToExchangeSpace(i),!e.length&&!i.length&&this.showUploadError("No supported files found")}toggleFileDrawer(){console.log("[THREAD] Toggling file drawer"),this.isFileDrawerOpen=!this.isFileDrawerOpen}closeFileDrawer(){console.log("[THREAD] Closing file drawer"),this.isFileDrawerOpen=!1}onDragEnter(t){t.preventDefault(),t.dataTransfer?.types.includes("Files")&&(console.log("[THREAD] Image files detected - showing drag overlay"),this.isDragOver=!0)}onDragOver(t){t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="copy")}onDragLeave(t){this.elementRef.nativeElement.contains(t.relatedTarget)||(console.log("[THREAD] Leaving component area - hiding drag overlay"),this.isDragOver=!1)}onDrop(t){t.preventDefault(),this.isDragOver=!1,console.log("[THREAD] Files dropped:",t.dataTransfer?.files?.length||0);let e=t.dataTransfer?.files;if(!e||e.length===0){console.log("[THREAD] No files in drop event");return}let i=this.imageUploadService.filterImageFiles(e),r=Array.from(e).filter(o=>!o.type.startsWith("image/"));console.log("[THREAD] Image files:",i.length,"Other files:",r.length),i.length>0&&this.uploadFilesSequentially(i,0),r.length>0&&this.uploadFilesToExchangeSpace(r),i.length===0&&r.length===0&&this.showUploadError("No supported files found")}uploadFilesSequentially(t,e){if(e>=t.length)return;let i=t[e];if(!i){console.error("[THREAD] File at index",e,"is undefined");return}console.log("[THREAD] Uploading file:",i.name),this.uploadStatus={message:`Uploading ${i.name}...`,isError:!1},this.imageUploadService.uploadImage(i,this.projectName,this.threadId).subscribe({next:r=>{r.success?(console.log("[THREAD] Upload successful:",i.name),this.uploadStatus={message:`\u2713 ${i.name} uploaded (${(r.processedSize/1024).toFixed(1)} KB)`,isError:!1},setTimeout(()=>{this.uploadStatus.isError||(this.uploadStatus={message:"",isError:!1})},3e3),this.uploadFilesSequentially(t,e+1)):(console.error("[THREAD] Upload failed:",i.name,r.error),this.showUploadError(`Failed to upload ${i.name}: ${r.error}`))},error:r=>{console.error("[THREAD] Upload error:",i.name,r),this.showUploadError(`Failed to upload ${i.name}: ${r.message||"Unknown error"}`)}})}showUploadError(t){this.uploadStatus={message:t,isError:!0},setTimeout(()=>{this.uploadStatus={message:"",isError:!1}},5e3)}uploadFilesToExchangeSpace(t){return pe(this,null,function*(){for(let e of t){console.log("[THREAD] Uploading to exchange space:",e.name),this.uploadStatus={message:`Uploading ${e.name}...`,isError:!1};let i=yield this.fileExchangeState.uploadFile(e);if(i.success)console.log("[THREAD] Upload to exchange space successful:",e.name),this.uploadStatus={message:`\u2713 ${e.name} uploaded to exchange space`,isError:!1},setTimeout(()=>{this.uploadStatus.isError||(this.uploadStatus={message:"",isError:!1})},3e3);else{console.error("[THREAD] Upload to exchange space failed:",e.name,i.error),this.showUploadError(`Failed to upload ${e.name}: ${i.error}`);break}}})}subscribeToFirstInvite(){console.log("[THREAD] Subscribing to wait for InviteEvent"),this.subscriptions.push(this.codayService.currentInviteEvent$.subscribe(t=>{if(t&&this.pendingFirstMessage){console.log("[THREAD] Received InviteEvent, sending pending message");let e=this.pendingFirstMessage;this.pendingFirstMessage=null,this.codayService.sendMessage(e)}}))}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=R({type:n,selectors:[["app-thread"]],viewQuery:function(e,i){if(e&1&&xe(uW,5),e&2){let r;re(r=oe())&&(i.inputSection=r.first)}},inputs:{projectName:"projectName",threadId:"threadId"},features:[We],decls:19,vars:13,consts:[["inputSection",""],[1,"drag-drop-wrapper",3,"dragenter","dragover","dragleave","drop"],[1,"file-drawer-container",3,"hasBackdrop"],[1,"thread-container"],["matFab","","type","button",1,"file-drawer-toggle-btn",3,"has-files","matBadge","title"],[1,"connection-status"],[1,"chat-wrapper"],[1,"chat-center"],[3,"copyRequested","stopRequested","messages","streamingText","isThinking"],[1,"upload-status",3,"error"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"],[1,"choice-overlay",3,"options","labelHtml","isVisible"],["mode","side","position","end",3,"closed","opened"],[3,"closeDrawer","projectName","threadId"],[1,"drag-overlay"],["matFab","","type","button",1,"file-drawer-toggle-btn",3,"click","matBadge","title"],[1,"upload-status"],[3,"messageSubmitted","voiceRecordingToggled","heightChanged","stopRequested","filesPasted","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"],[1,"choice-overlay",3,"choiceSelected","options","labelHtml","isVisible"],[1,"drag-overlay-content"],[1,"drag-icon"],[1,"drag-text"],[1,"drag-hint"]],template:function(e,i){if(e&1){let r=V();u(0,"div",1),w("dragenter",function(s){return E(r),S(i.onDragEnter(s))})("dragover",function(s){return E(r),S(i.onDragOver(s))})("dragleave",function(s){return E(r),S(i.onDragLeave(s))})("drop",function(s){return E(r),S(i.onDrop(s))}),u(1,"mat-drawer-container",2)(2,"mat-drawer-content")(3,"div",3),I(4,mW,3,5,"button",4),I(5,pW,2,2,"div",5),u(6,"div",6)(7,"div",7)(8,"app-chat-history",8),w("copyRequested",function(s){return E(r),S(i.onCopyMessage(s))})("stopRequested",function(){return E(r),S(i.onStopRequested())}),m(),I(9,fW,2,3,"div",9),m()(),u(10,"div",10,0)(12,"div",11)(13,"div",12),I(14,hW,1,5,"app-chat-textarea",13),I(15,gW,1,3,"app-choice-select",14),m()()()()(),u(16,"mat-drawer",15),w("closed",function(){return E(r),S(i.closeFileDrawer())}),u(17,"app-file-exchange-drawer",16),w("closeDrawer",function(){return E(r),S(i.closeFileDrawer())}),m()()(),I(18,vW,8,0,"div",17),m()}e&2&&(f(),D("hasBackdrop",!1),f(3),k(i.isFileDrawerOpen?-1:4),f(),k(i.showConnectionStatus&&i.connectionStatus&&!i.connectionStatus.connected?5:-1),f(3),D("messages",i.messages)("streamingText",i.streamingText)("isThinking",i.isThinking),f(),k(i.uploadStatus.message?9:-1),f(5),k(i.currentChoice?-1:14),f(),k(i.currentChoice?15:-1),f(),D("opened",i.isFileDrawerOpen),f(),D("projectName",i.projectName)("threadId",i.threadId),f(),k(i.isDragOver?18:-1))},dependencies:[Rv,Uc,Oc,Wv,Yv,Lm,jm,Jc,Ot,$e,vn,Vg,oR,rR],styles:[".drag-drop-wrapper[_ngcontent-%COMP%]{height:100vh;width:100%;position:relative}.thread-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;position:relative;background:transparent}.file-drawer-toggle-btn[_ngcontent-%COMP%]{position:fixed!important;top:1rem!important;right:1rem!important;z-index:100!important}.file-drawer-toggle-btn.has-files[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse-subtle 3s infinite}@keyframes _ngcontent-%COMP%_pulse-subtle{0%,to{box-shadow:0 2px 8px #00000026}50%{box-shadow:0 4px 16px rgba(var(--color-primary-rgb, 25, 118, 210),.3)}}.file-drawer-container[_ngcontent-%COMP%]{height:100vh;width:100%;background:var(--color-bg)}.file-drawer-container[_ngcontent-%COMP%] .mat-drawer-content{display:flex;flex-direction:column;height:100%;overflow:hidden;background:transparent}.file-drawer-container[_ngcontent-%COMP%] .mat-drawer{width:35vw;max-width:90vw;box-shadow:-2px 0 8px #0000001a}@media (max-width: 768px){.file-drawer-container[_ngcontent-%COMP%] .mat-drawer{width:100vw;max-width:100vw}}.file-drawer-container[_ngcontent-%COMP%] .mat-drawer-backdrop{display:none}.connection-status[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:1000;background:var(--color-warning);color:var(--color-text);padding:.5rem 1rem;text-align:center;font-size:.9rem;box-shadow:0 2px 4px #0000001a}.chat-wrapper[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;width:100%;padding:1rem 0}.chat-center[_ngcontent-%COMP%]{max-width:800px;width:100%;margin:0 auto;padding:0 1rem;display:flex;flex-direction:column;gap:1rem}.upload-status[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:8px;background:var(--color-primary-light);color:var(--color-text);text-align:center;font-size:.9rem;margin-top:1rem}.upload-status.error[_ngcontent-%COMP%]{background:var(--color-error);color:#fff}.input-section[_ngcontent-%COMP%]{flex-shrink:0;width:100%;padding:1rem 0;background:var(--color-background)}.input-center[_ngcontent-%COMP%]{max-width:800px;width:100%;margin:0 auto;padding:0 1rem}.input-glass[_ngcontent-%COMP%]{position:relative;background:transparent;border-radius:12px;display:flex;flex-direction:column}.choice-overlay[_ngcontent-%COMP%]{width:100%;background:var(--color-bg-solid);border-radius:12px;padding:1.5rem;box-shadow:0 4px 12px #00000026}.drag-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:#000000b3;z-index:10000;display:flex;align-items:center;justify-content:center;pointer-events:none}.drag-overlay-content[_ngcontent-%COMP%]{text-align:center;color:#fff;padding:2rem;border:3px dashed white;border-radius:12px;background:#00000080}.drag-icon[_ngcontent-%COMP%]{font-size:4rem;margin-bottom:1rem}.drag-text[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:500}.drag-hint[_ngcontent-%COMP%]{font-size:.9rem;margin-top:.5rem;opacity:.8}@media (max-width: 768px){.chat-center[_ngcontent-%COMP%], .input-center[_ngcontent-%COMP%]{padding:0 .5rem}.drag-text[_ngcontent-%COMP%]{font-size:1.2rem}.drag-icon[_ngcontent-%COMP%]{font-size:3rem}.file-drawer-container[_ngcontent-%COMP%] .mat-drawer{width:100vw;max-width:100vw}.file-drawer-toggle-btn[_ngcontent-%COMP%]{top:.75rem!important;right:.75rem!important}}@media print{.connection-status[_ngcontent-%COMP%], .input-section[_ngcontent-%COMP%], .drag-overlay[_ngcontent-%COMP%], .file-drawer-toggle-btn[_ngcontent-%COMP%], .file-drawer-container[_ngcontent-%COMP%]{display:none!important}.chat-wrapper[_ngcontent-%COMP%]{overflow:visible;height:auto}.thread-container[_ngcontent-%COMP%]{height:auto}}"]})};var sR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Me]})}return n})();var aR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me]})}return n})();var no=class n{http=d(dt);getUserConfig(){return this.http.get("/api/config/user").pipe(Oe(t=>console.log("[CONFIG-API] User config retrieved:",t)))}updateUserConfig(t){return this.http.put("/api/config/user",t).pipe(Oe(e=>console.log("[CONFIG-API] User config updated:",e)))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var nd=class n{currentThemeSubject=new ae("light");currentTheme$=this.currentThemeSubject.asObservable();preferences=d(Bt);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),setTimeout(()=>{let e=this.preferences.getPreference("theme","light")??"light";e!==t&&(console.log("[THEME] Theme updated after async load:",e),this.applyTheme(e))},100)}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 i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";console.log("[THEME] System theme resolved to:",i),this.setDocumentTheme(i)}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=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var _W=["mat-internal-form-field",""],bW=["*"],Zv=(()=>{class n{labelPosition;static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(i,r){i&2&&j("mdc-form-field--align-end",r.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:_W,ngContentSelectors:bW,decls:1,vars:0,template:function(i,r){i&1&&(Ge(),we(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}
|
|
379
|
+
`],encapsulation:2,changeDetection:0})}return n})();var yW=["switch"],CW=["*"];function wW(n,t){n&1&&(u(0,"span",11),or(),u(1,"svg",13),H(2,"path",14),m(),u(3,"svg",15),H(4,"path",16),m()())}var xW=new A("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),Xv=class{source;checked;constructor(t,e){this.source=t,this.checked=e}},Za=(()=>{class n{_elementRef=d(Z);_focusMonitor=d(fr);_changeDetectorRef=d(Qe);defaults=d(xW);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new Xv(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=mt();_focused;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new U;toggleChange=new U;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){d(At).load(qr);let e=d(new _i("tabindex"),{optional:!0}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=d(ut).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??!1,this.disabledInteractive=i.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new Xv(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-slide-toggle"]],viewQuery:function(i,r){if(i&1&&xe(yW,5),i&2){let o;re(o=oe())&&(r._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,r){i&2&&($n("id",r.id),ne("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),si(r.color?"mat-"+r.color:""),j("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",ie],color:"color",disabled:[2,"disabled","disabled",ie],disableRipple:[2,"disableRipple","disableRipple",ie],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ai(e)],checked:[2,"checked","checked",ie],hideIcon:[2,"hideIcon","hideIcon",ie],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[je([{provide:ui,useExisting:Ct(()=>n),multi:!0},{provide:yr,useExisting:n,multi:!0}]),We],ngContentSelectors:CW,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,r){if(i&1){let o=V();Ge(),u(0,"div",1)(1,"button",2,0),w("click",function(){return E(o),S(r._handleClick())}),H(3,"div",3)(4,"span",4),u(5,"span",5)(6,"span",6)(7,"span",7),H(8,"span",8),m(),u(9,"span",9),H(10,"span",10),m(),I(11,wW,5,0,"span",11),m()()(),u(12,"label",12),w("click",function(a){return E(o),S(a.stopPropagation())}),we(13),m()()}if(i&2){let o=oi(2);D("labelPosition",r.labelPosition),f(),j("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled)("mat-mdc-slide-toggle-disabled-interactive",r.disabledInteractive),D("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("disabled",r.disabled&&!r.disabledInteractive),ne("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),f(9),D("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),f(),k(r.hideIcon?-1:11),f(),D("for",r.buttonId),ne("id",r._labelId)}},dependencies:[Ms,Zv],styles:[`.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mat-slide-toggle-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mat-slide-toggle-track-height, 32px);border-radius:var(--mat-slide-toggle-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mat-slide-toggle-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-slide-toggle-track-outline-width, 2px);border-color:var(--mat-slide-toggle-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-slide-toggle-selected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-slide-toggle-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mat-slide-toggle-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mat-slide-toggle-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mat-slide-toggle-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mat-slide-toggle-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mat-slide-toggle-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mat-slide-toggle-handle-width);height:var(--mat-slide-toggle-handle-height);border-radius:var(--mat-slide-toggle-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-slide-toggle-unselected-handle-size, 16px);height:var(--mat-slide-toggle-unselected-handle-size, 16px);margin:var(--mat-slide-toggle-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-slide-toggle-selected-handle-size, 24px);height:var(--mat-slide-toggle-selected-handle-size, 24px);margin:var(--mat-slide-toggle-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-slide-toggle-with-icon-handle-size, 24px);height:var(--mat-slide-toggle-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-slide-toggle-pressed-handle-size, 28px);height:var(--mat-slide-toggle-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mat-slide-toggle-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mat-slide-toggle-state-layer-size, 40px);height:var(--mat-slide-toggle-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-hover-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-focus-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1;transform:translateZ(0)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mat-slide-toggle-unselected-icon-size, 16px);height:var(--mat-slide-toggle-unselected-icon-size, 16px);fill:var(--mat-slide-toggle-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mat-slide-toggle-selected-icon-size, 16px);height:var(--mat-slide-toggle-selected-icon-size, 16px);fill:var(--mat-slide-toggle-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-slide-toggle-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-slide-toggle-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-slide-toggle-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-slide-toggle-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-slide-toggle-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-slide-toggle-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mat-slide-toggle-disabled-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-slide-toggle-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-slide-toggle-touch-target-size, 48px);width:100%;transform:translate(-50%, -50%);display:var(--mat-slide-toggle-touch-target-display, block)}[dir=rtl] .mat-mdc-slide-toggle-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
|
|
380
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Jv=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Za,Me,Me]})}return n})();var EW=(n,t)=>t.code,SW=(n,t)=>t.name+t.lang;function MW(n,t){n&1&&(u(0,"div",15)(1,"mat-icon",32),g(2,"warning"),m(),u(3,"span",33),g(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),m()())}function TW(n,t){if(n&1&&(u(0,"option",18),g(1),m()),n&2){let e=t.$implicit;D("value",e.code),f(),Vr("",e.flag," ",e.label)}}function DW(n,t){n&1&&(u(0,"option",25),g(1,"Loading voices..."),m())}function IW(n,t){n&1&&(u(0,"option",25),g(1,"No voice available"),m())}function kW(n,t){if(n&1&&(u(0,"option",18),g(1),m()),n&2){let e=t.$implicit;D("value",e.name+"|"+e.lang),f(),Se(" ",e.displayName," ")}}var Vm=class n{destroy$=new P;selectedTheme="light";selectedVoiceLanguage="en-US";useEnterToSend=!1;printTechnicalMessages=!1;showTechnicalMessages=!0;showWarningMessages=!0;voiceAnnounceEnabled=!1;voiceMode="speech";voiceReadFullText=!1;voiceVolume=80;voiceRate=120;agentNotificationEnabled=!1;notificationSoundEnabled=!0;browserNotificationEnabled=!1;browserNotificationDenied=!1;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=d(Bt);voiceSynthesisService=d(Wc);themeService=d(nd);ngOnInit(){this.selectedTheme=this.themeService.getCurrentTheme(),this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),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.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe($(this.destroy$)).subscribe(t=>{this.selectedTheme=t}),this.preferencesService.voiceLanguage$.pipe($(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t}),this.preferencesService.enterToSend$.pipe($(this.destroy$)).subscribe(t=>{this.useEnterToSend=t}),this.preferencesService.printTechnicalMessages$.pipe($(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t}),this.preferencesService.hideTechnicalMessages$.pipe($(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t}),this.preferencesService.hideWarningMessages$.pipe($(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t}),this.preferencesService.voiceAnnounceEnabled$.pipe($(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t}),this.preferencesService.voiceMode$.pipe($(this.destroy$)).subscribe(t=>{this.voiceMode=t}),this.preferencesService.voiceReadFullText$.pipe($(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t}),this.preferencesService.voiceVolume$.pipe($(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100)}),this.preferencesService.voiceRate$.pipe($(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100)}),this.preferencesService.selectedVoice$.pipe($(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t}),this.preferencesService.voiceLanguage$.pipe($(this.destroy$)).subscribe(()=>{this.loadAvailableVoices()}),this.preferencesService.agentNotificationEnabled$.pipe($(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t}),this.preferencesService.notificationSoundEnabled$.pipe($(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t}),this.preferencesService.browserNotificationEnabled$.pipe($(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission()})}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)}onShowTechnicalMessagesChange(){let t=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",t,")"),this.preferencesService.setHideTechnicalMessages(t)}onShowWarningMessagesChange(){let t=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",t,")"),this.preferencesService.setHideWarningMessages(t)}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 pe(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()}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled)}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled)}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled)}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-options-panel"]],decls:144,vars:35,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"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["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"],[1,"error-icon"],[1,"error-message"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),g(4,"palette"),m(),u(5,"span"),g(6,"Appearance"),m()(),u(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),q("ngModelChange",function(o){return Q(i.selectedTheme,o)||(i.selectedTheme=o),o}),w("change",function(){return i.onThemeChange()}),m(),H(11,"span",7),g(12," Light "),m(),u(13,"label",5)(14,"input",8),q("ngModelChange",function(o){return Q(i.selectedTheme,o)||(i.selectedTheme=o),o}),w("change",function(){return i.onThemeChange()}),m(),H(15,"span",7),g(16," Dark "),m(),u(17,"label",5)(18,"input",9),q("ngModelChange",function(o){return Q(i.selectedTheme,o)||(i.selectedTheme=o),o}),w("change",function(){return i.onThemeChange()}),m(),H(19,"span",7),g(20," System "),m()()()(),u(21,"div",1)(22,"div",2)(23,"mat-icon"),g(24,"chat_bubble_outline"),m(),u(25,"span"),g(26,"Messaging"),m()(),u(27,"div",3)(28,"span",10),g(29,"Send message behavior:"),m(),u(30,"div",4)(31,"label",5)(32,"input",11),q("ngModelChange",function(o){return Q(i.useEnterToSend,o)||(i.useEnterToSend=o),o}),w("change",function(){return i.onEnterToSendChange()}),m(),H(33,"span",7),g(34," Enter to send "),m(),u(35,"label",5)(36,"input",11),q("ngModelChange",function(o){return Q(i.useEnterToSend,o)||(i.useEnterToSend=o),o}),w("change",function(){return i.onEnterToSendChange()}),m(),H(37,"span",7),g(38," Enter for new line "),m()()(),u(39,"div",3)(40,"div",12)(41,"span",10),g(42,"Show technical messages"),m(),u(43,"mat-slide-toggle",13),q("ngModelChange",function(o){return Q(i.showTechnicalMessages,o)||(i.showTechnicalMessages=o),o}),w("change",function(){return i.onShowTechnicalMessagesChange()}),m()()(),u(44,"div",3)(45,"div",12)(46,"span",10),g(47,"Show warning messages"),m(),u(48,"mat-slide-toggle",13),q("ngModelChange",function(o){return Q(i.showWarningMessages,o)||(i.showWarningMessages=o),o}),w("change",function(){return i.onShowWarningMessagesChange()}),m()()(),u(49,"div",3)(50,"div",12)(51,"span",10),g(52,"Include technical messages in print"),m(),u(53,"mat-slide-toggle",13),q("ngModelChange",function(o){return Q(i.printTechnicalMessages,o)||(i.printTechnicalMessages=o),o}),w("change",function(){return i.onPrintTechnicalMessagesChange()}),m()()()(),u(54,"div",1)(55,"div",2)(56,"mat-icon"),g(57,"notifications"),m(),u(58,"span"),g(59,"Notifications"),m()(),u(60,"div",3)(61,"div",12)(62,"span",10),g(63,"Notify when the agent answers or requests input"),m(),u(64,"mat-slide-toggle",13),q("ngModelChange",function(o){return Q(i.agentNotificationEnabled,o)||(i.agentNotificationEnabled=o),o}),w("change",function(){return i.onAgentNotificationEnabledChange()}),m()()(),u(65,"div",3)(66,"div",12)(67,"span",10),g(68,"Notification sound"),m(),u(69,"mat-slide-toggle",14),q("ngModelChange",function(o){return Q(i.notificationSoundEnabled,o)||(i.notificationSoundEnabled=o),o}),w("change",function(){return i.onNotificationSoundEnabledChange()}),m()()(),u(70,"div",3)(71,"div",12)(72,"span",10),g(73,"Browser notification"),m(),u(74,"mat-slide-toggle",14),q("ngModelChange",function(o){return Q(i.browserNotificationEnabled,o)||(i.browserNotificationEnabled=o),o}),w("change",function(){return i.onBrowserNotificationEnabledChange()}),m()(),I(75,MW,5,0,"div",15),m()(),u(76,"div",1)(77,"div",2)(78,"mat-icon"),g(79,"record_voice_over"),m(),u(80,"span"),g(81,"Voice & Speech"),m()(),u(82,"div",3)(83,"label",16),g(84,"Voice recognition language:"),m(),u(85,"select",17),q("ngModelChange",function(o){return Q(i.selectedVoiceLanguage,o)||(i.selectedVoiceLanguage=o),o}),w("change",function(){return i.onVoiceLanguageChange()}),st(86,TW,2,3,"option",18,EW),m()(),u(88,"div",3)(89,"span",10),g(90,"Automatic announcement:"),m(),u(91,"div",4)(92,"label",5)(93,"input",19),q("ngModelChange",function(o){return Q(i.voiceAnnounceEnabled,o)||(i.voiceAnnounceEnabled=o),o}),w("change",function(){return i.onVoiceAnnounceEnabledChange()}),m(),H(94,"span",7),g(95," Enabled "),m(),u(96,"label",5)(97,"input",19),q("ngModelChange",function(o){return Q(i.voiceAnnounceEnabled,o)||(i.voiceAnnounceEnabled=o),o}),w("change",function(){return i.onVoiceAnnounceEnabledChange()}),m(),H(98,"span",7),g(99," Disabled "),m()()(),u(100,"div",3)(101,"span",10),g(102,"Voice mode:"),m(),u(103,"div",4)(104,"label",5)(105,"input",20),q("ngModelChange",function(o){return Q(i.voiceMode,o)||(i.voiceMode=o),o}),w("change",function(){return i.onVoiceModeChange()}),m(),H(106,"span",7),g(107," Voice synthesis "),m(),u(108,"label",5)(109,"input",21),q("ngModelChange",function(o){return Q(i.voiceMode,o)||(i.voiceMode=o),o}),w("change",function(){return i.onVoiceModeChange()}),m(),H(110,"span",7),g(111," Sound notification "),m()()(),u(112,"div",3)(113,"span",10),g(114,"Message reading:"),m(),u(115,"div",4)(116,"label",5)(117,"input",22),q("ngModelChange",function(o){return Q(i.voiceReadFullText,o)||(i.voiceReadFullText=o),o}),w("change",function(){return i.onVoiceReadFullTextChange()}),m(),H(118,"span",7),g(119," Full message "),m(),u(120,"label",5)(121,"input",22),q("ngModelChange",function(o){return Q(i.voiceReadFullText,o)||(i.voiceReadFullText=o),o}),w("change",function(){return i.onVoiceReadFullTextChange()}),m(),H(122,"span",7),g(123," First paragraphs only "),m()()(),u(124,"div",3)(125,"label",23),g(126,"Selected voice:"),m(),u(127,"select",24),q("ngModelChange",function(o){return Q(i.selectedVoiceId,o)||(i.selectedVoiceId=o),o}),w("change",function(){return i.onSelectedVoiceChange()}),I(128,DW,2,0,"option",25),I(129,IW,2,0,"option",25),st(130,kW,2,2,"option",18,SW),m(),H(132,"div",10),u(133,"a",26),w("click",function(){return i.testVoice()}),u(134,"span",27),g(135,"Test voice"),m()()(),u(136,"div",3)(137,"label",28),g(138),m(),u(139,"input",29),q("ngModelChange",function(o){return Q(i.voiceVolume,o)||(i.voiceVolume=o),o}),w("input",function(){return i.onVoiceVolumeChange()}),m()(),u(140,"div",3)(141,"label",30),g(142),m(),u(143,"input",31),q("ngModelChange",function(o){return Q(i.voiceRate,o)||(i.voiceRate=o),o}),w("input",function(){return i.onVoiceRateChange()}),m()()()()),e&2&&(f(10),G("ngModel",i.selectedTheme),f(4),G("ngModel",i.selectedTheme),f(4),G("ngModel",i.selectedTheme),f(14),D("value",!0),G("ngModel",i.useEnterToSend),f(4),D("value",!1),G("ngModel",i.useEnterToSend),f(7),G("ngModel",i.showTechnicalMessages),f(5),G("ngModel",i.showWarningMessages),f(5),G("ngModel",i.printTechnicalMessages),f(11),G("ngModel",i.agentNotificationEnabled),f(5),G("ngModel",i.notificationSoundEnabled),D("disabled",!i.agentNotificationEnabled),f(5),G("ngModel",i.browserNotificationEnabled),D("disabled",!i.agentNotificationEnabled||i.browserNotificationDenied),f(),k(i.browserNotificationDenied?75:-1),f(10),G("ngModel",i.selectedVoiceLanguage),f(),at(i.voiceLanguageOptions),f(7),D("value",!0),G("ngModel",i.voiceAnnounceEnabled),f(4),D("value",!1),G("ngModel",i.voiceAnnounceEnabled),f(8),G("ngModel",i.voiceMode),f(4),G("ngModel",i.voiceMode),f(8),D("value",!0),G("ngModel",i.voiceReadFullText),f(4),D("value",!1),G("ngModel",i.voiceReadFullText),f(6),G("ngModel",i.selectedVoiceId),D("disabled",i.loadingVoices||i.availableVoices.length===0),f(),k(i.loadingVoices?128:-1),f(),k(!i.loadingVoices&&i.availableVoices.length===0?129:-1),f(),at(i.availableVoices),f(8),Se("Volume: ",i.voiceVolume,"%"),f(),G("ngModel",i.voiceVolume),f(3),Se("Speed: ",i.voiceRate,"%"),f(),G("ngModel",i.voiceRate))},dependencies:[Rt,wv,xv,Et,Lx,Cv,$a,Pt,Tt,$e,Za],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}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.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}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}']})};var AW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,r){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
|
|
381
|
+
`],encapsulation:2,changeDetection:0})}return n})(),OW={passive:!0},cR=(()=>{class n{_platform=d(He);_ngZone=d(Y);_renderer=d(jt).createRenderer(null,null);_styleLoader=d(At);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return mn;this._styleLoader.load(AW);let i=xi(e),r=this._monitoredElements.get(i);if(r)return r.subject;let o=new P,s="cdk-text-field-autofilled",a=c=>{c.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(s)?(i.classList.add(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!0}))):c.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",a,OW)));return this._monitoredElements.set(i,{subject:o,unlisten:l}),o}stopMonitoring(e){let i=xi(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var dR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({})}return n})();var uR=new A("MAT_INPUT_VALUE_ACCESSOR");var Kx=class{_box;_destroyed=new P;_resizeSubject=new P;_resizeObserver;_elementObservables=new Map;constructor(t){this._box=t,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(t){return this._elementObservables.has(t)||this._elementObservables.set(t,new ge(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(t,{box:this._box}),()=>{this._resizeObserver?.unobserve(t),i.unsubscribe(),this._elementObservables.delete(t)}}).pipe(ue(e=>e.some(i=>i.target===t)),Tr({bufferSize:1,refCount:!0}),$(this._destroyed))),this._elementObservables.get(t)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},mR=(()=>{class n{_cleanupErrorListener;_observers=new Map;_ngZone=d(Y);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let r=i?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new Kx(r)),this._observers.get(r).observe(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var PW=["notch"],RW=["matFormFieldNotchedOutline",""],NW=["*"],pR=["iconPrefixContainer"],fR=["textPrefixContainer"],hR=["iconSuffixContainer"],gR=["textSuffixContainer"],FW=["textField"],LW=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],jW=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function VW(n,t){n&1&&H(0,"span",21)}function BW(n,t){if(n&1&&(u(0,"label",20),we(1,1),I(2,VW,1,0,"span",21),m()),n&2){let e=b(2);D("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),ne("for",e._control.disableAutomaticLabeling?null:e._control.id),f(2),k(!e.hideRequiredMarker&&e._control.required?2:-1)}}function zW(n,t){if(n&1&&I(0,BW,3,5,"label",20),n&2){let e=b();k(e._hasFloatingLabel()?0:-1)}}function HW(n,t){n&1&&H(0,"div",7)}function UW(n,t){}function $W(n,t){if(n&1&&wt(0,UW,0,0,"ng-template",13),n&2){b(2);let e=oi(1);D("ngTemplateOutlet",e)}}function WW(n,t){if(n&1&&(u(0,"div",9),I(1,$W,1,1,null,13),m()),n&2){let e=b();D("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),f(),k(e._forceDisplayInfixLabel()?-1:1)}}function GW(n,t){n&1&&(u(0,"div",10,2),we(2,2),m())}function qW(n,t){n&1&&(u(0,"div",11,3),we(2,3),m())}function YW(n,t){}function QW(n,t){if(n&1&&wt(0,YW,0,0,"ng-template",13),n&2){b();let e=oi(1);D("ngTemplateOutlet",e)}}function KW(n,t){n&1&&(u(0,"div",14,4),we(2,4),m())}function ZW(n,t){n&1&&(u(0,"div",15,5),we(2,5),m())}function XW(n,t){n&1&&H(0,"div",16)}function JW(n,t){n&1&&(u(0,"div",18),we(1,6),m())}function e6(n,t){if(n&1&&(u(0,"mat-hint",22),g(1),m()),n&2){let e=b(2);D("id",e._hintLabelId),f(),K(e.hintLabel)}}function t6(n,t){if(n&1&&(u(0,"div",19),I(1,e6,2,2,"mat-hint",22),we(2,7),H(3,"div",23),we(4,8),m()),n&2){let e=b();f(),k(e.hintLabel?1:-1)}}var Xn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["mat-label"]]})}return n})(),n6=new A("MatError");var $o=(()=>{class n{align="start";id=d(ut).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,r){i&2&&($n("id",r.id),ne("align",null),j("mat-mdc-form-field-hint-end",r.align==="end"))},inputs:{align:"align",id:"id"}})}return n})(),xR=new A("MatPrefix"),Xa=(()=>{class n{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[je([{provide:xR,useExisting:n}])]})}return n})(),i6=new A("MatSuffix");var ER=new A("FloatingLabelParent"),vR=(()=>{class n{_elementRef=d(Z);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=d(mR);_ngZone=d(Y);_parent=d(ER);_resizeSubscription=new ze;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return r6(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,r){i&2&&j("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return n})();function r6(n){let t=n;if(t.offsetParent!==null)return t.scrollWidth;let e=t.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var _R="mdc-line-ripple--active",e_="mdc-line-ripple--deactivating",bR=(()=>{class n{_elementRef=d(Z);_cleanupTransitionEnd;constructor(){let e=d(Y),i=d(et);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(e_),e.add(_R)}deactivate(){this._elementRef.nativeElement.classList.add(e_)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,r=i.contains(e_);e.propertyName==="opacity"&&r&&i.remove(_R,e_)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return n})(),yR=(()=>{class n{_elementRef=d(Z);_ngZone=d(Y);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,r){if(i&1&&xe(PW,5),i&2){let o;re(o=oe())&&(r._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,r){i&2&&j("mdc-notched-outline--notched",r.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:RW,ngContentSelectors:NW,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,r){i&1&&(Ge(),wn(0,"div",1),fn(1,"div",2,0),we(3),hn(),wn(4,"div",3))},encapsulation:2,changeDetection:0})}return n})(),Bm=(()=>{class n{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n})}return n})();var zm=new A("MatFormField"),o6=new A("MAT_FORM_FIELD_DEFAULT_OPTIONS"),CR="fill",s6="auto",wR="fixed",a6="translateY(-50%)",Jn=(()=>{class n{_elementRef=d(Z);_changeDetectorRef=d(Qe);_platform=d(He);_idGenerator=d(ut);_ngZone=d(Y);_defaults=d(o6,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=su("iconPrefixContainer");_textPrefixContainerSignal=su("textPrefixContainer");_iconSuffixContainerSignal=su("iconSuffixContainer");_textSuffixContainerSignal=su("textSuffixContainer");_prefixSuffixContainers=Kt(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=eI(Xn);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ei(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||s6}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||CR;this._appearanceSignal.set(i)}_appearanceSignal=Fe(CR);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||wR}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||wR}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new P;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=mt();constructor(){let e=this._defaults,i=d(En);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),yo(()=>this._currentDirection=i.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=Kt(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,r="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(r+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(r+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ht([void 0,void 0]),z(()=>[i.errorState,i.userAriaDescribedBy]),Xs(),ue(([[o,s],[a,l]])=>o!==a||s!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe($(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Xi(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){iI({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=Kt(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let o=this._hintChildren?this._hintChildren.find(a=>a.align==="start"):null,s=this._hintChildren?this._hintChildren.find(a=>a.align==="end"):null;o?e.push(o.id):this._hintLabel&&e.push(this._hintLabelId),s&&e.push(s.id)}else this._errorChildren&&e.push(...this._errorChildren.map(o=>o.id));let i=this._control.describedByIds,r;if(i){let o=this._describedByIds||e;r=e.concat(i.filter(s=>s&&!o.includes(s)))}else r=e;this._control.setDescribedByIds(r),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,i=this._textPrefixContainer?.nativeElement,r=this._iconSuffixContainer?.nativeElement,o=this._textSuffixContainer?.nativeElement,s=e?.getBoundingClientRect().width??0,a=i?.getBoundingClientRect().width??0,l=r?.getBoundingClientRect().width??0,c=o?.getBoundingClientRect().width??0,p=this._currentDirection==="rtl"?"-1":"1",h=`${s+a}px`,v=`calc(${p} * (${h} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,y=`var(--mat-mdc-form-field-label-transform, ${a6} translateX(${v}))`,T=s+a+l+c;return[y,T]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,r]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),r!==null&&this._notchedOutline?._setMaxWidth(r)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-form-field"]],contentQueries:function(i,r,o){if(i&1&&(j0(o,r._labelChild,Xn,5),cn(o,Bm,5),cn(o,xR,5),cn(o,i6,5),cn(o,n6,5),cn(o,$o,5)),i&2){nh();let s;re(s=oe())&&(r._formFieldControl=s.first),re(s=oe())&&(r._prefixChildren=s),re(s=oe())&&(r._suffixChildren=s),re(s=oe())&&(r._errorChildren=s),re(s=oe())&&(r._hintChildren=s)}},viewQuery:function(i,r){if(i&1&&(ql(r._iconPrefixContainerSignal,pR,5),ql(r._textPrefixContainerSignal,fR,5),ql(r._iconSuffixContainerSignal,hR,5),ql(r._textSuffixContainerSignal,gR,5),xe(FW,5),xe(pR,5),xe(fR,5),xe(hR,5),xe(gR,5),xe(vR,5),xe(yR,5),xe(bR,5)),i&2){nh(4);let o;re(o=oe())&&(r._textField=o.first),re(o=oe())&&(r._iconPrefixContainer=o.first),re(o=oe())&&(r._textPrefixContainer=o.first),re(o=oe())&&(r._iconSuffixContainer=o.first),re(o=oe())&&(r._textSuffixContainer=o.first),re(o=oe())&&(r._floatingLabel=o.first),re(o=oe())&&(r._notchedOutline=o.first),re(o=oe())&&(r._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(i,r){i&2&&j("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-appearance-fill",r.appearance=="fill")("mat-form-field-appearance-outline",r.appearance=="outline")("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-primary",r.color!=="accent"&&r.color!=="warn")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[je([{provide:zm,useExisting:n},{provide:ER,useExisting:n}])],ngContentSelectors:jW,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,r){if(i&1){let o=V();Ge(LW),wt(0,zW,1,1,"ng-template",null,0,iu),u(2,"div",6,1),w("click",function(a){return E(o),S(r._control.onContainerClick(a))}),I(4,HW,1,0,"div",7),u(5,"div",8),I(6,WW,2,2,"div",9),I(7,GW,3,0,"div",10),I(8,qW,3,0,"div",11),u(9,"div",12),I(10,QW,1,1,null,13),we(11),m(),I(12,KW,3,0,"div",14),I(13,ZW,3,0,"div",15),m(),I(14,XW,1,0,"div",16),m(),u(15,"div",17),I(16,JW,2,0,"div",18)(17,t6,5,1,"div",19),m()}if(i&2){let o;f(2),j("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),f(2),k(!r._hasOutline()&&!r._control.disabled?4:-1),f(2),k(r._hasOutline()?6:-1),f(),k(r._hasIconPrefix?7:-1),f(),k(r._hasTextPrefix?8:-1),f(2),k(!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),f(2),k(r._hasTextSuffix?12:-1),f(),k(r._hasIconSuffix?13:-1),f(),k(r._hasOutline()?-1:14),f(),j("mat-mdc-form-field-subscript-dynamic-size",r.subscriptSizing==="dynamic");let s=r._getSubscriptMessageType();f(),k((o=s)==="error"?16:o==="hint"?17:-1)}},dependencies:[vR,yR,fu,bR,$o],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
|
|
382
|
+
`],encapsulation:2,changeDetection:0})}return n})();var t_=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var id=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(t,e,i,r,o){this._defaultMatcher=t,this.ngControl=e,this._parentFormGroup=i,this._parentForm=r,this._stateChanges=o}updateErrorState(){let t=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=i?.isErrorState(r,e)??!1;o!==t&&(this.errorState=o,this._stateChanges.next())}};var Jt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Sg,Jn,Me]})}return n})();var l6=["button","checkbox","file","hidden","image","radio","range","reset","submit"],c6=new A("MAT_INPUT_CONFIG"),qi=(()=>{class n{_elementRef=d(Z);_platform=d(He);ngControl=d(Xr,{optional:!0,self:!0});_autofillMonitor=d(cR);_ngZone=d(Y);_formField=d(zm,{optional:!0});_renderer=d(et);_uid=d(ut).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=d(c6,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new P;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Ei(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Fc.required)??!1}set required(e){this._required=Ei(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Hw().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ei(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Hw().has(e));constructor(){let e=d(Pm,{optional:!0}),i=d(Nm,{optional:!0}),r=d(t_),o=d(uR,{optional:!0,self:!0}),s=this._elementRef.nativeElement,a=s.nodeName.toLowerCase();o?Rr(o.value)?this._signalBasedValueAccessor=o:this._inputValueAccessor=o:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new id(r,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=a==="select",this._isTextarea=a==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&yo(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){l6.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,r){i&1&&w("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),i&2&&($n("id",r.id)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),ne("name",r.name||null)("readonly",r._getReadonlyAttribute())("aria-disabled",r.disabled&&r.disabledInteractive?"true":null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),j("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mat-mdc-input-disabled-interactive",r.disabledInteractive)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie]},exportAs:["matInput"],features:[je([{provide:Bm,useExisting:n}]),We]})}return n})(),mi=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,Jt,Jt,dR,Me]})}return n})();var n_=class n{http=d(dt);usernameSubject=new ae(null);username$=this.usernameSubject.asObservable();fetchCurrentUser(){return this.http.get("/api/user/me").pipe(Oe(t=>{this.usernameSubject.next(t.username)}))}getUsername(){return this.usernameSubject.value}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var d6=(n,t)=>t.label,u6=(n,t)=>t.id;function m6(n,t){n&1&&(u(0,"div",3),H(1,"span",4),u(2,"span",5),g(3,"Loading threads..."),m()())}function p6(n,t){if(n&1&&(u(0,"div",18),g(1),m()),n&2){let e=b(6);f(),K(e.renameErrorMessage)}}function f6(n,t){if(n&1){let e=V();u(0,"div",11)(1,"input",17),q("ngModelChange",function(r){E(e);let o=b(5);return Q(o.editingThreadName,r)||(o.editingThreadName=r),S(r)}),w("keydown",function(r){E(e);let o=b(5);return S(o.onEditKeydown(r))})("blur",function(){E(e);let r=b(5);return S(r.onEditBlur())})("click",function(r){return E(e),S(r.stopPropagation())}),m(),I(2,p6,2,1,"div",18),m()}if(n&2){let e=b(5);f(),G("ngModel",e.editingThreadName),D("disabled",e.isRenamingThread),f(),k(e.renameErrorMessage?2:-1)}}function h6(n,t){if(n&1&&(u(0,"span",20),g(1),m()),n&2){let e=b(2).$implicit;f(),K(e.name)}}function g6(n,t){n&1&&(H(0,"mat-spinner",21),u(1,"span",22),g(2,"Generating name..."),m()),n&2&&D("diameter",16)}function v6(n,t){if(n&1){let e=V();u(0,"a",19),w("click",function(r){E(e);let o=b().$implicit;return b(4).selectThread(o.id),S(r.preventDefault())})("keydown.enter",function(r){E(e);let o=b().$implicit;return b(4).selectThread(o.id),S(r.preventDefault())})("keydown.space",function(r){E(e);let o=b().$implicit;return b(4).selectThread(o.id),S(r.preventDefault())}),I(1,h6,2,1,"span",20)(2,g6,3,1),m()}if(n&2){let e=b().$implicit;D("title",e.name||"Generating name..."),f(),k(e.name?1:2)}}function _6(n,t){if(n&1){let e=V();u(0,"button",23),w("click",function(r){E(e);let o=b().$implicit,s=b(4);return S(s.startEditingThreadName(r,o))}),u(1,"mat-icon"),g(2,"edit"),m()()}}function b6(n,t){if(n&1){let e=V();u(0,"div",10),I(1,f6,3,3,"div",11)(2,v6,3,2,"a",12),u(3,"div",13),I(4,_6,3,0,"button",14),u(5,"button",15),w("click",function(r){let o=E(e).$implicit,s=b(4);return S(s.toggleStar(r,o))}),u(6,"mat-icon"),g(7),m()(),u(8,"button",16),w("click",function(r){let o=E(e).$implicit,s=b(4);return S(s.deleteThread(r,o))}),u(9,"mat-icon"),g(10,"delete"),m()()()()}if(n&2){let e,i=t.$implicit,r=b(4);j("current",i.id===((e=r.currentThread())==null?null:e.id)),f(),k(r.editingThreadId===i.id?1:2),f(3),k(r.editingThreadId!==i.id&&i.name?4:-1),f(),j("starred",r.isStarred(i)),D("title",r.isStarred(i)?"Unstar thread":"Star thread"),f(2),K(r.isStarred(i)?"star":"star_outline")}}function y6(n,t){if(n&1&&(u(0,"div",6)(1,"div",8),g(2),m(),st(3,b6,11,8,"div",9,u6),m()),n&2){let e=t.$implicit;f(2),K(e.label),f(),at(e.threads)}}function C6(n,t){n&1&&(u(0,"div",7),g(1,"No existing threads"),m())}function w6(n,t){if(n&1&&(u(0,"div",7),g(1),m()),n&2){let e=b(3);f(),Se('No threads matching "',e.searchQuery,'"')}}function x6(n,t){if(n&1&&(st(0,y6,5,1,"div",6,d6),I(2,C6,2,0,"div",7)(3,w6,2,1,"div",7)),n&2){let e,i=b(2);at(i.getGroupedThreads()),f(2),k(!((e=i.threads())!=null&&e.length)&&!i.searchQuery?2:i.searchQuery&&i.getGroupedThreads().length===0?3:-1)}}function E6(n,t){if(n&1&&(u(0,"div",1),I(1,m6,4,0,"div",3)(2,x6,4,1),m()),n&2){let e=b();f(),k(e.isLoadingThreadList()?1:2)}}function S6(n,t){n&1&&(u(0,"span",24),g(1,"No project selected"),m())}function M6(n,t){n&1&&(u(0,"span",24),g(1,"Loading..."),m())}function T6(n,t){if(n&1&&(u(0,"div",2),I(1,S6,2,0,"span",24)(2,M6,2,0,"span",24),m()),n&2){let e,i=b();f(),k((e=i.currentProject())!=null&&e.name?2:1)}}var i_=class n{projects=null;searchMode=!1;searchQuery="";searchModeChange=new U;projectStateService=d(qe);threadStateService=d(Rn);threadApiService=d(Ls);userService=d(n_);router=d(xn);currentThread=qn(this.threadStateService.selectedThread$);currentProject=qn(this.projectStateService.selectedProject$);threads=qn(this.threadStateService.threadList$);isLoadingThreadList=qn(this.threadStateService.isLoadingThreadList$);username=qn(this.userService.username$);editingThreadId=null;editingThreadName="";isRenamingThread=!1;renameErrorMessage="";ngOnInit(){this.userService.fetchCurrentUser().subscribe({error:t=>{console.error("[THREAD-SELECTOR] Failed to load current user:",t)}})}selectThread(t){this.threadStateService.selectThread(t),this.router.navigate(["project",this.currentProject()?.name,"thread",t])}getGroupedThreads(){let t=this.threads();if(!t?.length)return[];if(this.searchQuery&&this.searchQuery.trim()){let c=this.searchQuery.toLowerCase().trim();t=t.filter(p=>p.name.toLowerCase().includes(c))}if(!t.length)return[];let e=this.username();if(!e)return[];let i=t.filter(c=>c.starring&&c.starring.includes(e)),r=t.filter(c=>!c.starring||!c.starring.includes(e)),o=new Map,s=new Date;s.setHours(0,0,0,0);for(let c of r){let p=new Date(c.modifiedDate);p.setHours(0,0,0,0);let h=s.getTime()-p.getTime(),_=Math.floor(h/(1e3*60*60*24)),v;_===0?v="Today":_===1?v="Yesterday":_<7?v="This Week":_<30?v="This Month":_<90?v="Last 3 Months":v="Older",o.has(v)||o.set(v,[]),o.get(v).push(c)}let a=[];if(i.length>0){let c=[...i].sort((p,h)=>p.modifiedDate>h.modifiedDate?-1:1);a.push({label:"Starred",threads:c})}return["Today","Yesterday","This Week","This Month","Last 3 Months","Older"].filter(c=>o.has(c)).forEach(c=>{a.push({label:c,threads:o.get(c)})}),a}isStarred(t){let e=this.username();return!!e&&t.starring&&t.starring.includes(e)}toggleStar(t,e){t.stopPropagation();let i=this.username();if(!i)return;(e.starring&&e.starring.includes(i)?this.threadApiService.unstarThread(e.id):this.threadApiService.starThread(e.id)).subscribe({next:()=>{this.threadStateService.refreshThreadList()},error:s=>{console.error("Error toggling star:",s)}})}deleteThread(t,e){t.stopPropagation();let i=this.currentProject()?.name;!i||!confirm(`Are you sure you want to delete the thread "${e.name}"?`)||this.threadApiService.deleteThread(e.id).subscribe({next:()=>{this.currentThread()?.id===e.id&&(this.threadStateService.clearSelection(),this.router.navigate(["project",i])),this.threadStateService.refreshThreadList()},error:o=>{console.error("Error deleting thread:",o),alert("Failed to delete thread. Please try again.")}})}formatDate(t){try{let e=new Date(t),r=new Date().getTime()-e.getTime(),o=Math.floor(r/(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"}}startEditingThreadName(t,e){t.stopPropagation(),this.editingThreadId=e.id,this.editingThreadName=e.name||"",this.renameErrorMessage="",setTimeout(()=>{let i=document.querySelector(".thread-name-input");i&&(i.focus(),i.select())},0)}cancelEditingThreadName(){this.editingThreadId=null,this.editingThreadName="",this.renameErrorMessage=""}saveThreadName(t){if(t&&t.stopPropagation(),!this.editingThreadId)return;let e=this.editingThreadName.trim();if(!e){this.renameErrorMessage="Thread name cannot be empty";return}if(e.length>200){this.renameErrorMessage="Thread name is too long (max 200 characters)";return}let i=this.editingThreadId;this.isRenamingThread=!0,this.renameErrorMessage="",this.threadStateService.renameThread(i,e).subscribe({next:()=>{console.log("[THREAD-SELECTOR] Thread renamed successfully"),this.cancelEditingThreadName(),this.isRenamingThread=!1},error:r=>{console.error("[THREAD-SELECTOR] Error renaming thread:",r),this.renameErrorMessage=r.message||"Failed to rename thread",this.isRenamingThread=!1}})}onEditKeydown(t){t.key==="Enter"?(t.preventDefault(),t.stopPropagation(),this.saveThreadName()):t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.cancelEditingThreadName())}onEditBlur(){setTimeout(()=>{this.editingThreadId&&!this.isRenamingThread&&this.saveThreadName()},200)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-thread-selector"]],inputs:{searchMode:"searchMode",searchQuery:"searchQuery"},outputs:{searchModeChange:"searchModeChange"},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-loading"],[1,"loading-spinner"],[1,"loading-text"],[1,"thread-group"],[1,"thread-empty"],[1,"thread-group-header"],[1,"thread-item-wrapper",3,"current"],[1,"thread-item-wrapper"],[1,"thread-name-edit-wrapper"],["role","menuitem","tabindex","0",1,"thread-item",3,"title"],[1,"action-buttons"],["mat-icon-button","","title","Rename thread","type","button",1,"action-button","edit-button"],["mat-icon-button","","type","button",1,"action-button","star-button",3,"click","title"],["mat-icon-button","","title","Delete thread","type","button",1,"action-button","delete-button",3,"click"],["type","text","maxlength","200",1,"thread-name-input",3,"ngModelChange","keydown","blur","click","ngModel","disabled"],[1,"rename-error"],["role","menuitem","tabindex","0",1,"thread-item",3,"click","keydown.enter","keydown.space","title"],[1,"thread-name"],[1,"thread-name-spinner",3,"diameter"],[1,"thread-name","thread-name-generating"],["mat-icon-button","","title","Rename thread","type","button",1,"action-button","edit-button",3,"click"],[1,"disabled-text"]],template:function(e,i){if(e&1&&(u(0,"div",0),w("click",function(o){return o.stopPropagation()})("keydown",function(o){return o.stopPropagation()}),I(1,E6,3,1,"div",1)(2,T6,3,1,"div",2),m()),e&2){let r;f(),k((r=i.currentProject())!=null&&r.name?1:2)}},dependencies:[tt,Rt,Et,Pt,Vx,Tt,Ot,$e,vn,Gt,mi,Jt,Lv,Fv],styles:[".thread-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;min-height:0}.sidenav-thread-selector[_nghost-%COMP%] .thread-selector[_ngcontent-%COMP%], .sidenav-thread-selector [_nghost-%COMP%] .thread-selector[_ngcontent-%COMP%]{flex:1;min-height:0}.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-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;width:100%;border-radius:0;min-width:0;gap:.25rem}.thread-item-wrapper[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.thread-item-wrapper[_ngcontent-%COMP%]:hover .action-buttons[_ngcontent-%COMP%]{display:flex}.thread-item-wrapper.current[_ngcontent-%COMP%]{background:var(--color-primary-light)}.thread-item-wrapper.current[_ngcontent-%COMP%] .thread-item[_ngcontent-%COMP%]{color:var(--color-primary-text);font-weight:600}.thread-item[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;padding:.75rem 1rem;text-decoration:none;cursor:pointer;transition:all .2s ease;background:transparent;border:none;border-radius:0;color:var(--color-text);text-align:left;justify-content:flex-start}.thread-item.new-thread-item[_ngcontent-%COMP%]{margin-bottom:.25rem}.thread-item[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.thread-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.action-buttons[_ngcontent-%COMP%]{display:none;align-items:center;gap:.25rem;flex-shrink:0;margin-right:.5rem}.thread-item-wrapper[_ngcontent-%COMP%]:hover .action-buttons[_ngcontent-%COMP%], .thread-item-wrapper.current[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex}.action-button[_ngcontent-%COMP%]{flex-shrink:0;border-radius:4px!important;width:28px!important;height:28px!important;padding:0!important}.action-button[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple{border-radius:4px!important}.action-button[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)!important}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.action-button.edit-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.action-button.edit-button[_ngcontent-%COMP%]:hover{background-color:var(--color-primary-hover)!important}.action-button.edit-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.action-button.star-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{transition:color .2s ease}.action-button.star-button.starred[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fbbf24}.action-button.star-button[_ngcontent-%COMP%]:not(.starred):hover mat-icon[_ngcontent-%COMP%]{color:#fbbf24}.action-button.delete-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#ef4444}.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;min-width:0}.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}.thread-name.thread-name-generating[_ngcontent-%COMP%]{color:var(--color-text-muted);font-style:italic}.thread-name-edit-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;padding:0 .5rem}.thread-name-input[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-bg-secondary);color:var(--color-text-primary);font-size:.9rem;font-family:inherit}.thread-name-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 2px #3b82f61a}.thread-name-input[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.rename-error[_ngcontent-%COMP%]{color:var(--color-error);font-size:.75rem;margin-top:.25rem;padding-left:.5rem}.thread-name-spinner[_ngcontent-%COMP%]{flex-shrink:0;margin-right:.5rem}.thread-name-spinner[_ngcontent-%COMP%] .mat-mdc-progress-spinner circle{stroke:var(--color-primary)!important}.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-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem 1rem;gap:.75rem}.thread-loading[_ngcontent-%COMP%] .loading-spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:3px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}.thread-loading[_ngcontent-%COMP%] .loading-text[_ngcontent-%COMP%]{color:var(--color-text-muted);font-size:.8rem}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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 D6(n,t){if(n&1&&(u(0,"div",3),g(1),m()),n&2){let e=b();f(),Se("\u274C ",e.errorMessage)}}var Hm=class n{dialogRef=d(Si);data=d(Yr);jsonContent;errorMessage="";title;constructor(){this.jsonContent=this.data.initialContent,this.title=this.data.title||this.getDefaultTitle(this.data.configType,this.data.projectName)}getDefaultTitle(t,e){return t==="user"?"User Configuration":`Project Configuration: ${e||"Unknown"}`}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.dialogRef.close(t)}onCancel(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-json-editor"]],decls:13,vars:3,consts:[["mat-dialog-title",""],["mat-icon-button","","title","Close",1,"close-button",3,"click"],["spellcheck","false","placeholder","Enter JSON configuration...",1,"json-textarea",3,"ngModelChange","ngModel"],[1,"error-message"],["align","end"],["matButton","",3,"click"],["matButton","filled","color","primary",3,"click"]],template:function(e,i){e&1&&(u(0,"div",0),g(1),u(2,"button",1),w("click",function(){return i.onCancel()}),u(3,"mat-icon"),g(4,"close"),m()()(),u(5,"mat-dialog-content")(6,"textarea",2),q("ngModelChange",function(o){return Q(i.jsonContent,o)||(i.jsonContent=o),o}),m(),I(7,D6,2,1,"div",3),m(),u(8,"mat-dialog-actions",4)(9,"button",5),w("click",function(){return i.onCancel()}),g(10,"Cancel"),m(),u(11,"button",6),w("click",function(){return i.onSave()}),g(12,"Save"),m()()),e&2&&(f(),Se(" ",i.title," "),f(5),G("ngModel",i.jsonContent),f(),k(i.errorMessage?7:-1))},dependencies:[tt,Rt,Et,Pt,Tt,$e,Gt,Pn,Ro,No,Fo],styles:["[mat-dialog-title][_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-left:auto}mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;min-height:400px}.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}.error-message[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:4px;font-size:.875rem;line-height:1.4;background:#dc26261a;color:#dc2626;border:1px solid rgba(220,38,38,.3)}"]})};function I6(n,t){if(n&1){let e=V();u(0,"div",9)(1,"mat-form-field",18)(2,"mat-label"),g(3),m(),u(4,"textarea",19),q("ngModelChange",function(r){let o=E(e).$index,s=b();return Q(s.commands[o],r)||(s.commands[o]=r),S(r)}),m(),u(5,"mat-hint"),g(6,"Use placeholder for dynamic values"),m()(),u(7,"button",20),w("click",function(){let r=E(e).$index,o=b();return S(o.removeCommand(r))}),u(8,"mat-icon"),g(9,"delete"),m()()()}if(n&2){let e=t.$index,i=b();f(3),Se("Command ",e+1),f(),G("ngModel",i.commands[e]),f(3),D("disabled",i.commands.length===1)}}function k6(n,t){if(n&1){let e=V();u(0,"div",10)(1,"h3"),g(2,"Save to"),m(),u(3,"div",21)(4,"label",22)(5,"input",23),q("ngModelChange",function(r){E(e);let o=b();return Q(o.source,r)||(o.source=r),S(r)}),m(),u(6,"div",24)(7,"div",25)(8,"span",26),g(9,"\u{1F464}"),m(),u(10,"span",27),g(11,"Local"),m()(),u(12,"p",28),g(13,"Personal prompt in ~/.coday/... (not committed)"),m()()(),u(14,"label",22)(15,"input",29),q("ngModelChange",function(r){E(e);let o=b();return Q(o.source,r)||(o.source=r),S(r)}),m(),u(16,"div",24)(17,"div",25)(18,"span",26),g(19,"\u{1F4E6}"),m(),u(20,"span",27),g(21,"Project"),m()(),u(22,"p",28),g(23,"Shared prompt in ./prompts/ (committable)"),m()()()(),u(24,"p",30),g(25,"Storage location is permanent and cannot be changed after creation"),m()()}if(n&2){let e=b();f(4),j("selected",e.source==="local"),f(),G("ngModel",e.source),f(9),j("selected",e.source==="project"),f(),G("ngModel",e.source)}}function A6(n,t){if(n&1&&(u(0,"div",11)(1,"h3"),g(2,"Storage Location"),m(),u(3,"div",31)(4,"span",26),g(5),m(),u(6,"span",27),g(7),m()(),u(8,"p",30),g(9,"Cannot be changed after creation"),m()()),n&2){let e=b();f(3),j("badge-local",e.source==="local")("badge-project",e.source==="project"),f(2),K(e.source==="local"?"\u{1F464}":"\u{1F4E6}"),f(2),K(e.source==="local"?"Local":"Project")}}function O6(n,t){if(n&1){let e=V();u(0,"div",12)(1,"label",32)(2,"input",33),q("ngModelChange",function(r){E(e);let o=b();return Q(o.webhookEnabled,r)||(o.webhookEnabled=r),S(r)}),m(),u(3,"span"),g(4,"Enable webhook"),m()(),u(5,"p",30),g(6,"Enable webhook to trigger this prompt via HTTP POST"),m()()}if(n&2){let e=b();f(2),G("ngModel",e.webhookEnabled)}}function P6(n,t){if(n&1){let e=V();u(0,"div",13)(1,"div",34)(2,"mat-icon",35),g(3,"link"),m(),u(4,"h4"),g(5,"Webhook URL"),m()(),u(6,"div",36)(7,"p",37),g(8),m(),u(9,"button",38),w("click",function(){E(e);let r=b();return S(r.copyWebhookUrl())}),u(10,"mat-icon"),g(11,"content_copy"),m(),u(12,"span"),g(13,"Copy URL"),m()()(),u(14,"p",30),g(15,"Use this URL to trigger the prompt via HTTP POST"),m()()}if(n&2){let e=b();f(8),K(e.getWebhookUrl())}}function R6(n,t){if(n&1&&(u(0,"div",14)(1,"mat-icon"),g(2,"error"),m(),u(3,"span"),g(4),m()()),n&2){let e=b();f(4),K(e.errorMessage)}}var Um=class n{promptApi=d(Gi);dialogRef=d(Si);configApi=d(no);snackBar=d(mm);name="";description="";commands=[""];webhookEnabled=!1;threadLifetime="";source="local";isSaving=!1;errorMessage="";isAdmin=!1;isEditMode=!1;promptId="";data=d(Yr);constructor(){this.isEditMode=this.data.mode==="edit"}ngOnInit(){this.configApi.getUserConfig().subscribe({next:t=>{this.isAdmin=t.groups?.includes("CODAY_ADMIN")??!1},error:t=>{console.error("[PROMPT_FORM] Error loading user config:",t),this.isAdmin=!1}}),this.isEditMode&&this.data.prompt&&(this.promptId=this.data.prompt.id,this.name=this.data.prompt.name,this.description=this.data.prompt.description,this.commands=[...this.data.prompt.commands],this.webhookEnabled=this.data.prompt.webhookEnabled,this.source=this.data.prompt.source)}addCommand(){this.commands.push("")}removeCommand(t){this.commands.length>1&&this.commands.splice(t,1)}trackByIndex(t){return t}normalizeName(){this.name=this.name.replace(/[\s_.,;:!?()[\]{}]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}validateForm(){return this.name.trim()?this.description.trim()?this.commands.filter(e=>e.trim()).length===0?(this.errorMessage="At least one command is required",!1):!0:(this.errorMessage="Description is required",!1):(this.errorMessage="Name is required",!1)}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.commands.filter(e=>e.trim());if(this.isSaving=!0,this.isEditMode&&this.data.prompt){let e={name:this.name.trim(),description:this.description.trim(),commands:t,webhookEnabled:this.webhookEnabled};this.promptApi.updatePrompt(this.data.prompt.id,e).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:i=>{console.error("Error updating prompt:",i),this.errorMessage=i?.error?.error||i?.message||"Failed to update prompt",this.isSaving=!1}})}else{let e={name:this.name.trim(),description:this.description.trim(),commands:t,webhookEnabled:this.webhookEnabled,source:this.source};this.promptApi.createPrompt(e).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:i=>{console.error("Error creating prompt:",i),this.errorMessage=i?.error?.error||i?.message||"Failed to create prompt",this.isSaving=!1}})}}cancel(){this.dialogRef.close(!1)}getWebhookUrl(){return`${window.location.origin}/api/webhooks/${this.promptId}/execute`}copyWebhookUrl(){if(!this.webhookEnabled){this.snackBar.open("Webhook is not enabled","Close",{duration:3e3});return}if(!this.promptId){this.snackBar.open("Prompt must be saved before getting webhook URL","Close",{duration:3e3});return}let t=this.getWebhookUrl();navigator.clipboard.writeText(t).then(()=>{this.snackBar.open("Webhook URL copied to clipboard!","Close",{duration:3e3})}).catch(e=>{console.error("Failed to copy webhook URL:",e),this.snackBar.open("Failed to copy URL","Close",{duration:3e3})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-prompt-form"]],decls:36,vars:11,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-prompt","required","",3,"ngModelChange","blur","ngModel"],["matInput","","placeholder","What does this prompt do?","rows","3","required","",3,"ngModelChange","ngModel"],[1,"commands-section"],[1,"section-header"],["mat-icon-button","","type","button","title","Add command",3,"click"],[1,"commands-list"],[1,"command-item"],[1,"source-section"],[1,"source-display"],[1,"webhook-section"],[1,"webhook-url-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"command-field"],["matInput","","placeholder","Enter command with placeholders like \\{\\{key\\}\\}","rows","2",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove command",1,"remove-btn",3,"click","disabled"],[1,"source-options"],[1,"source-option"],["type","radio","name","source","value","local",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","source","value","project",3,"ngModelChange","ngModel"],[1,"hint"],[1,"source-badge"],[1,"checkbox-label"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"webhook-url-header"],[1,"webhook-icon"],[1,"webhook-url-content"],[1,"url-text"],["mat-raised-button","","color","accent","type","button",3,"click"]],template:function(e,i){e&1&&(u(0,"h2",0),g(1),m(),u(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),g(6,"Name"),m(),u(7,"input",3),q("ngModelChange",function(o){return Q(i.name,o)||(i.name=o),o}),w("blur",function(){return i.normalizeName()}),m(),u(8,"mat-hint"),g(9,"A descriptive name (spaces and punctuation will be replaced with hyphens)"),m()(),u(10,"mat-form-field",2)(11,"mat-label"),g(12,"Description"),m(),u(13,"textarea",4),q("ngModelChange",function(o){return Q(i.description,o)||(i.description=o),o}),m(),u(14,"mat-hint"),g(15,"Explain the purpose of this prompt"),m()(),u(16,"div",5)(17,"div",6)(18,"h3"),g(19,"Commands"),m(),u(20,"button",7),w("click",function(){return i.addCommand()}),u(21,"mat-icon"),g(22,"add"),m()()(),u(23,"div",8),st(24,I6,10,3,"div",9,hs),m()(),I(26,k6,26,6,"div",10),I(27,A6,10,6,"div",11),I(28,O6,7,1,"div",12),I(29,P6,16,1,"div",13),I(30,R6,5,1,"div",14),m()(),u(31,"mat-dialog-actions",15)(32,"button",16),w("click",function(){return i.cancel()}),g(33,"Cancel"),m(),u(34,"button",17),w("click",function(){return i.save()}),g(35),m()()),e&2&&(f(),K(i.isEditMode?"Edit Prompt":"Create Prompt"),f(6),G("ngModel",i.name),f(6),G("ngModel",i.description),f(11),at(i.commands),f(2),k(i.isEditMode?-1:26),f(),k(i.isEditMode?27:-1),f(),k(i.isAdmin?28:-1),f(),k(i.isEditMode&&i.webhookEnabled&&i.isAdmin?29:-1),f(),k(i.errorMessage?30:-1),f(2),D("disabled",i.isSaving),f(2),D("disabled",i.isSaving),f(),Se(" ",i.isSaving?"Saving...":"Save"," "))},dependencies:[tt,Rt,Et,kx,$a,Pt,Wa,Tt,Va,Ro,Fo,No,vn,Pn,Gt,mi,qi,Jn,Xn,$o,Jt,Ot,$e,Ic],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:500px}@media (max-width: 768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.commands-section[_ngcontent-%COMP%] .commands-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-field[_ngcontent-%COMP%]{flex:1}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.webhook-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.95rem}.webhook-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.webhook-url-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] .webhook-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] .url-text[_ngcontent-%COMP%]{flex:1;margin:0;padding:.75rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px;font-family:monospace;font-size:.85rem;word-break:break-all;color:var(--color-text)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap;display:flex;align-items:center;gap:.5rem}.webhook-url-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:1rem;font-weight:600}.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.75rem}@media (max-width: 768px){.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-section[_ngcontent-%COMP%] .source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.thread-lifetime-disabled[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:#2196f30d;border:1px solid rgba(33,150,243,.2);border-radius:8px;margin-bottom:1rem}.thread-lifetime-disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2196f3cc;font-size:1.25rem;width:1.25rem;height:1.25rem;margin-top:2px}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;flex:1}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.95rem;color:var(--color-text)}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:block;margin-top:.25rem;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-display[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-display[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;margin-bottom:.5rem}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.1rem}.source-display[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-display[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.source-display[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}"]})};function N6(n,t){n&1&&(u(0,"div",12),g(1,"Loading prompts..."),m())}function F6(n,t){if(n&1&&(u(0,"div",13),g(1),m()),n&2){let e=b();f(),K(e.errorMessage)}}function L6(n,t){n&1&&(u(0,"div",14),g(1," No prompts found. Create your first prompt to get started. "),m())}function j6(n,t){n&1&&(u(0,"div",14),g(1," No prompts match your search. "),m())}function V6(n,t){if(n&1&&(u(0,"span",31),g(1),m()),n&2){let e=b().$implicit;D("title",bo("Created by ",e.createdBy)),f(),Se(" \u{1F464} ",e.createdBy," ")}}function B6(n,t){if(n&1){let e=V();u(0,"button",32),w("click",function(){E(e);let r=b().$implicit,o=b(2);return S(o.toggleWebhook(r))}),g(1),m()}if(n&2){let e=b().$implicit;j("btn-webhook-enabled",e.webhookEnabled)("btn-webhook-disabled",!e.webhookEnabled),f(),Se(" ",e.webhookEnabled?"Disable Webhook":"Enable Webhook"," ")}}function z6(n,t){if(n&1){let e=V();u(0,"div",17)(1,"div",18)(2,"div",19)(3,"h3"),g(4),m(),u(5,"div",20)(6,"span",21),g(7),m(),wt(8,V6,2,3,"span",22),m()(),u(9,"p",23),g(10),m(),u(11,"div",24)(12,"span",25),g(13),m(),u(14,"span",26),g(15),m()()(),u(16,"div",27)(17,"button",28),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.editPrompt(r))}),g(18,"Edit"),m(),wt(19,B6,2,5,"button",29),u(20,"button",30),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.deletePrompt(r.id))}),g(21,"Delete"),m()()()}if(n&2){let e=t.$implicit,i=b(2);f(4),K(e.name),f(2),j("badge-local",e.source==="local")("badge-project",e.source==="project"),D("title",e.source==="local"?"Local prompt (~/.coday/)":"Project prompt (./prompts/)"),f(),Se(" ",e.source==="local"?"\u{1F464}":"\u{1F4E6}"," "),f(),D("ngIf",e.createdBy!==i.getCurrentUsername()),f(2),K(e.description),f(3),Se("ID: ",e.id),f(),j("enabled",e.webhookEnabled),f(),Se(" Webhook: ",e.webhookEnabled?"Enabled":"Disabled"," "),f(4),D("ngIf",i.isAdmin)}}function H6(n,t){if(n&1&&(u(0,"div",15),wt(1,z6,22,14,"div",16),m()),n&2){let e=b();f(),D("ngForOf",e.filteredPrompts)}}var r_=class n{promptApi=d(Gi);dialog=d(gr);configApi=d(no);prompts=[];filteredPrompts=[];searchQuery="";showOnlyMine=!0;isLoading=!1;errorMessage="";isAdmin=!1;currentUsername="";ngOnInit(){this.configApi.getUserConfig().subscribe({next:t=>{this.isAdmin=t.groups?.includes("CODAY_ADMIN")??!1,this.currentUsername=t.username??"",console.log("[PROMPT_MANAGER] Current username:",this.currentUsername)},error:t=>{console.error("[PROMPT_MANAGER] Error loading user config:",t),this.isAdmin=!1}}),this.loadPrompts()}loadPrompts(){this.isLoading=!0,this.promptApi.listPrompts().subscribe({next:t=>{this.prompts=t,this.applyFilter(),this.isLoading=!1},error:t=>{console.error("Error loading prompts:",t),this.errorMessage="Failed to load prompts",this.isLoading=!1}})}deletePrompt(t){confirm("Are you sure you want to delete this prompt?")&&this.promptApi.deletePrompt(t).subscribe({next:()=>{this.loadPrompts()},error:e=>{console.error("Error deleting prompt:",e);let i=e?.error?.error??e?.message??"Failed to delete prompt";alert(`Failed to delete prompt: ${i}`)}})}toggleWebhook(t){(t.webhookEnabled?this.promptApi.disableWebhook(t.id):this.promptApi.enableWebhook(t.id)).subscribe({next:()=>{this.loadPrompts()},error:i=>{console.error("Error toggling webhook:",i);let r=i?.error?.error??i?.message??"Failed to toggle webhook";alert(`Failed to toggle webhook: ${r}`)}})}createPrompt(){this.dialog.open(Um,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadPrompts()})}getCurrentUsername(){return this.currentUsername}normalizeUsername(t){return t.replace(/[.\s]+/g,"_")}isMyPrompt(t){if(!this.currentUsername)return!1;let e=this.normalizeUsername(this.currentUsername.toLowerCase());return this.normalizeUsername(t.createdBy.toLowerCase())===e}applyFilter(){let t=this.searchQuery.toLowerCase().trim(),e=this.showOnlyMine&&this.currentUsername?this.prompts.filter(i=>this.isMyPrompt(i)):[...this.prompts];t&&(e=e.filter(i=>i.name.toLowerCase().includes(t)||i.description.toLowerCase().includes(t)?!0:i.createdBy.toLowerCase().includes(t))),this.filteredPrompts=e}onSearchChange(){this.applyFilter()}editPrompt(t){this.promptApi.getPrompt(t.id).subscribe({next:e=>{this.dialog.open(Um,{width:"700px",maxHeight:"90vh",data:{mode:"edit",prompt:e}}).afterClosed().subscribe(r=>{r&&this.loadPrompts()})},error:e=>{console.error("Error loading prompt details:",e);let i=e?.error?.error??e?.message??"Failed to load prompt details";alert(`Failed to load prompt details: ${i}`)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-prompt-manager"]],decls:23,vars:7,consts:[[1,"prompt-manager"],[1,"header"],[1,"header-actions"],["appearance","outline",1,"search-field"],["matInput","","placeholder","Name, description, author...",3,"ngModelChange","input","ngModel"],["matPrefix",""],["color","primary",1,"mine-toggle",3,"ngModelChange","change","ngModel"],[1,"btn-create",3,"click"],["class","loading",4,"ngIf"],["class","error",4,"ngIf"],["class","empty",4,"ngIf"],["class","prompt-list",4,"ngIf"],[1,"loading"],[1,"error"],[1,"empty"],[1,"prompt-list"],["class","prompt-item",4,"ngFor","ngForOf"],[1,"prompt-item"],[1,"prompt-info"],[1,"prompt-header"],[1,"badges"],[1,"source-badge",3,"title"],["class","owner-badge",3,"title",4,"ngIf"],[1,"description"],[1,"meta"],["title","Prompt ID",1,"prompt-id"],[1,"webhook-status"],[1,"prompt-actions"],[1,"btn-primary",3,"click"],[3,"btn-webhook-enabled","btn-webhook-disabled","click",4,"ngIf"],[1,"btn-danger",3,"click"],[1,"owner-badge",3,"title"],[3,"click"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"h2"),g(3,"Prompts"),m(),u(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),g(7,"Search"),m(),u(8,"input",4),q("ngModelChange",function(o){return Q(i.searchQuery,o)||(i.searchQuery=o),o}),w("input",function(){return i.onSearchChange()}),m(),u(9,"mat-icon",5),g(10,"search"),m()(),u(11,"mat-slide-toggle",6),q("ngModelChange",function(o){return Q(i.showOnlyMine,o)||(i.showOnlyMine=o),o}),w("change",function(){return i.applyFilter()}),g(12," Mine "),m(),u(13,"button",7),w("click",function(){return i.createPrompt()}),u(14,"mat-icon"),g(15,"add"),m(),u(16,"span"),g(17,"Create Prompt"),m()()()(),wt(18,N6,2,0,"div",8)(19,F6,2,1,"div",9)(20,L6,2,0,"div",10)(21,j6,2,0,"div",10)(22,H6,2,1,"div",11),m()),e&2&&(f(8),G("ngModel",i.searchQuery),f(3),G("ngModel",i.showOnlyMine),f(7),D("ngIf",i.isLoading),f(),D("ngIf",i.errorMessage),f(),D("ngIf",!i.isLoading&&i.prompts.length===0),f(),D("ngIf",!i.isLoading&&i.prompts.length>0&&i.filteredPrompts.length===0),f(),D("ngIf",!i.isLoading&&i.filteredPrompts.length>0))},dependencies:[tt,Ql,pu,Rt,Et,Pt,Tt,Ot,$e,mi,qi,Jn,Xn,Xa,Jt,Jv,Za],styles:[".prompt-manager[_ngcontent-%COMP%]{padding:1.5rem .5rem 1.5rem 1.5rem}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-right:1rem}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:300px;margin-bottom:-1.25em}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .mine-toggle[_ngcontent-%COMP%]{margin-bottom:-1.25em}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border:none;border-radius:4px;background:var(--color-primary);color:#fff;cursor:pointer;font-size:1rem;font-weight:500;white-space:nowrap}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]:hover{opacity:.9}.prompt-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%]{padding:1rem 1.5rem 1rem 1rem;text-align:center;color:var(--color-text-secondary)}.error[_ngcontent-%COMP%]{color:var(--color-error)}.prompt-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding-right:1rem}.prompt-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}.prompt-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.prompt-info[_ngcontent-%COMP%]{flex:1}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;flex:1}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] .badges[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] .badges[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;font-size:1rem;cursor:help}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] .badges[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;border:1px solid rgba(33,150,243,.3)}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] .badges[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;border:1px solid rgba(76,175,80,.3)}.prompt-info[_ngcontent-%COMP%] .prompt-header[_ngcontent-%COMP%] .badges[_ngcontent-%COMP%] .owner-badge[_ngcontent-%COMP%]{font-size:.75rem;padding:.25rem .5rem;background:#2196f3;color:#fff;border-radius:4px;font-weight:400;white-space:nowrap}.prompt-info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin:0 0 .5rem;color:var(--color-text-secondary)}.prompt-info[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;gap:1rem;font-size:.85rem;color:var(--color-text-secondary)}.prompt-info[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .prompt-id[_ngcontent-%COMP%]{font-family:monospace;opacity:.7}.prompt-info[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .webhook-status.enabled[_ngcontent-%COMP%]{color:var(--color-success);font-weight:600}.prompt-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.prompt-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem}.prompt-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.prompt-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]:hover{opacity:.9}.prompt-actions[_ngcontent-%COMP%] button.btn-secondary[_ngcontent-%COMP%]{background:var(--color-secondary);color:#fff}.prompt-actions[_ngcontent-%COMP%] button.btn-secondary[_ngcontent-%COMP%]:hover{opacity:.9}.prompt-actions[_ngcontent-%COMP%] button.btn-webhook-enabled[_ngcontent-%COMP%]{background:#ff9800;color:#fff}.prompt-actions[_ngcontent-%COMP%] button.btn-webhook-enabled[_ngcontent-%COMP%]:hover{opacity:.9}.prompt-actions[_ngcontent-%COMP%] button.btn-webhook-disabled[_ngcontent-%COMP%]{background:#9e9e9e;color:#fff}.prompt-actions[_ngcontent-%COMP%] button.btn-webhook-disabled[_ngcontent-%COMP%]:hover{opacity:.9}.prompt-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]{background:var(--color-error);color:#fff}.prompt-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]:hover{opacity:.9}"]})};var od=class n{http=d(dt);projectState=d(qe);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createScheduler(t){return this.http.post(this.getBaseUrl(),t)}updateScheduler(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e)}deleteScheduler(t){return this.http.delete(`${this.getBaseUrl()}/${t}`)}enableScheduler(t){return this.http.post(`${this.getBaseUrl()}/${t}/enable`,{})}disableScheduler(t){return this.http.post(`${this.getBaseUrl()}/${t}/disable`,{})}runSchedulerNow(t){return this.http.post(`${this.getBaseUrl()}/${t}/run-now`,{})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var o_=(()=>{class n{_animationsDisabled=mt();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(i,r){i&2&&j("mat-pseudo-checkbox-indeterminate",r.state==="indeterminate")("mat-pseudo-checkbox-checked",r.state==="checked")("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal",r.appearance==="minimal")("mat-pseudo-checkbox-full",r.appearance==="full")("_mat-animation-noopable",r._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(i,r){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}
|
|
383
|
+
`],encapsulation:2,changeDetection:0})}return n})();var U6=["text"],$6=[[["mat-icon"]],"*"],W6=["mat-icon","*"];function G6(n,t){if(n&1&&H(0,"mat-pseudo-checkbox",1),n&2){let e=b();D("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function q6(n,t){if(n&1&&H(0,"mat-pseudo-checkbox",3),n&2){let e=b();D("disabled",e.disabled)}}function Y6(n,t){if(n&1&&(u(0,"span",4),g(1),m()),n&2){let e=b();f(),Se("(",e.group.label,")")}}var Xx=new A("MAT_OPTION_PARENT_COMPONENT"),Jx=new A("MatOptgroup");var Zx=class{source;isUserInput;constructor(t,e=!1){this.source=t,this.isUserInput=e}},Ja=(()=>{class n{_element=d(Z);_changeDetectorRef=d(Qe);_parent=d(Xx,{optional:!0});group=d(Jx,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=d(ut).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=Fe(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new U;_text;_stateChanges=new P;constructor(){let e=d(At);e.load(qr),e.load(xs),this._signalDisableRipple=!!this._parent&&Rr(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,i){let r=this._getHostElement();typeof r.focus=="function"&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!gn(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Zx(this,e))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-option"]],viewQuery:function(i,r){if(i&1&&xe(U6,7),i&2){let o;re(o=oe())&&(r._text=o.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(i,r){i&1&&w("click",function(){return r._selectViaInteraction()})("keydown",function(s){return r._handleKeydown(s)}),i&2&&($n("id",r.id),ne("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),j("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",ie]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:W6,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(i,r){i&1&&(Ge($6),I(0,G6,1,2,"mat-pseudo-checkbox",1),we(1),u(2,"span",2,0),we(4,1),m(),I(5,q6,1,1,"mat-pseudo-checkbox",3),I(6,Y6,2,1,"span",4),H(7,"div",5)),i&2&&(k(r.multiple?0:-1),f(5),k(!r.multiple&&r.selected&&!r.hideSingleSelectionIndicator?5:-1),f(),k(r.group&&r.group._inert?6:-1),f(),D("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[o_,Ms],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}
|
|
384
|
+
`],encapsulation:2,changeDetection:0})}return n})();function SR(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let s=0;s<n+1;s++)i[s].group&&i[s].group===r[o]&&o++;return o}return 0}function MR(n,t,e,i){return n<e?n:n+t>e+i?Math.max(0,n-i+t):e}var el=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new P;constructor(t=!1,e,i=!0,r){this._multiple=t,this._emitChanges=i,this.compareWith=r,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);let e=this.selected,i=new Set(t.map(o=>this._getConcreteValue(o)));t.forEach(o=>this._markSelected(o)),e.filter(o=>!i.has(this._getConcreteValue(o,i))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();let e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){t.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(t,e){if(this.compareWith){e=e??this._selection;for(let i of e)if(this.compareWith(t,i))return i;return t}else return t}};var TR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me]})}return n})();var eE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[xc,Me,TR,Ja]})}return n})();var Q6=["trigger"],K6=["panel"],Z6=[[["mat-select-trigger"]],"*"],X6=["mat-select-trigger","*"];function J6(n,t){if(n&1&&(u(0,"span",4),g(1),m()),n&2){let e=b();f(),K(e.placeholder)}}function eG(n,t){n&1&&we(0)}function tG(n,t){if(n&1&&(u(0,"span",11),g(1),m()),n&2){let e=b(2);f(),K(e.triggerValue)}}function nG(n,t){if(n&1&&(u(0,"span",5),I(1,eG,1,0)(2,tG,2,1,"span",11),m()),n&2){let e=b();f(),k(e.customTrigger?1:2)}}function iG(n,t){if(n&1){let e=V();u(0,"div",12,1),w("keydown",function(r){E(e);let o=b();return S(o._handleKeydown(r))}),we(2,1),m()}if(n&2){let e=b();si(bo("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),j("mat-select-panel-animations-enabled",!e._animationsDisabled),D("ngClass",e.panelClass),ne("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var tE=new A("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=d(me);return()=>La(n)}});function DR(n){let t=d(me);return()=>La(t)}var IR=new A("MAT_SELECT_CONFIG"),kR={provide:tE,deps:[],useFactory:DR},AR=new A("MatSelectTrigger"),s_=class{source;value;constructor(t,e){this.source=t,this.value=e}},nE=(()=>{class n{_viewportRuler=d(Ao);_changeDetectorRef=d(Qe);_elementRef=d(Z);_dir=d(En,{optional:!0});_idGenerator=d(ut);_renderer=d(et);_parentFormField=d(zm,{optional:!0});ngControl=d(Xr,{self:!0,optional:!0});_liveAnnouncer=d(nm);_defaultOptions=d(IR,{optional:!0});_animationsDisabled=mt();_initialized=new P;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let i=this.options.toArray()[e];if(i){let r=this.panel.nativeElement,o=SR(e,this.options,this.optionGroups),s=i._getHostElement();e===0&&o===1?r.scrollTop=0:r.scrollTop=MR(s.offsetTop,s.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new s_(this,e)}_scrollStrategyFactory=d(tE);_panelOpen=!1;_compareWith=(e,i)=>e===i;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new P;_errorStateTracker;stateChanges=new P;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=Fe(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Fc.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Zi(()=>{let e=this.options;return e?e.changes.pipe(Ht(e),lt(()=>Xi(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(lt(()=>this.optionSelectionChanges))});openedChange=new U;_openedStream=this.openedChange.pipe(ue(e=>e),z(()=>{}));_closedStream=this.openedChange.pipe(ue(e=>!e),z(()=>{}));selectionChange=new U;valueChange=new U;constructor(){let e=d(t_),i=d(Pm,{optional:!0}),r=d(Nm,{optional:!0}),o=d(new _i("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new id(e,this.ngControl,r,i,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=o==null?0:parseInt(o)||0,this.id=this.id}ngOnInit(){this._selectionModel=new el(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe($(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe($(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(Ht(null),$(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(this._previousControl!==void 0&&i.disabled!==null&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(Ye(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=`${this.id}-panel`;this._trackedModal&&Rg(this._trackedModal,"aria-owns",i),Bw(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;Rg(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{i(),clearTimeout(r),this._cleanupDetach=void 0};let e=this.panel.nativeElement,i=this._renderer.listen(e,"animationend",o=>{o.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),r=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let i=e.keyCode,r=i===40||i===38||i===37||i===39,o=i===13||i===32,s=this._keyManager;if(!s.isTyping()&&o&&!gn(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let a=this.selected;s.onKeydown(e);let l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,r=e.keyCode,o=r===40||r===38,s=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(!s&&(r===13||r===32)&&i.activeItem&&!gn(e))e.preventDefault(),i.activeItem._selectViaInteraction();else if(!s&&this._multiple&&r===65&&e.ctrlKey){e.preventDefault();let a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{let a=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!gn(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{let i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return(r.value!=null||this.canSelectNullableOptions)&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Mc?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new sm(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=Xi(this.options.changes,this._destroy);this.optionSelectionChanges.pipe($(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Xi(...this.options.map(i=>i._stateChanges)).pipe($(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){let r=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i;this.multiple?i=this.selected.map(r=>r.value):i=this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let i=0;i<this.options.length;i++)if(!this.options.get(i).disabled){e=i;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-select"]],contentQueries:function(i,r,o){if(i&1&&(cn(o,AR,5),cn(o,Ja,5),cn(o,Jx,5)),i&2){let s;re(s=oe())&&(r.customTrigger=s.first),re(s=oe())&&(r.options=s),re(s=oe())&&(r.optionGroups=s)}},viewQuery:function(i,r){if(i&1&&(xe(Q6,5),xe(K6,5),xe(Yg,5)),i&2){let o;re(o=oe())&&(r.trigger=o.first),re(o=oe())&&(r.panel=o.first),re(o=oe())&&(r._overlayDir=o.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(i,r){i&1&&w("keydown",function(s){return r._handleKeydown(s)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),i&2&&(ne("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),j("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple)("mat-select-open",r.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",ie],disableRipple:[2,"disableRipple","disableRipple",ie],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ai(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",ie],placeholder:"placeholder",required:[2,"required","required",ie],multiple:[2,"multiple","multiple",ie],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",ie],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",ai],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",ie]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[je([{provide:Bm,useExisting:n},{provide:Xx,useExisting:n}]),We],ngContentSelectors:X6,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(i,r){if(i&1){let o=V();Ge(Z6),u(0,"div",2,0),w("click",function(){return E(o),S(r.open())}),u(3,"div",3),I(4,J6,2,1,"span",4)(5,nG,3,1,"span",5),m(),u(6,"div",6)(7,"div",7),or(),u(8,"svg",8),H(9,"path",9),m()()()(),wt(10,iG,3,10,"ng-template",10),w("detach",function(){return E(o),S(r.close())})("backdropClick",function(){return E(o),S(r.close())})("overlayKeydown",function(a){return E(o),S(r._handleOverlayKeydown(a))})}if(i&2){let o=oi(1);f(3),ne("id",r._valueId),f(),k(r.empty?4:5),f(6),D("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||o)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[Mc,Yg,va],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
|
|
385
|
+
`],encapsulation:2,changeDetection:0})}return n})();var $m=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({providers:[kR],imports:[Po,eE,Me,Ra,Jt,eE,Me]})}return n})();var oG=["input"],sG=["label"],aG=["*"],lG=new A("mat-checkbox-default-options",{providedIn:"root",factory:PR});function PR(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var Nn=(function(n){return n[n.Init=0]="Init",n[n.Checked=1]="Checked",n[n.Unchecked=2]="Unchecked",n[n.Indeterminate=3]="Indeterminate",n})(Nn||{}),iE=class{source;checked},OR=PR(),rE=(()=>{class n{_elementRef=d(Z);_changeDetectorRef=d(Qe);_ngZone=d(Y);_animationsDisabled=mt();_options=d(lG,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new iE;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new U;indeterminateChange=new U;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Nn.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){d(At).load(qr);let e=d(new _i("tabindex"),{optional:!0});this._options=this._options||OR,this.color=this._options.color||OR.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=d(ut).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let i=e!=this._indeterminate();this._indeterminate.set(e),i&&(e?this._transitionCheckState(Nn.Indeterminate):this._transitionCheckState(this.checked?Nn.Checked:Nn.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=Fe(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(!(i===e||!r)&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Nn.Checked:Nn.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if(this._animationsDisabled)return"";switch(e){case Nn.Init:if(i===Nn.Checked)return this._animationClasses.uncheckedToChecked;if(i==Nn.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Nn.Unchecked:return i===Nn.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Nn.Checked:return i===Nn.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Nn.Indeterminate:return i===Nn.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-checkbox"]],viewQuery:function(i,r){if(i&1&&(xe(oG,5),xe(sG,5)),i&2){let o;re(o=oe())&&(r._inputElement=o.first),re(o=oe())&&(r._labelElement=o.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(i,r){i&2&&($n("id",r.id),ne("tabindex",null)("aria-label",null)("aria-labelledby",null),si(r.color?"mat-"+r.color:"mat-accent"),j("_mat-animation-noopable",r._animationsDisabled)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",ie],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",ie],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",ie],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:ai(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie],checked:[2,"checked","checked",ie],disabled:[2,"disabled","disabled",ie],indeterminate:[2,"indeterminate","indeterminate",ie]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[je([{provide:ui,useExisting:Ct(()=>n),multi:!0},{provide:yr,useExisting:n,multi:!0}]),We],ngContentSelectors:aG,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(i,r){if(i&1){let o=V();Ge(),u(0,"div",3),w("click",function(a){return E(o),S(r._preventBubblingFromLabel(a))}),u(1,"div",4,0)(3,"div",5),w("click",function(){return E(o),S(r._onTouchTargetClick())}),m(),u(4,"input",6,1),w("blur",function(){return E(o),S(r._onBlur())})("click",function(){return E(o),S(r._onInputClick())})("change",function(a){return E(o),S(r._onInteractionEvent(a))}),m(),H(6,"div",7),u(7,"div",8),or(),u(8,"svg",9),H(9,"path",10),m(),Al(),H(10,"div",11),m(),H(11,"div",12),m(),u(12,"label",13,2),we(14),m()()}if(i&2){let o=oi(2);D("labelPosition",r.labelPosition),f(4),j("mdc-checkbox--selected",r.checked),D("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),ne("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-controls",r.ariaControls)("aria-disabled",r.disabled&&r.disabledInteractive?!0:null)("aria-expanded",r.ariaExpanded)("aria-owns",r.ariaOwns)("name",r.name)("value",r.value),f(7),D("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),f(),D("for",r.inputId)}},dependencies:[Ms,Zv],styles:[`.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover>.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover>.mat-mdc-checkbox-ripple>.mat-ripple-element{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control+.mdc-checkbox__ripple{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;width:var(--mat-checkbox-state-layer-size, 40px);height:var(--mat-checkbox-state-layer-size, 40px);top:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);right:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mat-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__background{border-color:GrayText}}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}@media(forced-colors: active){.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{border-color:GrayText}}.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:GrayText}}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:GrayText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:GrayText}}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-touch-target,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__native-control,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__ripple,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-ripple::before,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__mixedmark{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{color:GrayText}}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-checkbox-touch-target-size, 48px);width:var(--mat-checkbox-touch-target-size, 48px);transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""}
|
|
386
|
+
`],encapsulation:2,changeDetection:0})}return n})(),RR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[rE,Me,Me]})}return n})();var dG=["button"],uG=["*"];function mG(n,t){if(n&1&&(u(0,"div",2),H(1,"mat-pseudo-checkbox",6),m()),n&2){let e=b();f(),D("disabled",e.disabled)}}var NR=new A("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:pG});function pG(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var FR=new A("MatButtonToggleGroup"),fG={provide:ui,useExisting:Ct(()=>oE),multi:!0},a_=class{source;value;constructor(t,e){this.source=t,this.value=e}},oE=(()=>{class n{_changeDetector=d(Qe);_dir=d(En,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=d(ut).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new U;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new U;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=d(NR,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new el(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||gn(e))return;let r=e.target.id,o=this._buttonToggles.toArray().findIndex(a=>a.buttonId===r),s=null;switch(e.keyCode){case 32:case 13:s=this._buttonToggles.get(o)||null;break;case 38:s=this._getNextButton(o,-1);break;case 37:s=this._getNextButton(o,this.dir==="ltr"?-1:1);break;case 40:s=this._getNextButton(o,1);break;case 39:s=this._getNextButton(o,this.dir==="ltr"?1:-1);break;default:return}s&&(e.preventDefault(),s._onButtonClick(),s.focus())}_emitChangeEvent(e){let i=new a_(e,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,r=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,r)):this._updateModelValue(e,r)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>e.value!=null&&i===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let i=this._buttonToggles.get(e);if(!i.disabled){i.tabIndex=0;break}}}_getNextButton(e,i){let r=this._buttonToggles;for(let o=1;o<=r.length;o++){let s=(e+i*o+r.length)%r.length,a=r.get(s);if(a&&!a.disabled)return a}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let i=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(r=>this._selectValue(r,i))):(this._clearSelection(),this._selectValue(e,i)),!this.multiple&&i.every(r=>r.tabIndex===-1)){for(let r of i)if(!r.disabled){r.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,i){for(let r of i)if(r.value===e){r.checked=!0,this._selectionModel.select(r),this.multiple||(r.tabIndex=0);break}}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(i){return new(i||n)};static \u0275dir=X({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,r,o){if(i&1&&cn(o,l_,5),i&2){let s;re(s=oe())&&(r._buttonToggles=s)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(i,r){i&1&&w("keydown",function(s){return r._keydown(s)}),i&2&&(ne("role",r.multiple?"group":"radiogroup")("aria-disabled",r.disabled),j("mat-button-toggle-vertical",r.vertical)("mat-button-toggle-group-appearance-standard",r.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",ie],value:"value",multiple:[2,"multiple","multiple",ie],disabled:[2,"disabled","disabled",ie],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",ie],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",ie]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[je([fG,{provide:FR,useExisting:n}])]})}return n})(),l_=(()=>{class n{_changeDetectorRef=d(Qe);_elementRef=d(Z);_focusMonitor=d(fr);_idGenerator=d(ut);_animationDisabled=mt();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new U;constructor(){d(At).load(qr);let e=d(FR,{optional:!0}),i=d(new _i("tabindex"),{optional:!0})||"",r=d(NR,{optional:!0});this._tabIndex=Fe(parseInt(i)||0),this.buttonToggleGroup=e,this.appearance=r&&r.appearance?r.appearance:"standard",this.disabledInteractive=r?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let i=this.buttonToggleGroup._buttonToggles.find(r=>r.tabIndex===0);i&&(i.tabIndex=-1),this.tabIndex=0}this.change.emit(new a_(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=R({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(i,r){if(i&1&&xe(dG,5),i&2){let o;re(o=oe())&&(r._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(i,r){i&1&&w("focus",function(){return r.focus()}),i&2&&(ne("aria-label",null)("aria-labelledby",null)("id",r.id)("name",null),j("mat-button-toggle-standalone",!r.buttonToggleGroup)("mat-button-toggle-checked",r.checked)("mat-button-toggle-disabled",r.disabled)("mat-button-toggle-disabled-interactive",r.disabledInteractive)("mat-button-toggle-appearance-standard",r.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",ie],appearance:"appearance",checked:[2,"checked","checked",ie],disabled:[2,"disabled","disabled",ie],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ie]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:uG,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(i,r){if(i&1){let o=V();Ge(),u(0,"button",1,0),w("click",function(){return E(o),S(r._onButtonClick())}),I(2,mG,2,1,"div",2),u(3,"span",3),we(4),m()(),H(5,"span",4)(6,"span",5)}if(i&2){let o=oi(1);D("id",r.buttonId)("disabled",r.disabled&&!r.disabledInteractive||null),ne("role",r.isSingleSelector()?"radio":"button")("tabindex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("aria-pressed",r.isSingleSelector()?null:r.checked)("aria-checked",r.isSingleSelector()?r.checked:null)("name",r._getButtonName())("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),f(2),k(r.buttonToggleGroup&&(!r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideSingleSelectionIndicator||r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),f(4),D("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)}},dependencies:[Ms,o_],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
387
|
+
`],encapsulation:2,changeDetection:0})}return n})(),LR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ee({type:n});static \u0275inj=J({imports:[Me,xc,l_,Me]})}return n})();var gG=(n,t)=>t.id,vG=(n,t)=>t.value;function _G(n,t){if(n&1&&(u(0,"mat-option",5),g(1),m()),n&2){let e=t.$implicit;D("value",e.id),f(),Se(" ",e.name," ")}}function bG(n,t){if(n&1){let e=V();u(0,"mat-checkbox",35),w("change",function(){let r=E(e).$implicit,o=b();return S(o.toggleDayOfWeek(r.value))}),g(1),m()}if(n&2){let e=t.$implicit,i=b();D("checked",i.isDaySelected(e.value)),f(),Se(" ",e.label," ")}}function yG(n,t){if(n&1){let e=V();u(0,"mat-form-field",2)(1,"mat-label"),g(2,"Number of Occurrences"),m(),u(3,"input",10),q("ngModelChange",function(r){E(e);let o=b();return Q(o.endOccurrences,r)||(o.endOccurrences=r),S(r)}),m()()}if(n&2){let e=b();f(3),G("ngModel",e.endOccurrences)}}function CG(n,t){if(n&1){let e=V();u(0,"mat-form-field",2)(1,"mat-label"),g(2,"End Date"),m(),u(3,"input",36),q("ngModelChange",function(r){E(e);let o=b();return Q(o.endTimestamp,r)||(o.endTimestamp=r),S(r)}),m()()}if(n&2){let e=b();f(3),G("ngModel",e.endTimestamp)}}function wG(n,t){if(n&1){let e=V();u(0,"div")(1,"mat-form-field",2)(2,"mat-label"),g(3,"Parameter Value"),m(),u(4,"input",37),q("ngModelChange",function(r){E(e);let o=b();return Q(o.simpleParameter,r)||(o.simpleParameter=r),S(r)}),m(),u(5,"mat-hint"),g(6),m()()()}if(n&2){let e=b();f(4),G("ngModel",e.simpleParameter),f(2),Se("Simple value for ","{{PARAMETERS}}"," placeholder or appended to first command")}}function xG(n,t){if(n&1){let e=V();u(0,"div",40)(1,"mat-form-field",41)(2,"mat-label"),g(3,"Key"),m(),u(4,"input",42),q("ngModelChange",function(r){let o=E(e).$implicit;return Q(o.key,r)||(o.key=r),S(r)}),m()(),u(5,"mat-form-field",43)(6,"mat-label"),g(7,"Value"),m(),u(8,"input",44),q("ngModelChange",function(r){let o=E(e).$implicit;return Q(o.value,r)||(o.value=r),S(r)}),m()(),u(9,"button",45),w("click",function(){let r=E(e).$index,o=b(3);return S(o.removeParameter(r))}),u(10,"mat-icon"),g(11,"delete"),m()()()}if(n&2){let e=t.$implicit;f(4),G("ngModel",e.key),f(4),G("ngModel",e.value)}}function EG(n,t){if(n&1&&(u(0,"div",39),st(1,xG,12,2,"div",40,hs),m()),n&2){let e=b(2);f(),at(e.parameters)}}function SG(n,t){if(n&1){let e=V();u(0,"div")(1,"div",26)(2,"button",38),w("click",function(){E(e);let r=b();return S(r.addParameter())}),u(3,"mat-icon"),g(4,"add"),m()()(),I(5,EG,3,0,"div",39),u(6,"p",19),g(7),m()()}if(n&2){let e=b();f(5),k(e.parameters.length>0?5:-1),f(2),Se("Key-value pairs for ","{{key}}"," placeholders in prompt commands")}}function MG(n,t){if(n&1&&(u(0,"div",31)(1,"mat-icon"),g(2,"error"),m(),u(3,"span"),g(4),m()()),n&2){let e=b();f(4),K(e.errorMessage)}}var Wm=class n{schedulerApi=d(od);promptApi=d(Gi);dialogRef=d(Si);availablePrompts=[];isLoadingPrompts=!1;name="";promptId="";enabled=!0;startTimestamp="";intervalValue=1;intervalUnit="h";daysOfWeek=[];endConditionType="none";endOccurrences=10;endTimestamp="";parameterMode="simple";simpleParameter="";parameters=[];isSaving=!1;errorMessage="";isEditMode=!1;schedulerId="";data=d(Yr);daysOfWeekOptions=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}];constructor(){this.isEditMode=this.data.mode==="edit"}ngOnInit(){if(this.loadPrompts(),this.isEditMode||(this.startTimestamp=this.formatDateForInput(new Date)),this.isEditMode&&this.data.scheduler){if(this.schedulerId=this.data.scheduler.id,this.name=this.data.scheduler.name,this.promptId=this.data.scheduler.promptId,this.enabled=this.data.scheduler.enabled,this.data.scheduler.schedule.startTimestamp){let e=new Date(this.data.scheduler.schedule.startTimestamp);this.startTimestamp=this.formatDateForInput(e)}let t=this.data.scheduler.schedule.interval.match(/^(\d+)(min|h|d|M)$/);t&&t[1]&&t[2]&&(this.intervalValue=parseInt(t[1],10),this.intervalUnit=t[2]),this.daysOfWeek=this.data.scheduler.schedule.daysOfWeek||[],this.data.scheduler.schedule.endCondition&&(this.endConditionType=this.data.scheduler.schedule.endCondition.type,this.endConditionType==="occurrences"?this.endOccurrences=this.data.scheduler.schedule.endCondition.value:this.endConditionType==="endTimestamp"&&(this.endTimestamp=this.data.scheduler.schedule.endCondition.value)),this.data.scheduler.parameters&&(typeof this.data.scheduler.parameters=="object"&&Object.keys(this.data.scheduler.parameters).length===1&&"PARAMETERS"in this.data.scheduler.parameters?(this.parameterMode="simple",this.simpleParameter=String(this.data.scheduler.parameters.PARAMETERS)):(this.parameterMode="structured",this.parameters=Object.entries(this.data.scheduler.parameters).map(([e,i])=>({key:e,value:String(i)}))))}}loadPrompts(){this.isLoadingPrompts=!0,this.promptApi.listPrompts().subscribe({next:t=>{this.availablePrompts=t,this.isLoadingPrompts=!1},error:t=>{console.error("Error loading prompts:",t),this.errorMessage="Failed to load prompts",this.isLoadingPrompts=!1}})}toggleDayOfWeek(t){let e=this.daysOfWeek.indexOf(t);e>-1?this.daysOfWeek.splice(e,1):this.daysOfWeek.push(t),this.daysOfWeek.sort()}isDaySelected(t){return this.daysOfWeek.includes(t)}addParameter(){this.parameters.push({key:"",value:""})}removeParameter(t){this.parameters.splice(t,1)}trackByIndex(t){return t}formatDateForInput(t){let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0");return`${e}-${i}-${r}T${o}:${s}`}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!this.promptId)return this.errorMessage="Prompt is required",!1;if(this.intervalValue<1)return this.errorMessage="Interval must be at least 1",!1;switch(this.intervalUnit){case"min":if(this.intervalValue>59)return this.errorMessage="Minutes interval must be between 1 and 59 (use hours for longer)",!1;break;case"h":if(this.intervalValue>24)return this.errorMessage="Hours interval must be between 1 and 24 (use days for longer)",!1;break;case"d":if(this.intervalValue>31)return this.errorMessage="Days interval must be between 1 and 31 (use months for longer)",!1;break;case"M":if(this.intervalValue>12)return this.errorMessage="Months interval must be between 1 and 12",!1;break}return this.endConditionType==="occurrences"&&this.endOccurrences<1?(this.errorMessage="Occurrences must be at least 1",!1):this.endConditionType==="endTimestamp"&&!this.endTimestamp?(this.errorMessage="End date is required",!1):!0}buildSchedule(){let e={startTimestamp:(this.startTimestamp?new Date(this.startTimestamp):new Date).toISOString(),interval:`${this.intervalValue}${this.intervalUnit}`};return this.daysOfWeek.length>0&&(e.daysOfWeek=[...this.daysOfWeek]),this.endConditionType==="occurrences"?e.endCondition={type:"occurrences",value:this.endOccurrences}:this.endConditionType==="endTimestamp"&&(e.endCondition={type:"endTimestamp",value:this.endTimestamp}),e}buildParameters(){if(this.parameterMode==="simple")return this.simpleParameter.trim()?{PARAMETERS:this.simpleParameter.trim()}:void 0;let t=this.parameters.filter(i=>i.key.trim());if(t.length===0)return;let e={};return t.forEach(i=>{e[i.key]=i.value}),e}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildSchedule(),e=this.buildParameters();this.isSaving=!0,this.isEditMode&&this.schedulerId?this.schedulerApi.updateScheduler(this.schedulerId,{name:this.name.trim(),enabled:this.enabled,promptId:this.promptId,schedule:t,parameters:e}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:i=>{console.error("Error updating scheduler:",i),this.errorMessage=i?.error?.error||i?.message||"Failed to update scheduler",this.isSaving=!1}}):this.schedulerApi.createScheduler({name:this.name.trim(),promptId:this.promptId,schedule:t,parameters:e,enabled:this.enabled}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:i=>{console.error("Error creating scheduler:",i),this.errorMessage=i?.error?.error||i?.message||"Failed to create scheduler",this.isSaving=!1}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-scheduler-form"]],decls:89,vars:17,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","My Scheduler","required","",3,"ngModelChange","ngModel"],["required","",3,"ngModelChange","ngModel"],[3,"value"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"],[1,"interval-section"],[1,"interval-fields"],["appearance","outline",1,"interval-value"],["matInput","","type","number","min","1","required","",3,"ngModelChange","ngModel"],["appearance","outline",1,"interval-unit"],["value","min"],["value","h"],["value","d"],["value","M"],[1,"days-section"],[1,"days-checkboxes"],[3,"checked"],[1,"hint"],[1,"end-condition-section"],[3,"ngModelChange","ngModel"],["value","none"],["value","occurrences"],["value","endTimestamp"],[1,"parameters-section"],[1,"section-header"],[1,"mode-toggle",3,"ngModelChange","ngModel"],["value","simple"],["value","structured"],[1,"enabled-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],[3,"change","checked"],["matInput","","type","datetime-local","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g., 1234 or staging",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add parameter",3,"click"],[1,"parameters-list"],[1,"parameter-item"],["appearance","outline",1,"param-key"],["matInput","","placeholder","parameterName",3,"ngModelChange","ngModel"],["appearance","outline",1,"param-value"],["matInput","","placeholder","value",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove parameter",1,"remove-btn",3,"click"]],template:function(e,i){e&1&&(u(0,"h2",0),g(1),m(),u(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),g(6,"Name"),m(),u(7,"input",3),q("ngModelChange",function(o){return Q(i.name,o)||(i.name=o),o}),m(),u(8,"mat-hint"),g(9,"A descriptive name for this scheduler"),m()(),u(10,"mat-form-field",2)(11,"mat-label"),g(12,"Prompt"),m(),u(13,"mat-select",4),q("ngModelChange",function(o){return Q(i.promptId,o)||(i.promptId=o),o}),st(14,_G,2,2,"mat-option",5,gG),m(),u(16,"mat-hint"),g(17,"Select the prompt to execute"),m()(),u(18,"mat-form-field",2)(19,"mat-label"),g(20,"Start Date & Time"),m(),u(21,"input",6),q("ngModelChange",function(o){return Q(i.startTimestamp,o)||(i.startTimestamp=o),o}),m(),u(22,"mat-hint"),g(23,"When to start the scheduler (leave empty for now)"),m()(),u(24,"div",7)(25,"h3"),g(26,"Schedule Interval"),m(),u(27,"div",8)(28,"mat-form-field",9)(29,"mat-label"),g(30,"Every"),m(),u(31,"input",10),q("ngModelChange",function(o){return Q(i.intervalValue,o)||(i.intervalValue=o),o}),m()(),u(32,"mat-form-field",11)(33,"mat-label"),g(34,"Unit"),m(),u(35,"mat-select",4),q("ngModelChange",function(o){return Q(i.intervalUnit,o)||(i.intervalUnit=o),o}),u(36,"mat-option",12),g(37,"Minutes (1-59)"),m(),u(38,"mat-option",13),g(39,"Hours (1-24)"),m(),u(40,"mat-option",14),g(41,"Days (1-31)"),m(),u(42,"mat-option",15),g(43,"Months (1-12)"),m()()()()(),u(44,"div",16)(45,"h3"),g(46,"Days of Week (Optional)"),m(),u(47,"div",17),st(48,bG,2,2,"mat-checkbox",18,vG),m(),u(50,"p",19),g(51,"Leave empty to run every day"),m()(),u(52,"div",20)(53,"h3"),g(54,"End Condition (Optional)"),m(),u(55,"mat-form-field",2)(56,"mat-label"),g(57,"End Type"),m(),u(58,"mat-select",21),q("ngModelChange",function(o){return Q(i.endConditionType,o)||(i.endConditionType=o),o}),u(59,"mat-option",22),g(60,"Never (run indefinitely)"),m(),u(61,"mat-option",23),g(62,"After X occurrences"),m(),u(63,"mat-option",24),g(64,"Until specific date"),m()()(),I(65,yG,4,1,"mat-form-field",2),I(66,CG,4,1,"mat-form-field",2),m(),u(67,"div",25)(68,"div",26)(69,"h3"),g(70,"Parameters (Optional)"),m(),u(71,"mat-button-toggle-group",27),q("ngModelChange",function(o){return Q(i.parameterMode,o)||(i.parameterMode=o),o}),u(72,"mat-button-toggle",28),g(73,"Simple"),m(),u(74,"mat-button-toggle",29),g(75,"Structured"),m()()(),I(76,wG,7,2,"div"),I(77,SG,8,2,"div"),m(),u(78,"div",30)(79,"mat-checkbox",21),q("ngModelChange",function(o){return Q(i.enabled,o)||(i.enabled=o),o}),g(80,"Enabled"),m(),u(81,"p",19),g(82,"Scheduler will only run if enabled"),m()(),I(83,MG,5,1,"div",31),m()(),u(84,"mat-dialog-actions",32)(85,"button",33),w("click",function(){return i.cancel()}),g(86,"Cancel"),m(),u(87,"button",34),w("click",function(){return i.save()}),g(88),m()()),e&2&&(f(),K(i.isEditMode?"Edit Scheduler":"Create Scheduler"),f(6),G("ngModel",i.name),f(6),G("ngModel",i.promptId),f(),at(i.availablePrompts),f(7),G("ngModel",i.startTimestamp),f(10),G("ngModel",i.intervalValue),f(4),G("ngModel",i.intervalUnit),f(13),at(i.daysOfWeekOptions),f(10),G("ngModel",i.endConditionType),f(7),k(i.endConditionType==="occurrences"?65:-1),f(),k(i.endConditionType==="endTimestamp"?66:-1),f(5),G("ngModel",i.parameterMode),f(5),k(i.parameterMode==="simple"?76:-1),f(),k(i.parameterMode==="structured"?77:-1),f(2),G("ngModel",i.enabled),f(4),k(i.errorMessage?83:-1),f(2),D("disabled",i.isSaving),f(2),D("disabled",i.isSaving),f(),Se(" ",i.isSaving?"Saving...":"Save"," "))},dependencies:[tt,Rt,Et,Rm,Pt,Wa,Fm,Tt,Va,Ro,Fo,No,vn,Pn,Gt,mi,qi,Jn,Xn,$o,Jt,Ot,$e,$m,nE,Ja,RR,rE,LR,oE,l_],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:600px}@media (max-width: 768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.interval-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%]{display:flex;gap:1rem}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-value[_ngcontent-%COMP%], .interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-unit[_ngcontent-%COMP%]{flex:1}.days-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:.5rem}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{min-width:120px}.days-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.end-condition-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .mode-toggle[_ngcontent-%COMP%]{height:32px}.parameters-section[_ngcontent-%COMP%] .parameters-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-key[_ngcontent-%COMP%]{flex:1}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-value[_ngcontent-%COMP%]{flex:2}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.parameters-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.enabled-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.enabled-section[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem}.enabled-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};function TG(n,t){n&1&&(u(0,"div",12),g(1,"Loading schedulers..."),m())}function DG(n,t){if(n&1&&(u(0,"div",13),g(1),m()),n&2){let e=b();f(),K(e.errorMessage)}}function IG(n,t){n&1&&(u(0,"div",14),g(1," No schedulers found. Create your first scheduler to automate prompt execution. "),m())}function kG(n,t){n&1&&(u(0,"div",14),g(1," No schedulers match your search. "),m())}function AG(n,t){if(n&1&&(u(0,"span",31),g(1),m()),n&2){let e=b().$implicit;D("title",bo("Created by ",e.createdBy)),f(),Se(" \u{1F464} ",e.createdBy," ")}}function OG(n,t){if(n&1&&(u(0,"div",22)(1,"span",23),g(2,"Last Run:"),m(),u(3,"span",24),g(4),gs(5,"date"),m()()),n&2){let e=b().$implicit;f(4),K(Yl(5,1,e.lastRun,"short"))}}function PG(n,t){if(n&1){let e=V();u(0,"div",17)(1,"div",18)(2,"h3"),g(3),u(4,"span",19),g(5),m(),wt(6,AG,2,3,"span",20),m(),u(7,"div",21)(8,"div",22)(9,"span",23),g(10,"Prompt:"),m(),u(11,"span",24),g(12),m()(),u(13,"div",22)(14,"span",23),g(15,"Schedule:"),m(),u(16,"span",24),g(17),m()(),u(18,"div",22)(19,"span",23),g(20,"Next Run:"),m(),u(21,"span",24),g(22),m()(),wt(23,OG,6,4,"div",25),m()(),u(24,"div",26)(25,"button",27),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.editScheduler(r))}),g(26,"Edit"),m(),u(27,"button",28),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.toggleEnabled(r))}),g(28),m(),u(29,"button",29),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.runNow(r.id))}),g(30,"Run Now"),m(),u(31,"button",30),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.deleteScheduler(r.id))}),g(32,"Delete"),m()()()}if(n&2){let e=t.$implicit,i=b(2);f(3),Se(" ",e.name," "),f(),j("enabled",e.enabled),f(),Se(" ",e.enabled?"Enabled":"Disabled"," "),f(),D("ngIf",e.createdBy!==i.getCurrentUsername()),f(6),K(i.getPromptName(e.promptId)),f(5),K(i.formatInterval(e.schedule.interval)),f(5),K(i.formatNextRun(e.nextRun)),f(),D("ngIf",e.lastRun),f(4),j("btn-enabled",e.enabled)("btn-disabled",!e.enabled),f(),Se(" ",e.enabled?"Disable":"Enable"," ")}}function RG(n,t){if(n&1&&(u(0,"div",15),wt(1,PG,33,14,"div",16),m()),n&2){let e=b();f(),D("ngForOf",e.filteredSchedulers)}}var c_=class n{schedulerApi=d(od);promptApi=d(Gi);configApi=d(no);dialog=d(gr);schedulers=[];filteredSchedulers=[];prompts=[];searchQuery="";showOnlyMine=!0;isLoading=!1;errorMessage="";currentUsername="";ngOnInit(){this.configApi.getUserConfig().subscribe({next:t=>{this.currentUsername=t.username??"",console.log("[SCHEDULER_MANAGER] Current username:",this.currentUsername)},error:t=>{console.error("[SCHEDULER_MANAGER] Error loading user config:",t)}}),this.loadPrompts(),this.loadSchedulers()}loadPrompts(){this.promptApi.listPrompts().subscribe({next:t=>{this.prompts=t},error:t=>{console.error("Error loading prompts:",t)}})}loadSchedulers(){this.isLoading=!0,this.schedulerApi.listSchedulers().subscribe({next:t=>{this.schedulers=t,this.applyFilter(),this.isLoading=!1},error:t=>{console.error("Error loading schedulers:",t),this.errorMessage="Failed to load schedulers",this.isLoading=!1}})}deleteScheduler(t){confirm("Are you sure you want to delete this scheduler?")&&this.schedulerApi.deleteScheduler(t).subscribe({next:()=>{this.loadSchedulers()},error:e=>{console.error("Error deleting scheduler:",e);let i=e?.error?.error??e?.message??"Failed to delete scheduler";alert(`Failed to delete scheduler: ${i}`)}})}toggleEnabled(t){(t.enabled?this.schedulerApi.disableScheduler(t.id):this.schedulerApi.enableScheduler(t.id)).subscribe({next:()=>{this.loadSchedulers()},error:i=>{console.error("Error toggling scheduler:",i);let r=i?.error?.error??i?.message??"Failed to toggle scheduler";alert(`Failed to toggle scheduler: ${r}`)}})}runNow(t){this.schedulerApi.runSchedulerNow(t).subscribe({next:e=>{alert(`Scheduler executed successfully! Thread ID: ${e.threadId}`),this.loadSchedulers()},error:e=>{console.error("Error running scheduler:",e);let i=e?.error?.error??e?.message??"Failed to run scheduler";alert(`Failed to run scheduler: ${i}`)}})}formatNextRun(t){return t?new Date(t).toLocaleString():"Expired or completed"}getCurrentUsername(){return this.currentUsername}getPromptName(t){let e=this.prompts.find(i=>i.id===t);return e?e.name:t}formatInterval(t){let e=RegExp(/^(\d+)(min|h|d|M)$/).exec(t);if(!e)return t;let[,i,r]=e;if(!i||!r)return t;let s={min:"minute",h:"hour",d:"day",M:"month"}[r]??r;return`Every ${i} ${s}${parseInt(i,10)>1?"s":""}`}normalizeUsername(t){return t.replace(/[.\s]+/g,"_")}isMyScheduler(t){if(!this.currentUsername)return!1;let e=this.normalizeUsername(this.currentUsername.toLowerCase());return this.normalizeUsername(t.createdBy.toLowerCase())===e}applyFilter(){let t=this.searchQuery.toLowerCase().trim(),e=this.showOnlyMine&&this.currentUsername?this.schedulers.filter(i=>this.isMyScheduler(i)):[...this.schedulers];t&&(e=e.filter(i=>i.name.toLowerCase().includes(t)||i.promptId.toLowerCase().includes(t)||this.getPromptName(i.promptId).toLowerCase().includes(t)?!0:i.createdBy.toLowerCase().includes(t))),this.filteredSchedulers=e}onSearchChange(){this.applyFilter()}createScheduler(){this.dialog.open(Wm,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadSchedulers()})}editScheduler(t){this.schedulerApi.getScheduler(t.id).subscribe({next:e=>{this.dialog.open(Wm,{width:"700px",maxHeight:"90vh",data:{mode:"edit",scheduler:e}}).afterClosed().subscribe(r=>{r&&this.loadSchedulers()})},error:e=>{console.error("Error loading scheduler details:",e);let i=e?.error?.error??e?.message??"Failed to load scheduler details";alert(`Failed to load scheduler details: ${i}`)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-scheduler-manager"]],decls:23,vars:7,consts:[[1,"scheduler-manager"],[1,"header"],[1,"header-actions"],["appearance","outline",1,"search-field"],["matInput","","placeholder","Name, prompt, author...",3,"ngModelChange","input","ngModel"],["matPrefix",""],["color","primary",1,"mine-toggle",3,"ngModelChange","change","ngModel"],[1,"btn-create",3,"click"],["class","loading",4,"ngIf"],["class","error",4,"ngIf"],["class","empty",4,"ngIf"],["class","scheduler-list",4,"ngIf"],[1,"loading"],[1,"error"],[1,"empty"],[1,"scheduler-list"],["class","scheduler-item",4,"ngFor","ngForOf"],[1,"scheduler-item"],[1,"scheduler-info"],[1,"status-badge"],["class","owner-badge",3,"title",4,"ngIf"],[1,"details"],[1,"detail-row"],[1,"label"],[1,"value"],["class","detail-row",4,"ngIf"],[1,"scheduler-actions"],[1,"btn-primary",3,"click"],[3,"click"],[1,"btn-accent",3,"click"],[1,"btn-danger",3,"click"],[1,"owner-badge",3,"title"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"h2"),g(3,"Schedulers"),m(),u(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),g(7,"Search"),m(),u(8,"input",4),q("ngModelChange",function(o){return Q(i.searchQuery,o)||(i.searchQuery=o),o}),w("input",function(){return i.onSearchChange()}),m(),u(9,"mat-icon",5),g(10,"search"),m()(),u(11,"mat-slide-toggle",6),q("ngModelChange",function(o){return Q(i.showOnlyMine,o)||(i.showOnlyMine=o),o}),w("change",function(){return i.applyFilter()}),g(12," Mine "),m(),u(13,"button",7),w("click",function(){return i.createScheduler()}),u(14,"mat-icon"),g(15,"add"),m(),u(16,"span"),g(17,"Create Scheduler"),m()()()(),wt(18,TG,2,0,"div",8)(19,DG,2,1,"div",9)(20,IG,2,0,"div",10)(21,kG,2,0,"div",10)(22,RG,2,1,"div",11),m()),e&2&&(f(8),G("ngModel",i.searchQuery),f(3),G("ngModel",i.showOnlyMine),f(7),D("ngIf",i.isLoading),f(),D("ngIf",i.errorMessage),f(),D("ngIf",!i.isLoading&&i.schedulers.length===0),f(),D("ngIf",!i.isLoading&&i.schedulers.length>0&&i.filteredSchedulers.length===0),f(),D("ngIf",!i.isLoading&&i.filteredSchedulers.length>0))},dependencies:[tt,Ql,pu,Rt,Et,Pt,Tt,Ot,$e,mi,qi,Jn,Xn,Xa,Jt,Jv,Za,uC],styles:[".scheduler-manager[_ngcontent-%COMP%]{padding:1.5rem .5rem 1.5rem 1.5rem}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-right:1rem}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:300px;margin-bottom:-1.25em}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .mine-toggle[_ngcontent-%COMP%]{margin-bottom:-1.25em}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border:none;border-radius:4px;background:var(--color-primary);color:#fff;cursor:pointer;font-size:1rem;font-weight:500;white-space:nowrap}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%]{padding:1rem 1.5rem 1rem 1rem;text-align:center;color:var(--color-text-secondary)}.error[_ngcontent-%COMP%]{color:var(--color-error)}.scheduler-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding-right:1rem}.scheduler-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}.scheduler-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.scheduler-info[_ngcontent-%COMP%]{flex:1}.scheduler-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1.1rem;display:flex;align-items:center;gap:.5rem}.scheduler-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] .owner-badge[_ngcontent-%COMP%]{font-size:.75rem;padding:.25rem .5rem;background:#2196f3;color:#fff;border-radius:4px;font-weight:400}.scheduler-info[_ngcontent-%COMP%] .status-badge[_ngcontent-%COMP%]{padding:.25rem .5rem;font-size:.75rem;border-radius:4px;background:var(--color-text-secondary);color:#fff}.scheduler-info[_ngcontent-%COMP%] .status-badge.enabled[_ngcontent-%COMP%]{background:var(--color-success)}.scheduler-info[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.scheduler-info[_ngcontent-%COMP%] .detail-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;font-size:.9rem}.scheduler-info[_ngcontent-%COMP%] .detail-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:600;min-width:100px;color:var(--color-text-secondary)}.scheduler-info[_ngcontent-%COMP%] .detail-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--color-text)}.scheduler-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.scheduler-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem;white-space:nowrap}.scheduler-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-actions[_ngcontent-%COMP%] button.btn-secondary[_ngcontent-%COMP%]{background:var(--color-secondary);color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-secondary[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-actions[_ngcontent-%COMP%] button.btn-enabled[_ngcontent-%COMP%]{background:#4caf50;color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-enabled[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-actions[_ngcontent-%COMP%] button.btn-disabled[_ngcontent-%COMP%]{background:#9e9e9e;color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-disabled[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-actions[_ngcontent-%COMP%] button.btn-accent[_ngcontent-%COMP%]{background:#ff9800;color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-accent[_ngcontent-%COMP%]:hover{opacity:.9}.scheduler-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]{background:var(--color-error);color:#fff}.scheduler-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]:hover{opacity:.9}"]})};var ld=class n{http=d(dt);projectState=d(qe);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new ge(i=>{let r=new FileReader;r.onload=()=>{let o=r.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:o,mimeType:e.type},{params:{location:t}}).subscribe(i)},r.onerror=()=>i.error(r.error),r.readAsDataURL(e)})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${t}`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function NG(n,t){n&1&&(u(0,"p",15),g(1,"No integrations defined \u2014 agent will have access to all tools."),m())}function FG(n,t){if(n&1){let e=V();u(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),g(3,"Integration"),m(),u(4,"input",23),q("ngModelChange",function(r){let o=E(e).$implicit;return Q(o.integration,r)||(o.integration=r),S(r)}),m()(),u(5,"mat-form-field",24)(6,"mat-label"),g(7,"Tools (comma-separated)"),m(),u(8,"input",25),q("ngModelChange",function(r){let o=E(e).$implicit;return Q(o.tools,r)||(o.tools=r),S(r)}),m()(),u(9,"button",26),w("click",function(){let r=E(e).$index,o=b();return S(o.removeIntegrationRow(r))}),u(10,"mat-icon"),g(11,"delete"),m()()()}if(n&2){let e=t.$implicit;f(4),G("ngModel",e.integration),f(4),G("ngModel",e.tools)}}function LG(n,t){if(n&1&&(u(0,"p",30),g(1),m()),n&2){let e=b(2);f(),K(e.docUploadError)}}function jG(n,t){n&1&&(u(0,"p",15),g(1,"No mandatory documents defined."),m())}function VG(n,t){if(n&1&&H(0,"option",35),n&2){let e=t.$implicit;D("value","documents/"+e)}}function BG(n,t){if(n&1){let e=V();u(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),g(3,"Document path"),m(),u(4,"input",33),q("ngModelChange",function(r){let o=E(e).$index,s=b(2);return Q(s.mandatoryDocs[o],r)||(s.mandatoryDocs[o]=r),S(r)}),m(),u(5,"datalist",34),st(6,VG,1,1,"option",35,N0),m()(),u(8,"button",26),w("click",function(){let r=E(e).$index,o=b(2);return S(o.removeDocRow(r))}),u(9,"mat-icon"),g(10,"delete"),m()()()}if(n&2){let e=t.$index,i=b(2);f(4),G("ngModel",i.mandatoryDocs[e]),ne("list","docs-list-"+e),f(),D("id","docs-list-"+e),f(),at(i.availableDocuments)}}function zG(n,t){if(n&1){let e=V();u(0,"div",6)(1,"span"),g(2,"Mandatory Documents"),m(),u(3,"button",27),w("click",function(){E(e);let r=b();return S(r.addDocRow())}),u(4,"mat-icon"),g(5,"add"),m()(),u(6,"label",28)(7,"mat-icon"),g(8,"upload_file"),m(),u(9,"input",29),w("change",function(r){E(e);let o=b();return S(o.onDocFileSelected(r))}),m()()(),I(10,LG,2,1,"p",30),I(11,jG,2,0,"p",15),st(12,BG,11,3,"div",31,hs)}if(n&2){let e=b();f(6),j("uploading",e.isUploadingDoc),f(3),D("disabled",e.isUploadingDoc),f(),k(e.docUploadError?10:-1),f(),k(e.mandatoryDocs.length===0?11:-1),f(),at(e.mandatoryDocs)}}function HG(n,t){n&1&&(u(0,"p",15),g(1,"\u{1F4A1} Documents can be added after the agent is created."),m())}function UG(n,t){if(n&1){let e=V();u(0,"div",6),g(1,"Save to"),m(),u(2,"div",36)(3,"label",37)(4,"input",38),q("ngModelChange",function(r){E(e);let o=b();return Q(o.location,r)||(o.location=r),S(r)}),m(),u(5,"div",39)(6,"div",40)(7,"span",41),g(8,"\u{1F464}"),m(),u(9,"span",42),g(10,"Project config"),m()(),u(11,"p",43),g(12),m()()(),u(13,"label",37)(14,"input",44),q("ngModelChange",function(r){E(e);let o=b();return Q(o.location,r)||(o.location=r),S(r)}),m(),u(15,"div",39)(16,"div",40)(17,"span",41),g(18,"\u{1F4E6}"),m(),u(19,"span",42),g(20,"Colocated"),m()(),u(21,"p",43),g(22,"Next to coday.yaml in ./agents/ (committable)"),m()()()(),u(23,"p",15),g(24,"Storage location is permanent and cannot be changed after creation."),m()}if(n&2){let e=b();f(3),j("selected",e.location==="project"),f(),G("ngModel",e.location),f(8),Vr("~/.coday/projects/","{","name","}","/agents/ (not committed)"),f(),j("selected",e.location==="colocated"),f(),G("ngModel",e.location)}}function $G(n,t){if(n&1&&(u(0,"div",17)(1,"span",6),g(2,"Storage Location"),m(),u(3,"span",45),g(4),m(),u(5,"p",15),g(6,"Cannot be changed after creation."),m()()),n&2){let e=b();f(3),j("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),f(),Se(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ")}}function WG(n,t){if(n&1&&(u(0,"div",18)(1,"mat-icon"),g(2,"error"),m(),u(3,"span"),g(4),m()()),n&2){let e=b();f(4),K(e.errorMessage)}}var Gm=class n{agentCrudApi=d(ld);agentApi=d(Hc);dialogRef=d(Si);data=d(Yr);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=!1;docUploadError="";location="project";isSaving=!1;errorMessage="";isEditMode=!1;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,i])=>({integration:e,tools:i?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments()}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]})}addDocRow(){this.mandatoryDocs.push("")}removeDocRow(t){this.mandatoryDocs.splice(t,1)}onDocFileSelected(t){let e=t.target,i=e.files?.[0];i&&(this.isUploadingDoc=!0,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,i).subscribe({next:r=>{this.isUploadingDoc=!1,this.mandatoryDocs.push(r.relativePath),this.loadAvailableDocuments(),e.value=""},error:r=>{this.isUploadingDoc=!1,this.docUploadError=r?.error?.error??r?.message??"Upload failed",e.value=""}}))}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""})}removeIntegrationRow(t){this.integrationRows.splice(t,1)}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",!1;if(!this.description.trim())return this.errorMessage="Description is required",!1;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",!1;return!0}buildDefinition(){let t=this.mandatoryDocs.map(i=>i.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(i=>i.integration.trim()).map(i=>[i.integration.trim(),i.tools.split(",").map(r=>r.trim()).filter(Boolean)])):void 0;return{name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=!0,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=!1,this.agentApi.clearAllCache(),this.dialogRef.close(!0)},error:i=>{this.isSaving=!1,this.errorMessage=i?.error?.error||i?.message||"Failed to save agent"}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,i){e&1&&(u(0,"h2",0),g(1),m(),u(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),g(6,"Name"),m(),u(7,"input",3),q("ngModelChange",function(o){return Q(i.name,o)||(i.name=o),o}),m(),u(8,"mat-hint"),g(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),m()(),u(10,"mat-form-field",2)(11,"mat-label"),g(12,"Description"),m(),u(13,"textarea",4),q("ngModelChange",function(o){return Q(i.description,o)||(i.description=o),o}),m()(),u(14,"mat-form-field",2)(15,"mat-label"),g(16,"Instructions"),m(),u(17,"textarea",5),q("ngModelChange",function(o){return Q(i.instructions,o)||(i.instructions=o),o}),m(),u(18,"mat-hint"),g(19,"System prompt / instructions sent to the AI model"),m()(),u(20,"div",6),g(21,"AI Configuration"),m(),u(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),g(25,"AI Provider"),m(),u(26,"input",9),q("ngModelChange",function(o){return Q(i.aiProvider,o)||(i.aiProvider=o),o}),m()(),u(27,"mat-form-field",8)(28,"mat-label"),g(29,"Model Name"),m(),u(30,"input",10),q("ngModelChange",function(o){return Q(i.modelName,o)||(i.modelName=o),o}),m()()(),u(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),g(34,"Temperature"),m(),u(35,"input",11),q("ngModelChange",function(o){return Q(i.temperature,o)||(i.temperature=o),o}),m(),u(36,"mat-hint"),g(37,"Leave empty for model default"),m()(),u(38,"mat-form-field",8)(39,"mat-label"),g(40,"Max Output Tokens"),m(),u(41,"input",12),q("ngModelChange",function(o){return Q(i.maxOutputTokens,o)||(i.maxOutputTokens=o),o}),m(),u(42,"mat-hint"),g(43,"Leave empty for model default"),m()()(),u(44,"mat-form-field",2)(45,"mat-label"),g(46,"OpenAI Assistant ID"),m(),u(47,"input",13),q("ngModelChange",function(o){return Q(i.openaiAssistantId,o)||(i.openaiAssistantId=o),o}),m(),u(48,"mat-hint"),g(49,"If set, forces aiProvider to openai"),m()(),u(50,"div",6)(51,"span"),g(52,"Integrations"),m(),u(53,"button",14),w("click",function(){return i.addIntegrationRow()}),u(54,"mat-icon"),g(55,"add"),m()()(),I(56,NG,2,0,"p",15),st(57,FG,12,2,"div",16,hs),I(59,zG,14,5)(60,HG,2,0,"p",15),I(61,UG,25,8),I(62,$G,7,5,"div",17),I(63,WG,5,1,"div",18),m()(),u(64,"mat-dialog-actions",19)(65,"button",20),w("click",function(){return i.cancel()}),g(66,"Cancel"),m(),u(67,"button",21),w("click",function(){return i.save()}),g(68),m()()),e&2&&(f(),K(i.isEditMode?"Edit Agent":"Create Agent"),f(6),G("ngModel",i.name),D("readonly",i.isEditMode),f(6),G("ngModel",i.description),f(4),G("ngModel",i.instructions),f(9),G("ngModel",i.aiProvider),f(4),G("ngModel",i.modelName),f(5),G("ngModel",i.temperature),f(6),G("ngModel",i.maxOutputTokens),f(6),G("ngModel",i.openaiAssistantId),f(9),k(i.integrationRows.length===0?56:-1),f(),at(i.integrationRows),f(2),k(i.isEditMode?59:60),f(2),k(i.isEditMode?-1:61),f(),k(i.isEditMode?62:-1),f(),k(i.errorMessage?63:-1),f(2),D("disabled",i.isSaving),f(2),D("disabled",i.isSaving),f(),Se(" ",i.isSaving?"Saving...":"Save"," "))},dependencies:[Rt,wv,xv,Et,Rm,$a,Pt,Wa,Fm,jx,Tt,Va,Ro,Fo,No,vn,Pn,Gt,mi,qi,Jn,Xn,$o,Jt,Ot,$e,$m,Ic],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media (max-width: 768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media (max-width: 768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media (max-width: 768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};var GG=(n,t)=>t.name;function qG(n,t){n&1&&(u(0,"div",7),g(1,"Loading agents..."),m())}function YG(n,t){if(n&1&&(u(0,"div",8),g(1),m()),n&2){let e=b();f(),K(e.errorMessage)}}function QG(n,t){n&1&&(u(0,"div",9),g(1,"No file-based agents found. Create your first agent to get started."),m())}function KG(n,t){n&1&&(u(0,"div",9),g(1,"No agents match your search."),m())}function ZG(n,t){if(n&1){let e=V();u(0,"div",11)(1,"div",12)(2,"div",13)(3,"h3"),g(4),m(),u(5,"span",14),g(6),m()(),u(7,"p",15),g(8),m()(),u(9,"div",16)(10,"button",17),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.editAgent(r))}),g(11,"Edit"),m(),u(12,"button",18),w("click",function(){let r=E(e).$implicit,o=b(2);return S(o.deleteAgent(r))}),g(13,"Delete"),m()()()}if(n&2){let e=t.$implicit;f(4),K(e.name),f(),j("badge-project",e.source==="project")("badge-colocated",e.source==="colocated"),D("title",e.source==="project"?"Project config (~/.coday/)":"Colocated (next to coday.yaml)"),f(),Se(" ",e.source==="project"?"\u{1F464}":"\u{1F4E6}"," "),f(2),K(e.description)}}function XG(n,t){if(n&1&&(u(0,"div",10),st(1,ZG,14,8,"div",11,GG),m()),n&2){let e=b();f(),at(e.filteredAgents)}}var d_=class n{agentCrudApi=d(ld);dialog=d(gr);agents=[];filteredAgents=[];searchQuery="";isLoading=!1;errorMessage="";ngOnInit(){this.loadAgents()}loadAgents(){this.isLoading=!0,this.errorMessage="",this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents=t,this.applyFilter(),this.isLoading=!1},error:t=>{console.error("Error loading agents:",t),this.errorMessage="Failed to load agents",this.isLoading=!1}})}applyFilter(){let t=this.searchQuery.toLowerCase().trim();this.filteredAgents=t?this.agents.filter(e=>e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)):[...this.agents]}onSearchChange(){this.applyFilter()}createAgent(){this.dialog.open(Gm,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents()})}editAgent(t){this.errorMessage="",this.agentCrudApi.getAgent(t.name).subscribe({next:e=>{this.dialog.open(Gm,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(r=>{r&&this.loadAgents()})},error:e=>{console.error("Error loading agent:",e),this.errorMessage=e?.error?.error??e?.message??"Failed to load agent"}})}deleteAgent(t){confirm(`Are you sure you want to delete agent "${t.name}"?`)&&(this.errorMessage="",this.agentCrudApi.deleteAgent(t.name).subscribe({next:()=>this.loadAgents(),error:e=>{console.error("Error deleting agent:",e),this.errorMessage=e?.error?.error??e?.message??"Failed to delete agent"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-agent-manager"]],decls:21,vars:6,consts:[[1,"agent-manager"],[1,"header"],[1,"header-actions"],["appearance","outline",1,"search-field"],["matInput","","placeholder","Name or description...",3,"ngModelChange","input","ngModel"],["matPrefix",""],[1,"btn-create",3,"click"],[1,"loading"],[1,"error"],[1,"empty"],[1,"agent-list"],[1,"agent-item"],[1,"agent-info"],[1,"agent-header"],[1,"source-badge",3,"title"],[1,"description"],[1,"agent-actions"],[1,"btn-primary",3,"click"],[1,"btn-danger",3,"click"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"h2"),g(3,"Agents"),m(),u(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),g(7,"Search"),m(),u(8,"input",4),q("ngModelChange",function(o){return Q(i.searchQuery,o)||(i.searchQuery=o),o}),w("input",function(){return i.onSearchChange()}),m(),u(9,"mat-icon",5),g(10,"search"),m()(),u(11,"button",6),w("click",function(){return i.createAgent()}),u(12,"mat-icon"),g(13,"add"),m(),u(14,"span"),g(15,"Create Agent"),m()()()(),I(16,qG,2,0,"div",7),I(17,YG,2,1,"div",8),I(18,QG,2,0,"div",9),I(19,KG,2,0,"div",9),I(20,XG,3,0,"div",10),m()),e&2&&(f(8),G("ngModel",i.searchQuery),f(8),k(i.isLoading?16:-1),f(),k(i.errorMessage?17:-1),f(),k(!i.isLoading&&i.agents.length===0?18:-1),f(),k(!i.isLoading&&i.agents.length>0&&i.filteredAgents.length===0?19:-1),f(),k(!i.isLoading&&i.filteredAgents.length>0?20:-1))},dependencies:[Rt,Et,Pt,Tt,Ot,$e,mi,qi,Jn,Xn,Xa,Jt],styles:[".agent-manager[_ngcontent-%COMP%]{padding:1.5rem .5rem 1.5rem 1.5rem}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-right:1rem}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:300px;margin-bottom:-1.25em}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border:none;border-radius:4px;background:var(--color-primary);color:#fff;cursor:pointer;font-size:1rem;font-weight:500;white-space:nowrap}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%]:hover{opacity:.9}.agent-manager[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] .btn-create[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%]{padding:1rem 1.5rem 1rem 1rem;text-align:center;color:var(--color-text-secondary)}.error[_ngcontent-%COMP%]{color:var(--color-error)}.agent-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding-right:1rem}.agent-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}.agent-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.agent-info[_ngcontent-%COMP%]{flex:1}.agent-info[_ngcontent-%COMP%] .agent-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}.agent-info[_ngcontent-%COMP%] .agent-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem}.agent-info[_ngcontent-%COMP%] .agent-header[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;font-size:1rem;cursor:help}.agent-info[_ngcontent-%COMP%] .agent-header[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;border:1px solid rgba(33,150,243,.3)}.agent-info[_ngcontent-%COMP%] .agent-header[_ngcontent-%COMP%] .source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;border:1px solid rgba(76,175,80,.3)}.agent-info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary)}.agent-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.agent-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem}.agent-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]{background:var(--color-primary);color:#fff}.agent-actions[_ngcontent-%COMP%] button.btn-primary[_ngcontent-%COMP%]:hover{opacity:.9}.agent-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]{background:var(--color-error);color:#fff}.agent-actions[_ngcontent-%COMP%] button.btn-danger[_ngcontent-%COMP%]:hover{opacity:.9}"]})};var JG=["threadSearchInput"],eq=["*"];function tq(n,t){n&1&&(u(0,"a",27),H(1,"img",28),m()),n&2&&(f(),ne("src","CODAY-Logo.png",ga))}function nq(n,t){if(n&1){let e=V();u(0,"button",25),w("click",function(){E(e);let r=b();return S(r.toggle())}),u(1,"mat-icon"),g(2,"menu"),m()(),u(3,"button",26),w("click",function(){E(e);let r=b();return S(r.createNewThread())}),u(4,"mat-icon",10),g(5,"play_circle"),m()(),I(6,tq,2,1,"a",27)}if(n&2){let e=b();f(3),D("disabled",!e.selectedProjectName()),f(3),k(e.isOpen?-1:6)}}function iq(n,t){if(n&1){let e=V();u(0,"div",14)(1,"mat-icon",29),g(2,"search"),m(),u(3,"input",30,0),q("ngModelChange",function(r){E(e);let o=b();return Q(o.threadSearchQuery,r)||(o.threadSearchQuery=r),S(r)}),w("input",function(){E(e);let r=b();return S(r.onThreadSearchInput())}),m(),u(5,"button",31),w("click",function(){E(e);let r=b();return S(r.closeThreadSearch())}),u(6,"mat-icon"),g(7,"close"),m()()()}if(n&2){let e=b();f(3),G("ngModel",e.threadSearchQuery)}}function rq(n,t){n&1&&(u(0,"mat-icon",18),g(1,"keyboard_arrow_up"),m())}function oq(n,t){n&1&&(u(0,"mat-icon",19),g(1,"forum"),m())}function sq(n,t){if(n&1){let e=V();u(0,"button",33),w("click",function(r){E(e);let o=b(2);return S(o.toggleThreadSearch(r))}),u(1,"mat-icon"),g(2,"search"),m()()}}function aq(n,t){if(n&1){let e=V();u(0,"a",17),w("click",function(r){return E(e),b().toggleSection("threads"),S(r.preventDefault())}),I(1,rq,2,0,"mat-icon",18)(2,oq,2,0,"mat-icon",19),u(3,"span",20),g(4,"Threads"),m(),I(5,sq,3,0,"button",32),m()}if(n&2){let e=b();j("active",e.expandedSections.threads),f(),k(e.expandedSections.threads?1:2),f(4),k(e.expandedSections.threads?5:-1)}}function lq(n,t){if(n&1){let e=V();u(0,"div",16)(1,"app-thread-selector",34),w("searchModeChange",function(r){E(e);let o=b();return S(o.onThreadSearchModeChange(r))}),m()()}if(n&2){let e=b();f(),D("searchMode",e.isThreadSearchActive)("searchQuery",e.threadSearchQuery)}}function cq(n,t){n&1&&(u(0,"mat-icon",18),g(1,"keyboard_arrow_up"),m())}function dq(n,t){n&1&&(u(0,"mat-icon",19),g(1,"tune"),m())}function uq(n,t){n&1&&(u(0,"div",21)(1,"div",35),H(2,"app-options-panel",36),m()())}function mq(n,t){if(n&1){let e=V();u(0,"div",13)(1,"a",17),w("click",function(r){return E(e),b(2).openProjectConfig(),r.preventDefault(),S(r.stopPropagation())}),u(2,"mat-icon",19),g(3,"settings_applications"),m(),u(4,"span",20),g(5,"Project Configuration"),m()()()}}function pq(n,t){n&1&&(u(0,"div",13)(1,"a",37)(2,"mat-icon",19),g(3,"settings_applications"),m(),u(4,"span",20),g(5,"Project config (No project)"),m()()())}function fq(n,t){if(n&1&&I(0,mq,6,0,"div",13)(1,pq,6,0,"div",13),n&2){let e=b();k(e.selectedProjectName()?0:1)}}function hq(n,t){if(n&1){let e=V();u(0,"div",13)(1,"a",17),w("click",function(r){return E(e),b().openAgents(),r.preventDefault(),S(r.stopPropagation())}),u(2,"mat-icon",19),g(3,"smart_toy"),m(),u(4,"span",20),g(5,"Agents"),m()()()}}function gq(n,t){n&1&&(u(0,"div",13)(1,"a",37)(2,"mat-icon",19),g(3,"smart_toy"),m(),u(4,"span",20),g(5,"Agents (No project)"),m()()())}function vq(n,t){if(n&1){let e=V();u(0,"div",13)(1,"a",17),w("click",function(r){return E(e),b().openPrompts(),r.preventDefault(),S(r.stopPropagation())}),u(2,"mat-icon",19),g(3,"description"),m(),u(4,"span",20),g(5,"Prompts"),m()()()}}function _q(n,t){n&1&&(u(0,"div",13)(1,"a",37)(2,"mat-icon",19),g(3,"description"),m(),u(4,"span",20),g(5,"Prompts (No project)"),m()()())}function bq(n,t){if(n&1){let e=V();u(0,"div",13)(1,"a",17),w("click",function(r){return E(e),b().openSchedulers(),r.preventDefault(),S(r.stopPropagation())}),u(2,"mat-icon",19),g(3,"schedule"),m(),u(4,"span",20),g(5,"Schedulers"),m()()()}}function yq(n,t){n&1&&(u(0,"div",13)(1,"a",37)(2,"mat-icon",19),g(3,"schedule"),m(),u(4,"span",20),g(5,"Schedulers (No project)"),m()()())}function Cq(n,t){if(n&1){let e=V();u(0,"div",24)(1,"mat-icon",38),g(2,"warning"),m(),u(3,"span",39),g(4),m(),u(5,"button",40),w("click",function(){E(e);let r=b();return S(r.configErrorMessage="")}),u(6,"mat-icon"),g(7,"close"),m()()()}if(n&2){let e=b();f(4),K(e.configErrorMessage)}}var u_=class n{destroy$=new P;isOpen=!0;isAdmin=!1;configErrorMessage="";expandedSections={threads:!0,config:!1};isThreadSearchActive=!1;threadSearchQuery="";threadSearchInput;dialog=d(gr);configApi=d(no);projectStateService=d(qe);projectApi=d(kc);router=d(xn);preferences=d(Bt);threadStateService=d(Rn);projects=qn(this.projectStateService.projectList$);selectedProject=qn(this.projectStateService.selectedProject$);selectedProjectName=qn(this.projectStateService.selectedProject$.pipe(z(t=>t?.name)));isProjectVolatile=qn(this.projectStateService.selectedProject$.pipe(z(t=>t?.config?.volatile||!1)));forcedProject=qn(this.projectStateService.forcedProject$);ngOnInit(){let t=this.preferences.getPreference("sidenavOpen",!0);this.isOpen=t??!0,console.log("[SIDENAV] Loaded sidenav state from preferences:",this.isOpen),this.configApi.getUserConfig().pipe($(this.destroy$)).subscribe({next:e=>{this.isAdmin=e.groups?.includes("CODAY_ADMIN")??!1,console.log("[SIDENAV] User admin status:",this.isAdmin)},error:e=>{console.error("[SIDENAV] Error loading user config for roles:",e),this.isAdmin=!1}})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}toggle(){this.isOpen=!this.isOpen,this.saveSidenavState()}close(){this.isOpen=!1,this.saveSidenavState()}saveSidenavState(){this.preferences.setPreference("sidenavOpen",this.isOpen),console.log("[SIDENAV] Saved sidenav state:",this.isOpen)}openUserConfig(){console.log("[SIDENAV] openUserConfig called"),this.configErrorMessage="",this.configApi.getUserConfig().pipe($(this.destroy$)).subscribe({next:t=>{console.log("[SIDENAV] User config loaded, opening dialog"),this.dialog.open(Hm,{data:{configType:"user",initialContent:JSON.stringify(t,null,2)}}).afterClosed().subscribe(i=>{i&&this.saveUserConfig(i)})},error:t=>{console.error("[SIDENAV] Error loading user config:",t),this.configErrorMessage=t?.error?.error||"Failed to load user configuration"}})}saveUserConfig(t){this.configApi.updateUserConfig(t).pipe($(this.destroy$)).subscribe({next:e=>{console.log("[SIDENAV] User config saved successfully")},error:e=>{console.error("[SIDENAV] Error saving user config:",e),this.configErrorMessage=e?.error?.error||"Failed to save user configuration"}})}openProjectConfig(){let t=this.selectedProjectName();if(!t){console.error("[SIDENAV] No project selected"),this.configErrorMessage="No project selected. Please select a project first.";return}this.configErrorMessage="",this.projectApi.getProjectConfig(t).pipe($(this.destroy$)).subscribe({next:e=>{console.log("[SIDENAV] Project config loaded, opening dialog"),this.dialog.open(Hm,{data:{configType:"project",projectName:t,initialContent:JSON.stringify(e,null,2)}}).afterClosed().subscribe(r=>{r&&this.saveProjectConfig(t,r)})},error:e=>{console.error("[SIDENAV] Error loading project config:",e),this.configErrorMessage=e?.error?.error||"Failed to load project configuration"}})}saveProjectConfig(t,e){this.projectApi.updateProjectConfig(t,e).pipe($(this.destroy$)).subscribe({next:i=>{console.log("[SIDENAV] Project config saved successfully")},error:i=>{console.error("[SIDENAV] Error saving project config:",i),this.configErrorMessage=i?.error?.error||"Failed to save project configuration"}})}requireProjectSelection(t){return this.selectedProjectName()?!0:(console.error(`[SIDENAV] No project selected, cannot ${t}`),this.configErrorMessage="Please select a project first",!1)}openManagerDialog(t,e){console.log(`[SIDENAV] ${e}`),this.dialog.open(t,{width:"90vw",maxWidth:"1200px",height:"90vh",maxHeight:"900px"})}openAgents(){this.requireProjectSelection("open agents")&&this.openManagerDialog(d_,"Opening agent manager dialog")}openPrompts(){this.requireProjectSelection("open prompts")&&this.openManagerDialog(r_,"Opening prompt manager dialog")}openSchedulers(){this.requireProjectSelection("open schedulers")&&this.openManagerDialog(c_,`Opening scheduler manager dialog for project: ${this.selectedProjectName()}`)}toggleSection(t){let e=this.expandedSections[t];Object.keys(this.expandedSections).forEach(i=>{this.expandedSections[i]=!1}),this.expandedSections[t]=!e}navigateToHome(){if(this.forcedProject()){console.log("[SIDENAV] Cannot navigate to home - forced project active");return}console.log("[SIDENAV] Navigating to home (project selection)"),this.projectStateService.clearSelection(),this.router.navigate(["/"])}createNewThread(){let t=this.selectedProjectName();if(!t){console.error("[SIDENAV] No project selected, cannot create new thread"),this.configErrorMessage="Please select a project first";return}console.log("[SIDENAV] Navigating to welcome view for new thread"),this.threadStateService.clearSelection(),this.router.navigate(["project",t])}toggleThreadSearch(t){t.stopPropagation(),this.isThreadSearchActive=!0,this.threadSearchQuery="",console.log("[SIDENAV] Thread search active:",this.isThreadSearchActive),setTimeout(()=>{this.threadSearchInput?.nativeElement.focus()},0)}closeThreadSearch(){this.isThreadSearchActive=!1,this.threadSearchQuery="",console.log("[SIDENAV] Thread search closed")}onThreadSearchInput(){console.log("[SIDENAV] Search query:",this.threadSearchQuery)}onThreadSearchModeChange(t){t||this.closeThreadSearch()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-sidenav"]],viewQuery:function(e,i){if(e&1&&xe(JG,5),e&2){let r;re(r=oe())&&(i.threadSearchInput=r.first)}},ngContentSelectors:eq,decls:50,vars:35,consts:[["threadSearchInput",""],[1,"sidenav-container",3,"hasBackdrop"],["mode","push","position","start",1,"app-sidenav",3,"closed","opened","disableClose"],[1,"sidenav-header"],["mat-icon-button","","title","Close menu",3,"click"],["alt","coday",3,"click","keydown.enter","keydown.space","title"],[1,"header-title-section"],[1,"sidenav-title"],[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"],[1,"search-header"],["role","button","tabindex","0",1,"section-toggle",3,"active"],[1,"section-content","threads"],["role","button","tabindex","0",1,"section-toggle",3,"click"],[1,"arrow-icon","expanded"],[1,"section-icon"],[1,"section-label"],[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"],["role","alert",1,"error-notification"],["mat-icon-button","","title","Menu","type","button",1,"sidenav-toggle-btn",3,"click"],["mat-icon-button","","title","Start a new thread","type","button",1,"sidenav-new-thread-btn",3,"click","disabled"],["href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer","title","Contribute on GitHub",1,"sidenav-logo-btn"],["alt","Coday",1,"logo"],[1,"search-icon"],["type","text","placeholder","Search threads...",1,"search-input",3,"ngModelChange","input","ngModel"],["mat-icon-button","","title","Close search","type","button",1,"close-search-btn",3,"click"],["mat-icon-button","","title","Search threads","type","button",1,"search-button"],["mat-icon-button","","title","Search threads","type","button",1,"search-button",3,"click"],[1,"sidenav-thread-selector",3,"searchModeChange","searchMode","searchQuery"],[1,"preference-item"],[1,"inline-panel"],["role","button","tabindex","-1","aria-disabled","true",1,"section-toggle","disabled"],[1,"error-icon"],[1,"error-text"],["mat-icon-button","","aria-label","Close error message",1,"error-close",3,"click"]],template:function(e,i){e&1&&(Ge(),I(0,nq,7,2),u(1,"mat-sidenav-container",1)(2,"mat-sidenav",2),w("closed",function(){return i.close()}),u(3,"div",3)(4,"button",4),w("click",function(){return i.close()}),u(5,"mat-icon"),g(6,"chevron_left"),m()(),u(7,"img",5),w("click",function(o){return i.navigateToHome(),o.stopPropagation()})("keydown.enter",function(o){return i.navigateToHome(),o.preventDefault(),o.stopPropagation()})("keydown.space",function(o){return i.navigateToHome(),o.preventDefault(),o.stopPropagation()}),m(),u(8,"div",6)(9,"h2",7),g(10),m()()(),u(11,"div",8)(12,"a",9),w("click",function(o){return i.createNewThread(),o.preventDefault()}),u(13,"mat-icon",10),g(14,"play_circle"),m(),u(15,"span",11),g(16,"Start a new thread"),m()()(),u(17,"div",12)(18,"div",13),I(19,iq,8,1,"div",14)(20,aq,6,4,"a",15),I(21,lq,2,2,"div",16),m(),u(22,"div",13)(23,"a",17),w("click",function(o){return i.toggleSection("config"),o.preventDefault()}),I(24,cq,2,0,"mat-icon",18)(25,dq,2,0,"mat-icon",19),u(26,"span",20),g(27,"Preferences"),m()(),I(28,uq,3,0,"div",21),m(),u(29,"div",13)(30,"a",17),w("click",function(o){return i.openUserConfig(),o.preventDefault(),o.stopPropagation()}),u(31,"mat-icon",19),g(32,"settings"),m(),u(33,"span",20),g(34,"User Configuration"),m()()(),I(35,fq,2,1),I(36,hq,6,0,"div",13)(37,gq,6,0,"div",13),I(38,vq,6,0,"div",13)(39,_q,6,0,"div",13),I(40,bq,6,0,"div",13)(41,yq,6,0,"div",13),u(42,"div",13)(43,"a",22),H(44,"img",23),u(45,"span",20),g(46,"Contribute on GitHub"),m()()()()(),u(47,"mat-sidenav-content"),we(48),m()(),I(49,Cq,8,1,"div",24)),e&2&&(k(i.isOpen?-1:0),f(),D("hasBackdrop",!1),f(),D("opened",i.isOpen)("disableClose",!0),f(5),j("sidenav-logo",!0)("clickable",!i.forcedProject())("disabled",i.forcedProject()),D("title",i.forcedProject()?"Project selection disabled":"Go to project selection"),ne("src","CODAY-Logo.png",ga)("role",i.forcedProject()?null:"button")("tabindex",i.forcedProject()?null:"0"),f(3),K(i.selectedProjectName()),f(7),j("has-footer",!0)("is-admin",i.isAdmin),f(),j("expanded",i.expandedSections.threads),f(),k(i.isThreadSearchActive&&i.expandedSections.threads?19:20),f(2),k(i.expandedSections.threads?21:-1),f(),j("expanded",i.expandedSections.config),f(),j("active",i.expandedSections.config),f(),k(i.expandedSections.config?24:25),f(4),k(i.expandedSections.config?28:-1),f(7),k(i.isAdmin?35:-1),f(),k(i.selectedProjectName()?36:37),f(2),k(i.selectedProjectName()?38:39),f(2),k(i.selectedProjectName()?40:41),f(4),ne("src","CODAY-Logo.png",ga),f(5),k(i.configErrorMessage?49:-1))},dependencies:[Rt,Et,Pt,Tt,Yv,Qx,tR,Gv,Ot,$e,vn,Gt,sR,aR,Vm,i_],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:1rem!important;left:1rem!important;z-index:1500!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]{position:fixed!important;top:4.5rem!important;left:1rem!important;z-index:1500!important}.sidenav-new-thread-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]:disabled{opacity:.5!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]:disabled mat-icon[_ngcontent-%COMP%]{color:var(--color-text-secondary)!important}.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;height:100%;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border-radius:0;overflow: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;flex-shrink:0}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:4px;flex-shrink:0;transition:all .2s ease}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]{cursor:pointer}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:hover{transform:scale(1.1);filter:drop-shadow(0 4px 12px rgba(0,0,0,.15))}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:active{transform:scale(.95)}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed;pointer-events:none}.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}.loading-section[_ngcontent-%COMP%]{padding:2rem 1rem;display:flex;align-items:center;justify-content:center}.loading-content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:1rem;align-items:center}.loading-content[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{width:100%;height:4px;border-radius:2px}.loading-content[_ngcontent-%COMP%] .loading-text[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary);text-align:center}.new-thread-section[_ngcontent-%COMP%]{padding:1rem 1rem .5rem;flex-shrink:0}.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{transform:scale(1.1)}@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%]{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:0;height:100%;max-height:calc(100vh - 122px)}.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%] .contribute-logo[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:2px;flex-shrink:0}.section-container[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column}.section-container.expanded[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}.section-container.expanded[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden;border-bottom:none;position:relative}.section-container.expanded[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]:after{content:"";position:sticky;bottom:0;left:0;right:0;height:60px;background:linear-gradient(to bottom,transparent 0%,var(--glass-bg) 100%);pointer-events:none;opacity:1;transition:opacity .3s ease;z-index:10;flex-shrink:0}.section-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;width:100%;padding:.5rem 1rem;height:50px;text-decoration:none;cursor:pointer;transition:all .2s ease;background:transparent;border:none;border-radius:0;color:var(--color-text);flex-shrink:0}.section-toggle.active[_ngcontent-%COMP%]{border-top:1px solid var(--color-border)}.section-toggle.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed;pointer-events:none}.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);flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;color:var(--color-text);text-align:left}.section-toggle[_ngcontent-%COMP%] .search-button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .search-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-toggle[_ngcontent-%COMP%]:hover:not(.disabled){background:var(--color-bg-hover)}.section-toggle[_ngcontent-%COMP%]:active:not(.disabled){transform:scale(.98)}.section-toggle[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.search-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;height:50px;background:var(--color-bg-hover);border-top:1px solid var(--color-border);transition:all .2s ease}.search-header[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);flex-shrink:0}.search-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;color:var(--color-text);font-size:.9rem;padding:0;min-width:0}.search-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-muted)}.search-header[_ngcontent-%COMP%] .close-search-btn[_ngcontent-%COMP%]{flex-shrink:0}.search-header[_ngcontent-%COMP%] .close-search-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-content[_ngcontent-%COMP%]{padding:.5rem 0 0;animation:_ngcontent-%COMP%_slideDown .2s ease;border-bottom:1px solid var(--color-border);display:flex;flex-direction:column}.section-content.threads[_ngcontent-%COMP%]{padding: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%}.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.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}.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}.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}@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:.75rem!important;top:.75rem!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 m_=class n{destroy$=new P;isSetup=!1;codayService=d(Wi);preferencesService=d(Bt);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe($(this.destroy$),Xs(),ue(([t,e])=>t===!0&&e===!1)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled()}),this.preferencesService.browserNotificationEnabled$.pipe($(this.destroy$),Xs(),ue(([t,e])=>t===!1&&e===!0)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled()}),this.isSetup=!0}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification())}playCompletionSound(){try{let t=new(window.AudioContext||window.webkitAudioContext),e=t.createOscillator(),i=t.createGain();e.connect(i),i.connect(t.destination),e.frequency.setValueAtTime(700,t.currentTime),i.gain.setValueAtTime(.1,t.currentTime),i.gain.exponentialRampToValueAtTime(.01,t.currentTime+.08),e.start(t.currentTime),e.stop(t.currentTime+.08);let r=t.createOscillator(),o=t.createGain();r.connect(o),o.connect(t.destination);let s=t.currentTime+.11;r.frequency.setValueAtTime(950,s),o.gain.setValueAtTime(.1,s),o.gain.exponentialRampToValueAtTime(.01,s+.09),r.start(s),r.stop(s+.09),console.log("[AGENT-NOTIFICATION] Completion sound played")}catch(t){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",t)}}handleBrowserNotificationEnabled(){return pe(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(!1);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(!1);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1))}catch(t){console.error("[AGENT-NOTIFICATION] Error requesting permission:",t),this.preferencesService.setBrowserNotificationEnabled(!1)}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification")}createConfirmationNotification(){let t=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:!1});setTimeout(()=>t.close(),4e3),t.onclick=()=>{window.focus(),t.close()},console.log("[AGENT-NOTIFICATION] Confirmation notification sent")}createTaskCompleteNotification(){let t=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:!1});setTimeout(()=>t.close(),5e3),t.onclick=()=>{window.focus(),t.close()},console.log("[AGENT-NOTIFICATION] Task complete notification sent")}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var wq=["inputSection"];function xq(n,t){if(n&1&&H(0,"app-thread",2),n&2){let e=b();D("projectName",e.projectName)("threadId",e.threadId)}}function Eq(n,t){if(n&1){let e=V();u(0,"div",3),H(1,"app-welcome-message"),m(),u(2,"div",4,0)(4,"div",5)(5,"div",6)(6,"app-chat-textarea",7),w("messageSubmitted",function(r){E(e);let o=b();return S(o.onMessageSubmitted(r))})("voiceRecordingToggled",function(r){E(e);let o=b();return S(o.onVoiceToggled(r))})("heightChanged",function(r){E(e);let o=b();return S(o.onInputHeightChanged(r))}),m()()()()}if(n&2){let e=b();f(6),D("isDisabled",e.isSessionInitializing)("isSessionInitializing",e.isSessionInitializing)("showWelcome",!0)("isThinking",!1)("isStarting",e.isStartingFirstMessage)}}var qm=class n{destroy$=new P;inputSection;projectName="";threadId=null;isSessionInitializing=!1;isStartingFirstMessage=!1;inputSectionHeight=80;codayService=d(Wi);titleService=d(ed);preferencesService=d(Bt);route=d(wi);router=d(xn);threadApiService=d(Ls);agentNotificationService=d(m_);firstMessageState=d(td);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)")}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe($(this.destroy$)).subscribe(t=>{let e=t.projectName,i=t.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:e,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=e,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView())})}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService)}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint)}onMessageSubmitted(t){console.log("[MAIN-APP] First message submitted from welcome view:",t),this.isSessionInitializing=!0,this.isStartingFirstMessage=!0,this.threadApiService.createThread().subscribe({next:e=>{console.log("[MAIN-APP] Thread created:",e.thread.id),this.firstMessageState.setPendingFirstMessage(t),this.router.navigate(["project",this.projectName,"thread",e.thread.id])},error:e=>{console.error("[MAIN-APP] Failed to create thread:",e),this.isSessionInitializing=!1,this.isStartingFirstMessage=!1,alert("Failed to create conversation: "+(e.message||"Unknown error"))}})}onVoiceToggled(t){console.log("[VOICE] Recording in welcome view:",t)}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)}}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=R({type:n,selectors:[["app-main"]],viewQuery:function(e,i){if(e&1&&xe(wq,5),e&2){let r;re(r=oe())&&(i.inputSection=r.first)}},decls:4,vars:1,consts:[["inputSection",""],[1,"app"],[3,"projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceRecordingToggled","heightChanged","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(e,i){e&1&&(u(0,"app-sidenav")(1,"div",1),I(2,xq,1,2,"app-thread",2)(3,Eq,7,5),m()()),e&2&&(f(2),k(i.threadId?2:3))},dependencies:[Uc,Kv,Pc,u_],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}.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%}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.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){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[nw("slideIn",[tg(":enter",[Cs({transform:"translateY(100%)",opacity:0}),eg("300ms ease-out",Cs({transform:"translateY(0)",opacity:1}))]),tg(":leave",[eg("200ms ease-in",Cs({transform:"translateY(100%)",opacity:0}))])])]}})};var p_=class n{route=d(wi);ngOnInit(){console.log("[OAuth Callback] Component initialized");let t=this.route.snapshot.queryParamMap.get("code"),e=this.route.snapshot.queryParamMap.get("state"),i=this.route.snapshot.queryParamMap.get("error"),r=this.route.snapshot.queryParamMap.get("error_description");if(console.log("[OAuth Callback] Code:",t,"State:",e,"Error:",i,"Opener:",!!window.opener),i){if(console.log("[OAuth Callback] OAuth error received:",i,r),!window.opener){alert(`OAuth error: ${i}${r?" - "+r:""}. Please close this window.`);return}try{window.opener.postMessage({error:i,state:e,errorDescription:r},window.location.origin),console.log("[OAuth Callback] Error postMessage sent successfully"),setTimeout(()=>{console.log("[OAuth Callback] Closing popup after error"),window.close()},1e3)}catch(o){console.error("[OAuth Callback] Error sending error postMessage:",o),alert("OAuth error: Failed to communicate with parent window")}return}if(!t||!e){console.error("[OAuth Callback] Missing code or state");return}if(!window.opener){console.error("[OAuth Callback] No window.opener - popup may have been opened incorrectly"),alert("OAuth callback error: No parent window found. Please close this window and try again.");return}try{console.log("[OAuth Callback] Sending postMessage to parent"),window.opener.postMessage({code:t,state:e},window.location.origin),console.log("[OAuth Callback] postMessage sent successfully"),setTimeout(()=>{console.log("[OAuth Callback] Closing popup"),window.close()},1e3)}catch(o){console.error("[OAuth Callback] Error sending postMessage:",o),alert("OAuth callback error: Failed to communicate with parent window")}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-oauth-callback"]],decls:2,vars:0,template:function(e,i){e&1&&(fn(0,"p"),g(1,"Authentication in progress..."),hn())},encapsulation:2})};var sE=n=>pe(null,null,function*(){let t=d(qe),e=n.params.projectName;return e?t.getSelectedProjectId()===e?!0:(t.selectProject(e),(yield G_(t.selectedProject$.pipe(Ti(r=>r?.name===e))))?.name===e):(console.log("[PROJECT GUARD] no project id in route"),!1)});var jR=n=>pe(null,null,function*(){let t=d(Rn),e=n.params.threadId;if(!e)return console.log("[THREAD GUARD] no threadId in route"),!1;if(console.log("[THREAD GUARD] Checking thread:",e),console.log("[THREAD GUARD] Current selected thread:",t.getSelectedThreadId()),t.getSelectedThreadId()===e)return console.log("[THREAD GUARD] Thread already selected, allowing navigation"),!0;console.log("[THREAD GUARD] Selecting thread:",e),t.selectThread(e);try{let i=yield W_(In([t.isLoading$,t.selectedThread$]).pipe(Oe(([o,s])=>console.log(`\u{1F43C} [${o?"loading":"loaded"}]`,s?.id)),ue(([o,s])=>!o&&!!s),Ye(1),z(([o,s])=>s?.id))),r=i===e;return r?console.log("[THREAD GUARD] Thread validated, allowing navigation"):console.error("[THREAD GUARD] Thread ID mismatch - route:",e,"loaded:",i),r}catch(i){return console.error("[THREAD GUARD] Error loading thread:",i),!1}});var VR=[{path:"",component:Tv},{path:"oauth/callback",component:p_},{path:"project/:projectName",component:qm,canActivate:[sE]},{path:"project/:projectName/thread/:threadId",component:qm,canActivate:[sE,jR]},{path:"**",redirectTo:""}];var f_=class n{eventStream=d(to);messageApi=d(zc);pendingStates=new Map;popupCheckInterval=null;constructor(){this.eventStream.events$.pipe(ue(t=>t.type==="oauth_request")).subscribe(t=>this.handleOAuthRequest(t)),window.addEventListener("message",t=>this.handlePopupMessage(t))}startPopupMonitoring(t,e){this.popupCheckInterval&&clearInterval(this.popupCheckInterval),this.popupCheckInterval=setInterval(()=>{if(t.closed&&(console.log("[OAuth Service] Popup closed by user"),clearInterval(this.popupCheckInterval),this.popupCheckInterval=null,this.pendingStates.has(e))){console.warn("[OAuth Service] OAuth cancelled - popup closed without completing authentication");let i=this.pendingStates.get(e);if(this.pendingStates.delete(e),i){let r=new eo({state:e,integrationName:i,error:"user_cancelled",errorDescription:"User closed the popup without completing authentication"});this.messageApi.sendMessage(r).subscribe({next:()=>console.log("[OAuth Service] Cancellation sent to backend"),error:o=>console.error("[OAuth Service] Failed to send cancellation:",o)})}}},500)}handleOAuthRequest(t){console.log("[OAuth Service] Received OAuthRequestEvent:",t.integrationName,t.state),this.pendingStates.set(t.state,t.integrationName),console.log("[OAuth Service] Pending states:",Array.from(this.pendingStates.keys()));let e=600,i=900,r=window.screenX+(window.outerWidth-e)/2,o=window.screenY+(window.outerHeight-i)/2,s=`width=${e},height=${i},left=${r},top=${o},popup=yes,resizable=yes,scrollbars=yes`,a=window.open(t.authUrl,"oauth_popup",s);console.log("[OAuth Service] Popup opened:",!!a),a&&(a.focus(),this.startPopupMonitoring(a,t.state))}handlePopupMessage(t){if(console.log("[OAuth Service] Received postMessage:",t.origin,t.data),t.origin!==window.location.origin){console.warn("[OAuth Service] Rejected message from different origin:",t.origin);return}let{code:e,state:i,error:r,errorDescription:o}=t.data??{};if(r){console.log("[OAuth Service] OAuth error received:",r,o);let l=this.pendingStates.get(i);if(l){this.pendingStates.delete(i),this.popupCheckInterval&&(clearInterval(this.popupCheckInterval),this.popupCheckInterval=null);let c=new eo({state:i,integrationName:l,error:r,errorDescription:o});this.messageApi.sendMessage(c).subscribe({next:()=>console.log("[OAuth Service] Error callback sent to backend"),error:p=>console.error("[OAuth Service] Failed to send error callback:",p)})}return}if(!e||!i){console.warn("[OAuth Service] Message missing code or state:",t.data);return}console.log("[OAuth Service] Processing callback - code:",e,"state:",i);let s=this.pendingStates.get(i);if(!s){console.warn("[OAuth Service] Unknown state received:",i,"Pending states:",Array.from(this.pendingStates.keys()));return}console.log("[OAuth Service] Found integration:",s),this.pendingStates.delete(i),this.popupCheckInterval&&(clearInterval(this.popupCheckInterval),this.popupCheckInterval=null);let a=new eo({code:e,state:i,integrationName:s});console.log("[OAuth Service] Sending callback to backend..."),this.messageApi.sendMessage(a).subscribe({next:()=>console.log("[OAuth Service] Callback sent to backend successfully"),error:l=>console.error("[OAuth Service] Failed to send callback:",l)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function Sq(n){return()=>n.initializeDefaultProject()}function Mq(n){return()=>{console.log("[APP_INIT] OAuthService initialized")}}var BR={providers:[Gb(),U0({eventCoalescing:!0}),JC(VR),SC(),QA(),Kp(Ic),{provide:Wl,useFactory:Sq,deps:[qe],multi:!0},{provide:Wl,useFactory:Mq,deps:[f_],multi:!0},{provide:Qg,useValue:{width:"80vw",maxWidth:"80vw",maxHeight:"80vh"}}]};var h_=class n{title="client";themeService=d(nd);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=R({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(e,i){e&1&&H(0,"router-outlet")},dependencies:[tw,Lu],encapsulation:2})};wC(h_,BR).catch(n=>console.error(n));
|