guito 1.0.2 → 1.0.3

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.
@@ -1,65 +0,0 @@
1
- var JC=Object.defineProperty,ex=Object.defineProperties;var tx=Object.getOwnPropertyDescriptors;var $m=Object.getOwnPropertySymbols;var nx=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable;var Hm=(n,e,t)=>e in n?JC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,U=(n,e)=>{for(var t in e||={})nx.call(e,t)&&Hm(n,t,e[t]);if($m)for(var t of $m(e))ix.call(e,t)&&Hm(n,t,e[t]);return n},se=(n,e)=>ex(n,tx(e));var En=(n,e,t)=>new Promise((i,r)=>{var o=l=>{try{a(t.next(l))}catch(c){r(c)}},s=l=>{try{a(t.throw(l))}catch(c){r(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(n,e)).next())});var $d;function xa(){return $d}function Dn(n){let e=$d;return $d=n,e}var Um=Symbol("NotFound");function Dr(n){return n===Um||n?.name==="\u0275NotFound"}var pt=null,wa=!1,Hd=1,rx=null,rt=Symbol("SIGNAL");function ne(n){let e=pt;return pt=n,e}function Ta(){return pt}var Di={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 Si(n){if(wa)throw new Error("");if(pt===null)return;pt.consumerOnSignalRead(n);let e=pt.producersTail;if(e!==void 0&&e.producer===n)return;let t,i=pt.recomputing;if(i&&(t=e!==void 0?e.nextProducer:pt.producers,t!==void 0&&t.producer===n)){pt.producersTail=t,t.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===pt&&(!i||sx(r,pt)))return;let o=Sr(pt),s={producer:n,consumer:pt,nextProducer:t,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};pt.producersTail=s,e!==void 0?e.nextProducer=s:pt.producers=s,o&&qm(n,s)}function zm(){Hd++}function Ma(n){if(!(Sr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===Hd)){if(!n.producerMustRecompute(n)&&!Mi(n)){Sa(n);return}n.producerRecomputeValue(n),Sa(n)}}function Ud(n){if(n.consumers===void 0)return;let e=wa;wa=!0;try{for(let t=n.consumers;t!==void 0;t=t.nextConsumer){let i=t.consumer;i.dirty||ox(i)}}finally{wa=e}}function zd(){return pt?.consumerAllowSignalWrites!==!1}function ox(n){n.dirty=!0,Ud(n),n.consumerMarkedDirty?.(n)}function Sa(n){n.dirty=!1,n.lastCleanEpoch=Hd}function Qn(n){return n&&Gm(n),ne(n)}function Gm(n){n.producersTail=void 0,n.recomputing=!0}function Ti(n,e){ne(e),n&&Wm(n)}function Wm(n){n.recomputing=!1;let e=n.producersTail,t=e!==void 0?e.nextProducer:n.producers;if(t!==void 0){if(Sr(n))do t=Gd(t);while(t!==void 0);e!==void 0?e.nextProducer=void 0:n.producers=void 0}}function Mi(n){for(let e=n.producers;e!==void 0;e=e.nextProducer){let t=e.producer,i=e.lastReadVersion;if(i!==t.version||(Ma(t),i!==t.version))return!0}return!1}function Kn(n){if(Sr(n)){let e=n.producers;for(;e!==void 0;)e=Gd(e)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function qm(n,e){let t=n.consumersTail,i=Sr(n);if(t!==void 0?(e.nextConsumer=t.nextConsumer,t.nextConsumer=e):(e.nextConsumer=void 0,n.consumers=e),e.prevConsumer=t,n.consumersTail=e,!i)for(let r=n.producers;r!==void 0;r=r.nextProducer)qm(r.producer,r)}function Gd(n){let e=n.producer,t=n.nextProducer,i=n.nextConsumer,r=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,i!==void 0?i.prevConsumer=r:e.consumersTail=r,r!==void 0)r.nextConsumer=i;else if(e.consumers=i,!Sr(e)){let o=e.producers;for(;o!==void 0;)o=Gd(o)}return t}function Sr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function Ia(n){rx?.(n)}function sx(n,e){let t=e.producersTail;if(t!==void 0){let i=e.producers;do{if(i===n)return!0;if(i===t)break;i=i.nextProducer}while(i!==void 0)}return!1}function ka(n,e){return Object.is(n,e)}function Oo(n,e){let t=Object.create(ax);t.computation=n,e!==void 0&&(t.equal=e);let i=()=>{if(Ma(t),Si(t),t.value===Po)throw t.error;return t.value};return i[rt]=t,Ia(t),i}var Ea=Symbol("UNSET"),Da=Symbol("COMPUTING"),Po=Symbol("ERRORED"),ax=se(U({},Di),{value:Ea,dirty:!0,error:null,equal:ka,kind:"computed",producerMustRecompute(n){return n.value===Ea||n.value===Da},producerRecomputeValue(n){if(n.value===Da)throw new Error("");let e=n.value;n.value=Da;let t=Qn(n),i,r=!1;try{i=n.computation(),ne(null),r=e!==Ea&&e!==Po&&i!==Po&&n.equal(e,i)}catch(o){i=Po,n.error=o}finally{Ti(n,t)}if(r){n.value=e;return}n.value=i,n.version++}});function lx(){throw new Error}var Zm=lx;function Ym(n){Zm(n)}function Wd(n){Zm=n}var cx=null;function qd(n,e){let t=Object.create(Ro);t.value=n,e!==void 0&&(t.equal=e);let i=()=>Qm(t);return i[rt]=t,Ia(t),[i,s=>Tr(t,s),s=>Zd(t,s)]}function Qm(n){return Si(n),n.value}function Tr(n,e){zd()||Ym(n),n.equal(n.value,e)||(n.value=e,dx(n))}function Zd(n,e){zd()||Ym(n),Tr(n,e(n.value))}var Ro=se(U({},Di),{equal:ka,value:void 0,kind:"signal"});function dx(n){n.version++,zm(),Ud(n),cx?.(n)}function fe(n){return typeof n=="function"}function Mr(n){let t=n(i=>{Error.call(i),i.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Pa=Mr(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:
2
- ${t.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
3
- `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Ii(n,e){if(n){let t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Ve=class n{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:i}=this;if(fe(i))try{i()}catch(o){e=o instanceof Pa?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{Km(o)}catch(s){e=e??[],s instanceof Pa?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Pa(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Km(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Ii(t,e)}remove(e){let{_finalizers:t}=this;t&&Ii(t,e),e instanceof n&&e._removeParent(this)}};Ve.EMPTY=(()=>{let n=new Ve;return n.closed=!0,n})();var Yd=Ve.EMPTY;function Oa(n){return n instanceof Ve||n&&"closed"in n&&fe(n.remove)&&fe(n.add)&&fe(n.unsubscribe)}function Km(n){fe(n)?n():n.unsubscribe()}var rn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ir={setTimeout(n,e,...t){let{delegate:i}=Ir;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){let{delegate:e}=Ir;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Ra(n){Ir.setTimeout(()=>{let{onUnhandledError:e}=rn;if(e)e(n);else throw n})}function No(){}var Xm=Qd("C",void 0,void 0);function Jm(n){return Qd("E",void 0,n)}function eg(n){return Qd("N",n,void 0)}function Qd(n,e,t){return{kind:n,value:e,error:t}}var ki=null;function kr(n){if(rn.useDeprecatedSynchronousErrorHandling){let e=!ki;if(e&&(ki={errorThrown:!1,error:null}),n(),e){let{errorThrown:t,error:i}=ki;if(ki=null,t)throw i}}else n()}function tg(n){rn.useDeprecatedSynchronousErrorHandling&&ki&&(ki.errorThrown=!0,ki.error=n)}var Pi=class extends Ve{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Oa(e)&&e.add(this)):this.destination=fx}static create(e,t,i){return new on(e,t,i)}next(e){this.isStopped?Xd(eg(e),this):this._next(e)}error(e){this.isStopped?Xd(Jm(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Xd(Xm,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},ux=Function.prototype.bind;function Kd(n,e){return ux.call(n,e)}var Jd=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){Na(i)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){Na(i)}else Na(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Na(t)}}},on=class extends Pi{constructor(e,t,i){super();let r;if(fe(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&rn.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Kd(e.next,o),error:e.error&&Kd(e.error,o),complete:e.complete&&Kd(e.complete,o)}):r=e}this.destination=new Jd(r)}};function Na(n){rn.useDeprecatedSynchronousErrorHandling?tg(n):Ra(n)}function px(n){throw n}function Xd(n,e){let{onStoppedNotification:t}=rn;t&&Ir.setTimeout(()=>t(n,e))}var fx={closed:!0,next:No,error:px,complete:No};var Pr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Or(n){return n}function ng(n){return n.length===0?Or:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var le=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){let i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){let o=mx(t)?t:new on(t,i,r);return kr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return i=ig(i),new i((r,o)=>{let s=new on({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(t)}[Pr](){return this}pipe(...t){return ng(t)(this)}toPromise(t){return t=ig(t),new t((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function ig(n){var e;return(e=n??rn.Promise)!==null&&e!==void 0?e:Promise}function hx(n){return n&&fe(n.next)&&fe(n.error)&&fe(n.complete)}function mx(n){return n&&n instanceof Pi||hx(n)&&Oa(n)}function eu(n){return fe(n?.lift)}function be(n){return e=>{if(eu(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function xe(n,e,t,i,r){return new tu(n,e,t,i,r)}var tu=class extends Pi{constructor(e,t,i,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function rg(){return be((n,e)=>{let t=null;n._refCount++;let i=xe(e,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){t=null;return}let r=n._connection,o=t;t=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});n.subscribe(i),i.closed||(t=n.connect())})}var Ao=class extends le{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,eu(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ve;let t=this.getSubject();e.add(this.source.subscribe(xe(t,void 0,()=>{this._teardown(),t.complete()},i=>{this._teardown(),t.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ve.EMPTY)}return e}refCount(){return rg()(this)}};var Rr={schedule(n){let e=requestAnimationFrame,t=cancelAnimationFrame,{delegate:i}=Rr;i&&(e=i.requestAnimationFrame,t=i.cancelAnimationFrame);let r=e(o=>{t=void 0,n(o)});return new Ve(()=>t?.(r))},requestAnimationFrame(...n){let{delegate:e}=Rr;return(e?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:e}=Rr;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var og=Mr(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var $e=(()=>{class n extends le{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let i=new Aa(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new og}next(t){kr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(t)}})}error(t){kr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){kr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:i,isStopped:r,observers:o}=this;return i||r?Yd:(this.currentObservers=null,o.push(t),new Ve(()=>{this.currentObservers=null,Ii(o,t)}))}_checkFinalizedStatuses(t){let{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){let t=new le;return t.source=this,t}}return n.create=(e,t)=>new Aa(e,t),n})(),Aa=class extends $e{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.next)===null||i===void 0||i.call(t,e)}error(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.error)===null||i===void 0||i.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,i;return(i=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&i!==void 0?i:Yd}};var Lo=class extends $e{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}};var Fo={now(){return(Fo.delegate||Date).now()},delegate:void 0};var Oi=class extends $e{constructor(e=1/0,t=1/0,i=Fo){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;t||(i.push(e),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!e.closed;s+=i?1:2)e.next(o[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*e;if(e<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=t.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}};var La=class extends Ve{constructor(e,t){super()}schedule(e,t=0){return this}};var Vo={setInterval(n,e,...t){let{delegate:i}=Vo;return i?.setInterval?i.setInterval(n,e,...t):setInterval(n,e,...t)},clearInterval(n){let{delegate:e}=Vo;return(e?.clearInterval||clearInterval)(n)},delegate:void 0};var Xn=class extends La{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var i;if(this.closed)return this;this.state=e;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,t),this}requestAsyncId(e,t,i=0){return Vo.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return t;t!=null&&Vo.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(e,t);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i=!1,r;try{this.work(e)}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:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ii(i,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}};var gx=1,nu,iu={};function sg(n){return n in iu?(delete iu[n],!0):!1}var ag={setImmediate(n){let e=gx++;return iu[e]=!0,nu||(nu=Promise.resolve()),nu.then(()=>sg(e)&&n()),e},clearImmediate(n){sg(n)}};var{setImmediate:_x,clearImmediate:vx}=ag,Bo={setImmediate(...n){let{delegate:e}=Bo;return(e?.setImmediate||_x)(...n)},clearImmediate(n){let{delegate:e}=Bo;return(e?.clearImmediate||vx)(n)},delegate:void 0};var Fa=class extends Xn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return i!==null&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=Bo.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Bo.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))}};var Nr=class n{constructor(e,t=n.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}};Nr.now=Fo.now;var Jn=class extends Nr{constructor(e,t=Nr.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}};var Va=class extends Jn{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:i}=this,r;e=e||i.shift();do if(r=e.execute(e.state,e.delay))break;while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}};var ru=new Va(Fa);var jo=new Jn(Xn),lg=jo;var Ba=class extends Xn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return i!==null&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=Rr.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);let{actions:o}=e;t!=null&&t===e._scheduled&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Rr.cancelAnimationFrame(t),e._scheduled=void 0)}};var ja=class extends Jn{flush(e){this._active=!0;let t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);let{actions:i}=this,r;e=e||i.shift();do if(r=e.execute(e.state,e.delay))break;while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}};var ou=new ja(Ba);function $a(n){return n&&fe(n.schedule)}function cg(n){return n[n.length-1]}function dg(n){return fe(cg(n))?n.pop():void 0}function Ar(n){return $a(cg(n))?n.pop():void 0}function pg(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(m){try{c(i.next(m))}catch(b){s(b)}}function l(m){try{c(i.throw(m))}catch(b){s(b)}}function c(m){m.done?o(m.value):r(m.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}function ug(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.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(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ri(n){return this instanceof Ri?(this.v=n,this):new Ri(n)}function fg(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),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(E){return function(P){return Promise.resolve(P).then(E,b)}}function a(E,P){i[E]&&(r[E]=function(B){return new Promise(function(W,j){o.push([E,B,W,j])>1||l(E,B)})},P&&(r[E]=P(r[E])))}function l(E,P){try{c(i[E](P))}catch(B){w(o[0][3],B)}}function c(E){E.value instanceof Ri?Promise.resolve(E.value.v).then(m,b):w(o[0][2],E)}function m(E){l("next",E)}function b(E){l("throw",E)}function w(E,P){E(P),o.shift(),o.length&&l(o[0][0],o[0][1])}}function hg(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof ug=="function"?ug(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Ha=n=>n&&typeof n.length=="number"&&typeof n!="function";function Ua(n){return fe(n?.then)}function za(n){return fe(n[Pr])}function Ga(n){return Symbol.asyncIterator&&fe(n?.[Symbol.asyncIterator])}function Wa(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 bx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var qa=bx();function Za(n){return fe(n?.[qa])}function Ya(n){return fg(this,arguments,function*(){let t=n.getReader();try{for(;;){let{value:i,done:r}=yield Ri(t.read());if(r)return yield Ri(void 0);yield yield Ri(i)}}finally{t.releaseLock()}})}function Qa(n){return fe(n?.getReader)}function Re(n){if(n instanceof le)return n;if(n!=null){if(za(n))return yx(n);if(Ha(n))return Cx(n);if(Ua(n))return xx(n);if(Ga(n))return mg(n);if(Za(n))return wx(n);if(Qa(n))return Ex(n)}throw Wa(n)}function yx(n){return new le(e=>{let t=n[Pr]();if(fe(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Cx(n){return new le(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function xx(n){return new le(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Ra)})}function wx(n){return new le(e=>{for(let t of n)if(e.next(t),e.closed)return;e.complete()})}function mg(n){return new le(e=>{Dx(n,e).catch(t=>e.error(t))})}function Ex(n){return mg(Ya(n))}function Dx(n,e){var t,i,r,o;return pg(this,void 0,void 0,function*(){try{for(t=hg(n);i=yield t.next(),!i.done;){let s=i.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Ut(n,e,t,i=0,r=!1){let o=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function Ka(n,e=0){return be((t,i)=>{t.subscribe(xe(i,r=>Ut(i,n,()=>i.next(r),e),()=>Ut(i,n,()=>i.complete(),e),r=>Ut(i,n,()=>i.error(r),e)))})}function Xa(n,e=0){return be((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function gg(n,e){return Re(n).pipe(Xa(e),Ka(e))}function _g(n,e){return Re(n).pipe(Xa(e),Ka(e))}function vg(n,e){return new le(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function bg(n,e){return new le(t=>{let i;return Ut(t,e,()=>{i=n[qa](),Ut(t,e,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>fe(i?.return)&&i.return()})}function Ja(n,e){if(!n)throw new Error("Iterable cannot be null");return new le(t=>{Ut(t,e,()=>{let i=n[Symbol.asyncIterator]();Ut(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function yg(n,e){return Ja(Ya(n),e)}function Cg(n,e){if(n!=null){if(za(n))return gg(n,e);if(Ha(n))return vg(n,e);if(Ua(n))return _g(n,e);if(Ga(n))return Ja(n,e);if(Za(n))return bg(n,e);if(Qa(n))return yg(n,e)}throw Wa(n)}function el(n,e){return e?Cg(n,e):Re(n)}function we(...n){let e=Ar(n);return el(n,e)}function su(n,e){let t=fe(n)?n:()=>n,i=r=>r.error(t());return new le(e?r=>e.schedule(i,0,r):i)}function $o(n){return!!n&&(n instanceof le||fe(n.lift)&&fe(n.subscribe))}var xg=Mr(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function tl(n,e){let t=typeof e=="object";return new Promise((i,r)=>{let o=new on({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new xg)}});n.subscribe(o)})}function wg(n){return n instanceof Date&&!isNaN(n)}function Ge(n,e){return be((t,i)=>{let r=0;t.subscribe(xe(i,o=>{i.next(n.call(e,o,r++))}))})}var{isArray:Sx}=Array;function Tx(n,e){return Sx(e)?n(...e):n(e)}function Eg(n){return Ge(e=>Tx(n,e))}var{isArray:Mx}=Array,{getPrototypeOf:Ix,prototype:kx,keys:Px}=Object;function Dg(n){if(n.length===1){let e=n[0];if(Mx(e))return{args:e,keys:null};if(Ox(e)){let t=Px(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function Ox(n){return n&&typeof n=="object"&&Ix(n)===kx}function Sg(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function Tg(n,e,t,i,r,o,s,a){let l=[],c=0,m=0,b=!1,w=()=>{b&&!l.length&&!c&&e.complete()},E=B=>c<i?P(B):l.push(B),P=B=>{o&&e.next(B),c++;let W=!1;Re(t(B,m++)).subscribe(xe(e,j=>{r?.(j),o?E(j):e.next(j)},()=>{W=!0},void 0,()=>{if(W)try{for(c--;l.length&&c<i;){let j=l.shift();s?Ut(e,s,()=>P(j)):P(j)}w()}catch(j){e.error(j)}}))};return n.subscribe(xe(e,E,()=>{b=!0,w()})),()=>{a?.()}}function Lr(n,e,t=1/0){return fe(e)?Lr((i,r)=>Ge((o,s)=>e(i,o,r,s))(Re(n(i,r))),t):(typeof e=="number"&&(t=e),be((i,r)=>Tg(i,r,n,t)))}function Mg(n=1/0){return Lr(Or,n)}function Ig(){return Mg(1)}function au(...n){return Ig()(el(n,Ar(n)))}function lu(n){return new le(e=>{Re(n()).subscribe(e)})}function nl(...n){let e=dg(n),{args:t,keys:i}=Dg(n),r=new le(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let m=0;m<s;m++){let b=!1;Re(t[m]).subscribe(xe(o,w=>{b||(b=!0,c--),a[m]=w},()=>l--,void 0,()=>{(!l||!b)&&(c||o.next(i?Sg(i,a):a),o.complete())}))}});return e?r.pipe(Eg(e)):r}function kg(n=0,e,t=lg){let i=-1;return e!=null&&($a(e)?t=e:i=e),new le(r=>{let o=wg(n)?+n-t.now():n;o<0&&(o=0);let s=0;return t.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function Ho(n,e){return be((t,i)=>{let r=0;t.subscribe(xe(i,o=>n.call(e,o,r++)&&i.next(o)))})}function Pg(n){return be((e,t)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,t.next(c)}s&&t.complete()},l=()=>{o=null,s&&t.complete()};e.subscribe(xe(t,c=>{i=!0,r=c,o||Re(n(c)).subscribe(o=xe(t,a,l))},()=>{s=!0,(!i||!o||o.closed)&&t.complete()}))})}function Uo(n,e=jo){return Pg(()=>kg(n,e))}function ot(n){return be((e,t)=>{let i=null,r=!1,o;i=e.subscribe(xe(t,void 0,void 0,s=>{o=Re(n(s,ot(n)(e))),i?(i.unsubscribe(),i=null,o.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(t))})}function cu(n,e){return fe(e)?Lr(n,e,1):Lr(n,1)}function du(n,e=jo){return be((t,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=s+n,m=e.now();if(m<c){r=this.schedule(void 0,c-m),i.add(r);return}a()}t.subscribe(xe(i,c=>{o=c,s=e.now(),r||(r=e.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function zo(n,e=Or){return n=n??Rx,be((t,i)=>{let r,o=!0;t.subscribe(xe(i,s=>{let a=e(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function Rx(n,e){return n===e}function Fr(n){return be((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}function uu(){return be((n,e)=>{let t,i=!1;n.subscribe(xe(e,r=>{let o=t;t=r,i&&e.next([o,r]),i=!0}))})}function Og(n={}){let{connector:e=()=>new $e,resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,c=0,m=!1,b=!1,w=()=>{a?.unsubscribe(),a=void 0},E=()=>{w(),s=l=void 0,m=b=!1},P=()=>{let B=s;E(),B?.unsubscribe()};return be((B,W)=>{c++,!b&&!m&&w();let j=l=l??e();W.add(()=>{c--,c===0&&!b&&!m&&(a=pu(P,r))}),j.subscribe(W),!s&&c>0&&(s=new on({next:_e=>j.next(_e),error:_e=>{b=!0,w(),a=pu(E,t,_e),j.error(_e)},complete:()=>{m=!0,w(),a=pu(E,i),j.complete()}}),Re(B).subscribe(s))})(o)}}function pu(n,e,...t){if(e===!0){n();return}if(e===!1)return;let i=new on({next:()=>{i.unsubscribe(),n()}});return Re(e(...t)).subscribe(i)}function Vr(n,e,t){let i,r=!1;return n&&typeof n=="object"?{bufferSize:i=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=n:i=n??1/0,Og({connector:()=>new Oi(i,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function il(...n){let e=Ar(n);return be((t,i)=>{(e?au(n,t,e):au(n,t)).subscribe(i)})}function bt(n,e){return be((t,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();t.subscribe(xe(i,l=>{r?.unsubscribe();let c=0,m=o++;Re(n(l,m)).subscribe(r=xe(i,b=>i.next(e?e(l,b,m,c++):b),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ni(n){return be((e,t)=>{Re(n).subscribe(xe(t,()=>t.complete(),No)),!t.closed&&e.subscribe(t)})}function Rg(n){let e=ne(null);try{return n()}finally{ne(e)}}var Ng=se(U({},Di),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Ag(n){if(n.dirty=!1,n.version>0&&!Mi(n))return;n.version++;let e=Qn(n);try{n.cleanup(),n.fn()}finally{Ti(n,e)}}var ll="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Z=class extends Error{code;constructor(e,t){super(ji(e,t)),this.code=e}};function Nx(n){return`NG0${Math.abs(n)}`}function ji(n,e){return`${Nx(n)}${e?": "+e:""}`}var sn=globalThis;function Me(n){for(let e in n)if(n[e]===Me)return e;throw Error("")}function Vg(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function ti(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(ti).join(", ")}]`;if(n==null)return""+n;let e=n.overriddenName||n.name;if(e)return`${e}`;let t=n.toString();if(t==null)return""+t;let i=t.indexOf(`
4
- `);return i>=0?t.slice(0,i):t}function cl(n,e){return n?e?`${n} ${e}`:n:e||""}var Ax=Me({__forward_ref__:Me});function jr(n){return n.__forward_ref__=jr,n.toString=function(){return ti(this())},n}function ft(n){return Bg(n)?n():n}function Bg(n){return typeof n=="function"&&n.hasOwnProperty(Ax)&&n.__forward_ref__===jr}function re(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function dl(n){return Lx(n,ul)}function Lx(n,e){return n.hasOwnProperty(e)&&n[e]||null}function Fx(n){let e=n?.[ul]??null;return e||null}function hu(n){return n&&n.hasOwnProperty(sl)?n[sl]:null}var ul=Me({\u0275prov:Me}),sl=Me({\u0275inj:Me}),ee=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=re({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Du(n){return n&&!!n.\u0275providers}var Su=Me({\u0275cmp:Me}),Tu=Me({\u0275dir:Me}),Mu=Me({\u0275pipe:Me});var mu=Me({\u0275fac:Me}),$i=Me({__NG_ELEMENT_ID__:Me}),Lg=Me({__NG_ENV_ID__:Me});function an(n){return typeof n=="string"?n:n==null?"":String(n)}function jg(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():an(n)}var $g=Me({ngErrorCode:Me}),Vx=Me({ngErrorMessage:Me}),Bx=Me({ngTokenPath:Me});function Iu(n,e){return Hg("",-200,e)}function pl(n,e){throw new Z(-201,!1)}function Hg(n,e,t){let i=new Z(e,n);return i[$g]=e,i[Vx]=n,t&&(i[Bx]=t),i}function jx(n){return n[$g]}var gu;function Ug(){return gu}function Ct(n){let e=gu;return gu=n,e}function ku(n,e,t){let i=dl(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(t&8)return null;if(e!==void 0)return e;pl(n,"Injector")}var $x={},Ai=$x,_u="__NG_DI_FLAG__",vu=class{injector;constructor(e){this.injector=e}retrieve(e,t){let i=Li(t)||0;try{return this.injector.get(e,i&8?null:Ai,i)}catch(r){if(Dr(r))return r;throw r}}};function Hx(n,e=0){let t=xa();if(t===void 0)throw new Z(-203,!1);if(t===null)return ku(n,void 0,e);{let i=Ux(e),r=t.retrieve(n,i);if(Dr(r)){if(i.optional)return null;throw r}return r}}function me(n,e=0){return(Ug()||Hx)(ft(n),e)}function k(n,e){return me(n,Li(e))}function Li(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Ux(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function bu(n){let e=[];for(let t=0;t<n.length;t++){let i=ft(n[t]);if(Array.isArray(i)){if(i.length===0)throw new Z(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=zx(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(me(r,o))}else e.push(me(i))}return e}function Pu(n,e){return n[_u]=e,n.prototype[_u]=e,n}function zx(n){return n[_u]}function Fi(n,e){let t=n.hasOwnProperty(mu);return t?n[mu]:null}function zg(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=e[i];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function Gg(n){return n.flat(Number.POSITIVE_INFINITY)}function fl(n,e){n.forEach(t=>Array.isArray(t)?fl(t,e):e(t))}function Ou(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Yo(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Wg(n,e){let t=[];for(let i=0;i<n;i++)t.push(e);return t}function qg(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(r===1)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;){let o=r-2;n[r]=n[o],r--}n[e]=t,n[e+1]=i}}function hl(n,e,t){let i=$r(n,e);return i>=0?n[i|1]=t:(i=~i,qg(n,i,e,t)),i}function ml(n,e){let t=$r(n,e);if(t>=0)return n[t|1]}function $r(n,e){return Gx(n,e,1)}function Gx(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<t];if(e===s)return o<<t;s>e?r=o:i=o+1}return~(r<<t)}var ii={},zt=[],Hi=new ee(""),Ru=new ee("",-1),Nu=new ee(""),Wo=class{get(e,t=Ai){if(t===Ai){let r=Hg("",-201);throw r.name="\u0275NotFound",r}return t}};function Ui(n){return n[Su]||null}function Au(n){return n[Tu]||null}function Zg(n){return n[Mu]||null}function Qo(n){return{\u0275providers:n}}function Yg(...n){return{\u0275providers:Lu(!0,n),\u0275fromNgModule:!0}}function Lu(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return fl(e,s=>{let a=s;al(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&Qg(r,o),t}function Qg(n,e){for(let t=0;t<n.length;t++){let{ngModule:i,providers:r}=n[t];Fu(r,o=>{e(o,i)})}}function al(n,e,t,i){if(n=ft(n),!n)return!1;let r=null,o=hu(n),s=!o&&Ui(n);if(!o&&!s){let l=n.ngModule;if(o=hu(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)al(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;fl(o.imports,m=>{al(m,e,t,i)&&(c||=[],c.push(m))}),c!==void 0&&Qg(c,e)}if(!a){let c=Fi(r)||(()=>new r);e({provide:r,useFactory:c,deps:zt},r),e({provide:Nu,useValue:r,multi:!0},r),e({provide:Hi,useValue:()=>me(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;Fu(l,m=>{e(m,c)})}}else return!1;return r!==n&&n.providers!==void 0}function Fu(n,e){for(let t of n)Du(t)&&(t=t.\u0275providers),Array.isArray(t)?Fu(t,e):e(t)}var Wx=Me({provide:String,useValue:Me});function Kg(n){return n!==null&&typeof n=="object"&&Wx in n}function qx(n){return!!(n&&n.useExisting)}function Zx(n){return!!(n&&n.useFactory)}function Vi(n){return typeof n=="function"}function Xg(n){return!!n.useClass}var Ko=new ee(""),rl={},Fg={},fu;function Xo(){return fu===void 0&&(fu=new Wo),fu}var kt=class{},Bi=class extends kt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,Cu(e,s=>this.processProvider(s)),this.records.set(Ru,Br(void 0,this)),r.has("environment")&&this.records.set(kt,Br(void 0,this));let o=this.records.get(Ko);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Nu,zt,{self:!0}))}retrieve(e,t){let i=Li(t)||0;try{return this.get(e,Ai,i)}catch(r){if(Dr(r))return r;throw r}}destroy(){Go(this),this._destroyed=!0;let e=ne(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ne(e)}}onDestroy(e){return Go(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Go(this);let t=Dn(this),i=Ct(void 0),r;try{return e()}finally{Dn(t),Ct(i)}}get(e,t=Ai,i){if(Go(this),e.hasOwnProperty(Lg))return e[Lg](this);let r=Li(i),o,s=Dn(this),a=Ct(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let m=Jx(e)&&dl(e);m&&this.injectableDefInScope(m)?c=Br(yu(e),rl):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?Xo():this.parent;return t=r&8&&t===Ai?null:t,l.get(e,t)}catch(l){let c=jx(l);throw c===-200||c===-201?new Z(c,null):l}finally{Ct(a),Dn(s)}}resolveInjectorInitializers(){let e=ne(null),t=Dn(this),i=Ct(void 0),r;try{let o=this.get(Hi,zt,{self:!0});for(let s of o)s()}finally{Dn(t),Ct(i),ne(e)}}toString(){let e=[],t=this.records;for(let i of t.keys())e.push(ti(i));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=ft(e);let t=Vi(e)?e:ft(e&&e.provide),i=Qx(e);if(!Vi(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Br(void 0,rl,!0),r.factory=()=>bu(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t,i){let r=ne(null);try{if(t.value===Fg)throw Iu(ti(e));return t.value===rl&&(t.value=Fg,t.value=t.factory(void 0,i)),typeof t.value=="object"&&t.value&&Xx(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{ne(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ft(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function yu(n){let e=dl(n),t=e!==null?e.factory:Fi(n);if(t!==null)return t;if(n instanceof ee)throw new Z(204,!1);if(n instanceof Function)return Yx(n);throw new Z(204,!1)}function Yx(n){if(n.length>0)throw new Z(204,!1);let t=Fx(n);return t!==null?()=>t.factory(n):()=>new n}function Qx(n){if(Kg(n))return Br(void 0,n.useValue);{let e=Vu(n);return Br(e,rl)}}function Vu(n,e,t){let i;if(Vi(n)){let r=ft(n);return Fi(r)||yu(r)}else if(Kg(n))i=()=>ft(n.useValue);else if(Zx(n))i=()=>n.useFactory(...bu(n.deps||[]));else if(qx(n))i=(r,o)=>me(ft(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=ft(n&&(n.useClass||n.provide));if(Kx(n))i=()=>new r(...bu(n.deps));else return Fi(r)||yu(r)}return i}function Go(n){if(n.destroyed)throw new Z(205,!1)}function Br(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function Kx(n){return!!n.deps}function Xx(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function Jx(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Cu(n,e){for(let t of n)Array.isArray(t)?Cu(t,e):t&&Du(t)?Cu(t.\u0275providers,e):e(t)}function Hr(n,e){let t;n instanceof Bi?(Go(n),t=n):t=new vu(n);let i,r=Dn(t),o=Ct(void 0);try{return e()}finally{Dn(r),Ct(o)}}function Jg(){return Ug()!==void 0||xa()!=null}var ln=0,J=1,ie=2,Xe=3,Wt=4,wt=5,zi=6,Ur=7,We=8,Et=9,Sn=10,Ie=11,zr=12,Bu=13,Gi=14,Dt=15,Fn=16,Wi=17,Tn=18,Jo=19,ju=20,Ln=21,gl=22,Vn=23,Lt=24,qi=25,Bn=26,Ne=27,e0=1,$u=6,ri=7,es=8,Zi=9,He=10;function Mn(n){return Array.isArray(n)&&typeof n[e0]=="object"}function cn(n){return Array.isArray(n)&&n[e0]===!0}function Hu(n){return(n.flags&4)!==0}function oi(n){return n.componentOffset>-1}function Gr(n){return(n.flags&1)===1}function In(n){return!!n.template}function Wr(n){return(n[ie]&512)!==0}function Yi(n){return(n[ie]&256)===256}var yt=(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})(yt||{}),ol,qo="svg",Uu="math";function t0(){return ol||(ol={},ei(yt.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),ei(yt.STYLE,void 0,[["*",["style"]]]),ei(yt.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),ei(yt.URL,Uu,[["*",["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"]]]),ei(yt.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),ei(yt.URL,qo,[["a",["href","xlink:href"]]]),ei(yt.ATTRIBUTE_NO_BINDING,qo,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),ei(yt.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),ol}function ei(n,e,t){for(let[i,r]of t){let o=e&&i!=="unknown"?`:${e}:${i}`:i;o=o.toLowerCase();for(let s of r)ol[`${o}|${s.toLowerCase()}`]=n}}function n0(n,e,t){let i=t0(),r=n.toLowerCase(),o=e.toLowerCase(),s=t&&r!=="*"&&r!=="unknown"?i[`:${t}:${r}|${o}`]:void 0,a=t?i[`:${t}:*|${o}`]:void 0;return s??a??i[`${r}|${o}`]??i[`*|${o}`]??yt.NONE}function qt(n){for(;Array.isArray(n);)n=n[ln];return n}function zu(n,e){return qt(e[n])}function Pt(n,e){return qt(e[n.index])}function ts(n,e){return n.data[e]}function _l(n,e){return n[e]}function Gu(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function Zt(n,e){let t=e[n];return Mn(t)?t:t[ln]}function i0(n){return(n[ie]&4)===4}function vl(n){return(n[ie]&128)===128}function r0(n){return cn(n[Xe])}function Yt(n,e){return e==null?null:n[e]}function Wu(n){n[Wi]=0}function qu(n){n[ie]&1024||(n[ie]|=1024,vl(n)&&si(n))}function o0(n,e){for(;n>0;)e=e[Gi],n--;return e}function ns(n){return!!(n[ie]&9216||n[Lt]?.dirty)}function bl(n){n[Sn].changeDetectionScheduler?.notify(8),n[ie]&64&&(n[ie]|=1024),ns(n)&&si(n)}function si(n){n[Sn].changeDetectionScheduler?.notify(0);let e=ni(n);for(;e!==null&&!(e[ie]&8192||(e[ie]|=8192,!vl(e)));)e=ni(e)}function Zu(n,e){if(Yi(n))throw new Z(911,!1);n[Ln]===null&&(n[Ln]=[]),n[Ln].push(e)}function s0(n,e){if(n[Ln]===null)return;let t=n[Ln].indexOf(e);t!==-1&&n[Ln].splice(t,1)}function ni(n){let e=n[Xe];return cn(e)?e[Xe]:e}function Yu(n){return n[Ur]??=[]}function Qu(n){return n.cleanup??=[]}function a0(n,e,t,i){let r=Yu(e);r.push(t),n.firstCreatePass&&Qu(n).push(i,r.length-1)}var pe={lFrame:v0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var xu=!1;function l0(){return pe.lFrame.elementDepthCount}function c0(){pe.lFrame.elementDepthCount++}function Ku(){pe.lFrame.elementDepthCount--}function yl(){return pe.bindingsEnabled}function Xu(){return pe.skipHydrationRootTNode!==null}function Ju(n){return pe.skipHydrationRootTNode===n}function ep(){pe.skipHydrationRootTNode=null}function te(){return pe.lFrame.lView}function Ue(){return pe.lFrame.tView}function _(n){return pe.lFrame.contextLView=n,n[We]}function v(n){return pe.lFrame.contextLView=null,n}function Je(){let n=tp();for(;n!==null&&n.type===64;)n=n.parent;return n}function tp(){return pe.lFrame.currentTNode}function d0(){let n=pe.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function qr(n,e){let t=pe.lFrame;t.currentTNode=n,t.isParent=e}function np(){return pe.lFrame.isParent}function ip(){pe.lFrame.isParent=!1}function u0(){return pe.lFrame.contextLView}function rp(){return xu}function Zr(n){let e=xu;return xu=n,e}function is(){let n=pe.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function op(){return pe.lFrame.bindingIndex}function p0(n){return pe.lFrame.bindingIndex=n}function Qi(){return pe.lFrame.bindingIndex++}function rs(n){let e=pe.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function f0(){return pe.lFrame.inI18n}function h0(n,e){let t=pe.lFrame;t.bindingIndex=t.bindingRootIndex=n,Cl(e)}function m0(){return pe.lFrame.currentDirectiveIndex}function Cl(n){pe.lFrame.currentDirectiveIndex=n}function g0(n){let e=pe.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function xl(){return pe.lFrame.currentQueryIndex}function os(n){pe.lFrame.currentQueryIndex=n}function ew(n){let e=n[J];return e.type===2?e.declTNode:e.type===1?n[wt]:null}function sp(n,e,t){if(t&4){let r=e,o=n;for(;r=r.parent,r===null&&!(t&1);)if(r=ew(o),r===null||(o=o[Gi],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=pe.lFrame=_0();return i.currentTNode=e,i.lView=n,!0}function wl(n){let e=_0(),t=n[J];pe.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function _0(){let n=pe.lFrame,e=n===null?null:n.child;return e===null?v0(n):e}function v0(n){let e={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=e),e}function b0(){let n=pe.lFrame;return pe.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var ap=b0;function El(){let n=b0();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 y0(n){return(pe.lFrame.contextLView=o0(n,pe.lFrame.contextLView))[We]}function Qt(){return pe.lFrame.selectedIndex}function ai(n){pe.lFrame.selectedIndex=n}function ss(){let n=pe.lFrame;return ts(n.tView,n.selectedIndex)}function F(){pe.lFrame.currentNamespace=qo}function he(){tw()}function tw(){pe.lFrame.currentNamespace=null}function lp(){return pe.lFrame.currentNamespace}var C0=!0;function Dl(){return C0}function as(n){C0=n}function wu(n,e=null,t=null,i){let r=x0(n,e,t,i);return r.resolveInjectorInitializers(),r}function x0(n,e=null,t=null,i,r=new Set){let o=[t||zt,Yg(n)];return i=i||(typeof n=="object"?void 0:ti(n)),new Bi(o,e||Xo(),i||null,r)}var xt=class n{static THROW_IF_NOT_FOUND=Ai;static NULL=new Wo;static create(e,t){if(Array.isArray(e))return wu({name:""},t,e,"");{let i=e.name??"";return wu({name:i},e.parent,e.providers,i)}}static \u0275prov=re({token:n,providedIn:"any",factory:()=>me(Ru)});static __NG_ELEMENT_ID__=-1},lt=new ee(""),et=(()=>{class n{static __NG_ELEMENT_ID__=nw;static __NG_ENV_ID__=t=>t}return n})(),Zo=class extends et{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Yi(this._lView)}onDestroy(e){let t=this._lView;return Zu(t,e),()=>s0(t,e)}};function nw(){return new Zo(te())}var At=class{_console=console;handleError(e){this._console.error("ERROR",e)}},dn=new ee("",{providedIn:"root",factory:()=>{let n=k(kt),e;return t=>{n.destroyed&&!e?setTimeout(()=>{throw t}):(e??=n.get(At),e.handleError(t))}}}),w0={provide:Hi,useValue:()=>{k(At)},multi:!0};function x(n,e){let[t,i,r]=qd(n,e?.equal),o=t,s=o[rt];return o.set=i,o.update=r,o.asReadonly=cp.bind(o),o}function cp(){let n=this[rt];if(n.readonlyFn===void 0){let e=()=>this();e[rt]=n,n.readonlyFn=e}return n.readonlyFn}var Ki=(()=>{class n{view;node;constructor(t,i){this.view=t,this.node=i}static __NG_ELEMENT_ID__=iw}return n})();function iw(){return new Ki(te(),Je())}var Gt=class{},ls=new ee("",{providedIn:"root",factory:()=>!1});var dp=new ee(""),up=new ee(""),li=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Lo(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new le(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),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=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),Yr=(()=>{class n{internalPendingTasks=k(li);scheduler=k(Gt);errorHandler=k(dn);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let i=this.add();t().catch(this.errorHandler).finally(i)}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})();function Xi(...n){}var cs=(()=>{class n{static \u0275prov=re({token:n,providedIn:"root",factory:()=>new Eu})}return n})(),Eu=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,i=this.queues.get(t);i.has(e)&&(i.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let i=this.queues.get(t);i.has(e)||i.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,i]of this.queues)t===null?e||=this.flushQueue(i):e||=t.run(()=>this.flushQueue(i));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let i of e)i.dirty&&(this.dirtyEffectCount--,t=!0,i.run());return t}};function tc(n){return{toString:n}.toString()}var Sl="__parameters__";function pw(n){return function(...t){if(n){let i=n(...t);for(let r in i)this[r]=i[r]}}}function a_(n,e,t){return tc(()=>{let i=pw(e);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,c,m){let b=l.hasOwnProperty(Sl)?l[Sl]:Object.defineProperty(l,Sl,{value:[]})[Sl];for(;b.length<=m;)b.push(null);return(b[m]=b[m]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var nf=Pu(a_("Inject",n=>({token:n})),-1),rf=Pu(a_("Optional"),8);function fw(n){return typeof n=="function"}var Fl=class{previousValue;currentValue;firstChange;constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}};function l_(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}var xs=(()=>{let n=()=>c_;return n.ngInherit=!0,n})();function c_(n){return n.type.prototype.ngOnChanges&&(n.setInput=mw),hw}function hw(){let n=u_(this),e=n?.current;if(e){let t=n.previous;if(t===ii)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function mw(n,e,t,i,r){let o=this.declaredInputs[i],s=u_(n)||gw(n,{previous:ii,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new Fl(c&&c.currentValue,t,l===ii),l_(n,e,r,t)}var d_="__ngSimpleChanges__";function u_(n){return n[d_]||null}function gw(n,e){return n[d_]=e}var E0=[];var Se=function(n,e=null,t){for(let i=0;i<E0.length;i++){let r=E0[i];r(n,e,t)}};function _w(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=c_(e);(t.preOrderHooks??=[]).push(n,s),(t.preOrderCheckHooks??=[]).push(n,s)}r&&(t.preOrderHooks??=[]).push(0-n,r),o&&((t.preOrderHooks??=[]).push(n,o),(t.preOrderCheckHooks??=[]).push(n,o))}function p_(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){let o=n.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:m}=o;s&&(n.contentHooks??=[]).push(-t,s),a&&((n.contentHooks??=[]).push(t,a),(n.contentCheckHooks??=[]).push(t,a)),l&&(n.viewHooks??=[]).push(-t,l),c&&((n.viewHooks??=[]).push(t,c),(n.viewCheckHooks??=[]).push(t,c)),m!=null&&(n.destroyHooks??=[]).push(t,m)}}function Ol(n,e,t){f_(n,e,3,t)}function Rl(n,e,t,i){(n[ie]&3)===t&&f_(n,e,t,i)}function pp(n,e){let t=n[ie];(t&3)===e&&(t&=16383,t+=1,n[ie]=t)}function f_(n,e,t,i){let r=i!==void 0?n[Wi]&65535:0,o=i??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],i!=null&&a>=i)break}else e[l]<0&&(n[Wi]+=65536),(a<o||o==-1)&&(vw(n,t,e,l),n[Wi]=(n[Wi]&4294901760)+l+2),l++}function D0(n,e){Se(4,n,e);let t=ne(null);try{e.call(n)}finally{ne(t),Se(5,n,e)}}function vw(n,e,t,i){let r=t[i]<0,o=t[i+1],s=r?-t[i]:t[i],a=n[s];r?n[ie]>>14<n[Wi]>>16&&(n[ie]&3)===e&&(n[ie]+=16384,D0(a,o)):D0(a,o)}var Kr=-1,tr=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,i,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=i}};function bw(n){return(n.flags&8)!==0}function yw(n){return(n.flags&16)!==0}function Cw(n,e,t){let i=0;for(;i<t.length;){let r=t[i];if(typeof r=="number"){if(r!==0)break;i++;let o=t[i++],s=t[i++],a=t[i++];n.setAttribute(e,s,a,o)}else{let o=r,s=t[++i];ww(o)?n.setProperty(e,o,s):n.setAttribute(e,o,s),i++}}return i}function xw(n){return n===3||n===4||n===6}function ww(n){return n.charCodeAt(0)===64}function eo(n,e){if(!(e===null||e.length===0))if(n===null||n.length===0)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?t=r:t===0||(t===-1||t===2?S0(n,t,r,null,e[++i]):S0(n,t,r,null,null))}}return n}function S0(n,e,t,i,r){let o=0,s=n.length;if(e===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===t){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,e),o=s+1),n.splice(o++,0,t),r!==null&&n.splice(o++,0,r)}function h_(n){return n!==Kr}function Vl(n){return n&32767}function Ew(n){return n>>16}function Bl(n,e){let t=Ew(n),i=e;for(;t>0;)i=i[Gi],t--;return i}var wp=!0;function jl(n){let e=wp;return wp=n,e}var Dw=256,m_=Dw-1,g_=5,Sw=0,kn={};function Tw(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty($i)&&(i=t[$i]),i==null&&(i=t[$i]=Sw++);let r=i&m_,o=1<<r;e.data[n+(r>>g_)]|=o}function $l(n,e){let t=__(n,e);if(t!==-1)return t;let i=e[J];i.firstCreatePass&&(n.injectorIndex=e.length,fp(i.data,n),fp(e,null),fp(i.blueprint,null));let r=of(n,e),o=n.injectorIndex;if(h_(r)){let s=Vl(r),a=Bl(r,e),l=a[J].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function fp(n,e){n.push(0,0,0,0,0,0,0,0,e)}function __(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function of(n,e){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;r!==null;){if(i=x_(r),i===null)return Kr;if(t++,r=r[Gi],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return Kr}function Ep(n,e,t){Tw(n,e,t)}function v_(n,e,t){if(t&8||n!==void 0)return n;pl(e,"NodeInjector")}function b_(n,e,t,i){if(t&8&&i===void 0&&(i=null),(t&3)===0){let r=n[Et],o=Ct(void 0);try{return r?r.get(e,i,t&8):ku(e,i,t&8)}finally{Ct(o)}}return v_(i,e,t)}function y_(n,e,t,i=0,r){if(n!==null){if(e[ie]&2048&&!(i&2)){let s=Pw(n,e,t,i,kn);if(s!==kn)return s}let o=C_(n,e,t,i,kn);if(o!==kn)return o}return b_(e,t,i,r)}function C_(n,e,t,i,r){let o=Iw(t);if(typeof o=="function"){if(!sp(e,n,i))return i&1?v_(r,t,i):b_(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&8))pl(t);else return s}finally{ap()}}else if(typeof o=="number"){let s=null,a=__(n,e),l=Kr,c=i&1?e[Dt][wt]:null;for((a===-1||i&4)&&(l=a===-1?of(n,e):e[a+8],l===Kr||!M0(i,!1)?a=-1:(s=e[J],a=Vl(l),e=Bl(l,e)));a!==-1;){let m=e[J];if(T0(o,a,m.data)){let b=Mw(a,e,t,s,i,c);if(b!==kn)return b}l=e[a+8],l!==Kr&&M0(i,e[J].data[a+8]===c)&&T0(o,a,e)?(s=m,a=Vl(l),e=Bl(l,e)):a=-1}}return r}function Mw(n,e,t,i,r,o){let s=e[J],a=s.data[n+8],l=i==null?oi(a)&&wp:i!=s&&(a.type&3)!==0,c=r&1&&o===a,m=Nl(a,s,t,l,c);return m!==null?ps(e,s,m,a,r):kn}function Nl(n,e,t,i,r){let o=n.providerIndexes,s=e.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,m=o>>20,b=i?a:a+m,w=r?a+m:c;for(let E=b;E<w;E++){let P=s[E];if(E<l&&t===P||E>=l&&P.type===t)return E}if(r){let E=s[l];if(E&&In(E)&&E.type===t)return l}return null}function ps(n,e,t,i,r){let o=n[t],s=e.data;if(o instanceof tr){let a=o;if(a.resolving){let E=jg(s[t]);throw Iu(E)}let l=jl(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],m,b=a.injectImpl?Ct(a.injectImpl):null,w=sp(n,i,0);try{o=n[t]=a.factory(void 0,r,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&_w(t,s[t],e)}finally{b!==null&&Ct(b),jl(l),a.resolving=!1,ap()}}return o}function Iw(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty($i)?n[$i]:void 0;return typeof e=="number"?e>=0?e&m_:kw:e}function T0(n,e,t){let i=1<<n;return!!(t[e+(n>>g_)]&i)}function M0(n,e){return!(n&2)&&!(n&1&&e)}var Ji=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return y_(this._tNode,this._lView,e,Li(i),t)}};function kw(){return new Ji(Je(),te())}function Pw(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[ie]&2048&&!Wr(s);){let a=C_(o,s,t,i|2,kn);if(a!==kn)return a;let l=o.parent;if(!l){let c=s[ju];if(c){let m=c.get(t,kn,i);if(m!==kn)return m}l=x_(s),s=s[Gi]}o=l}return r}function x_(n){let e=n[J],t=e.type;return t===2?e.declTNode:t===1?n[wt]:null}function Ow(){return oo(Je(),te())}function oo(n,e){return new hn(Pt(n,e))}var hn=(()=>{class n{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=Ow}return n})();function w_(n){return n instanceof hn?n.nativeElement:n}function Rw(){return this._results[Symbol.iterator]()}var Hl=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(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=Gg(e);(this._changesDetected=!zg(this._results,i,t))&&(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(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Rw};function E_(n){return(n.flags&128)===128}var sf=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(sf||{}),D_=new Map,Nw=0;function Aw(){return Nw++}function Lw(n){D_.set(n[Jo],n)}function Dp(n){D_.delete(n[Jo])}var I0="__ngContext__";function to(n,e){Mn(e)?(n[I0]=e[Jo],Lw(e)):n[I0]=e}function S_(n){return M_(n[zr])}function T_(n){return M_(n[Wt])}function M_(n){for(;n!==null&&!cn(n);)n=n[Wt];return n}var Sp;function af(n){Sp=n}function lf(){if(Sp!==void 0)return Sp;if(typeof document<"u")return document;throw new Z(210,!1)}var nc=new ee("",{providedIn:"root",factory:()=>Fw}),Fw="ng",ic=new ee(""),ir=new ee("",{providedIn:"platform",factory:()=>"unknown"});var rc=new ee("",{providedIn:"root",factory:()=>lf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Vw="h",Bw="b";var I_="r";var k_="di";var P_=!1,O_=new ee("",{providedIn:"root",factory:()=>P_});var jw=(n,e,t,i)=>{};function $w(n,e,t,i){jw(n,e,t,i)}function oc(n){return(n.flags&32)===32}var Hw=()=>null;function R_(n,e,t=!1){return Hw(n,e,t)}function N_(n,e){let t=n.contentQueries;if(t!==null){let i=ne(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=n.data[s];os(o),a.contentQueries(2,e[s],s)}}}finally{ne(i)}}}function Tp(n,e,t){os(0);let i=ne(null);try{e(n,t)}finally{ne(i)}}function cf(n,e,t){if(Hu(e)){let i=ne(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{ne(i)}}}var jn=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(jn||{});var Uw="svg",zw="math",Gw={"http://www.w3.org/2000/svg":Uw,"http://www.w3.org/1998/Math/MathML":zw},Tl;function Ww(){if(Tl===void 0&&(Tl=null,sn.trustedTypes))try{Tl=sn.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Tl}function sc(n){return Ww()?.createHTML(n)||n}var Ml;function qw(){if(Ml===void 0&&(Ml=null,sn.trustedTypes))try{Ml=sn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Ml}function k0(n){return qw()?.createHTML(n)||n}var Ul=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ll})`}};function ws(n){return n instanceof Ul?n.changingThisBreaksApplicationSecurity:n}function df(n,e){let t=A_(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${ll})`)}return t===e}function A_(n){return n instanceof Ul&&n.getTypeName()||null}function Zw(n){let e=new Ip(n);return Yw()?new Mp(e):e}var Mp=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(sc(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Ip=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=sc(e),t}};function Yw(){try{return!!new window.DOMParser().parseFromString(sc(""),"text/html")}catch{return!1}}var Qw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function uf(n){return n=String(n),n.match(Qw)?n:"unsafe:"+n}function $n(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function Es(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var L_=$n("area,br,col,hr,img,wbr"),F_=$n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),V_=$n("rp,rt"),Kw=Es(V_,F_),Xw=Es(F_,$n("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")),Jw=Es(V_,$n("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")),P0=Es(L_,Xw,Jw,Kw),B_=$n("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),eE=$n("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"),tE=$n("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"),nE=Es(B_,eE,tE),iE=$n("script,style,template"),kp=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,i=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild){r.push(t),t=sE(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=oE(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=O0(e).toLowerCase();if(!P0.hasOwnProperty(t))return this.sanitizedSomething=!0,!iE.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!nE.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;B_[a]&&(l=uf(l)),this.buf.push(" ",s,'="',R0(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=O0(e).toLowerCase();P0.hasOwnProperty(t)&&!L_.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(R0(e))}};function rE(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function oE(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw j_(e);return e}function sE(n){let e=n.firstChild;if(e&&rE(n,e))throw j_(e);return e}function O0(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function j_(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var aE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lE=/([^\#-~ |!])/g;function R0(n){return n.replace(/&/g,"&amp;").replace(aE,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(lE,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Il;function $_(n,e){let t=null;try{Il=Il||Zw(n);let i=e?String(e):"";t=Il.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=t.innerHTML,t=Il.getInertBodyElement(i)}while(i!==o);let a=new kp().sanitizeChildren(N0(t)||t);return sc(a)}finally{if(t){let i=N0(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function N0(n){return"content"in n&&cE(n)?n.content:null}function cE(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var dE=/^>|^->|<!--|-->|--!>|<!-$/g,uE=/(<|>)/g,pE="\u200B$1\u200B";function fE(n){return n.replace(dE,e=>e.replace(uE,pE))}function hE(n,e){return n.createText(e)}function mE(n,e,t){n.setValue(e,t)}function gE(n,e){return n.createComment(fE(e))}function H_(n,e,t){return n.createElement(e,t)}function zl(n,e,t,i,r){n.insertBefore(e,t,i,r)}function U_(n,e,t){n.appendChild(e,t)}function A0(n,e,t,i,r){i!==null?zl(n,e,t,i,r):U_(n,e,t)}function z_(n,e,t,i){n.removeChild(null,e,t,i)}function _E(n,e,t){n.setAttribute(e,"style",t)}function vE(n,e,t){t===""?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t)}function G_(n,e,t){let{mergedAttrs:i,classes:r,styles:o}=t;i!==null&&Cw(n,e,i),r!==null&&vE(n,e,r),o!==null&&_E(n,e,o)}function bE(n,e=!0){if(n[0]!=":")return[null,n];let t=n.indexOf(":",1);if(t===-1){if(e)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[null,n]}return[n.slice(1,t),n.slice(t+1)]}function pf(n,e,t){if(e!==void 0&&t!==void 0&&yE(e,t)!==yt.HTML)return n;let i=W_();return i?k0(i.sanitize(yt.HTML,n)||""):df(n,"HTML")?k0(ws(n)):$_(lf(),an(n))}function rr(n){let e=W_();return e?e.sanitize(yt.URL,n)||"":df(n,"URL")?ws(n):uf(an(n))}function W_(){let n=te();return n&&n[Sn].sanitizer}function yE(n,e){let[t,i]=CE(n);return n0(i,e,t)}function CE(n){n=n.toLowerCase();let e=bE(n,!1);if(e[0])return e;let i=Qt()===-1?null:ss(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=Pt(i,te());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&Gw[s]}}return[r,n]}function ff(n){return n.ownerDocument.defaultView}function Ze(n){return n.ownerDocument}function xE(n,e,t){let i=n.length;for(;;){let r=n.indexOf(e,t);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}var q_="ng-template";function wE(n,e,t,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&xE(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(hf(n))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function hf(n){return n.type===4&&n.value!==q_}function EE(n,e,t){let i=n.type===4&&!t?q_:n.value;return e===i}function DE(n,e,t){let i=4,r=n.attrs,o=r!==null?ME(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!un(i)&&!un(l))return!1;if(s&&un(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!EE(n,l,t)||l===""&&e.length===1){if(un(i))return!1;s=!0}}else if(i&8){if(r===null||!wE(n,r,l,t)){if(un(i))return!1;s=!0}}else{let c=e[++a],m=SE(l,r,hf(n),t);if(m===-1){if(un(i))return!1;s=!0;continue}if(c!==""){let b;if(m>o?b="":b=r[m+1].toLowerCase(),i&2&&c!==b){if(un(i))return!1;s=!0}}}}return un(i)||s}function un(n){return(n&1)===0}function SE(n,e,t,i){if(e===null)return-1;let r=0;if(i||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return IE(e,n)}function Z_(n,e,t=!1){for(let i=0;i<e.length;i++)if(DE(n,e[i],t))return!0;return!1}function TE(n){let e=n.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function ME(n){for(let e=0;e<n.length;e++){let t=n[e];if(xw(t))return e}return n.length}function IE(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){let i=n[t];if(typeof i=="number")return-1;if(i===e)return t;t++}return-1}function kE(n,e){e:for(let t=0;t<e.length;t++){let i=e[t];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 L0(n,e){return n?":not("+e.trim()+")":e}function PE(n){let e=n[0],t=1,i=2,r="",o=!1;for(;t<n.length;){let s=n[t];if(typeof s=="string")if(i&2){let a=n[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!un(s)&&(e+=L0(o,r),r=""),i=s,o=o||!un(i);t++}return r!==""&&(e+=L0(o,r)),e}function OE(n){return n.map(PE).join(",")}function RE(n){let e=[],t=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&e.push(o,n[++i]):r===8&&t.push(o);else{if(!un(r))break;r=o}i++}return t.length&&e.push(1,...t),e}var ct={};function mf(n,e,t,i,r,o,s,a,l,c,m){let b=Ne+i,w=b+r,E=NE(b,w),P=typeof c=="function"?c():c;return E[J]={type:n,blueprint:E,template:t,queries:null,viewQuery:a,declTNode:e,data:E.slice().fill(null,b),bindingStartIndex:b,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:P,incompleteFirstPass:!1,ssrId:m}}function NE(n,e){let t=[];for(let i=0;i<e;i++)t.push(i<n?null:ct);return t}function AE(n){let e=n.tView;return e===null||e.incompleteFirstPass?n.tView=mf(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):e}function gf(n,e,t,i,r,o,s,a,l,c,m){let b=e.blueprint.slice();return b[ln]=r,b[ie]=i|4|128|8|64|1024,(c!==null||n&&n[ie]&2048)&&(b[ie]|=2048),Wu(b),b[Xe]=b[Gi]=n,b[We]=t,b[Sn]=s||n&&n[Sn],b[Ie]=a||n&&n[Ie],b[Et]=l||n&&n[Et]||null,b[wt]=o,b[Jo]=Aw(),b[zi]=m,b[ju]=c,b[Dt]=e.type==2?n[Dt]:b,b}function LE(n,e,t){let i=Pt(e,n),r=AE(t),o=n[Sn].rendererFactory,s=_f(n,gf(n,r,null,Y_(t),i,e,null,o.createRenderer(i,t),null,null,null));return n[e.index]=s}function Y_(n){let e=16;return n.signals?e=4096:n.onPush&&(e=64),e}function Q_(n,e,t,i){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function _f(n,e){return n[zr]?n[Bu][Wt]=e:n[zr]=e,n[Bu]=e,e}function d(n=1){K_(Ue(),te(),Qt()+n,!1)}function K_(n,e,t,i){if(!i)if((e[ie]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Ol(e,o,t)}else{let o=n.preOrderHooks;o!==null&&Rl(e,o,0,t)}ai(t)}var ac=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(ac||{});function Pp(n,e,t,i){let r=ne(null);try{let[o,s,a]=n.inputs[t],l=null;(s&ac.SignalBased)!==0&&(l=e[o][rt]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(e,i)),n.setInput!==null?n.setInput(e,l,i,t,o):l_(e,l,o,i)}finally{ne(r)}}var Pn=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(Pn||{}),FE;function vf(n,e){return FE(n,e)}function Gl(n){if(!n)return 0;let e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function Xr(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}function VE(n){let e=Xr(n,"transition-property"),t=Xr(n,"transition-duration"),i=Xr(n,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<e.length;o++){let s=Gl(i[o])+Gl(t[o]);s>r.duration&&(r.propertyName=e[o],r.duration=s)}return r}function BE(n){let e=Xr(n,"animation-name"),t=Xr(n,"animation-delay"),i=Xr(n,"animation-duration"),r={animationName:"",propertyName:void 0,duration:0};for(let o=0;o<e.length;o++){let s=Gl(t[o])+Gl(i[o]);s>r.duration&&(r.animationName=e[o],r.duration=s)}return r}function X_(n,e){return n!==void 0&&n.duration>e.duration}function J_(n){return(n.animationName!=null||n.propertyName!=null)&&n.duration>0}function jE(n,e){let t=getComputedStyle(n),i=BE(t),r=VE(t),o=i.duration>r.duration?i:r;X_(e.get(n),o)||J_(o)&&e.set(n,o)}function ev(n,e,t){if(!t)return;let i=n.getAnimations();return i.length===0?jE(n,e):$E(n,e,i)}function $E(n,e,t){let i={animationName:void 0,propertyName:void 0,duration:0};for(let r of t){let o=r.effect?.getTiming(),s=typeof o?.duration=="number"?o.duration:0,a=(o?.delay??0)+s,l,c;r.animationName?c=r.animationName:l=r.transitionProperty,a>=i.duration&&(i={animationName:c,propertyName:l,duration:a})}X_(e.get(n),i)||J_(i)&&e.set(n,i)}var ui=new Set,lc=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(lc||{}),hi=new ee(""),F0=new Set;function Rn(n){F0.has(n)||(F0.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var tv=!1,Op=class extends $e{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Jg()&&(this.destroyRef=k(et,{optional:!0})??void 0,this.pendingTasks=k(li,{optional:!0})??void 0)}emit(e){let t=ne(null);try{super.next(e)}finally{ne(t)}}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;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 e instanceof Ve&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},fn=Op;function nv(n){let e,t;function i(){n=Xi;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{n(),i()})),()=>i()}function V0(n){return queueMicrotask(()=>n()),()=>{n=Xi}}var bf="isAngularZone",Wl=bf+"_ID",HE=0,Te=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new fn(!1);onMicrotaskEmpty=new fn(!1);onStable=new fn(!1);onError=new fn(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=tv}=e;if(typeof Zone>"u")throw new Z(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)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,GE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(bf)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new Z(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new Z(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,UE,Xi,Xi);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},UE={};function yf(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 zE(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){nv(()=>{n.callbackScheduled=!1,Rp(n),n.isCheckStableRunning=!0,yf(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),Rp(n)}function GE(n){let e=()=>{zE(n)},t=HE++;n._inner=n._inner.fork({name:"angular",properties:{[bf]:!0,[Wl]:t,[Wl+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(WE(l))return i.invokeTask(o,s,a,l);try{return B0(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),j0(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return B0(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!qE(l)&&e(),j0(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Rp(n),yf(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 Rp(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function B0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function j0(n){n._nesting--,yf(n)}var ql=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new fn;onMicrotaskEmpty=new fn;onStable=new fn;onError=new fn;run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}};function WE(n){return iv(n,"__ignore_ng_zone__")}function qE(n){return iv(n,"__scheduler_tick__")}function iv(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}var cc=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),Cf=[0,1,2,3],xf=(()=>{class n{ngZone=k(Te);scheduler=k(Gt);errorHandler=k(At,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){k(hi,{optional:!0})}execute(){let t=this.sequences.size>0;t&&Se(16),this.executing=!0;for(let i of Cf)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(),t&&Se(17)}register(t){let{view:i}=t;i!==void 0?((i[qi]??=[]).push(t),si(i),i[ie]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,i){return i?i.run(lc.AFTER_NEXT_RENDER,t):t()}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),fs=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,i,r,o,s=null){this.impl=e,this.hooks=t,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 e=this.view?.[qi];e&&(this.view[qi]=e.filter(t=>t!==this))}};function dc(n,e){let t=e?.injector??k(xt);return Rn("NgAfterNextRender"),YE(n,t,e,!0)}function ZE(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function YE(n,e,t,i){let r=e.get(cc);r.impl??=e.get(xf);let o=e.get(hi,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(et):null,a=e.get(Ki,null,{optional:!0}),l=new fs(r.impl,ZE(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var uc=new ee("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function rv(n,e,t){let i=n.get(uc);if(Array.isArray(e))for(let r of e)i.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else i.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);i.scheduler&&i.scheduler(n)}function QE(n,e){let t=n.get(uc);if(e.detachedLeaveAnimationFns){for(let i of e.detachedLeaveAnimationFns)t.queue.delete(i);e.detachedLeaveAnimationFns=void 0}}function KE(n){let e=n.get(uc);e.isScheduled||(dc(()=>{e.isScheduled=!1;for(let t of e.queue)t();e.queue.clear()},{injector:n}),e.isScheduled=!0)}function ov(n){let e=n.get(uc);e.scheduler=KE,e.scheduler(n)}function sv(n,e){for(let[t,i]of e)rv(n,i.animateFns)}function $0(n,e,t,i){let r=n?.[Bn]?.enter;e!==null&&r&&r.has(t.index)&&sv(i,r)}function Qr(n,e,t,i,r,o,s,a){if(r!=null){let l,c=!1;cn(r)?l=r:Mn(r)&&(c=!0,r=r[ln]);let m=qt(r);n===0&&i!==null?($0(a,i,o,t),s==null?U_(e,i,m):zl(e,i,m,s||null,!0)):n===1&&i!==null?($0(a,i,o,t),zl(e,i,m,s||null,!0)):n===2?H0(a,o,t,b=>{z_(e,m,c,b)}):n===3&&H0(a,o,t,()=>{e.destroyNode(m)}),l!=null&&l1(e,n,t,l,o,i,s)}}function XE(n,e){av(n,e),e[ln]=null,e[wt]=null}function JE(n,e,t,i,r,o){i[ln]=r,i[wt]=e,fc(n,i,t,1,r,o)}function av(n,e){e[Sn].changeDetectionScheduler?.notify(9),fc(n,e,e[Ie],2,null,null)}function e1(n){let e=n[zr];if(!e)return hp(n[J],n);for(;e;){let t=null;if(Mn(e))t=e[zr];else{let i=e[He];i&&(t=i)}if(!t){for(;e&&!e[Wt]&&e!==n;)Mn(e)&&hp(e[J],e),e=e[Xe];e===null&&(e=n),Mn(e)&&hp(e[J],e),t=e&&e[Wt]}e=t}}function wf(n,e){let t=n[Zi],i=t.indexOf(e);t.splice(i,1)}function pc(n,e){if(Yi(e))return;let t=e[Ie];t.destroyNode&&fc(n,e,t,3,null,null),e1(e)}function hp(n,e){if(Yi(e))return;let t=ne(null);try{e[ie]&=-129,e[ie]|=256,e[Lt]&&Kn(e[Lt]),i1(n,e),n1(n,e),e[J].type===1&&e[Ie].destroy();let i=e[Fn];if(i!==null&&cn(e[Xe])){i!==e[Xe]&&wf(i,e);let r=e[Tn];r!==null&&r.detachView(n)}Dp(e)}finally{ne(t)}}function H0(n,e,t,i){let r=n?.[Bn];if(r==null||r.leave==null||!r.leave.has(e.index))return i(!1);n&&ui.add(n),rv(t,()=>{if(r.leave&&r.leave.has(e.index)){let s=r.leave.get(e.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:m}=c();a.push(m)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),t1(n,i)}else n&&ui.delete(n),i(!1)},r)}function t1(n,e){let t=n[Bn]?.running;if(t){t.then(()=>{n[Bn].running=void 0,ui.delete(n),e(!0)});return}e(!1)}function n1(n,e){let t=n.cleanup,i=e[Ur];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[t[s+1]];t[s].call(a)}i!==null&&(e[Ur]=null);let r=e[Ln];if(r!==null){e[Ln]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Vn];if(o!==null){e[Vn]=null;for(let s of o)s.destroy()}}function i1(n,e){let t;if(n!=null&&(t=n.destroyHooks)!=null)for(let i=0;i<t.length;i+=2){let r=e[t[i]];if(!(r instanceof tr)){let o=t[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 lv(n,e,t){return r1(n,e.parent,t)}function r1(n,e,t){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return t[ln];if(oi(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===jn.None||r===jn.Emulated)return null}return Pt(i,t)}function cv(n,e,t){return s1(n,e,t)}function o1(n,e,t){return n.type&40?Pt(n,t):null}var s1=o1,U0;function Ef(n,e,t,i){let r=lv(n,i,e),o=e[Ie],s=i.parent||e[wt],a=cv(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)A0(o,r,t[l],a,!1);else A0(o,r,t,a,!1);U0!==void 0&&U0(o,i,e,t,r)}function ds(n,e){if(e!==null){let t=e.type;if(t&3)return Pt(e,n);if(t&4)return Zl(-1,n[e.index]);if(t&8){let i=e.child;if(i!==null)return ds(n,i);{let r=n[e.index];return cn(r)?Zl(-1,r):qt(r)}}else{if(t&128)return ds(n,e.next);if(t&32)return vf(e,n)()||qt(n[e.index]);{let i=dv(n,e);if(i!==null){if(Array.isArray(i))return i[0];let r=ni(n[Dt]);return ds(r,i)}else return ds(n,e.next)}}}return null}function dv(n,e){if(e!==null){let i=n[Dt][wt],r=e.projection;return i.projection[r]}return null}function Zl(n,e){let t=He+n+1;if(t<e.length){let i=e[t],r=i[J].firstChild;if(r!==null)return ds(i,r)}return e[ri]}function Df(n,e,t,i,r,o,s){for(;t!=null;){let a=i[Et];if(t.type===128){t=t.next;continue}let l=i[t.index],c=t.type;if(s&&e===0&&(l&&to(qt(l),i),t.flags|=2),!oc(t))if(c&8)Df(n,e,t.child,i,r,o,!1),Qr(e,n,a,r,l,t,o,i);else if(c&32){let m=vf(t,i),b;for(;b=m();)Qr(e,n,a,r,b,t,o,i);Qr(e,n,a,r,l,t,o,i)}else c&16?uv(n,e,i,t,r,o):Qr(e,n,a,r,l,t,o,i);t=s?t.projectionNext:t.next}}function fc(n,e,t,i,r,o){Df(t,i,n.firstChild,e,r,o,!1)}function a1(n,e,t){let i=e[Ie],r=lv(n,t,e),o=t.parent||e[wt],s=cv(o,t,e);uv(i,0,e,t,r,s)}function uv(n,e,t,i,r,o){let s=t[Dt],l=s[wt].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let m=l[c];Qr(e,n,t[Et],r,m,i,o,t)}else{let c=l,m=s[Xe];E_(i)&&(c.flags|=128),Df(n,e,c,m,r,o,!0)}}function l1(n,e,t,i,r,o,s){let a=i[ri],l=qt(i);a!==l&&Qr(e,n,t,o,a,r,s);for(let c=He;c<i.length;c++){let m=i[c];fc(m[J],m,n,e,o,a)}}function c1(n,e,t,i,r){if(e)r?n.addClass(t,i):n.removeClass(t,i);else{let o=i.indexOf("-")===-1?void 0:Pn.DashCase;r==null?n.removeStyle(t,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Pn.Important),n.setStyle(t,i,r,o))}}function pv(n,e,t,i,r){let o=Qt(),s=i&2;try{ai(-1),s&&e.length>Ne&&K_(n,e,Ne,!1),Se(s?2:0,r,t),t(i,r)}finally{ai(o),Se(s?3:1,r,t)}}function hc(n,e,t){g1(n,e,t),(t.flags&64)===64&&_1(n,e,t)}function Ds(n,e,t=Pt){let i=e.localNames;if(i!==null){let r=e.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?t(e,n):n[s];n[r++]=a}}}function d1(n,e,t,i){let o=i.get(O_,P_)||t===jn.ShadowDom,s=n.selectRootElement(e,o);return u1(s),s}function u1(n){p1(n)}var p1=()=>null;function f1(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function h1(n,e,t,i,r,o){let s=e[J];if(If(n,s,e,t,i)){oi(n)&&m1(e,n.index);return}n.type&3&&(t=f1(t)),fv(n,e,t,i,r,o)}function fv(n,e,t,i,r,o){if(n.type&3){let s=Pt(n,e);i=o!=null?o(i,n.value||"",t):i,r.setProperty(s,t,i)}else n.type&12}function m1(n,e){let t=Zt(e,n);t[ie]&16||(t[ie]|=64)}function g1(n,e,t){let i=t.directiveStart,r=t.directiveEnd;oi(t)&&LE(e,t,n.data[i+t.componentOffset]),n.firstCreatePass||$l(t,e);let o=t.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=ps(e,n,s,t);if(to(l,e),o!==null&&C1(e,s-i,l,a,t,o),In(a)){let c=Zt(t.index,e);c[We]=ps(e,n,s,t)}}}function _1(n,e,t){let i=t.directiveStart,r=t.directiveEnd,o=t.index,s=m0();try{ai(o);for(let a=i;a<r;a++){let l=n.data[a],c=e[a];Cl(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&v1(l,c)}}finally{ai(-1),Cl(s)}}function v1(n,e){n.hostBindings!==null&&n.hostBindings(1,e)}function Sf(n,e){let t=n.directiveRegistry,i=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];Z_(e,o.selectors,!1)&&(i??=[],In(o)?i.unshift(o):i.push(o))}return i}function b1(n,e,t,i,r,o){let s=Pt(n,e);y1(e[Ie],s,o,n.value,t,i,r)}function y1(n,e,t,i,r,o,s){if(o==null)n.removeAttribute(e,r,t);else{let a=s==null?an(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}function C1(n,e,t,i,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];Pp(i,t,l,c)}}function Tf(n,e,t,i,r){let o=Ne+t,s=e[J],a=r(s,e,n,i,t);e[o]=a,qr(n,!0);let l=n.type===2;return l?(G_(e[Ie],a,n),(l0()===0||Gr(n))&&to(a,e),c0()):to(a,e),Dl()&&(!l||!oc(n))&&Ef(s,e,a,n),n}function Mf(n){let e=n;return np()?ip():(e=e.parent,qr(e,!1)),e}function x1(n,e){let t=n[Et];if(!t)return;let i;try{i=t.get(dn,null)}catch{i=null}i?.(e)}function If(n,e,t,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],m=s[l+1],b=e.data[c];Pp(b,t[c],m,r),a=!0}if(o)for(let l of o){let c=t[l],m=e.data[l];Pp(m,c,i,r),a=!0}return a}function w1(n,e){let t=Zt(e,n),i=t[J];E1(i,t);let r=t[ln];r!==null&&t[zi]===null&&(t[zi]=R_(r,t[Et])),Se(18),kf(i,t,t[We]),Se(19,t[We])}function E1(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])}function kf(n,e,t){wl(e);try{let i=n.viewQuery;i!==null&&Tp(1,i,t);let r=n.template;r!==null&&pv(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),e[Tn]?.finishViewCreation(n),n.staticContentQueries&&N_(n,e),n.staticViewQueries&&Tp(2,n.viewQuery,t);let o=n.components;o!==null&&D1(e,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[ie]&=-5,El()}}function D1(n,e){for(let t=0;t<e.length;t++)w1(n,e[t])}function Ss(n,e,t,i){let r=ne(null);try{let o=e.tView,a=n[ie]&4096?4096:16,l=gf(n,o,t,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[e.index];l[Fn]=c;let m=n[Tn];return m!==null&&(l[Tn]=m.createEmbeddedView(o)),kf(o,l,t),l}finally{ne(r)}}function no(n,e){return!e||e.firstChild===null||E_(n)}function hs(n,e,t,i,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&i.push(qt(o)),cn(o)&&hv(o,i);let s=t.type;if(s&8)hs(n,e,t.child,i);else if(s&32){let a=vf(t,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=dv(e,t);if(Array.isArray(a))i.push(...a);else{let l=ni(e[Dt]);hs(l[J],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}function hv(n,e){for(let t=He;t<n.length;t++){let i=n[t],r=i[J].firstChild;r!==null&&hs(i[J],i,r,e)}n[ri]!==n[ln]&&e.push(n[ri])}function mv(n){if(n[qi]!==null){for(let e of n[qi])e.impl.addSequence(e);n[qi].length=0}}var gv=[];function S1(n){return n[Lt]??T1(n)}function T1(n){let e=gv.pop()??Object.create(I1);return e.lView=n,e}function M1(n){n.lView[Lt]!==n&&(n.lView=null,gv.push(n))}var I1=se(U({},Di),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{si(n.lView)},consumerOnSignalRead(){this.lView[Lt]=this}});function k1(n){let e=n[Lt]??Object.create(P1);return e.lView=n,e}var P1=se(U({},Di),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let e=ni(n.lView);for(;e&&!_v(e[J]);)e=ni(e);e&&qu(e)},consumerOnSignalRead(){this.lView[Lt]=this}});function _v(n){return n.type!==2}function vv(n){if(n[Vn]===null)return;let e=!0;for(;e;){let t=!1;for(let i of n[Vn])i.dirty&&(t=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=t&&!!(n[ie]&8192)}}var O1=100;function bv(n,e=0){let i=n[Sn].rendererFactory,r=!1;r||i.begin?.();try{R1(n,e)}finally{r||i.end?.()}}function R1(n,e){let t=rp();try{Zr(!0),Np(n,e);let i=0;for(;ns(n);){if(i===O1)throw new Z(103,!1);i++,Np(n,1)}}finally{Zr(t)}}function N1(n,e,t,i){if(Yi(e))return;let r=e[ie],o=!1,s=!1;wl(e);let a=!0,l=null,c=null;o||(_v(n)?(c=S1(e),l=Qn(c)):Ta()===null?(a=!1,c=k1(e),l=Qn(c)):e[Lt]&&(Kn(e[Lt]),e[Lt]=null));try{Wu(e),p0(n.bindingStartIndex),t!==null&&pv(n,e,t,2,i);let m=(r&3)===3;if(!o)if(m){let E=n.preOrderCheckHooks;E!==null&&Ol(e,E,null)}else{let E=n.preOrderHooks;E!==null&&Rl(e,E,0,null),pp(e,0)}if(s||A1(e),vv(e),yv(e,0),n.contentQueries!==null&&N_(n,e),!o)if(m){let E=n.contentCheckHooks;E!==null&&Ol(e,E)}else{let E=n.contentHooks;E!==null&&Rl(e,E,1),pp(e,1)}F1(n,e);let b=n.components;b!==null&&xv(e,b,0);let w=n.viewQuery;if(w!==null&&Tp(2,w,i),!o)if(m){let E=n.viewCheckHooks;E!==null&&Ol(e,E)}else{let E=n.viewHooks;E!==null&&Rl(e,E,2),pp(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[gl]){for(let E of e[gl])E();e[gl]=null}o||(mv(e),e[ie]&=-73)}catch(m){throw o||si(e),m}finally{c!==null&&(Ti(c,l),a&&M1(c)),El()}}function yv(n,e){for(let t=S_(n);t!==null;t=T_(t))for(let i=He;i<t.length;i++){let r=t[i];Cv(r,e)}}function A1(n){for(let e=S_(n);e!==null;e=T_(e)){if(!(e[ie]&2))continue;let t=e[Zi];for(let i=0;i<t.length;i++){let r=t[i];qu(r)}}}function L1(n,e,t){Se(18);let i=Zt(e,n);Cv(i,t),Se(19,i[We])}function Cv(n,e){vl(n)&&Np(n,e)}function Np(n,e){let i=n[J],r=n[ie],o=n[Lt],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&Mi(o)),s||=!1,o&&(o.dirty=!1),n[ie]&=-9217,s)N1(i,n,i.template,n[We]);else if(r&8192){let a=ne(null);try{vv(n),yv(n,1);let l=i.components;l!==null&&xv(n,l,1),mv(n)}finally{ne(a)}}}function xv(n,e,t){for(let i=0;i<e.length;i++)L1(n,e[i],t)}function F1(n,e){let t=n.hostBindingOpCodes;if(t!==null)try{for(let i=0;i<t.length;i++){let r=t[i];if(r<0)ai(~r);else{let o=r,s=t[++i],a=t[++i];h0(s,o);let l=e[o];Se(24,l),a(2,l),Se(25,l)}}}finally{ai(-1)}}function Pf(n,e){let t=rp()?64:1088;for(n[Sn].changeDetectionScheduler?.notify(e);n;){n[ie]|=t;let i=ni(n);if(Wr(n)&&!i)return n;n=i}return null}function wv(n,e,t,i){return[n,!0,0,e,null,i,null,t,null,null]}function Ev(n,e){let t=He+e;if(t<n.length)return n[t]}function Ts(n,e,t,i=!0){let r=e[J];if(V1(r,e,n,t),i){let s=Zl(t,n),a=e[Ie],l=a.parentNode(n[ri]);l!==null&&JE(r,n[wt],a,e,l,s)}let o=e[zi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Dv(n,e){let t=ms(n,e);return t!==void 0&&pc(t[J],t),t}function ms(n,e){if(n.length<=He)return;let t=He+e,i=n[t];if(i){let r=i[Fn];r!==null&&r!==n&&wf(r,i),e>0&&(n[t-1][Wt]=i[Wt]);let o=Yo(n,He+e);XE(i[J],i);let s=o[Tn];s!==null&&s.detachView(o[J]),i[Xe]=null,i[Wt]=null,i[ie]&=-129}return i}function V1(n,e,t,i){let r=He+i,o=t.length;i>0&&(t[r-1][Wt]=e),i<o-He?(e[Wt]=t[r],Ou(t,He+i,e)):(t.push(e),e[Wt]=null),e[Xe]=t;let s=e[Fn];s!==null&&t!==s&&Sv(s,e);let a=e[Tn];a!==null&&a.insertView(n),bl(e),e[ie]|=128}function Sv(n,e){let t=n[Zi],i=e[Xe];if(Mn(i))n[ie]|=2;else{let r=i[Xe][Dt];e[Dt]!==r&&(n[ie]|=2)}t===null?n[Zi]=[e]:t.push(e)}var pi=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[J];return hs(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[We]}set context(e){this._lView[We]=e}get destroyed(){return Yi(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Xe];if(cn(e)){let t=e[es],i=t?t.indexOf(this):-1;i>-1&&(ms(e,i),Yo(t,i))}this._attachedToViewContainer=!1}pc(this._lView[J],this._lView)}onDestroy(e){Zu(this._lView,e)}markForCheck(){Pf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[ie]&=-129}reattach(){bl(this._lView),this._lView[ie]|=128}detectChanges(){this._lView[ie]|=1024,bv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Wr(this._lView),t=this._lView[Fn];t!==null&&!e&&wf(t,this._lView),av(this._lView[J],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Z(902,!1);this._appRef=e;let t=Wr(this._lView),i=this._lView[Fn];i!==null&&!t&&Sv(i,this._lView),bl(this._lView)}};var fi=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=B1;constructor(t,i,r){this._declarationLView=t,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,i){return this.createEmbeddedViewImpl(t,i)}createEmbeddedViewImpl(t,i,r){let o=Ss(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:i,dehydratedView:r});return new pi(o)}}return n})();function B1(){return mc(Je(),te())}function mc(n,e){return n.type&4?new fi(e,n,oo(n,e)):null}function so(n,e,t,i,r){let o=n.data[e];if(o===null)o=j1(n,e,t,i,r),f0()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=i,o.attrs=r;let s=d0();o.injectorIndex=s===null?-1:s.injectorIndex}return qr(o,!0),o}function j1(n,e,t,i,r){let o=tp(),s=np(),a=s?o:o&&o.parent,l=n.data[e]=H1(n,a,t,e,i,r);return $1(n,l,o,s),l}function $1(n,e,t,i){n.firstChild===null&&(n.firstChild=e),t!==null&&(i?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function H1(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return Xu()&&(a|=128),{type:t,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,namespace:lp(),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:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var Sj=new RegExp(`^(\\d+)*(${Bw}|${Vw})*(.*)`);function U1(n){let e=n[$u]??[],i=n[Xe][Ie],r=[];for(let o of e)o.data[k_]!==void 0?r.push(o):z1(o,i);n[$u]=r}function z1(n,e){let t=0,i=n.firstChild;if(i){let r=n.data[I_];for(;t<r;){let o=i.nextSibling;z_(e,i,!1),i=o,t++}}}var G1=()=>null,W1=()=>null;function Yl(n,e){return G1(n,e)}function Tv(n,e,t){return W1(n,e,t)}var Mv=class{},gc=class{},Ap=class{resolveComponentFactory(e){throw new Z(917,!1)}},_c=class{static NULL=new Ap},On=class{},vc=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>q1()}return n})();function q1(){let n=te(),e=Je(),t=Zt(e.index,n);return(Mn(t)?t:n)[Ie]}var Iv=(()=>{class n{static \u0275prov=re({token:n,providedIn:"root",factory:()=>null})}return n})();var Al={},Lp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){let r=this.injector.get(e,Al,i);return r!==Al||t===Al?r:this.parentInjector.get(e,t,i)}};function Ql(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=cl(r,a);else if(o==2){let l=a,c=e[++s];i=cl(i,l+": "+c+";")}}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}function mn(n,e=0){let t=te();if(t===null)return me(n,e);let i=Je();return y_(i,t,ft(n),e)}function kv(n,e,t,i,r){let o=i===null?null:{"":-1},s=r(n,t);if(s!==null){let a=s,l=null,c=null;for(let m of s)if(m.resolveHostDirectives!==null){[a,l,c]=m.resolveHostDirectives(s);break}Q1(n,e,t,a,o,l,c)}o!==null&&i!==null&&Z1(t,i,o)}function Z1(n,e,t){let i=n.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new Z(-301,!1);i.push(e[r],o)}}function Y1(n,e,t){e.componentOffset=t,(n.components??=[]).push(e.index)}function Q1(n,e,t,i,r,o,s){let a=i.length,l=!1;for(let w=0;w<a;w++){let E=i[w];!l&&In(E)&&(l=!0,Y1(n,t,w)),Ep($l(t,e),n,E.type)}nD(t,n.data.length,a);for(let w=0;w<a;w++){let E=i[w];E.providersResolver&&E.providersResolver(E)}let c=!1,m=!1,b=Q_(n,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let w=0;w<a;w++){let E=i[w];if(t.mergedAttrs=eo(t.mergedAttrs,E.hostAttrs),X1(n,t,e,b,E),tD(b,E,r),s!==null&&s.has(E)){let[B,W]=s.get(E);t.directiveToIndex.set(E.type,[b,B+t.directiveStart,W+t.directiveStart])}else(o===null||!o.has(E))&&t.directiveToIndex.set(E.type,b);E.contentQueries!==null&&(t.flags|=4),(E.hostBindings!==null||E.hostAttrs!==null||E.hostVars!==0)&&(t.flags|=64);let P=E.type.prototype;!c&&(P.ngOnChanges||P.ngOnInit||P.ngDoCheck)&&((n.preOrderHooks??=[]).push(t.index),c=!0),!m&&(P.ngOnChanges||P.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(t.index),m=!0),b++}K1(n,t,o)}function K1(n,e,t){for(let i=e.directiveStart;i<e.directiveEnd;i++){let r=n.data[i];if(t===null||!t.has(r))z0(0,e,r,i),z0(1,e,r,i),W0(e,i,!1);else{let o=t.get(r);G0(0,e,o,i),G0(1,e,o,i),W0(e,i,!0)}}}function z0(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(i),Pv(e,o)}}function G0(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),Pv(e,s)}}function Pv(n,e){e==="class"?n.flags|=8:e==="style"&&(n.flags|=16)}function W0(n,e,t){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!t&&r===null||t&&o===null||hf(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(!t&&r.hasOwnProperty(l)){let c=r[l];for(let m of c)if(m===e){s??=[],s.push(l,i[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let m=0;m<c.length;m+=2)if(c[m]===e){s??=[],s.push(c[m+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function X1(n,e,t,i,r){n.data[i]=r;let o=r.factory||(r.factory=Fi(r.type,!0)),s=new tr(o,In(r),mn,null);n.blueprint[i]=s,t[i]=s,J1(n,e,i,Q_(n,t,r.hostVars,ct),r)}function J1(n,e,t,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~e.index;eD(s)!=a&&s.push(a),s.push(t,i,o)}}function eD(n){let e=n.length;for(;e>0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function tD(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;In(e)&&(t[""]=n)}}function nD(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function Of(n,e,t,i,r,o,s,a){let l=e[J],c=l.consts,m=Yt(c,s),b=so(l,n,t,i,m);return o&&kv(l,e,b,Yt(c,a),r),b.mergedAttrs=eo(b.mergedAttrs,b.attrs),b.attrs!==null&&Ql(b,b.attrs,!1),b.mergedAttrs!==null&&Ql(b,b.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,b),b}function Rf(n,e){p_(n,e),Hu(e)&&n.queries.elementEnd(e)}function iD(n,e,t,i,r,o){let s=e.consts,a=Yt(s,r),l=so(e,n,t,i,a);if(l.mergedAttrs=eo(l.mergedAttrs,l.attrs),o!=null){let c=Yt(s,o);l.localNames=[];for(let m=0;m<c.length;m+=2)l.localNames.push(c[m],-1)}return l.attrs!==null&&Ql(l,l.attrs,!1),l.mergedAttrs!==null&&Ql(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function Nf(n){return Rv(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function Ov(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{let t=n[Symbol.iterator](),i;for(;!(i=t.next()).done;)e(i.value)}}function Rv(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function Af(n,e,t){return n[e]=t}function rD(n,e){return n[e]}function Kt(n,e,t){if(t===ct)return!1;let i=n[e];return Object.is(i,t)?!1:(n[e]=t,!0)}function Lf(n,e,t,i){let r=Kt(n,e,t);return Kt(n,e+1,i)||r}function oD(n,e,t,i,r){let o=Lf(n,e,t,i);return Kt(n,e+2,r)||o}function Ll(n,e,t){return function i(r){let o=oi(n)?Zt(n.index,e):e;Pf(o,5);let s=e[We],a=q0(e,s,t,r),l=i.__ngNextListenerFn__;for(;l;)a=q0(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function q0(n,e,t,i){let r=ne(null);try{return Se(6,e,t),t(i)!==!1}catch(o){return x1(n,o),!1}finally{Se(7,e,t),ne(r)}}function Nv(n,e,t,i,r,o,s,a){let l=Gr(n),c=!1,m=null;if(!i&&l&&(m=aD(e,t,o,n.index)),m!==null){let b=m.__ngLastListenerFn__||m;b.__ngNextListenerFn__=s,m.__ngLastListenerFn__=s,c=!0}else{let b=Pt(n,t),w=i?i(b):b;$w(t,w,o,a);let E=r.listen(w,o,a);if(!sD(o)){let P=i?B=>i(qt(B[n.index])):n.index;Av(P,e,t,o,a,E,!1)}}return c}function sD(n){return n.startsWith("animation")||n.startsWith("transition")}function aD(n,e,t,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===i){let a=e[Ur],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function Av(n,e,t,i,r,o,s){let a=e.firstCreatePass?Qu(e):null,l=Yu(t),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function Z0(n,e,t,i,r,o){let s=e[t],a=e[J],c=a.data[t].outputs[i],b=s[c].subscribe(o);Av(n.index,a,e,r,o,b,!0)}var Fp=Symbol("BINDING");var Vp=class extends _c{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ui(e);return new gs(t,this.ngModule)}};function lD(n){return Object.keys(n).map(e=>{let[t,i,r]=n[e],o={propName:t,templateName:e,isSignal:(i&ac.SignalBased)!==0};return r&&(o.transform=r),o})}function cD(n){return Object.keys(n).map(e=>({propName:n[e],templateName:e}))}function dD(n,e,t){let i=e instanceof kt?e:e?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Lp(t,i):t}function uD(n){let e=n.get(On,null);if(e===null)throw new Z(407,!1);let t=n.get(Iv,null),i=n.get(Gt,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:i,ngReflect:!1}}function pD(n,e){let t=Lv(n);return H_(e,t,t==="svg"?qo:t==="math"?Uu:null)}function fD(n){if(n?.toLowerCase()==="script")throw new Z(905,!1)}function Lv(n){return(n.selectors[0][0]||"div").toLowerCase()}var gs=class extends gc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=lD(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=cD(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=OE(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,i,r,o,s){Se(22);let a=ne(null);try{let l=this.componentDef,c=hD(i,l,s,o),m=dD(l,r||this.ngModule,e),b=uD(m),w=b.rendererFactory.createRenderer(null,l),E=i?d1(w,i,l.encapsulation,m):pD(l,w);fD(E?.tagName);let P=s?.some(Y0)||o?.some(j=>typeof j!="function"&&j.bindings.some(Y0)),B=gf(null,c,null,512|Y_(l),null,null,b,w,m,null,R_(E,m,!0));B[Ne]=E,wl(B);let W=null;try{let j=Of(Ne,B,2,"#host",()=>c.directiveRegistry,!0,0);G_(w,E,j),to(E,B),hc(c,B,j),cf(c,j,B),Rf(c,j),t!==void 0&&gD(j,this.ngContentSelectors,t),W=Zt(j.index,B),B[We]=W[We],kf(c,B,null)}catch(j){throw W!==null&&Dp(W),Dp(B),j}finally{Se(23),El()}return new Kl(this.componentType,B,!!P)}finally{ne(a)}}};function hD(n,e,t,i){let r=n?["ng-version","20.3.29"]:RE(e.selectors[0]),o=null,s=null,a=0;if(t)for(let m of t)a+=m[Fp].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 b=i[m];if(typeof b!="function")for(let w of b.bindings){a+=w[Fp].requiredVars;let E=m+1;w.create&&(w.targetIdx=E,(o??=[]).push(w)),w.update&&(w.targetIdx=E,(s??=[]).push(w))}}let l=[e];if(i)for(let m of i){let b=typeof m=="function"?m:m.type,w=Au(b);l.push(w)}return mf(0,null,mD(o,s),1,a,l,null,null,null,[r],null)}function mD(n,e){return!n&&!e?null:t=>{if(t&1&&n)for(let i of n)i.create();if(t&2&&e)for(let i of e)i.update()}}function Y0(n){let e=n[Fp].kind;return e==="input"||e==="twoWay"}var Kl=class extends Mv{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,i){super(),this._rootLView=t,this._hasInputBindings=i,this._tNode=ts(t[J],Ne),this.location=oo(this._tNode,t),this.instance=Zt(this._tNode.index,t)[We],this.hostView=this.changeDetectorRef=new pi(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=If(i,r[J],r,e,t);this.previousInputValues.set(e,t);let s=Zt(i.index,r);Pf(s,1)}get injector(){return new Ji(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function gD(n,e,t){let i=n.projection=[];for(let r=0;r<e.length;r++){let o=t[r];i.push(o!=null&&o.length?Array.from(o):null)}}var mi=(()=>{class n{static __NG_ELEMENT_ID__=_D}return n})();function _D(){let n=Je();return Vv(n,te())}var vD=mi,Fv=class extends vD{_lContainer;_hostTNode;_hostLView;constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return oo(this._hostTNode,this._hostLView)}get injector(){return new Ji(this._hostTNode,this._hostLView)}get parentInjector(){let e=of(this._hostTNode,this._hostLView);if(h_(e)){let t=Bl(e,this._hostLView),i=Vl(e),r=t[J].data[i+8];return new Ji(r,t)}else return new Ji(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Q0(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-He}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Yl(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,no(this._hostTNode,s)),a}createComponent(e,t,i,r,o,s,a){let l=e&&!fw(e),c;if(l)c=t;else{let W=t||{};c=W.index,i=W.injector,r=W.projectableNodes,o=W.environmentInjector||W.ngModuleRef,s=W.directives,a=W.bindings}let m=l?e:new gs(Ui(e)),b=i||this.parentInjector;if(!o&&m.ngModule==null){let j=(l?b:this.parentInjector).get(kt,null);j&&(o=j)}let w=Ui(m.componentType??{}),E=Yl(this._lContainer,w?.id??null),P=E?.firstChild??null,B=m.create(b,r,P,o,s,a);return this.insertImpl(B.hostView,c,no(this._hostTNode,E)),B}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(r0(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Xe],c=new Fv(l,l[wt],l[Xe]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return Ts(s,r,o,i),e.attachToViewContainerRef(),Ou(mp(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=Q0(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=ms(this._lContainer,t);i&&(Yo(mp(this._lContainer),t),pc(i[J],i))}detach(e){let t=this._adjustIndex(e,-1),i=ms(this._lContainer,t);return i&&Yo(mp(this._lContainer),t)!=null?new pi(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function Q0(n){return n[es]}function mp(n){return n[es]||(n[es]=[])}function Vv(n,e){let t,i=e[n.index];return cn(i)?t=i:(t=wv(i,e,null,n),e[n.index]=t,_f(e,t)),yD(t,e,n,i),new Fv(t,n,e)}function bD(n,e){let t=n[Ie],i=t.createComment(""),r=Pt(e,n),o=t.parentNode(r);return zl(t,o,i,t.nextSibling(r),!1),i}var yD=wD,CD=()=>!1;function xD(n,e,t){return CD(n,e,t)}function wD(n,e,t,i){if(n[ri])return;let r;t.type&8?r=qt(i):r=bD(e,t),n[ri]=r}var Bp=class n{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},jp=class n{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let i=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<i;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)Vf(e,t).matches!==null&&this.queries[t].setDirty()}},$p=class{flags;read;predicate;constructor(e,t,i=null){this.flags=t,this.read=i,typeof e=="string"?this.predicate=ID(e):this.predicate=e}},Hp=class n{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){let r=t!==null?t.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,t!==null?t.push(o):t=[o])}return t!==null?new n(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Up=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new n(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,i=e.parent;for(;i!==null&&i.type&8&&i.index!==t;)i=i.parent;return t===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(e,t,ED(t,o)),this.matchTNodeWithReadOption(e,t,Nl(t,e,o,!1,!1))}else i===fi?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Nl(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===hn||r===mi||r===fi&&t.type&4)this.addMatch(t.index,-2);else{let o=Nl(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,i)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function ED(n,e){let t=n.localNames;if(t!==null){for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1]}return null}function DD(n,e){return n.type&11?oo(n,e):n.type&4?mc(n,e):null}function SD(n,e,t,i){return t===-1?DD(e,n):t===-2?TD(n,e,i):ps(n,n[J],t,e)}function TD(n,e,t){if(t===hn)return oo(e,n);if(t===fi)return mc(e,n);if(t===mi)return Vv(e,n)}function Bv(n,e,t,i){let r=e[Tn].queries[i];if(r.matches===null){let o=n.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let m=o[c];a.push(SD(e,m,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function zp(n,e,t,i){let r=n.queries.getByIndex(t),o=r.matches;if(o!==null){let s=Bv(n,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],m=e[-l];for(let b=He;b<m.length;b++){let w=m[b];w[Fn]===w[Xe]&&zp(w[J],w,c,i)}if(m[Zi]!==null){let b=m[Zi];for(let w=0;w<b.length;w++){let E=b[w];zp(E[J],E,c,i)}}}}}return i}function Ff(n,e){return n[Tn].queries[e].queryList}function MD(n,e,t){let i=new Hl((t&4)===4);return a0(n,e,i,i.destroy),(e[Tn]??=new jp).queries.push(new Bp(i))-1}function jv(n,e,t){let i=Ue();return i.firstCreatePass&&(kD(i,new $p(n,e,t),-1),(e&2)===2&&(i.staticViewQueries=!0)),MD(i,te(),e)}function ID(n){return n.split(",").map(e=>e.trim())}function kD(n,e,t){n.queries===null&&(n.queries=new Hp),n.queries.track(new Up(e,t))}function Vf(n,e){return n.queries.getByIndex(e)}function $v(n,e){let t=n[J],i=Vf(t,e);return i.crossesNgTemplate?zp(t,n,e,[]):Bv(t,n,i,e)}function Hv(n,e,t){let i,r=Oo(()=>{i._dirtyCounter();let o=OD(i,n);if(e&&o===void 0)throw new Z(-951,!1);return o});return i=r[rt],i._dirtyCounter=x(0),i._flatValue=void 0,r}function Uv(n){return Hv(!0,!1,n)}function zv(n){return Hv(!0,!0,n)}function PD(n,e){let t=n[rt];t._lView=te(),t._queryIndex=e,t._queryList=Ff(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(i=>i+1))}function OD(n,e){let t=n._lView,i=n._queryIndex;if(t===void 0||i===void 0||t[ie]&4)return e?void 0:zt;let r=Ff(t,i),o=$v(t,i);return r.reset(o,w_),e?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var _s=class{};var vs=class extends _s{injector;componentFactoryResolver=new Vp(this);instance=null;constructor(e){super();let t=new Bi([...e.providers,{provide:_s,useValue:this},{provide:_c,useValue:this.componentFactoryResolver}],e.parent||Xo(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Gv(n,e,t=null){return new vs({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var RD=(()=>{class n{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let i=Lu(!1,t.type),r=i.length>0?Gv([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=re({token:n,providedIn:"environment",factory:()=>new n(me(kt))})}return n})();function de(n){return tc(()=>{let e=Wv(n),t=se(U({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===sf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(RD).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||jn.Emulated,styles:n.styles||zt,_:null,schemas:n.schemas||null,tView:null,id:""});e.standalone&&Rn("NgStandalone"),qv(t);let i=n.dependencies;return t.directiveDefs=K0(i,ND),t.pipeDefs=K0(i,Zg),t.id=FD(t),t})}function ND(n){return Ui(n)||Au(n)}function AD(n,e){if(n==null)return ii;let t={};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=ac.None,l=null),t[o]=[i,a,l],e[o]=s}return t}function LD(n){if(n==null)return ii;let e={};for(let t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function gi(n){return tc(()=>{let e=Wv(n);return qv(e),e})}function bc(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 Wv(n){let e={};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:e,inputConfig:n.inputs||ii,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||zt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:AD(n.inputs,e),outputs:LD(n.outputs),debugInfo:null}}function qv(n){n.features?.forEach(e=>e(n))}function K0(n,e){return n?()=>{let t=typeof n=="function"?n():n,i=[];for(let r of t){let o=e(r);o!==null&&i.push(o)}return i}:null}function FD(n){let e=0,t=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,t,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("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function VD(n){return Object.getPrototypeOf(n.prototype).constructor}function Ms(n){let e=VD(n.type),t=!0,i=[n];for(;e;){let r;if(In(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Z(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=gp(n.inputs),s.declaredInputs=gp(n.declaredInputs),s.outputs=gp(n.outputs);let a=r.hostBindings;a&&UD(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&$D(n,l),c&&HD(n,c),BD(n,r),Vg(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===Ms&&(t=!1)}}e=Object.getPrototypeOf(e)}jD(i)}function BD(n,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||n.inputs.hasOwnProperty(t))continue;let i=e.inputs[t];i!==void 0&&(n.inputs[t]=i,n.declaredInputs[t]=e.declaredInputs[t])}}function jD(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=eo(r.hostAttrs,t=eo(t,r.hostAttrs))}}function gp(n){return n===ii?{}:n===zt?[]:n}function $D(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function HD(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function UD(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function Zv(n,e,t,i,r,o,s,a){if(t.firstCreatePass){n.mergedAttrs=eo(n.mergedAttrs,n.attrs);let m=n.tView=mf(2,n,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,n),m.queries=t.queries.embeddedTView(n))}a&&(n.flags|=a),qr(n,!1);let l=GD(t,e,n,i);Dl()&&Ef(t,e,l,n),to(l,e);let c=wv(l,e,l,n);e[i+Ne]=c,_f(e,c),xD(c,n,e)}function zD(n,e,t,i,r,o,s,a,l,c,m){let b=t+Ne,w;return e.firstCreatePass?(w=so(e,b,4,s||null,a||null),yl()&&kv(e,n,w,Yt(e.consts,c),Sf),p_(e,w)):w=e.data[b],Zv(w,n,e,t,i,r,o,l),Gr(w)&&hc(e,n,w),c!=null&&Ds(n,w,m),w}function bs(n,e,t,i,r,o,s,a,l,c,m){let b=t+Ne,w;if(e.firstCreatePass){if(w=so(e,b,4,s||null,a||null),c!=null){let E=Yt(e.consts,c);w.localNames=[];for(let P=0;P<E.length;P+=2)w.localNames.push(E[P],-1)}}else w=e.data[b];return Zv(w,n,e,t,i,r,o,l),c!=null&&Ds(n,w,m),w}function ao(n,e,t,i,r,o,s,a){let l=te(),c=Ue(),m=Yt(c.consts,o);return zD(l,c,n,e,t,i,r,m,void 0,s,a),ao}var GD=WD;function WD(n,e,t,i){return as(!0),e[Ie].createComment("")}var Bf=new ee("");function Is(n){return!!n&&typeof n.then=="function"}function yc(n){return!!n&&typeof n.subscribe=="function"}var Yv=new ee("");var jf=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i});appInits=k(Yv,{optional:!0})??[];injector=k(xt);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Hr(this.injector,r);if(Is(o))t.push(o);else if(yc(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),t.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Qv=new ee("");function Kv(){Wd(()=>{let n="";throw new Z(600,n)})}function Xv(n){return n.isBoundToModule}var qD=10;var or=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=k(dn);afterRenderManager=k(cc);zonelessEnabled=k(ls);rootEffectScheduler=k(cs);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=k(li);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Ge(t=>!t))}constructor(){k(hi,{optional:!0})}whenStable(){let t;return new Promise(i=>{t=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{t.unsubscribe()})}_injector=k(kt);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,i){return this.bootstrapImpl(t,i)}bootstrapImpl(t,i,r=xt.NULL){return this._injector.get(Te).run(()=>{Se(10);let s=t instanceof gc;if(!this._injector.get(jf).done){let P="";throw new Z(405,P)}let l;s?l=t:l=this._injector.get(_c).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=Xv(l)?void 0:this._injector.get(_s),m=i||l.selector,b=l.create(r,[],m,c),w=b.location.nativeElement,E=b.injector.get(Bf,null);return E?.registerApplication(w),b.onDestroy(()=>{this.detachView(b.hostView),us(this.components,b),E?.unregisterApplication(w)}),this._loadComponent(b),Se(11,b),b})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Se(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(lc.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Z(101,!1);let t=ne(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ne(t),this.afterTick.next(),Se(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(On,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<qD;)Se(14),this.synchronizeOnce(),Se(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!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&&!ns(r))continue;let o=i&&!this.zonelessEnabled?0:1;bv(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>ns(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){let i=t;us(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Qv,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>us(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Z(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function us(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function ZD(){let n,e;return{promise:new Promise((i,r)=>{n=i,e=r}),resolve:n,reject:e}}function ce(n,e,t,i){let r=te(),o=Qi();if(Kt(r,o,e)){let s=Ue(),a=ss();b1(a,r,n,e,t,i)}return ce}var Jv=new ee("",{providedIn:"root",factory:()=>!1});var YD=!1,ks=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function eb(n){return n[Et].get(Jv,YD)}function QD(n,e,t){let i=io.get(n);if(i){for(let r of e)i.classList.push(r);for(let r of t)i.cleanupFns.push(r)}else io.set(n,{classList:e,cleanupFns:t})}function $f(n){let e=io.get(n);if(e){for(let t of e.cleanupFns)t();io.delete(n)}er.delete(n)}var io=new WeakMap,er=new WeakMap,Jr=new WeakMap;function X0(n,e){let t=Jr.get(n);if(t&&t.length>0){let i=t.findIndex(r=>r===e);i>-1&&t.splice(i,1)}t?.length===0&&Jr.delete(n)}function tb(n,e){let t=Jr.get(n)?.shift(),i=e[Fn];if(i){let o=Zl(n.index,i)?.previousSibling;t&&o&&t===o&&t.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))}}function KD(n,e){Jr.has(n)?Jr.get(n)?.push(e):Jr.set(n,[e])}function J0(n){let e=n[Bn]??={};return e.enter??=new Map}function Cc(n){let e=n[Bn]??={};return e.leave??=new Map}function nb(n){let e=typeof n=="function"?n():n,t=Array.isArray(e)?e:null;return typeof e=="string"&&(t=e.trim().split(/\s+/).filter(i=>i)),t}function XD(n,e){if(!ks)return;let t=io.get(n);if(t&&t.classList.length>0&&JD(n,t.classList))for(let i of t.classList)e.removeClass(n,i);$f(n)}function JD(n,e){for(let t of e)if(n.classList.contains(t))return!0;return!1}function ib(n,e){let t=er.get(e);return t===void 0?!0:e===n.target&&(t.animationName!==void 0&&n.animationName===t.animationName||t.propertyName!==void 0&&n.propertyName===t.propertyName)}function rb(n,e,t){let i=n.get(e.index)??{animateFns:[]};i.animateFns.push(t),n.set(e.index,i)}function e_(n,e){if(n)for(let t of n)t();for(let t of e)t()}function t_(n,e){let t=Cc(n).get(e.index);t&&(t.resolvers=void 0)}function ci(n){if(Rn("NgAnimateEnter"),!ks)return ci;let e=te();if(eb(e))return ci;let t=Je();return tb(t,e),rb(J0(e),t,()=>eS(e,t,n)),ov(e[Et]),sv(e[Et],J0(e)),ci}function eS(n,e,t){let i=Pt(e,n),r=n[Ie],o=n[Et].get(Te),s=nb(t),a=[],l=m=>{if(m.target!==i)return;let b=m instanceof AnimationEvent?"animationend":"transitionend";o.runOutsideAngular(()=>{r.listen(i,b,c)})},c=m=>{m.target===i&&tS(m,i,r)};if(s&&s.length>0){o.runOutsideAngular(()=>{a.push(r.listen(i,"animationstart",l)),a.push(r.listen(i,"transitionstart",l))}),QD(i,s,a);for(let m of s)r.addClass(i,m);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(ev(i,er,ks),!er.has(i)){for(let m of s)r.removeClass(i,m);$f(i)}})})}}function tS(n,e,t){let i=io.get(e);if(!(n.target!==e||!i)&&ib(n,e)){n.stopImmediatePropagation();for(let r of i.classList)t.removeClass(e,r);$f(e)}}function di(n){if(Rn("NgAnimateLeave"),!ks)return di;let e=te();if(eb(e))return di;let i=Je();return tb(i,e),rb(Cc(e),i,()=>nS(e,i,n)),ov(e[Et]),di}function nS(n,e,t){let{promise:i,resolve:r}=ZD(),o=Pt(e,n),s=n[Ie],a=n[Et].get(Te);ui.add(n),(Cc(n).get(e.index).resolvers??=[]).push(r);let l=nb(t);return l&&l.length>0?iS(o,e,n,l,s,a):r(),{promise:i,resolve:r}}function iS(n,e,t,i,r,o){XD(n,r);let s=[],a=Cc(t).get(e.index)?.resolvers,l=c=>{if(c.target===n&&(c instanceof CustomEvent||ib(c,n))){if(c.stopImmediatePropagation(),er.delete(n),X0(e,n),Array.isArray(e.projection))for(let m of i)r.removeClass(n,m);e_(a,s),t_(t,e)}};o.runOutsideAngular(()=>{s.push(r.listen(n,"animationend",l)),s.push(r.listen(n,"transitionend",l))}),KD(e,n);for(let c of i)r.addClass(n,c);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{ev(n,er,ks),er.has(n)||(X0(e,n),e_(a,s),t_(t,e))})})}var Gp=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),r=Math.max(e,t),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(e,t){this.attach(t,this.detach(e))}};function _p(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function rS(n,e,t){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=n.at(o),m=e[o],b=_p(o,c,o,m,t);if(b!==0){b<0&&n.updateValue(o,m),o++;continue}let w=n.at(s),E=e[l],P=_p(s,w,l,E,t);if(P!==0){P<0&&n.updateValue(s,E),s--,l--;continue}let B=t(o,c),W=t(s,w),j=t(o,m);if(Object.is(j,W)){let _e=t(l,E);Object.is(_e,B)?(n.swap(o,s),n.updateValue(s,E),l--,s--):n.move(s,o),n.updateValue(o,m),o++;continue}if(i??=new Xl,r??=i_(n,o,s,t),Wp(n,i,o,j))n.updateValue(o,m),o++,s++;else if(r.has(j))i.set(B,n.detach(o)),s--;else{let _e=n.create(o,e[o]);n.attach(o,_e),o++,s++}}for(;o<=l;)n_(n,i,t,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let m=n.at(o),b=c.value,w=_p(o,m,o,b,t);if(w!==0)w<0&&n.updateValue(o,b),o++,c=l.next();else{i??=new Xl,r??=i_(n,o,s,t);let E=t(o,b);if(Wp(n,i,o,E))n.updateValue(o,b),o++,s++,c=l.next();else if(!r.has(E))n.attach(o,n.create(o,b)),o++,s++,c=l.next();else{let P=t(o,m);i.set(P,n.detach(o)),s--}}}for(;!c.done;)n_(n,i,t,n.length,c.value),c=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function Wp(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function n_(n,e,t,i,r){if(Wp(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function i_(n,e,t,i){let r=new Set;for(let o=e;o<=t;o++)r.add(i(o,n.at(o)));return r}var Xl=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,t)}}};function T(n,e,t,i,r,o,s,a){Rn("NgControlFlow");let l=te(),c=Ue(),m=Yt(c.consts,o);return bs(l,c,n,e,t,i,r,m,256,s,a),Ps}function Ps(n,e,t,i,r,o,s,a){Rn("NgControlFlow");let l=te(),c=Ue(),m=Yt(c.consts,o);return bs(l,c,n,e,t,i,r,m,512,s,a),Ps}function M(n,e){Rn("NgControlFlow");let t=te(),i=Qi(),r=t[i]!==ct?t[i]:-1,o=r!==-1?Jl(t,Ne+r):void 0,s=0;if(Kt(t,i,n)){let a=ne(null);try{if(o!==void 0&&Dv(o,s),n!==-1){let l=Ne+n,c=Jl(t,l),m=Qp(t[J],l),b=Tv(c,m,t),w=Ss(t,m,e,{dehydratedView:b});Ts(c,w,s,no(m,b))}}finally{ne(a)}}else if(o!==void 0){let a=Ev(o,s);a!==void 0&&(a[We]=e)}}var qp=class{lContainer;$implicit;$index;constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-He}};function Hn(n){return n}function gn(n,e){return e}var Zp=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function K(n,e,t,i,r,o,s,a,l,c,m,b,w){Rn("NgControlFlow");let E=te(),P=Ue(),B=l!==void 0,W=te(),j=a?s.bind(W[Dt][We]):s,_e=new Zp(B,j);W[Ne+n]=_e,bs(E,P,n+1,e,t,i,r,Yt(P.consts,o),256),B&&bs(E,P,n+2,l,c,m,b,Yt(P.consts,w),512)}var Yp=class extends Gp{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i}get length(){return this.lContainer.length-He}at(e){return this.getLView(e)[We].$implicit}attach(e,t){let i=t[zi];this.needsIndexUpdate||=e!==this.length,Ts(this.lContainer,t,e,no(this.templateTNode,i)),oS(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,sS(this.lContainer,e),aS(this.lContainer,e)}create(e,t){let i=Yl(this.lContainer,this.templateTNode.tView.ssrId),r=Ss(this.hostLView,this.templateTNode,new qp(this.lContainer,t,e),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(e){pc(e[J],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[We].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[We].$index=e}getLView(e){return lS(this.lContainer,e)}};function X(n){let e=ne(null),t=Qt();try{let i=te(),r=i[J],o=i[t],s=t+1,a=Jl(i,s);if(o.liveCollection===void 0){let c=Qp(r,s);o.liveCollection=new Yp(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(rS(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let c=Qi(),m=l.length===0;if(Kt(i,c,m)){let b=t+2,w=Jl(i,b);if(m){let E=Qp(r,b),P=Tv(w,E,i),B=Ss(i,E,void 0,{dehydratedView:P});Ts(w,B,0,no(E,P))}else r.firstUpdatePass&&U1(w),Dv(w,0)}}}finally{ne(e)}}function Jl(n,e){return n[e]}function oS(n,e){if(n.length<=He)return;let t=He+e,i=n[t],r=i?i[Bn]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Et];QE(o,r),ui.delete(i),r.detachedLeaveAnimationFns=void 0}}function sS(n,e){if(n.length<=He)return;let t=He+e,i=n[t],r=i?i[Bn]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function aS(n,e){return ms(n,e)}function lS(n,e){return Ev(n,e)}function Qp(n,e){return ts(n,e)}function I(n,e,t){let i=te(),r=Qi();if(Kt(i,r,e)){let o=Ue(),s=ss();h1(s,i,n,e,i[Ie],t)}return I}function Kp(n,e,t,i,r){If(e,n,t,r?"class":"style",i)}function f(n,e,t,i){let r=te(),o=r[J],s=n+Ne,a=o.firstCreatePass?Of(s,r,2,e,Sf,yl(),t,i):o.data[s];if(Tf(a,r,n,e,ob),Gr(a)){let l=r[J];hc(l,r,a),cf(l,a,r)}return i!=null&&Ds(r,a),f}function h(){let n=Ue(),e=Je(),t=Mf(e);return n.firstCreatePass&&Rf(n,t),Ju(t)&&ep(),Ku(),t.classesWithoutHost!=null&&bw(t)&&Kp(n,t,te(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&yw(t)&&Kp(n,t,te(),t.stylesWithoutHost,!1),h}function z(n,e,t,i){return f(n,e,t,i),h(),z}function y(n,e,t,i){let r=te(),o=r[J],s=n+Ne,a=o.firstCreatePass?iD(s,o,2,e,t,i):o.data[s];return Tf(a,r,n,e,ob),i!=null&&Ds(r,a),y}function C(){let n=Je(),e=Mf(n);return Ju(e)&&ep(),Ku(),C}function ae(n,e,t,i){return y(n,e,t,i),C(),ae}var ob=(n,e,t,i,r)=>(as(!0),H_(e[Ie],i,lp()));function Hf(n,e,t){let i=te(),r=i[J],o=n+Ne,s=r.firstCreatePass?Of(o,i,8,"ng-container",Sf,yl(),e,t):r.data[o];if(Tf(s,i,n,"ng-container",cS),Gr(s)){let a=i[J];hc(a,i,s),cf(a,s,i)}return t!=null&&Ds(i,s),Hf}function Uf(){let n=Ue(),e=Je(),t=Mf(e);return n.firstCreatePass&&Rf(n,t),Uf}function sr(n,e,t){return Hf(n,e,t),Uf(),sr}var cS=(n,e,t,i,r)=>(as(!0),gE(e[Ie],""));function R(){return te()}function Y(n,e,t){let i=te(),r=Qi();if(Kt(i,r,e)){let o=Ue(),s=ss();fv(s,i,n,e,i[Ie],t)}return Y}var kl=void 0;function dS(n){let e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var uS=["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"]],kl,[["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"]],kl,[["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}",kl,"{1} 'at' {0}",kl],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",dS],vp={};function Ft(n){let e=pS(n),t=r_(e);if(t)return t;let i=e.split("-")[0];if(t=r_(i),t)return t;if(i==="en")return uS;throw new Z(701,!1)}function r_(n){if(!(n in vp)){let e=sn.ng&&sn.ng.common&&sn.ng.common.locales&&sn.ng.common.locales[n];return e!==void 0&&(vp[n]=e),e}return vp[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 pS(n){return n.toLowerCase().replace(/_/g,"-")}var Os="en-US";var fS=Os;function sb(n){typeof n=="string"&&(fS=n.toLowerCase().replace(/_/g,"-"))}function D(n,e,t){let i=te(),r=Ue(),o=Je();return hS(r,i,i[Ie],o,n,e,t),D}function V(n,e,t){let i=te(),r=Ue(),o=Je();return(o.type&3||t)&&Nv(o,r,i,t,i[Ie],n,e,Ll(o,i,e)),V}function hS(n,e,t,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Ll(i,e,o),Nv(i,n,e,s,t,r,o,l)&&(a=!1)),a){let c=i.outputs?.[r],m=i.hostDirectiveOutputs?.[r];if(m&&m.length)for(let b=0;b<m.length;b+=2){let w=m[b],E=m[b+1];l??=Ll(i,e,o),Z0(i,e,w,E,r,l)}if(c&&c.length)for(let b of c)l??=Ll(i,e,o),Z0(i,e,b,r,r,l)}}function u(n=1){return y0(n)}function mS(n,e){let t=null,i=TE(n);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(i===null?Z_(n,o,!0):kE(i,o))return r}return t}function zf(n){let e=te()[Dt][wt];if(!e.projection){let t=n?n.length:1,i=e.projection=Wg(t,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=n?mS(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function Gf(n,e=0,t,i,r,o){let s=te(),a=Ue(),l=i?n+1:null;l!==null&&bs(s,a,l,i,r,o,null,t);let c=so(a,Ne+n,16,null,t||null);c.projection===null&&(c.projection=e),ip();let b=!s[zi]||Xu();s[Dt][wt].projection[c.projection]===null&&l!==null?gS(s,a,l):b&&!oc(c)&&a1(a,s,c)}function gS(n,e,t){let i=Ne+t,r=e.data[i],o=n[i],s=Yl(o,r.tView.ssrId),a=Ss(n,r,void 0,{dehydratedView:s});Ts(o,a,0,no(r,s))}function Wf(n,e,t){jv(n,e,t)}function qf(n){let e=te(),t=Ue(),i=xl();os(i+1);let r=Vf(t,i);if(n.dirty&&i0(e)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=$v(e,i);n.reset(o,w_),n.notifyOnChanges()}return!0}return!1}function Zf(){return Ff(te(),xl())}function Vt(n,e,t,i){PD(n,jv(e,t,i))}function _n(n=1){os(xl()+n)}function _i(n){let e=u0();return _l(e,Ne+n)}function Pl(n,e){return n<<17|e<<2}function nr(n){return n>>17&32767}function _S(n){return(n&2)==2}function vS(n,e){return n&131071|e<<17}function Xp(n){return n|2}function ro(n){return(n&131068)>>2}function bp(n,e){return n&-131069|e<<2}function bS(n){return(n&1)===1}function Jp(n){return n|1}function yS(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=nr(s),l=ro(s);n[i]=t;let c=!1,m;if(Array.isArray(t)){let b=t;m=b[1],(m===null||$r(b,m)>0)&&(c=!0)}else m=t;if(r)if(l!==0){let w=nr(n[a+1]);n[i+1]=Pl(w,a),w!==0&&(n[w+1]=bp(n[w+1],i)),n[a+1]=vS(n[a+1],i)}else n[i+1]=Pl(a,0),a!==0&&(n[a+1]=bp(n[a+1],i)),a=i;else n[i+1]=Pl(l,0),a===0?a=i:n[l+1]=bp(n[l+1],i),l=i;c&&(n[i+1]=Xp(n[i+1])),o_(n,m,i,!0),o_(n,m,i,!1),CS(e,m,n,i,o),s=Pl(a,l),o?e.classBindings=s:e.styleBindings=s}function CS(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&$r(o,e)>=0&&(t[i+1]=Jp(t[i+1]))}function o_(n,e,t,i){let r=n[t+1],o=e===null,s=i?nr(r):ro(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];xS(l,e)&&(a=!0,n[s+1]=i?Jp(c):Xp(c)),s=i?nr(c):ro(c)}a&&(n[t+1]=i?Xp(r):Jp(r))}function xS(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?$r(n,e)>=0:!1}var pn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function wS(n){return n.substring(pn.key,pn.keyEnd)}function ES(n){return DS(n),ab(n,lb(n,0,pn.textEnd))}function ab(n,e){let t=pn.textEnd;return t===e?-1:(e=pn.keyEnd=SS(n,pn.key=e,t),lb(n,e,t))}function DS(n){pn.key=0,pn.keyEnd=0,pn.value=0,pn.valueEnd=0,pn.textEnd=n.length}function lb(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function SS(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}function ue(n,e,t){return cb(n,e,t,!1),ue}function ge(n,e){return cb(n,e,null,!0),ge}function dt(n){MS(NS,TS,n,!0)}function TS(n,e){for(let t=ES(e);t>=0;t=ab(e,t))hl(n,wS(e),!0)}function cb(n,e,t,i){let r=te(),o=Ue(),s=rs(2);if(o.firstUpdatePass&&ub(o,n,s,i),e!==ct&&Kt(r,s,e)){let a=o.data[Qt()];pb(o,a,r,r[Ie],n,r[s+1]=LS(e,t),i,s)}}function MS(n,e,t,i){let r=Ue(),o=rs(2);r.firstUpdatePass&&ub(r,null,o,i);let s=te();if(t!==ct&&Kt(s,o,t)){let a=r.data[Qt()];if(fb(a,i)&&!db(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=cl(l,t||"")),Kp(r,a,s,t,i)}else AS(r,a,s,s[Ie],s[o+1],s[o+1]=RS(n,e,t),i,o)}}function db(n,e){return e>=n.expandoStartIndex}function ub(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[Qt()],s=db(n,t);fb(o,i)&&e===null&&!s&&(e=!1),e=IS(r,o,e,i),yS(r,o,e,t,s,i)}}function IS(n,e,t,i){let r=g0(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=yp(null,n,e,t,i),t=ys(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=yp(r,n,e,t,i),o===null){let l=kS(n,e,i);l!==void 0&&Array.isArray(l)&&(l=yp(null,n,e,l[1],i),l=ys(l,e.attrs,i),PS(n,e,i,l))}else o=OS(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function kS(n,e,t){let i=t?e.classBindings:e.styleBindings;if(ro(i)!==0)return n[nr(i)]}function PS(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[nr(r)]=i}function OS(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=ys(i,s,t)}return ys(i,e.attrs,t)}function yp(n,e,t,i,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],i=ys(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(t.directiveStylingLast=a),i}function ys(n,e,t){let i=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),hl(n,s,t?!0:e[++o]))}return n===void 0?null:n}function RS(n,e,t){if(t==null||t==="")return zt;let i=[],r=ws(t);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"&&e(i,r);return i}function NS(n,e,t){let i=String(e);i!==""&&!i.includes(" ")&&hl(n,i,t)}function AS(n,e,t,i,r,o,s,a){r===ct&&(r=zt);let l=0,c=0,m=0<r.length?r[0]:null,b=0<o.length?o[0]:null;for(;m!==null||b!==null;){let w=l<r.length?r[l+1]:void 0,E=c<o.length?o[c+1]:void 0,P=null,B;m===b?(l+=2,c+=2,w!==E&&(P=b,B=E)):b===null||m!==null&&m<b?(l+=2,P=m):(c+=2,P=b,B=E),P!==null&&pb(n,e,t,i,P,B,s,a),m=l<r.length?r[l]:null,b=c<o.length?o[c]:null}}function pb(n,e,t,i,r,o,s,a){if(!(e.type&3))return;let l=n.data,c=l[a+1],m=bS(c)?s_(l,e,t,r,ro(c),s):void 0;if(!ec(m)){ec(o)||_S(c)&&(o=s_(l,null,t,r,a,s));let b=zu(Qt(),t);c1(i,s,b,r,o)}}function s_(n,e,t,i,r,o){let s=e===null,a;for(;r>0;){let l=n[r],c=Array.isArray(l),m=c?l[1]:l,b=m===null,w=t[r+1];w===ct&&(w=b?zt:void 0);let E=b?ml(w,i):m===i?w:void 0;if(c&&!ec(E)&&(E=ml(l,i)),ec(E)&&(a=E,s))return a;let P=n[r+1];r=s?nr(P):ro(P)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=ml(l,i))}return a}function ec(n){return n!==void 0}function LS(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=ti(ws(n)))),n}function fb(n,e){return(n.flags&(e?8:16))!==0}function p(n,e=""){let t=te(),i=Ue(),r=n+Ne,o=i.firstCreatePass?so(i,r,1,e,null):i.data[r],s=FS(i,t,o,e,n);t[r]=s,Dl()&&Ef(i,t,s,o),qr(o,!1)}var FS=(n,e,t,i,r)=>(as(!0),hE(e[Ie],i));function VS(n,e,t,i=""){return Kt(n,Qi(),t)?e+an(t)+i:ct}function BS(n,e,t,i,r,o=""){let s=op(),a=Lf(n,s,t,r);return rs(2),a?e+an(t)+i+an(r)+o:ct}function jS(n,e,t,i,r,o,s,a=""){let l=op(),c=oD(n,l,t,r,s);return rs(3),c?e+an(t)+i+an(r)+o+an(s)+a:ct}function O(n){return q("",n),O}function q(n,e,t){let i=te(),r=VS(i,n,e,t);return r!==ct&&Yf(i,Qt(),r),q}function lo(n,e,t,i,r){let o=te(),s=BS(o,n,e,t,i,r);return s!==ct&&Yf(o,Qt(),s),lo}function xc(n,e,t,i,r,o,s){let a=te(),l=jS(a,n,e,t,i,r,o,s);return l!==ct&&Yf(a,Qt(),l),xc}function Yf(n,e,t){let i=zu(e,n);mE(n[Ie],i,t)}function $S(n,e,t){let i=Ue();if(i.firstCreatePass){let r=In(n);ef(t,i.data,i.blueprint,r,!0),ef(e,i.data,i.blueprint,r,!1)}}function ef(n,e,t,i,r){if(n=ft(n),Array.isArray(n))for(let o=0;o<n.length;o++)ef(n[o],e,t,i,r);else{let o=Ue(),s=te(),a=Je(),l=Vi(n)?n:ft(n.provide),c=Vu(n),m=a.providerIndexes&1048575,b=a.directiveStart,w=a.providerIndexes>>20;if(Vi(n)||!n.multi){let E=new tr(c,r,mn,null),P=xp(l,e,r?m:m+w,b);P===-1?(Ep($l(a,s),o,l),Cp(o,n,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(E),s.push(E)):(t[P]=E,s[P]=E)}else{let E=xp(l,e,m+w,b),P=xp(l,e,m,m+w),B=E>=0&&t[E],W=P>=0&&t[P];if(r&&!W||!r&&!B){Ep($l(a,s),o,l);let j=zS(r?US:HS,t.length,r,i,c,n);!r&&W&&(t[P].providerFactory=j),Cp(o,n,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(j),s.push(j)}else{let j=hb(t[r?P:E],c,!r&&i);Cp(o,n,E>-1?E:P,j)}!r&&i&&W&&t[P].componentProviders++}}}function Cp(n,e,t,i){let r=Vi(e),o=Xg(e);if(r||o){let l=(o?ft(e.useClass):e).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){let m=c.indexOf(t);m===-1?c.push(t,[i,l]):c[m+1].push(i,l)}else c.push(t,l)}}}function hb(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function xp(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function HS(n,e,t,i,r){return tf(this.multi,[])}function US(n,e,t,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=ps(i,i[J],this.providerFactory.index,r);s=l.slice(0,a),tf(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],tf(o,s);return s}function tf(n,e){for(let t=0;t<n.length;t++){let i=n[t];e.push(i())}return e}function zS(n,e,t,i,r,o){let s=new tr(n,t,mn,null);return s.multi=[],s.index=e,s.componentProviders=0,hb(s,r,i&&!t),s}function Rs(n,e=[]){return t=>{t.providersResolver=(i,r)=>$S(i,r?r(n):n,e)}}function ar(n,e,t){let i=is()+n,r=te();return r[i]===ct?Af(r,i,t?e.call(t):e()):rD(r,i)}function co(n,e,t,i){return gb(te(),is(),n,e,t,i)}function mb(n,e){let t=n[e];return t===ct?void 0:t}function gb(n,e,t,i,r,o){let s=e+t;return Kt(n,s,r)?Af(n,s+1,o?i.call(o,r):i(r)):mb(n,s+1)}function GS(n,e,t,i,r,o,s){let a=e+t;return Lf(n,a,r,o)?Af(n,a+2,s?i.call(s,r,o):i(r,o)):mb(n,a+2)}function vi(n,e){let t=Ue(),i,r=n+Ne;t.firstCreatePass?(i=WS(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??=[]).push(r,i.onDestroy)):i=t.data[r];let o=i.factory||(i.factory=Fi(i.type,!0)),s,a=Ct(mn);try{let l=jl(!1),c=o();return jl(l),Gu(t,te(),r,c),c}finally{Ct(a)}}function WS(n,e){if(e)for(let t=e.length-1;t>=0;t--){let i=e[t];if(n===i.name)return i}}function Qf(n,e,t){let i=n+Ne,r=te(),o=_l(r,i);return _b(r,i)?gb(r,is(),e,o.transform,t,o):o.transform(t)}function uo(n,e,t,i){let r=n+Ne,o=te(),s=_l(o,r);return _b(o,r)?GS(o,is(),e,s.transform,t,i,s):s.transform(t,i)}function _b(n,e){return n[J].data[e].pure}function wc(n,e){return mc(n,e)}var qS=(()=>{class n{zone=k(Te);changeDetectionScheduler=k(Gt);applicationRef=k(or);applicationErrorHandler=k(dn);_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(t){this.applicationErrorHandler(t)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),vb=new ee("",{factory:()=>!1});function Kf({ngZoneFactory:n,ignoreChangesOutsideZone:e,scheduleInRootZone:t}){return n??=()=>new Te(se(U({},Jf()),{scheduleInRootZone:t})),[{provide:Te,useFactory:n},{provide:Hi,multi:!0,useFactory:()=>{let i=k(qS,{optional:!0});return()=>i.initialize()}},{provide:Hi,multi:!0,useFactory:()=>{let i=k(ZS);return()=>{i.initialize()}}},e===!0?{provide:dp,useValue:!0}:[],{provide:up,useValue:t??tv},{provide:dn,useFactory:()=>{let i=k(Te),r=k(kt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(At),o.handleError(s))})}}}]}function Xf(n){let e=n?.ignoreChangesOutsideZone,t=n?.scheduleInRootZone,i=Kf({ngZoneFactory:()=>{let r=Jf(n);return r.scheduleInRootZone=t,r.shouldCoalesceEventChangeDetection&&Rn("NgZone_CoalesceEvent"),new Te(r)},ignoreChangesOutsideZone:e,scheduleInRootZone:t});return Qo([{provide:vb,useValue:!0},{provide:ls,useValue:!1},i])}function Jf(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var ZS=(()=>{class n{subscription=new Ve;initialized=!1;zone=k(Te);pendingTasks=k(li);initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Te.assertNotInAngularZone(),queueMicrotask(()=>{t!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Te.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var bb=(()=>{class n{applicationErrorHandler=k(dn);appRef=k(or);taskService=k(li);ngZone=k(Te);zonelessEnabled=k(ls);tracing=k(hi,{optional:!0});disableScheduling=k(dp,{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(Wl):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(k(up,{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 ql||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&t===5)return;let i=!1;switch(t){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?V0:nv;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(t){return!(this.disableScheduling&&!t||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Wl+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 t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(t),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,V0(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function YS(){return typeof $localize<"u"&&$localize.locale||Os}var Ns=new ee("",{providedIn:"root",factory:()=>k(Ns,{optional:!0,skipSelf:!0})||YS()});var Ec=class{destroyed=!1;listeners=null;errorHandler=k(At,{optional:!0});destroyRef=k(et);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Z(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(ji(953,!1));return}if(this.listeners===null)return;let t=ne(null);try{for(let i of this.listeners)try{i(e)}catch(r){this.errorHandler?.handleError(r)}}finally{ne(t)}}};function tt(n){return Rg(n)}function $(n,e){return Oo(n,e?.equal)}var eh=class{[rt];constructor(e){this[rt]=e}destroy(){this[rt].destroy()}};function ye(n,e){let t=e?.injector??k(xt),i=e?.manualCleanup!==!0?t.get(et):null,r,o=t.get(Ki,null,{optional:!0}),s=t.get(Gt);return o!==null?(r=XS(o.view,s,n),i instanceof Zo&&i._lView===o.view&&(i=null)):r=JS(n,t.get(cs),s),r.injector=t,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new eh(r)}var yb=se(U({},Ng),{cleanupFns:void 0,zone:null,onDestroyFn:Xi,run(){let n=Zr(!1);try{Ag(this)}finally{Zr(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=ne(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ne(n)}}}),QS=se(U({},yb),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Kn(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),KS=se(U({},yb),{consumerMarkedDirty(){this.view[ie]|=8192,si(this.view),this.notifier.notify(13)},destroy(){Kn(this),this.onDestroyFn(),this.cleanup(),this.view[Vn]?.delete(this)}});function XS(n,e,t){let i=Object.create(KS);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=e,i.fn=Cb(i,t),n[Vn]??=new Set,n[Vn].add(i),i.consumerMarkedDirty(i),i}function JS(n,e,t){let i=Object.create(QS);return i.fn=Cb(i,n),i.scheduler=e,i.notifier=t,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function Cb(n,e){return()=>{e(t=>(n.cleanupFns??=[]).push(t))}}var Sb=Symbol("InputSignalNode#UNSET"),fT=se(U({},Ro),{transformFn:void 0,applyValueToInputSignal(n,e){Tr(n,e)}});function Tb(n,e){let t=Object.create(fT);t.value=n,t.transformFn=e?.transform;function i(){if(Si(t),t.value===Sb){let r=null;throw new Z(-950,r)}return t.value}return i[rt]=t,i}var hT=new ee("");hT.__NG_ELEMENT_ID__=n=>{let e=Je();if(e===null)throw new Z(204,!1);if(e.type&2)return e.value;if(n&8)return null;throw new Z(204,!1)};function G(n){return new Ec}function xb(n,e){return Tb(n,e)}function mT(n){return Tb(Sb,n)}var N=(xb.required=mT,xb);function wb(n,e){return Uv(e)}function gT(n,e){return zv(e)}var Xt=(wb.required=gT,wb);var nh=new ee(""),_T=new ee("");function As(n){return!n.moduleRef}function vT(n){let e=As(n)?n.r3Injector:n.moduleRef.injector,t=e.get(Te);return t.run(()=>{As(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(dn),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:i})}),As(n)){let o=()=>e.destroy(),s=n.platformInjector.get(nh);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(nh);s.add(o),n.moduleRef.onDestroy(()=>{us(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return yT(i,t,()=>{let o=e.get(li),s=o.add(),a=e.get(jf);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(Ns,Os);if(sb(l||Os),!e.get(_T,!0))return As(n)?e.get(or):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(As(n)){let m=e.get(or);return n.rootComponent!==void 0&&m.bootstrap(n.rootComponent),m}else return bT?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var bT;function yT(n,e,t){try{let i=t();return Is(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n(i)),i}}var Dc=null;function CT(n=[],e){return xt.create({name:e,providers:[{provide:Ko,useValue:"platform"},{provide:nh,useValue:new Set([()=>Dc=null])},...n]})}function xT(n=[]){if(Dc)return Dc;let e=CT(n);return Dc=e,Kv(),wT(e),e}function wT(n){let e=n.get(ic,null);Hr(n,()=>{e?.forEach(t=>t())})}var Mc=(()=>{class n{static __NG_ELEMENT_ID__=ET}return n})();function ET(n){return DT(Je(),te(),(n&16)===16)}function DT(n,e,t){if(oi(n)&&!t){let i=Zt(n.index,e);return new pi(i,i)}else if(n.type&175){let i=e[Dt];return new pi(i,e)}return null}var ih=class{constructor(){}supports(e){return Nf(e)}create(e){return new rh(e)}},ST=(n,e)=>e,rh=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(e){this._trackByFn=e||ST}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){let s=!i||t&&t.currentIndex<Eb(i,r,o)?t:i,a=Eb(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(t=t._next,s.previousIndex==null)r++;else{o||(o=[]);let c=a-r,m=l-r;if(c!=m){for(let w=0;w<c;w++){let E=w<o.length?o[w]:o[w]=0,P=E+w;m<=P&&P<c&&(o[w]=E+1)}let b=s.previousIndex;o[b]=m-c}}a!==l&&e(s,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;t!==null;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;t!==null;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;t!==null;t=t._nextIdentityChange)e(t)}diff(e){if(e==null&&(e=[]),!Nf(e))throw new Z(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._itHead,i=!1,r,o,s;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)o=e[a],s=this._trackByFn(a,o),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,o,s,a),i=!0):(i&&(t=this._verifyReinsertion(t,o,s,a)),Object.is(t.item,o)||this._addIdentityChange(t,o)),t=t._next}else r=0,Ov(e,a=>{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),i=!0):(i&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(i,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new oh(t,i),o,r)),e}_verifyReinsertion(e,t,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}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(e,t,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new Sc),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,i=e._next;return t===null?this._itHead=i:t._next=i,i===null?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Sc),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},oh=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(e,t){this.item=e,this.trackById=t}},sh=class{_head=null;_tail=null;add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;i!==null;i=i._nextDup)if((t===null||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){let t=e._prevDup,i=e._nextDup;return t===null?this._head=i:t._nextDup=i,i===null?this._tail=t:i._prevDup=t,this._head===null}},Sc=class{map=new Map;put(e){let t=e.trackById,i=this.map.get(t);i||(i=new sh,this.map.set(t,i)),i.add(e)}get(e,t){let i=e,r=this.map.get(i);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Eb(n,e,t){let i=n.previousIndex;if(i===null)return i;let r=0;return t&&i<t.length&&(r=t[i]),i+e+r}function Db(){return new Ic([new ih])}var Ic=(()=>{class n{factories;static \u0275prov=re({token:n,providedIn:"root",factory:Db});constructor(t){this.factories=t}static create(t,i){if(i!=null){let r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:()=>{let i=k(n,{optional:!0,skipSelf:!0});return n.create(t,i||Db())}}}find(t){let i=this.factories.find(r=>r.supports(t));if(i!=null)return i;throw new Z(901,!1)}}return n})();function Mb(n){let{rootComponent:e,appProviders:t,platformProviders:i,platformRef:r}=n;Se(8);try{let o=r?.injector??xT(i),s=[Kf({}),{provide:Gt,useExisting:bb},w0,...t||[]],a=new vs({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return vT({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{Se(9)}}function Ib(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var th=Symbol("NOT_SET"),kb=new Set,TT=se(U({},Ro),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:th,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!==th&&!Mi(this))return this.signal;try{for(let r of this.cleanup??kb)r()}finally{this.cleanup?.clear()}let e=[];n!==void 0&&e.push(n),e.push(this.registerCleanupFn);let t=Qn(this),i;try{i=this.userFn.apply(null,e)}finally{Ti(this,t)}return(this.value===th||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),ah=class extends fs{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];constructor(e,t,i,r,o,s=null){super(e,[void 0,void 0,void 0,void 0],i,!1,o.get(et),s),this.scheduler=r;for(let a of Cf){let l=t[a];if(l===void 0)continue;let c=Object.create(TT);c.sequence=this,c.phase=a,c.userFn=l,c.dirty=!0,c.signal=()=>(Si(c),c.value),c.signal[rt]=c,c.registerCleanupFn=m=>(c.cleanup??=new Set).add(m),this.nodes[a]=c,this.hooks[a]=m=>c.phaseFn(m)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??kb)t()}finally{Kn(e)}}};function lh(n,e){let t=e?.injector??k(xt),i=t.get(Gt),r=t.get(cc),o=t.get(hi,null,{optional:!0});r.impl??=t.get(xf);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=t.get(Ki,null,{optional:!0}),l=new ah(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,t,o?.snapshot(null));return r.impl.register(l),l}var Pb=null;function Fs(){return Pb}function ch(n){Pb??=n}var Ls=class{};var ht=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(ht||{}),ke=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(ke||{}),Ot=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(Ot||{}),zn={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 Rb(n){return Ft(n)[qe.LocaleId]}function Nb(n,e,t){let i=Ft(n),r=[i[qe.DayPeriodsFormat],i[qe.DayPeriodsStandalone]],o=Jt(r,e);return Jt(o,t)}function Ab(n,e,t){let i=Ft(n),r=[i[qe.DaysFormat],i[qe.DaysStandalone]],o=Jt(r,e);return Jt(o,t)}function Lb(n,e,t){let i=Ft(n),r=[i[qe.MonthsFormat],i[qe.MonthsStandalone]],o=Jt(r,e);return Jt(o,t)}function Fb(n,e){let i=Ft(n)[qe.Eras];return Jt(i,e)}function Vs(n,e){let t=Ft(n);return Jt(t[qe.DateFormat],e)}function Bs(n,e){let t=Ft(n);return Jt(t[qe.TimeFormat],e)}function js(n,e){let i=Ft(n)[qe.DateTimeFormat];return Jt(i,e)}function $s(n,e){let t=Ft(n),i=t[qe.NumberSymbols][e];if(typeof i>"u"){if(e===zn.CurrencyDecimal)return t[qe.NumberSymbols][zn.Decimal];if(e===zn.CurrencyGroup)return t[qe.NumberSymbols][zn.Group]}return i}function Vb(n){if(!n[qe.ExtraData])throw new Z(2303,!1)}function Bb(n){let e=Ft(n);return Vb(e),(e[qe.ExtraData][2]||[]).map(i=>typeof i=="string"?dh(i):[dh(i[0]),dh(i[1])])}function jb(n,e,t){let i=Ft(n);Vb(i);let r=[i[qe.ExtraData][0],i[qe.ExtraData][1]],o=Jt(r,e)||[];return Jt(o,t)||[]}function Jt(n,e){for(let t=e;t>-1;t--)if(typeof n[t]<"u")return n[t];throw new Z(2304,!1)}function dh(n){let[e,t]=n.split(":");return{hours:+e,minutes:+t}}var MT=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,kc={},IT=/((?:[^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]*)/,kT=256;function $b(n,e,t,i){let r=jT(n);PT(e),e=Un(t,e)||e;let s=[],a;for(;e;)if(a=IT.exec(e),a){s=s.concat(a.slice(1));let m=s.pop();if(!m)break;e=m}else{s.push(e);break}let l=r.getTimezoneOffset();i&&(l=Ub(i,l),r=BT(r,i));let c="";return s.forEach(m=>{let b=FT(m);c+=b?b(r,t,l):m==="''"?"'":m.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function PT(n){if(n.length>kT)throw new Z(2300,!1)}function Ac(n,e,t){let i=new Date(0);return i.setFullYear(n,e,t),i.setHours(0,0,0),i}function Un(n,e){let t=Rb(n);if(kc[t]??={},kc[t][e])return kc[t][e];let i="";switch(e){case"shortDate":i=Vs(n,Ot.Short);break;case"mediumDate":i=Vs(n,Ot.Medium);break;case"longDate":i=Vs(n,Ot.Long);break;case"fullDate":i=Vs(n,Ot.Full);break;case"shortTime":i=Bs(n,Ot.Short);break;case"mediumTime":i=Bs(n,Ot.Medium);break;case"longTime":i=Bs(n,Ot.Long);break;case"fullTime":i=Bs(n,Ot.Full);break;case"short":let r=Un(n,"shortTime"),o=Un(n,"shortDate");i=Pc(js(n,Ot.Short),[r,o]);break;case"medium":let s=Un(n,"mediumTime"),a=Un(n,"mediumDate");i=Pc(js(n,Ot.Medium),[s,a]);break;case"long":let l=Un(n,"longTime"),c=Un(n,"longDate");i=Pc(js(n,Ot.Long),[l,c]);break;case"full":let m=Un(n,"fullTime"),b=Un(n,"fullDate");i=Pc(js(n,Ot.Full),[m,b]);break}return i&&(kc[t][e]=i),i}function Pc(n,e){return e&&(n=n.replace(/\{([^}]+)}/g,function(t,i){return e!=null&&i in e?e[i]:t})),n}function vn(n,e,t="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,o=t));let s=String(n);for(;s.length<e;)s="0"+s;return i&&(s=s.slice(s.length-e)),o+s}function OT(n,e){return vn(n,3).substring(0,e)}function Qe(n,e,t=0,i=!1,r=!1){return function(o,s){let a=RT(n,o);if((t>0||a>-t)&&(a+=t),n===3)a===0&&t===-12&&(a=12);else if(n===6)return OT(a,e);let l=$s(s,zn.MinusSign);return vn(a,e,l,i,r)}}function RT(n,e){switch(n){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();case 3:return e.getHours();case 4:return e.getMinutes();case 5:return e.getSeconds();case 6:return e.getMilliseconds();case 7:return e.getDay();default:throw new Z(2301,!1)}}function Oe(n,e,t=ht.Format,i=!1){return function(r,o){return NT(r,o,n,e,t,i)}}function NT(n,e,t,i,r,o){switch(t){case 2:return Lb(e,r,i)[n.getMonth()];case 1:return Ab(e,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let c=Bb(e),m=jb(e,r,i),b=c.findIndex(w=>{if(Array.isArray(w)){let[E,P]=w,B=s>=E.hours&&a>=E.minutes,W=s<P.hours||s===P.hours&&a<P.minutes;if(E.hours<P.hours){if(B&&W)return!0}else if(B||W)return!0}else if(w.hours===s&&w.minutes===a)return!0;return!1});if(b!==-1)return m[b]}return Nb(e,r,i)[s<12?0:1];case 3:return Fb(e,i)[n.getFullYear()<=0?0:1];default:let l=t;throw new Z(2302,!1)}}function Oc(n){return function(e,t,i){let r=-1*i,o=$s(t,zn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+vn(s,2,o)+vn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+vn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+vn(s,2,o)+":"+vn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+vn(s,2,o)+":"+vn(Math.abs(r%60),2,o);default:throw new Z(2310,!1)}}}var AT=0,Nc=4;function LT(n){let e=Ac(n,AT,1).getDay();return Ac(n,0,1+(e<=Nc?Nc:Nc+7)-e)}function Hb(n){let e=n.getDay(),t=e===0?-3:Nc-e;return Ac(n.getFullYear(),n.getMonth(),n.getDate()+t)}function uh(n,e=!1){return function(t,i){let r;if(e){let o=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,s=t.getDate();r=1+Math.floor((s+o)/7)}else{let o=Hb(t),s=LT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return vn(r,n,$s(i,zn.MinusSign))}}function Rc(n,e=!1){return function(t,i){let o=Hb(t).getFullYear();return vn(o,n,$s(i,zn.MinusSign),e)}}var ph={};function FT(n){if(ph[n])return ph[n];let e;switch(n){case"G":case"GG":case"GGG":e=Oe(3,ke.Abbreviated);break;case"GGGG":e=Oe(3,ke.Wide);break;case"GGGGG":e=Oe(3,ke.Narrow);break;case"y":e=Qe(0,1,0,!1,!0);break;case"yy":e=Qe(0,2,0,!0,!0);break;case"yyy":e=Qe(0,3,0,!1,!0);break;case"yyyy":e=Qe(0,4,0,!1,!0);break;case"Y":e=Rc(1);break;case"YY":e=Rc(2,!0);break;case"YYY":e=Rc(3);break;case"YYYY":e=Rc(4);break;case"M":case"L":e=Qe(1,1,1);break;case"MM":case"LL":e=Qe(1,2,1);break;case"MMM":e=Oe(2,ke.Abbreviated);break;case"MMMM":e=Oe(2,ke.Wide);break;case"MMMMM":e=Oe(2,ke.Narrow);break;case"LLL":e=Oe(2,ke.Abbreviated,ht.Standalone);break;case"LLLL":e=Oe(2,ke.Wide,ht.Standalone);break;case"LLLLL":e=Oe(2,ke.Narrow,ht.Standalone);break;case"w":e=uh(1);break;case"ww":e=uh(2);break;case"W":e=uh(1,!0);break;case"d":e=Qe(2,1);break;case"dd":e=Qe(2,2);break;case"c":case"cc":e=Qe(7,1);break;case"ccc":e=Oe(1,ke.Abbreviated,ht.Standalone);break;case"cccc":e=Oe(1,ke.Wide,ht.Standalone);break;case"ccccc":e=Oe(1,ke.Narrow,ht.Standalone);break;case"cccccc":e=Oe(1,ke.Short,ht.Standalone);break;case"E":case"EE":case"EEE":e=Oe(1,ke.Abbreviated);break;case"EEEE":e=Oe(1,ke.Wide);break;case"EEEEE":e=Oe(1,ke.Narrow);break;case"EEEEEE":e=Oe(1,ke.Short);break;case"a":case"aa":case"aaa":e=Oe(0,ke.Abbreviated);break;case"aaaa":e=Oe(0,ke.Wide);break;case"aaaaa":e=Oe(0,ke.Narrow);break;case"b":case"bb":case"bbb":e=Oe(0,ke.Abbreviated,ht.Standalone,!0);break;case"bbbb":e=Oe(0,ke.Wide,ht.Standalone,!0);break;case"bbbbb":e=Oe(0,ke.Narrow,ht.Standalone,!0);break;case"B":case"BB":case"BBB":e=Oe(0,ke.Abbreviated,ht.Format,!0);break;case"BBBB":e=Oe(0,ke.Wide,ht.Format,!0);break;case"BBBBB":e=Oe(0,ke.Narrow,ht.Format,!0);break;case"h":e=Qe(3,1,-12);break;case"hh":e=Qe(3,2,-12);break;case"H":e=Qe(3,1);break;case"HH":e=Qe(3,2);break;case"m":e=Qe(4,1);break;case"mm":e=Qe(4,2);break;case"s":e=Qe(5,1);break;case"ss":e=Qe(5,2);break;case"S":e=Qe(6,1);break;case"SS":e=Qe(6,2);break;case"SSS":e=Qe(6,3);break;case"Z":case"ZZ":case"ZZZ":e=Oc(0);break;case"ZZZZZ":e=Oc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Oc(1);break;case"OOOO":case"ZZZZ":case"zzzz":e=Oc(2);break;default:return null}return ph[n]=e,e}function Ub(n,e){n=n.replace(/:/g,"");let t=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(t)?e:t}function VT(n,e){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+e),n}function BT(n,e,t){let r=n.getTimezoneOffset(),o=Ub(e,r);return VT(n,-1*(o-r))}function jT(n){if(Ob(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 Ac(r,o-1,s)}let t=parseFloat(n);if(!isNaN(n-t))return new Date(t);let i;if(i=n.match(MT))return $T(i)}let e=new Date(n);if(!Ob(e))throw new Z(2311,!1);return e}function $T(n){let e=new Date(0),t=0,i=0,r=n[8]?e.setUTCFullYear:e.setFullYear,o=n[8]?e.setUTCHours:e.setHours;n[9]&&(t=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(e,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-t,a=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(e,s,a,l,c),e}function Ob(n){return n instanceof Date&&!isNaN(n.valueOf())}var mh=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){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(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(t,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(mn(mi))};static \u0275dir=gi({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[xs]})}return n})();function zb(n,e){return new Z(2100,!1)}var fh=class{createSubscription(e,t,i){return tt(()=>e.subscribe({next:t,error:i}))}dispose(e){tt(()=>e.unsubscribe())}},hh=class{createSubscription(e,t,i){return e.then(r=>t?.(r),r=>i?.(r)),{unsubscribe:()=>{t=null,i=null}}}dispose(e){e.unsubscribe()}},HT=new hh,UT=new fh,gh=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=k(dn);constructor(t){this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i),i=>this.applicationErrorHandler(i))}_selectStrategy(t){if(Is(t))return HT;if(yc(t))return UT;throw zb(n,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||n)(mn(Mc,16))};static \u0275pipe=bc({name:"async",type:n,pure:!1})}return n})();var zT="mediumDate",Gb=new ee(""),Wb=new ee(""),Hs=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(t,i,r){this.locale=t,this.defaultTimezone=i,this.defaultOptions=r}transform(t,i,r,o){if(t==null||t===""||t!==t)return null;try{let s=i??this.defaultOptions?.dateFormat??zT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return $b(t,s,o||this.locale,a)}catch(s){throw zb(n,s.message)}}static \u0275fac=function(i){return new(i||n)(mn(Ns,16),mn(Gb,24),mn(Wb,24))};static \u0275pipe=bc({name:"date",type:n,pure:!0})}return n})();function Us(n,e){e=encodeURIComponent(e);for(let t of n.split(";")){let i=t.indexOf("="),[r,o]=i==-1?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var lr=class{};var _h="browser";function qb(n){return n===_h}var zs=class{_doc;constructor(e){this._doc=e}manager},Lc=(()=>{class n extends zs{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r,o){return t.addEventListener(i,r,o),()=>this.removeEventListener(t,i,r,o)}removeEventListener(t,i,r,o){return t.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(me(lt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),Vc=new ee(""),xh=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,i){this._zone=i,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof Lc));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof Lc);o&&this._plugins.push(o)}addEventListener(t,i,r,o){return this._findPluginFor(i).addEventListener(t,i,r,o)}getZone(){return this._zone}_findPluginFor(t){let i=this._eventNameToPlugin.get(t);if(i)return i;if(i=this._plugins.find(o=>o.supports(t)),!i)throw new Z(5101,!1);return this._eventNameToPlugin.set(t,i),i}static \u0275fac=function(i){return new(i||n)(me(Vc),me(Te))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),vh="ng-app-id";function Zb(n){for(let e of n)e.remove()}function Yb(n,e){let t=e.createElement("style");return t.textContent=n,t}function qT(n,e,t,i){let r=n.head?.querySelectorAll(`style[${vh}="${e}"],link[${vh}="${e}"]`);if(r)for(let o of r)o.removeAttribute(vh),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function yh(n,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",n),t}var wh=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,i,r,o={}){this.doc=t,this.appId=i,this.nonce=r,qT(t,i,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,i){for(let r of t)this.addUsage(r,this.inline,Yb);i?.forEach(r=>this.addUsage(r,this.external,yh))}removeStyles(t,i){for(let r of t)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,i,r){let o=i.get(t);o?o.usage++:i.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,i){let r=i.get(t);r&&(r.usage--,r.usage<=0&&(Zb(r.elements),i.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])Zb(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(t,Yb(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(t,yh(i,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,i){return this.nonce&&i.setAttribute("nonce",this.nonce),t.appendChild(i)}static \u0275fac=function(i){return new(i||n)(me(lt),me(nc),me(rc,8),me(ir))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),bh={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"},Eh=/%COMP%/g;var Kb="%COMP%",ZT=`_nghost-${Kb}`,YT=`_ngcontent-${Kb}`,QT=!0,KT=new ee("",{providedIn:"root",factory:()=>QT});function XT(n){return YT.replace(Eh,n)}function JT(n){return ZT.replace(Eh,n)}function Xb(n,e){return e.map(t=>t.replace(Eh,n))}var Dh=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(t,i,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.platformIsServer=!1,this.defaultRenderer=new Gs(t,s,a,this.platformIsServer,this.tracingService)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,i);return r instanceof Fc?r.applyToHost(t):r instanceof Ws&&r.applyStyles(),r}getOrCreateRenderer(t,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,m=this.removeStylesOnCompDestroy,b=this.platformIsServer,w=this.tracingService;switch(i.encapsulation){case jn.Emulated:o=new Fc(l,c,i,this.appId,m,s,a,b,w);break;case jn.ShadowDom:return new Ch(l,c,t,i,s,a,this.nonce,b,w);default:o=new Ws(l,c,i,m,s,a,b,w);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(i){return new(i||n)(me(xh),me(wh),me(nc),me(KT),me(lt),me(Te),me(rc),me(hi,8))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),Gs=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,i,r,o){this.eventManager=e,this.doc=t,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(bh[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Qb(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(Qb(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new Z(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;let o=bh[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=bh[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(Pn.DashCase|Pn.Important)?e.style.setProperty(t,i,r&Pn.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&Pn.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e!=null&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i,r){if(typeof e=="string"&&(e=Fs().getGlobalEventTarget(this.doc,e),!e))throw new Z(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function Qb(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Ch=class extends Gs{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,i,r,o,s,a,l,c){super(e,o,s,l,c),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=r.styles;m=Xb(r.id,m);for(let w of m){let E=document.createElement("style");a&&E.setAttribute("nonce",a),E.textContent=w,this.shadowRoot.appendChild(E)}let b=r.getExternalStyles?.();if(b)for(let w of b){let E=yh(w,o);a&&E.setAttribute("nonce",a),this.shadowRoot.appendChild(E)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Ws=class extends Gs{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,i,r,o,s,a,l,c){super(e,o,s,a,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let m=i.styles;this.styles=c?Xb(c,m):m,this.styleUrls=i.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ui.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Fc=class extends Ws{contentAttr;hostAttr;constructor(e,t,i,r,o,s,a,l,c){let m=r+"-"+i.id;super(e,t,i,o,s,a,l,c,m),this.contentAttr=XT(m),this.hostAttr=JT(m)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}};var Bc=class n extends Ls{supportsDOMEvents=!0;static makeCurrent(){ch(new n)}onAndCancel(e,t,i,r){return e.addEventListener(t,i,r),()=>{e.removeEventListener(t,i,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=eM();return t==null?null:tM(t)}resetBaseElement(){qs=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Us(document.cookie,e)}},qs=null;function eM(){return qs=qs||document.head.querySelector("base"),qs?qs.getAttribute("href"):null}function tM(n){return new URL(n,document.baseURI).pathname}var nM=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),Jb=["alt","control","meta","shift"],iM={"\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"},rM={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},ey=(()=>{class n extends zs{constructor(t){super(t)}supports(t){return n.parseEventName(t)!=null}addEventListener(t,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Fs().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let i=t.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."),Jb.forEach(c=>{let m=i.indexOf(c);m>-1&&(i.splice(m,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=iM[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),Jb.forEach(s=>{if(s!==r){let a=rM[s];a(t)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(i){return new(i||n)(me(lt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();function Sh(n,e,t){let i=U({rootComponent:n,platformRef:t?.platformRef},oM(e));return Mb(i)}function oM(n){return{appProviders:[...dM,...n?.providers??[]],platformProviders:cM}}function sM(){Bc.makeCurrent()}function aM(){return new At}function lM(){return af(document),document}var cM=[{provide:ir,useValue:_h},{provide:ic,useValue:sM,multi:!0},{provide:lt,useFactory:lM}];var dM=[{provide:Ko,useValue:"root"},{provide:At,useFactory:aM},{provide:Vc,useClass:Lc,multi:!0,deps:[lt]},{provide:Vc,useClass:ey,multi:!0,deps:[lt]},Dh,wh,xh,{provide:On,useExisting:Dh},{provide:lr,useClass:nM},[]];var dr=class{},Zs=class{},bi=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
5
- `).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init();for(let[t,i]of e.headers.entries())this.headers.set(t,i),this.normalizedNames.set(t,e.normalizedNames.get(t))}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=e.op==="a"?(this.headers.get(t)||[]).slice():[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(o===void 0)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=Array.isArray(o)?o:[o],a=this.headers.get(t);if(!a)return;a=a.filter(l=>s.indexOf(l)===-1),a.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var $c=class{encodeKey(e){return ty(e)}encodeValue(e){return ty(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function uM(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var pM=/%(\d[a-f0-9])/gi,fM={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ty(n){return encodeURIComponent(n).replace(pM,(e,t)=>fM[t]??e)}function jc(n){return`${n}`}var ut=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new $c,e.fromString){if(e.fromObject)throw new Z(2805,!1);this.map=uM(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(jc):[jc(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[e,t]of this.cloneFrom.map.entries())this.map.set(e,t);this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=e.op==="a"?(this.map.get(e.param)||[]).slice():[];t.push(jc(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=(this.map.get(e.param)||[]).slice(),r=i.indexOf(jc(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null}}};var Hc=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function hM(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ny(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function iy(n){return typeof Blob<"u"&&n instanceof Blob}function ry(n){return typeof FormData<"u"&&n instanceof FormData}function mM(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var oy="Content-Type",sy="Accept",ay="X-Request-URL",ly="text/plain",cy="application/json",gM=`${cy}, ${ly}, */*`,po=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(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(hM(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 Z(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 bi,this.context??=new Hc,!this.params)this.params=new ut,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ny(this.body)||iy(this.body)||ry(this.body)||mM(this.body)?this.body:this.body instanceof ut?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||ry(this.body)?null:iy(this.body)?this.body.type||null:ny(this.body)?null:typeof this.body=="string"?ly:this.body instanceof ut?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?cy:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,m=e.credentials||this.credentials,b=e.referrer??this.referrer,w=e.integrity||this.integrity,E=e.transferCache??this.transferCache,P=e.timeout??this.timeout,B=e.body!==void 0?e.body:this.body,W=e.withCredentials??this.withCredentials,j=e.reportProgress??this.reportProgress,_e=e.headers||this.headers,$t=e.params||this.params,Be=e.context??this.context;return e.setHeaders!==void 0&&(_e=Object.keys(e.setHeaders).reduce((at,it)=>at.set(it,e.setHeaders[it]),_e)),e.setParams&&($t=Object.keys(e.setParams).reduce((at,it)=>at.set(it,e.setParams[it]),$t)),new n(t,i,B,{params:$t,headers:_e,context:Be,reportProgress:j,responseType:r,withCredentials:W,transferCache:E,keepalive:o,cache:a,priority:s,timeout:P,mode:l,redirect:c,credentials:m,referrer:b,integrity:w})}},cr=(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})(cr||{}),ho=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,i="OK"){this.headers=e.headers||new bi,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},Uc=class n extends ho{constructor(e={}){super(e)}type=cr.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Ys=class n extends ho{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=cr.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},fo=class extends ho{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_M=200,vM=204;function Th(n,e){return{body:e,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 mo=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof po)o=t;else{let l;r.headers instanceof bi?l=r.headers:l=new bi(r.headers);let c;r.params&&(r.params instanceof ut?c=r.params:c=new ut({fromObject:r.params})),o=new po(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let s=we(o).pipe(cu(l=>this.handler.handle(l)));if(t instanceof po||r.observe==="events")return s;let a=s.pipe(Ho(l=>l instanceof Ys));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 Z(2806,!1);return l.body}));case"blob":return a.pipe(Ge(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Z(2807,!1);return l.body}));case"text":return a.pipe(Ge(l=>{if(l.body!==null&&typeof l.body!="string")throw new Z(2808,!1);return l.body}));default:return a.pipe(Ge(l=>l.body))}case"response":return a;default:throw new Z(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new ut().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,Th(r,i))}post(t,i,r={}){return this.request("POST",t,Th(r,i))}put(t,i,r={}){return this.request("PUT",t,Th(r,i))}static \u0275fac=function(i){return new(i||n)(me(dr))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();var bM=new ee("");function yM(n,e){return e(n)}function CM(n,e,t){return(i,r)=>Hr(t,()=>e(i,o=>n(o,r)))}var Ih=new ee(""),dy=new ee(""),uy=new ee("",{providedIn:"root",factory:()=>!0});var zc=(()=>{class n extends dr{backend;injector;chain=null;pendingTasks=k(Yr);contributeToStability=k(uy);constructor(t,i){super(),this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=this.injector.get(dr,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(dy,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get(Ih),...o]));this.chain=s.reduceRight((a,l)=>CM(a,l,this.injector),yM)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Fr(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(me(Zs),me(kt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();var xM=/^\)\]\}',?\n/,wM=RegExp(`^${ay}:`,"m");function EM(n){return"responseURL"in n&&n.responseURL?n.responseURL:wM.test(n.getAllResponseHeaders())?n.getResponseHeader(ay):null}var Mh=(()=>{class n{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new Z(-2800,!1);let i=this.xhrFactory;return we(null).pipe(bt(()=>new le(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((W,j)=>s.setRequestHeader(W,j.join(","))),t.headers.has(sy)||s.setRequestHeader(sy,gM),!t.headers.has(oy)){let W=t.detectContentTypeHeader();W!==null&&s.setRequestHeader(oy,W)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let W=t.responseType.toLowerCase();s.responseType=W!=="json"?W:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let W=s.statusText||"OK",j=new bi(s.getAllResponseHeaders()),_e=EM(s)||t.url;return l=new Uc({headers:j,status:s.status,statusText:W,url:_e}),l},m=()=>{let{headers:W,status:j,statusText:_e,url:$t}=c(),Be=null;j!==vM&&(Be=typeof s.response>"u"?s.responseText:s.response),j===0&&(j=Be?_M:0);let at=j>=200&&j<300;if(t.responseType==="json"&&typeof Be=="string"){let it=Be;Be=Be.replace(xM,"");try{Be=Be!==""?JSON.parse(Be):null}catch(Ht){Be=it,at&&(at=!1,Be={error:Ht,text:Be})}}at?(o.next(new Ys({body:Be,headers:W,status:j,statusText:_e,url:$t||void 0})),o.complete()):o.error(new fo({error:Be,headers:W,status:j,statusText:_e,url:$t||void 0}))},b=W=>{let{url:j}=c(),_e=new fo({error:W,status:s.status||0,statusText:s.statusText||"Unknown Error",url:j||void 0});o.error(_e)},w=b;t.timeout&&(w=W=>{let{url:j}=c(),_e=new fo({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:j||void 0});o.error(_e)});let E=!1,P=W=>{E||(o.next(c()),E=!0);let j={type:cr.DownloadProgress,loaded:W.loaded};W.lengthComputable&&(j.total=W.total),t.responseType==="text"&&s.responseText&&(j.partialText=s.responseText),o.next(j)},B=W=>{let j={type:cr.UploadProgress,loaded:W.loaded};W.lengthComputable&&(j.total=W.total),o.next(j)};return s.addEventListener("load",m),s.addEventListener("error",b),s.addEventListener("timeout",w),s.addEventListener("abort",b),t.reportProgress&&(s.addEventListener("progress",P),a!==null&&s.upload&&s.upload.addEventListener("progress",B)),s.send(a),o.next({type:cr.Sent}),()=>{s.removeEventListener("error",b),s.removeEventListener("abort",b),s.removeEventListener("load",m),s.removeEventListener("timeout",w),t.reportProgress&&(s.removeEventListener("progress",P),a!==null&&s.upload&&s.upload.removeEventListener("progress",B)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(me(lr))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),py=new ee(""),DM="XSRF-TOKEN",SM=new ee("",{providedIn:"root",factory:()=>DM}),TM="X-XSRF-TOKEN",MM=new ee("",{providedIn:"root",factory:()=>TM}),Qs=class{},IM=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,i){this.doc=t,this.cookieName=i}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Us(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)(me(lt),me(SM))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),kM=/^(?:https?:)?\/\//i;function PM(n,e){if(!k(py)||n.method==="GET"||n.method==="HEAD"||kM.test(n.url))return e(n);let t=k(Qs).getToken(),i=k(MM);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var kh=(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})(kh||{});function OM(n,e){return{\u0275kind:n,\u0275providers:e}}function Ph(...n){let e=[mo,Mh,zc,{provide:dr,useExisting:zc},{provide:Zs,useFactory:()=>k(bM,{optional:!0})??k(Mh)},{provide:Ih,useValue:PM,multi:!0},{provide:py,useValue:!0},{provide:Qs,useClass:IM}];for(let t of n)e.push(...t.\u0275providers);return Qo(e)}function Oh(n){return OM(kh.Interceptors,n.map(e=>({provide:Ih,useValue:e,multi:!0})))}var fy="guitoToken";function hy(){return new URLSearchParams(window.location.search).get(fy)??""}var my=(n,e)=>{let t=hy();return!t||!n.url.startsWith("/api")?e(n):e(n.clone({setHeaders:{"X-Guito-Token":t}}))};function gy(n){let e=new URL(n,window.location.origin),t=hy();return t&&e.searchParams.set(fy,t),e.toString()}var _y={providers:[Xf({eventCoalescing:!0}),Ph(Oh([my]))]};function RM(n,e){if(n&1){let t=R();y(0,"button",10),V("click",function(){_(t);let r=u(2);return v(r.retry.emit())}),p(1),C()}if(n&2){let t=u(2);Y("disabled",t.busy()),d(),O(t.retryLabel())}}function NM(n,e){if(n&1){let t=R();y(0,"div",0),F(),y(1,"svg",1),ae(2,"circle",2)(3,"path",3)(4,"circle",4),C(),he(),y(5,"div",5)(6,"p"),p(7),C(),T(8,RM,2,2,"button",6),C(),y(9,"button",7),V("click",function(){_(t);let r=u();return v(r.dismissed.set(!0))}),F(),y(10,"svg",8),ae(11,"path",9),C()()()}if(n&2){let t=u();d(7),O(t.message()),d(),M(t.retryLabel()?8:-1)}}var Rt=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=G();dismissed=x(!1);constructor(){ye(()=>{this.message(),this.busy(),this.dismissed.set(!1)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({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"],["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(t,i){t&1&&T(0,NM,12,2,"div",0),t&2&&M(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}.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}@media(prefers-reduced-motion:reduce){button[_ngcontent-%COMP%]{transition:none}}"],changeDetection:0})};var Gc=class n{http=k(mo);cache=new Map;empty=we(null);get(e){let t=e.trim().toLowerCase();if(!t)return this.empty;let i=this.cache.get(t);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:t},responseType:"blob"}).pipe(bt(o=>o.size?new le(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),Vr({bufferSize:1,refCount:!1}));return this.cache.set(t,{expires:Date.now()+36e5,image:r}),r}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};function AM(n,e){n&1&&ae(0,"img",0),n&2&&Y("src",e,rr)}function LM(n,e){if(n&1&&(y(0,"span",1),p(1),C()),n&2){let t=u();d(),O(t.initials())}}var Nn=class n{name=N("");email=N("");avatars=k(Gc);initials(){return this.name().trim().split(/\s+/).slice(0,2).map(e=>e[0]??"").join("").toUpperCase()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({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(t,i){if(t&1&&(T(0,AM,1,1,"img",0),vi(1,"async"),Ps(2,LM,2,1,"span",1)),t&2){let r;M((r=Qf(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[gh],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 FM(n,e){if(n&1&&(y(0,"mark",1),p(1),C()),n&2){let t=u(2).$implicit;d(),O(t.text)}}function VM(n,e){if(n&1&&p(0),n&2){let t=u(2).$implicit;q(" ",t.text," ")}}function BM(n,e){if(n&1){let t=R();y(0,"a",2),V("click",function(r){return _(t),v(r.stopPropagation())}),T(1,FM,2,1,"mark",1)(2,VM,1,1),C()}if(n&2){let t=u().$implicit;Y("href",t.href,rr),d(),M(t.match?1:2)}}function jM(n,e){if(n&1&&(y(0,"mark",1),p(1),C()),n&2){let t=u().$implicit;d(),O(t.text)}}function $M(n,e){if(n&1&&p(0),n&2){let t=u().$implicit;q(" ",t.text," ")}}function HM(n,e){if(n&1&&T(0,BM,3,2,"a",0)(1,jM,2,1,"mark",1)(2,$M,1,1),n&2){let t=e.$implicit;M(t.href?0:t.match?1:2)}}var go=class n{text=N("");search=N("");linking=N(null);segments=$(()=>{let e=this.text(),t=this.linking(),i=[];if(!t)i.push({text:e});else try{let o=new RegExp(t.regex,"g"),s=0;for(let a of e.matchAll(o)){let l=a.index??0;l>s&&i.push({text:e.slice(s,l)});let c=t.url.replace(/\$(\d+)/g,(m,b)=>a[Number(b)]??"");if(i.push(U({text:a[0]},/^https?:\/\//i.test(c)?{href:c}:{})),s=l+a[0].length,a[0].length===0)break}s<e.length&&i.push({text:e.slice(s)})}catch{i.push({text:e})}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 c=a.indexOf(r,l);if(c===-1){s.push(se(U({},o),{text:o.text.slice(l),match:!1}));break}c>l&&s.push(se(U({},o),{text:o.text.slice(l,c),match:!1})),s.push(se(U({},o),{text:o.text.slice(c,c+r.length),match:!0})),l=c+r.length}return s}):i.map(o=>se(U({},o),{match:!1}))});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({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(t,i){t&1&&K(0,HM,3,1,null,null,Hn),t&2&&X(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 bn="__working__";var mt=class n{http=k(mo);base="/api";mutating=x(!1);mutate(e){return lu(()=>this.mutating()?su(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),e().pipe(Fr(()=>this.mutating.set(!1)))))}getRepositoryState(){return this.http.get(`${this.base}/repository-state`)}getRepoInfo(){return this.http.get(`${this.base}/repo`)}getCommits(e,t=0){let i=new ut;return e!==void 0&&(i=i.set("limit",String(e))),t>0&&(i=i.set("skip",String(t))),this.http.get(`${this.base}/commits`,{params:i})}searchCommits(e,t=!1){let i=new ut().set("query",e);return t&&(i=i.set("caseSensitive","1")),this.http.get(`${this.base}/commits/search`,{params:i})}getCommitDetail(e){return this.http.post(`${this.base}/commit/detail`,{hash:e})}getAllBranches(){return this.http.get(`${this.base}/branches/all`)}getCommitDiff(e){return this.http.post(`${this.base}/commit/diff`,{hash:e})}getWorkingChanges(){return this.http.get(`${this.base}/working-changes`)}getFileContent(e,t){return this.http.post(`${this.base}/file-content`,{path:e,ref:t})}fetch(e=!1){let t=e?new ut().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:t}))}pull(e=!1){return this.mutate(()=>this.http.post(`${this.base}/pull`,{rebase:e}))}push(e=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:e}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkout(e){return this.mutate(()=>this.http.post(`${this.base}/checkout`,{ref:e}))}revert(e){return this.mutate(()=>this.http.post(`${this.base}/revert`,{commit:e}))}cherryPick(e){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,{commit:e}))}dropCommit(e){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:e}))}resetToCommit(e,t="hard"){return this.mutate(()=>this.http.post(`${this.base}/reset-commit`,{commit:e,mode:t}))}commit(e,t){return this.mutate(()=>this.http.post(`${this.base}/commit`,{message:e,description:t}))}stage(e){return this.mutate(()=>this.http.post(`${this.base}/stage`,{files:e}))}unstage(e){return this.mutate(()=>this.http.post(`${this.base}/unstage`,{files:e}))}discard(e,t){return this.mutate(()=>this.http.post(`${this.base}/discard`,{files:e,mode:t}))}resetWorking(){return this.mutate(()=>this.http.post(`${this.base}/reset`,{}))}cleanUntracked(){return this.mutate(()=>this.http.post(`${this.base}/clean`,{}))}stashSave(e,t="all"){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,{message:e,scope:t}))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(Ge(e=>(e.all??[]).map((t,i)=>({index:i,hash:t.hash,message:t.message,date:t.date,author_name:t.author_name,author_email:t.author_email}))))}stashApply(e){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:e}))}stashPop(e){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:e}))}stashDrop(e){return this.mutate(()=>this.http.post(`${this.base}/stash/drop`,{index:e}))}getWorktrees(){return this.http.get(`${this.base}/worktrees`)}createWorktree(e,t){return this.mutate(()=>this.http.post(`${this.base}/worktrees`,{path:e,branch:t}))}removeWorktree(e){return this.mutate(()=>this.http.post(`${this.base}/worktrees/remove`,{path:e}))}getTags(){return this.http.get(`${this.base}/tags`)}createBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,{name:e,startPoint:t}))}deleteBranch(e,t=!1){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,{name:e,force:t}))}deleteRemoteBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:e,branch:t}))}renameBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,{oldName:e,newName:t}))}merge(e){return this.mutate(()=>this.http.post(`${this.base}/merge`,{branch:e}))}rebase(e){return this.mutate(()=>this.http.post(`${this.base}/rebase`,{branch:e}))}createTag(e,t){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,{name:e,commit:t}))}deleteTag(e){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,{name:e}))}pushTag(e,t="origin"){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,{name:e,remote:t}))}getSettings(){return this.http.get(`${this.base}/settings`)}saveSettings(e){return this.http.post(`${this.base}/settings`,e)}getRemotes(){return this.http.get(`${this.base}/remotes`)}saveIdentity(e){return this.http.post(`${this.base}/identity`,e)}removeIdentity(){return this.http.delete(`${this.base}/identity`)}saveRemote(e){return this.http.post(`${this.base}/remotes`,e)}removeRemote(e){return this.http.delete(`${this.base}/remotes/${encodeURIComponent(e)}`)}createPr(e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequest`,e))}searchReviewers(e){return this.http.get(`${this.base}/azure-devops/reviewers`,{params:new ut().set("query",e)}).pipe(Ge(t=>t.reviewers))}searchWorkItems(e){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new ut().set("query",e)}).pipe(Ge(t=>t.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(Ge(e=>e.tags.map(t=>({name:t}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(e="active"){let t=new ut().set("status",e);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:t}).pipe(Ge(i=>i.pullRequests))}getPrDetail(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}`)}updatePr(e,t){return this.mutate(()=>this.http.patch(`${this.base}/azure-devops/pullrequests/${e}`,t))}votePr(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/vote`,{vote:t}))}updatePrReviewer(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/reviewers`,t))}setPrAutoComplete(e,t,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/autocomplete`,U({enabled:t},i)))}completePr(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/complete`,t??{}))}getPrThreads(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/threads`).pipe(Ge(t=>t.threads))}addPrComment(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/threads`,t))}setPrThreadStatus(e,t,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/threads/${t}/status`,{status:i}))}getPrChanges(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/changes`).pipe(Ge(t=>t.files))}getPrFileDiff(e,t){let i=new ut().set("path",t.path).set("oldPath",t.oldPath||"").set("changeType",t.changeType);return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/file-diff`,{params:i})}getPrWorkItems(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/workitems`).pipe(Ge(t=>t.workItems))}addPrTag(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/labels`,{name:t}))}removePrTag(e,t){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${e}/labels/${encodeURIComponent(t)}`))}linkPrWorkItem(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/workitems`,{id:t}))}unlinkPrWorkItem(e,t){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${e}/workitems/${t}`))}getPrChecks(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/checks`)}requeuePrCheck(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/checks/${encodeURIComponent(t)}/requeue`,{}))}abandonPr(e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/abandon`,{}))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var en=class n{git=k(mt);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",e=>{let t=e.data;if(t?.type==="guito/config"&&(t.diffViewer==="guito"||t.diffViewer==="vscode")&&(this.diffViewer.set(t.diffViewer),this.settingsVersion.update(i=>i+1)),t?.type==="guito/folderSelected"&&typeof t.requestId=="number"){let i=this.folderResolvers.get(t.requestId);i&&(this.folderResolvers.delete(t.requestId),i(typeof t.path=="string"&&t.path?t.path:null))}}),this.git.getSettings().subscribe({next:e=>{e.diffViewer&&this.diffViewer.set(e.diffViewer)},error:()=>{}}))}pickFolder(){if(!this.inVsCode)return Promise.resolve(null);let e=++this.folderRequest;return window.parent.postMessage({type:"guito/pickFolder",requestId:e},"*"),new Promise(t=>this.folderResolvers.set(e,t))}openSettings(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSettings"},"*"),!0):!1}openExternal(e){if(this.inVsCode){window.parent.postMessage({type:"guito/openExternal",url:e},"*");return}window.open(e,"_blank","noopener")}canOpenFile(){return this.inVsCode}openFile(e){return this.inVsCode?(window.parent.postMessage({type:"guito/openFile",path:e},"*"),!0):!1}openDiff(e,t,i){if(!this.inVsCode||this.diffViewer()!=="vscode"||e.status==="binary")return!1;let r=e.status==="added"&&!e.oldPath?"EMPTY":t;return window.parent.postMessage({type:"guito/openDiff",path:e.path,oldPath:e.oldPath,status:e.status,originalRef:r,modifiedRef:i},"*"),!0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var UM=(n,e)=>n.name.toLowerCase().localeCompare(e.name.toLowerCase()),vy=n=>n.split("/").pop()??n,zM=(n,e)=>vy(n.path).toLowerCase().localeCompare(vy(e.path).toLowerCase());function _o(n,e){let t={name:"",dirs:new Map,files:[],additions:0,deletions:0};for(let o of n){let s=o.path.split("/").filter(Boolean),a=t;for(let l of s.slice(0,-1)){let c=a.dirs.get(l);c||(c={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,c)),c.additions+=o.additions??0,c.deletions+=o.deletions??0,a=c}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(UM)){let c=s?`${s}/${l.name}`:l.name,m=e.has(c);i.push({kind:"dir",path:c,name:l.name,depth:a,collapsed:m,additions:l.additions,deletions:l.deletions}),m||r(l,c,a+1)}for(let l of[...o.files].sort(zM))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(t,"",0),i}var vo=class n{loading=null;load(){return this.loading||(this.loading=new Promise((e,t)=>{let i=window;if(i.monaco){e(i.monaco);return}let r=document.createElement("script");r.src="vs/loader.js",r.async=!0,r.onload=()=>{let o=i.require;if(!o){t(new Error("Monaco AMD loader not found."));return}o.config({paths:{vs:"vs"}}),o(["vs/editor/editor.main"],()=>{this.applyTheme(i.monaco),e(i.monaco)})},r.onerror=()=>{this.loading=null,t(new Error("Failed to load the Monaco editor."))},document.head.appendChild(r)})),this.loading}applyTheme(e){e.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(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var GM=["host"];function WM(n,e){if(n&1&&(f(0,"span",6),p(1),h()),n&2){let t=u();d(),q("+",t.file().additions)}}function qM(n,e){if(n&1&&(f(0,"span",7),p(1),h()),n&2){let t=u();d(),q("\u2212",t.file().deletions)}}function ZM(n,e){n&1&&(F(),z(0,"line",11))}function YM(n,e){n&1&&(F(),z(0,"line",12))}function QM(n,e){n&1&&(f(0,"div",18),p(1,"Loading diff\u2026"),h())}function KM(n,e){if(n&1&&z(0,"app-error-banner",19),n&2){let t=u();I("message",t.error())}}function XM(n,e){n&1&&(f(0,"div",18),p(1,"Binary file not shown."),h())}var JM=0,bo=class n{git=k(mt);monacoService=k(vo);file=N.required();originalRef=N.required();modifiedRef=N.required();closed=G();host=Xt.required("host");loading=x(!0);error=x("");binary=x(!1);sideBySide=x(!0);destroyed=!1;editor=null;models=[];onEscape(){this.closed.emit()}ngAfterViewInit(){return En(this,null,function*(){this.loading.set(!0),this.error.set(""),this.binary.set(!1);try{let e=yield this.monacoService.load();if(this.destroyed)return;let t=this.file(),i=t.status==="added"&&!t.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([tl(this.git.getFileContent(t.oldPath||t.path,i)),tl(this.git.getFileContent(t.path,this.modifiedRef()))]);if(this.destroyed)return;if(r.binary||o.binary){this.binary.set(!0),this.loading.set(!1);return}let s=++JM,a=e.editor.createModel(r.content,void 0,e.Uri.parse(`inmemory://diff/${s}/original/${t.oldPath||t.path}`)),l=e.editor.createModel(o.content,void 0,e.Uri.parse(`inmemory://diff/${s}/modified/${t.path}`));this.models=[a,l],this.editor=e.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 e of this.models)e.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(e=>!e),this.editor?.updateOptions({renderSideBySide:this.sideBySide()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(t,i){t&1&&Vt(i.host,GM,5),t&2&&_n()},hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"]},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(t,i){if(t&1){let r=R();f(0,"div",1),D("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),T(8,WM,2,1,"span",6),T(9,qM,2,1,"span",7),h(),f(10,"button",8),D("click",function(){return _(r),v(i.toggleLayout())}),F(),f(11,"svg",9),z(12,"rect",10),T(13,ZM,1,0,":svg:line",11)(14,YM,1,0,":svg:line",12),h()(),he(),f(15,"button",13),D("click",function(){return _(r),v(i.closed.emit())}),F(),f(16,"svg",9),z(17,"line",14)(18,"line",15),h()()(),he(),f(19,"div",16),z(20,"div",17,0),T(22,QM,2,0,"div",18)(23,KM,1,1,"app-error-banner",19)(24,XM,2,0,"div",18),h()()}t&2&&(d(3),dt("status status-"+i.file().status),d(),O(i.file().status),d(),I("title",i.file().path),d(),O(i.file().path),d(2),M(i.file().additions>0?8:-1),d(),M(i.file().deletions>0?9:-1),d(),ce("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),d(3),M(i.sideBySide()?13:14),d(9),M(i.loading()?22:i.error()?23:i.binary()?24:-1))},dependencies:[Rt],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 eI=(n,e)=>e.path;function tI(n,e){if(n&1&&(f(0,"span",16),p(1,"\u2022"),h(),f(2,"span"),p(3),vi(4,"date"),h(),f(5,"span",16),p(6,"\u2022"),h(),f(7,"code",17),p(8),h()),n&2){let t=u();d(3),O(uo(4,2,t.commit().date,"d MMM y HH:mm")),d(5),O(t.commit().hash.slice(0,8))}}function nI(n,e){if(n&1&&(f(0,"pre",11),z(1,"app-issue-text",7),h()),n&2){let t=u();d(),I("text",t.body())("linking",t.issueLinking())}}function iI(n,e){n&1&&(f(0,"div",13),p(1,"Loading changes\u2026"),h())}function rI(n,e){if(n&1&&z(0,"app-error-banner",14),n&2){let t=u();I("message",t.error())}}function oI(n,e){n&1&&(f(0,"div",13),p(1,"No changes."),h())}function sI(n,e){n&1&&(F(),z(0,"polyline",23))}function aI(n,e){n&1&&(F(),z(0,"polyline",24))}function lI(n,e){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let t=u(2).$implicit;d(),q("+",t.additions)}}function cI(n,e){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let t=u(2).$implicit;d(),q("\u2212",t.deletions)}}function dI(n,e){if(n&1){let t=R();f(0,"button",21),D("click",function(){_(t);let r=u().$implicit,o=u(3);return v(o.toggleDir(r.path))}),F(),f(1,"svg",22),T(2,sI,1,0,":svg:polyline",23)(3,aI,1,0,":svg:polyline",24),h(),he(),f(4,"span",25),p(5),h(),f(6,"span",26),T(7,lI,2,1,"span",27),T(8,cI,2,1,"span",28),h()()}if(n&2){let t=u().$implicit;ue("padding-left",t.depth*14+8,"px"),I("title",t.path),ce("aria-expanded",!t.collapsed),d(2),M(t.collapsed?2:3),d(2),I("title",t.path),d(),O(t.name),d(2),M(t.additions>0?7:-1),d(),M(t.deletions>0?8:-1)}}function uI(n,e){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let t=u(2).$implicit;d(),q("+",t.file.additions)}}function pI(n,e){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let t=u(2).$implicit;d(),q("\u2212",t.file.deletions)}}function fI(n,e){if(n&1){let t=R();f(0,"button",29),D("click",function(){_(t);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),T(6,uI,2,1,"span",27),T(7,pI,2,1,"span",28),h(),F(),f(8,"svg",31),z(9,"polyline",32),h()()}if(n&2){let t=u().$implicit;ue("padding-left",t.depth*14+8,"px"),d(),dt("file-status status-"+t.file.status),d(),O(t.file.status),d(),I("title",t.file.path),d(),O(t.name),d(2),M(t.file.additions>0?6:-1),d(),M(t.file.deletions>0?7:-1)}}function hI(n,e){if(n&1&&T(0,dI,9,9,"button",19)(1,fI,10,9,"button",20),n&2){let t=e.$implicit;M(t.kind==="dir"?0:1)}}function mI(n,e){if(n&1&&(f(0,"div",18),K(1,hI,2,1,null,null,eI),h()),n&2){let t=u(2);d(),X(t.rows())}}function gI(n,e){n&1&&T(0,oI,2,0,"div",13)(1,mI,3,0,"div",18),n&2&&M(e.files.length===0?0:1)}function _I(n,e){if(n&1){let t=R();f(0,"app-diff-dialog",33),D("closed",function(){_(t);let r=u();return v(r.dialogFile.set(null))}),h()}if(n&2){let t=u();I("file",e)("originalRef",t.originalRef())("modifiedRef",t.modifiedRef())}}var Wc=class n{git=k(mt);vscode=k(en);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=G();diff=x(null);loading=x(!1);error=x("");dialogFile=x(null);collapsed=x(new Set);rows=$(()=>{let e=this.diff()?.files??[];return this.fileListView()!=="tree"?e.map(t=>({kind:"file",path:t.path,name:t.path,depth:0,file:t})):_o(e,this.collapsed())});body=x("");bodySub=null;workingHash=bn;isWorking=$(()=>this.commit().hash===this.workingHash);originalRef=$(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=$(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){ye(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe()}openFile(e){this.vscode.openDiff(e,this.originalRef(),this.modifiedRef())||this.dialogFile.set(e)}toggleDir(e){this.collapsed.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}loadBody(e){if(this.bodySub?.unsubscribe(),this.body.set(""),e.body!==void 0){this.body.set(e.body);return}this.bodySub=this.git.getCommitDetail(e.hash).subscribe({next:t=>this.body.set(t.body??""),error:()=>this.body.set("")})}loadDiff(e){if(this.loading.set(!0),this.error.set(""),this.diff.set(null),this.dialogFile.set(null),e===bn){this.git.getWorkingChanges().subscribe({next:t=>{this.loading.set(!1),this.diff.set({hash:bn,files:t.files})},error:()=>{this.loading.set(!1),this.error.set("Failed to load the working changes.")}});return}this.git.getCommitDiff(e).subscribe({next:t=>{this.loading.set(!1),this.diff.set(t)},error:()=>{this.loading.set(!1),this.error.set("Failed to load the commit diff.")}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({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(t,i){if(t&1&&(f(0,"aside",0)(1,"header",1)(2,"button",2),D("click",function(){return i.closed.emit()}),F(),f(3,"svg",3),z(4,"line",4)(5,"line",5),h()(),he(),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(),T(12,tI,9,5),h(),T(13,nI,2,2,"pre",11),h(),f(14,"div",12),T(15,iI,2,0,"div",13)(16,rI,1,1,"app-error-banner",14)(17,gI,2,1),h()(),T(18,_I,1,3,"app-diff-dialog",15)),t&2){let r,o;d(7),I("text",i.commit().message)("linking",i.issueLinking()),d(2),I("name",i.commit().author_name)("email",i.commit().author_email),d(2),O(i.commit().author_name),d(),M(i.isWorking()?-1:12),d(),M(i.body().trim()?13:-1),d(2),M(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),d(3),M((o=i.dialogFile())?18:-1,o)}},dependencies:[Rt,Nn,bo,go,Hs],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 Ks(n,e=0){return vI(n)?Number(n):arguments.length===2?e:0}function vI(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function by(n){return n instanceof hn?n.nativeElement:n}var Rh;try{Rh=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Rh=!1}var qc=(()=>{class n{_platformId=k(ir);isBrowser=this._platformId?qb(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||Rh)&&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=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var bI=new ee("cdk-dir-doc",{providedIn:"root",factory:yI});function yI(){return k(lt)}var CI=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function xI(n){let e=n?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?CI.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var yy=(()=>{class n{get value(){return this.valueSignal()}valueSignal=x("ltr");change=new fn;constructor(){let t=k(bI,{optional:!0});if(t){let i=t.body?t.body.dir:null,r=t.documentElement?t.documentElement.dir:null;this.valueSignal.set(xI(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var yn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(yn||{}),Zc,ur;function Cy(){if(ur==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return ur=!1,ur;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)ur=!0;else{let n=Element.prototype.scrollTo;n?ur=!/\{\s*\[native code\]\s*\}/.test(n.toString()):ur=!1}}return ur}function yo(){if(typeof document!="object"||!document)return yn.NORMAL;if(Zc==null){let n=document.createElement("div"),e=n.style;n.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let t=document.createElement("div"),i=t.style;i.width="2px",i.height="1px",n.appendChild(t),document.body.appendChild(n),Zc=yn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,Zc=n.scrollLeft===0?yn.NEGATED:yn.INVERTED),n.remove()}return Zc}var Yc=class{};function xy(n){return n&&typeof n.connect=="function"&&!(n instanceof Ao)}var Qc=class extends Yc{_data;constructor(e){super(),this._data=e}connect(){return $o(this._data)?this._data:we(this._data)}disconnect(){}},Xs=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(Xs||{}),Nh=new ee("_ViewRepeater"),Kc=class{viewCacheSize=20;_viewCache=[];applyChanges(e,t,i,r,o){e.forEachOperation((s,a,l)=>{let c,m;if(s.previousIndex==null){let b=()=>i(s,a,l);c=this._insertView(b,l,t,r(s)),m=c?Xs.INSERTED:Xs.REPLACED}else l==null?(this._detachAndCacheView(a,t),m=Xs.REMOVED):(c=this._moveView(a,l,t,r(s)),m=Xs.MOVED);o&&o({context:c?.context,operation:m,record:s})})}detach(){for(let e of this._viewCache)e.destroy();this._viewCache=[]}_insertView(e,t,i,r){let o=this._insertViewFromCache(t,i);if(o){o.context.$implicit=r;return}let s=e();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(e,t){let i=t.detach(e);this._maybeCacheView(i,t)}_moveView(e,t,i,r){let o=i.get(e);return i.move(o,t),o.context.$implicit=r,o}_maybeCacheView(e,t){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(e);else{let i=t.indexOf(e);i===-1?e.destroy():t.remove(i)}}_insertViewFromCache(e,t){let i=this._viewCache.pop();return i&&t.insert(i,e),i||null}};var wI=["contentWrapper"],EI=["*"],Dy=new ee("VIRTUAL_SCROLL_STRATEGY"),Ah=class{_scrolledIndexChange=new $e;scrolledIndexChange=this._scrolledIndexChange.pipe(zo());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(e,t,i){this._itemSize=e,this._minBufferPx=t,this._maxBufferPx=i}attach(e){this._viewport=e,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(e,t,i){i<t,this._itemSize=e,this._minBufferPx=t,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(e,t){this._viewport&&this._viewport.scrollToOffset(e*this._itemSize,t)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let e=this._viewport.getRenderedRange(),t={start:e.start,end:e.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(t.end>r){let l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,t.start=Math.floor(s)),t.end=Math.max(0,Math.min(r,t.start+l))}let a=o-t.start*this._itemSize;if(a<this._minBufferPx&&t.start!=0){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);t.start=Math.max(0,t.start-l),t.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=t.end*this._itemSize-(o+i);if(l<this._minBufferPx&&t.end!=r){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(t.end=Math.min(r,t.end+c),t.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(t),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*t.start)),this._scrolledIndexChange.next(Math.floor(s))}};function DI(n){return n._scrollStrategy}var Sy=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=Ks(t)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=Ks(t)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=Ks(t)}_maxBufferPx=200;_scrollStrategy=new Ah(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=gi({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Rs([{provide:Dy,useFactory:DI,deps:[jr(()=>n)]}]),xs]})}return n})(),SI=20,TI=(()=>{class n{_ngZone=k(Te);_platform=k(qc);_renderer=k(On).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new $e;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=SI){return this._platform.isBrowser?new le(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=t>0?this._scrolled.pipe(Uo(t)).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((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){let r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(Ho(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(t){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,t)&&i.push(o)}),i}_scrollableContainsElement(t,i){let r=by(i),o=t.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ty=(()=>{class n{elementRef=k(hn);scrollDispatcher=k(TI);ngZone=k(Te);dir=k(yy,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new $e;_renderer=k(vc);_cleanupScroll;_elementScrolled=new $e;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",t=>this._elementScrolled.next(t))),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(t){let i=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=r?t.end:t.start),t.right==null&&(t.right=r?t.start:t.end),t.bottom!=null&&(t.top=i.scrollHeight-i.clientHeight-t.bottom),r&&yo()!=yn.NORMAL?(t.left!=null&&(t.right=i.scrollWidth-i.clientWidth-t.left),yo()==yn.INVERTED?t.left=t.right:yo()==yn.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=i.scrollWidth-i.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let i=this.elementRef.nativeElement;Cy()?i.scrollTo(t):(t.top!=null&&(i.scrollTop=t.top),t.left!=null&&(i.scrollLeft=t.left))}measureScrollOffset(t){let i="left",r="right",o=this.elementRef.nativeElement;if(t=="top")return o.scrollTop;if(t=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return t=="start"?t=s?r:i:t=="end"&&(t=s?i:r),s&&yo()==yn.INVERTED?t==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&yo()==yn.NEGATED?t==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:t==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(i){return new(i||n)};static \u0275dir=gi({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),MI=20,II=(()=>{class n{_platform=k(qc);_listeners;_viewportSize;_change=new $e;_document=k(lt);constructor(){let t=k(Te),i=k(On).createRenderer(null,null);t.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(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,i=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect(),s=-o.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(t=MI){return t>0?this._change.pipe(Uo(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),wy=new ee("VIRTUAL_SCROLLABLE"),kI=(()=>{class n extends Ty{constructor(){super()}measureViewportSize(t){let i=this.elementRef.nativeElement;return t==="horizontal"?i.clientWidth:i.clientHeight}static \u0275fac=function(i){return new(i||n)};static \u0275dir=gi({type:n,features:[Ms]})}return n})();function PI(n,e){return n.start==e.start&&n.end==e.end}var OI=typeof requestAnimationFrame<"u"?ou:ru,Js=(()=>{class n extends kI{elementRef=k(hn);_changeDetectorRef=k(Mc);_scrollStrategy=k(Dy,{optional:!0});scrollable=k(wy,{optional:!0});_platform=k(qc);_detachedSubject=new $e;_renderedRangeSubject=new $e;get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new le(t=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>t.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=k(xt);_isDestroyed=!1;constructor(){super();let t=k(II);this._scrollStrategy,this._viewportChanges=t.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=ye(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:k(or).injector});k(et).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(il(null),Uo(0,OI),Ni(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(t){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(Ni(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(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){PI(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,i="to-start"){t=this.appendOnly&&i==="to-start"?0:t;let r=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",l=`translate${s}(${Number((o&&r?-1:1)*t)}px)`;this._renderedContentOffset=t,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(t,i="auto"){let r={behavior:i};this.orientation==="horizontal"?r.start=t:r.top=t,this.scrollable.scrollTo(r)}scrollToIndex(t,i="auto"){this._scrollStrategy.scrollToIndex(t,i)}measureScrollOffset(t){let i;return this.scrollable==this?i=r=>super.measureScrollOffset(r):i=r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(t??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let i,r="left",o="right",s=this.dir?.value=="rtl";t=="start"?i=s?o:r:t=="end"?i=s?r:o:t?i=t:i=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let t=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),!tt(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,dc(()=>{this._changeDetectionNeeded.set(!1);let t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of t)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=de({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&Wf(wI,7),i&2){let o;qf(o=Zf())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&ge("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",Ib]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Rs([{provide:Ty,useFactory:(t,i)=>t||i,deps:[[new rf,new nf(wy)],n]}]),Ms],ngContentSelectors:EI,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(zf(),y(0,"div",1,0),Gf(2),C(),ae(3,"div",2)),i&2&&(d(3),ue("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 Ey(n,e,t){let i=t;if(!i.getBoundingClientRect)return 0;let r=i.getBoundingClientRect();return n==="horizontal"?e==="start"?r.left:r.right:e==="start"?r.top:r.bottom}var My=(()=>{class n{_viewContainerRef=k(mi);_template=k(fi);_differs=k(Ic);_viewRepeater=k(Nh);_viewport=k(Js,{skipSelf:!0});viewChange=new $e;_dataSourceChanges=new $e;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(t){this._cdkVirtualForOf=t,xy(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new Qc($o(t)?t:Array.from(t||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(t){this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?(i,r)=>t(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(t){t&&(this._needsUpdate=!0,this._template=t)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(t){this._viewRepeater.viewCacheSize=Ks(t)}dataStream=this._dataSourceChanges.pipe(il(null),uu(),bt(([t,i])=>this._changeDataSource(t,i)),Vr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new $e;constructor(){let t=k(Te);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Ni(this._destroyed)).subscribe(i=>{this._renderedRange=i,this.viewChange.observers.length&&t.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(t,i){if(t.start>=t.end)return 0;t.start<this._renderedRange.start||t.end>this._renderedRange.end;let r=t.start-this._renderedRange.start,o=t.end-t.start,s,a;for(let l=0;l<o;l++){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){s=a=c.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?Ey(i,"end",a)-Ey(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):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((t,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(t,i):i)),this._needsUpdate=!0)}_changeDataSource(t,i){return t&&t.disconnect(this),this._needsUpdate=!0,i?i.connect(this):we()}_updateContext(){let t=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=t,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(t){this._viewRepeater.applyChanges(t,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),t.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(t){t.first=t.index===0,t.last=t.index===t.count-1,t.even=t.index%2===0,t.odd=!t.even}_getEmbeddedViewArgs(t,i){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}static ngTemplateContextGuard(t,i){return!0}static \u0275fac=function(i){return new(i||n)};static \u0275dir=gi({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Rs([{provide:Nh,useClass:Kc}])]})}return n})();function Xc(n){let e=[],t=new Int32Array(n.length),i=r=>{let o=e.indexOf(r);return o===-1&&(o=e.indexOf(null),o===-1&&(e.push(null),o=e.length-1),e[o]=r),o};for(let r=0;r<n.length;r++){let{hash:o,parents:s}=n[r],a=e.map((c,m)=>c===o?m:-1).filter(c=>c!==-1),l;if(a.length>0){l=a[0];for(let c=1;c<a.length;c++)e[a[c]]=null}else l=i(o);e[l]=s[0]??null;for(let c=1;c<s.length;c++)i(s[c]);t[r]=l}return t}var Iy=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function Lh(n){return Iy[Math.abs(n)%Iy.length]}var RI=2e3,Jc=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(e){return e.length<=RI?we(Xc(e)):new le(t=>{let i=this.ensureWorker();if(!i){t.next(Xc(e)),t.complete();return}let r=++this.nextId;this.pending.set(r,{rows:e,subscriber:t});let o=setTimeout(()=>this.fallback(),15e3);try{i.postMessage({id:r,hashes:e.map(s=>s.hash),parents:e.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[e,t]of this.pending)this.pending.delete(e),t.subscriber.next(Xc(t.rows)),t.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=e=>{let t=this.pending.get(e.data.id);if(t){if(!(e.data.lanes instanceof Int32Array)||e.data.lanes.length!==t.rows.length){this.fallback();return}t.subscriber.next(e.data.lanes),t.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 e of this.pending.values())e.subscriber.complete();this.pending.clear()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};function ky(n){return n?n.split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.startsWith("HEAD -> ")?{type:"head",name:e.slice(8)}:e==="HEAD"?{type:"head",name:"HEAD"}:e.startsWith("tag: ")?{type:"tag",name:e.slice(5)}:e.includes("/")?{type:"remote",name:e}:{type:"local",name:e}):[]}function Fh(n){let e=n.refs;return e?e==="HEAD"||e.startsWith("HEAD,")||e.startsWith("HEAD ->"):!1}function ed(n,e){if(typeof localStorage>"u")return e;try{let t=localStorage.getItem(n);return t===null?e:JSON.parse(t)}catch{return e}}function td(n,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(e))}catch{}}var NI=(n,e)=>e.index,AI=(n,e)=>e.hash,LI=(n,e)=>e.name;function FI(n,e){if(n&1){let t=R();f(0,"div",20)(1,"span",5),p(2,"Graph"),h(),f(3,"div",6),D("mousedown",function(r){_(t);let o=u();return v(o.startResize("graph",r))}),h()()}if(n&2){let t=u();ue("width",t.graphColumnWidth(),"px")}}function VI(n,e){if(n&1&&(f(0,"div",35),F(),f(1,"svg",36),z(2,"path",37)(3,"path",38),h()()),n&2){let t=u(2);ue("width",t.graphColumnWidth(),"px")}}function BI(n,e){if(n&1&&(f(0,"span",39),p(1),h()),n&2){let t=u();d(),q("",t.staged.length," staged")}}function jI(n,e){if(n&1&&(f(0,"span",40),p(1),h()),n&2){let t=u();d(),q("",t.unstaged.length," unstaged")}}function $I(n,e){if(n&1&&(f(0,"span",41),p(1),h()),n&2){let t=u();d(),q("",t.untracked.length," untracked")}}function HI(n,e){if(n&1&&(T(0,BI,2,1,"span",39),T(1,jI,2,1,"span",40),T(2,$I,2,1,"span",41)),n&2){let t=e;M(t.staged.length>0?0:-1),d(),M(t.unstaged.length>0?1:-1),d(),M(t.untracked.length>0?2:-1)}}function UI(n,e){if(n&1){let t=R();f(0,"div",21),D("click",function(){_(t);let r=u();return v(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){_(t);let o=u();return v(o.onWorkingContextMenu(r))}),T(1,VI,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(),he(),f(10,"span",31),p(11,"Uncommitted changes"),h()(),T(12,HI,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 t,i=u();ue("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),ge("selected",i.selectedHash()===i.workingHash),d(),M(i.showGraph()?1:-1),d(),ue("width",i.descriptionWidth(),"px"),d(10),M((t=i.workingChanges())?12:-1,t),d(),ue("width",i.columnWidths().date,"px"),d(2),ue("width",i.columnWidths().author,"px"),d(),O(i.identity().name||"You"),d(),ue("width",i.columnWidths().commit,"px")}}function zI(n,e){if(n&1&&(f(0,"div",35),F(),f(1,"svg",49),z(2,"path",44)(3,"line",45),h()()),n&2){let t=u(2);ue("width",t.graphColumnWidth(),"px")}}function GI(n,e){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let t=u().$implicit;d(),O(t.text)}}function WI(n,e){if(n&1&&p(0),n&2){let t=u().$implicit;q(" ",t.text," ")}}function qI(n,e){if(n&1&&T(0,GI,2,1,"mark",50)(1,WI,1,1),n&2){let t=e.$implicit;M(t.match?0:1)}}function ZI(n,e){if(n&1&&(z(0,"app-author-avatar",51),p(1)),n&2){let t=u().$implicit;I("name",t.author_name)("email",t.author_email??""),d(),q(" ",t.author_name," ")}}function YI(n,e){if(n&1){let t=R();f(0,"div",42),D("click",function(){let r=_(t).$implicit,o=u();return v(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=_(t).$implicit,s=u();return v(s.onStashContextMenu(r,o))}),T(1,zI,4,2,"div",22),f(2,"div",23)(3,"span",43),F(),f(4,"svg",25),z(5,"path",44)(6,"line",45),h(),he(),f(7,"span",31),p(8),h()(),f(9,"span",46),K(10,qI,2,1,null,null,Hn),h()(),f(12,"div",32),p(13),vi(14,"date"),h(),f(15,"div",47),T(16,ZI,2,3),h(),f(17,"div",48),p(18),h()()}if(n&2){let t=e.$implicit,i=u();ue("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),ge("selected",i.selectedHash()===t.hash),d(),M(i.showGraph()?1:-1),d(),ue("width",i.descriptionWidth(),"px"),d(),I("title",i.stashLabel(t)),d(5),O(i.stashLabel(t)),d(),I("title",t.message),d(),X(i.highlight(t.message)),d(2),ue("width",i.columnWidths().date,"px"),d(),q(" ",t.date?uo(14,23,t.date,"d MMM y HH:mm"):"\u2014"," "),d(2),ue("width",i.columnWidths().author,"px"),I("title",t.author_name),d(),M(t.author_name?16:-1),d(),ue("width",i.columnWidths().commit,"px"),I("title",t.hash),d(),q(" ",t.hash.slice(0,8)," ")}}function QI(n,e){if(n&1&&(f(0,"div",13),z(1,"span",52),p(2),h()),n&2){let t=u();d(2),O(t.pendingLabel())}}function KI(n,e){if(n&1&&(F(),z(0,"path",55)),n&2){let t=e.$implicit;ce("d",t.d)("stroke",t.color)}}function XI(n,e){if(n&1&&(F(),z(0,"circle",56)),n&2){let t=u().$implicit;ce("cx",t.x)("cy",t.y)("stroke",t.color)}}function JI(n,e){if(n&1&&(F(),z(0,"circle",57)),n&2){let t=u().$implicit;ce("cx",t.x)("cy",t.y)("fill",t.color)}}function ek(n,e){if(n&1&&T(0,XI,1,3,":svg:circle",56)(1,JI,1,3,":svg:circle",57),n&2){let t=e.$implicit;M(t.isHead?0:1)}}function tk(n,e){if(n&1&&(f(0,"div",53),F(),f(1,"svg",54)(2,"g"),K(3,KI,1,2,":svg:path",55,Hn),K(5,ek,2,1,null,null,AI),h()()()),n&2){let t=u();ue("width",t.viewportWidth(),"px"),d(),ue("transform",t.horizontalTransform()),ce("width",t.graphWidth()),d(),ce("transform","translate(0 "+-t.scrollTop()+")"),d(),X(t.edges()),d(2),X(t.nodes())}}function nk(n,e){if(n&1&&z(0,"div",35),n&2){let t=u(2);ue("width",t.graphColumnWidth(),"px")}}function ik(n,e){n&1&&(F(),f(0,"svg",25),z(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),h())}function rk(n,e){n&1&&(F(),f(0,"svg",25),z(1,"path",67)(2,"line",68),h())}function ok(n,e){if(n&1){let t=R();f(0,"span",62),D("contextmenu",function(r){let o=_(t).$implicit,s=u().$implicit,a=u();return v(a.onBadgeContextMenu(r,s.commit,o))}),T(1,ik,5,0,":svg:svg",25)(2,rk,3,0,":svg:svg",25),f(3,"span",31),p(4),h()()}if(n&2){let t=e.$implicit;dt("badge badge-"+t.type),d(),M(t.type==="head"||t.type==="local"?1:t.type==="tag"?2:-1),d(3),O(t.name)}}function sk(n,e){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let t=u().$implicit;d(),O(t.text)}}function ak(n,e){if(n&1&&p(0),n&2){let t=u().$implicit;q(" ",t.text," ")}}function lk(n,e){if(n&1&&T(0,sk,2,1,"mark",50)(1,ak,1,1),n&2){let t=e.$implicit;M(t.match?0:1)}}function ck(n,e){if(n&1){let t=R();f(0,"div",58),D("click",function(){let r=_(t).$implicit,o=u();return v(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=_(t).$implicit,s=u();return v(s.onRowContextMenu(r,o.commit))}),T(1,nk,1,2,"div",22),f(2,"div",23),K(3,ok,5,4,"span",59,LI),f(5,"span",60),z(6,"app-issue-text",61),h()(),f(7,"div",32),p(8),vi(9,"date"),h(),f(10,"div",47),z(11,"app-author-avatar",51),K(12,lk,2,1,null,null,Hn),h(),f(14,"div",48),p(15),h()()}if(n&2){let t=e.$implicit,i=u();ue("width",i.tableWidth(),"px"),ge("selected",t.commit.hash===i.selectedHash()),d(),M(i.showGraph()?1:-1),d(),ue("width",i.descriptionWidth(),"px"),d(),X(i.badges(t.commit)),d(2),ge("head",i.isHead(t.commit)),d(),I("text",t.commit.message)("search",i.search())("linking",i.issueLinking()),d(),ue("width",i.columnWidths().date,"px"),d(),q(" ",uo(9,24,t.commit.date,"d MMM y HH:mm")," "),d(2),ue("width",i.columnWidths().author,"px"),I("title",t.commit.author_name),d(),I("name",t.commit.author_name)("email",t.commit.author_email),d(),X(i.highlight(t.commit.author_name)),d(2),ue("width",i.columnWidths().commit,"px"),I("title",t.commit.hash),d(),q(" ",t.commit.hash.slice(0,8)," ")}}function dk(n,e){if(n&1&&(f(0,"div",18),p(1),h()),n&2){let t=u();d(),O(t.search().trim()?"No matching commits":"No commits to show")}}function uk(n,e){if(n&1){let t=R();f(0,"div",19)(1,"button",69),D("click",function(){_(t);let r=u();return v(r.onLoadMoreCommits())}),p(2,"Load more commits"),h(),f(3,"button",69),D("click",function(){_(t);let r=u();return v(r.onLoadAllCommits())}),p(4),h()()}if(n&2){let t=u();d(4),q("Load all (",t.unloaded(),")")}}var tn=34,Vh=14,Py=10,pk=72,Oy=10,Ny="guito.columnWidths",Ry={graph:0,description:480,date:132,author:150,commit:84},fk={graph:0,description:48,date:48,author:48,commit:48};function hk(){let n=ed(Ny,{}),e=U({},Ry);for(let t of Object.keys(Ry)){let i=n[t];typeof i=="number"&&Number.isFinite(i)&&i>=fk[t]&&(e[t]=i)}return e}var nd=class n{commits=N.required();selectedHash=N.required();identity=N({name:"",email:""});search=N("");showGraph=N(!0);selectedBranch=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=$(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=G();contextMenu=G();loadMoreRequested=G();loadAllRequested=G();rowHeight=tn;graph=k(Jc);viewport=Xt(Js);zone=k(Te);scrollTop=x(0);scrollLeft=x(0);viewportWidth=x(0);viewportHeight=x(0);constructor(){ye(()=>{let e=this.commits();this.updateGraph(e)}),lh(()=>{this.graphCommits(),this.columnWidths();let e=this.viewport();e&&tt(()=>{e.checkViewportSize(),this.measureViewport()})}),lh(()=>{this.selectedBranch(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let e=this.viewport();e&&tt(()=>{e.scrollToOffset(0),this.measureViewport()})}),ye(()=>{let e=this.scrollToHash();if(!e)return;let t=this.graphCommits().findIndex(r=>r.commit.hash===e.hash);if(t===-1)return;let i=this.viewport();i&&tt(()=>this.scrollToIndex(i,t))}),ye(e=>{let t=this.viewport();if(!t)return;let i=new ResizeObserver(()=>{this.zone.run(()=>{t.checkViewportSize(),this.measureViewport()})});i.observe(t.elementRef.nativeElement);let r=t.elementScrolled().subscribe(()=>{this.zone.run(()=>this.measureViewport())});e(()=>{i.disconnect(),r.unsubscribe()})}),ye(()=>{this.viewportWidth(),this.graphCommits(),tt(()=>{let e=this.viewportWidth()-this.graphColumnWidth()-this.columnWidths().date-this.columnWidths().author-this.columnWidths().commit-this.columnWidths().description;this.fillerWidth.set(Math.max(0,e))})})}measureViewport(){let e=this.viewport()?.elementRef.nativeElement;e&&(this.scrollTop.set(e.scrollTop),this.scrollLeft.set(e.scrollLeft),this.viewportWidth.set(e.clientWidth),this.viewportHeight.set(e.clientHeight))}scrollToIndex(e,t){let i=e.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,t*tn-(r-tn)/2),s=0,a=()=>{e.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=x(hk());graphCommits=x([]);graphSubscription=null;updateGraph(e){if(this.graphSubscription?.unsubscribe(),!this.showGraph()){this.graphLoading.set(!1),this.graphCommits.set(e.map(t=>({commit:t,lane:0,parents:[]})));return}this.graphLoading.set(!0),this.graphSubscription=this.graph.compute(e).subscribe(t=>{t.length===e.length&&(this.graphLoading.set(!1),this.graphCommits.set(e.map((i,r)=>({commit:i,lane:t[r],parents:i.parents??[]}))))})}graphWidth=$(()=>{let e=this.graphCommits().reduce((t,i)=>Math.max(t,i.lane),0)+1;return Math.max(pk,Py*2+e*Vh)});graphColumnWidth=$(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=x(0);descriptionWidth=$(()=>this.columnWidths().description+this.fillerWidth());tableWidth=$(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=$(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=$(()=>this.graphCommits().length*tn);allEdges=$(()=>{let e=this.graphCommits(),t=new Map,i=new Map;e.forEach((o,s)=>{t.set(o.commit.hash,s),i.set(o.commit.hash,o.lane)});let r=[];for(let o=0;o<e.length;o++){let s=e[o];for(let a of s.parents){let l=t.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=$(()=>{let e=this.graphCommits().length;if(e===0||this.viewportHeight()===0)return{start:0,end:0};let t=Math.max(0,Math.floor(this.scrollTop()/tn)-Oy),i=Math.min(e,Math.ceil((this.scrollTop()+this.viewportHeight())/tn)+Oy);return{start:t,end:i}});nodes=$(()=>{let{start:e,end:t}=this.visibleRange(),i=[];for(let r=e;r<t;r++){let o=this.graphCommits()[r];i.push({hash:o.commit.hash,x:this.laneX(o.lane),y:r*tn+tn/2,color:Lh(o.lane),isHead:Fh(o.commit)})}return i});edges=$(()=>{let e=this.allEdges(),{start:t,end:i}=this.visibleRange(),r=this.graphHeight(),o=[];for(let s of e){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))<t||l>=i)continue;let m=Lh(s.childLane),b=this.laneX(s.childLane),w=s.childRow*tn+tn/2;if(a<0){o.push({d:`M ${b} ${w} L ${b} ${r}`,color:m});continue}let E=this.laneX(s.parentLane),P=a*tn+tn/2;if(b===E)o.push({d:`M ${b} ${w} L ${E} ${P}`,color:m});else{let B=(w+P)/2;o.push({d:`M ${b} ${w} C ${b} ${B} ${E} ${B} ${E} ${P}`,color:m})}}return o});hasWorkingChanges=$(()=>{let e=this.workingChanges();return!!e&&e.staged.length+e.unstaged.length+e.untracked.length+e.conflicted.length>0});workingHash=bn;workingCommit=$(()=>({hash:bn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=$(()=>this.showStashes()?this.stashes():[]);stashCommit(e){return{hash:e.hash,date:e.date??"",message:e.message,refs:"",author_name:e.author_name??"",author_email:e.author_email??"",parents:[]}}stashLabel(e){return`stash@{${e.index}}`}resizeState=null;startResize(e,t){if(t.preventDefault(),t.stopPropagation(),e==="graph")this.resizeState={column:e,startX:t.clientX,startWidth:this.graphColumnWidth()};else if(e==="description"){let i=this.descriptionWidth();this.columnWidths.update(r=>se(U({},r),{description:i})),this.fillerWidth.set(0),this.resizeState={column:e,startX:t.clientX,startWidth:i}}else this.resizeState={column:e,startX:t.clientX,startWidth:this.columnWidths()[e]};document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd)}onResizeMove=e=>{let t=this.resizeState;if(!t)return;let i=e.clientX-t.startX,r=t.column==="graph"?this.graphWidth():48,o=Math.max(r,t.startWidth+i);this.columnWidths.update(s=>se(U({},s),{[t.column]:o}))};onResizeEnd=()=>{this.resizeState&&td(Ny,this.columnWidths()),this.resizeState=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd)};ngOnDestroy(){this.onResizeEnd(),this.graphSubscription?.unsubscribe()}onRowContextMenu(e,t){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"commit",commit:t}})}onBadgeContextMenu(e,t,i){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:i.type==="tag"?"tag":"branch",commit:t,branch:i}})}onWorkingContextMenu(e){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"working"}})}onStashContextMenu(e,t){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"stash",stash:t}})}highlight(e){let t=this.search().trim().toLowerCase();if(!t||!e)return[{text:e,match:!1}];let i=[],r=e.toLowerCase(),o=0,s=r.indexOf(t);for(;s!==-1;)s>o&&i.push({text:e.slice(o,s),match:!1}),i.push({text:e.slice(s,s+t.length),match:!0}),o=s+t.length,s=r.indexOf(t,o);return o<e.length&&i.push({text:e.slice(o),match:!1}),i.length>0?i:[{text:e,match:!1}]}onLoadMoreCommits(){this.loadMoreRequested.emit()}onLoadAllCommits(){this.loadAllRequested.emit()}trackByHash(e,t){return t.commit.hash}badges(e){let t=this.selectedBranch(),i=this.showRemote();return ky(e.refs).filter(r=>r.type==="tag"&&!this.showTags()||r.type==="remote"&&!i?!1:!t||r.type==="tag"?!0:r.name===t)}isHead(e){return Fh(e)}laneX(e){return Py+Vh/2+e*Vh}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-commit-table"]],viewQuery:function(t,i){t&1&&Vt(i.viewport,Js,5),t&2&&_n()},inputs:{commits:[1,"commits"],selectedHash:[1,"selectedHash"],identity:[1,"identity"],search:[1,"search"],showGraph:[1,"showGraph"],selectedBranch:[1,"selectedBranch"],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(t,i){t&1&&(f(0,"div",0)(1,"div",1)(2,"div",2),T(3,FI,4,2,"div",3),f(4,"div",4)(5,"span",5),p(6,"Description"),h(),f(7,"div",6),D("mousedown",function(o){return i.startResize("description",o)}),h()(),f(8,"div",7)(9,"span",5),p(10,"Date"),h(),f(11,"div",6),D("mousedown",function(o){return i.startResize("date",o)}),h()(),f(12,"div",8)(13,"span",5),p(14,"Author"),h(),f(15,"div",6),D("mousedown",function(o){return i.startResize("author",o)}),h()(),f(16,"div",9)(17,"span",5),p(18,"Commit"),h(),f(19,"div",6),D("mousedown",function(o){return i.startResize("commit",o)}),h()()(),T(20,UI,19,17,"div",10),K(21,YI,19,26,"div",11,NI),h(),f(23,"div",12),T(24,QI,3,1,"div",13),f(25,"div",14),T(26,tk,7,6,"div",15),f(27,"cdk-virtual-scroll-viewport",16),ao(28,ck,16,27,"div",17),h(),T(29,dk,2,1,"div",18),h(),T(30,uk,5,1,"div",19),h()()),t&2&&(ce("aria-busy",!!i.pendingLabel()),d(),ue("width",i.viewportWidth(),"px"),d(),ue("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),d(),M(i.showGraph()?3:-1),d(),ue("width",i.descriptionWidth(),"px"),d(4),ue("width",i.columnWidths().date,"px"),d(4),ue("width",i.columnWidths().author,"px"),d(4),ue("width",i.columnWidths().commit,"px"),d(4),M(i.hasWorkingChanges()?20:-1),d(),X(i.visibleStashes()),d(3),M(i.pendingLabel()?24:-1),d(2),M(i.showGraph()?26:-1),d(),I("itemSize",i.rowHeight),d(),I("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),d(),M(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),d(),M(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[Nn,Sy,My,Js,go,Hs],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 mk(n,e){n&1&&ae(0,"div",2)}function gk(n,e){if(n&1){let t=R();y(0,"button",4),V("click",function(){_(t);let r=u().$implicit,o=u(2);return v(o.onSelect(r))}),p(1),C()}if(n&2){let t=u().$implicit;ge("danger",t.danger),Y("disabled",t.disabled),d(),q(" ",t.label," ")}}function _k(n,e){if(n&1&&T(0,mk,1,0,"div",2)(1,gk,2,4,"button",3),n&2){let t=e.$implicit;M(t.separator?0:1)}}function vk(n,e){if(n&1){let t=R();y(0,"div",0),V("click",function(){_(t);let r=u();return v(r.closed.emit())})("contextmenu",function(r){_(t);let o=u();return r.preventDefault(),v(o.closed.emit())}),C(),y(1,"div",1),K(2,_k,2,1,null,null,Hn),C()}if(n&2){let t=u();d(),ue("left",t.left(),"px")("top",t.top(),"px"),d(),X(e.items)}}var Co=class n{menu=N.required();select=G();closed=G();left=$(()=>{let e=this.menu();return e?Math.max(4,Math.min(e.x,window.innerWidth-250)):0});top=$(()=>{let e=this.menu();if(!e)return 0;let t=e.items.length*30+12;return Math.max(4,Math.min(e.y,window.innerHeight-t-8))});onEscape(){this.menu()&&this.closed.emit()}onSelect(e){e.disabled||!e.action||(this.select.emit(e.action),this.closed.emit())}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-context-menu"]],hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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(t,i){if(t&1&&T(0,vk,4,4),t&2){let r;M((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 gt(n){n||(n=k(et));let e=new le(t=>{if(n.destroyed){t.next();return}return n.onDestroy(t.next.bind(t))});return t=>t.pipe(Ni(e))}function pr(n,e){let t=e?.injector??k(xt),i=new Oi(1),r=ye(()=>{let o;try{o=n()}catch(s){tt(()=>i.error(s));return}tt(()=>i.next(o))},{injector:t,manualCleanup:!0});return t.get(et).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Ay=(n,e)=>e.id;function bk(n,e){if(n&1){let t=R();f(0,"span",2)(1,"span",7),p(2),h(),f(3,"button",8),D("click",function(){let r=_(t).$implicit,o=u();return v(o.remove.emit(r))}),p(4," \xD7 "),h()()}if(n&2){let t=e.$implicit,i=u();d(),I("title",t.description??t.label),d(),O(t.label),d(),I("disabled",i.disabled()),ce("aria-label","Remove "+t.label)}}function yk(n,e){if(n&1){let t=R();f(0,"button",9),D("mousedown",function(r){return _(t),v(r.preventDefault())})("click",function(){_(t);let r=u();return v(r.trailingAction.emit())}),p(1),h()}if(n&2){let t=u();ge("on",t.trailingPressed()),I("title",t.trailingLabel())("disabled",t.disabled()),ce("aria-pressed",t.trailingPressed())("aria-label",t.trailingLabel()),d(),q(" ",t.trailingIcon()," ")}}function Ck(n,e){if(n&1&&z(0,"app-error-banner",5),n&2){let t=u();I("message",t.error())}}function xk(n,e){n&1&&(f(0,"li",10),p(1,"Searching..."),h())}function wk(n,e){n&1&&(f(0,"li",10),p(1,"No matches"),h())}function Ek(n,e){if(n&1&&(f(0,"span",14),p(1),h()),n&2){let t=u().$implicit;d(),O(t.description)}}function Dk(n,e){if(n&1){let t=R();f(0,"li",12),D("mousedown",function(r){let o=_(t).$implicit,s=u(2);return v(s.onSuggestionMouseDown(r,o))}),f(1,"span",13),p(2),h(),T(3,Ek,2,1,"span",14),h()}if(n&2){let t=e.$implicit,i=e.$index,r=u(2);ge("active",i===r.highlight()),ce("aria-selected",i===r.highlight()),d(2),O(t.label),d(),M(t.description?3:-1)}}function Sk(n,e){if(n&1&&(f(0,"ul",6),T(1,xk,2,0,"li",10),T(2,wk,2,0,"li",10),K(3,Dk,4,5,"li",11,Ay),h()),n&2){let t=u();d(),M(t.loading()?1:-1),d(),M(!t.loading()&&!t.error()&&!t.suggestions().length?2:-1),d(),X(t.suggestions())}}var xo=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=G();select=G();remove=G();trailingAction=G();open=x(!1);highlight=x(0);onInput(e){this.queryChange.emit(e.target.value),this.open.set(!0),this.highlight.set(0)}onKeydown(e){let t=this.suggestions();if(e.key==="ArrowDown"&&t.length)e.preventDefault(),this.highlight.update(i=>Math.min(i+1,t.length-1));else if(e.key==="ArrowUp"&&t.length)e.preventDefault(),this.highlight.update(i=>Math.max(i-1,0));else if(e.key==="Enter"){e.preventDefault();let i=t[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 e.key==="Escape"&&this.open()&&(e.stopPropagation(),this.open.set(!1))}pick(e){this.open.set(!1),this.select.emit(e)}onSuggestionMouseDown(e,t){e.preventDefault(),this.pick(t)}onBlur(){setTimeout(()=>this.open.set(!1),120)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({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(t,i){t&1&&(f(0,"div",0)(1,"div",1),K(2,bk,5,4,"span",2,Ay),f(4,"input",3),D("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(),T(5,yk,2,7,"button",4),h(),T(6,Ck,1,1,"app-error-banner",5),T(7,Sk,5,2,"ul",6),h()),t&2&&(d(2),X(i.chips()),d(2),I("value",i.query())("disabled",i.disabled()),ce("placeholder",i.chips().length?"":i.placeholder()),d(),M(i.trailingIcon()?5:-1),d(),M(i.error()?6:-1),d(),M(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?7:-1))},dependencies:[Rt],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 Bh=(n,e)=>e.name;function Tk(n,e){if(n&1&&(f(0,"a",10),p(1," Open in Azure DevOps "),h()),n&2){let t=u();I("href",t.url,rr)}}function Mk(n,e){if(n&1&&(f(0,"p",14),p(1),h()),n&2){let t=e.$implicit;d(),O(t)}}function Ik(n,e){if(n&1&&K(0,Mk,2,1,"p",14,gn),n&2){let t=u();X(t.warnings)}}function kk(n,e){if(n&1){let t=R();f(0,"div",8)(1,"p",9),p(2),h(),T(3,Tk,2,1,"a",10),f(4,"p",11),p(5),h(),T(6,Ik,2,0),h(),f(7,"div",12)(8,"button",13),D("click",function(){_(t);let r=u();return v(r.closed.emit())}),p(9,"Close"),h()()}if(n&2){let t=e;d(2),q("\u2714 Pull Request #",t.id," created"),d(),M(t.url?3:-1),d(2),q("Source branch: ",t.branch),d(),M(t.warnings!=null&&t.warnings.length?6:-1)}}function Pk(n,e){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.source()===t.name),d(),q(" ",t.name," ")}}function Ok(n,e){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.source()===t.name),d(),q(" ",t.name," ")}}function Rk(n,e){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 Nk(n,e){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.target()===t.name),d(),q(" ",t.name," ")}}function Ak(n,e){if(n&1&&(f(0,"p",11),p(1),h()),n&2){let t=u(2);d(),q('Press Enter to add "',t.tagQuery().trim(),'" as a new tag.')}}function Lk(n,e){if(n&1&&z(0,"app-error-banner",30),n&2){let t=u(2);I("message",t.error())}}function Fk(n,e){if(n&1){let t=R();f(0,"div",15)(1,"label",16)(2,"span",17),p(3,"Title"),h(),f(4,"input",18),D("input",function(r){_(t);let o=u();return v(o.onTitleInput(r))}),h()(),f(5,"label",16)(6,"span",17),p(7,"Description"),h(),f(8,"textarea",19),D("input",function(r){_(t);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),D("change",function(r){_(t);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),K(17,Pk,2,3,"option",22,Bh),h(),f(19,"optgroup",24),K(20,Ok,2,3,"option",22,Bh),h()()(),T(22,Rk,2,0,"p",11),f(23,"label",16)(24,"span",17),p(25,"Target branch"),h(),f(26,"select",20),D("change",function(r){_(t);let o=u();return v(o.onTargetChange(r))}),K(27,Nk,2,3,"option",22,Bh),h()(),f(29,"label",25)(30,"input",26),D("change",function(r){_(t);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),D("queryChange",function(r){_(t);let o=u();return v(o.requiredReviewerQuery.set(r))})("select",function(r){_(t);let o=u();return v(o.addRequiredReviewer(r))})("remove",function(r){_(t);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),D("queryChange",function(r){_(t);let o=u();return v(o.optionalReviewerQuery.set(r))})("select",function(r){_(t);let o=u();return v(o.addOptionalReviewer(r))})("remove",function(r){_(t);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),D("queryChange",function(r){_(t);let o=u();return v(o.workItemQuery.set(r))})("select",function(r){_(t);let o=u();return v(o.addWorkItem(r))})("remove",function(r){_(t);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),D("queryChange",function(r){_(t);let o=u();return v(o.tagQuery.set(r))})("select",function(r){_(t);let o=u();return v(o.addTag(r))})("remove",function(r){_(t);let o=u();return v(o.removeTag(r))}),h()(),T(48,Ak,2,1,"p",11),T(49,Lk,1,1,"app-error-banner",30),h(),f(50,"div",12)(51,"button",31),D("click",function(){_(t);let r=u();return v(r.closed.emit())}),p(52," Cancel "),h(),f(53,"button",32),D("click",function(){_(t);let r=u();return v(r.create())}),p(54),h()()}if(n&2){let t=u();d(4),I("value",t.title()),d(4),I("value",t.description()),d(6),I("value",t.newBranchValue)("selected",t.source()===t.newBranchValue),d(3),X(t.localBranches()),d(3),X(t.remoteBranches()),d(2),M(t.source()===t.newBranchValue?22:-1),d(5),X(t.remoteBranches()),d(3),I("checked",t.isDraft())("disabled",t.creating()),d(5),I("chips",t.requiredReviewers())("suggestions",t.requiredReviewerSuggestions())("loading",t.requiredReviewersLoading())("error",t.requiredReviewersError())("query",t.requiredReviewerQuery()),d(4),I("chips",t.optionalReviewers())("suggestions",t.optionalReviewerSuggestions())("loading",t.optionalReviewersLoading())("error",t.optionalReviewersError())("query",t.optionalReviewerQuery()),d(4),I("chips",t.workItemChips())("suggestions",t.workItemSuggestions())("loading",t.workItemsLoading())("error",t.workItemsError())("query",t.workItemQuery()),d(4),I("chips",t.tagChips())("suggestions",t.filteredTagSuggestions())("loading",t.tagsLoading())("error",t.tagsError())("query",t.tagQuery())("allowFreeText",!0),d(),M(t.tagQuery().trim()&&!t.tagSuggestions().length&&!t.tagsLoading()?48:-1),d(),M(t.error()?49:-1),d(2),I("disabled",t.creating()),d(2),I("disabled",!t.canCreate()),d(),q(" ",t.creating()?"Creating...":"Create Pull Request"," ")}}var Ly="__new__",id=class n{git=k(mt);destroyRef=k(et);branches=N.required();closed=G();created=G();newBranchValue=Ly;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=$(()=>this.branches().filter(e=>!e.remote));remoteBranches=$(()=>this.branches().filter(e=>e.remote));canCreate=$(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=$(()=>{let e=this.tagQuery().trim().toLowerCase();return e?this.tagSuggestions().filter(t=>t.label.toLowerCase().includes(e)):this.tagSuggestions()});constructor(){this.bindLookup(this.requiredReviewerQuery,this.requiredReviewerSuggestions,this.requiredReviewersLoading,this.requiredReviewersError,e=>this.git.searchReviewers(e),e=>({id:e.id,label:e.label,description:e.description}),2),this.bindLookup(this.optionalReviewerQuery,this.optionalReviewerSuggestions,this.optionalReviewersLoading,this.optionalReviewersError,e=>this.git.searchReviewers(e),e=>({id:e.id,label:e.label,description:e.description}),2),this.bindLookup(this.workItemQuery,this.workItemSuggestions,this.workItemsLoading,this.workItemsError,e=>this.git.searchWorkItems(e),e=>({id:String(e.id),label:`#${e.id} ${e.title}`,description:e.state}),1)}bindLookup(e,t,i,r,o,s,a){pr(e).pipe(bt(l=>(t.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?we([]):new le(c=>{let m=setTimeout(()=>{c.next(l.trim()),c.complete()},300);return()=>clearTimeout(m)}).pipe(bt(o),ot(c=>(r.set(c?.error?.error||"Unable to load suggestions. Try searching again."),we([])))))),gt(this.destroyRef)).subscribe(l=>{t.set(l.map(s)),i.set(!1)})}ngOnInit(){let e=this.branches(),t=e.find(s=>s.current&&!s.remote),i=e.find(s=>!s.remote);this.source.set(t?.name??i?.name??""),this.title()||this.title.set(t?.name??"");let r=e.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(gt(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(e){this.title.set(e.target.value)}onDescriptionInput(e){this.description.set(e.target.value)}onSourceChange(e){this.source.set(e.target.value)}onTargetChange(e){this.target.set(e.target.value)}isReviewerSelected(e){return[...this.requiredReviewers(),...this.optionalReviewers()].some(t=>t.id===e)}addRequiredReviewer(e){this.requiredReviewerQuery.set(""),this.requiredReviewerSuggestions.set([]),this.isReviewerSelected(e.id)||this.requiredReviewers.update(t=>[...t,e])}addOptionalReviewer(e){this.optionalReviewerQuery.set(""),this.optionalReviewerSuggestions.set([]),this.isReviewerSelected(e.id)||this.optionalReviewers.update(t=>[...t,e])}removeRequiredReviewer(e){this.requiredReviewers.update(t=>t.filter(i=>i.id!==e.id))}removeOptionalReviewer(e){this.optionalReviewers.update(t=>t.filter(i=>i.id!==e.id))}addWorkItem(e){this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.workItemChips().some(t=>t.id===e.id)||this.workItemChips.update(t=>[...t,e])}removeWorkItem(e){this.workItemChips.update(t=>t.filter(i=>i.id!==e.id))}addTag(e){this.tagQuery.set(""),this.tagChips().some(t=>t.id===e.id)||this.tagChips.update(t=>[...t,e])}removeTag(e){this.tagChips.update(t=>t.filter(i=>i.id!==e.id))}create(){if(!this.canCreate())return;let e=this.source()===Ly;this.creating.set(!0),this.error.set("");let t=[...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:e?"":this.source(),targetBranch:this.target(),title:this.title().trim()||void 0,description:this.description().trim()||void 0,newBranch:e,isDraft:this.isDraft(),reviewers:t.length?t: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(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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(t,i){if(t&1&&(f(0,"div",0),D("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),D("click",function(){return i.closed.emit()}),F(),f(6,"svg",5),z(7,"line",6)(8,"line",7),h()()(),T(9,kk,10,4)(10,Fk,55,33),h()),t&2){let r;d(5),I("disabled",i.creating()),d(4),M((r=i.result())?9:10,r)}},dependencies:[Rt,xo],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 Vk=(n,e)=>e.name;function Bk(n,e){n&1&&(y(0,"p"),p(1,"Repository preferences and Git configuration."),C())}function jk(n,e){if(n&1&&(y(0,"div",5),p(1),C()),n&2){let t=u();d(),O(t.error())}}function $k(n,e){if(n&1){let t=R();y(0,"div",29)(1,"strong",30),p(2),C(),y(3,"span",31),p(4),C(),y(5,"span"),p(6,"Fetch"),C(),y(7,"span",32)(8,"button",33),V("click",function(){let r=_(t).$implicit,o=u(2);return v(o.editRemote(r))}),p(9,"Edit"),C(),y(10,"button",34),V("click",function(){let r=_(t).$implicit,o=u(2);return v(o.removeRemote(r.name))}),p(11,"Remove"),C()()(),y(12,"div",35),ae(13,"span"),y(14,"span",31),p(15),C(),y(16,"span"),p(17,"Push"),C(),ae(18,"span"),C()}if(n&2){let t=e.$implicit;d(2),O(t.name),d(2),O(t.fetchUrl),d(11),O(t.pushUrl)}}function Hk(n,e){n&1&&(y(0,"p",19),p(1,"No remotes configured."),C())}function Uk(n,e){if(n&1){let t=R();y(0,"div",13)(1,"span"),p(2,"Issue regex"),C(),y(3,"code"),p(4),C(),y(5,"span"),p(6,"Issue URL"),C(),y(7,"code"),p(8),C(),y(9,"span"),p(10,"Scope"),C(),y(11,"strong"),p(12),C()(),y(13,"div",14)(14,"button",15),V("click",function(){_(t);let r=u(2);return v(r.editIssueLinking())}),p(15,"Edit"),C(),y(16,"button",36),V("click",function(){_(t);let r=u(2);return v(r.removeIssueLinking())}),p(17,"Remove"),C()()}if(n&2){let t=e;d(4),O(t.regex),d(4),O(t.url),d(4),O(t.useGlobally?"Global":"This repository")}}function zk(n,e){if(n&1){let t=R();y(0,"div",14)(1,"button",15),V("click",function(){_(t);let r=u(2);return v(r.editIssueLinking())}),p(2,"+ Add Issue Linking"),C()()}}function Gk(n,e){if(n&1){let t=R();y(0,"div",6)(1,"fieldset")(2,"legend"),p(3,"Repository"),C(),y(4,"label",7)(5,"span")(6,"strong"),p(7,"Automatically refresh"),C(),y(8,"small"),p(9,"Reload changes made outside Guito."),C()(),y(10,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"autoReload"))}),C()(),y(11,"label",7)(12,"span")(13,"strong"),p(14,"Show Git graph"),C(),y(15,"small"),p(16,"Display branch lines beside commit history."),C()(),y(17,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"showGraph"))}),C()(),y(18,"label",7)(19,"span")(20,"strong"),p(21,"Show stashes"),C(),y(22,"small"),p(23,"Pin stash entries above commit history."),C()(),y(24,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"showStashes"))}),C()(),y(25,"label",7)(26,"span")(27,"strong"),p(28,"Show tags"),C(),y(29,"small"),p(30,"Show tag badges attached to commits."),C()(),y(31,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"showTags"))}),C()(),y(32,"label",7)(33,"span")(34,"strong"),p(35,"Show remote branches"),C(),y(36,"small"),p(37,"Include remote branches in the repository panel and branch pills."),C()(),y(38,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"showRemoteBranches"))}),C()(),y(39,"label",9)(40,"span")(41,"strong"),p(42,"Search mode"),C(),y(43,"small"),p(44,"Navigate jumps between matches with arrows; filter shows only matching commits."),C()(),y(45,"select",10),V("change",function(r){_(t);let o=u();return v(o.changeSearchMode(r.target))}),y(46,"option",11),p(47,"Navigate matches"),C(),y(48,"option",12),p(49,"Filter matches"),C()()(),y(50,"label",7)(51,"span")(52,"strong"),p(53,"Case-sensitive search"),C(),y(54,"small"),p(55,"Only match commits with the same uppercase and lowercase letters."),C()(),y(56,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"searchCaseSensitive"))}),C()()(),y(57,"fieldset")(58,"legend"),p(59,"User details"),C(),y(60,"div",13)(61,"span"),p(62,"User name"),C(),y(63,"strong"),p(64),C(),y(65,"span"),p(66,"User email"),C(),y(67,"strong"),p(68),C()(),y(69,"div",14)(70,"button",15),V("click",function(){_(t);let r=u();return v(r.editIdentity())}),p(71,"Edit"),C(),y(72,"button",16),V("click",function(){_(t);let r=u();return v(r.removeIdentity())}),p(73,"Remove"),C()()(),y(74,"fieldset")(75,"legend"),p(76,"Remote configuration"),C(),y(77,"div",17)(78,"div",18)(79,"strong"),p(80,"Remote"),C(),y(81,"strong"),p(82,"URL"),C(),y(83,"strong"),p(84,"Type"),C(),y(85,"strong"),p(86,"Action"),C()(),K(87,$k,19,3,null,null,Vk,!1,Hk,2,0,"p",19),C(),y(90,"div",14)(91,"button",15),V("click",function(){_(t);let r=u();return v(r.editRemote())}),p(92,"+ Add Remote"),C()()(),y(93,"fieldset")(94,"legend"),p(95,"Issue linking"),C(),y(96,"p",20),p(97,"Convert issue numbers in commit messages into links to your issue tracking system."),C(),T(98,Uk,18,3)(99,zk,3,0,"div",14),C(),y(100,"fieldset")(101,"legend"),p(102,"Changed files"),C(),y(103,"label",21)(104,"input",22),V("change",function(){_(t);let r=u();return v(r.fileListView.set("flat"))}),C(),y(105,"span")(106,"strong"),p(107,"Flat list"),C(),y(108,"small"),p(109,"Show each file with its full path."),C()()(),y(110,"label",21)(111,"input",22),V("change",function(){_(t);let r=u();return v(r.fileListView.set("tree"))}),C(),y(112,"span")(113,"strong"),p(114,"Directory tree"),C(),y(115,"small"),p(116,"Group files into collapsible folders."),C()()()(),y(117,"fieldset")(118,"legend"),p(119,"Azure DevOps"),C(),y(120,"label",23)(121,"span")(122,"strong"),p(123,"Server URL"),C(),y(124,"small"),p(125,"Enables pull request creation for an on-prem Azure DevOps Server."),C()(),y(126,"input",24),V("input",function(r){_(t);let o=u();return v(o.azureDevOpsUrl.set(r.target.value))}),C()(),y(127,"label",25)(128,"span")(129,"strong"),p(130,"Automatic PR branch name"),C(),y(131,"small"),p(132,"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()(),y(133,"input",26),V("input",function(r){_(t);let o=u();return v(o.prBranchNameTemplate.set(r.target.value))}),C()(),y(134,"label",7)(135,"span")(136,"strong"),p(137,"Allow merge completion"),C(),y(138,"small"),p(139,'Offer the "No fast-forward (merge commit)" and "Semi-linear merge" pull request completion strategies.'),C()(),y(140,"input",8),V("change",function(r){_(t);let o=u();return v(o.setChecked(r.target,"allowMerge"))}),C()()()(),y(141,"footer")(142,"button",27),V("click",function(){_(t);let r=u();return v(r.closed.emit())}),p(143,"Cancel"),C(),y(144,"button",28),V("click",function(){_(t);let r=u();return v(r.save())}),p(145),C()()}if(n&2){let t,i=u();d(10),Y("checked",i.autoReload()),d(7),Y("checked",i.showGraph()),d(7),Y("checked",i.showStashes()),d(7),Y("checked",i.showTags()),d(7),Y("checked",i.showRemoteBranches()),d(7),Y("value",i.searchMode()),d(11),Y("checked",i.searchCaseSensitive()),d(8),O(i.identity().name||"Not configured"),d(4),O(i.identity().email||"Not configured"),d(4),Y("disabled",i.busy()),d(15),X(i.remotes()),d(11),M((t=i.settings().issueLinking)?98:99,t),d(6),Y("checked",i.fileListView()==="flat"),d(7),Y("checked",i.fileListView()==="tree"),d(15),Y("value",i.azureDevOpsUrl()),d(7),Y("value",i.prBranchNameTemplate()),d(7),Y("checked",i.allowMerge()),d(2),Y("disabled",i.saving()),d(2),Y("disabled",i.saving()||i.busy()),d(),O(i.saving()?"Saving...":"Save settings")}}function Wk(n,e){if(n&1){let t=R();y(0,"label",38)(1,"span")(2,"strong"),p(3,"User name"),C()(),y(4,"input",39),V("input",function(r){_(t);let o=u(2);return v(o.userName.set(r.target.value))}),C()(),y(5,"label",38)(6,"span")(7,"strong"),p(8,"User email"),C()(),y(9,"input",40),V("input",function(r){_(t);let o=u(2);return v(o.userEmail.set(r.target.value))}),C()()}if(n&2){let t=u(2);d(4),Y("value",t.userName()),d(5),Y("value",t.userEmail())}}function qk(n,e){if(n&1){let t=R();y(0,"label",38)(1,"span")(2,"strong"),p(3,"Remote name"),C()(),y(4,"input",41),V("input",function(r){_(t);let o=u(2);return v(o.remoteName.set(r.target.value))}),C()(),y(5,"label",38)(6,"span")(7,"strong"),p(8,"Fetch URL"),C()(),y(9,"input",42),V("input",function(r){_(t);let o=u(2);return v(o.fetchUrl.set(r.target.value))}),C()(),y(10,"label",38)(11,"span")(12,"strong"),p(13,"Push URL"),C(),y(14,"small"),p(15,"Leave blank to use the fetch URL."),C()(),y(16,"input",43),V("input",function(r){_(t);let o=u(2);return v(o.pushUrl.set(r.target.value))}),C()()}if(n&2){let t=u(2);d(4),Y("value",t.remoteName()),d(5),Y("value",t.fetchUrl()),d(7),Y("value",t.pushUrl())}}function Zk(n,e){if(n&1){let t=R();y(0,"p",20),p(1,"For example, regex "),y(2,"code"),p(3,"#(\\d+)"),C(),p(4," and URL "),y(5,"code"),p(6,"https://github.com/owner/repo/issues/$1"),C(),p(7," turn #123 into a link."),C(),y(8,"label",38)(9,"span")(10,"strong"),p(11,"Issue regex"),C()(),y(12,"input",44),V("input",function(r){_(t);let o=u(2);return v(o.issueRegex.set(r.target.value))}),C()(),y(13,"label",38)(14,"span")(15,"strong"),p(16,"Issue URL"),C()(),y(17,"input",45),V("input",function(r){_(t);let o=u(2);return v(o.issueUrl.set(r.target.value))}),C()(),y(18,"label",21)(19,"input",8),V("change",function(r){_(t);let o=u(2);return v(o.issueGlobal.set(r.target.checked))}),C(),y(20,"span")(21,"strong"),p(22,"Use globally"),C(),y(23,"small"),p(24,"Apply this rule to repositories without their own rule."),C()()()}if(n&2){let t=u(2);d(12),Y("value",t.issueRegex()),d(5),Y("value",t.issueUrl()),d(2),Y("checked",t.issueGlobal())}}function Yk(n,e){if(n&1){let t=R();y(0,"div",37),T(1,Wk,10,2)(2,qk,17,3)(3,Zk,25,3),C(),y(4,"footer")(5,"button",27),V("click",function(){_(t);let r=u();return v(r.mode.set("main"))}),p(6,"Cancel"),C(),y(7,"button",28),V("click",function(){_(t);let r=u();return v(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),p(8),C()()}if(n&2){let t=u();d(),M(t.mode()==="identity"?1:t.mode()==="remote"?2:3),d(4),Y("disabled",t.busy()),d(2),Y("disabled",t.busy()),d(),O(t.busy()?"Saving...":"Save")}}var rd=class n{git=k(mt);settings=N.required();identity=N.required();saving=N(!1);saved=G();settingsUpdated=G();identityChanged=G();repositoryChanged=G();closed=G();azureDevOpsUrl=x("");prBranchNameTemplate=x("pr/${randomstring}");autoReload=x(!0);showGraph=x(!0);showStashes=x(!1);showTags=x(!0);showRemoteBranches=x(!0);fileListView=x("flat");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(){ye(()=>{let e=this.settings();this.azureDevOpsUrl.set(e.azureDevOpsUrl??""),this.prBranchNameTemplate.set(e.prBranchNameTemplate??"pr/${randomstring}"),this.autoReload.set(e.autoReload!==!1),this.showGraph.set(e.showGraph!==!1),this.showStashes.set(e.showStashes===!0),this.showTags.set(e.showTags!==!1),this.showRemoteBranches.set(e.showRemoteBranches!==!1),this.fileListView.set(e.fileListView==="tree"?"tree":"flat"),this.searchMode.set(e.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(e.searchCaseSensitive===!0),this.allowMerge.set(e.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(e,t){this[t].set(e.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(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive(),allowMerge:this.allowMerge()})}changeSearchMode(e){let t=e.value;this.searchMode.set(t==="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()}),e=>{this.identityChanged.emit(e),this.repositoryChanged.emit(),this.mode.set("main")})}removeIdentity(){window.confirm("Remove the repository-specific Git user name and email?")&&this.run(this.git.removeIdentity(),e=>{this.identityChanged.emit(e),this.repositoryChanged.emit()})}editRemote(e){this.originalRemoteName.set(e?.name??""),this.remoteName.set(e?.name??""),this.fetchUrl.set(e?.fetchUrl??""),this.pushUrl.set(e?.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()}),e=>{this.remotes.set(e),this.repositoryChanged.emit(),this.mode.set("main")})}removeRemote(e){window.confirm(`Remove the remote "${e}" from this repository?`)&&this.run(this.git.removeRemote(e),t=>{this.remotes.set(t),this.repositoryChanged.emit()})}editIssueLinking(){let e=this.settings().issueLinking;this.issueRegex.set(e?.regex??"#(\\d+)"),this.issueUrl.set(e?.url??""),this.issueGlobal.set(e?.useGlobally??!1),this.error.set(""),this.mode.set("issue")}saveIssueLinking(){let e={regex:this.issueRegex().trim(),url:this.issueUrl().trim(),useGlobally:this.issueGlobal()};this.run(this.git.saveSettings({issueLinking:e}),t=>{this.settingsUpdated.emit(t),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}),e=>this.settingsUpdated.emit(e))}loadRemotes(){this.git.getRemotes().subscribe({next:e=>this.remotes.set(e),error:e=>this.error.set(this.errorMessage(e))})}run(e,t){this.busy()||(this.busy.set(!0),this.error.set(""),e.subscribe({next:i=>{this.busy.set(!1),t(i)},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}errorMessage(e){return e?.error?.error??e?.message??"The setting could not be saved."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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","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(t,i){t&1&&(y(0,"div",0),V("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),C(),y(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),p(5),C(),T(6,Bk,2,0,"p"),C(),y(7,"button",4),V("click",function(){return i.closed.emit()}),p(8,"\xD7"),C()(),T(9,jk,2,1,"div",5),T(10,Gk,146,20)(11,Yk,9,4),C()),t&2&&(d(5),O(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),d(),M(i.mode()==="main"?6:-1),d(),Y("disabled",i.saving()||i.busy()),d(2),M(i.error()?9:-1),d(),M(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 Qk=["inputEl"],Kk=["searchEl"],Xk=(n,e)=>e.value;function Jk(n,e){if(n&1&&(y(0,"p",5),p(1),C()),n&2){let t=u();d(),O(t.label)}}function eP(n,e){if(n&1){let t=R();y(0,"input",13,0),V("input",function(r){_(t);let o=u(3);return v(o.onSearch(r))})("keydown.enter",function(r){_(t);let o=u(3);return v(o.onSearchEnter(r))}),C()}if(n&2){let t=u(3);Y("value",t.search())}}function tP(n,e){if(n&1&&(y(0,"span",18),p(1),C()),n&2){let t=u().$implicit;d(),O(t.description)}}function nP(n,e){if(n&1){let t=R();y(0,"button",14),V("click",function(){let r=_(t).$implicit,o=u(3);return v(o.choose(r))})("dblclick",function(){_(t);let r=u(3);return v(r.confirm())}),ae(1,"span",15),y(2,"span",16)(3,"span",17),p(4),C(),T(5,tP,2,1,"span",18),C()()}if(n&2){let t=e.$implicit,i=u(3);ge("selected",i.choice()===t.value)("danger",t.danger),ce("aria-checked",i.choice()===t.value),d(4),O(t.label),d(),M(t.description?5:-1)}}function iP(n,e){n&1&&(y(0,"p",12),p(1,"No matching branches"),C())}function rP(n,e){if(n&1&&(T(0,eP,2,1,"input",9),y(1,"div",10),K(2,nP,6,7,"button",11,Xk,!1,iP,2,0,"p",12),C()),n&2){let t=u(),i=u();M(t.searchable?0:-1),d(2),X(i.filteredOptions())}}function oP(n,e){if(n&1){let t=R();y(0,"label",19),p(1),C(),y(2,"input",20,1),V("input",function(r){_(t);let o=u(2);return v(o.onInput(r))})("keydown.enter",function(){_(t);let r=u(2);return v(r.confirm())}),C()}if(n&2){let t=u(),i=u();d(),O(t.label||t.title),d(),Y("value",i.value()),ce("placeholder",t.placeholder||" ")("aria-label",t.label||t.title)}}function sP(n,e){if(n&1){let t=R();y(0,"div",2),V("click",function(){_(t);let r=u();return v(r.cancelled.emit())}),C(),y(1,"div",3)(2,"h3",4),p(3),C(),T(4,Jk,2,1,"p",5),T(5,rP,5,2)(6,oP,4,4),y(7,"div",6)(8,"button",7),V("click",function(){_(t);let r=u();return v(r.cancelled.emit())}),p(9,"Cancel"),C(),y(10,"button",8),V("click",function(){_(t);let r=u();return v(r.confirm())}),p(11),C()()()}if(n&2){let t=e,i=u();d(3),O(t.title),d(),M(t.label?4:-1),d(),M(i.options().length>0?5:t.confirmOnly?-1:6),d(5),ge("btn-danger",t.danger),Y("disabled",i.options().length===0&&!t.confirmOnly&&!t.allowEmpty&&!i.value().trim()||t.searchable&&i.filteredOptions().length===0),d(),q(" ",t.okLabel||"OK"," ")}}var od=class n{state=N.required();confirmed=G();cancelled=G();value=x("");choice=x("");options=$(()=>this.state()?.options??[]);search=x("");filteredOptions=$(()=>{let e=this.search().trim().toLowerCase(),t=this.options();return e?t.filter(i=>i.label.toLowerCase().includes(e)||i.value.toLowerCase().includes(e)):t});inputEl=Xt("inputEl");searchEl=Xt("searchEl");constructor(){ye(()=>{let e=this.state();e&&(this.value.set(e.value??""),this.choice.set(e.options?.[0]?.value??""),this.search.set(""));let t=this.inputEl()??this.searchEl();e&&t&&(t.nativeElement.focus(),t.nativeElement.select())})}onEscape(){this.state()&&this.cancelled.emit()}onInput(e){this.value.set(e.target.value)}choose(e){this.choice.set(e.value)}onSearch(e){this.search.set(e.target.value);let t=this.filteredOptions();t.length&&!t.some(i=>i.value===this.choice())&&this.choice.set(t[0].value)}onSearchEnter(e){e.preventDefault(),this.filteredOptions().length>0&&this.confirm()}confirm(){let e=this.state();if(e){if(e.options?.length){this.confirmed.emit(this.choice());return}!e.confirmOnly&&!e.allowEmpty&&!this.value().trim()||this.confirmed.emit(e.confirmOnly?"":this.value().trim())}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(t,i){t&1&&(Vt(i.inputEl,Qk,5),Vt(i.searchEl,Kk,5)),t&2&&_n(2)},hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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(t,i){if(t&1&&T(0,sP,12,7),t&2){let r;M((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 Uh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hr=Uh();function Hy(n){hr=n}var na={exec:()=>null};function De(n,e=""){let t=typeof n=="string"?n:n.source,i={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(St.caret,"$1"),t=t.replace(r,s),i},getRegex:()=>new RegExp(t,e)};return i}var St={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")},aP=/^(?:[ \t]*(?:\n|$))+/,lP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ia=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zh=/(?:[*+-]|\d{1,9}[.)])/,Uy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zy=De(Uy).replace(/bull/g,zh).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(),uP=De(Uy).replace(/bull/g,zh).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(),Gh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,pP=/^[^\n]+/,Wh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,fP=De(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),hP=De(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zh).getRegex(),ud="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",qh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mP=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",qh).replace("tag",ud).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gy=De(Gh).replace("hr",ia).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",ud).getRegex(),gP=De(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gy).getRegex(),Zh={blockquote:gP,code:lP,def:fP,fences:cP,heading:dP,hr:ia,html:mP,lheading:zy,list:hP,newline:aP,paragraph:Gy,table:na,text:pP},Fy=De("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ia).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",ud).getRegex(),_P=se(U({},Zh),{lheading:uP,table:Fy,paragraph:De(Gh).replace("hr",ia).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fy).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",ud).getRegex()}),vP=se(U({},Zh),{html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qh).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:na,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De(Gh).replace("hr",ia).replace("heading",` *#{1,6} *[^
7
- ]`).replace("lheading",zy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),bP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wy=/^( {2,}|\\)\n(?!\s*$)/,CP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pd=/[\p{P}\p{S}]/u,Yh=/[\s\p{P}\p{S}]/u,qy=/[^\s\p{P}\p{S}]/u,xP=De(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Yh).getRegex(),Zy=/(?!~)[\p{P}\p{S}]/u,wP=/(?!~)[\s\p{P}\p{S}]/u,EP=/(?:[^\s\p{P}\p{S}]|~)/u,DP=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Yy=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,SP=De(Yy,"u").replace(/punct/g,pd).getRegex(),TP=De(Yy,"u").replace(/punct/g,Zy).getRegex(),Qy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",MP=De(Qy,"gu").replace(/notPunctSpace/g,qy).replace(/punctSpace/g,Yh).replace(/punct/g,pd).getRegex(),IP=De(Qy,"gu").replace(/notPunctSpace/g,EP).replace(/punctSpace/g,wP).replace(/punct/g,Zy).getRegex(),kP=De("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,qy).replace(/punctSpace/g,Yh).replace(/punct/g,pd).getRegex(),PP=De(/\\(punct)/,"gu").replace(/punct/g,pd).getRegex(),OP=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(),RP=De(qh).replace("(?:-->|$)","-->").getRegex(),NP=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",RP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ld=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,AP=De(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ld).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ky=De(/^!?\[(label)\]\[(ref)\]/).replace("label",ld).replace("ref",Wh).getRegex(),Xy=De(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wh).getRegex(),LP=De("reflink|nolink(?!\\()","g").replace("reflink",Ky).replace("nolink",Xy).getRegex(),Qh={_backpedal:na,anyPunctuation:PP,autolink:OP,blockSkip:DP,br:Wy,code:yP,del:na,emStrongLDelim:SP,emStrongRDelimAst:MP,emStrongRDelimUnd:kP,escape:bP,link:AP,nolink:Xy,punctuation:xP,reflink:Ky,reflinkSearch:LP,tag:NP,text:CP,url:na},FP=se(U({},Qh),{link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",ld).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ld).getRegex()}),jh=se(U({},Qh),{emStrongRDelimAst:IP,emStrongLDelim:TP,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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),VP=se(U({},jh),{br:De(Wy).replace("{2,}","*").getRegex(),text:De(jh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),sd={normal:Zh,gfm:_P,pedantic:vP},ea={normal:Qh,gfm:jh,breaks:VP,pedantic:FP},BP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vy=n=>BP[n];function An(n,e){if(e){if(St.escapeTest.test(n))return n.replace(St.escapeReplace,Vy)}else if(St.escapeTestNoEncode.test(n))return n.replace(St.escapeReplaceNoEncode,Vy);return n}function By(n){try{n=encodeURI(n).replace(St.percentDecode,"%")}catch{return null}return n}function jy(n,e){let t=n.replace(St.findPipe,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=t.split(St.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(St.slashPipe,"|");return i}function ta(n,e,t){let i=n.length;if(i===0)return"";let r=0;for(;r<i;){let o=n.charAt(i-r-1);if(o===e&&!t)r++;else if(o!==e&&t)r++;else break}return n.slice(0,i-r)}function jP(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===e[0])t++;else if(n[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function $y(n,e,t,i,r){let o=e.href,s=e.title||null,a=n[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function $P(n,e,t){let i=n.match(t.other.indentCodeCompensation);if(i===null)return e;let r=i[1];return e.split(`
8
- `).map(o=>{let s=o.match(t.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=r.length?o.slice(r.length):o}).join(`
9
- `)}var cd=class{options;rules;lexer;constructor(n){this.options=n||hr}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ta(t,`
10
- `)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=$P(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=ta(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:ta(e[0],`
11
- `)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=ta(e[0],`
12
- `).split(`
13
- `),i="",r="",o=[];for(;t.length>0;){let s=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),s=!0;else if(!s)a.push(t[l]);else break;t=t.slice(l);let c=a.join(`
14
- `),m=c.replace(this.rules.other.blockquoteSetextReplace,`
15
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
16
- ${c}`:c,r=r?`${r}
17
- ${m}`:m;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=b,t.length===0)break;let w=o.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let E=w,P=E.raw+`
18
- `+t.join(`
19
- `),B=this.blockquote(P);o[o.length-1]=B,i=i.substring(0,i.length-E.raw.length)+B.raw,r=r.substring(0,r.length-E.text.length)+B.text;break}else if(w?.type==="list"){let E=w,P=E.raw+`
20
- `+t.join(`
21
- `),B=this.list(P);o[o.length-1]=B,i=i.substring(0,i.length-w.raw.length)+B.raw,r=r.substring(0,r.length-E.raw.length)+B.raw,t=P.substring(o.at(-1).raw.length).split(`
22
- `);continue}}return{type:"blockquote",raw:i,tokens:o,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),i=t.length>1,r={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let o=this.rules.other.listItemRegex(t),s=!1;for(;n;){let l=!1,c="",m="";if(!(e=o.exec(n))||this.rules.block.hr.test(n))break;c=e[0],n=n.substring(c.length);let b=e[2].split(`
23
- `,1)[0].replace(this.rules.other.listReplaceTabs,j=>" ".repeat(3*j.length)),w=n.split(`
24
- `,1)[0],E=!b.trim(),P=0;if(this.options.pedantic?(P=2,m=b.trimStart()):E?P=e[1].length+1:(P=e[2].search(this.rules.other.nonSpaceChar),P=P>4?1:P,m=b.slice(P),P+=e[1].length),E&&this.rules.other.blankLine.test(w)&&(c+=w+`
25
- `,n=n.substring(w.length+1),l=!0),!l){let j=this.rules.other.nextBulletRegex(P),_e=this.rules.other.hrRegex(P),$t=this.rules.other.fencesBeginRegex(P),Be=this.rules.other.headingBeginRegex(P),at=this.rules.other.htmlBeginRegex(P);for(;n;){let it=n.split(`
26
- `,1)[0],Ht;if(w=it,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),Ht=w):Ht=w.replace(this.rules.other.tabCharGlobal," "),$t.test(w)||Be.test(w)||at.test(w)||j.test(w)||_e.test(w))break;if(Ht.search(this.rules.other.nonSpaceChar)>=P||!w.trim())m+=`
27
- `+Ht.slice(P);else{if(E||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$t.test(b)||Be.test(b)||_e.test(b))break;m+=`
28
- `+w}!E&&!w.trim()&&(E=!0),c+=it+`
29
- `,n=n.substring(it.length+1),b=Ht.slice(P)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let B=null,W;this.options.gfm&&(B=this.rules.other.listIsTask.exec(m),B&&(W=B[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!B,checked:W,loose:!1,text:m,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){let c=r.items[l].tokens.filter(b=>b.type==="space"),m=c.length>0&&c.some(b=>this.rules.other.anyLine.test(b.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 e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:r}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=jy(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
- `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.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<t.length;s++)o.header.push({text:t[s],tokens:this.lexer.inline(t[s]),header:!0,align:o.align[s]});for(let s of r)o.rows.push(jy(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 e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
31
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let o=ta(t.slice(0,-1),"\\");if((t.length-o.length)%2===0)return}else{let o=jP(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),$y(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[i.toLowerCase()];if(!r){let o=t[0].charAt(0);return{type:"text",raw:o,text:o}}return $y(t,r,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!i||i[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!t||this.rules.inline.punctuation.exec(t)){let o=[...i[0]].length-1,s,a,l=o,c=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*n.length+o);(i=m.exec(e))!=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)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let b=[...i[0]][0].length,w=n.slice(0,o+i.index+b+a);if(Math.min(o,a)%2){let P=w.slice(1,-1);return{type:"em",raw:w,text:P,tokens:this.lexer.inlineTokens(P)}}let E=w.slice(2,-2);return{type:"strong",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Gn=class $h{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||hr,this.options.tokenizer=this.options.tokenizer||new cd,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 t={other:St,block:sd.normal,inline:ea.normal};this.options.pedantic?(t.block=sd.pedantic,t.inline=ea.pedantic):this.options.gfm&&(t.block=sd.gfm,this.options.breaks?t.inline=ea.breaks:t.inline=ea.gfm),this.tokenizer.rules=t}static get rules(){return{block:sd,inline:ea}}static lex(e,t){return new $h(t).lex(e)}static lexInline(e,t){return new $h(t).inlineTokens(e)}lex(e){e=e.replace(St.carriageReturn,`
32
- `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){for(this.options.pedantic&&(e=e.replace(St.tabCharGlobal," ").replace(St.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let s=t.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
33
- `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let s=t.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):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let s=t.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(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let s=1/0,a=e.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=e.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=t.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):t.push(r),i=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let s=t.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):t.push(r);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i=e,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(;e;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=t.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,i,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,m=e.slice(1),b;this.options.extensions.startInline.forEach(w=>{b=w.call({lexer:this},m),typeof b=="number"&&b>=0&&(c=Math.min(c,b))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},dd=class{options;parser;constructor(n){this.options=n||hr}space(n){return""}code({text:n,lang:e,escaped:t}){let i=(e||"").match(St.notSpaceStart)?.[0],r=n.replace(St.endingNewline,"")+`
42
- `;return i?'<pre><code class="language-'+An(i)+'">'+(t?r:An(r,!0))+`</code></pre>
43
- `:"<pre><code>"+(t?r:An(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:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
47
- `}hr(n){return`<hr>
48
- `}list(n){let e=n.ordered,t=n.start,i="";for(let s=0;s<n.items.length;s++){let a=n.items[s];i+=this.listitem(a)}let r=e?"ol":"ul",o=e&&t!==1?' start="'+t+'"':"";return"<"+r+o+`>
49
- `+i+"</"+r+`>
50
- `}listitem(n){let e="";if(n.task){let t=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=t+" "+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=t+" "+An(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`<li>${e}</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 e="",t="";for(let r=0;r<n.header.length;r++)t+=this.tablecell(n.header[r]);e+=this.tablerow({text:t});let i="";for(let r=0;r<n.rows.length;r++){let o=n.rows[r];t="";for(let s=0;s<o.length;s++)t+=this.tablecell(o[s]);i+=this.tablerow({text:t})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
53
- <thead>
54
- `+e+`</thead>
55
- `+i+`</table>
56
- `}tablerow({text:n}){return`<tr>
57
- ${n}</tr>
58
- `}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
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>${An(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let i=this.parser.parseInline(t),r=By(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+An(e)+'"'),o+=">"+i+"</a>",o}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let r=By(n);if(r===null)return An(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${An(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:An(n.text)}},Kh=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""}},Wn=class Hh{options;renderer;textRenderer;constructor(e){this.options=e||hr,this.options.renderer=this.options.renderer||new dd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Kh}static parse(e,t){return new Hh(t).parse(e)}static parseInline(e,t){return new Hh(t).parseInline(e)}parse(e,t=!0){let i="";for(let r=0;r<e.length;r++){let o=e[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<e.length&&e[r+1].type==="text";)a=e[++r],l+=`
60
- `+this.renderer.text(a);t?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(e,t=this.renderer){let i="";for(let r=0;r<e.length;r++){let o=e[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+=t.text(s);break}case"html":{i+=t.html(s);break}case"link":{i+=t.link(s);break}case"image":{i+=t.image(s);break}case"strong":{i+=t.strong(s);break}case"em":{i+=t.em(s);break}case"codespan":{i+=t.codespan(s);break}case"br":{i+=t.br(s);break}case"del":{i+=t.del(s);break}case"text":{i+=t.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}},ad=class{options;block;constructor(e){this.options=e||hr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Gn.lex:Gn.lexInline}provideParser(){return this.block?Wn.parse:Wn.parseInline}},HP=class{defaults=Uh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Wn;Renderer=dd;TextRenderer=Kh;Lexer=Gn;Tokenizer=cd;Hooks=ad;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let s of o)t=t.concat(this.walkTokens(s.tokens,e));break}case"list":{let r=i;t=t.concat(this.walkTokens(r.items,e));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);t=t.concat(this.walkTokens(s,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i=U({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:e.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=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),t.renderer){let r=this.defaults.renderer||new dd(this.defaults);for(let o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=t.renderer[s],l=r[s];r[s]=(...c)=>{let m=a.apply(r,c);return m===!1&&(m=l.apply(r,c)),m||""}}i.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new cd(this.defaults);for(let o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=t.tokenizer[s],l=r[s];r[s]=(...c)=>{let m=a.apply(r,c);return m===!1&&(m=l.apply(r,c)),m}}i.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new ad;for(let o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=t.hooks[s],l=r[s];ad.passThroughHooks.has(o)?r[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(r,c)).then(b=>l.call(r,b));let m=a.call(r,c);return l.call(r,m)}:r[s]=(...c)=>{let m=a.apply(r,c);return m===!1&&(m=l.apply(r,c)),m}}i.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,o=t.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=U(U({},this.defaults),i)}),this}setOptions(n){return this.defaults=U(U({},this.defaults),n),this}lexer(n,e){return Gn.lex(n,e??this.defaults)}parser(n,e){return Wn.parse(n,e??this.defaults)}parseMarkdown(n){return(t,i)=>{let r=U({},i),o=U(U({},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 t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);let a=o.hooks?o.hooks.provideLexer():n?Gn.lex:Gn.lexInline,l=o.hooks?o.hooks.provideParser():n?Wn.parse:Wn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let c=a(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let m=l(c,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(c){return s(c)}}}onError(n,e){return t=>{if(t.message+=`
61
- Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+An(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},fr=new HP;function Ee(n,e){return fr.parse(n,e)}Ee.options=Ee.setOptions=function(n){return fr.setOptions(n),Ee.defaults=fr.defaults,Hy(Ee.defaults),Ee};Ee.getDefaults=Uh;Ee.defaults=hr;Ee.use=function(...n){return fr.use(...n),Ee.defaults=fr.defaults,Hy(Ee.defaults),Ee};Ee.walkTokens=function(n,e){return fr.walkTokens(n,e)};Ee.parseInline=fr.parseInline;Ee.Parser=Wn;Ee.parser=Wn.parse;Ee.Renderer=dd;Ee.TextRenderer=Kh;Ee.Lexer=Gn;Ee.lexer=Gn.lex;Ee.Tokenizer=cd;Ee.Hooks=ad;Ee.parse=Ee;var Pq=Ee.options,Oq=Ee.setOptions,Rq=Ee.use,Nq=Ee.walkTokens,Aq=Ee.parseInline;var Lq=Wn.parse,Fq=Gn.lex;function Jy(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t<e;t++)i[t]=n[t];return i}function UP(n){if(Array.isArray(n))return n}function zP(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(i=o.call(t)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(m){c=!0,r=m}finally{try{if(!l&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function GP(){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 WP(n,e){return UP(n)||zP(n,e)||qP(n,e)||GP()}function qP(n,e){if(n){if(typeof n=="string")return Jy(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Jy(n,e):void 0}}var hC=Object.entries,eC=Object.setPrototypeOf,ZP=Object.isFrozen,YP=Object.getPrototypeOf,QP=Object.getOwnPropertyDescriptor,nt=Object.freeze,st=Object.seal,wo=Object.create,mC=typeof Reflect<"u"&&Reflect,rm=mC.apply,om=mC.construct;nt||(nt=function(e){return e});st||(st=function(e){return e});rm||(rm=function(e,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return e.apply(t,r)});om||(om=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return new e(...i)});var gr=Ke(Array.prototype.forEach),KP=Ke(Array.prototype.lastIndexOf),tC=Ke(Array.prototype.pop),ra=Ke(Array.prototype.push),XP=Ke(Array.prototype.splice),Eo=Array.isArray,aa=Ke(String.prototype.toLowerCase),Xh=Ke(String.prototype.toString),nC=Ke(String.prototype.match),oa=Ke(String.prototype.replace),iC=Ke(String.prototype.indexOf),JP=Ke(String.prototype.trim),eO=Ke(Number.prototype.toString),tO=Ke(Boolean.prototype.toString),rC=typeof BigInt>"u"?null:Ke(BigInt.prototype.toString),oC=typeof Symbol>"u"?null:Ke(Symbol.prototype.toString),Nt=Ke(Object.prototype.hasOwnProperty),sa=Ke(Object.prototype.toString),_t=Ke(RegExp.prototype.test),mr=nO(TypeError);function Ke(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return rm(n,e,i)}}function nO(n){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return om(n,t)}}function ve(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aa;if(eC&&eC(n,null),!Eo(e))return n;let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){let o=t(r);o!==r&&(ZP(e)||(e[i]=o),r=o)}n[r]=!0}return n}function iO(n){for(let e=0;e<n.length;e++)Nt(n,e)||(n[e]=null);return n}function jt(n){let e=wo(null);for(let i of hC(n)){var t=WP(i,2);let r=t[0],o=t[1];Nt(n,r)&&(Eo(o)?e[r]=iO(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=jt(o):e[r]=o)}return e}function rO(n){switch(typeof n){case"string":return n;case"number":return eO(n);case"boolean":return tO(n);case"bigint":return rC?rC(n):"0";case"symbol":return oC?oC(n):"Symbol()";case"undefined":return sa(n);case"function":case"object":{if(n===null)return sa(n);let e=n,t=nn(e,"toString");if(typeof t=="function"){let i=t(e);return typeof i=="string"?i:sa(i)}return sa(n)}default:return sa(n)}}function nn(n,e){for(;n!==null;){let i=QP(n,e);if(i){if(i.get)return Ke(i.get);if(typeof i.value=="function")return Ke(i.value)}n=YP(n)}function t(){return null}return t}function oO(n){try{return _t(n,""),!0}catch{return!1}}var sC=nt(["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"]),Jh=nt(["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"]),em=nt(["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"]),sO=nt(["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"]),tm=nt(["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"]),aO=nt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),aC=nt(["#text"]),lC=nt(["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"]),nm=nt(["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"]),cC=nt(["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"]),fd=nt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lO=st(/{{[\w\W]*|^[\w\W]*}}/g),cO=st(/<%[\w\W]*|^[\w\W]*%>/g),dO=st(/\${[\w\W]*/g),uO=st(/^data-[\-\w.\u00B7-\uFFFF]+$/),pO=st(/^aria-[\-\w]+$/),dC=st(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fO=st(/^(?:\w+script|data):/i),hO=st(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mO=st(/^html$/i),gO=st(/^[a-z][.\w]*(-[.\w]+)+$/i),uC=st(/<[/\w!]/g),pC=st(/<[/\w]/g),_O=st(/<\/no(script|embed|frames)/i),vO=st(/\/>/i),Bt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},gC=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],bO=nt(ve({},gC)),yO=(function(){let n={};return gr(gC,e=>{n[e]=st(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),nt(n)})(),CO=function(){return typeof window>"u"?null:window},xO=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(i=t.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},fC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},yi=function(e,t,i,r){return Nt(e,t)&&Eo(e[t])?ve(r.base?jt(r.base):{},e[t],r.transform):i},im=function(e,t,i){let r=Nt(e,t)?e[t]:void 0;return r&&typeof r=="object"?jt(r):i()};function _C(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CO(),e=L=>_C(L);if(e.version="3.4.15",e.removed=[],!n||!n.document||n.document.nodeType!==Bt.document||!n.Element)return e.isSupported=!1,e;let t=n.document,i=t,r=i.currentScript;n.DocumentFragment;let o=n.HTMLTemplateElement,s=n.Node,a=n.Element,l=n.NodeFilter,c=n.NamedNodeMap;c===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,b=n.trustedTypes,w=a.prototype,E=nn(w,"cloneNode"),P=nn(w,"remove"),B=nn(w,"removeAttributeNode"),W=nn(w,"nextSibling"),j=nn(w,"childNodes"),_e=nn(w,"parentNode"),$t=nn(w,"shadowRoot"),Be=nn(w,"attributes"),at=s&&s.prototype?nn(s.prototype,"nodeType"):null,it=s&&s.prototype?nn(s.prototype,"nodeName"):null,Ht=s&&s.prototype?nn(s.prototype,"ownerDocument"):null,So=function(g){return at?at(g):g.nodeType},wd=function(g){return it?it(g):g.nodeName};if(typeof o=="function"){let L=t.createElement("template");L.content&&L.content.ownerDocument&&(t=L.content.ownerDocument)}let Tt,Ci="",Ed,lm=!1,To=0,cm=function(){if(To>0)throw mr('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.')},vr=function(g){cm(),To++;try{return Tt.createHTML(g)}finally{To--}},DC=function(g){cm(),To++;try{return Tt.createScriptURL(g)}finally{To--}},SC=function(){return lm||(Ed=xO(b,r),lm=!0),Ed},ca=t,Dd=ca.implementation,dm=ca.createNodeIterator,TC=ca.createDocumentFragment,MC=ca.getElementsByTagName,IC=i.importNode,Ae=fC();e.isSupported=typeof hC=="function"&&typeof _e=="function"&&Dd&&Dd.createHTMLDocument!==void 0;let kC=lO,PC=cO,OC=dO,RC=uO,NC=pO,AC=fO,um=hO,LC=gO,pm=dC,Le=null,Sd=ve({},[...sC,...Jh,...em,...tm,...aC]),Fe=null,Td=ve({},[...lC,...nm,...cC,...fd]),Cn=Object.seal(wo(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}})),Mo=null,fm=null,qn=Object.seal(wo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),hm=!0,Md=!0,mm=!1,gm=!0,Zn=!1,xi=!0,wi=!1,Id=!1,da=null,ua=null,kd=!1,br=!1,pa=!1,fa=!1,_m=!0,vm=!1,bm="user-content-",Pd=!0,Od=!1,yr={},Cr=null,ym=ve({},["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"]),Cm=null,xm=ve({},["audio","video","img","source","image","track"]),wm=null,Em=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ha="http://www.w3.org/1998/Math/MathML",ma="http://www.w3.org/2000/svg",xn="http://www.w3.org/1999/xhtml",xr=xn,Rd=!1,Nd=null,FC=ve({},[ha,ma,xn],Xh),Dm=nt(["mi","mo","mn","ms","mtext"]),Ad=ve({},Dm),Sm=nt(["annotation-xml"]),Ld=ve({},Sm),VC=ve({},["title","style","font","a","script"]),Io=null,BC=["application/xhtml+xml","text/html"],jC="text/html",ze=null,wr=null,$C=t.createElement("form"),Tm=function(g){return g instanceof RegExp||g instanceof Function},Fd=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wr&&wr===g)return;(!g||typeof g!="object")&&(g={}),g=jt(g),Io=BC.indexOf(g.PARSER_MEDIA_TYPE)===-1?jC:g.PARSER_MEDIA_TYPE,ze=Io==="application/xhtml+xml"?Xh:aa,Le=yi(g,"ALLOWED_TAGS",Sd,{transform:ze}),Fe=yi(g,"ALLOWED_ATTR",Td,{transform:ze}),Nd=yi(g,"ALLOWED_NAMESPACES",FC,{transform:Xh}),wm=yi(g,"ADD_URI_SAFE_ATTR",Em,{transform:ze,base:Em}),Cm=yi(g,"ADD_DATA_URI_TAGS",xm,{transform:ze,base:xm}),Cr=yi(g,"FORBID_CONTENTS",ym,{transform:ze}),Mo=yi(g,"FORBID_TAGS",jt({}),{transform:ze}),fm=yi(g,"FORBID_ATTR",jt({}),{transform:ze}),yr=Nt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?jt(g.USE_PROFILES):g.USE_PROFILES:!1,hm=g.ALLOW_ARIA_ATTR!==!1,Md=g.ALLOW_DATA_ATTR!==!1,mm=g.ALLOW_UNKNOWN_PROTOCOLS||!1,gm=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Zn=g.SAFE_FOR_TEMPLATES||!1,xi=g.SAFE_FOR_XML!==!1,wi=g.WHOLE_DOCUMENT||!1,br=g.RETURN_DOM||!1,pa=g.RETURN_DOM_FRAGMENT||!1,fa=g.RETURN_TRUSTED_TYPE||!1,kd=g.FORCE_BODY||!1,_m=g.SANITIZE_DOM!==!1,vm=g.SANITIZE_NAMED_PROPS||!1,Pd=g.KEEP_CONTENT!==!1,Od=g.IN_PLACE||!1,pm=oO(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:dC,xr=typeof g.NAMESPACE=="string"?g.NAMESPACE:xn,Ad=im(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>ve({},Dm)),Ld=im(g,"HTML_INTEGRATION_POINTS",()=>ve({},Sm));let S=im(g,"CUSTOM_ELEMENT_HANDLING",()=>wo(null));if(Cn=wo(null),Nt(S,"tagNameCheck")&&Tm(S.tagNameCheck)&&(Cn.tagNameCheck=S.tagNameCheck),Nt(S,"attributeNameCheck")&&Tm(S.attributeNameCheck)&&(Cn.attributeNameCheck=S.attributeNameCheck),Nt(S,"allowCustomizedBuiltInElements")&&typeof S.allowCustomizedBuiltInElements=="boolean"&&(Cn.allowCustomizedBuiltInElements=S.allowCustomizedBuiltInElements),st(Cn),Zn&&(Md=!1),pa&&(br=!0),yr&&(Le=ve({},aC),Fe=wo(null),yr.html===!0&&(ve(Le,sC),ve(Fe,lC)),yr.svg===!0&&(ve(Le,Jh),ve(Fe,nm),ve(Fe,fd)),yr.svgFilters===!0&&(ve(Le,em),ve(Fe,nm),ve(Fe,fd)),yr.mathMl===!0&&(ve(Le,tm),ve(Fe,cC),ve(Fe,fd))),qn.tagCheck=null,qn.attributeCheck=null,Nt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?qn.tagCheck=g.ADD_TAGS:Eo(g.ADD_TAGS)&&(Le===Sd&&(Le=jt(Le)),ve(Le,g.ADD_TAGS,ze))),Nt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?qn.attributeCheck=g.ADD_ATTR:Eo(g.ADD_ATTR)&&(Fe===Td&&(Fe=jt(Fe)),ve(Fe,g.ADD_ATTR,ze))),Nt(g,"ADD_FORBID_CONTENTS")&&Eo(g.ADD_FORBID_CONTENTS)&&(Cr===ym&&(Cr=jt(Cr)),ve(Cr,g.ADD_FORBID_CONTENTS,ze)),Pd&&(Le["#text"]=!0),wi&&ve(Le,["html","head","body"]),Le.table&&(ve(Le,["tbody"]),delete Mo.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw mr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw mr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let A=Tt;Tt=g.TRUSTED_TYPES_POLICY;try{Ci=vr("")}catch(H){throw Tt=A,H}}else g.TRUSTED_TYPES_POLICY===null?(Tt=void 0,Ci=""):(Tt===void 0&&(Tt=SC()),Tt&&typeof Ci=="string"&&(Ci=vr("")));nt&&nt(g),wr=g},Mm=ve({},[...Jh,...em,...sO]),Im=ve({},[...tm,...aO]),HC=function(g,S,A){return S.namespaceURI===xn?g==="svg":S.namespaceURI===ha?g==="svg"&&(A==="annotation-xml"||Ad[A]):!!Mm[g]},UC=function(g,S,A){return S.namespaceURI===xn?g==="math":S.namespaceURI===ma?g==="math"&&Ld[A]:!!Im[g]},zC=function(g,S,A){return S.namespaceURI===ma&&!Ld[A]||S.namespaceURI===ha&&!Ad[A]?!1:!Im[g]&&(VC[g]||!Mm[g])},GC=function(g){let S=_e(g);(!S||!S.tagName)&&(S={namespaceURI:xr,tagName:"template"});let A=aa(g.tagName),H=aa(S.tagName);return Nd[g.namespaceURI]?g.namespaceURI===ma?HC(A,S,H):g.namespaceURI===ha?UC(A,S,H):g.namespaceURI===xn?zC(A,S,H):!!(Io==="application/xhtml+xml"&&Nd[g.namespaceURI]):!1},Yn=function(g){ra(e.removed,{element:g});try{_e(g).removeChild(g)}catch{if(P(g),!_e(g))throw mr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},km=function(g,S,A){try{B(g,S)}catch{try{g.removeAttribute(A)}catch{}}},ga=function(g){_a(g);let S=j(g);if(S){let H=[];gr(S,Q=>{ra(H,Q)}),gr(H,Q=>{try{P(Q)}catch{}})}let A=Be(g);if(A)for(let H=A.length-1;H>=0;--H){let Q=A[H],oe=Q&&Q.name;typeof oe=="string"&&km(g,Q,oe)}},Ei=function(g,S,A){if(!A)try{A=S.getAttributeNode(g)}catch{A=null}ra(e.removed,{attribute:A||null,from:S});try{A?B(S,A):S.removeAttribute(g)}catch{try{S.removeAttribute(g)}catch{}}if(g==="is")if(br||pa)try{Yn(S)}catch{}else try{S.setAttribute(g,"")}catch{}},WC=function(g){let S=Be(g);if(S)for(let A=S.length-1;A>=0;--A){let H=S[A],Q=H&&H.name;typeof Q!="string"||Fe[ze(Q)]||km(g,H,Q)}},_a=function(g){let S=[g];for(;S.length>0;){let A=S.pop();So(A)===Bt.element&&WC(A);let Q=j(A);if(Q)for(let oe=Q.length-1;oe>=0;--oe)S.push(Q[oe])}},Pm=function(g,S){return xi?g==="patchsrc"?!0:g==="for"&&S!=="label"&&S!=="output":!1},qC=function(g){if(!xi)return;let S=[g];for(;S.length>0;){let A=S.pop(),H=So(A);if(H===Bt.processingInstruction||H===Bt.comment&&_t(pC,A.data)){try{P(A)}catch{}continue}if(H===Bt.element){let oe=A,Pe=ze(wd(A));try{oe.hasAttribute&&oe.hasAttribute("patchsrc")&&oe.removeAttribute("patchsrc"),oe.hasAttribute&&oe.hasAttribute("for")&&Pm("for",Pe)&&oe.removeAttribute("for")}catch{}}let Q=j(A);if(Q)for(let oe=Q.length-1;oe>=0;--oe)S.push(Q[oe])}},Om=function(g){let S=null,A=null;if(kd)g="<remove></remove>"+g;else{let oe=nC(g,/^[\r\n\t ]+/);A=oe&&oe[0]}Io==="application/xhtml+xml"&&xr===xn&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let H=Tt?vr(g):g;if(xr===xn)try{S=new m().parseFromString(H,Io)}catch{}if(!S||!S.documentElement){S=Dd.createDocument(xr,"template",null);try{S.documentElement.innerHTML=Rd?Ci:H}catch{}}let Q=S.body||S.documentElement;return g&&A&&Q.insertBefore(t.createTextNode(A),Q.childNodes[0]||null),xr===xn?MC.call(S,wi?"html":"body")[0]:wi?S.documentElement:Q},Rm=function(g){let S=Ht?Ht(g):g.ownerDocument;return dm.call(S||g,g,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},va=function(g){return g=oa(g,kC," "),g=oa(g,PC," "),g=oa(g,OC," "),g},Vd=function(g){var S;g.normalize();let A=Ht?Ht(g):g.ownerDocument,H=dm.call(A||g,g,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Q=H.nextNode();for(;Q;)Q.data=va(Q.data),Q=H.nextNode();let oe=(S=g.querySelectorAll)===null||S===void 0?void 0:S.call(g,"template");oe&&gr(oe,Pe=>{Er(Pe.content)&&Vd(Pe.content)})},ba=function(g){let S=it?it(g):null;return typeof S!="string"||ze(S)!=="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!==at(g)||g.childNodes!==j(g)},Er=function(g){if(!at||typeof g!="object"||g===null)return!1;try{return at(g)===Bt.documentFragment}catch{return!1}},ko=function(g){if(!at||typeof g!="object"||g===null)return!1;try{return typeof at(g)=="number"}catch{return!1}};function wn(L,g,S){L.length!==0&&gr(L,A=>{A.call(e,g,S,wr)})}let ZC=function(g,S){return!!(xi&&g.hasChildNodes()&&!ko(g.firstElementChild)&&_t(uC,g.textContent)&&_t(uC,g.innerHTML)||xi&&g.namespaceURI===xn&&bO[S]&&(ko(g.firstElementChild)||typeof g.textContent=="string"&&_t(yO[S],g.textContent))||g.nodeType===Bt.processingInstruction||xi&&g.nodeType===Bt.comment&&_t(pC,g.data))},ya=function(g,S){if(g instanceof RegExp)return _t(g,S);if(g instanceof Function){for(var A=arguments.length,H=new Array(A>2?A-2:0),Q=2;Q<A;Q++)H[Q-2]=arguments[Q];return!!g(S,...H)}return!1},YC=function(g,S,A){if(!Mo[S]&&Vm(S)&&ya(Cn.tagNameCheck,S))return!1;if(Pd&&!Cr[S]){let H=_e(g),Q=j(g);if(Q&&H){let oe=Q.length;for(let Pe=oe-1;Pe>=0;--Pe){let je=g===A?E(Q[Pe],!0):Q[Pe];H.insertBefore(je,W(g))}}}return Yn(g),!0},Nm=function(g,S,A,H){return g.length===0?S:S===A||S===H?jt(S):S},Am=function(g,S){return g===S||_e(g)!==null?!1:(Od&&_a(g),!0)},Lm=function(g,S){if(wn(Ae.beforeSanitizeElements,g,null),Am(g,S))return!0;if(ba(g))return Yn(g),!0;let A=ze(wd(g));if(Le=Nm(Ae.uponSanitizeElement,Le,Sd,da),wn(Ae.uponSanitizeElement,g,{tagName:A,allowedTags:Le}),Am(g,S))return!0;if(ZC(g,A))return Yn(g),!0;if(Mo[A]||!(qn.tagCheck instanceof Function&&qn.tagCheck(A))&&!Le[A]){let Q=YC(g,A,S);return Q===!1&&wn(Ae.afterSanitizeElements,g,null),Q}if(So(g)===Bt.element&&!GC(g)||(A==="noscript"||A==="noembed"||A==="noframes")&&_t(_O,g.innerHTML))return Yn(g),!0;if(Zn&&g.nodeType===Bt.text){let Q=va(g.textContent);g.textContent!==Q&&(ra(e.removed,{element:g.cloneNode()}),g.textContent=Q)}return wn(Ae.afterSanitizeElements,g,null),!1},Fm=function(g,S,A){if(fm[S]||Pm(S,g)||_m&&(S==="id"||S==="name")&&(A in t||A in $C))return!1;let H=Fe[S]||qn.attributeCheck instanceof Function&&qn.attributeCheck(S,g);return Md&&_t(RC,S)||hm&&_t(NC,S)?!0:H?wm[S]||_t(pm,oa(A,um,""))||(S==="src"||S==="xlink:href"||S==="href")&&g!=="script"&&iC(A,"data:")===0&&Cm[g]||mm&&!_t(AC,oa(A,um,""))?!0:!A:Vm(g)&&ya(Cn.tagNameCheck,g)&&ya(Cn.attributeNameCheck,S,g)||S==="is"&&Cn.allowCustomizedBuiltInElements&&ya(Cn.tagNameCheck,A)},QC=ve({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vm=function(g){return!QC[aa(g)]&&_t(LC,g)},KC=function(g,S,A,H){if(Tt&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!A)switch(b.getAttributeType(g,S)){case"TrustedHTML":return vr(H);case"TrustedScriptURL":return DC(H)}return H},XC=function(g,S,A,H){try{return A?g.setAttributeNS(A,S,H):g.setAttribute(S,H),ba(g)?(Yn(g),!1):!0}catch{return Ei(S,g),!1}},Bm=function(g){wn(Ae.beforeSanitizeAttributes,g,null);let S=g.attributes;if(!S||ba(g))return;Fe=Nm(Ae.uponSanitizeAttribute,Fe,Td,ua);let A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0},H=S.length,Q=ze(g.nodeName);for(;H--;){let oe=S[H],Pe=oe.name,je=oe.namespaceURI,Mt=oe.value,It=ze(Pe),jd=Mt,vt=Pe==="value"?jd:JP(jd),jm=!1;if(A.attrName=It,A.attrValue=vt,A.keepAttr=!0,A.forceKeepAttr=void 0,wn(Ae.uponSanitizeAttribute,g,A),vt=A.attrValue,vm&&(It==="id"||It==="name")&&iC(vt,bm)!==0&&(Ei(Pe,g,oe),vt=bm+vt,jm=!0),xi&&_t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,vt)){Ei(Pe,g,oe);continue}if(It==="attributename"&&nC(vt,"href")){Ei(Pe,g,oe);continue}if(!A.forceKeepAttr){if(!A.keepAttr){Ei(Pe,g,oe);continue}if(!gm&&_t(vO,vt)){Ei(Pe,g,oe);continue}if(Zn&&(vt=va(vt)),!Fm(Q,It,vt)){Ei(Pe,g,oe);continue}vt=KC(Q,It,je,vt),vt!==jd&&XC(g,Pe,je,vt)&&jm&&tC(e.removed)}}wn(Ae.afterSanitizeAttributes,g,null)},Ca=function(g){let S=null,A=Rm(g);for(wn(Ae.beforeSanitizeShadowDOM,g,null);S=A.nextNode();)if(wn(Ae.uponSanitizeShadowNode,S,null),Lm(S,g),Bm(S),Er(S.content)&&Ca(S.content),So(S)===Bt.element){let H=$t(S);Er(H)&&(Bd(H),Ca(H))}wn(Ae.afterSanitizeShadowDOM,g,null)},Bd=function(g){let S=[{node:g,shadow:null}];for(;S.length>0;){let A=S.pop();if(A.shadow){Ca(A.shadow);continue}let H=A.node,oe=So(H)===Bt.element,Pe=j(H);if(Pe)for(let je=Pe.length-1;je>=0;--je)S.push({node:Pe[je],shadow:null});if(oe){let je=it?it(H):null;if(typeof je=="string"&&ze(je)==="template"){let Mt=H.content;Er(Mt)&&S.push({node:Mt,shadow:null})}}if(oe){let je=$t(H);Er(je)&&S.push({node:null,shadow:je},{node:je,shadow:null})}}};return e.sanitize=function(L){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,A=null,H=null,Q=null;if(Rd=!L,Rd&&(L="<!-->"),typeof L!="string"&&!ko(L)&&(L=rO(L),typeof L!="string"))throw mr("dirty is not a string, aborting");if(!e.isSupported)return L;Id?(Le=da,Fe=ua):Fd(g),(Ae.uponSanitizeElement.length>0||Ae.uponSanitizeAttribute.length>0)&&(Le=jt(Le)),Ae.uponSanitizeAttribute.length>0&&(Fe=jt(Fe)),e.removed=[];let oe=Od&&typeof L!="string"&&ko(L);if(oe){qC(L);let Mt=wd(L);if(typeof Mt=="string"){let It=ze(Mt);if(!Le[It]||Mo[It])throw ga(L),mr("root node is forbidden and cannot be sanitized in-place")}if(ba(L))throw ga(L),mr("root node is clobbered and cannot be sanitized in-place");try{Bd(L)}catch(It){throw ga(L),It}}else if(ko(L))S=Om("<!---->"),A=S.ownerDocument.importNode(L,!0),A.nodeType===Bt.element&&A.nodeName==="BODY"||A.nodeName==="HTML"?S=A:S.appendChild(A),Bd(S);else{if(!br&&!Zn&&!wi&&L.indexOf("<")===-1)return Tt&&fa?vr(L):L;if(S=Om(L),!S)return br?null:fa?Ci:""}S&&kd&&Yn(S.firstChild);let Pe=oe?L:S;try{let Mt=Rm(Pe);for(;H=Mt.nextNode();)Lm(H,Pe),Bm(H),Er(H.content)&&Ca(H.content)}catch(Mt){throw oe&&(ga(L),gr(e.removed,It=>{It.element&&_a(It.element)})),Mt}if(oe)return gr(e.removed,Mt=>{Mt.element&&_a(Mt.element)}),Zn&&Vd(L),L;if(br){if(Zn&&Vd(S),pa)for(Q=TC.call(S.ownerDocument);S.firstChild;)Q.appendChild(S.firstChild);else Q=S;return(Fe.shadowroot||Fe.shadowrootmode)&&(Q=IC.call(i,Q,!0)),Q}let je=wi?S.outerHTML:S.innerHTML;return wi&&Le["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&_t(mO,S.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
63
- `+je),Zn&&(je=va(je)),Tt&&fa?vr(je):je},e.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fd(L),Id=!0,da=Le,ua=Fe},e.clearConfig=function(){wr=null,Id=!1,da=null,ua=null,Tt=Ed,Ci=""},e.isValidAttribute=function(L,g,S){wr||Fd({});let A=ze(L),H=ze(g);return Fm(A,H,S)},e.addHook=function(L,g){typeof g=="function"&&Nt(Ae,L)&&ra(Ae[L],g)},e.removeHook=function(L,g){if(Nt(Ae,L)){if(g!==void 0){let S=KP(Ae[L],g);return S===-1?void 0:XP(Ae[L],S,1)[0]}return tC(Ae[L])}},e.removeHooks=function(L){Nt(Ae,L)&&(Ae[L]=[])},e.removeAllHooks=function(){Ae=fC()},e}var vC=_C();var Do=class n{markdown=N.required();html=$(()=>{let e=(this.markdown()??"").trim();return e?vC.sanitize(Ee.parse(e,{async:!1})):""});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-markdown-text"]],inputs:{markdown:[1,"markdown"]},decls:1,vars:1,consts:[[1,"markdown",3,"innerHTML"]],template:function(t,i){t&1&&ae(0,"div",0),t&2&&Y("innerHTML",i.html(),pf)},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 wO=["host"],EO=["composerInput"],yC=(n,e)=>e.id;function DO(n,e){n&1&&(f(0,"div",3),p(1,"Loading diff..."),h())}function SO(n,e){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let t=u();d(),O(t.error())}}function TO(n,e){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let t=u();d(),O(t.editorError())}}function MO(n,e){n&1&&(f(0,"div",5),p(1,"Binary file not shown."),h())}function IO(n,e){n&1&&(f(0,"div",7),p(1,"Loading diff..."),h())}function kO(n,e){if(n&1){let t=R();f(0,"button",13),D("click",function(){_(t);let r=u(4);return v(r.openComposer())}),p(1," Add comment "),h()}}function PO(n,e){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 t=e.$implicit,i=u(6);d(),I("name",t.author.name)("email",t.author.email||""),d(4),O(t.author.name),d(),q(" ",i.formatDate(t.createdAt)," "),d(),I("markdown",t.content)}}function OO(n,e){if(n&1&&(f(0,"option",27),p(1),h()),n&2){let t=e.$implicit,i=u(2).$implicit,r=u(4);I("value",t)("selected",t===i.status),d(),q(" ",r.statusLabel(t)," ")}}function RO(n,e){if(n&1){let t=R();f(0,"div",19),K(1,PO,8,5,"div",20,yC),f(3,"div",21)(4,"input",22),D("input",function(r){_(t);let o=u().$implicit,s=u(4);return v(s.setReplyDraft(o.id,r))})("keydown.enter",function(){_(t);let r=u().$implicit,o=u(4);return v(o.sendReply(r.id))}),h(),f(5,"button",23),D("click",function(){_(t);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),D("change",function(r){_(t);let o=u().$implicit,s=u(4);return v(s.onStatusChange(o,r))}),K(11,OO,2,3,"option",27,gn),h()()()()}if(n&2){let t=u().$implicit,i=u(4);d(),X(t.comments),d(3),I("value",i.replyDraft(t.id))("disabled",i.posting()),d(),I("disabled",i.posting()||!i.replyDraft(t.id).trim()),d(5),I("value",t.status)("disabled",i.posting()),d(),X(i.threadStatuses)}}function NO(n,e){if(n&1){let t=R();f(0,"div",14)(1,"button",15),D("click",function(){let r=_(t).$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()(),T(8,RO,13,5,"div",19),h()}if(n&2){let t=e.$implicit,i=u(4);ge("expanded",i.isExpanded(t.id)),I("id","pr-thread-"+t.id),d(2),dt("status-"+t.status),d(),q(" ",i.statusLabel(t.status)," "),d(2),q(" ",i.threadPreview(t)," "),d(2),O(t.comments.length),d(),M(i.isExpanded(t.id)?8:-1)}}function AO(n,e){if(n&1){let t=R();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),D("input",function(r){_(t);let o=u(4);return v(o.composerText.set(r.target.value))})("keydown",function(r){_(t);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),D("click",function(){_(t);let r=u(4);return v(r.closeComposer())}),p(19,"Cancel"),h(),f(20,"button",42),D("click",function(){_(t);let r=u(4);return v(r.submitComposer())}),p(21," Comment "),h()()()()()}if(n&2){let t=u(4);d(7),I("value",t.composerText()),d(13),I("disabled",t.posting()||!t.composerText().trim())}}function LO(n,e){if(n&1&&(f(0,"section",8)(1,"header",9)(2,"strong"),p(3),h(),T(4,kO,2,0,"button",10),h(),K(5,NO,9,9,"div",11,yC),T(7,AO,22,2,"div",12),h()),n&2){let t=u(3);d(3),O(t.selectionLabel()),d(),M(t.composerOpen()?-1:4),d(),X(t.selectedThreads()),d(2),M(t.composerOpen()?7:-1)}}function FO(n,e){if(n&1&&(z(0,"div",6,0),T(2,IO,2,0,"div",7),T(3,LO,8,3,"section",8)),n&2){let t=u(2);d(2),M(t.editorLoading()?2:-1),d(),M(t.selection()?3:-1)}}function VO(n,e){if(n&1&&T(0,MO,2,0,"div",5)(1,FO,4,2),n&2){let t=e;M(t.status==="binary"||t.binary?0:1)}}function BO(n,e){n&1&&(f(0,"div",5),p(1,"Select a file to view its changes."),h())}var jO=0,bC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},hd=class n{monacoService=k(vo);host=Xt("host");composerInput=Xt("composerInput");diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=G();replySubmit=G();statusSubmit=G();threadStatuses=Object.keys(bC);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=$(()=>{let e=new Map;for(let t of this.threads()){if(!t.filePath||t.line===null||!t.side)continue;let i=`${t.side}:${t.line}`;e.set(i,[...e.get(i)??[],t])}return e});selectedThreads=$(()=>{let e=this.selection();if(!e)return[];let t=[];for(let i=e.line;i<=e.endLine;i+=1)t.push(...this.threadsByAnchor().get(`${e.side}:${i}`)??[]);return t});constructor(){ye(()=>{let e=this.diff();this.viewReady&&queueMicrotask(()=>{this.renderDiff(e)})}),ye(()=>{this.threads(),this.viewReady&&this.updateThreadDecorations()}),ye(()=>{let e=this.focus();if(!e)return;let t=this.threadsByAnchor().get(`${e.side}:${e.line}`)??[],i={};for(let r of t)i[r.id]=!0;Object.keys(i).length&&this.expanded.update(r=>U(U({},r),i)),this.selection.set(se(U({},e),{endLine:e.line})),queueMicrotask(()=>this.revealSelection(e))})}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(e){e.key==="Enter"&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),this.submitComposer()):e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),this.closeComposer())}submitComposer(){let e=this.selection(),t=this.composerText().trim();!e||!t||(this.commentSubmit.emit(se(U({filePath:this.diff()?.path??""},e),{content:t})),this.closeComposer())}closeComposer(){this.composerOpen.set(!1),this.composerText.set("")}selectionLabel(){let e=this.selection();if(!e)return"";let t=e.side==="left"?"original":"modified";return e.line===e.endLine?`${t} line ${e.line}`:`${t} lines ${e.line}-${e.endLine}`}isExpanded(e){return this.expanded()[e]===!0}toggleThread(e){this.expanded.update(t=>se(U({},t),{[e]:!t[e]}))}replyDraft(e){return this.replyDrafts()[e]??""}setReplyDraft(e,t){let i=t.target.value;this.replyDrafts.update(r=>se(U({},r),{[e]:i}))}sendReply(e){let t=this.replyDraft(e).trim();t&&this.replySubmit.emit({threadId:e,content:t})}onStatusChange(e,t){let i=t.target.value;i&&i!==e.status&&this.statusSubmit.emit({threadId:e.id,status:i})}statusLabel(e){return bC[e]??e}threadPreview(e){let t=e.comments[0];return t?`${t.author.name}: ${t.content}`:"Review comment"}formatDate(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}renderDiff(e){return En(this,null,function*(){let t=++this.renderVersion;if(this.disposeEditor(),this.selection.set(null),this.composerOpen.set(!1),this.editorError.set(""),!(!e||e.binary||e.status==="binary")){this.editorLoading.set(!0);try{let i=yield this.monacoService.load();if(this.destroyed||t!==this.renderVersion)return;let r=this.host();if(!r)return;let o=++jO,s=(e.oldPath||e.path).replace(/^\/+/,""),a=e.path.replace(/^\/+/,""),l=i.editor.createModel(e.originalContent??this.contentFromLines(e,"left"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/original/${s}`)),c=i.editor.createModel(e.modifiedContent??this.contentFromLines(e,"right"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/modified/${a}`));this.models=[l,c],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:c}),this.watchSelection(this.editor.getOriginalEditor(),"left"),this.watchSelection(this.editor.getModifiedEditor(),"right"),this.updateThreadDecorations();let m=this.focus();m&&(this.selection.set(se(U({},m),{endLine:m.line})),this.revealSelection(m))}catch{t===this.renderVersion&&this.editorError.set("Failed to load the diff viewer.")}finally{t===this.renderVersion&&this.editorLoading.set(!1)}}})}watchSelection(e,t){this.disposables.push(e.onDidChangeCursorSelection(i=>{let r=i.selection;this.selection.set({line:Math.min(r.startLineNumber,r.endLineNumber),endLine:Math.max(r.startLineNumber,r.endLineNumber),side:t}),this.composerOpen.set(!1)}))}updateThreadDecorations(){if(!this.editor)return;for(let t of this.decorations)t.clear();let e=t=>this.threads().filter(i=>i.side===t&&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(e("left")),this.editor.getModifiedEditor().createDecorationsCollection(e("right"))]}revealSelection(e){if(!this.editor)return;let t=e.side==="left"?this.editor.getOriginalEditor():this.editor.getModifiedEditor();t.setPosition({lineNumber:e.line,column:1}),t.revealLineInCenter(e.line),t.focus()}contentFromLines(e,t){return e.lines.filter(i=>i.type==="context"||(t==="left"?i.type==="del":i.type==="add")).map(i=>i.text).join(`
64
- `)}disposeEditor(){for(let e of this.disposables)e.dispose();this.disposables=[];for(let e of this.decorations)e.clear();this.decorations=[],this.editor?.dispose(),this.editor=null;for(let e of this.models)e.dispose();this.models=[]}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-pr-file-diff"]],viewQuery:function(t,i){t&1&&(Vt(i.host,wO,5),Vt(i.composerInput,EO,5)),t&2&&_n(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(t,i){if(t&1&&(f(0,"div",2),T(1,DO,2,0,"div",3)(2,SO,2,1,"div",4)(3,TO,2,1,"div",4)(4,VO,2,1)(5,BO,2,0,"div",5),h()),t&2){let r;d(),M(i.loading()&&!i.diff()?1:i.error()?2:i.editorError()?3:(r=i.diff())?4:5,r)}},dependencies:[Nn,Do],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 sm=()=>[],gd=n=>({$implicit:n}),wC=(n,e)=>e.value,_r=(n,e)=>e.id,$O=(n,e)=>e.path;function HO(n,e){n&1&&(f(0,"div",5),p(1,"Loading pull request..."),h())}function UO(n,e){n&1&&(f(0,"span",12),p(1,"Draft"),h())}function zO(n,e){if(n&1){let t=R();f(0,"button",26),D("click",function(){_(t);let r=u(2);return v(r.publishPr())}),p(1," Publish "),h(),f(2,"button",27),D("click",function(){_(t);let r=u(2);return v(r.openAbandonConfirm())}),p(3," Abandon "),h()}if(n&2){let t=u(2);I("disabled",t.busy()),d(2),I("disabled",t.busy())}}function GO(n,e){if(n&1){let t=R();f(0,"button",32),D("click",function(){let r=_(t).$implicit,o=u(4);return v(o.vote(r.value))}),z(1,"span"),p(2),h()}if(n&2){let t=e.$implicit,i=u(3),r=u();ge("current",r.voteMeta(i.myVote).cls==="vote-"+t.icon),d(),dt("vote-dot vote-"+t.icon),d(),q("",t.label," ")}}function WO(n,e){if(n&1&&(f(0,"div",29),K(1,GO,3,5,"button",31,wC),h()),n&2){let t=u(3);d(),X(t.voteOptions)}}function qO(n,e){if(n&1){let t=R();f(0,"button",27),D("click",function(){_(t);let r=u(3);return v(r.cancelAutoComplete())}),p(1," Cancel auto-complete "),h()}if(n&2){let t=u(3);I("disabled",t.busy())}}function ZO(n,e){if(n&1){let t=R();f(0,"button",27),D("click",function(){_(t);let r=u(3);return v(r.openAutoComplete())}),p(1," Set auto-complete "),h()}if(n&2){let t=u(3);I("disabled",t.busy())}}function YO(n,e){if(n&1){let t=R();f(0,"div",28)(1,"button",27),D("click",function(){_(t);let r=u(2);return v(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),p(2," Review \u25BE "),h(),T(3,WO,3,0,"div",29),h(),T(4,qO,2,1,"button",30)(5,ZO,2,1,"button",30),f(6,"button",26),D("click",function(){_(t);let r=u(2);return v(r.openComplete())}),p(7," Complete "),h()}if(n&2){let t=u(),i=u();d(),I("disabled",i.busy()),d(2),M(i.reviewMenuOpen()?3:-1),d(),M(t.autoCompleteSetBy?4:5),d(2),I("disabled",i.busy())}}function QO(n,e){if(n&1&&(f(0,"div",21),p(1),h()),n&2){let t=u(2);d(),O(t.error())}}function KO(n,e){if(n&1){let t=R();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),D("click",function(){_(t);let r=u(3);return v(r.openInBrowser())}),p(10," Resolve in Azure DevOps "),h()()}if(n&2){let t=u(2);d(7),O(t.targetBranch)}}function XO(n,e){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 JO(n,e){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 eR(n,e){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 tR(n,e){n&1&&(f(0,"div",40),p(1,"Loading checks..."),h())}function nR(n,e){if(n&1){let t=R();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(t);let r=u(3);return v(r.loadChecks())}),p(4," Retry "),h()()}if(n&2){let t=u(3);d(2),O(t.checksError()),d(),I("disabled",t.checksLoading())}}function iR(n,e){if(n&1&&(f(0,"div",56),p(1),h()),n&2){let t=e.$implicit;d(),O(t)}}function rR(n,e){if(n&1&&(f(0,"div",57),p(1),h()),n&2){let t=u(4);d(),O(t.requeueError())}}function oR(n,e){if(n&1&&sr(0,60),n&2){let t=e.$implicit;u(5);let i=_i(44);I("ngTemplateOutlet",i)("ngTemplateOutletContext",co(2,gd,t))}}function sR(n,e){if(n&1&&(f(0,"ul",58),K(1,oR,1,4,"ng-container",60,_r),h()),n&2){let t=u(5);d(),X(t.requiredChecks())}}function aR(n,e){n&1&&z(0,"hr",59)}function lR(n,e){if(n&1&&sr(0,60),n&2){let t=e.$implicit;u(5);let i=_i(44);I("ngTemplateOutlet",i)("ngTemplateOutletContext",co(2,gd,t))}}function cR(n,e){if(n&1&&(f(0,"ul",58),K(1,lR,1,4,"ng-container",60,_r),h()),n&2){let t=u(5);d(),X(t.optionalChecks())}}function dR(n,e){if(n&1&&(T(0,sR,3,0,"ul",58),T(1,aR,1,0,"hr",59),T(2,cR,3,0,"ul",58)),n&2){let t=u(4);M(t.requiredChecks().length?0:-1),d(),M(t.requiredChecks().length&&t.optionalChecks().length?1:-1),d(),M(t.optionalChecks().length?2:-1)}}function uR(n,e){n&1&&(f(0,"p",46),p(1,"No checks reported."),h())}function pR(n,e){if(n&1&&(K(0,iR,2,1,"div",56,gn),T(2,rR,2,1,"div",57),T(3,dR,3,3)(4,uR,2,0,"p",46)),n&2){let t=u(3);X(t.checksWarnings()),d(2),M(t.requeueError()?2:-1),d(),M(t.checks().length?3:4)}}function fR(n,e){if(n&1){let t=R();f(0,"button",55),D("click",function(){_(t);let r=u(3);return v(r.startEditing())}),p(1," Edit "),h()}}function hR(n,e){if(n&1){let t=R();f(0,"label"),p(1,"Title"),f(2,"input",61),D("input",function(r){_(t);let o=u(3);return v(o.editTitle.set(r.target.value))}),h()(),f(3,"label"),p(4,"Description"),f(5,"textarea",62),D("input",function(r){_(t);let o=u(3);return v(o.editDescription.set(r.target.value))}),h()(),f(6,"div",63)(7,"button",27),D("click",function(){_(t);let r=u(3);return v(r.editing.set(!1))}),p(8," Cancel "),h(),f(9,"button",26),D("click",function(){_(t);let r=u(3);return v(r.saveEdit())}),p(10," Save "),h()()}if(n&2){let t=u(3);d(2),I("value",t.editTitle()),d(3),I("value",t.editDescription()),d(2),I("disabled",t.busy()),d(2),I("disabled",t.busy()||!t.editTitle().trim())}}function mR(n,e){if(n&1&&z(0,"app-markdown-text",65),n&2){let t=u(3);I("markdown",t.description)}}function gR(n,e){n&1&&(f(0,"p",46),p(1,"No description provided."),h())}function _R(n,e){if(n&1&&(f(0,"h2",64),p(1),h(),T(2,mR,1,1,"app-markdown-text",65)(3,gR,2,0,"p",46)),n&2){let t=u(2);d(),O(t.title),d(),M(t.description?2:3)}}function vR(n,e){if(n&1&&sr(0,60),n&2){let t=e.$implicit;u(3);let i=_i(46);I("ngTemplateOutlet",i)("ngTemplateOutletContext",co(2,gd,t))}}function bR(n,e){if(n&1&&(f(0,"h3"),p(1,"Required"),h(),K(2,vR,1,4,"ng-container",60,_r)),n&2){let t=u(3);d(2),X(t.requiredReviewers())}}function yR(n,e){if(n&1&&sr(0,60),n&2){let t=e.$implicit;u(3);let i=_i(46);I("ngTemplateOutlet",i)("ngTemplateOutletContext",co(2,gd,t))}}function CR(n,e){if(n&1&&(f(0,"h3"),p(1,"Optional"),h(),K(2,yR,1,4,"ng-container",60,_r)),n&2){let t=u(3);d(2),X(t.otherReviewers())}}function xR(n,e){n&1&&(f(0,"p",46),p(1,"No reviewers."),h())}function wR(n,e){if(n&1){let t=R();f(0,"button",66),D("click",function(){_(t);let r=u(3);return v(r.toggleDraft())}),p(1," Convert to draft "),h()}if(n&2){let t=u(3);I("disabled",t.busy())}}function ER(n,e){if(n&1){let t=R();f(0,"span",67)(1,"span"),p(2),h(),f(3,"button",68),D("click",function(){let r=_(t).$implicit,o=u(4);return v(o.removeTag(r))}),p(4," \xD7 "),h()()}if(n&2){let t=e.$implicit,i=u(4);d(2),O(t),d(),I("disabled",i.busy()),ce("aria-label","Remove tag "+t)}}function DR(n,e){if(n&1&&(f(0,"div",50),K(1,ER,5,3,"span",67,gn),h()),n&2){let t=u(2);d(),X(t.labels)}}function SR(n,e){n&1&&(f(0,"p",46),p(1,"No tags."),h())}function TR(n,e){if(n&1){let t=R();f(0,"app-chip-input",69),D("queryChange",function(r){_(t);let o=u(3);return v(o.tagQuery.set(r))})("select",function(r){_(t);let o=u(3);return v(o.addTag(r))}),h()}if(n&2){let t=u(3);I("chips",ar(6,sm))("suggestions",t.tagSuggestions())("loading",t.tagsLoading())("query",t.tagQuery())("disabled",t.busy())("allowFreeText",!0)}}function MR(n,e){n&1&&(f(0,"div",40),p(1,"Loading work items..."),h())}function IR(n,e){if(n&1){let t=R();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(t);let r=u(3);return v(r.loadWorkItems())}),p(4," Retry "),h()()}if(n&2){let t=u(3);d(2),O(t.workItemsError()),d(),I("disabled",t.workItemsLoading())}}function kR(n,e){if(n&1&&(f(0,"small"),p(1),h()),n&2){let t=u().$implicit;d(),O(t.state)}}function PR(n,e){if(n&1){let t=R();f(0,"li")(1,"button",70),D("click",function(){let r=_(t).$implicit,o=u(4);return v(o.openExternalLink(r.url))}),f(2,"span",71),p(3),h(),f(4,"span",72),p(5),h()(),T(6,kR,2,1,"small"),f(7,"button",73),D("click",function(){let r=_(t).$implicit,o=u(4);return v(o.unlinkWorkItem(r.id))}),p(8," \xD7 "),h()()}if(n&2){let t=e.$implicit,i=u(4);d(3),q("#",t.id),d(2),O(t.title),d(),M(t.state?6:-1),d(),I("disabled",i.busy()),ce("aria-label","Unlink work item #"+t.id)}}function OR(n,e){if(n&1&&(f(0,"ul",53),K(1,PR,9,5,"li",null,_r),h()),n&2){let t=u(3);d(),X(t.workItems())}}function RR(n,e){n&1&&(f(0,"p",46),p(1,"No related work items."),h())}function NR(n,e){if(n&1){let t=R();f(0,"app-chip-input",74),D("queryChange",function(r){_(t);let o=u(3);return v(o.workItemQuery.set(r))})("select",function(r){_(t);let o=u(3);return v(o.linkWorkItem(r))}),h()}if(n&2){let t=u(3);I("chips",ar(6,sm))("suggestions",t.workItemSuggestions())("loading",t.workItemsSearchLoading())("query",t.workItemQuery())("error",t.workItemsSearchError())("disabled",t.busy())}}function AR(n,e){if(n&1){let t=R();f(0,"div",23)(1,"main",33),T(2,KO,11,1,"div",34)(3,XO,6,0,"div",35)(4,JO,6,0,"div",35)(5,eR,6,0,"div",36),f(6,"section",37)(7,"div",38)(8,"h2"),p(9,"Checks"),h(),f(10,"button",39),D("click",function(){_(t);let r=u(2);return v(r.loadChecks())}),p(11," Refresh "),h()(),T(12,tR,2,0,"div",40)(13,nR,5,2,"div",41)(14,pR,5,2),h(),f(15,"section",42)(16,"div",38)(17,"h2"),p(18,"Details"),h(),T(19,fR,2,0,"button",43),h(),T(20,hR,11,4)(21,_R,4,2),h()(),f(22,"aside",44)(23,"div",38)(24,"h2"),p(25,"Reviewers"),h()(),f(26,"app-chip-input",45),D("trailingAction",function(){_(t);let r=u(2);return v(r.reviewerRequired.set(!r.reviewerRequired()))})("queryChange",function(r){_(t);let o=u(2);return v(o.reviewerQuery.set(r))})("select",function(r){_(t);let o=u(2);return v(o.addReviewer(r))}),h(),T(27,bR,4,0),T(28,CR,4,0),T(29,xR,2,0,"p",46),T(30,wR,2,1,"button",47),f(31,"div",48)(32,"h3"),p(33,"Tags"),h(),f(34,"button",49),D("click",function(){_(t);let r=u(2);return v(r.toggleTagsPicker())}),p(35," + "),h()(),T(36,DR,3,0,"div",50)(37,SR,2,0,"p",46),T(38,TR,1,7,"app-chip-input",51),f(39,"div",48)(40,"h3"),p(41,"Related work items"),h(),f(42,"button",52),D("click",function(){_(t);let r=u(2);return v(r.toggleWorkItemPicker())}),p(43," + "),h()(),T(44,MR,2,0,"div",40)(45,IR,5,2,"div",41)(46,OR,3,0,"ul",53)(47,RR,2,0,"p",46),T(48,NR,1,7,"app-chip-input",54),h()()}if(n&2){let t=u(),i=u();d(2),M(t.mergeStatus==="conflicts"?2:t.mergeStatus==="rejectedByPolicy"?3:t.mergeStatus==="failure"?4:t.mergeStatus==="queued"?5:-1),d(8),I("disabled",i.checksLoading()),d(2),M(i.checksLoading()?12:i.checksError()?13:14),d(7),M(i.editing()?-1:19),d(),M(i.editing()?20:21),d(6),I("chips",ar(22,sm))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy())("trailingPressed",i.reviewerRequired()),d(),M(i.requiredReviewers().length?27:-1),d(),M(i.otherReviewers().length?28:-1),d(),M(t.reviewers.length?-1:29),d(),M(t.isDraft?-1:30),d(4),I("disabled",i.busy()),d(2),M(t.labels.length?36:37),d(2),M(i.tagsPickerOpen()?38:-1),d(4),I("disabled",i.busy()),d(2),M(i.workItemsLoading()?44:i.workItemsError()?45:i.workItems().length?46:47),d(4),M(i.workItemPickerOpen()?48:-1)}}function LR(n,e){if(n&1){let t=R();f(0,"button",85),D("click",function(){_(t);let r=u().$implicit,o=u(3);return v(o.jumpToThread(r))}),p(1),h()}if(n&2){let t=u().$implicit;d(),lo(" ",t.filePath,":",t.line," ")}}function FR(n,e){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let t=e.$implicit,i=u(4);I("value",t),d(),O(i.statusLabel(t))}}function VR(n,e){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 t=e.$implicit,i=u(4);d(),I("name",t.author.name)("email",t.author.email||""),d(4),O(t.author.name),d(),q(" \xB7 ",i.formatDate(t.createdAt)," "),d(),I("markdown",t.content)}}function BR(n,e){if(n&1){let t=R();f(0,"article",77)(1,"header")(2,"span"),p(3),h(),T(4,LR,2,2,"button",79),f(5,"select",80),D("change",function(r){let o=_(t).$implicit,s=u(3);return v(s.setThreadStatus(o.id,r.target.value))}),K(6,FR,2,2,"option",81,gn),h()(),K(8,VR,8,5,"div",82,_r),f(10,"div",83)(11,"input",84,2),D("keydown.enter",function(){let r=_(t).$implicit,o=_i(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),h(),f(13,"button",39),D("click",function(){let r=_(t).$implicit,o=_i(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),p(14," Reply "),h()()()}if(n&2){let t=e.$implicit,i=u(3);d(2),dt("thread-status status-"+t.status),d(),O(i.statusLabel(t.status)),d(),M(t.filePath?4:-1),d(),I("value",t.status)("disabled",i.busy()),d(),X(i.threadStatuses),d(2),X(t.comments),d(5),I("disabled",i.busy())}}function jR(n,e){n&1&&(f(0,"div",78),p(1,"No comments yet."),h())}function $R(n,e){if(n&1){let t=R();f(0,"div",24)(1,"section",75)(2,"h2"),p(3,"Add comment"),h(),f(4,"textarea",76),D("input",function(r){_(t);let o=u(2);return v(o.newComment.set(r.target.value))}),h(),f(5,"div",63)(6,"button",26),D("click",function(){_(t);let r=u(2);return v(r.addGeneralComment())}),p(7," Comment "),h()()(),K(8,BR,15,7,"article",77,_r,!1,jR,2,0,"div",78),h()}if(n&2){let t=u(2);d(4),I("value",t.newComment()),d(2),I("disabled",t.busy()||!t.newComment().trim()),d(2),X(t.threads())}}function HR(n,e){if(n&1){let t=R();f(0,"div",88)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(t);let r=u(3);return v(r.loadFiles())}),p(4," Retry "),h()()}if(n&2){let t=u(3);d(2),O(t.filesError()),d(),I("disabled",t.filesLoading())}}function UR(n,e){n&1&&(f(0,"div",40),p(1,"Loading changed files..."),h())}function zR(n,e){n&1&&(F(),z(0,"polyline",94))}function GR(n,e){n&1&&(F(),z(0,"polyline",95))}function WR(n,e){if(n&1){let t=R();f(0,"button",92),D("click",function(){_(t);let r=u().$implicit,o=u(4);return v(o.toggleFileDirectory(r.path))}),F(),f(1,"svg",93),T(2,zR,1,0,":svg:polyline",94)(3,GR,1,0,":svg:polyline",95),h(),he(),f(4,"span"),p(5),h()()}if(n&2){let t=u().$implicit;ue("padding-left",t.depth*14+9,"px"),I("title",t.path),ce("aria-expanded",!t.collapsed),d(2),M(t.collapsed?2:3),d(3),O(t.name)}}function qR(n,e){if(n&1){let t=R();f(0,"button",96),D("click",function(){_(t);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 t,i=u().$implicit,r=u(4);ue("padding-left",i.depth*14+9,"px"),ge("active",((t=r.selectedFile())==null?null:t.path)===i.file.path),I("title",i.file.path),d(),dt("file-status status-"+i.file.changeType),d(),O(i.file.changeType[0].toUpperCase()),d(2),O(i.name)}}function ZR(n,e){if(n&1&&T(0,WR,6,6,"button",90)(1,qR,5,9,"button",91),n&2){let t=e.$implicit;M(t.kind==="dir"?0:1)}}function YR(n,e){n&1&&(f(0,"div",78),p(1,"No changed files."),h())}function QR(n,e){if(n&1&&K(0,ZR,2,1,null,null,$O,!1,YR,2,0,"div",78),n&2){let t=u(3);X(t.fileRows())}}function KR(n,e){if(n&1){let t=R();f(0,"div",25)(1,"aside",87),T(2,HR,5,2,"div",88)(3,UR,2,0,"div",40)(4,QR,3,1),h(),f(5,"app-pr-file-diff",89),D("commentSubmit",function(r){_(t);let o=u(2);return v(o.addInlineComment(r))})("replySubmit",function(r){_(t);let o=u(2);return v(o.replyFromDiff(r))})("statusSubmit",function(r){_(t);let o=u(2);return v(o.setStatusFromDiff(r))}),h()()}if(n&2){let t=u(2);d(2),M(t.filesError()?2:t.filesLoading()?3:4),d(3),I("diff",t.selectedFile()?t.fileDiffs()[t.selectedFile().path]??null:null)("threads",t.selectedFileThreads())("loading",t.fileDiffLoading())("error",t.fileDiffError())("posting",t.busy())("focus",t.fileFocus())}}function XR(n,e){n&1&&(f(0,"span",100),p(1,"Required"),h())}function JR(n,e){if(n&1&&(f(0,"small"),p(1),h()),n&2){let t=u().$implicit;d(),O(t.detail)}}function eN(n,e){if(n&1){let t=R();f(0,"button",39),D("click",function(){_(t);let r=u().$implicit,o=u(2);return v(o.requeueCheck(r))}),p(1),h()}if(n&2){let t=u().$implicit,i=u(2);I("disabled",!!i.requeuing()||i.checksLoading()),d(),q(" ",i.requeuing()===t.evaluationId?"Requeuing...":"Requeue"," ")}}function tN(n,e){if(n&1){let t=R();f(0,"button",55),D("click",function(){_(t);let r=u().$implicit,o=u(2);return v(o.openExternalLink(r.url))}),p(1," Open "),h()}}function nN(n,e){if(n&1&&(f(0,"li",97)(1,"span"),p(2),h(),f(3,"div",98)(4,"div",99),p(5),T(6,XR,2,0,"span",100),h(),T(7,JR,2,1,"small"),h(),T(8,eN,2,2,"button",101),T(9,tN,2,0,"button",43),h()),n&2){let t=e.$implicit,i=u(2);d(),dt("check-state state-"+t.state),d(),O(i.checkStateLabel(t.state)),d(3),q(" ",t.name," "),d(),M(t.required?6:-1),d(),M(t.detail?7:-1),d(),M(t.evaluationId?8:-1),d(),M(t.url?9:-1)}}function iN(n,e){if(n&1){let t=R();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),D("click",function(){let r=_(t).$implicit,o=u(2);return v(o.toggleReviewerRequired(r))}),p(8),h(),f(9,"button",105),D("click",function(){let r=_(t).$implicit,o=u(2);return v(o.removeReviewer(r))}),p(10," \xD7 "),h()()}if(n&2){let t=e.$implicit,i=u(2);d(),I("name",t.name)("email",t.email||""),d(3),O(t.name),d(),dt(i.voteMeta(t.vote).cls),d(),O(i.voteMeta(t.vote).label),d(),ge("on",t.isRequired),I("title",t.isRequired?"Make optional":"Make required"),d(),q(" ",t.isRequired?"Required":"Optional"," "),d(),ce("aria-label","Remove "+t.name)}}function rN(n,e){if(n&1){let t=R();f(0,"h2"),p(1,"Abandon pull request"),h(),f(2,"p",108),p(3),h(),f(4,"div",63)(5,"button",27),D("click",function(){_(t);let r=u(3);return v(r.abandonOpen.set(!1))}),p(6," Cancel "),h(),f(7,"button",109),D("click",function(){_(t);let r=u(3);return v(r.abandonPr())}),p(8," Abandon "),h()()}if(n&2){let t,i=u(3);d(3),q(" This closes pull request !",(t=i.pr())==null?null:t.id," without merging it. The source branch is kept. "),d(2),I("disabled",i.busy()),d(2),I("disabled",i.busy())}}function oN(n,e){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let t=e.$implicit;I("value",t.value),d(),O(t.label)}}function sN(n,e){if(n&1){let t=R();f(0,"h2"),p(1),h(),f(2,"label"),p(3,"Merge strategy"),f(4,"select",110),D("change",function(r){_(t);let o=u(3);return v(o.mergeStrategy.set(r.target.value))}),K(5,oN,2,2,"option",81,wC),h()(),f(7,"label",111)(8,"input",112),D("change",function(r){_(t);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),D("change",function(r){_(t);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),D("change",function(r){_(t);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),D("click",function(){_(t);let r=u(3);return r.completeOpen.set(!1),v(r.autoCompleteOpen.set(!1))}),p(18," Cancel"),h(),f(19,"button",26),D("click",function(){_(t);let r=u(3);return v(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),p(20),h()()}if(n&2){let t=u(3);d(),q(" ",t.completeOpen()?"Complete pull request":"Set auto-complete"," "),d(3),I("value",t.mergeStrategy()),d(),X(t.mergeStrategies()),d(3),I("checked",t.deleteSourceBranch()),d(3),I("checked",t.completeWorkItems()),d(3),I("checked",t.transitionWorkItems())("disabled",!t.completeWorkItems()),d(5),I("disabled",t.busy()),d(),q(" ",t.completeOpen()?"Complete":"Enable"," ")}}function aN(n,e){if(n&1){let t=R();f(0,"div",106),D("click",function(){_(t);let r=u(2);return r.completeOpen.set(!1),r.autoCompleteOpen.set(!1),v(r.abandonOpen.set(!1))}),h(),f(1,"section",107),T(2,rN,9,3)(3,sN,21,8),h()}if(n&2){let t=u(2);d(),ce("aria-label",t.abandonOpen()?"Abandon pull request":t.completeOpen()?"Complete pull request":"Set auto-complete"),d(),M(t.abandonOpen()?2:3)}}function lN(n,e){if(n&1){let t=R();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(),T(9,UO,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),D("click",function(){_(t);let r=u();return v(r.openInBrowser())}),p(22," Open in Azure DevOps "),h(),T(23,zO,4,2)(24,YO,8,4),f(25,"button",18),D("click",function(){_(t);let r=u();return v(r.closed.emit())}),p(26," \xD7 "),h()()(),f(27,"nav",19)(28,"button",20),D("click",function(){_(t);let r=u();return v(r.tab.set("overview"))}),p(29," Overview "),h(),f(30,"button",20),D("click",function(){_(t);let r=u();return v(r.tab.set("files"))}),p(31," Files "),f(32,"span"),p(33),h()(),f(34,"button",20),D("click",function(){_(t);let r=u();return v(r.tab.set("comments"))}),p(35," Comments "),f(36,"span"),p(37),h()()(),T(38,QO,2,1,"div",21),f(39,"div",22),T(40,AR,49,23,"div",23)(41,$R,11,3,"div",24)(42,KR,6,7,"div",25),h(),ao(43,nN,10,8,"ng-template",null,0,wc)(45,iN,11,11,"ng-template",null,1,wc),T(47,aN,4,2)}if(n&2){let t=e,i=u();d(4),q("!",t.id),d(2),O(t.title),d(2),O(t.status),d(),M(t.isDraft?9:-1),d(2),I("name",t.author.name)("email",t.author.email||""),d(2),O(t.author.name),d(2),O(t.sourceBranch),d(4),O(t.targetBranch),d(4),M(t.isDraft?23:24),d(2),I("disabled",i.busy()),d(3),ge("active",i.tab()==="overview"),d(2),ge("active",i.tab()==="files"),d(3),O(i.files().length),d(),ge("active",i.tab()==="comments"),d(3),O(i.threads().length),d(),M(i.error()?38:-1),d(2),M(i.tab()==="overview"?40:i.tab()==="comments"?41:42),d(7),M(i.completeOpen()||i.autoCompleteOpen()||i.abandonOpen()?47:-1)}}function cN(n,e){if(n&1){let t=R();f(0,"div",6)(1,"div"),p(2),h(),f(3,"button",17),D("click",function(){_(t);let r=u();return v(r.load())}),p(4,"Retry"),h()()}if(n&2){let t=u();d(2),O(t.error()||"Pull request could not be loaded.")}}var CC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},dN={notSet:"Not merged",queued:"Queued for merge",conflicts:"Merge conflicts",succeeded:"Ready to merge",rejectedByPolicy:"Blocked by policy",failure:"Merge failed"},uN={pending:"Pending",succeeded:"Passed",failed:"Failed",notApplicable:"N/A"},md=class n{git=k(mt);vscode=k(en);destroyRef=k(et);prId=N.required();settings=N(null);closed=G();changed=G();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=$(()=>this.checks().filter(e=>e.required));optionalChecks=$(()=>this.checks().filter(e=>!e.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=$(()=>{let e=this.tagQuery().trim().toLowerCase(),t=this.allTags();return e?t.filter(i=>i.label.toLowerCase().includes(e)):t});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=$(()=>{let e=this.files();return this.settings()?.fileListView!=="tree"?e.map(t=>({kind:"file",path:t.path,name:t.path,depth:0,file:t})):_o(e,this.collapsedFiles())});mergeStrategies=$(()=>n.allMergeStrategies.filter(e=>{let t=this.settings();return e.value==="noFastForward"||e.value==="rebaseMerge"?t?.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(CC);requiredReviewers=$(()=>(this.pr()?.reviewers??[]).filter(e=>e.isRequired));otherReviewers=$(()=>(this.pr()?.reviewers??[]).filter(e=>!e.isRequired));generalThreads=$(()=>this.threads().filter(e=>!e.filePath));inlineThreads=$(()=>this.threads().filter(e=>e.filePath));selectedFileThreads=$(()=>{let e=this.selectedFile();return e?this.inlineThreads().filter(t=>t.filePath===e.path||t.filePath===e.oldPath):[]});constructor(){pr(this.reviewerQuery).pipe(bt(e=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(e.trim().length>=2),e.trim().length<2?we([]):this.git.searchReviewers(e.trim()).pipe(ot(()=>(this.reviewersError.set("Unable to load suggestions."),we([])))))),gt(this.destroyRef)).subscribe(e=>{this.reviewerSuggestions.set(e),this.reviewersLoading.set(!1)}),pr(this.workItemQuery).pipe(bt(e=>{let t=e.trim();return this.workItemSuggestions.set([]),this.workItemsSearchError.set(""),this.workItemsSearchLoading.set(t.length>0),t?this.git.searchWorkItems(t).pipe(ot(()=>(this.workItemsSearchError.set("Unable to load suggestions."),we([])))):we([])}),gt(this.destroyRef)).subscribe(e=>{this.workItemSuggestions.set(e.map(t=>({id:String(t.id),label:`#${t.id} ${t.title}`.trim(),description:t.state}))),this.workItemsSearchLoading.set(!1)})}ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(bt(e=>xC({detail:we(e),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))})),gt(this.destroyRef)).subscribe({next:({detail:e,threads:t})=>{this.pr.set(e),this.threads.set(t),this.loading.set(!1),this.loadFiles(),this.loadWorkItems(),this.loadChecks()},error:e=>{this.loading.set(!1),this.error.set(this.errorMessage(e))}})}loadFiles(){this.filesLoading.set(!0),this.filesError.set(""),this.git.getPrChanges(this.prId()).pipe(gt(this.destroyRef)).subscribe({next:e=>{this.files.set(e),this.filesLoading.set(!1);let t=this.selectedFile();t&&!e.some(i=>i.path===t.path)&&this.selectedFile.set(null),!this.selectedFile()&&e.length&&this.selectFile(e[0])},error:e=>{this.filesLoading.set(!1),this.filesError.set(this.errorMessage(e))}})}loadWorkItems(){this.workItemsLoading.set(!0),this.workItemsError.set(""),this.git.getPrWorkItems(this.prId()).pipe(gt(this.destroyRef)).subscribe({next:e=>{this.workItems.set(e),this.workItemsLoading.set(!1)},error:e=>{this.workItemsLoading.set(!1),this.workItemsError.set(this.errorMessage(e))}})}loadChecks(){this.checksLoading.set(!0),this.checksError.set(""),this.checksWarnings.set([]),this.requeueError.set(""),this.git.getPrChecks(this.prId()).pipe(gt(this.destroyRef)).subscribe({next:e=>{this.checks.set(e.checks),this.checksWarnings.set(e.warnings??[]),this.checksLoading.set(!1)},error:e=>{this.checksLoading.set(!1),this.checksError.set(this.errorMessage(e))}})}requeueCheck(e){let t=e.evaluationId??"";!t||this.requeuing()||(this.requeuing.set(t),this.requeueError.set(""),this.git.requeuePrCheck(this.prId(),t).pipe(gt(this.destroyRef)).subscribe({next:()=>{this.requeuing.set(""),this.loadChecks()},error:i=>{this.requeuing.set(""),this.requeueError.set(this.errorMessage(i))}}))}reload(){xC({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))}).subscribe({next:({detail:e,threads:t})=>{this.pr.set(e),this.threads.set(t),this.loadChecks()},error:e=>this.error.set(this.errorMessage(e))})}run(e,t){this.busy()||(this.busy.set(!0),this.error.set(""),e().pipe(gt(this.destroyRef)).subscribe({next:()=>{this.busy.set(!1),this.changed.emit(),t?.()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}vote(e){this.reviewMenuOpen.set(!1),this.run(()=>this.git.votePr(this.prId(),e),()=>this.reload())}startEditing(){this.editing.set(!0),this.editTitle.set(this.pr()?.title??""),this.editDescription.set(this.pr()?.description??"")}saveEdit(){let e=this.editTitle().trim();e&&this.run(()=>this.git.updatePr(this.prId(),{title:e,description:this.editDescription()}),()=>{this.editing.set(!1),this.reload()})}toggleDraft(){let e=this.pr();e&&this.run(()=>this.git.updatePr(this.prId(),{isDraft:!e.isDraft}),()=>this.reload())}addReviewer(e){this.reviewerQuery.set(""),this.reviewerSuggestions.set([]),this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,required:this.reviewerRequired()}),()=>this.reload())}toggleReviewerRequired(e){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,required:!e.isRequired,vote:e.vote}),()=>this.reload())}removeReviewer(e){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,remove:!0}),()=>this.reload())}toggleTagsPicker(){let e=!this.tagsPickerOpen();this.tagsPickerOpen.set(e),this.tagQuery.set(""),!(!e||this.allTags().length||this.tagsLoading())&&(this.tagsLoading.set(!0),this.git.getPrTags().pipe(gt(this.destroyRef)).subscribe({next:t=>{this.allTags.set(t.map(i=>({id:i.name,label:i.name}))),this.tagsLoading.set(!1)},error:()=>this.tagsLoading.set(!1)}))}addTag(e){let t=e.label.trim();t&&(this.tagQuery.set(""),!(this.pr()?.labels??[]).some(i=>i.toLowerCase()===t.toLowerCase())&&this.run(()=>this.git.addPrTag(this.prId(),t),()=>this.reload()))}removeTag(e){this.run(()=>this.git.removePrTag(this.prId(),e),()=>this.reload())}toggleWorkItemPicker(){let e=!this.workItemPickerOpen();this.workItemPickerOpen.set(e),this.workItemQuery.set(""),this.workItemSuggestions.set([])}linkWorkItem(e){let t=Number(e.id);!Number.isInteger(t)||t<=0||(this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.run(()=>this.git.linkPrWorkItem(this.prId(),t),()=>this.loadWorkItems()))}unlinkWorkItem(e){this.run(()=>this.git.unlinkPrWorkItem(this.prId(),e),()=>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 e=this.newComment().trim();e&&this.run(()=>this.git.addPrComment(this.prId(),{content:e}),()=>{this.newComment.set(""),this.reload()})}replyToThread(e,t){t.trim()&&this.run(()=>this.git.addPrComment(this.prId(),{threadId:e,content:t}),()=>this.reload())}setThreadStatus(e,t){this.run(()=>this.git.setPrThreadStatus(this.prId(),e,t),()=>this.reload())}addInlineComment(e){this.run(()=>this.git.addPrComment(this.prId(),e),()=>this.reload())}replyFromDiff(e){this.replyToThread(e.threadId,e.content)}setStatusFromDiff(e){this.setThreadStatus(e.threadId,e.status)}jumpToThread(e){let t=this.files().find(i=>i.path===e.filePath)??this.files().find(i=>i.oldPath===e.filePath);!t||e.line===null||(this.tab.set("files"),this.selectFile(t),this.fileFocus.set({line:e.line,side:e.side??"right"}))}toggleFileDirectory(e){this.collapsedFiles.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}selectFile(e){this.selectedFile.set(e),this.fileDiffError.set(""),!(this.fileDiffs()[e.path]||e.changeType==="binary")&&(this.fileDiffLoading.set(!0),this.git.getPrFileDiff(this.prId(),e).pipe(gt(this.destroyRef)).subscribe({next:t=>{this.fileDiffs.update(i=>se(U({},i),{[e.path]:t})),this.fileDiffLoading.set(!1)},error:t=>{this.fileDiffLoading.set(!1),this.fileDiffError.set(this.errorMessage(t))}}))}voteMeta(e){switch(e){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(e){return CC[e]??e}mergeStatusLabel(e){return dN[e]??e}checkStateLabel(e){return uN[e]??e}formatDate(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}openInBrowser(){let e=this.pr()?.webUrl;e&&this.vscode.openExternal(e)}openExternalLink(e){e&&this.vscode.openExternal(e)}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(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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"],["role","alert",1,"error-banner"],[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(t,i){if(t&1&&(f(0,"div",3),D("click",function(){return i.onBackdropClick()}),h(),f(1,"section",4),T(2,HO,2,0,"div",5)(3,lN,48,22)(4,cN,5,1,"div",6),h()),t&2){let r;d(2),M(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[Nn,xo,Do,mh,hd],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)}.error-banner[_ngcontent-%COMP%]{flex:none;padding:7px 14px;background:#f14c4c1f;color:#f48771}.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 xC(n){return new le(e=>{let t=Object.keys(n),i={},r=t.length,o=!1;if(!r){e.next({}),e.complete();return}for(let s of t)n[s].subscribe({next:a=>{i[s]=a},error:a=>{o||(o=!0,e.error(a))},complete:()=>{--r===0&&!o&&(e.next(i),e.complete())}})})}var pN=()=>[],am=(n,e)=>e.name,fN=(n,e)=>e.index,hN=(n,e)=>e.path,mN=(n,e)=>e.id;function gN(n,e){n&1&&(F(),ae(0,"polyline",4))}function _N(n,e){n&1&&(F(),ae(0,"polyline",5))}function vN(n,e){n&1&&(y(0,"span",31),p(1,"current"),C())}function bN(n,e){if(n&1){let t=R();y(0,"button",26),V("click",function(){let r=_(t).$implicit,o=u(2);return v(o.selectBranch(r.name))})("contextmenu",function(r){let o=_(t).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o)}))}),F(),y(1,"svg",16),ae(2,"line",27)(3,"circle",28)(4,"circle",29)(5,"path",30),C(),he(),y(6,"span",23),p(7),C(),T(8,vN,2,0,"span",31),C()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",i.selectedBranch()===t.name),Y("title",t.name),d(7),O(t.name),d(),M(t.current?8:-1)}}function yN(n,e){if(n&1){let t=R();y(0,"button",26),V("click",function(){let r=_(t).$implicit,o=u(3);return v(o.selectBranch(r.name))})("contextmenu",function(r){let o=_(t).$implicit,s=u(3);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o)}))}),F(),y(1,"svg",16),ae(2,"line",27)(3,"circle",28)(4,"circle",29)(5,"path",30),C(),he(),y(6,"span",23),p(7),C()()}if(n&2){let t=e.$implicit,i=u(3);ge("selected",i.selectedBranch()===t.name),Y("title",t.name),d(7),O(t.name)}}function CN(n,e){if(n&1&&(y(0,"div",24),p(1,"Remote"),C(),K(2,yN,8,4,"button",25,am)),n&2){let t=u(2);d(2),X(t.remoteBranches())}}function xN(n,e){if(n&1){let t=R();y(0,"div",8)(1,"button",15),V("click",function(){_(t);let r=u();return v(r.selectBranch(""))}),F(),y(2,"svg",16),ae(3,"line",17)(4,"line",18)(5,"line",19)(6,"circle",20)(7,"circle",21)(8,"circle",22),C(),he(),y(9,"span",23),p(10,"All Branches"),C()(),y(11,"div",24),p(12,"Local"),C(),K(13,bN,9,5,"button",25,am),T(15,CN,4,0),C()}if(n&2){let t=u();d(),ge("selected",t.selectedBranch()===""),d(12),X(t.localBranches()),d(2),M(t.showRemote()?15:-1)}}function wN(n,e){n&1&&(F(),ae(0,"polyline",4))}function EN(n,e){n&1&&(F(),ae(0,"polyline",5))}function DN(n,e){if(n&1){let t=R();y(0,"button",26),V("click",function(){let r=_(t).$implicit,o=u(2);return v(o.selectTag(r))})("contextmenu",function(r){let o=_(t).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.name}}))}),F(),y(1,"svg",16),ae(2,"path",33)(3,"line",34),C(),he(),y(4,"span",23),p(5),C()()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",i.selectedCommitHash()===t.hash),Y("title",t.name),d(5),O(t.name)}}function SN(n,e){n&1&&(y(0,"div",32),p(1,"No tags"),C())}function TN(n,e){if(n&1&&(y(0,"div",8),K(1,DN,6,4,"button",25,am,!1,SN,2,0,"div",32),C()),n&2){let t=u();d(),X(t.tags())}}function MN(n,e){n&1&&(F(),ae(0,"polyline",4))}function IN(n,e){n&1&&(F(),ae(0,"polyline",5))}function kN(n,e){if(n&1){let t=R();y(0,"button",36),V("contextmenu",function(r){let o=_(t).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"stash",stash:o}))}),F(),y(1,"svg",16),ae(2,"path",37)(3,"line",38),C(),he(),y(4,"span",23),p(5),C(),y(6,"span",39),p(7),C()()}if(n&2){let t=e.$implicit,i=u(2);Y("title",t.message),d(5),O(i.stashLabel(t)),d(2),O(t.message)}}function PN(n,e){n&1&&(y(0,"div",32),p(1,"No stashes"),C())}function ON(n,e){if(n&1&&(y(0,"div",8),K(1,kN,8,3,"button",35,fN,!1,PN,2,0,"div",32),C()),n&2){let t=u();d(),X(t.stashes())}}function RN(n,e){n&1&&(F(),ae(0,"polyline",4))}function NN(n,e){n&1&&(F(),ae(0,"polyline",5))}function AN(n,e){if(n&1&&(y(0,"span",41),p(1),C()),n&2){let t=u().$implicit;d(),O(t.branch)}}function LN(n,e){if(n&1){let t=R();y(0,"button",36),V("contextmenu",function(r){let o=_(t).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),F(),y(1,"svg",16),ae(2,"path",40),C(),he(),y(3,"span",23),p(4),C(),T(5,AN,2,1,"span",41),C()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",t.current),Y("title",t.path),d(4),O(i.worktreeLabel(t)),d(),M(t.branch?5:-1)}}function FN(n,e){n&1&&(y(0,"div",32),p(1,"No worktrees"),C())}function VN(n,e){if(n&1&&(y(0,"div",8),K(1,LN,6,5,"button",25,hN,!1,FN,2,0,"div",32),C()),n&2){let t=u();d(),X(t.worktrees())}}function BN(n,e){n&1&&(F(),ae(0,"polyline",4))}function jN(n,e){n&1&&(F(),ae(0,"polyline",5))}function $N(n,e){if(n&1&&(y(0,"div",45),p(1),C()),n&2){let t=u(3);d(),O(t.prError())}}function HN(n,e){n&1&&(y(0,"div",32),p(1,"Loading pull requests..."),C())}function UN(n,e){n&1&&(F(),ae(0,"polyline",49))}function zN(n,e){n&1&&(F(),ae(0,"polyline",49)(1,"line",57))}function GN(n,e){n&1&&(F(),ae(0,"circle",58)(1,"polyline",59))}function WN(n,e){n&1&&(F(),ae(0,"line",60)(1,"line",61))}function qN(n,e){n&1&&(F(),ae(0,"circle",50))}function ZN(n,e){n&1&&(y(0,"span",54),p(1,"Draft"),C())}function YN(n,e){n&1&&(y(0,"span",55),p(1,"Required"),C())}function QN(n,e){if(n&1){let t=R();y(0,"button",47),V("click",function(){let r=_(t).$implicit,o=u(4);return v(o.prSelect.emit(r.id))}),F(),y(1,"svg",48),T(2,UN,1,0,":svg:polyline",49)(3,zN,2,0)(4,GN,2,0)(5,WN,2,0)(6,qN,1,0,":svg:circle",50),C(),he(),y(7,"span",51)(8,"span",52)(9,"span",53),p(10),C(),T(11,ZN,2,0,"span",54),T(12,YN,2,0,"span",55),C(),y(13,"span",56),p(14),C()()()}if(n&2){let t,i=e.$implicit,r=u(4);Y("title",r.prTooltip(i)),d(),dt(r.voteClass(i)),d(),M((t=i.myVote)===10?2:t===5?3:t===-5?4:t===-10?5:6),d(8),O(i.title),d(),M(i.isDraft?11:-1),d(),M(i.requiresMe?12:-1),d(2),xc(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function KN(n,e){n&1&&(y(0,"div",32),p(1,"No active pull requests"),C())}function XN(n,e){if(n&1&&K(0,QN,15,10,"button",46,mN,!1,KN,2,0,"div",32),n&2){let t=u(3);X(t.pullRequests())}}function JN(n,e){if(n&1&&(y(0,"div",8),T(1,$N,2,1,"div",45)(2,HN,2,0,"div",32)(3,XN,3,1),C()),n&2){let t=u(2);d(),M(t.prError()?1:t.pullRequests()===null?2:3)}}function eA(n,e){if(n&1){let t=R();y(0,"section",1)(1,"div",9)(2,"button",2),V("click",function(){_(t);let r=u();return v(r.prsOpen.set(!r.prsOpen()))}),F(),y(3,"svg",3),T(4,BN,1,0,":svg:polyline",4)(5,jN,1,0,":svg:polyline",5),C(),he(),y(6,"span",6),p(7,"Pull Requests"),C(),y(8,"span",7),p(9),C()(),y(10,"button",42),V("click",function(){_(t);let r=u();return v(r.prRefresh.emit())}),F(),y(11,"svg",11),ae(12,"polyline",43)(13,"path",44),C()()(),T(14,JN,4,1,"div",8),C()}if(n&2){let t=u();d(2),ce("aria-expanded",t.prsOpen()),d(2),M(t.prsOpen()?4:5),d(5),O((t.pullRequests()??ar(4,pN)).length),d(5),M(t.prsOpen()?14:-1)}}function tA(n,e){n&1&&(y(0,"div",14),p(1,"Loading..."),C())}var _d=class n{branches=N.required();selectedBranch=N.required();showRemote=N.required();stashes=N.required();worktrees=N.required();tags=N.required();selectedCommitHash=N("");loading=N(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=G();tagSelect=G();contextMenu=G();worktreeCreate=G();prSelect=G();prRefresh=G();prsOpen=x(!0);branchesOpen=x(!0);tagsOpen=x(!0);stashesOpen=x(!0);worktreesOpen=x(!0);localBranches=$(()=>this.branches().filter(e=>!e.remote));remoteBranches=$(()=>this.branches().filter(e=>e.remote));selectBranch(e){this.branchChange.emit(this.selectedBranch()===e?"":e)}selectTag(e){this.tagSelect.emit(e)}voteClass(e){switch(e.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(e){let t=e.reviewers.map(i=>`${i.name}${i.isRequired?" (required)":""}`).join(", ");return[`!${e.id} ${e.title}`,`By ${e.author.name}${e.isDraft?" \xB7 draft":""}`,`${e.sourceBranch} \u2192 ${e.targetBranch}`,t?`Reviewers: ${t}`:""].filter(Boolean).join(`
65
- `)}badgeOf(e){return{type:e.current?"head":e.remote?"remote":"local",name:e.name}}onContextMenu(e,t){e.preventDefault(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:t})}worktreeLabel(e){let t=e.path.split(/[\\/]/).filter(Boolean).pop()??e.path;return e.bare?`${t} (bare)`:e.detached?`${t} (detached)`:t}stashLabel(e){return`stash@{${e.index}}`}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-side-panel"]],inputs:{branches:[1,"branches"],selectedBranch:[1,"selectedBranch"],showRemote:[1,"showRemote"],stashes:[1,"stashes"],worktrees:[1,"worktrees"],tags:[1,"tags"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",prSelect:"prSelect",prRefresh:"prRefresh"},decls:48,vars:18,consts:[["aria-label","Repository panel",1,"side-panel"],[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"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["role","status",1,"panel-loading"],["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"],["type","button",1,"row",3,"selected","title"],["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"],[1,"empty"],["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,"title"],["type","button",1,"row",3,"contextmenu","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["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(t,i){t&1&&(y(0,"aside",0)(1,"section",1)(2,"button",2),V("click",function(){return i.branchesOpen.set(!i.branchesOpen())}),F(),y(3,"svg",3),T(4,gN,1,0,":svg:polyline",4)(5,_N,1,0,":svg:polyline",5),C(),he(),y(6,"span",6),p(7,"Branches"),C(),y(8,"span",7),p(9),C()(),T(10,xN,16,3,"div",8),C(),y(11,"section",1)(12,"button",2),V("click",function(){return i.tagsOpen.set(!i.tagsOpen())}),F(),y(13,"svg",3),T(14,wN,1,0,":svg:polyline",4)(15,EN,1,0,":svg:polyline",5),C(),he(),y(16,"span",6),p(17,"Tags"),C(),y(18,"span",7),p(19),C()(),T(20,TN,4,1,"div",8),C(),y(21,"section",1)(22,"button",2),V("click",function(){return i.stashesOpen.set(!i.stashesOpen())}),F(),y(23,"svg",3),T(24,MN,1,0,":svg:polyline",4)(25,IN,1,0,":svg:polyline",5),C(),he(),y(26,"span",6),p(27,"Stashes"),C(),y(28,"span",7),p(29),C()(),T(30,ON,4,1,"div",8),C(),y(31,"section",1)(32,"div",9)(33,"button",2),V("click",function(){return i.worktreesOpen.set(!i.worktreesOpen())}),F(),y(34,"svg",3),T(35,RN,1,0,":svg:polyline",4)(36,NN,1,0,":svg:polyline",5),C(),he(),y(37,"span",6),p(38,"Worktrees"),C(),y(39,"span",7),p(40),C()(),y(41,"button",10),V("click",function(){return i.worktreeCreate.emit()}),F(),y(42,"svg",11),ae(43,"line",12)(44,"line",13),C()()(),T(45,VN,4,1,"div",8),C(),T(46,eA,15,5,"section",1),T(47,tA,2,0,"div",14),C()),t&2&&(d(2),ce("aria-expanded",i.branchesOpen()),d(2),M(i.branchesOpen()?4:5),d(5),O(i.branches().length),d(),M(i.branchesOpen()?10:-1),d(2),ce("aria-expanded",i.tagsOpen()),d(2),M(i.tagsOpen()?14:15),d(5),O(i.tags().length),d(),M(i.tagsOpen()?20:-1),d(2),ce("aria-expanded",i.stashesOpen()),d(2),M(i.stashesOpen()?24:25),d(5),O(i.stashes().length),d(),M(i.stashesOpen()?30:-1),d(3),ce("aria-expanded",i.worktreesOpen()),d(2),M(i.worktreesOpen()?35:36),d(5),O(i.worktrees().length),d(5),M(i.worktreesOpen()?45:-1),d(),M(i.azureEnabled()?46:-1),d(),M(i.loading()?47:-1))},styles:["[_nghost-%COMP%]{--panel-width: 260px;display:block;position:relative;width:var(--panel-width);flex:none;min-height:0;overflow:hidden;background:var(--bg-alt)}.side-panel[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 auto;width:var(--panel-width);overflow-y:auto;border-right: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}}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.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-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})};var nA=(n,e)=>e.path;function iA(n,e){if(n&1&&(f(0,"div",4),z(1,"span",17),p(2),h()),n&2){let t=u();d(2),O(t.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function rA(n,e){if(n&1){let t=R();f(0,"app-error-banner",18),D("retry",function(){_(t);let r=u();return v(r.retry.emit())}),h()}if(n&2){let t=u();I("message",t.statusError())("busy",t.statusLoading())}}function oA(n,e){if(n&1){let t=R();f(0,"button",23),D("click",function(){_(t);let r=u(2);return v(r.discardSelected())}),p(1,"Discard selected"),h(),f(2,"button",23),D("click",function(){_(t);let r=u(2);return v(r.discardAll())}),p(3,"Discard all"),h()}if(n&2){let t=u().$implicit,i=u();I("disabled",i.disabled()||!i.selected()[t].size),d(2),I("disabled",i.disabled()||!i.files(t).length)}}function sA(n,e){n&1&&(F(),z(0,"polyline",28))}function aA(n,e){n&1&&(F(),z(0,"polyline",29))}function lA(n,e){if(n&1){let t=R();f(0,"button",26),D("click",function(){_(t);let r=u().$implicit,o=u(2);return v(o.toggleDir(r.path))}),F(),f(1,"svg",27),T(2,sA,1,0,":svg:polyline",28)(3,aA,1,0,":svg:polyline",29),h(),he(),f(4,"span",30),p(5),h(),f(6,"span",31)(7,"span",32),p(8),h(),f(9,"span",33),p(10),h()()()}if(n&2){let t=u().$implicit;ue("padding-left",t.depth*14+8,"px"),I("title",t.path),ce("aria-expanded",!t.collapsed)("aria-label","Directory "+t.path),d(2),M(t.collapsed?2:3),d(3),O(t.name),d(3),q("+",t.additions),d(2),q("\u2212",t.deletions)}}function cA(n,e){if(n&1){let t=R();f(0,"div",34),D("click",function(r){_(t);let o=u().$implicit,s=u().$implicit,a=u();return v(a.select(s,o.file.path,r))})("dblclick",function(){_(t);let r=u().$implicit,o=u().$implicit,s=u();return v(s.openDiff(o,r.file))})("contextmenu",function(r){_(t);let o=u().$implicit,s=u().$implicit,a=u();return v(a.openContextMenu(r,s,o.file))})("keydown",function(r){_(t);let o=u().$implicit,s=u().$implicit,a=u();return v(a.keySelect(s,o.file.path,r))}),f(1,"span",35),p(2),h(),f(3,"span",36),p(4),h(),f(5,"span",31)(6,"span",32),p(7),h(),f(8,"span",33),p(9),h()()()}if(n&2){let t=u().$implicit,i=u().$implicit,r=u();ue("padding-left",t.depth*14+4,"px"),ge("selected",r.selected()[i].has(t.file.path)),ce("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(t.file.path))("aria-label",t.file.path),d(),I("title",t.file.status),d(),O(t.file.status.slice(0,1).toUpperCase()),d(),I("title",t.file.oldPath&&t.file.oldPath!==t.file.path?t.file.oldPath+" \u2192 "+t.file.path:t.file.path),d(),O(t.name),d(3),q("+",t.file.additions),d(2),q("\u2212",t.file.deletions)}}function dA(n,e){if(n&1&&T(0,lA,11,9,"button",24)(1,cA,10,13,"div",25),n&2){let t=e.$implicit;M(t.kind==="dir"?0:1)}}function uA(n,e){if(n&1&&(f(0,"p",22),p(1),h()),n&2){let t=u().$implicit;d(),O(t==="staged"?"No staged changes.":"No unstaged changes.")}}function pA(n,e){if(n&1){let t=R();f(0,"section")(1,"h3"),p(2),h(),f(3,"div",19)(4,"span",20),p(5),h(),f(6,"button",3),D("click",function(){let r=_(t).$implicit,o=u();return v(o.moveSelected(r))}),p(7),h(),f(8,"button",3),D("click",function(){let r=_(t).$implicit,o=u();return v(o.moveAll(r))}),p(9),h(),T(10,oA,4,2),h(),f(11,"div",21),K(12,dA,2,1,null,null,nA,!1,uA,2,1,"p",22),h()()}if(n&2){let t=e.$implicit,i=u();ce("aria-label",t==="staged"?"Staged changes":"Unstaged changes"),d(2),lo("",t==="staged"?"Staged changes":"Unstaged changes"," (",i.files(t).length,")"),d(3),q("",i.selected()[t].size," selected"),d(),I("disabled",i.disabled()||!i.selected()[t].size),d(),O(t==="staged"?"Unstage selected":"Stage selected"),d(),I("disabled",i.disabled()||!i.files(t).length),d(),O(t==="staged"?"Unstage all":"Stage all"),d(),M(t==="unstaged"?10:-1),d(),ce("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",t+" files"),d(),X(i.rows(t))}}function fA(n,e){n&1&&(f(0,"p",8),p(1,"Resolve conflicts before committing."),h())}function hA(n,e){if(n&1){let t=R();f(0,"app-diff-dialog",37),D("closed",function(){_(t);let r=u();return v(r.dialog.set(null))}),h()}if(n&2){let t=e;I("file",t.file)("originalRef",t.group==="staged"?"HEAD":"INDEX")("modifiedRef",t.group==="staged"?"INDEX":"WORKING")}}var vd=class n{vscode=k(en);changes=N(null);busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=G();descriptionChange=G();stageChange=G();stashChange=G();discardRequest=G();commitRequested=G();retry=G();closed=G();groups=["staged","unstaged"];selected=x({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=x(null);contextMenu=x(null);contextMenuTarget=null;collapsed=x(new Set);disabled=$(()=>this.busy()||!!this.statusError()||!this.changes());canCommit=$(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){ye(()=>{let e=this.changes();this.selected.update(t=>{let i=U({},t);for(let r of this.groups){let o=new Set((r==="staged"?e?.stagedFiles:e?.unstagedFiles)?.map(s=>s.path));i[r]=new Set([...t[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(e){return(e==="staged"?this.changes()?.stagedFiles:this.changes()?.unstagedFiles)??[]}rows(e){let t=this.files(e);return this.fileListView()!=="tree"?t.map(i=>({kind:"file",path:i.path,name:i.path,depth:0,file:i})):_o(t,this.collapsed())}orderedPaths(e){return this.rows(e).filter(t=>t.kind==="file").map(t=>t.path)}toggleDir(e){this.collapsed.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}openDiff(e,t){if(this.busy())return;let i=e==="staged"?"HEAD":"INDEX",r=e==="staged"?"INDEX":"WORKING";this.vscode.openDiff(t,i,r)||this.dialog.set({file:t,group:e})}openContextMenu(e,t,i){e.preventDefault(),this.contextMenuTarget={file:i,group:t},this.contextMenu.set({x:e.clientX,y:e.clientY,items:[{label:"Open Diff",action:"open-diff",disabled:this.busy()},{label:"Open File",action:"open-file",disabled:!this.vscode.canOpenFile()},{label:"Copy File Path",action:"copy-file-path"}]})}runContextAction(e){let t=this.contextMenuTarget;t&&(e==="open-diff"?this.openDiff(t.group,t.file):e==="open-file"?this.vscode.openFile(t.file.path):e==="copy-file-path"&&navigator.clipboard?.writeText(t.file.path))}closeContextMenu(){this.contextMenu.set(null),this.contextMenuTarget=null}select(e,t,i){let r=i.ctrlKey||i.metaKey,o=this.orderedPaths(e),s=this.anchors[e],a=i.shiftKey&&s!==null&&o.includes(s),l=r?new Set(this.selected()[e]):new Set;if(a){let c=o.indexOf(s),m=o.indexOf(t);for(let b of o.slice(Math.min(c,m),Math.max(c,m)+1))l.add(b)}else r&&l.has(t)?l.delete(t):l.add(t),this.anchors[e]=t;this.selected.update(c=>se(U({},c),{[e]:l}))}keySelect(e,t,i){if((i.key===" "||i.key==="Enter")&&(i.preventDefault(),this.select(e,t,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(e,this.orderedPaths(e)[s],i)}}move(e,t){this.disabled()||!t.length||this.stageChange.emit({staged:e==="staged",files:t})}moveSelected(e){this.move(e,[...this.selected()[e]])}moveAll(e){this.move(e,this.files(e).map(t=>t.path))}stash(e){this.disabled()||this.stashChange.emit(e)}discard(e){this.disabled()||!e.length||this.discardRequest.emit(e)}discardSelected(){this.discard([...this.selected().unstaged])}discardAll(){this.discard(this.files("unstaged").map(e=>e.path))}updateSubject(e){this.subjectChange.emit(e.target.value)}updateDescription(e){this.descriptionChange.emit(e.target.value)}commit(e){e.preventDefault(),this.canCommit()&&this.commitRequested.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-working-panel"]],inputs:{changes:[1,"changes"],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",retry:"retry",closed:"closed"},decls:32,vars:13,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"],[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"],[3,"select","closed","menu"],[1,"spinner"],["retryLabel","Retry status",3,"retry","message","busy"],[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"],[1,"file-path",3,"title"],[3,"closed","file","originalRef","modifiedRef"]],template:function(t,i){if(t&1&&(f(0,"aside",0)(1,"header")(2,"h2"),p(3,"Uncommitted changes"),h(),f(4,"button",1),D("click",function(){return i.closed.emit()}),p(5,"\xD7"),h()(),f(6,"div",2)(7,"button",3),D("click",function(){return i.stash("all")}),p(8,"Stash all"),h(),f(9,"button",3),D("click",function(){return i.stash("staged")}),p(10,"Stash staged"),h(),f(11,"button",3),D("click",function(){return i.stash("unstaged")}),p(12,"Stash unstaged"),h()(),T(13,iA,3,1,"div",4),T(14,rA,1,2,"app-error-banner",5),f(15,"div",6),K(16,pA,15,12,"section",null,gn),h(),f(18,"form",7),D("submit",function(o){return i.commit(o)}),T(19,fA,2,0,"p",8),f(20,"label",9),p(21,"Commit message"),h(),f(22,"input",10),D("input",function(o){return i.updateSubject(o)}),h(),f(23,"label",11),p(24,"Description "),f(25,"span",12),p(26,"(optional)"),h()(),f(27,"textarea",13),D("input",function(o){return i.updateDescription(o)}),h(),f(28,"button",14),p(29,"Commit staged changes"),h()()(),T(30,hA,1,3,"app-diff-dialog",15),f(31,"app-context-menu",16),D("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),h()),t&2){let r,o;d(7),I("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),d(2),I("disabled",i.disabled()||!i.files("staged").length),d(2),I("disabled",i.disabled()||!i.files("unstaged").length),d(2),M(i.busy()?13:-1),d(),M(i.statusError()?14:-1),d(2),X(i.groups),d(3),M(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?19:-1),d(3),I("value",i.subject())("disabled",i.busy()),d(5),I("value",i.description())("disabled",i.busy()),d(),I("disabled",!i.canCommit()),d(2),M((o=i.dialog())?30:-1,o),d(),I("menu",i.contextMenu())}},dependencies:[Rt,Co,bo],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}.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 mA=(n,e)=>e.name;function gA(n,e){if(n&1&&(y(0,"option",10),p(1),C()),n&2){let t=e.$implicit;Y("value",t.name),d(),O(t.name)}}function _A(n,e){n&1&&(y(0,"p",11),p(1,"Every local branch is already checked out in a worktree."),C())}function vA(n,e){if(n&1&&(y(0,"p",12),p(1),C()),n&2){let t=u();d(),O(t.error())}}var bd=class n{vscode=k(en);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=G();closed=G();path=x("");branch=x("");canBrowse=this.vscode.canPickFolder;availableBranches=$(()=>{let e=new Set(this.worktrees().map(t=>t.branch).filter(Boolean));return this.branches().filter(t=>!t.remote&&!e.has(t.name))});constructor(){ye(()=>{let e=this.availableBranches();e.some(t=>t.name===this.branch())||this.branch.set(e[0]?.name??"")})}onEscape(){this.busy()||this.closed.emit()}onPath(e){this.path.set(e.target.value)}onBranch(e){this.branch.set(e.target.value)}browse(){return En(this,null,function*(){let e=yield this.vscode.pickFolder();e&&this.path.set(e)})}submit(){let e=this.path().trim(),t=this.branch();e&&t&&!this.busy()&&this.created.emit({path:e,branch:t})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(t,i){t&1&&D("keydown.escape",function(){return i.onEscape()},Ze)},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(t,i){t&1&&(y(0,"div",0),V("click",function(){return i.closed.emit()}),C(),y(1,"form",1),V("submit",function(o){return o.preventDefault(),i.submit()}),y(2,"h3",2),p(3,"Create Worktree"),C(),y(4,"p",3),p(5,"Create a linked working folder from an available local branch."),C(),y(6,"label",4),p(7,"Folder"),C(),y(8,"div",5)(9,"input",6),V("input",function(o){return i.onPath(o)}),C(),y(10,"button",7),V("click",function(){return i.browse()}),p(11,"Browse..."),C()(),y(12,"label",8),p(13,"Branch"),C(),y(14,"select",9),V("change",function(o){return i.onBranch(o)}),K(15,gA,2,2,"option",10,mA),C(),T(17,_A,2,0,"p",11),T(18,vA,2,1,"p",12),y(19,"div",13)(20,"button",14),V("click",function(){return i.closed.emit()}),p(21,"Cancel"),C(),y(22,"button",15),p(23),C()()()),t&2&&(d(9),Y("value",i.path())("disabled",i.busy()),d(),Y("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),d(4),Y("value",i.branch())("disabled",i.busy()),d(),X(i.availableBranches()),d(2),M(i.availableBranches().length===0?17:-1),d(),M(i.error()?18:-1),d(2),Y("disabled",i.busy()),d(2),Y("disabled",i.busy()||!i.path().trim()||!i.branch()),d(),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 bA=["searchInput"];function yA(n,e){if(n&1){let t=R();y(0,"button",10),V("click",function(){_(t);let r=u(2);return v(r.searchNavigate.emit("prev"))}),F(),y(1,"svg",2),ae(2,"polyline",11),C()(),he(),y(3,"button",12),V("click",function(){_(t);let r=u(2);return v(r.searchNavigate.emit("next"))}),F(),y(4,"svg",2),ae(5,"polyline",13),C()()}if(n&2){let t=u(2);Y("disabled",t.matchCount()===0),d(3),Y("disabled",t.matchCount()===0)}}function CA(n,e){if(n&1){let t=R();T(0,yA,6,2),y(1,"button",6),V("click",function(){_(t);let r=u();return v(r.clearSearch())}),F(),y(2,"svg",2),ae(3,"line",7)(4,"line",8),C()(),he(),y(5,"span",9),p(6),C()}if(n&2){let t=u();M(t.filterMode()?-1:0),d(6),O(t.badgeText())}}var xA=300,yd=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=G();searchNavigate=G();searchValue=x("");badgeText=$(()=>{let e=this.matchCount(),t=e>99?"99+":String(e);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${t}`:t});searchInput=Xt("searchInput");constructor(){pr(this.searchValue).pipe(du(xA),zo(),gt()).subscribe(e=>this.searchChange.emit(e))}onSearch(e){this.searchValue.set(e.target.value)}onSearchKeydown(e){e.key==="Enter"&&!this.filterMode()&&(e.preventDefault(),this.searchNavigate.emit(e.shiftKey?"prev":"next"))}clearSearch(){this.searchValue.set(""),this.searchInput()?.nativeElement.focus()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-search-box"]],viewQuery:function(t,i){t&1&&Vt(i.searchInput,bA,5),t&2&&_n()},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(t,i){if(t&1){let r=R();y(0,"div",1),F(),y(1,"svg",2),ae(2,"circle",3)(3,"line",4),C(),he(),y(4,"input",5,0),V("input",function(s){return _(r),v(i.onSearch(s))})("keydown",function(s){return _(r),v(i.onSearchKeydown(s))}),C(),T(6,CA,7,2),C()}t&2&&(d(4),Y("value",i.searchValue()),d(2),M(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 wA(n,e){if(n&1){let t=R();f(0,"div",13)(1,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h()()}}function EA(n,e){if(n&1){let t=R();f(0,"div",13)(1,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("pull"))}),p(2,"Pull"),h(),f(3,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(4,"Pull (rebase)"),h(),f(5,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(6,"Rebase (from)..."),h()()}}function DA(n,e){if(n&1){let t=R();f(0,"button",34),D("click",function(){_(t);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function SA(n,e){if(n&1){let t=R();f(0,"div",13)(1,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("push"))}),p(2,"Push"),h(),f(3,"button",35),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(4," Push (force) "),h(),f(5,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("sync"))}),p(6,"Sync"),h(),T(7,DA,2,0,"button",36),h()}if(n&2){let t=u();d(7),M(t.prEnabled()?7:-1)}}function TA(n,e){if(n&1){let t=R();f(0,"button",34),D("click",function(){_(t);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function MA(n,e){if(n&1){let t=R();f(0,"div",33)(1,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h(),z(5,"div",37),f(6,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("pull"))}),p(7,"Pull"),h(),f(8,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(9," Pull (rebase) "),h(),f(10,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(11," Rebase (from)... "),h(),z(12,"div",37),f(13,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("push"))}),p(14,"Push"),h(),f(15,"button",35),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(16," Push (force) "),h(),f(17,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRemoteAction("sync"))}),p(18,"Sync"),h(),T(19,TA,2,0,"button",36),z(20,"div",37),f(21,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseRefresh())}),p(22,"Refresh"),h(),z(23,"div",37),f(24,"button",34),D("click",function(){_(t);let r=u();return v(r.chooseSettings())}),p(25,"Settings..."),h()()}if(n&2){let t=u();d(19),M(t.prEnabled()?19:-1)}}var Cd=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=G();refresh=G();remoteAction=G();settingsClick=G();searchChange=G();searchNavigate=G();openMenu=x(null);toggleMenu(e,t){t.stopPropagation(),this.openMenu.update(i=>i===e?null:e)}chooseRemoteAction(e){this.openMenu.set(null),this.remoteAction.emit(e)}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(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-toolbar"]],hostBindings:function(t,i){t&1&&D("click",function(){return i.closeMenu()},Ze)("keydown.escape",function(){return i.closeMenuOnEscape()},Ze)},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(t,i){t&1&&(f(0,"div",0)(1,"div",1)(2,"button",2),D("click",function(){return i.menuToggle.emit()}),F(),f(3,"svg",3),z(4,"line",4)(5,"line",5)(6,"line",6),h()(),he(),f(7,"span",7),p(8,"Guito"),h()(),f(9,"div",8)(10,"app-search-box",9),D("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),h(),f(11,"div",10)(12,"button",11),D("click",function(o){return i.toggleMenu("fetch",o)}),F(),f(13,"svg",3),z(14,"path",12),h()(),T(15,wA,5,0,"div",13),h(),he(),f(16,"div",10)(17,"button",14),D("click",function(o){return i.toggleMenu("pull",o)}),F(),f(18,"svg",3),z(19,"circle",15)(20,"polyline",16)(21,"line",17),h()(),T(22,EA,7,0,"div",13),h(),he(),f(23,"div",10)(24,"button",18),D("click",function(o){return i.toggleMenu("push",o)}),F(),f(25,"svg",3),z(26,"circle",15)(27,"polyline",19)(28,"line",20),h()(),T(29,SA,8,1,"div",13),h(),he(),f(30,"button",21),D("click",function(){return i.refresh.emit()}),F(),f(31,"svg",3),z(32,"polyline",22)(33,"polyline",23)(34,"path",24),h()(),he(),f(35,"button",25),D("click",function(){return i.settingsClick.emit()}),F(),f(36,"svg",3),z(37,"circle",26)(38,"path",27),h()(),he(),f(39,"div",28)(40,"button",29),D("click",function(o){return i.toggleMenu("overflow",o)}),F(),f(41,"svg",3),z(42,"circle",30)(43,"circle",31)(44,"circle",32),h()(),T(45,MA,26,1,"div",33),h()()()),t&2&&(d(2),ce("aria-expanded",i.panelOpen()),d(8),I("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),d(2),I("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="fetch"),d(3),M(i.openMenu()==="fetch"?15:-1),d(2),I("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="pull"),d(5),M(i.openMenu()==="pull"?22:-1),d(2),I("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="push"),d(5),M(i.openMenu()==="push"?29:-1),d(11),ce("aria-expanded",i.openMenu()==="overflow"),d(5),M(i.openMenu()==="overflow"?45:-1))},dependencies:[yd],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})};function IA(n,e){if(n&1){let t=R();f(0,"app-error-banner",14),D("retry",function(){_(t);let r=u();return v(r.refresh())}),h()}if(n&2){let t=u();I("message",t.error())("busy",t.loading())}}function kA(n,e){if(n&1){let t=R();f(0,"app-error-banner",15),D("retry",function(){_(t);let r=u();return v(r.refreshWorking())}),h()}if(n&2){let t=u();I("message",t.statusError())("busy",t.statusLoading())}}function PA(n,e){if(n&1){let t=R();f(0,"app-side-panel",16),di("panel-leave"),ci("panel-enter"),D("branchChange",function(r){_(t);let o=u();return v(o.selectedBranch.set(r))})("tagSelect",function(r){_(t);let o=u();return v(o.selectTag(r))})("contextMenu",function(r){_(t);let o=u();return v(o.onContextMenu(r))})("worktreeCreate",function(){_(t);let r=u();return v(r.openWorktreeDialog())})("prSelect",function(r){_(t);let o=u();return v(o.openPrDetail(r))})("prRefresh",function(){_(t);let r=u();return v(r.loadPullRequests())}),h()}if(n&2){let t,i=u();I("branches",i.branches())("selectedBranch",i.selectedBranch())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("selectedCommitHash",((t=i.selectedCommit())==null?null:t.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function OA(n,e){if(n&1){let t=R();f(0,"app-working-panel",19),di("panel-leave"),ci("panel-enter"),D("subjectChange",function(r){_(t);let o=u(2);return v(o.commitSubject.set(r))})("descriptionChange",function(r){_(t);let o=u(2);return v(o.commitDescription.set(r))})("stageChange",function(r){_(t);let o=u(2);return v(o.changeStage(r))})("stashChange",function(r){_(t);let o=u(2);return v(o.stashChanges(r))})("discardRequest",function(r){_(t);let o=u(2);return v(o.discardUnstaged(r))})("commitRequested",function(){_(t);let r=u(2);return v(r.commitChanges())})("retry",function(){_(t);let r=u(2);return v(r.refreshWorking())})("closed",function(){_(t);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let t=u(2);I("changes",t.workingChanges())("busy",t.busy()||t.mutationBusy()||t.statusLoading())("statusLoading",t.statusLoading())("statusError",t.statusError())("subject",t.commitSubject())("description",t.commitDescription())("fileListView",t.fileListView())}}function RA(n,e){if(n&1){let t=R();f(0,"app-commit-detail",20),di("panel-leave"),ci("panel-enter"),D("closed",function(){_(t);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let t=u(),i=u();I("commit",t)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function NA(n,e){if(n&1&&T(0,OA,1,7,"app-working-panel",17)(1,RA,1,3,"app-commit-detail",18),n&2){let t=u();M(e.hash===t.workingHash?0:1)}}function AA(n,e){if(n&1){let t=R();f(0,"app-worktree-dialog",21),D("created",function(r){_(t);let o=u();return v(o.createWorktree(r))})("closed",function(){_(t);let r=u();return v(r.worktreeDialogOpen.set(!1))}),h()}if(n&2){let t=u();I("branches",t.branches())("worktrees",t.worktrees())("busy",t.mutationBusy())("error",t.worktreeDialogError())}}function LA(n,e){if(n&1){let t=R();f(0,"app-create-pr-dialog",22),D("closed",function(){_(t);let r=u();return v(r.prDialogOpen.set(!1))})("created",function(){_(t);let r=u();return v(r.onPrCreated())}),h()}if(n&2){let t=u();I("branches",t.branches())}}function FA(n,e){if(n&1){let t=R();f(0,"app-pr-dialog",23),D("changed",function(){_(t);let r=u();return v(r.loadPullRequests())})("closed",function(){_(t);let r=u();return v(r.closePrDetail())}),h()}if(n&2){let t=u();I("prId",e)("settings",t.azureSettings())}}function VA(n,e){if(n&1){let t=R();f(0,"app-settings-dialog",24),D("saved",function(r){_(t);let o=u();return v(o.saveSettings(r))})("settingsUpdated",function(r){_(t);let o=u();return o.azureSettings.set(r),v(o.showRemote.set(r.showRemoteBranches!==!1))})("identityChanged",function(r){_(t);let o=u();return v(o.identity.set(r))})("repositoryChanged",function(){_(t);let r=u();return v(r.refresh())})("closed",function(){_(t);let r=u();return v(r.settingsDialogOpen.set(!1))}),h()}if(n&2){let t=u();I("settings",e)("identity",t.identity())("saving",t.settingsSaving())}}var la=500,EC="guito.commitDraft";function BA(){let n=ed(EC,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var xd=class n{git=k(mt);vscode=k(en);workingHash=bn;mutationBusy=this.git.mutating;statusLoading=x(!1);statusError=x("");commitDraft=BA();commitSubject=x(this.commitDraft.subject);commitDescription=x(this.commitDraft.description);displayedCommits=x([]);searchLoading=x(!1);historyGeneration=x(0);filterFailed=x(!1);tableLoading=$(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=x([]);branches=x([]);selectedBranch=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=$(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=$(()=>this.azureSettings()?.autoReload!==!1);showGraph=$(()=>this.azureSettings()?.showGraph!==!1);showStashes=$(()=>this.azureSettings()?.showStashes===!0);showTags=$(()=>this.azureSettings()?.showTags!==!1);issueLinking=$(()=>this.azureSettings()?.issueLinking??null);fileListView=$(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");filterSearch=$(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=$(()=>this.azureSettings()?.searchCaseSensitive===!0);prDialogOpen=x(!1);settingsDialogOpen=x(!1);settingsSaving=x(!1);pendingDiscard=x(null);panelOpen=x(!1);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=$(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=$(()=>{let e=new Map;for(let t of this.commits())e.set(t.hash,t);return e});filteredCommits=$(()=>{let e=this.commits(),t=this.selectedBranch(),i=this.branches().filter(o=>this.showRemote()||!o.remote),r=t?i.filter(o=>o.name===t):i;if(r.length>0){let o=new Set;for(let s of r)for(let a of this.ancestorsOf(s.commit))o.add(a);e=e.filter(s=>o.has(s.hash))}else e=[];return e});searchMatches=$(()=>{let e=this.search().trim(),t=this.searchCaseSensitive(),i=t?e:e.toLowerCase();if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>(t?l.message:l.message.toLowerCase()).includes(i)||(t?l.author_name:l.author_name.toLowerCase()).includes(i)||(t?l.hash:l.hash.toLowerCase()).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=$(()=>{let e=this.searchFocusHash();return e?this.searchMatches().indexOf(e):-1});constructor(){this.refresh(),ye(()=>{let e=this.search().trim();this.selectedBranch(),this.historyGeneration(),this.filterSearch();let t=this.searchCaseSensitive();tt(()=>{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.selectedBranch()||e&&this.filterSearch())&&this.unloadedCommits()>0&&this.loadAllCommits(),e&&this.fetchBodyMatches(e,t))})}),ye(()=>{if(!this.loading()&&!this.searchLoading()&&!this.historyLoading()&&!this.filterFailed()){let e=new Set(this.searchMatches());this.displayedCommits.set(this.filterSearch()&&this.search().trim()?this.filteredCommits().filter(t=>e.has(t.hash)):this.filteredCommits())}}),ye(()=>{let e=this.pendingSearchHash();if(!e||this.filterFailed())return;let t=this.displayedCommits().find(i=>i.hash===e);if(t)tt(()=>{this.selectedCommit.set(t),this.scrollRequestCounter+=1,this.scrollRequest.set({hash:e,id:this.scrollRequestCounter}),this.pendingSearchHash.set("")});else if(this.unloadedCommits()>0&&!this.historyLoading()&&!this.loading()){let i=this.searchHistoryIndices()[e],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)/la)*la;tt(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),ye(()=>{td(EC,{subject:this.commitSubject(),description:this.commitDescription()})}),ye(()=>{this.vscode.settingsVersion()!==0&&tt(()=>{this.git.getSettings().subscribe({next:e=>{this.azureSettings.set(e),this.showRemote.set(e.showRemoteBranches!==!1)},error:e=>this.error.set(this.errorMessage(e))})})})}ngOnDestroy(){window.clearInterval(this.refreshTimer),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:e=>{if(this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy())return;let t=this.lastRepositoryState;this.lastRepositoryState=e,!t||t.history!==e.history?this.refresh(!0):t.working!==e.working&&this.refreshWorking()},error:()=>{}}))}toggleSidePanel(){this.panelOpen.update(e=>!e),this.panelOpen()&&this.loadSidePanelData()}loadSidePanelData(){this.panelSub?.unsubscribe(),this.panelLoading.set(!0),this.panelSub=nl({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(ot(()=>we([])))}).subscribe({next:({stashes:e,worktrees:t,tags:i})=>{this.stashes.set(e),this.worktrees.set(t),this.tags.set(i),this.panelLoading.set(!1)},error:e=>{this.panelLoading.set(!1),this.error.set(this.errorMessage(e))}}),this.loadPullRequests()}loadPullRequests(){if(!this.hasAzureUrl()){this.pullRequests.set(null),this.pullRequestsError.set("");return}this.prListSub?.unsubscribe(),this.prListSub=this.git.getMyPullRequests().subscribe({next:e=>{this.pullRequests.set(e),this.pullRequestsError.set("")},error:e=>{this.pullRequests()===null&&this.pullRequests.set([]),this.pullRequestsError.set(this.errorMessage(e))}})}openPrDetail(e){this.prDetailId.set(e)}closePrDetail(){this.prDetailId.set(null),this.loadPullRequests()}refresh(e=!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=nl({history:this.git.getCommits(e?Math.max(la,this.commits().length):la),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(t=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(t)),we(null))))}).subscribe({next:({history:t,repositoryState:i,branches:r,repo:o,settings:s,stashes:a,working:l})=>{this.commits.set(t.commits),this.totalCommits.set(Math.max(t.total,t.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),this.selectedBranch()&&!r.some(m=>m.name===this.selectedBranch())&&this.selectedBranch.set("");let c=this.selectedCommit();if(c&&c.hash!==bn){let m=t.commits.find(b=>b.hash===c.hash);m&&this.selectedCommit.set(U(U({},c),m))}s&&(this.azureSettings.set(s),this.showRemote.set(s.showRemoteBranches!==!1)),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(m=>m+1),this.panelOpen()&&this.loadSidePanelData()},error:t=>{this.lastRepositoryState=null,this.error.set(this.errorMessage(t)),this.filterFailed.set(!0),this.statusError.set(this.errorMessage(t)),this.statusLoading.set(!1),this.loading.set(!1)}})}refreshWorking(){this.workingSub?.unsubscribe(),this.statusLoading.set(!0),this.workingSub=this.git.getWorkingChanges().subscribe({next:e=>{this.workingChanges.set(e),this.statusError.set(""),this.statusLoading.set(!1)},error:e=>{this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),this.statusLoading.set(!1)}})}changeStage(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||(this.busy.set(!0),this.error.set(""),(e.staged?this.git.unstage(e.files):this.git.stage(e.files)).subscribe({next:()=>{this.refreshWorking(),this.busy.set(!1)},error:t=>{this.error.set(this.errorMessage(t)),this.refreshWorking(),this.busy.set(!1)}}))}stashChanges(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||this.git.stashSave(void 0,e).subscribe({next:()=>this.refresh(),error:t=>this.error.set(this.errorMessage(t))})}discardUnstaged(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||e.length&&(this.pendingDiscard.set(e),this.promptState.set({title:"Discard unstaged changes?",label:e.length===1?`${e[0]} will be discarded. This cannot be undone.`:`${e.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:e=>{this.error.set(this.errorMessage(e)),this.refreshWorking(),this.busy.set(!1)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(la,this.commits().length))}loadAllCommits(){this.loadHistory(this.git.getCommits(void 0,this.commits().length))}loadHistory(e){if(this.historyLoading()||this.loading())return;let t=this.commits().length;this.filterFailed.set(!1),this.historyLoading.set(!0),this.historySub?.unsubscribe(),this.historySub=e.subscribe({next:({commits:i,total:r})=>{this.commits().length===t&&(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(e,t){this.searchSub?.unsubscribe(),this.searchLoading.set(!0),this.searchSub=this.git.searchCommits(e,t).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(e){let t=this.searchMatches();if(t.length===0)return;let i=this.searchIndex(),r=i<0?e==="next"?0:t.length-1:e==="next"?(i+1)%t.length:(i-1+t.length)%t.length,o=t[r];this.searchFocusHash.set(o),this.pendingSearchHash.set(o)}runRemoteAction(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;if(e==="rebase-from"){this.openRebaseFromDialog();return}if(e==="create-pr"){this.prDialogOpen.set(!0);return}if(e==="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(""),(e==="fetch"||e==="fetch-prune"?this.git.fetch(e==="fetch-prune"):e==="pull"?this.git.pull():e==="pull-rebase"?this.git.pull(!0):e==="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 e=new Set(this.branches().map(r=>r.name)),t=["origin/main","origin/master"].filter(r=>e.has(r));t.forEach(r=>e.delete(r));let i=[...t,...e];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(e){this.settingsSaving.set(!0),this.git.saveSettings(e).subscribe({next:t=>{this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),this.settingsSaving.set(!1),this.settingsDialogOpen.set(!1)},error:t=>{this.settingsSaving.set(!1),this.error.set(this.errorMessage(t))}})}onPrCreated(){this.refresh()}onContextMenu(e){if(e.target.kind==="tag"&&!e.target.commit){let i=this.taggedCommit(e.target.branch?.name??"");i&&(e.target=se(U({},e.target),{commit:i}))}let t=[];if(e.target.kind==="commit")t.push({label:"Add Tag...",action:"add-tag"}),t.push({label:"Create Branch...",action:"create-branch"}),t.push({separator:!0}),t.push({label:"Checkout...",action:"checkout-commit"}),t.push({label:"Cherry Pick...",action:"cherry-pick"}),t.push({label:"Revert...",action:"revert-commit",danger:!0}),t.push({label:"Drop...",action:"drop-commit",danger:!0}),t.push({separator:!0}),t.push({label:"Merge into current branch...",action:"merge-commit"}),t.push({label:"Rebase current branch on this Commit...",action:"rebase-commit"}),t.push({label:"Reset current branch to this Commit...",action:"reset-commit",danger:!0}),t.push({separator:!0}),t.push({label:"Copy Commit Hash to Clipboard",action:"copy-hash"}),t.push({label:"Copy Commit Subject to Clipboard",action:"copy-subject"});else if(e.target.kind==="tag")t.push({label:"View Details",action:"tag-details"}),t.push({separator:!0}),t.push({label:"Delete Tag...",action:"tag-delete",danger:!0}),t.push({label:"Push Tag...",action:"tag-push"}),t.push({separator:!0}),t.push({label:"Create Archive",action:"create-archive"}),t.push({label:"Copy Tag Name to Clipboard",action:"copy-tag-name"});else if(e.target.kind==="branch"){let i=e.target.branch.type,r=i==="head"||i==="local";t.push({label:"Checkout Branch...",action:"checkout-branch"}),r&&(t.push({label:"Rename Branch...",action:"rename-branch"}),t.push({label:"Delete Branch...",action:"delete-branch",danger:!0,disabled:i==="head"})),t.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),t.push({label:"Merge into current branch...",action:"merge-branch"}),t.push({label:"Pull into current branch...",action:"pull-branch"}),t.push({separator:!0}),t.push({label:"Create Archive",action:"create-archive"}),t.push({label:"Unselect in Branches Dropdown",action:"unselect-branch"}),t.push({separator:!0}),t.push({label:"Copy Branch Name to Clipboard",action:"copy-branch-name"})}else e.target.kind==="stash"?(t.push({label:"Apply Stash",action:"stash-apply"}),t.push({label:"Pop Stash",action:"stash-pop"}),t.push({separator:!0}),t.push({label:"Drop Stash...",action:"stash-drop",danger:!0}),t.push({separator:!0}),t.push({label:"Copy Stash Name to Clipboard",action:"copy-stash-name"})):e.target.kind==="worktree"?(t.push({label:"Delete Worktree...",action:"delete-worktree",danger:!0,disabled:e.target.worktree?.current||e.target.worktree?.bare}),t.push({separator:!0}),t.push({label:"Copy Worktree Path to Clipboard",action:"copy-worktree-path"})):(t.push({label:"Stash uncommitted changes...",action:"stash-working"}),t.push({label:"Reset uncommitted changes...",action:"reset-working",danger:!0}),t.push({label:"Clean untracked files...",action:"clean-untracked",danger:!0}),t.push({separator:!0}),t.push({label:"Open Source Control View",action:"open-source-control"}));this.contextMenuTarget.set(e.target),this.contextMenuState.set({x:e.x,y:e.y,items:t})}taggedCommit(e){if(!e)return;let t=this.tags().find(i=>i.name===e);return t?this.commitIndex().get(t.hash):void 0}selectTag(e){this.pendingSearchHash.set(e.hash)}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}createWorktree(e){this.busy()||this.mutationBusy()||this.statusLoading()||(this.worktreeDialogError.set(""),this.git.createWorktree(e.path,e.branch).subscribe({next:()=>{this.worktreeDialogOpen.set(!1),this.loadSidePanelData()},error:t=>this.worktreeDialogError.set(this.errorMessage(t))}))}onContextAction(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let t=this.contextMenuTarget()?.commit??this.selectedCommit();switch(e){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":t&&this.git.checkout(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"cherry-pick":t&&this.git.cherryPick(t.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":t&&navigator.clipboard?.writeText(t.hash);break;case"copy-subject":t&&navigator.clipboard?.writeText(t.message);break;case"view-commit-diff":t&&this.selectedCommit.set(t);break;case"revert-commit":t&&this.git.revert(t.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":t&&this.git.merge(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"rebase-commit":t&&this.git.rebase(t.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(gy(`/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.selectedBranch.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"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:bn,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)}onPromptConfirm(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let t=this.promptState();if(!t)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(t.title==="Add Tag"&&i){this.git.createTag(e,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Create Branch"&&i){this.git.createBranch(e,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Drop commit?"&&i){this.git.dropCommit(i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Reset current branch to this commit?"&&i){let r=e==="soft"||e==="mixed"?e:"hard";this.git.resetToCommit(i.hash,r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.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(t.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(t.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(t.title==="Force push?"){this.git.push(!0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.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(t.title==="Stash uncommitted changes"){this.git.stashSave(e||void 0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Reset uncommitted changes?"){this.git.resetWorking().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Clean untracked files?"){this.git.cleanUntracked().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Rename branch"){let r=this.contextMenuTarget()?.branch?.name,o=e.trim();r&&o&&o!==r&&this.git.renameBranch(r,o).subscribe({next:()=>{this.selectedBranch()===r&&this.selectedBranch.set(o),this.refresh()},error:s=>this.error.set(this.errorMessage(s))});return}if(t.title==="Delete branch?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteBranch(r).subscribe({next:()=>{this.selectedBranch()===r&&this.selectedBranch.set(""),this.refresh()},error:o=>this.error.set(this.errorMessage(o))});return}if(t.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(t.title==="Rebase from branch"){let r=e.trim();r&&this.git.rebase(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}}ancestorsOf(e){let t=this.commitIndex(),i=new Set,r=[e];for(;r.length;){let o=r.pop();if(i.has(o))continue;i.add(o);let s=t.get(o);s&&r.push(...s.parents)}return i}errorMessage(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=de({type:n,selectors:[["app-root"]],hostBindings:function(t,i){t&1&&D("focus",function(){return i.checkRepository()},ff)("visibilitychange",function(){return i.checkRepository()},Ze)},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"],[3,"branches","selectedBranch","showRemote","stashes","worktrees","tags","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[1,"content"],[3,"commitClick","contextMenu","loadMoreRequested","loadAllRequested","identity","commits","loadingLabel","selectedHash","search","showGraph","selectedBranch","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,"branchChange","tagSelect","contextMenu","worktreeCreate","prSelect","prRefresh","branches","selectedBranch","showRemote","stashes","worktrees","tags","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","busy","statusLoading","statusError","subject","description","fileListView"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","stageChange","stashChange","discardRequest","commitRequested","retry","closed","changes","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(t,i){if(t&1&&(f(0,"div",0)(1,"app-toolbar",1),D("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(),T(2,IA,1,2,"app-error-banner",2),T(3,kA,1,2,"app-error-banner",3),f(4,"div",4),T(5,PA,1,11,"app-side-panel",5),f(6,"main",6)(7,"app-commit-table",7),D("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(),T(8,NA,2,1),h()(),f(9,"app-context-menu",8),D("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),h(),f(10,"app-prompt-dialog",9),D("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),h(),T(11,AA,1,4,"app-worktree-dialog",10),T(12,LA,1,1,"app-create-pr-dialog",11),T(13,FA,1,2,"app-pr-dialog",12),T(14,VA,1,3,"app-settings-dialog",13),h()),t&2){let r,o,s,a,l;d(),I("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),d(),M(i.error()?2:-1),d(),M(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),d(2),M(i.panelOpen()?5:-1),d(2),I("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())("selectedBranch",i.selectedBranch())("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()),d(),M((s=i.selectedCommit())?8:-1,s),d(),I("menu",i.contextMenuState()),d(),I("state",i.promptState()),d(),M(i.worktreeDialogOpen()?11:-1),d(),M(i.prDialogOpen()?12:-1),d(),M((a=i.prDetailId())?13:-1,a),d(),M((l=i.settingsDialogOpen()&&i.azureSettings())?14:-1,l)}},dependencies:[Rt,Cd,_d,nd,Wc,Co,od,vd,id,rd,md,bd],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})};Sh(xd,_y).catch(n=>console.error(n));