guito 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ var lx=Object.defineProperty,cx=Object.defineProperties;var dx=Object.getOwnPropertyDescriptors;var Wm=Object.getOwnPropertySymbols;var ux=Object.prototype.hasOwnProperty,px=Object.prototype.propertyIsEnumerable;var qm=(n,t,e)=>t in n?lx(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,G=(n,t)=>{for(var e in t||={})ux.call(t,e)&&qm(n,e,t[e]);if(Wm)for(var e of Wm(t))px.call(t,e)&&qm(n,e,t[e]);return n},oe=(n,t)=>cx(n,dx(t));var Dn=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{a(e.next(l))}catch(d){r(d)}},s=l=>{try{a(e.throw(l))}catch(d){r(d)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(n,t)).next())});var Zd;function Oa(){return Zd}function Sn(n){let t=Zd;return Zd=n,t}var Zm=Symbol("NotFound");function Nr(n){return n===Zm||n?.name==="\u0275NotFound"}var ht=null,Ra=!1,Yd=1,fx=null,Ye=Symbol("SIGNAL");function re(n){let t=ht;return ht=n,t}function Na(){return ht}var Jn={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 ei(n){if(Ra)throw new Error("");if(ht===null)return;ht.consumerOnSignalRead(n);let t=ht.producersTail;if(t!==void 0&&t.producer===n)return;let e,i=ht.recomputing;if(i&&(e=t!==void 0?t.nextProducer:ht.producers,e!==void 0&&e.producer===n)){ht.producersTail=e,e.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===ht&&(!i||mx(r,ht)))return;let o=Lr(ht),s={producer:n,consumer:ht,nextProducer:e,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};ht.producersTail=s,t!==void 0?t.nextProducer=s:ht.producers=s,o&&Xm(n,s)}function Ym(){Yd++}function Oi(n){if(!(Lr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===Yd)){if(!n.producerMustRecompute(n)&&!Ri(n)){Ar(n);return}n.producerRecomputeValue(n),Ar(n)}}function Qd(n){if(n.consumers===void 0)return;let t=Ra;Ra=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||hx(i)}}finally{Ra=t}}function Kd(){return ht?.consumerAllowSignalWrites!==!1}function hx(n){n.dirty=!0,Qd(n),n.consumerMarkedDirty?.(n)}function Ar(n){n.dirty=!1,n.lastCleanEpoch=Yd}function Vn(n){return n&&Qm(n),re(n)}function Qm(n){n.producersTail=void 0,n.recomputing=!0}function ti(n,t){re(t),n&&Km(n)}function Km(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(Lr(n))do e=Xd(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function Ri(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,i=t.lastReadVersion;if(i!==e.version||(Oi(e),i!==e.version))return!0}return!1}function ni(n){if(Lr(n)){let t=n.producers;for(;t!==void 0;)t=Xd(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function Xm(n,t){let e=n.consumersTail,i=Lr(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)Xm(r.producer,r)}function Xd(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,!Lr(t)){let o=t.producers;for(;o!==void 0;)o=Xd(o)}return e}function Lr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function Bo(n){fx?.(n)}function mx(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 jo(n,t){return Object.is(n,t)}function $o(n,t){let e=Object.create(gx);e.computation=n,t!==void 0&&(e.equal=t);let i=()=>{if(Oi(e),ei(e),e.value===Fn)throw e.error;return e.value};return i[Ye]=e,Bo(e),i}var Xn=Symbol("UNSET"),Pi=Symbol("COMPUTING"),Fn=Symbol("ERRORED"),gx=oe(G({},Jn),{value:Xn,dirty:!0,error:null,equal:jo,kind:"computed",producerMustRecompute(n){return n.value===Xn||n.value===Pi},producerRecomputeValue(n){if(n.value===Pi)throw new Error("");let t=n.value;n.value=Pi;let e=Vn(n),i,r=!1;try{i=n.computation(),re(null),r=t!==Xn&&t!==Fn&&i!==Fn&&n.equal(t,i)}catch(o){i=Fn,n.error=o}finally{ti(n,e)}if(r){n.value=t;return}n.value=i,n.version++}});function _x(){throw new Error}var Jm=_x;function eg(n){Jm(n)}function Jd(n){Jm=n}var vx=null;function eu(n,t){let e=Object.create(Ho);e.value=n,t!==void 0&&(e.equal=t);let i=()=>tg(e);return i[Ye]=e,Bo(e),[i,s=>Ni(e,s),s=>Aa(e,s)]}function tg(n){return ei(n),n.value}function Ni(n,t){Kd()||eg(n),n.equal(n.value,t)||(n.value=t,bx(n))}function Aa(n,t){Kd()||eg(n),Ni(n,t(n.value))}var Ho=oe(G({},Jn),{equal:jo,value:void 0,kind:"signal"});function bx(n){n.version++,Ym(),Qd(n),vx?.(n)}function he(n){return typeof n=="function"}function Fr(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 La=Fr(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 Ai(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Ve=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(he(i))try{i()}catch(o){t=o instanceof La?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{ng(o)}catch(s){t=t??[],s instanceof La?t=[...t,...s.errors]:t.push(s)}}if(t)throw new La(t)}}add(t){var e;if(t&&t!==this)if(this.closed)ng(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)&&Ai(e,t)}remove(t){let{_finalizers:e}=this;e&&Ai(e,t),t instanceof n&&t._removeParent(this)}};Ve.EMPTY=(()=>{let n=new Ve;return n.closed=!0,n})();var tu=Ve.EMPTY;function Fa(n){return n instanceof Ve||n&&"closed"in n&&he(n.remove)&&he(n.add)&&he(n.unsubscribe)}function ng(n){he(n)?n():n.unsubscribe()}var sn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Vr={setTimeout(n,t,...e){let{delegate:i}=Vr;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Vr;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Va(n){Vr.setTimeout(()=>{let{onUnhandledError:t}=sn;if(t)t(n);else throw n})}function Uo(){}var ig=nu("C",void 0,void 0);function rg(n){return nu("E",void 0,n)}function og(n){return nu("N",n,void 0)}function nu(n,t,e){return{kind:n,value:t,error:e}}var Li=null;function Br(n){if(sn.useDeprecatedSynchronousErrorHandling){let t=!Li;if(t&&(Li={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Li;if(Li=null,e)throw i}}else n()}function sg(n){sn.useDeprecatedSynchronousErrorHandling&&Li&&(Li.errorThrown=!0,Li.error=n)}var Fi=class extends Ve{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Fa(t)&&t.add(this)):this.destination=xx}static create(t,e,i){return new an(t,e,i)}next(t){this.isStopped?ru(og(t),this):this._next(t)}error(t){this.isStopped?ru(rg(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?ru(ig,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()}}},yx=Function.prototype.bind;function iu(n,t){return yx.call(n,t)}var ou=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){Ba(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){Ba(i)}else Ba(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){Ba(e)}}},an=class extends Fi{constructor(t,e,i){super();let r;if(he(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&sn.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&iu(t.next,o),error:t.error&&iu(t.error,o),complete:t.complete&&iu(t.complete,o)}):r=t}this.destination=new ou(r)}};function Ba(n){sn.useDeprecatedSynchronousErrorHandling?sg(n):Va(n)}function Cx(n){throw n}function ru(n,t){let{onStoppedNotification:e}=sn;e&&Vr.setTimeout(()=>e(n,t))}var xx={closed:!0,next:Uo,error:Cx,complete:Uo};var jr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function $r(n){return n}function ag(n){return n.length===0?$r:n.length===1?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var de=(()=>{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=Ex(e)?e:new an(e,i,r);return Br(()=>{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=lg(i),new i((r,o)=>{let s=new an({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)}[jr](){return this}pipe(...e){return ag(e)(this)}toPromise(e){return e=lg(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 lg(n){var t;return(t=n??sn.Promise)!==null&&t!==void 0?t:Promise}function wx(n){return n&&he(n.next)&&he(n.error)&&he(n.complete)}function Ex(n){return n&&n instanceof Fi||wx(n)&&Fa(n)}function su(n){return he(n?.lift)}function ye(n){return t=>{if(su(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 xe(n,t,e,i,r){return new au(n,t,e,i,r)}var au=class extends Fi{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 cg(){return ye((n,t)=>{let e=null;n._refCount++;let i=xe(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 zo=class extends de{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,su(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 Ve;let e=this.getSubject();t.add(this.source.subscribe(xe(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Ve.EMPTY)}return t}refCount(){return cg()(this)}};var Hr={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Hr;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Ve(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Hr;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Hr;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var dg=Fr(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var $e=(()=>{class n extends de{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new ja(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new dg}next(e){Br(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){Br(()=>{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(){Br(()=>{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?tu:(this.currentObservers=null,o.push(e),new Ve(()=>{this.currentObservers=null,Ai(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new de;return e.source=this,e}}return n.create=(t,e)=>new ja(t,e),n})(),ja=class extends $e{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:tu}};var Go=class extends $e{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 Wo={now(){return(Wo.delegate||Date).now()},delegate:void 0};var Vi=class extends $e{constructor(t=1/0,e=1/0,i=Wo){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 $a=class extends Ve{constructor(t,e){super()}schedule(t,e=0){return this}};var qo={setInterval(n,t,...e){let{delegate:i}=qo;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=qo;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var ii=class extends $a{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 qo.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&&qo.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,Ai(i,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var Dx=1,lu,cu={};function ug(n){return n in cu?(delete cu[n],!0):!1}var pg={setImmediate(n){let t=Dx++;return cu[t]=!0,lu||(lu=Promise.resolve()),lu.then(()=>ug(t)&&n()),t},clearImmediate(n){ug(n)}};var{setImmediate:Sx,clearImmediate:Tx}=pg,Zo={setImmediate(...n){let{delegate:t}=Zo;return(t?.setImmediate||Sx)(...n)},clearImmediate(n){let{delegate:t}=Zo;return(t?.clearImmediate||Tx)(n)},delegate:void 0};var Ha=class extends ii{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Zo.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Zo.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}};var Ur=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)}};Ur.now=Wo.now;var ri=class extends Ur{constructor(t,e=Ur.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 Ua=class extends ri{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var du=new Ua(Ha);var Yo=new ri(ii),fg=Yo;var za=class extends ii{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Hr.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&e===t._scheduled&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Hr.cancelAnimationFrame(e),t._scheduled=void 0)}};var Ga=class extends ri{flush(t){this._active=!0;let e;t?e=t.id:(e=this._scheduled,this._scheduled=void 0);let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var uu=new Ga(za);function Wa(n){return n&&he(n.schedule)}function hg(n){return n[n.length-1]}function mg(n){return he(hg(n))?n.pop():void 0}function zr(n){return Wa(hg(n))?n.pop():void 0}function _g(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(m){try{d(i.next(m))}catch(y){s(y)}}function l(m){try{d(i.throw(m))}catch(y){s(y)}}function d(m){m.done?o(m.value):r(m.value).then(a,l)}d((i=i.apply(n,t||[])).next())})}function gg(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 Bi(n){return this instanceof Bi?(this.v=n,this):new Bi(n)}function vg(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(D){return function(R){return Promise.resolve(R).then(D,y)}}function a(D,R){i[D]&&(r[D]=function(j){return new Promise(function(Z,$){o.push([D,j,Z,$])>1||l(D,j)})},R&&(r[D]=R(r[D])))}function l(D,R){try{d(i[D](R))}catch(j){w(o[0][3],j)}}function d(D){D.value instanceof Bi?Promise.resolve(D.value.v).then(m,y):w(o[0][2],D)}function m(D){l("next",D)}function y(D){l("throw",D)}function w(D,R){D(R),o.shift(),o.length&&l(o[0][0],o[0][1])}}function bg(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 gg=="function"?gg(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(d){o({value:d,done:a})},s)}}var qa=n=>n&&typeof n.length=="number"&&typeof n!="function";function Za(n){return he(n?.then)}function Ya(n){return he(n[jr])}function Qa(n){return Symbol.asyncIterator&&he(n?.[Symbol.asyncIterator])}function Ka(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 Mx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Xa=Mx();function Ja(n){return he(n?.[Xa])}function el(n){return vg(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield Bi(e.read());if(r)return yield Bi(void 0);yield yield Bi(i)}}finally{e.releaseLock()}})}function tl(n){return he(n?.getReader)}function Re(n){if(n instanceof de)return n;if(n!=null){if(Ya(n))return kx(n);if(qa(n))return Ix(n);if(Za(n))return Px(n);if(Qa(n))return yg(n);if(Ja(n))return Ox(n);if(tl(n))return Rx(n)}throw Ka(n)}function kx(n){return new de(t=>{let e=n[jr]();if(he(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ix(n){return new de(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function Px(n){return new de(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Va)})}function Ox(n){return new de(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function yg(n){return new de(t=>{Nx(n,t).catch(e=>t.error(e))})}function Rx(n){return yg(el(n))}function Nx(n,t){var e,i,r,o;return _g(this,void 0,void 0,function*(){try{for(e=bg(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 Gt(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 nl(n,t=0){return ye((e,i)=>{e.subscribe(xe(i,r=>Gt(i,n,()=>i.next(r),t),()=>Gt(i,n,()=>i.complete(),t),r=>Gt(i,n,()=>i.error(r),t)))})}function il(n,t=0){return ye((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function Cg(n,t){return Re(n).pipe(il(t),nl(t))}function xg(n,t){return Re(n).pipe(il(t),nl(t))}function wg(n,t){return new de(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function Eg(n,t){return new de(e=>{let i;return Gt(e,t,()=>{i=n[Xa](),Gt(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)}),()=>he(i?.return)&&i.return()})}function rl(n,t){if(!n)throw new Error("Iterable cannot be null");return new de(e=>{Gt(e,t,()=>{let i=n[Symbol.asyncIterator]();Gt(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Dg(n,t){return rl(el(n),t)}function Sg(n,t){if(n!=null){if(Ya(n))return Cg(n,t);if(qa(n))return wg(n,t);if(Za(n))return xg(n,t);if(Qa(n))return rl(n,t);if(Ja(n))return Eg(n,t);if(tl(n))return Dg(n,t)}throw Ka(n)}function ol(n,t){return t?Sg(n,t):Re(n)}function we(...n){let t=zr(n);return ol(n,t)}function pu(n,t){let e=he(n)?n:()=>n,i=r=>r.error(e());return new de(t?r=>t.schedule(i,0,r):i)}function Qo(n){return!!n&&(n instanceof de||he(n.lift)&&he(n.subscribe))}var Tg=Fr(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function sl(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=new an({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new Tg)}});n.subscribe(o)})}function Mg(n){return n instanceof Date&&!isNaN(n)}function Ge(n,t){return ye((e,i)=>{let r=0;e.subscribe(xe(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:Ax}=Array;function Lx(n,t){return Ax(t)?n(...t):n(t)}function kg(n){return Ge(t=>Lx(n,t))}var{isArray:Fx}=Array,{getPrototypeOf:Vx,prototype:Bx,keys:jx}=Object;function Ig(n){if(n.length===1){let t=n[0];if(Fx(t))return{args:t,keys:null};if($x(t)){let e=jx(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function $x(n){return n&&typeof n=="object"&&Vx(n)===Bx}function Pg(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Og(n,t,e,i,r,o,s,a){let l=[],d=0,m=0,y=!1,w=()=>{y&&!l.length&&!d&&t.complete()},D=j=>d<i?R(j):l.push(j),R=j=>{o&&t.next(j),d++;let Z=!1;Re(e(j,m++)).subscribe(xe(t,$=>{r?.($),o?D($):t.next($)},()=>{Z=!0},void 0,()=>{if(Z)try{for(d--;l.length&&d<i;){let $=l.shift();s?Gt(t,s,()=>R($)):R($)}w()}catch($){t.error($)}}))};return n.subscribe(xe(t,D,()=>{y=!0,w()})),()=>{a?.()}}function Gr(n,t,e=1/0){return he(t)?Gr((i,r)=>Ge((o,s)=>t(i,o,r,s))(Re(n(i,r))),e):(typeof t=="number"&&(e=t),ye((i,r)=>Og(i,r,n,e)))}function Rg(n=1/0){return Gr($r,n)}function Ng(){return Rg(1)}function fu(...n){return Ng()(ol(n,zr(n)))}function hu(n){return new de(t=>{Re(n()).subscribe(t)})}function al(...n){let t=mg(n),{args:e,keys:i}=Ig(n),r=new de(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,d=s;for(let m=0;m<s;m++){let y=!1;Re(e[m]).subscribe(xe(o,w=>{y||(y=!0,d--),a[m]=w},()=>l--,void 0,()=>{(!l||!y)&&(d||o.next(i?Pg(i,a):a),o.complete())}))}});return t?r.pipe(kg(t)):r}function Ag(n=0,t,e=fg){let i=-1;return t!=null&&(Wa(t)?e=t:i=t),new de(r=>{let o=Mg(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 Ko(n,t){return ye((e,i)=>{let r=0;e.subscribe(xe(i,o=>n.call(t,o,r++)&&i.next(o)))})}function Lg(n){return ye((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let d=r;r=null,e.next(d)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(xe(e,d=>{i=!0,r=d,o||Re(n(d)).subscribe(o=xe(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}function Xo(n,t=Yo){return Lg(()=>Ag(n,t))}function ot(n){return ye((t,e)=>{let i=null,r=!1,o;i=t.subscribe(xe(e,void 0,void 0,s=>{o=Re(n(s,ot(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function mu(n,t){return he(t)?Gr(n,t,1):Gr(n,1)}function gu(n,t=Yo){return ye((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let d=o;o=null,i.next(d)}};function l(){let d=s+n,m=t.now();if(m<d){r=this.schedule(void 0,d-m),i.add(r);return}a()}e.subscribe(xe(i,d=>{o=d,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function Jo(n,t=$r){return n=n??Hx,ye((e,i)=>{let r,o=!0;e.subscribe(xe(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function Hx(n,t){return n===t}function oi(n){return ye((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function _u(){return ye((n,t)=>{let e,i=!1;n.subscribe(xe(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Fg(n={}){let{connector:t=()=>new $e,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,d=0,m=!1,y=!1,w=()=>{a?.unsubscribe(),a=void 0},D=()=>{w(),s=l=void 0,m=y=!1},R=()=>{let j=s;D(),j?.unsubscribe()};return ye((j,Z)=>{d++,!y&&!m&&w();let $=l=l??t();Z.add(()=>{d--,d===0&&!y&&!m&&(a=vu(R,r))}),$.subscribe(Z),!s&&d>0&&(s=new an({next:_e=>$.next(_e),error:_e=>{y=!0,w(),a=vu(D,e,_e),$.error(_e)},complete:()=>{m=!0,w(),a=vu(D,i),$.complete()}}),Re(j).subscribe(s))})(o)}}function vu(n,t,...e){if(t===!0){n();return}if(t===!1)return;let i=new an({next:()=>{i.unsubscribe(),n()}});return Re(t(...e)).subscribe(i)}function Wr(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,Fg({connector:()=>new Vi(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function ll(...n){let t=zr(n);return ye((e,i)=>{(t?fu(n,e,t):fu(n,e)).subscribe(i)})}function yt(n,t){return ye((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(xe(i,l=>{r?.unsubscribe();let d=0,m=o++;Re(n(l,m)).subscribe(r=xe(i,y=>i.next(t?t(l,y,m,d++):y),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function ji(n){return ye((t,e)=>{Re(n).subscribe(xe(e,()=>e.complete(),Uo)),!e.closed&&t.subscribe(e)})}function bu(n,t,e){let i=Object.create(Ux);i.source=n,i.computation=t,e!=null&&(i.equal=e);let o=()=>{if(Oi(i),ei(i),i.value===Fn)throw i.error;return i.value};return o[Ye]=i,Bo(i),o}function Vg(n,t){Oi(n),Ni(n,t),Ar(n)}function Bg(n,t){Oi(n),Aa(n,t),Ar(n)}var Ux=oe(G({},Jn),{value:Xn,dirty:!0,error:null,equal:jo,kind:"linkedSignal",producerMustRecompute(n){return n.value===Xn||n.value===Pi},producerRecomputeValue(n){if(n.value===Pi)throw new Error("");let t=n.value;n.value=Pi;let e=Vn(n),i;try{let r=n.source(),o=t===Xn||t===Fn?void 0:{source:n.sourceValue,value:t};i=n.computation(r,o),n.sourceValue=r}catch(r){i=Fn,n.error=r}finally{ti(n,e)}if(t!==Xn&&i!==Fn&&n.equal(t,i)){n.value=t;return}n.value=i,n.version++}});function jg(n){let t=re(null);try{return n()}finally{re(t)}}var $g=oe(G({},Jn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Hg(n){if(n.dirty=!1,n.version>0&&!Ri(n))return;n.version++;let t=Vn(n);try{n.cleanup(),n.fn()}finally{ti(n,t)}}var fl="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Y=class extends Error{code;constructor(t,e){super(Wi(t,e)),this.code=t}};function zx(n){return`NG0${Math.abs(n)}`}function Wi(n,t){return`${zx(n)}${t?": "+t:""}`}var ln=globalThis;function Me(n){for(let t in n)if(n[t]===Me)return t;throw Error("")}function Gg(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function ai(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(ai).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 hl(n,t){return n?t?`${n} ${t}`:n:t||""}var Gx=Me({__forward_ref__:Me});function Zr(n){return n.__forward_ref__=Zr,n.toString=function(){return ai(this())},n}function mt(n){return Wg(n)?n():n}function Wg(n){return typeof n=="function"&&n.hasOwnProperty(Gx)&&n.__forward_ref__===Zr}function ae(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ml(n){return Wx(n,gl)}function Wx(n,t){return n.hasOwnProperty(t)&&n[t]||null}function qx(n){let t=n?.[gl]??null;return t||null}function Cu(n){return n&&n.hasOwnProperty(ul)?n[ul]:null}var gl=Me({\u0275prov:Me}),ul=Me({\u0275inj:Me}),te=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=ae({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ou(n){return n&&!!n.\u0275providers}var Ru=Me({\u0275cmp:Me}),Nu=Me({\u0275dir:Me}),Au=Me({\u0275pipe:Me});var xu=Me({\u0275fac:Me}),qi=Me({__NG_ELEMENT_ID__:Me}),Ug=Me({__NG_ENV_ID__:Me});function cn(n){return typeof n=="string"?n:n==null?"":String(n)}function qg(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():cn(n)}var Zg=Me({ngErrorCode:Me}),Zx=Me({ngErrorMessage:Me}),Yx=Me({ngTokenPath:Me});function Lu(n,t){return Yg("",-200,t)}function _l(n,t){throw new Y(-201,!1)}function Yg(n,t,e){let i=new Y(t,n);return i[Zg]=t,i[Zx]=n,e&&(i[Yx]=e),i}function Qx(n){return n[Zg]}var wu;function Qg(){return wu}function xt(n){let t=wu;return wu=n,t}function Fu(n,t,e){let i=ml(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;_l(n,"Injector")}var Kx={},$i=Kx,Eu="__NG_DI_FLAG__",Du=class{injector;constructor(t){this.injector=t}retrieve(t,e){let i=Hi(e)||0;try{return this.injector.get(t,i&8?null:$i,i)}catch(r){if(Nr(r))return r;throw r}}};function Xx(n,t=0){let e=Oa();if(e===void 0)throw new Y(-203,!1);if(e===null)return Fu(n,void 0,t);{let i=Jx(t),r=e.retrieve(n,i);if(Nr(r)){if(i.optional)return null;throw r}return r}}function ge(n,t=0){return(Qg()||Xx)(mt(n),t)}function I(n,t){return ge(n,Hi(t))}function Hi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Jx(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function Su(n){let t=[];for(let e=0;e<n.length;e++){let i=mt(n[e]);if(Array.isArray(i)){if(i.length===0)throw new Y(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=ew(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}t.push(ge(r,o))}else t.push(ge(i))}return t}function Vu(n,t){return n[Eu]=t,n.prototype[Eu]=t,n}function ew(n){return n[Eu]}function Ui(n,t){let e=n.hasOwnProperty(xu);return e?n[xu]:null}function Kg(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 Xg(n){return n.flat(Number.POSITIVE_INFINITY)}function vl(n,t){n.forEach(e=>Array.isArray(e)?vl(e,t):t(e))}function Bu(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function rs(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function Jg(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function e0(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 bl(n,t,e){let i=Yr(n,t);return i>=0?n[i|1]=e:(i=~i,e0(n,i,t,e)),i}function yl(n,t){let e=Yr(n,t);if(e>=0)return n[e|1]}function Yr(n,t){return tw(n,t,1)}function tw(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 ci={},Wt=[],Zi=new te(""),ju=new te("",-1),$u=new te(""),ts=class{get(t,e=$i){if(e===$i){let r=Yg("",-201);throw r.name="\u0275NotFound",r}return e}};function Yi(n){return n[Ru]||null}function Hu(n){return n[Nu]||null}function t0(n){return n[Au]||null}function os(n){return{\u0275providers:n}}function n0(...n){return{\u0275providers:Uu(!0,n),\u0275fromNgModule:!0}}function Uu(n,...t){let e=[],i=new Set,r,o=s=>{e.push(s)};return vl(t,s=>{let a=s;pl(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&i0(r,o),e}function i0(n,t){for(let e=0;e<n.length;e++){let{ngModule:i,providers:r}=n[e];zu(r,o=>{t(o,i)})}}function pl(n,t,e,i){if(n=mt(n),!n)return!1;let r=null,o=Cu(n),s=!o&&Yi(n);if(!o&&!s){let l=n.ngModule;if(o=Cu(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 d of l)pl(d,t,e,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let d;vl(o.imports,m=>{pl(m,t,e,i)&&(d||=[],d.push(m))}),d!==void 0&&i0(d,t)}if(!a){let d=Ui(r)||(()=>new r);t({provide:r,useFactory:d,deps:Wt},r),t({provide:$u,useValue:r,multi:!0},r),t({provide:Zi,useValue:()=>ge(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let d=n;zu(l,m=>{t(m,d)})}}else return!1;return r!==n&&n.providers!==void 0}function zu(n,t){for(let e of n)Ou(e)&&(e=e.\u0275providers),Array.isArray(e)?zu(e,t):t(e)}var nw=Me({provide:String,useValue:Me});function r0(n){return n!==null&&typeof n=="object"&&nw in n}function iw(n){return!!(n&&n.useExisting)}function rw(n){return!!(n&&n.useFactory)}function zi(n){return typeof n=="function"}function o0(n){return!!n.useClass}var ss=new te(""),cl={},zg={},yu;function as(){return yu===void 0&&(yu=new ts),yu}var Pt=class{},Gi=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,Mu(t,s=>this.processProvider(s)),this.records.set(ju,qr(void 0,this)),r.has("environment")&&this.records.set(Pt,qr(void 0,this));let o=this.records.get(ss);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get($u,Wt,{self:!0}))}retrieve(t,e){let i=Hi(e)||0;try{return this.get(t,$i,i)}catch(r){if(Nr(r))return r;throw r}}destroy(){es(this),this._destroyed=!0;let t=re(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(),re(t)}}onDestroy(t){return es(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){es(this);let e=Sn(this),i=xt(void 0),r;try{return t()}finally{Sn(e),xt(i)}}get(t,e=$i,i){if(es(this),t.hasOwnProperty(Ug))return t[Ug](this);let r=Hi(i),o,s=Sn(this),a=xt(void 0);try{if(!(r&4)){let d=this.records.get(t);if(d===void 0){let m=cw(t)&&ml(t);m&&this.injectableDefInScope(m)?d=qr(Tu(t),cl):d=null,this.records.set(t,d)}if(d!=null)return this.hydrate(t,d,r)}let l=r&2?as():this.parent;return e=r&8&&e===$i?null:e,l.get(t,e)}catch(l){let d=Qx(l);throw d===-200||d===-201?new Y(d,null):l}finally{xt(a),Sn(s)}}resolveInjectorInitializers(){let t=re(null),e=Sn(this),i=xt(void 0),r;try{let o=this.get(Zi,Wt,{self:!0});for(let s of o)s()}finally{Sn(e),xt(i),re(t)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(ai(i));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=mt(t);let e=zi(t)?t:mt(t&&t.provide),i=sw(t);if(!zi(t)&&t.multi===!0){let r=this.records.get(e);r||(r=qr(void 0,cl,!0),r.factory=()=>Su(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e,i){let r=re(null);try{if(e.value===zg)throw Lu(ai(t));return e.value===cl&&(e.value=zg,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&lw(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{re(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=mt(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function Tu(n){let t=ml(n),e=t!==null?t.factory:Ui(n);if(e!==null)return e;if(n instanceof te)throw new Y(204,!1);if(n instanceof Function)return ow(n);throw new Y(204,!1)}function ow(n){if(n.length>0)throw new Y(204,!1);let e=qx(n);return e!==null?()=>e.factory(n):()=>new n}function sw(n){if(r0(n))return qr(void 0,n.useValue);{let t=Gu(n);return qr(t,cl)}}function Gu(n,t,e){let i;if(zi(n)){let r=mt(n);return Ui(r)||Tu(r)}else if(r0(n))i=()=>mt(n.useValue);else if(rw(n))i=()=>n.useFactory(...Su(n.deps||[]));else if(iw(n))i=(r,o)=>ge(mt(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=mt(n&&(n.useClass||n.provide));if(aw(n))i=()=>new r(...Su(n.deps));else return Ui(r)||Tu(r)}return i}function es(n){if(n.destroyed)throw new Y(205,!1)}function qr(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function aw(n){return!!n.deps}function lw(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function cw(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Mu(n,t){for(let e of n)Array.isArray(e)?Mu(e,t):e&&Ou(e)?Mu(e.\u0275providers,t):t(e)}function Qr(n,t){let e;n instanceof Gi?(es(n),e=n):e=new Du(n);let i,r=Sn(e),o=xt(void 0);try{return t()}finally{Sn(r),xt(o)}}function s0(){return Qg()!==void 0||Oa()!=null}var dn=0,ee=1,se=2,Je=3,Zt=4,Et=5,Qi=6,Kr=7,We=8,Dt=9,Tn=10,ke=11,Xr=12,Wu=13,Ki=14,St=15,jn=16,Xi=17,Mn=18,ls=19,qu=20,Bn=21,Cl=22,$n=23,Ft=24,Ji=25,Hn=26,Ne=27,a0=1,Zu=6,di=7,cs=8,er=9,He=10;function kn(n){return Array.isArray(n)&&typeof n[a0]=="object"}function un(n){return Array.isArray(n)&&n[a0]===!0}function Yu(n){return(n.flags&4)!==0}function ui(n){return n.componentOffset>-1}function Jr(n){return(n.flags&1)===1}function In(n){return!!n.template}function eo(n){return(n[se]&512)!==0}function tr(n){return(n[se]&256)===256}var Ct=(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[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(Ct||{}),dl,ns="svg",Qu="math";function l0(){return dl||(dl={},si(Ct.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),si(Ct.STYLE,void 0,[["*",["style"]]]),si(Ct.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),si(Ct.URL,Qu,[["*",["href","xlink:href"]],["annotation",["href","xlink:href"]],["annotation-xml",["href","xlink:href"]],["maction",["href","xlink:href"]],["malignmark",["href","xlink:href"]],["math",["href","xlink:href"]],["mroot",["href","xlink:href"]],["msqrt",["href","xlink:href"]],["merror",["href","xlink:href"]],["mfrac",["href","xlink:href"]],["mglyph",["href","xlink:href"]],["msub",["href","xlink:href"]],["msup",["href","xlink:href"]],["msubsup",["href","xlink:href"]],["mmultiscripts",["href","xlink:href"]],["mprescripts",["href","xlink:href"]],["mi",["href","xlink:href"]],["mn",["href","xlink:href"]],["mo",["href","xlink:href"]],["mpadded",["href","xlink:href"]],["mphantom",["href","xlink:href"]],["mrow",["href","xlink:href"]],["ms",["href","xlink:href"]],["mspace",["href","xlink:href"]],["mstyle",["href","xlink:href"]],["mtable",["href","xlink:href"]],["mtd",["href","xlink:href"]],["mtr",["href","xlink:href"]],["mtext",["href","xlink:href"]],["mover",["href","xlink:href"]],["munder",["href","xlink:href"]],["munderover",["href","xlink:href"]],["semantics",["href","xlink:href"]],["none",["href","xlink:href"]]]),si(Ct.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),si(Ct.URL,ns,[["a",["href","xlink:href"]]]),si(Ct.ATTRIBUTE_NO_BINDING,ns,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),si(Ct.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),dl}function si(n,t,e){for(let[i,r]of e){let o=t&&i!=="unknown"?`:${t}:${i}`:i;o=o.toLowerCase();for(let s of r)dl[`${o}|${s.toLowerCase()}`]=n}}function c0(n,t,e){let i=l0(),r=n.toLowerCase(),o=t.toLowerCase(),s=e&&r!=="*"&&r!=="unknown"?i[`:${e}:${r}|${o}`]:void 0,a=e?i[`:${e}:*|${o}`]:void 0;return s??a??i[`${r}|${o}`]??i[`*|${o}`]??Ct.NONE}function Yt(n){for(;Array.isArray(n);)n=n[dn];return n}function Ku(n,t){return Yt(t[n])}function Ot(n,t){return Yt(t[n.index])}function ds(n,t){return n.data[t]}function xl(n,t){return n[t]}function Xu(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}function Qt(n,t){let e=t[n];return kn(e)?e:e[dn]}function d0(n){return(n[se]&4)===4}function wl(n){return(n[se]&128)===128}function u0(n){return un(n[Je])}function Kt(n,t){return t==null?null:n[t]}function Ju(n){n[Xi]=0}function ep(n){n[se]&1024||(n[se]|=1024,wl(n)&&pi(n))}function p0(n,t){for(;n>0;)t=t[Ki],n--;return t}function us(n){return!!(n[se]&9216||n[Ft]?.dirty)}function El(n){n[Tn].changeDetectionScheduler?.notify(8),n[se]&64&&(n[se]|=1024),us(n)&&pi(n)}function pi(n){n[Tn].changeDetectionScheduler?.notify(0);let t=li(n);for(;t!==null&&!(t[se]&8192||(t[se]|=8192,!wl(t)));)t=li(t)}function tp(n,t){if(tr(n))throw new Y(911,!1);n[Bn]===null&&(n[Bn]=[]),n[Bn].push(t)}function f0(n,t){if(n[Bn]===null)return;let e=n[Bn].indexOf(t);e!==-1&&n[Bn].splice(e,1)}function li(n){let t=n[Je];return un(t)?t[Je]:t}function np(n){return n[Kr]??=[]}function ip(n){return n.cleanup??=[]}function h0(n,t,e,i){let r=np(t);r.push(e),n.firstCreatePass&&ip(n).push(i,r.length-1)}var fe={lFrame:D0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var ku=!1;function m0(){return fe.lFrame.elementDepthCount}function g0(){fe.lFrame.elementDepthCount++}function rp(){fe.lFrame.elementDepthCount--}function Dl(){return fe.bindingsEnabled}function op(){return fe.skipHydrationRootTNode!==null}function sp(n){return fe.skipHydrationRootTNode===n}function ap(){fe.skipHydrationRootTNode=null}function ne(){return fe.lFrame.lView}function Ue(){return fe.lFrame.tView}function _(n){return fe.lFrame.contextLView=n,n[We]}function v(n){return fe.lFrame.contextLView=null,n}function et(){let n=lp();for(;n!==null&&n.type===64;)n=n.parent;return n}function lp(){return fe.lFrame.currentTNode}function _0(){let n=fe.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function to(n,t){let e=fe.lFrame;e.currentTNode=n,e.isParent=t}function cp(){return fe.lFrame.isParent}function dp(){fe.lFrame.isParent=!1}function v0(){return fe.lFrame.contextLView}function up(){return ku}function no(n){let t=ku;return ku=n,t}function ps(){let n=fe.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function pp(){return fe.lFrame.bindingIndex}function b0(n){return fe.lFrame.bindingIndex=n}function nr(){return fe.lFrame.bindingIndex++}function fs(n){let t=fe.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function y0(){return fe.lFrame.inI18n}function C0(n,t){let e=fe.lFrame;e.bindingIndex=e.bindingRootIndex=n,Sl(t)}function x0(){return fe.lFrame.currentDirectiveIndex}function Sl(n){fe.lFrame.currentDirectiveIndex=n}function w0(n){let t=fe.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function Tl(){return fe.lFrame.currentQueryIndex}function hs(n){fe.lFrame.currentQueryIndex=n}function dw(n){let t=n[ee];return t.type===2?t.declTNode:t.type===1?n[Et]:null}function fp(n,t,e){if(e&4){let r=t,o=n;for(;r=r.parent,r===null&&!(e&1);)if(r=dw(o),r===null||(o=o[Ki],r.type&10))break;if(r===null)return!1;t=r,n=o}let i=fe.lFrame=E0();return i.currentTNode=t,i.lView=n,!0}function Ml(n){let t=E0(),e=n[ee];fe.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function E0(){let n=fe.lFrame,t=n===null?null:n.child;return t===null?D0(n):t}function D0(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 S0(){let n=fe.lFrame;return fe.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var hp=S0;function kl(){let n=S0();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 T0(n){return(fe.lFrame.contextLView=p0(n,fe.lFrame.contextLView))[We]}function Xt(){return fe.lFrame.selectedIndex}function fi(n){fe.lFrame.selectedIndex=n}function ms(){let n=fe.lFrame;return ds(n.tView,n.selectedIndex)}function F(){fe.lFrame.currentNamespace=ns}function ue(){uw()}function uw(){fe.lFrame.currentNamespace=null}function mp(){return fe.lFrame.currentNamespace}var M0=!0;function Il(){return M0}function gs(n){M0=n}function Iu(n,t=null,e=null,i){let r=k0(n,t,e,i);return r.resolveInjectorInitializers(),r}function k0(n,t=null,e=null,i,r=new Set){let o=[e||Wt,n0(n)];return i=i||(typeof n=="object"?void 0:ai(n)),new Gi(o,t||as(),i||null,r)}var wt=class n{static THROW_IF_NOT_FOUND=$i;static NULL=new ts;static create(t,e){if(Array.isArray(t))return Iu({name:""},e,t,"");{let i=t.name??"";return Iu({name:i},t.parent,t.providers,i)}}static \u0275prov=ae({token:n,providedIn:"any",factory:()=>ge(ju)});static __NG_ELEMENT_ID__=-1},ut=new te(""),tt=(()=>{class n{static __NG_ELEMENT_ID__=pw;static __NG_ENV_ID__=e=>e}return n})(),is=class extends tt{_lView;constructor(t){super(),this._lView=t}get destroyed(){return tr(this._lView)}onDestroy(t){let e=this._lView;return tp(e,t),()=>f0(e,t)}};function pw(){return new is(ne())}var Lt=class{_console=console;handleError(t){this._console.error("ERROR",t)}},pn=new te("",{providedIn:"root",factory:()=>{let n=I(Pt),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(Lt),t.handleError(e))}}}),I0={provide:Zi,useValue:()=>{I(Lt)},multi:!0};function x(n,t){let[e,i,r]=eu(n,t?.equal),o=e,s=o[Ye];return o.set=i,o.update=r,o.asReadonly=Pl.bind(o),o}function Pl(){let n=this[Ye];if(n.readonlyFn===void 0){let t=()=>this();t[Ye]=n,n.readonlyFn=t}return n.readonlyFn}var ir=(()=>{class n{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=fw}return n})();function fw(){return new ir(ne(),et())}var qt=class{},_s=new te("",{providedIn:"root",factory:()=>!1});var gp=new te(""),_p=new te(""),hi=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Go(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new de(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=ae({token:n,providedIn:"root",factory:()=>new n})}return n})(),io=(()=>{class n{internalPendingTasks=I(hi);scheduler=I(qt);errorHandler=I(pn);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=ae({token:n,providedIn:"root",factory:()=>new n})}return n})();function rr(...n){}var vs=(()=>{class n{static \u0275prov=ae({token:n,providedIn:"root",factory:()=>new Pu})}return n})(),Pu=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 ac(n){return{toString:n}.toString()}var Ol="__parameters__";function xw(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function h_(n,t,e){return ac(()=>{let i=xw(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,d,m){let y=l.hasOwnProperty(Ol)?l[Ol]:Object.defineProperty(l,Ol,{value:[]})[Ol];for(;y.length<=m;)y.push(null);return(y[m]=y[m]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var cf=Vu(h_("Inject",n=>({token:n})),-1),df=Vu(h_("Optional"),8);function ww(n){return typeof n=="function"}var Ul=class{previousValue;currentValue;firstChange;constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function m_(n,t,e,i){t!==null?t.applyValueToInputSignal(t,i):n[e]=i}var Ps=(()=>{let n=()=>g_;return n.ngInherit=!0,n})();function g_(n){return n.type.prototype.ngOnChanges&&(n.setInput=Dw),Ew}function Ew(){let n=v_(this),t=n?.current;if(t){let e=n.previous;if(e===ci)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Dw(n,t,e,i,r){let o=this.declaredInputs[i],s=v_(n)||Sw(n,{previous:ci,current:null}),a=s.current||(s.current={}),l=s.previous,d=l[o];a[o]=new Ul(d&&d.currentValue,e,l===ci),m_(n,t,r,e)}var __="__ngSimpleChanges__";function v_(n){return n[__]||null}function Sw(n,t){return n[__]=t}var P0=[];var Se=function(n,t=null,e){for(let i=0;i<P0.length;i++){let r=P0[i];r(n,t,e)}};function Tw(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=g_(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 b_(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:d,ngOnDestroy:m}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),l&&(n.viewHooks??=[]).push(-e,l),d&&((n.viewHooks??=[]).push(e,d),(n.viewCheckHooks??=[]).push(e,d)),m!=null&&(n.destroyHooks??=[]).push(e,m)}}function Vl(n,t,e){y_(n,t,3,e)}function Bl(n,t,e,i){(n[se]&3)===e&&y_(n,t,e,i)}function vp(n,t){let e=n[se];(e&3)===t&&(e&=16383,e+=1,n[se]=e)}function y_(n,t,e,i){let r=i!==void 0?n[Xi]&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[Xi]+=65536),(a<o||o==-1)&&(Mw(n,e,t,l),n[Xi]=(n[Xi]&4294901760)+l+2),l++}function O0(n,t){Se(4,n,t);let e=re(null);try{t.call(n)}finally{re(e),Se(5,n,t)}}function Mw(n,t,e,i){let r=e[i]<0,o=e[i+1],s=r?-e[i]:e[i],a=n[s];r?n[se]>>14<n[Xi]>>16&&(n[se]&3)===t&&(n[se]+=16384,O0(a,o)):O0(a,o)}var oo=-1,cr=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 kw(n){return(n.flags&8)!==0}function Iw(n){return(n.flags&16)!==0}function Pw(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];Rw(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function Ow(n){return n===3||n===4||n===6}function Rw(n){return n.charCodeAt(0)===64}function lo(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?R0(n,e,r,null,t[++i]):R0(n,e,r,null,null))}}return n}function R0(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 C_(n){return n!==oo}function zl(n){return n&32767}function Nw(n){return n>>16}function Gl(n,t){let e=Nw(n),i=t;for(;e>0;)i=i[Ki],e--;return i}var kp=!0;function Wl(n){let t=kp;return kp=n,t}var Aw=256,x_=Aw-1,w_=5,Lw=0,Pn={};function Fw(n,t,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(qi)&&(i=e[qi]),i==null&&(i=e[qi]=Lw++);let r=i&x_,o=1<<r;t.data[n+(r>>w_)]|=o}function ql(n,t){let e=E_(n,t);if(e!==-1)return e;let i=t[ee];i.firstCreatePass&&(n.injectorIndex=t.length,bp(i.data,n),bp(t,null),bp(i.blueprint,null));let r=uf(n,t),o=n.injectorIndex;if(C_(r)){let s=zl(r),a=Gl(r,t),l=a[ee].data;for(let d=0;d<8;d++)t[o+d]=a[s+d]|l[s+d]}return t[o+8]=r,o}function bp(n,t){n.push(0,0,0,0,0,0,0,0,t)}function E_(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function uf(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=k_(r),i===null)return oo;if(e++,r=r[Ki],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return oo}function Ip(n,t,e){Fw(n,t,e)}function D_(n,t,e){if(e&8||n!==void 0)return n;_l(t,"NodeInjector")}function S_(n,t,e,i){if(e&8&&i===void 0&&(i=null),(e&3)===0){let r=n[Dt],o=xt(void 0);try{return r?r.get(t,i,e&8):Fu(t,i,e&8)}finally{xt(o)}}return D_(i,t,e)}function T_(n,t,e,i=0,r){if(n!==null){if(t[se]&2048&&!(i&2)){let s=$w(n,t,e,i,Pn);if(s!==Pn)return s}let o=M_(n,t,e,i,Pn);if(o!==Pn)return o}return S_(t,e,i,r)}function M_(n,t,e,i,r){let o=Bw(e);if(typeof o=="function"){if(!fp(t,n,i))return i&1?D_(r,e,i):S_(t,e,i,r);try{let s;if(s=o(i),s==null&&!(i&8))_l(e);else return s}finally{hp()}}else if(typeof o=="number"){let s=null,a=E_(n,t),l=oo,d=i&1?t[St][Et]:null;for((a===-1||i&4)&&(l=a===-1?uf(n,t):t[a+8],l===oo||!A0(i,!1)?a=-1:(s=t[ee],a=zl(l),t=Gl(l,t)));a!==-1;){let m=t[ee];if(N0(o,a,m.data)){let y=Vw(a,t,e,s,i,d);if(y!==Pn)return y}l=t[a+8],l!==oo&&A0(i,t[ee].data[a+8]===d)&&N0(o,a,t)?(s=m,a=zl(l),t=Gl(l,t)):a=-1}}return r}function Vw(n,t,e,i,r,o){let s=t[ee],a=s.data[n+8],l=i==null?ui(a)&&kp:i!=s&&(a.type&3)!==0,d=r&1&&o===a,m=jl(a,s,e,l,d);return m!==null?Cs(t,s,m,a,r):Pn}function jl(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=o&1048575,l=n.directiveStart,d=n.directiveEnd,m=o>>20,y=i?a:a+m,w=r?a+m:d;for(let D=y;D<w;D++){let R=s[D];if(D<l&&e===R||D>=l&&R.type===e)return D}if(r){let D=s[l];if(D&&In(D)&&D.type===e)return l}return null}function Cs(n,t,e,i,r){let o=n[e],s=t.data;if(o instanceof cr){let a=o;if(a.resolving){let D=qg(s[e]);throw Lu(D)}let l=Wl(a.canSeeViewProviders);a.resolving=!0;let d=s[e].type||s[e],m,y=a.injectImpl?xt(a.injectImpl):null,w=fp(n,i,0);try{o=n[e]=a.factory(void 0,r,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&Tw(e,s[e],t)}finally{y!==null&&xt(y),Wl(l),a.resolving=!1,hp()}}return o}function Bw(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(qi)?n[qi]:void 0;return typeof t=="number"?t>=0?t&x_:jw:t}function N0(n,t,e){let i=1<<n;return!!(e[t+(n>>w_)]&i)}function A0(n,t){return!(n&2)&&!(n&1&&t)}var or=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return T_(this._tNode,this._lView,t,Hi(i),e)}};function jw(){return new or(et(),ne())}function $w(n,t,e,i,r){let o=n,s=t;for(;o!==null&&s!==null&&s[se]&2048&&!eo(s);){let a=M_(o,s,e,i|2,Pn);if(a!==Pn)return a;let l=o.parent;if(!l){let d=s[qu];if(d){let m=d.get(e,Pn,i);if(m!==Pn)return m}l=k_(s),s=s[Ki]}o=l}return r}function k_(n){let t=n[ee],e=t.type;return e===2?t.declTNode:e===1?n[Et]:null}function Hw(){return ho(et(),ne())}function ho(n,t){return new gn(Ot(n,t))}var gn=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Hw}return n})();function I_(n){return n instanceof gn?n.nativeElement:n}function Uw(){return this._results[Symbol.iterator]()}var Zl=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 $e}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=Xg(t);(this._changesDetected=!Kg(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]=Uw};function P_(n){return(n.flags&128)===128}var pf=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(pf||{}),O_=new Map,zw=0;function Gw(){return zw++}function Ww(n){O_.set(n[ls],n)}function Pp(n){O_.delete(n[ls])}var L0="__ngContext__";function co(n,t){kn(t)?(n[L0]=t[ls],Ww(t)):n[L0]=t}function R_(n){return A_(n[Xr])}function N_(n){return A_(n[Zt])}function A_(n){for(;n!==null&&!un(n);)n=n[Zt];return n}var Op;function ff(n){Op=n}function hf(){if(Op!==void 0)return Op;if(typeof document<"u")return document;throw new Y(210,!1)}var lc=new te("",{providedIn:"root",factory:()=>qw}),qw="ng",cc=new te(""),ur=new te("",{providedIn:"platform",factory:()=>"unknown"});var dc=new te("",{providedIn:"root",factory:()=>hf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Zw="h",Yw="b";var L_="r";var F_="di";var V_=!1,B_=new te("",{providedIn:"root",factory:()=>V_});var Qw=(n,t,e,i)=>{};function Kw(n,t,e,i){Qw(n,t,e,i)}function uc(n){return(n.flags&32)===32}var Xw=()=>null;function j_(n,t,e=!1){return Xw(n,t,e)}function $_(n,t){let e=n.contentQueries;if(e!==null){let i=re(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];hs(o),a.contentQueries(2,t[s],s)}}}finally{re(i)}}}function Rp(n,t,e){hs(0);let i=re(null);try{t(n,e)}finally{re(i)}}function mf(n,t,e){if(Yu(t)){let i=re(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{re(i)}}}var Un=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(Un||{});var Jw="svg",e1="math",t1={"http://www.w3.org/2000/svg":Jw,"http://www.w3.org/1998/Math/MathML":e1},Rl;function n1(){if(Rl===void 0&&(Rl=null,ln.trustedTypes))try{Rl=ln.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Rl}function pc(n){return n1()?.createHTML(n)||n}var Nl;function i1(){if(Nl===void 0&&(Nl=null,ln.trustedTypes))try{Nl=ln.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Nl}function F0(n){return i1()?.createHTML(n)||n}var Yl=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${fl})`}};function Os(n){return n instanceof Yl?n.changingThisBreaksApplicationSecurity:n}function gf(n,t){let e=H_(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${fl})`)}return e===t}function H_(n){return n instanceof Yl&&n.getTypeName()||null}function r1(n){let t=new Ap(n);return o1()?new Np(t):t}var Np=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(pc(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},Ap=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=pc(t),e}};function o1(){try{return!!new window.DOMParser().parseFromString(pc(""),"text/html")}catch{return!1}}var s1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function _f(n){return n=String(n),n.match(s1)?n:"unsafe:"+n}function zn(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Rs(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var U_=zn("area,br,col,hr,img,wbr"),z_=zn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),G_=zn("rp,rt"),a1=Rs(G_,z_),l1=Rs(z_,zn("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")),c1=Rs(G_,zn("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")),V0=Rs(U_,l1,c1,a1),W_=zn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),d1=zn("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"),u1=zn("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"),p1=Rs(W_,d1,u1),f1=zn("script,style,template"),Lp=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=g1(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=m1(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=B0(t).toLowerCase();if(!V0.hasOwnProperty(e))return this.sanitizedSomething=!0,!f1.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(!p1.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;W_[a]&&(l=_f(l)),this.buf.push(" ",s,'="',j0(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=B0(t).toLowerCase();V0.hasOwnProperty(e)&&!U_.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(j0(t))}};function h1(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function m1(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw q_(t);return t}function g1(n){let t=n.firstChild;if(t&&h1(n,t))throw q_(t);return t}function B0(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function q_(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var _1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v1=/([^\#-~ |!])/g;function j0(n){return n.replace(/&/g,"&amp;").replace(_1,function(t){let e=t.charCodeAt(0),i=t.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(v1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Al;function Z_(n,t){let e=null;try{Al=Al||r1(n);let i=t?String(t):"";e=Al.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=Al.getInertBodyElement(i)}while(i!==o);let a=new Lp().sanitizeChildren($0(e)||e);return pc(a)}finally{if(e){let i=$0(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function $0(n){return"content"in n&&b1(n)?n.content:null}function b1(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var y1=/^>|^->|<!--|-->|--!>|<!-$/g,C1=/(<|>)/g,x1="\u200B$1\u200B";function w1(n){return n.replace(y1,t=>t.replace(C1,x1))}function E1(n,t){return n.createText(t)}function D1(n,t,e){n.setValue(t,e)}function S1(n,t){return n.createComment(w1(t))}function Y_(n,t,e){return n.createElement(t,e)}function Ql(n,t,e,i,r){n.insertBefore(t,e,i,r)}function Q_(n,t,e){n.appendChild(t,e)}function H0(n,t,e,i,r){i!==null?Ql(n,t,e,i,r):Q_(n,t,e)}function K_(n,t,e,i){n.removeChild(null,t,e,i)}function T1(n,t,e){n.setAttribute(t,"style",e)}function M1(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function X_(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;i!==null&&Pw(n,t,i),r!==null&&M1(n,t,r),o!==null&&T1(n,t,o)}function k1(n,t=!0){if(n[0]!=":")return[null,n];let e=n.indexOf(":",1);if(e===-1){if(t)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[null,n]}return[n.slice(1,e),n.slice(e+1)]}function vf(n,t,e){if(t!==void 0&&e!==void 0&&I1(t,e)!==Ct.HTML)return n;let i=J_();return i?F0(i.sanitize(Ct.HTML,n)||""):gf(n,"HTML")?F0(Os(n)):Z_(hf(),cn(n))}function pr(n){let t=J_();return t?t.sanitize(Ct.URL,n)||"":gf(n,"URL")?Os(n):_f(cn(n))}function J_(){let n=ne();return n&&n[Tn].sanitizer}function I1(n,t){let[e,i]=P1(n);return c0(i,t,e)}function P1(n){n=n.toLowerCase();let t=k1(n,!1);if(t[0])return t;let i=Xt()===-1?null:ms(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=Ot(i,ne());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&t1[s]}}return[r,n]}function bf(n){return n.ownerDocument.defaultView}function Qe(n){return n.ownerDocument}function O1(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 ev="ng-template";function R1(n,t,e,i){let r=0;if(i){for(;r<t.length&&typeof t[r]=="string";r+=2)if(t[r]==="class"&&O1(t[r+1].toLowerCase(),e,0)!==-1)return!0}else if(yf(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 yf(n){return n.type===4&&n.value!==ev}function N1(n,t,e){let i=n.type===4&&!e?ev:n.value;return t===i}function A1(n,t,e){let i=4,r=n.attrs,o=r!==null?V1(r):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!fn(i)&&!fn(l))return!1;if(s&&fn(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!N1(n,l,e)||l===""&&t.length===1){if(fn(i))return!1;s=!0}}else if(i&8){if(r===null||!R1(n,r,l,e)){if(fn(i))return!1;s=!0}}else{let d=t[++a],m=L1(l,r,yf(n),e);if(m===-1){if(fn(i))return!1;s=!0;continue}if(d!==""){let y;if(m>o?y="":y=r[m+1].toLowerCase(),i&2&&d!==y){if(fn(i))return!1;s=!0}}}}return fn(i)||s}function fn(n){return(n&1)===0}function L1(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 B1(t,n)}function tv(n,t,e=!1){for(let i=0;i<t.length;i++)if(A1(n,t[i],e))return!0;return!1}function F1(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function V1(n){for(let t=0;t<n.length;t++){let e=n[t];if(Ow(e))return t}return n.length}function B1(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 j1(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 U0(n,t){return n?":not("+t.trim()+")":t}function $1(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!==""&&!fn(s)&&(t+=U0(o,r),r=""),i=s,o=o||!fn(i);e++}return r!==""&&(t+=U0(o,r)),t}function H1(n){return n.map($1).join(",")}function U1(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(!fn(r))break;r=o}i++}return e.length&&t.push(1,...e),t}var pt={};function Cf(n,t,e,i,r,o,s,a,l,d,m){let y=Ne+i,w=y+r,D=z1(y,w),R=typeof d=="function"?d():d;return D[ee]={type:n,blueprint:D,template:e,queries:null,viewQuery:a,declTNode:t,data:D.slice().fill(null,y),bindingStartIndex:y,expandoStartIndex:w,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:R,incompleteFirstPass:!1,ssrId:m}}function z1(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:pt);return e}function G1(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=Cf(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function xf(n,t,e,i,r,o,s,a,l,d,m){let y=t.blueprint.slice();return y[dn]=r,y[se]=i|4|128|8|64|1024,(d!==null||n&&n[se]&2048)&&(y[se]|=2048),Ju(y),y[Je]=y[Ki]=n,y[We]=e,y[Tn]=s||n&&n[Tn],y[ke]=a||n&&n[ke],y[Dt]=l||n&&n[Dt]||null,y[Et]=o,y[ls]=Gw(),y[Qi]=m,y[qu]=d,y[St]=t.type==2?n[St]:y,y}function W1(n,t,e){let i=Ot(t,n),r=G1(e),o=n[Tn].rendererFactory,s=wf(n,xf(n,r,null,nv(e),i,t,null,o.createRenderer(i,e),null,null,null));return n[t.index]=s}function nv(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function iv(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 wf(n,t){return n[Xr]?n[Wu][Zt]=t:n[Xr]=t,n[Wu]=t,t}function c(n=1){rv(Ue(),ne(),Xt()+n,!1)}function rv(n,t,e,i){if(!i)if((t[se]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Vl(t,o,e)}else{let o=n.preOrderHooks;o!==null&&Bl(t,o,0,e)}fi(e)}var fc=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(fc||{});function Fp(n,t,e,i){let r=re(null);try{let[o,s,a]=n.inputs[e],l=null;(s&fc.SignalBased)!==0&&(l=t[o][Ye]),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):m_(t,l,o,i)}finally{re(r)}}var On=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(On||{}),q1;function Ef(n,t){return q1(n,t)}function Kl(n){if(!n)return 0;let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function so(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function Z1(n){let t=so(n,"transition-property"),e=so(n,"transition-duration"),i=so(n,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<t.length;o++){let s=Kl(i[o])+Kl(e[o]);s>r.duration&&(r.propertyName=t[o],r.duration=s)}return r}function Y1(n){let t=so(n,"animation-name"),e=so(n,"animation-delay"),i=so(n,"animation-duration"),r={animationName:"",propertyName:void 0,duration:0};for(let o=0;o<t.length;o++){let s=Kl(e[o])+Kl(i[o]);s>r.duration&&(r.animationName=t[o],r.duration=s)}return r}function ov(n,t){return n!==void 0&&n.duration>t.duration}function sv(n){return(n.animationName!=null||n.propertyName!=null)&&n.duration>0}function Q1(n,t){let e=getComputedStyle(n),i=Y1(e),r=Z1(e),o=i.duration>r.duration?i:r;ov(t.get(n),o)||sv(o)&&t.set(n,o)}function av(n,t,e){if(!e)return;let i=n.getAnimations();return i.length===0?Q1(n,t):K1(n,t,i)}function K1(n,t,e){let i={animationName:void 0,propertyName:void 0,duration:0};for(let r of e){let o=r.effect?.getTiming(),s=typeof o?.duration=="number"?o.duration:0,a=(o?.delay??0)+s,l,d;r.animationName?d=r.animationName:l=r.transitionProperty,a>=i.duration&&(i={animationName:d,propertyName:l,duration:a})}ov(t.get(n),i)||sv(i)&&t.set(n,i)}var mi=new Set,hc=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(hc||{}),vi=new te(""),z0=new Set;function Nn(n){z0.has(n)||(z0.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var lv=!1,Vp=class extends $e{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,s0()&&(this.destroyRef=I(tt,{optional:!0})??void 0,this.pendingTasks=I(hi,{optional:!0})??void 0)}emit(t){let e=re(null);try{super.next(t)}finally{re(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 Ve&&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)}})}}},mn=Vp;function cv(n){let t,e;function i(){n=rr;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 G0(n){return queueMicrotask(()=>n()),()=>{n=rr}}var Df="isAngularZone",Xl=Df+"_ID",X1=0,Te=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new mn(!1);onMicrotaskEmpty=new mn(!1);onStable=new mn(!1);onError=new mn(!1);constructor(t){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=lv}=t;if(typeof Zone>"u")throw new Y(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,tE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Df)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new Y(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new Y(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,J1,rr,rr);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)}},J1={};function Sf(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 eE(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){cv(()=>{n.callbackScheduled=!1,Bp(n),n.isCheckStableRunning=!0,Sf(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),Bp(n)}function tE(n){let t=()=>{eE(n)},e=X1++;n._inner=n._inner.fork({name:"angular",properties:{[Df]:!0,[Xl]:e,[Xl+e]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(nE(l))return i.invokeTask(o,s,a,l);try{return W0(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),q0(n)}},onInvoke:(i,r,o,s,a,l,d)=>{try{return W0(n),i.invoke(o,s,a,l,d)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!iE(l)&&t(),q0(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Bp(n),Sf(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 Bp(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function W0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function q0(n){n._nesting--,Sf(n)}var Jl=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new mn;onMicrotaskEmpty=new mn;onStable=new mn;onError=new mn;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 nE(n){return dv(n,"__ignore_ng_zone__")}function iE(n){return dv(n,"__scheduler_tick__")}function dv(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var mc=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=ae({token:n,providedIn:"root",factory:()=>new n})}return n})(),Tf=[0,1,2,3],Mf=(()=>{class n{ngZone=I(Te);scheduler=I(qt);errorHandler=I(Lt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){I(vi,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Se(16),this.executing=!0;for(let i of Tf)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&&Se(17)}register(e){let{view:i}=e;i!==void 0?((i[Ji]??=[]).push(e),pi(i),i[se]|=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(hc.AFTER_NEXT_RENDER,e):e()}static \u0275prov=ae({token:n,providedIn:"root",factory:()=>new n})}return n})(),xs=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?.[Ji];t&&(this.view[Ji]=t.filter(e=>e!==this))}};function gc(n,t){let e=t?.injector??I(wt);return Nn("NgAfterNextRender"),oE(n,e,t,!0)}function rE(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function oE(n,t,e,i){let r=t.get(mc);r.impl??=t.get(Mf);let o=t.get(vi,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(tt):null,a=t.get(ir,null,{optional:!0}),l=new xs(r.impl,rE(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var _c=new te("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function uv(n,t,e){let i=n.get(_c);if(Array.isArray(t))for(let r of t)i.queue.add(r),e?.detachedLeaveAnimationFns?.push(r);else i.queue.add(t),e?.detachedLeaveAnimationFns?.push(t);i.scheduler&&i.scheduler(n)}function sE(n,t){let e=n.get(_c);if(t.detachedLeaveAnimationFns){for(let i of t.detachedLeaveAnimationFns)e.queue.delete(i);t.detachedLeaveAnimationFns=void 0}}function aE(n){let t=n.get(_c);t.isScheduled||(gc(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:n}),t.isScheduled=!0)}function pv(n){let t=n.get(_c);t.scheduler=aE,t.scheduler(n)}function fv(n,t){for(let[e,i]of t)uv(n,i.animateFns)}function Z0(n,t,e,i){let r=n?.[Hn]?.enter;t!==null&&r&&r.has(e.index)&&fv(i,r)}function ro(n,t,e,i,r,o,s,a){if(r!=null){let l,d=!1;un(r)?l=r:kn(r)&&(d=!0,r=r[dn]);let m=Yt(r);n===0&&i!==null?(Z0(a,i,o,e),s==null?Q_(t,i,m):Ql(t,i,m,s||null,!0)):n===1&&i!==null?(Z0(a,i,o,e),Ql(t,i,m,s||null,!0)):n===2?Y0(a,o,e,y=>{K_(t,m,d,y)}):n===3&&Y0(a,o,e,()=>{t.destroyNode(m)}),l!=null&&vE(t,n,e,l,o,i,s)}}function lE(n,t){hv(n,t),t[dn]=null,t[Et]=null}function cE(n,t,e,i,r,o){i[dn]=r,i[Et]=t,bc(n,i,e,1,r,o)}function hv(n,t){t[Tn].changeDetectionScheduler?.notify(9),bc(n,t,t[ke],2,null,null)}function dE(n){let t=n[Xr];if(!t)return yp(n[ee],n);for(;t;){let e=null;if(kn(t))e=t[Xr];else{let i=t[He];i&&(e=i)}if(!e){for(;t&&!t[Zt]&&t!==n;)kn(t)&&yp(t[ee],t),t=t[Je];t===null&&(t=n),kn(t)&&yp(t[ee],t),e=t&&t[Zt]}t=e}}function kf(n,t){let e=n[er],i=e.indexOf(t);e.splice(i,1)}function vc(n,t){if(tr(t))return;let e=t[ke];e.destroyNode&&bc(n,t,e,3,null,null),dE(t)}function yp(n,t){if(tr(t))return;let e=re(null);try{t[se]&=-129,t[se]|=256,t[Ft]&&ni(t[Ft]),fE(n,t),pE(n,t),t[ee].type===1&&t[ke].destroy();let i=t[jn];if(i!==null&&un(t[Je])){i!==t[Je]&&kf(i,t);let r=t[Mn];r!==null&&r.detachView(n)}Pp(t)}finally{re(e)}}function Y0(n,t,e,i){let r=n?.[Hn];if(r==null||r.leave==null||!r.leave.has(t.index))return i(!1);n&&mi.add(n),uv(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 d=s.animateFns[l],{promise:m}=d();a.push(m)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),uE(n,i)}else n&&mi.delete(n),i(!1)},r)}function uE(n,t){let e=n[Hn]?.running;if(e){e.then(()=>{n[Hn].running=void 0,mi.delete(n),t(!0)});return}t(!1)}function pE(n,t){let e=n.cleanup,i=t[Kr];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[Kr]=null);let r=t[Bn];if(r!==null){t[Bn]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=t[$n];if(o!==null){t[$n]=null;for(let s of o)s.destroy()}}function fE(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 cr)){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];Se(4,a,l);try{l.call(a)}finally{Se(5,a,l)}}else{Se(4,r,o);try{o.call(r)}finally{Se(5,r,o)}}}}}function mv(n,t,e){return hE(n,t.parent,e)}function hE(n,t,e){let i=t;for(;i!==null&&i.type&168;)t=i,i=t.parent;if(i===null)return e[dn];if(ui(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===Un.None||r===Un.Emulated)return null}return Ot(i,e)}function gv(n,t,e){return gE(n,t,e)}function mE(n,t,e){return n.type&40?Ot(n,e):null}var gE=mE,Q0;function If(n,t,e,i){let r=mv(n,i,t),o=t[ke],s=i.parent||t[Et],a=gv(s,i,t);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)H0(o,r,e[l],a,!1);else H0(o,r,e,a,!1);Q0!==void 0&&Q0(o,i,t,e,r)}function bs(n,t){if(t!==null){let e=t.type;if(e&3)return Ot(t,n);if(e&4)return ec(-1,n[t.index]);if(e&8){let i=t.child;if(i!==null)return bs(n,i);{let r=n[t.index];return un(r)?ec(-1,r):Yt(r)}}else{if(e&128)return bs(n,t.next);if(e&32)return Ef(t,n)()||Yt(n[t.index]);{let i=_v(n,t);if(i!==null){if(Array.isArray(i))return i[0];let r=li(n[St]);return bs(r,i)}else return bs(n,t.next)}}}return null}function _v(n,t){if(t!==null){let i=n[St][Et],r=t.projection;return i.projection[r]}return null}function ec(n,t){let e=He+n+1;if(e<t.length){let i=t[e],r=i[ee].firstChild;if(r!==null)return bs(i,r)}return t[di]}function Pf(n,t,e,i,r,o,s){for(;e!=null;){let a=i[Dt];if(e.type===128){e=e.next;continue}let l=i[e.index],d=e.type;if(s&&t===0&&(l&&co(Yt(l),i),e.flags|=2),!uc(e))if(d&8)Pf(n,t,e.child,i,r,o,!1),ro(t,n,a,r,l,e,o,i);else if(d&32){let m=Ef(e,i),y;for(;y=m();)ro(t,n,a,r,y,e,o,i);ro(t,n,a,r,l,e,o,i)}else d&16?vv(n,t,i,e,r,o):ro(t,n,a,r,l,e,o,i);e=s?e.projectionNext:e.next}}function bc(n,t,e,i,r,o){Pf(e,i,n.firstChild,t,r,o,!1)}function _E(n,t,e){let i=t[ke],r=mv(n,e,t),o=e.parent||t[Et],s=gv(o,e,t);vv(i,0,t,e,r,s)}function vv(n,t,e,i,r,o){let s=e[St],l=s[Et].projection[i.projection];if(Array.isArray(l))for(let d=0;d<l.length;d++){let m=l[d];ro(t,n,e[Dt],r,m,i,o,e)}else{let d=l,m=s[Je];P_(i)&&(d.flags|=128),Pf(n,t,d,m,r,o,!0)}}function vE(n,t,e,i,r,o,s){let a=i[di],l=Yt(i);a!==l&&ro(t,n,e,o,a,r,s);for(let d=He;d<i.length;d++){let m=i[d];bc(m[ee],m,n,t,o,a)}}function bE(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=i.indexOf("-")===-1?void 0:On.DashCase;r==null?n.removeStyle(e,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=On.Important),n.setStyle(e,i,r,o))}}function bv(n,t,e,i,r){let o=Xt(),s=i&2;try{fi(-1),s&&t.length>Ne&&rv(n,t,Ne,!1),Se(s?2:0,r,e),e(i,r)}finally{fi(o),Se(s?3:1,r,e)}}function yc(n,t,e){SE(n,t,e),(e.flags&64)===64&&TE(n,t,e)}function Ns(n,t,e=Ot){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 yE(n,t,e,i){let o=i.get(B_,V_)||e===Un.ShadowDom,s=n.selectRootElement(t,o);return CE(s),s}function CE(n){xE(n)}var xE=()=>null;function wE(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function EE(n,t,e,i,r,o){let s=t[ee];if(Af(n,s,t,e,i)){ui(n)&&DE(t,n.index);return}n.type&3&&(e=wE(e)),yv(n,t,e,i,r,o)}function yv(n,t,e,i,r,o){if(n.type&3){let s=Ot(n,t);i=o!=null?o(i,n.value||"",e):i,r.setProperty(s,e,i)}else n.type&12}function DE(n,t){let e=Qt(t,n);e[se]&16||(e[se]|=64)}function SE(n,t,e){let i=e.directiveStart,r=e.directiveEnd;ui(e)&&W1(t,e,n.data[i+e.componentOffset]),n.firstCreatePass||ql(e,t);let o=e.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Cs(t,n,s,e);if(co(l,t),o!==null&&PE(t,s-i,l,a,e,o),In(a)){let d=Qt(e.index,t);d[We]=Cs(t,n,s,e)}}}function TE(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=x0();try{fi(o);for(let a=i;a<r;a++){let l=n.data[a],d=t[a];Sl(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&ME(l,d)}}finally{fi(-1),Sl(s)}}function ME(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function Of(n,t){let e=n.directiveRegistry,i=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];tv(t,o.selectors,!1)&&(i??=[],In(o)?i.unshift(o):i.push(o))}return i}function kE(n,t,e,i,r,o){let s=Ot(n,t);IE(t[ke],s,o,n.value,e,i,r)}function IE(n,t,e,i,r,o,s){if(o==null)n.removeAttribute(t,r,e);else{let a=s==null?cn(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function PE(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],d=s[a+1];Fp(i,e,l,d)}}function Rf(n,t,e,i,r){let o=Ne+e,s=t[ee],a=r(s,t,n,i,e);t[o]=a,to(n,!0);let l=n.type===2;return l?(X_(t[ke],a,n),(m0()===0||Jr(n))&&co(a,t),g0()):co(a,t),Il()&&(!l||!uc(n))&&If(s,t,a,n),n}function Nf(n){let t=n;return cp()?dp():(t=t.parent,to(t,!1)),t}function OE(n,t){let e=n[Dt];if(!e)return;let i;try{i=e.get(pn,null)}catch{i=null}i?.(t)}function Af(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 d=s[l],m=s[l+1],y=t.data[d];Fp(y,e[d],m,r),a=!0}if(o)for(let l of o){let d=e[l],m=t.data[l];Fp(m,d,i,r),a=!0}return a}function RE(n,t){let e=Qt(t,n),i=e[ee];NE(i,e);let r=e[dn];r!==null&&e[Qi]===null&&(e[Qi]=j_(r,e[Dt])),Se(18),Lf(i,e,e[We]),Se(19,e[We])}function NE(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function Lf(n,t,e){Ml(t);try{let i=n.viewQuery;i!==null&&Rp(1,i,e);let r=n.template;r!==null&&bv(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[Mn]?.finishViewCreation(n),n.staticContentQueries&&$_(n,t),n.staticViewQueries&&Rp(2,n.viewQuery,e);let o=n.components;o!==null&&AE(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[se]&=-5,kl()}}function AE(n,t){for(let e=0;e<t.length;e++)RE(n,t[e])}function As(n,t,e,i){let r=re(null);try{let o=t.tView,a=n[se]&4096?4096:16,l=xf(n,o,e,a,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),d=n[t.index];l[jn]=d;let m=n[Mn];return m!==null&&(l[Mn]=m.createEmbeddedView(o)),Lf(o,l,e),l}finally{re(r)}}function uo(n,t){return!t||t.firstChild===null||P_(n)}function ws(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(Yt(o)),un(o)&&Cv(o,i);let s=e.type;if(s&8)ws(n,t,e.child,i);else if(s&32){let a=Ef(e,t),l;for(;l=a();)i.push(l)}else if(s&16){let a=_v(t,e);if(Array.isArray(a))i.push(...a);else{let l=li(t[St]);ws(l[ee],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}function Cv(n,t){for(let e=He;e<n.length;e++){let i=n[e],r=i[ee].firstChild;r!==null&&ws(i[ee],i,r,t)}n[di]!==n[dn]&&t.push(n[di])}function xv(n){if(n[Ji]!==null){for(let t of n[Ji])t.impl.addSequence(t);n[Ji].length=0}}var wv=[];function LE(n){return n[Ft]??FE(n)}function FE(n){let t=wv.pop()??Object.create(BE);return t.lView=n,t}function VE(n){n.lView[Ft]!==n&&(n.lView=null,wv.push(n))}var BE=oe(G({},Jn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{pi(n.lView)},consumerOnSignalRead(){this.lView[Ft]=this}});function jE(n){let t=n[Ft]??Object.create($E);return t.lView=n,t}var $E=oe(G({},Jn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=li(n.lView);for(;t&&!Ev(t[ee]);)t=li(t);t&&ep(t)},consumerOnSignalRead(){this.lView[Ft]=this}});function Ev(n){return n.type!==2}function Dv(n){if(n[$n]===null)return;let t=!0;for(;t;){let e=!1;for(let i of n[$n])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));t=e&&!!(n[se]&8192)}}var HE=100;function Sv(n,t=0){let i=n[Tn].rendererFactory,r=!1;r||i.begin?.();try{UE(n,t)}finally{r||i.end?.()}}function UE(n,t){let e=up();try{no(!0),jp(n,t);let i=0;for(;us(n);){if(i===HE)throw new Y(103,!1);i++,jp(n,1)}}finally{no(e)}}function zE(n,t,e,i){if(tr(t))return;let r=t[se],o=!1,s=!1;Ml(t);let a=!0,l=null,d=null;o||(Ev(n)?(d=LE(t),l=Vn(d)):Na()===null?(a=!1,d=jE(t),l=Vn(d)):t[Ft]&&(ni(t[Ft]),t[Ft]=null));try{Ju(t),b0(n.bindingStartIndex),e!==null&&bv(n,t,e,2,i);let m=(r&3)===3;if(!o)if(m){let D=n.preOrderCheckHooks;D!==null&&Vl(t,D,null)}else{let D=n.preOrderHooks;D!==null&&Bl(t,D,0,null),vp(t,0)}if(s||GE(t),Dv(t),Tv(t,0),n.contentQueries!==null&&$_(n,t),!o)if(m){let D=n.contentCheckHooks;D!==null&&Vl(t,D)}else{let D=n.contentHooks;D!==null&&Bl(t,D,1),vp(t,1)}qE(n,t);let y=n.components;y!==null&&kv(t,y,0);let w=n.viewQuery;if(w!==null&&Rp(2,w,i),!o)if(m){let D=n.viewCheckHooks;D!==null&&Vl(t,D)}else{let D=n.viewHooks;D!==null&&Bl(t,D,2),vp(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[Cl]){for(let D of t[Cl])D();t[Cl]=null}o||(xv(t),t[se]&=-73)}catch(m){throw o||pi(t),m}finally{d!==null&&(ti(d,l),a&&VE(d)),kl()}}function Tv(n,t){for(let e=R_(n);e!==null;e=N_(e))for(let i=He;i<e.length;i++){let r=e[i];Mv(r,t)}}function GE(n){for(let t=R_(n);t!==null;t=N_(t)){if(!(t[se]&2))continue;let e=t[er];for(let i=0;i<e.length;i++){let r=e[i];ep(r)}}}function WE(n,t,e){Se(18);let i=Qt(t,n);Mv(i,e),Se(19,i[We])}function Mv(n,t){wl(n)&&jp(n,t)}function jp(n,t){let i=n[ee],r=n[se],o=n[Ft],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(o?.dirty&&Ri(o)),s||=!1,o&&(o.dirty=!1),n[se]&=-9217,s)zE(i,n,i.template,n[We]);else if(r&8192){let a=re(null);try{Dv(n),Tv(n,1);let l=i.components;l!==null&&kv(n,l,1),xv(n)}finally{re(a)}}}function kv(n,t,e){for(let i=0;i<t.length;i++)WE(n,t[i],e)}function qE(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)fi(~r);else{let o=r,s=e[++i],a=e[++i];C0(s,o);let l=t[o];Se(24,l),a(2,l),Se(25,l)}}}finally{fi(-1)}}function Ff(n,t){let e=up()?64:1088;for(n[Tn].changeDetectionScheduler?.notify(t);n;){n[se]|=e;let i=li(n);if(eo(n)&&!i)return n;n=i}return null}function Iv(n,t,e,i){return[n,!0,0,t,null,i,null,e,null,null]}function Pv(n,t){let e=He+t;if(e<n.length)return n[e]}function Ls(n,t,e,i=!0){let r=t[ee];if(ZE(r,t,n,e),i){let s=ec(e,n),a=t[ke],l=a.parentNode(n[di]);l!==null&&cE(r,n[Et],a,t,l,s)}let o=t[Qi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Ov(n,t){let e=Es(n,t);return e!==void 0&&vc(e[ee],e),e}function Es(n,t){if(n.length<=He)return;let e=He+t,i=n[e];if(i){let r=i[jn];r!==null&&r!==n&&kf(r,i),t>0&&(n[e-1][Zt]=i[Zt]);let o=rs(n,He+t);lE(i[ee],i);let s=o[Mn];s!==null&&s.detachView(o[ee]),i[Je]=null,i[Zt]=null,i[se]&=-129}return i}function ZE(n,t,e,i){let r=He+i,o=e.length;i>0&&(e[r-1][Zt]=t),i<o-He?(t[Zt]=e[r],Bu(e,He+i,t)):(e.push(t),t[Zt]=null),t[Je]=e;let s=t[jn];s!==null&&e!==s&&Rv(s,t);let a=t[Mn];a!==null&&a.insertView(n),El(t),t[se]|=128}function Rv(n,t){let e=n[er],i=t[Je];if(kn(i))n[se]|=2;else{let r=i[Je][St];t[St]!==r&&(n[se]|=2)}e===null?n[er]=[t]:e.push(t)}var gi=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[ee];return ws(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[We]}set context(t){this._lView[We]=t}get destroyed(){return tr(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Je];if(un(t)){let e=t[cs],i=e?e.indexOf(this):-1;i>-1&&(Es(t,i),rs(e,i))}this._attachedToViewContainer=!1}vc(this._lView[ee],this._lView)}onDestroy(t){tp(this._lView,t)}markForCheck(){Ff(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[se]&=-129}reattach(){El(this._lView),this._lView[se]|=128}detectChanges(){this._lView[se]|=1024,Sv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Y(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=eo(this._lView),e=this._lView[jn];e!==null&&!t&&kf(e,this._lView),hv(this._lView[ee],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Y(902,!1);this._appRef=t;let e=eo(this._lView),i=this._lView[jn];i!==null&&!e&&Rv(i,this._lView),El(this._lView)}};var _i=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=YE;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=As(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:r});return new gi(o)}}return n})();function YE(){return Cc(et(),ne())}function Cc(n,t){return n.type&4?new _i(t,n,ho(n,t)):null}function mo(n,t,e,i,r){let o=n.data[t];if(o===null)o=QE(n,t,e,i,r),y0()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=i,o.attrs=r;let s=_0();o.injectorIndex=s===null?-1:s.injectorIndex}return to(o,!0),o}function QE(n,t,e,i,r){let o=lp(),s=cp(),a=s?o:o&&o.parent,l=n.data[t]=XE(n,a,e,t,i,r);return KE(n,l,o,s),l}function KE(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 XE(n,t,e,i,r,o){let s=t?t.injectorIndex:-1,a=0;return op()&&(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,namespace:mp(),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 _8=new RegExp(`^(\\d+)*(${Yw}|${Zw})*(.*)`);function JE(n){let t=n[Zu]??[],i=n[Je][ke],r=[];for(let o of t)o.data[F_]!==void 0?r.push(o):eD(o,i);n[Zu]=r}function eD(n,t){let e=0,i=n.firstChild;if(i){let r=n.data[L_];for(;e<r;){let o=i.nextSibling;K_(t,i,!1),i=o,e++}}}var tD=()=>null,nD=()=>null;function tc(n,t){return tD(n,t)}function Nv(n,t,e){return nD(n,t,e)}var Av=class{},xc=class{},$p=class{resolveComponentFactory(t){throw new Y(917,!1)}},wc=class{static NULL=new $p},Rn=class{},Ec=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>iD()}return n})();function iD(){let n=ne(),t=et(),e=Qt(t.index,n);return(kn(e)?e:n)[ke]}var Lv=(()=>{class n{static \u0275prov=ae({token:n,providedIn:"root",factory:()=>null})}return n})();var $l={},Hp=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,$l,i);return r!==$l||e===$l?r:this.parentInjector.get(t,e,i)}};function nc(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=hl(r,a);else if(o==2){let l=a,d=t[++s];i=hl(i,l+": "+d+";")}}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function _n(n,t=0){let e=ne();if(e===null)return ge(n,t);let i=et();return T_(i,e,mt(n),t)}function Fv(n,t,e,i,r){let o=i===null?null:{"":-1},s=r(n,e);if(s!==null){let a=s,l=null,d=null;for(let m of s)if(m.resolveHostDirectives!==null){[a,l,d]=m.resolveHostDirectives(s);break}sD(n,t,e,a,o,l,d)}o!==null&&i!==null&&rD(e,i,o)}function rD(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 Y(-301,!1);i.push(t[r],o)}}function oD(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function sD(n,t,e,i,r,o,s){let a=i.length,l=!1;for(let w=0;w<a;w++){let D=i[w];!l&&In(D)&&(l=!0,oD(n,e,w)),Ip(ql(e,t),n,D.type)}pD(e,n.data.length,a);for(let w=0;w<a;w++){let D=i[w];D.providersResolver&&D.providersResolver(D)}let d=!1,m=!1,y=iv(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let w=0;w<a;w++){let D=i[w];if(e.mergedAttrs=lo(e.mergedAttrs,D.hostAttrs),lD(n,e,t,y,D),uD(y,D,r),s!==null&&s.has(D)){let[j,Z]=s.get(D);e.directiveToIndex.set(D.type,[y,j+e.directiveStart,Z+e.directiveStart])}else(o===null||!o.has(D))&&e.directiveToIndex.set(D.type,y);D.contentQueries!==null&&(e.flags|=4),(D.hostBindings!==null||D.hostAttrs!==null||D.hostVars!==0)&&(e.flags|=64);let R=D.type.prototype;!d&&(R.ngOnChanges||R.ngOnInit||R.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),d=!0),!m&&(R.ngOnChanges||R.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),m=!0),y++}aD(n,e,o)}function aD(n,t,e){for(let i=t.directiveStart;i<t.directiveEnd;i++){let r=n.data[i];if(e===null||!e.has(r))K0(0,t,r,i),K0(1,t,r,i),J0(t,i,!1);else{let o=e.get(r);X0(0,t,o,i),X0(1,t,o,i),J0(t,i,!0)}}}function K0(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),Vv(t,o)}}function X0(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),Vv(t,s)}}function Vv(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function J0(n,t,e){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!e&&r===null||e&&o===null||yf(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 d=r[l];for(let m of d)if(m===t){s??=[],s.push(l,i[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let d=o[l];for(let m=0;m<d.length;m+=2)if(d[m]===t){s??=[],s.push(d[m+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function lD(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Ui(r.type,!0)),s=new cr(o,In(r),_n,null);n.blueprint[i]=s,e[i]=s,cD(n,t,i,iv(n,e,r.hostVars,pt),r)}function cD(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;dD(s)!=a&&s.push(a),s.push(e,i,o)}}function dD(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function uD(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;In(t)&&(e[""]=n)}}function pD(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function Vf(n,t,e,i,r,o,s,a){let l=t[ee],d=l.consts,m=Kt(d,s),y=mo(l,n,e,i,m);return o&&Fv(l,t,y,Kt(d,a),r),y.mergedAttrs=lo(y.mergedAttrs,y.attrs),y.attrs!==null&&nc(y,y.attrs,!1),y.mergedAttrs!==null&&nc(y,y.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,y),y}function Bf(n,t){b_(n,t),Yu(t)&&n.queries.elementEnd(t)}function fD(n,t,e,i,r,o){let s=t.consts,a=Kt(s,r),l=mo(t,n,e,i,a);if(l.mergedAttrs=lo(l.mergedAttrs,l.attrs),o!=null){let d=Kt(s,o);l.localNames=[];for(let m=0;m<d.length;m+=2)l.localNames.push(d[m],-1)}return l.attrs!==null&&nc(l,l.attrs,!1),l.mergedAttrs!==null&&nc(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function jf(n){return jv(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function Bv(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 jv(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function $f(n,t,e){return n[t]=e}function hD(n,t){return n[t]}function Jt(n,t,e){if(e===pt)return!1;let i=n[t];return Object.is(i,e)?!1:(n[t]=e,!0)}function Hf(n,t,e,i){let r=Jt(n,t,e);return Jt(n,t+1,i)||r}function mD(n,t,e,i,r){let o=Hf(n,t,e,i);return Jt(n,t+2,r)||o}function Hl(n,t,e){return function i(r){let o=ui(n)?Qt(n.index,t):t;Ff(o,5);let s=t[We],a=e_(t,s,e,r),l=i.__ngNextListenerFn__;for(;l;)a=e_(t,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function e_(n,t,e,i){let r=re(null);try{return Se(6,t,e),e(i)!==!1}catch(o){return OE(n,o),!1}finally{Se(7,t,e),re(r)}}function $v(n,t,e,i,r,o,s,a){let l=Jr(n),d=!1,m=null;if(!i&&l&&(m=_D(t,e,o,n.index)),m!==null){let y=m.__ngLastListenerFn__||m;y.__ngNextListenerFn__=s,m.__ngLastListenerFn__=s,d=!0}else{let y=Ot(n,e),w=i?i(y):y;Kw(e,w,o,a);let D=r.listen(w,o,a);if(!gD(o)){let R=i?j=>i(Yt(j[n.index])):n.index;Hv(R,t,e,o,a,D,!1)}}return d}function gD(n){return n.startsWith("animation")||n.startsWith("transition")}function _D(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[Kr],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function Hv(n,t,e,i,r,o,s){let a=t.firstCreatePass?ip(t):null,l=np(e),d=l.length;l.push(r,o),a&&a.push(i,n,d,(d+1)*(s?-1:1))}function t_(n,t,e,i,r,o){let s=t[e],a=t[ee],d=a.data[e].outputs[i],y=s[d].subscribe(o);Hv(n.index,a,t,r,o,y,!0)}var Up=Symbol("BINDING");var zp=class extends wc{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Yi(t);return new Ds(e,this.ngModule)}};function vD(n){return Object.keys(n).map(t=>{let[e,i,r]=n[t],o={propName:e,templateName:t,isSignal:(i&fc.SignalBased)!==0};return r&&(o.transform=r),o})}function bD(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function yD(n,t,e){let i=t instanceof Pt?t:t?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Hp(e,i):e}function CD(n){let t=n.get(Rn,null);if(t===null)throw new Y(407,!1);let e=n.get(Lv,null),i=n.get(qt,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function xD(n,t){let e=Uv(n);return Y_(t,e,e==="svg"?ns:e==="math"?Qu:null)}function wD(n){if(n?.toLowerCase()==="script")throw new Y(905,!1)}function Uv(n){return(n.selectors[0][0]||"div").toLowerCase()}var Ds=class extends xc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=vD(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=bD(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=H1(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,i,r,o,s){Se(22);let a=re(null);try{let l=this.componentDef,d=ED(i,l,s,o),m=yD(l,r||this.ngModule,t),y=CD(m),w=y.rendererFactory.createRenderer(null,l),D=i?yE(w,i,l.encapsulation,m):xD(l,w);wD(D?.tagName);let R=s?.some(n_)||o?.some($=>typeof $!="function"&&$.bindings.some(n_)),j=xf(null,d,null,512|nv(l),null,null,y,w,m,null,j_(D,m,!0));j[Ne]=D,Ml(j);let Z=null;try{let $=Vf(Ne,j,2,"#host",()=>d.directiveRegistry,!0,0);X_(w,D,$),co(D,j),yc(d,j,$),mf(d,$,j),Bf(d,$),e!==void 0&&SD($,this.ngContentSelectors,e),Z=Qt($.index,j),j[We]=Z[We],Lf(d,j,null)}catch($){throw Z!==null&&Pp(Z),Pp(j),$}finally{Se(23),kl()}return new ic(this.componentType,j,!!R)}finally{re(a)}}};function ED(n,t,e,i){let r=n?["ng-version","20.3.29"]:U1(t.selectors[0]),o=null,s=null,a=0;if(e)for(let m of e)a+=m[Up].requiredVars,m.create&&(m.targetIdx=0,(o??=[]).push(m)),m.update&&(m.targetIdx=0,(s??=[]).push(m));if(i)for(let m=0;m<i.length;m++){let y=i[m];if(typeof y!="function")for(let w of y.bindings){a+=w[Up].requiredVars;let D=m+1;w.create&&(w.targetIdx=D,(o??=[]).push(w)),w.update&&(w.targetIdx=D,(s??=[]).push(w))}}let l=[t];if(i)for(let m of i){let y=typeof m=="function"?m:m.type,w=Hu(y);l.push(w)}return Cf(0,null,DD(o,s),1,a,l,null,null,null,[r],null)}function DD(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 n_(n){let t=n[Up].kind;return t==="input"||t==="twoWay"}var ic=class extends Av{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=ds(e[ee],Ne),this.location=ho(this._tNode,e),this.instance=Qt(this._tNode.index,e)[We],this.hostView=this.changeDetectorRef=new gi(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=Af(i,r[ee],r,t,e);this.previousInputValues.set(t,e);let s=Qt(i.index,r);Ff(s,1)}get injector(){return new or(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function SD(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 bi=(()=>{class n{static __NG_ELEMENT_ID__=TD}return n})();function TD(){let n=et();return Gv(n,ne())}var MD=bi,zv=class extends MD{_lContainer;_hostTNode;_hostLView;constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return ho(this._hostTNode,this._hostLView)}get injector(){return new or(this._hostTNode,this._hostLView)}get parentInjector(){let t=uf(this._hostTNode,this._hostLView);if(C_(t)){let e=Gl(t,this._hostLView),i=zl(t),r=e[ee].data[i+8];return new or(r,e)}else return new or(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=i_(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-He}createEmbeddedView(t,e,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=tc(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,uo(this._hostTNode,s)),a}createComponent(t,e,i,r,o,s,a){let l=t&&!ww(t),d;if(l)d=e;else{let Z=e||{};d=Z.index,i=Z.injector,r=Z.projectableNodes,o=Z.environmentInjector||Z.ngModuleRef,s=Z.directives,a=Z.bindings}let m=l?t:new Ds(Yi(t)),y=i||this.parentInjector;if(!o&&m.ngModule==null){let $=(l?y:this.parentInjector).get(Pt,null);$&&(o=$)}let w=Yi(m.componentType??{}),D=tc(this._lContainer,w?.id??null),R=D?.firstChild??null,j=m.create(y,r,R,o,s,a);return this.insertImpl(j.hostView,d,uo(this._hostTNode,D)),j}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,i){let r=t._lView;if(u0(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[Je],d=new zv(l,l[Et],l[Je]);d.detach(d.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return Ls(s,r,o,i),t.attachToViewContainerRef(),Bu(Cp(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=i_(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=Es(this._lContainer,e);i&&(rs(Cp(this._lContainer),e),vc(i[ee],i))}detach(t){let e=this._adjustIndex(t,-1),i=Es(this._lContainer,e);return i&&rs(Cp(this._lContainer),e)!=null?new gi(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function i_(n){return n[cs]}function Cp(n){return n[cs]||(n[cs]=[])}function Gv(n,t){let e,i=t[n.index];return un(i)?e=i:(e=Iv(i,t,null,n),t[n.index]=e,wf(t,e)),ID(e,t,n,i),new zv(e,n,t)}function kD(n,t){let e=n[ke],i=e.createComment(""),r=Ot(t,n),o=e.parentNode(r);return Ql(e,o,i,e.nextSibling(r),!1),i}var ID=RD,PD=()=>!1;function OD(n,t,e){return PD(n,t,e)}function RD(n,t,e,i){if(n[di])return;let r;e.type&8?r=Yt(i):r=kD(t,e),n[di]=r}var Gp=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},Wp=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++)zf(t,e).matches!==null&&this.queries[e].setDirty()}},qp=class{flags;read;predicate;constructor(t,e,i=null){this.flags=e,this.read=i,typeof t=="string"?this.predicate=BD(t):this.predicate=t}},Zp=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)}},Yp=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,ND(e,o)),this.matchTNodeWithReadOption(t,e,jl(e,t,o,!1,!1))}else i===_i?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,jl(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===gn||r===bi||r===_i&&e.type&4)this.addMatch(e.index,-2);else{let o=jl(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 ND(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 AD(n,t){return n.type&11?ho(n,t):n.type&4?Cc(n,t):null}function LD(n,t,e,i){return e===-1?AD(t,n):e===-2?FD(n,t,i):Cs(n,n[ee],e,t)}function FD(n,t,e){if(e===gn)return ho(t,n);if(e===_i)return Cc(t,n);if(e===bi)return Gv(t,n)}function Wv(n,t,e,i){let r=t[Mn].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 d=s[l];if(d<0)a.push(null);else{let m=o[d];a.push(LD(t,m,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function Qp(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(o!==null){let s=Wv(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 d=o[a+1],m=t[-l];for(let y=He;y<m.length;y++){let w=m[y];w[jn]===w[Je]&&Qp(w[ee],w,d,i)}if(m[er]!==null){let y=m[er];for(let w=0;w<y.length;w++){let D=y[w];Qp(D[ee],D,d,i)}}}}}return i}function Uf(n,t){return n[Mn].queries[t].queryList}function VD(n,t,e){let i=new Zl((e&4)===4);return h0(n,t,i,i.destroy),(t[Mn]??=new Wp).queries.push(new Gp(i))-1}function qv(n,t,e){let i=Ue();return i.firstCreatePass&&(jD(i,new qp(n,t,e),-1),(t&2)===2&&(i.staticViewQueries=!0)),VD(i,ne(),t)}function BD(n){return n.split(",").map(t=>t.trim())}function jD(n,t,e){n.queries===null&&(n.queries=new Zp),n.queries.track(new Yp(t,e))}function zf(n,t){return n.queries.getByIndex(t)}function Zv(n,t){let e=n[ee],i=zf(e,t);return i.crossesNgTemplate?Qp(e,n,t,[]):Wv(e,n,i,t)}function Yv(n,t,e){let i,r=$o(()=>{i._dirtyCounter();let o=HD(i,n);if(t&&o===void 0)throw new Y(-951,!1);return o});return i=r[Ye],i._dirtyCounter=x(0),i._flatValue=void 0,r}function Qv(n){return Yv(!0,!1,n)}function Kv(n){return Yv(!0,!0,n)}function $D(n,t){let e=n[Ye];e._lView=ne(),e._queryIndex=t,e._queryList=Uf(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function HD(n,t){let e=n._lView,i=n._queryIndex;if(e===void 0||i===void 0||e[se]&4)return t?void 0:Wt;let r=Uf(e,i),o=Zv(e,i);return r.reset(o,I_),t?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var Ss=class{};var Ts=class extends Ss{injector;componentFactoryResolver=new zp(this);instance=null;constructor(t){super();let e=new Gi([...t.providers,{provide:Ss,useValue:this},{provide:wc,useValue:this.componentFactoryResolver}],t.parent||as(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Xv(n,t,e=null){return new Ts({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var UD=(()=>{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=Uu(!1,e.type),r=i.length>0?Xv([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=ae({token:n,providedIn:"environment",factory:()=>new n(ge(Pt))})}return n})();function pe(n){return ac(()=>{let t=Jv(n),e=oe(G({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===pf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?r=>r.get(UD).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||Un.Emulated,styles:n.styles||Wt,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&Nn("NgStandalone"),eb(e);let i=n.dependencies;return e.directiveDefs=r_(i,zD),e.pipeDefs=r_(i,t0),e.id=qD(e),e})}function zD(n){return Yi(n)||Hu(n)}function GD(n,t){if(n==null)return ci;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=fc.None,l=null),e[o]=[i,a,l],t[o]=s}return e}function WD(n){if(n==null)return ci;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function yi(n){return ac(()=>{let t=Jv(n);return eb(t),t})}function Dc(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 Jv(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||ci,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||Wt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:GD(n.inputs,t),outputs:WD(n.outputs),debugInfo:null}}function eb(n){n.features?.forEach(t=>t(n))}function r_(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 qD(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 ZD(n){return Object.getPrototypeOf(n.prototype).constructor}function Fs(n){let t=ZD(n.type),e=!0,i=[n];for(;t;){let r;if(In(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Y(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=xp(n.inputs),s.declaredInputs=xp(n.declaredInputs),s.outputs=xp(n.outputs);let a=r.hostBindings;a&&JD(n,a);let l=r.viewQuery,d=r.contentQueries;if(l&&KD(n,l),d&&XD(n,d),YD(n,r),Gg(n.outputs,r.outputs),In(r)&&r.data.animation){let m=n.data;m.animation=(m.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===Fs&&(e=!1)}}t=Object.getPrototypeOf(t)}QD(i)}function YD(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 QD(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=lo(r.hostAttrs,e=lo(e,r.hostAttrs))}}function xp(n){return n===ci?{}:n===Wt?[]:n}function KD(n,t){let e=n.viewQuery;e?n.viewQuery=(i,r)=>{t(i,r),e(i,r)}:n.viewQuery=t}function XD(n,t){let e=n.contentQueries;e?n.contentQueries=(i,r,o)=>{t(i,r,o),e(i,r,o)}:n.contentQueries=t}function JD(n,t){let e=n.hostBindings;e?n.hostBindings=(i,r)=>{t(i,r),e(i,r)}:n.hostBindings=t}function tb(n,t,e,i,r,o,s,a){if(e.firstCreatePass){n.mergedAttrs=lo(n.mergedAttrs,n.attrs);let m=n.tView=Cf(2,n,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),m.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),to(n,!1);let l=tS(e,t,n,i);Il()&&If(e,t,l,n),co(l,t);let d=Iv(l,t,l,n);t[i+Ne]=d,wf(t,d),OD(d,n,t)}function eS(n,t,e,i,r,o,s,a,l,d,m){let y=e+Ne,w;return t.firstCreatePass?(w=mo(t,y,4,s||null,a||null),Dl()&&Fv(t,n,w,Kt(t.consts,d),Of),b_(t,w)):w=t.data[y],tb(w,n,t,e,i,r,o,l),Jr(w)&&yc(t,n,w),d!=null&&Ns(n,w,m),w}function Ms(n,t,e,i,r,o,s,a,l,d,m){let y=e+Ne,w;if(t.firstCreatePass){if(w=mo(t,y,4,s||null,a||null),d!=null){let D=Kt(t.consts,d);w.localNames=[];for(let R=0;R<D.length;R+=2)w.localNames.push(D[R],-1)}}else w=t.data[y];return tb(w,n,t,e,i,r,o,l),d!=null&&Ns(n,w,m),w}function go(n,t,e,i,r,o,s,a){let l=ne(),d=Ue(),m=Kt(d.consts,o);return eS(l,d,n,t,e,i,r,m,void 0,s,a),go}var tS=nS;function nS(n,t,e,i){return gs(!0),t[ke].createComment("")}var Gf=new te("");function Vs(n){return!!n&&typeof n.then=="function"}function Sc(n){return!!n&&typeof n.subscribe=="function"}var nb=new te("");var Wf=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=I(nb,{optional:!0})??[];injector=I(wt);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=Qr(this.injector,r);if(Vs(o))e.push(o);else if(Sc(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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ib=new te("");function rb(){Jd(()=>{let n="";throw new Y(600,n)})}function ob(n){return n.isBoundToModule}var iS=10;var fr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=I(pn);afterRenderManager=I(mc);zonelessEnabled=I(_s);rootEffectScheduler=I(vs);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $e;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=I(hi);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Ge(e=>!e))}constructor(){I(vi,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=I(Pt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,r=wt.NULL){return this._injector.get(Te).run(()=>{Se(10);let s=e instanceof xc;if(!this._injector.get(Wf).done){let R="";throw new Y(405,R)}let l;s?l=e:l=this._injector.get(wc).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let d=ob(l)?void 0:this._injector.get(Ss),m=i||l.selector,y=l.create(r,[],m,d),w=y.location.nativeElement,D=y.injector.get(Gf,null);return D?.registerApplication(w),y.onDestroy(()=>{this.detachView(y.hostView),ys(this.components,y),D?.unregisterApplication(w)}),this._loadComponent(y),Se(11,y),y})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Se(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(hc.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Y(101,!1);let e=re(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,re(e),this.afterTick.next(),Se(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Rn,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<iS;)Se(14),this.synchronizeOnce(),Se(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&&!us(r))continue;let o=i&&!this.zonelessEnabled?0:1;Sv(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})=>us(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;ys(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(ib,[]).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),()=>ys(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Y(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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ys(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function rS(){let n,t;return{promise:new Promise((i,r)=>{n=i,t=r}),resolve:n,reject:t}}function le(n,t,e,i){let r=ne(),o=nr();if(Jt(r,o,t)){let s=Ue(),a=ms();kE(a,r,n,t,e,i)}return le}var sb=new te("",{providedIn:"root",factory:()=>!1});var oS=!1,Bs=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function ab(n){return n[Dt].get(sb,oS)}function sS(n,t,e){let i=po.get(n);if(i){for(let r of t)i.classList.push(r);for(let r of e)i.cleanupFns.push(r)}else po.set(n,{classList:t,cleanupFns:e})}function qf(n){let t=po.get(n);if(t){for(let e of t.cleanupFns)e();po.delete(n)}sr.delete(n)}var po=new WeakMap,sr=new WeakMap,ao=new WeakMap;function o_(n,t){let e=ao.get(n);if(e&&e.length>0){let i=e.findIndex(r=>r===t);i>-1&&e.splice(i,1)}e?.length===0&&ao.delete(n)}function lb(n,t){let e=ao.get(n)?.shift(),i=t[jn];if(i){let o=ec(n.index,i)?.previousSibling;e&&o&&e===o&&e.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))}}function aS(n,t){ao.has(n)?ao.get(n)?.push(t):ao.set(n,[t])}function s_(n){let t=n[Hn]??={};return t.enter??=new Map}function Tc(n){let t=n[Hn]??={};return t.leave??=new Map}function cb(n){let t=typeof n=="function"?n():n,e=Array.isArray(t)?t:null;return typeof t=="string"&&(e=t.trim().split(/\s+/).filter(i=>i)),e}function lS(n,t){if(!Bs)return;let e=po.get(n);if(e&&e.classList.length>0&&cS(n,e.classList))for(let i of e.classList)t.removeClass(n,i);qf(n)}function cS(n,t){for(let e of t)if(n.classList.contains(e))return!0;return!1}function db(n,t){let e=sr.get(t);return e===void 0?!0:t===n.target&&(e.animationName!==void 0&&n.animationName===e.animationName||e.propertyName!==void 0&&n.propertyName===e.propertyName)}function ub(n,t,e){let i=n.get(t.index)??{animateFns:[]};i.animateFns.push(e),n.set(t.index,i)}function a_(n,t){if(n)for(let e of n)e();for(let e of t)e()}function l_(n,t){let e=Tc(n).get(t.index);e&&(e.resolvers=void 0)}function ar(n){if(Nn("NgAnimateEnter"),!Bs)return ar;let t=ne();if(ab(t))return ar;let e=et();return lb(e,t),ub(s_(t),e,()=>dS(t,e,n)),pv(t[Dt]),fv(t[Dt],s_(t)),ar}function dS(n,t,e){let i=Ot(t,n),r=n[ke],o=n[Dt].get(Te),s=cb(e),a=[],l=m=>{if(m.target!==i)return;let y=m instanceof AnimationEvent?"animationend":"transitionend";o.runOutsideAngular(()=>{r.listen(i,y,d)})},d=m=>{m.target===i&&uS(m,i,r)};if(s&&s.length>0){o.runOutsideAngular(()=>{a.push(r.listen(i,"animationstart",l)),a.push(r.listen(i,"transitionstart",l))}),sS(i,s,a);for(let m of s)r.addClass(i,m);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(av(i,sr,Bs),!sr.has(i)){for(let m of s)r.removeClass(i,m);qf(i)}})})}}function uS(n,t,e){let i=po.get(t);if(!(n.target!==t||!i)&&db(n,t)){n.stopImmediatePropagation();for(let r of i.classList)e.removeClass(t,r);qf(t)}}function lr(n){if(Nn("NgAnimateLeave"),!Bs)return lr;let t=ne();if(ab(t))return lr;let i=et();return lb(i,t),ub(Tc(t),i,()=>pS(t,i,n)),pv(t[Dt]),lr}function pS(n,t,e){let{promise:i,resolve:r}=rS(),o=Ot(t,n),s=n[ke],a=n[Dt].get(Te);mi.add(n),(Tc(n).get(t.index).resolvers??=[]).push(r);let l=cb(e);return l&&l.length>0?fS(o,t,n,l,s,a):r(),{promise:i,resolve:r}}function fS(n,t,e,i,r,o){lS(n,r);let s=[],a=Tc(e).get(t.index)?.resolvers,l=d=>{if(d.target===n&&(d instanceof CustomEvent||db(d,n))){if(d.stopImmediatePropagation(),sr.delete(n),o_(t,n),Array.isArray(t.projection))for(let m of i)r.removeClass(n,m);a_(a,s),l_(e,t)}};o.runOutsideAngular(()=>{s.push(r.listen(n,"animationend",l)),s.push(r.listen(n,"transitionend",l))}),aS(t,n);for(let d of i)r.addClass(n,d);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{av(n,sr,Bs),sr.has(n)||(o_(t,n),a_(a,s),l_(e,t))})})}var Kp=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))}};function wp(n,t,e,i,r){return n===e&&Object.is(t,i)?1:Object.is(r(n,t),r(e,i))?-1:0}function hS(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 d=n.at(o),m=t[o],y=wp(o,d,o,m,e);if(y!==0){y<0&&n.updateValue(o,m),o++;continue}let w=n.at(s),D=t[l],R=wp(s,w,l,D,e);if(R!==0){R<0&&n.updateValue(s,D),s--,l--;continue}let j=e(o,d),Z=e(s,w),$=e(o,m);if(Object.is($,Z)){let _e=e(l,D);Object.is(_e,j)?(n.swap(o,s),n.updateValue(s,D),l--,s--):n.move(s,o),n.updateValue(o,m),o++;continue}if(i??=new rc,r??=d_(n,o,s,e),Xp(n,i,o,$))n.updateValue(o,m),o++,s++;else if(r.has($))i.set(j,n.detach(o)),s--;else{let _e=n.create(o,t[o]);n.attach(o,_e),o++,s++}}for(;o<=l;)c_(n,i,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),d=l.next();for(;!d.done&&o<=s;){let m=n.at(o),y=d.value,w=wp(o,m,o,y,e);if(w!==0)w<0&&n.updateValue(o,y),o++,d=l.next();else{i??=new rc,r??=d_(n,o,s,e);let D=e(o,y);if(Xp(n,i,o,D))n.updateValue(o,y),o++,s++,d=l.next();else if(!r.has(D))n.attach(o,n.create(o,y)),o++,s++,d=l.next();else{let R=e(o,m);i.set(R,n.detach(o)),s--}}}for(;!d.done;)c_(n,i,e,n.length,d.value),d=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function Xp(n,t,e,i){return t!==void 0&&t.has(i)?(n.attach(e,t.get(i)),t.delete(i),!0):!1}function c_(n,t,e,i,r){if(Xp(n,t,i,e(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function d_(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 rc=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 S(n,t,e,i,r,o,s,a){Nn("NgControlFlow");let l=ne(),d=Ue(),m=Kt(d.consts,o);return Ms(l,d,n,t,e,i,r,m,256,s,a),js}function js(n,t,e,i,r,o,s,a){Nn("NgControlFlow");let l=ne(),d=Ue(),m=Kt(d.consts,o);return Ms(l,d,n,t,e,i,r,m,512,s,a),js}function T(n,t){Nn("NgControlFlow");let e=ne(),i=nr(),r=e[i]!==pt?e[i]:-1,o=r!==-1?oc(e,Ne+r):void 0,s=0;if(Jt(e,i,n)){let a=re(null);try{if(o!==void 0&&Ov(o,s),n!==-1){let l=Ne+n,d=oc(e,l),m=nf(e[ee],l),y=Nv(d,m,e),w=As(e,m,t,{dehydratedView:y});Ls(d,w,s,uo(m,y))}}finally{re(a)}}else if(o!==void 0){let a=Pv(o,s);a!==void 0&&(a[We]=t)}}var Jp=class{lContainer;$implicit;$index;constructor(t,e,i){this.lContainer=t,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-He}};function Vt(n){return n}function Rt(n,t){return t}var ef=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,i){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=i}};function Q(n,t,e,i,r,o,s,a,l,d,m,y,w){Nn("NgControlFlow");let D=ne(),R=Ue(),j=l!==void 0,Z=ne(),$=a?s.bind(Z[St][We]):s,_e=new ef(j,$);Z[Ne+n]=_e,Ms(D,R,n+1,t,e,i,r,Kt(R.consts,o),256),j&&Ms(D,R,n+2,l,d,m,y,Kt(R.consts,w),512)}var tf=class extends Kp{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-He}at(t){return this.getLView(t)[We].$implicit}attach(t,e){let i=e[Qi];this.needsIndexUpdate||=t!==this.length,Ls(this.lContainer,e,t,uo(this.templateTNode,i)),mS(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,gS(this.lContainer,t),_S(this.lContainer,t)}create(t,e){let i=tc(this.lContainer,this.templateTNode.tView.ssrId),r=As(this.hostLView,this.templateTNode,new Jp(this.lContainer,e,t),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(t){vc(t[ee],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[We].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[We].$index=t}getLView(t){return vS(this.lContainer,t)}};function K(n){let t=re(null),e=Xt();try{let i=ne(),r=i[ee],o=i[e],s=e+1,a=oc(i,s);if(o.liveCollection===void 0){let d=nf(r,s);o.liveCollection=new tf(a,i,d)}else o.liveCollection.reset();let l=o.liveCollection;if(hS(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let d=nr(),m=l.length===0;if(Jt(i,d,m)){let y=e+2,w=oc(i,y);if(m){let D=nf(r,y),R=Nv(w,D,i),j=As(i,D,void 0,{dehydratedView:R});Ls(w,j,0,uo(D,R))}else r.firstUpdatePass&&JE(w),Ov(w,0)}}}finally{re(t)}}function oc(n,t){return n[t]}function mS(n,t){if(n.length<=He)return;let e=He+t,i=n[e],r=i?i[Hn]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Dt];sE(o,r),mi.delete(i),r.detachedLeaveAnimationFns=void 0}}function gS(n,t){if(n.length<=He)return;let e=He+t,i=n[e],r=i?i[Hn]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function _S(n,t){return Es(n,t)}function vS(n,t){return Pv(n,t)}function nf(n,t){return ds(n,t)}function k(n,t,e){let i=ne(),r=nr();if(Jt(i,r,t)){let o=Ue(),s=ms();EE(s,i,n,t,i[ke],e)}return k}function rf(n,t,e,i,r){Af(t,n,e,r?"class":"style",i)}function f(n,t,e,i){let r=ne(),o=r[ee],s=n+Ne,a=o.firstCreatePass?Vf(s,r,2,t,Of,Dl(),e,i):o.data[s];if(Rf(a,r,n,t,pb),Jr(a)){let l=r[ee];yc(l,r,a),mf(l,a,r)}return i!=null&&Ns(r,a),f}function h(){let n=Ue(),t=et(),e=Nf(t);return n.firstCreatePass&&Bf(n,e),sp(e)&&ap(),rp(),e.classesWithoutHost!=null&&kw(e)&&rf(n,e,ne(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&Iw(e)&&rf(n,e,ne(),e.stylesWithoutHost,!1),h}function z(n,t,e,i){return f(n,t,e,i),h(),z}function b(n,t,e,i){let r=ne(),o=r[ee],s=n+Ne,a=o.firstCreatePass?fD(s,o,2,t,e,i):o.data[s];return Rf(a,r,n,t,pb),i!=null&&Ns(r,a),b}function C(){let n=et(),t=Nf(n);return sp(t)&&ap(),rp(),C}function J(n,t,e,i){return b(n,t,e,i),C(),J}var pb=(n,t,e,i,r)=>(gs(!0),Y_(t[ke],i,mp()));function Zf(n,t,e){let i=ne(),r=i[ee],o=n+Ne,s=r.firstCreatePass?Vf(o,i,8,"ng-container",Of,Dl(),t,e):r.data[o];if(Rf(s,i,n,"ng-container",bS),Jr(s)){let a=i[ee];yc(a,i,s),mf(a,s,i)}return e!=null&&Ns(i,s),Zf}function Yf(){let n=Ue(),t=et(),e=Nf(t);return n.firstCreatePass&&Bf(n,e),Yf}function hr(n,t,e){return Zf(n,t,e),Yf(),hr}var bS=(n,t,e,i,r)=>(gs(!0),S1(t[ke],""));function P(){return ne()}function W(n,t,e){let i=ne(),r=nr();if(Jt(i,r,t)){let o=Ue(),s=ms();yv(s,i,n,t,i[ke],e)}return W}var Ll=void 0;function yS(n){let t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&e===0?1:5}var CS=["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"]],Ll,[["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"]],Ll,[["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}",Ll,"{1} 'at' {0}",Ll],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",yS],Ep={};function Bt(n){let t=xS(n),e=u_(t);if(e)return e;let i=t.split("-")[0];if(e=u_(i),e)return e;if(i==="en")return CS;throw new Y(701,!1)}function u_(n){if(!(n in Ep)){let t=ln.ng&&ln.ng.common&&ln.ng.common.locales&&ln.ng.common.locales[n];return t!==void 0&&(Ep[n]=t),t}return Ep[n]}var qe=(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})(qe||{});function xS(n){return n.toLowerCase().replace(/_/g,"-")}var $s="en-US";var wS=$s;function fb(n){typeof n=="string"&&(wS=n.toLowerCase().replace(/_/g,"-"))}function E(n,t,e){let i=ne(),r=Ue(),o=et();return ES(r,i,i[ke],o,n,t,e),E}function B(n,t,e){let i=ne(),r=Ue(),o=et();return(o.type&3||e)&&$v(o,r,i,e,i[ke],n,t,Hl(o,i,t)),B}function ES(n,t,e,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Hl(i,t,o),$v(i,n,t,s,e,r,o,l)&&(a=!1)),a){let d=i.outputs?.[r],m=i.hostDirectiveOutputs?.[r];if(m&&m.length)for(let y=0;y<m.length;y+=2){let w=m[y],D=m[y+1];l??=Hl(i,t,o),t_(i,t,w,D,r,l)}if(d&&d.length)for(let y of d)l??=Hl(i,t,o),t_(i,t,y,r,r,l)}}function u(n=1){return T0(n)}function DS(n,t){let e=null,i=F1(n);for(let r=0;r<t.length;r++){let o=t[r];if(o==="*"){e=r;continue}if(i===null?tv(n,o,!0):j1(i,o))return r}return e}function Qf(n){let t=ne()[St][Et];if(!t.projection){let e=n?n.length:1,i=t.projection=Jg(e,null),r=i.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?DS(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function Kf(n,t=0,e,i,r,o){let s=ne(),a=Ue(),l=i?n+1:null;l!==null&&Ms(s,a,l,i,r,o,null,e);let d=mo(a,Ne+n,16,null,e||null);d.projection===null&&(d.projection=t),dp();let y=!s[Qi]||op();s[St][Et].projection[d.projection]===null&&l!==null?SS(s,a,l):y&&!uc(d)&&_E(a,s,d)}function SS(n,t,e){let i=Ne+e,r=t.data[i],o=n[i],s=tc(o,r.tView.ssrId),a=As(n,r,void 0,{dehydratedView:s});Ls(o,a,0,uo(r,s))}function Xf(n,t,e){qv(n,t,e)}function Jf(n){let t=ne(),e=Ue(),i=Tl();hs(i+1);let r=zf(e,i);if(n.dirty&&d0(t)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=Zv(t,i);n.reset(o,I_),n.notifyOnChanges()}return!0}return!1}function eh(){return Uf(ne(),Tl())}function jt(n,t,e,i){$D(n,qv(t,e,i))}function vn(n=1){hs(Tl()+n)}function Ci(n){let t=v0();return xl(t,Ne+n)}function Fl(n,t){return n<<17|t<<2}function dr(n){return n>>17&32767}function TS(n){return(n&2)==2}function MS(n,t){return n&131071|t<<17}function of(n){return n|2}function fo(n){return(n&131068)>>2}function Dp(n,t){return n&-131069|t<<2}function kS(n){return(n&1)===1}function sf(n){return n|1}function IS(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=dr(s),l=fo(s);n[i]=e;let d=!1,m;if(Array.isArray(e)){let y=e;m=y[1],(m===null||Yr(y,m)>0)&&(d=!0)}else m=e;if(r)if(l!==0){let w=dr(n[a+1]);n[i+1]=Fl(w,a),w!==0&&(n[w+1]=Dp(n[w+1],i)),n[a+1]=MS(n[a+1],i)}else n[i+1]=Fl(a,0),a!==0&&(n[a+1]=Dp(n[a+1],i)),a=i;else n[i+1]=Fl(l,0),a===0?a=i:n[l+1]=Dp(n[l+1],i),l=i;d&&(n[i+1]=of(n[i+1])),p_(n,m,i,!0),p_(n,m,i,!1),PS(t,m,n,i,o),s=Fl(a,l),o?t.classBindings=s:t.styleBindings=s}function PS(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&Yr(o,t)>=0&&(e[i+1]=sf(e[i+1]))}function p_(n,t,e,i){let r=n[e+1],o=t===null,s=i?dr(r):fo(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],d=n[s+1];OS(l,t)&&(a=!0,n[s+1]=i?sf(d):of(d)),s=i?dr(d):fo(d)}a&&(n[e+1]=i?of(r):sf(r))}function OS(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?Yr(n,t)>=0:!1}var hn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function RS(n){return n.substring(hn.key,hn.keyEnd)}function NS(n){return AS(n),hb(n,mb(n,0,hn.textEnd))}function hb(n,t){let e=hn.textEnd;return e===t?-1:(t=hn.keyEnd=LS(n,hn.key=t,e),mb(n,t,e))}function AS(n){hn.key=0,hn.keyEnd=0,hn.value=0,hn.valueEnd=0,hn.textEnd=n.length}function mb(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function LS(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function ie(n,t,e){return gb(n,t,e,!1),ie}function me(n,t){return gb(n,t,null,!0),me}function ft(n){VS(zS,FS,n,!0)}function FS(n,t){for(let e=NS(t);e>=0;e=hb(t,e))bl(n,RS(t),!0)}function gb(n,t,e,i){let r=ne(),o=Ue(),s=fs(2);if(o.firstUpdatePass&&vb(o,n,s,i),t!==pt&&Jt(r,s,t)){let a=o.data[Xt()];bb(o,a,r,r[ke],n,r[s+1]=WS(t,e),i,s)}}function VS(n,t,e,i){let r=Ue(),o=fs(2);r.firstUpdatePass&&vb(r,null,o,i);let s=ne();if(e!==pt&&Jt(s,o,e)){let a=r.data[Xt()];if(yb(a,i)&&!_b(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=hl(l,e||"")),rf(r,a,s,e,i)}else GS(r,a,s,s[ke],s[o+1],s[o+1]=US(n,t,e),i,o)}}function _b(n,t){return t>=n.expandoStartIndex}function vb(n,t,e,i){let r=n.data;if(r[e+1]===null){let o=r[Xt()],s=_b(n,e);yb(o,i)&&t===null&&!s&&(t=!1),t=BS(r,o,t,i),IS(r,o,t,e,s,i)}}function BS(n,t,e,i){let r=w0(n),o=i?t.residualClasses:t.residualStyles;if(r===null)(i?t.classBindings:t.styleBindings)===0&&(e=Sp(null,n,t,e,i),e=ks(e,t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==r)if(e=Sp(r,n,t,e,i),o===null){let l=jS(n,t,i);l!==void 0&&Array.isArray(l)&&(l=Sp(null,n,t,l[1],i),l=ks(l,t.attrs,i),$S(n,t,i,l))}else o=HS(n,t,i)}return o!==void 0&&(i?t.residualClasses=o:t.residualStyles=o),e}function jS(n,t,e){let i=e?t.classBindings:t.styleBindings;if(fo(i)!==0)return n[dr(i)]}function $S(n,t,e,i){let r=e?t.classBindings:t.styleBindings;n[dr(r)]=i}function HS(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=ks(i,s,e)}return ks(i,t.attrs,e)}function Sp(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=ks(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),i}function ks(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]),bl(n,s,e?!0:t[++o]))}return n===void 0?null:n}function US(n,t,e){if(e==null||e==="")return Wt;let i=[],r=Os(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 zS(n,t,e){let i=String(t);i!==""&&!i.includes(" ")&&bl(n,i,e)}function GS(n,t,e,i,r,o,s,a){r===pt&&(r=Wt);let l=0,d=0,m=0<r.length?r[0]:null,y=0<o.length?o[0]:null;for(;m!==null||y!==null;){let w=l<r.length?r[l+1]:void 0,D=d<o.length?o[d+1]:void 0,R=null,j;m===y?(l+=2,d+=2,w!==D&&(R=y,j=D)):y===null||m!==null&&m<y?(l+=2,R=m):(d+=2,R=y,j=D),R!==null&&bb(n,t,e,i,R,j,s,a),m=l<r.length?r[l]:null,y=d<o.length?o[d]:null}}function bb(n,t,e,i,r,o,s,a){if(!(t.type&3))return;let l=n.data,d=l[a+1],m=kS(d)?f_(l,t,e,r,fo(d),s):void 0;if(!sc(m)){sc(o)||TS(d)&&(o=f_(l,null,e,r,a,s));let y=Ku(Xt(),e);bE(i,s,y,r,o)}}function f_(n,t,e,i,r,o){let s=t===null,a;for(;r>0;){let l=n[r],d=Array.isArray(l),m=d?l[1]:l,y=m===null,w=e[r+1];w===pt&&(w=y?Wt:void 0);let D=y?yl(w,i):m===i?w:void 0;if(d&&!sc(D)&&(D=yl(l,i)),sc(D)&&(a=D,s))return a;let R=n[r+1];r=s?dr(R):fo(R)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=yl(l,i))}return a}function sc(n){return n!==void 0}function WS(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=ai(Os(n)))),n}function yb(n,t){return(n.flags&(t?8:16))!==0}function p(n,t=""){let e=ne(),i=Ue(),r=n+Ne,o=i.firstCreatePass?mo(i,r,1,t,null):i.data[r],s=qS(i,e,o,t,n);e[r]=s,Il()&&If(i,e,s,o),to(o,!1)}var qS=(n,t,e,i,r)=>(gs(!0),E1(t[ke],i));function ZS(n,t,e,i=""){return Jt(n,nr(),e)?t+cn(e)+i:pt}function YS(n,t,e,i,r,o=""){let s=pp(),a=Hf(n,s,e,r);return fs(2),a?t+cn(e)+i+cn(r)+o:pt}function QS(n,t,e,i,r,o,s,a=""){let l=pp(),d=mD(n,l,e,r,s);return fs(3),d?t+cn(e)+i+cn(r)+o+cn(s)+a:pt}function O(n){return q("",n),O}function q(n,t,e){let i=ne(),r=ZS(i,n,t,e);return r!==pt&&th(i,Xt(),r),q}function _o(n,t,e,i,r){let o=ne(),s=YS(o,n,t,e,i,r);return s!==pt&&th(o,Xt(),s),_o}function Mc(n,t,e,i,r,o,s){let a=ne(),l=QS(a,n,t,e,i,r,o,s);return l!==pt&&th(a,Xt(),l),Mc}function th(n,t,e){let i=Ku(t,n);D1(n[ke],i,e)}function KS(n,t,e){let i=Ue();if(i.firstCreatePass){let r=In(n);af(e,i.data,i.blueprint,r,!0),af(t,i.data,i.blueprint,r,!1)}}function af(n,t,e,i,r){if(n=mt(n),Array.isArray(n))for(let o=0;o<n.length;o++)af(n[o],t,e,i,r);else{let o=Ue(),s=ne(),a=et(),l=zi(n)?n:mt(n.provide),d=Gu(n),m=a.providerIndexes&1048575,y=a.directiveStart,w=a.providerIndexes>>20;if(zi(n)||!n.multi){let D=new cr(d,r,_n,null),R=Mp(l,t,r?m:m+w,y);R===-1?(Ip(ql(a,s),o,l),Tp(o,n,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(D),s.push(D)):(e[R]=D,s[R]=D)}else{let D=Mp(l,t,m+w,y),R=Mp(l,t,m,m+w),j=D>=0&&e[D],Z=R>=0&&e[R];if(r&&!Z||!r&&!j){Ip(ql(a,s),o,l);let $=eT(r?JS:XS,e.length,r,i,d,n);!r&&Z&&(e[R].providerFactory=$),Tp(o,n,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push($),s.push($)}else{let $=Cb(e[r?R:D],d,!r&&i);Tp(o,n,D>-1?D:R,$)}!r&&i&&Z&&e[R].componentProviders++}}}function Tp(n,t,e,i){let r=zi(t),o=o0(t);if(r||o){let l=(o?mt(t.useClass):t).prototype.ngOnDestroy;if(l){let d=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let m=d.indexOf(e);m===-1?d.push(e,[i,l]):d[m+1].push(i,l)}else d.push(e,l)}}}function Cb(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Mp(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function XS(n,t,e,i,r){return lf(this.multi,[])}function JS(n,t,e,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Cs(i,i[ee],this.providerFactory.index,r);s=l.slice(0,a),lf(o,s);for(let d=a;d<l.length;d++)s.push(l[d])}else s=[],lf(o,s);return s}function lf(n,t){for(let e=0;e<n.length;e++){let i=n[e];t.push(i())}return t}function eT(n,t,e,i,r,o){let s=new cr(n,e,_n,null);return s.multi=[],s.index=t,s.componentProviders=0,Cb(s,r,i&&!e),s}function Hs(n,t=[]){return e=>{e.providersResolver=(i,r)=>KS(i,r?r(n):n,t)}}function Us(n,t,e){let i=ps()+n,r=ne();return r[i]===pt?$f(r,i,e?t.call(e):t()):hD(r,i)}function xi(n,t,e,i){return wb(ne(),ps(),n,t,e,i)}function xb(n,t){let e=n[t];return e===pt?void 0:e}function wb(n,t,e,i,r,o){let s=t+e;return Jt(n,s,r)?$f(n,s+1,o?i.call(o,r):i(r)):xb(n,s+1)}function tT(n,t,e,i,r,o,s){let a=t+e;return Hf(n,a,r,o)?$f(n,a+2,s?i.call(s,r,o):i(r,o)):xb(n,a+2)}function wi(n,t){let e=Ue(),i,r=n+Ne;e.firstCreatePass?(i=nT(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=Ui(i.type,!0)),s,a=xt(_n);try{let l=Wl(!1),d=o();return Wl(l),Xu(e,ne(),r,d),d}finally{xt(a)}}function nT(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}function nh(n,t,e){let i=n+Ne,r=ne(),o=xl(r,i);return Eb(r,i)?wb(r,ps(),t,o.transform,e,o):o.transform(e)}function vo(n,t,e,i){let r=n+Ne,o=ne(),s=xl(o,r);return Eb(o,r)?tT(o,ps(),t,s.transform,e,i,s):s.transform(e,i)}function Eb(n,t){return n[ee].data[t].pure}function kc(n,t){return Cc(n,t)}var iT=(()=>{class n{zone=I(Te);changeDetectionScheduler=I(qt);applicationRef=I(fr);applicationErrorHandler=I(pn);_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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Db=new te("",{factory:()=>!1});function ih({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new Te(oe(G({},oh()),{scheduleInRootZone:e})),[{provide:Te,useFactory:n},{provide:Zi,multi:!0,useFactory:()=>{let i=I(iT,{optional:!0});return()=>i.initialize()}},{provide:Zi,multi:!0,useFactory:()=>{let i=I(rT);return()=>{i.initialize()}}},t===!0?{provide:gp,useValue:!0}:[],{provide:_p,useValue:e??lv},{provide:pn,useFactory:()=>{let i=I(Te),r=I(Pt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(Lt),o.handleError(s))})}}}]}function rh(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,i=ih({ngZoneFactory:()=>{let r=oh(n);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&Nn("NgZone_CoalesceEvent"),new Te(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return os([{provide:Db,useValue:!0},{provide:_s,useValue:!1},i])}function oh(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var rT=(()=>{class n{subscription=new Ve;initialized=!1;zone=I(Te);pendingTasks=I(hi);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(()=>{Te.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Te.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Sb=(()=>{class n{applicationErrorHandler=I(pn);appRef=I(fr);taskService=I(hi);ngZone=I(Te);zonelessEnabled=I(_s);tracing=I(vi,{optional:!0});disableScheduling=I(gp,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ve;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Xl):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(I(_p,{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 Jl||!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}default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let r=this.useMicrotaskScheduler?G0:cv;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(Xl+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,G0(()=>{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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function oT(){return typeof $localize<"u"&&$localize.locale||$s}var zs=new te("",{providedIn:"root",factory:()=>I(zs,{optional:!0,skipSelf:!0})||oT()});var Ic=class{destroyed=!1;listeners=null;errorHandler=I(Lt,{optional:!0});destroyRef=I(tt);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new Y(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let e=this.listeners?.indexOf(t);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(t){if(this.destroyed){console.warn(Wi(953,!1));return}if(this.listeners===null)return;let e=re(null);try{for(let i of this.listeners)try{i(t)}catch(r){this.errorHandler?.handleError(r)}}finally{re(e)}}};function nt(n){return jg(n)}function L(n,t){return $o(n,t?.equal)}var sh=class{[Ye];constructor(t){this[Ye]=t}destroy(){this[Ye].destroy()}};function Ce(n,t){let e=t?.injector??I(wt),i=t?.manualCleanup!==!0?e.get(tt):null,r,o=e.get(ir,null,{optional:!0}),s=e.get(qt);return o!==null?(r=lT(o.view,s,n),i instanceof is&&i._lView===o.view&&(i=null)):r=cT(n,e.get(vs),s),r.injector=e,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new sh(r)}var Mb=oe(G({},$g),{cleanupFns:void 0,zone:null,onDestroyFn:rr,run(){let n=no(!1);try{Hg(this)}finally{no(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=re(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],re(n)}}}),sT=oe(G({},Mb),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){ni(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),aT=oe(G({},Mb),{consumerMarkedDirty(){this.view[se]|=8192,pi(this.view),this.notifier.notify(13)},destroy(){ni(this),this.onDestroyFn(),this.cleanup(),this.view[$n]?.delete(this)}});function lT(n,t,e){let i=Object.create(aT);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=t,i.fn=kb(i,e),n[$n]??=new Set,n[$n].add(i),i.consumerMarkedDirty(i),i}function cT(n,t,e){let i=Object.create(sT);return i.fn=kb(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 kb(n,t){return()=>{t(e=>(n.cleanupFns??=[]).push(e))}}var dT=n=>n;function mr(n,t){if(typeof n=="function"){let e=bu(n,dT,t?.equal);return Tb(e,t?.debugName)}else{let e=bu(n.source,n.computation,n.equal);return Tb(e,n.debugName)}}function Tb(n,t){let e=n[Ye],i=n;return i.set=r=>Vg(e,r),i.update=r=>Bg(e,r),i.asReadonly=Pl.bind(n),i}var Nb=Symbol("InputSignalNode#UNSET"),ET=oe(G({},Ho),{transformFn:void 0,applyValueToInputSignal(n,t){Ni(n,t)}});function Ab(n,t){let e=Object.create(ET);e.value=n,e.transformFn=t?.transform;function i(){if(ei(e),e.value===Nb){let r=null;throw new Y(-950,r)}return e.value}return i[Ye]=e,i}var DT=new te("");DT.__NG_ELEMENT_ID__=n=>{let t=et();if(t===null)throw new Y(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new Y(204,!1)};function H(n){return new Ic}function Ib(n,t){return Ab(n,t)}function ST(n){return Ab(Nb,n)}var N=(Ib.required=ST,Ib);function Pb(n,t){return Qv(t)}function TT(n,t){return Kv(t)}var en=(Pb.required=TT,Pb);var lh=new te(""),MT=new te("");function Gs(n){return!n.moduleRef}function kT(n){let t=Gs(n)?n.r3Injector:n.moduleRef.injector,e=t.get(Te);return e.run(()=>{Gs(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=t.get(pn),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:i})}),Gs(n)){let o=()=>t.destroy(),s=n.platformInjector.get(lh);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(lh);s.add(o),n.moduleRef.onDestroy(()=>{ys(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return PT(i,e,()=>{let o=t.get(hi),s=o.add(),a=t.get(Wf);return a.runInitializers(),a.donePromise.then(()=>{let l=t.get(zs,$s);if(fb(l||$s),!t.get(MT,!0))return Gs(n)?t.get(fr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Gs(n)){let m=t.get(fr);return n.rootComponent!==void 0&&m.bootstrap(n.rootComponent),m}else return IT?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var IT;function PT(n,t,e){try{let i=e();return Vs(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n(i)),i}}var Pc=null;function OT(n=[],t){return wt.create({name:t,providers:[{provide:ss,useValue:"platform"},{provide:lh,useValue:new Set([()=>Pc=null])},...n]})}function RT(n=[]){if(Pc)return Pc;let t=OT(n);return Pc=t,rb(),NT(t),t}function NT(n){let t=n.get(cc,null);Qr(n,()=>{t?.forEach(e=>e())})}var Nc=(()=>{class n{static __NG_ELEMENT_ID__=AT}return n})();function AT(n){return LT(et(),ne(),(n&16)===16)}function LT(n,t,e){if(ui(n)&&!e){let i=Qt(n.index,t);return new gi(i,i)}else if(n.type&175){let i=t[St];return new gi(i,t)}return null}var ch=class{constructor(){}supports(t){return jf(t)}create(t){return new dh(t)}},FT=(n,t)=>t,dh=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||FT}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<Ob(i,r,o)?e:i,a=Ob(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 d=a-r,m=l-r;if(d!=m){for(let w=0;w<d;w++){let D=w<o.length?o[w]:o[w]=0,R=D+w;m<=R&&R<d&&(o[w]=D+1)}let y=s.previousIndex;o[y]=m-d}}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=[]),!jf(t))throw new Y(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,Bv(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 uh(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 Oc),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 Oc),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}},uh=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}},ph=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}},Oc=class{map=new Map;put(t){let e=t.trackById,i=this.map.get(e);i||(i=new ph,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 Ob(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 Rb(){return new Ac([new ch])}var Ac=(()=>{class n{factories;static \u0275prov=ae({token:n,providedIn:"root",factory:Rb});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=I(n,{optional:!0,skipSelf:!0});return n.create(e,i||Rb())}}}find(e){let i=this.factories.find(r=>r.supports(e));if(i!=null)return i;throw new Y(901,!1)}}return n})();function Lb(n){let{rootComponent:t,appProviders:e,platformProviders:i,platformRef:r}=n;Se(8);try{let o=r?.injector??RT(i),s=[ih({}),{provide:qt,useExisting:Sb},I0,...e||[]],a=new Ts({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return kT({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Se(9)}}function Fb(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var ah=Symbol("NOT_SET"),Vb=new Set,VT=oe(G({},Ho),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:ah,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!==ah&&!Ri(this))return this.signal;try{for(let r of this.cleanup??Vb)r()}finally{this.cleanup?.clear()}let t=[];n!==void 0&&t.push(n),t.push(this.registerCleanupFn);let e=Vn(this),i;try{i=this.userFn.apply(null,t)}finally{ti(this,e)}return(this.value===ah||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),fh=class extends xs{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(tt),s),this.scheduler=r;for(let a of Tf){let l=e[a];if(l===void 0)continue;let d=Object.create(VT);d.sequence=this,d.phase=a,d.userFn=l,d.dirty=!0,d.signal=()=>(ei(d),d.value),d.signal[Ye]=d,d.registerCleanupFn=m=>(d.cleanup??=new Set).add(m),this.nodes[a]=d,this.hooks[a]=m=>d.phaseFn(m)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let t of this.nodes)if(t)try{for(let e of t.cleanup??Vb)e()}finally{ni(t)}}};function hh(n,t){let e=t?.injector??I(wt),i=e.get(qt),r=e.get(mc),o=e.get(vi,null,{optional:!0});r.impl??=e.get(Mf);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=e.get(ir,null,{optional:!0}),l=new fh(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,e,o?.snapshot(null));return r.impl.register(l),l}var Bb=null;function qs(){return Bb}function mh(n){Bb??=n}var Ws=class{};var gt=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(gt||{}),Ie=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(Ie||{}),Nt=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(Nt||{}),Wn={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 $b(n){return Bt(n)[qe.LocaleId]}function Hb(n,t,e){let i=Bt(n),r=[i[qe.DayPeriodsFormat],i[qe.DayPeriodsStandalone]],o=tn(r,t);return tn(o,e)}function Ub(n,t,e){let i=Bt(n),r=[i[qe.DaysFormat],i[qe.DaysStandalone]],o=tn(r,t);return tn(o,e)}function zb(n,t,e){let i=Bt(n),r=[i[qe.MonthsFormat],i[qe.MonthsStandalone]],o=tn(r,t);return tn(o,e)}function Gb(n,t){let i=Bt(n)[qe.Eras];return tn(i,t)}function Zs(n,t){let e=Bt(n);return tn(e[qe.DateFormat],t)}function Ys(n,t){let e=Bt(n);return tn(e[qe.TimeFormat],t)}function Qs(n,t){let i=Bt(n)[qe.DateTimeFormat];return tn(i,t)}function Ks(n,t){let e=Bt(n),i=e[qe.NumberSymbols][t];if(typeof i>"u"){if(t===Wn.CurrencyDecimal)return e[qe.NumberSymbols][Wn.Decimal];if(t===Wn.CurrencyGroup)return e[qe.NumberSymbols][Wn.Group]}return i}function Wb(n){if(!n[qe.ExtraData])throw new Y(2303,!1)}function qb(n){let t=Bt(n);return Wb(t),(t[qe.ExtraData][2]||[]).map(i=>typeof i=="string"?gh(i):[gh(i[0]),gh(i[1])])}function Zb(n,t,e){let i=Bt(n);Wb(i);let r=[i[qe.ExtraData][0],i[qe.ExtraData][1]],o=tn(r,t)||[];return tn(o,e)||[]}function tn(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Y(2304,!1)}function gh(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var BT=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Lc={},jT=/((?:[^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]*)/,$T=256;function Yb(n,t,e,i){let r=KT(n);HT(t),t=Gn(e,t)||t;let s=[],a;for(;t;)if(a=jT.exec(t),a){s=s.concat(a.slice(1));let m=s.pop();if(!m)break;t=m}else{s.push(t);break}let l=r.getTimezoneOffset();i&&(l=Kb(i,l),r=QT(r,i));let d="";return s.forEach(m=>{let y=ZT(m);d+=y?y(r,e,l):m==="''"?"'":m.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),d}function HT(n){if(n.length>$T)throw new Y(2300,!1)}function $c(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Gn(n,t){let e=$b(n);if(Lc[e]??={},Lc[e][t])return Lc[e][t];let i="";switch(t){case"shortDate":i=Zs(n,Nt.Short);break;case"mediumDate":i=Zs(n,Nt.Medium);break;case"longDate":i=Zs(n,Nt.Long);break;case"fullDate":i=Zs(n,Nt.Full);break;case"shortTime":i=Ys(n,Nt.Short);break;case"mediumTime":i=Ys(n,Nt.Medium);break;case"longTime":i=Ys(n,Nt.Long);break;case"fullTime":i=Ys(n,Nt.Full);break;case"short":let r=Gn(n,"shortTime"),o=Gn(n,"shortDate");i=Fc(Qs(n,Nt.Short),[r,o]);break;case"medium":let s=Gn(n,"mediumTime"),a=Gn(n,"mediumDate");i=Fc(Qs(n,Nt.Medium),[s,a]);break;case"long":let l=Gn(n,"longTime"),d=Gn(n,"longDate");i=Fc(Qs(n,Nt.Long),[l,d]);break;case"full":let m=Gn(n,"fullTime"),y=Gn(n,"fullDate");i=Fc(Qs(n,Nt.Full),[m,y]);break}return i&&(Lc[e][t]=i),i}function Fc(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return t!=null&&i in t?t[i]:e})),n}function bn(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 UT(n,t){return bn(n,3).substring(0,t)}function Ke(n,t,e=0,i=!1,r=!1){return function(o,s){let a=zT(n,o);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return UT(a,t);let l=Ks(s,Wn.MinusSign);return bn(a,t,l,i,r)}}function zT(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 Y(2301,!1)}}function Oe(n,t,e=gt.Format,i=!1){return function(r,o){return GT(r,o,n,t,e,i)}}function GT(n,t,e,i,r,o){switch(e){case 2:return zb(t,r,i)[n.getMonth()];case 1:return Ub(t,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let d=qb(t),m=Zb(t,r,i),y=d.findIndex(w=>{if(Array.isArray(w)){let[D,R]=w,j=s>=D.hours&&a>=D.minutes,Z=s<R.hours||s===R.hours&&a<R.minutes;if(D.hours<R.hours){if(j&&Z)return!0}else if(j||Z)return!0}else if(w.hours===s&&w.minutes===a)return!0;return!1});if(y!==-1)return m[y]}return Hb(t,r,i)[s<12?0:1];case 3:return Gb(t,i)[n.getFullYear()<=0?0:1];default:let l=e;throw new Y(2302,!1)}}function Vc(n){return function(t,e,i){let r=-1*i,o=Ks(e,Wn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+bn(s,2,o)+bn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+bn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+bn(s,2,o)+":"+bn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+bn(s,2,o)+":"+bn(Math.abs(r%60),2,o);default:throw new Y(2310,!1)}}}var WT=0,jc=4;function qT(n){let t=$c(n,WT,1).getDay();return $c(n,0,1+(t<=jc?jc:jc+7)-t)}function Qb(n){let t=n.getDay(),e=t===0?-3:jc-t;return $c(n.getFullYear(),n.getMonth(),n.getDate()+e)}function _h(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=Qb(e),s=qT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return bn(r,n,Ks(i,Wn.MinusSign))}}function Bc(n,t=!1){return function(e,i){let o=Qb(e).getFullYear();return bn(o,n,Ks(i,Wn.MinusSign),t)}}var vh={};function ZT(n){if(vh[n])return vh[n];let t;switch(n){case"G":case"GG":case"GGG":t=Oe(3,Ie.Abbreviated);break;case"GGGG":t=Oe(3,Ie.Wide);break;case"GGGGG":t=Oe(3,Ie.Narrow);break;case"y":t=Ke(0,1,0,!1,!0);break;case"yy":t=Ke(0,2,0,!0,!0);break;case"yyy":t=Ke(0,3,0,!1,!0);break;case"yyyy":t=Ke(0,4,0,!1,!0);break;case"Y":t=Bc(1);break;case"YY":t=Bc(2,!0);break;case"YYY":t=Bc(3);break;case"YYYY":t=Bc(4);break;case"M":case"L":t=Ke(1,1,1);break;case"MM":case"LL":t=Ke(1,2,1);break;case"MMM":t=Oe(2,Ie.Abbreviated);break;case"MMMM":t=Oe(2,Ie.Wide);break;case"MMMMM":t=Oe(2,Ie.Narrow);break;case"LLL":t=Oe(2,Ie.Abbreviated,gt.Standalone);break;case"LLLL":t=Oe(2,Ie.Wide,gt.Standalone);break;case"LLLLL":t=Oe(2,Ie.Narrow,gt.Standalone);break;case"w":t=_h(1);break;case"ww":t=_h(2);break;case"W":t=_h(1,!0);break;case"d":t=Ke(2,1);break;case"dd":t=Ke(2,2);break;case"c":case"cc":t=Ke(7,1);break;case"ccc":t=Oe(1,Ie.Abbreviated,gt.Standalone);break;case"cccc":t=Oe(1,Ie.Wide,gt.Standalone);break;case"ccccc":t=Oe(1,Ie.Narrow,gt.Standalone);break;case"cccccc":t=Oe(1,Ie.Short,gt.Standalone);break;case"E":case"EE":case"EEE":t=Oe(1,Ie.Abbreviated);break;case"EEEE":t=Oe(1,Ie.Wide);break;case"EEEEE":t=Oe(1,Ie.Narrow);break;case"EEEEEE":t=Oe(1,Ie.Short);break;case"a":case"aa":case"aaa":t=Oe(0,Ie.Abbreviated);break;case"aaaa":t=Oe(0,Ie.Wide);break;case"aaaaa":t=Oe(0,Ie.Narrow);break;case"b":case"bb":case"bbb":t=Oe(0,Ie.Abbreviated,gt.Standalone,!0);break;case"bbbb":t=Oe(0,Ie.Wide,gt.Standalone,!0);break;case"bbbbb":t=Oe(0,Ie.Narrow,gt.Standalone,!0);break;case"B":case"BB":case"BBB":t=Oe(0,Ie.Abbreviated,gt.Format,!0);break;case"BBBB":t=Oe(0,Ie.Wide,gt.Format,!0);break;case"BBBBB":t=Oe(0,Ie.Narrow,gt.Format,!0);break;case"h":t=Ke(3,1,-12);break;case"hh":t=Ke(3,2,-12);break;case"H":t=Ke(3,1);break;case"HH":t=Ke(3,2);break;case"m":t=Ke(4,1);break;case"mm":t=Ke(4,2);break;case"s":t=Ke(5,1);break;case"ss":t=Ke(5,2);break;case"S":t=Ke(6,1);break;case"SS":t=Ke(6,2);break;case"SSS":t=Ke(6,3);break;case"Z":case"ZZ":case"ZZZ":t=Vc(0);break;case"ZZZZZ":t=Vc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Vc(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=Vc(2);break;default:return null}return vh[n]=t,t}function Kb(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function YT(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function QT(n,t,e){let r=n.getTimezoneOffset(),o=Kb(t,r);return YT(n,-1*(o-r))}function KT(n){if(jb(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 $c(r,o-1,s)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(BT))return XT(i)}let t=new Date(n);if(!jb(t))throw new Y(2311,!1);return t}function XT(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),d=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(t,s,a,l,d),t}function jb(n){return n instanceof Date&&!isNaN(n.valueOf())}var Ch=(()=>{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)(_n(bi))};static \u0275dir=yi({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ps]})}return n})();function Xb(n,t){return new Y(2100,!1)}var bh=class{createSubscription(t,e,i){return nt(()=>t.subscribe({next:e,error:i}))}dispose(t){nt(()=>t.unsubscribe())}},yh=class{createSubscription(t,e,i){return t.then(r=>e?.(r),r=>i?.(r)),{unsubscribe:()=>{e=null,i=null}}}dispose(t){t.unsubscribe()}},JT=new yh,eM=new bh,xh=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=I(pn);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(Vs(e))return JT;if(Sc(e))return eM;throw Xb(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)(_n(Nc,16))};static \u0275pipe=Dc({name:"async",type:n,pure:!1})}return n})();var tM="mediumDate",Jb=new te(""),ey=new te(""),Xs=(()=>{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??tM,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Yb(e,s,o||this.locale,a)}catch(s){throw Xb(n,s.message)}}static \u0275fac=function(i){return new(i||n)(_n(zs,16),_n(Jb,24),_n(ey,24))};static \u0275pipe=Dc({name:"date",type:n,pure:!0})}return n})();function Js(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 gr=class{};var wh="browser";function ty(n){return n===wh}var ea=class{_doc;constructor(t){this._doc=t}manager},Hc=(()=>{class n extends ea{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)(ge(ut))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),zc=new te(""),Mh=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(s=>{s.manager=this});let r=e.filter(s=>!(s instanceof Hc));this._plugins=r.slice().reverse();let o=e.find(s=>s instanceof Hc);o&&this._plugins.push(o)}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 Y(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(ge(zc),ge(Te))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),Eh="ng-app-id";function ny(n){for(let t of n)t.remove()}function iy(n,t){let e=t.createElement("style");return e.textContent=n,e}function rM(n,t,e,i){let r=n.head?.querySelectorAll(`style[${Eh}="${t}"],link[${Eh}="${t}"]`);if(r)for(let o of r)o.removeAttribute(Eh),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 Sh(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var kh=(()=>{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,rM(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let r of e)this.addUsage(r,this.inline,iy);i?.forEach(r=>this.addUsage(r,this.external,Sh))}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&&(ny(r.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ny(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(e,iy(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(e,Sh(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)(ge(ut),ge(lc),ge(dc,8),ge(ur))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),Dh={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"},Ih=/%COMP%/g;var oy="%COMP%",oM=`_nghost-${oy}`,sM=`_ngcontent-${oy}`,aM=!0,lM=new te("",{providedIn:"root",factory:()=>aM});function cM(n){return sM.replace(Ih,n)}function dM(n){return oM.replace(Ih,n)}function sy(n,t){return t.map(e=>e.replace(Ih,n))}var Ph=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,r,o,s,a,l=null,d=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=d,this.platformIsServer=!1,this.defaultRenderer=new ta(e,s,a,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof Uc?r.applyToHost(e):r instanceof na&&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,d=this.sharedStylesHost,m=this.removeStylesOnCompDestroy,y=this.platformIsServer,w=this.tracingService;switch(i.encapsulation){case Un.Emulated:o=new Uc(l,d,i,this.appId,m,s,a,y,w);break;case Un.ShadowDom:return new Th(l,d,e,i,s,a,this.nonce,y,w);default:o=new na(l,d,i,m,s,a,y,w);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)(ge(Mh),ge(kh),ge(lc),ge(lM),ge(ut),ge(Te),ge(dc),ge(vi,8))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),ta=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(Dh[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(ry(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(ry(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 Y(-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=Dh[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=Dh[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&(On.DashCase|On.Important)?t.style.setProperty(e,i,r&On.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&On.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=qs().getGlobalEventTarget(this.doc,t),!t))throw new Y(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 ry(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Th=class extends ta{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,i,r,o,s,a,l,d){super(t,o,s,l,d),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=r.styles;m=sy(r.id,m);for(let w of m){let D=document.createElement("style");a&&D.setAttribute("nonce",a),D.textContent=w,this.shadowRoot.appendChild(D)}let y=r.getExternalStyles?.();if(y)for(let w of y){let D=Sh(w,o);a&&D.setAttribute("nonce",a),this.shadowRoot.appendChild(D)}}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)}},na=class extends ta{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,r,o,s,a,l,d){super(t,o,s,a,l),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let m=i.styles;this.styles=d?sy(d,m):m,this.styleUrls=i.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&mi.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Uc=class extends na{contentAttr;hostAttr;constructor(t,e,i,r,o,s,a,l,d){let m=r+"-"+i.id;super(t,e,i,o,s,a,l,d,m),this.contentAttr=cM(m),this.hostAttr=dM(m)}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 Gc=class n extends Ws{supportsDOMEvents=!0;static makeCurrent(){mh(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=uM();return e==null?null:pM(e)}resetBaseElement(){ia=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Js(document.cookie,t)}},ia=null;function uM(){return ia=ia||document.head.querySelector("base"),ia?ia.getAttribute("href"):null}function pM(n){return new URL(n,document.baseURI).pathname}var fM=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),ay=["alt","control","meta","shift"],hM={"\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"},mM={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},ly=(()=>{class n extends ea{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(()=>qs().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."),ay.forEach(d=>{let m=i.indexOf(d);m>-1&&(i.splice(m,1),s+=d+".")}),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=hM[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"),ay.forEach(s=>{if(s!==r){let a=mM[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)(ge(ut))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})();function Oh(n,t,e){let i=G({rootComponent:n,platformRef:e?.platformRef},gM(t));return Lb(i)}function gM(n){return{appProviders:[...CM,...n?.providers??[]],platformProviders:yM}}function _M(){Gc.makeCurrent()}function vM(){return new Lt}function bM(){return ff(document),document}var yM=[{provide:ur,useValue:wh},{provide:cc,useValue:_M,multi:!0},{provide:ut,useFactory:bM}];var CM=[{provide:ss,useValue:"root"},{provide:Lt,useFactory:vM},{provide:zc,useClass:Hc,multi:!0,deps:[ut]},{provide:zc,useClass:ly,multi:!0,deps:[ut]},Ph,kh,Mh,{provide:Rn,useExisting:Ph},{provide:gr,useClass:fM},[]];var vr=class{},ra=class{},Ei=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();for(let[e,i]of t.headers.entries())this.headers.set(e,i),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)||[]).slice():[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(o===void 0)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=Array.isArray(o)?o:[o],a=this.headers.get(e);if(!a)return;a=a.filter(l=>s.indexOf(l)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}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 qc=class{encodeKey(t){return cy(t)}encodeValue(t){return cy(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function xM(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 wM=/%(\d[a-f0-9])/gi,EM={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function cy(n){return encodeURIComponent(n).replace(wM,(t,e)=>EM[e]??t)}function Wc(n){return`${n}`}var st=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new qc,t.fromString){if(t.fromObject)throw new Y(2805,!1);this.map=xM(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(Wc):[Wc(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(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,e]of this.cloneFrom.map.entries())this.map.set(t,e);this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=t.op==="a"?(this.map.get(t.param)||[]).slice():[];e.push(Wc(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=(this.map.get(t.param)||[]).slice(),r=i.indexOf(Wc(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 Zc=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 DM(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function dy(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function uy(n){return typeof Blob<"u"&&n instanceof Blob}function py(n){return typeof FormData<"u"&&n instanceof FormData}function SM(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var fy="Content-Type",hy="Accept",my="X-Request-URL",gy="text/plain",_y="application/json",TM=`${_y}, ${gy}, */*`,bo=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(DM(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 Y(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!==void 0&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new Ei,this.context??=new Zc,!this.params)this.params=new st,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"||dy(this.body)||uy(this.body)||py(this.body)||SM(this.body)?this.body:this.body instanceof st?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||py(this.body)?null:uy(this.body)?this.body.type||null:dy(this.body)?null:typeof this.body=="string"?gy:this.body instanceof st?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?_y: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,d=t.redirect||this.redirect,m=t.credentials||this.credentials,y=t.referrer??this.referrer,w=t.integrity||this.integrity,D=t.transferCache??this.transferCache,R=t.timeout??this.timeout,j=t.body!==void 0?t.body:this.body,Z=t.withCredentials??this.withCredentials,$=t.reportProgress??this.reportProgress,_e=t.headers||this.headers,Ut=t.params||this.params,Be=t.context??this.context;return t.setHeaders!==void 0&&(_e=Object.keys(t.setHeaders).reduce((dt,rt)=>dt.set(rt,t.setHeaders[rt]),_e)),t.setParams&&(Ut=Object.keys(t.setParams).reduce((dt,rt)=>dt.set(rt,t.setParams[rt]),Ut)),new n(e,i,j,{params:Ut,headers:_e,context:Be,reportProgress:$,responseType:r,withCredentials:Z,transferCache:D,keepalive:o,cache:a,priority:s,timeout:R,mode:l,redirect:d,credentials:m,referrer:y,integrity:w})}},_r=(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})(_r||{}),Co=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new Ei,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}},Yc=class n extends Co{constructor(t={}){super(t)}type=_r.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})}},oa=class n extends Co{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=_r.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})}},yo=class extends Co{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}},MM=200,kM=204;function Rh(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 xo=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof bo)o=e;else{let l;r.headers instanceof Ei?l=r.headers:l=new Ei(r.headers);let d;r.params&&(r.params instanceof st?d=r.params:d=new st({fromObject:r.params})),o=new bo(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:d,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=we(o).pipe(mu(l=>this.handler.handle(l)));if(e instanceof bo||r.observe==="events")return s;let a=s.pipe(Ko(l=>l instanceof oa));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Ge(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Y(2806,!1);return l.body}));case"blob":return a.pipe(Ge(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Y(2807,!1);return l.body}));case"text":return a.pipe(Ge(l=>{if(l.body!==null&&typeof l.body!="string")throw new Y(2808,!1);return l.body}));default:return a.pipe(Ge(l=>l.body))}case"response":return a;default:throw new Y(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 st().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,Rh(r,i))}post(e,i,r={}){return this.request("POST",e,Rh(r,i))}put(e,i,r={}){return this.request("PUT",e,Rh(r,i))}static \u0275fac=function(i){return new(i||n)(ge(vr))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})();var IM=new te("");function PM(n,t){return t(n)}function OM(n,t,e){return(i,r)=>Qr(e,()=>t(i,o=>n(o,r)))}var Ah=new te(""),vy=new te(""),by=new te("",{providedIn:"root",factory:()=>!0});var Qc=(()=>{class n extends vr{backend;injector;chain=null;pendingTasks=I(io);contributeToStability=I(by);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=this.injector.get(vr,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(vy,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get(Ah),...o]));this.chain=s.reduceRight((a,l)=>OM(a,l,this.injector),PM)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(oi(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(ge(ra),ge(Pt))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})();var RM=/^\)\]\}',?\n/,NM=RegExp(`^${my}:`,"m");function AM(n){return"responseURL"in n&&n.responseURL?n.responseURL:NM.test(n.getAllResponseHeaders())?n.getResponseHeader(my):null}var Nh=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new Y(-2800,!1);let i=this.xhrFactory;return we(null).pipe(yt(()=>new de(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((Z,$)=>s.setRequestHeader(Z,$.join(","))),e.headers.has(hy)||s.setRequestHeader(hy,TM),!e.headers.has(fy)){let Z=e.detectContentTypeHeader();Z!==null&&s.setRequestHeader(fy,Z)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let Z=e.responseType.toLowerCase();s.responseType=Z!=="json"?Z:"text"}let a=e.serializeBody(),l=null,d=()=>{if(l!==null)return l;let Z=s.statusText||"OK",$=new Ei(s.getAllResponseHeaders()),_e=AM(s)||e.url;return l=new Yc({headers:$,status:s.status,statusText:Z,url:_e}),l},m=()=>{let{headers:Z,status:$,statusText:_e,url:Ut}=d(),Be=null;$!==kM&&(Be=typeof s.response>"u"?s.responseText:s.response),$===0&&($=Be?MM:0);let dt=$>=200&&$<300;if(e.responseType==="json"&&typeof Be=="string"){let rt=Be;Be=Be.replace(RM,"");try{Be=Be!==""?JSON.parse(Be):null}catch(zt){Be=rt,dt&&(dt=!1,Be={error:zt,text:Be})}}dt?(o.next(new oa({body:Be,headers:Z,status:$,statusText:_e,url:Ut||void 0})),o.complete()):o.error(new yo({error:Be,headers:Z,status:$,statusText:_e,url:Ut||void 0}))},y=Z=>{let{url:$}=d(),_e=new yo({error:Z,status:s.status||0,statusText:s.statusText||"Unknown Error",url:$||void 0});o.error(_e)},w=y;e.timeout&&(w=Z=>{let{url:$}=d(),_e=new yo({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:$||void 0});o.error(_e)});let D=!1,R=Z=>{D||(o.next(d()),D=!0);let $={type:_r.DownloadProgress,loaded:Z.loaded};Z.lengthComputable&&($.total=Z.total),e.responseType==="text"&&s.responseText&&($.partialText=s.responseText),o.next($)},j=Z=>{let $={type:_r.UploadProgress,loaded:Z.loaded};Z.lengthComputable&&($.total=Z.total),o.next($)};return s.addEventListener("load",m),s.addEventListener("error",y),s.addEventListener("timeout",w),s.addEventListener("abort",y),e.reportProgress&&(s.addEventListener("progress",R),a!==null&&s.upload&&s.upload.addEventListener("progress",j)),s.send(a),o.next({type:_r.Sent}),()=>{s.removeEventListener("error",y),s.removeEventListener("abort",y),s.removeEventListener("load",m),s.removeEventListener("timeout",w),e.reportProgress&&(s.removeEventListener("progress",R),a!==null&&s.upload&&s.upload.removeEventListener("progress",j)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(ge(gr))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),yy=new te(""),LM="XSRF-TOKEN",FM=new te("",{providedIn:"root",factory:()=>LM}),VM="X-XSRF-TOKEN",BM=new te("",{providedIn:"root",factory:()=>VM}),sa=class{},jM=(()=>{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=Js(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(ge(ut),ge(FM))};static \u0275prov=ae({token:n,factory:n.\u0275fac})}return n})(),$M=/^(?:https?:)?\/\//i;function HM(n,t){if(!I(yy)||n.method==="GET"||n.method==="HEAD"||$M.test(n.url))return t(n);let e=I(sa).getToken(),i=I(BM);return e!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,e)})),t(n)}var Lh=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Lh||{});function UM(n,t){return{\u0275kind:n,\u0275providers:t}}function Fh(...n){let t=[xo,Nh,Qc,{provide:vr,useExisting:Qc},{provide:ra,useFactory:()=>I(IM,{optional:!0})??I(Nh)},{provide:Ah,useValue:HM,multi:!0},{provide:yy,useValue:!0},{provide:sa,useClass:jM}];for(let e of n)t.push(...e.\u0275providers);return os(t)}function Vh(n){return UM(Lh.Interceptors,n.map(t=>({provide:Ah,useValue:t,multi:!0})))}var Cy="guitoToken";function xy(){return new URLSearchParams(window.location.search).get(Cy)??""}var wy=(n,t)=>{let e=xy();return!e||!n.url.startsWith("/api")?t(n):t(n.clone({setHeaders:{"X-Guito-Token":e}}))};function Ey(n){let t=new URL(n,window.location.origin),e=xy();return e&&t.searchParams.set(Cy,e),t.toString()}var Dy={providers:[rh({eventCoalescing:!0}),Fh(Vh([wy]))]};function zM(n,t){if(n&1){let e=P();b(0,"button",11),B("click",function(){_(e);let r=u(2);return v(r.retry.emit())}),p(1),C()}if(n&2){let e=u(2);W("disabled",e.busy()),c(),O(e.retryLabel())}}function GM(n,t){if(n&1){let e=P();b(0,"div",1),B("animationend",function(r){_(e);let o=u();return v(o.finishDismiss(r))}),F(),b(1,"svg",2),J(2,"circle",3)(3,"path",4)(4,"circle",5),C(),ue(),b(5,"div",6)(6,"p"),p(7),C(),S(8,zM,2,2,"button",7),C(),b(9,"button",8),B("click",function(){_(e);let r=u();return v(r.dismiss())}),F(),b(10,"svg",9),J(11,"path",10),C()()()}if(n&2){let e=u();me("closing",e.closing()),c(7),O(e.message()),c(),T(e.retryLabel()?8:-1)}}var at=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=H();dismissed=x(!1);closing=x(!1);constructor(){Ce(()=>{this.message(),this.busy(),this.closing.set(!1),this.dismissed.set(!1)})}dismiss(){if(typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches){this.dismissed.set(!0);return}this.closing.set(!0)}finishDismiss(t){t.target!==t.currentTarget||!this.closing()||this.dismissed.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-error-banner"]],inputs:{message:[1,"message"],retryLabel:[1,"retryLabel"],busy:[1,"busy"]},outputs:{retry:"retry"},decls:1,vars:1,consts:[["role","alert",1,"error-banner",3,"closing"],["role","alert",1,"error-banner",3,"animationend"],["viewBox","0 0 20 20","fill","none","aria-hidden","true",1,"error-icon"],["cx","10","cy","10","r","7.5"],["d","M10 6v4.5","stroke-linecap","round"],["cx","10","cy","13.5","r",".8","fill","currentColor","stroke","none"],[1,"error-content"],["type","button",1,"retry",3,"disabled"],["type","button","aria-label","Dismiss error","title","Dismiss error",1,"close",3,"click"],["viewBox","0 0 16 16","fill","none","aria-hidden","true"],["d","m4 4 8 8M12 4l-8 8"],["type","button",1,"retry",3,"click","disabled"]],template:function(e,i){e&1&&S(0,GM,12,4,"div",0),e&2&&T(i.message()&&!i.dismissed()?0:-1)},styles:["[_nghost-%COMP%]{display:block;flex:none;min-width:0}.error-banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin:8px 12px;padding:10px 12px;border:1px solid #683d38;border-left:3px solid #f48771;border-radius:6px;background:color-mix(in srgb,var(--bg-alt) 88%,#f48771);color:var(--text-bright);font-size:12px;line-height:1.5;animation:_ngcontent-%COMP%_error-banner-enter .12s ease-out}.error-banner.closing[_ngcontent-%COMP%]{pointer-events:none;animation:_ngcontent-%COMP%_error-banner-leave .1s ease-in forwards}.error-icon[_ngcontent-%COMP%]{width:20px;height:20px;flex:none;color:#f48771;stroke:currentColor;stroke-width:1.5}.error-content[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}p[_ngcontent-%COMP%]{flex:1 1 220px;min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow-y:auto}button[_ngcontent-%COMP%]{font:inherit;cursor:pointer;border-radius:4px;transition:background .12s}.retry[_ngcontent-%COMP%]{flex:none;padding:3px 10px;border:1px solid #89554c;background:transparent;color:#ffc0b2}.retry[_ngcontent-%COMP%]:hover:not(:disabled){background:#f4877120}.retry[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.close[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:26px;height:26px;margin:-3px -5px -3px 0;border:0;background:transparent;color:#e0b1a7}.close[_ngcontent-%COMP%]:hover{background:#f4877126;color:#fff}.close[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes _ngcontent-%COMP%_error-banner-enter{0%{opacity:0}}@keyframes _ngcontent-%COMP%_error-banner-leave{to{opacity:0}}@media(prefers-reduced-motion:reduce){.error-banner[_ngcontent-%COMP%], .error-banner.closing[_ngcontent-%COMP%]{animation:none}button[_ngcontent-%COMP%]{transition:none}}"],changeDetection:0})};var Kc=class n{http=I(xo);cache=new Map;empty=we(null);get(t){let e=t.trim().toLowerCase();if(!e)return this.empty;let i=this.cache.get(e);if(i&&i.expires>Date.now())return i.image;this.cache.size>=500&&this.cache.delete(this.cache.keys().next().value);let r=this.http.get("/api/avatar",{params:{email:e},responseType:"blob"}).pipe(yt(o=>o.size?new de(s=>{let a=new FileReader;return a.onload=()=>{s.next(String(a.result)),s.complete()},a.onerror=()=>s.error(a.error),a.readAsDataURL(o),()=>{a.readyState===FileReader.LOADING&&a.abort()}}):this.empty),ot(()=>this.empty),Wr({bufferSize:1,refCount:!1}));return this.cache.set(e,{expires:Date.now()+36e5,image:r}),r}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function WM(n,t){n&1&&J(0,"img",0),n&2&&W("src",t,pr)}function qM(n,t){if(n&1&&(b(0,"span",1),p(1),C()),n&2){let e=u();c(),O(e.initials())}}var An=class n{name=N("");email=N("");avatars=I(Kc);initials(){return this.name().trim().split(/\s+/).slice(0,2).map(t=>t[0]??"").join("").toUpperCase()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-author-avatar"]],inputs:{name:[1,"name"],email:[1,"email"]},decls:3,vars:3,consts:[["alt","","width","24","height","24",3,"src"],["aria-hidden","true"]],template:function(e,i){if(e&1&&(S(0,WM,1,1,"img",0),wi(1,"async"),js(2,qM,2,1,"span",1)),e&2){let r;T((r=nh(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[xh],styles:["[_nghost-%COMP%]{display:inline-flex;width:24px;height:24px;flex:0 0 24px;vertical-align:middle;border-radius:50%;overflow:hidden;background:#36516b}img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}span[_ngcontent-%COMP%]{margin:auto;color:#fff;font-size:10px;line-height:24px}"],changeDetection:0})};function ZM(n,t){if(n&1&&(b(0,"mark",1),p(1),C()),n&2){let e=u(2).$implicit;c(),O(e.text)}}function YM(n,t){if(n&1&&p(0),n&2){let e=u(2).$implicit;q(" ",e.text," ")}}function QM(n,t){if(n&1){let e=P();b(0,"a",2),B("click",function(r){return _(e),v(r.stopPropagation())}),S(1,ZM,2,1,"mark",1)(2,YM,1,1),C()}if(n&2){let e=u().$implicit;W("href",e.href,pr),c(),T(e.match?1:2)}}function KM(n,t){if(n&1&&(b(0,"mark",1),p(1),C()),n&2){let e=u().$implicit;c(),O(e.text)}}function XM(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;q(" ",e.text," ")}}function JM(n,t){if(n&1&&S(0,QM,3,2,"a",0)(1,KM,2,1,"mark",1)(2,XM,1,1),n&2){let e=t.$implicit;T(e.href?0:e.match?1:2)}}var wo=class n{text=N("");search=N("");linking=N(null);segments=L(()=>{let t=this.text(),e=this.linking(),i=[];if(!e)i.push({text:t});else try{let o=new RegExp(e.regex,"g"),s=0;for(let a of t.matchAll(o)){let l=a.index??0;l>s&&i.push({text:t.slice(s,l)});let d=e.url.replace(/\$(\d+)/g,(m,y)=>a[Number(y)]??"");if(i.push(G({text:a[0]},/^https?:\/\//i.test(d)?{href:d}:{})),s=l+a[0].length,a[0].length===0)break}s<t.length&&i.push({text:t.slice(s)})}catch{i.push({text:t})}let r=this.search().trim().toLowerCase();return r?i.flatMap(o=>{let s=[],a=o.text.toLowerCase(),l=0;for(;l<o.text.length;){let d=a.indexOf(r,l);if(d===-1){s.push(oe(G({},o),{text:o.text.slice(l),match:!1}));break}d>l&&s.push(oe(G({},o),{text:o.text.slice(l,d),match:!1})),s.push(oe(G({},o),{text:o.text.slice(d,d+r.length),match:!0})),l=d+r.length}return s}):i.map(o=>oe(G({},o),{match:!1}))});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-issue-text"]],inputs:{text:[1,"text"],search:[1,"search"],linking:[1,"linking"]},decls:2,vars:0,consts:[["target","_blank","rel","noopener noreferrer",3,"href"],[1,"hl"],["target","_blank","rel","noopener noreferrer",3,"click","href"]],template:function(e,i){e&1&&Q(0,JM,3,1,null,null,Vt),e&2&&K(i.segments())},styles:["[_nghost-%COMP%]{display:contents}a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}.hl[_ngcontent-%COMP%]{padding:0;color:inherit;background:#eac22c59}"],changeDetection:0})};var yn="__working__";var lt=class n{http=I(xo);base="/api";mutating=x(!1);mutate(t){return hu(()=>this.mutating()?pu(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),t().pipe(oi(()=>this.mutating.set(!1)))))}getRepositoryState(){return this.http.get(`${this.base}/repository-state`)}getRepoInfo(){return this.http.get(`${this.base}/repo`)}getCommits(t,e=0){let i=new st;return t!==void 0&&(i=i.set("limit",String(t))),e>0&&(i=i.set("skip",String(e))),this.http.get(`${this.base}/commits`,{params:i})}searchCommits(t,e=!1){let i=new st().set("query",t);return e&&(i=i.set("caseSensitive","1")),this.http.get(`${this.base}/commits/search`,{params:i})}getCommitDetail(t){return this.http.post(`${this.base}/commit/detail`,{hash:t})}getAllBranches(){return this.http.get(`${this.base}/branches/all`)}getCommitDiff(t){return this.http.post(`${this.base}/commit/diff`,{hash:t})}getWorkingChanges(){return this.http.get(`${this.base}/working-changes`)}getConflict(t){return this.http.get(`${this.base}/conflict`,{params:new st().set("path",t)})}resolveConflict(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/conflict/resolve`,{path:t,resolution:e,content:i}))}getFileContent(t,e){return this.http.post(`${this.base}/file-content`,{path:t,ref:e})}fetch(t=!1){let e=t?new st().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:e}))}pull(t=!1){return this.mutate(()=>this.http.post(`${this.base}/pull`,{rebase:t}))}push(t=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:t}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkout(t){return this.mutate(()=>this.http.post(`${this.base}/checkout`,{ref:t}))}revert(t){return this.mutate(()=>this.http.post(`${this.base}/revert`,{commit:t}))}cherryPick(t){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,{commit:t}))}dropCommit(t){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:t}))}resetToCommit(t,e="hard"){return this.mutate(()=>this.http.post(`${this.base}/reset-commit`,{commit:t,mode:e}))}commit(t,e){return this.mutate(()=>this.http.post(`${this.base}/commit`,{message:t,description:e}))}stage(t){return this.mutate(()=>this.http.post(`${this.base}/stage`,{files:t}))}unstage(t){return this.mutate(()=>this.http.post(`${this.base}/unstage`,{files:t}))}discard(t,e){return this.mutate(()=>this.http.post(`${this.base}/discard`,{files:t,mode:e}))}resetWorking(){return this.mutate(()=>this.http.post(`${this.base}/reset`,{}))}cleanUntracked(){return this.mutate(()=>this.http.post(`${this.base}/clean`,{}))}stashSave(t,e="all"){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,{message:t,scope:e}))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(Ge(t=>(t.all??[]).map((e,i)=>({index:i,hash:e.hash,message:e.message,date:e.date,author_name:e.author_name,author_email:e.author_email}))))}stashApply(t){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:t}))}stashPop(t){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:t}))}stashDrop(t){return this.mutate(()=>this.http.post(`${this.base}/stash/drop`,{index:t}))}getWorktrees(){return this.http.get(`${this.base}/worktrees`)}createWorktree(t,e){return this.mutate(()=>this.http.post(`${this.base}/worktrees`,{path:t,branch:e}))}removeWorktree(t){return this.mutate(()=>this.http.post(`${this.base}/worktrees/remove`,{path:t}))}getTags(){return this.http.get(`${this.base}/tags`)}createBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,{name:t,startPoint:e}))}deleteBranch(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,{name:t,force:e}))}deleteRemoteBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:t,branch:e}))}renameBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,{oldName:t,newName:e}))}merge(t){return this.mutate(()=>this.http.post(`${this.base}/merge`,{branch:t}))}rebase(t){return this.mutate(()=>this.http.post(`${this.base}/rebase`,{branch:t}))}createTag(t,e){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,{name:t,commit:e}))}deleteTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,{name:t}))}pushTag(t,e="origin"){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,{name:t,remote:e}))}getSettings(){return this.http.get(`${this.base}/settings`)}saveSettings(t){return this.http.post(`${this.base}/settings`,t)}getRemotes(){return this.http.get(`${this.base}/remotes`)}saveIdentity(t){return this.http.post(`${this.base}/identity`,t)}removeIdentity(){return this.http.delete(`${this.base}/identity`)}saveRemote(t){return this.http.post(`${this.base}/remotes`,t)}removeRemote(t){return this.http.delete(`${this.base}/remotes/${encodeURIComponent(t)}`)}createPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequest`,t))}searchReviewers(t){return this.http.get(`${this.base}/azure-devops/reviewers`,{params:new st().set("query",t)}).pipe(Ge(e=>e.reviewers))}searchWorkItems(t){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new st().set("query",t)}).pipe(Ge(e=>e.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(Ge(t=>t.tags.map(e=>({name:e}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(t="active"){let e=new st().set("status",t);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:e}).pipe(Ge(i=>i.pullRequests))}getPrDetail(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}`)}updatePr(t,e){return this.mutate(()=>this.http.patch(`${this.base}/azure-devops/pullrequests/${t}`,e))}votePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/vote`,{vote:e}))}updatePrReviewer(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/reviewers`,e))}setPrAutoComplete(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/autocomplete`,G({enabled:e},i)))}completePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/complete`,e??{}))}getPrThreads(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/threads`).pipe(Ge(e=>e.threads))}addPrComment(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads`,e))}setPrThreadStatus(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads/${e}/status`,{status:i}))}getPrChanges(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/changes`).pipe(Ge(e=>e.files))}getPrFileDiff(t,e){let i=new st().set("path",e.path).set("oldPath",e.oldPath||"").set("changeType",e.changeType);return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/file-diff`,{params:i})}getPrWorkItems(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/workitems`).pipe(Ge(e=>e.workItems))}addPrTag(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/labels`,{name:e}))}removePrTag(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/labels/${encodeURIComponent(e)}`))}linkPrWorkItem(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/workitems`,{id:e}))}unlinkPrWorkItem(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/workitems/${e}`))}getPrChecks(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/checks`)}requeuePrCheck(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/checks/${encodeURIComponent(e)}/requeue`,{}))}abandonPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/abandon`,{}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})};var nn=class n{git=I(lt);inVsCode=typeof window<"u"&&window.parent!==window;diffViewer=x("vscode");settingsVersion=x(0);folderRequest=0;folderResolvers=new Map;canPickFolder=this.inVsCode;constructor(){this.inVsCode&&(window.addEventListener("message",t=>{let e=t.data;if(e?.type==="guito/config"&&((e.diffViewer==="guito"||e.diffViewer==="vscode")&&this.diffViewer.set(e.diffViewer),this.settingsVersion.update(i=>i+1)),e?.type==="guito/folderSelected"&&typeof e.requestId=="number"){let i=this.folderResolvers.get(e.requestId);i&&(this.folderResolvers.delete(e.requestId),i(typeof e.path=="string"&&e.path?e.path:null))}}),this.git.getSettings().subscribe({next:t=>{t.diffViewer&&this.diffViewer.set(t.diffViewer)},error:()=>{}}))}pickFolder(){if(!this.inVsCode)return Promise.resolve(null);let t=++this.folderRequest;return window.parent.postMessage({type:"guito/pickFolder",requestId:t},"*"),new Promise(e=>this.folderResolvers.set(t,e))}openSettings(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSettings"},"*"),!0):!1}openExternal(t){if(this.inVsCode){window.parent.postMessage({type:"guito/openExternal",url:t},"*");return}window.open(t,"_blank","noopener")}canOpenFile(){return this.inVsCode}canOpenRepository(){return this.inVsCode}switchRepository(t){return this.requestRepository(t,"switch")}openRepository(t){return this.requestRepository(t,"tab")}openRepositoryWindow(t){return this.requestRepository(t,"window")}requestRepository(t,e){return this.inVsCode?(window.parent.postMessage({type:"guito/openRepository",path:t,disposition:e},"*"),!0):!1}openFile(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openFile",path:t},"*"),!0):!1}openMergeConflict(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openMergeConflict",path:t},"*"),!0):!1}openDiff(t,e,i,r=!1){if(!this.inVsCode||this.diffViewer()!=="vscode"||t.status==="binary")return!1;let o=!r&&t.status==="added"&&!t.oldPath?"EMPTY":e;return window.parent.postMessage({type:"guito/openDiff",path:t.path,oldPath:t.oldPath,status:t.status,originalRef:o,modifiedRef:i,exactOriginal:r},"*"),!0}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})};var ek=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase()),Sy=n=>n.split("/").pop()??n,tk=(n,t)=>Sy(n.path).toLowerCase().localeCompare(Sy(t.path).toLowerCase());function Eo(n,t){let e={name:"",dirs:new Map,files:[],additions:0,deletions:0};for(let o of n){let s=o.path.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let d=a.dirs.get(l);d||(d={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,d)),d.additions+=o.additions??0,d.deletions+=o.deletions??0,a=d}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(ek)){let d=s?`${s}/${l.name}`:l.name,m=t.has(d);i.push({kind:"dir",path:d,name:l.name,depth:a,collapsed:m,additions:l.additions,deletions:l.deletions}),m||r(l,d,a+1)}for(let l of[...o.files].sort(tk))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(e,"",0),i}var Do=class n{loading=null;load(){return this.loading||(this.loading=new Promise((t,e)=>{let i=window;if(i.monaco){t(i.monaco);return}let r=document.createElement("script");r.src="vs/loader.js",r.async=!0,r.onload=()=>{let o=i.require;if(!o){e(new Error("Monaco AMD loader not found."));return}o.config({paths:{vs:"vs"}}),o(["vs/editor/editor.main"],()=>{this.applyTheme(i.monaco),t(i.monaco)})},r.onerror=()=>{this.loading=null,e(new Error("Failed to load the Monaco editor."))},document.head.appendChild(r)})),this.loading}applyTheme(t){t.editor.defineTheme("guito",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1e1e1e","editor.foreground":"#cccccc","editorGutter.background":"#1e1e1e","editorLineNumber.foreground":"#5a5a5a","editorLineNumber.activeForeground":"#cccccc","diffEditor.insertedTextBackground":"#89d18526","diffEditor.removedTextBackground":"#f4877126","diffEditor.insertedLineBackground":"#89d1851a","diffEditor.removedLineBackground":"#f487711a","scrollbarSlider.background":"#4a4a4a80","scrollbarSlider.hoverBackground":"#5a5a5a99","editorWidget.background":"#232323","editorWidget.border":"#3c3c3c","editorSuggestWidget.background":"#232323"}})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})};var nk=["host"];function ik(n,t){if(n&1&&(f(0,"span",6),p(1),h()),n&2){let e=u();c(),q("+",e.file().additions)}}function rk(n,t){if(n&1&&(f(0,"span",7),p(1),h()),n&2){let e=u();c(),q("\u2212",e.file().deletions)}}function ok(n,t){n&1&&(F(),z(0,"line",11))}function sk(n,t){n&1&&(F(),z(0,"line",12))}function ak(n,t){n&1&&(f(0,"div",18),p(1,"Loading diff\u2026"),h())}function lk(n,t){if(n&1&&z(0,"app-error-banner",19),n&2){let e=u();k("message",e.error())}}function ck(n,t){n&1&&(f(0,"div",18),p(1,"Binary file not shown."),h())}var dk=0,So=class n{git=I(lt);monacoService=I(Do);file=N.required();originalRef=N.required();modifiedRef=N.required();exactOriginal=N(!1);closed=H();host=en.required("host");loading=x(!0);error=x("");binary=x(!1);sideBySide=x(!0);destroyed=!1;editor=null;models=[];onEscape(){this.closed.emit()}ngAfterViewInit(){return Dn(this,null,function*(){this.loading.set(!0),this.error.set(""),this.binary.set(!1);try{let t=yield this.monacoService.load();if(this.destroyed)return;let e=this.file(),i=!this.exactOriginal()&&e.status==="added"&&!e.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([sl(this.git.getFileContent(this.exactOriginal()?e.path:e.oldPath||e.path,i)),sl(this.git.getFileContent(e.path,this.modifiedRef()))]);if(this.destroyed)return;if(r.binary||o.binary){this.binary.set(!0),this.loading.set(!1);return}let s=++dk,a=t.editor.createModel(r.content,void 0,t.Uri.parse(`inmemory://diff/${s}/original/${e.oldPath||e.path}`)),l=t.editor.createModel(o.content,void 0,t.Uri.parse(`inmemory://diff/${s}/modified/${e.path}`));this.models=[a,l],this.editor=t.editor.createDiffEditor(this.host().nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:this.sideBySide(),ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:a,modified:l}),this.loading.set(!1)}catch{this.error.set("Failed to load the diff."),this.loading.set(!1)}})}ngOnDestroy(){this.destroyed=!0,this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(t=>!t),this.editor?.updateOptions({renderSideBySide:this.sideBySide()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(e,i){e&1&&jt(i.host,nk,5),e&2&&vn()},hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"],exactOriginal:[1,"exactOriginal"]},outputs:{closed:"closed"},decls:25,vars:10,consts:[["host",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"dialog-head"],[1,"path",3,"title"],[1,"counts"],[1,"additions"],[1,"deletions"],["type","button","title","Toggle diff layout",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x","3","y","4","width","18","height","16","rx","2"],["x1","12","y1","4","x2","12","y2","20"],["x1","3","y1","12","x2","21","y2","12"],["type","button","title","Close","aria-label","Close diff",1,"icon-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"dialog-body"],[1,"editor-host"],[1,"state"],[3,"message"]],template:function(e,i){if(e&1){let r=P();f(0,"div",1),E("click",function(){return _(r),v(i.closed.emit())}),h(),f(1,"div",2)(2,"header",3)(3,"span"),p(4),h(),f(5,"span",4),p(6),h(),f(7,"span",5),S(8,ik,2,1,"span",6),S(9,rk,2,1,"span",7),h(),f(10,"button",8),E("click",function(){return _(r),v(i.toggleLayout())}),F(),f(11,"svg",9),z(12,"rect",10),S(13,ok,1,0,":svg:line",11)(14,sk,1,0,":svg:line",12),h()(),ue(),f(15,"button",13),E("click",function(){return _(r),v(i.closed.emit())}),F(),f(16,"svg",9),z(17,"line",14)(18,"line",15),h()()(),ue(),f(19,"div",16),z(20,"div",17,0),S(22,ak,2,0,"div",18)(23,lk,1,1,"app-error-banner",19)(24,ck,2,0,"div",18),h()()}e&2&&(c(3),ft("status status-"+i.file().status),c(),O(i.file().status),c(),k("title",i.file().path),c(),O(i.file().path),c(2),T(i.file().additions>0?8:-1),c(),T(i.file().deletions>0?9:-1),c(),le("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),c(3),T(i.sideBySide()?13:14),c(9),T(i.loading()?22:i.error()?23:i.binary()?24:-1))},dependencies:[at],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0000008c;z-index:200}.dialog[_ngcontent-%COMP%]{position:fixed;top:4vh;left:4vw;right:4vw;bottom:4vh;display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden;z-index:201}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:none;height:42px;padding:0 10px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.status[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.counts[_ngcontent-%COMP%]{flex:none;display:flex;gap:6px;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.icon-btn[_ngcontent-%COMP%]{flex:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dialog-body[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.editor-host[_ngcontent-%COMP%]{position:absolute;inset:0}.state[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-dim);font-size:13px}"],changeDetection:0})};var uk=(n,t)=>t.path;function pk(n,t){if(n&1&&(f(0,"span",16),p(1,"\u2022"),h(),f(2,"span"),p(3),wi(4,"date"),h(),f(5,"span",16),p(6,"\u2022"),h(),f(7,"code",17),p(8),h()),n&2){let e=u();c(3),O(vo(4,2,e.commit().date,"d MMM y HH:mm")),c(5),O(e.commit().hash.slice(0,8))}}function fk(n,t){if(n&1&&(f(0,"pre",11),z(1,"app-issue-text",7),h()),n&2){let e=u();c(),k("text",e.body())("linking",e.issueLinking())}}function hk(n,t){n&1&&(f(0,"div",13),p(1,"Loading changes\u2026"),h())}function mk(n,t){if(n&1&&z(0,"app-error-banner",14),n&2){let e=u();k("message",e.error())}}function gk(n,t){n&1&&(f(0,"div",13),p(1,"No changes."),h())}function _k(n,t){n&1&&(F(),z(0,"polyline",23))}function vk(n,t){n&1&&(F(),z(0,"polyline",24))}function bk(n,t){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let e=u(2).$implicit;c(),q("+",e.additions)}}function yk(n,t){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let e=u(2).$implicit;c(),q("\u2212",e.deletions)}}function Ck(n,t){if(n&1){let e=P();f(0,"button",21),E("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.toggleDir(r.path))}),F(),f(1,"svg",22),S(2,_k,1,0,":svg:polyline",23)(3,vk,1,0,":svg:polyline",24),h(),ue(),f(4,"span",25),p(5),h(),f(6,"span",26),S(7,bk,2,1,"span",27),S(8,yk,2,1,"span",28),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),k("title",e.path),le("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(2),k("title",e.path),c(),O(e.name),c(2),T(e.additions>0?7:-1),c(),T(e.deletions>0?8:-1)}}function xk(n,t){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let e=u(2).$implicit;c(),q("+",e.file.additions)}}function wk(n,t){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let e=u(2).$implicit;c(),q("\u2212",e.file.deletions)}}function Ek(n,t){if(n&1){let e=P();f(0,"button",29),E("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.openFile(r.file))}),f(1,"span"),p(2),h(),f(3,"span",30),p(4),h(),f(5,"span",26),S(6,xk,2,1,"span",27),S(7,wk,2,1,"span",28),h(),F(),f(8,"svg",31),z(9,"polyline",32),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),c(),ft("file-status status-"+e.file.status),c(),O(e.file.status),c(),k("title",e.file.path),c(),O(e.name),c(2),T(e.file.additions>0?6:-1),c(),T(e.file.deletions>0?7:-1)}}function Dk(n,t){if(n&1&&S(0,Ck,9,9,"button",19)(1,Ek,10,9,"button",20),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function Sk(n,t){if(n&1&&(f(0,"div",18),Q(1,Dk,2,1,null,null,uk),h()),n&2){let e=u(2);c(),K(e.rows())}}function Tk(n,t){n&1&&S(0,gk,2,0,"div",13)(1,Sk,3,0,"div",18),n&2&&T(t.files.length===0?0:1)}function Mk(n,t){if(n&1){let e=P();f(0,"app-diff-dialog",33),E("closed",function(){_(e);let r=u();return v(r.dialogFile.set(null))}),h()}if(n&2){let e=u();k("file",t)("originalRef",e.originalRef())("modifiedRef",e.modifiedRef())}}var Xc=class n{git=I(lt);vscode=I(nn);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=H();diff=x(null);loading=x(!1);error=x("");dialogFile=x(null);collapsed=x(new Set);rows=L(()=>{let t=this.diff()?.files??[];return this.fileListView()!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):Eo(t,this.collapsed())});body=x("");bodySub=null;workingHash=yn;isWorking=L(()=>this.commit().hash===this.workingHash);originalRef=L(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=L(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){Ce(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe()}openFile(t){this.vscode.openDiff(t,this.originalRef(),this.modifiedRef())||this.dialogFile.set(t)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}loadBody(t){if(this.bodySub?.unsubscribe(),this.body.set(""),t.body!==void 0){this.body.set(t.body);return}this.bodySub=this.git.getCommitDetail(t.hash).subscribe({next:e=>this.body.set(e.body??""),error:()=>this.body.set("")})}loadDiff(t){if(this.loading.set(!0),this.error.set(""),this.diff.set(null),this.dialogFile.set(null),t===yn){this.git.getWorkingChanges().subscribe({next:e=>{this.loading.set(!1),this.diff.set({hash:yn,files:e.files})},error:()=>{this.loading.set(!1),this.error.set("Failed to load the working changes.")}});return}this.git.getCommitDiff(t).subscribe({next:e=>{this.loading.set(!1),this.diff.set(e)},error:()=>{this.loading.set(!1),this.error.set("Failed to load the commit diff.")}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-commit-detail"]],inputs:{commit:[1,"commit"],issueLinking:[1,"issueLinking"],fileListView:[1,"fileListView"]},outputs:{closed:"closed"},decls:19,vars:9,consts:[[1,"detail"],[1,"detail-head"],["title","Close",1,"close-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"subject"],[3,"text","linking"],[1,"meta"],[3,"name","email"],[1,"author"],[1,"body"],[1,"detail-body"],[1,"state"],[3,"message"],[3,"file","originalRef","modifiedRef"],[1,"separator"],[1,"hash"],[1,"file-list"],["type","button",1,"file-row","dir-row",3,"title","paddingLeft"],["type","button",1,"file-row",3,"paddingLeft"],["type","button",1,"file-row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron","dir-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"file-path","dir-name",3,"title"],[1,"file-counts"],[1,"additions"],[1,"deletions"],["type","button",1,"file-row",3,"click"],[1,"file-path",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 18 15 12 9 6"],[3,"closed","file","originalRef","modifiedRef"]],template:function(e,i){if(e&1&&(f(0,"aside",0)(1,"header",1)(2,"button",2),E("click",function(){return i.closed.emit()}),F(),f(3,"svg",3),z(4,"line",4)(5,"line",5),h()(),ue(),f(6,"h2",6),z(7,"app-issue-text",7),h(),f(8,"div",8),z(9,"app-author-avatar",9),f(10,"span",10),p(11),h(),S(12,pk,9,5),h(),S(13,fk,2,2,"pre",11),h(),f(14,"div",12),S(15,hk,2,0,"div",13)(16,mk,1,1,"app-error-banner",14)(17,Tk,2,1),h()(),S(18,Mk,1,3,"app-diff-dialog",15)),e&2){let r,o;c(7),k("text",i.commit().message)("linking",i.issueLinking()),c(2),k("name",i.commit().author_name)("email",i.commit().author_email),c(2),O(i.commit().author_name),c(),T(i.isWorking()?-1:12),c(),T(i.body().trim()?13:-1),c(2),T(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),c(3),T((o=i.dialogFile())?18:-1,o)}},dependencies:[at,An,So,wo,Xs],styles:["[_nghost-%COMP%]{--panel-width: 480px;display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}@media(prefers-reduced-motion:reduce){.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;padding:6px;gap:2px;overflow-y:auto}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:11px;height:11px}.dir-name[_ngcontent-%COMP%]{font-weight:600}.file-row[_ngcontent-%COMP%]:hover .chevron[_ngcontent-%COMP%]{stroke:var(--accent)}.detail-head[_ngcontent-%COMP%]{flex:none;padding:14px 16px 12px;border-bottom:1px solid var(--border);position:relative}.close-btn[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.subject[_ngcontent-%COMP%]{margin:0 30px 10px 0;font-size:14px;font-weight:600;color:var(--text-bright);word-break:break-word}.meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--text-dim);font-size:12px}.avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#1e1e1e;font-size:10px;font-weight:700}.author[_ngcontent-%COMP%]{color:var(--text)}.hash[_ngcontent-%COMP%]{font-family:var(--mono);color:var(--accent);background:#3794ff1a;padding:1px 6px;border-radius:3px}.body[_ngcontent-%COMP%]{margin:10px 0 0;padding:8px 10px;background:#ffffff0a;border-radius:4px;font-size:12px;font-family:inherit;color:var(--text);white-space:pre-wrap;word-break:break-word;max-height:160px;overflow-y:auto}.detail-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.state[_ngcontent-%COMP%]{padding:24px;text-align:center;color:var(--text-dim)}.file-status[_ngcontent-%COMP%]{flex:none;padding:0 6px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.file-path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.file-counts[_ngcontent-%COMP%]{flex:none;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.binary[_ngcontent-%COMP%]{padding:12px;color:var(--text-dim);font-size:12px}"],changeDetection:0})};function aa(n,t=0){return kk(n)?Number(n):arguments.length===2?t:0}function kk(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Ty(n){return n instanceof gn?n.nativeElement:n}var Bh;try{Bh=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Bh=!1}var Jc=(()=>{class n{_platformId=I(ur);isBrowser=this._platformId?ty(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||Bh)&&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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ik=new te("cdk-dir-doc",{providedIn:"root",factory:Pk});function Pk(){return I(ut)}var Ok=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Rk(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?Ok.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var My=(()=>{class n{get value(){return this.valueSignal()}valueSignal=x("ltr");change=new mn;constructor(){let e=I(Ik,{optional:!0});if(e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Rk(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Cn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(Cn||{}),ed,br;function ky(){if(br==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return br=!1,br;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)br=!0;else{let n=Element.prototype.scrollTo;n?br=!/\{\s*\[native code\]\s*\}/.test(n.toString()):br=!1}}return br}function To(){if(typeof document!="object"||!document)return Cn.NORMAL;if(ed==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),ed=Cn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,ed=n.scrollLeft===0?Cn.NEGATED:Cn.INVERTED),n.remove()}return ed}var td=class{};function Iy(n){return n&&typeof n.connect=="function"&&!(n instanceof zo)}var nd=class extends td{_data;constructor(t){super(),this._data=t}connect(){return Qo(this._data)?this._data:we(this._data)}disconnect(){}},la=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(la||{}),jh=new te("_ViewRepeater"),id=class{viewCacheSize=20;_viewCache=[];applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let d,m;if(s.previousIndex==null){let y=()=>i(s,a,l);d=this._insertView(y,l,e,r(s)),m=d?la.INSERTED:la.REPLACED}else l==null?(this._detachAndCacheView(a,e),m=la.REMOVED):(d=this._moveView(a,l,e,r(s)),m=la.MOVED);o&&o({context:d?.context,operation:m,record:s})})}detach(){for(let t of this._viewCache)t.destroy();this._viewCache=[]}_insertView(t,e,i,r){let o=this._insertViewFromCache(e,i);if(o){o.context.$implicit=r;return}let s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){let i=e.detach(t);this._maybeCacheView(i,e)}_moveView(t,e,i,r){let o=i.get(t);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{let i=e.indexOf(t);i===-1?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){let i=this._viewCache.pop();return i&&e.insert(i,t),i||null}};var Nk=["contentWrapper"],Ak=["*"],Ry=new te("VIRTUAL_SCROLL_STRATEGY"),$h=class{_scrolledIndexChange=new $e;scrolledIndexChange=this._scrolledIndexChange.pipe(Jo());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){i<e,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),d=Math.max(0,Math.min(s,r-l));s!=d&&(s=d,o=d*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}let a=o-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(o+i);if(l<this._minBufferPx&&e.end!=r){let d=Math.ceil((this._maxBufferPx-l)/this._itemSize);d>0&&(e.end=Math.min(r,e.end+d),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Lk(n){return n._scrollStrategy}var Ny=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=aa(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=aa(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=aa(e)}_maxBufferPx=200;_scrollStrategy=new $h(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=yi({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Hs([{provide:Ry,useFactory:Lk,deps:[Zr(()=>n)]}]),Ps]})}return n})(),Fk=20,Vk=(()=>{class n{_ngZone=I(Te);_platform=I(Jc);_renderer=I(Rn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new $e;_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=Fk){return this._platform.isBrowser?new de(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(Xo(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):we()}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(Ko(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=Ty(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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ay=(()=>{class n{elementRef=I(gn);scrollDispatcher=I(Vk);ngZone=I(Te);dir=I(My,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new $e;_renderer=I(Ec);_cleanupScroll;_elementScrolled=new $e;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&&To()!=Cn.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),To()==Cn.INVERTED?e.left=e.right:To()==Cn.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;ky()?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&&To()==Cn.INVERTED?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&To()==Cn.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=yi({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Bk=20,jk=(()=>{class n{_platform=I(Jc);_listeners;_viewportSize;_change=new $e;_document=I(ut);constructor(){let e=I(Te),i=I(Rn).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=Bk){return e>0?this._change.pipe(Xo(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=ae({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Py=new te("VIRTUAL_SCROLLABLE"),$k=(()=>{class n extends Ay{constructor(){super()}measureViewportSize(e){let i=this.elementRef.nativeElement;return e==="horizontal"?i.clientWidth:i.clientHeight}static \u0275fac=function(i){return new(i||n)};static \u0275dir=yi({type:n,features:[Fs]})}return n})();function Hk(n,t){return n.start==t.start&&n.end==t.end}var Uk=typeof requestAnimationFrame<"u"?uu:du,ca=(()=>{class n extends $k{elementRef=I(gn);_changeDetectorRef=I(Nc);_scrollStrategy=I(Ry,{optional:!0});scrollable=I(Py,{optional:!0});_platform=I(Jc);_detachedSubject=new $e;_renderedRangeSubject=new $e;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new de(e=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(i)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=x("");_totalContentHeight=x("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=x(!1);_runAfterChangeDetection=[];_viewportChanges=Ve.EMPTY;_injector=I(wt);_isDestroyed=!1;constructor(){super();let e=I(jk);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=Ce(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:I(fr).injector});I(tt).onDestroy(()=>{i.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(ll(null),Xo(0,Uk),ji(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(ji(this._detachedSubject)).subscribe(i=>{let r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Hk(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&i==="to-start"?0:e;let r=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",l=`translate${s}(${Number((o&&r?-1:1)*e)}px)`;this._renderedContentOffset=e,i==="to-end"&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){let r={behavior:i};this.orientation==="horizontal"?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return this.scrollable==this?i=r=>super.measureScrollOffset(r):i=r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i,r="left",o="right",s=this.dir?.value=="rtl";e=="start"?i=s?o:r:e=="end"?i=s?r:o:e?i=e:i=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!nt(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,gc(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of e)i()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=pe({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&Xf(Nk,7),i&2){let o;Jf(o=eh())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&me("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",Fb]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Hs([{provide:Ay,useFactory:(e,i)=>e||i,deps:[[new df,new cf(Py)],n]}]),Fs],ngContentSelectors:Ak,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(Qf(),b(0,"div",1,0),Kf(2),C(),J(3,"div",2)),i&2&&(c(3),ie("width",r._totalContentWidth())("height",r._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
6
+ `],encapsulation:2,changeDetection:0})}return n})();function Oy(n,t,e){let i=e;if(!i.getBoundingClientRect)return 0;let r=i.getBoundingClientRect();return n==="horizontal"?t==="start"?r.left:r.right:t==="start"?r.top:r.bottom}var Ly=(()=>{class n{_viewContainerRef=I(bi);_template=I(_i);_differs=I(Ac);_viewRepeater=I(jh);_viewport=I(ca,{skipSelf:!0});viewChange=new $e;_dataSourceChanges=new $e;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,Iy(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new nd(Qo(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=aa(e)}dataStream=this._dataSourceChanges.pipe(ll(null),_u(),yt(([e,i])=>this._changeDataSource(e,i)),Wr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new $e;constructor(){let e=I(Te);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ji(this._destroyed)).subscribe(i=>{this._renderedRange=i,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,i){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let r=e.start-this._renderedRange.start,o=e.end-e.start,s,a;for(let l=0;l<o;l++){let d=this._viewContainerRef.get(l+r);if(d&&d.rootNodes.length){s=a=d.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let d=this._viewContainerRef.get(l+r);if(d&&d.rootNodes.length){a=d.rootNodes[d.rootNodes.length-1];break}}return s&&a?Oy(i,"end",a)-Oy(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):we()}_updateContext(){let e=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.forEachIdentityChange(o=>{let s=this._viewContainerRef.get(o.currentIndex);s.context.$implicit=o.item});let i=this._data.length,r=this._viewContainerRef.length;for(;r--;){let o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||n)};static \u0275dir=yi({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Hs([{provide:jh,useClass:id}])]})}return n})();function rd(n){let t=[],e=new Int32Array(n.length),i=r=>{let o=t.indexOf(r);return o===-1&&(o=t.indexOf(null),o===-1&&(t.push(null),o=t.length-1),t[o]=r),o};for(let r=0;r<n.length;r++){let{hash:o,parents:s}=n[r],a=t.map((d,m)=>d===o?m:-1).filter(d=>d!==-1),l;if(a.length>0){l=a[0];for(let d=1;d<a.length;d++)t[a[d]]=null}else l=i(o);t[l]=s[0]??null;for(let d=1;d<s.length;d++)i(s[d]);e[r]=l}return e}var Fy=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function Hh(n){return Fy[Math.abs(n)%Fy.length]}var zk=2e3,od=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(t){return t.length<=zk?we(rd(t)):new de(e=>{let i=this.ensureWorker();if(!i){e.next(rd(t)),e.complete();return}let r=++this.nextId;this.pending.set(r,{rows:t,subscriber:e});let o=setTimeout(()=>this.fallback(),15e3);try{i.postMessage({id:r,hashes:t.map(s=>s.hash),parents:t.map(s=>[...s.parents])})}catch{this.fallback()}return()=>{clearTimeout(o),this.pending.delete(r)}})}fallback(){this.workerBroken=!0,this.worker?.terminate(),this.worker=null;for(let[t,e]of this.pending)this.pending.delete(t),e.subscriber.next(rd(e.rows)),e.subscriber.complete()}ensureWorker(){if(this.worker)return this.worker;if(this.workerBroken||typeof Worker>"u")return null;try{return this.worker=new Worker(new URL("worker-O4G7QTZ6.js",import.meta.url),{type:"module"}),this.worker.onmessage=t=>{let e=this.pending.get(t.data.id);if(e){if(!(t.data.lanes instanceof Int32Array)||t.data.lanes.length!==e.rows.length){this.fallback();return}e.subscriber.next(t.data.lanes),e.subscriber.complete()}},this.worker.onerror=()=>this.fallback(),this.worker.onmessageerror=()=>this.fallback(),this.worker}catch{return this.fallback(),null}}ngOnDestroy(){this.worker?.terminate();for(let t of this.pending.values())t.subscriber.complete();this.pending.clear()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function Vy(n){return n?n.split(",").map(t=>t.trim()).filter(Boolean).map(t=>t.startsWith("HEAD -> ")?{type:"head",name:t.slice(8)}:t==="HEAD"?{type:"head",name:"HEAD"}:t.startsWith("tag: ")?{type:"tag",name:t.slice(5)}:t.includes("/")?{type:"remote",name:t}:{type:"local",name:t}):[]}function Uh(n){let t=n.refs;return t?t==="HEAD"||t.startsWith("HEAD,")||t.startsWith("HEAD ->"):!1}function sd(n,t){if(typeof localStorage>"u")return t;try{let e=localStorage.getItem(n);return e===null?t:JSON.parse(e)}catch{return t}}function ad(n,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(t))}catch{}}var Gk=(n,t)=>t.index,Wk=(n,t)=>t.hash,qk=(n,t)=>t.name;function Zk(n,t){if(n&1){let e=P();f(0,"div",20)(1,"span",5),p(2,"Graph"),h(),f(3,"div",6),E("mousedown",function(r){_(e);let o=u();return v(o.startResize("graph",r))}),h()()}if(n&2){let e=u();ie("width",e.graphColumnWidth(),"px")}}function Yk(n,t){if(n&1&&(f(0,"div",35),F(),f(1,"svg",36),z(2,"path",37)(3,"path",38),h()()),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function Qk(n,t){if(n&1&&(f(0,"span",39),p(1),h()),n&2){let e=u();c(),q("",e.staged.length," staged")}}function Kk(n,t){if(n&1&&(f(0,"span",40),p(1),h()),n&2){let e=u();c(),q("",e.unstaged.length," unstaged")}}function Xk(n,t){if(n&1&&(f(0,"span",41),p(1),h()),n&2){let e=u();c(),q("",e.untracked.length," untracked")}}function Jk(n,t){if(n&1&&(S(0,Qk,2,1,"span",39),S(1,Kk,2,1,"span",40),S(2,Xk,2,1,"span",41)),n&2){let e=t;T(e.staged.length>0?0:-1),c(),T(e.unstaged.length>0?1:-1),c(),T(e.untracked.length>0?2:-1)}}function eI(n,t){if(n&1){let e=P();f(0,"div",21),E("click",function(){_(e);let r=u();return v(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){_(e);let o=u();return v(o.onWorkingContextMenu(r))}),S(1,Yk,4,2,"div",22),f(2,"div",23)(3,"span",24),F(),f(4,"svg",25),z(5,"circle",26)(6,"path",27)(7,"path",28)(8,"path",29)(9,"path",30),h(),ue(),f(10,"span",31),p(11,"Uncommitted changes"),h()(),S(12,Jk,3,3),h(),f(13,"div",32),p(14,"\u2014"),h(),f(15,"div",33),p(16),h(),f(17,"div",34),p(18,"\u2014"),h()()}if(n&2){let e,i=u();ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),me("selected",i.selectedHash()===i.workingHash),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(10),T((e=i.workingChanges())?12:-1,e),c(),ie("width",i.columnWidths().date,"px"),c(2),ie("width",i.columnWidths().author,"px"),c(),O(i.identity().name||"You"),c(),ie("width",i.columnWidths().commit,"px")}}function tI(n,t){if(n&1&&(f(0,"div",35),F(),f(1,"svg",49),z(2,"path",44)(3,"line",45),h()()),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function nI(n,t){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let e=u().$implicit;c(),O(e.text)}}function iI(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;q(" ",e.text," ")}}function rI(n,t){if(n&1&&S(0,nI,2,1,"mark",50)(1,iI,1,1),n&2){let e=t.$implicit;T(e.match?0:1)}}function oI(n,t){if(n&1&&(z(0,"app-author-avatar",51),p(1)),n&2){let e=u().$implicit;k("name",e.author_name)("email",e.author_email??""),c(),q(" ",e.author_name," ")}}function sI(n,t){if(n&1){let e=P();f(0,"div",42),E("click",function(){let r=_(e).$implicit,o=u();return v(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=_(e).$implicit,s=u();return v(s.onStashContextMenu(r,o))}),S(1,tI,4,2,"div",22),f(2,"div",23)(3,"span",43),F(),f(4,"svg",25),z(5,"path",44)(6,"line",45),h(),ue(),f(7,"span",31),p(8),h()(),f(9,"span",46),Q(10,rI,2,1,null,null,Vt),h()(),f(12,"div",32),p(13),wi(14,"date"),h(),f(15,"div",47),S(16,oI,2,3),h(),f(17,"div",48),p(18),h()()}if(n&2){let e=t.$implicit,i=u();ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),me("selected",i.selectedHash()===e.hash),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(),k("title",i.stashLabel(e)),c(5),O(i.stashLabel(e)),c(),k("title",e.message),c(),K(i.highlight(e.message)),c(2),ie("width",i.columnWidths().date,"px"),c(),q(" ",e.date?vo(14,23,e.date,"d MMM y HH:mm"):"\u2014"," "),c(2),ie("width",i.columnWidths().author,"px"),k("title",e.author_name),c(),T(e.author_name?16:-1),c(),ie("width",i.columnWidths().commit,"px"),k("title",e.hash),c(),q(" ",e.hash.slice(0,8)," ")}}function aI(n,t){if(n&1&&(f(0,"div",13),z(1,"span",52),p(2),h()),n&2){let e=u();c(2),O(e.pendingLabel())}}function lI(n,t){if(n&1&&(F(),z(0,"path",55)),n&2){let e=t.$implicit;le("d",e.d)("stroke",e.color)}}function cI(n,t){if(n&1&&(F(),z(0,"circle",56)),n&2){let e=u().$implicit;le("cx",e.x)("cy",e.y)("stroke",e.color)}}function dI(n,t){if(n&1&&(F(),z(0,"circle",57)),n&2){let e=u().$implicit;le("cx",e.x)("cy",e.y)("fill",e.color)}}function uI(n,t){if(n&1&&S(0,cI,1,3,":svg:circle",56)(1,dI,1,3,":svg:circle",57),n&2){let e=t.$implicit;T(e.isHead?0:1)}}function pI(n,t){if(n&1&&(f(0,"div",53),F(),f(1,"svg",54)(2,"g"),Q(3,lI,1,2,":svg:path",55,Vt),Q(5,uI,2,1,null,null,Wk),h()()()),n&2){let e=u();ie("width",e.viewportWidth(),"px"),c(),ie("transform",e.horizontalTransform()),le("width",e.graphWidth()),c(),le("transform","translate(0 "+-e.scrollTop()+")"),c(),K(e.edges()),c(2),K(e.nodes())}}function fI(n,t){if(n&1&&z(0,"div",35),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function hI(n,t){n&1&&(F(),f(0,"svg",25),z(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),h())}function mI(n,t){n&1&&(F(),f(0,"svg",25),z(1,"path",67)(2,"line",68),h())}function gI(n,t){if(n&1){let e=P();f(0,"span",62),E("contextmenu",function(r){let o=_(e).$implicit,s=u().$implicit,a=u();return v(a.onBadgeContextMenu(r,s.commit,o))}),S(1,hI,5,0,":svg:svg",25)(2,mI,3,0,":svg:svg",25),f(3,"span",31),p(4),h()()}if(n&2){let e=t.$implicit;ft("badge badge-"+e.type),c(),T(e.type==="head"||e.type==="local"?1:e.type==="tag"?2:-1),c(3),O(e.name)}}function _I(n,t){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let e=u().$implicit;c(),O(e.text)}}function vI(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;q(" ",e.text," ")}}function bI(n,t){if(n&1&&S(0,_I,2,1,"mark",50)(1,vI,1,1),n&2){let e=t.$implicit;T(e.match?0:1)}}function yI(n,t){if(n&1){let e=P();f(0,"div",58),E("click",function(){let r=_(e).$implicit,o=u();return v(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=_(e).$implicit,s=u();return v(s.onRowContextMenu(r,o.commit))}),S(1,fI,1,2,"div",22),f(2,"div",23),Q(3,gI,5,4,"span",59,qk),f(5,"span",60),z(6,"app-issue-text",61),h()(),f(7,"div",32),p(8),wi(9,"date"),h(),f(10,"div",47),z(11,"app-author-avatar",51),Q(12,bI,2,1,null,null,Vt),h(),f(14,"div",48),p(15),h()()}if(n&2){let e=t.$implicit,i=u();ie("width",i.tableWidth(),"px"),me("selected",e.commit.hash===i.selectedHash()),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(),K(i.badges(e.commit)),c(2),me("head",i.isHead(e.commit)),c(),k("text",e.commit.message)("search",i.search())("linking",i.issueLinking()),c(),ie("width",i.columnWidths().date,"px"),c(),q(" ",vo(9,24,e.commit.date,"d MMM y HH:mm")," "),c(2),ie("width",i.columnWidths().author,"px"),k("title",e.commit.author_name),c(),k("name",e.commit.author_name)("email",e.commit.author_email),c(),K(i.highlight(e.commit.author_name)),c(2),ie("width",i.columnWidths().commit,"px"),k("title",e.commit.hash),c(),q(" ",e.commit.hash.slice(0,8)," ")}}function CI(n,t){if(n&1&&(f(0,"div",18),p(1),h()),n&2){let e=u();c(),O(e.search().trim()?"No matching commits":"No commits to show")}}function xI(n,t){if(n&1){let e=P();f(0,"div",19)(1,"button",69),E("click",function(){_(e);let r=u();return v(r.onLoadMoreCommits())}),p(2,"Load more commits"),h(),f(3,"button",69),E("click",function(){_(e);let r=u();return v(r.onLoadAllCommits())}),p(4),h()()}if(n&2){let e=u();c(4),q("Load all (",e.unloaded(),")")}}var rn=34,zh=14,By=10,wI=72,jy=10,Hy="guito.columnWidths",$y={graph:0,description:480,date:132,author:150,commit:84},EI={graph:0,description:48,date:48,author:48,commit:48};function DI(){let n=sd(Hy,{}),t=G({},$y);for(let e of Object.keys($y)){let i=n[e];typeof i=="number"&&Number.isFinite(i)&&i>=EI[e]&&(t[e]=i)}return t}var ld=class n{commits=N.required();selectedHash=N.required();identity=N({name:"",email:""});search=N("");showGraph=N(!0);selectedBranches=N([]);showRemote=N(!0);workingChanges=N(null);stashes=N([]);showStashes=N(!1);showTags=N(!0);issueLinking=N(null);unloaded=N(0);historyLoading=N(!1);loadingLabel=N("");scrollToHash=N(null);graphLoading=x(!1);pendingLabel=L(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=H();contextMenu=H();loadMoreRequested=H();loadAllRequested=H();rowHeight=rn;graph=I(od);viewport=en(ca);zone=I(Te);scrollTop=x(0);scrollLeft=x(0);viewportWidth=x(0);viewportHeight=x(0);constructor(){Ce(()=>{let t=this.commits();this.updateGraph(t)}),hh(()=>{this.graphCommits(),this.columnWidths();let t=this.viewport();t&&nt(()=>{t.checkViewportSize(),this.measureViewport()})}),hh(()=>{this.selectedBranches(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let t=this.viewport();t&&nt(()=>{t.scrollToOffset(0),this.measureViewport()})}),Ce(()=>{let t=this.scrollToHash();if(!t)return;let e=this.graphCommits().findIndex(r=>r.commit.hash===t.hash);if(e===-1)return;let i=this.viewport();i&&nt(()=>this.scrollToIndex(i,e))}),Ce(t=>{let e=this.viewport();if(!e)return;let i=new ResizeObserver(()=>{this.zone.run(()=>{e.checkViewportSize(),this.measureViewport()})});i.observe(e.elementRef.nativeElement);let r=e.elementScrolled().subscribe(()=>{this.zone.run(()=>this.measureViewport())});t(()=>{i.disconnect(),r.unsubscribe()})}),Ce(()=>{this.viewportWidth(),this.graphCommits(),nt(()=>{let t=this.viewportWidth()-this.graphColumnWidth()-this.columnWidths().date-this.columnWidths().author-this.columnWidths().commit-this.columnWidths().description;this.fillerWidth.set(Math.max(0,t))})})}measureViewport(){let t=this.viewport()?.elementRef.nativeElement;t&&(this.scrollTop.set(t.scrollTop),this.scrollLeft.set(t.scrollLeft),this.viewportWidth.set(t.clientWidth),this.viewportHeight.set(t.clientHeight))}scrollToIndex(t,e){let i=t.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,e*rn-(r-rn)/2),s=0,a=()=>{t.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=x(DI());graphCommits=x([]);graphSubscription=null;updateGraph(t){if(this.graphSubscription?.unsubscribe(),!this.showGraph()){this.graphLoading.set(!1),this.graphCommits.set(t.map(e=>({commit:e,lane:0,parents:[]})));return}this.graphLoading.set(!0),this.graphSubscription=this.graph.compute(t).subscribe(e=>{e.length===t.length&&(this.graphLoading.set(!1),this.graphCommits.set(t.map((i,r)=>({commit:i,lane:e[r],parents:i.parents??[]}))))})}graphWidth=L(()=>{let t=this.graphCommits().reduce((e,i)=>Math.max(e,i.lane),0)+1;return Math.max(wI,By*2+t*zh)});graphColumnWidth=L(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=x(0);descriptionWidth=L(()=>this.columnWidths().description+this.fillerWidth());tableWidth=L(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=L(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=L(()=>this.graphCommits().length*rn);allEdges=L(()=>{let t=this.graphCommits(),e=new Map,i=new Map;t.forEach((o,s)=>{e.set(o.commit.hash,s),i.set(o.commit.hash,o.lane)});let r=[];for(let o=0;o<t.length;o++){let s=t[o];for(let a of s.parents){let l=e.get(a);r.push({childRow:o,childLane:s.lane,parentRow:l??-1,parentLane:l===void 0?s.lane:i.get(a)??s.lane})}}return r});visibleRange=L(()=>{let t=this.graphCommits().length;if(t===0||this.viewportHeight()===0)return{start:0,end:0};let e=Math.max(0,Math.floor(this.scrollTop()/rn)-jy),i=Math.min(t,Math.ceil((this.scrollTop()+this.viewportHeight())/rn)+jy);return{start:e,end:i}});nodes=L(()=>{let{start:t,end:e}=this.visibleRange(),i=[];for(let r=t;r<e;r++){let o=this.graphCommits()[r];i.push({hash:o.commit.hash,x:this.laneX(o.lane),y:r*rn+rn/2,color:Hh(o.lane),isHead:Uh(o.commit)})}return i});edges=L(()=>{let t=this.allEdges(),{start:e,end:i}=this.visibleRange(),r=this.graphHeight(),o=[];for(let s of t){let a=s.parentRow,l=Math.min(s.childRow,a<0?s.childRow:a);if((a<0?Number.MAX_SAFE_INTEGER:Math.max(s.childRow,a))<e||l>=i)continue;let m=Hh(s.childLane),y=this.laneX(s.childLane),w=s.childRow*rn+rn/2;if(a<0){o.push({d:`M ${y} ${w} L ${y} ${r}`,color:m});continue}let D=this.laneX(s.parentLane),R=a*rn+rn/2;if(y===D)o.push({d:`M ${y} ${w} L ${D} ${R}`,color:m});else{let j=(w+R)/2;o.push({d:`M ${y} ${w} C ${y} ${j} ${D} ${j} ${D} ${R}`,color:m})}}return o});hasWorkingChanges=L(()=>{let t=this.workingChanges();return!!t&&t.staged.length+t.unstaged.length+t.untracked.length+t.conflicted.length>0});workingHash=yn;workingCommit=L(()=>({hash:yn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=L(()=>this.showStashes()?this.stashes():[]);stashCommit(t){return{hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]}}stashLabel(t){return`stash@{${t.index}}`}resizeState=null;startResize(t,e){if(e.preventDefault(),e.stopPropagation(),t==="graph")this.resizeState={column:t,startX:e.clientX,startWidth:this.graphColumnWidth()};else if(t==="description"){let i=this.descriptionWidth();this.columnWidths.update(r=>oe(G({},r),{description:i})),this.fillerWidth.set(0),this.resizeState={column:t,startX:e.clientX,startWidth:i}}else this.resizeState={column:t,startX:e.clientX,startWidth:this.columnWidths()[t]};document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd)}onResizeMove=t=>{let e=this.resizeState;if(!e)return;let i=t.clientX-e.startX,r=e.column==="graph"?this.graphWidth():48,o=Math.max(r,e.startWidth+i);this.columnWidths.update(s=>oe(G({},s),{[e.column]:o}))};onResizeEnd=()=>{this.resizeState&&ad(Hy,this.columnWidths()),this.resizeState=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd)};ngOnDestroy(){this.onResizeEnd(),this.graphSubscription?.unsubscribe()}onRowContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"commit",commit:e}})}onBadgeContextMenu(t,e,i){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:i.type==="tag"?"tag":"branch",commit:e,branch:i}})}onWorkingContextMenu(t){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"working"}})}onStashContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"stash",stash:e}})}highlight(t){let e=this.search().trim().toLowerCase();if(!e||!t)return[{text:t,match:!1}];let i=[],r=t.toLowerCase(),o=0,s=r.indexOf(e);for(;s!==-1;)s>o&&i.push({text:t.slice(o,s),match:!1}),i.push({text:t.slice(s,s+e.length),match:!0}),o=s+e.length,s=r.indexOf(e,o);return o<t.length&&i.push({text:t.slice(o),match:!1}),i.length>0?i:[{text:t,match:!1}]}onLoadMoreCommits(){this.loadMoreRequested.emit()}onLoadAllCommits(){this.loadAllRequested.emit()}trackByHash(t,e){return e.commit.hash}badges(t){let e=this.selectedBranches(),i=this.showRemote();return Vy(t.refs).filter(r=>r.type==="tag"&&!this.showTags()||r.type==="remote"&&!i?!1:!e.length||r.type==="tag"?!0:e.includes(r.name))}isHead(t){return Uh(t)}laneX(t){return By+zh/2+t*zh}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-commit-table"]],viewQuery:function(e,i){e&1&&jt(i.viewport,ca,5),e&2&&vn()},inputs:{commits:[1,"commits"],selectedHash:[1,"selectedHash"],identity:[1,"identity"],search:[1,"search"],showGraph:[1,"showGraph"],selectedBranches:[1,"selectedBranches"],showRemote:[1,"showRemote"],workingChanges:[1,"workingChanges"],stashes:[1,"stashes"],showStashes:[1,"showStashes"],showTags:[1,"showTags"],issueLinking:[1,"issueLinking"],unloaded:[1,"unloaded"],historyLoading:[1,"historyLoading"],loadingLabel:[1,"loadingLabel"],scrollToHash:[1,"scrollToHash"]},outputs:{commitClick:"commitClick",contextMenu:"contextMenu",loadMoreRequested:"loadMoreRequested",loadAllRequested:"loadAllRequested"},decls:31,vars:24,consts:[[1,"table"],[1,"pinned-clip"],[1,"table-head"],[1,"head-cell","cell-graph",3,"width"],[1,"head-cell","cell-desc"],[1,"head-label"],[1,"resizer",3,"mousedown"],[1,"head-cell","cell-date"],[1,"head-cell","cell-author"],[1,"head-cell","cell-commit"],[1,"row","working-row",3,"width","transform","selected"],[1,"row","stash-row",3,"width","transform","selected"],[1,"table-body"],["role","status",1,"table-loading"],[1,"list-container"],[1,"graph-clip",3,"width"],[1,"list-viewport",3,"itemSize"],["class","row",3,"width","selected","click","contextmenu",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[1,"empty"],[1,"load-actions"],[1,"head-cell","cell-graph"],[1,"row","working-row",3,"click","contextmenu"],[1,"cell","cell-graph",3,"width"],[1,"cell","cell-desc"],[1,"badge","badge-working"],["viewBox","0 0 24 24","aria-hidden","true",1,"badge-icon"],["cx","12","cy","12","r","3"],["d","M12 2v3"],["d","M12 19v3"],["d","M2 12h3"],["d","M19 12h3"],[1,"badge-name"],[1,"cell","cell-date"],[1,"cell","cell-author"],[1,"cell","cell-commit"],[1,"cell","cell-graph"],["viewBox","0 0 24 24","aria-hidden","true",1,"working-icon"],["d","M12 20h9"],["d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"],[1,"count-badge","count-staged"],[1,"count-badge","count-unstaged"],[1,"count-badge","count-untracked"],[1,"row","stash-row",3,"click","contextmenu"],[1,"badge","badge-stash",3,"title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"message",3,"title"],[1,"cell","cell-author",3,"title"],[1,"cell","cell-commit",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"stash-icon"],[1,"hl"],[3,"name","email"],[1,"spinner"],[1,"graph-clip"],["aria-hidden","true",1,"graph-overlay"],["fill","none","stroke-width","2"],["r","5.5","fill","#1e1e1e","stroke-width","2"],["r","4"],[1,"row",3,"click","contextmenu"],[3,"class"],[1,"message"],[3,"text","search","linking"],[3,"contextmenu"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],[1,"load-more",3,"click"]],template:function(e,i){e&1&&(f(0,"div",0)(1,"div",1)(2,"div",2),S(3,Zk,4,2,"div",3),f(4,"div",4)(5,"span",5),p(6,"Description"),h(),f(7,"div",6),E("mousedown",function(o){return i.startResize("description",o)}),h()(),f(8,"div",7)(9,"span",5),p(10,"Date"),h(),f(11,"div",6),E("mousedown",function(o){return i.startResize("date",o)}),h()(),f(12,"div",8)(13,"span",5),p(14,"Author"),h(),f(15,"div",6),E("mousedown",function(o){return i.startResize("author",o)}),h()(),f(16,"div",9)(17,"span",5),p(18,"Commit"),h(),f(19,"div",6),E("mousedown",function(o){return i.startResize("commit",o)}),h()()(),S(20,eI,19,17,"div",10),Q(21,sI,19,26,"div",11,Gk),h(),f(23,"div",12),S(24,aI,3,1,"div",13),f(25,"div",14),S(26,pI,7,6,"div",15),f(27,"cdk-virtual-scroll-viewport",16),go(28,yI,16,27,"div",17),h(),S(29,CI,2,1,"div",18),h(),S(30,xI,5,1,"div",19),h()()),e&2&&(le("aria-busy",!!i.pendingLabel()),c(),ie("width",i.viewportWidth(),"px"),c(),ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),c(),T(i.showGraph()?3:-1),c(),ie("width",i.descriptionWidth(),"px"),c(4),ie("width",i.columnWidths().date,"px"),c(4),ie("width",i.columnWidths().author,"px"),c(4),ie("width",i.columnWidths().commit,"px"),c(4),T(i.hasWorkingChanges()?20:-1),c(),K(i.visibleStashes()),c(3),T(i.pendingLabel()?24:-1),c(2),T(i.showGraph()?26:-1),c(),k("itemSize",i.rowHeight),c(),k("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),c(),T(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),c(),T(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[An,Ny,Ly,ca,wo,Xs],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.table[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0}.table-head[_ngcontent-%COMP%]{display:flex;align-items:center;height:30px;flex:none;border-bottom:1px solid var(--border);background:var(--bg-alt);font-size:12px;font-weight:600;color:var(--text-bright);-webkit-user-select:none;user-select:none}.head-cell[_ngcontent-%COMP%]{position:relative;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none}.head-cell.cell-desc[_ngcontent-%COMP%]{flex:none;min-width:0}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:1}.resizer[_ngcontent-%COMP%]:hover, .resizer.active[_ngcontent-%COMP%]{background:var(--accent)}.table-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.list-container[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.list-viewport[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.graph-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;pointer-events:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;height:34px;flex:none;cursor:pointer;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row.selected[_ngcontent-%COMP%]{background:#04395e}.cell[_ngcontent-%COMP%]{padding:0 10px;overflow:hidden;white-space:nowrap;color:var(--text);min-width:0}.cell-graph[_ngcontent-%COMP%]{flex:none}.cell-desc[_ngcontent-%COMP%]{flex:none;display:flex;align-items:center;gap:6px}.cell-date[_ngcontent-%COMP%]{flex:none;text-align:right;color:var(--text-dim)}.cell-author[_ngcontent-%COMP%]{flex:none;text-align:right;text-overflow:ellipsis}.cell-commit[_ngcontent-%COMP%]{flex:none;text-align:right;font-family:var(--mono);color:var(--text-dim)}.working-row[_ngcontent-%COMP%]{flex:none;border-bottom:1px solid var(--border);background:#d7ba7d0a}.working-row[_ngcontent-%COMP%]:hover{background:#d7ba7d14}.working-row.selected[_ngcontent-%COMP%]{background:#4d3a12}.working-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#d7ba7d;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-working[_ngcontent-%COMP%]{background:#d7ba7d24;color:#d7ba7d;border-color:#d7ba7d66}.stash-row[_ngcontent-%COMP%]{flex:none;background:#c586c00a}.stash-row[_ngcontent-%COMP%]:hover{background:#c586c014}.stash-row.selected[_ngcontent-%COMP%]{background:#4d2a49}.stash-row[_ngcontent-%COMP%]:last-child{border-bottom:1px solid var(--border)}.stash-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#c586c0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-stash[_ngcontent-%COMP%]{background:#c586c024;color:#c586c0;border-color:#c586c066}.count-badge[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:10px;font-size:11px;line-height:16px;white-space:nowrap}.count-staged[_ngcontent-%COMP%]{background:#89d18524;color:#89d185}.count-unstaged[_ngcontent-%COMP%]{background:#f4877124;color:#f48771}.count-untracked[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff}.hl[_ngcontent-%COMP%]{background:#613214;color:#f5c04a;border-radius:2px;padding:0 1px}.message[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-weight:400}.message.head[_ngcontent-%COMP%]{font-weight:600;color:var(--text-bright)}.badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;flex:none;padding:1px 7px;border-radius:10px;border:1px solid transparent;font-size:11px;line-height:16px;white-space:nowrap}.badge-head[_ngcontent-%COMP%]{background:#0078d4;color:#fff}.badge-local[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff;border-color:#3794ff66}.badge-remote[_ngcontent-%COMP%]{background:#ffffff0f;color:#b8b8b8;border-color:#4a4a4a}.badge-tag[_ngcontent-%COMP%]{background:#d7ba7d1f;color:#d7ba7d;border-color:#d7ba7d66}.badge-icon[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.badge-name[_ngcontent-%COMP%]{max-width:160px;overflow:hidden;text-overflow:ellipsis}.empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:240px;color:var(--text-dim)}.load-more[_ngcontent-%COMP%]{display:block;width:100%;padding:10px;background:transparent;border:none;border-top:1px solid var(--border);color:var(--accent);cursor:pointer;font-size:12px;font-family:inherit}.load-more[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.load-actions[_ngcontent-%COMP%]{display:flex;border-top:1px solid var(--border)}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%]{border-top:none}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%] + .load-more[_ngcontent-%COMP%]{border-left:1px solid var(--border)}.history-loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:10px;border-top:1px solid var(--border);color:var(--text-dim);font-size:12px}.pinned-clip[_ngcontent-%COMP%]{overflow:hidden;flex:none;max-width:100%}.table-body[_ngcontent-%COMP%]{position:relative}.graph-clip[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;overflow:hidden;pointer-events:none;z-index:1}.table-head[_ngcontent-%COMP%], .row[_ngcontent-%COMP%]{box-sizing:border-box}.head-cell.cell-desc[_ngcontent-%COMP%], .cell-desc[_ngcontent-%COMP%]{min-width:280px}.empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.table-loading[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%);z-index:3;display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font-size:12px;white-space:nowrap}.spinner[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}}.cell-author[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{margin-right:6px}"],changeDetection:0})};function SI(n,t){n&1&&J(0,"div",2)}function TI(n,t){if(n&1){let e=P();b(0,"button",4),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.onSelect(r))}),p(1),C()}if(n&2){let e=u().$implicit;me("danger",e.danger),W("disabled",e.disabled),c(),q(" ",e.label," ")}}function MI(n,t){if(n&1&&S(0,SI,1,0,"div",2)(1,TI,2,4,"button",3),n&2){let e=t.$implicit;T(e.separator?0:1)}}function kI(n,t){if(n&1){let e=P();b(0,"div",0),B("click",function(){_(e);let r=u();return v(r.closed.emit())})("contextmenu",function(r){_(e);let o=u();return r.preventDefault(),v(o.closed.emit())}),C(),b(1,"div",1),Q(2,MI,2,1,null,null,Vt),C()}if(n&2){let e=u();c(),ie("left",e.left(),"px")("top",e.top(),"px"),c(),K(t.items)}}var Mo=class n{menu=N.required();select=H();closed=H();left=L(()=>{let t=this.menu();return t?Math.max(4,Math.min(t.x,window.innerWidth-250)):0});top=L(()=>{let t=this.menu();if(!t)return 0;let e=t.items.length*30+12;return Math.max(4,Math.min(t.y,window.innerHeight-e-8))});onEscape(){this.menu()&&this.closed.emit()}onSelect(t){t.disabled||!t.action||(this.select.emit(t.action),this.closed.emit())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-context-menu"]],hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{menu:[1,"menu"]},outputs:{select:"select",closed:"closed"},decls:1,vars:1,consts:[[1,"backdrop",3,"click","contextmenu"],["role","menu",1,"menu"],[1,"separator"],["role","menuitem",1,"item",3,"danger","disabled"],["role","menuitem",1,"item",3,"click","disabled"]],template:function(e,i){if(e&1&&S(0,kI,4,4),e&2){let r;T((r=i.menu())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300}.menu[_ngcontent-%COMP%]{position:fixed;min-width:210px;max-width:300px;padding:4px;display:flex;flex-direction:column;background:var(--bg-alt);border:1px solid var(--border);border-radius:6px;box-shadow:0 6px 24px #0000008c;z-index:301}.item[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.item[_ngcontent-%COMP%]:disabled{color:var(--text-dim);opacity:.55;cursor:default}.item.danger[_ngcontent-%COMP%]{color:var(--red)}.item.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f487711f;color:#f48771}.separator[_ngcontent-%COMP%]{height:1px;margin:4px 6px;background:var(--border);flex:none}"],changeDetection:0})};function _t(n){n||(n=I(tt));let t=new de(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe(ji(t))}function yr(n,t){let e=t?.injector??I(wt),i=new Vi(1),r=Ce(()=>{let o;try{o=n()}catch(s){nt(()=>i.error(s));return}nt(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(tt).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Uy=(n,t)=>t.id;function II(n,t){if(n&1){let e=P();f(0,"span",2)(1,"span",7),p(2),h(),f(3,"button",8),E("click",function(){let r=_(e).$implicit,o=u();return v(o.remove.emit(r))}),p(4," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u();c(),k("title",e.description??e.label),c(),O(e.label),c(),k("disabled",i.disabled()),le("aria-label","Remove "+e.label)}}function PI(n,t){if(n&1){let e=P();f(0,"button",9),E("mousedown",function(r){return _(e),v(r.preventDefault())})("click",function(){_(e);let r=u();return v(r.trailingAction.emit())}),p(1),h()}if(n&2){let e=u();me("on",e.trailingPressed()),k("title",e.trailingLabel())("disabled",e.disabled()),le("aria-pressed",e.trailingPressed())("aria-label",e.trailingLabel()),c(),q(" ",e.trailingIcon()," ")}}function OI(n,t){if(n&1&&z(0,"app-error-banner",5),n&2){let e=u();k("message",e.error())}}function RI(n,t){n&1&&(f(0,"li",10),p(1,"Searching..."),h())}function NI(n,t){n&1&&(f(0,"li",10),p(1,"No matches"),h())}function AI(n,t){if(n&1&&(f(0,"span",14),p(1),h()),n&2){let e=u().$implicit;c(),O(e.description)}}function LI(n,t){if(n&1){let e=P();f(0,"li",12),E("mousedown",function(r){let o=_(e).$implicit,s=u(2);return v(s.onSuggestionMouseDown(r,o))}),f(1,"span",13),p(2),h(),S(3,AI,2,1,"span",14),h()}if(n&2){let e=t.$implicit,i=t.$index,r=u(2);me("active",i===r.highlight()),le("aria-selected",i===r.highlight()),c(2),O(e.label),c(),T(e.description?3:-1)}}function FI(n,t){if(n&1&&(f(0,"ul",6),S(1,RI,2,0,"li",10),S(2,NI,2,0,"li",10),Q(3,LI,4,5,"li",11,Uy),h()),n&2){let e=u();c(),T(e.loading()?1:-1),c(),T(!e.loading()&&!e.error()&&!e.suggestions().length?2:-1),c(),K(e.suggestions())}}var ko=class n{placeholder=N("");chips=N([]);suggestions=N([]);loading=N(!1);query=N("");disabled=N(!1);allowFreeText=N(!1);error=N("");trailingIcon=N("");trailingLabel=N("");trailingPressed=N(!1);queryChange=H();select=H();remove=H();trailingAction=H();open=x(!1);highlight=x(0);onInput(t){this.queryChange.emit(t.target.value),this.open.set(!0),this.highlight.set(0)}onKeydown(t){let e=this.suggestions();if(t.key==="ArrowDown"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.min(i+1,e.length-1));else if(t.key==="ArrowUp"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.max(i-1,0));else if(t.key==="Enter"){t.preventDefault();let i=e[this.highlight()];if(i){this.pick(i);return}let r=this.query().trim();this.allowFreeText()&&r&&(this.open.set(!1),this.select.emit({id:r.toLowerCase(),label:r}))}else t.key==="Escape"&&this.open()&&(t.stopPropagation(),this.open.set(!1))}pick(t){this.open.set(!1),this.select.emit(t)}onSuggestionMouseDown(t,e){t.preventDefault(),this.pick(e)}onBlur(){setTimeout(()=>this.open.set(!1),120)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-chip-input"]],inputs:{placeholder:[1,"placeholder"],chips:[1,"chips"],suggestions:[1,"suggestions"],loading:[1,"loading"],query:[1,"query"],disabled:[1,"disabled"],allowFreeText:[1,"allowFreeText"],error:[1,"error"],trailingIcon:[1,"trailingIcon"],trailingLabel:[1,"trailingLabel"],trailingPressed:[1,"trailingPressed"]},outputs:{queryChange:"queryChange",select:"select",remove:"remove",trailingAction:"trailingAction"},decls:8,vars:6,consts:[[1,"chip-input"],[1,"chip-row"],[1,"chip"],["type","text",1,"chip-query",3,"input","keydown","focus","blur","value","disabled"],["type","button",1,"chip-trailing",3,"on","title","disabled"],[3,"message"],["role","listbox",1,"suggestions"],[1,"chip-label",3,"title"],["type","button",1,"chip-remove",3,"click","disabled"],["type","button",1,"chip-trailing",3,"mousedown","click","title","disabled"],[1,"suggestion-hint"],["role","option",3,"active"],["role","option",3,"mousedown"],[1,"suggestion-label"],[1,"suggestion-desc"]],template:function(e,i){e&1&&(f(0,"div",0)(1,"div",1),Q(2,II,5,4,"span",2,Uy),f(4,"input",3),E("input",function(o){return i.onInput(o)})("keydown",function(o){return i.onKeydown(o)})("focus",function(){return i.open.set(!0)})("blur",function(){return i.onBlur()}),h(),S(5,PI,2,7,"button",4),h(),S(6,OI,1,1,"app-error-banner",5),S(7,FI,5,2,"ul",6),h()),e&2&&(c(2),K(i.chips()),c(2),k("value",i.query())("disabled",i.disabled()),le("placeholder",i.chips().length?"":i.placeholder()),c(),T(i.trailingIcon()?5:-1),c(),T(i.error()?6:-1),c(),T(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?7:-1))},dependencies:[at],styles:[".chip-input[_ngcontent-%COMP%]{position:relative}.chip-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px 6px;border:1px solid var(--border);border-radius:4px;background:var(--bg)}.chip-row[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;padding:2px 4px 2px 8px;border-radius:3px;background:var(--bg-hover);font-size:12px;color:var(--text);max-width:100%}.chip-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-remove[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--text-dim);font-size:13px;line-height:1;cursor:pointer;padding:2px 4px}.chip-remove[_ngcontent-%COMP%]:hover:not(:disabled){color:#f48771}.chip-query[_ngcontent-%COMP%]{flex:1;min-width:90px;border:none;background:transparent;color:var(--text);font-size:12px;font-family:inherit;outline:none;padding:2px}.chip-trailing[_ngcontent-%COMP%]{flex:none;width:22px;height:22px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);font-size:14px;line-height:1;cursor:pointer}.chip-trailing[_ngcontent-%COMP%]:hover:not(:disabled), .chip-trailing.on[_ngcontent-%COMP%]{color:#dcb67a;background:#dcb67a1f}.suggestions[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:20;margin:4px 0 0;padding:4px 0;list-style:none;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000080;max-height:200px;overflow-y:auto}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:6px 10px;font-size:12px;cursor:pointer}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .suggestions[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:var(--bg-hover)}.suggestion-hint[_ngcontent-%COMP%]{color:var(--text-dim);cursor:default}.suggestion-label[_ngcontent-%COMP%]{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.suggestion-desc[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"],changeDetection:0})};var Gh=(n,t)=>t.name;function VI(n,t){if(n&1&&(f(0,"a",10),p(1," Open in Azure DevOps "),h()),n&2){let e=u();k("href",e.url,pr)}}function BI(n,t){if(n&1&&(f(0,"p",14),p(1),h()),n&2){let e=t.$implicit;c(),O(e)}}function jI(n,t){if(n&1&&Q(0,BI,2,1,"p",14,Rt),n&2){let e=u();K(e.warnings)}}function $I(n,t){if(n&1){let e=P();f(0,"div",8)(1,"p",9),p(2),h(),S(3,VI,2,1,"a",10),f(4,"p",11),p(5),h(),S(6,jI,2,0),h(),f(7,"div",12)(8,"button",13),E("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(9,"Close"),h()()}if(n&2){let e=t;c(2),q("\u2714 Pull Request #",e.id," created"),c(),T(e.url?3:-1),c(2),q("Source branch: ",e.branch),c(),T(e.warnings!=null&&e.warnings.length?6:-1)}}function HI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.source()===e.name),c(),q(" ",e.name," ")}}function UI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.source()===e.name),c(),q(" ",e.name," ")}}function zI(n,t){n&1&&(f(0,"p",11),p(1," A new branch (pr/xxxxxx) will be created from the current HEAD and pushed before the pull request is created. "),h())}function GI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.target()===e.name),c(),q(" ",e.name," ")}}function WI(n,t){if(n&1&&(f(0,"p",11),p(1),h()),n&2){let e=u(2);c(),q('Press Enter to add "',e.tagQuery().trim(),'" as a new tag.')}}function qI(n,t){if(n&1&&z(0,"app-error-banner",30),n&2){let e=u(2);k("message",e.error())}}function ZI(n,t){if(n&1){let e=P();f(0,"div",15)(1,"label",16)(2,"span",17),p(3,"Title"),h(),f(4,"input",18),E("input",function(r){_(e);let o=u();return v(o.onTitleInput(r))}),h()(),f(5,"label",16)(6,"span",17),p(7,"Description"),h(),f(8,"textarea",19),E("input",function(r){_(e);let o=u();return v(o.onDescriptionInput(r))}),h()(),f(9,"label",16)(10,"span",17),p(11,"Source branch"),h(),f(12,"select",20),E("change",function(r){_(e);let o=u();return v(o.onSourceChange(r))}),f(13,"optgroup",21)(14,"option",22),p(15," \u2795 Create new branch (random name) "),h()(),f(16,"optgroup",23),Q(17,HI,2,3,"option",22,Gh),h(),f(19,"optgroup",24),Q(20,UI,2,3,"option",22,Gh),h()()(),S(22,zI,2,0,"p",11),f(23,"label",16)(24,"span",17),p(25,"Target branch"),h(),f(26,"select",20),E("change",function(r){_(e);let o=u();return v(o.onTargetChange(r))}),Q(27,GI,2,3,"option",22,Gh),h()(),f(29,"label",25)(30,"input",26),E("change",function(r){_(e);let o=u();return v(o.isDraft.set(r.target.checked))}),h(),p(31," Create as draft "),h(),f(32,"label",16)(33,"span",17),p(34,"Required reviewers"),h(),f(35,"app-chip-input",27),E("queryChange",function(r){_(e);let o=u();return v(o.requiredReviewerQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addRequiredReviewer(r))})("remove",function(r){_(e);let o=u();return v(o.removeRequiredReviewer(r))}),h()(),f(36,"label",16)(37,"span",17),p(38,"Optional reviewers"),h(),f(39,"app-chip-input",27),E("queryChange",function(r){_(e);let o=u();return v(o.optionalReviewerQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addOptionalReviewer(r))})("remove",function(r){_(e);let o=u();return v(o.removeOptionalReviewer(r))}),h()(),f(40,"label",16)(41,"span",17),p(42,"Work items"),h(),f(43,"app-chip-input",28),E("queryChange",function(r){_(e);let o=u();return v(o.workItemQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addWorkItem(r))})("remove",function(r){_(e);let o=u();return v(o.removeWorkItem(r))}),h()(),f(44,"label",16)(45,"span",17),p(46,"Tags"),h(),f(47,"app-chip-input",29),E("queryChange",function(r){_(e);let o=u();return v(o.tagQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addTag(r))})("remove",function(r){_(e);let o=u();return v(o.removeTag(r))}),h()(),S(48,WI,2,1,"p",11),S(49,qI,1,1,"app-error-banner",30),h(),f(50,"div",12)(51,"button",31),E("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(52," Cancel "),h(),f(53,"button",32),E("click",function(){_(e);let r=u();return v(r.create())}),p(54),h()()}if(n&2){let e=u();c(4),k("value",e.title()),c(4),k("value",e.description()),c(6),k("value",e.newBranchValue)("selected",e.source()===e.newBranchValue),c(3),K(e.localBranches()),c(3),K(e.remoteBranches()),c(2),T(e.source()===e.newBranchValue?22:-1),c(5),K(e.remoteBranches()),c(3),k("checked",e.isDraft())("disabled",e.creating()),c(5),k("chips",e.requiredReviewers())("suggestions",e.requiredReviewerSuggestions())("loading",e.requiredReviewersLoading())("error",e.requiredReviewersError())("query",e.requiredReviewerQuery()),c(4),k("chips",e.optionalReviewers())("suggestions",e.optionalReviewerSuggestions())("loading",e.optionalReviewersLoading())("error",e.optionalReviewersError())("query",e.optionalReviewerQuery()),c(4),k("chips",e.workItemChips())("suggestions",e.workItemSuggestions())("loading",e.workItemsLoading())("error",e.workItemsError())("query",e.workItemQuery()),c(4),k("chips",e.tagChips())("suggestions",e.filteredTagSuggestions())("loading",e.tagsLoading())("error",e.tagsError())("query",e.tagQuery())("allowFreeText",!0),c(),T(e.tagQuery().trim()&&!e.tagSuggestions().length&&!e.tagsLoading()?48:-1),c(),T(e.error()?49:-1),c(2),k("disabled",e.creating()),c(2),k("disabled",!e.canCreate()),c(),q(" ",e.creating()?"Creating...":"Create Pull Request"," ")}}var zy="__new__",cd=class n{git=I(lt);destroyRef=I(tt);branches=N.required();closed=H();created=H();newBranchValue=zy;isDraft=x(!1);title=x("");description=x("");source=x("");target=x("");creating=x(!1);error=x("");result=x(null);requiredReviewers=x([]);optionalReviewers=x([]);workItemChips=x([]);tagChips=x([]);requiredReviewerQuery=x("");optionalReviewerQuery=x("");workItemQuery=x("");tagQuery=x("");requiredReviewerSuggestions=x([]);optionalReviewerSuggestions=x([]);workItemSuggestions=x([]);tagSuggestions=x([]);requiredReviewersLoading=x(!1);optionalReviewersLoading=x(!1);requiredReviewersError=x("");optionalReviewersError=x("");workItemsError=x("");tagsError=x("");workItemsLoading=x(!1);tagsLoading=x(!1);localBranches=L(()=>this.branches().filter(t=>!t.remote));remoteBranches=L(()=>this.branches().filter(t=>t.remote));canCreate=L(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=L(()=>{let t=this.tagQuery().trim().toLowerCase();return t?this.tagSuggestions().filter(e=>e.label.toLowerCase().includes(t)):this.tagSuggestions()});constructor(){this.bindLookup(this.requiredReviewerQuery,this.requiredReviewerSuggestions,this.requiredReviewersLoading,this.requiredReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.optionalReviewerQuery,this.optionalReviewerSuggestions,this.optionalReviewersLoading,this.optionalReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.workItemQuery,this.workItemSuggestions,this.workItemsLoading,this.workItemsError,t=>this.git.searchWorkItems(t),t=>({id:String(t.id),label:`#${t.id} ${t.title}`,description:t.state}),1)}bindLookup(t,e,i,r,o,s,a){yr(t).pipe(yt(l=>(e.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?we([]):new de(d=>{let m=setTimeout(()=>{d.next(l.trim()),d.complete()},300);return()=>clearTimeout(m)}).pipe(yt(o),ot(d=>(r.set(d?.error?.error||"Unable to load suggestions. Try searching again."),we([])))))),_t(this.destroyRef)).subscribe(l=>{e.set(l.map(s)),i.set(!1)})}ngOnInit(){let t=this.branches(),e=t.find(s=>s.current&&!s.remote),i=t.find(s=>!s.remote);this.source.set(e?.name??i?.name??""),this.title()||this.title.set(e?.name??"");let r=t.filter(s=>s.remote),o=r.find(s=>s.name==="origin/main")??r.find(s=>s.name==="origin/master");this.target.set(o?.name??r[0]?.name??""),this.tagsLoading.set(!0),this.git.getPrTags().pipe(_t(this.destroyRef)).subscribe({next:s=>{this.tagSuggestions.set(s.map(a=>({id:a.name.toLowerCase(),label:a.name}))),this.tagsLoading.set(!1)},error:s=>{this.tagsError.set(s?.error?.error||"Unable to load tags. You can still add a tag with Enter."),this.tagSuggestions.set([]),this.tagsLoading.set(!1)}})}onEscape(){this.creating()||this.closed.emit()}onBackdropClick(){this.creating()||this.closed.emit()}onTitleInput(t){this.title.set(t.target.value)}onDescriptionInput(t){this.description.set(t.target.value)}onSourceChange(t){this.source.set(t.target.value)}onTargetChange(t){this.target.set(t.target.value)}isReviewerSelected(t){return[...this.requiredReviewers(),...this.optionalReviewers()].some(e=>e.id===t)}addRequiredReviewer(t){this.requiredReviewerQuery.set(""),this.requiredReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.requiredReviewers.update(e=>[...e,t])}addOptionalReviewer(t){this.optionalReviewerQuery.set(""),this.optionalReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.optionalReviewers.update(e=>[...e,t])}removeRequiredReviewer(t){this.requiredReviewers.update(e=>e.filter(i=>i.id!==t.id))}removeOptionalReviewer(t){this.optionalReviewers.update(e=>e.filter(i=>i.id!==t.id))}addWorkItem(t){this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.workItemChips().some(e=>e.id===t.id)||this.workItemChips.update(e=>[...e,t])}removeWorkItem(t){this.workItemChips.update(e=>e.filter(i=>i.id!==t.id))}addTag(t){this.tagQuery.set(""),this.tagChips().some(e=>e.id===t.id)||this.tagChips.update(e=>[...e,t])}removeTag(t){this.tagChips.update(e=>e.filter(i=>i.id!==t.id))}create(){if(!this.canCreate())return;let t=this.source()===zy;this.creating.set(!0),this.error.set("");let e=[...this.requiredReviewers().map(o=>({id:o.id,required:!0})),...this.optionalReviewers().map(o=>({id:o.id,required:!1}))],i=this.workItemChips().map(o=>Number(o.id)).filter(o=>Number.isInteger(o)&&o>0),r=this.tagChips().map(o=>o.label);this.git.createPr({sourceBranch:t?"":this.source(),targetBranch:this.target(),title:this.title().trim()||void 0,description:this.description().trim()||void 0,newBranch:t,isDraft:this.isDraft(),reviewers:e.length?e:void 0,workItems:i.length?i:void 0,labels:r.length?r:void 0}).subscribe({next:o=>{this.creating.set(!1),this.result.set(o),this.created.emit(o)},error:o=>{this.creating.set(!1),this.error.set(this.errorMessage(o))}})}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{branches:[1,"branches"]},outputs:{closed:"closed",created:"created"},decls:11,vars:2,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","create-pr-title",1,"dialog"],[1,"dialog-head"],["id","create-pr-title",1,"title"],["type","button","title","Close","aria-label","Close dialog",1,"icon-btn",3,"click","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"success"],[1,"success-line"],["target","_blank","rel","noopener",1,"pr-link",3,"href"],[1,"hint"],[1,"actions"],["type","button",1,"btn","btn-primary",3,"click"],[1,"warning"],[1,"form"],[1,"field"],[1,"field-label"],["type","text","placeholder","Pull request title",1,"input",3,"input","value"],["rows","3","placeholder","Optional description",1,"input","description",3,"input","value"],[1,"input",3,"change"],["label","New branch"],[3,"value","selected"],["label","Local branches"],["label","Remote branches"],[1,"draft-option"],["type","checkbox",3,"change","checked","disabled"],["placeholder","Search users by name or email",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Search by id or title",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Add tags (Enter to add)",3,"queryChange","select","remove","chips","suggestions","loading","error","query","allowFreeText"],[3,"message"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(f(0,"div",0),E("click",function(){return i.onBackdropClick()}),h(),f(1,"div",1)(2,"header",2)(3,"h3",3),p(4,"Create Pull Request"),h(),f(5,"button",4),E("click",function(){return i.closed.emit()}),F(),f(6,"svg",5),z(7,"line",6)(8,"line",7),h()()(),S(9,$I,10,4)(10,ZI,55,33),h()),e&2){let r;c(5),k("disabled",i.creating()),c(4),T((r=i.result())?9:10,r)}},dependencies:[at,ko],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.field-label[_ngcontent-%COMP%]{font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}textarea.description[_ngcontent-%COMP%]{resize:vertical;min-height:60px}.hint[_ngcontent-%COMP%]{margin:-6px 0 0;font-size:11px;color:var(--text-dim)}.warning[_ngcontent-%COMP%]{margin:0;padding:8px 10px;border:1px solid #8a6c10;border-radius:4px;background:#8a6c1026;color:#dcb67a;font-size:12px;word-break:break-word}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.success[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.success-line[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#4ec9b0}.pr-link[_ngcontent-%COMP%]{font-size:13px;color:var(--accent);text-decoration:none}.pr-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var YI=(n,t)=>t.name;function QI(n,t){n&1&&(b(0,"p"),p(1,"Repository preferences and Git configuration."),C())}function KI(n,t){if(n&1&&(b(0,"div",5),p(1),C()),n&2){let e=u();c(),O(e.error())}}function XI(n,t){if(n&1){let e=P();b(0,"div",30)(1,"strong",31),p(2),C(),b(3,"span",32),p(4),C(),b(5,"span"),p(6,"Fetch"),C(),b(7,"span",33)(8,"button",34),B("click",function(){let r=_(e).$implicit,o=u(2);return v(o.editRemote(r))}),p(9,"Edit"),C(),b(10,"button",35),B("click",function(){let r=_(e).$implicit,o=u(2);return v(o.removeRemote(r.name))}),p(11,"Remove"),C()()(),b(12,"div",36),J(13,"span"),b(14,"span",32),p(15),C(),b(16,"span"),p(17,"Push"),C(),J(18,"span"),C()}if(n&2){let e=t.$implicit;c(2),O(e.name),c(2),O(e.fetchUrl),c(11),O(e.pushUrl)}}function JI(n,t){n&1&&(b(0,"p",19),p(1,"No remotes configured."),C())}function eP(n,t){if(n&1){let e=P();b(0,"div",13)(1,"span"),p(2,"Issue regex"),C(),b(3,"code"),p(4),C(),b(5,"span"),p(6,"Issue URL"),C(),b(7,"code"),p(8),C(),b(9,"span"),p(10,"Scope"),C(),b(11,"strong"),p(12),C()(),b(13,"div",14)(14,"button",15),B("click",function(){_(e);let r=u(2);return v(r.editIssueLinking())}),p(15,"Edit"),C(),b(16,"button",37),B("click",function(){_(e);let r=u(2);return v(r.removeIssueLinking())}),p(17,"Remove"),C()()}if(n&2){let e=t;c(4),O(e.regex),c(4),O(e.url),c(4),O(e.useGlobally?"Global":"This repository")}}function tP(n,t){if(n&1){let e=P();b(0,"div",14)(1,"button",15),B("click",function(){_(e);let r=u(2);return v(r.editIssueLinking())}),p(2,"+ Add Issue Linking"),C()()}}function nP(n,t){if(n&1){let e=P();b(0,"div",6)(1,"fieldset")(2,"legend"),p(3,"Repository"),C(),b(4,"label",7)(5,"span")(6,"strong"),p(7,"Automatically refresh"),C(),b(8,"small"),p(9,"Reload changes made outside Guito."),C()(),b(10,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"autoReload"))}),C()(),b(11,"label",7)(12,"span")(13,"strong"),p(14,"Show Git graph"),C(),b(15,"small"),p(16,"Display branch lines beside commit history."),C()(),b(17,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showGraph"))}),C()(),b(18,"label",7)(19,"span")(20,"strong"),p(21,"Show stashes"),C(),b(22,"small"),p(23,"Pin stash entries above commit history."),C()(),b(24,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showStashes"))}),C()(),b(25,"label",7)(26,"span")(27,"strong"),p(28,"Show tags"),C(),b(29,"small"),p(30,"Show tag badges attached to commits."),C()(),b(31,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showTags"))}),C()(),b(32,"label",7)(33,"span")(34,"strong"),p(35,"Show remote branches"),C(),b(36,"small"),p(37,"Include remote branches in the repository panel and branch pills."),C()(),b(38,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showRemoteBranches"))}),C()(),b(39,"label",7)(40,"span")(41,"strong"),p(42,"Expand repository panel sections"),C(),b(43,"small"),p(44,"Open the left-side panel with all sections expanded."),C()(),b(45,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"sidePanelSectionsExpanded"))}),C()(),b(46,"label",9)(47,"span")(48,"strong"),p(49,"Search mode"),C(),b(50,"small"),p(51,"Navigate jumps between matches with arrows; filter shows only matching commits."),C()(),b(52,"select",10),B("change",function(r){_(e);let o=u();return v(o.changeSearchMode(r.target))}),b(53,"option",11),p(54,"Navigate matches"),C(),b(55,"option",12),p(56,"Filter matches"),C()()(),b(57,"label",7)(58,"span")(59,"strong"),p(60,"Case-sensitive search"),C(),b(61,"small"),p(62,"Only match commits and repository panel items with the same uppercase and lowercase letters and accents."),C()(),b(63,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"searchCaseSensitive"))}),C()()(),b(64,"fieldset")(65,"legend"),p(66,"User details"),C(),b(67,"div",13)(68,"span"),p(69,"User name"),C(),b(70,"strong"),p(71),C(),b(72,"span"),p(73,"User email"),C(),b(74,"strong"),p(75),C()(),b(76,"div",14)(77,"button",15),B("click",function(){_(e);let r=u();return v(r.editIdentity())}),p(78,"Edit"),C(),b(79,"button",16),B("click",function(){_(e);let r=u();return v(r.removeIdentity())}),p(80,"Remove"),C()()(),b(81,"fieldset")(82,"legend"),p(83,"Remote configuration"),C(),b(84,"div",17)(85,"div",18)(86,"strong"),p(87,"Remote"),C(),b(88,"strong"),p(89,"URL"),C(),b(90,"strong"),p(91,"Type"),C(),b(92,"strong"),p(93,"Action"),C()(),Q(94,XI,19,3,null,null,YI,!1,JI,2,0,"p",19),C(),b(97,"div",14)(98,"button",15),B("click",function(){_(e);let r=u();return v(r.editRemote())}),p(99,"+ Add Remote"),C()()(),b(100,"fieldset")(101,"legend"),p(102,"Issue linking"),C(),b(103,"p",20),p(104,"Convert issue numbers in commit messages into links to your issue tracking system."),C(),S(105,eP,18,3)(106,tP,3,0,"div",14),C(),b(107,"fieldset")(108,"legend"),p(109,"Branches and tags"),C(),b(110,"label",21)(111,"input",22),B("change",function(){_(e);let r=u();return v(r.refListView.set("flat"))}),C(),b(112,"span")(113,"strong"),p(114,"Flat list"),C(),b(115,"small"),p(116,"Show each branch and tag with its full name."),C()()(),b(117,"label",21)(118,"input",22),B("change",function(){_(e);let r=u();return v(r.refListView.set("tree"))}),C(),b(119,"span")(120,"strong"),p(121,"Directory tree"),C(),b(122,"small"),p(123,"Group branches and tags into collapsible namespace folders."),C()()()(),b(124,"fieldset")(125,"legend"),p(126,"Changed files"),C(),b(127,"label",21)(128,"input",23),B("change",function(){_(e);let r=u();return v(r.fileListView.set("flat"))}),C(),b(129,"span")(130,"strong"),p(131,"Flat list"),C(),b(132,"small"),p(133,"Show each file with its full path."),C()()(),b(134,"label",21)(135,"input",23),B("change",function(){_(e);let r=u();return v(r.fileListView.set("tree"))}),C(),b(136,"span")(137,"strong"),p(138,"Directory tree"),C(),b(139,"small"),p(140,"Group files into collapsible folders."),C()()()(),b(141,"fieldset")(142,"legend"),p(143,"Azure DevOps"),C(),b(144,"label",24)(145,"span")(146,"strong"),p(147,"Server URL"),C(),b(148,"small"),p(149,"Enables pull request creation for an on-prem Azure DevOps Server."),C()(),b(150,"input",25),B("input",function(r){_(e);let o=u();return v(o.azureDevOpsUrl.set(r.target.value))}),C()(),b(151,"label",26)(152,"span")(153,"strong"),p(154,"Automatic PR branch name"),C(),b(155,"small"),p(156,"Used when creating a new branch for a pull request. Variables: username, randomstring, branch, targetbranch, title, repository, date, time, and timestamp (wrapped as dollar-brace placeholders)."),C()(),b(157,"input",27),B("input",function(r){_(e);let o=u();return v(o.prBranchNameTemplate.set(r.target.value))}),C()(),b(158,"label",7)(159,"span")(160,"strong"),p(161,"Allow merge completion"),C(),b(162,"small"),p(163,'Offer the "No fast-forward (merge commit)" and "Semi-linear merge" pull request completion strategies.'),C()(),b(164,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"allowMerge"))}),C()()()(),b(165,"footer")(166,"button",28),B("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(167,"Cancel"),C(),b(168,"button",29),B("click",function(){_(e);let r=u();return v(r.save())}),p(169),C()()}if(n&2){let e,i=u();c(10),W("checked",i.autoReload()),c(7),W("checked",i.showGraph()),c(7),W("checked",i.showStashes()),c(7),W("checked",i.showTags()),c(7),W("checked",i.showRemoteBranches()),c(7),W("checked",i.sidePanelSectionsExpanded()),c(7),W("value",i.searchMode()),c(11),W("checked",i.searchCaseSensitive()),c(8),O(i.identity().name||"Not configured"),c(4),O(i.identity().email||"Not configured"),c(4),W("disabled",i.busy()),c(15),K(i.remotes()),c(11),T((e=i.settings().issueLinking)?105:106,e),c(6),W("checked",i.refListView()==="flat"),c(7),W("checked",i.refListView()==="tree"),c(10),W("checked",i.fileListView()==="flat"),c(7),W("checked",i.fileListView()==="tree"),c(15),W("value",i.azureDevOpsUrl()),c(7),W("value",i.prBranchNameTemplate()),c(7),W("checked",i.allowMerge()),c(2),W("disabled",i.saving()),c(2),W("disabled",i.saving()||i.busy()),c(),O(i.saving()?"Saving...":"Save settings")}}function iP(n,t){if(n&1){let e=P();b(0,"label",39)(1,"span")(2,"strong"),p(3,"User name"),C()(),b(4,"input",40),B("input",function(r){_(e);let o=u(2);return v(o.userName.set(r.target.value))}),C()(),b(5,"label",39)(6,"span")(7,"strong"),p(8,"User email"),C()(),b(9,"input",41),B("input",function(r){_(e);let o=u(2);return v(o.userEmail.set(r.target.value))}),C()()}if(n&2){let e=u(2);c(4),W("value",e.userName()),c(5),W("value",e.userEmail())}}function rP(n,t){if(n&1){let e=P();b(0,"label",39)(1,"span")(2,"strong"),p(3,"Remote name"),C()(),b(4,"input",42),B("input",function(r){_(e);let o=u(2);return v(o.remoteName.set(r.target.value))}),C()(),b(5,"label",39)(6,"span")(7,"strong"),p(8,"Fetch URL"),C()(),b(9,"input",43),B("input",function(r){_(e);let o=u(2);return v(o.fetchUrl.set(r.target.value))}),C()(),b(10,"label",39)(11,"span")(12,"strong"),p(13,"Push URL"),C(),b(14,"small"),p(15,"Leave blank to use the fetch URL."),C()(),b(16,"input",44),B("input",function(r){_(e);let o=u(2);return v(o.pushUrl.set(r.target.value))}),C()()}if(n&2){let e=u(2);c(4),W("value",e.remoteName()),c(5),W("value",e.fetchUrl()),c(7),W("value",e.pushUrl())}}function oP(n,t){if(n&1){let e=P();b(0,"p",20),p(1,"For example, regex "),b(2,"code"),p(3,"#(\\d+)"),C(),p(4," and URL "),b(5,"code"),p(6,"https://github.com/owner/repo/issues/$1"),C(),p(7," turn #123 into a link."),C(),b(8,"label",39)(9,"span")(10,"strong"),p(11,"Issue regex"),C()(),b(12,"input",45),B("input",function(r){_(e);let o=u(2);return v(o.issueRegex.set(r.target.value))}),C()(),b(13,"label",39)(14,"span")(15,"strong"),p(16,"Issue URL"),C()(),b(17,"input",46),B("input",function(r){_(e);let o=u(2);return v(o.issueUrl.set(r.target.value))}),C()(),b(18,"label",21)(19,"input",8),B("change",function(r){_(e);let o=u(2);return v(o.issueGlobal.set(r.target.checked))}),C(),b(20,"span")(21,"strong"),p(22,"Use globally"),C(),b(23,"small"),p(24,"Apply this rule to repositories without their own rule."),C()()()}if(n&2){let e=u(2);c(12),W("value",e.issueRegex()),c(5),W("value",e.issueUrl()),c(2),W("checked",e.issueGlobal())}}function sP(n,t){if(n&1){let e=P();b(0,"div",38),S(1,iP,10,2)(2,rP,17,3)(3,oP,25,3),C(),b(4,"footer")(5,"button",28),B("click",function(){_(e);let r=u();return v(r.mode.set("main"))}),p(6,"Cancel"),C(),b(7,"button",29),B("click",function(){_(e);let r=u();return v(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),p(8),C()()}if(n&2){let e=u();c(),T(e.mode()==="identity"?1:e.mode()==="remote"?2:3),c(4),W("disabled",e.busy()),c(2),W("disabled",e.busy()),c(),O(e.busy()?"Saving...":"Save")}}var dd=class n{git=I(lt);settings=N.required();identity=N.required();saving=N(!1);saved=H();settingsUpdated=H();identityChanged=H();repositoryChanged=H();closed=H();azureDevOpsUrl=x("");prBranchNameTemplate=x("pr/${randomstring}");autoReload=x(!0);showGraph=x(!0);showStashes=x(!1);showTags=x(!0);showRemoteBranches=x(!0);fileListView=x("flat");refListView=x("flat");sidePanelSectionsExpanded=x(!0);searchMode=x("navigate");searchCaseSensitive=x(!1);allowMerge=x(!0);remotes=x([]);busy=x(!1);error=x("");mode=x("main");userName=x("");userEmail=x("");originalRemoteName=x("");remoteName=x("");fetchUrl=x("");pushUrl=x("");issueRegex=x("");issueUrl=x("");issueGlobal=x(!1);remotesLoaded=!1;constructor(){Ce(()=>{let t=this.settings();this.azureDevOpsUrl.set(t.azureDevOpsUrl??""),this.prBranchNameTemplate.set(t.prBranchNameTemplate??"pr/${randomstring}"),this.autoReload.set(t.autoReload!==!1),this.showGraph.set(t.showGraph!==!1),this.showStashes.set(t.showStashes===!0),this.showTags.set(t.showTags!==!1),this.showRemoteBranches.set(t.showRemoteBranches!==!1),this.fileListView.set(t.fileListView==="tree"?"tree":"flat"),this.refListView.set(t.refListView==="tree"?"tree":"flat"),this.sidePanelSectionsExpanded.set(t.sidePanelSectionsExpanded!==!1),this.searchMode.set(t.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(t.searchCaseSensitive===!0),this.allowMerge.set(t.allowMerge!==!1),this.remotesLoaded||(this.remotesLoaded=!0,this.loadRemotes())})}onEscape(){this.saving()||this.busy()||(this.mode()==="main"?this.closed.emit():this.mode.set("main"))}setChecked(t,e){this[e].set(t.checked)}save(){this.saved.emit({azureDevOpsUrl:this.azureDevOpsUrl().trim(),prBranchNameTemplate:this.prBranchNameTemplate().trim(),autoReload:this.autoReload(),showGraph:this.showGraph(),showStashes:this.showStashes(),showTags:this.showTags(),showRemoteBranches:this.showRemoteBranches(),fileListView:this.fileListView(),refListView:this.refListView(),sidePanelSectionsExpanded:this.sidePanelSectionsExpanded(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive(),allowMerge:this.allowMerge()})}changeSearchMode(t){let e=t.value;this.searchMode.set(e==="filter"?"filter":"navigate")}editIdentity(){this.userName.set(this.identity().name),this.userEmail.set(this.identity().email),this.error.set(""),this.mode.set("identity")}saveIdentity(){this.run(this.git.saveIdentity({name:this.userName().trim(),email:this.userEmail().trim()}),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeIdentity(){window.confirm("Remove the repository-specific Git user name and email?")&&this.run(this.git.removeIdentity(),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit()})}editRemote(t){this.originalRemoteName.set(t?.name??""),this.remoteName.set(t?.name??""),this.fetchUrl.set(t?.fetchUrl??""),this.pushUrl.set(t?.pushUrl??""),this.error.set(""),this.mode.set("remote")}saveRemote(){this.run(this.git.saveRemote({originalName:this.originalRemoteName()||void 0,name:this.remoteName().trim(),fetchUrl:this.fetchUrl().trim(),pushUrl:this.pushUrl().trim()}),t=>{this.remotes.set(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeRemote(t){window.confirm(`Remove the remote "${t}" from this repository?`)&&this.run(this.git.removeRemote(t),e=>{this.remotes.set(e),this.repositoryChanged.emit()})}editIssueLinking(){let t=this.settings().issueLinking;this.issueRegex.set(t?.regex??"#(\\d+)"),this.issueUrl.set(t?.url??""),this.issueGlobal.set(t?.useGlobally??!1),this.error.set(""),this.mode.set("issue")}saveIssueLinking(){let t={regex:this.issueRegex().trim(),url:this.issueUrl().trim(),useGlobally:this.issueGlobal()};this.run(this.git.saveSettings({issueLinking:t}),e=>{this.settingsUpdated.emit(e),this.mode.set("main")})}removeIssueLinking(){window.confirm("Remove this issue-linking rule?")&&this.run(this.git.saveSettings({issueLinking:null,issueLinkingGlobal:this.settings().issueLinking?.useGlobally??!1}),t=>this.settingsUpdated.emit(t))}loadRemotes(){this.git.getRemotes().subscribe({next:t=>this.remotes.set(t),error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t.subscribe({next:i=>{this.busy.set(!1),e(i)},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}errorMessage(t){return t?.error?.error??t?.message??"The setting could not be saved."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{settings:[1,"settings"],identity:[1,"identity"],saving:[1,"saving"]},outputs:{saved:"saved",settingsUpdated:"settingsUpdated",identityChanged:"identityChanged",repositoryChanged:"repositoryChanged",closed:"closed"},decls:12,vars:5,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","settings-title",1,"dialog"],[1,"dialog-header"],["id","settings-title"],["type","button","aria-label","Close settings",1,"close-btn",3,"click","disabled"],["role","alert",1,"dialog-error"],[1,"settings-body"],[1,"setting-row"],["type","checkbox",3,"change","checked"],["for","search-mode",1,"setting-row"],["id","search-mode",3,"change","value"],["value","navigate"],["value","filter"],[1,"detail-grid"],[1,"inline-actions"],["type","button",3,"click"],["type","button",1,"danger-link",3,"click","disabled"],["role","table","aria-label","Git remotes",1,"remote-table"],["role","row",1,"remote-head"],[1,"empty"],[1,"section-help"],[1,"choice"],["type","radio","name","ref-view",3,"change","checked"],["type","radio","name","file-view",3,"change","checked"],["for","azure-devops-url",1,"text-setting"],["id","azure-devops-url","type","url","placeholder","https://server/DefaultCollection",3,"input","value"],["for","pr-branch-name-template",1,"text-setting"],["id","pr-branch-name-template","type","text","maxlength","200",3,"input","value"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","primary",3,"click","disabled"],["role","row",1,"remote-row"],[1,"remote-name"],[1,"remote-url"],[1,"row-actions"],["type","button","title","Edit remote",3,"click"],["type","button","title","Remove remote",1,"danger-link",3,"click"],["role","row",1,"remote-row","push-row"],["type","button",1,"danger-link",3,"click"],[1,"editor-body"],[1,"text-setting"],["aria-label","User name",3,"input","value"],["aria-label","User email","type","email",3,"input","value"],["aria-label","Remote name","placeholder","origin",3,"input","value"],["aria-label","Fetch URL",3,"input","value"],["aria-label","Push URL",3,"input","value"],["aria-label","Issue regex",3,"input","value"],["aria-label","Issue URL","type","url",3,"input","value"]],template:function(e,i){e&1&&(b(0,"div",0),B("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),C(),b(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),p(5),C(),S(6,QI,2,0,"p"),C(),b(7,"button",4),B("click",function(){return i.closed.emit()}),p(8,"\xD7"),C()(),S(9,KI,2,1,"div",5),S(10,nP,170,23)(11,sP,9,4),C()),e&2&&(c(5),O(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),c(),T(i.mode()==="main"?6:-1),c(),W("disabled",i.saving()||i.busy()),c(2),T(i.error()?9:-1),c(),T(i.mode()==="main"?10:11))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000094}.dialog[_ngcontent-%COMP%]{position:fixed;z-index:401;top:50%;left:50%;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 32px));max-height:min(820px,calc(100vh - 32px));display:flex;flex-direction:column;overflow:hidden;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 14px 42px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 16px;border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:18px}p[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--text-dim);font-size:12px}.close-btn[_ngcontent-%COMP%]{width:28px;height:28px;border:0;border-radius:4px;color:var(--text);background:transparent;font:22px/1 inherit;cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.settings-body[_ngcontent-%COMP%], .editor-body[_ngcontent-%COMP%]{min-height:0;padding:18px 22px;overflow-y:auto}.editor-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.dialog-error[_ngcontent-%COMP%]{margin:12px 22px 0;padding:8px 10px;color:#f48771;background:#f487711a;border:1px solid rgba(244,135,113,.35);border-radius:4px;font-size:12px}fieldset[_ngcontent-%COMP%]{margin:0 0 20px;padding:0;border:0}fieldset[_ngcontent-%COMP%]:last-child{margin-bottom:0}legend[_ngcontent-%COMP%]{width:100%;margin-bottom:6px;padding-bottom:7px;color:var(--text-bright);border-bottom:1px solid var(--border);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.setting-row[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:10px 4px}.setting-row[_ngcontent-%COMP%]{justify-content:space-between;cursor:pointer}.setting-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:3px}strong[_ngcontent-%COMP%]{color:var(--text-bright);font-size:13px;font-weight:600}small[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;line-height:1.4}input[type=checkbox][_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]{accent-color:var(--accent);flex:none}select[_ngcontent-%COMP%]{min-width:150px;padding:6px 28px 6px 9px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}select[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.choice[_ngcontent-%COMP%]{align-items:flex-start;cursor:pointer}.choice[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:3px}.detail-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:110px minmax(0,1fr);gap:7px 12px;padding:10px 4px;font-size:12px}.detail-grid[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--text-dim)}.detail-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .detail-grid[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{overflow:hidden;color:var(--text);text-overflow:ellipsis;white-space:nowrap}.inline-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:14px;padding:5px 0}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;color:var(--text);background:transparent;border:0;border-radius:3px;font:inherit;cursor:pointer}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.danger-link[_ngcontent-%COMP%]{color:#f48771!important}.remote-table[_ngcontent-%COMP%]{min-width:0;padding:8px 4px 2px;font-size:12px}.remote-head[_ngcontent-%COMP%], .remote-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:90px minmax(150px,1fr) 55px 120px;align-items:center;gap:8px;min-height:30px;border-bottom:1px solid var(--border)}.remote-head[_ngcontent-%COMP%], .remote-name[_ngcontent-%COMP%]{color:var(--text-bright)}.remote-url[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.push-row[_ngcontent-%COMP%]{color:var(--text-dim)}.row-actions[_ngcontent-%COMP%]{display:flex}.section-help[_ngcontent-%COMP%]{margin:8px 4px;line-height:1.5}.empty[_ngcontent-%COMP%]{margin:10px 0;color:var(--text-dim);text-align:center}.text-setting[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column;gap:8px}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;padding:8px 10px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid var(--border)}.btn[_ngcontent-%COMP%]{padding:7px 14px;color:var(--text);background:transparent;border:1px solid var(--border);border-radius:4px;font:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:var(--bg-hover)}.btn.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent);border-color:var(--accent)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}@media(max-width:520px){.dialog[_ngcontent-%COMP%]{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.dialog-header[_ngcontent-%COMP%], .settings-body[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{padding-left:14px;padding-right:14px}}"],changeDetection:0})};var aP=["inputEl"],lP=["searchEl"],cP=(n,t)=>t.value;function dP(n,t){if(n&1&&(b(0,"p",5),p(1),C()),n&2){let e=u();c(),O(e.label)}}function uP(n,t){if(n&1){let e=P();b(0,"input",13,0),B("input",function(r){_(e);let o=u(3);return v(o.onSearch(r))})("keydown.enter",function(r){_(e);let o=u(3);return v(o.onSearchEnter(r))}),C()}if(n&2){let e=u(3);W("value",e.search())}}function pP(n,t){if(n&1&&(b(0,"span",18),p(1),C()),n&2){let e=u().$implicit;c(),O(e.description)}}function fP(n,t){if(n&1){let e=P();b(0,"button",14),B("click",function(){let r=_(e).$implicit,o=u(3);return v(o.choose(r))})("dblclick",function(){_(e);let r=u(3);return v(r.confirm())}),J(1,"span",15),b(2,"span",16)(3,"span",17),p(4),C(),S(5,pP,2,1,"span",18),C()()}if(n&2){let e=t.$implicit,i=u(3);me("selected",i.choice()===e.value)("danger",e.danger),le("aria-checked",i.choice()===e.value),c(4),O(e.label),c(),T(e.description?5:-1)}}function hP(n,t){n&1&&(b(0,"p",12),p(1,"No matching branches"),C())}function mP(n,t){if(n&1&&(S(0,uP,2,1,"input",9),b(1,"div",10),Q(2,fP,6,7,"button",11,cP,!1,hP,2,0,"p",12),C()),n&2){let e=u(),i=u();T(e.searchable?0:-1),c(2),K(i.filteredOptions())}}function gP(n,t){if(n&1){let e=P();b(0,"label",19),p(1),C(),b(2,"input",20,1),B("input",function(r){_(e);let o=u(2);return v(o.onInput(r))})("keydown.enter",function(){_(e);let r=u(2);return v(r.confirm())}),C()}if(n&2){let e=u(),i=u();c(),O(e.label||e.title),c(),W("value",i.value()),le("placeholder",e.placeholder||" ")("aria-label",e.label||e.title)}}function _P(n,t){if(n&1){let e=P();b(0,"div",2),B("click",function(){_(e);let r=u();return v(r.cancelled.emit())}),C(),b(1,"div",3)(2,"h3",4),p(3),C(),S(4,dP,2,1,"p",5),S(5,mP,5,2)(6,gP,4,4),b(7,"div",6)(8,"button",7),B("click",function(){_(e);let r=u();return v(r.cancelled.emit())}),p(9,"Cancel"),C(),b(10,"button",8),B("click",function(){_(e);let r=u();return v(r.confirm())}),p(11),C()()()}if(n&2){let e=t,i=u();c(3),O(e.title),c(),T(e.label?4:-1),c(),T(i.options().length>0?5:e.confirmOnly?-1:6),c(5),me("btn-danger",e.danger),W("disabled",i.options().length===0&&!e.confirmOnly&&!e.allowEmpty&&!i.value().trim()||e.searchable&&i.filteredOptions().length===0),c(),q(" ",e.okLabel||"OK"," ")}}var Io=class n{state=N.required();confirmed=H();cancelled=H();value=x("");choice=x("");options=L(()=>this.state()?.options??[]);search=x("");filteredOptions=L(()=>{let t=this.search().trim().toLowerCase(),e=this.options();return t?e.filter(i=>i.label.toLowerCase().includes(t)||i.value.toLowerCase().includes(t)):e});inputEl=en("inputEl");searchEl=en("searchEl");constructor(){Ce(()=>{let t=this.state();t&&(this.value.set(t.value??""),this.choice.set(t.options?.[0]?.value??""),this.search.set(""));let e=this.inputEl()??this.searchEl();t&&e&&(e.nativeElement.focus(),e.nativeElement.select())})}onEscape(){this.state()&&this.cancelled.emit()}onInput(t){this.value.set(t.target.value)}choose(t){this.choice.set(t.value)}onSearch(t){this.search.set(t.target.value);let e=this.filteredOptions();e.length&&!e.some(i=>i.value===this.choice())&&this.choice.set(e[0].value)}onSearchEnter(t){t.preventDefault(),this.filteredOptions().length>0&&this.confirm()}confirm(){let t=this.state();if(t){if(t.options?.length){this.confirmed.emit(this.choice());return}!t.confirmOnly&&!t.allowEmpty&&!this.value().trim()||this.confirmed.emit(t.confirmOnly?"":this.value().trim())}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(e,i){e&1&&(jt(i.inputEl,aP,5),jt(i.searchEl,lP,5)),e&2&&vn(2)},hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{state:[1,"state"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:1,vars:1,consts:[["searchEl",""],["inputEl",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"title"],[1,"label"],[1,"actions"],["type","button",1,"btn",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"value"],["role","radiogroup",1,"options"],["type","button","role","radio",1,"option",3,"selected","danger"],[1,"no-results"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"input","keydown.enter","value"],["type","button","role","radio",1,"option",3,"click","dblclick"],["aria-hidden","true",1,"option-radio"],[1,"option-text"],[1,"option-label"],[1,"option-description"],["for","prompt-input",1,"sr-only"],["id","prompt-input","type","text","placeholder"," ","title","Enter a value",1,"input",3,"input","keydown.enter","value"]],template:function(e,i){if(e&1&&S(0,_P,12,7),e&2){let r;T((r=i.state())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 48px));padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.label[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn-danger[_ngcontent-%COMP%]{background:#a1260d;border-color:#a1260d;color:#fff}.options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.no-results[_ngcontent-%COMP%]{margin:0;padding:8px 10px;font-size:12px;color:var(--text-dim)}.option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-family:inherit;text-align:left;cursor:pointer}.option[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.option.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:#3794ff1f}.option-radio[_ngcontent-%COMP%]{width:13px;height:13px;margin-top:2px;border:1px solid var(--border);border-radius:50%;flex:none}.option.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);background:radial-gradient(circle,var(--accent) 0 40%,transparent 45%)}.option-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.option-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--text-bright)}.option.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:#f48771}.option-description[_ngcontent-%COMP%]{font-size:11px;color:var(--text-dim)}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#c42b1c}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};function Yh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xr=Yh();function Qy(n){xr=n}var pa={exec:()=>null};function De(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(Tt.caret,"$1"),e=e.replace(r,s),i},getRegex:()=>new RegExp(e,t)};return i}var Tt={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")},vP=/^(?:[ \t]*(?:\n|$))+/,bP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,CP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qh=/(?:[*+-]|\d{1,9}[.)])/,Ky=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xy=De(Ky).replace(/bull/g,Qh).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(),xP=De(Ky).replace(/bull/g,Qh).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(),Kh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wP=/^[^\n]+/,Xh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EP=De(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DP=De(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qh).getRegex(),gd="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",Jh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,SP=De("^ {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",Jh).replace("tag",gd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jy=De(Kh).replace("hr",fa).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",gd).getRegex(),TP=De(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jy).getRegex(),em={blockquote:TP,code:bP,def:EP,fences:yP,heading:CP,hr:fa,html:SP,lheading:Xy,list:DP,newline:vP,paragraph:Jy,table:pa,text:wP},Gy=De("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fa).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",gd).getRegex(),MP=oe(G({},em),{lheading:xP,table:Gy,paragraph:De(Kh).replace("hr",fa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Gy).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",gd).getRegex()}),kP=oe(G({},em),{html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Jh).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:pa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De(Kh).replace("hr",fa).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",Xy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),IP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,PP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,eC=/^( {2,}|\\)\n(?!\s*$)/,OP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_d=/[\p{P}\p{S}]/u,tm=/[\s\p{P}\p{S}]/u,tC=/[^\s\p{P}\p{S}]/u,RP=De(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tm).getRegex(),nC=/(?!~)[\p{P}\p{S}]/u,NP=/(?!~)[\s\p{P}\p{S}]/u,AP=/(?:[^\s\p{P}\p{S}]|~)/u,LP=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,iC=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,FP=De(iC,"u").replace(/punct/g,_d).getRegex(),VP=De(iC,"u").replace(/punct/g,nC).getRegex(),rC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BP=De(rC,"gu").replace(/notPunctSpace/g,tC).replace(/punctSpace/g,tm).replace(/punct/g,_d).getRegex(),jP=De(rC,"gu").replace(/notPunctSpace/g,AP).replace(/punctSpace/g,NP).replace(/punct/g,nC).getRegex(),$P=De("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tC).replace(/punctSpace/g,tm).replace(/punct/g,_d).getRegex(),HP=De(/\\(punct)/,"gu").replace(/punct/g,_d).getRegex(),UP=De(/^<(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(),zP=De(Jh).replace("(?:-->|$)","-->").getRegex(),GP=De("^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",zP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,WP=De(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",fd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),oC=De(/^!?\[(label)\]\[(ref)\]/).replace("label",fd).replace("ref",Xh).getRegex(),sC=De(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xh).getRegex(),qP=De("reflink|nolink(?!\\()","g").replace("reflink",oC).replace("nolink",sC).getRegex(),nm={_backpedal:pa,anyPunctuation:HP,autolink:UP,blockSkip:LP,br:eC,code:PP,del:pa,emStrongLDelim:FP,emStrongRDelimAst:BP,emStrongRDelimUnd:$P,escape:IP,link:WP,nolink:sC,punctuation:RP,reflink:oC,reflinkSearch:qP,tag:GP,text:OP,url:pa},ZP=oe(G({},nm),{link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",fd).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fd).getRegex()}),Wh=oe(G({},nm),{emStrongRDelimAst:jP,emStrongLDelim:VP,url:De(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),YP=oe(G({},Wh),{br:De(eC).replace("{2,}","*").getRegex(),text:De(Wh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ud={normal:em,gfm:MP,pedantic:kP},da={normal:nm,gfm:Wh,breaks:YP,pedantic:ZP},QP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wy=n=>QP[n];function Ln(n,t){if(t){if(Tt.escapeTest.test(n))return n.replace(Tt.escapeReplace,Wy)}else if(Tt.escapeTestNoEncode.test(n))return n.replace(Tt.escapeReplaceNoEncode,Wy);return n}function qy(n){try{n=encodeURI(n).replace(Tt.percentDecode,"%")}catch{return null}return n}function Zy(n,t){let e=n.replace(Tt.findPipe,(o,s,a)=>{let l=!1,d=s;for(;--d>=0&&a[d]==="\\";)l=!l;return l?"|":" |"}),i=e.split(Tt.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(Tt.slashPipe,"|");return i}function ua(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 KP(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 Yy(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 XP(n,t,e){let i=n.match(e.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
8
+ `).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(`
9
+ `)}var hd=class{options;rules;lexer;constructor(n){this.options=n||xr}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:ua(e,`
10
+ `)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=XP(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=ua(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:ua(t[0],`
11
+ `)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=ua(t[0],`
12
+ `).split(`
13
+ `),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 d=a.join(`
14
+ `),m=d.replace(this.rules.other.blockquoteSetextReplace,`
15
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
16
+ ${d}`:d,r=r?`${r}
17
+ ${m}`:m;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=y,e.length===0)break;let w=o.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let D=w,R=D.raw+`
18
+ `+e.join(`
19
+ `),j=this.blockquote(R);o[o.length-1]=j,i=i.substring(0,i.length-D.raw.length)+j.raw,r=r.substring(0,r.length-D.text.length)+j.text;break}else if(w?.type==="list"){let D=w,R=D.raw+`
20
+ `+e.join(`
21
+ `),j=this.list(R);o[o.length-1]=j,i=i.substring(0,i.length-w.raw.length)+j.raw,r=r.substring(0,r.length-D.raw.length)+j.raw,e=R.substring(o.at(-1).raw.length).split(`
22
+ `);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,d="",m="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;d=t[0],n=n.substring(d.length);let y=t[2].split(`
23
+ `,1)[0].replace(this.rules.other.listReplaceTabs,$=>" ".repeat(3*$.length)),w=n.split(`
24
+ `,1)[0],D=!y.trim(),R=0;if(this.options.pedantic?(R=2,m=y.trimStart()):D?R=t[1].length+1:(R=t[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,m=y.slice(R),R+=t[1].length),D&&this.rules.other.blankLine.test(w)&&(d+=w+`
25
+ `,n=n.substring(w.length+1),l=!0),!l){let $=this.rules.other.nextBulletRegex(R),_e=this.rules.other.hrRegex(R),Ut=this.rules.other.fencesBeginRegex(R),Be=this.rules.other.headingBeginRegex(R),dt=this.rules.other.htmlBeginRegex(R);for(;n;){let rt=n.split(`
26
+ `,1)[0],zt;if(w=rt,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),zt=w):zt=w.replace(this.rules.other.tabCharGlobal," "),Ut.test(w)||Be.test(w)||dt.test(w)||$.test(w)||_e.test(w))break;if(zt.search(this.rules.other.nonSpaceChar)>=R||!w.trim())m+=`
27
+ `+zt.slice(R);else{if(D||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ut.test(y)||Be.test(y)||_e.test(y))break;m+=`
28
+ `+w}!D&&!w.trim()&&(D=!0),d+=rt+`
29
+ `,n=n.substring(rt.length+1),y=zt.slice(R)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0));let j=null,Z;this.options.gfm&&(j=this.rules.other.listIsTask.exec(m),j&&(Z=j[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:d,task:!!j,checked:Z,loose:!1,text:m,tokens:[]}),r.raw+=d}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 d=r.items[l].tokens.filter(y=>y.type==="space"),m=d.length>0&&d.some(y=>this.rules.other.anyLine.test(y.raw));r.loose=m}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=Zy(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],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(Zy(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)===`
31
+ `?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=ua(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=KP(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).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)),Yy(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 Yy(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))return;if(!(i[1]||i[2]||"")||!e||this.rules.inline.punctuation.exec(e)){let o=[...i[0]].length-1,s,a,l=o,d=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*n.length+o);(i=m.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&o%3&&!((o+a)%3)){d+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+d);let y=[...i[0]][0].length,w=n.slice(0,o+i.index+y+a);if(Math.min(o,a)%2){let R=w.slice(1,-1);return{type:"em",raw:w,text:R,tokens:this.lexer.inlineTokens(R)}}let D=w.slice(2,-2);return{type:"strong",raw:w,text:D,tokens:this.lexer.inlineTokens(D)}}}}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}}}},qn=class qh{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||xr,this.options.tokenizer=this.options.tokenizer||new hd,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:Tt,block:ud.normal,inline:da.normal};this.options.pedantic?(e.block=ud.pedantic,e.inline=da.pedantic):this.options.gfm&&(e.block=ud.gfm,this.options.breaks?e.inline=da.breaks:e.inline=da.gfm),this.tokenizer.rules=e}static get rules(){return{block:ud,inline:da}}static lex(t,e){return new qh(e).lex(t)}static lexInline(t,e){return new qh(e).inlineTokens(t)}lex(t){t=t.replace(Tt.carriageReturn,`
32
+ `),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(Tt.tabCharGlobal," ").replace(Tt.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+=`
33
+ `: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+=`
34
+ `+r.raw,s.text+=`
35
+ `+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+=`
36
+ `+r.raw,s.text+=`
37
+ `+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});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(d=>{l=d.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+=`
38
+ `+r.raw,s.text+=`
39
+ `+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+=`
40
+ `+r.raw,s.text+=`
41
+ `+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);let o=!1,s="";for(;t;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(d=>(a=d.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 d=e.at(-1);a.type==="text"&&d?.type==="text"?(d.raw+=a.raw,d.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 d=1/0,m=t.slice(1),y;this.options.extensions.startInline.forEach(w=>{y=w.call({lexer:this},m),typeof y=="number"&&y>=0&&(d=Math.min(d,y))}),d<1/0&&d>=0&&(l=t.substring(0,d+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 d=e.at(-1);d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):e.push(a);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return e}},md=class{options;parser;constructor(n){this.options=n||xr}space(n){return""}code({text:n,lang:t,escaped:e}){let i=(t||"").match(Tt.notSpaceStart)?.[0],r=n.replace(Tt.endingNewline,"")+`
42
+ `;return i?'<pre><code class="language-'+Ln(i)+'">'+(e?r:Ln(r,!0))+`</code></pre>
43
+ `:"<pre><code>"+(e?r:Ln(r,!0))+`</code></pre>
44
+ `}blockquote({tokens:n}){return`<blockquote>
45
+ ${this.parser.parse(n)}</blockquote>
46
+ `}html({text:n}){return n}heading({tokens:n,depth:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}>
47
+ `}hr(n){return`<hr>
48
+ `}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+`>
49
+ `+i+"</"+r+`>
50
+ `}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+" "+Ln(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>
51
+ `}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
52
+ `}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>
53
+ <thead>
54
+ `+t+`</thead>
55
+ `+i+`</table>
56
+ `}tablerow({text:n}){return`<tr>
57
+ ${n}</tr>
58
+ `}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
59
+ `}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>${Ln(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=qy(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return t&&(o+=' title="'+Ln(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=qy(n);if(r===null)return Ln(e);n=r;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${Ln(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Ln(n.text)}},im=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""}},Zn=class Zh{options;renderer;textRenderer;constructor(t){this.options=t||xr,this.options.renderer=this.options.renderer||new md,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new im}static parse(t,e){return new Zh(e).parse(t)}static parseInline(t,e){return new Zh(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","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"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+=`
60
+ `+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}},pd=class{options;block;constructor(t){this.options=t||xr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?qn.lex:qn.lexInline}provideParser(){return this.block?Zn.parse:Zn.parseInline}},JP=class{defaults=Yh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Zn;Renderer=md;TextRenderer=im;Lexer=qn;Tokenizer=hd;Hooks=pd;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=G({},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 md(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]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m||""}}i.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new hd(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]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m}}i.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new pd;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];pd.passThroughHooks.has(o)?r[s]=d=>{if(this.defaults.async)return Promise.resolve(a.call(r,d)).then(y=>l.call(r,y));let m=a.call(r,d);return l.call(r,m)}:r[s]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m}}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=G(G({},this.defaults),i)}),this}setOptions(n){return this.defaults=G(G({},this.defaults),n),this}lexer(n,t){return qn.lex(n,t??this.defaults)}parser(n,t){return Zn.parse(n,t??this.defaults)}parseMarkdown(n){return(e,i)=>{let r=G({},i),o=G(G({},this.defaults),r),s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(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 e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);let a=o.hooks?o.hooks.provideLexer():n?qn.lex:qn.lexInline,l=o.hooks?o.hooks.provideParser():n?Zn.parse:Zn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(d=>a(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>l(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let d=a(e,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let m=l(d,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(d){return s(d)}}}onError(n,t){return e=>{if(e.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Ln(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},Cr=new JP;function Ee(n,t){return Cr.parse(n,t)}Ee.options=Ee.setOptions=function(n){return Cr.setOptions(n),Ee.defaults=Cr.defaults,Qy(Ee.defaults),Ee};Ee.getDefaults=Yh;Ee.defaults=xr;Ee.use=function(...n){return Cr.use(...n),Ee.defaults=Cr.defaults,Qy(Ee.defaults),Ee};Ee.walkTokens=function(n,t){return Cr.walkTokens(n,t)};Ee.parseInline=Cr.parseInline;Ee.Parser=Zn;Ee.parser=Zn.parse;Ee.Renderer=md;Ee.TextRenderer=im;Ee.Lexer=qn;Ee.lexer=qn.lex;Ee.Tokenizer=hd;Ee.Hooks=pd;Ee.parse=Ee;var vZ=Ee.options,bZ=Ee.setOptions,yZ=Ee.use,CZ=Ee.walkTokens,xZ=Ee.parseInline;var wZ=Zn.parse,EZ=qn.lex;function aC(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}function eO(n){if(Array.isArray(n))return n}function tO(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var i,r,o,s,a=[],l=!0,d=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(l=(i=o.call(e)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(m){d=!0,r=m}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(d)throw r}}return a}}function nO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iO(n,t){return eO(n)||tO(n,t)||rO(n,t)||nO()}function rO(n,t){if(n){if(typeof n=="string")return aC(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?aC(n,t):void 0}}var xC=Object.entries,lC=Object.setPrototypeOf,oO=Object.isFrozen,sO=Object.getPrototypeOf,aO=Object.getOwnPropertyDescriptor,it=Object.freeze,ct=Object.seal,Po=Object.create,wC=typeof Reflect<"u"&&Reflect,dm=wC.apply,um=wC.construct;it||(it=function(t){return t});ct||(ct=function(t){return t});dm||(dm=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)});um||(um=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 Er=Xe(Array.prototype.forEach),lO=Xe(Array.prototype.lastIndexOf),cC=Xe(Array.prototype.pop),ha=Xe(Array.prototype.push),cO=Xe(Array.prototype.splice),Oo=Array.isArray,_a=Xe(String.prototype.toLowerCase),rm=Xe(String.prototype.toString),dC=Xe(String.prototype.match),ma=Xe(String.prototype.replace),uC=Xe(String.prototype.indexOf),dO=Xe(String.prototype.trim),uO=Xe(Number.prototype.toString),pO=Xe(Boolean.prototype.toString),pC=typeof BigInt>"u"?null:Xe(BigInt.prototype.toString),fC=typeof Symbol>"u"?null:Xe(Symbol.prototype.toString),At=Xe(Object.prototype.hasOwnProperty),ga=Xe(Object.prototype.toString),vt=Xe(RegExp.prototype.test),wr=fO(TypeError);function Xe(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 dm(n,t,i)}}function fO(n){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return um(n,e)}}function be(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_a;if(lC&&lC(n,null),!Oo(t))return n;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=e(r);o!==r&&(oO(t)||(t[i]=o),r=o)}n[r]=!0}return n}function hO(n){for(let t=0;t<n.length;t++)At(n,t)||(n[t]=null);return n}function Ht(n){let t=Po(null);for(let i of xC(n)){var e=iO(i,2);let r=e[0],o=e[1];At(n,r)&&(Oo(o)?t[r]=hO(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=Ht(o):t[r]=o)}return t}function mO(n){switch(typeof n){case"string":return n;case"number":return uO(n);case"boolean":return pO(n);case"bigint":return pC?pC(n):"0";case"symbol":return fC?fC(n):"Symbol()";case"undefined":return ga(n);case"function":case"object":{if(n===null)return ga(n);let t=n,e=on(t,"toString");if(typeof e=="function"){let i=e(t);return typeof i=="string"?i:ga(i)}return ga(n)}default:return ga(n)}}function on(n,t){for(;n!==null;){let i=aO(n,t);if(i){if(i.get)return Xe(i.get);if(typeof i.value=="function")return Xe(i.value)}n=sO(n)}function e(){return null}return e}function gO(n){try{return vt(n,""),!0}catch{return!1}}var hC=it(["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"]),om=it(["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"]),sm=it(["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"]),_O=it(["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"]),am=it(["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"]),vO=it(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mC=it(["#text"]),gC=it(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),lm=it(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),_C=it(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),vd=it(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bO=ct(/{{[\w\W]*|^[\w\W]*}}/g),yO=ct(/<%[\w\W]*|^[\w\W]*%>/g),CO=ct(/\${[\w\W]*/g),xO=ct(/^data-[\-\w.\u00B7-\uFFFF]+$/),wO=ct(/^aria-[\-\w]+$/),vC=ct(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),EO=ct(/^(?:\w+script|data):/i),DO=ct(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),SO=ct(/^html$/i),TO=ct(/^[a-z][.\w]*(-[.\w]+)+$/i),bC=ct(/<[/\w!]/g),yC=ct(/<[/\w]/g),MO=ct(/<\/no(script|embed|frames)/i),kO=ct(/\/>/i),$t={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},EC=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],IO=it(be({},EC)),PO=(function(){let n={};return Er(EC,t=>{n[t]=ct(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),it(n)})(),OO=function(){return typeof window>"u"?null:window},RO=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}},CC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Di=function(t,e,i,r){return At(t,e)&&Oo(t[e])?be(r.base?Ht(r.base):{},t[e],r.transform):i},cm=function(t,e,i){let r=At(t,e)?t[e]:void 0;return r&&typeof r=="object"?Ht(r):i()};function DC(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OO(),t=V=>DC(V);if(t.version="3.4.15",t.removed=[],!n||!n.document||n.document.nodeType!==$t.document||!n.Element)return t.isSupported=!1,t;let e=n.document,i=e,r=i.currentScript;n.DocumentFragment;let o=n.HTMLTemplateElement,s=n.Node,a=n.Element,l=n.NodeFilter,d=n.NamedNodeMap;d===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,y=n.trustedTypes,w=a.prototype,D=on(w,"cloneNode"),R=on(w,"remove"),j=on(w,"removeAttributeNode"),Z=on(w,"nextSibling"),$=on(w,"childNodes"),_e=on(w,"parentNode"),Ut=on(w,"shadowRoot"),Be=on(w,"attributes"),dt=s&&s.prototype?on(s.prototype,"nodeType"):null,rt=s&&s.prototype?on(s.prototype,"nodeName"):null,zt=s&&s.prototype?on(s.prototype,"ownerDocument"):null,No=function(g){return dt?dt(g):g.nodeType},Id=function(g){return rt?rt(g):g.nodeName};if(typeof o=="function"){let V=e.createElement("template");V.content&&V.content.ownerDocument&&(e=V.content.ownerDocument)}let Mt,Ti="",Pd,fm=!1,Ao=0,hm=function(){if(Ao>0)throw wr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Tr=function(g){hm(),Ao++;try{return Mt.createHTML(g)}finally{Ao--}},NC=function(g){hm(),Ao++;try{return Mt.createScriptURL(g)}finally{Ao--}},AC=function(){return fm||(Pd=RO(y,r),fm=!0),Pd},ba=e,Od=ba.implementation,mm=ba.createNodeIterator,LC=ba.createDocumentFragment,FC=ba.getElementsByTagName,VC=i.importNode,Ae=CC();t.isSupported=typeof xC=="function"&&typeof _e=="function"&&Od&&Od.createHTMLDocument!==void 0;let BC=bO,jC=yO,$C=CO,HC=xO,UC=wO,zC=EO,gm=DO,GC=TO,_m=vC,Le=null,Rd=be({},[...hC,...om,...sm,...am,...mC]),Fe=null,Nd=be({},[...gC,...lm,..._C,...vd]),xn=Object.seal(Po(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}})),Lo=null,vm=null,Yn=Object.seal(Po(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),bm=!0,Ad=!0,ym=!1,Cm=!0,Qn=!1,Mi=!0,ki=!1,Ld=!1,ya=null,Ca=null,Fd=!1,Mr=!1,xa=!1,wa=!1,xm=!0,wm=!1,Em="user-content-",Vd=!0,Bd=!1,kr={},Ir=null,Dm=be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Sm=null,Tm=be({},["audio","video","img","source","image","track"]),Mm=null,km=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ea="http://www.w3.org/1998/Math/MathML",Da="http://www.w3.org/2000/svg",wn="http://www.w3.org/1999/xhtml",Pr=wn,jd=!1,$d=null,WC=be({},[Ea,Da,wn],rm),Im=it(["mi","mo","mn","ms","mtext"]),Hd=be({},Im),Pm=it(["annotation-xml"]),Ud=be({},Pm),qC=be({},["title","style","font","a","script"]),Fo=null,ZC=["application/xhtml+xml","text/html"],YC="text/html",ze=null,Or=null,QC=e.createElement("form"),Om=function(g){return g instanceof RegExp||g instanceof Function},zd=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Or&&Or===g)return;(!g||typeof g!="object")&&(g={}),g=Ht(g),Fo=ZC.indexOf(g.PARSER_MEDIA_TYPE)===-1?YC:g.PARSER_MEDIA_TYPE,ze=Fo==="application/xhtml+xml"?rm:_a,Le=Di(g,"ALLOWED_TAGS",Rd,{transform:ze}),Fe=Di(g,"ALLOWED_ATTR",Nd,{transform:ze}),$d=Di(g,"ALLOWED_NAMESPACES",WC,{transform:rm}),Mm=Di(g,"ADD_URI_SAFE_ATTR",km,{transform:ze,base:km}),Sm=Di(g,"ADD_DATA_URI_TAGS",Tm,{transform:ze,base:Tm}),Ir=Di(g,"FORBID_CONTENTS",Dm,{transform:ze}),Lo=Di(g,"FORBID_TAGS",Ht({}),{transform:ze}),vm=Di(g,"FORBID_ATTR",Ht({}),{transform:ze}),kr=At(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Ht(g.USE_PROFILES):g.USE_PROFILES:!1,bm=g.ALLOW_ARIA_ATTR!==!1,Ad=g.ALLOW_DATA_ATTR!==!1,ym=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Cm=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qn=g.SAFE_FOR_TEMPLATES||!1,Mi=g.SAFE_FOR_XML!==!1,ki=g.WHOLE_DOCUMENT||!1,Mr=g.RETURN_DOM||!1,xa=g.RETURN_DOM_FRAGMENT||!1,wa=g.RETURN_TRUSTED_TYPE||!1,Fd=g.FORCE_BODY||!1,xm=g.SANITIZE_DOM!==!1,wm=g.SANITIZE_NAMED_PROPS||!1,Vd=g.KEEP_CONTENT!==!1,Bd=g.IN_PLACE||!1,_m=gO(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:vC,Pr=typeof g.NAMESPACE=="string"?g.NAMESPACE:wn,Hd=cm(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>be({},Im)),Ud=cm(g,"HTML_INTEGRATION_POINTS",()=>be({},Pm));let M=cm(g,"CUSTOM_ELEMENT_HANDLING",()=>Po(null));if(xn=Po(null),At(M,"tagNameCheck")&&Om(M.tagNameCheck)&&(xn.tagNameCheck=M.tagNameCheck),At(M,"attributeNameCheck")&&Om(M.attributeNameCheck)&&(xn.attributeNameCheck=M.attributeNameCheck),At(M,"allowCustomizedBuiltInElements")&&typeof M.allowCustomizedBuiltInElements=="boolean"&&(xn.allowCustomizedBuiltInElements=M.allowCustomizedBuiltInElements),ct(xn),Qn&&(Ad=!1),xa&&(Mr=!0),kr&&(Le=be({},mC),Fe=Po(null),kr.html===!0&&(be(Le,hC),be(Fe,gC)),kr.svg===!0&&(be(Le,om),be(Fe,lm),be(Fe,vd)),kr.svgFilters===!0&&(be(Le,sm),be(Fe,lm),be(Fe,vd)),kr.mathMl===!0&&(be(Le,am),be(Fe,_C),be(Fe,vd))),Yn.tagCheck=null,Yn.attributeCheck=null,At(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?Yn.tagCheck=g.ADD_TAGS:Oo(g.ADD_TAGS)&&(Le===Rd&&(Le=Ht(Le)),be(Le,g.ADD_TAGS,ze))),At(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?Yn.attributeCheck=g.ADD_ATTR:Oo(g.ADD_ATTR)&&(Fe===Nd&&(Fe=Ht(Fe)),be(Fe,g.ADD_ATTR,ze))),At(g,"ADD_FORBID_CONTENTS")&&Oo(g.ADD_FORBID_CONTENTS)&&(Ir===Dm&&(Ir=Ht(Ir)),be(Ir,g.ADD_FORBID_CONTENTS,ze)),Vd&&(Le["#text"]=!0),ki&&be(Le,["html","head","body"]),Le.table&&(be(Le,["tbody"]),delete Lo.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw wr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw wr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let A=Mt;Mt=g.TRUSTED_TYPES_POLICY;try{Ti=Tr("")}catch(U){throw Mt=A,U}}else g.TRUSTED_TYPES_POLICY===null?(Mt=void 0,Ti=""):(Mt===void 0&&(Mt=AC()),Mt&&typeof Ti=="string"&&(Ti=Tr("")));it&&it(g),Or=g},Rm=be({},[...om,...sm,..._O]),Nm=be({},[...am,...vO]),KC=function(g,M,A){return M.namespaceURI===wn?g==="svg":M.namespaceURI===Ea?g==="svg"&&(A==="annotation-xml"||Hd[A]):!!Rm[g]},XC=function(g,M,A){return M.namespaceURI===wn?g==="math":M.namespaceURI===Da?g==="math"&&Ud[A]:!!Nm[g]},JC=function(g,M,A){return M.namespaceURI===Da&&!Ud[A]||M.namespaceURI===Ea&&!Hd[A]?!1:!Nm[g]&&(qC[g]||!Rm[g])},ex=function(g){let M=_e(g);(!M||!M.tagName)&&(M={namespaceURI:Pr,tagName:"template"});let A=_a(g.tagName),U=_a(M.tagName);return $d[g.namespaceURI]?g.namespaceURI===Da?KC(A,M,U):g.namespaceURI===Ea?XC(A,M,U):g.namespaceURI===wn?JC(A,M,U):!!(Fo==="application/xhtml+xml"&&$d[g.namespaceURI]):!1},Kn=function(g){ha(t.removed,{element:g});try{_e(g).removeChild(g)}catch{if(R(g),!_e(g))throw wr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Am=function(g,M,A){try{j(g,M)}catch{try{g.removeAttribute(A)}catch{}}},Sa=function(g){Ta(g);let M=$(g);if(M){let U=[];Er(M,X=>{ha(U,X)}),Er(U,X=>{try{R(X)}catch{}})}let A=Be(g);if(A)for(let U=A.length-1;U>=0;--U){let X=A[U],ce=X&&X.name;typeof ce=="string"&&Am(g,X,ce)}},Ii=function(g,M,A){if(!A)try{A=M.getAttributeNode(g)}catch{A=null}ha(t.removed,{attribute:A||null,from:M});try{A?j(M,A):M.removeAttribute(g)}catch{try{M.removeAttribute(g)}catch{}}if(g==="is")if(Mr||xa)try{Kn(M)}catch{}else try{M.setAttribute(g,"")}catch{}},tx=function(g){let M=Be(g);if(M)for(let A=M.length-1;A>=0;--A){let U=M[A],X=U&&U.name;typeof X!="string"||Fe[ze(X)]||Am(g,U,X)}},Ta=function(g){let M=[g];for(;M.length>0;){let A=M.pop();No(A)===$t.element&&tx(A);let X=$(A);if(X)for(let ce=X.length-1;ce>=0;--ce)M.push(X[ce])}},Lm=function(g,M){return Mi?g==="patchsrc"?!0:g==="for"&&M!=="label"&&M!=="output":!1},nx=function(g){if(!Mi)return;let M=[g];for(;M.length>0;){let A=M.pop(),U=No(A);if(U===$t.processingInstruction||U===$t.comment&&vt(yC,A.data)){try{R(A)}catch{}continue}if(U===$t.element){let ce=A,Pe=ze(Id(A));try{ce.hasAttribute&&ce.hasAttribute("patchsrc")&&ce.removeAttribute("patchsrc"),ce.hasAttribute&&ce.hasAttribute("for")&&Lm("for",Pe)&&ce.removeAttribute("for")}catch{}}let X=$(A);if(X)for(let ce=X.length-1;ce>=0;--ce)M.push(X[ce])}},Fm=function(g){let M=null,A=null;if(Fd)g="<remove></remove>"+g;else{let ce=dC(g,/^[\r\n\t ]+/);A=ce&&ce[0]}Fo==="application/xhtml+xml"&&Pr===wn&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let U=Mt?Tr(g):g;if(Pr===wn)try{M=new m().parseFromString(U,Fo)}catch{}if(!M||!M.documentElement){M=Od.createDocument(Pr,"template",null);try{M.documentElement.innerHTML=jd?Ti:U}catch{}}let X=M.body||M.documentElement;return g&&A&&X.insertBefore(e.createTextNode(A),X.childNodes[0]||null),Pr===wn?FC.call(M,ki?"html":"body")[0]:ki?M.documentElement:X},Vm=function(g){let M=zt?zt(g):g.ownerDocument;return mm.call(M||g,g,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ma=function(g){return g=ma(g,BC," "),g=ma(g,jC," "),g=ma(g,$C," "),g},Gd=function(g){var M;g.normalize();let A=zt?zt(g):g.ownerDocument,U=mm.call(A||g,g,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),X=U.nextNode();for(;X;)X.data=Ma(X.data),X=U.nextNode();let ce=(M=g.querySelectorAll)===null||M===void 0?void 0:M.call(g,"template");ce&&Er(ce,Pe=>{Rr(Pe.content)&&Gd(Pe.content)})},ka=function(g){let M=rt?rt(g):null;return typeof M!="string"||ze(M)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Be(g)||typeof g.removeAttribute!="function"||typeof g.removeAttributeNode!="function"||typeof g.getAttributeNode!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==dt(g)||g.childNodes!==$(g)},Rr=function(g){if(!dt||typeof g!="object"||g===null)return!1;try{return dt(g)===$t.documentFragment}catch{return!1}},Vo=function(g){if(!dt||typeof g!="object"||g===null)return!1;try{return typeof dt(g)=="number"}catch{return!1}};function En(V,g,M){V.length!==0&&Er(V,A=>{A.call(t,g,M,Or)})}let ix=function(g,M){return!!(Mi&&g.hasChildNodes()&&!Vo(g.firstElementChild)&&vt(bC,g.textContent)&&vt(bC,g.innerHTML)||Mi&&g.namespaceURI===wn&&IO[M]&&(Vo(g.firstElementChild)||typeof g.textContent=="string"&&vt(PO[M],g.textContent))||g.nodeType===$t.processingInstruction||Mi&&g.nodeType===$t.comment&&vt(yC,g.data))},Ia=function(g,M){if(g instanceof RegExp)return vt(g,M);if(g instanceof Function){for(var A=arguments.length,U=new Array(A>2?A-2:0),X=2;X<A;X++)U[X-2]=arguments[X];return!!g(M,...U)}return!1},rx=function(g,M,A){if(!Lo[M]&&Um(M)&&Ia(xn.tagNameCheck,M))return!1;if(Vd&&!Ir[M]){let U=_e(g),X=$(g);if(X&&U){let ce=X.length;for(let Pe=ce-1;Pe>=0;--Pe){let je=g===A?D(X[Pe],!0):X[Pe];U.insertBefore(je,Z(g))}}}return Kn(g),!0},Bm=function(g,M,A,U){return g.length===0?M:M===A||M===U?Ht(M):M},jm=function(g,M){return g===M||_e(g)!==null?!1:(Bd&&Ta(g),!0)},$m=function(g,M){if(En(Ae.beforeSanitizeElements,g,null),jm(g,M))return!0;if(ka(g))return Kn(g),!0;let A=ze(Id(g));if(Le=Bm(Ae.uponSanitizeElement,Le,Rd,ya),En(Ae.uponSanitizeElement,g,{tagName:A,allowedTags:Le}),jm(g,M))return!0;if(ix(g,A))return Kn(g),!0;if(Lo[A]||!(Yn.tagCheck instanceof Function&&Yn.tagCheck(A))&&!Le[A]){let X=rx(g,A,M);return X===!1&&En(Ae.afterSanitizeElements,g,null),X}if(No(g)===$t.element&&!ex(g)||(A==="noscript"||A==="noembed"||A==="noframes")&&vt(MO,g.innerHTML))return Kn(g),!0;if(Qn&&g.nodeType===$t.text){let X=Ma(g.textContent);g.textContent!==X&&(ha(t.removed,{element:g.cloneNode()}),g.textContent=X)}return En(Ae.afterSanitizeElements,g,null),!1},Hm=function(g,M,A){if(vm[M]||Lm(M,g)||xm&&(M==="id"||M==="name")&&(A in e||A in QC))return!1;let U=Fe[M]||Yn.attributeCheck instanceof Function&&Yn.attributeCheck(M,g);return Ad&&vt(HC,M)||bm&&vt(UC,M)?!0:U?Mm[M]||vt(_m,ma(A,gm,""))||(M==="src"||M==="xlink:href"||M==="href")&&g!=="script"&&uC(A,"data:")===0&&Sm[g]||ym&&!vt(zC,ma(A,gm,""))?!0:!A:Um(g)&&Ia(xn.tagNameCheck,g)&&Ia(xn.attributeNameCheck,M,g)||M==="is"&&xn.allowCustomizedBuiltInElements&&Ia(xn.tagNameCheck,A)},ox=be({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Um=function(g){return!ox[_a(g)]&&vt(GC,g)},sx=function(g,M,A,U){if(Mt&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!A)switch(y.getAttributeType(g,M)){case"TrustedHTML":return Tr(U);case"TrustedScriptURL":return NC(U)}return U},ax=function(g,M,A,U){try{return A?g.setAttributeNS(A,M,U):g.setAttribute(M,U),ka(g)?(Kn(g),!1):!0}catch{return Ii(M,g),!1}},zm=function(g){En(Ae.beforeSanitizeAttributes,g,null);let M=g.attributes;if(!M||ka(g))return;Fe=Bm(Ae.uponSanitizeAttribute,Fe,Nd,Ca);let A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0},U=M.length,X=ze(g.nodeName);for(;U--;){let ce=M[U],Pe=ce.name,je=ce.namespaceURI,kt=ce.value,It=ze(Pe),qd=kt,bt=Pe==="value"?qd:dO(qd),Gm=!1;if(A.attrName=It,A.attrValue=bt,A.keepAttr=!0,A.forceKeepAttr=void 0,En(Ae.uponSanitizeAttribute,g,A),bt=A.attrValue,wm&&(It==="id"||It==="name")&&uC(bt,Em)!==0&&(Ii(Pe,g,ce),bt=Em+bt,Gm=!0),Mi&&vt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,bt)){Ii(Pe,g,ce);continue}if(It==="attributename"&&dC(bt,"href")){Ii(Pe,g,ce);continue}if(!A.forceKeepAttr){if(!A.keepAttr){Ii(Pe,g,ce);continue}if(!Cm&&vt(kO,bt)){Ii(Pe,g,ce);continue}if(Qn&&(bt=Ma(bt)),!Hm(X,It,bt)){Ii(Pe,g,ce);continue}bt=sx(X,It,je,bt),bt!==qd&&ax(g,Pe,je,bt)&&Gm&&cC(t.removed)}}En(Ae.afterSanitizeAttributes,g,null)},Pa=function(g){let M=null,A=Vm(g);for(En(Ae.beforeSanitizeShadowDOM,g,null);M=A.nextNode();)if(En(Ae.uponSanitizeShadowNode,M,null),$m(M,g),zm(M),Rr(M.content)&&Pa(M.content),No(M)===$t.element){let U=Ut(M);Rr(U)&&(Wd(U),Pa(U))}En(Ae.afterSanitizeShadowDOM,g,null)},Wd=function(g){let M=[{node:g,shadow:null}];for(;M.length>0;){let A=M.pop();if(A.shadow){Pa(A.shadow);continue}let U=A.node,ce=No(U)===$t.element,Pe=$(U);if(Pe)for(let je=Pe.length-1;je>=0;--je)M.push({node:Pe[je],shadow:null});if(ce){let je=rt?rt(U):null;if(typeof je=="string"&&ze(je)==="template"){let kt=U.content;Rr(kt)&&M.push({node:kt,shadow:null})}}if(ce){let je=Ut(U);Rr(je)&&M.push({node:null,shadow:je},{node:je,shadow:null})}}};return t.sanitize=function(V){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=null,A=null,U=null,X=null;if(jd=!V,jd&&(V="<!-->"),typeof V!="string"&&!Vo(V)&&(V=mO(V),typeof V!="string"))throw wr("dirty is not a string, aborting");if(!t.isSupported)return V;Ld?(Le=ya,Fe=Ca):zd(g),(Ae.uponSanitizeElement.length>0||Ae.uponSanitizeAttribute.length>0)&&(Le=Ht(Le)),Ae.uponSanitizeAttribute.length>0&&(Fe=Ht(Fe)),t.removed=[];let ce=Bd&&typeof V!="string"&&Vo(V);if(ce){nx(V);let kt=Id(V);if(typeof kt=="string"){let It=ze(kt);if(!Le[It]||Lo[It])throw Sa(V),wr("root node is forbidden and cannot be sanitized in-place")}if(ka(V))throw Sa(V),wr("root node is clobbered and cannot be sanitized in-place");try{Wd(V)}catch(It){throw Sa(V),It}}else if(Vo(V))M=Fm("<!---->"),A=M.ownerDocument.importNode(V,!0),A.nodeType===$t.element&&A.nodeName==="BODY"||A.nodeName==="HTML"?M=A:M.appendChild(A),Wd(M);else{if(!Mr&&!Qn&&!ki&&V.indexOf("<")===-1)return Mt&&wa?Tr(V):V;if(M=Fm(V),!M)return Mr?null:wa?Ti:""}M&&Fd&&Kn(M.firstChild);let Pe=ce?V:M;try{let kt=Vm(Pe);for(;U=kt.nextNode();)$m(U,Pe),zm(U),Rr(U.content)&&Pa(U.content)}catch(kt){throw ce&&(Sa(V),Er(t.removed,It=>{It.element&&Ta(It.element)})),kt}if(ce)return Er(t.removed,kt=>{kt.element&&Ta(kt.element)}),Qn&&Gd(V),V;if(Mr){if(Qn&&Gd(M),xa)for(X=LC.call(M.ownerDocument);M.firstChild;)X.appendChild(M.firstChild);else X=M;return(Fe.shadowroot||Fe.shadowrootmode)&&(X=VC.call(i,X,!0)),X}let je=ki?M.outerHTML:M.innerHTML;return ki&&Le["!doctype"]&&M.ownerDocument&&M.ownerDocument.doctype&&M.ownerDocument.doctype.name&&vt(SO,M.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+M.ownerDocument.doctype.name+`>
63
+ `+je),Qn&&(je=Ma(je)),Mt&&wa?Tr(je):je},t.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zd(V),Ld=!0,ya=Le,Ca=Fe},t.clearConfig=function(){Or=null,Ld=!1,ya=null,Ca=null,Mt=Pd,Ti=""},t.isValidAttribute=function(V,g,M){Or||zd({});let A=ze(V),U=ze(g);return Hm(A,U,M)},t.addHook=function(V,g){typeof g=="function"&&At(Ae,V)&&ha(Ae[V],g)},t.removeHook=function(V,g){if(At(Ae,V)){if(g!==void 0){let M=lO(Ae[V],g);return M===-1?void 0:cO(Ae[V],M,1)[0]}return cC(Ae[V])}},t.removeHooks=function(V){At(Ae,V)&&(Ae[V]=[])},t.removeAllHooks=function(){Ae=CC()},t}var SC=DC();var Ro=class n{markdown=N.required();html=L(()=>{let t=(this.markdown()??"").trim();return t?SC.sanitize(Ee.parse(t,{async:!1})):""});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-markdown-text"]],inputs:{markdown:[1,"markdown"]},decls:1,vars:1,consts:[[1,"markdown",3,"innerHTML"]],template:function(e,i){e&1&&J(0,"div",0),e&2&&W("innerHTML",i.html(),vf)},styles:[".markdown[_ngcontent-%COMP%]{color:var(--text);font-size:13px;line-height:1.55;word-wrap:break-word}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--text-bright);font-size:14px;font-weight:600;margin:14px 0 6px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:16px}.markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:0 0 8px;padding-left:22px}.markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:2px 0}.markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--mono);font-size:12px;background:var(--bg);border:1px solid var(--border);border-radius:3px;padding:1px 4px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:8px 10px;overflow-x:auto;margin:0 0 8px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;border:none;padding:0}.markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:3px solid var(--border);color:var(--text-dim);margin:0 0 8px;padding:2px 10px}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.markdown[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-collapse:collapse;margin:0 0 8px}.markdown[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid var(--border);padding:4px 8px;text-align:left}.markdown[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}.markdown[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:none;border-top:1px solid var(--border);margin:10px 0}"],changeDetection:0})};var NO=["host"],AO=["composerInput"],MC=(n,t)=>t.id;function LO(n,t){n&1&&(f(0,"div",3),p(1,"Loading diff..."),h())}function FO(n,t){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let e=u();c(),O(e.error())}}function VO(n,t){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let e=u();c(),O(e.editorError())}}function BO(n,t){n&1&&(f(0,"div",5),p(1,"Binary file not shown."),h())}function jO(n,t){n&1&&(f(0,"div",7),p(1,"Loading diff..."),h())}function $O(n,t){if(n&1){let e=P();f(0,"button",13),E("click",function(){_(e);let r=u(4);return v(r.openComposer())}),p(1," Add comment "),h()}}function HO(n,t){if(n&1&&(f(0,"div",20),z(1,"app-author-avatar",28),f(2,"div",29)(3,"div",30)(4,"span",31),p(5),h(),p(6),h(),z(7,"app-markdown-text",32),h()()),n&2){let e=t.$implicit,i=u(6);c(),k("name",e.author.name)("email",e.author.email||""),c(4),O(e.author.name),c(),q(" ",i.formatDate(e.createdAt)," "),c(),k("markdown",e.content)}}function UO(n,t){if(n&1&&(f(0,"option",27),p(1),h()),n&2){let e=t.$implicit,i=u(2).$implicit,r=u(4);k("value",e)("selected",e===i.status),c(),q(" ",r.statusLabel(e)," ")}}function zO(n,t){if(n&1){let e=P();f(0,"div",19),Q(1,HO,8,5,"div",20,MC),f(3,"div",21)(4,"input",22),E("input",function(r){_(e);let o=u().$implicit,s=u(4);return v(s.setReplyDraft(o.id,r))})("keydown.enter",function(){_(e);let r=u().$implicit,o=u(4);return v(o.sendReply(r.id))}),h(),f(5,"button",23),E("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.sendReply(r.id))}),p(6," Reply "),h()(),f(7,"div",24)(8,"label",25),p(9," Status "),f(10,"select",26),E("change",function(r){_(e);let o=u().$implicit,s=u(4);return v(s.onStatusChange(o,r))}),Q(11,UO,2,3,"option",27,Rt),h()()()()}if(n&2){let e=u().$implicit,i=u(4);c(),K(e.comments),c(3),k("value",i.replyDraft(e.id))("disabled",i.posting()),c(),k("disabled",i.posting()||!i.replyDraft(e.id).trim()),c(5),k("value",e.status)("disabled",i.posting()),c(),K(i.threadStatuses)}}function GO(n,t){if(n&1){let e=P();f(0,"div",14)(1,"button",15),E("click",function(){let r=_(e).$implicit,o=u(4);return v(o.toggleThread(r.id))}),f(2,"span",16),p(3),h(),f(4,"span",17),p(5),h(),f(6,"span",18),p(7),h()(),S(8,zO,13,5,"div",19),h()}if(n&2){let e=t.$implicit,i=u(4);me("expanded",i.isExpanded(e.id)),k("id","pr-thread-"+e.id),c(2),ft("status-"+e.status),c(),q(" ",i.statusLabel(e.status)," "),c(2),q(" ",i.threadPreview(e)," "),c(2),O(e.comments.length),c(),T(i.isExpanded(e.id)?8:-1)}}function WO(n,t){if(n&1){let e=P();f(0,"div",12)(1,"header",33)(2,"span",34),p(3,"New comment"),h(),f(4,"span",35),p(5,"Markdown supported"),h()(),f(6,"div",36)(7,"textarea",37,1),E("input",function(r){_(e);let o=u(4);return v(o.composerText.set(r.target.value))})("keydown",function(r){_(e);let o=u(4);return v(o.onComposerKeydown(r))}),h(),f(9,"div",38)(10,"span",39)(11,"kbd"),p(12,"Ctrl"),h(),p(13,"+"),f(14,"kbd"),p(15,"Enter"),h(),p(16," to comment "),h(),f(17,"span",40)(18,"button",41),E("click",function(){_(e);let r=u(4);return v(r.closeComposer())}),p(19,"Cancel"),h(),f(20,"button",42),E("click",function(){_(e);let r=u(4);return v(r.submitComposer())}),p(21," Comment "),h()()()()()}if(n&2){let e=u(4);c(7),k("value",e.composerText()),c(13),k("disabled",e.posting()||!e.composerText().trim())}}function qO(n,t){if(n&1&&(f(0,"section",8)(1,"header",9)(2,"strong"),p(3),h(),S(4,$O,2,0,"button",10),h(),Q(5,GO,9,9,"div",11,MC),S(7,WO,22,2,"div",12),h()),n&2){let e=u(3);c(3),O(e.selectionLabel()),c(),T(e.composerOpen()?-1:4),c(),K(e.selectedThreads()),c(2),T(e.composerOpen()?7:-1)}}function ZO(n,t){if(n&1&&(z(0,"div",6,0),S(2,jO,2,0,"div",7),S(3,qO,8,3,"section",8)),n&2){let e=u(2);c(2),T(e.editorLoading()?2:-1),c(),T(e.selection()?3:-1)}}function YO(n,t){if(n&1&&S(0,BO,2,0,"div",5)(1,ZO,4,2),n&2){let e=t;T(e.status==="binary"||e.binary?0:1)}}function QO(n,t){n&1&&(f(0,"div",5),p(1,"Select a file to view its changes."),h())}var KO=0,TC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},bd=class n{monacoService=I(Do);host=en("host");composerInput=en("composerInput");diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=H();replySubmit=H();statusSubmit=H();threadStatuses=Object.keys(TC);editorLoading=x(!1);editorError=x("");selection=x(null);composerOpen=x(!1);composerText=x("");expanded=x({});replyDrafts=x({});viewReady=!1;destroyed=!1;renderVersion=0;editor=null;models=[];disposables=[];decorations=[];threadsByAnchor=L(()=>{let t=new Map;for(let e of this.threads()){if(!e.filePath||e.line===null||!e.side)continue;let i=`${e.side}:${e.line}`;t.set(i,[...t.get(i)??[],e])}return t});selectedThreads=L(()=>{let t=this.selection();if(!t)return[];let e=[];for(let i=t.line;i<=t.endLine;i+=1)e.push(...this.threadsByAnchor().get(`${t.side}:${i}`)??[]);return e});constructor(){Ce(()=>{let t=this.diff();this.viewReady&&queueMicrotask(()=>{this.renderDiff(t)})}),Ce(()=>{this.threads(),this.viewReady&&this.updateThreadDecorations()}),Ce(()=>{let t=this.focus();if(!t)return;let e=this.threadsByAnchor().get(`${t.side}:${t.line}`)??[],i={};for(let r of e)i[r.id]=!0;Object.keys(i).length&&this.expanded.update(r=>G(G({},r),i)),this.selection.set(oe(G({},t),{endLine:t.line})),queueMicrotask(()=>this.revealSelection(t))})}ngAfterViewInit(){this.viewReady=!0,queueMicrotask(()=>{this.renderDiff(this.diff())})}ngOnDestroy(){this.destroyed=!0,this.disposeEditor()}openComposer(){this.selection()&&(this.composerOpen.set(!0),this.composerText.set(""),setTimeout(()=>this.composerInput()?.nativeElement.focus()))}onComposerKeydown(t){t.key==="Enter"&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),this.submitComposer()):t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.closeComposer())}submitComposer(){let t=this.selection(),e=this.composerText().trim();!t||!e||(this.commentSubmit.emit(oe(G({filePath:this.diff()?.path??""},t),{content:e})),this.closeComposer())}closeComposer(){this.composerOpen.set(!1),this.composerText.set("")}selectionLabel(){let t=this.selection();if(!t)return"";let e=t.side==="left"?"original":"modified";return t.line===t.endLine?`${e} line ${t.line}`:`${e} lines ${t.line}-${t.endLine}`}isExpanded(t){return this.expanded()[t]===!0}toggleThread(t){this.expanded.update(e=>oe(G({},e),{[t]:!e[t]}))}replyDraft(t){return this.replyDrafts()[t]??""}setReplyDraft(t,e){let i=e.target.value;this.replyDrafts.update(r=>oe(G({},r),{[t]:i}))}sendReply(t){let e=this.replyDraft(t).trim();e&&this.replySubmit.emit({threadId:t,content:e})}onStatusChange(t,e){let i=e.target.value;i&&i!==t.status&&this.statusSubmit.emit({threadId:t.id,status:i})}statusLabel(t){return TC[t]??t}threadPreview(t){let e=t.comments[0];return e?`${e.author.name}: ${e.content}`:"Review comment"}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}renderDiff(t){return Dn(this,null,function*(){let e=++this.renderVersion;if(this.disposeEditor(),this.selection.set(null),this.composerOpen.set(!1),this.editorError.set(""),!(!t||t.binary||t.status==="binary")){this.editorLoading.set(!0);try{let i=yield this.monacoService.load();if(this.destroyed||e!==this.renderVersion)return;let r=this.host();if(!r)return;let o=++KO,s=(t.oldPath||t.path).replace(/^\/+/,""),a=t.path.replace(/^\/+/,""),l=i.editor.createModel(t.originalContent??this.contentFromLines(t,"left"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/original/${s}`)),d=i.editor.createModel(t.modifiedContent??this.contentFromLines(t,"right"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/modified/${a}`));this.models=[l,d],this.editor=i.editor.createDiffEditor(r.nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},glyphMargin:!0,scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:l,modified:d}),this.watchSelection(this.editor.getOriginalEditor(),"left"),this.watchSelection(this.editor.getModifiedEditor(),"right"),this.updateThreadDecorations();let m=this.focus();m&&(this.selection.set(oe(G({},m),{endLine:m.line})),this.revealSelection(m))}catch{e===this.renderVersion&&this.editorError.set("Failed to load the diff viewer.")}finally{e===this.renderVersion&&this.editorLoading.set(!1)}}})}watchSelection(t,e){this.disposables.push(t.onDidChangeCursorSelection(i=>{let r=i.selection;this.selection.set({line:Math.min(r.startLineNumber,r.endLineNumber),endLine:Math.max(r.startLineNumber,r.endLineNumber),side:e}),this.composerOpen.set(!1)}))}updateThreadDecorations(){if(!this.editor)return;for(let e of this.decorations)e.clear();let t=e=>this.threads().filter(i=>i.side===e&&i.line!==null).map(i=>({range:{startLineNumber:i.line,startColumn:1,endLineNumber:i.line,endColumn:1},options:{isWholeLine:!0,glyphMarginClassName:"pr-thread-glyph",glyphMarginHoverMessage:{value:"Review comment"}}}));this.decorations=[this.editor.getOriginalEditor().createDecorationsCollection(t("left")),this.editor.getModifiedEditor().createDecorationsCollection(t("right"))]}revealSelection(t){if(!this.editor)return;let e=t.side==="left"?this.editor.getOriginalEditor():this.editor.getModifiedEditor();e.setPosition({lineNumber:t.line,column:1}),e.revealLineInCenter(t.line),e.focus()}contentFromLines(t,e){return t.lines.filter(i=>i.type==="context"||(e==="left"?i.type==="del":i.type==="add")).map(i=>i.text).join(`
64
+ `)}disposeEditor(){for(let t of this.disposables)t.dispose();this.disposables=[];for(let t of this.decorations)t.clear();this.decorations=[],this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-pr-file-diff"]],viewQuery:function(e,i){e&1&&(jt(i.host,NO,5),jt(i.composerInput,AO,5)),e&2&&vn(2)},inputs:{diff:[1,"diff"],threads:[1,"threads"],loading:[1,"loading"],error:[1,"error"],posting:[1,"posting"],focus:[1,"focus"]},outputs:{commentSubmit:"commentSubmit",replySubmit:"replySubmit",statusSubmit:"statusSubmit"},decls:6,vars:1,consts:[["host",""],["composerInput",""],[1,"file-diff"],["role","status",1,"diff-status"],["role","alert",1,"diff-status","error"],[1,"diff-status"],[1,"editor-host"],["role","status",1,"editor-loading"],["aria-label","Line review",1,"review-panel"],[1,"selection-head"],["type","button",1,"btn","small","primary"],[1,"thread",3,"id","expanded"],[1,"composer"],["type","button",1,"btn","small","primary",3,"click"],[1,"thread",3,"id"],["type","button",1,"thread-head",3,"click"],[1,"thread-status"],[1,"thread-preview"],[1,"thread-count"],[1,"thread-body"],[1,"comment"],[1,"reply-row"],["type","text","placeholder","Reply...",1,"reply-input",3,"input","keydown.enter","value","disabled"],["type","button",1,"btn","small",3,"click","disabled"],[1,"thread-actions"],[1,"status-label"],[3,"change","value","disabled"],[3,"value","selected"],[3,"name","email"],[1,"comment-main"],[1,"comment-meta"],[1,"comment-author"],[3,"markdown"],[1,"composer-head"],[1,"composer-title"],[1,"composer-target"],[1,"composer-body"],["rows","3","placeholder","Leave a comment...",1,"composer-text",3,"input","keydown","value"],[1,"composer-actions"],[1,"composer-hint"],[1,"composer-buttons"],["type","button",1,"btn","small",3,"click"],["type","button",1,"btn","small","primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(f(0,"div",2),S(1,LO,2,0,"div",3)(2,FO,2,1,"div",4)(3,VO,2,1,"div",4)(4,YO,2,1)(5,QO,2,0,"div",5),h()),e&2){let r;c(),T(i.loading()&&!i.diff()?1:i.error()?2:i.editorError()?3:(r=i.diff())?4:5,r)}},dependencies:[An,Ro],styles:["[_nghost-%COMP%]{display:block;min-width:0;min-height:0}.file-diff[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-alt)}.editor-host[_ngcontent-%COMP%]{flex:1;min-height:220px}.editor-loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg-alt);color:var(--text-dim);font-size:13px}.diff-status[_ngcontent-%COMP%]{padding:16px;color:var(--text-dim);font-size:13px}.diff-status.error[_ngcontent-%COMP%]{color:var(--red)}.review-panel[_ngcontent-%COMP%]{flex:none;max-height:42%;overflow:auto;padding:8px 10px;border-top:1px solid var(--border);background:var(--bg)}.selection-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px;color:var(--text-dim);font-size:11px}.thread[_ngcontent-%COMP%], .composer[_ngcontent-%COMP%]{margin-top:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);overflow:hidden}.thread-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 8px;border:none;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer}.thread-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.thread-status[_ngcontent-%COMP%]{flex:none;border-radius:3px;padding:1px 5px;font-size:10px;font-weight:600;text-transform:uppercase}.thread-status.status-active[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent)}.thread-status.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.thread-status.status-wontFix[_ngcontent-%COMP%], .thread-status.status-closed[_ngcontent-%COMP%], .thread-status.status-byDesign[_ngcontent-%COMP%], .thread-status.status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.thread-preview[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;color:var(--text-dim);text-overflow:ellipsis;white-space:nowrap}.thread-count[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.thread-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px;border-top:1px solid var(--border)}.comment[_ngcontent-%COMP%]{display:flex;gap:8px}.comment-main[_ngcontent-%COMP%]{flex:1;min-width:0}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.comment-author[_ngcontent-%COMP%]{color:var(--text-bright);font-weight:600}.reply-row[_ngcontent-%COMP%]{display:flex;gap:6px}.reply-input[_ngcontent-%COMP%]{flex:1;min-width:0;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text)}.reply-input[_ngcontent-%COMP%]:focus, .composer-text[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px #3794ff40}.thread-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:6px}.status-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:var(--text-dim);font-size:11px}.status-label[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:24px;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text)}.composer[_ngcontent-%COMP%]{border-color:#3794ffa6;box-shadow:0 2px 10px #00000059}.composer-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--bg)}.composer-title[_ngcontent-%COMP%]{color:var(--text-bright);font-size:12px;font-weight:600}.composer-target[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-body[_ngcontent-%COMP%]{padding:8px 10px 10px}.composer-text[_ngcontent-%COMP%]{display:block;width:100%;min-height:66px;padding:7px 9px;box-sizing:border-box;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font:inherit;line-height:1.5;resize:vertical;transition:border-color .12s ease,box-shadow .12s ease}.composer-text[_ngcontent-%COMP%]::placeholder{color:var(--text-dim)}.composer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.composer-hint[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{padding:1px 4px;border:1px solid var(--border);border-radius:3px;background:var(--bg);font-family:var(--mono);font-size:10px}.composer-buttons[_ngcontent-%COMP%]{display:flex;gap:6px}.btn[_ngcontent-%COMP%]{height:26px;padding:0 11px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font:inherit;font-size:12px;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}.btn.primary[_ngcontent-%COMP%]:disabled{border-color:var(--border);background:var(--bg-alt);color:var(--text-dim);opacity:1}.btn.primary[_ngcontent-%COMP%]{border-color:#2580d8;background:#0e639c;color:#fff}.btn.primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#17b}.btn.small[_ngcontent-%COMP%]{height:24px;padding:0 10px;font-size:12px}[_nghost-%COMP%] .pr-thread-glyph{background:var(--accent);border:3px solid var(--bg-alt);border-radius:50%}"],changeDetection:0})};var pm=()=>[],Cd=n=>({$implicit:n}),PC=(n,t)=>t.value,Dr=(n,t)=>t.id,XO=(n,t)=>t.path;function JO(n,t){n&1&&(f(0,"div",5),p(1,"Loading pull request..."),h())}function eR(n,t){n&1&&(f(0,"span",12),p(1,"Draft"),h())}function tR(n,t){if(n&1){let e=P();f(0,"button",26),E("click",function(){_(e);let r=u(2);return v(r.publishPr())}),p(1," Publish "),h(),f(2,"button",27),E("click",function(){_(e);let r=u(2);return v(r.openAbandonConfirm())}),p(3," Abandon "),h()}if(n&2){let e=u(2);k("disabled",e.busy()),c(2),k("disabled",e.busy())}}function nR(n,t){if(n&1){let e=P();f(0,"button",32),E("click",function(){let r=_(e).$implicit,o=u(4);return v(o.vote(r.value))}),z(1,"span"),p(2),h()}if(n&2){let e=t.$implicit,i=u(3),r=u();me("current",r.voteMeta(i.myVote).cls==="vote-"+e.icon),c(),ft("vote-dot vote-"+e.icon),c(),q("",e.label," ")}}function iR(n,t){if(n&1&&(f(0,"div",29),Q(1,nR,3,5,"button",31,PC),h()),n&2){let e=u(3);c(),K(e.voteOptions)}}function rR(n,t){if(n&1){let e=P();f(0,"button",27),E("click",function(){_(e);let r=u(3);return v(r.cancelAutoComplete())}),p(1," Cancel auto-complete "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function oR(n,t){if(n&1){let e=P();f(0,"button",27),E("click",function(){_(e);let r=u(3);return v(r.openAutoComplete())}),p(1," Set auto-complete "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function sR(n,t){if(n&1){let e=P();f(0,"div",28)(1,"button",27),E("click",function(){_(e);let r=u(2);return v(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),p(2," Review \u25BE "),h(),S(3,iR,3,0,"div",29),h(),S(4,rR,2,1,"button",30)(5,oR,2,1,"button",30),f(6,"button",26),E("click",function(){_(e);let r=u(2);return v(r.openComplete())}),p(7," Complete "),h()}if(n&2){let e=u(),i=u();c(),k("disabled",i.busy()),c(2),T(i.reviewMenuOpen()?3:-1),c(),T(e.autoCompleteSetBy?4:5),c(2),k("disabled",i.busy())}}function aR(n,t){if(n&1&&z(0,"app-error-banner",21),n&2){let e=u(2);k("message",e.error())}}function lR(n,t){if(n&1){let e=P();f(0,"div",34)(1,"div")(2,"strong"),p(3,"Merge conflicts"),h(),f(4,"p"),p(5," This pull request has conflicts with "),f(6,"code"),p(7),h(),p(8,". Resolve them before it can be completed. "),h()(),f(9,"button",55),E("click",function(){_(e);let r=u(3);return v(r.openInBrowser())}),p(10," Resolve in Azure DevOps "),h()()}if(n&2){let e=u(2);c(7),O(e.targetBranch)}}function cR(n,t){n&1&&(f(0,"div",35)(1,"div")(2,"strong"),p(3,"Blocked by policy"),h(),f(4,"p"),p(5," One or more merge policies reject this pull request. Check the checks below. "),h()()())}function dR(n,t){n&1&&(f(0,"div",35)(1,"div")(2,"strong"),p(3,"Merge failed"),h(),f(4,"p"),p(5," The last merge attempt failed. Check Azure DevOps for details. "),h()()())}function uR(n,t){n&1&&(f(0,"div",36)(1,"div")(2,"strong"),p(3,"Queued for merge"),h(),f(4,"p"),p(5,"The merge is in progress."),h()()())}function pR(n,t){n&1&&(f(0,"div",40),p(1,"Loading checks..."),h())}function fR(n,t){if(n&1){let e=P();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),E("click",function(){_(e);let r=u(3);return v(r.loadChecks())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.checksError()),c(),k("disabled",e.checksLoading())}}function hR(n,t){if(n&1&&(f(0,"div",56),p(1),h()),n&2){let e=t.$implicit;c(),O(e)}}function mR(n,t){if(n&1&&(f(0,"div",57),p(1),h()),n&2){let e=u(4);c(),O(e.requeueError())}}function gR(n,t){if(n&1&&hr(0,60),n&2){let e=t.$implicit;u(5);let i=Ci(44);k("ngTemplateOutlet",i)("ngTemplateOutletContext",xi(2,Cd,e))}}function _R(n,t){if(n&1&&(f(0,"ul",58),Q(1,gR,1,4,"ng-container",60,Dr),h()),n&2){let e=u(5);c(),K(e.requiredChecks())}}function vR(n,t){n&1&&z(0,"hr",59)}function bR(n,t){if(n&1&&hr(0,60),n&2){let e=t.$implicit;u(5);let i=Ci(44);k("ngTemplateOutlet",i)("ngTemplateOutletContext",xi(2,Cd,e))}}function yR(n,t){if(n&1&&(f(0,"ul",58),Q(1,bR,1,4,"ng-container",60,Dr),h()),n&2){let e=u(5);c(),K(e.optionalChecks())}}function CR(n,t){if(n&1&&(S(0,_R,3,0,"ul",58),S(1,vR,1,0,"hr",59),S(2,yR,3,0,"ul",58)),n&2){let e=u(4);T(e.requiredChecks().length?0:-1),c(),T(e.requiredChecks().length&&e.optionalChecks().length?1:-1),c(),T(e.optionalChecks().length?2:-1)}}function xR(n,t){n&1&&(f(0,"p",46),p(1,"No checks reported."),h())}function wR(n,t){if(n&1&&(Q(0,hR,2,1,"div",56,Rt),S(2,mR,2,1,"div",57),S(3,CR,3,3)(4,xR,2,0,"p",46)),n&2){let e=u(3);K(e.checksWarnings()),c(2),T(e.requeueError()?2:-1),c(),T(e.checks().length?3:4)}}function ER(n,t){if(n&1){let e=P();f(0,"button",55),E("click",function(){_(e);let r=u(3);return v(r.startEditing())}),p(1," Edit "),h()}}function DR(n,t){if(n&1){let e=P();f(0,"label"),p(1,"Title"),f(2,"input",61),E("input",function(r){_(e);let o=u(3);return v(o.editTitle.set(r.target.value))}),h()(),f(3,"label"),p(4,"Description"),f(5,"textarea",62),E("input",function(r){_(e);let o=u(3);return v(o.editDescription.set(r.target.value))}),h()(),f(6,"div",63)(7,"button",27),E("click",function(){_(e);let r=u(3);return v(r.editing.set(!1))}),p(8," Cancel "),h(),f(9,"button",26),E("click",function(){_(e);let r=u(3);return v(r.saveEdit())}),p(10," Save "),h()()}if(n&2){let e=u(3);c(2),k("value",e.editTitle()),c(3),k("value",e.editDescription()),c(2),k("disabled",e.busy()),c(2),k("disabled",e.busy()||!e.editTitle().trim())}}function SR(n,t){if(n&1&&z(0,"app-markdown-text",65),n&2){let e=u(3);k("markdown",e.description)}}function TR(n,t){n&1&&(f(0,"p",46),p(1,"No description provided."),h())}function MR(n,t){if(n&1&&(f(0,"h2",64),p(1),h(),S(2,SR,1,1,"app-markdown-text",65)(3,TR,2,0,"p",46)),n&2){let e=u(2);c(),O(e.title),c(),T(e.description?2:3)}}function kR(n,t){if(n&1&&hr(0,60),n&2){let e=t.$implicit;u(3);let i=Ci(46);k("ngTemplateOutlet",i)("ngTemplateOutletContext",xi(2,Cd,e))}}function IR(n,t){if(n&1&&(f(0,"h3"),p(1,"Required"),h(),Q(2,kR,1,4,"ng-container",60,Dr)),n&2){let e=u(3);c(2),K(e.requiredReviewers())}}function PR(n,t){if(n&1&&hr(0,60),n&2){let e=t.$implicit;u(3);let i=Ci(46);k("ngTemplateOutlet",i)("ngTemplateOutletContext",xi(2,Cd,e))}}function OR(n,t){if(n&1&&(f(0,"h3"),p(1,"Optional"),h(),Q(2,PR,1,4,"ng-container",60,Dr)),n&2){let e=u(3);c(2),K(e.otherReviewers())}}function RR(n,t){n&1&&(f(0,"p",46),p(1,"No reviewers."),h())}function NR(n,t){if(n&1){let e=P();f(0,"button",66),E("click",function(){_(e);let r=u(3);return v(r.toggleDraft())}),p(1," Convert to draft "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function AR(n,t){if(n&1){let e=P();f(0,"span",67)(1,"span"),p(2),h(),f(3,"button",68),E("click",function(){let r=_(e).$implicit,o=u(4);return v(o.removeTag(r))}),p(4," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(4);c(2),O(e),c(),k("disabled",i.busy()),le("aria-label","Remove tag "+e)}}function LR(n,t){if(n&1&&(f(0,"div",50),Q(1,AR,5,3,"span",67,Rt),h()),n&2){let e=u(2);c(),K(e.labels)}}function FR(n,t){n&1&&(f(0,"p",46),p(1,"No tags."),h())}function VR(n,t){if(n&1){let e=P();f(0,"app-chip-input",69),E("queryChange",function(r){_(e);let o=u(3);return v(o.tagQuery.set(r))})("select",function(r){_(e);let o=u(3);return v(o.addTag(r))}),h()}if(n&2){let e=u(3);k("chips",Us(6,pm))("suggestions",e.tagSuggestions())("loading",e.tagsLoading())("query",e.tagQuery())("disabled",e.busy())("allowFreeText",!0)}}function BR(n,t){n&1&&(f(0,"div",40),p(1,"Loading work items..."),h())}function jR(n,t){if(n&1){let e=P();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),E("click",function(){_(e);let r=u(3);return v(r.loadWorkItems())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.workItemsError()),c(),k("disabled",e.workItemsLoading())}}function $R(n,t){if(n&1&&(f(0,"small"),p(1),h()),n&2){let e=u().$implicit;c(),O(e.state)}}function HR(n,t){if(n&1){let e=P();f(0,"li")(1,"button",70),E("click",function(){let r=_(e).$implicit,o=u(4);return v(o.openExternalLink(r.url))}),f(2,"span",71),p(3),h(),f(4,"span",72),p(5),h()(),S(6,$R,2,1,"small"),f(7,"button",73),E("click",function(){let r=_(e).$implicit,o=u(4);return v(o.unlinkWorkItem(r.id))}),p(8," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(4);c(3),q("#",e.id),c(2),O(e.title),c(),T(e.state?6:-1),c(),k("disabled",i.busy()),le("aria-label","Unlink work item #"+e.id)}}function UR(n,t){if(n&1&&(f(0,"ul",53),Q(1,HR,9,5,"li",null,Dr),h()),n&2){let e=u(3);c(),K(e.workItems())}}function zR(n,t){n&1&&(f(0,"p",46),p(1,"No related work items."),h())}function GR(n,t){if(n&1){let e=P();f(0,"app-chip-input",74),E("queryChange",function(r){_(e);let o=u(3);return v(o.workItemQuery.set(r))})("select",function(r){_(e);let o=u(3);return v(o.linkWorkItem(r))}),h()}if(n&2){let e=u(3);k("chips",Us(6,pm))("suggestions",e.workItemSuggestions())("loading",e.workItemsSearchLoading())("query",e.workItemQuery())("error",e.workItemsSearchError())("disabled",e.busy())}}function WR(n,t){if(n&1){let e=P();f(0,"div",23)(1,"main",33),S(2,lR,11,1,"div",34)(3,cR,6,0,"div",35)(4,dR,6,0,"div",35)(5,uR,6,0,"div",36),f(6,"section",37)(7,"div",38)(8,"h2"),p(9,"Checks"),h(),f(10,"button",39),E("click",function(){_(e);let r=u(2);return v(r.loadChecks())}),p(11," Refresh "),h()(),S(12,pR,2,0,"div",40)(13,fR,5,2,"div",41)(14,wR,5,2),h(),f(15,"section",42)(16,"div",38)(17,"h2"),p(18,"Details"),h(),S(19,ER,2,0,"button",43),h(),S(20,DR,11,4)(21,MR,4,2),h()(),f(22,"aside",44)(23,"div",38)(24,"h2"),p(25,"Reviewers"),h()(),f(26,"app-chip-input",45),E("trailingAction",function(){_(e);let r=u(2);return v(r.reviewerRequired.set(!r.reviewerRequired()))})("queryChange",function(r){_(e);let o=u(2);return v(o.reviewerQuery.set(r))})("select",function(r){_(e);let o=u(2);return v(o.addReviewer(r))}),h(),S(27,IR,4,0),S(28,OR,4,0),S(29,RR,2,0,"p",46),S(30,NR,2,1,"button",47),f(31,"div",48)(32,"h3"),p(33,"Tags"),h(),f(34,"button",49),E("click",function(){_(e);let r=u(2);return v(r.toggleTagsPicker())}),p(35," + "),h()(),S(36,LR,3,0,"div",50)(37,FR,2,0,"p",46),S(38,VR,1,7,"app-chip-input",51),f(39,"div",48)(40,"h3"),p(41,"Related work items"),h(),f(42,"button",52),E("click",function(){_(e);let r=u(2);return v(r.toggleWorkItemPicker())}),p(43," + "),h()(),S(44,BR,2,0,"div",40)(45,jR,5,2,"div",41)(46,UR,3,0,"ul",53)(47,zR,2,0,"p",46),S(48,GR,1,7,"app-chip-input",54),h()()}if(n&2){let e=u(),i=u();c(2),T(e.mergeStatus==="conflicts"?2:e.mergeStatus==="rejectedByPolicy"?3:e.mergeStatus==="failure"?4:e.mergeStatus==="queued"?5:-1),c(8),k("disabled",i.checksLoading()),c(2),T(i.checksLoading()?12:i.checksError()?13:14),c(7),T(i.editing()?-1:19),c(),T(i.editing()?20:21),c(6),k("chips",Us(22,pm))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy())("trailingPressed",i.reviewerRequired()),c(),T(i.requiredReviewers().length?27:-1),c(),T(i.otherReviewers().length?28:-1),c(),T(e.reviewers.length?-1:29),c(),T(e.isDraft?-1:30),c(4),k("disabled",i.busy()),c(2),T(e.labels.length?36:37),c(2),T(i.tagsPickerOpen()?38:-1),c(4),k("disabled",i.busy()),c(2),T(i.workItemsLoading()?44:i.workItemsError()?45:i.workItems().length?46:47),c(4),T(i.workItemPickerOpen()?48:-1)}}function qR(n,t){if(n&1){let e=P();f(0,"button",85),E("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.jumpToThread(r))}),p(1),h()}if(n&2){let e=u().$implicit;c(),_o(" ",e.filePath,":",e.line," ")}}function ZR(n,t){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let e=t.$implicit,i=u(4);k("value",e),c(),O(i.statusLabel(e))}}function YR(n,t){if(n&1&&(f(0,"div",82),z(1,"app-author-avatar",14),f(2,"div")(3,"div",86)(4,"strong"),p(5),h(),p(6),h(),z(7,"app-markdown-text",65),h()()),n&2){let e=t.$implicit,i=u(4);c(),k("name",e.author.name)("email",e.author.email||""),c(4),O(e.author.name),c(),q(" \xB7 ",i.formatDate(e.createdAt)," "),c(),k("markdown",e.content)}}function QR(n,t){if(n&1){let e=P();f(0,"article",77)(1,"header")(2,"span"),p(3),h(),S(4,qR,2,2,"button",79),f(5,"select",80),E("change",function(r){let o=_(e).$implicit,s=u(3);return v(s.setThreadStatus(o.id,r.target.value))}),Q(6,ZR,2,2,"option",81,Rt),h()(),Q(8,YR,8,5,"div",82,Dr),f(10,"div",83)(11,"input",84,2),E("keydown.enter",function(){let r=_(e).$implicit,o=Ci(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),h(),f(13,"button",39),E("click",function(){let r=_(e).$implicit,o=Ci(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),p(14," Reply "),h()()()}if(n&2){let e=t.$implicit,i=u(3);c(2),ft("thread-status status-"+e.status),c(),O(i.statusLabel(e.status)),c(),T(e.filePath?4:-1),c(),k("value",e.status)("disabled",i.busy()),c(),K(i.threadStatuses),c(2),K(e.comments),c(5),k("disabled",i.busy())}}function KR(n,t){n&1&&(f(0,"div",78),p(1,"No comments yet."),h())}function XR(n,t){if(n&1){let e=P();f(0,"div",24)(1,"section",75)(2,"h2"),p(3,"Add comment"),h(),f(4,"textarea",76),E("input",function(r){_(e);let o=u(2);return v(o.newComment.set(r.target.value))}),h(),f(5,"div",63)(6,"button",26),E("click",function(){_(e);let r=u(2);return v(r.addGeneralComment())}),p(7," Comment "),h()()(),Q(8,QR,15,7,"article",77,Dr,!1,KR,2,0,"div",78),h()}if(n&2){let e=u(2);c(4),k("value",e.newComment()),c(2),k("disabled",e.busy()||!e.newComment().trim()),c(2),K(e.threads())}}function JR(n,t){if(n&1){let e=P();f(0,"div",88)(1,"span"),p(2),h(),f(3,"button",39),E("click",function(){_(e);let r=u(3);return v(r.loadFiles())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.filesError()),c(),k("disabled",e.filesLoading())}}function eN(n,t){n&1&&(f(0,"div",40),p(1,"Loading changed files..."),h())}function tN(n,t){n&1&&(F(),z(0,"polyline",94))}function nN(n,t){n&1&&(F(),z(0,"polyline",95))}function iN(n,t){if(n&1){let e=P();f(0,"button",92),E("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.toggleFileDirectory(r.path))}),F(),f(1,"svg",93),S(2,tN,1,0,":svg:polyline",94)(3,nN,1,0,":svg:polyline",95),h(),ue(),f(4,"span"),p(5),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+9,"px"),k("title",e.path),le("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function rN(n,t){if(n&1){let e=P();f(0,"button",96),E("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.selectFile(r.file))}),f(1,"span"),p(2),h(),f(3,"span"),p(4),h()()}if(n&2){let e,i=u().$implicit,r=u(4);ie("padding-left",i.depth*14+9,"px"),me("active",((e=r.selectedFile())==null?null:e.path)===i.file.path),k("title",i.file.path),c(),ft("file-status status-"+i.file.changeType),c(),O(i.file.changeType[0].toUpperCase()),c(2),O(i.name)}}function oN(n,t){if(n&1&&S(0,iN,6,6,"button",90)(1,rN,5,9,"button",91),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function sN(n,t){n&1&&(f(0,"div",78),p(1,"No changed files."),h())}function aN(n,t){if(n&1&&Q(0,oN,2,1,null,null,XO,!1,sN,2,0,"div",78),n&2){let e=u(3);K(e.fileRows())}}function lN(n,t){if(n&1){let e=P();f(0,"div",25)(1,"aside",87),S(2,JR,5,2,"div",88)(3,eN,2,0,"div",40)(4,aN,3,1),h(),f(5,"app-pr-file-diff",89),E("commentSubmit",function(r){_(e);let o=u(2);return v(o.addInlineComment(r))})("replySubmit",function(r){_(e);let o=u(2);return v(o.replyFromDiff(r))})("statusSubmit",function(r){_(e);let o=u(2);return v(o.setStatusFromDiff(r))}),h()()}if(n&2){let e=u(2);c(2),T(e.filesError()?2:e.filesLoading()?3:4),c(3),k("diff",e.selectedFile()?e.fileDiffs()[e.selectedFile().path]??null:null)("threads",e.selectedFileThreads())("loading",e.fileDiffLoading())("error",e.fileDiffError())("posting",e.busy())("focus",e.fileFocus())}}function cN(n,t){n&1&&(f(0,"span",100),p(1,"Required"),h())}function dN(n,t){if(n&1&&(f(0,"small"),p(1),h()),n&2){let e=u().$implicit;c(),O(e.detail)}}function uN(n,t){if(n&1){let e=P();f(0,"button",39),E("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.requeueCheck(r))}),p(1),h()}if(n&2){let e=u().$implicit,i=u(2);k("disabled",!!i.requeuing()||i.checksLoading()),c(),q(" ",i.requeuing()===e.evaluationId?"Requeuing...":"Requeue"," ")}}function pN(n,t){if(n&1){let e=P();f(0,"button",55),E("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.openExternalLink(r.url))}),p(1," Open "),h()}}function fN(n,t){if(n&1&&(f(0,"li",97)(1,"span"),p(2),h(),f(3,"div",98)(4,"div",99),p(5),S(6,cN,2,0,"span",100),h(),S(7,dN,2,1,"small"),h(),S(8,uN,2,2,"button",101),S(9,pN,2,0,"button",43),h()),n&2){let e=t.$implicit,i=u(2);c(),ft("check-state state-"+e.state),c(),O(i.checkStateLabel(e.state)),c(3),q(" ",e.name," "),c(),T(e.required?6:-1),c(),T(e.detail?7:-1),c(),T(e.evaluationId?8:-1),c(),T(e.url?9:-1)}}function hN(n,t){if(n&1){let e=P();f(0,"div",102),z(1,"app-author-avatar",14),f(2,"div",103)(3,"span"),p(4),h(),f(5,"small"),p(6),h()(),f(7,"button",104),E("click",function(){let r=_(e).$implicit,o=u(2);return v(o.toggleReviewerRequired(r))}),p(8),h(),f(9,"button",105),E("click",function(){let r=_(e).$implicit,o=u(2);return v(o.removeReviewer(r))}),p(10," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(2);c(),k("name",e.name)("email",e.email||""),c(3),O(e.name),c(),ft(i.voteMeta(e.vote).cls),c(),O(i.voteMeta(e.vote).label),c(),me("on",e.isRequired),k("title",e.isRequired?"Make optional":"Make required"),c(),q(" ",e.isRequired?"Required":"Optional"," "),c(),le("aria-label","Remove "+e.name)}}function mN(n,t){if(n&1){let e=P();f(0,"h2"),p(1,"Abandon pull request"),h(),f(2,"p",108),p(3),h(),f(4,"div",63)(5,"button",27),E("click",function(){_(e);let r=u(3);return v(r.abandonOpen.set(!1))}),p(6," Cancel "),h(),f(7,"button",109),E("click",function(){_(e);let r=u(3);return v(r.abandonPr())}),p(8," Abandon "),h()()}if(n&2){let e,i=u(3);c(3),q(" This closes pull request !",(e=i.pr())==null?null:e.id," without merging it. The source branch is kept. "),c(2),k("disabled",i.busy()),c(2),k("disabled",i.busy())}}function gN(n,t){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let e=t.$implicit;k("value",e.value),c(),O(e.label)}}function _N(n,t){if(n&1){let e=P();f(0,"h2"),p(1),h(),f(2,"label"),p(3,"Merge strategy"),f(4,"select",110),E("change",function(r){_(e);let o=u(3);return v(o.mergeStrategy.set(r.target.value))}),Q(5,gN,2,2,"option",81,PC),h()(),f(7,"label",111)(8,"input",112),E("change",function(r){_(e);let o=u(3);return v(o.deleteSourceBranch.set(r.target.checked))}),h(),p(9,"Delete source branch"),h(),f(10,"label",111)(11,"input",112),E("change",function(r){_(e);let o=u(3);return v(o.completeWorkItems.set(r.target.checked))}),h(),p(12,"Complete associated work items"),h(),f(13,"label",113)(14,"input",114),E("change",function(r){_(e);let o=u(3);return v(o.transitionWorkItems.set(r.target.checked))}),h(),p(15,"Transition linked work items"),h(),f(16,"div",63)(17,"button",17),E("click",function(){_(e);let r=u(3);return r.completeOpen.set(!1),v(r.autoCompleteOpen.set(!1))}),p(18," Cancel"),h(),f(19,"button",26),E("click",function(){_(e);let r=u(3);return v(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),p(20),h()()}if(n&2){let e=u(3);c(),q(" ",e.completeOpen()?"Complete pull request":"Set auto-complete"," "),c(3),k("value",e.mergeStrategy()),c(),K(e.mergeStrategies()),c(3),k("checked",e.deleteSourceBranch()),c(3),k("checked",e.completeWorkItems()),c(3),k("checked",e.transitionWorkItems())("disabled",!e.completeWorkItems()),c(5),k("disabled",e.busy()),c(),q(" ",e.completeOpen()?"Complete":"Enable"," ")}}function vN(n,t){if(n&1){let e=P();f(0,"div",106),E("click",function(){_(e);let r=u(2);return r.completeOpen.set(!1),r.autoCompleteOpen.set(!1),v(r.abandonOpen.set(!1))}),h(),f(1,"section",107),S(2,mN,9,3)(3,_N,21,8),h()}if(n&2){let e=u(2);c(),le("aria-label",e.abandonOpen()?"Abandon pull request":e.completeOpen()?"Complete pull request":"Set auto-complete"),c(),T(e.abandonOpen()?2:3)}}function bN(n,t){if(n&1){let e=P();f(0,"header",7)(1,"div",8)(2,"div",9)(3,"span",10),p(4),h(),f(5,"h1"),p(6),h(),f(7,"span",11),p(8),h(),S(9,eR,2,0,"span",12),h(),f(10,"div",13),z(11,"app-author-avatar",14),f(12,"span"),p(13),h(),f(14,"code"),p(15),h(),f(16,"span",15),p(17,"\u2192"),h(),f(18,"code"),p(19),h()()(),f(20,"div",16)(21,"button",17),E("click",function(){_(e);let r=u();return v(r.openInBrowser())}),p(22," Open in Azure DevOps "),h(),S(23,tR,4,2)(24,sR,8,4),f(25,"button",18),E("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(26," \xD7 "),h()()(),f(27,"nav",19)(28,"button",20),E("click",function(){_(e);let r=u();return v(r.tab.set("overview"))}),p(29," Overview "),h(),f(30,"button",20),E("click",function(){_(e);let r=u();return v(r.tab.set("files"))}),p(31," Files "),f(32,"span"),p(33),h()(),f(34,"button",20),E("click",function(){_(e);let r=u();return v(r.tab.set("comments"))}),p(35," Comments "),f(36,"span"),p(37),h()()(),S(38,aR,1,1,"app-error-banner",21),f(39,"div",22),S(40,WR,49,23,"div",23)(41,XR,11,3,"div",24)(42,lN,6,7,"div",25),h(),go(43,fN,10,8,"ng-template",null,0,kc)(45,hN,11,11,"ng-template",null,1,kc),S(47,vN,4,2)}if(n&2){let e=t,i=u();c(4),q("!",e.id),c(2),O(e.title),c(2),O(e.status),c(),T(e.isDraft?9:-1),c(2),k("name",e.author.name)("email",e.author.email||""),c(2),O(e.author.name),c(2),O(e.sourceBranch),c(4),O(e.targetBranch),c(4),T(e.isDraft?23:24),c(2),k("disabled",i.busy()),c(3),me("active",i.tab()==="overview"),c(2),me("active",i.tab()==="files"),c(3),O(i.files().length),c(),me("active",i.tab()==="comments"),c(3),O(i.threads().length),c(),T(i.error()?38:-1),c(2),T(i.tab()==="overview"?40:i.tab()==="comments"?41:42),c(7),T(i.completeOpen()||i.autoCompleteOpen()||i.abandonOpen()?47:-1)}}function yN(n,t){if(n&1){let e=P();f(0,"div",6)(1,"div"),p(2),h(),f(3,"button",17),E("click",function(){_(e);let r=u();return v(r.load())}),p(4,"Retry"),h()()}if(n&2){let e=u();c(2),O(e.error()||"Pull request could not be loaded.")}}var kC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},CN={notSet:"Not merged",queued:"Queued for merge",conflicts:"Merge conflicts",succeeded:"Ready to merge",rejectedByPolicy:"Blocked by policy",failure:"Merge failed"},xN={pending:"Pending",succeeded:"Passed",failed:"Failed",notApplicable:"N/A"},yd=class n{git=I(lt);vscode=I(nn);destroyRef=I(tt);prId=N.required();settings=N(null);closed=H();changed=H();pr=x(null);threads=x([]);files=x([]);loading=x(!0);error=x("");busy=x(!1);workItems=x([]);workItemsLoading=x(!1);workItemsError=x("");checks=x([]);checksLoading=x(!1);checksError=x("");checksWarnings=x([]);requeuing=x("");requeueError=x("");requiredChecks=L(()=>this.checks().filter(t=>t.required));optionalChecks=L(()=>this.checks().filter(t=>!t.required));filesLoading=x(!1);filesError=x("");tab=x("overview");editing=x(!1);editTitle=x("");editDescription=x("");reviewerQuery=x("");reviewerSuggestions=x([]);reviewersLoading=x(!1);reviewersError=x("");reviewerRequired=x(!1);tagsPickerOpen=x(!1);tagQuery=x("");allTags=x([]);tagsLoading=x(!1);tagSuggestions=L(()=>{let t=this.tagQuery().trim().toLowerCase(),e=this.allTags();return t?e.filter(i=>i.label.toLowerCase().includes(t)):e});workItemPickerOpen=x(!1);workItemQuery=x("");workItemSuggestions=x([]);workItemsSearchLoading=x(!1);workItemsSearchError=x("");reviewMenuOpen=x(!1);completeOpen=x(!1);autoCompleteOpen=x(!1);abandonOpen=x(!1);mergeStrategy=x("noFastForward");deleteSourceBranch=x(!1);completeWorkItems=x(!1);transitionWorkItems=x(!1);newComment=x("");selectedFile=x(null);fileDiffs=x({});fileDiffLoading=x(!1);fileDiffError=x("");fileFocus=x(null);collapsedFiles=x(new Set);fileRows=L(()=>{let t=this.files();return this.settings()?.fileListView!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):Eo(t,this.collapsedFiles())});mergeStrategies=L(()=>n.allMergeStrategies.filter(t=>{let e=this.settings();return t.value==="noFastForward"||t.value==="rebaseMerge"?e?.allowMerge!==!1:!0}));static allMergeStrategies=[{value:"noFastForward",label:"No fast-forward (merge commit)"},{value:"squash",label:"Squash changes"},{value:"rebase",label:"Rebase and fast-forward"},{value:"rebaseMerge",label:"Semi-linear merge"}];voteOptions=[{value:"approve",label:"Approve",icon:"approve"},{value:"approveWithSuggestions",label:"Approve with suggestions",icon:"suggestions"},{value:"waitForAuthor",label:"Waiting for author",icon:"waiting"},{value:"reject",label:"Reject",icon:"reject"},{value:"reset",label:"Remove my vote",icon:"none"}];threadStatuses=Object.keys(kC);requiredReviewers=L(()=>(this.pr()?.reviewers??[]).filter(t=>t.isRequired));otherReviewers=L(()=>(this.pr()?.reviewers??[]).filter(t=>!t.isRequired));generalThreads=L(()=>this.threads().filter(t=>!t.filePath));inlineThreads=L(()=>this.threads().filter(t=>t.filePath));selectedFileThreads=L(()=>{let t=this.selectedFile();return t?this.inlineThreads().filter(e=>e.filePath===t.path||e.filePath===t.oldPath):[]});constructor(){yr(this.reviewerQuery).pipe(yt(t=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(t.trim().length>=2),t.trim().length<2?we([]):this.git.searchReviewers(t.trim()).pipe(ot(()=>(this.reviewersError.set("Unable to load suggestions."),we([])))))),_t(this.destroyRef)).subscribe(t=>{this.reviewerSuggestions.set(t),this.reviewersLoading.set(!1)}),yr(this.workItemQuery).pipe(yt(t=>{let e=t.trim();return this.workItemSuggestions.set([]),this.workItemsSearchError.set(""),this.workItemsSearchLoading.set(e.length>0),e?this.git.searchWorkItems(e).pipe(ot(()=>(this.workItemsSearchError.set("Unable to load suggestions."),we([])))):we([])}),_t(this.destroyRef)).subscribe(t=>{this.workItemSuggestions.set(t.map(e=>({id:String(e.id),label:`#${e.id} ${e.title}`.trim(),description:e.state}))),this.workItemsSearchLoading.set(!1)})}ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(yt(t=>IC({detail:we(t),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))})),_t(this.destroyRef)).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loading.set(!1),this.loadFiles(),this.loadWorkItems(),this.loadChecks()},error:t=>{this.loading.set(!1),this.error.set(this.errorMessage(t))}})}loadFiles(){this.filesLoading.set(!0),this.filesError.set(""),this.git.getPrChanges(this.prId()).pipe(_t(this.destroyRef)).subscribe({next:t=>{this.files.set(t),this.filesLoading.set(!1);let e=this.selectedFile();e&&!t.some(i=>i.path===e.path)&&this.selectedFile.set(null),!this.selectedFile()&&t.length&&this.selectFile(t[0])},error:t=>{this.filesLoading.set(!1),this.filesError.set(this.errorMessage(t))}})}loadWorkItems(){this.workItemsLoading.set(!0),this.workItemsError.set(""),this.git.getPrWorkItems(this.prId()).pipe(_t(this.destroyRef)).subscribe({next:t=>{this.workItems.set(t),this.workItemsLoading.set(!1)},error:t=>{this.workItemsLoading.set(!1),this.workItemsError.set(this.errorMessage(t))}})}loadChecks(){this.checksLoading.set(!0),this.checksError.set(""),this.checksWarnings.set([]),this.requeueError.set(""),this.git.getPrChecks(this.prId()).pipe(_t(this.destroyRef)).subscribe({next:t=>{this.checks.set(t.checks),this.checksWarnings.set(t.warnings??[]),this.checksLoading.set(!1)},error:t=>{this.checksLoading.set(!1),this.checksError.set(this.errorMessage(t))}})}requeueCheck(t){let e=t.evaluationId??"";!e||this.requeuing()||(this.requeuing.set(e),this.requeueError.set(""),this.git.requeuePrCheck(this.prId(),e).pipe(_t(this.destroyRef)).subscribe({next:()=>{this.requeuing.set(""),this.loadChecks()},error:i=>{this.requeuing.set(""),this.requeueError.set(this.errorMessage(i))}}))}reload(){IC({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))}).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loadChecks()},error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t().pipe(_t(this.destroyRef)).subscribe({next:()=>{this.busy.set(!1),this.changed.emit(),e?.()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}vote(t){this.reviewMenuOpen.set(!1),this.run(()=>this.git.votePr(this.prId(),t),()=>this.reload())}startEditing(){this.editing.set(!0),this.editTitle.set(this.pr()?.title??""),this.editDescription.set(this.pr()?.description??"")}saveEdit(){let t=this.editTitle().trim();t&&this.run(()=>this.git.updatePr(this.prId(),{title:t,description:this.editDescription()}),()=>{this.editing.set(!1),this.reload()})}toggleDraft(){let t=this.pr();t&&this.run(()=>this.git.updatePr(this.prId(),{isDraft:!t.isDraft}),()=>this.reload())}addReviewer(t){this.reviewerQuery.set(""),this.reviewerSuggestions.set([]),this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:this.reviewerRequired()}),()=>this.reload())}toggleReviewerRequired(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:!t.isRequired,vote:t.vote}),()=>this.reload())}removeReviewer(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,remove:!0}),()=>this.reload())}toggleTagsPicker(){let t=!this.tagsPickerOpen();this.tagsPickerOpen.set(t),this.tagQuery.set(""),!(!t||this.allTags().length||this.tagsLoading())&&(this.tagsLoading.set(!0),this.git.getPrTags().pipe(_t(this.destroyRef)).subscribe({next:e=>{this.allTags.set(e.map(i=>({id:i.name,label:i.name}))),this.tagsLoading.set(!1)},error:()=>this.tagsLoading.set(!1)}))}addTag(t){let e=t.label.trim();e&&(this.tagQuery.set(""),!(this.pr()?.labels??[]).some(i=>i.toLowerCase()===e.toLowerCase())&&this.run(()=>this.git.addPrTag(this.prId(),e),()=>this.reload()))}removeTag(t){this.run(()=>this.git.removePrTag(this.prId(),t),()=>this.reload())}toggleWorkItemPicker(){let t=!this.workItemPickerOpen();this.workItemPickerOpen.set(t),this.workItemQuery.set(""),this.workItemSuggestions.set([])}linkWorkItem(t){let e=Number(t.id);!Number.isInteger(e)||e<=0||(this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.run(()=>this.git.linkPrWorkItem(this.prId(),e),()=>this.loadWorkItems()))}unlinkWorkItem(t){this.run(()=>this.git.unlinkPrWorkItem(this.prId(),t),()=>this.loadWorkItems())}openComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!0)}openAutoComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!0)}defaultMergeStrategy(){return this.mergeStrategies()[0]?.value??"noFastForward"}completionOptions(){return{mergeStrategy:this.mergeStrategy(),deleteSourceBranch:this.deleteSourceBranch(),completeWorkItems:this.completeWorkItems(),transitionWorkItems:this.completeWorkItems()&&this.transitionWorkItems()}}applyComplete(){this.run(()=>this.git.completePr(this.prId(),this.completionOptions()),()=>{this.completeOpen.set(!1),this.reload()})}applyAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!0,this.completionOptions()),()=>{this.autoCompleteOpen.set(!1),this.reload()})}cancelAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!1),()=>this.reload())}addGeneralComment(){let t=this.newComment().trim();t&&this.run(()=>this.git.addPrComment(this.prId(),{content:t}),()=>{this.newComment.set(""),this.reload()})}replyToThread(t,e){e.trim()&&this.run(()=>this.git.addPrComment(this.prId(),{threadId:t,content:e}),()=>this.reload())}setThreadStatus(t,e){this.run(()=>this.git.setPrThreadStatus(this.prId(),t,e),()=>this.reload())}addInlineComment(t){this.run(()=>this.git.addPrComment(this.prId(),t),()=>this.reload())}replyFromDiff(t){this.replyToThread(t.threadId,t.content)}setStatusFromDiff(t){this.setThreadStatus(t.threadId,t.status)}jumpToThread(t){let e=this.files().find(i=>i.path===t.filePath)??this.files().find(i=>i.oldPath===t.filePath);!e||t.line===null||(this.tab.set("files"),this.selectFile(e),this.fileFocus.set({line:t.line,side:t.side??"right"}))}toggleFileDirectory(t){this.collapsedFiles.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}selectFile(t){this.selectedFile.set(t),this.fileDiffError.set(""),!(this.fileDiffs()[t.path]||t.changeType==="binary")&&(this.fileDiffLoading.set(!0),this.git.getPrFileDiff(this.prId(),t).pipe(_t(this.destroyRef)).subscribe({next:e=>{this.fileDiffs.update(i=>oe(G({},i),{[t.path]:e})),this.fileDiffLoading.set(!1)},error:e=>{this.fileDiffLoading.set(!1),this.fileDiffError.set(this.errorMessage(e))}}))}voteMeta(t){switch(t){case 10:return{label:"Approved",cls:"vote-approve"};case 5:return{label:"Approved with suggestions",cls:"vote-suggestions"};case-5:return{label:"Waiting for author",cls:"vote-waiting"};case-10:return{label:"Rejected",cls:"vote-reject"};default:return{label:"No vote",cls:"vote-none"}}}statusLabel(t){return kC[t]??t}mergeStatusLabel(t){return CN[t]??t}checkStateLabel(t){return xN[t]??t}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}openInBrowser(){let t=this.pr()?.webUrl;t&&this.vscode.openExternal(t)}openExternalLink(t){t&&this.vscode.openExternal(t)}publishPr(){this.run(()=>this.git.updatePr(this.prId(),{isDraft:!1}),()=>this.reload())}openAbandonConfirm(){this.abandonOpen.set(!0)}abandonPr(){this.run(()=>this.git.abandonPr(this.prId()),()=>{this.abandonOpen.set(!1),this.changed.emit(),this.closed.emit()})}onEscape(){if(this.editing()){this.editing.set(!1);return}if(this.reviewMenuOpen()||this.completeOpen()||this.autoCompleteOpen()||this.abandonOpen()){this.reviewMenuOpen.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!1),this.abandonOpen.set(!1);return}this.busy()||this.closed.emit()}onBackdropClick(){!this.busy()&&!this.editing()&&!this.completeOpen()&&!this.autoCompleteOpen()&&!this.abandonOpen()&&this.closed.emit()}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{prId:[1,"prId"],settings:[1,"settings"]},outputs:{closed:"closed",changed:"changed"},decls:5,vars:1,consts:[["checkRow",""],["reviewerRow",""],["reply",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-label","Pull request details",1,"pr-dialog"],["role","status",1,"state"],[1,"state"],[1,"dialog-header"],[1,"heading"],[1,"title-line"],[1,"pr-number"],[1,"badge","status"],[1,"badge","draft"],[1,"subtitle"],[3,"name","email"],["aria-hidden","true"],[1,"header-actions"],["type","button",1,"btn",3,"click"],["type","button","aria-label","Close pull request","title","Close",1,"icon-btn","close",3,"click","disabled"],["aria-label","Pull request sections",1,"tabs"],["type","button",3,"click"],[3,"message"],[1,"dialog-body"],[1,"overview","content-pane"],[1,"comments","content-pane"],[1,"files-pane"],["type","button",1,"btn","primary",3,"click","disabled"],["type","button",1,"btn",3,"click","disabled"],[1,"menu-wrap"],["role","menu",1,"menu"],["type","button",1,"btn",3,"disabled"],["type","button","role","menuitem",3,"current"],["type","button","role","menuitem",3,"click"],[1,"overview-main"],["role","alert",1,"merge-banner","conflict"],["role","alert",1,"merge-banner","blocked"],[1,"merge-banner","queued"],[1,"card","checks-card"],[1,"card-head"],["type","button",1,"btn","small",3,"click","disabled"],["role","status",1,"state","inline"],["role","alert",1,"section-error"],[1,"card","description-card"],["type","button",1,"btn","small"],[1,"reviewers","card"],["placeholder","Add reviewer","trailingIcon","\u2605","trailingLabel","Toggle between adding reviewers as required and optional",3,"trailingAction","queryChange","select","chips","suggestions","loading","query","error","disabled","trailingPressed"],[1,"empty"],["type","button",1,"btn","full",3,"disabled"],[1,"side-head"],["type","button","aria-label","Add tag","title","Add tag",1,"icon-btn","add",3,"click","disabled"],[1,"labels"],["placeholder","Add tag",3,"chips","suggestions","loading","query","disabled","allowFreeText"],["type","button","aria-label","Relate work item","title","Relate work item",1,"icon-btn","add",3,"click","disabled"],[1,"work-item-list"],["placeholder","Search work item by title or ID",3,"chips","suggestions","loading","query","error","disabled"],["type","button",1,"btn","small",3,"click"],[1,"section-warning"],["role","alert",1,"section-warning"],[1,"check-list"],[1,"check-divider"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text",3,"input","value"],["rows","12",3,"input","value"],[1,"form-actions"],[1,"detail-title"],[3,"markdown"],["type","button",1,"btn","full",3,"click","disabled"],[1,"label-chip"],["type","button","title","Remove tag",1,"chip-x",3,"click","disabled"],["placeholder","Add tag",3,"queryChange","select","chips","suggestions","loading","query","disabled","allowFreeText"],["type","button",1,"work-item-link",3,"click"],[1,"work-item-id"],[1,"work-item-title"],["type","button","title","Unlink work item",1,"icon-btn",3,"click","disabled"],["placeholder","Search work item by title or ID",3,"queryChange","select","chips","suggestions","loading","query","error","disabled"],[1,"new-comment","card"],["rows","4","placeholder","Leave a comment (markdown supported)",3,"input","value"],[1,"thread-card","card"],[1,"state","inline"],["type","button",1,"path-chip"],["aria-label","Thread status",3,"change","value","disabled"],[3,"value"],[1,"comment"],[1,"reply"],["type","text","placeholder","Reply...",3,"keydown.enter"],["type","button",1,"path-chip",3,"click"],[1,"comment-meta"],[1,"file-list"],["role","alert",1,"section-error","block"],[3,"commentSubmit","replySubmit","statusSubmit","diff","threads","loading","error","posting","focus"],["type","button",1,"dir-row",3,"paddingLeft","title"],["type","button",3,"active","paddingLeft","title"],["type","button",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"file-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],["type","button",3,"click","title"],[1,"check-row"],[1,"check-info"],[1,"check-name"],[1,"required-chip"],["type","button",1,"btn","small",3,"disabled"],[1,"reviewer-row"],[1,"reviewer-name"],["type","button",1,"required-toggle",3,"click","title"],["type","button",1,"icon-btn",3,"click"],[1,"sub-backdrop",3,"click"],["role","dialog","aria-modal","true",1,"sub-dialog"],[1,"confirm-text"],["type","button",1,"btn","danger",3,"click","disabled"],[3,"change","value"],[1,"check"],["type","checkbox",3,"change","checked"],[1,"check","nested"],["type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1&&(f(0,"div",3),E("click",function(){return i.onBackdropClick()}),h(),f(1,"section",4),S(2,JO,2,0,"div",5)(3,bN,48,22)(4,yN,5,1,"div",6),h()),e&2){let r;c(2),T(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[An,ko,at,Ro,Ch,bd],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300;background:#0000009e}.pr-dialog[_ngcontent-%COMP%]{position:fixed;inset:3vh 3vw;z-index:301;display:flex;flex-direction:column;min-width:720px;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--bg);box-shadow:0 18px 60px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px;min-height:76px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.heading[_ngcontent-%COMP%]{flex:1;min-width:0}.title-line[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%], .header-actions[_ngcontent-%COMP%], .card-head[_ngcontent-%COMP%], .form-actions[_ngcontent-%COMP%], .reviewer-row[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%], .reply[_ngcontent-%COMP%]{display:flex;align-items:center}.title-line[_ngcontent-%COMP%]{gap:8px}h1[_ngcontent-%COMP%]{min-width:0;margin:0;overflow:hidden;color:var(--text-bright);font-size:18px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pr-number[_ngcontent-%COMP%]{color:var(--text-dim);font-family:var(--mono)}.subtitle[_ngcontent-%COMP%]{gap:7px;margin-top:7px;color:var(--text-dim);font-size:12px}.subtitle[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{transform:scale(.8);margin:-2px}code[_ngcontent-%COMP%]{max-width:220px;overflow:hidden;color:var(--text);font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap}.header-actions[_ngcontent-%COMP%]{flex:none;gap:6px}.btn[_ngcontent-%COMP%], .icon-btn[_ngcontent-%COMP%], .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .required-toggle[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);cursor:pointer;font:inherit}.btn[_ngcontent-%COMP%]{height:30px;padding:0 11px}.btn[_ngcontent-%COMP%]:hover:not(:disabled), .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled), .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.btn.primary[_ngcontent-%COMP%]{border-color:#2580d8;background:#0e639c;color:#fff}.btn.primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#17b}.btn.small[_ngcontent-%COMP%]{height:26px;padding:0 9px;font-size:12px}.btn.full[_ngcontent-%COMP%]{width:100%;margin-top:14px}button[_ngcontent-%COMP%]:disabled{cursor:default;opacity:.55}.icon-btn[_ngcontent-%COMP%]{width:28px;height:28px;padding:0;font-size:18px;line-height:1}.close[_ngcontent-%COMP%]{border-color:transparent;background:transparent;font-size:23px}.badge[_ngcontent-%COMP%], .label-chip[_ngcontent-%COMP%], .thread-status[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%], .file-status[_ngcontent-%COMP%]{border-radius:3px;padding:2px 6px;font-size:10px;font-weight:600}.badge[_ngcontent-%COMP%]{text-transform:uppercase}.badge.status[_ngcontent-%COMP%]{background:#3794ff29;color:var(--accent)}.badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.menu-wrap[_ngcontent-%COMP%]{position:relative}.menu[_ngcontent-%COMP%]{position:absolute;top:35px;right:0;z-index:4;width:210px;padding:4px;border:1px solid var(--border);border-radius:5px;background:var(--bg-alt);box-shadow:0 8px 24px #00000073}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;border:none;text-align:left}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .menu[_ngcontent-%COMP%] button.current[_ngcontent-%COMP%]{background:var(--bg-hover)}.vote-dot[_ngcontent-%COMP%]{width:9px;height:9px;border-radius:50%;background:var(--text-dim)}.vote-approve[_ngcontent-%COMP%], .vote-suggestions[_ngcontent-%COMP%]{color:#89d185!important}.vote-waiting[_ngcontent-%COMP%]{color:#dcb67a!important}.vote-reject[_ngcontent-%COMP%]{color:#f48771!important}.vote-dot.vote-approve[_ngcontent-%COMP%], .vote-dot.vote-suggestions[_ngcontent-%COMP%]{background:#89d185}.vote-dot.vote-waiting[_ngcontent-%COMP%]{background:#dcb67a}.vote-dot.vote-reject[_ngcontent-%COMP%]{background:#f48771}.tabs[_ngcontent-%COMP%]{display:flex;flex:none;height:38px;padding-left:14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 15px;border-width:0 0 2px;border-radius:0;background:transparent;color:var(--text-dim)}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-bottom-color:var(--accent);color:var(--text-bright)}.tabs[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:4px;color:var(--text-dim)}.dialog-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}.content-pane[_ngcontent-%COMP%]{height:100%;overflow:auto;padding:18px}.overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.card[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:5px;background:var(--bg-alt)}.description-card[_ngcontent-%COMP%], .reviewers[_ngcontent-%COMP%], .new-comment[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%]{padding:14px}.card-head[_ngcontent-%COMP%]{justify-content:space-between;margin-bottom:12px}.card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px}.detail-title[_ngcontent-%COMP%]{margin:0 0 12px!important;font-size:16px!important}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;color:var(--text-dim);font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text);font:inherit}input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:30px;padding:0 8px}textarea[_ngcontent-%COMP%]{width:100%;padding:8px;resize:vertical;font-family:var(--mono)}input[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus, select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent)}.form-actions[_ngcontent-%COMP%]{justify-content:flex-end;gap:7px}.empty[_ngcontent-%COMP%]{color:var(--text-dim);font-style:italic}.labels[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;margin-top:2px}.label-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;background:#3794ff24;color:var(--accent)}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:11px;line-height:1}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright)}.reviewers[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 5px;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:16px 0 7px}.side-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]{flex:none;width:20px;height:20px;margin-left:auto;border-color:transparent;background:transparent;color:var(--text-dim);font-size:15px;font-weight:600}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.reviewer-row[_ngcontent-%COMP%]{gap:8px;min-height:42px;border-bottom:1px solid rgba(255,255,255,.05)}.reviewer-name[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;flex-direction:column}.reviewer-name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reviewer-name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:10px}.required-toggle[_ngcontent-%COMP%]{padding:2px 5px;color:var(--text-dim);font-size:10px}.required-toggle.on[_ngcontent-%COMP%]{border-color:#dcb67a80;color:#dcb67a}.comments[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;max-width:900px;margin:0 auto}.new-comment[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:10px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{gap:8px;margin-bottom:12px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{margin-left:auto}.thread-status[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent);text-transform:uppercase}.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.status-wontFix[_ngcontent-%COMP%], .status-closed[_ngcontent-%COMP%], .status-byDesign[_ngcontent-%COMP%], .status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.path-chip[_ngcontent-%COMP%]{max-width:480px;overflow:hidden;border:none;color:var(--accent);text-overflow:ellipsis;white-space:nowrap}.comment[_ngcontent-%COMP%]{display:flex;gap:9px;padding:8px 0;border-top:1px solid rgba(255,255,255,.05)}.comment[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;min-width:0}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.reply[_ngcontent-%COMP%]{gap:7px;margin-top:8px}.reply[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.files-pane[_ngcontent-%COMP%]{display:grid;grid-template-columns:280px minmax(0,1fr);height:100%}.file-list[_ngcontent-%COMP%]{overflow:auto;border-right:1px solid var(--border);background:var(--bg-alt)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;padding:7px 9px;overflow:hidden;border-width:0 0 1px;border-radius:0;text-align:left}.file-list[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#3794ff24;color:var(--text-bright)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-list[_ngcontent-%COMP%] .dir-row[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:600}.file-chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.file-status[_ngcontent-%COMP%]{flex:none;width:19px;padding:1px 0;text-align:center}.file-status.status-added[_ngcontent-%COMP%]{color:#89d185}.file-status.status-deleted[_ngcontent-%COMP%]{color:#f48771}.file-status.status-renamed[_ngcontent-%COMP%]{color:#c586c0}.file-status.status-modified[_ngcontent-%COMP%]{color:var(--accent)}app-pr-file-diff[_ngcontent-%COMP%]{min-width:0;overflow:auto}.state[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-dim)}.state.inline[_ngcontent-%COMP%]{min-height:80px;padding:16px}.sub-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:8;background:#0000007a}.sub-dialog[_ngcontent-%COMP%]{position:absolute;z-index:9;top:50%;left:50%;width:min(440px,calc(100% - 40px));padding:18px;transform:translate(-50%,-50%);border:1px solid var(--border);border-radius:6px;background:var(--bg-alt);box-shadow:0 14px 42px #0009}.sub-dialog[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 18px;color:var(--text-bright);font-size:17px}.sub-dialog[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.check[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:15px;height:15px}.check.nested[_ngcontent-%COMP%]{margin-left:23px}.confirm-text[_ngcontent-%COMP%]{margin:-6px 0 14px;color:var(--text-dim);font-size:12px}.btn.danger[_ngcontent-%COMP%]{border-color:#f14c4c8c;background:#f14c4c29;color:#f48771}.btn.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f14c4c42}.checks-card[_ngcontent-%COMP%]{padding:14px;margin-bottom:16px}.merge-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:10px 14px;border:1px solid rgba(241,76,76,.45);border-radius:5px;background:#f14c4c1f}.merge-banner[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f48771;font-size:13px}.merge-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--text-dim);font-size:12px}.merge-banner[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{max-width:none;color:#f48771}.merge-banner.queued[_ngcontent-%COMP%]{border-color:#3794ff66;background:#3794ff1f}.merge-banner.queued[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent)}.merge-banner[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{flex:none;margin-left:auto}.check-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.check-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:9px;min-height:34px;border-bottom:1px solid rgba(255,255,255,.05)}.check-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.check-divider[_ngcontent-%COMP%]{margin:6px 0;border:none;border-top:1px solid rgba(255,255,255,.12)}.check-info[_ngcontent-%COMP%]{flex:1;min-width:0}.check-name[_ngcontent-%COMP%]{color:var(--text);font-size:12px}.check-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;overflow:hidden;color:var(--text-dim);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.check-state[_ngcontent-%COMP%]{flex:none;min-width:52px;padding:2px 6px;border-radius:3px;color:var(--text-dim);font-size:10px;font-weight:600;text-align:center;text-transform:uppercase}.check-state.state-succeeded[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.check-state.state-failed[_ngcontent-%COMP%]{background:#f14c4c29;color:#f48771}.check-state.state-pending[_ngcontent-%COMP%]{background:#dcb67a29;color:#dcb67a}.check-state.state-notApplicable[_ngcontent-%COMP%]{background:#80808029;color:var(--text-dim)}.required-chip[_ngcontent-%COMP%]{margin-left:6px;padding:1px 5px;border-radius:3px;background:#dcb67a24;color:#dcb67a;font-size:10px;font-weight:600;text-transform:uppercase}.section-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding:8px 10px;border:1px solid rgba(241,76,76,.4);border-radius:4px;background:#f14c4c1a;color:#f48771;font-size:12px}.section-error.block[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;margin:10px}.section-warning[_ngcontent-%COMP%]{margin-bottom:8px;padding:6px 10px;border:1px solid rgba(220,182,122,.35);border-radius:4px;background:#dcb67a14;color:#dcb67a;font-size:11px}.work-item-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;padding:4px 0;border-bottom:1px solid rgba(255,255,255,.05)}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}.work-item-link[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;border:none;background:transparent;color:var(--accent);cursor:pointer;font:inherit;font-size:12px;padding:2px 0;text-align:left}.work-item-id[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-family:var(--mono);font-size:11px}.work-item-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-item-link[_ngcontent-%COMP%]:hover .work-item-title[_ngcontent-%COMP%]{text-decoration:underline}.work-item-list[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:10px;text-transform:uppercase}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]{flex:none;width:18px;height:18px;border:none;background:transparent;color:var(--text-dim);font-size:13px}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}@media(max-width:900px){.pr-dialog[_ngcontent-%COMP%]{inset:1vh 1vw;min-width:620px}.dialog-header[_ngcontent-%COMP%]{align-items:flex-start}.header-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}.overview[_ngcontent-%COMP%]{grid-template-columns:1fr}.reviewers[_ngcontent-%COMP%]{order:-1}.files-pane[_ngcontent-%COMP%]{grid-template-columns:220px minmax(0,1fr)}}"],changeDetection:0})};function IC(n){return new de(t=>{let e=Object.keys(n),i={},r=e.length,o=!1;if(!r){t.next({}),t.complete();return}for(let s of e)n[s].subscribe({next:a=>{i[s]=a},error:a=>{o||(o=!0,t.error(a))},complete:()=>{--r===0&&!o&&(t.next(i),t.complete())}})})}var OC=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase());function xd(n,t){let e={name:"",dirs:new Map,refs:[]};for(let o of n){let s=o.name.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let d=a.dirs.get(l);d||(d={name:l,dirs:new Map,refs:[]},a.dirs.set(l,d)),a=d}a.refs.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(OC)){let d=s?`${s}/${l.name}`:l.name,m=t.has(d);i.push({kind:"dir",path:d,name:l.name,depth:a,collapsed:m}),m||r(l,d,a+1)}for(let l of[...o.refs].sort(OC))i.push({kind:"ref",path:l.name,name:l.name.split("/").pop()??l.name,depth:a,ref:l})};return r(e,"",0),i}function Sr(n){return n.map(t=>({kind:"ref",path:t.name,name:t.name,depth:0,ref:t}))}function Si(n,t){return t?n:n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLocaleLowerCase()}var wN=(n,t)=>t.index,EN=(n,t)=>t.path,DN=(n,t)=>t.id;function SN(n,t){if(n&1){let e=P();b(0,"button",23),B("click",function(){_(e);let r=u();return v(r.clearFilter())}),F(),b(1,"svg",9),J(2,"line",24)(3,"line",25),C()()}}function TN(n,t){n&1&&(F(),J(0,"polyline",26)(1,"polyline",27))}function MN(n,t){n&1&&(F(),J(0,"polyline",28)(1,"polyline",29))}function kN(n,t){n&1&&(F(),J(0,"polyline",13))}function IN(n,t){n&1&&(F(),J(0,"polyline",14))}function PN(n,t){n&1&&(F(),J(0,"polyline",14))}function ON(n,t){n&1&&(F(),J(0,"polyline",13))}function RN(n,t){if(n&1){let e=P();b(0,"button",43),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir("local",r.path))}),F(),b(1,"svg",44),S(2,PN,1,0,":svg:polyline",14)(3,ON,1,0,":svg:polyline",13),C(),ue(),b(4,"span",38),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),W("title",e.path),le("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function NN(n,t){n&1&&(b(0,"span",50),p(1,"current"),C())}function AN(n,t){if(n&1){let e=P();b(0,"button",45),B("click",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.selectBranch(o.ref.name,r))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.ref)}))}),F(),b(1,"svg",31),J(2,"line",46)(3,"circle",47)(4,"circle",48)(5,"path",49),C(),ue(),b(6,"span",38),p(7),C(),S(8,NN,2,0,"span",50),C()}if(n&2){let e=u().$implicit,i=u(2);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedBranches().includes(e.ref.name)),W("title",e.ref.name),c(7),O(e.name),c(),T(e.ref.current?8:-1)}}function LN(n,t){if(n&1&&S(0,RN,6,6,"button",41)(1,AN,9,7,"button",42),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function FN(n,t){n&1&&(F(),J(0,"polyline",14))}function VN(n,t){n&1&&(F(),J(0,"polyline",13))}function BN(n,t){if(n&1){let e=P();b(0,"button",43),B("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.toggleDir("remote",r.path))}),F(),b(1,"svg",44),S(2,FN,1,0,":svg:polyline",14)(3,VN,1,0,":svg:polyline",13),C(),ue(),b(4,"span",38),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),W("title",e.path),le("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function jN(n,t){if(n&1){let e=P();b(0,"button",45),B("click",function(r){_(e);let o=u().$implicit,s=u(3);return v(s.selectBranch(o.ref.name,r))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(3);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.ref)}))}),F(),b(1,"svg",31),J(2,"line",46)(3,"circle",47)(4,"circle",48)(5,"path",49),C(),ue(),b(6,"span",38),p(7),C()()}if(n&2){let e=u().$implicit,i=u(3);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedBranches().includes(e.ref.name)),W("title",e.ref.name),c(7),O(e.name)}}function $N(n,t){if(n&1&&S(0,BN,6,6,"button",41)(1,jN,8,6,"button",42),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function HN(n,t){if(n&1&&(b(0,"div",39),p(1," Remote "),C(),Q(2,$N,2,1,null,null,Vt)),n&2){let e=u(2);me("hidden",e.filtering()&&e.remoteBranchRows().length===0),c(2),K(e.remoteBranchRows())}}function UN(n,t){n&1&&(b(0,"div",40),p(1,"No matching branches"),C())}function zN(n,t){if(n&1){let e=P();b(0,"div",17)(1,"button",30),B("click",function(){_(e);let r=u();return v(r.selectAllBranches())}),F(),b(2,"svg",31),J(3,"line",32)(4,"line",33)(5,"line",34)(6,"circle",35)(7,"circle",36)(8,"circle",37),C(),ue(),b(9,"span",38),p(10,"All Branches"),C()(),b(11,"div",39),p(12," Local "),C(),Q(13,LN,2,1,null,null,Vt),S(15,HN,4,2),S(16,UN,2,0,"div",40),C()}if(n&2){let e=u();c(),me("selected",e.selectedBranches().length===0),c(10),me("hidden",e.filtering()&&e.localBranchRows().length===0),c(2),K(e.localBranchRows()),c(2),T(e.showRemote()?15:-1),c(),T(e.filtering()&&e.branchCount()===0?16:-1)}}function GN(n,t){n&1&&(F(),J(0,"polyline",13))}function WN(n,t){n&1&&(F(),J(0,"polyline",14))}function qN(n,t){n&1&&(F(),J(0,"polyline",14))}function ZN(n,t){n&1&&(F(),J(0,"polyline",13))}function YN(n,t){if(n&1){let e=P();b(0,"button",43),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir("tag",r.path))}),F(),b(1,"svg",44),S(2,qN,1,0,":svg:polyline",14)(3,ZN,1,0,":svg:polyline",13),C(),ue(),b(4,"span",38),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),W("title",e.path),le("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function QN(n,t){if(n&1){let e=P();b(0,"button",45),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.selectTag(r.ref))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.ref.name}}))}),F(),b(1,"svg",31),J(2,"path",51)(3,"line",52),C(),ue(),b(4,"span",38),p(5),C()()}if(n&2){let e=u().$implicit,i=u(2);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedCommitHash()===e.ref.hash),W("title",e.ref.name),c(5),O(e.name)}}function KN(n,t){if(n&1&&S(0,YN,6,6,"button",41)(1,QN,6,6,"button",42),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function XN(n,t){if(n&1&&(b(0,"div",40),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching tags":"No tags")}}function JN(n,t){if(n&1&&(b(0,"div",17),Q(1,KN,2,1,null,null,Vt,!1,XN,2,1,"div",40),C()),n&2){let e=u();c(),K(e.tagRows())}}function e2(n,t){n&1&&(F(),J(0,"polyline",13))}function t2(n,t){n&1&&(F(),J(0,"polyline",14))}function n2(n,t){if(n&1){let e=P();b(0,"button",45),B("click",function(){let r=_(e).$implicit,o=u(2);return v(o.stashSelect.emit(r))})("contextmenu",function(r){let o=_(e).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"stash",stash:o}))}),F(),b(1,"svg",31),J(2,"path",54)(3,"line",55),C(),ue(),b(4,"span",38),p(5),C(),b(6,"span",56),p(7),C()()}if(n&2){let e=t.$implicit,i=u(2);me("selected",i.selectedCommitHash()===e.hash),W("title",e.message),c(5),O(i.stashLabel(e)),c(2),O(e.message)}}function i2(n,t){if(n&1&&(b(0,"div",40),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching stashes":"No stashes")}}function r2(n,t){if(n&1&&(b(0,"div",17),Q(1,n2,8,5,"button",53,wN,!1,i2,2,1,"div",40),C()),n&2){let e=u();c(),K(e.filteredStashes())}}function o2(n,t){n&1&&(F(),J(0,"polyline",13))}function s2(n,t){n&1&&(F(),J(0,"polyline",14))}function a2(n,t){if(n&1&&(b(0,"span",59),p(1),C()),n&2){let e=u().$implicit;c(),O(e.branch)}}function l2(n,t){if(n&1){let e=P();b(0,"button",57),B("dblclick",function(){let r=_(e).$implicit,o=u(2);return v(o.openWorktree(r))})("contextmenu",function(r){let o=_(e).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),F(),b(1,"svg",31),J(2,"path",58),C(),ue(),b(3,"span",38),p(4),C(),S(5,a2,2,1,"span",59),C()}if(n&2){let e=t.$implicit,i=u(2);me("selected",e.current),W("title",e.path),c(4),O(i.worktreeLabel(e)),c(),T(e.branch?5:-1)}}function c2(n,t){if(n&1&&(b(0,"div",40),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching worktrees":"No worktrees")}}function d2(n,t){if(n&1&&(b(0,"div",17),Q(1,l2,6,5,"button",53,EN,!1,c2,2,1,"div",40),C()),n&2){let e=u();c(),K(e.filteredWorktrees())}}function u2(n,t){n&1&&(F(),J(0,"polyline",13))}function p2(n,t){n&1&&(F(),J(0,"polyline",14))}function f2(n,t){if(n&1&&(b(0,"div",63),p(1),C()),n&2){let e=u(3);c(),O(e.prError())}}function h2(n,t){n&1&&(b(0,"div",40),p(1,"Loading pull requests..."),C())}function m2(n,t){n&1&&(F(),J(0,"polyline",67))}function g2(n,t){n&1&&(F(),J(0,"polyline",67)(1,"line",75))}function _2(n,t){n&1&&(F(),J(0,"circle",76)(1,"polyline",77))}function v2(n,t){n&1&&(F(),J(0,"line",78)(1,"line",79))}function b2(n,t){n&1&&(F(),J(0,"circle",68))}function y2(n,t){n&1&&(b(0,"span",72),p(1,"Draft"),C())}function C2(n,t){n&1&&(b(0,"span",73),p(1,"Required"),C())}function x2(n,t){if(n&1){let e=P();b(0,"button",65),B("click",function(){let r=_(e).$implicit,o=u(4);return v(o.prSelect.emit(r.id))}),F(),b(1,"svg",66),S(2,m2,1,0,":svg:polyline",67)(3,g2,2,0)(4,_2,2,0)(5,v2,2,0)(6,b2,1,0,":svg:circle",68),C(),ue(),b(7,"span",69)(8,"span",70)(9,"span",71),p(10),C(),S(11,y2,2,0,"span",72),S(12,C2,2,0,"span",73),C(),b(13,"span",74),p(14),C()()()}if(n&2){let e,i=t.$implicit,r=u(4);W("title",r.prTooltip(i)),c(),ft(r.voteClass(i)),c(),T((e=i.myVote)===10?2:e===5?3:e===-5?4:e===-10?5:6),c(8),O(i.title),c(),T(i.isDraft?11:-1),c(),T(i.requiresMe?12:-1),c(2),Mc(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function w2(n,t){if(n&1&&(b(0,"div",40),p(1),C()),n&2){let e=u(4);c(),O(e.filtering()?"No matching pull requests":"No active pull requests")}}function E2(n,t){if(n&1&&Q(0,x2,15,10,"button",64,DN,!1,w2,2,1,"div",40),n&2){let e=u(3);K(e.filteredPullRequests())}}function D2(n,t){if(n&1&&(b(0,"div",17),S(1,f2,2,1,"div",63)(2,h2,2,0,"div",40)(3,E2,3,1),C()),n&2){let e=u(2);c(),T(e.prError()?1:e.pullRequests()===null?2:3)}}function S2(n,t){if(n&1){let e=P();b(0,"section",10)(1,"div",18)(2,"button",11),B("click",function(){_(e);let r=u();return v(r.prsOpen.set(!r.prsOpen()))}),F(),b(3,"svg",12),S(4,u2,1,0,":svg:polyline",13)(5,p2,1,0,":svg:polyline",14),C(),ue(),b(6,"span",15),p(7,"Pull Requests"),C(),b(8,"span",16),p(9),C()(),b(10,"button",60),B("click",function(){_(e);let r=u();return v(r.prRefresh.emit())}),F(),b(11,"svg",9),J(12,"polyline",61)(13,"path",62),C()()(),S(14,D2,4,1,"div",17),C()}if(n&2){let e=u();c(2),le("aria-expanded",e.prsExpanded()),c(2),T(e.prsExpanded()?4:5),c(5),O(e.prCount()),c(5),T(e.prsExpanded()?14:-1)}}function T2(n,t){n&1&&(b(0,"div",22),p(1,"Loading..."),C())}var wd=class n{branches=N.required();selectedBranches=N.required();showRemote=N.required();stashes=N.required();worktrees=N.required();tags=N.required();refListView=N("flat");searchCaseSensitive=N(!1);sectionsExpandedByDefault=N(!0);selectedCommitHash=N("");loading=N(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=H();tagSelect=H();stashSelect=H();contextMenu=H();worktreeCreate=H();worktreeOpen=H();prSelect=H();prRefresh=H();prsOpen=mr(()=>this.sectionsExpandedByDefault());branchesOpen=mr(()=>this.sectionsExpandedByDefault());tagsOpen=mr(()=>this.sectionsExpandedByDefault());stashesOpen=mr(()=>this.sectionsExpandedByDefault());worktreesOpen=mr(()=>this.sectionsExpandedByDefault());filter=x("");filterText=L(()=>Si(this.filter().trim(),this.searchCaseSensitive()));filtering=L(()=>this.filterText()!=="");onFilterInput(t){this.filter.set(t.target.value)}clearFilter(){this.filter.set("")}branchesExpanded=L(()=>this.filtering()||this.branchesOpen());tagsExpanded=L(()=>this.filtering()||this.tagsOpen());stashesExpanded=L(()=>this.filtering()||this.stashesOpen());worktreesExpanded=L(()=>this.filtering()||this.worktreesOpen());prsExpanded=L(()=>this.filtering()||this.prsOpen());allSectionsOpen=L(()=>this.branchesOpen()&&this.tagsOpen()&&this.stashesOpen()&&this.worktreesOpen()&&(!this.azureEnabled()||this.prsOpen()));toggleAllSections(){let t=!this.allSectionsOpen();this.branchesOpen.set(t),this.tagsOpen.set(t),this.stashesOpen.set(t),this.worktreesOpen.set(t),this.prsOpen.set(t)}localBranches=L(()=>this.branches().filter(t=>!t.remote));remoteBranches=L(()=>this.branches().filter(t=>t.remote));localDirsCollapsed=x(new Set);remoteDirsCollapsed=x(new Set);tagDirsCollapsed=x(new Set);filterRefs(t){return this.filtering()?t.filter(e=>this.matchesFilter(e.name)):t}matchesFilter(t){return Si(t,this.searchCaseSensitive()).includes(this.filterText())}localBranchRows=L(()=>this.filtering()?Sr(this.filterRefs(this.localBranches())):this.refListView()==="tree"?xd(this.localBranches(),this.localDirsCollapsed()):Sr(this.localBranches()));remoteBranchRows=L(()=>this.filtering()?Sr(this.filterRefs(this.remoteBranches())):this.refListView()==="tree"?xd(this.remoteBranches(),this.remoteDirsCollapsed()):Sr(this.remoteBranches()));tagRows=L(()=>this.filtering()?Sr(this.filterRefs(this.tags())):this.refListView()==="tree"?xd(this.tags(),this.tagDirsCollapsed()):Sr(this.tags()));branchCount=L(()=>{if(!this.filtering())return this.branches().length;let t=i=>i.filter(r=>r.kind==="ref").length,e=t(this.localBranchRows());return this.showRemote()&&(e+=t(this.remoteBranchRows())),e});tagCount=L(()=>this.filtering()?this.tagRows().length:this.tags().length);filteredStashes=L(()=>{let t=this.stashes();return this.filtering()?t.filter(e=>this.matchesFilter(this.stashLabel(e))||this.matchesFilter(e.message)):t});stashCount=L(()=>this.filtering()?this.filteredStashes().length:this.stashes().length);filteredWorktrees=L(()=>{let t=this.worktrees();return this.filtering()?t.filter(e=>this.matchesFilter(this.worktreeLabel(e))||this.matchesFilter(e.branch??"")||this.matchesFilter(e.path)):t});worktreeCount=L(()=>this.filtering()?this.filteredWorktrees().length:this.worktrees().length);filteredPullRequests=L(()=>{let t=this.pullRequests();return t===null||!this.filtering()?t:t.filter(e=>this.matchesFilter(e.title)||this.matchesFilter(e.sourceBranch)||this.matchesFilter(e.targetBranch)||this.matchesFilter(e.author.name))});prCount=L(()=>this.filtering()?(this.filteredPullRequests()??[]).length:(this.pullRequests()??[]).length);toggleDir(t,e){(t==="local"?this.localDirsCollapsed:t==="remote"?this.remoteDirsCollapsed:this.tagDirsCollapsed).update(r=>{let o=new Set(r);return o.has(e)?o.delete(e):o.add(e),o})}selectionAnchor=null;branchOrder=L(()=>{let t=e=>e.filter(i=>i.kind==="ref").map(i=>i.ref.name);return[...t(this.localBranchRows()),...t(this.remoteBranchRows())]});selectBranch(t,e){let i=this.selectedBranches(),r=this.branchOrder(),o;if(e.shiftKey){let s=this.selectionAnchor??t,a=r.indexOf(s),l=r.indexOf(t);o=a===-1||l===-1?[t]:r.slice(Math.min(a,l),Math.max(a,l)+1)}else e.ctrlKey||e.metaKey?(o=i.includes(t)?i.filter(s=>s!==t):[...i,t],this.selectionAnchor=t):(o=i.length===1&&i[0]===t?[]:[t],this.selectionAnchor=t);this.branchChange.emit(o)}selectAllBranches(){this.selectionAnchor=null,this.branchChange.emit([])}selectTag(t){this.tagSelect.emit(t)}voteClass(t){switch(t.myVote){case 10:return"vote-approve";case 5:return"vote-suggestions";case-5:return"vote-waiting";case-10:return"vote-reject";default:return"vote-none"}}prTooltip(t){let e=t.reviewers.map(i=>`${i.name}${i.isRequired?" (required)":""}`).join(", ");return[`!${t.id} ${t.title}`,`By ${t.author.name}${t.isDraft?" \xB7 draft":""}`,`${t.sourceBranch} \u2192 ${t.targetBranch}`,e?`Reviewers: ${e}`:""].filter(Boolean).join(`
65
+ `)}badgeOf(t){return{type:t.current?"head":t.remote?"remote":"local",name:t.name}}onContextMenu(t,e){t.preventDefault(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:e})}openWorktree(t){t.bare||this.worktreeOpen.emit(t)}worktreeLabel(t){let e=t.path.split(/[\\/]/).filter(Boolean).pop()??t.path;return t.bare?`${e} (bare)`:t.detached?`${e} (detached)`:e}stashLabel(t){return`stash@{${t.index}}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-side-panel"]],inputs:{branches:[1,"branches"],selectedBranches:[1,"selectedBranches"],showRemote:[1,"showRemote"],stashes:[1,"stashes"],worktrees:[1,"worktrees"],tags:[1,"tags"],refListView:[1,"refListView"],searchCaseSensitive:[1,"searchCaseSensitive"],sectionsExpandedByDefault:[1,"sectionsExpandedByDefault"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",stashSelect:"stashSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",worktreeOpen:"worktreeOpen",prSelect:"prSelect",prRefresh:"prRefresh"},decls:59,vars:25,consts:[["aria-label","Repository panel",1,"side-panel"],[1,"panel-filter"],["role","search",1,"filter-field"],["viewBox","0 0 24 24","aria-hidden","true",1,"filter-icon"],["cx","11","cy","11","r","7"],["x1","16.25","y1","16.25","x2","21","y2","21"],["type","search","placeholder","Search","aria-label","Search branches, tags, stashes, worktrees and pull requests","autocomplete","off","spellcheck","false",1,"filter-input",3,"input","keydown.escape","value"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear"],["type","button",1,"sections-toggle",3,"click","title","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],[1,"tree"],["type","button",1,"tree-head",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","6 9 12 15 18 9"],["points","9 6 15 12 9 18"],[1,"tree-title"],[1,"tree-count"],[1,"tree-body"],[1,"tree-head-row"],["type","button","title","Create worktree","aria-label","Create worktree",1,"head-action",3,"click"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["role","status",1,"panel-loading"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],["points","7 11 12 6 17 11"],["points","7 18 12 13 17 18"],["points","7 6 12 11 17 6"],["points","7 13 12 18 17 13"],["type","button","title","Show commits from all branches",1,"row",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon"],["x1","8","y1","6","x2","21","y2","6"],["x1","8","y1","12","x2","21","y2","12"],["x1","8","y1","18","x2","21","y2","18"],["cx","3.5","cy","6","r","1.5"],["cx","3.5","cy","12","r","1.5"],["cx","3.5","cy","18","r","1.5"],[1,"row-label"],[1,"group-label"],[1,"empty"],["type","button",1,"row","dir-row",3,"paddingLeft","title"],["type","button",1,"row",3,"selected","paddingLeft","title"],["type","button",1,"row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-chevron"],["type","button",1,"row",3,"click","contextmenu","title"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["title","Current branch",1,"row-tag"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],["type","button",1,"row",3,"selected","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["type","button",1,"row",3,"dblclick","contextmenu","title"],["d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],[1,"row-tag"],["type","button","title","Refresh pull requests","aria-label","Refresh pull requests",1,"head-action",3,"click"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"],["role","alert",1,"pr-error"],["type","button",1,"row","pr-row",3,"title"],["type","button",1,"row","pr-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon","vote-icon"],["points","20 6 9 17 4 12"],["cx","12","cy","12","r","8"],[1,"pr-main"],[1,"pr-line"],[1,"pr-title"],[1,"pr-badge","draft"],[1,"pr-badge","required"],[1,"pr-line","pr-meta"],["x1","20","y1","18","x2","20","y2","12"],["cx","12","cy","12","r","9"],["points","12 7 12 12 15 14"],["x1","5","y1","5","x2","19","y2","19"],["x1","19","y1","5","x2","5","y2","19"]],template:function(e,i){e&1&&(b(0,"aside",0)(1,"div",1)(2,"div",2),F(),b(3,"svg",3),J(4,"circle",4)(5,"line",5),C(),ue(),b(6,"input",6),B("input",function(o){return i.onFilterInput(o)})("keydown.escape",function(){return i.clearFilter()}),C(),S(7,SN,4,0,"button",7),C(),b(8,"button",8),B("click",function(){return i.toggleAllSections()}),F(),b(9,"svg",9),S(10,TN,2,0)(11,MN,2,0),C()()(),ue(),b(12,"section",10)(13,"button",11),B("click",function(){return i.branchesOpen.set(!i.branchesOpen())}),F(),b(14,"svg",12),S(15,kN,1,0,":svg:polyline",13)(16,IN,1,0,":svg:polyline",14),C(),ue(),b(17,"span",15),p(18,"Branches"),C(),b(19,"span",16),p(20),C()(),S(21,zN,17,6,"div",17),C(),b(22,"section",10)(23,"button",11),B("click",function(){return i.tagsOpen.set(!i.tagsOpen())}),F(),b(24,"svg",12),S(25,GN,1,0,":svg:polyline",13)(26,WN,1,0,":svg:polyline",14),C(),ue(),b(27,"span",15),p(28,"Tags"),C(),b(29,"span",16),p(30),C()(),S(31,JN,4,1,"div",17),C(),b(32,"section",10)(33,"button",11),B("click",function(){return i.stashesOpen.set(!i.stashesOpen())}),F(),b(34,"svg",12),S(35,e2,1,0,":svg:polyline",13)(36,t2,1,0,":svg:polyline",14),C(),ue(),b(37,"span",15),p(38,"Stashes"),C(),b(39,"span",16),p(40),C()(),S(41,r2,4,1,"div",17),C(),b(42,"section",10)(43,"div",18)(44,"button",11),B("click",function(){return i.worktreesOpen.set(!i.worktreesOpen())}),F(),b(45,"svg",12),S(46,o2,1,0,":svg:polyline",13)(47,s2,1,0,":svg:polyline",14),C(),ue(),b(48,"span",15),p(49,"Worktrees"),C(),b(50,"span",16),p(51),C()(),b(52,"button",19),B("click",function(){return i.worktreeCreate.emit()}),F(),b(53,"svg",9),J(54,"line",20)(55,"line",21),C()()(),S(56,d2,4,1,"div",17),C(),S(57,S2,15,4,"section",10),S(58,T2,2,0,"div",22),C()),e&2&&(c(6),W("value",i.filter()),c(),T(i.filter()?7:-1),c(),W("title",i.filtering()?"Clear search to collapse or expand all sections":i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("disabled",i.filtering()),le("aria-label",i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("aria-expanded",i.allSectionsOpen()),c(2),T(i.allSectionsOpen()?10:11),c(3),le("aria-expanded",i.branchesExpanded()),c(2),T(i.branchesExpanded()?15:16),c(5),O(i.branchCount()),c(),T(i.branchesExpanded()?21:-1),c(2),le("aria-expanded",i.tagsExpanded()),c(2),T(i.tagsExpanded()?25:26),c(5),O(i.tagCount()),c(),T(i.tagsExpanded()?31:-1),c(2),le("aria-expanded",i.stashesExpanded()),c(2),T(i.stashesExpanded()?35:36),c(5),O(i.stashCount()),c(),T(i.stashesExpanded()?41:-1),c(3),le("aria-expanded",i.worktreesExpanded()),c(2),T(i.worktreesExpanded()?46:47),c(5),O(i.worktreeCount()),c(5),T(i.worktreesExpanded()?56:-1),c(),T(i.azureEnabled()?57:-1),c(),T(i.loading()?58:-1))},styles:["[_nghost-%COMP%]{--panel-width: 260px;display:block;position:relative;width:0;flex:none;min-height:0;overflow:hidden;background:var(--bg-alt);transition:width .15s cubic-bezier(.3,0,.8,.15)}[hidden][_nghost-%COMP%]{display:none}.side-panel[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 auto;width:var(--panel-width);overflow-y:auto;border-right:1px solid var(--border)}.panel-open[_nghost-%COMP%]{width:var(--panel-width);transition-duration:.18s;transition-timing-function:cubic-bezier(.05,.7,.1,1)}@media(prefers-reduced-motion:reduce){[_nghost-%COMP%]{transition:none}}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.panel-filter[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:7px 8px 8px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.filter-field[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;height:30px;border:1px solid var(--border);border-radius:5px;background:var(--bg);transition:border-color .12s ease,box-shadow .12s ease,background-color .12s ease}.filter-field[_ngcontent-%COMP%]:hover{border-color:var(--text-dim)}.filter-field[_ngcontent-%COMP%]:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent)}.filter-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:8px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;pointer-events:none;transition:stroke .12s ease}.filter-field[_ngcontent-%COMP%]:focus-within .filter-icon[_ngcontent-%COMP%]{stroke:var(--text)}.filter-input[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;flex:1;min-width:0;height:100%;padding:0 7px;border:0;outline:0;background:transparent;color:var(--text);font-size:12px}.filter-input[_ngcontent-%COMP%]::placeholder{color:var(--text-dim);opacity:.9}.filter-input[_ngcontent-%COMP%]::-webkit-search-cancel-button{display:none}.filter-clear[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:3px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.filter-clear[_ngcontent-%COMP%]:hover{color:var(--text);background:var(--bg-hover)}.filter-clear[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.filter-clear[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.sections-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid var(--border);border-radius:5px;background:var(--bg);color:var(--text-dim);cursor:pointer;flex:none;transition:color .12s ease,border-color .12s ease,background-color .12s ease}.sections-toggle[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text);border-color:var(--text-dim);background:var(--bg-hover)}.sections-toggle[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.sections-toggle[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.sections-toggle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.group-label.hidden[_ngcontent-%COMP%]{display:none}.tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%;height:26px;padding:0 6px;border:none;background:transparent;color:var(--text-bright);font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none}.tree-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.tree-title[_ngcontent-%COMP%]{flex:1;text-align:left}.tree-count[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:400}.tree-body[_ngcontent-%COMP%]{padding:0 4px 6px}.group-label[_ngcontent-%COMP%]{padding:6px 6px 2px 22px;color:var(--text-dim);font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;width:100%;height:24px;padding:0 6px 0 8px;border:none;border-left:2px solid transparent;border-radius:3px;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer;min-width:0}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent)}.row.selected[_ngcontent-%COMP%]{border-left-color:var(--accent);background:#3794ff1f;color:var(--text-bright)}.row-icon[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;opacity:.85}.row.dir-row[_ngcontent-%COMP%]{color:var(--text-bright)}.row[_ngcontent-%COMP%] .row-chevron[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.row-label[_ngcontent-%COMP%]{flex:none;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-tag[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.row-tag.stash-message[_ngcontent-%COMP%]{direction:rtl;text-align:right}.empty[_ngcontent-%COMP%]{padding:4px 8px 2px 24px;color:var(--text-dim);font-size:12px;font-style:italic}.panel-loading[_ngcontent-%COMP%]{padding:8px;color:var(--text-dim);font-size:12px;-webkit-user-select:none;user-select:none}.tree-head-row[_ngcontent-%COMP%]{display:flex;align-items:center}.tree-head-row[_ngcontent-%COMP%] .tree-head[_ngcontent-%COMP%]{flex:1;min-width:0}.head-action[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:4px;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.head-action[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.head-action[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pr-row[_ngcontent-%COMP%]{height:auto;min-height:40px;align-items:flex-start;padding:5px 6px 5px 8px}.vote-icon[_ngcontent-%COMP%]{margin-top:2px;opacity:1}.vote-icon.vote-approve[_ngcontent-%COMP%], .vote-icon.vote-suggestions[_ngcontent-%COMP%]{stroke:#89d185}.vote-icon.vote-suggestions[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke-width:2.5}.vote-icon.vote-waiting[_ngcontent-%COMP%]{stroke:#dcb67a}.vote-icon.vote-reject[_ngcontent-%COMP%]{stroke:#f48771}.vote-icon.vote-none[_ngcontent-%COMP%]{stroke:var(--text-dim)}.pr-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pr-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;min-width:0}.pr-title[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.pr-row[_ngcontent-%COMP%]:hover .pr-title[_ngcontent-%COMP%]{color:var(--text-bright)}.pr-badge[_ngcontent-%COMP%]{flex:none;border-radius:3px;font-size:10px;font-weight:600;letter-spacing:.3px;padding:1px 4px;text-transform:uppercase}.pr-badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.pr-badge.required[_ngcontent-%COMP%]{background:#dcb67a2e;border:1px solid rgba(220,182,122,.5);color:#dcb67a}.pr-meta[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.pr-error[_ngcontent-%COMP%]{margin:2px 6px 4px 10px;color:var(--red);font-size:11px;line-height:1.4;word-break:break-word}"],changeDetection:0})};function M2(n,t){n&1&&(f(0,"div",5),p(1,"Loading conflict\u2026"),h())}function k2(n,t){n&1&&(f(0,"p"),p(1,"Binary file"),h())}function I2(n,t){n&1&&(f(0,"p"),p(1,"File deleted"),h())}function P2(n,t){if(n&1&&(f(0,"pre"),p(1),h()),n&2){let e=u();c(),O(e.ours.content)}}function O2(n,t){n&1&&(f(0,"p"),p(1,"Binary file"),h())}function R2(n,t){n&1&&(f(0,"p"),p(1,"File deleted"),h())}function N2(n,t){if(n&1&&(f(0,"pre"),p(1),h()),n&2){let e=u();c(),O(e.theirs.content)}}function A2(n,t){if(n&1){let e=P();f(0,"div",15),p(1,"The resolved change will delete this file. "),f(2,"button",11),E("click",function(){_(e);let r=u(3);return v(r.deleted.set(!1))}),p(3,"Keep file"),h()()}}function L2(n,t){if(n&1){let e=P();f(0,"textarea",17),E("input",function(r){_(e);let o=u(3);return v(o.updateResult(r))}),h()}if(n&2){let e=u(3);k("value",e.result())}}function F2(n,t){if(n&1){let e=P();f(0,"div",9)(1,"div",13)(2,"h3"),p(3,"Result"),h(),f(4,"div",14)(5,"button",8),E("click",function(){_(e);let r=u(2);return v(r.useBoth())}),p(6,"Use both"),h(),f(7,"button",8),E("click",function(){_(e);let r=u(2);return v(r.deleted.set(!0))}),p(8,"Delete file"),h()()(),S(9,A2,4,0,"div",15)(10,L2,1,1,"textarea",16),h()}if(n&2){let e=u(2);c(5),k("disabled",e.saving()),c(2),k("disabled",e.saving()),c(2),T(e.deleted()?9:10)}}function V2(n,t){if(n&1&&z(0,"app-error-banner",10),n&2){let e=u(2);k("message",e.error())}}function B2(n,t){if(n&1){let e=P();f(0,"button",18),E("click",function(){_(e);let r=u(2);return v(r.resolve())}),p(1),h()}if(n&2){let e=u(2);k("disabled",e.saving()),c(),q(" ",e.saving()?"Saving\u2026":"Mark as resolved"," ")}}function j2(n,t){if(n&1){let e=P();f(0,"div",7)(1,"section")(2,"h3"),p(3,"Current (ours)"),h(),S(4,k2,2,0,"p")(5,I2,2,0,"p")(6,P2,2,1,"pre"),f(7,"button",8),E("click",function(){let r=_(e),o=u();return v(r.ours.binary?o.resolve("ours"):o.use("ours"))}),p(8),h()(),f(9,"section")(10,"h3"),p(11,"Incoming (theirs)"),h(),S(12,O2,2,0,"p")(13,R2,2,0,"p")(14,N2,2,1,"pre"),f(15,"button",8),E("click",function(){let r=_(e),o=u();return v(r.theirs.binary?o.resolve("theirs"):o.use("theirs"))}),p(16),h()()(),S(17,F2,11,3,"div",9),S(18,V2,1,1,"app-error-banner",10),f(19,"footer")(20,"button",11),E("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(21,"Cancel"),h(),S(22,B2,2,2,"button",12),h()}if(n&2){let e=t,i=u();c(4),T(e.ours.binary?4:e.ours.content===null?5:6),c(3),k("disabled",i.saving()),c(),q(" ",e.ours.binary?"Resolve with current":"Use current"," "),c(4),T(e.theirs.binary?12:e.theirs.content===null?13:14),c(3),k("disabled",i.saving()),c(),q(" ",e.theirs.binary?"Resolve with incoming":"Use incoming"," "),c(),T(!e.ours.binary&&!e.theirs.binary?17:-1),c(),T(i.error()?18:-1),c(4),T(!e.ours.binary&&!e.theirs.binary?22:-1)}}function $2(n,t){if(n&1){let e=P();f(0,"app-error-banner",19),E("retry",function(){_(e);let r=u();return v(r.load())}),h()}if(n&2){let e=u();k("message",e.error())}}var Ed=class n{git=I(lt);path=N.required();resolved=H();closed=H();conflict=x(null);result=x("");deleted=x(!1);loading=x(!0);saving=x(!1);error=x("");ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getConflict(this.path()).subscribe({next:t=>{this.conflict.set(t),this.result.set(t.result.content??""),this.deleted.set(t.result.content===null&&!t.result.binary),this.loading.set(!1)},error:t=>{this.error.set(t?.error?.error||"Failed to load the merge conflict."),this.loading.set(!1)}})}use(t){let e=this.conflict()?.[t];!e||e.binary||(this.deleted.set(e.content===null),this.result.set(e.content??""))}useBoth(){let t=this.conflict();if(!t||t.ours.binary||t.theirs.binary)return;this.deleted.set(!1);let e=t.ours.content??"",i=t.theirs.content??"";this.result.set(e&&i&&!e.endsWith(`
66
+ `)?`${e}
67
+ ${i}`:`${e}${i}`)}updateResult(t){this.deleted.set(!1),this.result.set(t.target.value)}resolve(t="content"){if(this.saving())return;this.saving.set(!0),this.error.set("");let e=this.deleted()?"delete":t;this.git.resolveConflict(this.path(),e,e==="content"?this.result():void 0).pipe(oi(()=>this.saving.set(!1))).subscribe({next:()=>this.resolved.emit(),error:i=>this.error.set(i?.error?.error||"Failed to save the conflict resolution.")})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-conflict-dialog"]],inputs:{path:[1,"path"]},outputs:{resolved:"resolved",closed:"closed"},decls:13,vars:3,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","conflict-title",1,"dialog"],["id","conflict-title"],[1,"path",3,"title"],["type","button","aria-label","Close conflict resolver",3,"click"],[1,"state"],["retryLabel","Retry",3,"message"],[1,"sources"],["type","button",3,"click","disabled"],[1,"result"],[3,"message"],["type","button",3,"click"],["type","button",1,"primary",3,"disabled"],[1,"result-head"],[1,"actions"],[1,"deleted"],["aria-label","Resolved file content","spellcheck","false",3,"value"],["aria-label","Resolved file content","spellcheck","false",3,"input","value"],["type","button",1,"primary",3,"click","disabled"],["retryLabel","Retry",3,"retry","message"]],template:function(e,i){if(e&1&&(f(0,"div",0),E("click",function(){return i.closed.emit()}),h(),f(1,"div",1)(2,"header")(3,"div")(4,"h2",2),p(5,"Resolve merge conflict"),h(),f(6,"div",3),p(7),h()(),f(8,"button",4),E("click",function(){return i.closed.emit()}),p(9,"\xD7"),h()(),S(10,M2,2,0,"div",5)(11,j2,23,9)(12,$2,1,1,"app-error-banner",6),h()),e&2){let r;c(6),k("title",i.path()),c(),O(i.path()),c(3),T(i.loading()?10:(r=i.conflict())?11:i.error()?12:-1,r)}},dependencies:[at],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000094;z-index:210}.dialog[_ngcontent-%COMP%]{position:fixed;inset:4vh 4vw;z-index:211;display:flex;flex-direction:column;min-height:0;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden}header[_ngcontent-%COMP%], footer[_ngcontent-%COMP%], .result-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}header[_ngcontent-%COMP%]{padding:10px 14px;background:var(--bg-alt);border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{margin:0}h2[_ngcontent-%COMP%]{font-size:15px}h3[_ngcontent-%COMP%]{font-size:12px}.path[_ngcontent-%COMP%]{margin-top:3px;font:12px var(--mono);color:var(--text-dim)}button[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg);padding:5px 8px;cursor:pointer}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button[_ngcontent-%COMP%]:disabled{opacity:.5}.sources[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;min-height:0;height:38%;border-bottom:1px solid var(--border)}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;min-height:0;padding:10px;gap:7px}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:1px solid var(--border)}pre[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:auto;margin:0;padding:8px;white-space:pre;background:var(--bg-alt);border:1px solid var(--border);font:12px/1.5 var(--mono)}section[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .deleted[_ngcontent-%COMP%]{flex:1;margin:0;display:flex;align-items:center;justify-content:center;color:var(--text-dim);font-size:12px}.result[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;padding:10px;gap:7px}.actions[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{display:flex;gap:7px}textarea[_ngcontent-%COMP%]{flex:1;min-height:100px;resize:none;padding:8px;box-sizing:border-box;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:3px;font:12px/1.5 var(--mono);tab-size:2}.deleted[_ngcontent-%COMP%]{border:1px dashed var(--border);gap:10px}.state[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-dim)}footer[_ngcontent-%COMP%]{justify-content:flex-end;padding:10px 14px;border-top:1px solid var(--border);background:var(--bg-alt)}.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent)}@media(max-width:700px){.sources[_ngcontent-%COMP%]{grid-template-columns:1fr;height:45%;overflow:auto}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:0;border-top:1px solid var(--border)}}"],changeDetection:0})};var H2=(n,t)=>t.path;function U2(n,t){if(n&1&&(f(0,"div",4),z(1,"span",20),p(2),h()),n&2){let e=u();c(2),O(e.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function z2(n,t){if(n&1){let e=P();f(0,"app-error-banner",21),E("retry",function(){_(e);let r=u();return v(r.retry.emit())}),h()}if(n&2){let e=u();k("message",e.statusError())("busy",e.statusLoading())}}function G2(n,t){if(n&1){let e=P();f(0,"button",25),E("click",function(){let r=_(e).$implicit,o=u(2);return v(o.openConflict(r))}),f(1,"span",26),p(2,"!"),h(),f(3,"span",27),p(4),h(),f(5,"span"),p(6,"Resolve"),h()()}if(n&2){let e=t.$implicit,i=u(2);k("disabled",i.disabled()),c(3),k("title",e),c(),O(e)}}function W2(n,t){if(n&1&&(f(0,"section",7)(1,"h3"),p(2),h(),f(3,"p",22),p(4,"Choose a file to resolve it before committing."),h(),f(5,"div",23),Q(6,G2,7,3,"button",24,Rt),h()()),n&2){let e=u();c(2),q("Merge conflicts (",e.changes().conflicted.length,")"),c(4),K(e.changes().conflicted)}}function q2(n,t){if(n&1){let e=P();f(0,"button",32),E("click",function(){_(e);let r=u(2);return v(r.discardSelected())}),p(1,"Discard selected"),h(),f(2,"button",32),E("click",function(){_(e);let r=u(2);return v(r.discardAll())}),p(3,"Discard all"),h()}if(n&2){let e=u().$implicit,i=u();k("disabled",i.disabled()||!i.selected()[e].size),c(2),k("disabled",i.disabled()||!i.files(e).length)}}function Z2(n,t){n&1&&(F(),z(0,"polyline",37))}function Y2(n,t){n&1&&(F(),z(0,"polyline",38))}function Q2(n,t){if(n&1){let e=P();f(0,"button",35),E("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir(r.path))}),F(),f(1,"svg",36),S(2,Z2,1,0,":svg:polyline",37)(3,Y2,1,0,":svg:polyline",38),h(),ue(),f(4,"span",39),p(5),h(),f(6,"span",40)(7,"span",41),p(8),h(),f(9,"span",42),p(10),h()()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),k("title",e.path),le("aria-expanded",!e.collapsed)("aria-label","Directory "+e.path),c(2),T(e.collapsed?2:3),c(3),O(e.name),c(3),q("+",e.additions),c(2),q("\u2212",e.deletions)}}function K2(n,t){if(n&1){let e=P();f(0,"div",43),E("click",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.select(s,o.file.path,r))})("dblclick",function(){_(e);let r=u().$implicit,o=u().$implicit,s=u();return v(s.openDiff(o,r.file))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.openContextMenu(r,s,o.file))})("keydown",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.keySelect(s,o.file.path,r))}),f(1,"span",44),p(2),h(),f(3,"span",27),p(4),h(),f(5,"span",40)(6,"span",41),p(7),h(),f(8,"span",42),p(9),h()()()}if(n&2){let e=u().$implicit,i=u().$implicit,r=u();ie("padding-left",e.depth*14+4,"px"),me("selected",r.selected()[i].has(e.file.path)),le("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(e.file.path))("aria-label",e.file.path),c(),k("title",e.file.status),c(),O(e.file.status.slice(0,1).toUpperCase()),c(),k("title",e.file.oldPath&&e.file.oldPath!==e.file.path?e.file.oldPath+" \u2192 "+e.file.path:e.file.path),c(),O(e.name),c(3),q("+",e.file.additions),c(2),q("\u2212",e.file.deletions)}}function X2(n,t){if(n&1&&S(0,Q2,11,9,"button",33)(1,K2,10,13,"div",34),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function J2(n,t){if(n&1&&(f(0,"p",31),p(1),h()),n&2){let e=u().$implicit;c(),O(e==="staged"?"No staged changes.":"No unstaged changes.")}}function eA(n,t){if(n&1){let e=P();f(0,"section")(1,"h3"),p(2),h(),f(3,"div",28)(4,"span",29),p(5),h(),f(6,"button",3),E("click",function(){let r=_(e).$implicit,o=u();return v(o.moveSelected(r))}),p(7),h(),f(8,"button",3),E("click",function(){let r=_(e).$implicit,o=u();return v(o.moveAll(r))}),p(9),h(),S(10,q2,4,2),h(),f(11,"div",30),Q(12,X2,2,1,null,null,H2,!1,J2,2,1,"p",31),h()()}if(n&2){let e=t.$implicit,i=u();le("aria-label",e==="staged"?"Staged changes":"Unstaged changes"),c(2),_o("",e==="staged"?"Staged changes":"Unstaged changes"," (",i.files(e).length,")"),c(3),q("",i.selected()[e].size," selected"),c(),k("disabled",i.disabled()||!i.selected()[e].size),c(),O(e==="staged"?"Unstage selected":"Stage selected"),c(),k("disabled",i.disabled()||!i.files(e).length),c(),O(e==="staged"?"Unstage all":"Stage all"),c(),T(e==="unstaged"?10:-1),c(),le("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",e+" files"),c(),K(i.rows(e))}}function tA(n,t){n&1&&(f(0,"p",9),p(1,"Resolve conflicts before committing."),h())}function nA(n,t){if(n&1){let e=P();f(0,"app-diff-dialog",45),E("closed",function(){_(e);let r=u();return v(r.dialog.set(null))}),h()}if(n&2){let e=t;k("file",e.file)("originalRef",e.originalRef)("modifiedRef",e.modifiedRef)("exactOriginal",e.exactOriginal)}}function iA(n,t){if(n&1){let e=P();f(0,"app-conflict-dialog",46),E("resolved",function(){_(e);let r=u();return v(r.onConflictResolved())})("closed",function(){_(e);let r=u();return v(r.selectedConflict.set(null))}),h()}n&2&&k("path",t)}var Dd=class n{vscode=I(nn);changes=N(null);branches=N.required();busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=H();descriptionChange=H();stageChange=H();stashChange=H();discardRequest=H();commitRequested=H();conflictResolved=H();retry=H();closed=H();groups=["staged","unstaged"];selected=x({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=x(null);comparePrompt=x(null);compareTarget=null;selectedConflict=x(null);contextMenu=x(null);contextMenuTarget=null;collapsed=x(new Set);disabled=L(()=>this.busy()||!!this.statusError()||!this.changes());canCommit=L(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){Ce(()=>{let t=this.changes();this.selected.update(e=>{let i=G({},e);for(let r of this.groups){let o=new Set((r==="staged"?t?.stagedFiles:t?.unstagedFiles)?.map(s=>s.path));i[r]=new Set([...e[r]].filter(s=>o.has(s))),this.anchors[r]&&!o.has(this.anchors[r])&&(this.anchors[r]=null)}return i}),this.dialog.set(null),this.closeContextMenu()})}files(t){return(t==="staged"?this.changes()?.stagedFiles:this.changes()?.unstagedFiles)??[]}rows(t){let e=this.files(t);return this.fileListView()!=="tree"?e.map(i=>({kind:"file",path:i.path,name:i.path,depth:0,file:i})):Eo(e,this.collapsed())}orderedPaths(t){return this.rows(t).filter(e=>e.kind==="file").map(e=>e.path)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}openDiff(t,e){if(this.busy())return;let i=t==="staged"?"HEAD":"INDEX",r=t==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e,i,r)||this.dialog.set({file:e,originalRef:i,modifiedRef:r,exactOriginal:!1})}comparisonBranches(){return this.branches().filter(t=>!t.current&&!t.name.endsWith("/HEAD"))}openBranchComparison(t,e){let i=this.comparisonBranches();this.busy()||!i.length||(this.compareTarget={file:e,group:t},this.comparePrompt.set({title:"Compare with Branch",label:`Select the branch version to compare with ${e.path}.`,okLabel:"Compare",searchable:!0,options:i.map(r=>({value:r.name,label:r.name,description:r.remote?"Remote branch":"Local branch"}))}))}compareWithBranch(t){let e=this.compareTarget;if(this.closeComparePrompt(),!e||!this.comparisonBranches().some(r=>r.name===t))return;let i=e.group==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e.file,t,i,!0)||this.dialog.set({file:e.file,originalRef:t,modifiedRef:i,exactOriginal:!0})}closeComparePrompt(){this.comparePrompt.set(null),this.compareTarget=null}openContextMenu(t,e,i){t.preventDefault(),this.contextMenuTarget={file:i,group:e},this.contextMenu.set({x:t.clientX,y:t.clientY,items:[{label:"Open Diff",action:"open-diff",disabled:this.busy()},{label:"Compare with Branch...",action:"compare-branch",disabled:this.busy()||!this.comparisonBranches().length},{label:"Open File",action:"open-file",disabled:!this.vscode.canOpenFile()},{label:"Copy File Path",action:"copy-file-path"}]})}runContextAction(t){let e=this.contextMenuTarget;e&&(t==="open-diff"?this.openDiff(e.group,e.file):t==="compare-branch"?this.openBranchComparison(e.group,e.file):t==="open-file"?this.vscode.openFile(e.file.path):t==="copy-file-path"&&navigator.clipboard?.writeText(e.file.path))}closeContextMenu(){this.contextMenu.set(null),this.contextMenuTarget=null}select(t,e,i){let r=i.ctrlKey||i.metaKey,o=this.orderedPaths(t),s=this.anchors[t],a=i.shiftKey&&s!==null&&o.includes(s),l=r?new Set(this.selected()[t]):new Set;if(a){let d=o.indexOf(s),m=o.indexOf(e);for(let y of o.slice(Math.min(d,m),Math.max(d,m)+1))l.add(y)}else r&&l.has(e)?l.delete(e):l.add(e),this.anchors[t]=e;this.selected.update(d=>oe(G({},d),{[t]:l}))}keySelect(t,e,i){if((i.key===" "||i.key==="Enter")&&(i.preventDefault(),this.select(t,e,i)),i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault();let r=Array.from(i.currentTarget.closest(".file-list").querySelectorAll(".file-row")),o=r.indexOf(i.currentTarget),s=Math.max(0,Math.min(r.length-1,o+(i.key==="ArrowDown"?1:-1)));r[s]?.focus(),i.shiftKey&&this.select(t,this.orderedPaths(t)[s],i)}}move(t,e){this.disabled()||!e.length||this.stageChange.emit({staged:t==="staged",files:e})}openConflict(t){this.disabled()||this.vscode.openMergeConflict(t)||this.selectedConflict.set(t)}onConflictResolved(){this.selectedConflict.set(null),this.conflictResolved.emit()}moveSelected(t){this.move(t,[...this.selected()[t]])}moveAll(t){this.move(t,this.files(t).map(e=>e.path))}stash(t){this.disabled()||this.stashChange.emit(t)}discard(t){this.disabled()||!t.length||this.discardRequest.emit(t)}discardSelected(){this.discard([...this.selected().unstaged])}discardAll(){this.discard(this.files("unstaged").map(t=>t.path))}updateSubject(t){this.subjectChange.emit(t.target.value)}updateDescription(t){this.descriptionChange.emit(t.target.value)}commit(t){t.preventDefault(),this.canCommit()&&this.commitRequested.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-working-panel"]],inputs:{changes:[1,"changes"],branches:[1,"branches"],busy:[1,"busy"],statusLoading:[1,"statusLoading"],statusError:[1,"statusError"],subject:[1,"subject"],description:[1,"description"],fileListView:[1,"fileListView"]},outputs:{subjectChange:"subjectChange",descriptionChange:"descriptionChange",stageChange:"stageChange",stashChange:"stashChange",discardRequest:"discardRequest",commitRequested:"commitRequested",conflictResolved:"conflictResolved",retry:"retry",closed:"closed"},decls:35,vars:16,consts:[["aria-label","Uncommitted changes",1,"detail"],["type","button","aria-label","Close changes",3,"click"],["role","group","aria-label","Stash changes",1,"stash-actions"],["type","button",3,"click","disabled"],["role","status",1,"state"],["retryLabel","Retry status",3,"message","busy"],[1,"changes"],["aria-label","Merge conflicts",1,"conflicts"],[3,"submit"],[1,"error"],["for","commit-subject"],["id","commit-subject","placeholder","Summary of your changes","required","",3,"input","value","disabled"],["for","commit-description"],[1,"optional"],["id","commit-description","rows","3",3,"input","value","disabled"],["type","submit",1,"commit-button",3,"disabled"],[3,"file","originalRef","modifiedRef","exactOriginal"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"path"],[1,"spinner"],["retryLabel","Retry status",3,"retry","message","busy"],[1,"conflict-help"],[1,"file-list"],["type","button",1,"conflict-row",3,"disabled"],["type","button",1,"conflict-row",3,"click","disabled"],[1,"conflict-status"],[1,"file-path",3,"title"],[1,"actions"],["aria-live","polite",1,"selection-count"],["aria-multiselectable","true",1,"file-list"],[1,"empty"],["type","button",1,"danger",3,"click","disabled"],["type","button","role","treeitem",1,"dir-row",3,"title","paddingLeft"],["tabindex","0",1,"file-row",3,"selected","paddingLeft"],["type","button","role","treeitem",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"dir-name"],[1,"counts"],[1,"additions"],[1,"deletions"],["tabindex","0",1,"file-row",3,"click","dblclick","contextmenu","keydown"],[1,"file-status",3,"title"],[3,"closed","file","originalRef","modifiedRef","exactOriginal"],[3,"resolved","closed","path"]],template:function(e,i){if(e&1&&(f(0,"aside",0)(1,"header")(2,"h2"),p(3,"Uncommitted changes"),h(),f(4,"button",1),E("click",function(){return i.closed.emit()}),p(5,"\xD7"),h()(),f(6,"div",2)(7,"button",3),E("click",function(){return i.stash("all")}),p(8,"Stash all"),h(),f(9,"button",3),E("click",function(){return i.stash("staged")}),p(10,"Stash staged"),h(),f(11,"button",3),E("click",function(){return i.stash("unstaged")}),p(12,"Stash unstaged"),h()(),S(13,U2,3,1,"div",4),S(14,z2,1,2,"app-error-banner",5),f(15,"div",6),S(16,W2,8,1,"section",7),Q(17,eA,15,12,"section",null,Rt),h(),f(19,"form",8),E("submit",function(o){return i.commit(o)}),S(20,tA,2,0,"p",9),f(21,"label",10),p(22,"Commit message"),h(),f(23,"input",11),E("input",function(o){return i.updateSubject(o)}),h(),f(24,"label",12),p(25,"Description "),f(26,"span",13),p(27,"(optional)"),h()(),f(28,"textarea",14),E("input",function(o){return i.updateDescription(o)}),h(),f(29,"button",15),p(30,"Commit staged changes"),h()()(),S(31,nA,1,4,"app-diff-dialog",16),f(32,"app-context-menu",17),E("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),h(),f(33,"app-prompt-dialog",18),E("confirmed",function(o){return i.compareWithBranch(o)})("cancelled",function(){return i.closeComparePrompt()}),h(),S(34,iA,1,1,"app-conflict-dialog",19)),e&2){let r,o,s,a;c(7),k("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),c(2),k("disabled",i.disabled()||!i.files("staged").length),c(2),k("disabled",i.disabled()||!i.files("unstaged").length),c(2),T(i.busy()?13:-1),c(),T(i.statusError()?14:-1),c(2),T(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?16:-1),c(),K(i.groups),c(3),T(!((o=i.changes())==null||o.conflicted==null)&&o.conflicted.length?20:-1),c(3),k("value",i.subject())("disabled",i.busy()),c(5),k("value",i.description())("disabled",i.busy()),c(),k("disabled",!i.canCommit()),c(2),T((s=i.dialog())?31:-1,s),c(),k("menu",i.contextMenu()),c(),k("state",i.comparePrompt()),c(),T((a=i.selectedConflict())?34:-1,a)}},dependencies:[at,Mo,Ed,So,Io],styles:["[_nghost-%COMP%]{--panel-width: max(320px, min(480px, 60vw));display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border);color:var(--text)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px;gap:12px}h2[_ngcontent-%COMP%]{font-size:15px;margin:0}h3[_ngcontent-%COMP%]{font-size:13px;margin:0 0 8px}.stash-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;padding:0 12px 10px;flex-wrap:wrap;font-size:11px}button[_ngcontent-%COMP%], input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg)}button[_ngcontent-%COMP%]{cursor:pointer;padding:4px 7px;white-space:nowrap}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button.danger[_ngcontent-%COMP%]{color:#f48771}button.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#5a1d1d}button[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}button[_ngcontent-%COMP%]:focus-visible, input[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-visible, .file-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.changes[_ngcontent-%COMP%]{overflow-y:auto;flex:1;min-height:80px}section[_ngcontent-%COMP%]{padding:10px;border-top:1px solid var(--border)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;margin-bottom:6px;flex-wrap:wrap;font-size:11px}.selection-count[_ngcontent-%COMP%]{margin-right:auto;color:var(--text-dim)}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.conflicts[_ngcontent-%COMP%]{background:#f487710f}.conflict-help[_ngcontent-%COMP%]{margin:0 0 7px;color:var(--text-dim);font-size:12px}.conflict-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;border:0;background:transparent;text-align:left}.conflict-status[_ngcontent-%COMP%]{flex:none;color:#f48771;font-weight:700}.dir-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;width:100%;padding:7px 8px;border:none;background:transparent;font-size:12px;text-align:left}.dir-row[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}.dir-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:9px;height:9px;flex:none;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.dir-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:600}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;padding:7px 4px;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:12px}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.file-row.selected[_ngcontent-%COMP%]{background:#04395e}.file-status[_ngcontent-%COMP%]{color:var(--accent);width:12px;flex:none}.file-path[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.counts[_ngcontent-%COMP%]{white-space:nowrap;font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{color:#f48771}.empty[_ngcontent-%COMP%], .optional[_ngcontent-%COMP%]{color:var(--text-dim);font-size:12px}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px;border-top:1px solid var(--border);max-height:50%;overflow-y:auto}label[_ngcontent-%COMP%]{font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{padding:7px;width:100%;box-sizing:border-box}textarea[_ngcontent-%COMP%]{resize:vertical;min-height:50px}.commit-button[_ngcontent-%COMP%]{background:var(--accent);color:#fff;padding:8px;margin-top:4px}.state[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{padding:8px 12px;font-size:12px}.state[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.spinner[_ngcontent-%COMP%]{width:12px;height:12px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}"],changeDetection:0})};var rA=(n,t)=>t.name;function oA(n,t){if(n&1&&(b(0,"option",10),p(1),C()),n&2){let e=t.$implicit;W("value",e.name),c(),O(e.name)}}function sA(n,t){n&1&&(b(0,"p",11),p(1,"Every local branch is already checked out in a worktree."),C())}function aA(n,t){if(n&1&&(b(0,"p",12),p(1),C()),n&2){let e=u();c(),O(e.error())}}var Sd=class n{vscode=I(nn);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=H();closed=H();path=x("");branch=x("");canBrowse=this.vscode.canPickFolder;availableBranches=L(()=>{let t=new Set(this.worktrees().map(e=>e.branch).filter(Boolean));return this.branches().filter(e=>!e.remote&&!t.has(e.name))});constructor(){Ce(()=>{let t=this.availableBranches();t.some(e=>e.name===this.branch())||this.branch.set(t[0]?.name??"")})}onEscape(){this.busy()||this.closed.emit()}onPath(t){this.path.set(t.target.value)}onBranch(t){this.branch.set(t.target.value)}browse(){return Dn(this,null,function*(){let t=yield this.vscode.pickFolder();t&&this.path.set(t)})}submit(){let t=this.path().trim(),e=this.branch();t&&e&&!this.busy()&&this.created.emit({path:t,branch:e})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(e,i){e&1&&E("keydown.escape",function(){return i.onEscape()},Qe)},inputs:{branches:[1,"branches"],worktrees:[1,"worktrees"],busy:[1,"busy"],error:[1,"error"]},outputs:{created:"created",closed:"closed"},decls:24,vars:11,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","worktree-title",1,"dialog",3,"submit"],["id","worktree-title",1,"title"],[1,"description"],["for","worktree-folder",1,"field-label"],[1,"folder-row"],["id","worktree-folder","type","text","autocomplete","off","placeholder","Absolute path to an empty or new folder",1,"input",3,"input","value","disabled"],["type","button",1,"btn",3,"click","disabled","title"],["for","worktree-branch",1,"field-label"],["id","worktree-branch",1,"input","select",3,"change","value","disabled"],[3,"value"],[1,"notice"],["role","alert",1,"error"],[1,"actions"],["type","button",1,"btn",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){e&1&&(b(0,"div",0),B("click",function(){return i.closed.emit()}),C(),b(1,"form",1),B("submit",function(o){return o.preventDefault(),i.submit()}),b(2,"h3",2),p(3,"Create Worktree"),C(),b(4,"p",3),p(5,"Create a linked working folder from an available local branch."),C(),b(6,"label",4),p(7,"Folder"),C(),b(8,"div",5)(9,"input",6),B("input",function(o){return i.onPath(o)}),C(),b(10,"button",7),B("click",function(){return i.browse()}),p(11,"Browse..."),C()(),b(12,"label",8),p(13,"Branch"),C(),b(14,"select",9),B("change",function(o){return i.onBranch(o)}),Q(15,oA,2,2,"option",10,rA),C(),S(17,sA,2,0,"p",11),S(18,aA,2,1,"p",12),b(19,"div",13)(20,"button",14),B("click",function(){return i.closed.emit()}),p(21,"Cancel"),C(),b(22,"button",15),p(23),C()()()),e&2&&(c(9),W("value",i.path())("disabled",i.busy()),c(),W("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),c(4),W("value",i.branch())("disabled",i.busy()),c(),K(i.availableBranches()),c(2),T(i.availableBranches().length===0?17:-1),c(),T(i.error()?18:-1),c(2),W("disabled",i.busy()),c(2),W("disabled",i.busy()||!i.path().trim()||!i.branch()),c(),q(" ",i.busy()?"Creating...":"Create Worktree"," "))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000080}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;z-index:401;width:min(500px,calc(100vw - 48px));transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:9px;padding:18px;border:1px solid var(--border);border-radius:8px;background:var(--bg-alt);box-shadow:0 10px 36px #0009}.title[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px;font-weight:600}.description[_ngcontent-%COMP%], .notice[_ngcontent-%COMP%]{margin:0 0 4px;color:var(--text-dim);font-size:12px}.notice[_ngcontent-%COMP%]{color:#dcb67a}.error[_ngcontent-%COMP%]{margin:0;color:var(--red);font-size:12px;line-height:1.4}.field-label[_ngcontent-%COMP%]{color:var(--text);font-size:12px;font-weight:600}.folder-row[_ngcontent-%COMP%]{display:flex;gap:8px}.input[_ngcontent-%COMP%]{min-width:0;padding:7px 10px;border:1px solid var(--border);border-radius:4px;outline:none;background:var(--bg);color:var(--text);font:13px inherit}.folder-row[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{flex:1}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.select[_ngcontent-%COMP%]{width:100%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font:12px inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn[_ngcontent-%COMP%]:disabled, .input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var lA=["searchInput"];function cA(n,t){if(n&1){let e=P();b(0,"button",10),B("click",function(){_(e);let r=u(2);return v(r.searchNavigate.emit("prev"))}),F(),b(1,"svg",2),J(2,"polyline",11),C()(),ue(),b(3,"button",12),B("click",function(){_(e);let r=u(2);return v(r.searchNavigate.emit("next"))}),F(),b(4,"svg",2),J(5,"polyline",13),C()()}if(n&2){let e=u(2);W("disabled",e.matchCount()===0),c(3),W("disabled",e.matchCount()===0)}}function dA(n,t){if(n&1){let e=P();S(0,cA,6,2),b(1,"button",6),B("click",function(){_(e);let r=u();return v(r.clearSearch())}),F(),b(2,"svg",2),J(3,"line",7)(4,"line",8),C()(),ue(),b(5,"span",9),p(6),C()}if(n&2){let e=u();T(e.filterMode()?-1:0),c(6),O(e.badgeText())}}var uA=300,Td=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=H();searchNavigate=H();searchValue=x("");badgeText=L(()=>{let t=this.matchCount(),e=t>99?"99+":String(t);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${e}`:e});searchInput=en("searchInput");constructor(){yr(this.searchValue).pipe(gu(uA),Jo(),_t()).subscribe(t=>this.searchChange.emit(t))}onSearch(t){this.searchValue.set(t.target.value)}onSearchKeydown(t){t.key==="Enter"&&!this.filterMode()&&(t.preventDefault(),this.searchNavigate.emit(t.shiftKey?"prev":"next"))}clearSearch(){this.searchValue.set(""),this.searchInput()?.nativeElement.focus()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-search-box"]],viewQuery:function(e,i){e&1&&jt(i.searchInput,lA,5),e&2&&vn()},inputs:{matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:7,vars:2,consts:[["searchInput",""],[1,"search"],["viewBox","0 0 24 24","aria-hidden","true"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["type","text","placeholder","Search commits",3,"input","keydown","value"],["type","button","title","Clear search","aria-label","Clear search",1,"clear-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"count-badge"],["type","button","title","Previous match (Shift+Enter)","aria-label","Previous match",1,"nav-btn",3,"click","disabled"],["points","18 15 12 9 6 15"],["type","button","title","Next match (Enter)","aria-label","Next match",1,"nav-btn",3,"click","disabled"],["points","6 9 12 15 18 9"]],template:function(e,i){if(e&1){let r=P();b(0,"div",1),F(),b(1,"svg",2),J(2,"circle",3)(3,"line",4),C(),ue(),b(4,"input",5,0),B("input",function(s){return _(r),v(i.onSearch(s))})("keydown",function(s){return _(r),v(i.onSearchKeydown(s))}),C(),S(6,dA,7,2),C()}e&2&&(c(4),W("value",i.searchValue()),c(2),T(i.searchValue()?6:-1))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:8px}.search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:4px;background:#2d2d2d;color:var(--text-dim)}.search[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.search[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;border:none;outline:none;background:transparent;color:var(--text);font-size:12px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#777}@media(max-width:720px){.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100px}}.clear-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.clear-btn[_ngcontent-%COMP%]:hover{color:var(--text);background:#3a3a3a}.clear-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.count-badge[_ngcontent-%COMP%]{position:absolute;z-index:1;top:-8px;right:-8px;min-width:14px;padding:1px 5px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--accent) 25%,var(--bg-alt));color:var(--text-bright);font-size:10px;line-height:14px;text-align:center;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.nav-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:#3a3a3a}.nav-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:default}.nav-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}"],changeDetection:0})};function pA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h()()}}function fA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull"))}),p(2,"Pull"),h(),f(3,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(4,"Pull (rebase)"),h(),f(5,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(6,"Rebase (from)..."),h()()}}function hA(n,t){if(n&1){let e=P();f(0,"button",34),E("click",function(){_(e);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function mA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push"))}),p(2,"Push"),h(),f(3,"button",35),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(4," Push (force) "),h(),f(5,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("sync"))}),p(6,"Sync"),h(),S(7,hA,2,0,"button",36),h()}if(n&2){let e=u();c(7),T(e.prEnabled()?7:-1)}}function gA(n,t){if(n&1){let e=P();f(0,"button",34),E("click",function(){_(e);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function _A(n,t){if(n&1){let e=P();f(0,"div",33)(1,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h(),z(5,"div",37),f(6,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull"))}),p(7,"Pull"),h(),f(8,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(9," Pull (rebase) "),h(),f(10,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(11," Rebase (from)... "),h(),z(12,"div",37),f(13,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push"))}),p(14,"Push"),h(),f(15,"button",35),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(16," Push (force) "),h(),f(17,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("sync"))}),p(18,"Sync"),h(),S(19,gA,2,0,"button",36),z(20,"div",37),f(21,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseRefresh())}),p(22,"Refresh"),h(),z(23,"div",37),f(24,"button",34),E("click",function(){_(e);let r=u();return v(r.chooseSettings())}),p(25,"Settings..."),h()()}if(n&2){let e=u();c(19),T(e.prEnabled()?19:-1)}}var Md=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=H();refresh=H();remoteAction=H();settingsClick=H();searchChange=H();searchNavigate=H();openMenu=x(null);toggleMenu(t,e){e.stopPropagation(),this.openMenu.update(i=>i===t?null:t)}chooseRemoteAction(t){this.openMenu.set(null),this.remoteAction.emit(t)}chooseRefresh(){this.openMenu.set(null),this.refresh.emit()}chooseSettings(){this.openMenu.set(null),this.settingsClick.emit()}closeMenu(){this.openMenu.set(null)}closeMenuOnEscape(){this.openMenu.set(null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-toolbar"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.closeMenu()},Qe)("keydown.escape",function(){return i.closeMenuOnEscape()},Qe)},inputs:{busy:[1,"busy"],prEnabled:[1,"prEnabled"],panelOpen:[1,"panelOpen"],matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{menuToggle:"menuToggle",refresh:"refresh",remoteAction:"remoteAction",settingsClick:"settingsClick",searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:46,vars:15,consts:[[1,"toolbar"],[1,"group"],["type","button","title","Toggle Branches, Stashes and Worktrees panel","aria-label","Toggle repository panel",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","3","y1","6","x2","21","y2","6"],["x1","3","y1","12","x2","21","y2","12"],["x1","3","y1","18","x2","21","y2","18"],[1,"app-title"],[1,"group","actions"],[3,"searchChange","searchNavigate","matchIndex","matchCount","filterMode"],[1,"action-menu"],["title","Fetch",1,"icon-btn",3,"click","disabled"],["d","M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"],["role","menu",1,"remote-menu"],["title","Pull",1,"icon-btn",3,"click","disabled"],["cx","12","cy","12","r","10"],["points","8 12 12 16 16 12"],["x1","12","y1","8","x2","12","y2","16"],["title","Push",1,"icon-btn",3,"click","disabled"],["points","16 12 12 8 8 12"],["x1","12","y1","16","x2","12","y2","8"],["title","Refresh",1,"icon-btn",3,"click"],["points","23 4 23 10 17 10"],["points","1 20 1 14 7 14"],["d","M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"],["title","Settings","aria-label","Settings",1,"icon-btn",3,"click"],["cx","12","cy","12","r","3"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"],[1,"overflow-anchor"],["type","button","title","More actions","aria-label","More actions","aria-haspopup","menu",1,"icon-btn","overflow-btn",3,"click"],["cx","5","cy","12","r","2.1"],["cx","12","cy","12","r","2.1"],["cx","19","cy","12","r","2.1"],["role","menu",1,"remote-menu","overflow-menu"],["type","button","role","menuitem",3,"click"],["type","button","role","menuitem",1,"danger",3,"click"],["type","button","role","menuitem"],[1,"menu-sep"]],template:function(e,i){e&1&&(f(0,"div",0)(1,"div",1)(2,"button",2),E("click",function(){return i.menuToggle.emit()}),F(),f(3,"svg",3),z(4,"line",4)(5,"line",5)(6,"line",6),h()(),ue(),f(7,"span",7),p(8,"Guito"),h()(),f(9,"div",8)(10,"app-search-box",9),E("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),h(),f(11,"div",10)(12,"button",11),E("click",function(o){return i.toggleMenu("fetch",o)}),F(),f(13,"svg",3),z(14,"path",12),h()(),S(15,pA,5,0,"div",13),h(),ue(),f(16,"div",10)(17,"button",14),E("click",function(o){return i.toggleMenu("pull",o)}),F(),f(18,"svg",3),z(19,"circle",15)(20,"polyline",16)(21,"line",17),h()(),S(22,fA,7,0,"div",13),h(),ue(),f(23,"div",10)(24,"button",18),E("click",function(o){return i.toggleMenu("push",o)}),F(),f(25,"svg",3),z(26,"circle",15)(27,"polyline",19)(28,"line",20),h()(),S(29,mA,8,1,"div",13),h(),ue(),f(30,"button",21),E("click",function(){return i.refresh.emit()}),F(),f(31,"svg",3),z(32,"polyline",22)(33,"polyline",23)(34,"path",24),h()(),ue(),f(35,"button",25),E("click",function(){return i.settingsClick.emit()}),F(),f(36,"svg",3),z(37,"circle",26)(38,"path",27),h()(),ue(),f(39,"div",28)(40,"button",29),E("click",function(o){return i.toggleMenu("overflow",o)}),F(),f(41,"svg",3),z(42,"circle",30)(43,"circle",31)(44,"circle",32),h()(),S(45,_A,26,1,"div",33),h()()()),e&2&&(c(2),le("aria-expanded",i.panelOpen()),c(8),k("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),c(2),k("disabled",i.busy()),le("aria-expanded",i.openMenu()==="fetch"),c(3),T(i.openMenu()==="fetch"?15:-1),c(2),k("disabled",i.busy()),le("aria-expanded",i.openMenu()==="pull"),c(5),T(i.openMenu()==="pull"?22:-1),c(2),k("disabled",i.busy()),le("aria-expanded",i.openMenu()==="push"),c(5),T(i.openMenu()==="push"?29:-1),c(11),le("aria-expanded",i.openMenu()==="overflow"),c(5),T(i.openMenu()==="overflow"?45:-1))},dependencies:[Td],styles:[".toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;height:42px;padding:0 12px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;min-width:0}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer;flex:none}.action-menu[_ngcontent-%COMP%]{position:relative;display:inline-flex}.remote-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:0;z-index:20;min-width:132px;padding:4px;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000073}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:3px;background:transparent;color:var(--text);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]{color:var(--red)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]:hover{background:#f487711f;color:#f48771}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.icon-btn[aria-expanded=true][_ngcontent-%COMP%]{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.app-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--text-bright);letter-spacing:.2px;-webkit-user-select:none;user-select:none}.overflow-anchor[_ngcontent-%COMP%]{position:relative;display:inline-flex}.overflow-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{fill:currentColor;stroke:none}.menu-sep[_ngcontent-%COMP%]{height:1px;margin:4px 0;background:var(--border)}.overflow-menu[_ngcontent-%COMP%]{max-height:min(60vh,420px);overflow-y:auto}@media(max-width:640px){.actions[_ngcontent-%COMP%] > .action-menu[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%] > button.icon-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%]{display:inline-flex}}"],changeDetection:0})};var vA=n=>[n];function bA(n,t){if(n&1){let e=P();f(0,"app-error-banner",13),E("retry",function(){_(e);let r=u();return v(r.refresh())}),h()}if(n&2){let e=u();k("message",e.error())("busy",e.loading())}}function yA(n,t){if(n&1){let e=P();f(0,"app-error-banner",14),E("retry",function(){_(e);let r=u();return v(r.refreshWorking())}),h()}if(n&2){let e=u();k("message",e.statusError())("busy",e.statusLoading())}}function CA(n,t){if(n&1){let e=P();f(0,"app-side-panel",16),E("transitionend",function(r){_(e);let o=u(2);return v(o.onPanelTransitionEnd(r))})("transitioncancel",function(r){_(e);let o=u(2);return v(o.onPanelTransitionEnd(r))})("branchChange",function(r){_(e);let o=u(2);return v(o.selectedBranches.set(r))})("tagSelect",function(r){_(e);let o=u(2);return v(o.selectTag(r))})("stashSelect",function(r){_(e);let o=u(2);return v(o.selectStash(r))})("contextMenu",function(r){_(e);let o=u(2);return v(o.onContextMenu(r))})("worktreeCreate",function(){_(e);let r=u(2);return v(r.openWorktreeDialog())})("worktreeOpen",function(r){_(e);let o=u(2);return v(o.openWorktree(r))})("prSelect",function(r){_(e);let o=u(2);return v(o.openPrDetail(r))})("prRefresh",function(){_(e);let r=u(2);return v(r.loadPullRequests())}),h()}if(n&2){let e,i=u(2);me("panel-open",i.panelExpanded()),k("hidden",!i.panelRendered())("branches",i.branches())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("refListView",i.refListView())("sectionsExpandedByDefault",i.sidePanelSectionsExpanded())("searchCaseSensitive",i.searchCaseSensitive())("selectedCommitHash",((e=i.selectedCommit())==null?null:e.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function xA(n,t){if(n&1&&Q(0,CA,1,17,"app-side-panel",15,Rt),n&2){let e=u();K(xi(0,vA,e.panelRenderVersion()))}}function wA(n,t){if(n&1){let e=P();f(0,"app-working-panel",19),lr("panel-leave"),ar("panel-enter"),E("subjectChange",function(r){_(e);let o=u(2);return v(o.commitSubject.set(r))})("descriptionChange",function(r){_(e);let o=u(2);return v(o.commitDescription.set(r))})("stageChange",function(r){_(e);let o=u(2);return v(o.changeStage(r))})("stashChange",function(r){_(e);let o=u(2);return v(o.stashChanges(r))})("discardRequest",function(r){_(e);let o=u(2);return v(o.discardUnstaged(r))})("commitRequested",function(){_(e);let r=u(2);return v(r.commitChanges())})("conflictResolved",function(){_(e);let r=u(2);return v(r.refreshWorking())})("retry",function(){_(e);let r=u(2);return v(r.refreshWorking())})("closed",function(){_(e);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let e=u(2);k("changes",e.workingChanges())("branches",e.branches())("busy",e.busy()||e.mutationBusy()||e.statusLoading())("statusLoading",e.statusLoading())("statusError",e.statusError())("subject",e.commitSubject())("description",e.commitDescription())("fileListView",e.fileListView())}}function EA(n,t){if(n&1){let e=P();f(0,"app-commit-detail",20),lr("panel-leave"),ar("panel-enter"),E("closed",function(){_(e);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let e=u(),i=u();k("commit",e)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function DA(n,t){if(n&1&&S(0,wA,1,8,"app-working-panel",17)(1,EA,1,3,"app-commit-detail",18),n&2){let e=u();T(t.hash===e.workingHash?0:1)}}function SA(n,t){if(n&1){let e=P();f(0,"app-worktree-dialog",21),E("created",function(r){_(e);let o=u();return v(o.createWorktree(r))})("closed",function(){_(e);let r=u();return v(r.worktreeDialogOpen.set(!1))}),h()}if(n&2){let e=u();k("branches",e.branches())("worktrees",e.worktrees())("busy",e.mutationBusy())("error",e.worktreeDialogError())}}function TA(n,t){if(n&1){let e=P();f(0,"app-create-pr-dialog",22),E("closed",function(){_(e);let r=u();return v(r.prDialogOpen.set(!1))})("created",function(){_(e);let r=u();return v(r.onPrCreated())}),h()}if(n&2){let e=u();k("branches",e.branches())}}function MA(n,t){if(n&1){let e=P();f(0,"app-pr-dialog",23),E("changed",function(){_(e);let r=u();return v(r.loadPullRequests())})("closed",function(){_(e);let r=u();return v(r.closePrDetail())}),h()}if(n&2){let e=u();k("prId",t)("settings",e.azureSettings())}}function kA(n,t){if(n&1){let e=P();f(0,"app-settings-dialog",24),E("saved",function(r){_(e);let o=u();return v(o.saveSettings(r))})("settingsUpdated",function(r){_(e);let o=u();return v(o.applySettings(r))})("identityChanged",function(r){_(e);let o=u();return v(o.identity.set(r))})("repositoryChanged",function(){_(e);let r=u();return v(r.refresh())})("closed",function(){_(e);let r=u();return v(r.settingsDialogOpen.set(!1))}),h()}if(n&2){let e=u();k("settings",t)("identity",e.identity())("saving",e.settingsSaving())}}var va=500,RC="guito.commitDraft";function IA(){let n=sd(RC,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var kd=class n{git=I(lt);vscode=I(nn);workingHash=yn;mutationBusy=this.git.mutating;statusLoading=x(!1);statusError=x("");commitDraft=IA();commitSubject=x(this.commitDraft.subject);commitDescription=x(this.commitDraft.description);displayedCommits=x([]);searchLoading=x(!1);historyGeneration=x(0);filterFailed=x(!1);tableLoading=L(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=x([]);branches=x([]);selectedBranches=x([]);showRemote=x(!0);search=x("");selectedCommit=x(null);loading=x(!1);busy=x(!1);error=x("");repoName=x("");identity=x({name:"",email:""});lastRepositoryState=null;stateSub=null;refreshTimer=window.setInterval(()=>this.checkRepository(),3e3);workingChanges=x(null);totalCommits=x(0);historyLoading=x(!1);contextMenuState=x(null);contextMenuTarget=x(null);promptState=x(null);azureSettings=x(null);hasAzureUrl=L(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=L(()=>this.azureSettings()?.autoReload!==!1);showGraph=L(()=>this.azureSettings()?.showGraph!==!1);showStashes=L(()=>this.azureSettings()?.showStashes===!0);showTags=L(()=>this.azureSettings()?.showTags!==!1);issueLinking=L(()=>this.azureSettings()?.issueLinking??null);fileListView=L(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");refListView=L(()=>this.azureSettings()?.refListView==="tree"?"tree":"flat");sidePanelSectionsExpanded=L(()=>this.azureSettings()?.sidePanelSectionsExpanded!==!1);filterSearch=L(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=L(()=>this.azureSettings()?.searchCaseSensitive===!0);prDialogOpen=x(!1);settingsDialogOpen=x(!1);settingsSaving=x(!1);pendingDiscard=x(null);panelOpen=x(!1);panelInitialized=x(!1);panelRenderVersion=x(0);panelRendered=x(!1);panelExpanded=x(!1);panelOpenFrame=null;panelLoading=x(!1);stashes=x([]);worktrees=x([]);worktreeDialogOpen=x(!1);worktreeDialogError=x("");tags=x([]);pullRequests=x(null);pullRequestsError=x("");prDetailId=x(null);searchFocusHash=x("");pendingSearchHash=x("");scrollRequest=x(null);scrollRequestCounter=0;bodyMatches=x([]);searchHistoryIndices=x({});refreshSub=null;historySub=null;workingSub=null;searchSub=null;panelSub=null;prListSub=null;unloadedCommits=L(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=L(()=>{let t=new Map;for(let e of this.commits())t.set(e.hash,e);return t});filteredCommits=L(()=>{let t=this.commits(),e=this.selectedBranches(),i=this.branches().filter(s=>this.showRemote()||!s.remote),r=new Set(e),o=e.length?i.filter(s=>r.has(s.name)):i;if(o.length>0){let s=new Set;for(let a of o)for(let l of this.ancestorsOf(a.commit))s.add(l);t=t.filter(a=>s.has(a.hash))}else t=[];return t});searchMatches=L(()=>{let t=this.search().trim(),e=this.searchCaseSensitive(),i=Si(t,e);if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>Si(l.message,e).includes(i)||Si(l.author_name,e).includes(i)||Si(l.hash,e).startsWith(i)||r.has(l.hash)).map(l=>l.hash),s=new Set(o),a=this.bodyMatches().filter(l=>!s.has(l));return[...o,...a]});searchIndex=L(()=>{let t=this.searchFocusHash();return t?this.searchMatches().indexOf(t):-1});constructor(){this.refresh(),Ce(()=>{let t=this.search().trim();this.selectedBranches(),this.historyGeneration(),this.filterSearch();let e=this.searchCaseSensitive();nt(()=>{this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.bodyMatches.set([]),this.searchHistoryIndices.set({}),this.filterFailed.set(!1),this.error.set(""),this.searchFocusHash.set(""),this.pendingSearchHash.set(""),!this.loading()&&((this.selectedBranches().length||t&&this.filterSearch())&&this.unloadedCommits()>0&&this.loadAllCommits(),t&&this.fetchBodyMatches(t,e))})}),Ce(()=>{if(!this.loading()&&!this.searchLoading()&&!this.historyLoading()&&!this.filterFailed()){let t=new Set(this.searchMatches());this.displayedCommits.set(this.filterSearch()&&this.search().trim()?this.filteredCommits().filter(e=>t.has(e.hash)):this.filteredCommits())}}),Ce(()=>{let t=this.pendingSearchHash();if(!t||this.filterFailed())return;let e=this.displayedCommits().find(i=>i.hash===t);if(e)nt(()=>{this.selectedCommit.set(e),this.scrollRequestCounter+=1,this.scrollRequest.set({hash:t,id:this.scrollRequestCounter}),this.pendingSearchHash.set("")});else if(this.unloadedCommits()>0&&!this.historyLoading()&&!this.loading()){let i=this.searchHistoryIndices()[t],r=this.commits().length;if(i!==void 0&&i<r){this.pendingSearchHash.set("");return}let o=i===void 0?void 0:Math.ceil((i+1-r)/va)*va;nt(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),Ce(()=>{ad(RC,{subject:this.commitSubject(),description:this.commitDescription()})}),Ce(()=>{this.vscode.settingsVersion()!==0&&nt(()=>{this.git.getSettings().subscribe({next:t=>this.applySettings(t),error:t=>this.error.set(this.errorMessage(t))})})})}ngOnDestroy(){window.clearInterval(this.refreshTimer),this.panelOpenFrame!==null&&window.cancelAnimationFrame(this.panelOpenFrame),this.stateSub?.unsubscribe(),this.refreshSub?.unsubscribe(),this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.panelSub?.unsubscribe(),this.prListSub?.unsubscribe()}checkRepository(){!this.autoReload()||document.hidden||this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy()||this.stateSub&&!this.stateSub.closed||(this.stateSub=this.git.getRepositoryState().subscribe({next:t=>{if(this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy())return;let e=this.lastRepositoryState;this.lastRepositoryState=t,!e||e.history!==t.history?this.refresh(!0):e.working!==t.working&&this.refreshWorking()},error:()=>{}}))}toggleSidePanel(){let t=!this.panelOpen();if(this.panelOpen.set(t),t){this.panelInitialized.set(!0);let e=this.panelRendered();this.panelRendered.set(!0),e?this.panelExpanded.set(!0):this.panelAnimationsEnabled()?this.panelOpenFrame=window.requestAnimationFrame(()=>{this.panelOpenFrame=null,this.panelOpen()&&this.panelRendered()&&this.panelExpanded.set(!0)}):this.panelExpanded.set(!0),this.loadSidePanelData()}else if(this.panelInitialized()){this.panelOpenFrame!==null&&(window.cancelAnimationFrame(this.panelOpenFrame),this.panelOpenFrame=null);let e=this.panelExpanded();this.panelExpanded.set(!1),(!e||!this.panelAnimationsEnabled())&&this.panelRendered.set(!1)}}onPanelTransitionEnd(t){t.target!==t.currentTarget||t.propertyName!=="width"||this.panelOpen()||this.panelRendered.set(!1)}panelAnimationsEnabled(){return typeof matchMedia>"u"||!matchMedia("(prefers-reduced-motion: reduce)").matches}loadSidePanelData(){this.panelSub?.unsubscribe(),this.panelLoading.set(!0),this.panelSub=al({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(ot(()=>we([])))}).subscribe({next:({stashes:t,worktrees:e,tags:i})=>{this.stashes.set(t),this.worktrees.set(e),this.tags.set(i),this.panelLoading.set(!1)},error:t=>{this.panelLoading.set(!1),this.error.set(this.errorMessage(t))}}),this.loadPullRequests()}loadPullRequests(){if(!this.hasAzureUrl()){this.pullRequests.set(null),this.pullRequestsError.set("");return}this.prListSub?.unsubscribe(),this.prListSub=this.git.getMyPullRequests().subscribe({next:t=>{this.pullRequests.set(t),this.pullRequestsError.set("")},error:t=>{this.pullRequests()===null&&this.pullRequests.set([]),this.pullRequestsError.set(this.errorMessage(t))}})}openPrDetail(t){this.prDetailId.set(t)}closePrDetail(){this.prDetailId.set(null),this.loadPullRequests()}refresh(t=!1){this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.filterFailed.set(!1),this.statusLoading.set(!0),this.historyLoading.set(!1),this.loading.set(!0),this.error.set(""),this.refreshSub?.unsubscribe(),this.refreshSub=al({history:this.git.getCommits(t?Math.max(va,this.commits().length):va),repositoryState:this.git.getRepositoryState().pipe(ot(()=>we(null))),branches:this.git.getAllBranches(),repo:this.git.getRepoInfo(),settings:this.git.getSettings().pipe(ot(()=>we(null))),stashes:this.git.getStashes().pipe(ot(()=>we([]))),working:this.git.getWorkingChanges().pipe(ot(e=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),we(null))))}).subscribe({next:({history:e,repositoryState:i,branches:r,repo:o,settings:s,stashes:a,working:l})=>{this.commits.set(e.commits),this.totalCommits.set(Math.max(e.total,e.commits.length)),i&&(this.lastRepositoryState=i),this.branches.set(r),this.repoName.set(o.name),this.identity.set(o.identity??{name:"",email:""}),this.stashes.set(a);let d=this.selectedBranches();if(d.length){let y=new Set(r.map(D=>D.name)),w=d.filter(D=>y.has(D));w.length!==d.length&&this.selectedBranches.set(w)}let m=this.selectedCommit();if(m&&m.hash!==yn){let y=e.commits.find(w=>w.hash===m.hash);y&&this.selectedCommit.set(G(G({},m),y))}s&&this.applySettings(s,!1),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(y=>y+1),this.panelOpen()&&this.loadSidePanelData()},error:e=>{this.lastRepositoryState=null,this.error.set(this.errorMessage(e)),this.filterFailed.set(!0),this.statusError.set(this.errorMessage(e)),this.statusLoading.set(!1),this.loading.set(!1)}})}refreshWorking(){this.workingSub?.unsubscribe(),this.statusLoading.set(!0),this.workingSub=this.git.getWorkingChanges().subscribe({next:t=>{this.workingChanges.set(t),this.statusError.set(""),this.statusLoading.set(!1)},error:t=>{this.lastRepositoryState=null,this.statusError.set(this.errorMessage(t)),this.statusLoading.set(!1)}})}changeStage(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||(this.busy.set(!0),this.error.set(""),(t.staged?this.git.unstage(t.files):this.git.stage(t.files)).subscribe({next:()=>{this.refreshWorking(),this.busy.set(!1)},error:e=>{this.error.set(this.errorMessage(e)),this.refreshWorking(),this.busy.set(!1)}}))}stashChanges(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||this.git.stashSave(void 0,t).subscribe({next:()=>this.refresh(),error:e=>this.error.set(this.errorMessage(e))})}discardUnstaged(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||t.length&&(this.pendingDiscard.set(t),this.promptState.set({title:"Discard unstaged changes?",label:t.length===1?`${t[0]} will be discarded. This cannot be undone.`:`${t.length} files will be discarded. This cannot be undone.`,confirmOnly:!0,okLabel:"Discard",danger:!0}))}onPromptCancel(){this.pendingDiscard.set(null),this.promptState.set(null)}commitChanges(){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||!this.commitSubject().trim()||!this.workingChanges()?.staged.length||this.workingChanges()?.conflicted.length||(this.busy.set(!0),this.error.set(""),this.git.commit(this.commitSubject(),this.commitDescription()).subscribe({next:()=>{this.commitSubject.set(""),this.commitDescription.set(""),this.refresh(),this.busy.set(!1)},error:t=>{this.error.set(this.errorMessage(t)),this.refreshWorking(),this.busy.set(!1)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(va,this.commits().length))}loadAllCommits(){this.loadHistory(this.git.getCommits(void 0,this.commits().length))}loadHistory(t){if(this.historyLoading()||this.loading())return;let e=this.commits().length;this.filterFailed.set(!1),this.historyLoading.set(!0),this.historySub?.unsubscribe(),this.historySub=t.subscribe({next:({commits:i,total:r})=>{this.commits().length===e&&(this.commits.update(o=>[...o,...i]),this.totalCommits.set(i.length>0?Math.max(r,this.commits().length):this.commits().length)),this.historyLoading.set(!1)},error:i=>{this.error.set(this.errorMessage(i)),this.filterFailed.set(!0),this.historyLoading.set(!1)}})}fetchBodyMatches(t,e){this.searchSub?.unsubscribe(),this.searchLoading.set(!0),this.searchSub=this.git.searchCommits(t,e).subscribe({next:i=>{this.bodyMatches.set(i.hashes),this.searchHistoryIndices.set(i.indices??{}),this.searchLoading.set(!1)},error:i=>{this.filterFailed.set(!0),this.error.set(this.errorMessage(i)),this.searchLoading.set(!1)}})}navigateSearch(t){let e=this.searchMatches();if(e.length===0)return;let i=this.searchIndex(),r=i<0?t==="next"?0:e.length-1:t==="next"?(i+1)%e.length:(i-1+e.length)%e.length,o=e[r];this.searchFocusHash.set(o),this.pendingSearchHash.set(o)}runRemoteAction(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;if(t==="rebase-from"){this.openRebaseFromDialog();return}if(t==="create-pr"){this.prDialogOpen.set(!0);return}if(t==="push-force"){this.promptState.set({title:"Force push?",label:"This will overwrite the remote branch with your local history. Remote commits missing locally may be lost.",confirmOnly:!0,okLabel:"Force Push",danger:!0});return}this.busy.set(!0),this.error.set(""),(t==="fetch"||t==="fetch-prune"?this.git.fetch(t==="fetch-prune"):t==="pull"?this.git.pull():t==="pull-rebase"?this.git.pull(!0):t==="push"?this.git.push():this.git.sync()).subscribe({next:()=>{this.busy.set(!1),this.refresh()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}})}openRebaseFromDialog(){let t=new Set(this.branches().map(r=>r.name)),e=["origin/main","origin/master"].filter(r=>t.has(r));e.forEach(r=>t.delete(r));let i=[...e,...t];i.length===0&&i.push("origin/main","origin/master"),this.promptState.set({title:"Rebase from branch",label:"Rebase the current branch onto:",options:i.map(r=>({value:r,label:r})),okLabel:"Rebase",searchable:!0})}openSettings(){this.vscode.openSettings()||this.settingsDialogOpen.set(!0)}saveSettings(t){this.settingsSaving.set(!0),this.git.saveSettings(t).subscribe({next:e=>{this.applySettings(e),this.settingsSaving.set(!1),this.settingsDialogOpen.set(!1)},error:e=>{this.settingsSaving.set(!1),this.error.set(this.errorMessage(e))}})}applySettings(t,e=!0){let i=this.azureSettings(),r=i?.refListView==="tree"?"tree":"flat",o=t.refListView==="tree"?"tree":"flat",s=i?.sidePanelSectionsExpanded!==!1,a=t.sidePanelSectionsExpanded!==!1;this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),e&&i!==null&&(r!==o||s!==a)&&(this.panelInitialized()&&this.panelRenderVersion.update(l=>l+1),this.panelOpen()&&this.loadSidePanelData())}onPrCreated(){this.refresh()}onContextMenu(t){if(t.target.kind==="tag"&&!t.target.commit){let i=this.taggedCommit(t.target.branch?.name??"");i&&(t.target=oe(G({},t.target),{commit:i}))}let e=[];if(t.target.kind==="commit")e.push({label:"Add Tag...",action:"add-tag"}),e.push({label:"Create Branch...",action:"create-branch"}),e.push({separator:!0}),e.push({label:"Checkout...",action:"checkout-commit"}),e.push({label:"Cherry Pick...",action:"cherry-pick"}),e.push({label:"Revert...",action:"revert-commit",danger:!0}),e.push({label:"Drop...",action:"drop-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Merge into current branch...",action:"merge-commit"}),e.push({label:"Rebase current branch on this Commit...",action:"rebase-commit"}),e.push({label:"Reset current branch to this Commit...",action:"reset-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Commit Hash to Clipboard",action:"copy-hash"}),e.push({label:"Copy Commit Subject to Clipboard",action:"copy-subject"});else if(t.target.kind==="tag")e.push({label:"View Details",action:"tag-details"}),e.push({separator:!0}),e.push({label:"Delete Tag...",action:"tag-delete",danger:!0}),e.push({label:"Push Tag...",action:"tag-push"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Copy Tag Name to Clipboard",action:"copy-tag-name"});else if(t.target.kind==="branch"){let i=t.target.branch.type,r=i==="head"||i==="local";e.push({label:"Checkout Branch...",action:"checkout-branch"}),r&&(e.push({label:"Rename Branch...",action:"rename-branch"}),e.push({label:"Delete Branch...",action:"delete-branch",danger:!0,disabled:i==="head"})),e.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),e.push({label:"Merge into current branch...",action:"merge-branch"}),e.push({label:"Pull into current branch...",action:"pull-branch"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Unselect in Branches Dropdown",action:"unselect-branch"}),e.push({separator:!0}),e.push({label:"Copy Branch Name to Clipboard",action:"copy-branch-name"})}else t.target.kind==="stash"?(e.push({label:"Apply Stash",action:"stash-apply"}),e.push({label:"Pop Stash",action:"stash-pop"}),e.push({separator:!0}),e.push({label:"Drop Stash...",action:"stash-drop",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Stash Name to Clipboard",action:"copy-stash-name"})):t.target.kind==="worktree"?(e.push({label:"Switch Current Tab",action:"switch-worktree",disabled:t.target.worktree?.current||t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open as New Tab",action:"open-worktree-tab",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open in New VS Code Window",action:"open-worktree-window",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({separator:!0}),e.push({label:"Delete Worktree...",action:"delete-worktree",danger:!0,disabled:t.target.worktree?.current||t.target.worktree?.bare}),e.push({separator:!0}),e.push({label:"Copy Worktree Path to Clipboard",action:"copy-worktree-path"})):(e.push({label:"Stash uncommitted changes...",action:"stash-working"}),e.push({label:"Reset uncommitted changes...",action:"reset-working",danger:!0}),e.push({label:"Clean untracked files...",action:"clean-untracked",danger:!0}),e.push({separator:!0}),e.push({label:"Open Source Control View",action:"open-source-control"}));this.contextMenuTarget.set(t.target),this.contextMenuState.set({x:t.x,y:t.y,items:e})}taggedCommit(t){if(!t)return;let e=this.tags().find(i=>i.name===t);return e?this.commitIndex().get(e.hash):void 0}selectTag(t){this.pendingSearchHash.set(t.hash)}selectStash(t){this.selectedCommit.set({hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]})}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}createWorktree(t){this.busy()||this.mutationBusy()||this.statusLoading()||(this.worktreeDialogError.set(""),this.git.createWorktree(t.path,t.branch).subscribe({next:()=>{this.worktreeDialogOpen.set(!1),this.loadSidePanelData()},error:e=>this.worktreeDialogError.set(this.errorMessage(e))}))}onContextAction(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let e=this.contextMenuTarget()?.commit??this.selectedCommit();switch(t){case"add-tag":this.promptState.set({title:"Add Tag",label:"Tag name",placeholder:"v1.0.0",okLabel:"Add Tag"});break;case"create-branch":this.promptState.set({title:"Create Branch",label:"Branch name",placeholder:"feature/my-branch",okLabel:"Create Branch"});break;case"checkout-commit":e&&this.git.checkout(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"cherry-pick":e&&this.git.cherryPick(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"open-commit":this.selectedCommit()===null&&this.selectedCommit.set(this.commits()[0]??null);break;case"copy-hash":e&&navigator.clipboard?.writeText(e.hash);break;case"copy-subject":e&&navigator.clipboard?.writeText(e.message);break;case"view-commit-diff":e&&this.selectedCommit.set(e);break;case"revert-commit":e&&this.git.revert(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"drop-commit":this.promptState.set({title:"Drop commit?",label:"This will reset the current branch to the commit before it.",confirmOnly:!0,okLabel:"Drop",danger:!0});break;case"merge-commit":e&&this.git.merge(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"rebase-commit":e&&this.git.rebase(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"reset-commit":this.promptState.set({title:"Reset current branch to this commit?",label:"Choose the reset type:",options:[{value:"soft",label:"Soft",description:"Keep all changes staged"},{value:"mixed",label:"Mixed",description:"Keep changes, but unstage them"},{value:"hard",label:"Hard",description:"Discard all changes",danger:!0}],okLabel:"Reset",danger:!0});break;case"checkout-branch":this.contextMenuTarget()?.branch?.name&&this.git.checkout(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"delete-remote-branch":{let i=this.contextMenuTarget()?.branch?.name??"",r=i.indexOf("/");r>0&&this.git.deleteRemoteBranch(i.slice(0,r),i.slice(r+1)).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});break}case"merge-branch":this.contextMenuTarget()?.branch?.name&&this.git.merge(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"pull-branch":this.git.pull().subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"create-archive":{let i=this.contextMenuTarget(),r=i?.kind==="tag"?i.branch?.name:i?.commit?.hash;r&&window.open(Ey(`/api/archive?ref=${encodeURIComponent(r)}`),"_blank");break}case"tag-details":this.contextMenuTarget()?.commit&&this.selectedCommit.set(this.contextMenuTarget().commit);break;case"tag-delete":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Delete tag?",label:`This will delete the tag "${i}".`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"tag-push":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Push tag?",label:`This will push the tag "${i}" to the remote.`,confirmOnly:!0,okLabel:"Push"});break}case"copy-tag-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"unselect-branch":this.selectedBranches.set([]);break;case"stash-apply":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashApply(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-pop":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashPop(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-drop":{let i=this.contextMenuTarget()?.stash;i&&this.promptState.set({title:"Drop stash?",label:`This will permanently drop stash@{${i.index}}.`,confirmOnly:!0,okLabel:"Drop",danger:!0});break}case"copy-stash-name":{let i=this.contextMenuTarget()?.stash;i&&navigator.clipboard?.writeText(`stash@{${i.index}}`);break}case"copy-worktree-path":{let i=this.contextMenuTarget()?.worktree?.path;i&&navigator.clipboard?.writeText(i);break}case"switch-worktree":{let i=this.contextMenuTarget()?.worktree;i&&this.openWorktree(i);break}case"open-worktree-tab":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepository(i.path);break}case"open-worktree-window":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepositoryWindow(i.path);break}case"delete-worktree":{let i=this.contextMenuTarget()?.worktree;i&&!i.current&&!i.bare&&this.promptState.set({title:"Delete worktree?",label:`This will remove the worktree folder "${i.path}". Git will refuse if it contains uncommitted changes.`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"copy-branch-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"rename-branch":this.promptState.set({title:"Rename branch",label:"New branch name",placeholder:"feature/my-branch",value:this.contextMenuTarget()?.branch?.name,okLabel:"Rename"});break;case"delete-branch":this.promptState.set({title:"Delete branch?",label:"This will delete the local branch.",confirmOnly:!0,okLabel:"Delete",danger:!0});break;case"open-working":this.selectedCommit.set({hash:yn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]});break;case"stash-working":this.promptState.set({title:"Stash uncommitted changes",label:"Stash message (optional)",placeholder:"WIP",allowEmpty:!0,okLabel:"Stash"});break;case"reset-working":this.promptState.set({title:"Reset uncommitted changes?",label:"Tracked changes will be discarded. Untracked files will remain.",confirmOnly:!0,okLabel:"Reset",danger:!0});break;case"clean-untracked":this.promptState.set({title:"Clean untracked files?",label:"Untracked files will be permanently deleted.",confirmOnly:!0,okLabel:"Clean",danger:!0});break;case"discard-working":this.git.getWorkingChanges().subscribe({next:i=>{let r=[...i.files.map(o=>o.path),...i.untracked];r.length>0&&this.git.discard(r).subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))})},error:i=>this.error.set(this.errorMessage(i))});break;case"refresh-status":this.refresh();break;case"open-source-control":window.open("vscode://command/workbench.view.scm","_blank");break;default:break}this.contextMenuState.set(null)}openWorktree(t){t.bare||this.vscode.switchRepository(t.path)}onPromptConfirm(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let e=this.promptState();if(!e)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(e.title==="Add Tag"&&i){this.git.createTag(t,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Create Branch"&&i){this.git.createBranch(t,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Drop commit?"&&i){this.git.dropCommit(i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Reset current branch to this commit?"&&i){let r=t==="soft"||t==="mixed"?t:"hard";this.git.resetToCommit(i.hash,r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Delete tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteTag(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Delete worktree?"){let r=this.contextMenuTarget()?.worktree;r&&!r.current&&!r.bare&&this.git.removeWorktree(r.path).subscribe({next:()=>this.loadSidePanelData(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Push tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.pushTag(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Force push?"){this.git.push(!0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Discard unstaged changes?"){let r=this.pendingDiscard();this.pendingDiscard.set(null),r?.length&&this.git.discard(r,"unstaged").subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Stash uncommitted changes"){this.git.stashSave(t||void 0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Reset uncommitted changes?"){this.git.resetWorking().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Clean untracked files?"){this.git.cleanUntracked().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Rename branch"){let r=this.contextMenuTarget()?.branch?.name,o=t.trim();r&&o&&o!==r&&this.git.renameBranch(r,o).subscribe({next:()=>{this.selectedBranches.update(s=>s.map(a=>a===r?o:a)),this.refresh()},error:s=>this.error.set(this.errorMessage(s))});return}if(e.title==="Delete branch?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteBranch(r).subscribe({next:()=>{this.selectedBranches.update(o=>o.filter(s=>s!==r)),this.refresh()},error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Drop stash?"){let r=this.contextMenuTarget()?.stash?.index;r!==void 0&&this.git.stashDrop(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Rebase from branch"){let r=t.trim();r&&this.git.rebase(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}}ancestorsOf(t){let e=this.commitIndex(),i=new Set,r=[t];for(;r.length;){let o=r.pop();if(i.has(o))continue;i.add(o);let s=e.get(o);s&&r.push(...s.parents)}return i}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-root"]],hostBindings:function(e,i){e&1&&E("focus",function(){return i.checkRepository()},bf)("visibilitychange",function(){return i.checkRepository()},Qe)},decls:15,vars:32,consts:[[1,"app"],[3,"menuToggle","refresh","remoteAction","settingsClick","searchChange","searchNavigate","busy","prEnabled","panelOpen","matchIndex","matchCount","filterMode"],["retryLabel","Retry",3,"message","busy"],["retryLabel","Retry status",3,"message","busy"],[1,"content-row"],[1,"content"],[3,"commitClick","contextMenu","loadMoreRequested","loadAllRequested","identity","commits","loadingLabel","selectedHash","search","showGraph","selectedBranches","showRemote","workingChanges","stashes","showStashes","showTags","issueLinking","unloaded","historyLoading","scrollToHash"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"branches","worktrees","busy","error"],[3,"branches"],[3,"prId","settings"],[3,"settings","identity","saving"],["retryLabel","Retry",3,"retry","message","busy"],["retryLabel","Retry status",3,"retry","message","busy"],[3,"panel-open","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"transitionend","transitioncancel","branchChange","tagSelect","stashSelect","contextMenu","worktreeCreate","worktreeOpen","prSelect","prRefresh","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","branches","busy","statusLoading","statusError","subject","description","fileListView"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","stageChange","stashChange","discardRequest","commitRequested","conflictResolved","retry","closed","changes","branches","busy","statusLoading","statusError","subject","description","fileListView"],[3,"closed","commit","fileListView","issueLinking"],[3,"created","closed","branches","worktrees","busy","error"],[3,"closed","created","branches"],[3,"changed","closed","prId","settings"],[3,"saved","settingsUpdated","identityChanged","repositoryChanged","closed","settings","identity","saving"]],template:function(e,i){if(e&1&&(f(0,"div",0)(1,"app-toolbar",1),E("menuToggle",function(){return i.toggleSidePanel()})("refresh",function(){return i.refresh()})("remoteAction",function(o){return i.runRemoteAction(o)})("settingsClick",function(){return i.openSettings()})("searchChange",function(o){return i.search.set(o)})("searchNavigate",function(o){return i.navigateSearch(o)}),h(),S(2,bA,1,2,"app-error-banner",2),S(3,yA,1,2,"app-error-banner",3),f(4,"div",4),S(5,xA,2,2),f(6,"main",5)(7,"app-commit-table",6),E("commitClick",function(o){return i.selectedCommit.set(o)})("contextMenu",function(o){return i.onContextMenu(o)})("loadMoreRequested",function(){return i.loadMoreCommits()})("loadAllRequested",function(){return i.loadAllCommits()}),h(),S(8,DA,2,1),h()(),f(9,"app-context-menu",7),E("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),h(),f(10,"app-prompt-dialog",8),E("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),h(),S(11,SA,1,4,"app-worktree-dialog",9),S(12,TA,1,1,"app-create-pr-dialog",10),S(13,MA,1,2,"app-pr-dialog",11),S(14,kA,1,3,"app-settings-dialog",12),h()),e&2){let r,o,s,a,l;c(),k("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),c(),T(i.error()?2:-1),c(),T(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),c(2),T(i.panelInitialized()?5:-1),c(2),k("identity",i.identity())("commits",i.displayedCommits())("loadingLabel",i.tableLoading())("selectedHash",((o=i.selectedCommit())==null?null:o.hash)??"")("search",i.search())("showGraph",i.showGraph()&&!i.filterSearch())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("workingChanges",i.workingChanges())("stashes",i.stashes())("showStashes",i.showStashes())("showTags",i.showTags())("issueLinking",i.issueLinking())("unloaded",i.unloadedCommits())("historyLoading",i.historyLoading())("scrollToHash",i.scrollRequest()),c(),T((s=i.selectedCommit())?8:-1,s),c(),k("menu",i.contextMenuState()),c(),k("state",i.promptState()),c(),T(i.worktreeDialogOpen()?11:-1),c(),T(i.prDialogOpen()?12:-1),c(),T((a=i.prDetailId())?13:-1,a),c(),T((l=i.settingsDialogOpen()&&i.azureSettings())?14:-1,l)}},dependencies:[at,Md,wd,ld,Xc,Mo,Io,Dd,cd,dd,yd,Sd],styles:[".app[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh;overflow:hidden}.content-row[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0}.content[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;min-height:0}.loading-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#1e1e1e8c;z-index:100}.spinner[_ngcontent-%COMP%]{width:28px;height:28px;border:3px solid rgba(255,255,255,.15);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"],changeDetection:0})};Oh(kd,Dy).catch(n=>console.error(n));