PageSourceSearch

https://docs-nestjs.netlify.app/main-Z4OS4UFT.js

js docs-nestjs.netlify.app collected 2026-10-03 10:39:35 UTC 915,828 bytes, 2,384 lines download raw bytes

vendor: 8,479 bytes, lines 1-3
1var hE=Object.create;var ou=Object.defineProperty;var pE=Object.defineProperties;var gE=Object.getOwnPropertyDescriptor;var mE=Object.getOwnPropertyDescriptors;var yE=Object.getOwnPropertyNames;var Zi$1=Object.getOwnPropertySymbols;var vE=Object.getPrototypeOf;var iu=Object.prototype.hasOwnProperty;var Sh=Object.prototype.propertyIsEnumerable;var bh=(e,t,n)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var m=(e,t)=>{for(var n in t||={})iu.call(t,n)&&bh(e,n,t[n]);if(Zi$1)for(var n of Zi$1(t))Sh.call(t,n)&&bh(e,n,t[n]);return e};var j=(e,t)=>pE(e,mE(t));var DE=(e,t)=>{var n={};for(var r in e)iu.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zi$1)for(var r of Zi$1(e))t.indexOf(r)<0&&Sh.call(e,r)&&(n[r]=e[r]);return n};var fR=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var EE=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let o of yE(t))!iu.call(e,o)&&o!==n&&ou(e,o,{get:()=>t[o],enumerable:!(r=gE(t,o))||r.enumerable});return e};var hR=(e,t,n)=>(n=e!=null?hE(vE(e)):{},EE(t||!e||!e.__esModule?ou(n,`default`,{value:e,enumerable:!0}):n,e));var V=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{a(n.next(c))}catch(u){o(u)}},s=c=>{try{a(n.throw(c))}catch(u){o(u)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,s);a((n=n.apply(e,t)).next())});var Re=null;var Yi$1=!1;var Ln=1;var IE=null;var ve$1=Symbol(`SIGNAL`);function C(e){let t=Re;return Re=e,t}function Qi$1(){return Re}var Un={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 fn$1(e){if(Yi$1)throw new Error(``);if(Re===null)return;Re.consumerOnSignalRead(e);let t=Re.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Re.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Re.producers,n!==void 0&&n.producer===e)){Re.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Ln;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Re&&(!r||o.knownValidAtEpoch===Ln))return;let i=Dr$1(Re),s={producer:e,consumer:Re,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Ln,lastReadVersion:e.version,nextConsumer:void 0};Re.producersTail=s,t!==void 0?t.nextProducer=s:Re.producers=s,i&&Nh(e,s)}function Th(){Ln++}function hn$1(e){if(!(Dr$1(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Ln)){if(!e.producerMustRecompute(e)&&!Ki$1(e)){yr$1(e);return}e.producerRecomputeValue(e),yr$1(e)}}function su(e){if(e.consumers===void 0)return;let t=Yi$1;Yi$1=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||wE(r)}}finally{Yi$1=t}}function au(){return Re?.consumerAllowSignalWrites!==!1}function wE(e){e.dirty=!0,su(e),e.consumerMarkedDirty?.(e)}function yr$1(e){e.dirty=!1,e.lastCleanEpoch=Ln}function Bn(e){return e&&_h(e),C(e)}function _h(e){if(e.producersTail?.knownValidAtEpoch===Ln){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function vr$1(e,t){C(t),e&&Mh(e)}function Mh(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(Dr$1(e))do n=cu(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function Ki$1(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(hn$1(n),r!==n.version))return!0}return!1}function Eo$1(e){if(Dr$1(e)){let t=e.producers;for(;t!==void 0;)t=cu(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Nh(e,t){let n=e.consumersTail,r=Dr$1(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Nh(o.producer,o)}function cu(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:t.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(t.consumers=r,!Dr$1(t)){let i=t.producers;for(;i!==void 0;)i=cu(i)}return n}function Dr$1(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Io$1(e){IE?.(e)}function wo$1(e,t){return Object.is(e,t)}function Xi$1(e,t){let n=Object.create(CE);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(hn$1(n),fn$1(n),n.value===Ye$1)throw n.error;return n.value};return r[ve$1]=n,Io$1(n),r}var Fn=Symbol(`UNSET`);var jn=Symbol(`COMPUTING`);var Ye$1=Symbol(`ERRORED`);var CE=j(m({},Un),{value:Fn,dirty:!0,error:null,equal:wo$1,kind:`computed`,producerMustRecompute(e){return e.value===Fn||e.value===jn},producerRecomputeValue(e){if(e.value===jn)throw new Error(``);let t=e.value;e.value=jn;let n=Bn(e),r,o=!1;try{r=e.computation(),C(null),o=t!==Fn&&t!==Ye$1&&r!==Ye$1&&e.equal(t,r)}catch(i){r=Ye$1,e.error=i}finally{vr$1(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function bE(){throw new Error}var Rh=bE;function Ah(e){Rh(e)}function uu(e){Rh=e}var SE=null;function lu(e,t){let n=Object.create(Co$1);n.value=e,t!==void 0&&(n.equal=t);let r=()=>xh(n);return r[ve$1]=n,Io$1(n),[r,s=>pn$1(n,s),s=>Ji$1(n,s)]}function xh(e){return fn$1(e),e.value}function pn$1(e,t){au()||Ah(e),e.equal(e.value,t)||(e.value=t,TE(e))}function Ji$1(e,t){au()||Ah(e),pn$1(e,t(e.value))}var Co$1=j(m({},Un),{equal:wo$1,value:void 0,kind:`signal`});function TE(e){e.version++,Th(),su(e),SE?.(e)}var du;function es(){return du}function bt(e){let t=du;return du=e,t}var Oh=Symbol(`NotFound`);function Er$1(e){return e===Oh||e?.name===`ɵNotFound`}function fu(e,t,n){let r=Object.create(_E);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(hn$1(r),fn$1(r),r.value===Ye$1)throw r.error;return r.value};return i[ve$1]=r,Io$1(r),i}function hu(e,t){hn$1(e),pn$1(e,t),yr$1(e)}function kh(e,t){if(hn$1(e),e.value===Ye$1)throw e.error;Ji$1(e,t),yr$1(e)}var _E=j(m({},Un),{value:Fn,dirty:!0,error:null,equal:wo$1,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Fn||e.value===jn},producerRecomputeValue(e){if(e.value===jn)throw new Error(``);let t=e.value;e.value=jn;let n=Bn(e),r,o=!1;try{let i=e.source(),s=t!==Fn&&t!==Ye$1,a=s?{source:e.sourceValue,value:t}:void 0;r=e.computation(i,a),e.sourceValue=i,C(null),o=s&&r!==Ye$1&&e.equal(t,r)}catch(i){r=Ye$1,e.error=i}finally{vr$1(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Ph(e){let t=C(null);try{return e()}finally{C(t)}}function b(e){return typeof e==`function`}function Ir$1(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ts=Ir$1(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:
2${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(`
3  `)}`:``,this.name=`UnsubscriptionError`,this.errors=n});function Vn(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ae=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(b(r))try{r()}catch(i){t=i instanceof ts?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{Lh(i)}catch(s){t=t??[],s instanceof ts?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ts(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Lh(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Vn(n,t)}remove(t){let{_finalizers:n}=this;n&&Vn(n,t),t instanceof e&&t._removeParent(this)}};ae.EMPTY=(()=>{let e=new ae;return e.closed=!0,e})();var pu=ae.EMPTY;function ns(e){return e instanceof ae||e&&`closed`in e&&b(e.remove)&&b(e.add)&&b(e.unsubscribe)}function Lh(e){b(e)?e():e.unsubscribe()}var it$2={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNext
vendor: 19,862 bytes, line 3
3Context:!1};var wr={setTimeout(e,t,...n){let{delegate:r}=wr;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=wr;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function rs(e){wr.setTimeout(()=>{let{onUnhandledError:t}=it$2;if(t)t(e);else throw e})}function bo$1(){}var Fh=gu(`C`,void 0,void 0);function jh(e){return gu(`E`,void 0,e)}function Uh(e){return gu(`N`,e,void 0)}function gu(e,t,n){return{kind:e,value:t,error:n}}var Hn=null;function Cr$1(e){if(it$2.useDeprecatedSynchronousErrorHandling){let t=!Hn;if(t&&(Hn={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Hn;if(Hn=null,n)throw r}}else e()}function Bh(e){it$2.useDeprecatedSynchronousErrorHandling&&Hn&&(Hn.errorThrown=!0,Hn.error=e)}var $n=class extends ae{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,ns(t)&&t.add(this)):this.destination=xE}static create(t,n,r){return new Vt(t,n,r)}next(t){this.isStopped?yu(Uh(t),this):this._next(t)}error(t){this.isStopped?yu(jh(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?yu(Fh,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}};var RE=Function.prototype.bind;function mu(e,t){return RE.call(e,t)}var vu=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){os(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){os(r)}else os(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){os(n)}}};var Vt=class extends $n{constructor(t,n,r){super();let o;if(b(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&it$2.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&mu(t.next,i),error:t.error&&mu(t.error,i),complete:t.complete&&mu(t.complete,i)}):o=t}this.destination=new vu(o)}};function os(e){it$2.useDeprecatedSynchronousErrorHandling?Bh(e):rs(e)}function AE(e){throw e}function yu(e,t){let{onStoppedNotification:n}=it$2;n&&wr.setTimeout(()=>n(e,t))}var xE={closed:!0,next:bo$1,error:AE,complete:bo$1};var br$1=typeof Symbol==`function`&&Symbol.observable||`@@observable`;function st$1(e){return e}function is(...e){return Du(e)}function Du(e){return e.length===0?st$1:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var A$1=class e{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=kE(t)?t:new Vt(t,n,r);return Cr$1(()=>{let{operator:i,source:s}=this;o.add(i?i.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=Vh(n),new n((r,o)=>{let i=new Vt({next:s=>{try{t(s)}catch(a){o(a),i.unsubscribe()}},error:o,complete:r});this.subscribe(i)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[br$1](){return this}pipe(...t){return Du(t)(this)}toPromise(t){return t=Vh(t),new t((n,r)=>{let o;this.subscribe(i=>o=i,i=>r(i),()=>n(o))})}};A$1.create=e=>new A$1(e);function Vh(e){var t;return(t=e??it$2.Promise)!==null&&t!==void 0?t:Promise}function OE(e){return e&&b(e.next)&&b(e.error)&&b(e.complete)}function kE(e){return e&&e instanceof $n||OE(e)&&ns(e)}function PE(e){return b(e?.lift)}function P(e){return t=>{if(PE(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError(`Unable to lift unknown Observable type`)}}function F(e,t,n,r,o){return new Eu(e,t,n,r,o)}var Eu=class extends $n{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};var Hh=Ir$1(e=>function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`});var ne$1=class extends A$1{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new ss(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new Hh}next(t){Cr$1(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Cr$1(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Cr$1(()=>{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:n,isStopped:r,observers:o}=this;return n||r?pu:(this.currentObservers=null,o.push(t),new ae(()=>{this.currentObservers=null,Vn(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new A$1;return t.source=this,t}};ne$1.create=(e,t)=>new ss(e,t);var ss=class extends ne$1{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:pu}};var De=class extends ne$1{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Iu={now(){return(Iu.delegate||Date).now()},delegate:void 0};var as=class extends ae{constructor(t,n){super()}schedule(t,n=0){return this}};var So$1={setInterval(e,t,...n){let{delegate:r}=So$1;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=So$1;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var cs=class extends as{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;let o=this.id,i=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return So$1.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&So$1.clearInterval(n)}execute(t,n){if(this.closed)return new Error(`executing a cancelled action`);this.pending=!1;let r=this._execute(t,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r=!1,o;try{this.work(t)}catch(i){r=!0,o=i||new Error(`Scheduled action threw falsy error`)}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){let{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Vn(r,this),t!=null&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}};var Sr$1=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Sr$1.now=Iu.now;var us=class extends Sr$1{constructor(t,n=Sr$1.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var wu=new us(cs);var $h=wu;var Ee$1=new A$1(e=>e.complete());function ls(e){return e&&b(e.schedule)}function zh(e){return e[e.length-1]}function ds(e){return b(zh(e))?e.pop():void 0}function gn$1(e){return ls(zh(e))?e.pop():void 0}function qh(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?i(l.value):o(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function Gh(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function zn(e){return this instanceof zn?(this.v=e,this):new zn(e)}function Wh(e,t,n){if(!Symbol.asyncIterator)throw new TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),a(`next`),a(`throw`),a(`return`,s),o[Symbol.asyncIterator]=function(){return this},o;function s(f){return function(g){return Promise.resolve(g).then(f,d)}}function a(f,g){r[f]&&(o[f]=function(v){return new Promise(function(I,_){i.push([f,v,I,_])>1||c(f,v)})},g&&(o[f]=g(o[f])))}function c(f,g){try{u(r[f](g))}catch(v){h(i[0][3],v)}}function u(f){f.value instanceof zn?Promise.resolve(f.value.v).then(l,d):h(i[0][2],f)}function l(f){c(`next`,f)}function d(f){c(`throw`,f)}function h(f,g){f(g),i.shift(),i.length&&c(i[0][0],i[0][1])}}function Zh(e){if(!Symbol.asyncIterator)throw new TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Gh==`function`?Gh(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},s)}}var Tr$1=(e=>e&&typeof e.length==`number`&&typeof e!=`function`);function fs(e){return b(e?.then)}function hs(e){return b(e[br$1])}function ps(e){return Symbol.asyncIterator&&b(e?.[Symbol.asyncIterator])}function gs(e){return new TypeError(`You provided ${e!==null&&typeof e==`object`?`an invalid object`:`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function LE(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ms=LE();function ys(e){return b(e?.[ms])}function vs(e){return Wh(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield zn(n.read());if(o)return yield zn(void 0);yield yield zn(r)}}finally{n.releaseLock()}})}function Ds(e){return b(e?.getReader)}function K(e){if(e instanceof A$1)return e;if(e!=null){if(hs(e))return FE(e);if(Tr$1(e))return jE(e);if(fs(e))return UE(e);if(ps(e))return Yh(e);if(ys(e))return BE(e);if(Ds(e))return VE(e)}throw gs(e)}function FE(e){return new A$1(t=>{let n=e[br$1]();if(b(n.subscribe))return n.subscribe(t);throw new TypeError(`Provided object does not correctly implement Symbol.observable`)})}function jE(e){return new A$1(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function UE(e){return new A$1(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,rs)})}function BE(e){return new A$1(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Yh(e){return new A$1(t=>{HE(e,t).catch(n=>t.error(n))})}function VE(e){return Yh(vs(e))}function HE(e,t){var n,r,o,i;return qh(this,void 0,void 0,function*(){try{for(n=Zh(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function Ue$2(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Es(e,t=0){return P((n,r)=>{n.subscribe(F(r,o=>Ue$2(r,e,()=>r.next(o),t),()=>Ue$2(r,e,()=>r.complete(),t),o=>Ue$2(r,e,()=>r.error(o),t)))})}function Is(e,t=0){return P((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Qh(e,t){return K(e).pipe(Is(t),Es(t))}function Kh(e,t){return K(e).pipe(Is(t),Es(t))}function Xh(e,t){return new A$1(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Jh(e,t){return new A$1(n=>{let r;return Ue$2(n,t,()=>{r=e[ms](),Ue$2(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>b(r?.return)&&r.return()})}function ws(e,t){if(!e)throw new Error(`Iterable cannot be null`);return new A$1(n=>{Ue$2(n,t,()=>{let r=e[Symbol.asyncIterator]();Ue$2(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function ep(e,t){return ws(vs(e),t)}function tp(e,t){if(e!=null){if(hs(e))return Qh(e,t);if(Tr$1(e))return Xh(e,t);if(fs(e))return Kh(e,t);if(ps(e))return ws(e,t);if(ys(e))return Jh(e,t);if(Ds(e))return ep(e,t)}throw gs(e)}function J(e,t){return t?tp(e,t):K(e)}function N(...e){return J(e,gn$1(e))}function Cu(e,t){let n=b(e)?e:()=>e,r=o=>o.error(n());return new A$1(t?o=>t.schedule(r,0,o):r)}function Cs(e){return!!e&&(e instanceof A$1||b(e.lift)&&b(e.subscribe))}var Ht$1=Ir$1(e=>function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`});function $E(e,t){let n=typeof t==`object`;return new Promise((r,o)=>{let i=!1,s;e.subscribe({next:a=>{s=a,i=!0},error:o,complete:()=>{i?r(s):n?r(t.defaultValue):o(new Ht$1)}})})}function np(e){return e instanceof Date&&!isNaN(e)}function q(e,t){return P((n,r)=>{let o=0;n.subscribe(F(r,i=>{r.next(e.call(t,i,o++))}))})}var{isArray:zE}=Array;function GE(e,t){return zE(t)?e(...t):e(t)}function _r$1(e){return q(t=>GE(e,t))}var{isArray:qE}=Array,{getPrototypeOf:WE,prototype:ZE,keys:YE}=Object;function bs(e){if(e.length===1){let t=e[0];if(qE(t))return{args:t,keys:null};if(QE(t)){let n=YE(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function QE(e){return e&&typeof e==`object`&&WE(e)===ZE}function Ss(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function Ts(...e){let t=gn$1(e),n=ds(e),{args:r,keys:o}=bs(e);if(r.length===0)return J([],t);let i=new A$1(KE(r,t,o?s=>Ss(o,s):st$1));return n?i.pipe(_r$1(n)):i}function KE(e,t,n=st$1){return r=>{rp(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let c=0;c<o;c++)rp(t,()=>{let u=J(e[c],t),l=!1;u.subscribe(F(r,d=>{i[c]=d,l||(l=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function rp(e,t,n){e?Ue$2(n,e,t):t()}function op(e,t,n,r,o,i,s,a){let c=[],u=0,l=0,d=!1,h=()=>{d&&!c.length&&!u&&t.complete()},f=v=>u<r?g(v):c.push(v),g=v=>{i&&t.next(v),u++;let I=!1;K(n(v,l++)).subscribe(F(t,_=>{o?.(_),i?f(_):t.next(_)},()=>{I=!0},void 0,()=>{if(I)try{for(u--;c.length&&u<r;){let _=c.shift();s?Ue$2(t,s,()=>g(_)):g(_)}h()}catch(_){t.error(_)}}))};return e.subscribe(F(t,f,()=>{d=!0,h()})),()=>{a?.()}}function pe(e,t,n=1/0){return b(t)?pe((r,o)=>q((i,s)=>t(r,i,o,s))(K(e(r,o))),n):(typeof t==`number`&&(n=t),P((r,o)=>op(r,o,e,n)))}function mn$1(e=1/0){return pe(st$1,e)}function ip(){return mn$1(1)}function Mr$1(...e){return ip()(J(e,gn$1(e)))}function To$1(e){return new A$1(t=>{K(e()).subscribe(t)})}function XE(...e){let t=ds(e),{args:n,keys:r}=bs(e),o=new A$1(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),c=s,u=s;for(let l=0;l<s;l++){let d=!1;K(n[l]).subscribe(F(i,h=>{d||(d=!0,u--),a[l]=h},()=>c--,void 0,()=>{(!c||!d)&&(u||i.next(r?Ss(r,a):a),i.complete())}))}});return t?o.pipe(_r$1(t)):o}var JE=[`addListener`,`removeListener`];var eI=[`addEventListener`,`removeEventListener`];var tI=[`on`,`off`];function bu(e,t,n,r){if(b(n)&&(r=n,n=void 0),r)return bu(e,t,n).pipe(_r$1(r));let[o,i]=oI(e)?eI.map(s=>a=>e[s](t,a,n)):nI(e)?JE.map(sp(e,t)):rI(e)?tI.map(sp(e,t)):[];if(!o&&Tr$1(e))return pe(s=>bu(s,t,n))(K(e));if(!o)throw new TypeError(`Invalid event target`);return new A$1(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return o(a),()=>i(a)})}function sp(e,t){return n=>r=>e[n](t,r)}function nI(e){return b(e.addListener)&&b(e.removeListener)}function rI(e){return b(e.on)&&b(e.off)}function oI(e){return b(e.addEventListener)&&b(e.removeEventListener)}function iI(e=0,t,n=$h){let r=-1;return t!=null&&(ls(t)?n=t:r=t),new A$1(o=>{let i=np(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function He(e,t){return P((n,r)=>{let o=0;n.subscribe(F(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Gn(e){return P((t,n)=>{let r=null,o=!1,i;r=t.subscribe(F(n,void 0,void 0,s=>{i=K(e(s,Gn(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function yn$1(e,t){return b(t)?pe(e,t,1):pe(e,1)}function sI(e,t=wu){return P((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let u=i;i=null,r.next(u)}};function c(){let u=s+e,l=t.now();if(l<u){o=this.schedule(void 0,u-l),r.add(o);return}a()}n.subscribe(F(r,u=>{i=u,s=t.now(),o||(o=t.schedule(c,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function ap(e){return P((t,n)=>{let r=!1;t.subscribe(F(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function $t(e){return e<=0?()=>Ee$1:P((t,n)=>{let r=0;t.subscribe(F(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function cp(e=aI){return P((t,n)=>{let r=!1;t.subscribe(F(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function aI(){return new Ht$1}function Nr$1(e){return P((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function zt$1(e,t){let n=arguments.length>=2;return r=>r.pipe(e?He((o,i)=>e(o,i,r)):st$1,$t(1),n?ap(t):cp(()=>new Ht$1))}function _s(e){return e<=0?()=>Ee$1:P((t,n)=>{let r=[];t.subscribe(F(n,o=>{r.push(o),e<r.length&&r.shift()},()=>{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function cI(e={}){let{connector:t=()=>new ne$1,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,c,u=0,l=!1,d=!1,h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),s=c=void 0,l=d=!1},g=()=>{let v=s;f(),v?.unsubscribe()};return P((v,I)=>{u++,!d&&!l&&h();let _=c=c??t();I.add(()=>{u--,u===0&&!d&&!l&&(a=Su(g,o))}),_.subscribe(I),!s&&u>0&&(s=new Vt({next:E=>_.next(E),error:E=>{d=!0,h(),a=Su(f,n,E),_.error(E)},complete:()=>{l=!0,h(),a=Su(f,r),_.complete()}}),K(v).subscribe(s))})(i)}}function Su(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new Vt({next:()=>{r.unsubscribe(),e()}});return K(t(...n)).subscribe(r)}function Tu(...e){let t=gn$1(e);return P((n,r)=>{(t?Mr$1(e,n,t):Mr$1(e,n)).subscribe(r)})}function Ae$1(e,t){return P((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(F(r,c=>{o?.unsubscribe();let u=0,l=i++;K(e(c,l)).subscribe(o=F(r,d=>r.next(t?t(c,d,l,u++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function _o$1(e){return P((t,n)=>{K(e).subscribe(F(n,()=>n.complete(),bo$1)),!n.closed&&t.subscribe(n)})}
3function Qe(e,t,n){let r=b(e)||t||n?{next:e,error:t,complete:n}:e;return r?P((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(F(i,c=>{var u;(u=r.next)===null||u===void 0||u.call(r,c),i.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},c=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,c),i.error(c)},()=>{var c,u;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):st$1}var Os=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`;var y=class extends Error{code;constructor(t,n){super(ct$2(t,n)),this.code=t}};function uI(e){return`NG0${Math.abs(e)}`}function ct$2(e,t){return`${uI(e)}${t?`: `+t:``}`}function H(e){for(let t in e)if(e[t]===H)return t;throw Error(``)}function pp(e,t){for(let n in t)Object.hasOwn(t,n)&&!Object.hasOwn(e,n)&&(e[n]=t[n])}function Oo$1(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(Oo$1).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(`
4`);return r>=0?n.slice(0,r):n}function ks(e,t){return e?t?`${e} ${t}`:e:t||``}var lI=H({__forward_ref__:H});function Ps(e){return e.__forward_ref__=Ps,e}function Be$1(e){return zu(e)?e():e}function zu(e){return typeof e==`function`&&Object.hasOwn(e,lI)&&e.__forward_ref__===Ps}function S(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function St(e){return{providers:e.providers||[],imports:e.imports||[]}}function ko$1(e){return dI(e,Ls)}function Gu(e){return ko$1(e)!==null}function dI(e,t){return Object.hasOwn(e,t)&&e[t]||null}function fI(e){return(e?.[Ls]??null)||null}function Mu(e){return e&&Object.hasOwn(e,Ns)?e[Ns]:null}var Ls=H({ɵprov:H});var Ns=H({ɵinj:H});var D=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(t,n){this._desc=t,this.ɵprov=void 0,typeof n==`number`?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.ɵprov=S({token:this,providedIn:n.providedIn||`root`,factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function qu(e){return e&&!!e.ɵproviders}var Po$1=H({ɵcmp:H});var Lo$1=H({ɵdir:H});var Wu=H({ɵpipe:H});var Zu=H({ɵmod:H});var Ro=H({ɵfac:H});var Qn=H({__NG_ELEMENT_ID__:H});var up=H({__NG_ENV_ID__:H});function gp(e){return js(e,`@NgModule`),e[Zu]||null}function En$1(e){return js(e,`@Component`),e[Po$1]||null}function Fs(e){return js(e,`@Directive`),e[Lo$1]||null}function mp(e){return js(e,`@Pipe`),e[Wu]||null}function js(e,t){if(e==null)throw new y(-919,!1)}function Z(e){return typeof e==`string`?e:e==null?``:String(e)}var yp=H({ngErrorCode:H});var hI=H({ngErrorMessage:H});var pI=H({ngTokenPath:H});function Yu(e,t){return vp(``,-200,t)}function Us(e,t){throw new y(-201,!1)}function vp(e,t,n){let r=new y(t,e);return r[yp]=t,r[hI]=e,n&&(r[pI]=n),r}function gI(e){return e[yp]}var Nu;function Dp(){return Nu}function xe(e){let t=Nu;return Nu=e,t}function Qu(e,t,n){let r=ko$1(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Us(e,``)}var ge=globalThis;var qn={};var yI=`__NG_DI_FLAG__`;var Ru=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Wn(n)||0;try{return this.injector.get(t,r&8?null:qn,r)}catch(o){if(Er$1(o))return o;throw o}}};function vI(e,t=0){let n=es();if(n===void 0)throw new y(-203,!1);if(n===null)return Qu(e,void 0,t);{let r=DI(t),o=n.retrieve(e,r);if(Er$1(o)){if(r.optional)return null;throw o}return o}}function w(e,t=0){return(Dp()||vI)(Be$1(e),t)}function p(e,t){return w(e,Wn(t))}function Wn(e){return typeof e>`u`||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function DI(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Au(e){let t=[];for(let n=0;n<e.length;n++){let r=Be$1(e[n]);if(Array.isArray(r)){if(r.length===0)throw new y(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=EI(a);typeof c==`number`?c===-1?o=a.token:i|=c:o=a}t.push(w(o,i))}else t.push(w(r))}return t}function EI(e){return e[yI]}function Dn(e,t){return Object.hasOwn(e,Ro)?e[Ro]:null}
vendor: 3,470 bytes, line 4
4function Ep(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let o=e[r],i=t[r];if(n&&(o=n(o),i=n(i)),i!==o)return!1}return!0}function Ip(e){return e.flat(Number.POSITIVE_INFINITY)}function Bs(e,t){e.forEach(n=>Array.isArray(n)?Bs(n,t):t(n))}function Ku(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Fo$1(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function wp(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function Cp(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(o===1)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function Vs(e,t,n){let r=xr$1(e,t);return r>=0?e[r|1]=n:(r=~r,Cp(e,r,t,n)),r}function Hs(e,t){let n=xr$1(e,t);if(n>=0)return e[n|1]}function xr$1(e,t){return II(e,t,1)}function II(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<<n];if(t===s)return i<<n;s>t?o=i:r=i+1}return~(o<<n)}var In$1={};var Oe=[];var wn$1=new D(``);var $s=new D(``,-1);var Xu=new D(``);var Ar$1=class{get(t,n=qn){if(n===qn){let o=vp(``,-201);throw o.name=`ɵNotFound`,o}return n}};function Zt$1(e){return{ɵproviders:e}}function bp(...e){return{ɵproviders:Ju(!0,e),ɵfromNgModule:!0}}function Ju(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return Bs(t,s=>{let a=s;Rs(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&Sp(o,i),n}function Sp(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];el(o,i=>{t(i,r)})}}function Rs(e,t,n,r){if(e=Be$1(e),!e)return!1;let o=null,i=Mu(e),s=!i&&En$1(e);if(!i&&!s){let c=e.ngModule;if(i=Mu(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies==`function`?s.dependencies():s.dependencies;for(let u of c)Rs(u,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let u;Bs(i.imports,l=>{Rs(l,t,n,r)&&(u||=[],u.push(l))}),u!==void 0&&Sp(u,t)}if(!a){let u=Dn(o)||(()=>new o);t({provide:o,useFactory:u,deps:Oe},o),t({provide:Xu,useValue:o,multi:!0},o),t({provide:wn$1,useValue:()=>w(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let u=e;el(c,l=>{t(l,u)})}}else return!1;return o!==e&&e.providers!==void 0}function el(e,t){for(let n of e)qu(n)&&(n=n.ɵproviders),Array.isArray(n)?el(n,t):t(n)}var wI=H({provide:String,useValue:H});function Tp(e){return e!==null&&typeof e==`object`&&wI in e}function CI(e){return!!(e&&e.useExisting)}function bI(e){return!!(e&&e.useFactory)}function As(e){return typeof e==`function`}var jo$1=new D(``);var Ms={};var lp={};var _u;function Uo$1(){return _u===void 0&&(_u=new Ar$1),_u}var re=class{};var Zn=class extends re{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,Ou(t,s=>this.processProvider(s)),this.records.set($s,Rr$1(void 0,this)),o.has(`environment`)&&this.records.set(re,Rr$1(void 0,this));let i=this.records.get(jo$1);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Xu,Oe,{self:!0}))}retrieve(t,n){let r=Wn(n)||0;try{return this.get(t,qn,r)}catch(o){if(Er$1(o))return o;throw o}}destroy(){Mo$1(this),this._destroyed=!0;let t=C(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),
4C(t)}}onDestroy(t){return Mo$1(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Mo$1(this);let n=bt(this),r=xe(void 0);try{return t()}finally{bt(n),xe(r)}}get(t,n=qn,r){if(Mo$1(this),Object.hasOwn(t,up))return t[up](this);let o=Wn(r),s=bt(this),a=xe(void 0);try{if(!(o&4)){let u=this.records.get(t);if(u===void 0){let l=NI(t)&&ko$1(t);l&&this.injectableDefInScope(l)?u=Rr$1(xu(t),Ms):u=null,this.records.set(t,u)}if(u!=null)return this.hydrate(t,u,o)}let c=o&2?Uo$1():this.parent;return n=o&8&&n===qn?null:n,c.get(t,n)}catch(c){let u=gI(c);throw u===-200||u===-201?new y(u,null):c}finally{xe(a),bt(s)}}resolveInjectorInitializers(){let t=C(null),n=bt(this),r=xe(void 0);try{let i=this.get(wn$1,Oe,{self:!0});for(let s of i)s()}finally{bt(n),xe(r),C(t)}}toString(){return`R3Injector[...]`}processProvider(t){t=Be$1(t);let n=As(t)?t:Be$1(t&&t.provide),r=TI(t);if(!As(t)&&t.multi===!0){let o=this.records.get(n);o||(o=Rr$1(void 0,Ms,!0),o.factory=()=>Au(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=C(null);try{if(n.value===lp)throw Yu(``);return n.value===Ms&&(n.value=lp,n.value=n.factory(void 0,r)),typeof n.value==`object`&&n.value&&MI(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{C(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=Be$1(t.providedIn);return typeof n==`string`?n===`any`||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function xu(e){let t=ko$1(e),n=t!==null?t.factory:Dn(e);if(n!==null)return n;if(e instanceof D)throw new y(-204,!1);if(e instanceof Function)return SI(e);throw new y(-204,!1)}function SI(e){if(e.length>0)throw new y(-204,!1);let n=fI(e);return n!==null?()=>n.factory(e):()=>new e}function TI(e){if(Tp(e))return Rr$1(void 0,e.useValue);return Rr$1(_p(e),Ms)}function _p(e,t,n){let r;if(As(e)){let o=Be$1(e);return Dn(o)||xu(o)}else if(Tp(e))r=()=>Be$1(e.useValue);else if(bI(e))r=()=>e.useFactory(...Au(e.deps||[]));else if(CI(e))r=(o,i)=>w(Be$1(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=Be$1(e&&(e.useClass||e.provide));if(_I(e))r=()=>new o(...Au(e.deps));else return Dn(o)||xu(o)}return r}function Mo$1(e){if(e.destroyed)throw new y(-205,!1)}function Rr$1(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function _I(e){return!!e.deps}function MI(e){return e!==null&&typeof e==`object`&&typeof e.ngOnDestroy==`function`}function NI(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ou(e,t){for(let n of e)Array.isArray(n)?Ou(n,t):n&&qu(n)?Ou(n.ɵproviders,t):t(n)}function de(e,t){let n;e instanceof Zn?(Mo$1(e),n=e):n=new Ru(e);let o=bt(n),i=xe(void 0);try{return t()}finally{bt(o),xe(i)}}function tl(){return Dp()!==void 0||es()!=null}var ut$2=0;var T=1;var R=2;var ce$1=3;var Ke=4;var Ie=5;var Kn=6;var Or$1=7;var oe$1=8;var Yt=9;var lt$1=10;var X=11;var kr$1=12;var nl=13;var Cn$1=14;var Te=15;var bn$1=16;var Xn=17;var Tt$1=18;var Bo$1=19;var rl=20;var Gt$1=21;var zs=22;var Pr$1=23;var $e=24;var Jn=25;var Mp=26;var Vo$1=27;var ie=28;var Np=1;var ol=6;var er$1=7;var Ho$1=8;var tr$1=9;var se$1=10;function Qt(e){return Array.isArray(e)&&typeof e[Np]==`object`}function Xe(e){return Array.isArray(e)&&e[Np]===!0}function il(e){return(e.flags&4)!==0}function Kt(e){return e.componentOffset>-1}function Gs(e){return(e.flags&1)===1}function Xt$1(e){return!!e.template}function Lr$1(e){return(e[R]&512)!==0}function nr$1(e){return(e[R]&256)===256}var ee=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(ee||{});var No$1;var Yn=`svg`;var qs=`math`;var ku=``;var dp=`*`;var Pu=()=>Object.create(null);function RI(){return No$1||(No$1=Pu(),vn$1(ee.HTML,void 0,[[`iframe`,[`srcdoc`]],[`*`,[`innerHTML`,`outerHTML`]]]),vn$1(ee.STYLE,void 0,[[`*`,[`style`]]]),vn$1(ee.URL,void 0,[[`*`,[`formAction`]],[`area`,[`href`]],[`a`,[`href`,`xlink:href`]],[`form`,[`action`]],[`img`,[`src`]],[`video`,[`src`]]]),vn$1(ee.URL,qs,[[`*`,[`href`,`xlink:href`]]]),vn$1(ee.RESOURCE_URL,void 0,[[`base`,[`href`]],[`embed`,[`src`]],[`frame`,[`src`]],[`iframe`,[`src`]],[`link`,[`href`]],[`object`,[`codebase`,`data`]]]),vn$1(ee.URL,Yn,[[`a`,[`href`,`xlink:href`]]]),vn$1(ee.ATTRIBUTE_NO_BINDING,Yn,[[`animate`,[`attributeName`,`values`,`to`,`from`]],[`set`,[`to`,`attributeName`]],[`animateMotion`,[`attributeName`]],[`animateTransform`,[`attributeName`]]]),vn$1(ee.ATTRIBUTE_NO_BINDING,void 0,[[`unknown`,[`attributeName`,`values`,`to`,`from`,`sandbox`,`allow`,`allowFullscreen`,`referrerPolicy`,`csp`,`fetchPriority`,`credentialless`]],[`iframe`,[`sandbox`,`allow`,`allowFullscreen`,`referrerPolicy`,`csp`,`fetchPriority`,`credentialless`]]]),No$1)}function vn$1(e,t,n){let r=t??ku;for(let[o,i]of n){let s=o.toLowerCase();for(let a of i){let c=a.toLowerCase(),u=No$1[c]??=Pu(),l=u[r]??=Pu();l[s]=e}}}function Rp(e,t,n){let o=RI()[t.toLowerCase()];if(!o)return ee.NONE;let i=e.toLowerCase(),s;if(n){let a=o[n];a&&(s=a[i]??a[dp])}if(s===void 0){let a=o[ku];a&&(s=a[i]??a[dp])}if(s===void 0&&(!n||n===ku)){let a=o[Yn];a&&(s=a[i])}return s??ee.NONE}function we(e){for(;Array.isArray(e);)e=e[ut$2];return e}function sl(e,t){return we(t[e])}function Je(e,t){return we(t[e.index])}function Ws(e,t){return e.data[t]}function al(e,t){return e[t]}function cl(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function et$1(e,t){let n=t[e];return Qt(n)?n:n[ut$2]}function Ap(e){return(e[R]&4)===4}function Zs(e){return(e[R]&128)===128}function xp(e){return Xe(e[ce$1])}function _t$1(e,t){return t==null?null:e[t]}function ul(e){e[Xn]=0}
vendor: 4,238 bytes, line 4
4function ll(e){e[R]&1024||(e[R]|=1024,Zs(e)&&Fr$1(e))}function Op(e,t){for(;e>0;)t=t[Cn$1],e--;return t}function $o(e){return!!(e[R]&9216||e[$e]?.dirty)}function Ys(e){e[lt$1].changeDetectionScheduler?.notify(8),e[R]&64&&(e[R]|=1024),$o(e)&&Fr$1(e)}function Fr$1(e){e[lt$1].changeDetectionScheduler?.notify(0);let t=qt$1(e);for(;t!==null&&!(t[R]&8192||(t[R]|=8192,!Zs(t)));)t=qt$1(t)}function Qs(e,t){if(nr$1(e))throw new y(911,!1);e[Gt$1]===null&&(e[Gt$1]=[]),e[Gt$1].push(t)}function kp(e,t){if(e[Gt$1]===null)return;let n=e[Gt$1].indexOf(t);n!==-1&&e[Gt$1].splice(n,1)}function qt$1(e){let t=e[ce$1];return Xe(t)?t[ce$1]:t}function dl(e){return e[Or$1]??=[]}function fl(e){return e.cleanup??=[]}function Pp(e,t,n,r){let o=dl(t);o.push(n),e.firstCreatePass&&fl(e).push(r,o.length-1)}var k$1={lFrame:Zp(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Lu=!1;function Lp(){return k$1.lFrame.elementDepthCount}function Fp(){k$1.lFrame.elementDepthCount++}function hl(){k$1.lFrame.elementDepthCount--}function jp(){return k$1.bindingsEnabled}function pl(){return k$1.skipHydrationRootTNode!==null}function gl(e){return k$1.skipHydrationRootTNode===e}function ml(){k$1.skipHydrationRootTNode=null}function M(){return k$1.lFrame.lView}function me(){return k$1.lFrame.tView}function Up(e){return k$1.lFrame.contextLView=e,e[oe$1]}function Bp(e){return k$1.lFrame.contextLView=null,e}function _e(){let e=yl();for(;e!==null&&e.type===64;)e=e.parent;return e}function yl(){return k$1.lFrame.currentTNode}function Vp(){let e=k$1.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function jr$1(e,t){let n=k$1.lFrame;n.currentTNode=e,n.isParent=t}function vl(){return k$1.lFrame.isParent}function Dl(){k$1.lFrame.isParent=!1}function Hp(){return k$1.lFrame.contextLView}function El(){return Lu}function Il(e){let t=Lu;return Lu=e,t}function wl(){let e=k$1.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Ur$1(){return k$1.lFrame.bindingIndex}function Cl(e){return k$1.lFrame.bindingIndex=e}function Sn$1(){return k$1.lFrame.bindingIndex++}function rr$1(e){let t=k$1.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function $p(){return k$1.lFrame.inI18n}function zp(e,t){let n=k$1.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ks(t)}function Gp(){return k$1.lFrame.currentDirectiveIndex}function Ks(e){k$1.lFrame.currentDirectiveIndex=e}function qp(e){let t=k$1.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function bl(){return k$1.lFrame.currentQueryIndex}function Xs(e){k$1.lFrame.currentQueryIndex=e}function AI(e){let t=e[T];return t.type===2?t.declTNode:t.type===1?e[Ie]:null}function Sl(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=AI(i),o===null||(i=i[Cn$1],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=k$1.lFrame=Wp();return r.currentTNode=t,r.lView=e,!0}function Js(e){let t=Wp(),n=e[T];k$1.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Wp(){let e=k$1.lFrame,t=e===null?null:e.child;return t===null?Zp(e):t}function Zp(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Yp(){let e=k$1.lFrame;return k$1.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Tl=Yp;function ea$1(){let e=Yp();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Qp(e){return(k$1.lFrame.contextLView=Op(e,k$1.lFrame.contextLView))[oe$1]}function Pe(){return k$1.lFrame.selectedIndex}function Tn$1(e){k$1.lFrame.selectedIndex=e}function zo$1(){let e=k$1.lFrame;return Ws(e.tView,e.selectedIndex)}function Kp(){k$1.lFrame.currentNamespace=Yn}function Xp(){xI()}function xI(){k$1.lFrame.currentNamespace=null}function _l(){return k$1.lFrame.currentNamespace}var Jp=!0;function ta$1(){return Jp}function na$1(e){Jp=e}function Fu(e,t=null,n=null,r){let o=Ml(e,t,n,r);
4return o.resolveInjectorInitializers(),o}function Ml(e,t=null,n=null,r,o=new Set){return new Zn([n||Oe,bp(e)],t||Uo$1(),null,o)}var Se=class e{static THROW_IF_NOT_FOUND=qn;static NULL=new Ar$1;static create(t,n){if(Array.isArray(t))return Fu({name:``},n,t,``);{let r=t.name??``;return Fu({name:r},t.parent,t.providers,r)}}static ɵprov=S({token:e,providedIn:`any`,factory:()=>w($s)});static __NG_ELEMENT_ID__=-1};var Y=new D(``);var ke=class{static __NG_ELEMENT_ID__=OI;static __NG_ENV_ID__=t=>t};var ju=class extends ke{_lView;constructor(t){super(),this._lView=t}get destroyed(){return nr$1(this._lView)}onDestroy(t){let n=this._lView;return Qs(n,t),()=>kp(n,t)}};function OI(){return new ju(M())}var Nl=!1;var eg=new D(``);var dt$1=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new De(!1);debugTaskTracker=p(eg,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new A$1(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=S({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Uu=class extends ne$1{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,tl()&&(this.destroyRef=p(ke,{optional:!0})??void 0,this.pendingTasks=p(dt$1,{optional:!0})??void 0)}emit(t){let n=C(null);try{super.next(t)}finally{C(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t==`object`){let c=t;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof ae&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}};var be=Uu;function xs(...e){}function Rl(e){let t,n;function r(){e=xs;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch(o){}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function tg(e){return queueMicrotask(()=>e()),()=>{e=xs}}var Al=`isAngularZone`;var Ao$1=Al+`_ID`;var kI=0;var z$1=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new be(!1);onMicrotaskEmpty=new be(!1);onStable=new be(!1);onError=new be(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=Nl}=t;if(typeof Zone>`u`)throw new y(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,FI(s)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Al)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new y(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new y(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask(`NgZoneEvent: `+o,t,PI,xs,xs);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}};var PI={};function xl(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function LI(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Rl(()=>{e.callbackScheduled=!1,Bu(e),e.isCheckStableRunning=!0,xl(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Bu(e)}function FI(e){let t=()=>{LI(e)},n=kI++;e._inner=e._inner.fork({name:`angular`,properties:{[Al]:!0,[Ao$1]:n,[Ao$1+n]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(jI(c))return r.invokeTask(i,s,a,c);try{return fp(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),hp(e)}},onInvoke:(r,o,i,s,a,c,u)=>{try{return fp(e),r.invoke(i,s,a,c,u)}
4finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!UI(c)&&t(),hp(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change==`microTask`?(e._hasPendingMicrotasks=s.microTask,Bu(e),xl(e)):s.change==`macroTask`&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Bu(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function fp(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function hp(e){e._nesting--,xl(e)}var xo$1=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new be;onMicrotaskEmpty=new be;onStable=new be;onError=new be;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function jI(e){return ng(e,`__ignore_ng_zone__`)}function UI(e){return ng(e,`__scheduler_tick__`)}function ng(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var at$2=class{_console=console;handleError(t){this._console.error(`ERROR`,t)}};function rg(e){return og(e)?e:new Vu(e)}function og(e){return e instanceof Error||typeof e==`object`&&e!==null&&typeof e.name==`string`&&typeof e.message==`string`}var Vu=class extends Error{constructor(t){super(String(t),{cause:t}),this.name=`ErrorBoundaryWrappedError`}};var ze$2=new D(``,{factory:()=>{let e=p(z$1),t=p(re),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(at$2),n.handleError(r))})}}});var ig={provide:wn$1,useValue:()=>{p(at$2,{optional:!0})},multi:!0};function ue$1(e,t){let[n,r,o]=lu(e,t?.equal),i=n;i[ve$1];return i.set=r,i.update=o,i.asReadonly=ra$1.bind(i),i}function ra$1(){let e=this[ve$1];if(e.readonlyFn===void 0){let t=()=>this();t[ve$1]=e,e.readonlyFn=t}return e.readonlyFn}var Go$1=new D(``,{factory:()=>BI});var BI=`ng`;var oa$1=new D(``);var qo$1=new D(``,{providedIn:`platform`,factory:()=>`unknown`});var VI=new D(``);var Wo$1=new D(``,{factory:()=>p(Y).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null});var ia$1=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=HI}return e})();function HI(){return new ia$1(M(),_e())}var Wt$1=class{};var Br$1=new D(``,{factory:()=>!0});var sa$1=new D(``);var Ol=(()=>{class e{static ɵprov=S({token:e,providedIn:`root`,factory:()=>new Hu})}return e})();var Hu=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[n,r]of this.queues)n===null?t||=this.flushQueue(r):t||=n.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let n=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,n=!0,r.run());return n}};var Vr$1=(()=>{class e{internalPendingTasks=p(dt$1);scheduler=p(Wt$1);errorHandler=p(ze$2);add(){let n=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(n)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(n))}}run(n){let r=this.add();try{n().catch(this.errorHandler).finally(r)}catch(o){this.errorHandler(o),r()}}static ɵprov=S({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Sd=Symbol(`InputSignalNode#UNSET`);var Hg=j(m({},Co$1),{transformFn:void 0,applyValueToInputSignal(e,t){pn$1(e,t)}});function oi(e){return{toString:e}.toString()}var L=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(L||{});var ma$1=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function $g(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var zg=null;var cr$1=(()=>{zg=sg;let e=()=>sg;return e.ngInherit=!0,e})();function XI(){return zg}function sg(e){return e.type.prototype.ngOnChanges&&(e.setInput=ew),JI}function JI(){let e=Gg(this),t=e?.current;if(t){let n=e.previous;if(n===In$1)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function ew(e,t,n,r,o){let i=this.declaredInputs[r],s=Gg(e)||tw(e,{previous:In$1,current:null}),a=s.current||(s.current={}),c=s.previous,u=c[i];a[i]=new ma$1(u&&u.currentValue,n,c===In$1),$g(e,t,o,n)}var $l=`__ngSimpleChanges__`;function Gg(e){return Object.hasOwn(e,$l)&&e[$l]||null}function tw(e,t){return e[$l]=t}var ag=[];var $=function(e,t=null,n){for(let r=0;r<ag.length;r++){let o=ag[r];o(e,t,n)}};function nw(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=XI()(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function rw(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:u,ngOnDestroy:l}=e.data[n].type.prototype;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),c&&(e.viewHooks??=[]).push(-n,c),u&&((e.viewHooks??=[]).push(n,u),(e.viewCheckHooks??=[]).push(n,u)),l!=null&&(e.destroyHooks??=[]).push(n,l)}}
vendor: 4,513 bytes, line 4
4function da(e,t,n){qg(e,t,3,n)}function fa$1(e,t,n,r){(e[R]&3)===n&&qg(e,t,n,r)}function kl(e,t){let n=e[R];(n&3)===t&&(n&=16383,n+=1,e[R]=n)}function qg(e,t,n,r){let o=r!==void 0?e[Xn]&65535:0,i=r??-1,s=t.length-1,a=0;for(let c=o;c<s;c++)if(typeof t[c+1]==`number`){if(a=t[c],r!=null&&a>=r)break}else t[c]<0&&(e[Xn]+=65536),(a<i||i==-1)&&(ow(e,n,t,c),e[Xn]=(e[Xn]&4294901760)+c+2),c++}function cg(e,t){$(L.LifecycleHookStart,e,t);let n=C(null);try{t.call(e)}finally{C(n),$(L.LifecycleHookEnd,e,t)}}function ow(e,t,n,r){let o=n[r]<0,i=n[r+1],a=e[o?-n[r]:n[r]];o?e[R]>>14<e[Xn]>>16&&(e[R]&3)===t&&(e[R]+=16384,cg(a,i)):cg(a,i)}var zr$1=-1;var Ko=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r,o){this.factory=t,this.name=o,this.canSeeViewProviders=n,this.injectImpl=r}};function iw(e){return(e.flags&8)!==0}function sw(e){return(e.flags&16)!==0}function aw(e,t,n){let r=0;for(;r<n.length;){let o=n[r];if(typeof o==`number`){if(o!==0)break;r++;let i=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,i)}else{let i=o,s=n[++r];cw(i)?e.setProperty(t,i,s):e.setAttribute(t,i,s),r++}}return r}function Wg(e){return e===3||e===4||e===6}function cw(e){return e.charCodeAt(0)===64}function Gr$1(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let o=t[r];typeof o==`number`?n=o:n===0||(n===-1||n===2?ug(e,n,o,null,t[++r]):ug(e,n,o,null,null))}}return e}function ug(e,t,n,r,o){let i=0,s=e.length;if(t===-1)s=-1;else for(;i<e.length;){let a=e[i++];if(typeof a==`number`){if(a===t){s=-1;break}else if(a>t){s=i-1;break}}}for(;i<e.length;){let a=e[i];if(typeof a==`number`)break;if(a===n){o!==null&&(e[i+1]=o);return}i++,o!==null&&i++}s!==-1&&(e.splice(s,0,t),i=s+1),e.splice(i++,0,n),o!==null&&e.splice(i++,0,o)}function Zg(e){return e!==zr$1}function ya$1(e){return e&32767}function uw(e){return e>>16}function va$1(e,t){let n=uw(e),r=t;for(;n>0;)r=r[Cn$1],n--;return r}var zl=!0;function Da$1(e){let t=zl;return zl=e,t}var Yg=255;var Qg=5;var dw=0;var Mt$1={};function fw(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Qn)&&(r=n[Qn]),r??=n[Qn]=dw++;let o=r&Yg,i=1<<o;t.data[e+(o>>Qg)]|=i}function Kg(e,t){let n=Xg(e,t);if(n!==-1)return n;let r=t[T];r.firstCreatePass&&(e.injectorIndex=t.length,Pl(r.data,e),Pl(t,null),Pl(r.blueprint,null));let o=Td(e,t),i=e.injectorIndex;if(Zg(o)){let s=ya$1(o),a=va$1(o,t),c=a[T].data;for(let u=0;u<8;u++)t[i+u]=a[s+u]|c[s+u]}return t[i+8]=o,i}function Pl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Xg(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Td(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=om(o),r===null)return zr$1;if(n++,o=o[Cn$1],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zr$1}function hw(e,t,n){fw(e,t,n)}function pw(e,t){if(t===`class`)return e.classes;if(t===`style`)return e.styles;let n=e.attrs;if(n){let r=n.length,o=0;for(;o<r;){let i=n[o];if(Wg(i))break;if(i===0)o=o+2;else if(typeof i==`number`)for(o++;o<r&&typeof n[o]==`string`;)o++;else{if(i===t)return n[o+1];o=o+2}}}return null}function Jg(e,t,n){if(n&8||e!==void 0)return e;Us(t,`NodeInjector`)}function em(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[Yt],i=xe(void 0);try{return o?o.get(t,r,n&8):Qu(t,r,n&8)}finally{xe(i)}}return Jg(r,t,n)}function tm(e,t,n,r=0,o){if(e!==null){if(t[R]&2048&&!(r&2)){let s=vw(e,t,n,r,Mt$1);if(s!==Mt$1)return s}let i=nm(e,t,n,r,Mt$1);if(i!==Mt$1)return i}return em(t,n,r,o)}function nm(e,t,n,r,o){let i=mw(n);if(typeof i==`function`){if(!Sl(t,e,r))return r&1?Jg(o,n,r):em(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))Us(n);else return s}finally{Tl()}}else if(typeof i==`number`){let s=null,a=Xg(e,t),c=zr$1,u=r&1?t[Te][Ie]:null;for((a===-1||r&4)&&(c=a===-1?Td(e,t):t[a+8],c===zr$1||!dg(r,!1)?a=-1:(s=t[T],a=ya$1(c),t=va$1(c,t)));a!==-1;){let l=t[T];if(lg(i,a,l.data)){let d=gw(a,t,n,s,r,u);if(d!==Mt$1)return d}c=t[a+8],c!==zr$1&&dg(r,t[T].data[a+8]===u)&&lg(i,a,t)?(s=l,a=ya$1(c),t=va$1(c,t)):a=-1}}return o}function gw(e,t,n,r,o,i){let s=t[T],a=s.data[e+8],l=ha$1(a,s,n,r==null?Kt(a)&&zl:r!=s&&(a.type&3)!==0,o&1&&i===a);return l!==null?Ea$1(t,s,l,a,o):Mt$1}function ha$1(e,t,n,r,o){let i=e.providerIndexes,s=t.data,a=i&1048575,c=e.directiveStart,u=e.directiveEnd,l=i>>20,d=r?a:a+l,h=o?a+l:u;for(let f=d;f<h;f++){let g=s[f];
4if(f<c&&n===g||f>=c&&g.type===n)return f}if(o){let f=s[c];if(f&&Xt$1(f)&&f.type===n)return c}return null}function Ea$1(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Ko){let a=i;if(a.resolving)throw Yu(``);let c=Da$1(a.canSeeViewProviders);a.resolving=!0;s[n].type||s[n];let d=a.injectImpl?xe(a.injectImpl):null;Sl(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&nw(n,s[n],t)}finally{d!==null&&xe(d),Da$1(c),a.resolving=!1,Tl()}}return i}function mw(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Qn)?e[Qn]:void 0;return typeof t==`number`?t>=0?t&Yg:yw:t}function lg(e,t,n){let r=1<<e;return!!(n[t+(e>>Qg)]&r)}function dg(e,t){return!(e&2)&&!(e&1&&t)}var Jt$1=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return tm(this._tNode,this._lView,t,Wn(r),n)}};function yw(){return new Jt$1(_e(),M())}function rm(e){return oi(()=>{let t=e.prototype.constructor,n=t[Ro]||Gl(t),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[Ro]||Gl(o);if(i&&i!==n)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function Gl(e){return zu(e)?()=>{let t=Gl(Be$1(e));return t&&t()}:Dn(e)}function vw(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[R]&2048&&!Lr$1(s);){let a=nm(i,s,n,r|2,Mt$1);if(a!==Mt$1)return a;r&=-5;let c=i.parent;if(!c){let u=s[rl];if(u){let l=u.get(n,Mt$1,r);if(l!==Mt$1)return l}c=om(s),s=s[Cn$1]}i=c}return o}function om(e){let t=e[T],n=t.type;return n===2?t.declTNode:n===1?e[Ie]:null}function ii(e){return pw(_e(),e)}function U(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dw(){return Kr$1(_e(),M())}function Kr$1(e,t){return new Rt$1(Je(e,t))}var Rt$1=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=Dw}return e})();function Ew(e){return e instanceof Rt$1?e.nativeElement:e}function Iw(){return this._results[Symbol.iterator]()}var Ia$1=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 ne$1}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=Ip(t);(this._changesDetected=!Ep(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Iw};function im(e){return(e.flags&128)===128}var _d=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(_d||{});var sm=new Map;var ww=0;function Cw(){return ww++}function bw(e){sm.set(e[Bo$1],e)}function ql(e){sm.delete(e[Bo$1])}var fg=`__ngContext__`;function qr$1(e,t){Qt(t)?(e[fg]=t[Bo$1],bw(t)):e[fg]=t}function am(e){return um(e[kr$1])}function cm(e){return um(e[Ke])}function um(e){for(;e!==null&&!Xe(e);)e=e[Ke];return e}var Wl;function Md(e){Wl=e}function lm(){if(Wl!==void 0)return Wl;if(typeof document<`u`)return document;throw new y(210,!1)}var dm=`r`;var fm=`di`;var Nd=new D(``);var hm=!1;var pm=new D(``,{factory:()=>hm});var Pa$1=new D(``);var hg=new WeakMap;function Sw(e,t){if(e==null||typeof e!=`object`)return;let n=hg.get(e);n||(n=new WeakSet,hg.set(e,n)),n.add(t)}function La$1(e){return(e.flags&32)===32}var Mw=()=>null;function gm(e,t,n=!1){return Mw(e,t,n)}function mm(e,t){let n=e.contentQueries;if(n!==null){let r=C(null);try{for(let o=0;o<n.length;o+=2){let i=n[o],s=n[o+1];if(s!==-1){let a=e.data[s];Xs(i),a.contentQueries(2,t[s],s)}}}finally{C(r)}}}function Zl(e,t,n){Xs(0);let r=C(null);try{t(e,n)}finally{C(r)}}function ym(e,t,n){if(il(t)){let r=C(null);try{let o=t.directiveStart,i=t.directiveEnd;for(let s=o;s<i;s++){let a=e.data[s];if(a.contentQueries){let c=n[s];a.contentQueries(1,c,s)}}}finally{C(r)}}}var pt$1=(function(e){return e[e.Emulated=0]=`Emulated`,e[e.None=2]=`None`,e[e.ShadowDom=3]=`ShadowDom`,e[e.ExperimentalIsolatedShadowDom=4]=`ExperimentalIsolatedShadowDom`,e})(pt$1||{});var Nw={"http://www.w3.org/2000/svg":Yn,"http://www.w3.org/1998/Math/MathML":qs};var aa$1;function vm(){if(aa$1===void 0&&(aa$1=null,ge.trustedTypes))try{aa$1=ge.trustedTypes.createPolicy(`angular`,{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(e){}return aa$1}function Fa$1(e){return vm()?.createHTML(e)||e}function Rw(e){return vm()?.createScriptURL(e)||e}var ca$1;function Aw(){if(ca$1===void 0&&(ca$1=null,ge.trustedTypes))try{ca$1=ge.trustedTypes.createPolicy(`angular#unsafe-bypass`,{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(e){}return ca$1}function pg(e){return Aw()?.createScriptURL(e)||e}var en$1=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Os})`}};var Yl=class extends en$1{getTypeName(){return`HTML`}};var Ql=class extends en$1{getTypeName(){return`Style`}};var Kl=class extends en$1{getTypeName(){return`Script`}};var Xl=class extends en$1{getTypeName(){return`URL`}};var Jl=class extends en$1{getTypeName(){return`ResourceURL`}};function Ge$2(e){return e instanceof en$1?e.changingThisBreaksApplicationSecurity:e}function tn$2(e,t){let n=Dm(e);if(n!=null&&n!==t){if(n===`ResourceURL`&&t===`URL`)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Os})`)}return n===t}function Dm(e){return e instanceof en$1&&e.getTypeName()||null}function Rd(e){return new Yl(e)}function Ad(e){return new Ql(e)}function xd(e){return new Kl(e)}function Od(e){return new Xl(e)}function kd(e){return new Jl(e)}function xw(e){let t=new td(e);return Ow()?new ed(t):t}var ed=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=`<body><remove></remove>`+t;try{let n=new window.DOMParser().parseFromString(Fa$1(t),`text/html`).body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.firstChild?.remove(),n)}catch(n){return null}}};var td=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument(`sanitization-inert`)}getInertBodyElement(t){let n=this.inertDocument.createElement(`template`);return n.innerHTML=Fa$1(t),n}};function Ow(){try{return!!new window.DOMParser().parseFromString(Fa$1(``),`text/html`)}catch(e){return!1}}var kw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function si(e){return e=String(e),e.match(kw)?e:`unsafe:`+e}function nn$1(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=!0;return t}function ai(...e){let t=Object.create(null);for(let n of e)for(let r in n)Object.hasOwn(n,r)&&(t[r]=!0);return t}var Em=nn$1(`area,br,col,hr,img,wbr`);var Im=nn$1(`colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr`);var wm=nn$1(`rp,rt`);var Pw=ai(wm,Im);var gg=ai(Em,ai(Im,nn$1(`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`)),ai(wm,nn$1(`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`)),Pw);var Cm=nn$1(`background,cite,href,itemtype,longdesc,poster,src,xlink:href`);var Bw=ai(Cm,nn$1(`abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,c
4olspan,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`),nn$1(`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`));var Vw=nn$1(`script,style,template`);var nd=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let n=t.firstChild,r=!0,o=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){o.push(n),n=zw(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=$w(n);if(i){n=i;break}n=o.pop()}}return this.buf.join(``)}startElement(t){let n=mg(t).toLowerCase();if(!Object.hasOwn(gg,n))return this.sanitizedSomething=!0,!Object.hasOwn(Vw,n);this.buf.push(`<`),this.buf.push(n);let r=t.attributes;for(let o=0;o<r.length;o++){let i=r.item(o),s=i.name,a=s.toLowerCase();if(!Object.hasOwn(Bw,a)){this.sanitizedSomething=!0;continue}let c=i.value;Cm[a]&&(c=si(c)),this.buf.push(` `,s,`="`,yg(c),`"`)}return this.buf.push(`>`),!0}endElement(t){let n=mg(t).toLowerCase();Object.hasOwn(gg,n)&&!Object.hasOwn(Em,n)&&(this.buf.push(`</`),this.buf.push(n),this.buf.push(`>`))}chars(t){this.buf.push(yg(t))}};function Hw(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function $w(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw bm(t);return t}function zw(e){let t=e.firstChild;if(t&&Hw(e,t))throw bm(t);return t}function mg(e){let t=e.nodeName;return typeof t==`string`?t:`FORM`}function bm(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var Gw=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var qw=/([^\#-~ |!])/g;function yg(e){return e.replace(/&/g,`&amp;`).replace(Gw,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return`&#`+((n-55296)*1024+(r-56320)+65536)+`;`}).replace(qw,function(t){return`&#`+t.charCodeAt(0)+`;`}).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}var ua$1;function Pd(e,t){let n=null;try{ua$1=ua$1||xw(e);let r=t?String(t):``;n=ua$1.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error(`Failed to sanitize html because the input is unstable`);o--,r=i,i=n.innerHTML,n=ua$1.getInertBodyElement(r)}while(r!==i);return Fa$1(new nd().sanitizeChildren(vg(n)||n))}finally{if(n){let r=vg(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function vg(e){return`content`in e&&Ww(e)?e.content:null}function Ww(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===`TEMPLATE`}function Zw(e,t){return e.createText(t)}function Yw(e,t,n){e.setValue(t,n)}function Sm(e,t,n){return e.createElement(t,n)}function or$1(e,t,n,r,o){e.insertBefore(t,n,r,o)}function Tm(e,t,n){e.appendChild(t,n)}function Dg(e,t,n,r,o){r!==null?or$1(e,t,n,r,o):Tm(e,t,n)}function _m(e,t,n,r){e.removeChild(null,t,n,r)}function Qw(e,t,n){e.setAttribute(t,`style`,n)}function Kw(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mm(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&aw(e,t,r),o!==null&&Kw(e,t,o),i!==null&&Qw(e,t,i)}function Xw(e,t=!0){if(e[0]!=`:`)return[null,e];let n=e.indexOf(`:`,1);if(n===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,n),e.slice(n+1)]}function Nm(e){let t=Am();return t?t.sanitize(ee.URL,e)||``:tn$2(e,`URL`)?Ge$2(e):si(Z(e))}function Rm(e){let t=Am();if(t)return pg(t.sanitize(ee.RESOURCE_URL,e)||``);if(tn$2(e,`ResourceURL`))return pg(Ge$2(e));throw new y(904,!1)}function Jw(e){return Rw(e[0])}function eC(e,t){switch(tC(e,t)){case ee.RESOURCE_URL:return Rm;case ee.URL:return Nm;default:return null}}function Ld(e,t,n){return eC(t,n)?.(e)??e}function Am(){let e=M();return e&&e[lt$1].sanitizer}function tC(e,t){let[n,r]=nC(e);return Rp(r,t,n)}function nC(e){e=e.toLowerCase();let t=Xw(e,!1);if(t[0])return t;let r=Pe()===-1?null:zo$1(),o=r?.namespace;if(e===`#host`&&r?.type===2){let i=Je(r,M());if(i.tagName&&(e=i.tagName.toLowerCase()),o==null){let s=i.namespaceURI;o=s&&Nw[s]}}return[o,e]}function rC(e){return e.ownerDocument.defaultView}function oC(e){return e instanceof Function?e():e}function iC(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var xm=`ng-template`;function sC(e,t,n,r){let o=0;if(r){for(;o<t.length&&typeof t[o]==`string`;o+=2)if(t[o]===`class`&&iC(t[o+1].toLowerCase(),n,0)!==-1)return!0}else if(Fd(e))return!1;if(o=t.indexOf(1,o),o>-1){let i;for(;++o<t.length&&typeof(i=t[o])==`string`;)if(i.toLowerCase()===n)return!0}return!1}function Fd(e){return e.type===4&&e.value!==xm}function aC(e,t,n){return t===(e.type===4&&!n?xm:e.value)}function cC(e,t,n){let r=4,o=e.attrs,i=o!==null?dC(o):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c==`number`){if(!s&&!ft$1(r)&&!ft$1(c))return!1;if(s&&ft$1(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==``&&!aC(e,c,n)||c===``&&t.length===1){if(ft$1(r))return!1;s=!0}}else if(r&8){if(o===null||!sC(e,o,c,n)){if(ft$1(r))return!1;s=!0}}else{let u=t[++a],l=uC(c,o,Fd(e),n);if(l===-1){if(ft$1(r))return!1;s=!0;continue}if(u!==``){let d;if(l>i?d=``:d=o[l+1].toLowerCase(),r&2&&u!==d){if(ft$1(r))return!1;s=!0}}}}return ft$1(r)||s}function ft$1(e){return(e&1)===0}function uC(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o<t.length;){let s=t[o];if(s===e)return o;if(s===3||s===6)i=!0;else if(s===1||s===2){let a=t[++o];for(;typeof a==`string`;)a=t[++o];continue}else{if(s===4)break;
4if(s===0){o+=4;continue}}o+=i?1:2}return-1}else return fC(t,e)}function Om(e,t,n=!1){for(let r=0;r<t.length;r++)if(cC(e,t[r],n))return!0;return!1}function lC(e){let t=e.attrs;if(t!=null){let n=t.indexOf(5);if((n&1)===0)return t[n+1]}return null}function dC(e){for(let t=0;t<e.length;t++){let n=e[t];if(Wg(n))return t}return e.length}function fC(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r==`number`)return-1;if(r===t)return n;n++}return-1}function hC(e,t){e:for(let n=0;n<t.length;n++){let r=t[n];if(e.length===r.length){for(let o=0;o<e.length;o++)if(e[o]!==r[o])continue e;return!0}}return!1}function Eg(e,t){return e?`:not(`+t.trim()+`)`:t}function pC(e){let t=e[0],n=1,r=2,o=``,i=!1;for(;n<e.length;){let s=e[n];if(typeof s==`string`)if(r&2){let a=e[++n];o+=`[`+s+(a.length>0?`="`+a+`"`:``)+`]`}else r&8?o+=`.`+s:r&4&&(o+=` `+s);else o!==``&&!ft$1(s)&&(t+=Eg(i,o),o=``),r=s,i=i||!ft$1(r);n++}return o!==``&&(t+=Eg(i,o)),t}function gC(e){return e.map(pC).join(`,`)}function mC(e){let t=[],n=[],r=1,o=2;for(;r<e.length;){let i=e[r];if(typeof i==`string`)o===2?i!==``&&t.push(i,e[++r]):o===8&&n.push(i);else{if(!ft$1(o))break;o=i}r++}return n.length&&t.push(1,...n),t}var te$1={};var Nt$1=(function(e){return e[e.Important=1]=`Important`,e[e.DashCase=2]=`DashCase`,e})(Nt$1||{});var yC;function jd(e,t){return yC(e,t)}var Ud=new Set;typeof document<`u`&&document?.documentElement?.getAnimations;var rd=new WeakMap;function km(e){return e?e[Cn$1]??e:null}var Hr$1=new WeakSet;function vC(e,t,n){let r=rd.get(e);if(!r||r.length===0)return;let o=t.parentNode,i=t.previousSibling,s=km(n);for(let a=r.length-1;a>=0;a--){let{el:c,declarationView:u}=r[a],l=c.parentNode;c===t?(r.splice(a,1),Hr$1.add(c),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):i&&c===i?(r.splice(a,1),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),c.parentNode?.removeChild(c)):l&&o&&l!==o&&(s===null||u===null||s===u)&&(r.splice(a,1),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),c.parentNode?.removeChild(c))}}function DC(e,t,n){let r=km(n),o=rd.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):rd.set(e,[{el:t,declarationView:r}])}var ja$1=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(ja$1||{});var gt=new D(``);var Ig=new Set;function mt$1(e){Ig.has(e)||(Ig.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Bd=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=S({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Pm=[0,1,2,3];var Lm=(()=>{class e{ngZone=p(z$1);scheduler=p(Wt$1);errorHandler=p(at$2,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){p(gt,{optional:!0})}execute(){let n=this.sequences.size>0;n&&$(L.AfterRenderHooksStart),this.executing=!0;for(let r of Pm)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&$(L.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[Jn]??=[]).push(n),Fr$1(r),r[R]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ja$1.AFTER_NEXT_RENDER,n):n()}static ɵprov=S({token:e,providedIn:`root`,factory:()=>new e})}return e})();var wa$1=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=o,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[Jn];t&&(this.view[Jn]=t.filter(n=>n!==this))}};function Ua$1(e,t){let n=t?.injector??p(Se);return mt$1(`NgAfterNextRender`),IC(e,n,t,!0)}function EC(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function IC(e,t,n,r){let o=t.get(Bd);o.impl??=t.get(Lm);let i=t.get(gt,null,{optional:!0}),s=n?.manualCleanup!==!0?t.get(ke):null,a=t.get(ia$1,null,{optional:!0}),c=new wa$1(o.impl,EC(e),a?.view,r,s,i?.snapshot(null));return o.impl.register(c),c}var od=null;var Fm=null;function wg(e,t,n,r){od?.maybeQueueEnterAnimation(e,t,n,r)}function Cg(e,t,n,r){od===null?r(!1):od.runLeaveAnimationsWithCallback(e,t,n,r)}function wC(e){Fm?.initViewDetachAnimations(e)}function CC(e){Fm?.clearViewDetachAnimations(e)}function $r$1(e,t,n,r,o,i,s,a){if(o!=null){let c,u=!1;Xe(o)?c=o:Qt(o)&&(u=!0,o=o[ut$2]);
4let l=we(o);e===0&&r!==null?(wg(a,r,i,n),s==null?Tm(t,r,l):or$1(t,r,l,s||null,!0)):e===1&&r!==null?(or$1(t,r,l,s||null,!0),vC(i,l,a),Hr$1.has(l)||wg(a,r,i,n)):e===2?(a?.[Mp]?.leave?.has(i.index)&&DC(i,l,a),Hr$1.delete(l),Cg(a,i,n,d=>{if(Hr$1.has(l)){Hr$1.delete(l);return}_m(t,l,u,d)})):e===3&&(Hr$1.delete(l),Cg(a,i,n,()=>{t.destroyNode(l)})),c!=null&&kC(t,e,n,c,i,r,s)}}function bC(e,t){jm(e,t),t[ut$2]=null,t[Ie]=null}function SC(e,t,n,r,o,i){r[ut$2]=o,r[Ie]=t,Va$1(e,r,n,1,o,i)}function jm(e,t){t[lt$1].changeDetectionScheduler?.notify(9),Va$1(e,t,t[X],2,null,null)}function TC(e){let t=e[kr$1];if(!t)return Ll(e[T],e);for(;t;){let n=null;if(Qt(t))n=t[kr$1];else{let r=t[se$1];r&&(n=r)}if(!n){for(;t&&!t[Ke]&&t!==e;)Qt(t)&&Ll(t[T],t),t=t[ce$1];t===null&&(t=e),Qt(t)&&Ll(t[T],t),n=t&&t[Ke]}t=n}}function Vd(e,t){let n=e[tr$1],r=n.indexOf(t);n.splice(r,1)}function Ba$1(e,t){if(nr$1(t))return;let n=t[X];n.destroyNode&&Va$1(e,t,n,3,null,null),TC(t)}function Ll(e,t){if(nr$1(t))return;let n=C(null);try{t[R]&=-129,t[R]|=256,t[$e]&&Eo$1(t[$e]),MC(e,t),_C(e,t),t[T].type===1&&t[X].destroy();let r=t[bn$1];if(r!==null&&Xe(t[ce$1])){r!==t[ce$1]&&Vd(r,t);let o=t[Tt$1];o!==null&&o.detachView(e)}ql(t)}finally{C(n)}}function _C(e,t){let n=e.cleanup,r=t[Or$1];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]==`string`){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Or$1]=null);let o=t[Gt$1];if(o!==null){t[Gt$1]=null;for(let s=0;s<o.length;s++){let a=o[s];a()}}let i=t[Pr$1];if(i!==null){t[Pr$1]=null;for(let s of i)s.destroy()}}function MC(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let o=t[n[r]];if(!(o instanceof Ko)){let i=n[r+1];if(Array.isArray(i))for(let s=0;s<i.length;s+=2){let a=o[i[s]],c=i[s+1];$(L.LifecycleHookStart,a,c);try{c.call(a)}finally{$(L.LifecycleHookEnd,a,c)}}else{$(L.LifecycleHookStart,o,i);try{i.call(o)}finally{$(L.LifecycleHookEnd,o,i)}}}}}function Um(e,t,n){if(t===null)throw new y(510,!1);return NC(e,t.parent,n)}function NC(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[ut$2];if(Kt(r)){let{encapsulation:o}=e.data[r.directiveStart+r.componentOffset];if(o===pt$1.None||o===pt$1.Emulated)return null}return Je(r,n)}function Bm(e,t,n){return AC(e,t,n)}function RC(e,t,n){return e.type&40?Je(e,n):null}var AC=RC;function Hd(e,t,n,r){let o=Um(e,r,t),i=t[X],a=Bm(r.parent||t[Ie],r,t);if(o!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)Dg(i,o,n[c],a,!1);else Dg(i,o,n,a,!1)}function Yo$1(e,t){if(t!==null){let n=t.type;if(n&3)return Je(t,e);if(n&4)return id(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Yo$1(e,r);{let o=e[t.index];return Xe(o)?id(-1,o):we(o)}}else{if(n&128)return Yo$1(e,t.next);if(n&32)return jd(t,e)()||we(e[t.index]);{let r=Vm(e,t);if(r!==null){if(Array.isArray(r))return r[0];return Yo$1(qt$1(e[Te]),r)}else return Yo$1(e,t.next)}}}return null}function Vm(e,t){if(t!==null){let r=e[Te][Ie],o=t.projection;return r.projection[o]}return null}function id(e,t){let n=se$1+e+1;if(n<t.length){let r=t[n],o=r[T].firstChild;if(o!==null)return Yo$1(r,o)}return t[er$1]}function $d(e,t,n,r,o,i,s){for(;n!=null;){let a=r[Yt];if(n.type===128){n=n.next;continue}let c=r[n.index],u=n.type;if(s&&t===0&&(c&&qr$1(we(c),r),n.flags|=2),!La$1(n))if(u&8)$d(e,t,n.child,r,o,i,!1),$r$1(t,e,a,o,c,n,i,r);else if(u&32){let l=jd(n,r),d;for(;d=l();)$r$1(t,e,a,o,d,n,i,r);$r$1(t,e,a,o,c,n,i,r)}else u&16?Hm(e,t,r,n,o,i):$r$1(t,e,a,o,c,n,i,r);n=s?n.projectionNext:n.next}}function Va$1(e,t,n,r,o,i){e.type===3?xC(n,r,t,o,i):$d(n,r,e.firstChild,t,o,i,!1)}function xC(e,t,n,r,o){let s=n[T].firstChild,a=s.next,c=we(n[s.index]),u=we(n[a.index]),l=a.index+1,d=n[l];if(t===1||t===0)r!==null&&(d&&d.hasChildNodes()?or$1(e,r,d,o,!0):(or$1(e,r,c,o,!0),or$1(e,r,u,o,!0)));else if(t===2){if(d||(d=document.createDocumentFragment(),n[l]=d),c&&c.parentNode===d)return;let h=c;for(;h!==null;){let f=h.nextSibling;if(d.appendChild(h),h===u)break;h=f}}}function OC(e,t,n){let r=t[X];Hm(r,0,t,n,Um(e,n,t),Bm(n.parent||t[Ie],n,t))}function Hm(e,t,n,r,o,i){let s=n[Te],c=s[Ie].projection[r.projection];if(Array.isArray(c))for(let u=0;u<c.length;u++){let l=c[u];$r$1(t,e,n[Yt],o,l,r,i,n)}else{let u=c,l=s[ce$1];im(r)&&(u.flags|=128),$d(e,t,u,l,o,i,!0)}}function kC(e,t,n,r,o,i,s){let a=r[er$1];if(a!==we(r)&&$r$1(t,e,n,i,a,o,s),(r[R]&4)===0)for(let u=se$1;u<r.length;u++){let l=r[u];Va$1(l[T],l,e,t,i,a)}}function PC(e,t,n,r,o){if(t)o?e.addClass(n,r):e.removeClass(n,r);else{let i=r.indexOf(`-`)===-1?void 0:Nt$1.DashCase;o==null?e.removeStyle(n,r,i):(typeof o==`string`&&o.endsWith(`!important`)&&(o=o.slice(0,-10),i|=Nt$1.Important),e.setStyle(n,r,o,i))}}function zd(e,t,n,r,o,i,s,a,c,u,l){let d=ie+r,h=d+o,f=LC(d,h),g=typeof u==`function`?u():u;return f[T]={type:e,blueprint:f,template:n,queries:null,viewQuery:a,declTNode:t,data:f.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,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 i==`function`?i():i,pipeRegistry:typeof s==`function`?s():s,firstChild:null,schemas:c,consts:g,incompleteFirstPass:!1,ssrId:l}}function LC(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:te$1);return n}function FC(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=zd(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Gd(e,t,n,r,o,i,s,a,c,u,l){let d=t.blueprint.slice();return d[ut$2]=o,d[R]=r|1228,(u!==null||e&&e[R]&2048)&&(d[R]|=2048),ul(d),d[ce$1]=d[Cn$1]=e,d[oe$1]=n,d[lt$1]=s||e&&e[lt$1],d[X]=a||e&&e[X],d[Yt]=c||e&&e[Yt]||null,d[Ie]=i,d[Bo$1]=Cw(),d[Kn]=l,d[rl]=u,d[Te]=t.type==2?e[Te]:d,d}function jC(e,t,n){let r=Je(t,e),o=FC(n),i=e[lt$1].rendererFactory,s=qd(e,Gd(e,o,null,$m(n),r,t,null,i.createRenderer(r,n),null,null,null));return e[t.index]=s}function $m(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function zm(e,t,n,r){if(n===0)return-1;let o=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return o}function qd(e,t){return e[kr$1]?e[nl][Ke]=t:e[kr$1]=t,e[nl]=t,t}function UC(e=1){Gm(me(),M(),Pe()+e,!1)}function Gm(e,t,n,r){if(!r)if((t[R]&3)===3){let i=e.preOrderCheckHooks;i!==null&&da(t,i,n)}else{let i=e.preOrderHooks;i!==null&&fa$1(t,i,0,n)}Tn$1(n)}var Ha$1=(function(e){return e[e.None=0]=`None`,e[e.SignalBased=1]=`SignalBased`,e[e.HasDecoratorInputTransform=2]=`HasDecoratorInputTransform`,e})(Ha$1||{});function sd(e,t,n,r){let o=C(null);try{let[i,s,a]=e.inputs[n],c=null;(s&Ha$1.SignalBased)!==0&&(c=t[i][ve$1]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,c,r,n,i):$g(t,c,i,r)}finally{C(o)}}function qm(e,t,n,r,o){let i=Pe(),s=r&2;try{Tn$1(-1),s&&t.length>ie&&Gm(e,t,ie,!1);$(s?L.TemplateUpdateStart:L.TemplateCreateStart,o,n),n(r,o)}finally{Tn$1(i);$(s?L.TemplateUpdateEnd:L.TemplateCreateEnd,o,n)}}
4function Wm(e,t,n){qC(e,t,n),(n.flags&64)===64&&WC(e,t,n)}function Wd(e,t,n=Je){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;i<r.length;i+=2){let s=r[i+1],a=s===-1?n(t,e):e[s];e[o++]=a}}}function BC(e,t,n,r){let i=r.get(pm,hm)||n===pt$1.ShadowDom||n===pt$1.ExperimentalIsolatedShadowDom;return e.selectRootElement(t,i)}function $C(e){return e===`class`?`className`:e===`for`?`htmlFor`:e===`formaction`?`formAction`:e===`innerHtml`?`innerHTML`:e===`readonly`?`readOnly`:e===`tabindex`?`tabIndex`:e}function zC(e,t,n,r,o,i){let s=t[T];if(Zd(e,s,t,n,r)){Kt(e)&&GC(t,e.index);return}e.type&3&&(n=$C(n)),Zm(e,t,n,r,o,i)}function Zm(e,t,n,r,o,i){if(e.type&3){let s=Je(e,t);r=i!=null?i(r,e.value||``,n):r,o.setProperty(s,n,r)}else e.type&12}function GC(e,t){let n=et$1(t,e);n[R]&16||(n[R]|=64)}function qC(e,t,n){let r=n.directiveStart,o=n.directiveEnd;Kt(n)&&jC(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Kg(n,t);let i=n.initialInputs;for(let s=r;s<o;s++){let a=e.data[s],c=Ea$1(t,e,s,n);if(qr$1(c,t),i!==null&&XC(t,s-r,c,a,n,i),Xt$1(a)){let u=et$1(n.index,t);u[oe$1]=Ea$1(t,e,s,n)}}}function WC(e,t,n){let r=n.directiveStart,o=n.directiveEnd,i=n.index,s=Gp();try{Tn$1(i);for(let a=r;a<o;a++){let c=e.data[a],u=t[a];Ks(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&ZC(c,u)}}finally{Tn$1(-1),Ks(s)}}function ZC(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function YC(e,t){let n=e.directiveRegistry,r=null;if(n)for(let o=0;o<n.length;o++){let i=n[o];Om(t,i.selectors,!1)&&(r??=[],Xt$1(i)?r.unshift(i):r.push(i))}return r}function QC(e,t,n,r,o,i){let s=Je(e,t);KC(t[X],s,i,e.value,n,r,o)}function KC(e,t,n,r,o,i,s){if(i==null)s?.(i,r||``,o),e.removeAttribute(t,o,n);else{let a=s==null?Z(i):s(i,r||``,o);e.setAttribute(t,o,a,n)}}function XC(e,t,n,r,o,i){let s=i[t];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],u=s[a+1];sd(r,n,c,u)}}function Ym(e,t,n,r,o){let i=ie+n,s=t[T],a=o(s,t,e,r,n);t[i]=a,jr$1(e,!0);let c=e.type===2;return c?(Mm(t[X],a,e),(Lp()===0||Gs(e))&&qr$1(a,t),Fp()):qr$1(a,t),ta$1()&&(!c||!La$1(e))&&Hd(s,t,a,e),e}function Qm(e){let t=e;return vl()?Dl():(t=t.parent,jr$1(t,!1)),t}function JC(e,t){let n=e[Yt];if(!n)return;let r;try{r=n.get(ze$2,null)}catch(o){r=null}r?.(t)}function Zd(e,t,n,r,o){let i=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let u=s[c],l=s[c+1],d=t.data[u];sd(d,n[u],l,o),a=!0}if(i)for(let c of i){let u=n[c],l=t.data[c];sd(l,u,r,o),a=!0}return a}function eb(e,t){let n=et$1(t,e),r=n[T];tb(r,n);let o=n[ut$2];o!==null&&n[Kn]===null&&(n[Kn]=gm(o,n[Yt])),$(L.ComponentStart);try{Yd(r,n,n[oe$1])}finally{$(L.ComponentEnd,n[oe$1])}}function tb(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Yd(e,t,n){Js(t);try{let r=e.viewQuery;r!==null&&Zl(1,r,n);let o=e.template;o!==null&&qm(e,t,o,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Tt$1]?.finishViewCreation(e),e.staticContentQueries&&mm(e,t),e.staticViewQueries&&Zl(2,e.viewQuery,n);let i=e.components;i!==null&&nb(t,i)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[R]&=-5,ea$1()}}function nb(e,t){for(let n=0;n<t.length;n++)eb(e,t[n])}function ci(e,t,n,r){let o=C(null);try{let i=t.tView,c=Gd(e,i,n,e[R]&4096?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);c[bn$1]=e[t.index];let l=e[Tt$1];return l!==null&&(c[Tt$1]=l.createEmbeddedView(i)),Yd(i,c,n),c}finally{C(o)}}function Wr$1(e,t){return!t||t.firstChild===null||im(e)}function Xo(e,t,n,r,o=!1){if(e.type===3){let i=e.firstChild,s=i.next,a=we(t[i.index]),c=we(t[s.index]),u=a;for(;u!==null&&(r.push(u),u!==c);)u=u.nextSibling;return r}for(;n!==null;){if(n.type===128){n=o?n.projectionNext:n.next;continue}let i=t[n.index];if(i!==null)if(Xe(i)){let a=i[er$1];a!==i[ut$2]&&r.push(we(i)),i[R]&4||Km(i,r),r.push(a)}else r.push(we(i));let s=n.type;if(s&8)Xo(e,t,n.child,r);else if(s&32){let a=jd(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=Vm(t,n);if(Array.isArray(a))r.push(...a);else{let c=qt$1(t[Te]);Xo(c[T],c,a,r,!0)}}n=o?n.projectionNext:n.next}return r}function Km(e,t){for(let n=se$1;n<e.length;n++){let r=e[n],o=r[T].firstChild;o!==null&&Xo(r[T],r,o,t)}}function Xm(e){if(e[Jn]!==null){for(let t of e[Jn])t.impl.addSequence(t);e[Jn].length=0}}var Jm=[];function rb(e){return e[$e]??ob(e)}function ob(e){let t=Jm.pop()??Object.create(sb);return t.lView=e,t}function ib(e){e.lView[$e]!==e&&(e.lView=null,Jm.push(e))}var sb=j(m({},Un),{consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{Fr$1(e.lView)},consumerOnSignalRead(){this.lView[$e]=this}});function ab(e){let t=e[$e]??Object.create(cb);return t.lView=e,t}var cb=j(m({},Un),{consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=qt$1(e.lView);for(;t&&!ey(t[T]);)t=qt$1(t);t&&ll(t)},consumerOnSignalRead(){this.lView[$e]=this}});function ey(e){return e.type!==2}function ty(e){if(e[Pr$1]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Pr$1])if(r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()),e[Pr$1]===null))return;t=n&&!!(e[R]&8192)}}var ub=100;function ny(e,t=0){let r=e[lt$1].rendererFactory;r.begin?.();try{lb(e,t)}finally{r.end?.()}}function lb(e,t){let n=El();try{Il(!0),ad(e,t);let r=0;for(;$o(e);){if(r===ub)throw new y(103,!1);r++,ad(e,1)}}finally{Il(n)}}function db(e,t,n,r){if(nr$1(t))return;let o=t[R];Js(t);let a=!0,c=null,u=null;ey(e)?(u=rb(t),c=Bn(u)):Qi$1()===null?(a=!1,u=ab(t),c=Bn(u)):t[$e]&&(Eo$1(t[$e]),t[$e]=null);try{ul(t),Cl(e.bindingStartIndex),n!==null&&qm(e,t,n,2,r);let l=(o&3)===3;if(l){let f=e.preOrderCheckHooks;f!==null&&da(t,f,null)}else{let f=e.preOrderHooks;f!==null&&fa$1(t,f,0,null),kl(t,0)}if(fb(t),ty(t),ry(t,0),e.contentQueries!==null&&mm(e,t),true)if(l){let f=e.contentCheckHooks;f!==null&&da(t,f)}else{let f=e.contentHooks;f!==null&&fa$1(t,f,1),kl(t,1)}pb(e,t);let d=e.components;d!==null&&iy(t,d,0);let h=e.viewQuery;if(h!==null&&Zl(2,h,r),true)if(l){let f=e.viewCheckHooks;f!==null&&da(t,f)}else{let f=e.viewHooks;f!==null&&fa$1(t,f,2),kl(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[zs]){for(let f of t[zs])f();t[zs]=null}Xm(t),t[R]&=-73}catch(l){let d=!1,h=l,f=t;for(;f!==null;){if(Xe(f)){f=f[ce$1];continue}let g=f[Vo$1];if(g)try{let v=t[Te][oe$1],_={declarationInstance:v,declarationType:v?.constructor,caughtBy:g};g(rg(h),_),d=!0;break}catch(v){h=v}f=f[ce$1]}if(!d)throw Fr$1(t),h}finally{u!==null&&(vr$1(u,c),a&&ib(u)),ea$1()}}function ry(e,t){for(let n=am(e);n!==null;n=cm(n))for(let r=se$1;r<n.length;r++){let o=n[r];oy(o,t)}}function fb(e){for(let t=am(e);t!==null;t=cm(t)){if(!(t[R]&2))continue;let n=t[tr$1];for(let r=0;r<n.length;r++){let o=n[r];ll(o)}}}function hb(e,t,n){$(L.ComponentStart);let r=et$1(t,e);try{oy(r,n)}finally{$(L.ComponentEnd,r[oe$1])}}function oy(e,t){Zs(e)&&ad(e,t)}function ad(e,t){let r=e[T],o=e[R],i=e[$e],s=!!(t===0&&o&16);if(s||=!!(o&64&&t===0),s||=!!(o&1024),s||=!!(i?.dirty&&Ki$1(i)),s||=!1,i&&(i.dirty=!1),e[R]&=-9217,s)db(r,e,r.template,e[oe$1]);else if(o&8192){let a=C(null);try{ty(e),ry(e,1);let c=r.components;c!==null&&iy(e,c,1),Xm(e)}finally{C(a)}}}function iy(e,t,n){for(let r=0;r<t.length;r++)hb(e,t[r],n)}function pb(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let o=n[r];if(o<0)Tn$1(~o);else{let i=o,s=n[++r],a=n[++r];zp(s,i);let c=t[i];$(L.HostBindingsUpdateStart,c);try{a(2,c)}finally{$(L.HostBindingsUpdateEnd,c)}}}}finally{Tn$1(-1)}}function Qd(e,t){let n=El()?64:1088;for(e[lt$1].changeDetectionScheduler?.notify(t);e;){e[R]|=n;let r=qt$1(e);if(Lr$1(e)&&!r)return e;e=r}return null}function sy(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function ay(e,t){let n=se$1+t;if(n<e.length)return e[n]}function ui(e,t,n,r=!0){let o=t[T];
vendor: 4,092 bytes, line 4
4if(gb(o,t,e,n),r){let s=id(n,e),a=t[X],c=a.parentNode(e[er$1]);c!==null&&SC(o,e[Ie],a,t,c,s)}let i=t[Kn];i!==null&&i.firstChild!==null&&(i.firstChild=null)}function cy(e,t){let n=Jo$1(e,t);return n!==void 0&&Ba$1(n[T],n),n}function Jo$1(e,t){if(e.length<=se$1)return;let n=se$1+t,r=e[n];if(r){let o=r[bn$1];o!==null&&o!==e&&Vd(o,r),t>0&&(e[n-1][Ke]=r[Ke]);let i=Fo$1(e,se$1+t);bC(r[T],r);let s=i[Tt$1];s!==null&&s.detachView(i[T]),r[ce$1]=null,r[Ke]=null,r[R]&=-129}return r}function gb(e,t,n,r){let o=se$1+r,i=n.length;r>0&&(n[o-1][Ke]=t),r<i-se$1?(t[Ke]=n[o],Ku(n,se$1+r,t)):(n.push(t),t[Ke]=null),t[ce$1]=n;let s=t[bn$1];s!==null&&n!==s&&uy(s,t);let a=t[Tt$1];a!==null&&a.insertView(e),Ys(t),t[R]|=128}function uy(e,t){let n=e[tr$1],r=t[ce$1];if(Qt(r))e[R]|=2;else{let o=r[ce$1][Te];t[Te]!==o&&(e[R]|=2)}n===null?e[tr$1]=[t]:n.push(t)}var _n$1=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[T];return Xo(n,t,n.firstChild,[])}constructor(t,n){this._lView=t,this._cdRefInjectingView=n}get context(){return this._lView[oe$1]}set context(t){this._lView[oe$1]=t}get destroyed(){return nr$1(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[ce$1];if(Xe(t)){let n=t[Ho$1],r=n?n.indexOf(this):-1;r>-1&&(Jo$1(t,r),Fo$1(n,r))}this._attachedToViewContainer=!1}Ba$1(this._lView[T],this._lView)}onDestroy(t){Qs(this._lView,t)}markForCheck(){Qd(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[R]&=-129}reattach(){Ys(this._lView),this._lView[R]|=128}detectChanges(){this._lView[R]|=1024,ny(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new y(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Lr$1(this._lView),n=this._lView[bn$1];n!==null&&!t&&Vd(n,this._lView),jm(this._lView[T],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new y(902,!1);this._appRef=t;let n=Lr$1(this._lView),r=this._lView[bn$1];r!==null&&!n&&uy(r,this._lView),Ys(this._lView)}};var Zr$1=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=mb;constructor(n,r,o){this._declarationLView=n,this._declarationTContainer=r,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,r){return this.createEmbeddedViewImpl(n,r)}createEmbeddedViewImpl(n,r,o){return new _n$1(ci(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:r,dehydratedView:o}))}}return e})();function mb(){return Kd(_e(),M())}function Kd(e,t){return e.type&4?new Zr$1(t,e,Kr$1(e,t)):null}function li(e,t,n,r,o){let i=e.data[t];if(i===null)i=yb(e,t,n,r,o),$p()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=Vp();i.injectorIndex=s===null?-1:s.injectorIndex}return jr$1(i,!0),i}function yb(e,t,n,r,o){let i=yl(),s=vl(),a=s?i:i&&i.parent,c=e.data[t]=Db(e,a,n,t,r,o);return vb(e,c,i,s),c}function vb(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Db(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return pl()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,namespace:_l(),attrs:i,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Eb(e){let t=e[ol]??[],r=e[ce$1][X],o=[];for(let i of t)i.data[fm]!==void 0?o.push(i):Ib(i,r);e[ol]=o}function Ib(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[dm];for(;n<o;){let i=r.nextSibling;_m(t,r,!1),r=i,n++}
4}}var wb=()=>null;var Cb=()=>null;function Ca$1(e,t){return wb(e,t)}function ly(e,t,n){return Cb(e,t,n)}var dy=class{};var ir$1=class{};var Mn$1=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>bb()};function bb(){let e=M(),n=et$1(_e().index,e);return(Qt(n)?n:e)[X]}var fy=(()=>{class e{static ɵprov=S({token:e,providedIn:`root`,factory:()=>null})}return e})();function hy(e){return e.debugInfo?.className||e.type.name||null}var pa$1={};var ba$1=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let o=this.injector.get(t,pa$1,r);return o!==pa$1||n===pa$1?o:this.parentInjector.get(t,n,r)}};function py(e,t,n){return e[t]=n}function Sb(e,t){return e[t]}function tt$2(e,t,n){if(n===te$1)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function ei(e,t,n,r){let o=tt$2(e,t,n);return tt$2(e,t+1,r)||o}function Sa$1(e,t,n,r,o,i){let s=ei(e,t,n,r);return ei(e,t+2,o,i)||s}function ga$1(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&Sw(o,i);Qd(Kt(e)?et$1(e.index,t):t,5);let a=t[oe$1],c=Sg(t,a,n,o),u=r.__ngNextListenerFn__;for(;u;)c=Sg(t,a,u,o)&&c,u=u.__ngNextListenerFn__;return c}}function Sg(e,t,n,r){let o=C(null);try{return $(L.OutputStart,t,n),n(r)!==!1}catch(i){return JC(e,i),!1}finally{$(L.OutputEnd,t,n),C(o)}}function gy(e,t,n,r,o,i,s,a){let c=Gs(e),u=!1,l=null;if(!r&&c&&(l=_b(t,n,i,e.index)),l!==null){let d=l.__ngLastListenerFn__||l;d.__ngNextListenerFn__=s,l.__ngLastListenerFn__=s,u=!0}else{let d=Je(e,n),h=r?r(d):d;r||(a.__ngNativeEl__=d);let f=o.listen(h,i,a);if(!Tb(i))my(r?v=>r(we(v[e.index])):e.index,t,n,i,a,f,!1)}return u}function Tb(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function _b(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;i<o.length-1;i+=2){let s=o[i];if(s===n&&o[i+1]===r){let a=t[Or$1],c=o[i+2];return a&&a.length>c?a[c]:null}typeof s==`string`&&(i+=2)}return null}function my(e,t,n,r,o,i,s){let a=t.firstCreatePass?fl(t):null,c=dl(n),u=c.length;c.push(o,i),a&&a.push(r,e,u,(u+1)*(s?-1:1))}function Tg(e,t,n,r,o,i){let s=t[n],a=t[T],d=s[a.data[n].outputs[r]].subscribe(i);my(e.index,a,t,o,i,d,!0)}var cd=Symbol(`BINDING`);var ur$1=new D(``);function Ta$1(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a==`number`)i=a;else if(i==1)o=ks(o,a);else if(i==2){let c=a,u=t[++s];r=ks(r,c+`: `+u+`;`)}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=o:e.classesWithoutHost=o}function Ce(e,t=0){let n=M();if(n===null)return w(e,t);return tm(_e(),n,Be$1(e),t)}function di(){throw new Error(`invalid`)}function Mb(e,t,n,r,o){let i=r===null?null:{"":-1},s=o(e,n);if(s!==null){let a=s,c=null,u=null;for(let l of s)if(l.resolveHostDirectives!==null){[a,c,u]=l.resolveHostDirectives(s);break}Ab(e,t,n,a,i,c,u)}i!==null&&r!==null&&Nb(n,r,i)}function Nb(e,t,n){let r=e.localNames=[];for(let o=0;o<t.length;o+=2){let i=n[t[o+1]];if(i==null)throw new y(-301,!1);r.push(t[o],i)}}function Rb(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function Ab(e,t,n,r,o,i,s){let a=r.length,c=null;for(let h=0;h<a;h++){let f=r[h];c===null&&Xt$1(f)&&(c=f,Rb(e,n,h)),hw(Kg(n,t),e,f.type)}Fb(n,e.data.length,a),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let h=0;h<a;h++){let f=r[h];f.providersResolver&&f.providersResolver(f)}let u=!1,l=!1,d=zm(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let h=0;h<a;h++){let f=r[h];if(n.mergedAttrs=Gr$1(n.mergedAttrs,f.hostAttrs),Ob(e,n,t,d,f),Lb(
4d,f,o),s!==null&&s.has(f)){let[v,I]=s.get(f);n.directiveToIndex.set(f.type,[d,v+n.directiveStart,I+n.directiveStart])}else(i===null||!i.has(f))&&n.directiveToIndex.set(f.type,d);f.contentQueries!==null&&(n.flags|=4),(f.hostBindings!==null||f.hostAttrs!==null||f.hostVars!==0)&&(n.flags|=64);let g=f.type.prototype;!u&&(g.ngOnChanges||g.ngOnInit||g.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),u=!0),!l&&(g.ngOnChanges||g.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),l=!0),d++}xb(e,n,i)}function xb(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let o=e.data[r];if(n===null||!n.has(o))_g(0,t,o,r),_g(1,t,o,r),Ng(t,r,!1);else{let i=n.get(o);Mg(0,t,i,r),Mg(1,t,i,r),Ng(t,r,!0)}}}function _g(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[i]??=[],s[i].push(r),yy(t,i)}}function Mg(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s=o[i],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,i),yy(t,s)}}function yy(e,t){t===`class`?e.flags|=8:t===`style`&&(e.flags|=16)}function Ng(e,t,n){let{attrs:r,inputs:o,hostDirectiveInputs:i}=e;if(r===null||!n&&o===null||n&&i===null||Fd(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c==`number`)break;if(!n&&Object.hasOwn(o,c)){let u=o[c];for(let l of u)if(l===t){s??=[],s.push(c,r[a+1]);break}}else if(n&&Object.hasOwn(i,c)){let u=i[c];for(let l=0;l<u.length;l+=2)if(u[l]===t){s??=[],s.push(u[l+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function Ob(e,t,n,r,o){e.data[r]=o;let s=new Ko(o.factory||(o.factory=Dn(o.type,!0)),Xt$1(o),Ce,null);e.blueprint[r]=s,n[r]=s,kb(e,t,r,zm(e,n,o.hostVars,te$1),o)}function kb(e,t,n,r,o){let i=o.hostBindings;if(i){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;Pb(s)!=a&&s.push(a),s.push(n,r,i)}}function Pb(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Lb(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Xt$1(t)&&(n[``]=e)}}function Fb(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function vy(e,t,n,r,o,i,s,a){let c=t[T],u=c.consts,d=li(c,e,n,r,_t$1(u,s));return i&&Mb(c,t,d,_t$1(u,a),o),d.mergedAttrs=Gr$1(d.mergedAttrs,d.attrs),d.attrs!==null&&Ta$1(d,d.attrs,!1),d.mergedAttrs!==null&&Ta$1(d,d.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,d),d}function Dy(e,t){rw(e,t),il(t)&&e.queries.elementEnd(t)}function jb(e,t,n,r,o,i){let s=t.consts,c=li(t,e,n,r,_t$1(s,o));if(c.mergedAttrs=Gr$1(c.mergedAttrs,c.attrs),i!=null){let u=_t$1(s,i);c.localNames=[];for(let l=0;l<u.length;l+=2)c.localNames.push(u[l],-1)}return c.attrs!==null&&Ta$1(c,c.attrs,!1),c.mergedAttrs!==null&&Ta$1(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}var Ey=typeof ShadowRoot<`u`;var Ub=typeof Document<`u`;function Bb(e){return Object.keys(e).map(t=>{let[n,r,o]=e[t],i={propName:n,templateName:t,isSignal:(r&Ha$1.SignalBased)!==0};return o&&(i.transform=o),i})}function Vb(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Hb(e,t,n){let r=t instanceof re?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new ba$1(n,r):n}function $b(e){let t=e.get(ir$1,null);if(t===null)throw new y(407,!1);return{rendererFactory:t,sanitizer:e.get(fy,null),changeDetectionScheduler:e.get(Wt$1,null),ngReflect:!1,tracingService:e.get(gt,null,{optional:!0})}}function zb(e,t,n){let r=Iy(e);return Sm(t,r,r===`svg`?Yn:r===`math`?qs:n)}function Gb(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new y(905,!1)}function Iy(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Yr$1=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Bb(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Vb(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=gC(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a,c){$(L.DynamicComponentStart);let u=C(null);try{let l=this.componentDef,d=Hb(l,o||this.ngModule,t),h=$b(d),f=h.tracingService;return f&&f.componentCreate?f.componentCreate(hy(l),()=>this.createComponentRef(h,d,n,r,i,s,a,c)):this.createComponentRef(h,d,n,r,i,s,a,c)}finally{C(u)}}createComponentRef(t,n,r,o,i,s,a,c){let u=this.componentDef,l=qb(o,u,s,i,c),d=t.rendererFactory.createRenderer(null,u),h=o?BC(d,o,u.encapsulation,n):zb(u,d,a??null);Gb(h);let f=n.get(ur$1,null),g=Wb(h,()=>n.get(Y,null)??lm());f&&f.addHost(g);let v=s?.some(Rg)||i?.some(E=>typeof E!=`function`&&E.bindings.some(Rg)),I=Gd(null,l,null,512|$m(u),null,null,t,d,n,null,gm(h,n,!0));f&&Ey&&g instanceof ShadowRoot&&Qs(I,()=>{f.removeHost(g)}),I[ie]=h,Js(I);let _=null;try{let E=vy(ie,I,2,`#host`,()=>l.directiveRegistry,!0,0);Mm(d,h,E),qr$1(h,I),Wm(l,I,E),ym(l,E,I),Dy(l,E),r!==void 0&&Yb(E,this.ngContentSelectors,r),_=et$1(E.index,I),I[oe$1]=_[oe$1],Yd(l,I,null)}catch(E){throw _!==null&&ql(_),ql(I),E}finally{$(L.DynamicComponentEnd),ea$1()}return new _a(this.componentType,I,!!v)}};function qb(e,t,n,r,o){let i=e?[`ng-version`,`22.2.1`]:mC(t.selectors[0]),s=null,a=null,c=0;if(n)for(let d of n)c+=d[cd].requiredVars,d.create&&(d.targetIdx=0,(s??=[]).push(d)),d.update&&(d.targetIdx=0,(a??=[]).push(d));if(r)for(let d=0;d<r.length;d++){let h=r[d];if(typeof h!=`function`)for(let f of h.bindings){c+=f[cd].requiredVars;let g=d+1;f.create&&(f.targetIdx=g,(s??=[]).push(f)),f.update&&(f.targetIdx=g,(a??=[]).push(f))}}let u=[t];if(r)for(let d of r){let f=Fs(typeof d==`function`?d:d.type);u.push(f)}return zd(0,null,Zb(s,a),1,c,u,null,null,null,[i],null)}function Wb(e,t){let n=e.getRootNode?.();return Ub&&n instanceof Document?n.head:n&&Ey&&n instanceof ShadowRoot?n:t().head}function Zb(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let r of e)r.create();
4if(n&2&&t)for(let r of t)r.update()}}function Rg(e){let t=e[cd].kind;return t===`input`||t===`twoWay`}var _a=class extends dy{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=Ws(n[T],ie),this.location=Kr$1(this._tNode,n),this.instance=et$1(this._tNode.index,n)[oe$1],this.hostView=this.changeDetectorRef=new _n$1(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let o=this._rootLView;Zd(r,o[T],o,t,n);this.previousInputValues.set(t,n);Qd(et$1(r.index,o),1)}get injector(){return new Jt$1(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function Yb(e,t,n){let r=e.projection=[];for(let o=0;o<t.length;o++){let i=n[o];r.push(i!=null&&i.length?Array.from(i):null)}}var lr$1=(()=>{class e{static __NG_ELEMENT_ID__=Qb}return e})();function Qb(){return wy(_e(),M())}var ud=class e extends lr$1{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Kr$1(this._hostTNode,this._hostLView)}get injector(){return new Jt$1(this._hostTNode,this._hostLView)}get parentInjector(){let t=Td(this._hostTNode,this._hostLView);if(Zg(t)){let n=va$1(t,this._hostLView),r=ya$1(t),o=n[T].data[r+8];return new Jt$1(o,n)}else return new Jt$1(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Ag(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-se$1}createEmbeddedView(t,n,r){let o,i,s;typeof r==`number`?o=r:r!=null&&(o=r.index,i=r.injector,s=r.onError);let a=Ca$1(this._lContainer,t.ssrId),c=t.createEmbeddedViewImpl(n||{},i,a);return s&&(c._lView[Vo$1]=s),this.insertImpl(c,o,Wr$1(this._hostTNode,a)),c}createComponent(t,n,r,o,i,s,a){let c,u,l=n||{};c=l.index,r=l.injector,o=l.projectableNodes,i=l.environmentInjector||l.ngModuleRef,s=l.directives,a=l.bindings,u=l.onError;let d=new Yr$1(En$1(t)),h=r||this.parentInjector;if(!i&&d.ngModule==null){let E=this.parentInjector.get(re,null);E&&(i=E)}let f=En$1(d.componentType??{}),g=Ca$1(this._lContainer,f?.id??null),v=g?.firstChild??null,I=d.create(h,o,v,i,s,a,this._getHostElementNamespace());return u&&(I.hostView._lView[Vo$1]=u),this.insertImpl(I.hostView,c,Wr$1(this._hostTNode,g)),I}_getHostElementNamespace(){if(this._hostTNode.type&2){let t=this._hostTNode.parent??this._hostLView[Ie];return t!==null&&t.type&2&&typeof t.value==`string`&&t.value.toLowerCase()===`foreignobject`?null:t?.namespace??null}return this._hostTNode.namespace}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(xp(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=o[ce$1],u=new e(c,c[Ie],c[ce$1]);u.detach(u.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return ui(s,o,i,r),t.attachToViewContainerRef(),Ku(Fl(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Ag(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=Jo$1(this._lContainer,n);r&&(Fo$1(Fl(this._lContainer),n),Ba$1(r[T],r))}detach(t){let n=this._adjustIndex(t,-1),r=Jo$1(this._lContainer,n);return r&&Fo$1(Fl(this._lContainer),n)!=null?new _n$1(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function Ag(e){return e[Ho$1]}function Fl(e){return e[Ho$1]||(e[Ho$1]=[])}function wy(e,t){let n,r=t[e.index];return Xe(r)?n=r:(n=sy(r,t,null,e),t[e.index]=n,qd(t,n)),Xb(n,t,e,r),new ud(n,e,t)}function Kb(e,t){let n=e[X],r=n.createComment(``),o=Je(t,e);return or$1(n,n.parentNode(o),r,n.nextSibling(o),!1),r}var Xb=tS;var Jb=()=>!1;function eS(e,t,n){return Jb(e,t,n)}function tS(e,t,n,r){if(e[er$1])return;let o;n.type&8?o=we(r):o=Kb(t,n),e[er$1]=o}var ld=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}};var dd=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,o=[];for(let i=0;i<r;i++){let s=n.getByIndex(i),a=this.queries[s.indexInDeclarationView];o.push(a.clone())}return new e(o)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)Xd(t,n).matches!==null&&this.queries[n].setDirty()}};var Ma$1=class{flags;read;predicate;constructor(t,n,r=null){this.flags=n,this.read=r,typeof t==`string`?this.predicate=uS(t):this.predicate=t}};var fd=class e{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let o=n!==null?n.length:0,i=this.getByIndex(r).embeddedTView(t,o);i&&(i.indexInDeclarationView=r,n!==null?n.push(i):n=[i])}return n!==null?new e(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}};var hd=class e{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}
vendor: 5,027 bytes, line 4
4matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];this.matchTNodeWithReadOption(t,n,nS(n,i)),this.matchTNodeWithReadOption(t,n,ha$1(n,t,i,!1,!1))}else r===Zr$1?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,ha$1(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let o=this.metadata.read;if(o!==null)if(o===Rt$1||o===lr$1||o===Se||o===Zr$1&&n.type&4)this.addMatch(n.index,-2);else{let i=ha$1(n,t,o,!1,!1);i!==null&&this.addMatch(n.index,i)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function nS(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function rS(e,t){return e.type&11?Kr$1(e,t):e.type&4?Kd(e,t):null}function oS(e,t,n,r){return n===-1?rS(t,e):n===-2?iS(e,t,r):Ea$1(e,e[T],n,t)}function iS(e,t,n){if(n===Rt$1)return Kr$1(t,e);if(n===Zr$1)return Kd(t,e);if(n===lr$1)return wy(t,e);if(n===Se)return new Jt$1(t,e)}function Cy(e,t,n,r){let o=t[Tt$1].queries[r];if(o.matches===null){let i=e.data,s=n.matches,a=[];for(let c=0;s!==null&&c<s.length;c+=2){let u=s[c];if(u<0)a.push(null);else{let l=i[u];a.push(oS(t,l,s[c+1],n.metadata.read))}}o.matches=a}return o.matches}function pd(e,t,n,r){let o=e.queries.getByIndex(n),i=o.matches;if(i!==null){let s=Cy(e,t,o,n);for(let a=0;a<i.length;a+=2){let c=i[a];if(c>0)r.push(s[a/2]);else{let u=i[a+1],l=t[-c];for(let d=se$1;d<l.length;d++){let h=l[d];h[bn$1]===h[ce$1]&&pd(h[T],h,u,r)}if(l[tr$1]!==null){let d=l[tr$1];for(let h=0;h<d.length;h++){let f=d[h];pd(f[T],f,u,r)}}}}}return r}function sS(e,t){return e[Tt$1].queries[t].queryList}function by(e,t,n){let r=new Ia$1((n&4)===4);return Pp(e,t,r,r.destroy),(t[Tt$1]??=new dd).queries.push(new ld(r))-1}function aS(e,t,n){let r=me();return r.firstCreatePass&&(Sy(r,new Ma$1(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),by(r,M(),t)}function cS(e,t,n,r){let o=me();if(o.firstCreatePass){let i=_e();Sy(o,new Ma$1(t,n,r),i.index),lS(o,e),(n&2)===2&&(o.staticContentQueries=!0)}return by(o,M(),n)}function uS(e){return e.split(`,`).map(t=>t.trim())}function Sy(e,t,n){e.queries===null&&(e.queries=new fd),e.queries.track(new hd(t,n))}function lS(e,t){let n=e.contentQueries||(e.contentQueries=[]);t!==(n.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}function Xd(e,t){return e.queries.getByIndex(t)}function dS(e,t){let n=e[T],r=Xd(n,t);return r.crossesNgTemplate?pd(n,e,t,[]):Cy(n,e,r,t)}function Xr$1(e){return!!e&&typeof e.then==`function`}function Jd(e){return!!e&&typeof e.subscribe==`function`}var sr$1=class{};var $a$1=class{};var Na$1=class extends sr$1{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];constructor(t,n,r,o=!0){super(),this.ngModuleType=t,this._parent=n;let i=gp(t);this._bootstrapComponents=oC(i.bootstrap),this._r3Injector=Ml(t,n,[{provide:sr$1,useValue:this},...r],Oo$1(t),new Set([`environment`])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}};var Ra=class extends $a$1{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new Na$1(this.moduleType,t,[])}};var ti=class extends sr$1{injector;instance=null;constructor(t){super();let n=new Zn([...t.providers,{provide:sr$1,useValue:this}],t.parent||Uo$1(),t.debugName,new Set([`environment`]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Jr$1(e,t,n=null){return new ti({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var fS=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Ju(!1,n.type),o=r.length>0?Jr$1([r],this._injector,``):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=S({token:e,providedIn:`environment`,factory:()=>new e(w(re))})}return e})();function ef(e){return oi(()=>{let t=Ty(e),n=j(m({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==_d.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(fS).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||pt$1.Emulated,styles:e.styles||Oe,_:null,schemas:e.schemas||null,tView:null,id:``});t.standalone&&mt$1(`NgStandalone`),_y(n);
4let r=e.dependencies;return n.directiveDefs=xg(r,hS),n.pipeDefs=xg(r,mp),n.id=mS(n),n})}function hS(e){return En$1(e)||Fs(e)}function rn$1(e){return oi(()=>({type:e.type,bootstrap:e.bootstrap||Oe,declarations:e.declarations||Oe,imports:e.imports||Oe,exports:e.exports||Oe,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function pS(e,t){if(e==null)return In$1;let n={};for(let r in e)if(Object.hasOwn(e,r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=Ha$1.None,c=null),n[i]=[r,a,c],t[i]=s}return n}function gS(e){if(e==null)return In$1;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function dr$1(e){return oi(()=>{let t=Ty(e);return _y(t),t})}function tf(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ty(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||In$1,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Oe,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:pS(e.inputs,t),outputs:gS(e.outputs),debugInfo:null}}function _y(e){e.features?.forEach(t=>t(e))}function xg(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let o of n){let i=t(o);i!==null&&r.push(i)}return r}:null}function mS(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join(`|`))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var nf=new D(``);function za(e){return Zt$1([{provide:nf,multi:!0,useValue:e}])}var rf=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=p(nf,{optional:!0})??[];injector=p(Se);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=de(this.injector,o);if(Xr$1(i))n.push(i);else if(Jd(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function yS(e){return Object.getPrototypeOf(e.prototype).constructor}function My(e){let t=yS(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let o,i=Object.hasOwn(t,Po$1)?t[Po$1]:void 0,s=Object.hasOwn(t,Lo$1)?t[Lo$1]:void 0;if(Xt$1(e))o=i??s;else{if(i)throw new y(903,!1);o=s}if(o){if(n){r.push(o);let c=e;c.inputs=jl(e.inputs),c.declaredInputs=jl(e.declaredInputs),c.outputs=jl(e.outputs);let u=o.hostBindings;u&&wS(e,u);let l=o.viewQuery,d=o.contentQueries;if(l&&ES(e,l),d&&IS(e,d),vS(e,o),pp(e.outputs,o.outputs),Xt$1(o)&&o.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(o.data.animation)}}let a=o.features;if(a)for(let c=0;c<a.length;c++){let u=a[c];u&&u.ngInherit&&u(e),u===My&&(n=!1)}}t=Object.getPrototypeOf(t)}DS(r)}function vS(e,t){for(let n in t.inputs){if(!Object.hasOwn(t.inputs,n)||Object.hasOwn(e.inputs,n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function DS(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=Gr$1(o.hostAttrs,n=Gr$1(n,o.hostAttrs))}}function jl(e){return e===In$1?{}:e===Oe?[]:e}function ES(e,t){let n=e.viewQuery;n?e.viewQuery=(r,o)=>{t(r,o),n(r,o)}:e.viewQuery=t}function IS(e,t){let n=e.contentQueries;n?e.contentQueries=(r,o,i)=>{t(r,o,i),n(r,o,i)}:e.contentQueries=t}function wS(e,t){let n=e.hostBindings;n?e.hostBindings=(r,o)=>{t(r,o),n(r,o)}:e.hostBindings=t}function CS(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=Gr$1(e.mergedAttrs,e.attrs);let l=e.tView=zd(2,e,o,i,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),l.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),jr$1(e,!1);let c=bS(n,t,e,r);ta$1()&&Hd(n,t,c,e),qr$1(c,t);let u=sy(c,t,c,e);t[r+ie]=u,qd(t,u),eS(u,e,t)}function ni(e,t,n,r,o,i,s,a,c,u,l){let d=n+ie,h;if(t.firstCreatePass){if(h=li(t,d,4,s||null,a||null),u!=null){let f=_t$1(t.consts,u);h.localNames=[];for(let g=0;g<f.length;g+=2)h.localNames.push(f[g],-1)}}else h=t.data[d];return CS(h,e,t,n,r,o,i,c),u!=null&&Wd(e,h,l),h}var bS=SS;function SS(e,t,n,r){return na$1(!0),t[X].createComment(``)}var Ga$1=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`platform`})}return e})();var qa$1=new D(``);var eo$1=new D(``);var of=new D(`USE_PENDING_TASKS`,{providedIn:`root`,factory:()=>typeof Zone>`u`});var fi=(()=>{class e{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;pendingTasksInternal=p(dt$1);_usePendingTasks=p(of);constructor(n,r,o){this._ngZone=n,this.registry=r,tl()&&(this._destroyRef=p(ke,{optional:!0})??void 0),sf||(Ny(o),o.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this._taskTrackingZone=typeof Zone>`u`?null:Zone.current.get(`TaskTrackingZone`)})}_watchAngularEvents(){let n=this._ngZone.onUnstable.subscribe({next:()=>
4{this._isZoneStable=!1}}),r,o;this._ngZone.runOutsideAngular(()=>{this._usePendingTasks&&(r=this.pendingTasksInternal.hasPendingTasksObservable.subscribe(()=>{this.isStable()&&this._ngZone.runOutsideAngular(()=>{this._runCallbacksIfReady()})})),o=this._ngZone.onStable.subscribe({next:()=>{z$1.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})}),this._destroyRef?.onDestroy(()=>{n.unsubscribe(),r?.unsubscribe(),o.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks&&(!this._usePendingTasks||!this.pendingTasksInternal.hasPendingTasks)}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(n)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,o){let i=-1;r&&r>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==i),n()},r)),this._callbacks.push({doneCb:n,timeoutId:i,updateCb:o})}whenStable(n,r,o){if(o&&!this._taskTrackingZone)throw new Error(`Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?`);this.addCallback(n,r,o),this._runCallbacksIfReady()}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,o){return[]}static ɵfac=function(r){return new(r||e)(w(z$1),w(hi),w(eo$1))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var hi=(()=>{class e{_applications=new Map;registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return sf?.findTestabilityInTree(this,n,r)??null}static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`platform`})}return e})();function Ny(e){sf=e}var sf;var pi=new D(``);function Ry(){uu(e=>{throw new y(-600,``)})}var TS=10;var At$2=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=p(ze$2);afterRenderManager=p(Bd);zonelessEnabled=p(Br$1);
4rootEffectScheduler=p(Ol);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new ne$1;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=p(dt$1);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(q(n=>!n))}constructor(){p(gt,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=p(re);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=Se.NULL){return this._injector.get(z$1).run(()=>{if($(L.BootstrapComponentStart),!this._injector.get(rf).done)throw new y(405,``);let a=En$1(n),c=this._injector.get(sr$1),u=new Yr$1(a,c);this.componentTypes.push(n);let{hostElement:l,directives:d,bindings:h}=_S(r),f=l||u.selector,g=u.create(o,[],f,c.injector,d,h),v=g.location.nativeElement,I=g.injector.get(qa$1,null);return I?.registerApplication(v),g.onDestroy(()=>{this.detachView(g.hostView),Qo(this.components,g),I?.unregisterApplication(v)}),this._loadComponent(g),$(L.BootstrapComponentEnd,g),g})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){$(L.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ja$1.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw $(L.ChangeDetectionEnd),new y(101,!1);let n=C(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,C(n),this.afterTick.next(),$(L.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ir$1,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<TS;){$(L.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{$(L.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let n=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:o}of this.allViews){if(!r&&!$o(o))continue;ny(o,r&&!this.zonelessEnabled?0:1),n=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}n||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>$o(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Qo(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(n),this._injector.get(pi,[]).forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Qo(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new y(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function _S(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Qo(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Wa$1(e,t,n,r){let o=M();if(tt$2(o,Sn$1(),t)){me();QC(zo$1(),o,e,t,n,r)}return Wa$1}var gd=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function Ul(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function MS(e,t,n,r){let o,i,s=0,a=e.length-1;if(Array.isArray(t)){C(r);let u=t.length-1;for(C(null);s<=a&&s<=u;){let l=e.at(s),d=t[s],h=Ul(s,l,s,d,n);if(h!==0){h<0&&e.updateValue(s,d),s++;continue}
vendor: 4,483 bytes, line 4
4let f=e.at(a),g=t[u],v=Ul(a,f,u,g,n);if(v!==0){v<0&&e.updateValue(a,g),a--,u--;continue}let I=n(s,l),_=n(a,f),E=n(s,d);if(Object.is(E,_)){let O=n(u,g);Object.is(O,I)?(e.swap(s,a),e.updateValue(a,g),u--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new Aa$1,i??=kg(e,s,a,n),md(e,o,s,E))e.updateValue(s,d),s++,a++;else if(i.has(E))o.set(I,e.detach(s)),a--;else{let O=e.create(s,t[s]);e.attach(s,O),s++,a++}}for(;s<=u;)Og(e,o,n,s,t[s]),s++}else if(t!=null){C(r);let u=t[Symbol.iterator]();C(null);let l=u.next();for(;!l.done&&s<=a;){let d=e.at(s),h=l.value,f=Ul(s,d,s,h,n);if(f!==0)f<0&&e.updateValue(s,h),s++,l=u.next();else{o??=new Aa$1,i??=kg(e,s,a,n);let g=n(s,h);if(md(e,o,s,g))e.updateValue(s,h),s++,a++,l=u.next();else if(!i.has(g))e.attach(s,e.create(s,h)),s++,a++,l=u.next();else{let v=n(s,d);o.set(v,e.detach(s)),a--}}}for(;!l.done;)Og(e,o,n,e.length,l.value),l=u.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(u=>{e.destroy(u)})}function md(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Og(e,t,n,r,o){if(md(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function kg(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var Aa$1=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function NS(e,t,n,r,o,i,s,a){mt$1(`NgControlFlow`);let c=M(),u=me();return ni(c,u,e,t,n,r,o,_t$1(u.consts,i),256,s,a),af}function af(e,t,n,r,o,i,s,a){return mt$1(`NgControlFlow`),RS(e,t,n,r,o,i,s,a),af}function RS(e,t,n,r,o,i,s,a){let c=M(),u=me();ni(c,u,e,t,n,r,o,_t$1(u.consts,i),512,s,a)}function AS(e,t){mt$1(`NgControlFlow`);let n=M(),r=Sn$1(),o=n[r]!==te$1?n[r]:-1,i=o!==-1?xa$1(n,ie+o):void 0,s=0;if(tt$2(n,r,e)){let a=C(null);try{if(i!==void 0&&cy(i,s),e!==-1){let c=ie+e,u=xa$1(n,c),l=Ed(n[T],c),d=ly(u,l,n);ui(u,ci(n,l,t,{dehydratedView:d}),s,Wr$1(l,d))}}finally{C(a)}}else if(i!==void 0){let a=ay(i,s);a!==void 0&&(a[oe$1]=t)}}var yd=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-se$1}};function xS(e,t){return t}var vd=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function OS(e,t,n,r,o,i,s,a,c,u,l,d,h){mt$1(`NgControlFlow`);let f=M(),g=me(),v=c!==void 0,I=M(),E=new vd(v,a?s.bind(I[Te][oe$1]):s);I[ie+e]=E,ni(f,g,e+1,t,n,r,o,_t$1(g.consts,i),256),v&&ni(f,g,e+2,c,u,l,d,_t$1(g.consts,h),512)}var Dd=class extends gd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-se$1}at(t){return this.getLView(t)[oe$1].$implicit}attach(t,n){let r=n[Kn];this.needsIndexUpdate||=t!==this.length,ui(this.lContainer,n,t,Wr$1(this.templateTNode,r)),PS(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,LS(this.lContainer,t),FS(this.lContainer,t)}create(t,n){let r=Ca$1(this.lContainer,this.templateTNode.tView.ssrId);return ci(this.hostLView,this.templateTNode,new yd(this.lContainer,n,t),{dehydratedView:r})}destroy(t){Ba$1(t[T],t)}updateValue(t,n){this.getLView(t)[oe$1].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[oe$1].$index=t}getLView(t){return jS(this.lContainer,t)}};function kS(e){let t=C(null),n=Pe();try{let r=M(),o=r[T],i=r[n],s=n+1,a=xa$1(r,s);if(i.liveCollection===void 0)i.liveCollection=new Dd(a,r,Ed(o,s));else i.liveCollection.reset();let c=i.liveCollection;if(MS(c,e,i.trackByFn,t),c.updateIndexes(),i.hasEmptyBlock){let u=Sn$1(),l=c.length===0;if(tt$2(r,u,l)){let d=n+2,h=xa$1(r,d);if(l){let f=Ed(o,d),g=ly(h,f,r);ui(h,ci(r,f,void 0,{dehydratedView:g}),0,Wr$1(f,g))}else o.firstUpdatePass&&Eb(h),cy(h,0)}}}finally{C(t)}}function xa$1(e,t){return e[t]}function PS(e,t){if(e.length<=se$1)return;
4let r=e[se$1+t];r&&CC(r)}function LS(e,t){if(e.length<=se$1)return;let r=e[se$1+t];r&&wC(r)}function FS(e,t){return Jo$1(e,t)}function jS(e,t){return ay(e,t)}function Ed(e,t){return Ws(e,t)}function Ay(e,t,n){let r=M();if(tt$2(r,Sn$1(),t)){me();zC(zo$1(),r,e,t,r[X],n)}return Ay}function Id(e,t,n,r,o){Zd(t,e,n,o?`class`:`style`,r)}function Oa$1(e,t,n,r){let o=M(),i=o[T],s=e+ie,a=i.firstCreatePass?vy(s,o,2,t,YC,jp(),n,r):i.data[s];if(Kt(a)){let c=o[lt$1].tracingService;if(c&&c.componentCreate){let u=i.data[a.directiveStart+a.componentOffset];return c.componentCreate(hy(u),()=>(Pg(e,t,o,a,r),Oa$1))}}return Pg(e,t,o,a,r),Oa$1}function Pg(e,t,n,r,o){if(Ym(r,n,e,t,Oy),Gs(r)){let i=n[T];Wm(i,n,r),ym(i,r,n)}o!=null&&Wd(n,r)}function cf(){let e=me(),n=Qm(_e());return e.firstCreatePass&&Dy(e,n),gl(n)&&ml(),hl(),n.classesWithoutHost!=null&&iw(n)&&Id(e,n,M(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&sw(n)&&Id(e,n,M(),n.stylesWithoutHost,!1),cf}function Za$1(e,t,n,r){return Oa$1(e,t,n,r),cf(),Za$1}function uf(e,t,n,r){let o=M(),i=o[T],s=e+ie,a=i.firstCreatePass?jb(s,i,2,t,n,r):i.data[s];return Ym(a,o,e,t,Oy),r!=null&&Wd(o,a),uf}function lf(){return gl(Qm(_e()))&&ml(),hl(),lf}function xy(e,t,n,r){return uf(e,t,n,r),lf(),xy}var Oy=(e,t,n,r,o)=>(na$1(!0),Sm(t[X],r,_l()));function US(){return M()}function ky(e,t,n){let r=M();if(tt$2(r,Sn$1(),t)){me();Zm(zo$1(),r,e,t,r[X],n)}return ky}var Zo=void 0;function BS(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var VS=[`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`]],Zo,[[`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`]],Zo,[[`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}`,Zo,Zo,Zo],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,BS];var Bl=Object.create(null);function qe$1(e){let t=HS(e),n=Lg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Lg(r),n)return n;if(r===`en`)return VS;throw new y(701,!1)}function Lg(e){if(!(e in Bl)){let t=ge.ng&&ge.ng.common&&ge.ng.common.locales&&ge.ng.common.locales[e];return t!==void 0&&(Bl[e]=t),t}return Bl[e]}var fe$1={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function HS(e){return e.toLowerCase().replace(/_/g,`-`)}var gi=`en-US`;function Py(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function Ya$1(e,t,n){let r=M(),o=me(),i=_e();return zS(o,r,r[X],i,e,t,n),Ya$1}function Ly(e,t,n){let r=M(),o=me(),i=_e();return(i.type&3||n)&&gy(i,o,r,n,r[X],e,t,ga$1(i,r,t)),Ly}function zS(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=ga$1(r,t,i),gy(r,e,t,s,n,o,i,c)&&(a=!1)),a){let u=r.outputs?.[o],l=r.hostDirectiveOutputs?.[o];if(l&&l.length)for(let d=0;d<l.length;d+=2){let h=l[d],f=l[d+1];c??=ga$1(r,t,i),Tg(r,t,h,f,o,c)}if(u&&u.length)for(let d of u)c??=ga$1(r,t,i),Tg(r,t,d,o,o,c)}}function GS(e=1){return Qp(e)}function qS(e,t){let n=null,r=lC(e);for(let o=0;o<t.length;o++){let i=t[o];if(i===`*`){n=o;continue}if(r===null?Om(e,i,!0):hC(r,i))return o}return n}function WS(e){let t=M()[Te][Ie];if(!t.projection){let r=t.projection=wp(e?e.length:1,null),o=r.slice(),i=t.child;for(;i!==null;){if(i.type!==128){let s=e?qS(i,e):0;s!==null&&(o[s]?o[s].projectionNext=i:r[s]=i,o[s]=i)}i=i.next}}}function ZS(e,t=0,n,r,o,i){let s=M(),a=me(),c=r?e+1:null;c!==null&&ni(s,a,c,r,o,i,null,n);let u=li(a,ie+e,16,null,n||null);u.projection===null&&(u.projection=t),Dl();let d=!s[Kn]||pl();s[Te][Ie].projection[u.projection]===null&&c!==null?YS(s,a,c):d&&!La$1(u)&&OC(a,s,u)}
vendor: 6,131 bytes, line 4
4function YS(e,t,n){let r=ie+n,o=t.data[r],i=e[r],s=Ca$1(i,o.tView.ssrId);ui(i,ci(e,o,void 0,{dehydratedView:s}),0,Wr$1(o,s))}function Qa$1(e,t,n,r){return cS(e,t,n,r),Qa$1}function Fy(e,t,n){return aS(e,t,n),Fy}function df(e){let t=M(),n=me(),r=bl();Xs(r+1);let o=Xd(n,r);if(e.dirty&&Ap(t)===((o.metadata.flags&2)===2)){if(o.matches===null)e.reset([]);else{let i=dS(t,r);e.reset(i,Ew),e.notifyOnChanges()}return!0}return!1}function ff(){return sS(M(),bl())}function QS(e){return al(Hp(),ie+e)}function la$1(e,t){return e<<17|t<<2}function ar$1(e){return e>>17&32767}function KS(e){return(e&2)==2}function XS(e,t){return e&131071|t<<17}function wd(e){return e|2}function Qr$1(e){return(e&131068)>>2}function Vl(e,t){return e&-131069|t<<2}function JS(e){return(e&1)===1}function Cd(e){return e|1}function eT(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=ar$1(s),c=Qr$1(s);e[r]=n;let u=!1,l;if(Array.isArray(n)){let d=n;l=d[1],(l===null||xr$1(d,l)>0)&&(u=!0)}else l=n;if(o)if(c!==0){let h=ar$1(e[a+1]);e[r+1]=la$1(h,a),h!==0&&(e[h+1]=Vl(e[h+1],r)),e[a+1]=XS(e[a+1],r)}else e[r+1]=la$1(a,0),a!==0&&(e[a+1]=Vl(e[a+1],r)),a=r;else e[r+1]=la$1(c,0),a===0?a=r:e[c+1]=Vl(e[c+1],r),c=r;u&&(e[r+1]=wd(e[r+1])),Fg(e,l,r,!0),Fg(e,l,r,!1),tT(t,l,e,r,i),s=la$1(a,c),i?t.classBindings=s:t.styleBindings=s}function tT(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t==`string`&&xr$1(i,t)>=0&&(n[r+1]=Cd(n[r+1]))}function Fg(e,t,n,r){let o=e[n+1],i=t===null,s=r?ar$1(o):Qr$1(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],u=e[s+1];nT(c,t)&&(a=!0,e[s+1]=r?Cd(u):wd(u)),s=r?ar$1(u):Qr$1(u)}a&&(e[n+1]=r?wd(o):Cd(o))}function nT(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?xr$1(e,t)>=0:!1}var ht$1={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function rT(e){return e.substring(ht$1.key,ht$1.keyEnd)}function oT(e){return iT(e),jy(e,Uy(e,0,ht$1.textEnd))}function jy(e,t){let n=ht$1.textEnd;return n===t?-1:(t=ht$1.keyEnd=sT(e,ht$1.key=t,n),Uy(e,t,n))}function iT(e){ht$1.key=0,ht$1.keyEnd=0,ht$1.value=0,ht$1.valueEnd=0,ht$1.textEnd=e.length}function Uy(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function sT(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function By(e,t){return uT(e,t,null,!0),By}function aT(e){lT(mT,cT,e,!0)}function cT(e,t){for(let n=oT(t);n>=0;n=jy(t,n))Vs(e,rT(t),!0)}function uT(e,t,n,r){let o=M(),i=me(),s=rr$1(2);if(i.firstUpdatePass&&Hy(i,e,s,r),t!==te$1&&tt$2(o,s,t)){let a=i.data[Pe()];$y(i,a,o,o[X],e,o[s+1]=vT(t,n),r,s)}}function lT(e,t,n,r){let o=me(),i=rr$1(2);o.firstUpdatePass&&Hy(o,null,i,r);let s=M();if(n!==te$1&&tt$2(s,i,n)){let a=o.data[Pe()];if(zy(a,r)&&!Vy(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(n=ks(c,n||``)),Id(o,a,s,n,r)}else yT(o,a,s,s[X],s[i+1],s[i+1]=gT(e,t,n),r,i)}}function Vy(e,t){return t>=e.expandoStartIndex}function Hy(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[Pe()],s=Vy(e,n);zy(i,r)&&t===null&&!s&&(t=!1),t=dT(o,i,t,r),eT(o,i,t,n,s,r)}}function dT(e,t,n,r){let o=qp(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Hl(null,e,t,n,r),n=ri(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Hl(o,e,t,n,r),i===null){let c=fT(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Hl(null,e,t,c[1],r),c=ri(c,t.attrs,r),hT(e,t,r,c))}else i=pT(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function fT(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Qr$1(r)!==0)return e[ar$1(r)]}function hT(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[ar$1(o)]=r}function pT(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i<o;i++){let s=e[i].hostAttrs;r=ri(r,s,n)}return ri(r,t.attrs,n)}function Hl(e,t,n,r,o){let i=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(i=t[a],r=ri(r,i.hostAttrs,o),i!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function ri(e,t,n){let r=n?1:2,o=-1;if(t!==null)for(let i=0;i<t.length;i++){let s=t[i];typeof s==`number`?o=s:o===r&&(Array.isArray(e)||(e=e===void 0?[]:[``,e]),Vs(e,s,n?!0:t[++i]))}return e===void 0?null:e}function gT(e,t,n){if(n==null||n===``)return Oe;let r=[],o=Ge$2(n);if(Array.isArray(o))for(let i=0;i<o.length;i++)e(r,o[i],!0);else if(o instanceof Set)for(let i of o)e(r,i,!0);else if(typeof o==`object`)for(let i in o)Object.hasOwn(o,i)&&e(r,i,o[i]);else typeof o==`string`&&t(r,o);return r}function mT(e,t,n){let r=String(t);r!==``&&!r.includes(` `)&&Vs(e,r,n)}function yT(e,t,n,r,o,i,s,a){o===te$1&&(o=Oe);let c=0,u=0,l=0<o.length?o[0]:null,d=0<i.length?i[0]:null;for(;l!==null||d!==null;){let h=c<o.length?o[c+1]:void 0,f=u<i.length?i[u+1]:void 0,g=null,v;l===d?(c+=2,u+=2,h!==f&&(g=d,v=f)):d===null||l!==null&&l<d?(c+=2,g=l):(u+=2,g=d,v=f),g!==null&&$y(e,t,n,r,g,v,s,a),l=c<o.length?o[c]:null,d=u<i.length?i[u]:null}}function $y(e,t,n,r,o,i,s,a){if(!(t.type&3))return;let c=e.data,u=c[a+1];if(!ka$1(JS(u)?jg(c,t,n,o,Qr$1(u),s):void 0)){ka$1(i)||KS(u)&&(i=jg(c,null,n,o,a,s));PC(r,s,sl(Pe(),n),o,i)}}function jg(e,t,n,r,o,i){let s=t===null,a;for(;o>0;){let c=e[o],u=Array.isArray(c),l=u?c[1]:c,d=l===null,h=n[o+1];h===te$1&&(h=d?Oe:void 0);let f=d?Hs(h,r):l===r?h:void 0;if(u&&!ka$1(f)&&(f=Hs(c,r)),ka$1(f)&&(a=f,s))return a;let g=e[o+1];o=s?ar$1(g):Qr$1(g)}if(t!==null){let c=i?t.residualClasses:t.residualStyles;c!=null&&(a=Hs(c,r))}return a}function ka$1(e){return e!==void 0}function vT(e,t){return e==null||e===``||(typeof t==`string`?e=Ge$2(e)+t:typeof e==`object`&&(e=Oo$1(Ge$2(e)))),e}function zy(e,t){return(e.flags&(t?8:16))!==0}function DT(e,t=``){let n=M(),r=me(),o=e+ie,i=r.firstCreatePass?li(r,o,1,t,null):r.data[o],s=ET(r,n,i,t);n[o]=s,ta$1()&&Hd(r,n,s,i),jr$1(i,!1)}var ET=(e,t,n,r)=>(na$1(!0),Zw(t[X],r));function IT(e,t){let n=!1,r=Ur$1();for(let i=1;i<t.length;i+=2)n=tt$2(e,r++,t[i])||n;if(Cl(r),!n)return te$1;let o=t[0];for(let i=1;i<t.length;i+=2)o+=Z(t[i])+(i+1!==t.length?t[i+1]:``);return o}function wT(e,t,n,r=``){return tt$2(e,Sn$1(),n)?t+Z(n)+r:te$1}function Gy(e,t,n,r,o,i=``){let a=ei(e,Ur$1(),n,o);return rr$1(2),a?t+Z(n)+r+Z(o)+i:te$1}
4function CT(e,t,n,r,o,i,s,a,c,u=``){let d=Sa$1(e,Ur$1(),n,o,s,c);return rr$1(4),d?t+Z(n)+r+Z(o)+i+Z(s)+a+Z(c)+u:te$1}function bT(e,t,n,r,o,i,s,a,c,u,l,d,h,f=``){let g=Ur$1(),v=Sa$1(e,g,n,o,s,c);return v=ei(e,g+4,l,h)||v,rr$1(6),v?t+Z(n)+r+Z(o)+i+Z(s)+a+Z(c)+u+Z(l)+d+Z(h)+f:te$1}function ST(e,t,n,r,o,i,s,a,c,u,l,d,h,f,g,v,I,_=``){let E=Ur$1(),O=Sa$1(e,E,n,o,s,c);return O=Sa$1(e,E+4,l,h,g,I)||O,rr$1(8),O?t+Z(n)+r+Z(o)+i+Z(s)+a+Z(c)+u+Z(l)+d+Z(h)+f+Z(g)+v+Z(I)+_:te$1}function qy(e){return hf(``,e),qy}function hf(e,t,n){let r=M(),o=wT(r,e,t,n);return o!==te$1&&to$1(r,Pe(),o),hf}function Wy(e,t,n,r,o){let i=M(),s=Gy(i,e,t,n,r,o);return s!==te$1&&to$1(i,Pe(),s),Wy}function Zy(e,t,n,r,o,i,s,a,c){let u=M(),l=CT(u,e,t,n,r,o,i,s,a,c);return l!==te$1&&to$1(u,Pe(),l),Zy}function Yy(e,t,n,r,o,i,s,a,c,u,l,d,h){let f=M(),g=bT(f,e,t,n,r,o,i,s,a,c,u,l,d,h);return g!==te$1&&to$1(f,Pe(),g),Yy}function Qy(e,t,n,r,o,i,s,a,c,u,l,d,h,f,g,v,I){let _=M(),E=ST(_,e,t,n,r,o,i,s,a,c,u,l,d,h,f,g,v,I);return E!==te$1&&to$1(_,Pe(),E),Qy}function Ky(e){let t=M(),n=IT(t,e);return n!==te$1&&to$1(t,Pe(),n),Ky}function to$1(e,t,n){let r=sl(t,e);Yw(e[X],r,n)}function TT(e){return tt$2(M(),Sn$1(),e)?Z(e):te$1}function _T(e,t,n,r,o=``){return Gy(M(),e,t,n,r,o)}function MT(e,t){let n=wl()+e,r=M();return r[n]===te$1?py(r,n,t()):Sb(r,n)}function NT(e,t){let n=e[t];return n===te$1?void 0:n}function RT(e,t,n,r,o,i,s){let a=t+n;return ei(e,a,o,i)?py(e,a+2,s?r.call(s,o,i):r(o,i)):NT(e,a+2)}function AT(e,t){let n=me(),r,o=e+ie;n.firstCreatePass?(r=xT(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=Dn(r.type,!0)),a=xe(Ce);try{let c=Da$1(!1),u=i();return Da$1(c),cl(n,M(),o,u),u}finally{xe(a)}}function xT(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function OT(e,t,n,r){let o=e+ie,i=M(),s=al(i,o);return kT(i,o)?RT(i,wl(),t,s.transform,n,r,s):s.transform(n,r)}function kT(e,t){return e[T].data[t].pure}var Xy=(()=>{class e{applicationErrorHandler=p(ze$2);appRef=p(At$2);taskService=p(dt$1);ngZone=p(z$1);zonelessEnabled=p(Br$1);tracing=p(gt,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ae;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ao$1):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(p(sa$1,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?tg:Rl;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Ao$1+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 n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function Jy(){return[{provide:Wt$1,useExisting:Xy},{provide:z$1,useClass:xo$1},{provide:Br$1,useValue:!0}]}var pf=(()=>{class e{compileModuleSync(n){return new Ra(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function PT(){return typeof $localize<`u`&&$localize.locale||gi}var mi=new D(``,{factory:()=>p(mi,{optional:!0,skipSelf:!0})||PT()});function Ka$1(e,t){return Xi$1(e,t?.equal)}function W(e){return Ph(e)}
4(class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var LT=e=>e;function gf(e,t){if(typeof e==`function`)return tv(fu(e,LT,t?.equal),t?.debugName,t?.set);else return tv(fu(e.source,e.computation,e.equal),e.debugName,e.set)}function tv(e,t,n){let r=e[ve$1],o=e;if(n!==void 0){let i=s=>hu(r,s);o.set=s=>n(s,i),o.update=s=>n(s(W(e)),i)}else o.set=i=>hu(r,i),o.update=i=>kh(r,i);return o.asReadonly=ra$1.bind(e),o}function av(e,t){let n=Object.create(Hg);n.value=e,n.transformFn=t?.transform;function r(){if(fn$1(n),n.value===Sd)throw new y(-950,null);return n.value}return r[ve$1]=n,r}var Ja$1=class{attributeName;constructor(t){this.attributeName=t}__NG_ELEMENT_ID__=()=>ii(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}};function yf(e){return GT(e)?e.default:e}function GT(e){return e&&typeof e==`object`&&`default`in e}function rv(e,t){return av(e,t)}function qT(e){return av(Sd,e)}var ec=(rv.required=qT,rv);var cv=(()=>{class e{constructor(n){}static ɵfac=function(r){return new(r||e)(w(At$2))};static ɵmod=rn$1({type:e});static ɵinj=St({})}return e})();var no$1=(()=>{class e{static __NG_ELEMENT_ID__=ZT}return e})();function ZT(e){return YT(_e(),M(),(e&16)===16)}function YT(e,t,n){if(Kt(e)&&!n){let r=et$1(e.index,t);return new _n$1(r,r)}else if(e.type&175){let r=t[Te];return new _n$1(r,t)}return null}var QT=(()=>{class e{zone=p(z$1);changeDetectionScheduler=p(Wt$1);applicationRef=p(At$2);applicationErrorHandler=p(ze$2);_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(n){this.applicationErrorHandler(n)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var KT=new D(``,{factory:()=>!1});function XT({ngZoneFactory:e,scheduleInRootZone:t}){return e??=()=>new z$1(j(m({},uv()),{scheduleInRootZone:t})),[{provide:Br$1,useValue:!1},{provide:z$1,useFactory:e},{provide:wn$1,multi:!0,useFactory:()=>{let n=p(QT,{optional:!0});return()=>n.initialize()}},{provide:wn$1,multi:!0,useFactory:()=>{let n=p(JT);return()=>{n.initialize()}}},{provide:sa$1,useValue:t??Nl}]}function yH(e){let t=e?.scheduleInRootZone,n=XT({ngZoneFactory:()=>{let r=uv(e);return r.scheduleInRootZone=t,r.shouldCoalesceEventChangeDetection&&mt$1(`NgZone_CoalesceEvent`),new z$1(r)},scheduleInRootZone:t});return Zt$1([{provide:KT,useValue:!0},n])}function uv(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var JT=(()=>{class e{subscription=new ae;initialized=!1;zone=p(z$1);pendingTasks=p(dt$1);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{z$1.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{z$1.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var mf=new D(``);var e_=new D(``);function yi(e){return!e.moduleRef}function t_(e){let t=yi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(z$1);return n.run(()=>{yi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(ze$2),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:r})}),yi(e)){let i=()=>t.destroy(),s=e.platformInjector.get(mf);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(mf);s.add(i),e.moduleRef.onDestroy(()=>{Qo(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return r_(r,n,()=>{let i=t.get(dt$1),s=i.add(),a=t.get(rf);
4return a.runInitializers(),a.donePromise.then(()=>{if(Py(t.get(mi,gi)||gi),!t.get(e_,!0))return yi(e)?t.get(At$2):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(yi(e)){let l=t.get(At$2);return e.rootComponent!==void 0&&l.bootstrap(e.rootComponent),l}else return n_?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var n_;function r_(e,t,n){try{let r=n();return Xr$1(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var Xa$1=null;function o_(e=[],t){return Se.create({name:t,providers:[{provide:jo$1,useValue:`platform`},{provide:mf,useValue:new Set([()=>Xa$1=null])},...e]})}function i_(e=[]){if(Xa$1)return Xa$1;let t=o_(e);return Xa$1=t,Ry(),s_(t),t}function s_(e){let t=e.get(oa$1,null);de(e,()=>{t?.forEach(n=>n())})}function lv(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;$(L.BootstrapApplicationStart);try{let i=o?.injector??i_(r);return t_({r3Injector:new ti({providers:[Jy(),ig,...n||[]],parent:i,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{$(L.BootstrapApplicationEnd)}}function vi(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}function vf(e){let t=En$1(e);if(!t)return null;let n=new Yr$1(t);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}var dv=null;function yt(){return dv}function Df(e){dv??=e}var Di$1=class{};var on$1=(()=>{class e{historyGo(n){throw new Error(``)}static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:()=>p(fv),providedIn:`platform`})}return e})();var Ef=new D(``);var fv=(()=>{class e extends on$1{_location;_history;_doc=p(Y);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return yt().getBaseHref(this._doc)}onPopState(n){let r=yt().getGlobalEventTarget(this._doc,`window`);return r.addEventListener(`popstate`,n,!1),()=>r.removeEventListener(`popstate`,n)}onHashChange(n){let r=yt().getGlobalEventTarget(this._doc,`window`);return r.addEventListener(`hashchange`,n,!1),()=>r.removeEventListener(`hashchange`,n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:()=>new e,providedIn:`platform`})}return e})();function tc(e,t){return e?t?e.endsWith(`/`)?t.startsWith(`/`)?e+t.slice(1):e+t:t.startsWith(`/`)?e+t:`${e}/${t}`:e:t}function hv(e){let t=e.search(/#|\?|$/);return e[t-1]===`/`?e.slice(0,t-1)+e.slice(t):e}function vt(e){return e&&e[0]!==`?`?`?${e}`:e}var Dt$1=(()=>{class e{historyGo(n){throw new Error(``)}static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:()=>p(rc),providedIn:`root`})}return e})();var nc=new D(``);var rc=(()=>{class e extends Dt$1{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??p(Y).location?.origin??``}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return tc(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+vt(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+vt(i));this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+vt(i));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static ɵfac=function(r){return new(r||e)(w(on$1),w(nc,8))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Nn$1=(()=>
vendor: 5,855 bytes, line 4
4{class e{_subject=new ne$1;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=u_(hv(pv(r))),this._locationStrategy.onPopState(o=>{let i={url:this.path(!0),pop:!0,state:o.state,type:o.type};o.hasUAVisualTransition&&(i.hasUAVisualTransition=!0),this._subject.next(i)})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=``){return this.path()==this.normalize(n+vt(r))}normalize(n){return e.stripTrailingSlash(c_(this._basePath,pv(n)))}prepareExternalUrl(n){return n&&n[0]!==`/`&&(n=`/`+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r=``,o=null){this._locationStrategy.pushState(o,``,n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+vt(r)),o)}replaceState(n,r=``,o=null){this._locationStrategy.replaceState(o,``,n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+vt(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n=``,r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=vt;static joinWithSlash=tc;static stripTrailingSlash=hv;static ɵfac=function(r){return new(r||e)(w(Dt$1))};static ɵprov=S({token:e,factory:()=>a_(),providedIn:`root`})}return e})();function a_(){return new Nn$1(w(Dt$1))}function c_(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===``||[`/`,`;`,`?`,`#`].includes(n[0])?n:t}function pv(e){return e.replace(/\/index\.html$/,``)}function u_(e){if(new RegExp(`^(https?:)?//`).test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var bf=(()=>{class e extends Dt$1{_platformLocation;_baseHref=``;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let r=this._platformLocation.hash??`#`;return r.length>0?r.substring(1):r}prepareExternalUrl(n){let r=tc(this._baseHref,n);return r.length>0?`#`+r:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+vt(i))||this._platformLocation.pathname;this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+vt(i))||this._platformLocation.pathname;this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static ɵfac=function(r){return new(r||e)(w(on$1),w(nc,8))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var Me$1=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Me$1||{});var G=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(G||{});var Ve$2=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Ve$2||{});var an$1={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 mv(e){return qe$1(e)[fe$1.LocaleId]}function yv(e,t,n){let r=qe$1(e);return nt$1(nt$1([r[fe$1.DayPeriodsFormat],r[fe$1.DayPeriodsStandalone]],t),n)}function vv(e,t,n){let r=qe$1(e);return nt$1(nt$1([r[fe$1.DaysFormat],r[fe$1.DaysStandalone]],t),n)}function Dv(e,t,n){let r=qe$1(e);return nt$1(nt$1([r[fe$1.MonthsFormat],r[fe$1.MonthsStandalone]],t),n)}function Ev(e,t){let r=qe$1(e)[fe$1.Eras];return nt$1(r,t)}function Ei(e,t){return nt$1(qe$1(e)[fe$1.DateFormat],t)}function Ii$1(e,t){return nt$1(qe$1(e)[fe$1.TimeFormat],t)}function wi$1(e,t){let r=qe$1(e)[fe$1.DateTimeFormat];return nt$1(r,t)}function Ci$1(e,t){let n=qe$1(e),r=n[fe$1.NumberSymbols][t];if(typeof r>`u`){if(t===an$1.CurrencyDecimal)return n[fe$1.NumberSymbols][an$1.Decimal];if(t===an$1.CurrencyGroup)return n[fe$1.NumberSymbols][an$1.Group]}return r}function Iv(e){if(!e[fe$1.ExtraData])throw new y(2303,!1)}function wv(e){let t=qe$1(e);return Iv(t),(t[fe$1.ExtraData][2]||[]).map(r=>typeof r==`string`?If(r):[If(r[0]),If(r[1])])}function Cv(e,t,n){let r=qe$1(e);Iv(r);return nt$1(nt$1([r[fe$1.ExtraData][0],r[fe$1.ExtraData][1]],t)||[],n)||[]}function nt$1(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<`u`)return e[n];throw new y(2304,!1)}function If(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var l_=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;var oc=Object.create(null);var d_=/((?:[^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]*)/;var f_=256;function bv(e,t,n,r){let o=w_(e);h_(t),t=sn$1(n,t)||t;let s=[],a;for(;t;)if(a=d_.exec(t),a){s=s.concat(a.slice(1));let l=s.pop();if(!l)break;t=l}else{s.push(t);break}let c=o.getTimezoneOffset();r&&(c=Tv(r,c),o=I_(o,r));let u=``;
vendor: 4,569 bytes, line 4
4return s.forEach(l=>{let d=D_(l);u+=d?d(o,n,c):l===`''`?`'`:l.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),u}function h_(e){if(e.length>f_)throw new y(2300,!1)}function uc(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function sn$1(e,t){let n=mv(e);if(oc[n]??=Object.create(null),oc[n][t])return oc[n][t];let r=``;switch(t){case`shortDate`:r=Ei(e,Ve$2.Short);break;case`mediumDate`:r=Ei(e,Ve$2.Medium);break;case`longDate`:r=Ei(e,Ve$2.Long);break;case`fullDate`:r=Ei(e,Ve$2.Full);break;case`shortTime`:r=Ii$1(e,Ve$2.Short);break;case`mediumTime`:r=Ii$1(e,Ve$2.Medium);break;case`longTime`:r=Ii$1(e,Ve$2.Long);break;case`fullTime`:r=Ii$1(e,Ve$2.Full);break;case`short`:let o=sn$1(e,`shortTime`),i=sn$1(e,`shortDate`);r=ic(wi$1(e,Ve$2.Short),[o,i]);break;case`medium`:let s=sn$1(e,`mediumTime`),a=sn$1(e,`mediumDate`);r=ic(wi$1(e,Ve$2.Medium),[s,a]);break;case`long`:let c=sn$1(e,`longTime`),u=sn$1(e,`longDate`);r=ic(wi$1(e,Ve$2.Long),[c,u]);break;case`full`:let l=sn$1(e,`fullTime`),d=sn$1(e,`fullDate`);r=ic(wi$1(e,Ve$2.Full),[l,d])}return r&&(oc[n][t]=r),r}function ic(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return Object.hasOwn(t,r)?t[r]:n})),e}function Et(e,t,n=`-`,r,o){let i=``;(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=n));let s=String(e);for(;s.length<t;)s=`0`+s;return r&&(s=s.slice(s.length-t)),i+s}function p_(e,t){return Et(e,3).substring(0,t)}function he(e,t,n=0,r=!1,o=!1){return function(i,s){let a=g_(e,i);if((n>0||a>-n)&&(a+=n),e===3)a===0&&n===-12&&(a=12);else if(e===6)return p_(a,t);let c=Ci$1(s,an$1.MinusSign);return Et(a,t,c,r,o)}}function g_(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new y(2301,!1)}}function Q(e,t,n=Me$1.Format,r=!1){return function(o,i){return m_(o,i,e,t,n,r)}}function m_(e,t,n,r,o,i){switch(n){case 2:return Dv(t,o,r)[e.getMonth()];case 1:return vv(t,o,r)[e.getDay()];case 0:let s=e.getHours(),a=e.getMinutes();if(i){let u=wv(t),l=Cv(t,o,r),d=u.findIndex(h=>{if(Array.isArray(h)){let[f,g]=h,v=s>=f.hours&&a>=f.minutes,I=s<g.hours||s===g.hours&&a<g.minutes;if(f.hours<g.hours){if(v&&I)return!0}else if(v||I)return!0}else if(h.hours===s&&h.minutes===a)return!0;return!1});if(d!==-1)return l[d]}return yv(t,o,r)[s<12?0:1];case 3:return Ev(t,r)[e.getFullYear()<=0?0:1];default:throw new y(2302,!1)}}function sc(e){return function(t,n,r){let o=-1*r,i=Ci$1(n,an$1.MinusSign),s=o>0?Math.floor(o/60):Math.ceil(o/60);switch(e){case 0:return(o>=0?`+`:``)+Et(s,2,i)+Et(Math.abs(o%60),2,i);case 1:return`GMT`+(o>=0?`+`:``)+Et(s,1,i);case 2:return`GMT`+(o>=0?`+`:``)+Et(s,2,i)+`:`+Et(Math.abs(o%60),2,i);case 3:return r===0?`Z`:(o>=0?`+`:``)+Et(s,2,i)+`:`+Et(Math.abs(o%60),2,i);default:throw new y(2310,!1)}}}var y_=0;var cc=4;function v_(e){let t=uc(e,y_,1).getDay();return uc(e,0,1+(t<=cc?cc:cc+7)-t)}function Sv(e){let t=e.getDay(),n=t===0?-3:cc-t;return uc(e.getFullYear(),e.getMonth(),e.getDate()+n)}function wf(e,t=!1){return function(n,r){let o;if(t){let i=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();o=1+Math.floor((s+i)/7)}else{let i=Sv(n),s=v_(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Et(o,e,Ci$1(r,an$1.MinusSign))}}function ac(e,t=!1){return function(n,r){return Et(Sv(n).getFullYear(),e,Ci$1(r,an$1.MinusSign),t)}}var Cf=Object.create(null);function D_(e){if(Cf[e])return Cf[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Q(3,G.Abbreviated);break;case`GGGG`:t=Q(3,G.Wide);break;case`GGGGG`:t=Q(3,G.Narrow);break;case`y`:t=he(0,1,0,!1,!0);break;case`yy`:t=he(0,2,0,!0,!0);break;case`yyy`:t=he(0,3,0,!1,!0);break;case`yyyy`:t=he(0,4,0,!1,!0);break;case`Y`:t=ac(1);break;case`YY`:t=ac(2,!0);break;case`YYY`:t=ac(3);break;case`YYYY`:t=ac(4);break;case`M`:case`L`:t=he(1,1,1);break;case`MM`:case`LL`:t=he(1,2,1);break;case`MMM`:t=Q(2,G.Abbreviated);break;case`MMMM`:t=Q(2,G.Wide);break;case`MMMMM`:t=Q(2,G.Narrow);break;case`LLL`:t=Q(2,G.Abbreviated,Me$1.Standalone);break;case`LLLL`:t=Q(2,G.Wide,Me$1.Standalone);break;case`LLLLL`:t=Q(2,G.Narrow,Me$1.Standalone);break;case`w`:t=wf(1);break;case`ww`:t=wf(2);break;case`W`:t=wf(1,!0);break;case`d`:t=he(2,1);break;case`dd`:t=he(2,2);break;case`c`:case`cc`:t=he(7,1);break;case`ccc`:t=Q(1,G.Abbreviated,Me$1.Standalone);break;case`cccc`:t=Q(1,G.Wide,Me$1.Standalone);break;case`ccccc`:t=Q(1,G.Narrow,Me$1.Standalone);break;case`cccccc`:t=Q(1,G.Short,Me$1.Standalone);break;
4case`E`:case`EE`:case`EEE`:t=Q(1,G.Abbreviated);break;case`EEEE`:t=Q(1,G.Wide);break;case`EEEEE`:t=Q(1,G.Narrow);break;case`EEEEEE`:t=Q(1,G.Short);break;case`a`:case`aa`:case`aaa`:t=Q(0,G.Abbreviated);break;case`aaaa`:t=Q(0,G.Wide);break;case`aaaaa`:t=Q(0,G.Narrow);break;case`b`:case`bb`:case`bbb`:t=Q(0,G.Abbreviated,Me$1.Standalone,!0);break;case`bbbb`:t=Q(0,G.Wide,Me$1.Standalone,!0);break;case`bbbbb`:t=Q(0,G.Narrow,Me$1.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Q(0,G.Abbreviated,Me$1.Format,!0);break;case`BBBB`:t=Q(0,G.Wide,Me$1.Format,!0);break;case`BBBBB`:t=Q(0,G.Narrow,Me$1.Format,!0);break;case`h`:t=he(3,1,-12);break;case`hh`:t=he(3,2,-12);break;case`H`:t=he(3,1);break;case`HH`:t=he(3,2);break;case`m`:t=he(4,1);break;case`mm`:t=he(4,2);break;case`s`:t=he(5,1);break;case`ss`:t=he(5,2);break;case`S`:t=he(6,1);break;case`SS`:t=he(6,2);break;case`SSS`:t=he(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=sc(0);break;case`ZZZZZ`:t=sc(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=sc(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=sc(2);break;default:return null}return Cf[e]=t,t}function Tv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function E_(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function I_(e,t,n){let o=e.getTimezoneOffset();return E_(e,-1*(Tv(t,o)-o))}function w_(e){if(gv(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split(`-`).map(a=>+a);return uc(o,i-1,s)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(l_))return C_(r)}let t=new Date(e);if(!gv(t))throw new y(2311,!1);return t}function C_(e){let t=new Date(0),n=0,r=0,o=e[8]?t.setUTCFullYear:t.setFullYear,i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-n,a=Number(e[5]||0)-r,c=Number(e[6]||0),u=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return i.call(t,s,a,c,u),t}function gv(e){return e instanceof Date&&!isNaN(e.valueOf())}function b_(e,t){return new y(2100,!1)}var S_=`mediumDate`;var _v=new D(``);var Mv=new D(``);var T_=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,r,o){this.locale=n,this.defaultTimezone=r,this.defaultOptions=o}transform(n,r,o,i){if(n==null||n===``||n!==n)return null;try{let s=r??this.defaultOptions?.dateFormat??S_,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return bv(n,s,i||this.locale,a)}catch(s){throw b_(e,s.message)}}static ɵfac=function(r){return new(r||e)(Ce(mi,16),Ce(_v,24),Ce(Mv,24))};static ɵpipe=tf({name:`date`,type:e,pure:!0})}return e})();var Sf=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵmod=rn$1({type:e});static ɵinj=St({})}return e})();function bi(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let r=n.indexOf(`=`),[o,i]=r==-1?[n,``]:[n.slice(0,r),n.slice(r+1)];if(o.trim()!==t)continue;let s=i;try{s=decodeURIComponent(i)}catch(a){}return s.length>1&&s[0]===`"`&&s[s.length-1]===`"`&&(s=s.slice(1,-1)),s}return null}var __=(()=>{class e{build(){return new XMLHttpRequest}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Tf=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=w(__),o},providedIn:`root`})}return e})();var Nv=`browser`;var Mf=(()=>{class e{static ɵprov=S({token:e,providedIn:`root`,factory:()=>new _f(p(Y),window)})}return e})();var _f=class{document;window;offset=()=>[0,0];constructor(t,n){this.document=t,this.window=n}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t,n){this.window.scrollTo(j(m({},n),{left:t[0],top:t[1]}))}scrollToAnchor(t,n){let r=N_(this.document,t);r&&(this.scrollToElement(r,n),r.focus({preventScroll:!0}))}setHistoryScrollRestoration(t){try{this.window.history.scrollRestoration=t}catch(n){console.warn(ct$2(2400,!1))}}scrollToElement(t,n){let r=t.getBoundingClientRect(),o=r.left+this.window.pageXOffset,i=r.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(j(m({},n),{left:o-s[0],top:i-s[1]}))}};function N_(e,t){let n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if(typeof e.createTreeWalker==`function`&&e.body&&typeof e.body.attachShadow==`function`){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(t)||i.querySelector(`[name="${CSS.escape(t)}"]`);if(s)return s}o=r.nextNode()}}return null}var Lt$1=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t==`string`?this.lazyInit=()=>{this.headers=new Map,t.split(`
5`).forEach(n=>{let r=n.indexOf(`:`);
vendor: 8,906 bytes, line 5
5if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<`u`&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:`a`})}set(t,n){return this.clone({name:t,value:n,op:`s`})}delete(t,n){return this.clone({name:t,value:n,op:`d`})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init();for(let[n,r]of t.headers.entries())this.headers.set(n,r),this.normalizedNames.set(n,t.normalizedNames.get(n))}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case`a`:case`s`:let r=t.value;if(typeof r==`string`&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=t.op===`a`?(this.headers.get(n)||[]).slice():[];o.push(...r),this.headers.set(n,o);break;case`d`:let i=t.value;if(i===void 0)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=Array.isArray(i)?i:[i],a=this.headers.get(n);if(!a)return;a=a.filter(c=>s.indexOf(c)===-1),a.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,a)}}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var dc=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};var fc=class{encodeKey(t){return Rv(t)}encodeValue(t){return Rv(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function A_(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,``).split(`&`).forEach(o=>{let i=o.indexOf(`=`),[s,a]=i==-1?[t.decodeKey(o),``]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],c=n.get(s)||[];c.push(a),n.set(s,c)}),n}var x_=/%(\d[a-f0-9])/gi;var O_={40:`@`,"3A":`:`,24:`$`,"2C":`,`,"3B":`;`,"3D":`=`,"3F":`?`,"2F":`/`};function Rv(e){return encodeURIComponent(e).replace(x_,(t,n)=>O_[n]??t)}function lc(e){return`${e}`}var cn$1=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new fc,t.fromString){if(t.fromObject)throw new y(2805,!1);this.map=A_(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(lc):[lc(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:`a`})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:`a`})}):n.push({param:r,value:o,op:`a`})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:`s`})}delete(t,n){return this.clone({param:t,value:n,op:`d`})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+`=`+this.encoder.encodeValue(r)).join(`&`)}).filter(t=>t!==``).join(`&`)}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,n]of this.cloneFrom.map.entries())this.map.set(t,n);this.updates.forEach(t=>{switch(t.op){case`a`:case`s`:let n=t.op===`a`?(this.map.get(t.param)||[]).slice():[];n.push(lc(t.value)),this.map.set(t.param,n);break;case`d`:if(t.value!==void 0){let r=(this.map.get(t.param)||[]).slice(),o=r.indexOf(lc(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};function k_(e){switch(e){case`DELETE`:case`GET`:case`HEAD`:case`OPTIONS`:case`JSONP`:return!1;default:return!0}}function Av(e){return typeof ArrayBuffer<`u`&&e instanceof ArrayBuffer}function xv(e){return typeof Blob<`u`&&e instanceof Blob}function Ov(e){return typeof FormData<`u`&&e instanceof FormData}function P_(e){return typeof URLSearchParams<`u`&&e instanceof URLSearchParams}var Si=`Content-Type`;var hc=`Accept`;var Fv=`text/plain`;var jv=`application/json`;var Uv=`${jv}, ${Fv}, */*`;var ro$1=class e{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType=`json`;method;params;urlWithParams;transferCache;timeout;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(k_(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i){if(this.reportProgress=!!i.reportProgress,this.reportUploadProgress=!!i.reportUploadProgress,this.reportDownloadProgress=!!i.reportDownloadProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout==`number`){if(i.timeout<1||!Number.isInteger(i.timeout))throw new y(2822,``);this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer!==void 0&&(this.referrer=i.referrer),i.referrerPolicy&&(this.referrerPolicy=i.referrerPolicy),this.transferCache=i.transferCache}if(this.headers??=new Lt$1,this.context??=new dc,!this.params)this.params=new cn$1,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n,c=``,u=n.indexOf(`#`);u!==-1&&(c=n.substring(u),a=n.substring(0,u));let l=a.indexOf(`?`),d=l===-1?`?`:l<a.length-1?`&`:``;this.urlWithParams=a+d+s+c}}}serializeBody(){return this.body===null?null:typeof this.body==`string`||Av(this.body)||xv(this.body)||Ov(this.body)||P_(this.body)?this.body:this.body instanceof cn$1?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||Ov(this.body)?null:xv(this.body)?this.body.type||null:Av(this.body)?null:typeof this.body==`string`?Fv:this.body instanceof cn$1?`application/x-www-form-urlencoded;charset=UTF-8`:typeof this.body==`object`||typeof this.body==`number`||typeof this.body==`boolean`?jv:null}clone(t={}){let n=t.method||this.method,r=t.url||this.url,o=t.responseType||this.responseType,i=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,u=t.redirect||this.redirect,l=t.credentials||this.credentials,d=t.referrer??this.referrer,h=t.integrity||this.integrity,f=t.referrerPolicy||this.referrerPolicy,g=t.transferCache??this.transferCache,v=t.timeout??this.timeout,I=t.body!==void 0?t.body:this.body,_=t.withCredentials??this.withCredentials,E=t.reportProgress??this.reportProgress,O=t.reportUploadProgress??this.reportUploadProgress,je=t.reportDownloadProgress??this.reportDownloadProgress,ot=t.headers||this.headers,le=t.params||this.params,Bt=t.context??this.context;return t.setHeaders!==void 0&&(ot=Object.keys(t.setHeaders).reduce((dn,Ct)=>dn.set(Ct,t.setHeaders[Ct]),ot)),t.setParams&&(le=Object.keys(t.setParams).reduce((dn,Ct)=>dn.set(Ct,t.setParams[Ct]),le)),new e(n,r,I,{params:le,headers:ot,context:Bt,reportProgress:E,reportUploadProgress:O,reportDownloadProgress:je,responseType:o,withCredentials:_,transferCache:g,keepalive:i,cache:a,priority:s,timeout:v,mode:c,redirect:u,credentials:l,referrer:d,integrity:h,referrerPolicy:f})}};
5var Pt$1=(function(e){return e[e.Sent=0]=`Sent`,e[e.UploadProgress=1]=`UploadProgress`,e[e.ResponseHeader=2]=`ResponseHeader`,e[e.DownloadProgress=3]=`DownloadProgress`,e[e.Response=4]=`Response`,e[e.User=5]=`User`,e})(Pt$1||{});var oo$1=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,n=200,r=`OK`){this.headers=t.headers||new Lt$1,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.responseType=t.responseType,this.ok=this.status>=200&&this.status<300}};var Ti$1=class e extends oo$1{constructor(t={}){super(t)}type=Pt$1.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}};var io$1=class e extends oo$1{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Pt$1.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected,responseType:t.responseType??this.responseType})}};var kt$1=class extends oo$1{name=`HttpErrorResponse`;message;error;ok=!1;constructor(t){super(t,0,`Unknown Error`),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||`(unknown url)`}`:this.message=`Http failure response for ${t.url||`(unknown url)`}: ${t.status} ${t.statusText}`,this.error=t.error||null}};var Bv=200;var L_=204;var F_=/^\)\]\}',?\n/;var Vv=new D(``,{factory:()=>null});var pc=(()=>{class e{fetchImpl=p(Rf,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=p(z$1);destroyRef=p(ke);maxResponseSize=p(Vv);handle(n){return new A$1(r=>{let o=new AbortController,i=!1,s={next:c=>{c.type===Pt$1.Response&&(i=!0),r.next(c)},error:c=>{i=!0,r.error(c)},complete:()=>{i=!0,r.complete()}};this.doRequest(n,o.signal,s).then(Af,c=>s.error(new kt$1({error:c})));let a;return n.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException(`signal timed out`,`TimeoutError`))},n.timeout))),()=>{a!==void 0&&clearTimeout(a),!i&&!o.signal.aborted&&o.abort()}})}
5doRequest(n,r,o){return V(this,null,function*(){let i=this.createRequestInit(n),s;try{let I=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,m({signal:r},i)));j_(I),o.next({type:Pt$1.Sent}),s=yield I}catch(I){o.error(new kt$1({error:I,status:I.status??0,statusText:I.statusText,url:n.urlWithParams,headers:I.headers}));return}let a=new Lt$1(s.headers),c=s.statusText,u=s.url||n.urlWithParams,l=s.status,d=null,h=n.reportProgress||n.reportDownloadProgress;if(h&&o.next(new Ti$1({headers:a,status:l,statusText:c,url:u})),s.body){let I=s.headers.get(Si)??``,_=s.headers.get(`content-length`),E=_!==null?Number(_):NaN;this.maxResponseSize!==null&&Number.isFinite(E)&&E>this.maxResponseSize&&(yield s.body.cancel(),kv(this.maxResponseSize));let O=[],je=s.body.getReader(),ot=0,le,Bt,dn=typeof Zone<`u`&&Zone.current,Ct=!1;if(yield this.ngZone.runOutsideAngular(()=>V(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield je.cancel(),Ct=!0;break}let{done:nu,value:ru}=yield je.read();if(nu)break;if(O.push(ru),ot+=ru.length,this.maxResponseSize!==null&&ot>this.maxResponseSize&&(yield je.cancel(),kv(this.maxResponseSize)),h){Bt=n.responseType===`text`?(Bt??``)+(le??=Pv(I)).decode(ru,{stream:!0}):void 0;let Ch=()=>o.next({type:Pt$1.DownloadProgress,total:Number.isFinite(E)?E:void 0,loaded:ot,partialText:Bt});dn?dn.run(Ch):Ch()}}})),Ct){o.complete();return}let fE=this.concatChunks(O,ot);try{d=this.parseBody(n,fE,I,l)}catch(nu){o.error(new kt$1({error:nu,headers:new Lt$1(s.headers),status:s.status,statusText:s.statusText,url:s.url||n.urlWithParams}));return}}l===0&&(l=d?Bv:0);let f=l>=200&&l<300,g=s.redirected,v=s.type;f?(o.next(new io$1({body:d,headers:a,status:l,statusText:c,url:u,redirected:g,responseType:v})),o.complete()):o.error(new kt$1({error:d,headers:a,status:l,statusText:c,url:u,redirected:g,responseType:v}))})}parseBody(n,r,o,i){switch(n.responseType){case`json`:let s=new TextDecoder().decode(r).replace(F_,``);if(s===``)return null;try{return JSON.parse(s)}catch(a){if(i<200||i>=300)return s;throw a}case`text`:return Pv(o).decode(r);case`blob`:return new Blob([r],{type:o});case`arraybuffer`:return r.buffer}}createRequestInit(n){if(n.reportUploadProgress)throw new y(2824,!1);let r={},o;if(o=n.credentials,n.withCredentials&&(o=`include`),n.headers.forEach((i,s)=>r[i]=s.join(`,`)),n.headers.has(hc)||(r[hc]=Uv),!n.headers.has(Si)){let i=n.detectContentTypeHeader();i!==null&&(r[Si]=i)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:o,keepalive:n.keepalive,cache:n.cache,priority:n.priority,mode:n.mode,redirect:n.redirect,referrer:n.referrer,integrity:n.integrity,referrerPolicy:n.referrerPolicy}}concatChunks(n,r){let o=new Uint8Array(r),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Rf=class{};function Af(){}function j_(e){e.then(Af,Af)}function kv(e){throw new y(-2825,!1)}var U_=/charset=\s*["']?([^;"'\s]+)["']?/i;function Pv(e){let t=e.match(U_);if(t!==null)try{return new TextDecoder(t[1])}catch(n){}return new TextDecoder}var B_=new D(``,{factory:()=>!0});var V_=`XSRF-TOKEN`;var H_=new D(``,{factory:()=>V_});var $_=`X-XSRF-TOKEN`;var z_=new D(``,{factory:()=>$_});var G_=(()=>{class e{cookieName=p(H_);doc=p(Y);lastCookieString=``;lastToken=null;parseCount=0;getToken(){let n=this.doc.cookie||``;return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=bi(n,this.cookieName),this.lastCookieString=n),this.lastToken}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Hv=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=w(G_),o},providedIn:`root`})}return e})();function $v(e,t){if(!p(B_)||e.method===`GET`||e.method===`HEAD`)return t(e);try{let o=p(on$1).href,{origin:i}=new URL(o),{origin:s}=new URL(e.url,i);if(i!==s)return t(e)}catch(o){return t(e)}let n=p(Hv).getToken(),r=p(z_);return n!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}function zv(e,t){return t(e)}function q_(e,t){return(n,r)=>t.intercept(n,{handle:o=>e(o,r)})}function W_(e,t,n){return(r,o)=>de(n,()=>t(r,i=>e(i,o)))}var Gv=new D(``);var Of=new D(``,{factory:()=>[$v]});var qv=new D(``);var kf=new D(``,{factory:()=>!0});function Z_(){let e=null;return(t,n)=>{e===null&&(e=(p(Gv,{optional:!0})??[]).reduceRight(q_,zv));let r=p(Vr$1);if(p(kf)){let i=r.add();return e(t,n).pipe(Nr$1(i))}else return e(t,n)}}var mc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=w(pc),o},providedIn:`root`})}return e})();var gc=(()=>{class e{backend;injector;chain=null;pendingTasks=p(Vr$1);contributeToStability=p(kf);constructor(n,r){this.backend=n,this.injector=r}handle(n){if(this.chain===null){let o=this.injector.get(yc,null,{skipSelf:!0}),i=o!==null&&this.backend===o,s=this.injector.get(qv,[],i?{self:!0}:void 0),a=Array.from(new Set([...this.injector.get(Of),...s]));this.chain=a.reduceRight((c,u)=>W_(c,u,this.injector),zv)}let r=this.chain;if(this.contributeToStability){let o=this.pendingTasks.add();return W(()=>r(n,i=>this.backend.handle(i))).pipe(Nr$1(o))}else return W(()=>r(n,o=>this.backend.handle(o)))}static ɵfac=function(r){return new(r||e)(w(mc),w(re))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var yc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=w(gc),o},providedIn:`root`})}return e})();function Nf(e,t){return m({body:t},e)}var Wv=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof ro$1)i=n;else{let c;o.headers instanceof Lt$1?c=o.headers:c=new Lt$1(o.headers);let u;o.params&&(o.params instanceof cn$1?u=o.params:u=new cn$1({fromObject:o.params})),i=new ro$1(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,reportProgress:o.reportProgress,reportUploadProgress:o.reportUploadProgress,reportDownloadProgress:o.reportDownloadProgress,responseType:o.responseType||`json`,withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let s=N(i).pipe(yn$1(c=>this.handler.handle(c)));if(n instanceof ro$1||o.observe===`events`)return s;let a=s.pipe(He(c=>c instanceof io$1));switch(o.observe||`body`){case`body`:switch(i.responseType){case`arraybuffer`:return a.pipe(q(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new y(2806,!1);return c.body}));case`blob`:return a.pipe(q(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new y(2807,!1);return c.body}));case`text`:return a.pipe(q(c=>{if(c.body!==null&&typeof c.body!=`string`)throw new y(2808,!1);return c.body}));default:return a.pipe(q(c=>c.body))}case`response`:return a;default:throw new y(2809,!1)}}delete(n,r={}){return this.request(`DELETE`,n,r)}get(n,r={}){return this.request(`GET`,n,r)}head(n,r={}){return this.request(`HEAD`,n,r)}jsonp(n,r){return this.request(`JSONP`,n,{params:new cn$1().append(r,`JSONP_CALLBACK`),observe:`body`,responseType:`json`})}options(n,r={}){return this.request(`OPTIONS`,n,r)}patch(n,r,o={}){return this.request(`PATCH`,n,Nf(o,r))}post(n,r,o={}){return this.request(`POST`,n,Nf(o,r))}put(n,r,o={}){return this.request(`PUT`,n,Nf(o,r))}static ɵfac=function(r){return new(r||e)(w(yc))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Y_=/^\)\]\}',?\n/;var xf=(()=>{class e{xhrFactory;tracingService=p(gt,{optional:!0});constructor(n){this.xhrFactory=n}maybePropagateTrace(n){return this.tracingService?.propagate?this.tracingService.propagate(n):n}handle(n){if(n.method===`JSONP`)throw new y(-2800,!1);let r=this.xhrFactory;return N(null).pipe(Ae$1(()=>new A$1(i=>{let s=r.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEac
5h((E,O)=>s.setRequestHeader(E,O.join(`,`))),n.headers.has(hc)||s.setRequestHeader(hc,Uv),!n.headers.has(Si)){let E=n.detectContentTypeHeader();E!==null&&s.setRequestHeader(Si,E)}if(n.timeout&&(s.timeout=n.timeout),n.responseType){let E=n.responseType.toLowerCase();s.responseType=E!==`json`?E:`text`}let a=n.serializeBody(),c=null,u=()=>{if(c!==null)return c;let E=s.statusText||`OK`,O=new Lt$1(s.getAllResponseHeaders()),je=s.responseURL||n.url;return c=new Ti$1({headers:O,status:s.status,statusText:E,url:je}),c},l=this.maybePropagateTrace(()=>{let{headers:E,status:O,statusText:je,url:ot}=u(),le=null;O!==L_&&(le=typeof s.response>`u`?s.responseText:s.response),O===0&&(O=le?Bv:0);let Bt=O>=200&&O<300;if(n.responseType===`json`&&typeof le==`string`){let dn=le;le=le.replace(Y_,``);try{le=le!==``?JSON.parse(le):null}catch(Ct){le=dn,Bt&&(Bt=!1,le={error:Ct,text:le})}}Bt?(i.next(new io$1({body:le,headers:E,status:O,statusText:je,url:ot||void 0})),i.complete()):i.error(new kt$1({error:le,headers:E,status:O,statusText:je,url:ot||void 0}))}),d=this.maybePropagateTrace(E=>{let{url:O}=u(),je=new kt$1({error:E,status:s.status||0,statusText:s.statusText||`Unknown Error`,url:O||void 0});i.error(je)}),h=d;n.timeout&&(h=this.maybePropagateTrace(E=>{let{url:O}=u(),je=new kt$1({error:new DOMException(`Request timed out`,`TimeoutError`),status:s.status||0,statusText:s.statusText||`Request timeout`,url:O||void 0});i.error(je)}));let f=!1,g=this.maybePropagateTrace(E=>{f||(i.next(u()),f=!0);let O={type:Pt$1.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(O.total=E.total),n.responseType===`text`&&s.responseText&&(O.partialText=s.responseText),i.next(O)}),v=this.maybePropagateTrace(E=>{let O={type:Pt$1.UploadProgress,loaded:E.loaded};E.lengthComputable&&(O.total=E.total),i.next(O)});s.addEventListener(`load`,l),s.addEventListener(`error`,d),s.addEventListener(`timeout`,h),s.addEventListener(`abort`,d);let I=n.reportProgress||n.reportUploadProgress,_=n.reportProgress||n.reportDownloadProgress;return _&&s.addEventListener(`progress`,g),I&&a!==null&&s.upload&&s.upload.addEventListener(`progress`,v),s.send(a),i.next({type:Pt$1.Sent}),()=>{s.removeEventListener(`error`,d),s.removeEventListener(`abort`,d),s.removeEventListener(`load`,l),s.removeEventListener(`timeout`,h),_&&s.removeEventListener(`progress`,g),I&&a!==null&&s.upload&&s.upload.removeEventListener(`progress`,v),s.readyState!==s.DONE&&s.abort()}})))}static ɵfac=function(r){return new(r||e)(w(Tf))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var vc=(function(e){return e[e.Interceptors=0]=`Interceptors`,e[e.LegacyInterceptors=1]=`LegacyInterceptors`,e[e.CustomXsrfConfiguration=2]=`CustomXsrfConfiguration`,e[e.NoXsrfProtection=3]=`NoXsrfProtection`,e[e.JsonpSupport=4]=`JsonpSupport`,e[e.RequestsMadeViaParent=5]=`RequestsMadeViaParent`,e[e.Fetch=6]=`Fetch`,e[e.Xhr=7]=`Xhr`,e})(vc||{});function Zv(e,t){return{ɵkind:e,ɵproviders:t}}function Q_(...e){let t=[Wv,pc,gc,{provide:yc,useExisting:gc},{provide:mc,useFactory:()=>p(pc)},{provide:Of,useValue:$v,multi:!0}];for(let n of e)t.push(...n.ɵproviders);return Zt$1(t)}var Lv=new D(``);function K_(){return Zv(vc.LegacyInterceptors,[{provide:Lv,useFactory:Z_},{provide:Of,useExisting:Lv,multi:!0}])}function X_(){return Zv(vc.Xhr,[xf,{provide:mc,useExisting:xf}])}var _i$1=class{_doc;constructor(t){this._doc=t}manager};var Dc=(()=>{class e extends _i$1{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static ɵfac=function(r){return new(r||e)(w(Y))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var wc=new D(``);var jf=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let o=n.filter(s=>!(s instanceof Dc));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof Dc);i&&this._plugins.push(i)}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new y(-5101,!1);return this._eventNameToPlugin.set(n,r),r}static ɵfac=function(r){return new(r||e)(w(wc),w(z$1))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var Pf=`ng-app-id`;function Yv(e){for(let t of e)t.remove()}function Qv(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function J_(e,t,n,r){let o=e.head?.querySelectorAll(`style[${Pf}="${t}"],link[${Pf}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(Pf),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf(`/`)+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]});return!0}function Ff(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Uf=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,J_(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Qv);r?.forEach(o=>this.addUsage(o,this.external,Ff))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Yv(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Yv(n);this.hosts.clear()}addHost(n){if(!this.hosts.has(n)){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Qv(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Ff(r,this.doc)))}}removeHost(n){this.hosts.delete(n);for(let r of[...this.inline.values(),...this.external.values()]){let o=[];for(let i of r.elements)i.parentNode===n?i.remove():o.push(i);r.elements=o}}
5addElement(n,r){return this.nonce&&r.setAttribute(`nonce`,this.nonce),n.appendChild(r)}static ɵfac=function(r){return new(r||e)(w(Y),w(Go$1),w(Wo$1,8),w(qo$1))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var Lf={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`};var Bf=/%COMP%/g;var Xv=`%COMP%`;var eM=`_nghost-${Xv}`;var tM=`_ngcontent-${Xv}`;var nM=!0;var rM=new D(``,{factory:()=>nM});var oM=new D(``);function iM(e){return tM.replace(Bf,e)}function sM(e){return eM.replace(Bf,e)}function Jv(e,t){return t.map(n=>n.replace(Bf,e))}var Vf=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(n,r,o,i,s,a,c=null,u=null,l=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=u,this.cssVarNamespace=l??``,this.defaultRenderer=new Mi$1(n,s,a,this.tracingService,this.cssVarNamespace)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(n,r);return o instanceof Ic?o.applyToHost(n):o instanceof Ni$1&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case pt$1.Emulated:i=new Ic(c,u,r,this.appId,l,s,a,d,this.cssVarNamespace);break;case pt$1.ShadowDom:return new Ec(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,u);case pt$1.ExperimentalIsolatedShadowDom:return new Ec(c,n,r,s,a,this.nonce,d,this.cssVarNamespace);default:i=new Ni$1(c,u,r,l,s,a,d,this.cssVarNamespace)}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static ɵfac=function(r){return new(r||e)(w(jf),w(ur$1),w(Go$1),w(rM),w(Y),w(z$1),w(Wo$1),w(gt,8),w(oM,8))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var Mi$1=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i=``){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=o,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(Lf[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(Kv(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=Kv(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new y(-5106,!1);o.insertBefore(n,r)}}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t==`string`?this.doc.querySelector(t):t;if(!r)throw new y(-5104,!1);return n||(r.textContent=``),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+`:`+n;let i=Lf[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=Lf[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){let i=n.startsWith(`--`);i&&(n=n.replace(`%NS%`,this.cssVarNamespace)),i||o&(Nt$1.DashCase|Nt$1.Important)?t.style.setProperty(n,r,o&Nt$1.Important?`important`:``):t.style[n]=r}removeStyle(t,n,r){let o=n.startsWith(`--`);o&&(n=n.replace(`%NS%`,this.cssVarNamespace)),o||r&Nt$1.DashCase?t.style.removeProperty(n):t.style[n]=``}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t==`string`&&(t=yt().getGlobalEventTarget(this.doc,t),!t))throw new y(-5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n===`__ngUnwrap__`)return t;t(n)===!1&&n.preventDefault()}}};function Kv(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Ec=class extends Mi$1{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,o,i,s,a,c,u){super(t,o,i,a,c),this.hostEl=n,this.sharedStylesHost=u,this.shadowRoot=n.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=Jv(r.id,l).map(h=>h.replace(/%NS%/g,c));for(let h of l){let f=document.createElement(`style`);s&&f.setAttribute(`nonce`,s),f.textContent=h,this.shadowRoot.appendChild(f)}let d=r.getExternalStyles?.();if(d)for(let h of d){let f=Ff(h,o);s&&f.setAttribute(`nonce`,s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}};var Ni$1=class extends Mi$1{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,c,u){super(t,i,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let l=r.styles,d=u?Jv(u,l):l;this.styles=d.map(h=>h.replace(/%NS%/g,c)),this.styleUrls=r.getExternalStyles?.(u)}
5applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ud.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}};var Ic=class extends Ni$1{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,c,u){let l=o+`-`+r.id;super(t,n,r,i,s,a,c,u,l),this.contentAttr=iM(l),this.hostAttr=sM(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,``)}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,``),r}};var Cc=class e extends Di$1{supportsDOMEvents=!0;static makeCurrent(){Df(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n===`window`?window:n===`document`?t:n===`body`?t.body:null}getBaseHref(t){let n=aM();return n==null?null:cM(n)}resetBaseElement(){Ri$1=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return bi(document.cookie,t)}};var Ri$1=null;function aM(){return Ri$1=Ri$1||document.head.querySelector(`base`),Ri$1?Ri$1.getAttribute(`href`):null}function cM(e){return new URL(e,document.baseURI).pathname}var bc=class{addToWindow(t){ge.getAngularTestability=(r,o=!0)=>{let i=t.findTestabilityInTree(r,o);if(i==null)throw new y(5103,!1);return i},ge.getAllAngularTestabilities=()=>t.getAllTestabilities(),ge.getAllAngularRootElements=()=>t.getAllRootElements();let n=r=>{let o=ge.getAllAngularTestabilities(),i=o.length,s=function(){i--,i==0&&r()};o.forEach(a=>{a.whenStable(s)})};ge.frameworkStabilizers||(ge.frameworkStabilizers=[]),ge.frameworkStabilizers.push(n)}findTestabilityInTree(t,n,r){if(n==null)return null;return t.getTestability(n)??(r?yt().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}};var eD=[`alt`,`control`,`meta`,`shift`];var uM={"\b":`Backspace`,"	":`Tab`,"�":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`};var lM={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};var tD=(()=>{class e extends _i$1{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>yt().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split(`.`),o=r.shift();if(r.length===0||!(o===`keydown`||o===`keyup`))return null;let i=e._normalizeKey(r.pop()),s=``,a=r.indexOf(`code`);if(a>-1&&(r.splice(a,1),s=`code.`),eD.forEach(u=>{let l=r.indexOf(u);l>-1&&(r.splice(l,1),s+=u+`.`)}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let o=uM[n.key]||n.key,i=``;return r.indexOf(`code.`)>-1&&(o=n.code,i=`code.`),o==null||!o?!1:(o=o.toLowerCase(),o===` `?o=`space`:o===`.`&&(o=`dot`),eD.forEach(s=>{if(s!==o){let a=lM[s];a(n)&&(i+=s+`.`)}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n===`esc`?`escape`:n}static ɵfac=function(r){return new(r||e)(w(Y))};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();function dM(e,t,n){return V(this,null,function*(){return lv(m({rootComponent:e},fM(t,n)))})}function fM(e,t){return{platformRef:t?.platformRef,appProviders:[...nD,...e?.providers??[]],platformProviders:mM}}function hM(){Cc.makeCurrent()}function pM(){return new at$2}function gM(){return Md(document),document}var mM=[{provide:qo$1,useValue:Nv},{provide:oa$1,useValue:hM,multi:!0},{provide:Y,useFactory:gM}];var yM=[{provide:eo$1,useClass:bc},{provide:qa$1,useClass:fi,deps:[z$1,hi,eo$1]},{provide:fi,useClass:fi,deps:[z$1,hi,eo$1]}];var nD=[{provide:jo$1,useValue:`root`},{provide:at$2,useFactory:pM},{provide:wc,useClass:Dc,multi:!0},{provide:wc,useClass:tD,multi:!0},Vf,{provide:ur$1,useClass:Uf},{provide:Uf,useExisting:ur$1},jf,{provide:ir$1,useExisting:Vf},[]];var vM=(()=>{class e{constructor(){}static ɵfac=function(r){return new(r||e)};static ɵmod=rn$1({type:e});static ɵinj=St({providers:[...nD,...yM],imports:[Sf,cv]})}return e})();var fz=(()=>{class e{_doc=p(Y);_dom=yt();_cachedHead;addTag(n,r=!1){return n?this._getOrCreateElement(n,r):null}addTags(n,r=!1){return n.filter(o=>!!o).map(o=>this._getOrCreateElement(o,r))}getTag(n){if(!n)return null;let r=this._doc.querySelector(rD(n));return aD(r)?r:null}getTags(n){if(!n)return[];let r=this._doc.querySelectorAll(rD(n));return r?Array.from(r).filter(o=>aD(o)):[]}updateTag(n,r){iD(n),r??=sD(n);let o=this.getTag(r);return o?(oD(n,o),o):this._getOrCreateElement(n,!0)}removeTag(n){this.removeTagElement(this.getTag(n))}removeTagElement(n){n&&this._dom.remove(n)}_getOrCreateElement(n,r=!1){if(iD(n),!r){let s=sD(n),a=this.getTags(s).filter(c=>EM(n,c))[0];if(a!==void 0)return a}let o=this._dom.createElement(`meta`);return oD(n,o),this._doc.getElementsByTagName(`head`)[0].appendChild(o),o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function rD(e){return`meta[${e}]`}function oD(e,t){Object.keys(e).forEach(n=>t.setAttribute(Hf(n),e[n]))}function iD(e){for(let t of Object.keys(e))if(Hf(t).toLowerCase().startsWith(`on`))throw new y(5203,!1)}function sD(e){let t=e.name?`name`:`property`;return`${t}=${DM(String(e[t]))}`}function DM(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function EM(e,t){return Object.keys(e).every(n=>t.getAttribute(Hf(n))===e[n])}function Hf(e){return Object.hasOwn(cD,e)?cD[e]:e}function aD(e){return e?.nodeName.toLowerCase()===`meta`}var cD={httpEquiv:`http-equiv`};var uD=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||``}static ɵfac=function(r){return new(r||e)(w(Y))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var IM=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=S({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=w(wM),o},providedIn:`root`})}return e})();var wM=(()=>{class e extends IM{_doc=p(Y);sanitize(n,r){if(r==null)return null;switch(n){case ee.NONE:return r;case ee.HTML:return tn$2(r,`HTML`)?Ge$2(r):Pd(this._doc,String(r)).toString();case ee.STYLE:return tn$2(r,`Style`)?Ge$2(r):r;case ee.SCRIPT:if(tn$2(r,`Script`))return Ge$2(r);throw new y(5200,!1);case ee.URL:return tn$2(r,`URL`)?Ge$2(r):si(String(r));case ee.RESOURCE_URL:if(tn$2(r,`ResourceURL`))return Ge$2(r);throw new y(-5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(n){return Rd(n)}bypassSecurityTrustStyle(n){return Ad(n)}bypassSecurityTrustScript(n){return xd(n)}bypassSecurityTrustUrl(n){return Od(n)}bypassSecurityTrustResourceUrl(n){return kd(n)}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var x=`primary`;var $i$1=Symbol(`RouteTitle`);var Zf=class{params;constructor(t){this.params=t||{}}has(t){return Object.hasOwn(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function hr$1(e){return new Zf(e)}function $f(e,t,n){for(let r=0;r<e.length;r++){let o=e[r],i=t[r];
5if(o[0]===`:`)n[o.substring(1)]=i;else if(o!==i.path)return!1}return!0}function mD(e,t,n){let r=n.path.split(`/`),o=r.indexOf(`**`);if(o===-1){if(r.length>e.length||n.pathMatch===`full`&&(t.hasChildren()||r.length<e.length))return null;let c={},u=e.slice(0,r.length);return $f(r,u,c)?{consumed:u,posParams:c}:null}if(o!==r.lastIndexOf(`**`))return null;let i=r.slice(0,o),s=r.slice(o+1);if(i.length+s.length>e.length||n.pathMatch===`full`&&t.hasChildren()&&n.path!==`**`)return null;let a={};return!$f(i,e.slice(0,i.length),a)||!$f(s,e.slice(e.length-s.length),a)?null:{consumed:e,posParams:a}}function Rc(e){return new Promise((t,n)=>{e.pipe(zt$1()).subscribe({next:r=>t(r),error:r=>n(r)})})}function bM(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!jt$1(e[n],t[n]))return!1;return!0}function jt$1(e,t){let n=e?Yf(e):void 0,r=t?Yf(t):void 0;if(!n||!r||n.length!=r.length)return!1;let o;for(let i=0;i<n.length;i++)if(o=n[i],!yD(e[o],t[o]))return!1;return!0}function Yf(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e)]}function yD(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((o,i)=>r[i]===o)}else return e===t}function SM(e){return e.length>0?e[e.length-1]:null}function mr$1(e){return Cs(e)?e:Xr$1(e)?J(Promise.resolve(e)):N(e)}function vD(e){return Cs(e)?Rc(e):Promise.resolve(e)}var TM={exact:ED,subset:ID};var DD={exact:_M,subset:MM,ignored:()=>!0};var uh={paths:`exact`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`exact`};var lo$1={paths:`subset`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`subset`};function lh(e,t,n){let r=e instanceof Fe?e:t.parseUrl(e);return Ka$1(()=>Ac(t.lastSuccessfulNavigation()?.finalUrl??new Fe,r,n))}function Ac(e,t,n){let r=m(m({},lo$1),n||{});return TM[r.paths](e.root,t.root,r.matrixParams)&&DD[r.queryParams](e.queryParams,t.queryParams)&&!(r.fragment===`exact`&&e.fragment!==t.fragment)}function _M(e,t){return jt$1(e,t)}function ED(e,t,n){if(!fr$1(e.segments,t.segments)||!_c(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!ED(e.children[r],t.children[r],n))return!1;return!0}function MM(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>yD(e[n],t[n]))}function ID(e,t,n){return wD(e,t,t.segments,n)}function wD(e,t,n,r){if(e.segments.length>n.length){let o=e.segments.slice(0,n.length);return!(!fr$1(o,n)||t.hasChildren()||!_c(o,n,r))}else if(e.segments.length===n.length){if(!fr$1(e.segments,n)||!_c(e.segments,n,r))return!1;for(let o in t.children)if(!e.children[o]||!ID(e.children[o],t.children[o],r))return!1;return!0}else{let o=n.slice(0,e.segments.length),i=n.slice(e.segments.length);return!fr$1(e.segments,o)||!_c(e.segments,o,r)||!e.children[x]?!1:wD(e.children[x],t,i,r)}}function _c(e,t,n){return t.every((r,o)=>DD[n](e[o].parameters,r.parameters))}var Fe=class{root;queryParams;fragment;_queryParamMap;constructor(t=new B([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=hr$1(this.queryParams),this._queryParamMap}toString(){return AM.serialize(this)}};var B=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Mc(this)}};var Rn=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=hr$1(this.parameters),this._parameterMap}toString(){return bD(this)}};function NM(e,t){return fr$1(e,t)&&e.every((n,r)=>jt$1(n.parameters,t[r].parameters))}function fr$1(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function RM(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===x&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==x&&(n=n.concat(t(o,r)))}),n}var kn$1=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>new un$1})}return e})();var un$1=class{parse(t){let n=new Kf(t);return new Fe(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){return`${`/${Ai$1(t.root,!0)}`}${kM(t.queryParams)}${typeof t.fragment==`string`?`#${xM(t.fragment)}`:``}`}};var AM=new un$1;function Mc(e){return e.segments.map(t=>bD(t)).join(`/`)}function Ai$1(e,t){if(!e.hasChildren())return Mc(e);if(t){let n=e.children[x]?Ai$1(e.children[x],!1):``,r=[];
5return Object.entries(e.children).forEach(([o,i])=>{o!==x&&r.push(`${o}:${Ai$1(i,!1)}`)}),r.length>0?`${n}(${r.join(`//`)})`:n}else{let n=RM(e,(r,o)=>o===x?[Ai$1(e.children[x],!1)]:[`${o}:${Ai$1(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[x]!=null?`${Mc(e)}/${n[0]}`:`${Mc(e)}/(${n.join(`//`)})`}}function CD(e){return encodeURIComponent(e).replace(/%40/g,`@`).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`)}function Sc(e){return CD(e).replace(/%3B/gi,`;`)}function xM(e){return encodeURI(e)}function Qf(e){return CD(e).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/%26/gi,`&`)}function Nc(e){return decodeURIComponent(e)}function lD(e){return Nc(e.replace(/\+/g,`%20`))}function bD(e){return`${Qf(e.path)}${OM(e.parameters)}`}function OM(e){return Object.entries(e).map(([t,n])=>`;${Qf(t)}=${Qf(n)}`).join(``)}function kM(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(o=>`${Sc(n)}=${Sc(o)}`).join(`&`):`${Sc(n)}=${Sc(r)}`).filter(n=>n);return t.length?`?${t.join(`&`)}`:``}var zf=1073741824;function xc(e,t,n){Number(t)>=32&&!Object.hasOwn(e,zf)&&(e[zf]=n,delete e[zf]),e[t]=n}var PM=/^[^\/()?;#]+/;function Gf(e){let t=e.match(PM);return t?t[0]:``}var LM=/^[^\/()?;=#]+/;function FM(e){let t=e.match(LM);return t?t[0]:``}var jM=/^[^=?&#]+/;function UM(e){let t=e.match(jM);return t?t[0]:``}var BM=/^[^&#]+/;function VM(e){let t=e.match(BM);return t?t[0]:``}var Kf=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){for(;this.consumeOptional(`/`););return this.remaining===``||this.peekStartsWith(`?`)||this.peekStartsWith(`#`)?new B([],{}):new B([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional(`?`))do this.parseQueryParam(t);while(this.consumeOptional(`&`));return t}parseFragment(){return this.consumeOptional(`#`)?decodeURIComponent(this.remaining):null}parseChildren(t=0){if(t>50)throw new y(4010,!1);if(this.remaining===``)return{};this.consumeOptional(`/`);let n=[];for(this.peekStartsWith(`(`)||n.push(this.parseSegment());this.peekStartsWith(`/`)&&!this.peekStartsWith(`//`)&&!this.peekStartsWith(`/(`);)this.capture(`/`),n.push(this.parseSegment());let r={};this.peekStartsWith(`/(`)&&(this.capture(`/`),r=this.parseParens(!0,t));let o={};return this.peekStartsWith(`(`)&&(o=this.parseParens(!1,t)),(n.length>0||Object.keys(r).length>0)&&(o[x]=new B(n,r)),o}parseSegment(){let t=Gf(this.remaining);if(t===``&&this.peekStartsWith(`;`))throw new y(4009,!1);return this.capture(t),new Rn(Nc(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(`;`);)this.parseParam(t);return t}parseParam(t){let n=FM(this.remaining);if(!n)return;this.capture(n);let r=``;if(this.consumeOptional(`=`)){let o=Gf(this.remaining);o&&(r=o,this.capture(r))}xc(t,Nc(n),Nc(r))}parseQueryParam(t){let n=UM(this.remaining);if(!n)return;this.capture(n);let r=``;if(this.consumeOptional(`=`)){let s=VM(this.remaining);s&&(r=s,this.capture(r))}let o=lD(n),i=lD(r);if(Object.hasOwn(t,o)){let s=t[o];Array.isArray(s)||(s=[s],t[o]=s),s.push(i)}else t[o]=i}parseParens(t,n){let r=Object.create(null);for(this.capture(`(`);!this.consumeOptional(`)`)&&this.remaining.length>0;){let o=Gf(this.remaining),i=this.remaining[o.length];if(i!==`/`&&i!==`)`&&i!==`;`)throw new y(4010,!1);let s;o.indexOf(`:`)>-1?(s=o.slice(0,o.indexOf(`:`)),this.capture(s),this.capture(`:`)):t&&(s=x);let a=this.parseChildren(n+1),c=Object.keys(a).length===1&&a[x]?a[x]:new B([],a);xc(r,s??x,c),this.consumeOptional(`//`)}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new y(4011,!1)}};function SD(e){return e.segments.length>0?new B([],{[x]:e}):e}function TD(e){let t=Object.create(null);for(let[r,o]of Object.entries(e.children)){let i=TD(o);if(r===x&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))xc(t,s,a);else(i.segments.length>0||i.hasChildren())&&xc(t,r,i)}return HM(new B(e.segments,t))}
vendor: 4,533 bytes, line 5
5function HM(e){if(e.numberOfChildren===1&&e.children[x]){let t=e.children[x];return new B(e.segments.concat(t.segments),t.children)}return e}function An$1(e){return e instanceof Fe}function _D(e,t,n=null,r=null,o=new un$1){return ND(MD(e),t,n,r,o)}function MD(e){let t;function n(i){let s={};for(let c of i.children){let u=n(c);s[c.outlet]=u}let a=new B(i.url,s);return i===e&&(t=a),a}let o=SD(n(e.root));return t??o}function ND(e,t,n,r,o){let i=e;for(;i.parent;)i=i.parent;if(t.length===0)return qf(i,i,i,n,r,o);let s=$M(t);if(s.toRoot())return qf(i,i,new B([],{}),n,r,o);let a=zM(s,i,e),c=a.processChildren?Oi$1(a.segmentGroup,a.index,s.commands):AD(a.segmentGroup,a.index,s.commands);return qf(i,a.segmentGroup,c,n,r,o)}function Oc(e){return typeof e==`object`&&e!=null&&!e.outlets&&!e.segmentPath}function Li$1(e){return typeof e==`object`&&e!=null&&e.outlets}function dD(e,t,n){e||=`ɵ`;let r=new Fe;return r.queryParams={[e]:t},n.parse(n.serialize(r)).queryParams[e]}function qf(e,t,n,r,o,i){let s={};for(let[u,l]of Object.entries(r??{}))s[u]=Array.isArray(l)?l.map(d=>dD(u,d,i)):dD(u,l,i);let a;e===t?a=n:a=RD(e,t,n);return new Fe(SD(TD(a)),s,o)}function RD(e,t,n){let r=Object.create(null);return Object.entries(e.children).forEach(([o,i])=>{i===t?r[o]=n:r[o]=RD(i,t,n)}),new B(e.segments,r)}var kc=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Oc(r[0]))throw new y(4003,!1);let o=r.find(Li$1);if(o&&o!==SM(r))throw new y(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]==`/`}};function $M(e){if(typeof e[0]==`string`&&e.length===1&&e[0]===`/`)return new kc(!0,0,e);let t=0,n=!1,r=e.reduce((o,i,s)=>{if(typeof i==`object`&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([c,u])=>{a[c]=typeof u==`string`?u.split(`/`):u}),[...o,{outlets:a}]}if(i.segmentPath)return[...o,i.segmentPath]}return typeof i!=`string`?[...o,i]:s===0?(i.split(`/`).forEach((a,c)=>{c==0&&a===`.`||(c==0&&a===``?n=!0:a===`..`?t++:a!=``&&o.push(a))}),o):[...o,i]},[]);return new kc(n,t,r)}var ao$1=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function zM(e,t,n){if(e.isAbsolute)return new ao$1(t,!0,0);if(!n)return new ao$1(t,!1,NaN);if(n.parent===null)return new ao$1(n,!0,0);let r=Oc(e.commands[0])?0:1;return GM(n,n.segments.length-1+r,e.numberOfDoubleDots)}function GM(e,t,n){let r=e,o=t,i=n;for(;i>o;){if(i-=o,r=r.parent,!r)throw new y(4005,!1);o=r.segments.length}return new ao$1(r,!1,o-i)}function qM(e){return Li$1(e[0])?e[0].outlets:{[x]:e}}function AD(e,t,n){if(e??=new B([],{}),e.segments.length===0&&e.hasChildren())return Oi$1(e,t,n);let r=WM(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndex<e.segments.length){let i=new B(e.segments.slice(0,r.pathIndex),{});return i.children[x]=new B(e.segments.slice(r.pathIndex),e.children),Oi$1(i,0,o)}else return r.match&&o.length===0?new B(e.segments,{}):r.match&&!e.hasChildren()?Xf(e,t,n):r.match?Oi$1(e,0,o):Xf(e,t,n)}function Oi$1(e,t,n){if(n.length===0)return new B(e.segments,{});{let r=qM(n),o=Object.create(null);if(Object.keys(r).some(i=>i!==x)&&e.children[x]&&e.numberOfChildren===1&&e.children[x].segments.length===0){let i=Oi$1(e.children[x],t,n);return new B(e.segments,i.children)}return Object.entries(r).forEach(([i,s])=>{typeof s==`string`&&(s=[s]),s!==null&&(o[i]=AD(e.children[i],t,s))}),Object.entries(e.children).forEach(([i,s])=>{r[i]===void 0&&(o[i]=s)}),new B(e.segments,o)}}function WM(e,t,n){let r=0,o=t,i={match:!1,pathIndex:0,commandIndex:0};for(;o<e.segments.length;){if(r>=n.length)return i;let s=e.segments[o],a=n[r];if(Li$1(a))break;let c=`${a}`,u=r<n.length-1?n[r+1]:null;if(o>0&&c===void 0)break;if(c&&u&&typeof u==`object`&&u.outlets===void 0){if(!hD(c,u,s))return i;r+=2}else{if(!hD(c,{},s))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}function Xf(e,t,n){let r=e.segments.slice(0,t),o=0;for(;o<n.length;){let i=n[o];if(Li$1(i))return new B(r,ZM(i.outlets));if(o===0&&Oc(n[0])){let c=e.segments[t];r.push(new Rn(c.path,fD(n[0]))),o++;continue}let s=Li$1(i)?i.outlets[x]:`${i}`,a=o<n.length-1?n[o+1]:null;s&&a&&Oc(a)?(r.push(new Rn(s,fD(a))),o+=2):(r.push(new Rn(s,{})),o++)}return new B(r,{})}function ZM(e){let t={};return Object.entries(e).forEach(([n,r])=>{typeof r==`string`&&(r=[r]),r!==null&&(t[n]=Xf(new B([],{}),0,r))}),t}function fD(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}
5function hD(e,t,n){return e==n.path&&jt$1(t,n.parameters)}var Pc=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new xn$1(this.rootInjector)}resetChildren(){this.children=new xn$1(this.rootInjector)}};var xn$1=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Pc(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static ɵfac=function(r){return new(r||e)(w(re))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Lc=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=Jf(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=Jf(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=eh(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return eh(t,this._root).map(n=>n.value)}};function Jf(e,t){if(e===t.value)return t;for(let n of t.children){let r=Jf(e,n);if(r)return r}return null}function eh(e,t){if(e===t.value)return[t];for(let n of t.children){let r=eh(e,n);if(r.length)return r.unshift(t),r}return[]}var Le=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function so(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Fi$1=class extends Lc{snapshot;constructor(t,n){super(t),this.snapshot=n,fh(this,t)}toString(){return this.snapshot.toString()}};function xD(e,t){let n=YM(e,t),r=new De([new Rn(``,{})]),o=new De({}),i=new De({}),c=new ln$1(r,o,new De({}),new De(``),i,x,e,n.root);return c.snapshot=n.root,new Fi$1(new Le(c,[]),n)}function YM(e,t){return new ji$1(``,new Le(new fo$1([],{},{},``,{},x,e,null,{},t),[]))}var ln$1=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;resources;_localInjector;pending;paramsSignal;queryParamsSignal;paramMapSignal;queryParamMapSignal;fragmentSignal;dataSignal;constructor(t,n,r,o,i,s,a,c){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(q(u=>u[$i$1]))??N(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(q(t=>hr$1(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(q(t=>hr$1(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}_setPending(t){this._futureSnapshot=t,this.pending?.set(!0)}};var QM=`always`;function dh(e,t,n){let r,{routeConfig:o}=e;return t!==null&&(n===`always`||o?.path===``||!t.component&&!t.routeConfig?.loadComponent)?r={params:Object.keys(e.params).length===0?t.params:Object.freeze(m(m({},t.params),e.params)),data:Object.freeze(m(m({},t.data),e.data)),resolve:m(m(m(m({},e.data),t.data),o?.data),e._resolvedData)}:r={params:Object.freeze(m({},e.params)),data:Object.freeze(m({},e.data)),resolve:m(m({},e.data),e._resolvedData??{})},o&&kD(o)&&(r.resolve[$i$1]=o.title),r}var fo$1=class{url;params;queryParams;fragment;data;outlet;component;
5routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;resources;get title(){return this.data?.[$i$1]}constructor(t,n,r,o,i,s,a,c,u,l){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=hr$1(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=hr$1(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join(`/`)}', path:'${this.routeConfig?this.routeConfig.path:``}')`}};var ji$1=class extends Lc{url;constructor(t,n){super(n),this.url=t,fh(this,n)}toString(){return OD(this._root)}};function fh(e,t){t.value._routerState=e,t.children.forEach(n=>fh(e,n))}function OD(e){let t=e.children.length>0?` { ${e.children.map(OD).join(`, `)} } `:``;return`${e.value}${t}`}function Wf(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,jt$1(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),jt$1(t.params,n.params)||e.paramsSubject.next(n.params),bM(t.url,n.url)||e.urlSubject.next(n.url),jt$1(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function th(e,t){let n=jt$1(e.params,t.params)&&NM(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||th(e.parent,t.parent))}function kD(e){return typeof e.title==`string`||e.title===null}var PD=new D(``);var hh=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=x;activateEvents=new be;deactivateEvents=new be;attachEvents=new be;detachEvents=new be;routerOutletData=ec();parentContexts=p(xn$1);location=p(lr$1);changeDetector=p(no$1);inputBinder=p(zi$1,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new y(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new y(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new y(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new y(4013,!1);this._activatedRoute=n;let o=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new nh(n,a,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),this.activateEvents.emit(this.activated.instance)}static ɵfac=function(r){return new(r||e)};static ɵdir=dr$1({type:e,selectors:[[`router-outlet`]],inputs:{name:`name`,routerOutletData:[1,`routerOutletData`]},outputs:{activateEvents:`activate`,deactivateEvents:`deactivate`,attachEvents:`attach`,detachEvents:`detach`},exportAs:[`outlet`],features:[cr$1]})}return e})();var nh=class{route;childContexts;parent;outletData;constructor(t,n,r,o){this.route=t,this.childContexts=n,this.parent=r,this.outletData=o}get(t,n){return t===ln$1?this.route:t===xn$1?this.childContexts:t===PD?this.outletData:this.parent.get(t,n)}};var zi$1=new D(``);var LD=(()=>{class e{options;feature;outletDataSubscriptions=new Map;outletSeenKeys=new Map;outletEffects=new Map;constructor(n,r=null){this.options=n,this.feature=r,this.options.queryParams??=!0}bindActivatedRouteToOutletComponent(n,r){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n,r)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n),this.outletSeenKeys.delete(n),this.outletEffects.get(n)?.forEach(r=>r.destroy()),this.outletEffects.delete(n)}subscribeToRouteData(n,r){let{activatedRoute:o}=n,i=[],s=[];if(this.feature?.createResourceOutletBindingEffects&&n.activatedComponentRef){let{handledKeys:c,createdEffects:u}=this.feature.createResourceOutletBindingEffects(n.activatedComponentRef,o);i.push(...u),s=c}i.length>0&&this.outletEffects.set(n,i);let a=Ts([this.options.queryParams?o.queryParams:N({}),o.params,o.data]).pipe(Ae$1(([c,u,l],d)=>(l=m(m(m(m({},c),u),l),o.resources),d===0?N(l):Promise.resolve(l)))).subscribe(c=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==o||o.component===null){this.unsubscribeFromRouteData(n);return}let u=vf(o.component);if(!u){this.unsubscribeFromRouteData(n);return}let l=this.outletSeenKeys.get(n);l||(l=new Set,this.outletSeenKeys.set(n,l));for(let h of Object.keys(c))l.add(h);let d=this.options.unmatchedInputBehavior??`alwaysUndefined`;for(let{templateName:h}of u.inputs){if(s.includes(h))continue;let f=c[h];
5(f!==void 0||d===`alwaysUndefined`||l.has(h))&&n.activatedComponentRef.setInput(h,f)}});this.outletDataSubscriptions.set(n,a)}static ɵfac=function(r){di()};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var ph=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵcmp=ef({type:e,selectors:[[`ng-component`]],exportAs:[`emptyRouterOutlet`],decls:1,vars:0,template:function(r,o){r&1&&Za$1(0,`router-outlet`)},dependencies:[hh],encapsulation:2,changeDetection:1})}return e})();function gh(e){let t=e.children&&e.children.map(gh),n=t?j(m({},e),{children:t}):m({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==x&&(n.component=ph),n}var co$1=`imperative`;var ye$1=(function(e){return e[e.NavigationStart=0]=`NavigationStart`,e[e.NavigationEnd=1]=`NavigationEnd`,e[e.NavigationCancel=2]=`NavigationCancel`,e[e.NavigationError=3]=`NavigationError`,e[e.RoutesRecognized=4]=`RoutesRecognized`,e[e.ResolveStart=5]=`ResolveStart`,e[e.ResolveEnd=6]=`ResolveEnd`,e[e.GuardsCheckStart=7]=`GuardsCheckStart`,e[e.GuardsCheckEnd=8]=`GuardsCheckEnd`,e[e.RouteConfigLoadStart=9]=`RouteConfigLoadStart`,e[e.RouteConfigLoadEnd=10]=`RouteConfigLoadEnd`,e[e.ChildActivationStart=11]=`ChildActivationStart`,e[e.ChildActivationEnd=12]=`ChildActivationEnd`,e[e.ActivationStart=13]=`ActivationStart`,e[e.ActivationEnd=14]=`ActivationEnd`,e[e.Scroll=15]=`Scroll`,e[e.NavigationSkipped=16]=`NavigationSkipped`,e})(ye$1||{});var We$2=class{id;url;constructor(t,n){this.id=t,this.url=n}};var On$1=class extends We$2{type=ye$1.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r=`imperative`,o=null){super(t,n),this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}};var Ze=class extends We$2{urlAfterRedirects;type=ye$1.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}};var Ne$1=(function(e){return e[e.Redirect=0]=`Redirect`,e[e.SupersededByNewNavigation=1]=`SupersededByNewNavigation`,e[e.NoDataFromResolver=2]=`NoDataFromResolver`,e[e.GuardRejected=3]=`GuardRejected`,e[e.Aborted=4]=`Aborted`,e})(Ne$1||{});var ho=(function(e){return e[e.IgnoredSameUrlNavigation=0]=`IgnoredSameUrlNavigation`,e[e.IgnoredByUrlHandlingStrategy=1]=`IgnoredByUrlHandlingStrategy`,e})(ho||{});var rt$2=class extends We$2{reason;code;type=ye$1.NavigationCancel;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function FD(e){return e instanceof rt$2&&(e.code===Ne$1.Redirect||e.code===Ne$1.SupersededByNewNavigation)}var Ut$1=class extends We$2{reason;code;type=ye$1.NavigationSkipped;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}};var pr$1=class extends We$2{error;target;type=ye$1.NavigationError;constructor(t,n,r,o){super(t,n),this.error=r,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}};var Ui$1=class extends We$2{urlAfterRedirects;state;type=ye$1.RoutesRecognized;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Fc=class extends We$2{urlAfterRedirects;state;type=ye$1.GuardsCheckStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var jc=class extends We$2{urlAfterRedirects;state;shouldActivate;type=ye$1.GuardsCheckEnd;constructor(t,n,r,o,i){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}};var Uc=class extends We$2{urlAfterRedirects;state;type=ye$1.ResolveStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Bc=class extends We$2{urlAfterRedirects;state;type=ye$1.ResolveEnd;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Vc=class{route;type=ye$1.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}};var Hc=class{route;type=ye$1.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}};var $c=class{snapshot;type=ye$1.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var zc=class{snapshot;type=ye$1.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var Gc=class{snapshot;type=ye$1.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var qc=class{snapshot;type=ye$1.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var po$1=class{routerEvent;position;anchor;scrollBehavior;type=ye$1.Scroll;constructor(t,n,r,o){this.routerEvent=t,this.position=n,this.anchor=r,this.scrollBehavior=o}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}};var go$1=class{};var Bi$1=class{};var mo$1=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function KM(e){return!(e instanceof go$1)&&!(e instanceof mo$1)&&!(e instanceof Bi$1)}function XM(e,t,n){let r=new Set;return{newlyCreatedRoutes:r,state:new Fi$1(Vi$1(e,t._root,n?n._root:void 0,r),t)}}function Vi$1(e,t,n,r){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let o=n.value;o._setPending(t.value);return new Le(o,JM(e,t,n,r))}else{if(e.shouldAttach(t.value)){let s=e.retrieve(t.value);if(s!==null){let a=s.route;return a.value._setPending(t.value),a.children=t.children.map(c=>Vi$1(e,c,void 0,r)),a}}let o=eN(t.value);o._setPending(t.value),r.add(o);return new Le(o,t.children.map(s=>Vi$1(e,s,void 0,r)))}}function JM(e,t,n,r){return t.children.map(o=>{for(let i of n.children)if(e.shouldReuseRoute(o.value,i.value.snapshot))return Vi$1(e,o,i,r);return Vi$1(e,o,void 0,r)})}function eN(e){return new ln$1(new De(e.url),new De(e.params),new De(e.queryParams),new De(e.fragment),new De(e.data),e.outlet,e.component,e)}
5var gr$1=class e extends Error{redirectTo;navigationBehaviorOptions;constructor(t,n){super(),this.redirectTo=t,this.navigationBehaviorOptions=n,Object.setPrototypeOf(this,e.prototype)}};var jD=`ngNavigationCancelingError`;function ki$1(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=An$1(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=UD(!1,Ne$1.Redirect);return o.url=n,o.navigationBehaviorOptions=r,o}function UD(e,t){let n=new Error(`NavigationCancelingError: ${e||``}`);return n[jD]=!0,n.cancellationCode=t,n}function tN(e){return BD(e)&&An$1(e.url)}function BD(e){return!!e&&e[jD]}var rh=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,o,i){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=i}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),Wf(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let o=so(n);t.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],r),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,r)})}deactivateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(o===i)if(o.component){let s=r.getContext(o.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else i&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=so(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.contexts;r.resetChildren(),this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=so(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null),t.value._localInjector?.destroy()}activateChildRoutes(t,n,r){let o=so(n);t.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],r),this.forwardEvent(new qc(i.value.snapshot))}),t.children.length&&this.forwardEvent(new zc(t.value.snapshot))}activateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(Wf(o),o===i)if(o.component){let s=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(o.component){let s=r.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let a=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Wf(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}};var Wc=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}};var uo$1=class{component;route;constructor(t,n){this.component=t,this.route=n}};function nN(e,t,n){let r=e._root;return xi(r,t?t._root:null,n,[r.value])}function rN(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function vo$1(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e==`function`&&!Gu(e)?e:t.get(e):r}function xi(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=so(t);return e.children.forEach(s=>{oN(s,i[s.value.outlet],n,r.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>Pi$1(a,n.getContext(s),n,o)),o}function oN(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;
5if(s&&i.routeConfig===s.routeConfig){let c=iN(s,i,i.routeConfig.runGuardsAndResolvers);c?o.canActivateChecks.push(new Wc(r)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?xi(e,t,a?a.children:null,r,o):xi(e,t,n,r,o),c&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new uo$1(a.outlet.component,s))}else s&&Pi$1(t,a,n,o),o.canActivateChecks.push(new Wc(r)),i.component?xi(e,null,a?a.children:null,r,o):xi(e,null,n,r,o);return o}function iN(e,t,n){if(typeof n==`function`)return de(t._environmentInjector,()=>n(e,t));switch(n){case`pathParamsChange`:return!fr$1(e.url,t.url);case`pathParamsOrQueryParamsChange`:return!fr$1(e.url,t.url)||!jt$1(e.queryParams,t.queryParams);case`always`:return!0;case`paramsOrQueryParamsChange`:return!th(e,t)||!jt$1(e.queryParams,t.queryParams);default:return!th(e,t)}}function Pi$1(e,t,n,r){let o=so(e),i=e.value;Object.entries(o).forEach(([s,a])=>{i.component?t?Pi$1(a,t.children.getContext(s),t.children,r):Pi$1(a,null,null,r):Pi$1(a,n?n.getContext(s):null,n,r)}),i.component?t&&t.outlet&&t.outlet.isActivated?r.canDeactivateChecks.push(new uo$1(t.outlet.component,i)):r.canDeactivateChecks.push(new uo$1(null,i)):r.canDeactivateChecks.push(new uo$1(null,i))}function Gi$1(e){return typeof e==`function`}function sN(e){return typeof e==`boolean`}function aN(e){return e&&Gi$1(e.canLoad)}function cN(e){return e&&Gi$1(e.canActivate)}function uN(e){return e&&Gi$1(e.canActivateChild)}function lN(e){return e&&Gi$1(e.canDeactivate)}function dN(e){return e&&Gi$1(e.canMatch)}function VD(e){return e instanceof Ht$1||e?.name===`EmptyError`}var Tc=Symbol(`INITIAL_VALUE`);function yo$1(){return Ae$1(e=>Ts(e.map(t=>t.pipe($t(1),Tu(Tc)))).pipe(q(t=>{for(let n of t)if(n!==!0){if(n===Tc)return Tc;if(n===!1||fN(n))return n}return!0}),He(t=>t!==Tc),$t(1)))}function fN(e){return An$1(e)||e instanceof gr$1}function HD(e){return e.aborted?N(void 0).pipe($t(1)):new A$1(t=>{let n=()=>{t.next(),t.complete()};return e.addEventListener(`abort`,n),()=>e.removeEventListener(`abort`,n)})}function $D(e){return _o$1(HD(e))}function hN(e){return pe(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:i}}=t;return i.length===0&&o.length===0?N(j(m({},t),{guardsResult:!0})):pN(i,n,r).pipe(pe(s=>s&&sN(s)?gN(n,o,e):N(s)),q(s=>j(m({},t),{guardsResult:s})))})}function pN(e,t,n){return J(e).pipe(pe(r=>EN(r.component,r.route,n,t)),zt$1(r=>r!==!0,!0))}function gN(e,t,n){return J(t).pipe(yn$1(r=>Mr$1(yN(r.route.parent,n),mN(r.route,n),DN(e,r.path),vN(e,r.route))),zt$1(r=>r!==!0,!0))}function mN(e,t){return e!==null&&t&&t(new Gc(e)),N(!0)}function yN(e,t){return e!==null&&t&&t(new $c(e)),N(!0)}function vN(e,t){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return N(!0);return N(n.map(o=>To$1(()=>{let i=t._environmentInjector,s=vo$1(o,i);return mr$1(cN(s)?s.canActivate(t,e):de(i,()=>s(t,e))).pipe(zt$1())}))).pipe(yo$1())}function DN(e,t){let n=t[t.length-1];return N(t.slice(0,t.length-1).reverse().map(i=>rN(i)).filter(i=>i!==null).map(i=>To$1(()=>{return N(i.guards.map(a=>{let c=i.node._environmentInjector,u=vo$1(a,c);return mr$1(uN(u)?u.canActivateChild(n,e):de(c,()=>u(n,e))).pipe(zt$1())})).pipe(yo$1())}))).pipe(yo$1())}function EN(e,t,n,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return N(!0);return N(o.map(s=>{let a=t._environmentInjector,c=vo$1(s,a);return mr$1(lN(c)?c.canDeactivate(e,t,n,r):de(a,()=>c(e,t,n,r))).pipe(zt$1())})).pipe(yo$1())}function IN(e,t,n,r,o){let i=t.canLoad;if(i===void 0||i.length===0)return N(!0);return N(i.map(a=>{let c=vo$1(a,e),l=mr$1(aN(c)?c.canLoad(t,n):de(e,()=>c(t,n)));return o?l.pipe($D(o)):l})).pipe(yo$1(),zD(r))}function zD(e){return is(Qe(t=>{if(typeof t!=`boolean`)throw ki$1(e,t)}),q(t=>t===!0))}function wN(e,t,n,r,o,i){let s=t.canMatch;if(!s||s.length===0)return N(!0);return N(s.map(c=>{let u=vo$1(c,e);return mr$1(dN(u)?u.canMatch(t,n,o):de(e,()=>u(t,n,o))).pipe($D(i))})).pipe(yo$1(),zD(r))}var Ft$1=class e extends Error{name=`NoMatch`;segmentGroup;constructor(t){super(),this.segmentGroup=t||null,Object.setPrototypeOf(this,e.prototype)}};
5var Hi$1=class e extends Error{urlTree;name=`AbsoluteRedirect`;constructor(t){super(),this.urlTree=t,Object.setPrototypeOf(this,e.prototype)}};function CN(e){throw new y(4e3,!1)}function bN(e){throw UD(!1,Ne$1.GuardRejected)}var oh=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){return V(this,null,function*(){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),o.numberOfChildren===0)return r;if(o.numberOfChildren>1||!o.children[x])throw CN(`${t.redirectTo}`);o=o.children[x]}})}applyRedirectCommands(t,n,r,o,i){return V(this,null,function*(){let s=yield SN(n,o,i);if(s instanceof Fe)throw new Hi$1(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),t,r);if(s[0]===`/`)throw new Hi$1(a);return a})}applyRedirectCreateUrlTree(t,n,r,o){return new Fe(this.createSegmentGroup(t,n.root,r,o),this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([o,i])=>{if(typeof i==`string`&&i[0]===`:`){let a=i.substring(1);r[o]=n[a]}else r[o]=i}),r}createSegmentGroup(t,n,r,o){let i=this.createSegments(t,n.segments,r,o),s=Object.create(null);return Object.entries(n.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,r,o)}),new B(i,s)}createSegments(t,n,r,o){return n.map(i=>i.path[0]===`:`?this.findPosParam(t,i,o):this.findOrReturn(i,r))}findPosParam(t,n,r){let o=r[n.path.substring(1)];if(!o)throw new y(4001,!1);return o}findOrReturn(t,n){let r=0;for(let o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}};function SN(e,t,n){if(typeof e==`string`)return Promise.resolve(e);let r=e;return Rc(mr$1(de(n,()=>r(t))))}function TN(e,t){return e.providers&&!e._injector&&(e._injector=Jr$1(e.providers,t,`Route: ${e.path}`)),e._injector??t}function It$1(e){return e.outlet||x}function _N(e,t){let n=e.filter(r=>It$1(r)===t);return n.push(...e.filter(r=>It$1(r)!==t)),n}var ih={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function GD(e){return{routeConfig:e.routeConfig,url:e.url,params:e.params,queryParams:e.queryParams,fragment:e.fragment,data:e.data,outlet:e.outlet,title:e.title,paramMap:e.paramMap,queryParamMap:e.queryParamMap}}function MN(e,t,n,r,o,i,s){let a=qD(e,t,n);if(!a.matched)return N(a);let c=GD(i(a));return r=TN(t,r),wN(r,t,n,o,c,s).pipe(q(u=>u===!0?a:m({},ih)))}function qD(e,t,n){if(t.path===``)return t.pathMatch===`full`&&(e.hasChildren()||n.length>0)?m({},ih):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let o=(t.matcher||mD)(n,e,t);if(!o)return m({},ih);let i={};Object.entries(o.posParams??{}).forEach(([a,c])=>{i[a]=c.path});let s=o.consumed.length>0?m(m({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function pD(e,t,n,r,o){return n.length>0&&AN(e,n,r,o)?{segmentGroup:new B(t,RN(r,new B(n,e.children))),slicedSegments:[]}:n.length===0&&xN(e,n,r)?{segmentGroup:new B(e.segments,NN(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new B(e.segments,e.children),slicedSegments:n}}function NN(e,t,n,r){let o={};for(let i of n)if(Yc(e,t,i)&&!r[It$1(i)]){let s=new B([],{});o[It$1(i)]=s}return m(m({},r),o)}function RN(e,t){let n={};n[x]=t;for(let r of e)if(r.path===``&&It$1(r)!==x){let o=new B([],{});n[It$1(r)]=o}return n}function AN(e,t,n,r){return n.some(o=>!Yc(e,t,o)||!(It$1(o)!==x)?!1:!(r!==void 0&&It$1(o)===r))}function xN(e,t,n){return n.some(r=>Yc(e,t,r))}function Yc(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch===`full`?!1:n.path===``}function ON(e,t,n){return t.length===0&&!e.hasChildren()}var sh=class{};function kN(e,t,n,r,o,i,s,a){return V(this,null,function*(){return new ah(e,t,n,r,o,s,i,a).recognize()})}var PN=31;var ah=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;queryParams;constructor(t,n,r,o,i,s,a,c){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer
5=a,this.abortSignal=c,this.applyRedirects=new oh(this.urlSerializer,this.urlTree),this.queryParams=Object.freeze(m({},this.urlTree.queryParams))}noMatchError(t){return new y(4002,`'${t.segmentGroup}'`)}recognize(){return V(this,null,function*(){let t=pD(this.urlTree.root,[],[],this.config).segmentGroup,{children:n,rootSnapshot:r}=yield this.match(t),i=new ji$1(``,new Le(r,n)),s=_D(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}})}match(t){return V(this,null,function*(){let n=new fo$1([],Object.freeze({}),this.queryParams,this.urlTree.fragment,Object.freeze({}),x,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,t,x,n),rootSnapshot:n}}catch(r){if(r instanceof Hi$1)return this.absoluteRedirectCount++,this.absoluteRedirectCount>PN&&(this.allowRedirects=!1),this.urlTree=r.urlTree,this.queryParams=Object.freeze(m({},this.urlTree.queryParams)),this.match(r.urlTree.root);throw r instanceof Ft$1?this.noMatchError(r):r}})}processSegmentGroup(t,n,r,o,i){return V(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(t,n,r,i);let s=yield this.processSegment(t,n,r,r.segments,o,!0,i);return s instanceof Le?[s]:[]})}processChildren(t,n,r,o){return V(this,null,function*(){let i=[];for(let c of Object.keys(r.children))c===`primary`?i.unshift(c):i.push(c);let s=[];for(let c of i){let u=r.children[c],l=_N(n,c),d=yield this.processSegment(t,l,u,u.segments,c,!0,o);d instanceof Le&&s.push(d)}let a=WD(s);return LN(a),a})}processSegment(t,n,r,o,i,s,a){return V(this,null,function*(){for(let c of n)try{return yield this.processSegmentAgainstRoute(c._injector??t,n,c,r,o,i,s,a)}catch(u){if(u instanceof Ft$1||VD(u))continue;throw u}if(ON(r,o))return new sh;throw new Ft$1(r)})}processSegmentAgainstRoute(t,n,r,o,i,s,a,c){return V(this,null,function*(){if(It$1(r)!==s&&(s===x||!Yc(o,i,r)||!r.children?.length&&!r.loadChildren||i.length===0&&!o.hasChildren()))throw new Ft$1(o);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(t,o,r,i,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,i,s,c);throw new Ft$1(o)})}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,i,s,a){return V(this,null,function*(){let{matched:c,parameters:u,consumedSegments:l,positionalParamSegments:d,remainingSegments:h}=qD(n,o,i);if(!c)throw new Ft$1(n);let f=this.createSnapshot(t,o,i,u,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let g=yield this.applyRedirects.applyRedirectCommands(l,o.redirectTo,d,GD(f),t),v=yield this.applyRedirects.lineralizeSegments(o,g);return this.processSegment(t,r,n,v.concat(h),s,!1,a)})}createSnapshot(t,n,r,o,i){let s=new fo$1(r,o,this.queryParams,this.urlTree.fragment,UN(n),It$1(n),n.component??n._loadedComponent??null,n,BN(n),t),a=dh(s,i,this.paramsInheritanceStrategy);return s.params=a.params,s.data=a.data,s}matchSegmentAgainstRoute(t,n,r,o,i,s){return V(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=O=>this.createSnapshot(t,r,O.consumedSegments,O.parameters,s),c=yield Rc(MN(n,r,o,t,this.urlSerializer,a,this.abortSignal));if(r.path===`**`&&(n.children={}),!c?.matched)throw new Ft$1(n);t=r._injector??t;let{routes:u}=yield this.getChildConfig(t,r,o),l=r._loadedInjector??t,{parameters:d,consumedSegments:h,remainingSegments:f}=c,g=this.createSnapshot(t,r,h,d,s),{segmentGroup:v,slicedSegments:I}=pD(n,h,f,u,i),_=It$1(r)===i;if(_&&I.length===0&&v.hasChildren())return new Le(g,yield this.processChildren(l,u,v,g));if(_&&u.length===0&&I.length===0)return new Le(g,[]);let E=yield this.processSegment(l,u,v,I,_?x:i,!0,g);if(!_&&!(E instanceof Le))throw new Ft$1(n);return new Le(g,E instanceof Le?[E]:[])})}getChildConfig(t,n,r){return V(this,null,function*(){if(n.children)return{routes:n.children,injector:t};if(n.loadChildren){if(n._loadedRoutes!==void 0){let i=n._loadedNgModuleFactory;return i&&!n._loadedInjector&&(n._loadedInjector=i.create(t).injector),{routes:n._loadedRoutes,injector:n._loadedInjector}}
5if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield Rc(IN(t,n,r,this.urlSerializer,this.abortSignal))){let i=yield this.configLoader.loadChildren(t,n);return n._loadedRoutes=i.routes,n._loadedInjector=i.injector,n._loadedNgModuleFactory=i.factory,i}throw bN(n)}return{routes:[],injector:t}})}};function LN(e){e.sort((t,n)=>t.value.outlet===x?-1:n.value.outlet===x?1:t.value.outlet.localeCompare(n.value.outlet))}function FN(e){let t=e.value.routeConfig;return t&&t.path===``}function WD(e){let t=[],n=new Set;for(let o of e){if(!FN(o)){t.push(o);continue}let i=t.find(s=>o.value.routeConfig===s.value.routeConfig);i!==void 0?(i.children.push(...o.children),n.add(i)):t.push(o)}for(let o of n){let i=WD(o.children);t.push(new Le(o.value,i))}let r=t.filter(o=>!n.has(o));return jN(r),r}function jN(e){let t=Object.create(null);e.forEach(n=>{let r=t[n.value.outlet];if(r){r.url.map(s=>s.toString()).join(`/`);n.value.url.map(s=>s.toString()).join(`/`);throw new y(4006,!1)}t[n.value.outlet]=n.value})}function UN(e){return e.data||{}}function BN(e){return e.resolve||{}}function VN(e,t,n,r,o,i,s){return pe(a=>V(null,null,function*(){let{state:c,tree:u}=yield kN(e,t,n,r,a.extractedUrl,o,i,s);return j(m({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function HN(e){return pe(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return N(t);let o=new Set(r.map(a=>a.route)),i=new Set;for(let a of o)if(!i.has(a))for(let c of ZD(a))i.add(c);let s=0;return J(i).pipe(yn$1(a=>o.has(a)?$N(a,n,e):(a.data=dh(a,a.parent,e).resolve,N(void 0))),Qe(()=>s++),_s(1),pe(a=>s===i.size?N(t):Ee$1))})}function ZD(e){return[e,...e.children.map(n=>ZD(n)).flat()]}function $N(e,t,n){let r=e.routeConfig,o=e._resolve;return r?.title!==void 0&&!kD(r)&&(o[$i$1]=r.title),To$1(()=>(e.data=dh(e,e.parent,n).resolve,zN(o,e,t).pipe(q(i=>(e._resolvedData=i,e.data=m(m({},e.data),i),null)))))}function zN(e,t,n){let r=Yf(e);if(r.length===0)return N({});let o={};return J(r).pipe(pe(i=>GN(e[i],t,n).pipe(zt$1(),Qe(s=>{if(s instanceof gr$1)throw ki$1(new un$1,s);o[i]=s}))),_s(1),q(()=>o),Gn(i=>VD(i)?Ee$1:Cu(i)))}function GN(e,t,n){let r=t._environmentInjector,o=vo$1(e,r);return mr$1(o.resolve?o.resolve(t,n):de(r,()=>o(t,n)))}var mh=new D(``);function ch(e){return Ae$1(t=>{let n=e(t);return n?J(n).pipe(q(()=>t)):N(t)})}var yh=(()=>{class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(i=>i.outlet===x);return r}getResolvedTitleForRoute(n){return n.data[$i$1]}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(YD)})}return e})();var YD=(()=>{class e extends yh{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static ɵfac=function(r){return new(r||e)(w(uD))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Pn$1=new D(``,{factory:()=>({})});var Do$1=new D(``);var Qc=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=p(pf);loadComponent(n,r){return V(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let o=V(this,null,function*(){try{let s=yield KD(yf(yield vD(de(n,()=>r.loadComponent()))));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,o),o})}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=V(this,null,function*(){try{let i=yield QD(r,this.compiler,n,this.onLoadEndListener);return r._loadedRoutes=i.routes,r._loadedInjector=i.injector,r._loadedNgModuleFactory=i.factory,i}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,o),o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function QD(e,t,n,r){return V(this,null,function*(){let i=yield KD(yf(yield vD(de(n,()=>e.loadChildren())))),s;i instanceof $a$1||Array.isArray(i)?s=i:s=yield t.compileModuleAsync(i),r&&r(e);let a,c,l;return Array.isArray(s)?c=s:(a=s.create(n).injector,l=s,c=a.get(Do$1,[],{optional:!0,self:!0}).flat()),{routes:c.map(gh),injector:a,factory:l}})}function KD(e){return V(this,null,function*(){return e})}var Kc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(qN)})}return e})();var qN=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var vh=new D(``);var Dh=new D(``);function XD(e,t,n,r){let o=e.get(Dh),i=e.get(Y);if(r){o.skipNextTransition=!1;return}if(!i.startViewTransition||o.skipNextTransition)return o.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,a=new Promise(l=>{s=l}),c=i.startViewTransition(()=>(s(),WN(e)));c.updateCallbackDone.catch(l=>{}),c.ready.catch(l=>{}),c.finished.catch(l=>{});let{onViewTransitionCreated:u}=o;return u&&de(e,()=>u({transition:c,from:t,to:n})),a}function WN(e){return new Promise(t=>{Ua$1({read:()=>setTimeout(t)},{injector:e})})}var ZN=()=>{};var Eh=new D(``);var Xc=(()=>{class e{currentNavigation=ue$1(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ue$1(null);events=new ne$1;
5transitionAbortWithErrorSubject=new ne$1;configLoader=p(Qc);environmentInjector=p(re);destroyRef=p(ke);urlSerializer=p(kn$1);rootContexts=p(xn$1);location=p(Nn$1);inputBindingEnabled=p(zi$1,{optional:!0})!==null;titleStrategy=p(yh);options=p(Pn$1,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||QM;urlHandlingStrategy=p(Kc);createViewTransition=p(vh,{optional:!0});navigationErrorHandler=p(Eh,{optional:!0});routerResourcesFeature=p(mh,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>N(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=o=>this.events.next(new Vc(o)),r=o=>this.events.next(new Hc(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;W(()=>{this.transitions?.next(j(m({},n),{extractedUrl:this.urlHandlingStrategy.extract(n.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(n){return this.transitions=new De(null),this.transitions.pipe(He(r=>r!==null),Ae$1(r=>{let o=!0,i=!1,s=new AbortController,a=()=>!i&&this.currentTransition?.id===r.id;return N(r).pipe(Ae$1(c=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,``,Ne$1.SupersededByNewNavigation),Ee$1;this.currentTransition=r;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl==`string`?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:u?j(m({},u),{previousNavigation:null}):null,abort:()=>s.abort(),routesRecognizeHandler:c.routesRecognizeHandler,beforeActivateHandler:c.beforeActivateHandler});let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&d!==`reload`)return this.events.next(new Ut$1(c.id,this.urlSerializer.serialize(c.rawUrl),``,ho.IgnoredSameUrlNavigation)),c.resolve(!1),Ee$1;if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return N(c).pipe(Ae$1(h=>(this.events.next(new On$1(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),h.id!==this.navigationId?Ee$1:Promise.resolve(h))),VN(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy,s.signal),Qe(h=>{r.targetSnapshot=h.targetSnapshot,r.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation.update(f=>(f.finalUrl=h.urlAfterRedirects,f)),this.events.next(new Bi$1)}),Ae$1(h=>J(r.routesRecognizeHandler.deferredHandle??N(void 0)).pipe(q(()=>h))),Qe(()=>{let h=new Ui$1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:h,extractedUrl:f,source:g,restoredState:v,extras:I}=c,_=new On$1(h,this.urlSerializer.serialize(f),g,v);this.events.next(_);let E=xD(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=j(m({},c),{targetSnapshot:E,urlAfterRedirects:f,extras:j(m({},I),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(O=>(O.finalUrl=f,O)),N(r)}else return this.events.next(new Ut$1(c.id,this.urlSerializer.serialize(c.extractedUrl),``,ho.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ee$1}),q(c=>{let u=new Fc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);return this.events.next(u),this.currentTransition=r=j(m({},c),{guards:nN(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),r}),hN(c=>this.events.next(c)),Ae$1(c=>{if(r.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!=`boolean`)throw ki$1(this.urlSerializer,c.guardsResult);let u=new jc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);if(this.events.next(u),!a())return Ee$1;if(!c.guardsResult)return this.cancelNavigationTransition(c,``,Ne$1.GuardRejected),Ee$1;if(c.guards.canActivateChecks.length===0)return N(c);let l=new Uc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);if(this.events.next(l),!a())return Ee$1;let d=!1;return N(c).pipe(HN(this.paramsInheritanceStrategy),Qe({next:()=>{d=!0;let h=new Bc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)},complete:()=>
5{d||this.cancelNavigationTransition(c,``,Ne$1.NoDataFromResolver)}}))}),ch(c=>{let u=d=>{let h=[];if(d.routeConfig?._loadedComponent)d.component=d.routeConfig?._loadedComponent;else if(d.routeConfig?.loadComponent){let f=d._environmentInjector;h.push(this.configLoader.loadComponent(f,d.routeConfig).then(g=>{d.component=g}))}for(let f of d.children)h.push(...u(f));return h},l=u(c.targetSnapshot.root);return l.length===0?N(c):J(Promise.all(l).then(()=>c))}),Ae$1(c=>{let{newlyCreatedRoutes:u,state:l}=XM(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=r=c=j(m({},c),{targetRouterState:l,newlyCreatedRoutes:u}),this.currentNavigation.update(d=>(d.targetRouterState=l,d)),N(c)}),this.routerResourcesFeature?.setupAndRunResources(s.signal)??(c=>c),ch(()=>this.afterPreactivation()),Ae$1(()=>{let{currentSnapshot:c,targetSnapshot:u}=r,l=this.createViewTransition?.(this.environmentInjector,c.root,u.root,r.hasUAVisualTransition);return l?J(l).pipe(q(()=>r)):N(r)}),$t(1),Ae$1(c=>{o=!1,this.events.next(new go$1);let u=r.beforeActivateHandler.deferredHandle;return u?J(u.then(()=>c)):N(c)}),Qe(c=>{new rh(n.routeReuseStrategy,r.targetRouterState,r.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),c.newlyCreatedRoutes?.clear(),a()&&(JD(c.targetRouterState),i=!0,this.currentNavigation.update(u=>(u.abort=ZN,u)),this.lastSuccessfulNavigation.set(W(this.currentNavigation)),this.events.next(new Ze(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0))}),_o$1(HD(s.signal).pipe(He(()=>!i&&o),Qe(()=>{this.cancelNavigationTransition(r,s.signal.reason+``,Ne$1.Aborted)}))),Qe({complete:()=>{i=!0}}),_o$1(this.transitionAbortWithErrorSubject.pipe(Qe(c=>{throw c}))),Nr$1(()=>{s.abort(),i||this.cancelNavigationTransition(r,``,Ne$1.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Gn(c=>{if(i=!0,gD(r),this.destroyed)return r.resolve(!1),Ee$1;if(c instanceof gr$1&&(c=ki$1(this.urlSerializer,c)),BD(c))this.events.next(new rt$2(r.id,this.urlSerializer.serialize(r.extractedUrl),c.message,c.cancellationCode)),tN(c)?this.events.next(new mo$1(c.url,c.navigationBehaviorOptions)):r.resolve(!1);else{let u=new pr$1(r.id,this.urlSerializer.serialize(r.extractedUrl),c,r.targetSnapshot??void 0);try{let l=de(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(l instanceof gr$1){let{message:d,cancellationCode:h}=ki$1(this.urlSerializer,l);this.events.next(new rt$2(r.id,this.urlSerializer.serialize(r.extractedUrl),d,h)),this.events.next(new mo$1(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(u),c}catch(l){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(l)}}return Ee$1}))}))}cancelNavigationTransition(n,r,o){gD(n);let i=new rt$2(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(i),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=W(this.currentNavigation),o=r?.targetBrowserUrl??r?.extractedUrl;return n.toString()!==o?.toString()&&!r?.extras.skipLocationChange}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function YN(e){return e!==co$1}function gD(e){for(let t of e.newlyCreatedRoutes??[])t._localInjector?.destroy(),t._localInjector=void 0;JD(e.targetRouterState)}function JD(e){if(!e)return;let t=n=>{n.value.pending?.set(!1),n.children.forEach(t)};t(e._root)}var eE=new D(``);var tE=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(QN)})}return e})();var Zc=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}shouldDestroyInjector(t){return!0}};var QN=(()=>{class e extends Zc{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Jc=(()=>
5{class e{urlSerializer=p(kn$1);options=p(Pn$1,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||`replace`;location=p(Nn$1);urlHandlingStrategy=p(Kc);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;currentUrlTree=new Fe;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:n,initialUrl:r,targetBrowserUrl:o}){let i=n!==void 0?this.urlHandlingStrategy.merge(n,r):r,s=o??i;return s instanceof Fe?this.urlSerializer.serialize(s):s}routerUrlState(n){return n?.targetBrowserUrl===void 0||n?.finalUrl===void 0?{}:{ɵrouterUrl:this.urlSerializer.serialize(n.finalUrl)}}commitTransition({targetRouterState:n,finalUrl:r,initialUrl:o}){r&&n?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,o),this.routerState=n):this.rawUrlTree=o}routerState=xD(null,p(re));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(KN)})}return e})();var KN=(()=>{class e extends Jc{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!==`computed`?this.currentPageId:this.restoredState()?.ɵrouterPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type===`popstate`&&setTimeout(()=>{n(r.url,r.state,`popstate`,{replaceUrl:!0},r.hasUAVisualTransition)})})}handleRouterEvent(n,r){n instanceof On$1?this.updateStateMemento():n instanceof Ut$1?this.commitTransition(r):n instanceof Ui$1?this.urlUpdateStrategy===`eager`&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof go$1?(this.commitTransition(r),this.urlUpdateStrategy===`deferred`&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof rt$2&&!FD(n)?this.restoreHistory(r):n instanceof pr$1?this.restoreHistory(r,!0):n instanceof Ze&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let{extras:o,id:i}=r,{replaceUrl:s,state:a}=o;if(this.location.isCurrentPathEqualTo(n)||s){let c=this.browserPageId,u=m(m({},a),this.generateNgRouterState(i,c,r));this.location.replaceState(n,``,u)}else{let c=m(m({},a),this.generateNgRouterState(i,this.browserPageId+1,r));this.location.go(n,``,c)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution===`computed`){let o=this.browserPageId,i=this.currentPageId-o;i!==0?this.location.historyGo(i):this.getCurrentUrlTree()===n.finalUrl&&i===0&&(this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution===`replace`&&(r&&this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:n}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),``,this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r,o){return this.canceledNavigationResolution===`computed`?m({navigationId:n,ɵrouterPageId:r},this.routerUrlState(o)):m({navigationId:n},this.routerUrlState(o))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function eu(e,t){e.events.pipe(He(n=>n instanceof Ze||n instanceof rt$2||n instanceof pr$1||n instanceof Ut$1),q(n=>n instanceof Ze||n instanceof Ut$1?0:(n instanceof rt$2?n.code===Ne$1.Redirect||n.code===Ne$1.SupersededByNewNavigation:!1)?2:1),He(n=>n!==2),$t(1)).subscribe(()=>{t()})}var wt$1=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=p(Ga$1);stateManager=p(Jc);options=p(Pn$1,{optional:!0})||{};pendingTasks=p(dt$1);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;navigationTransitions=p(Xc);
5urlSerializer=p(kn$1);location=p(Nn$1);urlHandlingStrategy=p(Kc);injector=p(re);_events=new ne$1;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=p(tE);injectorCleanup=p(eE,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||`ignore`;config=p(Do$1,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!p(zi$1,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:n=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new ae;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,i=W(this.navigationTransitions.currentNavigation);if(o!==null&&i!==null){if(this.stateManager.handleRouterEvent(r,i),r instanceof rt$2&&r.code!==Ne$1.Redirect&&r.code!==Ne$1.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Ze)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof mo$1){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c=m({scroll:o.extras.scroll,browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy===`eager`||YN(o.source)},s);this.scheduleNavigation(a,co$1,null,c,o.hasUAVisualTransition,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}KM(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),co$1,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r,o,i,s)=>{this.navigateToSyncWithBrowser(n,o,r,i,s)})}navigateToSyncWithBrowser(n,r,o,i,s){let a=o?.navigationId?o:null,c=o?.ɵrouterUrl??n;if(o?.ɵrouterUrl&&(i=j(m({},i),{browserUrl:n})),o){let l=m({},o);delete l.navigationId,delete l.ɵrouterPageId,delete l.ɵrouterUrl,Object.keys(l).length!==0&&(i.state=l)}let u=this.parseUrl(c);this.scheduleNavigation(u,r,a,i,s).catch(l=>{this.disposed||this.injector.get(ze$2)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return W(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(gh),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:i,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case`merge`:l=m(m({},this.currentUrlTree.queryParams),i);break;case`preserve`:l=this.currentUrlTree.queryParams;break;default:l=i||null}l!==null&&(l=this.removeEmptyProps(l));let d;try{d=MD(o?o.snapshot:this.routerState.snapshot.root)}catch(h){(typeof n[0]!=`string`||n[0][0]!==`/`)&&(n=[]),d=this.currentUrlTree.root}return ND(d,n,l,u??null,this.urlSerializer)}navigateByUrl(n,r={skipLocationChange:!1}){let o=An$1(n)?n:this.parseUrl(n),i=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(i,co$1,null,r)}navigate(n,r={skipLocationChange:!1}){return XN(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch(r){return this.console.warn(ct$2(4018,!1)),this.urlSerializer.parse(`/`)}}isActive(n,r){let o;if(r===!0?o=m({},uh):r===!1?o=m({}
5,lo$1):o=m(m({},lo$1),r),An$1(n))return Ac(this.currentUrlTree,n,o);let i=this.parseUrl(n);return Ac(this.currentUrlTree,i,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,i])=>(i!=null&&(r[o]=i),r),{})}scheduleNavigation(n,r,o,i,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,l;a?(c=a.resolve,u=a.reject,l=a.promise):l=new Promise((h,f)=>{c=h,u=f});let d=this.pendingTasks.add();return eu(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:i,hasUAVisualTransition:s,resolve:c,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(Promise.reject.bind(Promise))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function XN(e){for(let t=0;t<e.length;t++)if(e[t]==null)throw new y(4008,!1)}var JN=(()=>{class e{router=p(wt$1);stateManager=p(Jc);fragment=ue$1(``);queryParams=ue$1({});path=ue$1(``);serializer=p(kn$1);constructor(){this.updateState(),this.router.events?.subscribe(n=>{n instanceof Ze&&this.updateState()})}updateState(){let{fragment:n,root:r,queryParams:o}=this.stateManager.getCurrentUrlTree();this.fragment.set(n),this.queryParams.set(o),this.path.set(this.serializer.serialize(new Fe(r)))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var tu=(()=>{class e{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=p(new Ja$1(`href`),{optional:!0});reactiveHref=gf(()=>{if(!this.isAnchorElement)return this.hrefAttributeValue;this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let n=r=>r===`preserve`||r===`merge`;return(n(this._queryParamsHandling())||n(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams(),this.computeHref(this.createUrlTree())});get href(){return W(this.reactiveHref)}set href(n){this.reactiveHref.set(n)}set target(n){this._target.set(n)}get target(){return W(this._target)}_target=ue$1(void 0);set queryParams(n){this._queryParams.set(n)}get queryParams(){return W(this._queryParams)}_queryParams=ue$1(void 0,{equal:()=>!1});set fragment(n){this._fragment.set(n)}get fragment(){return W(this._fragment)}_fragment=ue$1(void 0);set queryParamsHandling(n){this._queryParamsHandling.set(n)}get queryParamsHandling(){return W(this._queryParamsHandling)}_queryParamsHandling=ue$1(void 0);set state(n){this._state.set(n)}get state(){return W(this._state)}_state=ue$1(void 0,{equal:()=>!1});set info(n){this._info.set(n)}get info(){return W(this._info)}_info=ue$1(void 0,{equal:()=>!1});set relativeTo(n){this._relativeTo.set(n)}get relativeTo(){return W(this._relativeTo)}_relativeTo=ue$1(void 0);set preserveFragment(n){this._preserveFragment.set(n)}get preserveFragment(){return W(this._preserveFragment)}_preserveFragment=ue$1(!1);set skipLocationChange(n){this._skipLocationChange.set(n)}get skipLocationChange(){return W(this._skipLocationChange)}_skipLocationChange=ue$1(!1);set replaceUrl(n){this._replaceUrl.set(n)}get replaceUrl(){return W(this._replaceUrl)}_replaceUrl=ue$1(!1);browserUrl=ec(void 0);isAnchorElement;onChanges=new ne$1;applicationErrorHandler=p(ze$2);options=p(Pn$1,{optional:!0});reactiveRouterState=p(JN);constructor(n,r,o,i,s,a){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=i,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c===`a`||c===`area`||!!(typeof customElements==`object`&&customElements.get(c)?.observedAttributes?.includes?.(`href`))}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue(`tabindex`,n)}ngOnChanges(n){this.onChanges.next(this)}routerLinkInput=ue$1(null);set routerLink(n){n==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(An$1(n)?this.routerLinkInput.set(n):this.routerLinkInput.set(Array.isArray(n)?n:[n]),this.setTabIndexIfNotOnNativeEl(`0`))}onClick(n,r,o,i,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(n!==0||r||o||i||s||typeof this.target==`string`&&this.target!=`_self`))return!0;let c=this.browserUrl(),u=m({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},c!==void 0&&{browserUrl:c});return this.router.navigateByUrl(a,u)?.catch(l=>{this.applicationErrorHandler(l)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(n,r){let o=this.renderer,i=this.el.nativeElement;r!==null?o.setAttribute(i,n,r):o.removeAttribute(i,n)}createUrlTree(){let n=this.routerLinkInput();return n===null||!this.router.createUrlTree?null:An$1(n)?n:this.router.createUrlTree(n,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})}get urlTree(){return W(()=>this.createUrlTree())}computeHref(n){return n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n))??``:null}static ɵfac=function(r){return new(r||e)(Ce(wt$1),Ce(ln$1),ii(`tabindex`),Ce(Mn$1),Ce(Rt$1),Ce(Dt$1))};static ɵdir=dr$1({type:e,selectors:[[``,`routerLink`,``]],hostVars:2,hostBindings:function(r,o){r&1&&Ya$1(`click`,function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Wa$1(`href`,o.reactiveHref(),Ld)(`target`,o._target())},inputs:{target:`target`,queryParams:`queryParams`,fragment:`fragment`,queryParamsHandling:`queryParamsHandling`,state:`state`,info:`info`,relativeTo:`relativeTo`,preserveFragment:[2,`preserveFragment`,`preserveFragment`,vi],skipLocationChange:[2,`skipLocationChange`,`skipLocationChange`,vi],replaceUrl:[2,`replaceUrl`,`replaceUrl`,vi],browserUrl:[1,`browserUrl`],routerLink:`routerLink`},features:[cr$1]})}return e})();var eR=(()=>{class e{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new be;link=p(tu,{optional:!0});constructor(n,r,o,i){this.router=n,this.element=r,this.renderer=o,this.cdr=i,this.routerEventsSubscription=n.events.subscribe(s=>{s instanceof Ze&&this.update()})}ngAfterContentInit(){N(this.links.changes,N(null)).pipe(mn$1()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=J(n).pipe(mn$1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){if(n==null){this.classes=[];return}let r=Array.isArray(n)?n:n.split(` `);this.classes=r.filter(o=>!!o)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||this.routerLinkActiveOptions===null&&!this._isActive||queueMicrotask(()=>{let n=this.hasActiveLinks();
5this.classes.forEach(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,`aria-current`,this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,`aria-current`),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let r=this.routerLinkActiveOptions;if(r===null)return()=>!1;let o;return r===void 0?o=m({},lo$1):tR(r)?o=r:r.exact??!1?o=m({},uh):o=m({},lo$1),i=>{let s=i.urlTree;return s?W(lh(s,n,o)):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static ɵfac=function(r){return new(r||e)(Ce(wt$1),Ce(Rt$1),Ce(Mn$1),Ce(no$1))};static ɵdir=dr$1({type:e,selectors:[[``,`routerLinkActive`,``]],contentQueries:function(r,o,i){if(r&1&&Qa$1(i,tu,5),r&2){let s;df(s=ff())&&(o.links=s)}},inputs:{routerLinkActiveOptions:`routerLinkActiveOptions`,ariaCurrentWhenActive:`ariaCurrentWhenActive`,routerLinkActive:`routerLinkActive`},outputs:{isActiveChange:`isActiveChange`},exportAs:[`routerLinkActive`],features:[cr$1]})}return e})();function tR(e){let t=e;return!!(t.paths||t.matrixParams||t.queryParams||t.fragment)}var qi$1=class{};var nR=(()=>{class e{preload(n,r){return r().pipe(Gn(()=>N(null)))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var nE=(()=>{class e{router;injector;preloadingStrategy;loader;subscription;constructor(n,r,o,i){this.router=n,this.injector=r,this.preloadingStrategy=o,this.loader=i}setUpPreloading(){this.subscription=this.router.events.pipe(He(n=>n instanceof Ze),yn$1(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(n,r){let o=[];for(let i of r){i.providers&&!i._injector&&(i._injector=Jr$1(i.providers,n,``));let s=i._injector??n;i._loadedNgModuleFactory&&!i._loadedInjector&&(i._loadedInjector=i._loadedNgModuleFactory.create(s).injector);let a=i._loadedInjector??s;(i.loadChildren&&!i._loadedRoutes&&i.canLoad===void 0||i.loadComponent&&!i._loadedComponent)&&o.push(this.preloadConfig(s,i)),(i.children||i._loadedRoutes)&&o.push(this.processRoutes(a,i.children??i._loadedRoutes))}return J(o).pipe(mn$1())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{if(n.destroyed)return N(null);let o;r.loadChildren&&r.canLoad===void 0?o=J(this.loader.loadChildren(n,r)):o=N(null);let i=o.pipe(pe(s=>s===null?N(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,r._loadedNgModuleFactory=s.factory,this.processRoutes(s.injector??n,s.routes))));if(r.loadComponent&&!r._loadedComponent)return J([i,this.loader.loadComponent(n,r)]).pipe(mn$1());else return i})}static ɵfac=function(r){return new(r||e)(w(wt$1),w(re),w(qi$1),w(Qc))};static ɵprov=S({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var rE=new D(``);var rR=(()=>{class e{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=co$1;restoredId=0;store={};isHydrating=p(Nd,{optional:!0})??!1;urlSerializer=p(kn$1);zone=p(z$1);viewportScroller=p(Mf);transitions=p(Xc);constructor(n){this.options=n,this.options.scrollPositionRestoration||=`disabled`,this.options.anchorScrolling||=`disabled`,this.isHydrating&&p(At$2).whenStable().then(()=>{this.isHydrating=!1})}init(){this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.setHistoryScrollRestoration(`manual`),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof On$1?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof Ze?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Ut$1&&n.code===ho.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{if(!(n instanceof po$1)||n.scrollBehavior===`manual`)return;let r={behavior:`instant`};n.position?this.options.scrollPositionRestoration===`top`?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration===`enabled`&&this.viewportScroller.scrollToPosition(n.position,r):n.anchor&&this.options.anchorScrolling===`enabled`?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(n,r){if(this.isHydrating)return;let o=W(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(()=>V(this,null,function*(){yield new Promise(i=>{setTimeout(i),typeof requestAnimationFrame<`u`&&requestAnimationFrame(i)}),this.zone.run(()=>{this.transitions.events.next(new po$1(n,this.lastSource===`popstate`?this.store[this.restoredId]:null,r,o))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static ɵfac=function(r){di()};static ɵprov=S({token:e,factory:e.ɵfac})}return e})();function oR(){return p(wt$1).routerState.root}function Wi$1(e,t){return{ɵkind:e,ɵproviders:t}}function iR(){let e=p(Se);return t=>{let n=e.get(At$2);if(t!==n.components[0])return;let r=e.get(wt$1),o=e.get(oE);e.get(wh)===1&&r.initialNavigation(),e.get(aE,null,{optional:!0})?.setUpPreloading(),e.get(rE,null,{optional:!0})?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var oE=new D(``,{factory:()=>new ne$1});var wh=new D(``,{factory:()=>1});function iE(){return Wi$1(2,[{provide:Pa$1,useValue:!0},{provide:wh,useValue:0},za(()=>{let t=p(Se);return t.get(Ef,Promise.resolve()).then(()=>new Promise(r=>{let o=t.get(wt$1),i=t.get(oE);eu(o,()=>{r(!0)}),t.get(Xc).afterPreactivation=()=>(r(!0),i.closed?N(void 0):i),o.initialNavigation()}))})])}function sE(){return Wi$1(3,[za(()=>{p(wt$1).setUpLocationChangeListener()}),{provide:wh,useValue:2}])}var aE=new D(``);function cE(e){return Wi$1(0,[{provide:aE,useExisting:nE},{provide:qi$1,useExisting:e}])}function uE(e={}){return Wi$1(8,[{provide:zi$1,useFactory:()=>new LD(e,p(mh,{optional:!0}))}])}function lE(e){mt$1(`NgRouterViewTransitions`);return Wi$1(9,[{provide:vh,useValue:XD},{provide:Dh,useValue:m({skipNextTransition:!!e?.skipInitialTransition},e)}])}var dE=[Nn$1,{provide:kn$1,useClass:un$1},wt$1,xn$1,{provide:ln$1,useFactory:oR},Qc];var sR=(()=>{class e{constructor(){}static forRoot(n,r){return{ngModule:e,providers:[dE,[],{provide:Do$1,multi:!0,useValue:n},[],r?.errorHandler?{provide:Eh,useValue:r.errorHandler}:[],{provide:Pn$1,useValue:r||{}},r?.useHash?cR():uR(),aR(),r?.preloadingStrategy?cE(r.preloadingStrategy).ɵproviders:[],r?.initialNavigation?lR(r):[],r?.bindToComponentInputs?uE(typeof r.bindToComponentInputs==`object`?r.bindToComponentInputs:{}).ɵproviders:[],r?.enableViewTransitions?lE().ɵproviders:[],dR()]}}static forChild(n){return{ngModule:e,providers:[{provide:Do$1,multi:!0,useValue:n}]}}static ɵfac=function(r){return new(r||e)};static ɵmod=rn$1({type:e});static ɵinj=St({})}return e})();function aR(){return{provide:rE,useFactory:()=>{let e=p(Mf),t=p(Pn$1);return t.scrollOffset&&e.setOffset(t.scrollOffset),new rR(t)}}}function cR(){return{provide:Dt$1,useClass:bf}}function uR(){return{provide:Dt$1,useClass:rc}}
5function lR(e){return[e.initialNavigation===`disabled`?sE().ɵproviders:[],e.initialNavigation===`enabledBlocking`?iE().ɵproviders:[]]}var Ih=new D(``);function dR(){return[{provide:Ih,useFactory:iR},{provide:pi,multi:!0,useExisting:Ih}]}var s=(()=>{class i{static ɵfac=function(m){return new(m||i)};static ɵcmp=ef({type:i,selectors:[[`app-banner-devtools`]],decls:24,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://devtools.nestjs.com`,`target`,`_blank`,`title`,`Devtools | NestJS - A node.js framework built on top of TypeScript`,1,`btn-more`]],template:function(m,r){m&1&&(uf(0,`div`,0)(1,`h2`),DT(2,`Explore your graph with `),uf(3,`span`),DT(4,`NestJS Devtools`),lf()(),uf(5,`ul`)(6,`li`)(7,`span`),xy(8,`i`,1),lf(),DT(9,` Graph visualizer `),lf(),uf(10,`li`)(11,`span`),xy(12,`i`,1),lf(),DT(13,` Routes navigator `),lf(),uf(14,`li`)(15,`span`),xy(16,`i`,1),lf(),DT(17,` Interactive playground `),lf(),uf(18,`li`)(19,`span`),xy(20,`i`,1),lf(),DT(21,` CI/CD integration `),lf()(),uf(22,`a`,2),DT(23,`Sign up`),lf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/courses-graphql-sf.jpg)}`]})}return i})();var l$1=(()=>{class i{static ɵfac=function(m){return new(m||i)};static ɵcmp=ef({type:i,selectors:[[`app-banner-courses`]],decls:25,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://courses.nestjs.com`,`target`,`_blank`,`title`,`Courses | NestJS - A node.js framework built on top of TypeScript`,1,`btn-more`]],template:function(m,a){m&1&&(uf(0,`div`,0)(1,`h2`),DT(2,`Learn the `),uf(3,`span`),DT(4,`right`),lf(),DT(5,` way!`),lf(),uf(6,`ul`)(7,`li`)(8,`span`),xy(9,`i`,1),lf(),DT(10,` 80+ chapters `),lf(),uf(11,`li`)(12,`span`),xy(13,`i`,1),lf(),DT(14,` 5+ hours of videos `),lf(),uf(15,`li`)(16,`span`),xy(17,`i`,1),lf(),DT(18,` Official certificate `),lf(),uf(19,`li`)(20,`span`),xy(21,`i`,1),lf(),DT(22,` Deep-dive sessions `),lf()(),uf(23,`a`,2),DT(24,`Explore official courses`),lf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/courses.jpg)}`]})}return i})();var l=(()=>{class m{static ɵfac=function(o){return new(o||m)};static ɵcmp=ef({type:m,selectors:[[`app-banner-enterprise`]],decls:25,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A progressive Node.js framework`,1,`btn-more`]],template:function(o,a){o&1&&(uf(0,`div`,0)(1,`h2`),DT(2,`Official `),uf(3,`span`),DT(4,`enterprise`),lf(),DT(5,` support`),lf(),uf(6,`ul`)(7,`li`)(8,`span`),xy(9,`i`,1),lf(),DT(10,` Providing technical guidance `),lf(),uf(11,`li`)(12,`span`),xy(13,`i`,1),lf(),DT(14,` Performing in-depth code reviews `),lf(),uf(15,`li`)(16,`span`),xy(17,`i`,1),lf(),DT(18,` Mentoring team members `),lf(),uf(19,`li`)(20,`span`),xy(21,`i`,1),lf(),DT(22,` Advising best practices `),lf()(),uf(23,`a`,2),DT(24,`Explore more`),lf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/enterprise.jpg)}.banner[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{max-width:820px}`]})}return m})();var u=(()=>{class t{isJsActive=!1;static ɵfac=function(e){return new(e||t)};static ɵcmp=ef({type:t,selectors:[[`app-tabs`]],decls:5,vars:4,consts:[[1,`tabs-wrapper`],[1,`tab`,3,`click`],[1,`tab`,`active`,3,`click`]],template:function(e,i){e&1&&(uf(0,`div`,0)(1,`span`,1),Ly(`click`,function(){return i.isJsActive=!0}),DT(2,` JS `),lf(),uf(3,`span`,2),Ly(`click`,function(){return i.isJsActive=!1}),DT(4,` TS `),lf()()),e&2&&(UC(),By(`active`,i.isJsActive),UC(2),By(`active`,!i.isJsActive))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
5left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tabs-wrapper[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0}.tab[_ngcontent-%COMP%]{color:#dfdfdf;cursor:pointer;margin:0;float:right;font-weight:600;height:100%;padding:12px 20px;box-sizing:border-box;-webkit-box-sizing:border-box}.tab[_ngcontent-%COMP%]:hover:not(.active){color:#efefef}.tab.active[_ngcontent-%COMP%]{display:none}`]})}return t})();var g=(()=>{class t{transform(n,e){return/\.(json|ya?ml|sql|graphql|gql|lua|env|sh|html|css|md|prisma)$/i.test(n)?n:e?`${n}.js`:`${n}.ts`}static ɵfac=function(e){return new(e||t)};static ɵpipe=tf({name:`extension`,type:t,pure:!0})}return t})();var le=fR((dt,Q)=>{var d=(function(i){var p=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,t={},n={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function r(a){return a instanceof o?new o(a.type,r(a.content),a.alias):Array.isArray(a)?a.map(r):a.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(r){return Object.prototype.toString.call(r).slice(8,-1)},objId:function(r){return r.__id||Object.defineProperty(r,"__id",{value:++e}),r.__id},clone:function r(a,s){s=s||{};var l,c;switch(n.util.type(a)){case`Object`:if(c=n.util.objId(a),s[c])return s[c];l={},s[c]=l;for(var g in a)a.hasOwnProperty(g)&&(l[g]=r(a[g],s));return l;case`Array`:return c=n.util.objId(a),s[c]?s[c]:(l=[],s[c]=l,a.forEach(function(h,f){l[f]=r(h,s)}),l);default:return a}},getLanguage:function(r){for(;r;){var a=p.exec(r.className);if(a)return a[1].toLowerCase();r=r.parentElement}return`none`},setLanguage:function(r,a){r.className=r.className.replace(RegExp(p,`gi`),``),r.classList.add(`language-`+a)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw new Error}catch(l){var r=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(l.stack)||[])[1];if(r){var a=document.getElementsByTagName(`script`);for(var s in a)if(a[s].src==r)return a[s]}return null}},isActive:function(r,a,s){for(var l=`no-`+a;r;){var c=r.classList;if(c.contains(a))return!0;if(c.contains(l))return!1;r=r.parentElement}return!!s}},languages:{plain:t,plaintext:t,text:t,txt:t,extend:function(r,a){var s=n.util.clone(n.languages[r]);for(var l in a)s[l]=a[l];return s},insertBefore:function(r,a,s,l){l=l||n.languages;var c=l[r],g={};for(var h in c)if(c.hasOwnProperty(h)){if(h==a)for(var f in s)s.hasOwnProperty(f)&&(g[f]=s[f]);s.hasOwnProperty(h)||(g[h]=c[h])}var _=l[r];return l[r]=g,n.languages.DFS(n.languages,function(E,R){R===_&&E!=r&&(this[E]=g)}),g},DFS:function r(a,s,l,c){c=c||{};var g=n.util.objId;for(var h in a)if(a.hasOwnProperty(h)){s.call(a,h,a[h],l||h);var f=a[h],_=n.util.type(f);_===`Object`&&!c[g(f)]?(c[g(f)]=!0,r(f,s,null,c)):_===`Array`&&!c[g(f)]&&(c[g(f)]=!0,r(f,s,h,c))}}},plugins:{},highlightAll:function(r,a){n.highlightAllUnder(document,r,a)},highlightAllUnder:function(r,a,s){var l={callback:s,container:r,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};n.hooks.run(`before-highlightall`,l),l.elements=Array.prototype.slice.apply(l.container.querySelectorAll(l.selector)),n.hooks.run(`before-all-elements-highlight`,l);for(var c=0,g;g=l.elements[c++];)n.highlightElement(g,a===!0,l.callback)},highlightElement:function(r,a,s){var l=n.util.getLanguage(r),c=n.languages[l];n.util.setLanguage(r,l);var g=r.parentElement;g&&g.nodeName.toLowerCase()===`pre`&&n.util.setLanguage(g,l);var f={element:r,language:l,grammar:c,code:r.textContent};function _(R){f.highlightedCode=R,n.hooks.run(`before-insert`,f),f.element.innerHTML=f.highlightedCode,n.hooks.run(`after-highlight`,f),n.hooks.run(`complete`,f),s&&s.call(f.element)}if(n.hooks.run(`before-sanity-check`,f),g=f.element.parentElement,g&&g.nodeName.toLowerCase()===`pre`&&!g.hasAttribute(`tabindex`)&&g.setAttribute(`tabindex`,`0`),!f.code){n.hooks.run(`complete`,f),s&&s.call(f.element);return}if(n.hooks.run(`before-highlight`,f),!f.grammar){_(n.util.encode(f.code));return}if(a&&i.Worker){var E=new Worker(n.filename);E.onmessage=function(R){_(R.data)},E.postMessage(JSON.stringify({language:f.language,code:f.code,immediateClose:!0}))}else _(n.highlight(f.code,f.grammar,f.language))},highlight:function(r,a,s){var l={code:r,grammar:a,language:s};if(n.hooks.run(`before-tokenize`,l),!l.grammar)throw new Error(`The language "`+l.language+`" has no grammar.`);return l.tokens=n.tokenize(l.code,l.grammar),n.hooks.run(`after-tokenize`,l),o.stringify(n.util.encode(l.tokens),l.language)},tokenize:function(r,a){var s=a.rest;if(s){for(var l in s)a[l]=s[l];delete a.rest}var c=new S;return I(c,c.head,r),m(r,c,a,c.head,0),T(c)},hooks:{all:{},add:function(r,a){var s=n.hooks.all;s[r]=s[r]||[],s[r].push(a)},run:function(r,a){var s=n.hooks.all[r];if(!(!s||!s.length))for(var l=0,c;c=s[l++];)c(a)}},Token:o};i.Prism=n;function o(r,a,s,l){this.type=r,this.content=a,this.alias=s,this.length=(l||``).length|0}o.stringify=function r(a,s){if(typeof a==`string`)return a;
vendor: 5,192 bytes, line 5
5if(Array.isArray(a)){var l=``;return a.forEach(function(_){l+=r(_,s)}),l}var c={type:a.type,content:r(a.content,s),tag:`span`,classes:[`token`,a.type],attributes:{},language:s},g=a.alias;g&&(Array.isArray(g)?Array.prototype.push.apply(c.classes,g):c.classes.push(g)),n.hooks.run(`wrap`,c);var h=``;for(var f in c.attributes)h+=` `+f+`="`+(c.attributes[f]||``).replace(/"/g,`&quot;`)+`"`;return`<`+c.tag+` class="`+c.classes.join(` `)+`"`+h+`>`+c.content+`</`+c.tag+`>`};function u(r,a,s,l){r.lastIndex=a;var c=r.exec(s);if(c&&l&&c[1]){var g=c[1].length;c.index+=g,c[0]=c[0].slice(g)}return c}function m(r,a,s,l,c,g){for(var h in s)if(!(!s.hasOwnProperty(h)||!s[h])){var f=s[h];f=Array.isArray(f)?f:[f];for(var _=0;_<f.length;++_){if(g&&g.cause==h+`,`+_)return;var E=f[_],R=E.inside,ue=!!E.lookbehind,de=!!E.greedy,Ze=E.alias;if(de&&!E.pattern.global){var Xe=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,Xe+`g`)}for(var pe=E.pattern||E,A=l.next,C=c;A!==a.tail&&!(g&&C>=g.reach);C+=A.value.length,A=A.next){var $=A.value;if(a.length>r.length)return;if(!($ instanceof o)){var B=1,x;if(de){if(x=u(pe,C,r,ue),!x||x.index>=r.length)break;var G=x.index,Ye=x.index+x[0].length,M=C;for(M+=A.value.length;G>=M;)A=A.next,M+=A.value.length;if(M-=A.value.length,C=M,A.value instanceof o)continue;for(var U=A;U!==a.tail&&(M<Ye||typeof U.value==`string`);U=U.next)B++,M+=U.value.length;B--,$=r.slice(C,M),x.index-=C}else if(x=u(pe,0,$,ue),!x)continue;var G=x.index,W=x[0],re=$.slice(0,G),ge=$.slice(G+W.length),ae=C+$.length;g&&ae>g.reach&&(g.reach=ae);var q=A.prev;re&&(q=I(a,q,re),C+=re.length),F(a,q,B);var Ke=new o(h,R?n.tokenize(W,R):W,Ze,W);if(A=I(a,q,Ke),ge&&I(a,A,ge),B>1){var ie={cause:h+`,`+_,reach:ae};m(r,a,s,A.prev,C,ie),g&&ie.reach>g.reach&&(g.reach=ie.reach)}}}}}}function S(){var r={value:null,prev:null,next:null},a={value:null,prev:r,next:null};r.next=a,this.head=r,this.tail=a,this.length=0}function I(r,a,s){var l=a.next,c={value:s,prev:a,next:l};return a.next=c,l.prev=c,r.length++,c}function F(r,a,s){for(var l=a.next,c=0;c<s&&l!==r.tail;c++)l=l.next;a.next=l,l.prev=a,r.length-=c}function T(r){for(var a=[],s=r.head.next;s!==r.tail;)a.push(s.value),s=s.next;return a}if(!i.document)return i.addEventListener&&(n.disableWorkerMessageHandler||i.addEventListener(`message`,function(r){var a=JSON.parse(r.data),s=a.language,l=a.code,c=a.immediateClose;i.postMessage(n.highlight(l,n.languages[s],s)),c&&i.close()},!1)),n;var b=n.util.currentScript();b&&(n.filename=b.src,b.hasAttribute(`data-manual`)&&(n.manual=!0));function v(){n.manual||n.highlightAll()}if(!n.manual){var y=document.readyState;y===`loading`||y===`interactive`&&b&&b.defer?document.addEventListener(`DOMContentLoaded`,v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return n})(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});typeof Q<`u`&&Q.exports&&(Q.exports=d);typeof global<`u`&&(global.Prism=d);d.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]};d.languages.markup.tag.inside[`attr-value`].inside.entity=d.languages.markup.entity;d.languages.markup.doctype.inside[`internal-subset`].inside=d.languages.markup;d.hooks.add(`wrap`,function(i){i.type===`entity`&&(i.attributes.title=i.content.replace(/&amp;/,`&`))});Object.defineProperty(d.languages.markup.tag,"addInlined",{value:function(p,e){var t={};t[`language-`+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:d.languages[e]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};n[`language-`+e]={pattern:/[\s\S]+/,inside:d.languages[e]};var o={};o[p]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return p}),`i`),lookbehind:!0,greedy:!0,inside:n},d.languages.insertBefore(`markup`,`cdata`,o)}});Object.defineProperty(d.languages.markup.tag,"addAttribute",{value:function(i,p){d.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(/(^|["'\s])/.source+`(?:`+i+`)`+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\
5s'">=]+(?=[\s>]))/.source,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[p,`language-`+p],inside:d.languages[p]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}});d.languages.html=d.languages.markup;d.languages.mathml=d.languages.markup;d.languages.svg=d.languages.markup;d.languages.xml=d.languages.extend(`markup`,{});d.languages.ssml=d.languages.xml;d.languages.atom=d.languages.xml;d.languages.rss=d.languages.xml;(function(i){var p=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:`+/[^;{\s"']|\s+(?!\s)/.source+`|`+p.source+`)*?`+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+p.source+`|`+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+`)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+p.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+p.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:p,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var e=i.languages.markup;e&&(e.tag.addInlined(`style`,`css`),e.tag.addAttribute(`style`,`css`))})(d);d.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};d.languages.javascript=d.languages.extend(`clike`,{"class-name":[d.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+`(?:`+(/NaN|Infinity/.source+`|`+/0[bB][01]+(?:_[01]+)*n?/.source+`|`+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+`|`+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+`|`+/\d+(?:_\d+)*n/.source+`|`+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+`)`+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});d.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;d.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+`(?:`+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+`|`+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}
5/.source+`)`+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:d.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:d.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:d.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:d.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:d.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});d.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:d.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}});d.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}});d.languages.markup&&(d.languages.markup.tag.addInlined(`script`,`javascript`),d.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,`javascript`));d.languages.js=d.languages.javascript;(function(){if(typeof d>`u`||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i=`Loading…`,p=function(b,v){return`✖ Error `+b+` while fetching file: `+v},e=`✖ Error: File does not exist or is empty`,t={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},n=`data-src-status`,o=`loading`,u=`loaded`,m=`failed`,S=`pre[data-src]:not([`+n+`="`+u+`"]):not([`+n+`="`+o+`"])`;function I(b,v,y){var r=new XMLHttpRequest;r.open(`GET`,b,!0),r.onreadystatechange=function(){r.readyState==4&&(r.status<400&&r.responseText?v(r.responseText):r.status>=400?y(p(r.status,r.statusText)):y(e))},r.send(null)}function F(b){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||``);if(v){var y=Number(v[1]),r=v[2],a=v[3];return r?a?[y,Number(a)]:[y,void 0]:[y,y]}}d.hooks.add(`before-highlightall`,function(b){b.selector+=`, `+S}),d.hooks.add(`before-sanity-check`,function(b){var v=b.element;if(v.matches(S)){b.code=``,v.setAttribute(n,o);var y=v.appendChild(document.createElement(`CODE`));y.textContent=i;var r=v.getAttribute(`data-src`),a=b.language;if(a===`none`){var s=(/\.(\w+)$/.exec(r)||[,`none`])[1];a=t[s]||s}d.util.setLanguage(y,a),d.util.setLanguage(v,a);var l=d.plugins.autoloader;
5l&&l.loadLanguages(a),I(r,function(c){v.setAttribute(n,u);var g=F(v.getAttribute(`data-range`));if(g){var h=c.split(/\r\n?|\n/g),f=g[0],_=g[1]==null?h.length:g[1];f<0&&(f+=h.length),f=Math.max(0,Math.min(f-1,h.length)),_<0&&(_+=h.length),_=Math.max(0,Math.min(_,h.length)),c=h.slice(f,_).join(`
6`),v.hasAttribute(`data-start`)||v.setAttribute(`data-start`,String(f+1))}y.textContent=c,d.highlightElement(y)},function(c){v.setAttribute(n,m),y.textContent=c})}}),d.plugins.fileHighlight={highlight:function(v){for(var y=(v||document).querySelectorAll(S),r=0,a;a=y[r++];)d.highlightElement(a)}};var T=!1;d.fileHighlight=function(){T||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),T=!0),d.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var ze$1=hR(le());hR(le());(function(i){i.languages.typescript=i.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),i.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete i.languages.typescript.parameter,delete i.languages.typescript[`literal-property`];var p=i.languages.extend(`typescript`,{});delete p[`class-name`],i.languages.typescript[`class-name`].inside=p,i.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:p}}}}),i.languages.ts=i.languages.typescript})(Prism);Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:`string`,inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:`function`},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:`class-name`},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add(`after-tokenize`,function(p){if(p.language!==`graphql`)return;var e=p.tokens.filter(function(r){return typeof r!=`string`&&r.type!==`comment`&&r.type!==`scalar`}),t=0;function n(r){return e[t+r]}function o(r,a){a=a||0;for(var s=0;s<r.length;s++){var l=n(s+a);if(!l||l.type!==r[s])return!1}return!0}function u(r,a){for(var s=1,l=t;l<e.length;l++){var c=e[l],g=c.content;if(c.type===`punctuation`&&typeof g==`string`){if(r.test(g))s++;else if(a.test(g)&&(s--,s===0))return l}}return-1}function m(r,a){var s=r.alias;s?Array.isArray(s)||(r.alias=s=[s]):r.alias=s=[],s.push(a)}for(;t<e.length;){var S=e[t++];if(S.type===`keyword`&&S.content===`mutation`){var I=[];if(o([`definition-mutation`,`punctuation`])&&n(1).content===`(`){t+=2;var F=u(/^\($/,/^\)$/);if(F===-1)continue;for(;t<F;t++){var T=n(0);T.type===`variable`&&(m(T,`variable-input`),I.push(T.content))}t=F+1}if(o([`punctuation`,`property-query`])&&n(0).content===`{`&&(t++,m(n(0),`property-mutation`),I.length>0)){var b=u(/^\{$/,/^\}$/);if(b===-1)continue;for(var v=t;v<b;v++){var y=e[v];y.type===`variable`&&I.indexOf(y.content)>=0&&m(y,`variable-input`)}}}}});Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}};Prism.languages.webmanifest=Prism.languages.json;(function(i){var p=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t=`(?:`+e.source+`(?:[ 	]+`+p.source+`)?|`+p.source+`(?:[ 	]+`+e.source+`)?)`,n=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(m,S){S=(S||``).replace(/m/g,``)+`m`;var I=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>
6)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return t}).replace(/<<value>>/g,function(){return m});return RegExp(I,S)}i.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return t})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return t}).replace(/<<key>>/g,function(){return`(?:`+n+`|`+o+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:`number`},boolean:{pattern:u(/false|true/.source,`i`),lookbehind:!0,alias:`important`},null:{pattern:u(/null|~/.source,`i`),lookbehind:!0,alias:`important`},string:{pattern:u(o),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,`i`),lookbehind:!0},tag:e,important:p,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},i.languages.yml=i.languages.yaml})(Prism);(function(i){var p=`\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_
6CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b`,e={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:`punctuation`,inside:null},t={bash:e,environment:{pattern:RegExp(`\\$`+p),alias:`constant`},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp(`(\\{)`+p),lookbehind:!0,alias:`constant`}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};i.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:`important`},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:`function`},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:`function`}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:`variable`,lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp(`(^|[\\s;|&]|[<>]\\()`+p),lookbehind:!0,alias:`constant`}},alias:`variable`,lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:`variable`,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:e}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:t.entity}}],environment:{pattern:RegExp(`\\$?`+p),alias:`constant`},variable:t.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:`class-name`},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:`important`},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>
6&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:`important`}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},e.inside=i.languages.bash;for(var n=[`comment`,`function-name`,`for-or-select`,`assign-left`,`parameter`,`string`,`environment`,`function`,`keyword`,`builtin`,`boolean`,`file-descriptor`,`operator`,`punctuation`,`number`],o=t.variable[1].inside,u=0;u<n.length;u++)o[n[u]]=i.languages.bash[n[u]];i.languages.sh=i.languages.bash,i.languages.shell=i.languages.bash})(Prism);var ce=160;function et(i){if(i.length<=ce)return i;let p=``,e=i;for(;e;){let t=e.match(/^.*?[.!?](?=\s|$)/)?.[0]??e,n=p?`${p} ${t}`:t;if(n.length>ce)break;p=n,e=e.slice(t.length).trimStart()}return p||i.slice(0,ce-1).replace(/\s+\S*$/,``)+`…`}var At$1=(()=>{class i{applicationRef;el;isHljsInitialized=!1;metaService=p(fz);constructor(e,t){this.applicationRef=e,this.el=t}get nativeElement(){return this.el.nativeElement}get isMarkupReady(){return this.isHljsInitialized}ngAfterViewInit(){this.updateDescription()}ngAfterViewChecked(){this.initHljs()}updateDescription(){let t=this.nativeElement.querySelector(`.content-inner > p`)?.textContent?.replace(/\s+/g,` `).trim();if(!t)return;let n=et(t);this.metaService.updateTag({name:`description`,content:n}),this.metaService.updateTag({property:`og:description`,content:n}),this.metaService.updateTag({name:`twitter:description`,content:n})}initHljs(){if(this.isHljsInitialized||!this.el)return;let e=this.el.nativeElement.querySelectorAll(`code`);[].forEach.call(e,t=>{t.className&&(ze$1.highlightElement(t),this.isHljsInitialized=!0)}),setTimeout(()=>this.applicationRef.tick(),1e3)}static ɵfac=function(t){return new(t||i)(Ce(At$2),Ce(Rt$1))};static ɵcmp=ef({type:i,selectors:[[`app-base-page`]],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:1})}return i})();var xt=(()=>{class i{elementRef;renderer;router;id;constructor(e,t,n){this.elementRef=e,this.renderer=t,this.router=n}ngAfterViewInit(){let e=this.id==null?this.getImplicitId():this.id;this.id??this.renderer.setProperty(this.elementRef.nativeElement,`id`,e);let t=this.renderer.createElement(`a`);this.renderer.setProperty(t,`href`,`${this.router.url.split(`#`)[0]}#${e}`);let n=this.renderer.createText(`#`);this.renderer.appendChild(t,n),this.renderer.appendChild(this.elementRef.nativeElement,t)}getImplicitId(){return this.elementRef.nativeElement.innerText.replace(/\s/g,`-`).toLocaleLowerCase()}static ɵfac=function(t){return new(t||i)(Ce(Rt$1),Ce(Mn$1),Ce(wt$1))};static ɵdir=dr$1({type:i,selectors:[[``,`appAnchor`,``]],inputs:{id:`id`}})}return i})();var te;function tt$1(){if(te===void 0&&(te=null,typeof window<`u`)){let i=window;if(i.trustedTypes!==void 0)try{te=i.trustedTypes.createPolicy(`angular#components`,{createHTML:p=>p})}catch(p){console.error(p)}}return te}function z(i){return tt$1()?.createHTML(i)||i}function Ue$1(i){return Error(`Unable to find icon with the name "${i}"`)}function rt$1(){return Error(`Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.`)}function je(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Be(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var k=class{url;svgText;options;svgElement=null;constructor(p,e,t){this.url=p,this.svgText=e,this.options=t}};var We$1=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass;constructor(e,t,n,o){this._httpClient=e,this._sanitizer=t,this._errorHandler=o,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace(``,e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace(``,e,t,n)}addSvgIconInNamespace(e,t,n,o){return this._addSvgIconConfig(e,t,new k(n,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,o){let u=this._sanitizer.sanitize(ee.HTML,n);if(!u)throw Be(n);let m=z(u);return this._addSvgIconConfig(e,t,new k(``,m,o))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace(``,e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace(``,e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new k(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let o=this._sanitizer.sanitize(ee.HTML,t);if(!o)throw Be(t);let u=z(o);return this._addSvgIconSetConfig(e,new k(``,u,n))}
6registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass??=it$1(this._document),this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(ee.RESOURCE_URL,e);if(!t)throw je(e);let n=this._cachedIconsByUrl.get(t);return n?N(ne(n)):this._loadSvgIconFromConfig(new k(e,null)).pipe(Qe(o=>this._cachedIconsByUrl.set(t,o)),q(o=>ne(o)))}getNamedSvgIcon(e,t=``){let n=Ge$1(t,e),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(t,e),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let u=this._iconSetConfigs.get(t);return u?this._getSvgFromIconSetConfigs(e,u):Cu(Ue$1(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?N(ne(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(q(t=>ne(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return N(n);let o=t.filter(u=>!u.svgText).map(u=>this._loadSvgIconSetFromConfig(u).pipe(Gn(m=>{let I=`Loading icon set URL: ${this._sanitizer.sanitize(ee.RESOURCE_URL,u.url)} failed: ${m.message}`;return this._errorHandler.handleError(new Error(I)),N(null)})));return XE(o).pipe(q(()=>{let u=this._extractIconWithNameFromAnySet(e,t);if(!u)throw Ue$1(e);return u}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let o=t[n];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let u=this._svgElementFromConfig(o),m=this._extractSvgIconFromSet(u,e,o.options);if(m)return m}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Qe(t=>e.svgText=t),q(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?N(null):this._fetchIcon(e).pipe(Qe(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let o=e.querySelector(`[id="${t}"]`);if(!o)return null;let u=o.cloneNode(!0);if(u.removeAttribute(`id`),u.nodeName.toLowerCase()===`svg`)return this._setSvgAttributes(u,n);if(u.nodeName.toLowerCase()===`symbol`)return this._setSvgAttributes(this._toSvgElement(u),n);let m=this._svgElementFromString(z(`<svg></svg>`));return m.appendChild(u),this._setSvgAttributes(m,n)}_svgElementFromString(e){let t=this._document.createElement(`DIV`);t.innerHTML=e;let n=t.querySelector(`svg`);if(!n)throw Error(`<svg> tag not found`);return n}_toSvgElement(e){let t=this._svgElementFromString(z(`<svg></svg>`)),n=e.attributes;for(let o=0;o<n.length;o++){let{name:u,value:m}=n[o];u!==`id`&&t.setAttribute(u,m)}for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[o].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute(`fit`,``),e.setAttribute(`height`,`100%`),e.setAttribute(`width`,`100%`),e.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),e.setAttribute(`focu
6sable`,`false`),t&&t.viewBox&&e.setAttribute(`viewBox`,t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,o=n?.withCredentials??!1;if(!this._httpClient)throw rt$1();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let u=this._sanitizer.sanitize(ee.RESOURCE_URL,t);if(!u)throw je(t);let m=this._inProgressUrlFetches.get(u);if(m)return m;let S=this._httpClient.get(u,{responseType:`text`,withCredentials:o}).pipe(q(I=>z(I)),Nr$1(()=>this._inProgressUrlFetches.delete(u)),cI());return this._inProgressUrlFetches.set(u,S),S}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(Ge$1(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](t,e);if(o)return at$1(o)?new k(o.url,null,o.options):new k(o,null)}}static ɵfac=function(t){return new(t||i)(w(Wv,8),w(IM),w(Y,8),w(at$2))};static ɵprov=S({token:i,factory:i.ɵfac,providedIn:`root`})}return i})();function ne(i){return i.cloneNode(!0)}function Ge$1(i,p){return i+`:`+p}function at$1(i){return!!(i.url&&i.options)}function it$1(i){let p=null,e=!1;return i.fonts&&typeof i.fonts.forEach==`function`&&i.fonts.forEach(t=>{let n=t.family.replace(/['"]/g,``).trim().toLowerCase();(n===`material icons`||n.startsWith(`material icons `))&&(e=!0),n.startsWith(`material symbols rounded`)?p=`rounded`:n.startsWith(`material symbols sharp`)?p=`sharp`:n.startsWith(`material symbols`)&&(p=`outlined`)}),[p&&!e?`material-symbols-${p}`:`material-icons`,`mat-ligature-font`]}var ot$1=new D(`MAT_ICON_DEFAULT_OPTIONS`);var st=new D(`mat-icon-location`,{providedIn:`root`,factory:()=>{let i=p(Y),p$1=i?i.location:null;return{getPathname:()=>p$1?p$1.pathname+p$1.search:``}}});var qe=[`clip-path`,`color-profile`,`src`,`cursor`,`fill`,`filter`,`marker`,`marker-start`,`marker-mid`,`marker-end`,`mask`,`stroke`];var lt=qe.map(i=>`[${i}]`).join(`, `);var ct$1=/^url\(['"]?#(.*?)['"]?\)$/;var Ve$1=(()=>{class i{_elementRef=p(Rt$1);_iconRegistry=p(We$1);_location=p(st);_errorHandler=p(at$2);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=ae.EMPTY;constructor(){let e=p(new Ja$1(`aria-hidden`),{optional:!0}),t=p(ot$1,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute(`aria-hidden`,`true`)}_splitIconName(e){if(!e)return[``,``];let t=e.split(`:`);switch(t.length){case 1:return[``,t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()===`svg`)&&n.remove()}}
6_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes(`mat-ligature-font`)&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e==`string`?e.trim().split(` `)[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences,n=e.startsWith(`//`)?`/.${e}`:e;t&&t.forEach((o,u)=>{o.forEach(m=>{u.setAttribute(m.name,`url('${n}#${m.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<t.length;o++)qe.forEach(u=>{let m=t[o],S=m.getAttribute(u),I=S?S.match(ct$1):null;if(I){let F=n.get(m);F||(F=[],n.set(m,F)),F.push({name:u,value:I[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe($t(1)).subscribe(o=>this._setSvgElement(o),o=>{let u=`Error retrieving icon ${t}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(u))})}}static ɵfac=function(t){return new(t||i)};static ɵcmp=(function(){return ef({type:i,selectors:[[`mat-icon`]],hostAttrs:[`role`,`img`,1,`mat-icon`,`notranslate`],hostVars:10,hostBindings:function(n,o){n&2&&(Wa$1(`data-mat-icon-type`,o._usingFontIcon()?`font`:`svg`)(`data-mat-icon-name`,o._svgName||o.fontIcon)(`data-mat-icon-namespace`,o._svgNamespace||o.fontSet)(`fontIcon`,o._usingFontIcon()?o.fontIcon:null),aT(o.color?`mat-`+o.color:``),By(`mat-icon-inline`,o.inline)(`mat-icon-no-color`,o.color!==`primary`&&o.color!==`accent`&&o.color!==`warn`))},inputs:{color:`color`,inline:[2,`inline`,`inline`,vi],svgIcon:`svgIcon`,fontSet:`fontSet`,fontIcon:`fontIcon`},exportAs:[`matIcon`],ngContentSelectors:[`*`],decls:1,vars:0,template:function(n,o){n&1&&(WS(),ZS(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
7  color: var(--%NS%mat-icon-color, inherit);
8}
9
10.mat-icon {
11  -webkit-user-select: none;
12  user-select: none;
13  background-repeat: no-repeat;
14  display: inline-block;
15  fill: currentColor;
16  height: 24px;
17  width: 24px;
18  overflow: hidden;
19}
20.mat-icon.mat-icon-inline {
21  font-size: inherit;
22  height: inherit;
23  line-height: inherit;
24  width: inherit;
25}
26.mat-icon.mat-ligature-font[fontIcon]::before {
27  content: attr(fontIcon);
28}
29
30[dir=rtl] .mat-icon-rtl-mirror {
31  transform: scale(-1, 1);
32}
33
34.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,
35.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon {
36  display: block;
37}
38.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,
39.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon {
40  margin: auto;
41}
42`],encapsulation:2})})()}return i})();var ut$1=[`*`];var tn$1=(()=>{class i{elRef=p(Rt$1);copied=!1;cdr=p(no$1);revertIconTimeout=null;onCopy(){let e=this.elRef.nativeElement.querySelector(`pre:not(.hide)`);e&&(navigator.clipboard.writeText(e.firstChild.textContent),this.copied=!0,this.cdr.detectChanges(),this.revertIconTimeout=setTimeout(()=>{this.copied=!1,this.cdr.detectChanges(),this.revertIconTimeout=null},2e3))}ngOnDestroy(){this.revertIconTimeout&&clearTimeout(this.revertIconTimeout)}static ɵfac=function(t){return new(t||i)};static ɵcmp=ef({type:i,selectors:[[`app-copy-button`]],ngContentSelectors:ut$1,decls:4,vars:3,consts:[[1,`clipboard`,3,`click`]],template:function(t,n){t&1&&(WS(),Oa$1(0,`button`,0),Ya$1(`click`,function(){return n.onCopy()}),Oa$1(1,`mat-icon`),DT(2),cf()(),ZS(3)),t&2&&(By(`copied`,n.copied),UC(2),qy(n.copied?`check`:`content_copy`))},dependencies:[Ve$1],styles:[`[_nghost-%COMP%]{display:block;position:relative}.with-heading[_nghost-%COMP%]   .clipboard[_ngcontent-%COMP%]{top:65px}[_nghost-%COMP%]   .clipboard[_ngcontent-%COMP%]{color:#dfdfdf;cursor:pointer;background:transparent;border:none;padding:10px;position:absolute;top:20px;right:10px;z-index:10;opacity:.7}[_nghost-%COMP%]   .clipboard[_ngcontent-%COMP%]:hover:not(.copied){opacity:1}[_nghost-%COMP%]   .clipboard[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}`],changeDetection:1})}return i})();var wt={production:!0,algoliaApiKey:`6d1869890dab96592b191e63a8deb5b5`};var A=(function(o){return o[o.State=0]=`State`,o[o.Transition=1]=`Transition`,o[o.Sequence=2]=`Sequence`,o[o.Group=3]=`Group`,o[o.Animate=4]=`Animate`,o[o.Keyframes=5]=`Keyframes`,o[o.Style=6]=`Style`,o[o.Trigger=7]=`Trigger`,o[o.Reference=8]=`Reference`,o[o.AnimateChild=9]=`AnimateChild`,o[o.AnimateRef=10]=`AnimateRef`,o[o.Query=11]=`Query`,o[o.Stagger=12]=`Stagger`,o})(A||{});var ue=`*`;function Xt(o,r){return{type:A.Trigger,name:o,definitions:r,options:{}}}function _t(o,r=null){return{type:A.Animate,styles:r,timings:o}}function wi(o,r=null){return{type:A.Sequence,steps:o,options:r}}function Ee(o){return{type:A.Style,styles:o,offset:null}}function Zt(o,r,i){return{type:A.State,name:o,styles:r,options:i}}function Ct(o,r,i=null){return{type:A.Transition,expr:o,animation:r,options:i}}var Me=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;
vendor: 26,814 bytes, line 42
42constructor(r=0,i=0){this.totalTime=r+i}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(r=>r()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(r){this._position=this.totalTime?r*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(r){let i=r==`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var Ge=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(r){this.players=r;let i=0,a=0,s=0,l=this.players.length;l==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(d=>{d.onDone(()=>{++i==l&&this._onFinish()}),d.onDestroy(()=>{++a==l&&this._onDestroy()}),d.onStart(()=>{++s==l&&this._onStart()})}),this.totalTime=this.players.reduce((d,m)=>Math.max(d,m.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this.players.forEach(r=>r.init())}onStart(r){this._onStartFns.push(r)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(r=>r()),this._onStartFns=[])}onDone(r){this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(r=>r.play())}pause(){this.players.forEach(r=>r.pause())}restart(){this.players.forEach(r=>r.restart())}finish(){this._onFinish(),this.players.forEach(r=>r.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(r=>r.destroy()),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}reset(){this.players.forEach(r=>r.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(r){let i=r*this.totalTime;this.players.forEach(a=>{let s=a.totalTime?Math.min(1,i/a.totalTime):1;a.setPosition(s)})}getPosition(){let r=this.players.reduce((i,a)=>i===null||a.totalTime>i.totalTime?a:i,null);return r!=null?r.getPosition():0}beforeDestroy(){this.players.forEach(r=>{r.beforeDestroy&&r.beforeDestroy()})}triggerCallback(r){let i=r==`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var tt=`!`;function _i(o){return new y(3e3,!1)}function ca(){return new y(3100,!1)}function ma(){return new y(3101,!1)}function pa(o){return new y(3001,!1)}function ha(o){return new y(3003,!1)}function ua(o){return new y(3004,!1)}function ki(o,r){return new y(3005,!1)}function Pi(){return new y(3006,!1)}function Ti(){return new y(3007,!1)}function Mi(o,r){return new y(3008,!1)}function Ai(o){return new y(3002,!1)}function Oi(o,r,i,a,s){return new y(3010,!1)}function Ni(){return new y(3011,!1)}function Ii(){return new y(3012,!1)}function ji(){return new y(3200,!1)}function Ri(){return new y(3202,!1)}function Di(){return new y(3013,!1)}function zi(o){return new y(3014,!1)}function Fi(o){return new y(3015,!1)}function qi(o){return new y(3016,!1)}function Li(o,r){return new y(3404,!1)}function fa(o){return new y(3502,!1)}function Bi(o){return new y(3503,!1)}function Hi(){return new y(3300,!1)}function Ji(o){return new y(3504,!1)}function Gi(o){return new y(3301,!1)}function Ui(o,r){return new y(3302,!1)}function Wi(o){return new y(3303,!1)}function Vi(o,r){return new y(3400,!1)}function Yi(o){return new y(3401,!1)}function Ki(o){return new y(3402,!1)}function Qi(o,r){return new y(3505,!1)}function Ne(o){switch(o.length){case 0:return new Me;case 1:return o[0];default:return new Ge(o)}}function rn(o,r,i=new Map,a=new Map){let s=[],l=[],d=-1,m=null;if(r.forEach(h=>{let u=h.get(`offset`),b=u==d,S=b&&m||new Map;h.forEach((k,C)=>{let w=C,P=k;if(C!==`offset`)switch(w=o.normalizePropertyName(w,s),P){case tt:P=i.get(C);break;case ue:P=a.get(C);break;default:P=o.normalizeStyleValue(C,w,P,s)}S.set(w,P)}),b||l.push(S),m=S,d=u}),s.length)throw fa(s);return l}function kt(o,r,i,a){switch(r){case`start`:o.onStart(()=>a(i&&en(i,`start`,o)));break;case`done`:o.onDone(()=>a(i&&en(i,`done`,o)));break;case`destroy`:o.onDestroy(()=>a(i&&en(i,`destroy`,o)))}}function en(o,r,i){let a=i.totalTime,s=!!i.disabled,l=Pt(o.element,o.triggerName,o.fromState,o.toState,r||o.phaseName,a??o.totalTime,s),d=o._data;return d!=null&&(l._data=d),l}function Pt(o,r,i,a,s=``,l=0,d){return{element:o,triggerName:r,fromState:i,toState:a,phaseName:s,totalTime:l,disabled:!!d}}function oe(o,r,i){let a=o.get(r);return a||o.set(r,a=i),a}function an(o){let r=o.indexOf(`:`);return[o.substring(1,r),o.slice(r+1)]}var xa=typeof document>`u`?null:document.documentElement;function Tt(o){let r=o.parentNode||o.host||null;return r===xa?null:r}function ga(o){return o.substring(1,6)==`ebkit`}var Ue=null;var Ci=!1;function $i(o){Ue||(Ue=ba()||{},Ci=Ue.style?`WebkitAppearance`in Ue.style:!1);let r=!0;return Ue.style&&!ga(o)&&(r=o in Ue.style,!r&&Ci&&(r=`Webkit`+o.charAt(0).toUpperCase()+o.slice(1)in Ue.style)),r}function ba(){return typeof document<`u`?document.body:null}function on(o,r){for(;r;){if(r===o)return!0;r=Tt(r)}return!1}function sn(o,r,i){if(i)return Array.from(o.querySelectorAll(r));let a=o.querySelector(r);return a?[a]:[]}var Sa=1e3;var ln=`{{`;var Ea=`}}`;var dn=`ng-enter`;var Mt=`ng-leave`;var dt=`ng-trigger`;var ct=`.ng-trigger`;var cn=`ng-animating`;var At=`.ng-animating`;function Ae(o){if(typeof o==`number`)return o;let r=o.match(/^(-?[\.\d]+)(m?s)/);return!r||r.length<2?0:tn(parseFloat(r[1]),r[2])}function tn(o,r){return r===`s`?o*Sa:o}function mt(o,r,i){return typeof o==`object`&&o!==null&&Object.hasOwn(o,`duration`)?o:va(o,r,i)}var ya=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function va(o,r,i){let a,s=0,l=``;if(typeof o==`string`){let d=o.match(ya);if(d===null)return r.push(_i(o)),{duration:0,delay:0,easing:``};a=tn(parseFloat(d[1]),d[2]);let m=d[3];m!=null&&(s=tn(parseFloat(m),d[4]));let h=d[5];h&&(l=h)}else a=o;if(!i){let d=!1,m=r.length;a<0&&(r.push(ca()),d=!0),s<0&&(r.push(ma()),d=!0),d&&r.splice(m,0,_i(o))}return{duration:a,delay:s,easing:l}}function Xi(o){return o.length?o[0]instanceof Map?o:o.map(r=>new Map(Object.entries(r))):[]}function ye(o,r,i){r.forEach((a,s)=>{let l=Ot(s);i&&!i.has(s)&&i.set(s,o.style[l]),o.style[l]=a})}function ze(o,r){r.forEach((i,a)=>{let s=Ot(a);o.style[s]=``})}function nt(o){return Array.isArray(o)?o.length==1?o[0]:wi(o):o}function Zi(o,r,i){let a=r.params||{},s=mn(o);s.length&&s.forEach(l=>{Object.hasOwn(a,l)||i.push(pa(l))})}var nn=new RegExp(`${ln}\\s*(.+?)\\s*${Ea}`,`g`);function mn(o){let r=[];if(typeof o==`string`){let i;for(;i=nn.exec(o);)r.push(i[1]);nn.lastIndex=0}return r}function it(o,r,i){let a=`${o}`,s=a.replace(nn,(l,d)=>{let m=r[d];return m??(i.push(ha(d)),m=``),m.toString()});return s==a?o:s}var wa=/-+([a-z0-9])/g;function Ot(o){return o.replace(wa,(...r)=>r[1].toUpperCase())}function er(o,r){return o===0||r===0}function tr(o,r,i){if(i.size&&r.length){let a=r[0],s=[];if(i.forEach((l,d)=>{a.has(d)||s.push(d),a.set(d,l)}),s.length)for(let l=1;l<r.length;l++){let d=r[l];s.forEach(m=>d.set(m,Nt(o,m)))}}return r}function se(o,r,i){switch(r.type){case A.Trigger:return o.visitTrigger(r,i);case A.State:return o.visitState(r,i);case A.Transition:return o.visitTransition(r,i);case A.Sequence:return o.visitSequence(r,i);case A.Group:return o.visitGroup(r,i);case A.Animate:return o.visitAnimate(r,i);case A.Keyframes:return o.visitKeyframes(r,i);case A.Style:return o.visitStyle(r,i);case A.Reference:return o.visitReference(r,i);case A.AnimateChild:return o.visitAnimateChild(r,i);case A.AnimateRef:return o.visitAnimateRef(r,i);case A.Query:return o.visitQuery(r,i);case A.Stagger:return o.visitStagger(r,i);default:throw ua(r.type)}}function Nt(o,r){return window.getComputedStyle(o)[r]}var Tn=(()=>{class o{validateStyleProperty(i){return $i(i)}containsElement(i,a){return on(i,a)}getParentElement(i){return Tt(i)}query(i,a,s){return sn(i,a,s)}computeStyle(i,a,s){return s||``}animate(i,a,s,l,d,m=[],h){return new Me(s,l)}static ɵfac=function(a){return new(a||o)};static ɵprov=S({token:o,factory:o.ɵfac})}return o})();var Ve=class{static NOOP=new Tn};var Ye=class{};var Ca=new Set([`width`,`height`,`minWidth`,`minHeight`,`maxWidth`,`maxHeight`,`left`,`top`,`bottom`,`right`,`fontSize`,`outlineWidth`,`outlineOffset`,`paddingTop`,`paddingLeft`,`paddingBottom`,`paddingRight`,`marginTop`,`marginLeft`,`marginBottom`,`marginRight`,`borderRadius`,`borderWidth`,`borderTopWidth`,`borderLeftWidth`,`borderRightWidth`,`borderBottomWidth`,`textIndent`,`perspective`]);var zt=class extends Ye{normalizePropertyName(r,i){return Ot(r)}normalizeStyleValue(r,i,a,s){let l=``,d=a.toString().trim();if(Ca.has(i)&&a!==0&&a!==`0`)if(typeof a==`number`)l=`px`;else{let m=a.match(/^[+-]?[\d\.]+([a-z]*)$/);m&&m[1].length==0&&s.push(ki(r,a))}return d+l}};var Ft=`*`;function ka(o,r){let i=[];return typeof o==`string`?o.split(/\s*,\s*/).forEach(a=>Pa(a,i,r)):i.push(o),i}function Pa(o,r,i){if(o[0]==`:`){let h=Ta(o,i);if(typeof h==`function`){r.push(h);return}o=h}let a=o.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(a==null||a.length<4)return i.push(Fi(o)),r;let s=a[1],l=a[2],d=a[3];r.push(nr(s,d));let m=s==Ft&&d==Ft;l[0]==`<`&&!m&&r.push(nr(d,s))}function Ta(o,r){switch(o){case`:enter`:return`void => *`;case`:leave`:return`* => void`;case`:increment`:return(i,a)=>parseFloat(a)>parseFloat(i);case`:decrement`:return(i,a)=>parseFloat(a)<parseFloat(i);default:return r.push(qi(o)),`* => *`}}var It=new Set([`true`,`1`]);var jt=new Set([`false`,`0`]);function nr(o,r){let i=It.has(o)||jt.has(o),a=It.has(r)||jt.has(r);return(s,l)=>{let d=o==Ft||o==s,m=r==Ft||r==l;return!d&&i&&typeof s==`boolean`&&(d=s?It.has(o):jt.has(o)),!m&&a&&typeof l==`boolean`&&(m=l?It.has(r):jt.has(r)),d&&m}}var pr=`:self`;var Ma=new RegExp(`s*${pr}s*,?`,`g`);function hr(o,r,i,a){return new gn(o).build(r,i,a)}var ir=``;var gn=class{_driver;constructor(r){this._driver=r}build(r,i,a){let s=new bn(i);return this._resetContextStyleTimingState(s),se(this,nt(r),s)}_resetContextStyleTimingState(r){r.currentQuerySelector=ir,r.collectedStyles=new Map,r.collectedStyles.set(ir,new Map),r.currentTime=0}visitTrigger(r,i){let a=i.queryCount=0,s=i.depCount=0,l=[],d=[];return r.name.charAt(0)==`@`&&i.errors.push(Pi()),r.definitions.forEach(m=>{if(this._resetContextStyleTimingState(i),m.type==A.State){let h=m,u=h.name;u.toString().split(/\s*,\s*/).forEach(b=>{h.name=b,l.push(this.visitState(h,i))}),h.name=u}else if(m.type==A.Transition){let h=this.visitTransition(m,i);a+=h.queryCount,s+=h.depCount,d.push(h)}else i.errors.push(Ti())}),{type:A.Trigger,name:r.name,states:l,transitions:d,queryCount:a,depCount:s,options:null}}visitState(r,i){let a=this.visitStyle(r.styles,i),s=r.options&&r.options.params||null;if(a.containsDynamicStyles){let l=new Set,d=s||{};a.styles.forEach(m=>{m instanceof Map&&m.forEach(h=>{mn(h).forEach(u=>{Object.hasOwn(d,u)||l.add(u)})})}),l.size&&i.errors.push(Mi(r.name,[...l.values()]))}return{type:A.State,name:r.name,style:a,options:s?{params:s}:null}}visitTransition(r,i){i.queryCount=0,i.depCount=0;let a=se(this,nt(r.animation),i),s=ka(r.expr,i.errors);return{type:A.Transition,matchers:s,animation:a,queryCount:i.queryCount,depCount:i.depCount,options:We(r.options)}}visitSequence(r,i){return{type:A.Sequence,steps:r.steps.map(a=>se(this,a,i)),options:We(r.options)}}visitGroup(r,i){let a=i.currentTime,s=0,l=r.steps.map(d=>{i.currentTime=a;let m=se(this,d,i);return s=Math.max(s,i.currentTime),m});return i.currentTime=s,{type:A.Group,steps:l,options:We(r.options)}}visitAnimate(r,i){let a=Ia(r.timings,i.errors);i.currentAnimateTimings=a;let s,l=r.styles?r.styles:Ee({});if(l.type==A.Keyframes)s=this.visitKeyframes(l,i);else{let d=r.styles,m=!1;if(!d){m=!0;let u={};a.easing&&(u.easing=a.easing),d=Ee(u)}i.currentTime+=a.duration+a.delay;let h=this.visitStyle(d,i);h.isEmptyStep=m,s=h}return i.currentAnimateTimings=null,{type:A.Animate,timings:a,style:s,options:null}}visitStyle(r,i){let a=this._makeStyleAst(r,i);return this._validateStyleAst(a,i),a}_makeStyleAst(r,i){let a=[],s=Array.isArray(r.styles)?r.styles:[r.styles];for(let m of s)typeof m==`string`?m===ue?a.push(m):i.errors.push(Ai(m)):a.push(new Map(Object.entries(m)));let l=!1,d=null;return a.forEach(m=>{if(m instanceof Map&&(m.has(`easing`)&&(d=m.get(`easing`),m.delete(`easing`)),!l)){for(let h of m.values())if(h.toString().indexOf(ln)>=0){l=!0;break}}}),{type:A.Style,styles:a,easing:d,offset:r.offset,containsDynamicStyles:l,options:null}}_validateStyleAst(r,i){let a=i.currentAnimateTimings,s=i.currentTime,l=i.currentTime;a&&l>0&&(l-=a.duration+a.delay),r.styles.forEach(d=>{typeof d!=`string`&&d.forEach((m,h)=>{let u=i.collectedStyles.get(i.currentQuerySelector),b=u.get(h),S=!0;b&&(l!=s&&l>=b.startTime&&s<=b.endTime&&(i.errors.push(Oi(h,b.startTime,b.endTime,l,s)),S=!1),l=b.startTime),S&&u.set(h,{startTime:l,endTime:s}),i.options&&Zi(m,i.options,i.errors)})})}visitKeyframes(r,i){let a={type:A.Keyframes,styles:[],options:null};if(!i.currentAnimateTimings)return i.errors.push(Ni()),a;let s=1,l=0,d=[],m=!1,h=!1,u=0,b=r.steps.map(J=>{let V=this._makeStyleAst(J,i),Z=V.offset!=null?V.offset:Na(V.styles),$=0;return Z!=null&&(l++,$=V.offset=Z),h=h||$<0||$>1,m=m||$<u,u=$,d.push($),V});h&&i.errors.push(Ii()),m&&i.errors.push(ji());let S=r.steps.length,k=0;l>0&&l<S?i.errors.push(Ri()):l==0&&(k=s/(S-1));let C=S-1,w=i.currentTime,P=i.currentAnimateTimings,F=P.duration;return b.forEach((J,V)=>{let Z=k>0?V==C?1:k*V:d[V],$=Z*F;i.currentTime=w+P.delay+$,P.duration=$,this._validateStyleAst(J,i),J.offset=Z,a.styles.push(J)}),a}visitReference(r,i){return{type:A.Reference,animation:se(this,nt(r.animation),i),options:We(r.options)}}visitAnimateChild(r,i){return i.depCount++,{type:A.AnimateChild,options:We(r.options)}}visitAnimateRef(r,i){return{type:A.AnimateRef,animation:this.visitReference(r.animation,i),options:We(r.options)}}visitQuery(r,i){let a=i.currentQuerySelector,s=r.options||{};i.queryCount++,i.currentQuery=r;let[l,d]=Aa(r.selector);i.currentQuerySelector=a.length?a+` `+l:l,oe(i.collectedStyles,i.currentQuerySelector,new Map);let m=se(this,nt(r.animation),i);return i.currentQuery=null,i.currentQuerySelector=a,{type:A.Query,selector:l,limit:s.limit||0,optional:!!s.optional,includeSelf:d,animation:m,originalSelector:r.selector,options:We(r.options)}}visitStagger(r,i){i.currentQuery||i.errors.push(Di());let a=r.timings===`full`?{duration:0,delay:0,easing:`full`}:mt(r.timings,i.errors,!0);return{type:A.Stagger,animation:se(this,nt(r.animation),i),timings:a,options:null}}};function Aa(o){let r=!!o.split(/\s*,\s*/).find(i=>i==pr);return r&&(o=o.replace(Ma,``)),o=o.replace(/@\*/g,ct).replace(/@\w+/g,i=>ct+`-`+i.slice(1)).replace(/:animating/g,At),[o,r]}function Oa(o){return o?m({},o):null}var bn=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(r){this.errors=r}};function Na(o){if(typeof o==`string`)return null;let r=null;if(Array.isArray(o))o.forEach(i=>{if(i instanceof Map&&i.has(`offset`)){let a=i;r=parseFloat(a.get(`offset`)),a.delete(`offset`)}});else if(o instanceof Map&&o.has(`offset`)){let i=o;r=parseFloat(i.get(`offset`)),i.delete(`offset`)}return r}function Ia(o,r){if(typeof o==`object`&&o!==null&&Object.hasOwn(o,`duration`))return o;if(typeof o==`number`){let l=mt(o,r).duration;return pn(l,0,``)}let i=o;if(i.split(/\s+/).some(l=>l.charAt(0)==`{`&&l.charAt(1)==`{`)){let l=pn(0,0,``);return l.dynamic=!0,l.strValue=i,l}let s=mt(i,r);return pn(s.duration,s.delay,s.easing)}function We(o){return o?(o=m({},o),o.params&&(o.params=Oa(o.params))):o={},o}function pn(o,r,i){return{duration:o,delay:r,easing:i}}function Mn(o,r,i,a,s,l,d=null,m=!1){return{type:1,element:o,keyframes:r,preStyleProps:i,postStyleProps:a,duration:s,delay:l,totalTime:s+l,easing:d,subTimeline:m}}var ht=class{_map=new Map;get(r){return this._map.get(r)||[]}append(r,i){let a=this._map.get(r);a||this._map.set(r,a=[]),a.push(...i)}has(r){return this._map.has(r)}clear(){this._map.clear()}};var ja=1;var Da=new RegExp(`:enter`,`g`);var Fa=new RegExp(`:leave`,`g`);function ur(o,r,i,a,s,l=new Map,d=new Map,m,h,u=[]){return new Sn().buildKeyframes(o,r,i,a,s,l,d,m,h,u)}var Sn=class{buildKeyframes(r,i,a,s,l,d,m,h,u,b=[]){u=u||new ht;let S=new En(r,i,u,s,l,b,[]);S.options=h;let k=h.delay?Ae(h.delay):0;S.currentTimeline.delayNextStep(k),S.currentTimeline.setStyles([d],null,S.errors,h),se(this,a,S);let C=S.timelines.filter(w=>w.containsAnimation());if(C.length&&m.size){let w;for(let P=C.length-1;P>=0;P--){let F=C[P];if(F.element===i){w=F;break}}w&&!w.allowOnlyTimelineStyles()&&w.setStyles([m],null,S.errors,h)}return C.length?C.map(w=>w.buildKeyframes()):[Mn(i,[],[],[],0,k,``,!1)]}visitTrigger(r,i){}visitState(r,i){}visitTransition(r,i){}visitAnimateChild(r,i){let a=i.subInstructions.get(i.element);if(a){let s=i.createSubContext(r.options),l=i.currentTimeline.currentTime,d=this._visitSubInstructions(a,s,s.options);l!=d&&i.transformIntoNewTimeline(d)}i.previousNode=r}visitAnimateRef(r,i){let a=i.createSubContext(r.options);a.transformIntoNewTimeline(),this._applyAnimationRefDelays([r.options,r.animation.options],i,a),this.visitReference(r.animation,a),i.transformIntoNewTimeline(a.currentTimeline.currentTime),i.previousNode=r}_applyAnimationRefDelays(r,i,a){for(let s of r){let l=s?.delay;if(l){let d=typeof l==`number`?l:Ae(it(l,s?.params??{},i.errors));a.delayNextStep(d)}}}_visitSubInstructions(r,i,a){let l=i.currentTimeline.currentTime,d=a.duration!=null?Ae(a.duration):null,m=a.delay!=null?Ae(a.delay):null;return d!==0&&r.forEach(h=>{let u=i.appendInstructionToTimeline(h,d,m);l=Math.max(l,u.duration+u.delay)}),l}visitReference(r,i){i.updateOptions(r.options,!0),se(this,r.animation,i),i.previousNode=r}visitSequence(r,i){let a=i.subContextCount,s=i,l=r.options;if(l&&(l.params||l.delay)&&(s=i.createSubContext(l),s.transformIntoNewTimeline(),l.delay!=null)){s.previousNode.type==A.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=qt);let d=Ae(l.delay);s.delayNextStep(d)}r.steps.length&&(r.steps.forEach(d=>se(this,d,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>a&&s.transformIntoNewTimeline()),i.previousNode=r}visitGroup(r,i){let a=[],s=i.currentTimeline.currentTime,l=r.options&&r.options.delay?Ae(r.options.delay):0;r.steps.forEach(d=>{let m=i.createSubContext(r.options);l&&m.delayNextStep(l),se(this,d,m),s=Math.max(s,m.currentTimeline.currentTime),a.push(m.currentTimeline)}),a.forEach(d=>i.currentTimeline.mergeTimelineCollectedStyles(d)),i.transformIntoNewTimeline(s),i.previousNode=r}_visitTiming(r,i){if(r.dynamic){let a=r.strValue;return mt(i.params?it(a,i.params,i.errors):a,i.errors)}else return{duration:r.duration,delay:r.delay,easing:r.easing}}visitAnimate(r,i){let a=i.currentAnimateTimings=this._visitTiming(r.timings,i),s=i.currentTimeline;a.delay&&(i.incrementTime(a.delay),s.snapshotCurrentStyles());let l=r.style;l.type==A.Keyframes?this.visitKeyframes(l,i):(i.incrementTime(a.duration),this.visitStyle(l,i),s.applyStylesToKeyframe()),i.currentAnimateTimings=null,i.previousNode=r}visitStyle(r,i){let a=i.currentTimeline,s=i.currentAnimateTimings;!s&&a.hasCurrentStyleProperties()&&a.forwardFrame();let l=s&&s.easing||r.easing;r.isEmptyStep?a.applyEmptyStep(l):a.setStyles(r.styles,l,i.errors,i.options),i.previousNode=r}visitKeyframes(r,i){let a=i.currentAnimateTimings,s=i.currentTimeline.duration,l=a.duration,m=i.createSubContext().currentTimeline;m.easing=a.easing,r.styles.forEach(h=>{let u=h.offset||0;m.forwardTime(u*l),m.setStyles(h.styles,h.easing,i.errors,i.options),m.applyStylesToKeyframe()}),i.currentTimeline.mergeTimelineCollectedStyles(m),i.transformIntoNewTimeline(s+l),i.previousNode=r}visitQuery(r,i){let a=i.currentTimeline.currentTime,s=r.options||{},l=s.delay?Ae(s.delay):0;l&&(i.previousNode.type===A.Style||a==0&&i.currentTimeline.hasCurrentStyleProperties())&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=qt);let d=a,m=i.invokeQuery(r.selector,r.originalSelector,r.limit,r.includeSelf,!!s.optional,i.errors);i.currentQueryTotal=m.length;let h=null;m.forEach((u,b)=>{i.currentQueryIndex=b;let S=i.createSubContext(r.options,u);l&&S.delayNextStep(l),u===i.element&&(h=S.currentTimeline),se(this,r.animation,S),S.currentTimeline.applyStylesToKeyframe();let k=S.currentTimeline.currentTime;d=Math.max(d,k)}),i.currentQueryIndex=0,i.currentQueryTotal=0,i.transformIntoNewTimeline(d),h&&(i.currentTimeline.mergeTimelineCollectedStyles(h),i.currentTimeline.snapshotCurrentStyles()),i.previousNode=r}visitStagger(r,i){let a=i.parentContext,s=i.currentTimeline,l=r.timings,d=Math.abs(l.duration),m=d*(i.currentQueryTotal-1),h=d*i.currentQueryIndex;switch(l.duration<0?`reverse`:l.easing){case`reverse`:h=m-h;break;case`full`:h=a.currentStaggerTime}let b=i.currentTimeline;h&&b.delayNextStep(h);let S=b.currentTime;se(this,r.animation,i),i.previousNode=r,a.currentStaggerTime=s.currentTime-S+(s.startTime-a.currentTimeline.startTime)}};var qt={};var En=class o{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=qt;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(r,i,a,s,l,d,m,h){this._driver=r,this.element=i,this.subInstructions=a,this._enterClassName=s,this._leaveClassName=l,this.errors=d,this.timelines=m,this.currentTimeline=h||new Lt(this._driver,i,0),m.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(r,i){if(!r)return;let a=r,s=this.options;a.duration!=null&&(s.duration=Ae(a.duration)),a.delay!=null&&(s.delay=Ae(a.delay));let l=a.params;if(l){let d=s.params;d||(d=this.options.params={}),Object.keys(l).forEach(m=>{(!i||!Object.hasOwn(d,m))&&(d[m]=it(l[m],d,this.errors))})}}_copyOptions(){let r={};if(this.options){let i=this.options.params;if(i){let a=r.params={};Object.keys(i).forEach(s=>{a[s]=i[s]})}}return r}createSubContext(r=null,i,a){let s=i||this.element,l=new o(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,a||0));return l.previousNode=this.previousNode,l.currentAnimateTimings=this.currentAnimateTimings,l.options=this._copyOptions(),l.updateOptions(r),l.currentQueryIndex=this.currentQueryIndex,l.currentQueryTotal=this.currentQueryTotal,l.parentContext=this,this.subContextCount++,l}transformIntoNewTimeline(r){return this.previousNode=qt,this.currentTimeline=this.currentTimeline.fork(this.element,r),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(r,i,a){let s={duration:i??r.duration,delay:this.currentTimeline.currentTime+(a??0)+r.delay,easing:``},l=new yn(this._driver,r.element,r.keyframes,r.preStyleProps,r.postStyleProps,s,r.stretchStartingKeyframe);return this.timelines.push(l),s}incrementTime(r){this.currentTimeline.forwardTime(this.currentTimeline.duration+r)}delayNextStep(r){r>0&&this.currentTimeline.delayNextStep(r)}invokeQuery(r,i,a,s,l,d){let m=[];if(s&&m.push(this.element),r.length>0){r=r.replace(Da,`.`+this._enterClassName),r=r.replace(Fa,`.`+this._leaveClassName);let h=a!=1,u=this._driver.query(this.element,r,h);a!==0&&(u=a<0?u.slice(u.length+a,u.length):u.slice(0,a)),m.push(...u)}return!l&&m.length==0&&d.push(zi(i)),m}};var Lt=class o{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(r,i,a,s){this._driver=r,this.element=i,this.startTime=a,this._elementTimelineStylesLookup=s,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(i),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(i,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(r){let i=this._keyframes.size===1&&this._pendingStyles.size;this.duration||i?(this.forwardTime(this.currentTime+r),i&&this.snapshotCurrentStyles()):this.startTime+=r}fork(r,i){return this.applyStylesToKeyframe(),new o(this._driver,r,i||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=ja,this._loadKeyframe()}forwardTime(r){this.applyStylesToKeyframe(),this.duration=r,this._loadKeyframe()}_updateStyle(r,i){this._localTimelineStyles.set(r,i),this._globalTimelineStyles.set(r,i),this._styleSummary.set(r,{time:this.currentTime,value:i})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(r){r&&this._previousKeyframe.set(`easing`,r);for(let[i,a]of this._globalTimelineStyles)this._backFill.set(i,a||ue),this._currentKeyframe.set(i,ue);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(r,i,a,s){i&&this._previousKeyframe.set(`easing`,i);let l=s&&s.params||{},d=qa(r,this._globalTimelineStyles);for(let[m,h]of d){let u=it(h,l,a);this._pendingStyles.set(m,u),this._localTimelineStyles.has(m)||this._backFill.set(m,this._globalTimelineStyles.get(m)??ue),this._updateStyle(m,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((r,i)=>{this._currentKeyframe.set(i,r)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((r,i)=>{this._currentKeyframe.has(i)||this._currentKeyframe.set(i,r)}))}
vendor: 5,830 bytes, line 42
42snapshotCurrentStyles(){for(let[r,i]of this._localTimelineStyles)this._pendingStyles.set(r,i),this._updateStyle(r,i)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let r=[];for(let i in this._currentKeyframe)r.push(i);return r}mergeTimelineCollectedStyles(r){r._styleSummary.forEach((i,a)=>{let s=this._styleSummary.get(a);(!s||i.time>s.time)&&this._updateStyle(a,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();let r=new Set,i=new Set,a=this._keyframes.size===1&&this.duration===0,s=[];this._keyframes.forEach((m,h)=>{let u=new Map([...this._backFill,...m]);u.forEach((b,S)=>{b===tt?r.add(S):b===ue&&i.add(S)}),a||u.set(`offset`,h/this.duration),s.push(u)});let l=[...r.values()],d=[...i.values()];if(a){let m=s[0],h=new Map(m);m.set(`offset`,0),h.set(`offset`,1),s=[m,h]}return Mn(this.element,s,l,d,this.duration,this.startTime,this.easing,!1)}};var yn=class extends Lt{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(r,i,a,s,l,d,m=!1){super(r,i,d.delay),this.keyframes=a,this.preStyleProps=s,this.postStyleProps=l,this._stretchStartingKeyframe=m,this.timings={duration:d.duration,delay:d.delay,easing:d.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let r=this.keyframes,{delay:i,duration:a,easing:s}=this.timings;if(this._stretchStartingKeyframe&&i){let l=[],d=a+i,m=i/d,h=new Map(r[0]);h.set(`offset`,0),l.push(h);let u=new Map(r[0]);u.set(`offset`,rr(m)),l.push(u);let b=r.length-1;for(let S=1;S<=b;S++){let k=new Map(r[S]),C=k.get(`offset`),w=i+C*a;k.set(`offset`,rr(w/d)),l.push(k)}a=d,i=0,s=``,r=l}return Mn(this.element,r,this.preStyleProps,this.postStyleProps,a,i,s,!0)}};function rr(o,r=3){let i=Math.pow(10,r-1);return Math.round(o*i)/i}function qa(o,r){let i=new Map,a;return o.forEach(s=>{if(s===`*`){a??=r.keys();for(let l of a)i.set(l,ue)}else for(let[l,d]of s)i.set(l,d)}),i}function ar(o,r,i,a,s,l,d,m,h,u,b,S,k){return{type:0,element:o,triggerName:r,isRemovalTransition:s,fromState:i,fromStyles:l,toState:a,toStyles:d,timelines:m,queriedElements:h,preStyleProps:u,postStyleProps:b,totalTime:S,errors:k}}var hn={};var Bt=class{_triggerName;ast;_stateStyles;constructor(r,i,a){this._triggerName=r,this.ast=i,this._stateStyles=a}match(r,i,a,s){return La(this.ast.matchers,r,i,a,s)}buildStyles(r,i,a){let s=this._stateStyles.get(`*`);return r!==void 0&&(s=this._stateStyles.get(r?.toString())||s),s?s.buildStyles(i,a):new Map}build(r,i,a,s,l,d,m,h,u,b){let S=[],k=this.ast.options&&this.ast.options.params||hn,C=m&&m.params||hn,w=this.buildStyles(a,C,S),P=h&&h.params||hn,F=this.buildStyles(s,P,S),J=new Set,V=new Map,Z=new Map,$=s===`void`,Ie={params:fr(P,k),delay:this.ast.options?.delay},le=b?[]:ur(r,i,this.ast.animation,l,d,w,F,Ie,u,S),te=0;return le.forEach(re=>{te=Math.max(re.duration+re.delay,te)}),S.length?ar(i,this._triggerName,a,s,$,w,F,[],[],V,Z,te,S):(le.forEach(re=>{let Fe=re.element,Ke=oe(V,Fe,new Set);re.preStyleProps.forEach(qe=>Ke.add(qe));let jn=oe(Z,Fe,new Set);re.postStyleProps.forEach(qe=>jn.add(qe)),Fe!==i&&J.add(Fe)}),ar(i,this._triggerName,a,s,$,w,F,le,[...J.values()],V,Z,te))}};function La(o,r,i,a,s){return o.some(l=>l(r,i,a,s))}function fr(o,r){let i=m({},r);return Object.entries(o).forEach(([a,s])=>{s!=null&&(i[a]=s)}),i}var vn=class{styles;defaultParams;normalizer;constructor(r,i,a){this.styles=r,this.defaultParams=i,this.normalizer=a}buildStyles(r,i){let a=new Map,s=fr(r,this.defaultParams);return this.styles.styles.forEach(l=>{typeof l!=`string`&&l.forEach((d,m)=>{d&&(d=it(d,s,i));let h=this.normalizer.normalizePropertyName(m,i);d=this.normalizer.normalizeStyleValue(m,h,d,i),a.set(m,d)})}),a}};function Ba(o,r,i){return new wn(o,r,i)}var wn=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(r,i,a){this.name=r,this.ast=i,this._normalizer=a,i.states.forEach(s=>{let l=s.options&&s.options.params||{};this.states.set(s.name,new vn(s.style,l,a))}),or(this.states,`true`,`1`),or(this.states,`false`,`0`),i.transitions.forEach(s=>{this.transitionFactories.push(new Bt(r,s,this.states))}),this.fallbackTransition=Ha(r,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(r,i,a,s){return this.transitionFactories.find(d=>d.match(r,i,a,s))||null}matchStyles(r,i,a){return this.fallbackTransition.buildStyles(r,i,a)}};function Ha(o,r,i){let a=[(d,m)=>!0],s={type:A.Sequence,steps:[],options:null};return new Bt(o,{type:A.Transition,animation:s,matchers:a,options:null,queryCount:0,depCount:0},r)}function or(o,r,i){o.has(r)?o.has(i)||o.set(i,o.get(r)):o.has(i)&&o.set(r,o.get(i))}var Ja=new ht;var _n=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(r,i,a){this.bodyNode=r,this._driver=i,this._normalizer=a}register(r,i){let a=[],l=hr(this._driver,i,a,[]);if(a.length)throw Bi(a);this._animations.set(r,l)}_buildPlayer(r,i,a){let s=r.element,l=rn(this._normalizer,r.keyframes,i,a);return this._driver.animate(s,l,r.duration,r.delay,r.easing,[],!0)}create(r,i,a={}){let s=[],l=this._animations.get(r),d,m=new Map;if(l?(d=ur(this._driver,i,l,dn,Mt,new Map,new Map,a,Ja,s),d.forEach(b=>{let S=oe(m,b.element,new Map);b.postStyleProps.forEach(k=>S.set(k,null))})):(s.push(Hi()),d=[]),s.length)throw Ji(s);m.forEach((b,S)=>{b.forEach((k,C)=>{b.set(C,this._driver.computeStyle(S,C,ue))})});let u=Ne(d.map(b=>{let S=m.get(b.element);return this._buildPlayer(b,new Map,S)}));return this._playersById.set(r,u),u.onDestroy(()=>this.destroy(r)),this.players.push(u),u}destroy(r){let i=this._getPlayer(r);i.destroy(),this._playersById.delete(r);let a=this.players.indexOf(i);a>=0&&this.players.splice(a,1)}_getPlayer(r){let i=this._playersById.get(r);if(!i)throw Gi(r);return i}listen(r,i,a,s){let l=Pt(i,``,``,``);return kt(this._getPlayer(r),a,l,s),()=>{}}
42command(r,i,a,s){if(a==`register`){this.register(r,s[0]);return}if(a==`create`){let d=s[0]||{};this.create(r,i,d);return}let l=this._getPlayer(r);switch(a){case`play`:l.play();break;case`pause`:l.pause();break;case`reset`:l.reset();break;case`restart`:l.restart();break;case`finish`:l.finish();break;case`init`:l.init();break;case`setPosition`:l.setPosition(parseFloat(s[0]));break;case`destroy`:this.destroy(r)}}};var sr=`ng-animate-queued`;var Ga=`.ng-animate-queued`;var un=`ng-animate-disabled`;var Ua=`.ng-animate-disabled`;var Wa=`ng-star-inserted`;var Va=`.ng-star-inserted`;var Ya=[];var xr={namespaceId:``,setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1};var Ka={namespaceId:``,setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};var ve=`__ng_removed`;var ut=class{namespaceId;value;options;get params(){return this.options.params}constructor(r,i=``){this.namespaceId=i;let a=r&&Object.hasOwn(r,`value`),s=a?r.value:r;if(this.value=$a(s),a){let l=r,{value:d}=l,m=DE(l,[`value`]);this.options=m}else this.options={};this.options.params||(this.options.params={})}absorbOptions(r){let i=r.params;if(i){let a=this.options.params;
vendor: 17,571 bytes, line 42
42Object.keys(i).forEach(s=>{a[s]??(a[s]=i[s])})}}};var pt=`void`;var fn=new ut(pt);var Cn=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(r,i,a){this.id=r,this.hostElement=i,this._engine=a,this._hostClassName=`ng-tns-`+r,fe(i,this._hostClassName)}listen(r,i,a,s){if(!this._triggers.has(i))throw Ui(a,i);if(a==null||a.length==0)throw Wi(i);if(!Xa(a))throw Vi(a,i);let l=oe(this._elementListeners,r,[]),d={name:i,phase:a,callback:s};l.push(d);let m=oe(this._engine.statesByElement,r,new Map);return m.has(i)||(fe(r,dt),fe(r,dt+`-`+i),m.set(i,fn)),()=>{this._engine.afterFlush(()=>{let h=l.indexOf(d);h>=0&&l.splice(h,1),this._triggers.has(i)||m.delete(i)})}}register(r,i){return this._triggers.has(r)?!1:(this._triggers.set(r,i),!0)}_getTrigger(r){let i=this._triggers.get(r);if(!i)throw Yi(r);return i}trigger(r,i,a,s=!0){let l=this._getTrigger(i),d=new ft(this.id,i,r),m=this._engine.statesByElement.get(r);m||(fe(r,dt),fe(r,dt+`-`+i),this._engine.statesByElement.set(r,m=new Map));let h=m.get(i),u=new ut(a,this.id);if(!(a&&Object.hasOwn(a,`value`))&&h&&u.absorbOptions(h.options),m.set(i,u),h||(h=fn),!(u.value===pt)&&h.value===u.value){if(!to(h.params,u.params)){let P=[],F=l.matchStyles(h.value,h.params,P),J=l.matchStyles(u.value,u.params,P);P.length?this._engine.reportError(P):this._engine.afterFlush(()=>{ze(r,F),ye(r,J)})}return}let k=oe(this._engine.playersByElement,r,[]);k.forEach(P=>{P.namespaceId==this.id&&P.triggerName==i&&P.queued&&P.destroy()});let C=l.matchTransition(h.value,u.value,r,u.params),w=!1;if(!C){if(!s)return;C=l.fallbackTransition,w=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:i,transition:C,fromState:h,toState:u,player:d,isFallbackTransition:w}),w||(fe(r,sr),d.onStart(()=>{rt(r,sr)})),d.onDone(()=>{let P=this.players.indexOf(d);P>=0&&this.players.splice(P,1);let F=this._engine.playersByElement.get(r);if(F){let J=F.indexOf(d);J>=0&&F.splice(J,1)}}),this.players.push(d),k.push(d),d}deregister(r){this._triggers.delete(r),this._engine.statesByElement.forEach(i=>i.delete(r)),this._elementListeners.forEach((i,a)=>{this._elementListeners.set(a,i.filter(s=>s.name!=r))})}clearElementCache(r){this._engine.statesByElement.delete(r),this._elementListeners.delete(r);let i=this._engine.playersByElement.get(r);i&&(i.forEach(a=>a.destroy()),this._engine.playersByElement.delete(r))}_signalRemovalForInnerTriggers(r,i){let a=this._engine.driver.query(r,ct,!0);a.forEach(s=>{if(s[ve])return;let l=this._engine.fetchNamespacesByElement(s);l.size?l.forEach(d=>d.triggerLeaveAnimation(s,i,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>a.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(r,i,a,s){let l=this._engine.statesByElement.get(r),d=new Map;if(l){let m=[];if(l.forEach((h,u)=>{if(d.set(u,h.value),this._triggers.has(u)){let b=this.trigger(r,u,pt,s);b&&m.push(b)}}),m.length)return this._engine.markElementAsRemoved(this.id,r,!0,i,d),a&&Ne(m).onDone(()=>this._engine.processLeaveNode(r)),!0}return!1}prepareLeaveAnimationListeners(r){let i=this._elementListeners.get(r),a=this._engine.statesByElement.get(r);if(i&&a){let s=new Set;i.forEach(l=>{let d=l.name;if(s.has(d))return;s.add(d);let h=this._triggers.get(d).fallbackTransition,u=a.get(d)||fn,b=new ut(pt),S=new ft(this.id,d,r);this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:d,transition:h,fromState:u,toState:b,player:S,isFallbackTransition:!0})})}}removeNode(r,i){let a=this._engine;if(r.childElementCount&&this._signalRemovalForInnerTriggers(r,i),this.triggerLeaveAnimation(r,i,!0))return;let s=!1;if(a.totalAnimations){let l=a.players.length?a.playersByQueriedElement.get(r):[];if(l&&l.length)s=!0;else{let d=r;for(;d=d.parentNode;)if(a.statesByElement.get(d)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(r),s)a.markElementAsRemoved(this.id,r,!1,i);else{let l=r[ve];(!l||l===xr)&&(a.afterFlush(()=>this.clearElementCache(r)),a.destroyInnerAnimations(r),a._onRemovalComplete(r,i))}}insertNode(r,i){fe(r,this._hostClassName)}drainQueuedTransitions(r){let i=[];return this._queue.forEach(a=>{let s=a.player;if(s.destroyed)return;let l=a.element,d=this._elementListeners.get(l);d&&d.forEach(m=>{if(m.name==a.triggerName){let h=Pt(l,a.triggerName,a.fromState.value,a.toState.value);h._data=r,kt(a.player,m.phase,h,m.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):i.push(a)}),this._queue=[],i.sort((a,s)=>{let l=a.transition.ast.depCount,d=s.transition.ast.depCount;return l==0||d==0?l-d:this._engine.driver.containsElement(a.element,s.element)?1:-1})}destroy(r){this.players.forEach(i=>i.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,r)}};var kn=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(r,i)=>{};_onRemovalComplete(r,i){this.onRemovalComplete(r,i)}constructor(r,i,a){this.bodyNode=r,this.driver=i,this._normalizer=a}get queuedPlayers(){let r=[];return this._namespaceList.forEach(i=>{i.players.forEach(a=>{a.queued&&r.push(a)})}),r}createNamespace(r,i){let a=new Cn(r,i,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,i)?this._balanceNamespaceList(a,i):(this.newHostElements.set(i,a),this.collectEnterElement(i)),this._namespaceLookup[r]=a}_balanceNamespaceList(r,i){let a=this._namespaceList,s=this.namespacesByHostElement;if(a.length-1>=0){let d=!1,m=this.driver.getParentElement(i);for(;m;){let h=s.get(m);if(h){let u=a.indexOf(h);a.splice(u+1,0,r),d=!0;break}m=this.driver.getParentElement(m)}d||a.unshift(r)}else a.push(r);return s.set(i,r),r}register(r,i){let a=this._namespaceLookup[r];return a||(a=this.createNamespace(r,i)),a}registerTrigger(r,i,a){let s=this._namespaceLookup[r];s&&s.register(i,a)&&this.totalAnimations++}destroy(r,i){r&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let a=this._fetchNamespace(r);this.namespacesByHostElement.delete(a.hostElement);let s=this._namespaceList.indexOf(a);s>=0&&this._namespaceList.splice(s,1),a.destroy(i),delete this._namespaceLookup[r]}))}_fetchNamespace(r){return this._namespaceLookup[r]}fetchNamespacesByElement(r){let i=new Set,a=this.statesByElement.get(r);if(a){for(let s of a.values())if(s.namespaceId){let l=this._fetchNamespace(s.namespaceId);l&&i.add(l)}}return i}trigger(r,i,a,s){if(Rt(i)){let l=this._fetchNamespace(r);if(l)return l.trigger(i,a,s),!0}return!1}insertNode(r,i,a,s){if(!Rt(i))return;let l=i[ve];if(l&&l.setForRemoval){l.setForRemoval=!1,l.setForMove=!0;let d=this.collectedLeaveElements.indexOf(i);d>=0&&this.collectedLeaveElements.splice(d,1)}if(r){let d=this._fetchNamespace(r);d&&d.insertNode(i,a)}s&&this.collectEnterElement(i)}collectEnterElement(r){this.collectedEnterElements.push(r)}markElementAsDisabled(r,i){i?this.disabledNodes.has(r)||(this.disabledNodes.add(r),fe(r,un)):this.disabledNodes.has(r)&&(this.disabledNodes.delete(r),rt(r,un))}removeNode(r,i,a){if(Rt(i)){let s=r?this._fetchNamespace(r):null;s?s.removeNode(i,a):this.markElementAsRemoved(r,i,!1,a);let l=this.namespacesByHostElement.get(i);l&&l.id!==r&&l.removeNode(i,a)}else this._onRemovalComplete(i,a)}markElementAsRemoved(r,i,a,s,l){this.collectedLeaveElements.push(i),i[ve]={namespaceId:r,setForRemoval:s,hasAnimation:a,removedBeforeQueried:!1,previousTriggersValues:l}}listen(r,i,a,s,l){return Rt(i)?this._fetchNamespace(r).listen(i,a,s,l):()=>{}}_buildInstruction(r,i,a,s,l){return r.transition.build(this.driver,r.element,r.fromState.value,r.toState.value,a,s,r.fromState.options,r.toState.options,i,l)}destroyInnerAnimations(r){let i=this.driver.query(r,ct,!0);i.forEach(a=>this.destroyActiveAnimationsForElement(a)),this.playersByQueriedElement.size!=0&&(i=this.driver.query(r,At,!0),i.forEach(a=>this.finishActiveQueriedAnimationOnElement(a)))}destroyActiveAnimationsForElement(r){let i=this.playersByElement.get(r);i&&i.forEach(a=>{a.queued?a.markedForDestroy=!0:a.destroy()})}finishActiveQueriedAnimationOnElement(r){let i=this.playersByQueriedElement.get(r);i&&i.forEach(a=>a.finish())}whenRenderingDone(){return new Promise(r=>{if(this.players.length)return Ne(this.players).onDone(()=>r());r()})}processLeaveNode(r){let i=r[ve];if(i&&i.setForRemoval){if(r[ve]=xr,i.namespaceId){this.destroyInnerAnimations(r);let a=this._fetchNamespace(i.namespaceId);a&&a.clearElementCache(r)}this._onRemovalComplete(r,i.setForRemoval)}r.classList?.contains(un)&&this.markElementAsDisabled(r,!1),this.driver.query(r,Ua,!0).forEach(a=>{this.markElementAsDisabled(a,!1)})}flush(r=-1){let i=[];if(this.newHostElements.size&&(this.newHostElements.forEach((a,s)=>this._balanceNamespaceList(a,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let a=0;a<this.collectedEnterElements.length;a++){let s=this.collectedEnterElements[a];fe(s,Wa)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let a=[];try{i=this._flushAnimations(a,r)}finally{for(let s=0;s<a.length;s++)a[s]()}}else for(let a=0;a<this.collectedLeaveElements.length;a++){let s=this.collectedLeaveElements[a];this.processLeaveNode(s)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(a=>a()),this._flushFns=[],this._whenQuietFns.length){let a=this._whenQuietFns;this._whenQuietFns=[],i.length?Ne(i).onDone(()=>{a.forEach(s=>s())}):a.forEach(s=>s())}}reportError(r){throw Ki(r)}_flushAnimations(r,i){let a=new ht,s=[],l=new Map,d=[],m=new Map,h=new Map,u=new Map,b=new Set;this.disabledNodes.forEach(v=>{b.add(v);let T=this.driver.query(v,Ga,!0);for(let M=0;M<T.length;M++)b.add(T[M])});let S=this.bodyNode,k=Array.from(this.statesByElement.keys()),C=cr(k,this.collectedEnterElements),w=new Map,P=0;C.forEach((v,T)=>{let M=dn+P++;w.set(T,M),v.forEach(D=>fe(D,M))});let F=[],J=new Set,V=new Set;for(let v=0;v<this.collectedLeaveElements.length;v++){let T=this.collectedLeaveElements[v],M=T[ve];M&&M.setForRemoval&&(F.push(T),J.add(T),M.hasAnimation?this.driver.query(T,Va,!0).forEach(D=>J.add(D)):V.add(T))}let Z=new Map,$=cr(k,Array.from(J));$.forEach((v,T)=>{let M=Mt+P++;Z.set(T,M),v.forEach(D=>fe(D,M))}),r.push(()=>{C.forEach((v,T)=>{let M=w.get(T);v.forEach(D=>rt(D,M))}),$.forEach((v,T)=>{let M=Z.get(T);v.forEach(D=>rt(D,M))}),F.forEach(v=>{this.processLeaveNode(v)})});let Ie=[],le=[];for(let v=this._namespaceList.length-1;v>=0;v--)this._namespaceList[v].drainQueuedTransitions(i).forEach(M=>{let D=M.player,ne=M.element;if(Ie.push(D),this.collectedEnterElements.length){let ie=ne[ve];if(ie&&ie.setForMove){if(ie.previousTriggersValues&&ie.previousTriggersValues.has(M.triggerName)){let Le=ie.previousTriggersValues.get(M.triggerName),me=this.statesByElement.get(M.element);if(me&&me.has(M.triggerName)){let xt=me.get(M.triggerName);xt.value=Le,me.set(M.triggerName,xt)}}D.destroy();return}}let we=!S||!this.driver.containsElement(S,ne),de=Z.get(ne),je=w.get(ne),K=this._buildInstruction(M,a,je,de,we);if(K.errors&&K.errors.length){le.push(K);return}if(we){D.onStart(()=>ze(ne,K.fromStyles)),D.onDestroy(()=>ye(ne,K.toStyles)),s.push(D);return}if(M.isFallbackTransition){D.onStart(()=>ze(ne,K.fromStyles)),D.onDestroy(()=>ye(ne,K.toStyles)),s.push(D);return}let zn=[];K.timelines.forEach(ie=>{ie.stretchStartingKeyframe=!0,this.disabledNodes.has(ie.element)||zn.push(ie)}),K.timelines=zn,a.append(ne,K.timelines);let da={instruction:K,player:D,element:ne};d.push(da),K.queriedElements.forEach(ie=>oe(m,ie,[]).push(D)),K.preStyleProps.forEach((ie,Le)=>{if(ie.size){let me=h.get(Le);me||h.set(Le,me=new Set),ie.forEach((xt,Yt)=>me.add(Yt))}}),K.postStyleProps.forEach((ie,Le)=>{let me=u.get(Le);me||u.set(Le,me=new Set),ie.forEach((xt,Yt)=>me.add(Yt))})});if(le.length){let v=[];le.forEach(T=>{v.push(Qi(T.triggerName,T.errors))}),Ie.forEach(T=>T.destroy()),this.reportError(v)}let te=new Map,re=new Map;d.forEach(v=>{let T=v.element;a.has(T)&&(re.set(T,T),this._beforeAnimationBuild(v.player.namespaceId,v.instruction,te))}),s.forEach(v=>{let T=v.element;this._getPreviousPlayers(T,!1,v.namespaceId,v.triggerName,null).forEach(D=>{oe(te,T,[]).push(D),D.destroy()})});let Fe=F.filter(v=>mr(v,h,u)),Ke=new Map;dr(Ke,this.driver,V,u,ue).forEach(v=>{mr(v,h,u)&&Fe.push(v)});let qe=new Map;C.forEach((v,T)=>{dr(qe,this.driver,new Set(v),h,tt)}),Fe.forEach(v=>{let T=Ke.get(v),M=qe.get(v);Ke.set(v,new Map([...T?.entries()??[],...M?.entries()??[]]))});let Vt=[],Rn=[],Dn={};d.forEach(v=>{let{element:T,player:M,instruction:D}=v;if(a.has(T)){if(b.has(T)){M.onDestroy(()=>ye(T,D.toStyles)),M.disabled=!0,M.overrideTotalTime(D.totalTime),s.push(M);return}let ne=Dn;if(re.size>1){let de=T,je=[];for(;de=de.parentNode;){let K=re.get(de);if(K){ne=K;break}je.push(de)}je.forEach(K=>re.set(K,ne))}let we=this._buildAnimation(M.namespaceId,D,te,l,qe,Ke);if(M.setRealPlayer(we),ne===Dn)Vt.push(M);else{let de=this.playersByElement.get(ne);de&&de.length&&(M.parentPlayer=Ne(de)),s.push(M)}}else ze(T,D.fromStyles),M.onDestroy(()=>ye(T,D.toStyles)),Rn.push(M),b.has(T)&&s.push(M)}),Rn.forEach(v=>{let T=l.get(v.element);if(T&&T.length){let M=Ne(T);v.setRealPlayer(M)}}),s.forEach(v=>{v.parentPlayer?v.syncPlayerEvents(v.parentPlayer):v.destroy()});for(let v=0;v<F.length;v++){let T=F[v],M=T[ve];if(rt(T,Mt),M&&M.hasAnimation)continue;let D=[];if(m.size){let we=m.get(T);we&&we.length&&D.push(...we);let de=this.driver.query(T,At,!0);for(let je=0;je<de.length;je++){let K=m.get(de[je]);K&&K.length&&D.push(...K)}}let ne=D.filter(we=>!we.destroyed);ne.length?Za(this,T,ne):this.processLeaveNode(T)}return F.length=0,Vt.forEach(v=>{this.players.push(v),v.onDone(()=>{v.destroy();let T=this.players.indexOf(v);this.players.splice(T,1)}),v.play()}),Vt}afterFlush(r){this._flushFns.push(r)}afterFlushAnimationsDone(r){this._whenQuietFns.push(r)}_getPreviousPlayers(r,i,a,s,l){let d=[];if(i){let m=this.playersByQueriedElement.get(r);m&&(d=m)}else{let m=this.playersByElement.get(r);if(m){let h=!l||l==pt;m.forEach(u=>{u.queued||!h&&u.triggerName!=s||d.push(u)})}}return(a||s)&&(d=d.filter(m=>!(a&&a!=m.namespaceId||s&&s!=m.triggerName))),d}_beforeAnimationBuild(r,i,a){let s=i.triggerName,l=i.element,d=i.isRemovalTransition?void 0:r,m=i.isRemovalTransition?void 0:s;for(let h of i.timelines){let u=h.element,b=u!==l,S=oe(a,u,[]);this._getPreviousPlayers(u,b,d,m,i.toState).forEach(C=>{let w=C.getRealPlayer();w.beforeDestroy&&w.beforeDestroy(),C.destroy(),S.push(C)})}ze(l,i.fromStyles)}_buildAnimation(r,i,a,s,l,d){let m=i.triggerName,h=i.element,u=[],b=new Set,S=new Set,k=i.timelines.map(w=>{let P=w.element;b.add(P);let F=P[ve];if(F&&F.removedBeforeQueried)return new Me(w.duration,w.delay);let J=P!==h,V=eo((a.get(P)||Ya).map(te=>te.getRealPlayer())).filter(te=>{let re=te;return re.element?re.element===P:!1}),Z=l.get(P),$=d.get(P),Ie=rn(this._normalizer,w.keyframes,Z,$),le=this._buildPlayer(w,Ie,V);if(w.subTimeline&&s&&S.add(P),J){let te=new ft(r,m,P);te.setRealPlayer(le),u.push(te)}return le});u.forEach(w=>{oe(this.playersByQueriedElement,w.element,[]).push(w),w.onDone(()=>Qa(this.playersByQueriedElement,w.element,w))}),b.forEach(w=>fe(w,cn));let C=Ne(k);return C.onDestroy(()=>{b.forEach(w=>rt(w,cn)),ye(h,i.toStyles)}),S.forEach(w=>{oe(s,w,[]).push(C)}),C}_buildPlayer(r,i,a){return i.length>0?this.driver.animate(r.element,i,r.duration,r.delay,r.easing,a):new Me(r.duration,r.delay)}};var ft=class{namespaceId;triggerName;element;_player=new Me;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(r,i,a){this.namespaceId=r,this.triggerName=i,this.element=a}setRealPlayer(r){this._containsRealPlayer||(this._player=r,this._queuedCallbacks.forEach((i,a)=>{i.forEach(s=>kt(r,a,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(r.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(r){this.totalTime=r}syncPlayerEvents(r){let i=this._player;i.triggerCallback&&r.onStart(()=>i.triggerCallback(`start`)),r.onDone(()=>this.finish()),r.onDestroy(()=>this.destroy())}_queueEvent(r,i){oe(this._queuedCallbacks,r,[]).push(i)}onDone(r){this.queued&&this._queueEvent(`done`,r),this._player.onDone(r)}onStart(r){this.queued&&this._queueEvent(`start`,r),this._player.onStart(r)}onDestroy(r){this.queued&&this._queueEvent(`destroy`,r),this._player.onDestroy(r)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(r){this.queued||this._player.setPosition(r)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(r){let i=this._player;i.triggerCallback&&i.triggerCallback(r)}};function Qa(o,r,i){let a=o.get(r);if(a){if(a.length){let s=a.indexOf(i);a.splice(s,1)}a.length==0&&o.delete(r)}return a}function $a(o){return o??null}function Rt(o){return o&&o.nodeType===1}function Xa(o){return o==`start`||o==`done`}function lr(o,r){let i=o.style.display;return o.style.display=r??`none`,i}function dr(o,r,i,a,s){let l=[];
vendor: 5,280 bytes, line 42
42i.forEach(h=>l.push(lr(h)));let d=[];a.forEach((h,u)=>{let b=new Map;h.forEach(S=>{let k=r.computeStyle(u,S,s);b.set(S,k),(!k||k.length==0)&&(u[ve]=Ka,d.push(u))}),o.set(u,b)});let m=0;return i.forEach(h=>lr(h,l[m++])),d}function cr(o,r){let i=new Map;if(o.forEach(m=>i.set(m,[])),r.length==0)return i;let a=1,s=new Set(r),l=new Map;function d(m){if(!m)return a;let h=l.get(m);if(h)return h;let u=m.parentNode;return i.has(u)?h=u:s.has(u)?h=a:h=d(u),l.set(m,h),h}return r.forEach(m=>{let h=d(m);h!==a&&i.get(h).push(m)}),i}function fe(o,r){o.classList?.add(r)}function rt(o,r){o.classList?.remove(r)}function Za(o,r,i){Ne(i).onDone(()=>o.processLeaveNode(r))}function eo(o){let r=[];return gr(o,r),r}function gr(o,r){for(let i=0;i<o.length;i++){let a=o[i];a instanceof Ge?gr(a.players,r):r.push(a)}}function to(o,r){let i=Object.keys(o),a=Object.keys(r);if(i.length!=a.length)return!1;for(let s=0;s<i.length;s++){let l=i[s];if(!Object.hasOwn(r,l)||o[l]!==r[l])return!1}return!0}function mr(o,r,i){let a=i.get(o);if(!a)return!1;let s=r.get(o);return s?a.forEach(l=>s.add(l)):r.set(o,a),i.delete(o),!0}var at=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(r,i)=>{};constructor(r,i,a){this._driver=i,this._normalizer=a,this._transitionEngine=new kn(r.body,i,a),this._timelineEngine=new _n(r.body,i,a),this._transitionEngine.onRemovalComplete=(s,l)=>this.onRemovalComplete(s,l)}registerTrigger(r,i,a,s,l){let d=r+`-`+s,m=this._triggerCache[d];if(!m){let h=[],b=hr(this._driver,l,h,[]);if(h.length)throw Li(s,h);m=Ba(s,b,this._normalizer),this._triggerCache[d]=m}this._transitionEngine.registerTrigger(i,s,m)}register(r,i){this._transitionEngine.register(r,i)}destroy(r,i){this._transitionEngine.destroy(r,i)}onInsert(r,i,a,s){this._transitionEngine.insertNode(r,i,a,s)}onRemove(r,i,a){this._transitionEngine.removeNode(r,i,a)}disableAnimations(r,i){this._transitionEngine.markElementAsDisabled(r,i)}process(r,i,a,s){if(a.charAt(0)==`@`){let[l,d]=an(a),m=s;this._timelineEngine.command(l,i,d,m)}else this._transitionEngine.trigger(r,i,a,s)}listen(r,i,a,s,l){if(a.charAt(0)==`@`){let[d,m]=an(a);return this._timelineEngine.listen(d,i,m,l)}return this._transitionEngine.listen(r,i,a,s,l)}flush(r=-1){this._transitionEngine.flush(r)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(r){this._transitionEngine.afterFlushAnimationsDone(r)}};function no(o,r){let i=null,a=null;return Array.isArray(r)&&r.length?(i=xn(r[0]),r.length>1&&(a=xn(r[r.length-1]))):r instanceof Map&&(i=xn(r)),i||a?new io(o,i,a):null}var io=(()=>{class o{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(i,a,s){this._element=i,this._startStyles=a,this._endStyles=s;let l=o.initialStylesByElement.get(i);l||o.initialStylesByElement.set(i,l=new Map),this._initialStyles=l}start(){this._state<1&&(this._startStyles&&ye(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ye(this._element,this._initialStyles),this._endStyles&&(ye(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(o.initialStylesByElement.delete(this._element),this._startStyles&&(ze(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ze(this._element,this._endStyles),this._endStyles=null),ye(this._element,this._initialStyles),this._state=3)}}return o})();function xn(o){let r=null;return o.forEach((i,a)=>{ro(a)&&(r=r||new Map,r.set(a,i))}),r}function ro(o){return o===`display`||o===`position`}var Ht=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(r,i,a,s){this.element=r,this.keyframes=i,this.options=a,this._specialStyles=s,this._duration=a.duration,this._delay=a.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let r=this.keyframes,i=this._triggerWebAnimation(this.element,r,this.options);if(!i)return this._onFinish(),null;this.domPlayer=i,this._finalKeyframe=r.length?r[r.length-1]:new Map;let a=()=>this._onFinish();return i.addEventListener(`finish`,a),this.onDestroy(()=>{i.removeEventListener(`finish`,a)}),i}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(r){let i=[];return r.forEach(a=>{i.push(Object.fromEntries(a))}),i}_triggerWebAnimation(r,i,a){let s=this._convertKeyframesToObject(i);try{return r.animate(s,a)}catch(l){return null}}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}play(){let r=this._buildPlayer();r&&(this.hasStarted()||(this._onStartFns.forEach(i=>
vendor: 5,238 bytes, line 42
42i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),r.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}setPosition(r){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=r*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let r=new Map;this.hasStarted()&&this._finalKeyframe.forEach((a,s)=>{s!==`offset`&&r.set(s,this._finished?a:Nt(this.element,s))}),this.currentSnapshot=r}triggerCallback(r){let i=r===`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var Jt=class{validateStyleProperty(r){return!0}validateAnimatableStyleProperty(r){return!0}containsElement(r,i){return on(r,i)}getParentElement(r){return Tt(r)}query(r,i,a){return sn(r,i,a)}computeStyle(r,i,a){return Nt(r,i)}animate(r,i,a,s,l,d=[]){let h={duration:a,delay:s,fill:s==0?`both`:`forwards`};l&&(h.easing=l);let u=new Map,b=d.filter(C=>C instanceof Ht);er(a,s)&&b.forEach(C=>{C.currentSnapshot.forEach((w,P)=>u.set(P,w))});let S=Xi(i).map(C=>new Map(C));S=tr(r,S,u);let k=no(r,S);return new Ht(r,S,h,k)}};var Dt=`@`;var br=`@.disabled`;var Gt=class{namespaceId;delegate;engine;_onDestroy;ɵtype=0;constructor(r,i,a,s){this.namespaceId=r,this.delegate=i,this.engine=a,this._onDestroy=s}get data(){return this.delegate.data}destroyNode(r){this.delegate.destroyNode?.(r)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(r,i){return this.delegate.createElement(r,i)}createComment(r){return this.delegate.createComment(r)}createText(r){return this.delegate.createText(r)}appendChild(r,i){this.delegate.appendChild(r,i),this.engine.onInsert(this.namespaceId,i,r,!1)}insertBefore(r,i,a,s=!0){this.delegate.insertBefore(r,i,a),this.engine.onInsert(this.namespaceId,i,r,s)}removeChild(r,i,a,s){if(s){this.delegate.removeChild(r,i,a,s);return}this.parentNode(i)&&this.engine.onRemove(this.namespaceId,i,this.delegate)}selectRootElement(r,i){return this.delegate.selectRootElement(r,i)}parentNode(r){return this.delegate.parentNode(r)}nextSibling(r){return this.delegate.nextSibling(r)}setAttribute(r,i,a,s){this.delegate.setAttribute(r,i,a,s)}removeAttribute(r,i,a){this.delegate.removeAttribute(r,i,a)}addClass(r,i){this.delegate.addClass(r,i)}removeClass(r,i){this.delegate.removeClass(r,i)}setStyle(r,i,a,s){this.delegate.setStyle(r,i,a,s)}removeStyle(r,i,a){this.delegate.removeStyle(r,i,a)}setProperty(r,i,a){i.charAt(0)==Dt&&i==br?this.disableAnimations(r,!!a):this.delegate.setProperty(r,i,a)}setValue(r,i){this.delegate.setValue(r,i)}listen(r,i,a,s){return this.delegate.listen(r,i,a,s)}disableAnimations(r,i){this.engine.disableAnimations(r,i)}};var Pn=class extends Gt{factory;constructor(r,i,a,s,l){super(i,a,s,l),this.factory=r,this.namespaceId=i}setProperty(r,i,a){i.charAt(0)==Dt?i.charAt(1)==`.`&&i==br?(a=a===void 0?!0:!!a,this.disableAnimations(r,a)):this.engine.process(this.namespaceId,r,i.slice(1),a):this.delegate.setProperty(r,i,a)}listen(r,i,a,s){if(i.charAt(0)==Dt){let l=ao(r),d=i.slice(1),m=``;return d.charAt(0)!=Dt&&([d,m]=oo(d)),this.engine.listen(this.namespaceId,l,d,m,h=>{let u=h._data||-1;this.factory.scheduleListenerCallback(u,a,h)})}return this.delegate.listen(r,i,a,s)}};function ao(o){switch(o){case`body`:return document.body;case`document`:return document;case`window`:return window;default:return o}}function oo(o){let r=o.indexOf(`.`);return[o.substring(0,r),o.slice(r+1)]}var Ut=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(r,i,a){this.delegate=r,this.engine=i,this._zone=a,i.onRemovalComplete=(s,l)=>{l?.removeChild(null,s)}}createRenderer(r,i){let s=this.delegate.createRenderer(r,i);if(!r||!i?.data?.animation){let u=this._rendererCache,b=u.get(s);if(!b){let S=()=>u.delete(s);b=new Gt(``,s,this.engine,S),u.set(s,b)}return b}let l=i.id,d=i.id+`-`+this._currentId;this._currentId++,this.engine.register(d,r);let m=u=>{Array.isArray(u)?u.forEach(m):this.engine.registerTrigger(l,d,r,u.name,u)};return i.data.animation.forEach(m),new Pn(this,d,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(r,i,a){if(r>=0&&r<this._microtaskId){this._zone.run(()=>i(a));return}let s=this._animationCallbacksBuffer;s.length==0&&queueMicrotask(()=>{this._zone.run(()=>
42{s.forEach(l=>{let[d,m]=l;d(m)}),this._animationCallbacksBuffer=[]})}),s.push([i,a])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(r){this.engine.flush(),this.delegate.componentReplaced?.(r)}};var lo=(()=>{class o extends at{constructor(i,a,s){super(i,a,s)}ngOnDestroy(){this.flush()}static ɵfac=function(a){return new(a||o)(w(Y),w(Ve),w(Ye))};static ɵprov=S({token:o,factory:o.ɵfac})}return o})();function co(){return new zt}function mo(){return new Ut(p(Vf),p(at),p(z$1))}var Sr=[{provide:Ye,useFactory:co},{provide:at,useClass:lo},{provide:ir$1,useFactory:mo}];[...Sr];var po=[{provide:Ve,useFactory:()=>new Jt},{provide:VI,useFactory:()=>`BrowserAnimations`},...Sr];function Er(){return mt$1(`NgEagerAnimations`),[...po]}var yr=`Documentation`;var vr=` | NestJS - A progressive Node.js framework`;var An=`https://docs.nestjs.com`;var _r=(()=>{class o{titleService;metaService;router;activatedRoute;document;robotsElement;constructor(i,a,s,l,d){this.titleService=i,this.metaService=a,this.router=s,this.activatedRoute=l,this.document=d}ngOnInit(){return V(this,null,function*(){this.router.events.pipe(He(i=>i instanceof Ze)).subscribe(i=>{this.updateTitle(),this.updateMeta(i),this.updateCanonical(i)})})}updateTitle(){let i=this.activatedRoute.snapshot.firstChild;if(!i)return;let a=i.firstChild;a=a.firstChild?a.firstChild:a;let{data:{title:s}}=a,d=(s||yr)+vr;this.titleService.setTitle(d),this.metaService.updateTag({property:`og:title`,content:d}),this.metaService.updateTag({name:`twitter:title`,content:d})}updateCanonical(i){let a=i.urlAfterRedirects.split(/[?#]/)[0],s=a===`/`?An:`${An}${a}`;this.document.head.querySelector(`link[rel="canonical"]`)?.setAttribute(`href`,s),this.metaService.updateTag({property:`og:url`,content:s})}updateMeta(i){if(!(i&&i.url))return;i.url.includes(`crud-utilities`)&&!this.robotsElement?this.robotsElement=this.metaService.addTag({name:`robots`,content:`noindex`}):this.robotsElement&&(this.metaService.removeTagElement(this.robotsElement),this.robotsElement=void 0)}static ɵfac=function(a){return new(a||o)(Ce(uD),Ce(fz),Ce(wt$1),Ce(ln$1),Ce(Y))};static ɵcmp=ef({type:o,selectors:[[`app-root`]],decls:1,vars:0,template:function(a,s){a&1&&Za$1(0,`router-outlet`)},dependencies:[hh],encapsulation:2})}return o})();function Cr({url:o}){return o.length>0&&/^v\d+$/.test(o[0].path)?`/`+o.slice(1).map(r=>r.path).join(`/`):`/`}var kr=(()=>{class o{set(i,a){localStorage.setItem(i,JSON.stringify(a))}get(i){let a=localStorage.getItem(i);return a?JSON.parse(a):null}remove(i){this.get(i)&&localStorage.removeItem(i)}static ɵfac=function(a){return new(a||o)};static ɵprov=S({token:o,factory:o.ɵfac,providedIn:`root`})}return o})();function uo(o,r){if(o&1){let i=US();uf(0,`span`,2),Ly(`click`,function(){Up(i);let s=GS();return Bp(s.toggleTheme())}),DT(1,` light_mode `),lf()}}function fo(o,r){if(o&1){let i=US();uf(0,`span`,2),Ly(`click`,function(){Up(i);let s=GS();return Bp(s.toggleTheme())}),DT(1,` dark_mode `),lf()}}var Pr=(()=>{class o{document;storageService;changeDetector;theme;themeChangeCount=0;constructor(i,a,s){this.document=i,this.storageService=a,this.changeDetector=s}ngOnInit(){this.setTheme(this.getStoredTheme()??`dark`)}toggleTheme(i=!1){let a=this.theme===`dark`?`light`:`dark`;i||this.storageService.set(`theme`,a),this.setTheme(a)}getStoredTheme(){return this.storageService.get(`theme`)}setTheme(i){this.theme=i;let a=this.document.documentElement,s=++this.themeChangeCount;a.setAttribute(`data-suppress-transition`,``),a.setAttribute(`mode`,i);let l=()=>{this.themeChangeCount===s&&a.removeAttribute(`data-suppress-transition`)},d=this.document.defaultView;d?(d.requestAnimationFrame(()=>{d.requestAnimationFrame(l)}),setTimeout(l,100)):l(),this.changeDetector.detectChanges()}static ɵfac=function(a){return new(a||o)(Ce(Y),Ce(kr),Ce(no$1))};static ɵcmp=ef({type:o,selectors:[[`app-theme-mode-toggle`]],decls:3,vars:2,consts:[[1,`theme-mode-toggle`],[1,`material-icons`],[1,`material-icons`,3,`click`]],template:function(a,s){a&1&&(uf(0,`button`,0),NS(1,uo,2,0,`span`,1),NS(2,fo,2,0,`span`,1),lf()),a&2&&(UC(),AS(s.theme===`dark`?1:-1),UC(),AS(s.theme===`light`?2:-1))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], [_nghost-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;float:right;padding-right:40px}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding-right:20px}}@media only screen and (max-width:480px){[_nghost-%COMP%]{position:absolute;right:20px;padding-right:0}}.theme-mode-toggle[_ngcontent-%COMP%]{border:none;width:auto;overflow:visible;background:transparent;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;margin:0 0 0 15px;color:var(--%NS%header-color);padding:0 0 0 15px;position:relative}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%]{padding:0;margin:0}}.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:20px;cursor:pointer;background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{background:var(--%NS%header-color)}}.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]:before{content:"";position:absolute;background:var(--%NS%header-color);opacity:.2;left:0;top:2px;bottom:2px;width:2px}.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]:hover{background:var(--%NS%header-color)}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]:hover{background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:24px}.theme-mode-toggle[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]:before{display:none}}`],changeDetection:1})}return o})();var Tr=(()=>{class o{static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-social-wrapper`]],decls:11,vars:0,consts:[[1,`social-wrapper`],[`href`,`https://twitter.com/nestframework`,`title`,`Twitter account`,`target`,`_blank`],[1,`fa-brands`,`fa-x-twitter`],[`href`,`https://github.com/nestjs/nest`,`title`,`Github repository`,`target`,`_blank`],[1,`fa-brands`,`fa-github`],[`href`,`https://stackoverflow.com/questions/tagged/nestjs`,`title`,`Stackoverflow`,`target`,`_blank`],[1,`fa-brands`,`fa-stack-overflow`],[`href`,`https://nestjs.com`,`title`,`NestJS - A node.js framework built on top of TypeScript`,`target`,`_blank`],[1,`fa`,`fa-globe`],[`href`,`https://discord.gg/G7Qnnhy`,`title`,`Discord`,`target`,`_blank`,`rel`,`nofollow`],[1,`fa-brands`,`fa-discord`]],template:function(a,s){a&1&&(uf(0,`div`,0)(1,`a`,1),xy(2,`i`,2),lf(),uf(3,`a`,3),xy(4,`i`,4),lf(),uf(5,`a`,5),xy(6,`i`,6),lf(),uf(7,`a`,7),xy(8,`i`,8),lf(),uf(9,`a`,9),xy(10,`i`,10),lf()())},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], .social-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:480px){[_nghost-%COMP%]{position:absolute;top:50%;right:20px;transform:translateY(-50%)}}.social-wrapper[_ngcontent-%COMP%]{float:right;position:relative;display:flex}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline-flex;vertical-align:middle;color:var(--%NS%header-color);font-size:18px;margin-left:15px;cursor:pointer}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .discord-icon[_ngcontent-%COMP%]{fill:var(--%NS%header-color);position:relative}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .discord-icon[_ngcontent-%COMP%]:hover{fill:var(--%NS%primary)}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:first-of-type{font-size:20px}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}@media only screen and (max-width:480px){.social-wrapper[_ngcontent-%COMP%]{top:0;transform:none}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:none}}@media print{.social-wrapper[_ngcontent-%COMP%]{display:none}}`],changeDetection:1})}return o})();var Wt=(()=>{class o{static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-new-badge`]],decls:3,vars:0,consts:[[`aria-hidden`,`true`,1,`ring`],[`aria-hidden`,`true`,1,`shimmer`]],template:function(a,s){a&1&&(xy(0,`span`,0)(1,`span`,1),DT(2,`NEW
43`))},styles:[`[_nghost-%COMP%]{position:relative;isolation:isolate;display:inline-block;vertical-align:middle;padding:2px 6px;border-radius:5px;background:var(--%NS%primary-gradient);color:#fff;-webkit-text-fill-color:#fff;font-size:10.5px;font-weight:700;letter-spacing:.04em;line-height:1.35}[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;box-shadow:0 0 9px 1px #ea28458c;opacity:0;pointer-events:none;animation:_ngcontent-%COMP%_glow 4.5s ease-out 3}.ring[_ngcontent-%COMP%], .shimmer[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:-1;border-radius:inherit;overflow:hidden;pointer-events:none}.ring[_ngcontent-%COMP%]{padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude}.ring[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:50%;width:200%;aspect-ratio:1;background:conic-gradient(#fff0,#fffffff2 45deg,#fff0 130deg 360deg);transform:translate(-50%,-50%);animation:_ngcontent-%COMP%_spin 4.5s linear 3}.shimmer[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);transform:translate(-160%) skew(-20deg);animation:_ngcontent-%COMP%_shimmer 4.5s ease-in-out 3}@keyframes _ngcontent-%COMP%_glow{0%,to{opacity:0}16%{opacity:1}}@keyframes _ngcontent-%COMP%_spin{to{transform:translate(-50%,-50%) rotate(360deg)}}@keyframes _ngcontent-%COMP%_shimmer{0%{transform:translate(-160%) skew(-20deg)}32%,to{transform:translate(320%) skew(-20deg)}}@media(prefers-reduced-motion:reduce){[_nghost-%COMP%]:before, .ring[_ngcontent-%COMP%]:before, .shimmer[_ngcontent-%COMP%]:before{animation:none}.shimmer[_ngcontent-%COMP%]{display:none}}`]})}return o})();var xo=[`*`];var Mr=(()=>{class o{toggle=new be;isSidebarOpened=!0;static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-header`]],inputs:{isSidebarOpened:`isSidebarOpened`},outputs:{toggle:`toggle`},ngContentSelectors:xo,decls:32,vars:2,consts:[[1,`icon-wrapper`,3,`click`],[1,`nav-icon`],[1,`mobile-nav-icon`],[`height`,`512pt`,`viewBox`,`0 -27 512 512`,`width`,`512pt`,`xmlns`,`http://www.w3.org/2000/svg`,1,`desktop-nav-icon`],[`d`,`m213.117188 81.011719c6.273437-5.488281 6.910156-15.027344 1.421874-21.300781-5.492187-6.273438-15.027343-6.910157-21.300781-1.421876l-2.597656 2.273438c-6.273437 5.488281-6.910156 15.027344-1.421875 21.300781 2.984375 3.410157 7.164062 5.15625 11.367188 5.
4315625 3.527343 0 7.070312-1.230469 9.933593-3.734375zm0 0`],[`d`,`m117.898438 120.203125-2.597657 2.273437c-6.273437 5.492188-6.910156 15.027344-1.421875 21.300782 2.984375 3.414062 7.164063 5.15625 11.367188 5.15625 3.527344 0 7.070312-1.226563 9.933594-3.730469l2.597656-2.273437c6.273437-5.492188 6.910156-15.027344 1.421875-21.300782-5.488281-6.277344-15.027344-6.914062-21.300781-1.425781zm0 0`],[`d`,`m216.179688 121.503906-2.597657 2.273438c-6.269531 5.492187-6.90625 15.027344-1.417969 21.300781 2.984376 3.414063 7.164063 5.15625 11.367188 5.15625 3.527344 0 7.070312-1.230469 9.933594-3.738281l2.597656-2.273438c6.273438-5.488281 6.910156-15.027344 1.417969-21.300781-5.488281-6.273437-15.023438-6.90625-21.300781-1.417969zm0 0`],[`d`,`m315.523438 70.039062.253906-3.441406c.609375-8.316406-5.636719-15.550781-13.949219-16.160156s-15.550781 5.636719-16.160156 13.949219l-.253907 3.441406c-.609374 8.316406 5.636719 15.550781 13.949219 16.160156.375.027344.75.042969 1.121094.042969 7.835937 0 14.457031-6.054688 15.039063-13.992188zm0 0`],[`d`,`m403.570312 96.273438c-5.109374-6.589844-14.589843-7.789063-21.179687-2.683594-6.589844 5.109375-7.789063 14.589844-2.683594 21.179687l2.117188 2.730469c2.976562 3.835938 7.433593 5.847656 11.941406 5.847656 3.230469 0 6.484375-1.035156 9.238281-3.167968 6.585938-5.105469 7.789063-14.589844 2.679688-21.179688zm0 0`],[`d`,`m325.449219 118.675781c-8.308594-.628906-15.550781 5.632813-16.164063 13.945313l-.253906 3.441406c-.613281 8.316406 5.632812 15.550781 13.945312 16.164062.378907.027344.753907.042969 1.125.042969 7.832032 0 14.453126-6.050781 15.039063-13.988281l.253906-3.441406c.613281-8.316406-5.632812-15.550782-13.945312-16.164063zm0 0`],[`d`,`m479.355469 183.492188v-22.644532c0-88.691406-72.15625-160.847656-160.847657-160.847656h-116.597656c-88.691406 0-160.847656 72.15625-160.847656 160.847656v19.882813c-23.519531 5.632812-41.0625 26.820312-41.0625 52.039062v3.253907c0 25.21875 17.542969 46.40625 41.0625 52.039062v26.367188c0 3.339843.507812 6.597656 1.441406 9.6875v2.667968c0 72.097656 58.652344 130.75 130.75 130.75h175.351563c72.097656 0 130.75-58.652344 130.75-130.75v-41.484375c19.167969-8.152343 32.644531-27.171875 32.644531-49.277343v-3.253907c0-22.109375-13.476562-41.125-32.644531-49.277343zm-408.101563-22.644532c0-72.046875 58.609375-130.65625 130.65625-130.65625h116.597656c72.046876 0 130.65625 58.609375 130.65625 130.65625v18.402344h-377.910156zm377.910156 165.9375c0 4.710938-3.179687 7-4.546874 7.765625-1.378907.769531-5.023438 2.296875-9.082032-.191406-1.34375-.824219-2.664062-1.664063-3.980468-2.503906-10.746094-6.835938-24.117188-15.347657-48.917969-15.347657-24.804688 0-38.175781 8.507813-48.917969 15.347657-9.328125 5.9375-16.699219 10.628906-32.707031 10.628906-16.007813 0-23.375-4.6875-32.703125-10.628906-10.746094-6.835938-24.113282-15.347657-48.917969-15.347657-24.800781 0-38.171875 8.511719-48.914063 15.347657-9.328124 5.9375-16.695312 10.628906-32.703124 10.628906-16.003907 0-23.375-4.6875-32.699219-10.628906-7.894531-5.023438-16.839844-10.714844-30.464844-13.5625-1.425781-.296875-2.53125-1.210938-3.042969-2.394531-.03125-.078126-.058594-.160157-.09375-.238282-.136718-.390625-.21875-.800781-.21875-1.230468v-24.886719h377.910156zm-100.558593 100.558594h-175.355469c-47.492188 0-87.398438-33.097656-97.871094-77.4375 4.75 1.863281 8.773438 4.421875 13.480469 7.417969 10.742187 6.839843 24.113281 15.351562 48.914063 15.351562 24.800781 0 38.171874-8.511719 48.914062-15.351562 9.328125-5.9375 16.695312-10.628907 32.703125-10.628907s23.375 4.691407 32.703125 10.628907c10.746094 6.839843 24.113281 15.351562 48.917969 15.351562 24.800781 0 38.171875-8.511719 48.917969-15.351562 9.328124-5.9375 16.695312-10.628907 32.703124-10.628907 16.007813 0 23.378907 4.691407 32.707032 10.628907 1.460937.929687 2.917968 1.859375 4.40625 2.769531 6.667968 4.089844 14.089844 6.027344 21.488281 5.828125-15.292969 36.0625-51.054687 61.421875-92.628906 61.421875zm133.203125-191.320312c0 12.863281-10.464844 23.328124-23.328125 23.328124h-404.960938c-12.863281 0-23.328125-10.464843-23.328125-23.328124v-3.253907c0-12.863281 10.464844-23.328125 23.328125-23.328125h404.960938c12.863281 0 23.328125 10.464844 23.328125 23.328125zm0 0`],[1,`menu-wrapper`],[`id`,`search`,1,`search-wrapper`],[`href`,`https://courses.nestjs.com`,`target`,`_blank`,`title`,`Courses | NestJS - A node.js framework built on top of TypeScript`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A node.js framework built on top of TypeScript`],[`href`,`https://observe.nestjs.com`,`target`,`_blank`,`title`,`Observe | NestJS - A node.js framework built on top of TypeScript`],[`href`,`https://mau.nestjs.com`,`target`,`_blank`,`title`,`Deploy Nest | NestJS - A node.js framework built on top of TypeScript`]],template:function(a,s){a&1&&(WS(),Oa$1(0,`header`)(1,`button`,0),Ya$1(`click`,function(){return s.toggle.emit()}),Oa$1(2,`div`,1)(3,`div`,2),Za$1(4,`span`),cf(),Kp(),Oa$1(5,`svg`,3),Za$1(6,`path`,4)(7,`path`,5)(8,`path`,6)(9,`path`,7)(10,`path`,8)(11,`path`,9)(12,`path`,10),cf()()(),ZS(13),Xp(),Za$1(14,`app-theme-mode-toggle`)(15,`app-social-wrapper`),Oa$1(16,`div`,11),Za$1(17,`div`,12),Oa$1(18,`ul`)(19,`li`)(20,`a`,13),DT(21,`Courses`),cf()(),Oa$1(22,`li`)(23,`a`,14),DT(24,`Enterprise`),cf()(),Oa$1(25,`li`)(26,`a`,15),Za$1(27,`app-new-badge`),DT(28,` Observe`),cf()(),Oa$1(29,`li`)(30,`a`,16),DT(31,`Deploy with Mau `),cf()()()()()),a&2&&(UC(),By(`opened`,s.isSidebarOpened))},dependencies:[Pr,Tr,Wt],styles:[`.transition[_ngcontent-%COMP%], .icon-wrapper[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .menu-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%], .icon-wrapper[_ngcontent-%COMP%]   .nav-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
43left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], .menu-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{background:var(--%NS%header-glow),var(--%NS%header-background);-webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-sizing:border-box;overflow:hidden;display:block;height:70px;position:fixed;top:12px;left:var(--%NS%shell-offset, 12px);right:var(--%NS%shell-offset, 12px);width:auto;z-index:10000}@media print{[_nghost-%COMP%]{position:relative;top:0;left:0;right:0}}.top-bar[_ngcontent-%COMP%]{background:#0a0a0a;text-align:center;height:35px;padding:4px;letter-spacing:.2px;box-sizing:border-box}.top-bar[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin:0}.top-bar[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff;font-weight:600;font-size:18px}@media only screen and (max-width:480px){.top-bar[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:15px}}app-new-badge[_ngcontent-%COMP%]{margin-right:2px}header[_ngcontent-%COMP%]{display:block;position:relative;background:transparent;width:100%;height:100%;z-index:10000}.icon-wrapper[_ngcontent-%COMP%]{height:100%;width:80px;top:0;bottom:0;display:inline-block;position:relative;z-index:10000;border:none;background:transparent;background-color:var(--%NS%hover-surface-0)}.icon-wrapper[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:var(--%NS%hover-surface)}.icon-wrapper.opened[_ngcontent-%COMP%]{width:280px}@media only screen and (max-width:1200px){.icon-wrapper.opened[_ngcontent-%COMP%]{width:280px}}@media only screen and (max-width:991px){.icon-wrapper.opened[_ngcontent-%COMP%]{width:80px}}.icon-wrapper[_ngcontent-%COMP%]   .nav-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:30px;height:30px;
43fill:var(--%NS%header-color)}@media only screen and (max-width:767px){.icon-wrapper[_ngcontent-%COMP%]{background:transparent}}@media(min-width:1201px){.icon-wrapper[_ngcontent-%COMP%]{display:none}}@media print{.icon-wrapper[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]     .logo-wrapper{display:inline-block;height:100%;text-align:center;vertical-align:top;padding-left:30px}@media only screen and (max-width:1200px){[_nghost-%COMP%]     .logo-wrapper{padding-left:15px}}@media only screen and (max-width:767px){[_nghost-%COMP%]     .logo-wrapper{padding-left:10px}}[_nghost-%COMP%]     .logo-wrapper a{display:inline-block;padding-top:9px}@media print{[_nghost-%COMP%]     .logo-wrapper{left:50%;position:relative;transform:translate(-50%);padding:0}}.menu-wrapper[_ngcontent-%COMP%]{position:relative;float:right;padding:14px 25px}@media(min-width:1500px){.menu-wrapper[_ngcontent-%COMP%]{margin-right:0}}@media(max-width:1499px){.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:first-of-type{display:none}.menu-wrapper[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{margin-right:0}}@media(max-width:1350px){.menu-wrapper[_ngcontent-%COMP%]{padding:14px 5px}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:nth-of-type(3){display:none}}@media(max-width:1150px){.menu-wrapper[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:none!important}}@media(max-width:600px){.menu-wrapper[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width:1200px){.menu-wrapper[_ngcontent-%COMP%]{margin-right:0;padding:14px 5px}}@media only screen and (max-width:991px){.menu-wrapper[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:none!important}}@media only screen and (max-width:480px){.menu-wrapper[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{display:none}}.menu-wrapper[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;padding:0}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;margin-left:30px}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:first-of-type{margin-left:0}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]:hover{transform:translateY(-1px);filter:brightness(1.08)}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]{transition:none}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]:hover, .menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]:active{transform:none}}.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-of-type   a[_ngcontent-%COMP%]{padding:9px 16px;font-size:12.5px}@media only screen and (max-width:1200px){.menu-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{margin-left:20px}}.menu-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--%NS%header-color);text-transform:uppercase;font-size:13px;font-weight:700}.menu-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary-4dp)}@media print{.menu-wrapper[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%]{float:right;padding:14px 25px}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%]{padding:23px 15px}}@media only screen and (max-width:480px){.workshop-wrapper[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-right:10px;width:55px}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:none!important}}.workshop-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .workshop-wrapper[_ngcontent-%COMP%]   .workshop-info[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.workshop-wrapper[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:15px;font-weight:400;color:#fff;margin:0}.workshop-wrapper[_ngcontent-%COMP%]   .short-title[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%]   .short-title[_ngcontent-%COMP%]{display:block}}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%]   .long-title[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#03a9f4;font-weight:600;font-size:12px;position:relative}.workshop-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}.workshop-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover:after{background:var(--%NS%primary)}.workshop-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:after{content:"";display:block;background:#246081;height:2px;left:0;right:0;bottom:-1px;position:absolute}.workshop-wrapper[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;padding:1px 2px;font-weight:700;background:-webkit-linear-gradient(#ee2943,#d31e5a);background:-o-linear-gradient(#ee2943,#d31e5a);background:-moz-linear-gradient(#ee2943,#d31e5a);background:linear-gradient(#ee2943,#d31e5a)}@media(max-width:480px){.workshop-wrapper[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]     .logo-wrapper{width:100%}.icon-wrapper[_ngcontent-%COMP%]{position:absolute}}.fa-stack-overflow[_ngcontent-%COMP%]{font-size:18px}.mobile-nav-icon[_ngcontent-%COMP%]{display:none;width:25px;margin-top:5px;cursor:pointer}@media only screen and (max-width:1200px){.mobile-nav-icon[_ngcontent-%COMP%]{display:inline-block}}.mobile-nav-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .mobile-nav-icon[_ngcontent-%COMP%]:after, .mobile-nav-icon[_ngcontent-%COMP%]:before{content:"";background:var(--%NS%header-color);display:block;height:2px;width:100%}.mobile-nav-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin:6px 0}@media only screen and (max-width:1200px){.desktop-nav-icon[_ngcontent-%COMP%]{display:none}}.search-wrapper[_ngcontent-%COMP%]{margin-right:2em;height:100%;display:inline-flex;align-items:center;vertical-align:middle;position:relative}.search-icon[_ngcontent-%COMP%], [_nghost-%COMP%]     .DocSearch-Search-Icon{position:absolute;margin-top:7px;color:#a5a5a5!important;font-size:14px;width:14px}@media(max-width:1150px){[_nghost-%COMP%]     .DocSearch-Search-Icon{margin-top:0}}.search-input[_ngcontent-%COMP%],   .DocSearch-Button{background:color-mix(in srgb,var(--%NS%header-color) 4%,transparent);border:1px solid var(--%NS%search-border);border-radius:999px;padding:6px 10px 6px 14px;color:var(--%NS%header-color);font-family:Manrope,Helvetica Neue,sans-serif;font-display:swap;font-size:13.5px;outline:0;transition:border-color .12s ease,background-color .12s ease;width:215px;box-sizing:border-box}.search-input[_ngcontent-%COMP%]:hover,   .DocSearch-Button:hover{border-color:color-mix(in srgb,var(--%NS%header-color) 28%,transparent)}.search-input[_ngcontent-%COMP%]:active, .search-input[_ngcontent-%COMP%]:focus,   .DocSearch-Button:active,   .DocSearch-Button:focus{border-color:var(--%NS%primary)}.search-input[_ngcontent-%COMP%]:focus-visible,   .DocSearch-Button:focus-visible{outline:2px solid var(--%NS%primary);outline-offset:2px}@media(max-width:1300px){.search-input[_ngcontent-%COMP%],   .DocSearch-Button{width:190px}}.search-input[_ngcontent-%COMP%]::placeholder{color:#a5a5a5;opacity:1}  .DocSearch-Button{display:inline-flex;align-items:center;gap:8px;color:#a5a5a5;
43cursor:pointer}[_nghost-%COMP%]     .DocSearch-Search-Icon{position:static;margin-top:0}  .DocSearch-Button-Container{display:flex;align-items:center;gap:8px;flex:1;min-width:0}  .DocSearch-Button-Placeholder{padding-left:0;font-size:13.5px;margin-top:0;display:block!important;flex:1;text-align:left}  .DocSearch-Button-Keys{display:inline-flex!important;gap:3px;margin-left:auto;min-width:0}  .DocSearch-Button-Key{background:color-mix(in srgb,var(--%NS%header-color) 10%,transparent);box-shadow:none;border-radius:5px;color:#a5a5a5;font-family:inherit;font-size:11px;width:auto;min-width:18px;height:20px;padding:0 4px;margin-right:0;top:0;display:inline-flex;align-items:center;justify-content:center}  .DocSearch-Button:active,   .DocSearch-Button:focus,   .DocSearch-Button:hover{color:#a5a5a5}.close-icon[_ngcontent-%COMP%]{position:absolute;right:0;width:15px;height:15px;top:10px;cursor:pointer;visibility:hidden;transition:all 90ms ease-in-out}.close-icon.visible[_ngcontent-%COMP%]{visibility:visible}.close-icon[_ngcontent-%COMP%]:after, .close-icon[_ngcontent-%COMP%]:before{content:"";background:var(--%NS%primary);display:block;height:2px;position:absolute;width:15px}.close-icon[_ngcontent-%COMP%]:after{transform:rotate(45deg) translateY(3px)}.close-icon[_ngcontent-%COMP%]:before{transform:rotate(-45deg) translateY(3px)}@media(max-width:1300px){.shop-link[_ngcontent-%COMP%]{display:none!important}}`]})}return o})();var Ar=Xt(`openCloseAnimation`,[Zt(`false`,Ee({display:`none`})),Ct(`false => true`,[Ee(`*`),Ee({height:0,overflow:`hidden`}),_t(`250ms ease-out`,Ee({height:`*`}))]),Ct(`true => false`,[Ee({height:`*`,overflow:`hidden`}),_t(`250ms ease-in`,Ee({height:0}))])]);var Or=()=>({exact:!0});function go(o,r){o&1&&Za$1(0,`app-new-badge`)}function bo(o,r){if(o&1&&(Oa$1(0,`i`,9),DT(1),cf()),o&2){let i=GS(2).$implicit;UC(),hf(` `,i.icon,` `)}}function So(o,r){if(o&1&&(Oa$1(0,`a`,8),NS(1,bo,2,1,`i`,9),DT(2),cf()),o&2){let i=GS().$implicit;By(`pending`,i.isPending),Ay(`routerLink`,i.path)(`routerLinkActiveOptions`,MT(6,Or)),UC(),AS(i.icon?1:-1),UC(),hf(` `,i.title,` `)}}function Eo(o,r){if(o&1&&(Oa$1(0,`i`,9),DT(1),cf()),o&2){let i=GS(2).$implicit;UC(),hf(` `,i.icon,` `)}}function yo(o,r){if(o&1&&(Oa$1(0,`a`,7),NS(1,Eo,2,1,`i`,9),DT(2),cf()),o&2){let i=GS().$implicit;Ay(`href`,TT(i.externalUrl),Nm),UC(),AS(i.icon?1:-1),UC(),hf(` `,i.title,` `)}}function vo(o,r){if(o&1&&(Oa$1(0,`li`),NS(1,So,3,7,`a`,6),NS(2,yo,3,4,`a`,7),cf()),o&2){let i=r.$implicit;UC(),AS(i.externalUrl?-1:1),UC(),AS(i.externalUrl?2:-1)}}function wo(o,r){if(o&1){let i=US();Oa$1(0,`div`,2)(1,`div`,3),Ya$1(`click`,function(){Up(i);let s=GS();return Bp(s.toggle())}),Oa$1(2,`h3`),NS(3,go,1,0,`app-new-badge`),DT(4),cf(),Za$1(5,`i`,4),cf(),Oa$1(6,`ul`,5),OS(7,vo,3,2,`li`,null,xS),cf()()}if(o&2){let i=GS();By(`opened`,i.isOpen),UC(3),AS(i.isNew?3:-1),UC(),qy(i.title),UC(2),Ay(`@openCloseAnimation`,i.isOpen),UC(),kS(i.children)}}function _o(o,r){if(o&1&&(Oa$1(0,`i`,9),DT(1),cf()),o&2){let i=GS(3);UC(),hf(` `,i.icon,` `)}}function Co(o,r){o&1&&Za$1(0,`app-new-badge`)}function ko(o,r){if(o&1&&(Oa$1(0,`a`,8)(1,`h3`),NS(2,_o,2,1,`i`,9),NS(3,Co,1,0,`app-new-badge`),DT(4),cf()()),o&2){let i=GS(2);By(`has-icon`,i.icon),Ay(`routerLink`,i.path)(`routerLinkActiveOptions`,MT(7,Or)),UC(2),AS(i.icon?2:-1),UC(),AS(i.isNew?3:-1),UC(),hf(``,i.title,` `)}}function Po(o,r){if(o&1&&(Oa$1(0,`i`,9),DT(1),cf()),o&2){let i=GS(3);UC(),hf(` `,i.icon,` `)}}function To(o,r){o&1&&Za$1(0,`app-new-badge`)}function Mo(o,r){if(o&1&&(Oa$1(0,`a`,7)(1,`h3`),NS(2,Po,2,1,`i`,9),NS(3,To,1,0,`app-new-badge`),DT(4),cf()()),o&2){let i=GS(2);Ay(`href`,TT(i.externalUrl),Nm),UC(2),AS(i.icon?2:-1),UC(),AS(i.isNew?3:-1),UC(),hf(``,i.title,` `)}}function Ao(o,r){if(o&1&&(Oa$1(0,`div`,1),NS(1,ko,5,8,`a`,10),NS(2,Mo,5,5,`a`,7),cf()),o&2){let i=GS();UC(),AS(i.externalUrl?-1:1),UC(),AS(i.externalUrl?2:-1)}}var Nr=(()=>{class o{isOpen=!1;children=[];path;title;icon;externalUrl;isNew;toggle(){this.isOpen=!this.isOpen}static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-menu-item`]],inputs:{isOpen:`isOpen`,children:`children`,path:`path`,title:`title`,icon:`icon`,externalUrl:`externalUrl`,isNew:`isNew`},decls:2,vars:1,consts:[[1,`nav-item`,3,`opened`],[1,`heading`],[1,`nav-item`],[1,`heading`,3,`click`],[`aria-hidden`,`true`,1,`ph`,`ph-caret-right`,`arrow-icon`],[1,`sub-nav`],[`routerLinkActive`,`active`,3,`pending`,`routerLink`,`routerLinkActiveOptions`],[`target`,`_blank`,3,`href`],[`routerLinkActive`,`active`,3,`routerLink`,`routerLinkActiveOptions`],[1,`material-icons`],[`routerLinkActive`,`active`,3,`routerLink`,`routerLinkActiveOptions`,`has-icon`]],template:function(a,s){a&1&&NS(0,wo,9,5,`div`,0)(1,Ao,3,2,`div`,1),a&2&&AS(s.children?0:1)},dependencies:[eR,tu,Wt],styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
43left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{position:relative;display:block}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:700;color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp);font-size:13px;letter-spacing:.08em;margin:10px 0;transition:color .15s ease,-webkit-text-fill-color .15s ease}h3[_ngcontent-%COMP%]:hover{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}app-new-badge[_ngcontent-%COMP%]{margin-right:5px}.active[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}.material-icons[_ngcontent-%COMP%]{margin-right:5px}.arrow-icon[_ngcontent-%COMP%]{-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg);position:absolute;top:2px;right:20px;font-size:15px;line-height:1;cursor:pointer;color:var(--%NS%color);transition:transform .2s cubic-bezier(.7,0,.3,1),color .15s ease}li[_ngcontent-%COMP%]{display:block;padding:1px 0}li[_ngcontent-%COMP%]:first-of-type{padding-top:0}li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--%NS%menu-color);font-size:14px;text-decoration:none;cursor:pointer;display:block;padding:5px 10px;margin-left:-10px;border-radius:var(--%NS%radius-sm);background-color:var(--%NS%hover-surface-0);transition:color .12s ease,background-color .12s ease}li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}li[_ngcontent-%COMP%]   a.active[_ngcontent-%COMP%]{font-weight:600;color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary);background-color:var(--%NS%active-surface)}li[_ngcontent-%COMP%]   .pending[_ngcontent-%COMP%]{color:#afafaf!important;pointer-events:none}.nav-item[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:10px 0 15px}.nav-item[_ngcontent-%COMP%]   .arrow-icon[_ngcontent-%COMP%]{color:var(--%NS%color)}.nav-item.opened[_ngcontent-%COMP%]   .arrow-icon[_ngcontent-%COMP%]{-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:var(--%NS%primary)}.heading[_ngcontent-%COMP%]{cursor:pointer}.heading[_ngcontent-%COMP%]:hover   .arrow-icon[_ngcontent-%COMP%]{color:var(--%NS%primary)}ul[_ngcontent-%COMP%]{padding-left:15px}.material-icons[_ngcontent-%COMP%]{font-size:14px;margin-left:3px;vertical-align:middle;padding-bottom:4px}.has-icon[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}`],data:{animation:[Ar]}})}return o})();var ot=[{title:`Introduction`,isOpened:!1,path:`/`},{title:`Overview`,isOpened:!0,children:[{title:`First steps`,path:`/first-steps`},{title:`Controllers`,path:`/controllers`},{title:`Providers`,path:`/providers`},{title:`Modules`,path:`/modules`},{title:`Middleware`,path:`/middleware`},{title:`Exception filters`,path:`/exception-filters`},{title:`Pipes`,path:`/pipes`},{title:`Guards`,path:`/guards`},{title:`Interceptors`,path:`/interceptors`},{title:`Custom decorators`,path:`/custom-decorators`}]},{title:`Fundamentals`,isOpened:!1,children:[{title:`Custom providers`,path:`/fundamentals/custom-providers`},{title:`Asynchronous providers`,path:`/fundamentals/async-providers`},{title:`Dynamic modules`,path:`/fundamentals/dynamic-modules`},{title:`Injection scopes`,path:`/fundamentals/injection-scopes`},{title:`Circular dependency`,path:`/fundamentals/circular-dependency`},{title:`Module reference`,path:`/fundamentals/module-ref`},{title:`Lazy-loading modules`,path:`/fundamentals/lazy-loading-modules`},{title:`Execution context`,path:`/fundamentals/execution-context`},{title:`Lifecycle events`,path:`/fundamentals/lifecycle-events`},{title:`Discovery service`,path:`/fundamentals/discovery-service`},{title:`Platform agnosticism`,path:`/fundamentals/platform-agnosticism`},{title:`Testing`,path:`/fundamentals/testing`}]},{title:`Application`,isOpened:!1,children:[{title:`Configuration`,path:`/application/configuration`},{title:`Validation`,path:`/application/validation`},{title:`Serialization`,path:`/application/serialization`},{title:`Logging`,path:`/application/logger`},{title:`Events`,path:`/application/events`},{title:`Task scheduling`,path:`/application/task-scheduling`},{title:`Queues`,path:`/application/queues`}
43,{title:`HTTP client`,path:`/application/http-client`},{title:`Internationalization`,path:`/application/i18n`},{title:`Mail`,path:`/application/mail`},{title:`File storage`,path:`/application/file-storage`}]},{title:`Data`,isOpened:!1,children:[{title:`Overview`,path:`/data/overview`},{title:`TypeORM`,path:`/data/typeorm`},{title:`Drizzle`,path:`/data/drizzle`},{title:`MongoDB`,path:`/data/mongodb`},{title:`Prisma`,path:`/data/prisma`},{title:`MikroORM`,path:`/data/mikroorm`},{title:`Sequelize`,path:`/data/sequelize`},{title:`Caching`,path:`/data/caching`}]},{title:`Security`,isOpened:!1,children:[{title:`Authentication`,path:`/security/authentication`},{title:`Authorization`,path:`/security/authorization`},{title:`Encryption and Hashing`,path:`/security/encryption-and-hashing`},{title:`Security headers`,path:`/security/helmet`},{title:`CORS`,path:`/security/cors`},{title:`CSRF Protection`,path:`/security/csrf`},{title:`Rate limiting`,path:`/security/rate-limiting`}]},{title:`HTTP`,isOpened:!1,children:[{title:`Versioning`,path:`/http/versioning`},{title:`Cookies`,path:`/http/cookies`},{title:`Session`,path:`/http/session`},{title:`File upload and streaming`,path:`/http/file-upload`},{title:`Compression`,path:`/http/compression`},{title:`Server-Sent Events`,path:`/http/server-sent-events`},{title:`Model-View-Controller`,path:`/http/mvc`},{title:`Performance (Fastify)`,path:`/http/performance`},{title:`Webhooks`,path:`/http/webhooks`}]},{title:`Observability`,isNew:!0,isOpened:!1,children:[{title:`Overview`,path:`/observability/overview`},{title:`SDK`,path:`/observability/sdk`},{title:`Manual instrumentation`,path:`/observability/manual-instrumentation`},{title:`Distributed tracing`,path:`/observability/distributed-tracing`},{title:`Error monitoring`,path:`/observability/error-monitoring`},{title:`Dashboard`,path:`/observability/dashboard`},{title:`MCP server`,path:`/observability/mcp-server`}]},{title:`Reliability`,isOpened:!1,children:[{title:`Resilience`,path:`/reliability/resilience`},{title:`Idempotency keys`,path:`/reliability/idempotency`},{title:`Transactional outbox`,path:`/reliability/outbox`},{title:`Durable workflows`,path:`/reliability/workflows`},{title:`Distributed locks`,path:`/reliability/locks`}]},{title:`GraphQL`,isOpened:!1,children:[{title:`Quick start`,path:`/graphql/quick-start`},{title:`Resolvers`,path:`/graphql/resolvers`},{title:`Mutations`,path:`/graphql/mutations`},{title:`Subscriptions`,path:`/graphql/subscriptions`},{title:`Scalars`,path:`/graphql/scalars`},{title:`Directives`,path:`/graphql/directives`},{title:`Interfaces`,path:`/graphql/interfaces`},{title:`Unions and Enums`,path:`/graphql/unions-and-enums`},{title:`Field middleware`,path:`/graphql/field-middleware`},{title:`Mapped types`,path:`/graphql/mapped-types`},{title:`Plugins`,path:`/graphql/plugins`},{title:`Complexity`,path:`/graphql/complexity`},{title:`Extensions`,path:`/graphql/extensions`},{title:`CLI Plugin`,path:`/graphql/cli-plugin`},{title:`Generating SDL`,path:`/graphql/generating-sdl`},{title:`Sharing models`,path:`/graphql/sharing-models`},{title:`Other features`,path:`/graphql/other-features`},{title:`Federation`,path:`/graphql/federation`}]},{title:`WebSockets`,isOpened:!1,children:[{title:`Gateways`,path:`/websockets/gateways`},{title:`Exception filters`,path:`/websockets/exception-filters`},{title:`Pipes`,path:`/websockets/pipes`},{title:`Guards`,path:`/websockets/guards`},{title:`Interceptors`,path:`/websockets/interceptors`},{title:`Adapters`,path:`/websockets/adapter`}]},{title:`Microservices`,isOpened:!1,children:[{title:`Overview`,path:`/microservices/basics`},{title:`Redis`,path:`/microservices/redis`},{title:`MQTT`,path:`/microservices/mqtt`},{title:`NATS`,path:`/microservices/nats`},{title:`RabbitMQ`,path:`/microservices/rabbitmq`},{title:`Kafka`,path:`/microservices/kafka`},{title:`gRPC`,path:`/microservices/grpc`},{title:`Custom transporters`,path:`/microservices/custom-transport`},{title:`Exception filters`,path:`/microservices/exception-filters`},{title:`Pipes`,path:`/microservices/pipes`},{title:`Pre-request hooks`,path:`/microservices/pre-request-hooks`},{title:`Guards`,path:`/microservices/guards`},{title:`Interceptors`,path:`/microservices/interceptors`}]},{title:`Deployment`,path:`/deployment`},{title:`Standalone apps`,isOpened:!1,path:`/standalone-applications`},{title:`CLI`,isOpened:!1,children:[{title:`Overview`,path:`/cli/overview`},{title:`Workspaces`,path:`/cli/monorepo`},{title:`Libraries`,path:`/cli/libraries`},{title:`Usage`,path:`/cli/usages`},{title:`Scripts`,path:`/cli/scripts`}]},{title:`OpenAPI`,isOpened:!1,children:[{title:`Introduction`,path:`/openapi/introduction`},{title:`Types and Parameters`,path:`/openapi/types-and-parameters`},{title:`Operations`,path:`/openapi/operations`},{title:`Security`,path:`/openapi/security`},{title:`Mapped Types`,path:`/openapi/mapped-types`},{title:`Decorators`,path:`/openapi/decorators`},{title:`CLI Plugin`,path:`/openapi/cli-plugin`},{title:`Other features`,path:`/openapi/other-features`}]},{title:`Recipes`,isOpened:!1,children:[{title:`REPL`,path:`/recipes/repl`},{title:`CRUD generator`,path:`/recipes/crud-generator`},{title:`SWC (fast compiler)`,path:`/recipes/swc`},{title:`Passport (auth)`,path:`/recipes/passport`},{title:`Hot reload`,path:`/recipes/hot-reload`},{title:`Router module`,path:`/recipes/router-module`},{title:`Health checks`,path:`/recipes/terminus`},{title:`CQRS`,path:`/recipes/cqrs`},{title:`Serve static`,path:`/recipes/serve-static`},{title:`Commander`,path:`/recipes/nest-commander`},{title:`Async local storage`,path:`/recipes/async-local-storage`}]},{title:`FAQ`,isOpened:!1,children:[{title:`Serverless`,path:`/faq/serverless`},{title:`HTTP adapter`,path:`/faq/http-adapter`},{title:`Keep-Alive connections`,path:`/faq/keep-alive-connections`},{title:`Global path prefix`,path:`/faq/global-prefix`},{title:`Raw body`,path:`/faq/raw-body`},{title:`Hybrid application`,path:`/faq/hybrid-application`},{title:`HTTPS & multiple servers`,path:`/faq/multiple-servers`},{title:`Request lifecycle`,path:`/faq/request-lifecycle`},{title:`Common errors`,path:`/faq/common-errors`},{title:`Examples`,externalUrl:`https://github.com/nestjs/nest/tree/master/sample`}]},{title:`Devtools`,isOpened:!1,children:[{title:`Overview`,path:`/devtools/overview`},{title:`CI/CD integration`,path:`/devtools/ci-cd-integration`}]},{title:`Migration guide`,isOpened:!1,path:`/migration-guide`},{title:`API Reference`,externalUrl:`https://api-references-nestjs.netlify.app/`},{title:`Official courses`,externalUrl:`https://courses.nestjs.com/`},{title:`Discover`,isOpened:!1,children:[{title:`Who is using Nest?`,path:`/discover/companies`},{title:`Jobs board`,externalUrl:`https://jobs.nestjs.com/`}]}
43,{title:`Support us`,isOpened:!1,path:`/support`}];function Oo(o,r){if(o&1&&Za$1(0,`app-menu-item`,1),o&2){let i=r.$implicit;Ay(`isOpen`,i.isOpened)(`title`,i.title)(`externalUrl`,i.externalUrl)(`isNew`,i.isNew)(`icon`,i.icon)(`path`,i.path)(`children`,i.children)}}var Ir=(()=>{class o{route;router;isSidebarOpened=!0;items=structuredClone(ot);constructor(i,a){this.route=i,this.router=a}ngOnInit(){this.router.events.pipe(He(i=>i instanceof Ze)).subscribe(()=>this.toggleCategory()),this.toggleCategory()}toggleCategory(){let{firstChild:i}=this.route.snapshot;if(i.url&&i.url[1]||i.url&&i.routeConfig&&i.routeConfig.loadChildren){let{path:a}=i.url[0],s=this.items.findIndex(({title:l})=>l.toLowerCase()===a);if(s<0)return;this.items[s].isOpened=!0,this.items[1].isOpened=!1}}static ɵfac=function(a){return new(a||o)(Ce(ln$1),Ce(wt$1))};static ɵcmp=ef({type:o,selectors:[[`app-menu`]],inputs:{isSidebarOpened:`isSidebarOpened`},decls:7,vars:0,consts:[[`aria-label`,`Documentation`,1,`nav-container`,3,`click`],[1,`nav-item`,3,`isOpen`,`title`,`externalUrl`,`isNew`,`icon`,`path`,`children`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A node.js framework built on top of TypeScript`,1,`btn`,`btn-support`],[`href`,`https://docs.nestjs.com/v11`,1,`btn`,`btn-version`]],template:function(a,s){a&1&&(Oa$1(0,`nav`,0),Ya$1(`click`,function(d){return d.stopPropagation()}),OS(1,Oo,1,7,`app-menu-item`,1,xS),Oa$1(3,`a`,2),DT(4,`Get enterprise support`),cf(),Oa$1(5,`a`,3),DT(6,`See Version 11`),cf()()),a&2&&(UC(),kS(s.items))},dependencies:[Nr],styles:[`.transition[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{-moz-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-o-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-ms-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-webkit-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));transform:translate(calc(-100% - var(--%NS%shell-offset-vw, 12px)));padding:28px 22px 40px 28px;width:280px;background:var(--%NS%menu-glow),var(--%NS%menu-background)!important;-webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-shadow:inset 0 1px #ffffff0a;position:fixed!important;bottom:12px;top:94px;left:var(--%NS%shell-offset, 12px);z-index:1000;overflow:overlay}.opened[_nghost-%COMP%]{-moz-transform:translateX(0);-o-transform:translateX(0);-ms-transform:translateX(0);-webkit-transform:translateX(0);transform:translate(0)}@media only screen and (max-width:1200px){[_nghost-%COMP%]{width:280px}}@media only screen and (max-width:991px){.opened[_nghost-%COMP%]{z-index:1000;box-shadow:0 10px 40px #0000001a}}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding:20px 25px}}@media only screen and (max-width:480px){[_nghost-%COMP%]{width:calc(100% - 24px)}}@media print{[_nghost-%COMP%]{display:none}}.nav-item[_ngcontent-%COMP%]{margin:0 -10px;padding:0 10px}.nav-item[_ngcontent-%COMP%]:last-of-type{border:0}.nav-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:20px 0}.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.btn-version[_ngcontent-%COMP%]:hover, .btn-support[_ngcontent-%COMP%]:hover{transform:translateY(-1px);filter:brightness(1.08)}.btn-version[_ngcontent-%COMP%]:active, .btn-support[_ngcontent-%COMP%]:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{transition:none}.btn-version[_ngcontent-%COMP%]:hover, .btn-version[_ngcontent-%COMP%]:active, .btn-support[_ngcontent-%COMP%]:hover, .btn-support[_ngcontent-%COMP%]:active{transform:none}}.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{padding:11px 14px;font-size:12.5px;text-transform:uppercase;letter-spacing:.05em;text-align:center;
43width:calc(100% - 10px);display:block}.btn-version[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface-0);box-shadow:inset 0 0 0 1px var(--%NS%border-color-strong)}.btn-version[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}.btn-version[_ngcontent-%COMP%]{margin-top:5px}.btn-support[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.btn-support[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.btn-support[_ngcontent-%COMP%]{margin-top:20px}`]})}return o})();var No=[`tocWrapper`];function Io(o,r){o&1&&(uf(0,`div`,2),DT(1,`On this page`),lf())}function jo(o,r){if(o&1){let i=US();uf(0,`li`)(1,`a`,4),Ly(`click`,function(s){let l=Up(i).$implicit,d=GS();return Bp(d.navigateToAnchor(s,l.elementRef))}),DT(2),lf()()}if(o&2){let i=r.$implicit,a=r.$index,s=GS();By(`current`,a===s.activeId),Wa$1(`id`,i.id),UC(),ky(`href`,_T(``,s.currentURL(),`#`,i.elementRef.id),Nm),UC(),hf(` `,i.textContent,` `)}}var jr=(()=>{class o{cd;renderer;contentReference;headings=[];activeId;tocWrapper;isPositionFixed=!0;scrollTopOffset=100;scrollDebounceTime=10;scrollSubscription;timerSubscription;maxTopOffset;constructor(i,a){this.cd=i,this.renderer=a}ngOnInit(){this.scrollSubscription=bu(window,`scroll`).pipe(sI(this.scrollDebounceTime)).subscribe(()=>{this.findCurrentHeading(),this.checkViewportBoundaries()}),this.init(),this.updateOffsetTop()}ngOnChanges(){this.init(),this.updateOffsetTop()}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe(),this.timerSubscription&&this.timerSubscription.unsubscribe()}init(){this.lookupHeadings(),this.findCurrentHeading(),this.findMaxTopOffset()}lookupHeadings(){if(!this.contentReference)return;let i=this.contentReference.querySelectorAll(`h3, h4`),a=s=>{let l=s&&s.indexOf(`#`);return l>=0?s.slice(0,l):s};this.headings=Array.from(i).map((s,l)=>({id:l,offsetTop:s.offsetTop,textContent:a(s.textContent),elementRef:s}))}updateOffsetTop(){this.timerSubscription=iI(600,200).pipe($t(3)).subscribe(()=>this.init())}navigateToAnchor(i,a){a&&this.findCurrentHeading()}findCurrentHeading(){let a=s=>{let l=this.activeId!==s;this.activeId=s,l&&this.cd.markForCheck()};for(let s=0;s<this.headings.length;s++){if(this.headings.length-1===s)return a(s);if(this.headings[s+1].offsetTop>=window.pageYOffset+this.scrollTopOffset+15)return a(s)}}findMaxTopOffset(){if(!this.tocWrapper)return;let{nativeElement:i}=this.tocWrapper,a=document.querySelector(`.page-wrapper`);if(!a||!i)return;let s=a.scrollHeight,l=i.scrollHeight;this.maxTopOffset=s-l-this.scrollTopOffset}currentURL(){return window.location.href.split(`#`)[0]}checkViewportBoundaries(){this.isPositionFixed=this.maxTopOffset>window.pageYOffset;let{nativeElement:i}=this.tocWrapper;this.isPositionFixed?(this.renderer.removeStyle(i,`top`),this.renderer.removeStyle(i,`position`)):(this.renderer.setStyle(i,`top`,this.maxTopOffset+150+`px`),this.renderer.setStyle(i,`position`,`absolute`))}trackById(i,a){return a.id}static ɵfac=function(a){return new(a||o)(Ce(no$1),Ce(Mn$1))};static ɵcmp=ef({type:o,selectors:[[`app-toc`]],viewQuery:function(a,s){if(a&1&&Fy(No,7),a&2){let l;df(l=ff())&&(s.tocWrapper=l.first)}},inputs:{contentReference:`contentReference`,headings:`headings`},features:[cr$1],decls:6,vars:1,consts:[[`tocWrapper`,``],[`perfectScrollbar`,``,1,`toc-wrapper`],[1,`toc-label`],[3,`current`],[3,`click`,`href`]],template:function(a,s){a&1&&(uf(0,`div`,1,0),NS(2,Io,2,0,`div`,2),uf(3,`ul`),OS(4,jo,3,7,`li`,3,s.trackById,!0),lf()()),a&2&&(UC(2),AS(s.headings&&s.headings.length?2:-1),UC(2),kS(s.headings)
43)},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .toc-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.toc-wrapper[_ngcontent-%COMP%]{--%NS%toc-top: 106px;--%NS%ad-reserve: 0px;width:var(--%NS%rail-outer-width, 250px);padding-left:var(--%NS%rail-indent, 45px);box-sizing:border-box;position:fixed;top:var(--%NS%toc-top);right:var(--%NS%rail-right);z-index:50;max-height:max(180px,100vh - var(--%NS%toc-top) - var(--%NS%ad-reserve));overflow-y:auto}@media print{.toc-wrapper[_ngcontent-%COMP%]{display:none}}.toc-wrapper[_ngcontent-%COMP%]   .toc-label[_ngcontent-%COMP%]{text-transform:uppercase;font-size:11.5px;font-weight:700;letter-spacing:.1em;color:color-mix(in srgb,var(--%NS%color) 70%,transparent);margin-bottom:10px}.toc-wrapper[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{position:relative;padding:0;margin:0;border-left:1px solid var(--%NS%border-color)}.toc-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:block;position:relative;margin:0;font-size:13px}.toc-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:block;color:color-mix(in srgb,var(--%NS%color) 85%,transparent);font-weight:400;line-height:1.45;padding:5px 0 5px 16px;margin-left:-1px;border-left:2px solid transparent}.toc-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);border-left-color:var(--%NS%border-color-strong)}.toc-wrapper[_ngcontent-%COMP%]   .current[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--%NS%primary);border-left-color:var(--%NS%primary);font-weight:600}.page-wrapper:has(.carbon-wrapper:not(.hide) #carbonads)[_nghost-%COMP%]   .toc-wrapper[_ngcontent-%COMP%], .page-wrapper:has(.carbon-wrapper:not(.hide) #carbonads)   [_nghost-%COMP%]   .toc-wrapper[_ngcontent-%COMP%]{--%NS%ad-reserve: 370px}`]})}return o})();var Rr=(()=>{class o{httpClient;constructor(i){this.httpClient=i}addToNewsletter(i){return $E(this.httpClient.post(`https://nbdggbnqnrevwg6xlex3st3vpe0nyhiq.lambda-url.us-east-2.on.aws/?token=db1f899025b5a59a76b6b34b2a013893`,{email:i}).pipe(Gn(()=>Ee$1)))}static ɵfac=function(a){return new(a||o)(w(Wv))};static ɵprov=S({token:o,factory:o.ɵfac,providedIn:`root`})}return o})();var Dr=(()=>{class o{newsletterService;cd;isDisabled;isEmailAdded;constructor(i,a){this.newsletterService=i,this.cd=a}addToNewsletter(i,a){return V(this,null,function*(){i.preventDefault(),this.isDisabled=!0,this.cd.markForCheck(),yield this.newsletterService.addToNewsletter(a),this.isEmailAdded=!0,this.cd.markForCheck()})}static ɵfac=function(a){return new(a||o)(Ce(Rr),Ce(no$1))};static ɵcmp=ef({type:o,selectors:[[`app-newsletter`]],decls:14,vars:4,consts:[[`email`,``],[1,`newsletter-wrapper`],[1,`signup`],[1,`hgroup`],[1,`newsletter-form`],[1,`form-wrapper`,3,`submit`],[`id`,`newsletter-email`,`name`,`email`,`type`,`email`,`placeholder`,`Email address..`,`required`,``,1,`form-control`,3,`disabled`],[`type`,`submit`,`aria-label`,`Signup to Newsletter`,1,`signup-button`,3,`disabled`],[1,`far`,`fa-paper-plane`],[1,`icon-success`,`fas`,`fa-check-circle`]],template:function(a,s){if(a&1){let l=US();uf(0,`div`,1)(1,`div`,2)(2,`div`,3)(3,`h3`),DT(4,`Join our Newsletter`),lf(),uf(5,`p`),DT(6,` Subscribe to stay up to date with the latest Nest updates, features, and videos! `),lf()(),uf(7,`div`,4)(8,`form`,5),Ly(`submit`,function(m){Up(l);let h=QS(10);return Bp(s.addToNewsletter(m,h.value))}),xy(9,`input`,6,0),uf(11,`button`,7),xy(12,`i`,8)(13,`i`,9),lf()()()()()}a&2&&(UC(9),ky(`disabled`,s.isDisabled),UC(2),By(`btn-success`,s.isEmailAdded),ky(`disabled`,s.isDisabled))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
43left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.newsletter-wrapper[_ngcontent-%COMP%]{background:radial-gradient(700px 260px at 92% -30%,rgba(234,40,69,.16),transparent 60%),var(--%NS%background-1dp);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-sizing:border-box;padding:36px 40px;overflow:hidden;position:relative;margin:50px 0 30px;width:auto}@media only screen and (max-width:1200px){.newsletter-wrapper[_ngcontent-%COMP%]{padding:36px 40px}}@media only screen and (max-width:767px){.newsletter-wrapper[_ngcontent-%COMP%]{padding:30px 20px;text-align:center}}.newsletter-wrapper[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin:0 0 4px;color:var(--%NS%color-1dp)}.newsletter-wrapper[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--%NS%color);font-weight:500;line-height:22px}.newsletter-wrapper[_ngcontent-%COMP%]   .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.newsletter-form[_ngcontent-%COMP%]{text-align:right;width:40%;position:relative;margin-top:5px}.newsletter-wrapper[_ngcontent-%COMP%]   .hgroup[_ngcontent-%COMP%]{width:60%;float:left;position:relative}.newsletter-form[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;max-width:420px;display:inline-block;vertical-align:middle}.newsletter-form[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border:1px solid var(--%NS%border-color);font-size:14px;font-family:Manrope,sans-serif;height:40px;padding:10px 66px 10px 20px;background:var(--%NS%background);color:var(--%NS%color);width:100%;border-radius:var(--%NS%radius-btn);vertical-align:middle;box-sizing:border-box;outline:0}.newsletter-form[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{border-color:var(--%NS%primary)}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;bottom:4px;height:auto;padding:0 16px;margin:0;border-radius:calc(var(--%NS%radius-btn) - 4px);font-size:14px;line-height:1;transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;cursor:pointer;outline:0}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover:not([disabled]){filter:brightness(1.08)}.newsletter-form[_ngcontent-%COMP%]   button[disabled][_ngcontent-%COMP%]{background-image:none;background-color:var(--%NS%background-3dp);box-shadow:none}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active:not([disabled]){transform:scale(.95);filter:brightness(.96)}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon-success[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]   .btn-success[_ngcontent-%COMP%]   .fa-paper-plane[_ngcontent-%COMP%]{display:none}.newsletter-form[_ngcontent-%COMP%]   .btn-success[disabled][_ngcontent-%COMP%]{background-image:none;background-color:var(--%NS%background);color:#1dd81c;-webkit-text-fill-color:#1dd81c;pointer-events:none}.newsletter-form[_ngcontent-%COMP%]   .btn-success[_ngcontent-%COMP%]   .icon-success[_ngcontent-%COMP%]{display:inline-block}.newsletter-wrapper[_ngcontent-%COMP%]   .envelope-bg[_ngcontent-%COMP%]{font-size:180px;position:absolute;margin-top:-50px;margin-left:60px;color:#0000001a;z-index:0;transform:rotate(-30deg)}@media(max-width:1020px){.newsletter-wrapper[_ngcontent-%COMP%]   .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{width:50%}}@media(max-width:990px){.newsletter-wrapper[_ngcontent-%COMP%]   .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{width:100%}.newsletter-wrapper[_ngcontent-%COMP%]   .hgroup[_ngcontent-%COMP%]{float:none;text-align:center}.newsletter-form[_ngcontent-%COMP%]{margin-top:30px;text-align:center}.newsletter-form[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{margin-left:0}.newsletter-wrapper[_ngcontent-%COMP%]   .envelope-bg[_ngcontent-%COMP%]{font-size:280px}.newsletter-form[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]{max-width:400px}}`]})}return o}
43)();var zr=(()=>{class o{currentDate=Date.now();static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-footer`]],decls:28,vars:4,consts:[[1,`social-wrapper`],[`title`,`Kamil Mysliwiec Facebook`,`href`,`https://www.facebook.com/kammysliwiec/`,`target`,`_blank`],[1,`fa-brands`,`fa-facebook`],[`title`,`Kamil Mysliwiec Twitter`,`href`,`https://twitter.com/kammysliwiec`,`target`,`_blank`],[1,`fa-brands`,`fa-x-twitter`],[`title`,`Kamil Mysliwiec Github`,`href`,`https://github.com/kamilmysliwiec`,`target`,`_blank`],[1,`fa-brands`,`fa-github`],[`href`,`https://kamilmysliwiec.com`,`title`,`Kamil Mysliwiec Blog | Full-Stack Software Engineer`,`target`,`_blank`],[1,`fa-solid`,`fa-globe`],[1,`credits`],[`href`,`https://kamilmysliwiec.com`,`target`,`_blank`,`title`,`Kamil Mysliwiec Blog | Full-Stack Software Engineer`],[1,`separator`],[`href`,`https://dribbble.com/JakubStaron`,`title`,`Jakub Staron Dribble`,`target`,`_blank`],[`href`,`https://trilon.io`,`target`,`_blank`,`title`,`Official NestJS Consulting | Angular Consulting`],[`href`,`https://www.netlify.com`,`target`,`_blank`]],template:function(a,s){a&1&&(uf(0,`footer`)(1,`div`,0)(2,`a`,1),xy(3,`i`,2),lf(),uf(4,`a`,3),xy(5,`i`,4),lf(),uf(6,`a`,5),xy(7,`i`,6),lf(),uf(8,`a`,7),xy(9,`i`,8),lf()(),uf(10,`div`,9)(11,`p`),DT(12),AT(13,`date`),uf(14,`a`,10),DT(15,` Kamil Mysliwiec`),lf(),xy(16,`span`,11),DT(17,` design by `),uf(18,`a`,12),DT(19,`Jakub Staron`),lf(),xy(20,`br`),DT(21,` Official NestJS Consulting `),uf(22,`a`,13),DT(23,` Trilon.io`),lf(),xy(24,`span`,11),DT(25,` hosted by `),uf(26,`a`,14),DT(27,`Netlify`),lf()()()()),a&2&&(UC(12),hf(` Copyright © 2017-`,OT(13,1,s.currentDate,`yyyy`),` MIT by `))},dependencies:[T_],styles:[`.transition[_ngcontent-%COMP%], [_nghost-%COMP%], .social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{background:transparent;border-top:1px solid var(--%NS%border-color);display:block;padding:40px 0;margin:0;width:auto;font-size:14px;position:relative;z-index:12}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding:30px 15px;position:static;height:auto;text-align:center}}footer[_ngcontent-%COMP%]{display:block;position:relative;color:color-mix(in srgb,var(--%NS%color) 75%,transparent);text-align:center;font-size:13px}footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--%NS%primary-5dp);-webkit-text-fill-color:var(--%NS%primary-5dp);font-weight:600;
43transition:color .15s ease,-webkit-text-fill-color .15s ease}footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp)}footer[_ngcontent-%COMP%]   .separator[_ngcontent-%COMP%]{display:inline-block;width:2px;height:12px;margin:0 3px 0 5px;vertical-align:middle;background:var(--%NS%border-color-strong)}footer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{line-height:25px;margin-bottom:0}.social-wrapper[_ngcontent-%COMP%]{text-align:center;right:40px}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;color:var(--%NS%color-1dp);font-size:20px;margin-left:15px;cursor:pointer}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:first-of-type{font-size:20px}.social-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}@media print{.social-wrapper[_ngcontent-%COMP%]{display:none}}`]})}return o})();function On(o){let r=[],i=(a,s)=>{for(let l of a)l.path&&r.push(s?{title:l.title,path:l.path,section:s}:{title:l.title,path:l.path}),l.children&&i(l.children,l.title)};return i(o),r}function Nn(o){let r=o.split(/[?#]/)[0].replace(/;[^/]*/g,``);return r.length>1?r.replace(/\/+$/,``):r}function Fr(o,r){let i=On(o),a=Nn(r),s=i.findIndex(l=>l.path===a);return s<0?{prev:null,next:null}:{prev:i[s-1]??null,next:i[s+1]??null}}function Do(o,r){if(o&1&&(Oa$1(0,`span`,5),DT(1),cf()),o&2){let i=GS(3);UC(),qy(i.prev.section)}}function zo(o,r){if(o&1&&(Oa$1(0,`a`,1)(1,`span`,4),DT(2,`Previous`),cf(),NS(3,Do,2,1,`span`,5),Oa$1(4,`span`,6),DT(5),cf()()),o&2){let i=GS(2);Ay(`routerLink`,i.prev.path),Wa$1(`aria-label`,i.prevLabel),UC(3),AS(i.prev.section?3:-1),UC(2),qy(i.prev.title)}}function Fo(o,r){o&1&&Za$1(0,`span`,2)}function qo(o,r){if(o&1&&(Oa$1(0,`span`,5),DT(1),cf()),o&2){let i=GS(3);UC(),qy(i.next.section)}}function Lo(o,r){if(o&1&&(Oa$1(0,`a`,3)(1,`span`,4),DT(2,`Next`),cf(),NS(3,qo,2,1,`span`,5),Oa$1(4,`span`,6),DT(5),cf()()),o&2){let i=GS(2);Ay(`routerLink`,i.next.path),Wa$1(`aria-label`,i.nextLabel),UC(3),AS(i.next.section?3:-1),UC(2),qy(i.next.title)}}function Bo(o,r){o&1&&Za$1(0,`span`,2)}function Ho(o,r){if(o&1&&(Oa$1(0,`nav`,0),NS(1,zo,6,4,`a`,1)(2,Fo,1,0,`span`,2),NS(3,Lo,6,4,`a`,3)(4,Bo,1,0,`span`,2),cf()),o&2){let i=GS();UC(),AS(i.prev?1:2),UC(2),AS(i.next?3:4)}}var qr=(()=>{class o{prev=null;next=null;prevLabel=``;nextLabel=``;routerSubscription;router=p(wt$1);cd=p(no$1);ngOnInit(){this.updateLinks(this.router.url),this.routerSubscription=this.router.events.pipe(He(i=>i instanceof Ze)).subscribe(i=>{this.updateLinks(i.urlAfterRedirects),this.cd.markForCheck()})}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe()}updateLinks(i){let{prev:a,next:s}=Fr(ot,i);this.prev=a,this.next=s,this.prevLabel=this.buildLabel(`Previous`,a),this.nextLabel=this.buildLabel(`Next`,s)}buildLabel(i,a){return a?a.section?`${i} page: ${a.title}, in ${a.section}`:`${i} page: ${a.title}`:``}static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-page-nav`]],decls:1,vars:1,consts:[[`aria-label`,`Article navigation`,1,`page-nav`],[1,`page-nav__link`,`page-nav__link--prev`,3,`routerLink`],[1,`page-nav__spacer`],[1,`page-nav__link`,`page-nav__link--next`,3,`routerLink`],[1,`page-nav__label`],[1,`page-nav__section`],[1,`page-nav__title`]],template:function(a,s){a&1&&NS(0,Ho,5,2,`nav`,0),a&2&&AS(s.prev||s.next?0:-1)},dependencies:[tu],styles:[`@charset "UTF-8";.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
43left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{display:block}.page-nav[_ngcontent-%COMP%]{width:calc(100% - 220px);max-width:860px;display:flex;justify-content:space-between;align-items:stretch;gap:16px;margin:1.5em 0 0;padding-top:1em}@media only screen and (max-width:1200px){.page-nav[_ngcontent-%COMP%]{width:100%}}@media print{.page-nav[_ngcontent-%COMP%]{display:none}}.page-nav__spacer[_ngcontent-%COMP%]{flex:1 1 0}.page-nav__link[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:4px;padding:14px 18px;box-sizing:border-box;border:1px solid var(--%NS%border-color);border-radius:var(--%NS%radius);background:var(--%NS%background-1dp);text-decoration:none;transition:border-color .15s ease,background-color .15s ease,transform .15s ease}.page-nav__link[_ngcontent-%COMP%]:hover{border-color:var(--%NS%primary-3dp);background:var(--%NS%hover-surface);transform:translateY(-1px)}.page-nav__link[_ngcontent-%COMP%]:active{transform:translateY(0)}.page-nav__link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--%NS%primary-3dp);outline-offset:2px}.page-nav__link--prev[_ngcontent-%COMP%]{align-items:flex-start;text-align:left}.page-nav__link--next[_ngcontent-%COMP%]{align-items:flex-end;text-align:right}.page-nav__label[_ngcontent-%COMP%]{font-size:11.5px;line-height:1.2;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:color-mix(in srgb,var(--%NS%color) 80%,transparent)}.page-nav__section[_ngcontent-%COMP%]{font-size:12px;line-height:1.3;font-weight:600;color:color-mix(in srgb,var(--%NS%color) 80%,transparent);overflow-wrap:anywhere}.page-nav__title[_ngcontent-%COMP%]{font-size:15px;line-height:1.35;font-weight:600;overflow-wrap:anywhere;color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp);transition:color .15s ease,-webkit-text-fill-color .15s ease}.page-nav__link[_ngcontent-%COMP%]:hover   .page-nav__title[_ngcontent-%COMP%]{color:var(--%NS%primary-3dp);-webkit-text-fill-color:var(--%NS%primary-3dp)}.page-nav__link--prev[_ngcontent-%COMP%]   .page-nav__label[_ngcontent-%COMP%]:before{content:"\\2190";margin-right:6px}.page-nav__link--next[_ngcontent-%COMP%]   .page-nav__label[_ngcontent-%COMP%]:after{content:"\\2192";margin-left:6px}@media only screen and (max-width:767px){.page-nav[_ngcontent-%COMP%]{flex-direction:column;margin-top:40px}.page-nav__spacer[_ngcontent-%COMP%]{display:none}.page-nav__link[_ngcontent-%COMP%]{width:100%}}`]})}return o})();function Jo(o,r){if(o&1){let i=US();Oa$1(0,`button`,1),Ya$1(`click`,function(){Up(i);let s=GS();return Bp(s.onCopy())}),Oa$1(1,`mat-icon`,2),DT(2),cf(),Oa$1(3,`span`),DT(4),cf()()}if(o&2){let i=GS();By(`copied`,i.copied),Wa$1(`aria-label`,i.copied?`Markdown copied`:`Copy page as markdown`),UC(2),qy(i.copied?`check`:`content_copy`),UC(2),qy(i.copied?`Copied`:`Copy markdown`)}}var Lr=(()=>{class o{markdownUrl=null;copied=!1;routerSubscription;revertTimeout=null;router=p(wt$1);cd=p(no$1);ngOnInit(){this.update(this.router.url),this.routerSubscription=this.router.events.pipe(He(i=>i instanceof Ze)).subscribe(i=>{this.update(i.urlAfterRedirects),this.cd.markForCheck()})}ngOnDestroy(){this.routerSubscription?.unsubscribe(),this.revertTimeout&&clearTimeout(this.revertTimeout)}onCopy(){return V(this,null,function*(){let i=fetch(this.markdownUrl).then(a=>{if(!a.ok)throw new Error(`${this.markdownUrl}: ${a.status}`);return a.text()});typeof ClipboardItem<`u`?yield navigator.clipboard.write([new ClipboardItem({"text/plain":i.then(a=>new Blob([a],{type:`text/plain`}))})]):yield navigator.clipboard.writeText(yield i),this.copied=!0,this.cd.markForCheck(),this.revertTimeout=setTimeout(()=>{this.copied=!1,this.revertTimeout=null,this.cd.markForCheck()},2e3)})}update(i){let a=Nn(i),s=On(ot).some(l=>l.path===a);this.markdownUrl=s?`${a===`/`?`/index`:a}.md`:null}static ɵfac=function(a){return new(a||o)};static ɵcmp=ef({type:o,selectors:[[`app-copy-markdown`]],decls:1,vars:1,consts:[[`type`,`button`,1,`copy-markdown`,3,`copied`],[`type`,`button`,1,`copy-markdown`,3,`click`],[`aria-hidden`,`true`]],template:function(a,s){a&1&&NS(0,Jo,5,5,`button`,0),a&2&&AS(s.markdownUrl?0:-1)},dependencies:[Ve$1],styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
43left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{display:block;position:relative;height:0;width:calc(100% - 220px);max-width:860px}@media only screen and (max-width:1200px){[_nghost-%COMP%]{width:100%}}@media print{[_nghost-%COMP%]{display:none}}.copy-markdown[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface-0);box-shadow:inset 0 0 0 1px var(--%NS%border-color-strong)}.copy-markdown[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}.copy-markdown[_ngcontent-%COMP%]{position:absolute;top:26px;right:0;z-index:1;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;font-size:12px}.copy-markdown[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--%NS%primary-3dp);outline-offset:2px}.copy-markdown[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px}.copy-markdown.copied[_ngcontent-%COMP%]{color:var(--%NS%primary-3dp)}`]})}return o})();var Br=1200;var Go=/^\/v\d+(?:\/|$)/;function Uo(o){if(!o)return!1;try{return Go.test(new URL(o,window.location.origin).pathname)}catch(r){return!1}}var Hr=(()=>{class o{cd;router;elementRef;renderer;isSidebarOpened=!0;previousWidth;contentRef;isMarkupReady;routeAnnouncement=``;scrollSubscription;isInitialRoute=!0;scrollDebounceTime=100;constructor(i,a,s,l){this.cd=i,this.router=a,this.elementRef=s,this.renderer=l}ngOnInit(){this.router.events.pipe(He(i=>i instanceof Ze)).subscribe(()=>{if(window.innerWidth>768)return!1;this.isSidebarOpened=!1,this.cd.detectChanges()}),this.scrollSubscription=bu(window,`scroll`).pipe(sI(this.scrollDebounceTime)).subscribe(()=>{this.checkViewportBoundaries()})}ngAfterViewInit(){this.checkWindowWidth(window.innerWidth),this.contentRef&&this.contentRef.appendChild(this.createDocSearchScriptTag())}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe()}onResize(i){this.checkWindowWidth(i.target.innerWidth)}toggleSidebar(){this.isSidebarOpened=!this.isSidebarOpened}checkWindowWidth(i){if(i=i||window.innerWidth,this.previousWidth===i)return;let a=this.previousWidth!==void 0&&this.previousWidth<=768;this.previousWidth=i,i<=768?(this.isSidebarOpened=!1,this.cd.detectChanges()):(a||i>1200&&!this.isSidebarOpened)&&(this.isSidebarOpened=!0,this.cd.detectChanges())}checkViewportBoundaries(){let i=this.elementRef.nativeElement,a=i.querySelector(`app-footer`),s=i.querySelector(`.newsletter-wrapper`),l=i.querySelector(`#carbonads`),d=i.querySelector(`.sponsors-wrapper`);if(!a||!l)return;if(window.innerWidth<768){this.renderer.removeStyle(l,`position`),this.renderer.removeStyle(l,`bottom`);return}l&&d.classList.add(`sponsors-carbon`),window.pageYOffset+window.innerHeight<s.offsetTop-a.offsetHeight+s.offsetHeight?(this.renderer.removeStyle(l,`position`),this.renderer.removeStyle(l,`bottom`)):(this.renderer.setStyle(l,`position`,`absolute`),this.renderer.setStyle(l,`bottom`,`350px`))}onRouteActivate(i){if(!i)return;let a=i.nativeElement;if(!a)return;if(this.contentRef=a.querySelector(`.content`),this.contentRef&&!this.contentRef.querySelector(`.carbon-wrapper`)){let l=this.createCarbonScriptTag(),d=document.createElement(`div`);d.classList.add(`carbon-wrapper`),window.innerWidth>Br&&d.classList.add(`hide`),d.prepend(l),this.contentRef.prepend(d)}this.isInitialRoute?this.isInitialRoute=!1:(this.focusContent(),this.routeAnnouncement=this.readPageTitle()),this.cd.markForCheck(),setTimeout(()=>this.hideAdIfTocOverflow(),300)}skipToContent(i){i.preventDefault(),this.focusContent({preventScroll:!1})}focusContent(i={preventScroll:!0}){this.contentRef&&(this.renderer.setAttribute(this.contentRef,`tabindex`,`-1`),this.contentRef.focus(i))}readPageTitle(){return this.contentRef?.querySelector(`h3`)?.textContent?.trim()||document.title}createCarbonScriptTag(){let i=document.createElement(`script`);return i.type=`text/javascript`,i.src=`//cdn.carbonads.com/carbon.js?serve=CK7I653M&placement=nestjscom`,i.id=`_carbonads_js`,i}createDocSearchScriptTag(){let i=document.createElement(`script`);return i.type=`text/javascript`,i.src=`https://cdn.jsdelivr.net/npm/@docsearch/js@3`,i.async=!0,i.onload=()=>{window.docsearch({apiKey:wt.algoliaApiKey,indexName:`nestjs`,container:`#search`,appId:`SDCBYAN96J`,debug:!1,searchParameters:{hitsPerPage:150},transformSearchClient:a=>j(m({},a),{search:(s,...l)=>a.search(s,...l).then(d=>j(m({},d),{results:(d.results??[]).map(m$1=>{if(!Array.isArray(m$1?.hits))return m$1;let h=m$1.hits.filter(u=>!Uo(u.url));return j(m({},m$1),{hits:h,nbHits:h.length})})}))})})},i}hideAdIfTocOverflow(){let l=window.innerHeight-160-200,d=document.querySelector(`.toc-wrapper ul`);d&&(d.clientHeight>l&&window.innerWidth>Br?this.contentRef.querySelector(`.carbon-wrapper`).classList.add(`hide`):this.contentRef.querySelector(`.carbon-wrapper`).classList.remove(`hide`))}static ɵfac=function(a){return new(a||o)(Ce(no$1),Ce(wt$1),Ce(Rt$1),Ce(Mn$1))};static ɵcmp=ef({type:o,selectors:[[`app-homepage`]],hostBindings:function(a,s){a&1&&Ya$1(`resize`,function(d){return s.onResize(d)},rC)},decls:49,vars:7,consts:[[`mainContent`,``],[`href`,`#content`,1,`skip-link`,3,`click`],[`role`,`status`,`aria-live`,`polite`,1,`visually-hidden`],[3,`toggle`,`isSidebarOpened`],[1,`logo-wrapper`],[`href`,`https://docs.nestjs.com/`,`title`,`Documentation | NestJS - A node.js framework built on top of TypeScript`],[`alt`,`NestJS Logo`,`src`,`/assets/logo-small-gradient.svg`],[1,`container-fluid`],[1,`app-menu`],[1,`container`],[1,`page-wrapper`],[3,`contentReference`],[`id`,`content`,`tabindex`,`-1`],[3,`activate`],[1,`sponsors-wrapper`],[1,`sponsors-container`],[`routerLink`,`/support`],[1,`row`,`clearfix`],[1,`inline-column`],[1,`title`],[`href`,`https://serpapi.com`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/serpapi.png`,`alt`,`SerpApi Logo`,1,`logo-sponsor`,`logo-sponsor--slim`],[`href`,`https://trilon.io/`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/trilon.svg`,`alt`,`Trilon Logo`,1,`logo-sponsor`],[`href`,`https://mojam.co`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/mojam-logo.png`,`alt`,`Mojam Logo`,1,`logo-sponsor`,`logo-sponsor--slim`],[`href`,`https://opencollective.com/nest`,`target`,`_blank`,`rel`,`nofollow`,1,`btn`,`btn-primary`],[`href`,`https://kamilmysliwiec.com`,`target`,`_blank`,`title`,`Kamil Mysliwiec Blog | Full-Stack S
43oftware Engineer`]],template:function(a,s){a&1&&(Oa$1(0,`a`,1),Ya$1(`click`,function(d){return s.skipToContent(d)}),DT(1,`Skip to content`),cf(),Oa$1(2,`p`,2),DT(3),cf(),Oa$1(4,`app-header`,3),Ya$1(`toggle`,function(){return s.toggleSidebar()}),Oa$1(5,`div`,4)(6,`a`,5),Za$1(7,`img`,6),cf()()(),Oa$1(8,`div`,7),Za$1(9,`app-menu`,8),Oa$1(10,`div`,9)(11,`div`,10),Za$1(12,`app-toc`,11),Oa$1(13,`main`,12,0),Za$1(15,`app-copy-markdown`),Oa$1(16,`router-outlet`,13),Ya$1(`activate`,function(d){return s.onRouteActivate(d)}),cf(),Za$1(17,`app-page-nav`),cf()(),Oa$1(18,`div`,14)(19,`div`,15)(20,`h3`),DT(21,`Support us`),cf(),Oa$1(22,`p`),DT(23,` Nest is an MIT-licensed open source project. It can grow thanks to the support of these awesome people. If you'd like to join them, please read more `),Oa$1(24,`a`,16),DT(25,`here`),cf(),DT(26,`. `),cf(),Oa$1(27,`div`,17)(28,`div`,18)(29,`h4`,19),DT(30,`Principal Sponsors`),cf(),Oa$1(31,`a`,20),Za$1(32,`img`,21),cf(),Oa$1(33,`a`,22),Za$1(34,`img`,23),cf(),Oa$1(35,`a`,24),Za$1(36,`img`,25),cf()(),Oa$1(37,`div`,18)(38,`h4`,19),DT(39,`Sponsors / Partners`),cf(),Oa$1(40,`a`,26)(41,`span`),DT(42,`Become a sponsor`),cf()()()()()(),Za$1(43,`app-newsletter`),Oa$1(44,`app-footer`)(45,`p`),DT(46,` Made by `),Oa$1(47,`a`,27),DT(48,` Kamil Myśliwiec `),cf()()()()()),a&2&&(UC(3),hf(` `,s.routeAnnouncement,`
44`),UC(),Ay(`isSidebarOpened`,s.isSidebarOpened),UC(5),By(`opened`,s.isSidebarOpened),UC(),By(`wide`,!s.isSidebarOpened),UC(2),Ay(`contentReference`,s.contentRef))},dependencies:[Mr,Ir,jr,hh,tu,Dr,zr,qr,Lr],styles:[`.transition,.container{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-element{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing,.container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.container-fluid{position:relative;display:block;table-layout:fixed;width:100%;min-height:100vh}.logo-wrapper svg,.logo-wrapper img{width:42px;height:50px}.container{margin-left:calc(var(--%NS%shell-offset, 12px) + 280px);width:calc(100% - var(--%NS%shell-offset, 12px) * 2 - 280px);padding:106px 85px 0;display:inline-block;vertical-align:top;position:relative}.container.wide{margin-left:var(--%NS%shell-offset, 12px);width:calc(100% - var(--%NS%shell-offset, 12px) * 2);display:block}@media only screen and (max-width:1200px){.container{margin-left:292px;width:calc(100% - 292px);padding:106px 50px 0}.container.wide{margin-left:0;width:100%}}@media only screen and (max-width:767px){.container{margin-left:0;width:100%;padding:106px 20px 0}}@media print{.container{margin-left:0;width:100%;padding:0 20px}}.page-wrapper{color:var(--%NS%color);line-height:25px}.page-wrapper>main{display:contents}.page-wrapper a{font-weight:600;color:var(--%NS%primary-3dp)}.page-wrapper a:hover{color:#0894e2}.page-wrapper .content-inner{padding-bottom:2em;border-bottom:1px solid var(--%NS%background-2dp)}.page-wrapper .content a{color:var(--%NS%primary-3dp);-webkit-text-fill-color:var(--%NS%primary-3dp);
44transition:color .15s ease,-webkit-text-fill-color .15s ease}.page-wrapper .content a:hover{color:#0894e2;-webkit-text-fill-color:#0894e2}.page-wrapper .content blockquote strong,.page-wrapper .content #carbonads a,.page-wrapper .content blockquote a{-webkit-text-fill-color:unset!important;-webkit-background-clip:unset!important;background:none}.page-wrapper .content blockquote strong:hover,.page-wrapper .content #carbonads a:hover,.page-wrapper .content blockquote a:hover{background:none}.page-wrapper .content a:has(>code){-webkit-text-fill-color:unset!important;-webkit-background-clip:unset!important;background:none}.page-wrapper .content a:has(>code):hover{background:none}.page-wrapper .content .banner a{-webkit-text-fill-color:#000!important;-webkit-background-clip:#000!important;background:#fff}.page-wrapper .content .banner a:before{background:#fff}.page-wrapper .content .banner a:hover{-webkit-text-fill-color:#fff!important;-webkit-background-clip:#fff!important}.page-wrapper h1,.page-wrapper h2,.page-wrapper h3,.page-wrapper h4,.page-wrapper h5,.page-wrapper h6{color:var(--%NS%color-1dp);letter-spacing:-.01em}.page-wrapper h3{font-size:21px;font-weight:700;margin:45px 0 20px}.page-wrapper h4{font-weight:600;margin:40px 0 -5px}.page-wrapper h3 a,.page-wrapper h4 a,.page-wrapper h5 a{opacity:0;filter:alpha(opacity=0);margin-left:.1em;padding:0 .25rem}.page-wrapper h3 span:hover+a,.page-wrapper h3 span+a:hover,.page-wrapper h3 a:focus,.page-wrapper h4 span:hover+a,.page-wrapper h4 span+a:hover,.page-wrapper h4 a:focus,.page-wrapper h5 span:hover+a,.page-wrapper h5 span+a:hover,.page-wrapper h5 a:focus{opacity:1;filter:alpha(opacity=100)}.page-wrapper h3:before,.page-wrapper h4:before,.page-wrapper h5:before{content:"";display:block;position:relative;width:0;height:5em;margin-top:-5em;pointer-events:none}.page-wrapper h5{margin:30px 0 -5px;font-weight:600;font-size:16px}.page-wrapper h3:first-of-type{margin:20px 0;font-size:28px;line-height:1.25;font-weight:800;letter-spacing:-.02em;padding-right:140px}.page-wrapper h3+h5{margin-top:-10px!important}.sponsors-wrapper{border-top:1px solid var(--%NS%background-2dp);padding:10px 0 60px;margin-top:20px;position:relative}.sponsors-wrapper img{display:inline-block;vertical-align:middle}.sponsors-wrapper a{color:var(--%NS%primary);font-weight:600}.sponsors-wrapper a:hover{color:#0894e2}.sponsors-wrapper h3{font-size:20px;font-weight:700}.sponsors-wrapper h4{color:var(--%NS%color-1dp);font-weight:600;font-size:18px;margin:30px 0 18px}.sponsors-wrapper .title{margin:50px 0 25px}.sponsors-wrapper p{margin:0;line-height:24px;font-size:15px;font-weight:500;color:var(--%NS%color)}.sponsors-wrapper .logo-sponsor-container{display:inline-block;margin-top:10px;margin-right:15px;margin-bottom:5px}.sponsors-wrapper .logo-sponsor-container:last-of-type{margin-right:0;margin-bottom:0}@media(max-width:480px){.sponsors-wrapper .logo-sponsor-container{display:block;margin-bottom:20px}.sponsors-wrapper .logo-sponsor-container:last-of-type{margin-bottom:0}}.sponsors-wrapper .logo-sponsor{width:160px;filter:var(--%NS%company-logo-filter);transition:filter .15s ease,transform .15s ease}.sponsors-wrapper .logo-sponsor:hover{filter:grayscale(0);transform:translateY(-2px)}.sponsors-wrapper .logo-sponsor--high{width:140px}.sponsors-wrapper .logo-sponsor--slim{width:auto;max-height:60px}@media(max-width:480px){.sponsors-wrapper .logo-sponsor--slim{margin-left:0}}.sponsors-wrapper .logo-blueanchor{width:200px}.sponsors-wrapper .btn-primary{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.sponsors-wrapper .btn-primary:hover{transform:translateY(-1px);filter:brightness(1.08)}.sponsors-wrapper .btn-primary:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.sponsors-wrapper .btn-primary{transition:none}.sponsors-wrapper .btn-primary:hover,.sponsors-wrapper .btn-primary:active{transform:none}}.sponsors-wrapper .btn-primary{color:var(--%NS%primary-4dp);padding:11px 20px;display:inline-block;font-weight:700;font-size:14px;border-radius:var(--%NS%radius-btn);position:relative;background-image:var(--%NS%primary-gradient);background-size:100% 100%;box-shadow:none}.sponsors-wrapper .btn-primary span{position:relative;z-index:3;background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}.sponsors-wrapper .btn-primary:after{content:"";position:absolute;inset:1.5px;border-radius:calc(var(--%NS%radius-btn) - 1.5px);background:var(--%NS%background);transition:opacity .15s ease;z-index:1}.sponsors-wrapper .btn-primary:hover{box-shadow:var(--%NS%btn-shadow-hover)}.sponsors-wrapper .btn-primary:hover:after{opacity:0}
44.sponsors-wrapper .btn-primary:hover span{background:none;-webkit-text-fill-color:#fff}@media(min-width:1200px){.sponsors-carbon{width:calc(100% - 220px)}}.backers-wrapper{margin-top:10px}.backers-wrapper img{width:30px;border-radius:50%;-webkit-border-radius:50%}.inline-column{width:50%;vertical-align:top;margin:0;float:left}@media only screen and (max-width:991px){.inline-column{width:100%;float:none}}.toc-wrapper,.content,.companies-wrapper{display:inline-block;vertical-align:top}.content,.companies-wrapper{width:calc(100% - 220px);max-width:860px}@media print{.content,.companies-wrapper{width:100%}}@media only screen and (max-width:1200px){.content,.companies-wrapper{width:100%}}.content .row,.companies-wrapper .row{display:flex}@media only screen and (max-width:991px){.content .row,.companies-wrapper .row{display:block}}.content .thumbnail,.companies-wrapper .thumbnail{width:400px}@media only screen and (max-width:991px){.content .thumbnail,.companies-wrapper .thumbnail{width:100%;max-width:400px;margin:0 auto}}.content .thumbnail img,.companies-wrapper .thumbnail img{max-width:100%;padding-top:10px;padding-bottom:0;box-sizing:border-box}.content .thumbnail.p-l-30 img,.companies-wrapper .thumbnail.p-l-30 img{padding-left:30px}@media only screen and (max-width:991px){.content .thumbnail.p-l-30 img,.companies-wrapper .thumbnail.p-l-30 img{padding-left:0}}.content .thumbnail.p-r-30 img,.companies-wrapper .thumbnail.p-r-30 img{padding-right:30px}@media only screen and (max-width:991px){.content .thumbnail.p-r-30 img,.companies-wrapper .thumbnail.p-r-30 img{padding-right:0}}.content .content,.companies-wrapper .content{flex-basis:55%}.content .contact-us,.companies-wrapper .contact-us{background:var(--%NS%primary-gradient);color:#fff;padding:20px 30px;border-radius:var(--%NS%radius);margin:35px 0;display:flex;align-items:center}@media only screen and (max-width:767px){.content .contact-us,.companies-wrapper .contact-us{display:block;text-align:center}.content .contact-us p,.companies-wrapper .contact-us p{text-align:center}}.content .contact-us h5,.companies-wrapper .contact-us h5{text-transform:uppercase;font-weight:600;color:#fff;margin:0}.content .contact-us p,.companies-wrapper .contact-us p{margin:0}.content .contact-us a,.companies-wrapper .contact-us a{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.content .contact-us a:hover,.companies-wrapper .contact-us a:hover{transform:translateY(-1px);filter:brightness(1.08)}.content .contact-us a:active,.companies-wrapper .contact-us a:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.content .contact-us a,.companies-wrapper .contact-us a{transition:none}.content .contact-us a:hover,.content .contact-us a:active,.companies-wrapper .contact-us a:hover,.companies-wrapper .contact-us a:active{transform:none}}.content .contact-us a,.companies-wrapper .contact-us a{background:#fff;border:2px solid #fff;box-sizing:border-box;padding:9px 18px;border-radius:var(--%NS%radius-btn);float:right;display:block;text-align:center;font-weight:700;box-shadow:0 3px 12px #00000024;transition:transform .13s cubic-bezier(.25,.8,.25,1),background-color .13s ease,color .13s ease,box-shadow .13s ease}.content .contact-us a:hover,.companies-wrapper .contact-us a:hover{background:transparent;color:#fff;filter:none;box-shadow:none}@media only screen and (max-width:767px){.content .contact-us a,.companies-wrapper .contact-us a{width:150px;margin:15px auto 0;float:none}}.content .contact-us .column,.companies-wrapper .contact-us .column{justify-content:center;flex-direction:column}.content .contact-us .column-text,.companies-wrapper .contact-us .column-text{flex-grow:3;margin-right:20px}.github-links{display:inline-flex;align-items:center;gap:6px;margin-top:1.2em;font-size:13px;text-decoration:none}.github-links i{font-size:16px}@media only screen and (max-width:1200px){.toc-wrapper{display:none}}.company-logo{display:inline-block;vertical-align:middle;margin:10px 20px}.company-logo img{max-width:130px;max-height:60px;padding:6px;-webkit-filter:var(--%NS%company-filter);filter:var(--%NS%company-filter);opacity:var(--%NS%company-logo-opacity);transition:filter .15s ease,opacity .15s ease,transform .15s ease}.company-logo img:hover{-webkit-filter:var(--%NS%company-filter-hover);filter:var(--%NS%company-filter-hover);opacity:1;transform:translateY(-2px)}.companies-list a{color:var(--%NS%color);font-size:15px;font-weight:400}#carbonads a{color:inherit;text-decoration:none;font-weight:400}#carbonads a:hover{color:inherit}
44#carbonads span{display:block;overflow:hidden}#carbonads_1,#carbonads_2{display:none}.carbon-img{display:block;margin:0 auto 8px;line-height:1}.carbon-text{display:block;margin-bottom:8px}.carbon-poweredby{text-transform:uppercase;display:block;font-size:10px;letter-spacing:1px;line-height:1}.carbon-wrapper #carbonads{position:fixed;z-index:11;display:block;right:var(--%NS%rail-right);bottom:20px;width:var(--%NS%rail-column);box-sizing:border-box;overflow:hidden;padding:1em;border-radius:var(--%NS%radius);border:1px solid var(--%NS%border-color);background:var(--%NS%background-2dp)!important;text-align:center;line-height:1.5;font-size:13px}@media only screen and (max-width:1200px){.carbon-wrapper #carbonads{margin:64px 0 16px 16px;padding:12px;float:right;position:static;width:auto;max-width:130px}}@media only screen and (max-width:991px){.carbon-wrapper #carbonads{padding:12px;text-align:left}}@media(max-width:360px){.carbon-wrapper #carbonads{display:none}}@media print{.carbon-wrapper{display:none}}.algolia-autocomplete .ds-dropdown-menu{width:460px;min-width:460px;margin-top:18px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{color:#151515;text-transform:uppercase;font-weight:700;font-size:16px}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{color:#757575}.algolia-autocomplete .algolia-docsearch-suggestion--title{font-weight:600;color:#151515}.algolia-autocomplete .algolia-docsearch-suggestion--text{font-size:.8rem;color:gray}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:var(--%NS%primary);background:#fff2f4}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background:#fff8f9}
45`],encapsulation:2})}return o})();var Jr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-application-context`]],features:[My],decls:164,vars:0,consts:[[`contentReference`,``],[`app08d64cc1bb568e48bd9ef622fe4bd3a4231126d5`,``],[`appc1bca086c68b2f15c239fd5ff091d1587c8a5a1b`,``],[`appefb6f65d60f5a6b40f60aa2a6161ef32c6a3aab5`,``],[`app150f8325279e61e1bbb90191dd203291dd04af8d`,``],[`appe87668cdbe1993aeb074e6a00063e177cb47ab89`,``],[`app0e62360aee4d031649050e7d4914940eed779dcd`,``],[1,`content`],[1,`content-inner`],[`id`,`standalone-applications`],[`appAnchor`,``,`id`,`getting-started`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`retrieving-providers-from-static-modules`],[1,`info`],[`appAnchor`,``,`id`,`retrieving-providers-from-dynamic-modules`],[`routerLink`,`/fundamentals/dynamic-modules`],[`appAnchor`,``,`id`,`terminating-phase`],[`routerLink`,`/fundamentals/lifecycle-events`],[`appAnchor`,``,`id`,`example`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/nestjs/nest/tree/master/sample/18-context`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/application-context.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,7,0)(2,`div`,8)(3,`h3`,9),DT(4,`Standalone applications`),cf(),Oa$1(5,`p`),DT(6,`There are several ways to mount a Nest application. You can create a web app, a microservice, or a bare Nest `),Oa$1(7,`strong`),DT(8,`standalone application`),cf(),DT(9,` (without any network listeners). A standalone application is a wrapper around the Nest `),Oa$1(10,`strong`),DT(11,`IoC container`),cf(),DT(12,`, which holds all instantiated classes. Through the standalone application object, you can obtain a reference to any existing instance from any imported module. This lets you take advantage of the Nest framework anywhere, including scripted `),Oa$1(13,`strong`),DT(14,`CRON`),cf(),DT(15,` jobs. You can even build a `),Oa$1(16,`strong`),DT(17,`CLI`),cf(),DT(18,` on top of it.`),cf(),Oa$1(19,`h4`,10)(20,`span`),DT(21,`Getting started`),cf()(),Oa$1(22,`p`),DT(23,`To create a Nest standalone application, use the following construction:`),cf(),Oa$1(24,`app-copy-button`,11)(25,`span`,12),Za$1(26,`app-tabs`,null,1),cf(),Oa$1(28,`pre`)(29,`code`,13),DT(30,`
46async function bootstrap() {
47  const app = await NestFactory.createApplicationContext(AppModule);
48  // your application logic here ...
49}
50await bootstrap();
51`),cf()()(),Oa$1(31,`h4`,14)(32,`span`),DT(33,`Retrieving providers from static modules`),cf
51()(),Oa$1(34,`p`),DT(35,`The standalone application object lets you obtain a reference to any instance registered within the Nest application. Imagine that a `),Oa$1(36,`code`),DT(37,`TasksService`),cf(),DT(38,` provider lives in a `),Oa$1(39,`code`),DT(40,`TasksModule`),cf(),DT(41,`, which is imported by `),Oa$1(42,`code`),DT(43,`AppModule`),cf(),DT(44,`. The class provides a set of methods that you want to call from within a CRON job.`),cf(),Oa$1(45,`app-copy-button`,11)(46,`span`,12),Za$1(47,`app-tabs`,null,2),cf(),Oa$1(49,`pre`)(50,`code`,13),DT(51,`
52const tasksService = app.get(TasksService);
53`),cf()()(),Oa$1(52,`p`),DT(53,`To access the `),Oa$1(54,`code`),DT(55,`TasksService`),cf(),DT(56,` instance, use the `),Oa$1(57,`code`),DT(58,`get()`),cf(),DT(59,` method. It acts like a `),Oa$1(60,`strong`),DT(61,`query`),cf(),DT(62,` that searches for an instance in each registered module, and accepts any provider's token. For strict context checking, pass an options object with the `),Oa$1(63,`code`),DT(64,`strict: true`),cf(),DT(65,` property. With this option in effect, you have to navigate to a specific module to obtain an instance from that selected context.`),cf(),Oa$1(66,`app-copy-button`,11)(67,`span`,12),Za$1(68,`app-tabs`,null,3),cf(),Oa$1(70,`pre`)(71,`code`,13),DT(72,`
54const tasksService = app.select(TasksModule).get(TasksService, { strict: true });
55`),cf()()(),Oa$1(73,`p`),DT(74,`The following table summarizes the methods available for retrieving instance references from the standalone application object.`),cf(),Oa$1(75,`table`)(76,`tr`)(77,`td`)(78,`code`),DT(79,`get()`),cf()(),Oa$1(80,`td`),DT(81,` Retrieves an instance of a controller or provider (including guards, filters, and so on) available in the application context. `),cf()(),Oa$1(82,`tr`)(83,`td`)(84,`code`),DT(85,`select()`),cf()(),Oa$1(86,`td`),DT(87,` Navigates through the module graph to pull out a specific instance of the selected module (used together with strict mode, as described above). `),cf()()(),Oa$1(88,`blockquote`,15)(89,`strong`),DT(90,`Hint`),cf(),DT(91,` In non-strict mode, the root module is selected by default. To select any other module, navigate the module graph manually, step by step.
56`),cf(),Oa$1(92,`p`),DT(93,`A standalone application does not have any network listeners, so Nest features tied to request handling (e.g., middleware, interceptors, pipes, and guards) are not available in this context.`),cf(),Oa$1(94,`p`),DT(95,`For example, even if you register a global interceptor in your application and then retrieve a controller instance with the `),Oa$1(96,`code`),DT(97,`app.get()`),cf(),DT(98,` method, the interceptor is not executed when you call the controller's methods.`),cf(),Oa$1(99,`h4`,16)(100,`span`),DT(101,`Retrieving providers from dynamic modules`),cf()(),Oa$1(102,`p`),DT(103,`When working with `),Oa$1(104,`a`,17),DT(105,`dynamic modules`),cf(),DT(106,`, pass `),Oa$1(107,`code`),DT(108,`app.select()`),cf(),DT(109,` the same object that represents the registered dynamic module in the application. For example:`),cf(),Oa$1(110,`app-copy-button`,11)(111,`span`,12),Za$1(112,`app-tabs`,null,4),cf(),Oa$1(114,`pre`)(115,`code`,13),DT(116,`
57export const dynamicConfigModule = ConfigModule.register({ folder: './config' });
58
59@Module({
60  imports: [dynamicConfigModule],
61})
62export class AppModule {}
63`),cf()()(),Oa$1(117,`p`),DT(118,`You can then select that module later on:`),cf(),Oa$1(119,`app-copy-button`,11)(120,`span`,12),Za$1(121,`app-tabs`,null,5),cf(),Oa$1(123,`pre`)(124,`code`,13),DT(125,`
64const configService = app.select(dynamicConfigModule).get(ConfigService, { strict: true });
65`),cf()()(),Oa$1(126,`h4`,18)(127,`span`),DT(128,`Terminating phase`),cf()(),Oa$1(129,`p`),DT(130,`If you want the Node.js process to exit after the script finishes (e.g., for a script running CRON jobs), call the `),Oa$1(131,`code`),DT(132,`app.close()`),cf(),DT(133,` method at the end of your `),Oa$1(134,`code`),DT(135,`bootstrap()`),cf(),DT(136,` function:`),cf(),Oa$1(137,`app-copy-button`,11)(138,`span`,12),Za$1(139,`app-tabs`,null,6),cf(),Oa$1(141,`pre`)(142,`code`,13),DT(143,`
66async function bootstrap() {
67  const app = await NestFactory.createApplicationContext(AppModule);
68  // application logic...
69  await app.close();
70}
71await bootstrap();
72`),cf()()(),Oa$1(144,`p`),DT(145,`As described in the `),Oa$1(146,`a`,19),DT(147,`lifecycle events`),cf(),DT(148,` chapter, calling `),Oa$1(149,`code`),DT(150,`app.close()`),cf(),DT(151,` triggers the shutdown lifecycle hooks.`),cf(),Oa$1(152,`h4`,20)(153,`span`),DT(154,`Example`),cf()(),Oa$1(155,`p`),DT(156,`A working example is available in the `),Oa$1(157,`a`,21),DT(158,`standalone application sample`),cf(),DT(159,` on GitHub.`),cf()(),Oa$1(160,`a`,22),Za$1(161,`i`,23),Oa$1(162,`span`),DT(163,`Edit on GitHub`),cf()()())},dependencies:[xt,tn$1,u,tu],encapsulation:2})}return o})();var Gr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-components`]],features:[My],decls:364,vars:24,consts:[[`contentReference`,``],[`app4f32a5f1b90c862880e6d55e29d9fcbce2341b4b`,``],[`appa8c8d958564edcfd6c4ecdcfaad73707a2e09af3`,``],[`app88935acfb0178ce458602735d523bda100cf0e7c`,``],[`app203e505468413cb3eb679b61ab2b1160ffee33d0`,``],[1,`content`],[1,`content-inner`],[`id`,`providers`],[`src`,`/assets/Components_1.png`,1,`illustrative-image`],[`routerLink`,`/modules`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/SOLID`],[`appAnchor`,``,`id`,`services`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Inversion_of_control`],[`appAnchor`,``,`id`,`dependency-injection`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev/guide/di`],[1,`warning`],[`href`,`/fundamentals/custom-providers#interfaces-and-abstract-classes`],[`appAnchor`,``,`id`,`scopes`],[`routerLink`,`/fundamentals/injection-scopes`],[`appAnchor`,``,`id`,`custom-providers`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`optional-providers`],[`appAnchor`,``,`id`,`property-based-injection`],[`appAnchor`,``,`id`,`provider-registration`],[1,`file-tree`],[1,`item`],[1,`children`],[`appAnchor`,``,`id`,`manual-instantiation`],[`routerLink`,`/fundamentals/module-ref`],[`routerLink`,`/standalone-applications`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/components.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,5,0)(2,`div`,6)(3,`h3`,7),DT(4,`Providers`),cf(),Oa$1(5,`p`),DT(6,`Providers are a core concept in Nest. Many of the basic Nest classes, such as services, repositories, factories, and helpers, can be treated as providers. The main idea behind a provider is that it can be `),Oa$1(7,`strong`),DT(8,`injected`),cf(),DT(9,` as a dependency, which lets objects form relationships with each other. The Nest runtime takes care of "wiring up" these objects.`),cf(),Oa$1(10,`figure`),Za$1(11,`img`,8),cf(),Oa$1(12,`p`),DT(13,`In the previous chapter, we built a basic `),Oa$1(14,`code`),DT(15,`CatsController`),cf(),DT(16,`. Controllers should handle HTTP requests and delegate more complex tasks to `),Oa$1(17,`strong`),DT(18,`providers`),cf(),DT(19,`. In their simplest form, providers are plain JavaScript classes listed in the `),Oa$1(20,`code`),DT(21,`providers`),cf(),DT(22,` array of a module. For more details, see the `),Oa$1(23,`a`,9),DT(24,`Modules`),cf(),DT(25,` chapter.`),cf(),Oa$1(26,`blockquote`,10)(27,`strong`),DT(28,`Hint`),cf(),DT(29,` Nest lets you design and organize dependencies in an object-oriented way, so it's good practice to follow the `),Oa$1(30,`a`,11),DT(31,`SOLID principles`),cf(),DT(32,`.
73`),cf(),Oa$1(33,`h4`,12)(34,`span`),DT(35,`Services`),cf()(),Oa$1(36,`p`),DT(37,`Let's start by creating a `),Oa$1(38,`code`),DT(39,`CatsService`),cf(),DT(40,`. This service handles data storage and retrieval for the `),Oa$1(41,`code`),DT(42,`CatsController`),cf(),DT(43,`. Because it encapsulates application logic, it's a natural candidate for a provider.`),cf(),Oa$1(44,`app-copy-button`,13)(45,`span`,14),DT(46),AT(47,`extension`),Za$1(48,`app-tabs`,null,1),cf(),Oa$1(50,`pre`)(51,`code`,15),DT(52,`
74import { Injectable } from '@nestjs/common';
75import type { Cat } from './interfaces/cat.interface.js';
76
77@Injectable()
78export class CatsService {
79  private readonly cats: Cat[] = [];
80
81  create(cat: Cat) {
82    this.cats.push(cat);
83  }
84
85  findAll(): Cat[] {
86    return this.cats;
87  }
88}
89`),cf()(),Oa$1(53,`pre`)(54,`code`,15),DT(55,`
90import { Injectable } from '@nestjs/common';
91
92@Injectable()
93export class CatsService {
94  constructor() {
95    this.cats = [];
96  }
97
98  create(cat) {
99    this.cats.push(cat);
100  }
101
102  findAll() {
103    return this.cats;
104  }
105}
106`),cf()()(),Oa$1(56,`blockquote`,10)(57,`strong`),DT(58,`Hint`),cf(),DT(59,` To create a service with the CLI, run `),Oa$1(60,`code`),DT(61,`$ nest g service cats`),cf(),DT(62,`.
107`),cf(),Oa$1(63,`p`)(64,`code`),DT(65,`CatsService`),cf(),DT(66,` is a basic class with one property and two methods. The key addition is the `),Oa$1(67,`code`),DT(68,`@Injectable()`),cf(),DT(69,` decorator. It attaches metadata to the class, declaring that `),Oa$1(70,`code`),DT(71,`CatsService`),cf(),DT(72,` can be managed by the Nest `),Oa$1(73,`a`,16),DT(74,`IoC`),cf(),DT(75,` container.`),cf(),Oa$1(76,`p`),DT(77,`The example also uses a `),Oa$1(78,`code`),DT(79,`Cat`),cf(),DT(80,` interface:`),cf(),Oa$1(81,`app-copy-button`,13)(82,`span`,14),DT(83),AT(84,`extension`),Za$1(85,`app-tabs`,null,2),cf(),Oa$1(87,`pre`)(88,`code`,15),DT(89,`
108export interface Cat {
109  name: string;
110  age: number;
111  breed: string;
112}
113`),cf()()(),Oa$1(90,`p`),DT(91,`Now that we have a service to store and retrieve cats, let's use it in the `),Oa$1(92,`code`),DT(93,`CatsController`),cf(),DT(94,`:`),cf(),Oa$1(95,`app-copy-button`,13)(96,`span`,14),DT(97),AT(98,`extension`),Za$1(99,`app-tabs`,null,3),cf(),Oa$1(101,`pre`)(102,`code`,15),DT(103,`
114import { Controller, Get, Post, Body } from '@nestjs/common';
115import { CreateCatDto } from './dto/create-cat.dto.js';
116import { CatsService } from './cats.service.js';
117import type { Cat } from './interfaces/cat.interface.js';
118
119@Controller('cats')
120export class CatsController {
121  constructor(private catsService: CatsService) {}
122
123  @Post()
124  async create(@Body() createCatDto: CreateCatDto) {
125    this.catsService.create(createCatDto);
126  }
127
128  @Get()
129  async findAll(): Promise<Cat[]> {
130    return this.catsService.findAll();
131  }
132}
133`),cf()(),Oa$1(104,`pre`)(105,`code`,15),DT(106,`
134import { Controller, Get, Post, Body, Bind, Dependencies } from '@nestjs/common';
135import { CatsService } from './cats.service.js';
136
137@Controller('cats')
138@Dependencies(CatsService)
139export class CatsController {
140  constructor(catsService) {
141    this.catsService = catsService;
142  }
143
144  @Post()
145  @Bind(Body())
146  async create(createCatDto) {
147    this.catsService.create(createCatDto);
148  }
149
150  @Get()
151  async findAll() {
152    return this.catsService.findAll();
153  }
154}
155`),cf()()(),Oa$1(107,`p`)(108,`code`),DT(109,`CatsService`),cf(),DT(110,` is `),Oa$1(111,`strong`),DT(112,`injected`),cf(),DT(113,` through the class constructor. The next section explains how Nest resolves it.`),cf(),Oa$1(114,`h4`,17)(115,`span`),DT(116,`Dependency injection`),cf()(),Oa$1(117,`p`),DT(118,`Nest is built around the `),Oa$1(119,`strong`),DT(120,`dependency injection`),cf(),DT(121,` design pattern. For an introduction to the concept, see the `),Oa$1(122,`a`,18),DT(123,`Angular documentation`),cf(),DT(124,`.`),cf(),Oa$1(125,`p`),DT(126,`Nest resolves dependencies by their type. In the example below, Nest resolves `),Oa$1(127,`code`),DT(128,`catsService`),cf(),DT(129,` by supplying an instance of `),Oa$1(130,`code`),DT(131,`CatsService`),cf(),DT(132,`. With the default (singleton) scope, Nest creates the instance once and shares it with every class that depends on it. Nest then passes the instance to the controller's constructor:`),cf(),Oa$1(133,`app-copy-button`)(134,`pre`)(135,`code`,15),DT(136,`
156constructor(private catsService: CatsService) {}
157`),cf()()(),Oa$1(137,`p`),DT(138,`This single line does two things:`),cf(),Oa$1(139,`ul`)(140,`li`),DT(141,`The `),Oa$1(142,`code`),DT(143,`private`),cf(),DT(144,` keyword makes `),Oa$1(145,`code`),DT(146,`catsService`),cf(),DT(147,` a TypeScript `),Oa$1(148,`strong`),DT(149,`parameter property`),cf(),DT(150,`: it declares a `),Oa$1(151,`code`),DT(152,`catsService`),cf(),DT(153,` member on the class and assigns the constructor argument to it, so you don't have to write `),Oa$1(154,`code`),DT(155,`this.catsService = catsService`),cf(),DT(156,` yourself.`),cf(),Oa$1(157,`li`),DT(158,`The `),Oa$1(159,`code`),DT(160,`CatsService`),cf(),DT(161,` type annotation is what Nest resolves against. At compile time, TypeScript emits the constructor's parameter types as metadata, and the container reads that metadata to determine which provider to supply.`),cf()(),Oa$1(162,`blockquote`,19)(163,`strong`),DT(164,`Warning`),cf(),DT(165,` Because resolution relies on the emitted type, the annotation must refer to something that exists at runtime, that is, a `),Oa$1(166,`strong`),DT(167,`class`),cf(),DT(168,`. Interfaces and type aliases are erased during compilation. If `),Oa$1(169,`code`),DT(170,`AppConfig`),cf(),DT(171,` is an interface, `),Oa$1(172,`code`),DT(173,`constructor(private config: AppConfig)`),cf(),DT(174,` leaves Nest with no token to look up, and the application fails at startup with a "Nest can't resolve dependencies" error. The same happens when you import a class with `),Oa$1(175,`code`),DT(176,`import type`),cf(),DT(177,`, because the import is erased as well. To inject something that isn't a class, register it under a token and inject it explicitly with `),Oa$1(178,`code`),DT(179,`@Inject()`),cf(),DT(180,`, as described in `),Oa$1(181,`a`,20),DT(182,`Custom providers`),cf(),DT(183,`.
158`),cf(),Oa$1(184,`h4`,21)(185,`span`),DT(186,`Scopes`),cf()(),Oa$1(187,`p`),DT(188,`By default, a provider's lifetime ("scope") matches the application lifecycle. When the application bootstraps, Nest resolves every dependency, which means every provider is instantiated. Likewise, when the application shuts down, every provider is destroyed. You can also give a provider a different scope, for example, make it `),Oa$1(189,`strong`),DT(190,`request-scoped`),cf(),DT(191,` so that its lifetime is tied to an individual request. See the `),Oa$1(192,`a`,22),DT(193,`Injection scopes`),cf(),DT(194,` chapter for details.`),cf(),Oa$1(195,`p`),Za$1(196,`app-banner-courses`),cf(),Oa$1(197,`h4`,23)(198,`span`),DT(199,`Custom providers`),cf()(),Oa$1(200,`p`),DT(201,`Nest has a built-in inversion of control (IoC) container that manages the relationships between providers. The container underpins dependency injection and supports more than the class-based providers shown so far: you can also define providers with plain values, classes, and synchronous or asynchronous factories. For examples, see the `),Oa$1(202,`a`,24),DT(203,`Custom providers`),cf(),DT(204,` chapter.`),cf(),Oa$1(205,`h4`,25)(206,`span`),DT(207,`Optional providers`),cf()(),Oa$1(208,`p`),DT(209,`Some dependencies are not always required. For example, a class might depend on a `),Oa$1(210,`strong`),DT(211,`configuration object`),cf(),DT(212,` but fall back to default values when none is provided. Such a dependency is optional, and its absence should not cause an error.`),cf(),Oa$1(213,`p`),DT(214,`To mark a dependency as optional, apply the `),Oa$1(215,`code`),DT(216,`@Optional()`),cf(),DT(217,` decorator to the constructor parameter:`),cf(),Oa$1(218,`app-copy-button`)(219,`pre`)(220,`code`,15),DT(221,`
159import { Injectable, Optional, Inject } from '@nestjs/common';
160
161@Injectable()
162export class HttpService<T> {
163  constructor(@Optional() @Inject('HTTP_OPTIONS') private httpClient: T) {}
164}
165`),cf()()(),Oa$1(222,`p`),DT(223,`This example injects a custom provider, so it passes the `),Oa$1(224,`
165code`),DT(225,`HTTP_OPTIONS`),cf(),DT(226,` custom `),Oa$1(227,`strong`),DT(228,`token`),cf(),DT(229,` to `),Oa$1(230,`code`),DT(231,`@Inject()`),cf(),DT(232,`. The previous examples used constructor-based injection, where each dependency is identified by its class in the constructor signature. For more on custom providers and their tokens, see the `),Oa$1(233,`a`,24),DT(234,`Custom providers`),cf(),DT(235,` chapter.`),cf(),Oa$1(236,`p`)(237,`code`),DT(238,`@Optional()`),cf(),DT(239,` only affects what happens when the provider is `),Oa$1(240,`em`),DT(241,`missing`),cf(),DT(242,`: if nothing is registered under `),Oa$1(243,`code`),DT(244,`HTTP_OPTIONS`),cf(),DT(245,`, Nest injects `),Oa$1(246,`code`),DT(247,`undefined`),cf(),DT(248,` instead of failing at startup. The class is therefore responsible for the fallback, typically by merging the injected value, if any, over a set of defaults.`),cf(),Oa$1(249,`h4`,26)(250,`span`),DT(251,`Property-based injection`),cf()(),Oa$1(252,`p`),DT(253,`The examples so far use constructor-based injection, where providers are injected through the constructor. In some cases, `),Oa$1(254,`strong`),DT(255,`property-based injection`),cf(),DT(256,` is more convenient. For example, if a base class depends on one or more providers, passing them up through `),Oa$1(257,`code`),DT(258,`super()`),cf(),DT(259,` from every subclass becomes cumbersome. Instead, you can apply the `),Oa$1(260,`code`),DT(2
16561,`@Inject()`),cf(),DT(262,` decorator directly to a property:`),cf(),Oa$1(263,`app-copy-button`)(264,`pre`)(265,`code`,15),DT(266,`
166import { Injectable, Inject } from '@nestjs/common';
167
168@Injectable()
169export class HttpService<T> {
170  @Inject('HTTP_OPTIONS')
171  private readonly httpClient: T;
172}
173`),cf()()(),Oa$1(267,`blockquote`,19)(268,`strong`),DT(269,`Warning`),cf(),DT(270,` If your class doesn't extend another class, prefer `),Oa$1(271,`strong`),DT(272,`constructor-based`),cf(),DT(273,` injection. The constructor states explicitly which dependencies the class requires, which makes the code easier to follow than properties annotated with `),Oa$1(274,`code`),DT(275,`@Inject()`),cf(),DT(276,`.
174`),cf(),Oa$1(277,`h4`,27)(278,`span`),DT(279,`Provider registration`),cf()(),Oa$1(280,`p`),DT(281,`With a provider (`),Oa$1(282,`code`),DT(283,`CatsService`),cf(),DT(284,`) and a consumer (`),Oa$1(285,`code`),DT(286,`CatsController`),cf(),DT(287,`) in place, you need to register the service with Nest so that it can perform the injection. To do so, add the service to the `),Oa$1(288,`code`),DT(289,`providers`),cf(),DT(290,` array of the `),Oa$1(291,`code`),DT(292,`@Module()`),cf(),DT(293,` decorator in the module file (`),Oa$1(294,`code`),DT(295,`app.module.ts`),cf(),DT(296,`):`),cf(),Oa$1(297,`app-copy-button`,13)(298,`span`,14),DT(299),AT(300,`extension`),Za$1(301,`app-tabs`,null,4),cf(),Oa$1(303,`pre`)(304,`code`,15),DT(305,`
175import { Module } from '@nestjs/common';
176import { CatsController } from './cats/cats.controller.js';
177import { CatsService } from './cats/cats.service.js';
178
179@Module({
180  controllers: [CatsController],
181  providers: [CatsService],
182})
183export class AppModule {}
184`),cf()()(),Oa$1(306,`p`),DT(307,`Nest can now resolve the dependencies of the `),Oa$1(308,`code`),DT(309,`CatsController`),cf(),DT(310,` class.`),cf(),Oa$1(311,`p`),DT(312,`The directory structure now looks like this:`),cf(),Oa$1(313,`div`,28)(314,`div`,29),DT(315,`src`),cf(),Oa$1(316,`div`,30)(317,`div`,29),DT(318,`cats`),cf(),Oa$1(319,`div`,30)(320,`div`,29),DT(321,`dto`),cf(),Oa$1(322,`div`,30)(323,`div`,29),DT(324,`create-cat.dto.ts`),cf()(),Oa$1(325,`div`,29),DT(326,`interfaces`),cf(),Oa$1(327,`div`,30)(328,`div`,29),DT(329,`cat.interface.ts`),cf()(),Oa$1(330,`div`,29),DT(331,`cats.controller.ts`),cf(),Oa$1(332,`div`,29),DT(333,`cats.service.ts`),cf()(),Oa$1(334,`div`,29),DT(335,`app.module.ts`),cf(),Oa$1(336,`div`,29),DT(337,`main.ts`),cf()()(),Oa$1(338,`h4`,31)(339,`span`),DT(340,`Manual instantiation`),cf()(),Oa$1(341,`p`),DT(342,`So far, Nest has resolved dependencies automatically. In some cases, you may need to step outside the dependency injection system and retrieve or instantiate providers manually. Two techniques cover these cases:`),cf(),Oa$1(343,`ul`)(344,`li`),DT(345,`To retrieve existing instances or instantiate providers dynamically, use `),Oa$1(346,`code`),DT(347,`ModuleRef`),cf(),DT(348,`, described in the `),Oa$1(349,`a`,32),DT(350,`Module reference`),cf(),DT(351,` chapter.`),cf(),Oa$1(352,`li`),DT(353,`To get providers within the `),Oa$1(354,`code`),DT(355,`bootstrap()`),cf(),DT(356,` function (e.g., for standalone applications or to use a configuration service during bootstrapping), see `),Oa$1(357,`a`,33),DT(358,`Standalone applications`),cf(),DT(359,`.`),cf()()(),Oa$1(360,`a`,34),Za$1(361,`i`,35),Oa$1(362,`span`),DT(363,`Edit on GitHub`),cf()()()),a&2){let l=QS(49),d=QS(86),m=QS(100),h=QS(302);UC(46),hf(` `,OT(47,12,`cats.service`,l.isJsActive),`
185`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(30),hf(` `,OT(84,15,`interfaces/cat.interface`,d.isJsActive),`
186`),UC(14),hf(` `,OT(98,18,`cats.controller`,m.isJsActive),`
187`),UC(4),By(`hide`,m.isJsActive),UC(3),By(`hide`,!m.isJsActive),UC(195),hf(` `,OT(300,21,`app.module`,h.isJsActive),`
188`)}},dependencies:[xt,tn$1,u,tu,l$1,g],encapsulation:2})}return o})();var Ur=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-controllers`]],features:[My],decls:1354,vars:128,consts:[[`contentReference`,``],[`app3695412cdbf024068faba2ef1186a9c730936609`,``],[`app6aec583011c7d3911251e6a4af97177939a8fef5`,``],[`appa098154c0b1e0372e5667524c24457faf4a2dd1d`,``],[`app4b3852679a271d3d6c9bdcc60a5dafc6de62cbba`,``],[`app10c0563a602cbd7f3bdf0b257a6c7795af06c55e`,``],[`appc67bd9dc96500213077a6df017270ba1aa9e5bfd`,``],[`appf490d3e6d812bd34e24600bbd5407d5efbbf5071`,``],[`appd57a49c3721dc76baec97946fe9a8f6e3e6c0f0c`,``],[`appa67c63a9a9756a751d0db37f0c83e479f646933e`,``],[`appb3d95a9fa2f44f200c36384818d986af41e04f65`,``],[`appa2cb366a567a633eb182d8713118b1cb618b1930`,``],[`appf4bedc0cf3866e0be38d304a5dad101dd75e7c0a`,``],[`app55245791a43b4378a1c01de04403377070bf9892`,``],[`app560b567fbfb1c75ae1ecd82c034f5c46036f5e3b`,``],[`app92532e8f3130aeacfb0c9b52f395ad200bff96d1`,``],[`app9f7a61e4c2aa865ea3a9ddac39243e0c70e3eaef`,``],[`appc18cc8eaa856c0899991f9dd7566987d6f2093c8`,``],[`app4d21be94c1c196badf834f066e7024881f23a497`,``],[`appb7a13d9a8c472f87f367782f63134ffe46be0b3b`,``],[1,`content`],[1,`content-inner`],[`id`,`controllers`],[`src`,`/assets/Controllers_1.png`,1,`illustrative-image`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/application/validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/recipes/crud-generator#crud-generator`],[`appAnchor`,``,`id`,`routing`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`href`,`controllers#status-code`],[`href`,`https://expressjs.com/en/api.html#res`,`rel`,`nofollow`,`target`,`_blank`],[1,`warning`],[`appAnchor`,``,`id`,`request-object`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/api.html#req`],[1,`table-code-asterisk`],[`routerLink`,`/techniques/cookie
188s`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`routerLink`,`/custom-decorators`],[`appAnchor`,``,`id`,`resources`],[`appAnchor`,``,`id`,`route-wildcards`],[`appAnchor`,``,`id`,`route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`status-code`],[`appAnchor`,``,`id`,`response-headers`],[`appAnchor`,``,`id`,`redirection`],[`appAnchor`,``,`id`,`route-parameters`],[`href`,`/controllers#route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`sub-domain-routing`],[`appAnchor`,``,`id`,`state-sharing`],[`routerLink`,`/fundamentals/injection-scopes`],[`appAnchor`,``,`id`,`asynchronicity`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://rxjs.dev/guide/observable`],[`appAnchor`,``,`id`,`request-payloads`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/application/validation#stripping-properties`],[`appAnchor`,``,`id`,`query-parameters`],[1,`language-plaintext`],[`routerLink`,`/pipes`],[`appAnchor`,``,`id`,`handling-errors`],[`routerLink`,`/exception-filters`],[`appAnchor`,``,`id`,`observing-routes-in-production`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[`routerLink`,`/observability/dashboard`],[`appAnchor`,``,`id`,`full-resource-sample`],[`routerLink`,`/recipes/crud-generator`],[`appAnchor`,``,`id`,`getting-up-and-running`],[`appAnchor`,``,`id`,`library-specific-approach`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/api.html#res`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/controllers.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,20,0)(2,`div`,21)(3,`h3`,22),DT(4,`Controllers`),cf(),Oa$1(5,`p`),DT(6,`Controllers are responsible for handling incoming `),Oa$1(7,`strong`),DT(8,`requests`),cf(),DT(9,` and sending `),Oa$1(10,`strong`),DT(11,`responses`),cf(),DT(12,` back to the client.`),cf(),Oa$1(13,`figure`),Za$1(14,`img`,23),cf(),Oa$1(15,`p`),DT(16,`A controller's purpose is to handle specific requests for the application. The `),Oa$1(17,`strong`),DT(18,`routing`),cf(),DT(19,` mechanism determines which controller handles each request. A controller often has multiple routes, and each route can perform a different action.`),cf(),Oa$1(20,`p`),DT(21,`To create a basic controller, you use classes and `),Oa$1(22,`strong`),DT(23,`decorators`),cf(),DT(24,`. Decorators associate classes with the required metadata, which Nest uses to build a routing map that connects requests to their corresponding controllers.`),cf(),Oa$1(25,`blockquote`,24)(26,`strong`),DT(27,`Hint`),cf(),DT(28,` To create a CRUD controller with built-in `),Oa$1(29,`a`,25),DT(30,`validation`),cf(),DT(31,`, use the CLI's `),Oa$1(32,`a`,26),DT(33,`CRUD generator`),cf(),DT(34,`: `),Oa$1(35,`code`),DT(36,`nest g resource [name]`),cf(),DT(37,`.
189`),cf(),Oa$1(38,`h4`,27)(39,`span`),DT(40,`Routing`),cf()(),Oa$1(41,`p`),DT(42,`The following example uses the `),Oa$1(43,`code`),DT(44,`@Controller()`),cf(),DT(45,` decorator, which is `),Oa$1(46,`strong`),DT(47,`required`),cf(),DT(48,` to define a basic controller, with an optional route path prefix of `),Oa$1(49,`code`),DT(50,`cats`),cf(),DT(51,`. A path prefix in the `),Oa$1(52,`code`),DT(53,`@Controller()`),cf(),DT(54,` decorator groups related routes and reduces repetitive code. For example, to group the routes that manage cat entities under the `),Oa$1(55,`code`),DT(56,`/cats`),cf(),DT(57,` path, specify the `),Oa$1(58,`code`),DT(59,`cats`),cf(),DT(60,` prefix in the `),Oa$1(61,`code`),DT(62,`@Controller()`),cf(),DT(63,` decorator. You then don't need to repeat that portion of the path for each route in the file.`),cf(),Oa$1(64,`app-copy-button`,28)(65,`span`,29),DT(66),AT(67,`extension`),Za$1(68,`app-tabs`,null,1),cf(),Oa$1(70,`pre`)(71,`code`,30),DT(72,`
190import { Controller, Get } from '@nestjs/common';
191
192@Controller('cats')
193export class CatsController {
194  @Get()
195  findAll(): string {
196    return 'This action returns all cats';
197  }
198}
199`),cf()(),Oa$1(73,`pre`)(74,`code`,30),DT(75,`
200import { Controller, Get } from '@nestjs/common';
201
202@Controller('cats')
203export class CatsController {
204  @Get()
205  findAll() {
206    return 'This action returns all cats';
207  }
208}
209`),cf()()(),Oa$1(76,`blockquote`,24)(77,`strong`),DT(78,`Hint`),cf(),DT(79,` To create a controller using the CLI, run the `),Oa$1(80,`code`),DT(81,`$ nest g controller [name]`),cf(),DT(82,` command.
210`),cf(),Oa$1(83,`p`),DT(84,`The `),Oa$1(85,`code`),DT(86,`@Get()`),cf(),DT(87,` HTTP request method decorator placed before the `),Oa$1(88,`code`),DT(89,`findAll()`),cf(),DT(90,` method tells Nest to create a handler for a specific endpoint. An endpoint is defined by the HTTP request method (GET in this case) and the route path. The route path of a handler combines the (optional) prefix declared for the controller `),Oa$1(91,`strong`),DT(92,`and`),cf(),DT(93,` any path specified in the method's decorator. Since the example sets a prefix (`),Oa$1(94,`code`),DT(95,`cats`),cf(),DT(96,`) and no path in the method decorator, Nest maps `),Oa$1(97,`code`),DT(98,`GET /cats`),cf(),DT(99,` requests to this handler.`),cf(),Oa$1(100,`p`),DT(101,`If the method decorator also specified a path, such as `),Oa$1(102,`code`),DT(103,`@Get('breed')`),cf(),DT(104,`, the resulting route would be `),Oa$1(105,`code`),DT(106,`GET /cats/breed`),cf(),DT(107,`.`),cf(),Oa$1(108,`p`),DT(109,`When a `),Oa$1(110,`code`),DT(111,`GET /cats`),cf(),DT(112,` request arrives, Nest routes it to the user-defined `),Oa$1(113,`code`),DT(114,`findAll()`),cf(),DT(115,` method. The method name is arbitrary: you must declare a method to bind the route to, but Nest attaches no significance to its name.`),cf(),Oa$1(116,`p`),DT(117,`This method returns a 200 status code along with the associated response, which in this case is a string. To explain why, we need to introduce the two `),Oa$1(118,`strong`),DT(119,`different`),cf(),DT(120,` options Nest provides for manipulating responses:`),cf(),Oa$1(121,`table`)(122,`tr`)(123,`td`),DT(124,`Standard (recommended)`),cf(),Oa$1(125,`td`),DT(126,` With this built-in method, when a route handler returns a JavaScript object or array, it is `),Oa$1(127,`strong`),DT(128,`automatically`),cf(),DT(129,` serialized to JSON. When it returns a JavaScript primitive type (e.g., `),Oa$1(130,`code`),DT(131,`string`),cf(),DT(132,`, `),Oa$1(133,`code`),DT(134,`number`),cf(),DT(135,`, `),Oa$1(136,`code`),DT(137,`boolean`),cf(),DT(138,`), Nest sends the value without attempting to serialize it. Response handling is therefore straightforward: return the value, and Nest takes care of the rest. `),Za$1(139,`br`)(140,`br`),DT(141,` The response's `),Oa$1(142,`strong`),DT(143,`status code`),cf(),DT(144,` is 200 by default, except for POST requests, which use 201. You can change this behavior by adding the `),Oa$1(145,`code`),DT(146,`@HttpCode(...)`),cf(),DT(147,` decorator at the handler level (see `),Oa$1(148,`a`,31),DT(149,`Status code`),cf(),DT(150,`). `),cf()(),Oa$1(151,`tr`)(152,`td`),DT(153,`Library-specific`),cf(),Oa$1(154,`td`),DT(155,` You can use the library-specific (e.g., Express) `),Oa$1(156,`a`,32),DT(157,`response object`),cf(),DT(158,`, injected with the `),Oa$1(159,`code`),DT(160,`@Res()`),cf(),DT(161,` decorator in the route handler signature (e.g., `),Oa$1(162,`code`),DT(163,`findAll(@Res() response)`),cf(),DT(164,`). This approach lets you use the native response handling methods exposed by that object. For example, with Express, you can construct responses with code like `),Oa$1(165,`code`),DT(166,`response.status(200).send()`),cf(),DT(167,`. `),cf()()(),Oa$1(168,`blockquote`,33)(169,`strong`),DT(170,`Warning`),cf(),DT(171,` Nest detects when a handler uses either `),Oa$1(172,`code`),DT(173,`@Res()`),cf(),DT(174,` or `),Oa$1(175,`code`),DT(176,`@Next()`),cf(),DT(177,`, which indicates that you have chosen the library-specific option. If both approaches are used at the same time, the standard approach is `),Oa$1(178,`strong`),DT(179,`automatically disabled`),cf(),DT(180,` for that route and no longer works as expected. To combine them (for example, to inject the response object only to set cookies or headers while leaving the rest to the framework), set the `),Oa$1(181,`code`),DT(182,`passthrough`),cf(),DT(183,` option to `),Oa$1(184,`code`),DT(185,`true`),cf(),DT(186,` in the `),Oa$1(187,`code`),DT(188),cf(),DT(189,` decorator.
211`),cf(),Oa$1(190,`p`),Za$1(191,`app-banner-devtools`),cf(),Oa$1(192,`h4`,34)(193,`span`),DT(194,`Request object`),cf()(),Oa$1(195,`p`),DT(196,`Handlers often need access to the client's `),Oa$1(197,`strong`),DT(198,`request`),cf(),DT(199,` details. Nest provides access to the `),Oa$1(200,`a`,35),DT(201,`request object`),cf(),DT(202,` of the underlying platform (Express by default). To access it, add the `),Oa$1(203,`code`),DT(204,`@Req()`),cf(),DT(205,` decorator to the handler's signature, which instructs Nest to inject it.`),cf(),Oa$1(206,`app-copy-button`,28)(207,`span`,29),DT(208),AT(209,`extension`),Za$1(210,`app-tabs`,null,2),cf(),Oa$1(212,`pre`)(213,`code`,30),DT(214,`
212import { Controller, Get, Req } from '@nestjs/common';
213import type { Request } from 'express';
214
215@Controller('cats')
216export class CatsController {
217  @Get()
218  findAll(@Req() request: Request): string {
219    return 'This action returns all cats';
220  }
221}
222`),cf()(),Oa$1(215,`pre`)(216,`code`,30),DT(217,`
223import { Controller, Bind, Get, Req } from '@nestjs/common';
224
225@Controller('cats')
226export class CatsController {
227  @Get()
228  @Bind(Req())
229  findAll(request) {
230    return 'This action returns all cats';
231  }
232}
233`),cf()()(),Oa$1(218,`blockquote`,24)(219,`strong`),DT(220,`Hint`),cf(),DT(221,` To take advantage of `),Oa$1(222,`code`),DT(223,`express`),cf(),DT(224,` typings (as in the `),Oa$1(225,`code`),DT(226,`request: Request`),cf(),DT(227,` parameter above), install the `),Oa$1(228,`code`),DT(229,`@types/express`),cf(),DT(230,` package.
234`),cf(),Oa$1(231,`p`),DT(232,`The request object represents the HTTP request and has properties for the query string, route parameters, HTTP headers, and body (see the `),Oa$1(233,`a`,35),DT(234,`Express documentation`),cf(),DT(235,`). In most cases, you don't need to access these properties manually. Instead, use dedicated decorators such as `),Oa$1(236,`code`),DT(237,`@Body()`),cf(),DT(238,` or `),Oa$1(239,`code`),DT(240,`@Query()`),cf(),DT(241,`, which are available out of the box. The following table lists the provided decorators and the platform-specific objects they represent.`),cf(),Oa$1(242,`table`)(243,`tbody`)(244,`tr`)(245,`td`)(246,`code`),DT(247,`@Request(), @Req()`),cf()(),Oa$1(248,`td`)(249,`code`),DT(250,`req`),cf()()(),Oa$1(251,`tr`)(252,`td`)(253,`code`),DT(254,`@Response(), @Res()`),cf(),Oa$1(255,`span`,36),DT(256,`*`),cf()(),Oa$1(257,`td`)(258,`code`),DT(259,`res`),cf()()(),Oa$1(260,`tr`)(261,`td`)(262,`code`),DT(2
vendor: 4,012 bytes, lines 234-244
23463,`@Next()`),cf()(),Oa$1(264,`td`)(265,`code`),DT(266,`next`),cf()()(),Oa$1(267,`tr`)(268,`td`)(269,`code`),DT(270,`@Session()`),cf()(),Oa$1(271,`td`)(272,`code`),DT(273,`req.session`),cf()()(),Oa$1(274,`tr`)(275,`td`)(276,`code`),DT(277,`@Param(key?: string)`),cf()(),Oa$1(278,`td`)(279,`code`),DT(280,`req.params`),cf(),DT(281,` / `),Oa$1(282,`code`),DT(283,`req.params[key]`),cf()()(),Oa$1(284,`tr`)(285,`td`)(286,`code`),DT(287,`@Body(key?: string)`),cf()(),Oa$1(288,`td`)(289,`code`),DT(290,`req.body`),cf(),DT(291,` / `),Oa$1(292,`code`),DT(293,`req.body[key]`),cf()()(),Oa$1(294,`tr`)(295,`td`)(296,`code`),DT(297,`@Query(key?: string)`),cf()(),Oa$1(298,`td`)(299,`code`),DT(300,`req.query`),cf(),DT(301,` / `),Oa$1(302,`code`),DT(303,`req.query[key]`),cf()()(),Oa$1(304,`tr`)(305,`td`)(306,`code`),DT(307,`@Headers(name?: string)`),cf()(),Oa$1(308,`td`)(309,`code`),DT(310,`req.headers`),cf(),DT(311,` / `),Oa$1(312,`code`),DT(313,`req.headers[name]`),cf()()(),Oa$1(314,`tr`)(315,`td`)(316,`code`),DT(317,`@Cookies(name?: string)`),cf()(),Oa$1(318,`td`),DT(319,`request cookies / the cookie named `),Oa$1(320,`code`),DT(321,`name`),cf(),DT(322,` (see `),Oa$1(323,`a`,37),DT(324,`Cookies`),cf(),DT(325,`)`),cf()(),Oa$1(326,`tr`)(327,`td`)(328,`code`),DT(329,`@SignedCookies(name?: string)`),cf()(),Oa$1(330,`td`),DT(331,`verified signed cookies / the signed cookie named `),Oa$1(332,`code`),DT(333,`name`),cf()()(),Oa$1(334,`tr`)(335,`td`)(336,`code`),DT(337,`@Ip()`),cf()(),Oa$1(338,`td`)(339,`code`),DT(340,`req.ip`),cf()()(),Oa$1(341,`tr`)(342,`td`)(343,`code`),DT(344,`@HostParam()`),cf()(),Oa$1(345,`td`)(346,`code`),DT(347,`req.hosts`),cf()()()()(),Oa$1(348,`p`)(349,`sup`),DT(350,`* `),cf(),DT(351,`For compatibility with typings across underlying HTTP platforms (e.g., Express and Fastify), Nest provides the `),Oa$1(352,`code`),DT(353,`@Res()`),cf(),DT(354,` and `),Oa$1(355,`code`),DT(356,`@Response()`),cf(),DT(357,` decorators. `),Oa$1(358,`code`),DT(359,`@Res()`),cf(),DT(360,` is an alias for `),Oa$1(361,`code`),DT(362,`@Response()`),cf(),DT(363,`. Both directly expose the native `),Oa$1(364,`code`),DT(365,`response`),cf(),DT(366,` object of the underlying platform. When using them, also install the typings for the underlying library (e.g., `),Oa$1(367,`code`),DT(368,`@types/express`),cf(),DT(369,`) to take full advantage of them. When you inject either `),Oa$1(370,`code`),DT(371,`@Res()`),cf(),DT(372,` or `),Oa$1(373,`code`),DT(374,`@Response()`),cf(),DT(375,` in a route handler, you put Nest into `),Oa$1(376,`strong`),DT(377,`library-specific mode`),cf(),DT(378,` for that handler, and you become responsible for managing the response. You must then send a response by calling a method on the `),Oa$1(379,`code`),DT(380,`response`),cf(),DT(381,` object (e.g., `),Oa$1(382,`code`),DT(383,`res.json(...)`),cf(),DT(384,` or `),Oa$1(385,`code`),DT(386,`res.send(...)`),cf(),DT(387,`); otherwise, the request will hang.`),cf(),Oa$1(388,`p`)(389,`code`),DT(390,`@Body()`),cf(),DT(391,`, `),Oa$1(392,`code`),DT(393,`@Query()`),cf(),DT(394,`, `),Oa$1(395,`code`),DT(396,`@Param()`),cf(),DT(397,`, and `),Oa$1(398,`code`),DT(399,`@RawBody()`),cf(),DT(400,` also accept an options object with `),Oa$1(401,`code`),DT(402,`schema`),cf(),DT(403,` and `),Oa$1(404,`code`),DT(405,`pipes`),cf(),DT(406,` properties. This lets you attach `),Oa$1(407,`a`,38),DT(408,`Standard Schema`),cf(),DT(409,` compatible schemas, such as those created with Zod, Valibot, or ArkType, directly to route parameters.`),cf(),Oa$1(410,`app-copy-button`)(411,`pre`)(412,`code`,30),DT(413,`
235@Post()
236create(@Body({ schema: createCatSchema }) createCatDto: CreateCatDto) {
237  return this.catsService.create(createCatDto);
238}
239
240@Get(':id')
241findOne(@Param('id', { schema: z.coerce.number().int().positive() }) id: number) {
242  return this.catsService.findOne(id);
243}
244`),cf()()(),Oa$1(414,`p`),DT(415,`On their own, these decorators only attach the schema as metadata. To validate against it, register the built-in `),Oa$1(4
24416,`code`),DT(417,`StandardSchemaValidationPipe`),cf(),DT(418,` or a custom pipe that reads `),Oa$1(419,`code`),DT(420,`metadata.schema`),cf(),DT(421,`.`),cf(),Oa$1(422,`blockquote`,24)(423,`strong`),DT(424,`Hint`),cf(),DT(425,` To learn how to create your own decorators, see the `),Oa$1(426,`a`,39),DT(427,`Custom route decorators`),cf(),DT(428,` chapter.
245`),cf(),Oa$1(429,`h4`,40)(430,`span`),DT(431,`Resources`),cf()(),Oa$1(432,`p`),DT(433,`Earlier, we defined an endpoint to fetch the cats resource (`),Oa$1(434,`strong`),DT(435,`GET`),cf(),DT(436,` route). Typically, we also want an endpoint that creates new records. Let's add a `),Oa$1(437,`strong`),DT(438,`POST`),cf(),DT(439,` handler:`),cf(),Oa$1(440,`app-copy-button`,28)(441,`span`,29),DT(442),AT(443,`extension`),Za$1(444,`app-tabs`,null,3),cf(),Oa$1(446,`pre`)(447,`code`,30),DT(448,`
246import { Controller, Get, Post } from '@nestjs/common';
247
248@Controller('cats')
249export class CatsController {
250  @Post()
251  create(): string {
252    return 'This action adds a new cat';
253  }
254
255  @Get()
256  findAll(): string {
257    return 'This action returns all cats';
258  }
259}
260`),cf()(),Oa$1(449,`pre`)(450,`code`,30),DT(451,`
261import { Controller, Get, Post } from '@nestjs/common';
262
263@Controller('cats')
264export class CatsController {
265  @Post()
266  create() {
267    return 'This action adds a new cat';
268  }
269
270  @Get()
271  findAll() {
272    return 'This action returns all cats';
273  }
274}
275`),cf()()(),Oa$1(452,`p`),DT(453,`Nest provides decorators for all standard HTTP methods: `),Oa$1(454,`code`),DT(455,`@Get()`),cf(),DT(456,`, `),Oa$1(457,`code`),DT(458,`@Post()`),cf(),DT(459,`, `),Oa$1(460,`code`),DT(461,`@Put()`),cf(),DT(462,`, `),Oa$1(463,`code`),DT(464,`@Delete()`),cf(),DT(465,`, `),Oa$1(466,`code`),DT(467,`@Patch()`),cf(),DT(468,`, `),Oa$1(469,`code`),DT(470,`@Options()`),cf(),DT(471,`, `),Oa$1(472,`code`),DT(473,`@Head()`),cf(),DT(474,`, and `),Oa$1(475,`code`),DT(476,`@QueryMethod()`),cf(),DT(477,`. The last one maps to the `),Oa$1(478,`code`),DT(479,`QUERY`),cf(),DT(480,` method; it is named `),Oa$1(481,`code`),DT(482,`QueryMethod`),cf(),DT(483,` to avoid a clash with the `),Oa$1(484,`code`),DT(485,`@Query()`),cf(),DT(486,` parameter decorator. In addition, `),Oa$1(487,`code`),DT(488,`@All()`),cf(),DT(489,` defines an endpoint that handles all of them.`),cf(),Oa$1(490,`h4`,41)(491,`span`),DT(492,`Route wildcards`),cf()(),Oa$1(493,`p`),DT(494,`Nest also supports pattern-based routes. For example, an asterisk (`),Oa$1(495,`code`),DT(496,`*`),cf(),DT(497,`) at the end of a path acts as a wildcard that matches any combination of characters. In the following example, the `),Oa$1(498,`code`),DT(499,`findAll()`),cf(),DT(500,` method is executed for any route that starts with `),Oa$1(501,`code`),DT(502,`abcd/`),cf(),DT(503,`, regardless of the number of characters that follow.`),cf(),Oa$1(504,`app-copy-button`)(505,`pre`)(506,`code`,30),DT(507,`
276@Get('abcd/*')
277findAll() {
278  return 'This route uses a wildcard';
279}
280`),cf()()(),Oa$1(508,`p`),DT(509,`The `),Oa$1(510,`code`),DT(511,`'abcd/*'`),cf(),DT(512,` route path matches `),Oa$1(513,`code`),DT(514,`abcd/`),cf(),DT(515,`, `),Oa$1(516,`code`),DT(517,`abcd/123`),cf(),DT(518,`, `),Oa$1(519,`code`),DT(520,`abcd/abc`),cf(),DT(521,`, and so on. In string-based paths, the hyphen (`),Oa$1(522,`code`),DT(523,`-`),cf(),DT(524,`) and the dot (`),Oa$1(525,`code`),DT(526,`.`),cf(),DT(527,`) are interpreted literally.`),cf(),Oa$1(528,`p`),DT(529,`This approach works with both Express and Fastify. Express v5, however, made its routing stricter: in plain Express, a wildcard must be named for the route to work (e.g., `),Oa$1(530,`code`),DT(531),cf(),DT(532,`, where `),Oa$1(533,`code`),DT(534,`splat`),cf(),DT(535,` is an arbitrary name for the wildcard parameter with no special meaning). Because Nest provides a compatibility layer for Express, you can still use an unnamed asterisk (`),Oa$1(536,`code`),DT(537,`*`),cf(),DT(538,`) as a wildcard.`),cf(),Oa$1(539,`p`),DT(540,`For asterisks in the `),Oa$1(541,`strong`),DT(542,`middle of a route`),cf(),DT(543,`, Express requires named wildcards (e.g., `),Oa$1(544,`co
280de`),DT(545),cf(),DT(546,`), while Fastify does not support them at all.`),cf(),Oa$1(547,`h4`,42)(548,`span`),DT(549,`Route conflicts and resolution order`),cf()(),Oa$1(550,`p`),DT(551,`Nest registers routes in declaration order. On order-sensitive adapters, such as the default Express adapter, a parametric route can therefore silently shadow a more specific one:`),cf(),Oa$1(552,`app-copy-button`)(553,`pre`)(554,`code`,30),DT(555,`
281@Controller('users')
282export class UsersController {
283  @Get(':id')
284  findOne() {}
285
286  @Get('me') // never reached: \`:id\` matches "me" first
287  findMe() {}
288}
289`),cf()()(),Oa$1(556,`p`),DT(557,`This is easy to miss: the application boots without a warning, and the problem only surfaces at runtime, when a request is dispatched to the wrong handler. Pipes such as `),Oa$1(558,`code`),DT(559,`ParseIntPipe`),cf(),DT(560,` do not help here, because routing selects the handler `),Oa$1(561,`em`),DT(562,`before`),cf(),DT(563,` any pipe runs.`),cf(),Oa$1(564,`p`),DT(565,`NestJS v12 adds two opt-in `),Oa$1(566,`code`),DT(567,`NestApplicationOptions`),cf(),DT(568,` properties that guard against this. Both default to the previous behavior, so existing applications are unaffected unless you set them.`),cf(),Oa$1(569,`p`)(570,`strong`)(571,`code`),DT(572,`routeConflictPolicy`),cf()(),DT(573,` enables bootstrap-time diagnostics. For each kind of conflict, it takes a severity of `),Oa$1(574,`code`),DT(575,`'off'`),cf(),DT(576,` (the default), `),Oa$1(577,`code`),DT(578,`'warn'`),cf(),DT(579,`, or `),Oa$1(580,`code`),DT(581,`'error'`),cf(),DT(582,`:`),cf(),Oa$1(583,`app-copy-button`)(584,`pre`)(585,`code`,30),DT(586,`
290const app = await NestFactory.create(AppModule, {
291  routeConflictPolicy: { duplicate: 'error', shadow: 'warn' },
292});
293`),cf()()(),Oa$1(587,`table`)(588,`tr`)(589,`td`)(590,`code`),DT(591,`duplicate`),cf()(),Oa$1(592,`td`),DT(593,`Two routes share an identical method, path, host, and version.`),cf()(),Oa$1(594,`tr`)(595,`td`)(596,`code`),DT(597,`shadow`),cf()(),Oa$1(598,`td`),DT(599,`Two route patterns can match the same request (e.g., `),Oa$1(600,`code`),DT(601,`/users/me`),cf(),DT(602,` and `),Oa$1(603,`code`),DT(604,`/users/:id`),cf(),DT(605,`).`),cf()()(),Oa$1(606,`p`),DT(607,`With `),Oa$1(608,`code`),DT(609,`'error'`),cf(),DT(610,`, all offending pairs are aggregated into a single `),Oa$1(611,`code`),DT(612,`RouteConflictException`),cf(),DT(613,`, thrown when the application initializes (in `),Oa$1(614,`code`),DT(615,`app.init()`),cf(),DT(616,`, or in `),Oa$1(617,`code`),DT(618,`app.listen()`),cf(),DT(619,` if you don't call `),Oa$1(620,`code`),DT(621,`init()`),cf(),DT(622,` explicitly). This way, you see every conflict at once rather than one per restart.`),cf(),Oa$1(623,`p`)(624,`strong`)(625,`code`),DT(626,`routeResolutionStrategy`),cf()(),DT(627,` controls registration order. Setting it to `),Oa$1(628,`code`),DT(629,`'specificity'`),cf(),DT(630,` registers the most specific routes first (literal segments take precedence over parametric segments, which take precedence over wildcards), so the example above works regardless of declaration order:`),cf(),Oa$1(631,`app-copy-button`)(632,`pre`)(633,`code`,30),DT(634,`
294const app = await NestFactory.create(AppModule, {
295  routeResolutionStrategy: 'specificity',
296});
297`),cf()()(),Oa$1(635,`p`),DT(636,`The default is `),Oa$1(637,`code`),DT(638,`'declaration'`),cf(),DT(639,`, which preserves the previous behavior.`),cf(),Oa$1(640,`blockquote`,24)(641,`strong`),DT(642,`Hint`),cf(),DT(643,` Apart from the `),Oa$1(644,`code`),DT(645,`duplicate`),cf(),DT(646,` policy, these options only matter on adapters where registration order affects matching. `),Oa$1(647,`code`),DT(648,`ExpressAdapter`),cf(),DT(649,` is order-sensitive; `),Oa$1(650,`code`),DT(651,`FastifyAdapter`),cf(),DT(652,` is not, because its router (`),Oa$1(653,`code`),DT(654,`find-my-way`),cf(),DT(655,`) already ranks routes by specificity. On Fastify, the `),Oa$1(656,`code`),DT(657,`shadow`),cf(),DT(658,` policy is a no-op and `),Oa$1(659,`code`),DT(660,`'specificity'`),cf(),DT(661,` sorting has no effect, while the `),Oa$1(662,`code`),DT(663,`duplicate`),cf(),DT(664,` policy is honored on both adapters. The `),Oa$1(665,`code`),DT(666,`RouteConflictPolicy`),cf(),DT(667,`, `),Oa$1(668,`code`),DT(669,`RouteConflictPolicyLevel`),cf(),DT(670,`, and `),Oa$1(671,`code`),DT(672,`RouteResolutionStrategy`),cf(),DT(673,` types are exported from `),Oa$1(674,`code`),DT(675,`@nestjs/common`),cf(),DT(676,`.
298`),cf(),Oa$1(677,`h4`,43)(678,`span`),DT(679,`Status code`),cf()(),Oa$1(680,`p`),DT(681,`As mentioned, the default response `),Oa$1(682,`strong`),DT(683,`status code`),cf(),DT(684,` is `),Oa$1(685,`strong`),DT(686,`200`),cf(),DT(687,`, except for POST requests, which default to `),Oa$1(688,`strong`),DT(689,`201`),cf(),DT(690,`. You can change this behavior with the `),Oa$1(691,`code`),DT(692,`@HttpCode(...)`),cf(),DT(693,` decorator at the handler level.`),cf(),Oa$1(694,`app-copy-button`)(695,`pre`)(696,`code`,30),DT(697,`
299@Post()
300@HttpCode(204)
301create() {
302  return 'This action adds a new cat';
303}
304`),cf()()(),Oa$1(698,`blockquote`,24)(699,`strong`),DT(700,`Hint`),cf(),DT(701,` Import `),Oa$1(702,`code`),DT(703,`HttpCode`),cf(),DT(704,` from the `),Oa$1(705,`code`),DT(706,`@nestjs/common`),cf(),DT(707,` package.
305`),cf(),Oa$1(708,`p`),DT(709,`Often, the status code isn't static but depends on various factors. In that case, use a library-specific `),Oa$1(710,`strong`),DT(711,`response`),cf(),DT(712,` object (injected with `),Oa$1(713,`code`),DT(714,`@Res()`),cf(),DT(715,`) or, in case of an error, throw an exception.`),cf(),Oa$1(716,`h4`,44)(717,`span`),DT(718,`Response headers`),cf()(),Oa$1(719,`p`),DT(720,`To set a custom response header, use either the `),Oa$1(721,`code`),DT(722,`@Header()`),cf(),DT(723,` decorator or a library-specific response object (and call `),Oa$1(724,`code`),DT(725,`res.header()`),cf(),DT(726,` directly).`),cf(),Oa$1(727,`app-copy-button`)(728,`pre`)(729,`code`,30),DT(730,`
306@Post()
307@Header('Cache-Control', 'no-store')
308create() {
309  return 'This action adds a new cat';
310}
311`),cf()()(),Oa$1(731,`blockquote`,24)(732,`strong`),DT(733,`Hint`),cf(),DT(734,` Import `),Oa$1(735,`code`),DT(736,`Header`),cf(),DT(737,` from the `),Oa$1(738,`code`),DT(739,`@nestjs/common`),cf(),DT(740,` package.
312`),cf(),Oa$1(741,`h4`,45)(742,`span`),DT(743,`Redirection`),cf()(),Oa$1(744,`p`),DT(745,`To redirect a response to a specific URL, use either the `),Oa$1(746,`code`),DT(747,`@Redirect()`),cf(),DT(748,` decorator or a library-specific response object (and call `),Oa$1(749,`code`),DT(750,`res.redirect()`),cf(),DT(751,` directly).`),cf(),Oa$1(752,`p`)(753,`code`),DT(754,`@Redirect()`),cf(),DT(755,` takes two optional arguments, `),Oa$1(756,`code`),DT(757,`url`),
312cf(),DT(758,` and `),Oa$1(759,`code`),DT(760,`statusCode`),cf(),DT(761,`. If omitted, `),Oa$1(762,`code`),DT(763,`statusCode`),cf(),DT(764,` defaults to `),Oa$1(765,`code`),DT(766,`302`),cf(),DT(767,` (`),Oa$1(768,`code`),DT(769,`Found`),cf(),DT(770,`).`),cf(),Oa$1(771,`app-copy-button`)(772,`pre`)(773,`code`,30),DT(774,`
313@Get()
314@Redirect('https://nestjs.com', 301)
315`),cf()()(),Oa$1(775,`blockquote`,24)(776,`strong`),DT(777,`Hint`),cf(),DT(778,` To determine the HTTP status code or the redirect URL dynamically, return an object that follows the `),Oa$1(779,`code`),DT(780,`HttpRedirectResponse`),cf(),DT(781,` interface (exported from `),Oa$1(782,`code`),DT(783,`@nestjs/common`),cf(),DT(784,`).
316`),cf(),Oa$1(785,`p`),DT(786,`Returned values override any arguments passed to the `),Oa$1(787,`code`),DT(788,`@Redirect()`),cf(),DT(789,` decorator. For example:`),cf(),Oa$1(790,`app-copy-button`,28)(791,`span`,29),Za$1(792,`app-tabs`,null,4),cf(),Oa$1(794,`pre`)(795,`code`,30),DT(796,`
317@Get('docs')
318@Redirect('https://docs.nestjs.com', 302)
319getDocs(@Query('version') version) {
320  if (version && version === '5') {
321    return { url: 'https://docs.nestjs.com/v5/' };
322  }
323}
324`),cf()(),Oa$1(797,`pre`)(798,`code`,30),DT(799,`
325@Get('docs')
326@Redirect('https://docs.nestjs.com', 302)
327@Bind(Query('version'))
328getDocs(version) {
329  if (version && version === '5') {
330    return { url: 'https://docs.nestjs.com/v5/' };
331  }
332}
333`),cf()()(),Oa$1(800,`h4`,46)(801,`span`),DT(802,`Route parameters`),cf()(),Oa$1(803,`p`),DT(804,`Routes with static paths don't work when you need to accept `),Oa$1(805,`strong`),DT(806,`dynamic data`),cf(),DT(807,` as part of the request (e.g., `),Oa$1(808,`code`),DT(809,`GET /cats/1`),cf(),DT(810,` to get the cat with id `),Oa$1(811,`code`),DT(812,`1`),cf(),DT(813,`). To define a route with parameters, add route parameter `),Oa$1(814,`strong`),DT(815,`tokens`),cf(),DT(816,` to the route path to capture the dynamic values from the URL, as the `),Oa$1(817,`code`),DT(818,`@Get()`),cf(),DT(819,` decorator in the example below shows. You can then access these route parameters with the `),Oa$1(820,`code`),DT(821,`@Param()`),cf(),DT(822,` decorator, added to the method signature.`),cf(),Oa$1(823,`blockquote`,24)(824,`strong`),DT(825,`Hint`),cf(),DT(826,` Declare routes with parameters after any static paths, so that the parameterized path doesn't intercept traffic destined for the static one. See `),Oa$1(827,`a`,47),DT(828,`Route conflicts and resolution order`),cf(),DT(829,` for the options that detect this at bootstrap or resolve it for you.
334`),cf(),Oa$1(830,`app-copy-button`,28)(831,`span`,29),Za$1(832,`app-tabs`,null,5),cf(),Oa$1(834,`pre`)(835,`code`,30),DT(836,`
335@Get(':id')
336findOne(@Param() params: any): string {
337  console.log(params.id);
338  return \`This action returns a #\${params.id} cat\`;
339}
340`),cf()(),Oa$1(837,`pre`)(838,`code`,30),DT(839,`
341@Get(':id')
342@Bind(Param())
343findOne(params) {
344  console.log(params.id);
345  return \`This action returns a #\${params.id} cat\`;
346}
347`),cf()()(),Oa$1(840,`p`),DT(841,`The `),Oa$1(842,`code`),DT(843,`@Param()`),cf(),DT(844,` decorator decorates a method parameter (`),Oa$1(845,`code`),DT(846,`params`),cf(),DT(847,` in the example above), making the `),Oa$1(848,`strong`),DT(849,`route`),cf(),DT(850,` parameters available as properties of that parameter inside the method. As the code shows, you access the `),Oa$1(851,`code`),DT(852,`id`),cf(),DT(853,` parameter as `),Oa$1(854,`code`),DT(855,`params.id`),cf(),DT(856,`. Alternatively, pass a specific parameter token to the decorator and reference the route parameter directly by name in the method body.`),cf(),Oa$1(857,`blockquote`,24)(858,`strong`),DT(859,`Hint`),cf(),DT(860,` Import `),Oa$1(861,`code`),DT(862,`Param`),cf(),DT(863,` from the `),Oa$1(864,`code`),DT(865,`@nestjs/common`),cf(),DT(866,` package.
348`),cf(),Oa$1(867,`app-copy-button`,28)(868,`span`,29),Za$1(869,`app-tabs`,null,6),cf(),Oa$1(871,`pre`)(872,`code`,30),DT(873,`
349@Get(':id')
350findOne(@Param('id') id: string): string {
351  return \`This action returns a #\${id} cat\`;
352}
353`),cf()(),Oa$1(874,`pre`)(875,`code`,30),DT(876,`
354@Get(':id')
355@Bind(Param('id'))
356findOne(id) {
357  return \`This action returns a #\${id} cat\`;
358}
359`),cf()()(),Oa$1(877,`h4`,48)(878,`span`),DT(879,`Sub-domain routing`),cf()(),Oa$1(880,`p`),DT(881,`The `),Oa$1(882,`code`),DT(883,`@Controller()`),cf(),DT(884,` decorator can take a `),Oa$1(885,`code`),DT(886,`host`),cf(),DT(887,` option to require that the HTTP host of incoming requests matches a specific value.`),cf(),Oa$1(888,`app-copy-button`,28)(889,`span`,29),DT(890),AT(891,`extension`),Za$1(892,`app-tabs`,null,7),cf(),Oa$1(894,`pre`)(895,`code`,30),DT(896,`
360@Controller({ host: 'admin.example.com' })
361export class AdminController {
362  @Get()
363  index(): string {
364    return 'Admin page';
365  }
366}
367`),cf()(),Oa$1(897,`pre`)(898,`code`,30),DT(899,`
368@Controller({ host: 'admin.example.com' })
369export class AdminController {
370  @Get()
371  index() {
372    return 'Admin page';
373  }
374}
375`),cf()()(),Oa$1(900,`blockquote`,33)(901,`strong`),DT(902,`Warning`),cf(),DT(903,` Since `),Oa$1(904,`strong`),DT(905,`Fastify`),cf
vendor: 5,103 bytes, lines 375-419
375(),DT(906,` does not support nested routers, use the default Express adapter if you rely on sub-domain routing.
376`),cf(),Oa$1(907,`p`),DT(908,`Like a route `),Oa$1(909,`code`),DT(910,`path`),cf(),DT(911,`, the `),Oa$1(912,`code`),DT(913,`host`),cf(),DT(914,` option can use tokens to capture the dynamic value at that position in the host name, as the host parameter token in the `),Oa$1(915,`code`),DT(916,`@Controller()`),cf(),DT(917,` decorator below shows. You can access host parameters declared this way with the `),Oa$1(918,`code`),DT(919,`@HostParam()`),cf(),DT(920,` decorator, added to the method signature.`),cf(),Oa$1(921,`app-copy-button`,28)(922,`span`,29),DT(923),AT(924,`extension`),Za$1(925,`app-tabs`,null,8),cf(),Oa$1(927,`pre`)(928,`code`,30),DT(929,`
377@Controller({ host: ':account.example.com' })
378export class AccountController {
379  @Get()
380  getInfo(@HostParam('account') account: string) {
381    return account;
382  }
383}
384`),cf()(),Oa$1(930,`pre`)(931,`code`,30),DT(932,`
385@Controller({ host: ':account.example.com' })
386export class AccountController {
387  @Get()
388  @Bind(HostParam('account'))
389  getInfo(account) {
390    return account;
391  }
392}
393`),cf()()(),Oa$1(933,`h4`,49)(934,`span`),DT(935,`State sharing`),cf()(),Oa$1(936,`p`),DT(937,`Developers coming from other programming languages may be surprised to learn that in Nest, nearly everything is shared across incoming requests. This includes resources such as the database connection pool, singleton services with global state, and more. Node.js doesn't follow the request/response multi-threaded stateless model, in which each request is handled by a separate thread. As a result, using singleton instances in Nest is fully `),Oa$1(938,`strong`),DT(939,`safe`),cf(),DT(940,`.`),cf(),Oa$1(941,`p`),DT(942,`That said, some edge cases may require request-based lifetimes for controllers, such as per-request caching in GraphQL applications, request tracking, or multi-tenancy. To learn how to control this, see `),Oa$1(943,`a`,50),DT(944,`Injection scopes`),cf(),DT(945,`.`),cf(),Oa$1(946,`h4`,51)(947,`span`),DT(948,`Asynchronicity`),cf()(),Oa$1(949,`p`),DT(950,`Modern JavaScript relies heavily on `),Oa$1(951,`strong`),DT(952,`asynchronous`),cf(),DT(953,` data handling, and Nest fully supports `),Oa$1(954,`code`),DT(955,`async`),cf(),DT(956,` functions. An `),Oa$1(957,`code`),DT(958,`async`),cf(),DT(959,` function always returns a `),Oa$1(960,`code`),DT(961,`Promise`),cf(),DT(962,`, so a route handler can return a deferred value that Nest resolves automatically:`),cf(),Oa$1(963,`app-copy-button`,28)(964,`span`,29),DT(965),AT(966,`extension`),Za$1(967,`app-tabs`,null,9),cf(),Oa$1(969,`pre`)(970,`code`,30),DT(971,`
394@Get()
395async findAll(): Promise<any[]> {
396  return [];
397}
398`),cf()(),Oa$1(972,`pre`)(973,`code`,30),DT(974,`
399@Get()
400async findAll() {
401  return [];
402}
403`),cf()()(),Oa$1(975,`p`),DT(976,`Route handlers can also return RxJS `),Oa$1(977,`a`,52),DT(978,`observable streams`),cf(),DT(979,`. Nest subscribes to the stream internally and resolves the last emitted value once the stream completes.`),cf(),Oa$1(980,`app-copy-button`,28)(981,`span`,29),DT(982),AT(983,`extension`),Za$1(984,`app-tabs`,null,10),cf(),Oa$1(986,`pre`)(987,`code`,30),DT(988,`
404@Get()
405findAll(): Observable<any[]> {
406  return of([]);
407}
408`),cf()(),Oa$1(989,`pre`)(990,`code`,30),DT(991,`
409@Get()
410findAll() {
411  return of([]);
412}
413`),cf()()(),Oa$1(992,`p`),DT(993,`Both approaches are valid; choose the one that best suits your needs.`),cf(),Oa$1(994,`h4`,53)(995,`span`),DT(996,`Request payloads`),cf()(),Oa$1(997,`p`),DT(998,`The POST route handler in the previous example didn't accept any client parameters. Let's fix that by adding the `),Oa$1(999,`code`),DT(1e3,`@Body()`),cf(),DT(1001,` decorator.`),cf(),Oa$1(1002,`p`),DT(1003,`Before we proceed (if you're using TypeScript), we need to define the `),Oa$1(1004,`strong`),DT(1005,`DTO`),cf(),DT(1006,` (Data Transfer Object) schema. A DTO is an object that defines the shape of data sent over the network. You could define the DTO schema using `),Oa$1(1007,`strong`),DT(1008,`TypeScript`),cf(),DT(1009,` interfaces or plain classes, but `),Oa$1(1010,`strong`),DT(1011,`classes`),cf(),DT(1012,` are the recommended choice. Classes are part of the JavaScript ES6 standard, so they are preserved as real entities in the compiled JavaScript. TypeScript interfaces, by contrast, are removed during transpilation, so Nest can't reference them at runtime. This matters because features such as `),Oa$1(1013,`strong`),DT(1014,`pipes`),cf(),DT(1015,` rely on access to the metatype of variables at runtime, which is only possible with classes.`),cf(),Oa$1(1016,`p`),DT(1017,`Create the `),Oa$1(1018,`code`),DT(1019,`CreateCatDto`),cf(),DT(1020,` class:`),cf(),Oa$1(1021,`app-copy-button`,28)(1022,`span`,29),DT(1023),AT(1024,`extension`),Za$1(1025,`app-tabs`,null,11),cf(),Oa$1(1027,`pre`)(1028,`code`,30),DT(1029,`
414export class CreateCatDto {
415  name: string;
416  age: number;
417  breed: string;
418}
419`),cf()()(),Oa$1(1030,`p`),DT(1031,`It has three basic properties. We can now use the new DTO inside the `),Oa$1(1032,`co
419de`),DT(1033,`CatsController`),cf(),DT(1034,`:`),cf(),Oa$1(1035,`app-copy-button`,28)(1036,`span`,29),DT(1037),AT(1038,`extension`),Za$1(1039,`app-tabs`,null,12),cf(),Oa$1(1041,`pre`)(1042,`code`,30),DT(1043,`
420@Post()
421async create(@Body() createCatDto: CreateCatDto) {
422  return 'This action adds a new cat';
423}
424`),cf()(),Oa$1(1044,`pre`)(1045,`code`,30),DT(1046,`
425@Post()
426@Bind(Body())
427async create(createCatDto) {
428  return 'This action adds a new cat';
429}
430`),cf()()(),Oa$1(1047,`blockquote`,24)(1048,`strong`),DT(1049,`Hint`),cf(),DT(1050,` The `),Oa$1(1051,`code`),DT(1052,`ValidationPipe`),cf(),DT(1053,` can filter out properties that the route handler should not receive. You whitelist the acceptable properties, and any property not in the whitelist is automatically stripped from the resulting object. In the `),Oa$1(1054,`code`),DT(1055,`CreateCatDto`),cf(),DT(1056,` example, the whitelist consists of the `),Oa$1(1057,`code`),DT(1058,`name`),cf(),DT(1059,`, `),Oa$1(1060,`code`),DT(1061,`age`),cf(),DT(1062,`, and `),Oa$1(1063,`code`),DT(1064,`breed`),cf(),DT(1065,` properties. Learn more in `),Oa$1(1066,`a`,54),DT(1067,`Stripping properties`),cf(),DT(1068,`.
431`),cf(),Oa$1(1069,`h4`,55)(1070,`span`),DT(1071,`Query parameters`),cf()(),Oa$1(1072,`p`),DT(1073,`To extract query parameters from incoming requests, use the `),Oa$1(1074,`code`),DT(1075,`@Query()`),cf(),DT(1076,` decorator.`),cf(),Oa$1(1077,`p`),DT(1078,`Consider a route that filters a list of cats by query parameters such as `),Oa$1(1079,`code`),DT(1080,`age`),cf(),DT(1081,` and `),Oa$1(1082,`code`),DT(1083,`breed`),cf(),DT(1084,`. First, define the query parameters in the `),Oa$1(1085,`code`),DT(1086,`CatsController`),cf(),DT(1087,`:`),cf(),Oa$1(1088,`app-copy-button`,28)(1089,`span`,29),DT(1090),AT(1091,`extension`),Za$1(1092,`app-tabs`,null,13),cf(),Oa$1(1094,`pre`)(1095,`code`,30),DT(1096,`
432@Get()
433async findAll(@Query('age') age: number, @Query('breed') breed: string) {
434  return \`This action returns all cats filtered by age: \${age} and breed: \${breed}\`;
435}
436`),cf()(),Oa$1(1097,`pre`)(1098,`code`,30),DT(1099,`
437@Get()
438@Bind(Query('age'), Query('breed'))
439async findAll(age, breed) {
440  return \`This action returns all cats filtered by age: \${age} and breed: \${breed}\`;
441}
442`),cf()()(),Oa$1(1100,`p`),DT(1101,`In this example, the `),Oa$1(1102,`code`),DT(1103,`@Query()`),cf(),DT(1104,` decorator extracts the values of `),Oa$1(1105,`code`),DT(1106,`age`),cf(),DT(1107,` and `),Oa$1(1108,`code`),DT(1109,`breed`),cf(),DT(1110,` from the query string. For example, a request to:`),cf(),Oa$1(1111,`pre`)(1112,`code`,56),DT(1113,`
443GET /cats?age=2&breed=Persian
444`),cf()(),Oa$1(1114,`p`),DT(1115,`results in `),Oa$1(1116,`code`),DT(1117,`age`),cf(),DT(1118,` being `),Oa$1(1119,`code`),DT(1120,`'2'`),cf(),DT(1121,` and `),Oa$1(1122,`code`),DT(1123,`breed`),cf(),DT(1124,` being `),Oa$1(1125,`code`),DT(1126,`'Persian'`),cf(),DT(1127,`. Query parameter values arrive as strings, and the `),Oa$1(1128,`code`),DT(1129,`number`),cf(),DT(1130,` type annotation alone doesn't convert them. To receive a number, apply a pipe such as `),Oa$1(1131,`code`),DT(1132,`ParseIntPipe`),cf(),DT(1133,` (see `),Oa$1(1134,`a`,57),DT(1135,`Pipes`),cf(),DT(1136,`).`),cf(),Oa$1(1137,`p`),DT(1138,`If your application needs to handle more complex query parameters, such as nested objects or arrays:`),cf(),Oa$1(1139,`pre`)(1140,`code`,56),DT(1141,`
445?filter[where][name]=John&filter[where][age]=30
446?item[]=1&item[]=2
447`),cf()(),Oa$1(1142,`p`),DT(1143,`configure your HTTP adapter (Express or Fastify) to use an appropriate query parser. In Express, use the `),Oa$1(1144,`code`),DT(1145,`extended`),cf(),DT(1146,` parser, which supports rich query objects:`),cf(),Oa$1(1147,`app-copy-button`,28)(1148,`span`,29),DT(1149),AT(1150,`extension`),Za$1(1151,`app-tabs`,null,14),cf(),Oa$1(1153,`pre`)(1154,`code`,30),DT(1155,`
448const app = await NestFactory.create<NestExpressApplication>(AppModule);
449app.set('query parser', 'extended');
450`),cf()(),Oa$1(1156,`pre`)(1157,`code`,30),DT(1158,`
451const app = await NestFactory.create(AppModule);
452app.set('query parser', 'extended');
453`),cf()()(),Oa$1(1159,`p`),DT(1160,`In Fastify, use the `),Oa$1(1161,`code`),DT(1162,`querystringParser`),cf(),DT(1163,` option:`),cf(),Oa$1(1164,`app-copy-button`,28)(1165,`span`,29),DT(1166),AT(1167,`extension`),Za$1(1168,`app-tabs`,null,15),cf(),Oa$1(1170,`pre`)(1171,`code`,30),DT(1172,`
454const app = await NestFactory.create<NestFastifyApplication>(
455  AppModule,
456  new FastifyAdapter({
457    querystringParser: (str) => qs.parse(str),
458  }),
459);
460`),cf()(),Oa$1(1173,`pre`)(1174,`code`,30),DT(1175,`
461const app = await NestFactory.create(
462  AppModule,
463  new FastifyAdapter({
464    querystringParser: (str) => qs.parse(str),
465  }),
466);
467`),cf()()(),Oa$1(1176,`blockquote`,24)(1177,`strong`),DT(1178,`Hint`),cf(),Oa$1(1179,`code`),DT(1180,`qs`),cf(),DT(1181,` is a query string parser that supports nesting and arrays. Install it with `),Oa$1(1182,`code`),DT(1183,`npm install qs`),cf(),DT(1184,`.
468`),cf(),Oa$1(1185,`h4`,58)(1186,`span`),DT(1187,`Handling errors`),cf()(),Oa$1(1188,`p`),DT(1189,`Handling errors (i.e., working with exceptions) is covered in the `),Oa$1(1190,`a`,59),DT(1191,`Exception filters`),cf(),DT(1192,` chapter.`),cf(),Oa$1(1193,`h4`,60)(1194,`span`),DT(1195,`Observing routes in production`),cf()(),Oa$1(1196,`p`),DT(1197,`A controller that behaves perfectly on your machine can behave very differently under real traffic. In production, the question is never "does this route work?" but "why did `),Oa$1(1198,`code`),DT(1199,`GET /cats/:id`),cf(),DT(1200,` go from 40 ms to 900 ms after Tuesday's deploy, and is it every request or one unlucky tenant?"`),cf(),Oa$1(1201,`p`),DT(1202,`Route handlers are the natural unit for answering that question, and `),Oa$1(1203,`a`,61),DT(1204,`NestJS Observe`),cf(),DT(1205,` reports on exactly that unit. Because the `),Oa$1(1206,`code`),DT(1207,`@nestjs/observe`),cf(),DT(1208,` SDK hooks into Nest's own request lifecycle rather than wrapping the HTTP server, every measurement is labeled with the route pattern you declared (`),Oa$1(1209,`code`),DT(1210,`GET /cats/:id`),cf(),DT(1211,`, not 10,000 distinct URLs). Each route is therefore a single line you can sort, chart, and alert on:`),cf(),Oa$1(1212,`app-copy-button`)(1213,`pre`)(1214,`code`,30),DT(1215,`
469const app = await NestFactory.create(AppModule, {
470  instrument: ObserveInstrument,
471});
472`),cf()()(),Oa$1(1216,`p`),DT(1217,`Together with importing `),Oa$1(1218,`code`),DT(1219,`ObserveModule.forRoot()`),cf(),DT(1220,` into your root module, that is the whole integration. From there, a slow route is three clicks away: sort the route list by p95; open the operation to see whether the regression is constant or spiky and whether it started with a release; then open one slow execution and read its waterfall to see which controller, service method, or query held the time. Time is attributed per `),Oa$1(1221,`strong`),DT(1222,`class and method`),cf(),DT(1223,`, with awaited time subtracted, so `),Oa$1(1224,`code`),DT(1225,`CatsService.findOne()`),cf(),DT(1226,` spending 800 ms in its own code is immediately distinguishable from `),Oa$1(1227,`code`),DT(1228,`CatsService.findOne()`),cf(),DT(1229,` waiting 800 ms on the database.`),cf(),Oa$1(1230,`p`),DT(1231,`See the `),Oa$1(1232,`a`,62),DT(1233,`Observability`),cf(),DT(1234,` chapter to get set up, and `),Oa$1(1235,`a`,63),DT(1236,`Dashboard`),cf(),DT(1237,` for the full walk from an alert down to a single request.`),cf(),Oa$1(1238,`h4`,64)(1239,`span`),DT(1240,`Full resource sample`),cf()(),Oa$1(1241,`p`),DT(1242,`The following example uses several of the available decorators to create a basic controller. The controller exposes a few methods to access and manipulate internal data.`),cf(),Oa$1(1243,`app-copy-button`,28)(1244,`span`,29),DT(1245),AT(1246,`extension`),Za$1(1247,`app-tabs`,null,16),cf(),Oa$1(1249,`pre`)(1250,`code`,30),DT(1251,`
473import { Controller, Get, Query, Post, Body, Put, Param, Delete } from '@nestjs/common';
474import { CreateCatDto, UpdateCatDto, ListAllEntities } from './dto.js';
475
476@Controller('cats')
477export class CatsController {
478  @Post()
479  create(@Body() createCatDto: CreateCatDto) {
480    return 'This action adds a new cat';
481  }
482
483  @Get()
484  findAll(@Query() query: ListAllEntities) {
485    return \`This action returns all cats (limit: \${query.limit} items)\`;
486  }
487
488  @Get(':id')
489  findOne(@Param('id') id: string) {
490    return \`This action returns a #\${id} cat\`;
491  }
492
493  @Put(':id')
494  update(@Param('id') id: string, @Body() updateCatDto: UpdateCatDto) {
495    return \`This action updates a #\${id} cat\`;
496  }
497
498  @Delete(':id')
499  remove(@Param('id') id: string) {
500    return \`This action removes a #\${id} cat\`;
501  }
502}
503`),cf()(),Oa$1(1252,`pre`)(1253,`code`,30),DT(1254,`
504import { Controller, Get, Query, Post, Body, Put, Param, Delete, Bind } from '@nestjs/common';
505
506@Controller('cats')
507export class CatsController {
508  @Post()
509  @Bind(Body())
510  create(createCatDto) {
511    return 'This action adds a new cat';
512  }
513
514  @Get()
515  @Bind(Query())
516  findAll(query) {
517    return \`This action returns all cats (limit: \${query.limit} items)\`;
518  }
519
520  @Get(':id')
521  @Bind(Param('id'))
522  findOne(id) {
523    return \`This action returns a #\${id} cat\`;
524  }
525
526  @Put(':id')
527  @Bind(Param('id'), Body())
528  update(id, updateCatDto) {
529    return \`This action updates a #\${id} cat\`;
530  }
531
532  @Delete(':id')
533  @Bind(Param('id'))
534  remove(id) {
535    return \`This action removes a #\${id} cat\`;
536  }
537}
538`),cf()()(),Oa$1(1255,`blockquote`,24)(1256,`strong`),DT(1257,`Hint`),cf(),DT(1258,` The Nest CLI provides a generator (schematic) that automatically creates `),Oa$1(1259,`strong`),DT(1260,`all the boilerplate code`),cf(),DT(1261,`, so you don't have to write it manually. Learn more in the `),Oa$1(1262,`a`,65),DT(1263,`CRUD generator`),cf(),DT(1264,` recipe.
539`),cf(),Oa$1(1265,`h4`,66)(1266,`span`),DT(1267,`Getting up and running`),cf()(),Oa$1(1268,`p`),DT(1269,`Even with `),Oa$1(1270,`code`),DT(1271,`CatsController`),cf(),DT(1272,` fully defined, Nest doesn't know about it yet and won't create an instance of the class.`),cf(),Oa$1(1273,`p`),DT(1274,`Controllers must al
539ways belong to a module, which is why we include the `),Oa$1(1275,`code`),DT(1276,`controllers`),cf(),DT(1277,` array in the `),Oa$1(1278,`code`),DT(1279,`@Module()`),cf(),DT(1280,` decorator. Since we haven't defined any modules other than the root `),Oa$1(1281,`code`),DT(1282,`AppModule`),cf(),DT(1283,`, we'll use it to register `),Oa$1(1284,`code`),DT(1285,`CatsController`),cf(),DT(1286,`:`),cf(),Oa$1(1287,`app-copy-button`,28)(1288,`span`,29),DT(1289),AT(1290,`extension`),Za$1(1291,`app-tabs`,null,17),cf(),Oa$1(1293,`pre`)(1294,`code`,30),DT(1295,`
540import { Module } from '@nestjs/common';
541import { CatsController } from './cats/cats.controller.js';
542
543@Module({
544  controllers: [CatsController],
545})
546export class AppModule {}
547`),cf()()(),Oa$1(1296,`p`),DT(1297,`With this metadata attached to the module class through the `),Oa$1(1298,`code`),DT(1299,`@Module()`),cf(),DT(1300,` decorator, Nest can determine which controllers to mount.`),cf(),Oa$1(1301,`h4`,67)(1302,`span`),DT(1303,`Library-specific approach`),cf()(),Oa$1(1304,`p`),DT(1305,`So far, we've covered the standard Nest way of manipulating responses. The alternative is to use a library-specific `),Oa$1(1306,`a`,68),DT(1307,`response object`),cf(),DT(1308,`, injected with the `),Oa$1(1309,`code`),DT(1310,`@Res()`),cf(),DT(1311,` decorator. To highlight the differences, let's rewrite `),Oa$1(1312,`code`),DT(1313,`CatsController`),cf(),DT(1314,` as follows:`),cf(),Oa$1(1315,`app-copy-button`,28)(1316,`span`,29),Za$1(1317,`app-tabs`,null,18),cf(),Oa$1(1319,`pre`)(1320,`code`,30),DT(1321,`
548import { Controller, Get, Post, Res, HttpStatus } from '@nestjs/common';
549import type { Response } from 'express';
550
551@Controller('cats')
552export class CatsController {
553  @Post()
554  create(@Res() res: Response) {
555    res.status(HttpStatus.CREATED).send();
556  }
557
558  @Get()
559  findAll(@Res() res: Response) {
560    res.status(HttpStatus.OK).json([]);
561  }
562}
563`),cf()(),Oa$1(1322,`pre`)(1323,`code`,30),DT(1324,`
564import { Controller, Get, Post, Bind, Res, HttpStatus } from '@nestjs/common';
565
566@Controller('cats')
567export class CatsController {
568  @Post()
569  @Bind(Res())
570  create(res) {
571    res.status(HttpStatus.CREATED).send();
572  }
573
574  @Get()
575  @Bind(Res())
576  findAll(res) {
577    res.status(HttpStatus.OK).json([]);
578  }
579}
580`),cf()()(),Oa$1(1325,`p`),DT(1326,`This approach offers more flexibility by giving full control over the response object (e.g., header manipulation and access to library-specific features), but it should be used with caution. It is generally less clear and has some downsides. The main disadvantage is that your code becomes platform-dependent, since different underlying libraries may expose different APIs on the response object. It also makes testing harder, as you need to mock the response object, among other things.`),cf(),Oa$1(1327,`p`),DT(1328,`In addition, this approach loses compatibility with Nest features that rely on standard response handling, such as interceptors and the `),Oa$1(1329,`code`),DT(1330,`@HttpCode()`),cf(),DT(1331,` / `),Oa$1(1332,`code`),DT(1333,`@Header()`),cf(),DT(1334,` decorators. To address this, enable the `),Oa$1(1335,`code`),DT(1336,`passthrough`),cf(),DT(1337,` option:`),cf(),Oa$1(1338,`app-copy-button`,28)(1339,`span`,29),Za$1(1340,`app-tabs`,null,19),cf(),Oa$1(1342,`pre`)(1343,`code`,30),DT(1344,`
581@Get()
582findAll(@Res({ passthrough: true }) res: Response) {
583  res.status(HttpStatus.OK);
584  return [];
585}
586`),cf()(),Oa$1(1345,`pre`)(1346,`code`,30),DT(1347,`
587@Get()
588@Bind(Res({ passthrough: true }))
589findAll(res) {
590  res.status(HttpStatus.OK);
591  return [];
592}
593`),cf()()(),Oa$1(1348,`p`),DT(1349,`This way, you can interact with the native response object (for example, to set cookies or headers based on specific conditions) while leaving the rest to the framework.`),cf()(),Oa$1(1350,`a`,69),Za$1(1351,`i`,70),Oa$1(1352,`span`),DT(1353,`Edit on GitHub`),cf()()()),a&2){let l=QS(69),d=QS(211),m=QS(445),h=QS(793),u=QS(833),b=QS(870),S=QS(893),k=QS(926),C=QS(968),w=QS(985),P=QS(1026),F=QS(1040),J=QS(1093),V=QS(1152),Z=QS(1169),$=QS(1248),Ie=QS(1292),le=QS(1318),te=QS(1341);UC(66),hf(` `,OT(67,86,`cats.controller`,l.isJsActive),`
594`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(115),Wy(`@Res(`,`{`,` passthrough: true `,`}
594`,`)`),UC(20),hf(` `,OT(209,89,`cats.controller`,d.isJsActive),`
595`),UC(4),By(`hide`,d.isJsActive),UC(3),By(`hide`,!d.isJsActive),UC(227),hf(` `,OT(443,92,`cats.controller`,m.isJsActive),`
596`),UC(4),By(`hide`,m.isJsActive),UC(3),By(`hide`,!m.isJsActive),UC(82),hf(`abcd/`,`{`,`*splat}`),UC(14),hf(`ab`,`{`,`*splat}cd`),UC(249),By(`hide`,h.isJsActive),UC(3),By(`hide`,!h.isJsActive),UC(37),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(34),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive),UC(16),hf(` `,OT(891,95,`admin.controller`,S.isJsActive),`
597`),UC(4),By(`hide`,S.isJsActive),UC(3),By(`hide`,!S.isJsActive),UC(26),hf(` `,OT(924,98,`account.controller`,k.isJsActive),`
598`),UC(4),By(`hide`,k.isJsActive),UC(3),By(`hide`,!k.isJsActive),UC(35),hf(` `,OT(966,101,`cats.controller`,C.isJsActive),`
599`),UC(4),By(`hide`,C.isJsActive),UC(3),By(`hide`,!C.isJsActive),UC(10),hf(` `,OT(983,104,`cats.controller`,w.isJsActive),`
600`),UC(4),By(`hide`,w.isJsActive),UC(3),By(`hide`,!w.isJsActive),UC(34),hf(` `,OT(1024,107,`create-cat.dto`,P.isJsActive),`
601`),UC(14),hf(` `,OT(1038,110,`cats.controller`,F.isJsActive),`
602`),UC(4),By(`hide`,F.isJsActive),UC(3),By(`hide`,!F.isJsActive),UC(46),hf(` `,OT(1091,113,`cats.controller`,J.isJsActive),`
603`),UC(4),By(`hide`,J.isJsActive),UC(3),By(`hide`,!J.isJsActive),UC(52),hf(` `,OT(1150,116,`main`,V.isJsActive),`
604`),UC(4),By(`hide`,V.isJsActive),UC(3),By(`hide`,!V.isJsActive),UC(10),hf(` `,OT(1167,119,`main`,Z.isJsActive),`
605`),UC(4),By(`hide`,Z.isJsActive),UC(3),By(`hide`,!Z.isJsActive),UC(72),hf(` `,OT(1246,122,`cats.controller`,$.isJsActive),`
606`),UC(4),By(`hide`,$.isJsActive),UC(3),By(`hide`,!$.isJsActive),UC(37),hf(` `,OT(1290,125,`app.module`,Ie.isJsActive),`
607`),UC(30),By(`hide`,le.isJsActive),UC(3),By(`hide`,!le.isJsActive),UC(20),By(`hide`,te.isJsActive),UC(3),By(`hide`,!te.isJsActive)}},dependencies:[xt,tn$1,u,s,tu,g],encapsulation:2})}return o})();var Wr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-custom-decorators`]],features:[My],decls:334,vars:32,consts:[[`contentReference`,``],[`app06d8dd177acbf5022d48aef3c46180d78f8ac000`,``],[`app31418ad885cdc12645ed8e925b5996d5b71cbffe`,``],[`app168ccd2581e7b77f191288612af357d0841a5380`,``],[`app5287b177ba9dbc9bd1b6972766fd95529273eda8`,``],[`appb3cc6f0c0551e734a13be35eaa54c69be6ef93db`,``],[`appfbf0e0450a3a80c25aac8fca1826c02b2e44a014`,``],[1,`content`],[1,`content-inner`],[`id`,`custom-route-decorators`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841`],[1,`external`],[`appAnchor`,``,`id`,`param-decorators`],[1,`language-typescript`],[1,`with-heading`],[1,`filename`],[`appAnchor`,``,`id`,`passing-data`],[`href`,`/security/authentication#read-the-current-user`],[1,`language-json`],[1,`info`],[`appAnchor`,``,`id`,`working-with-pipes`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`href`,`/application/validation#validating-custom-decorators`],[`appAnchor`,``,`id`,`decorator-composition`],[1,`warning`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/custom-decorators.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,7,0)(2,`div`,8)(3,`h3`,9),DT(4,`Custom route decorators`),cf(),Oa$1(5,`p`),DT(6,`Nest is built around a language feature called `),Oa$1(7,`strong`),DT(8,`decorators`),cf(),DT(9,`. Decorators are well established in many programming languages but are still relatively new to JavaScript. For a deeper look at how decorators work, see `),Oa$1(10,`a`,10),DT(11,`this article`),cf(),DT(12,`. Here's a simple definition:`),cf(),Oa$1(13,`blockquote`,11),DT(14,` An ES2016 decorator is an expression which returns a function and can take a target, name and property descriptor as arguments. You apply it by prefixing the decorator with an `),Oa$1(15,`code`),DT(16,`@`),cf(),DT(17,` character and placing this at the very top of what you are trying to decorate. Decorators can be defined for either a class, a method or a property.
608`),cf(),Oa$1(18,`h4`,12)(19,`span`),DT(20,`Param decorators`),cf()(),Oa$1(21,`p`),DT(22,`Nest provides a set of `),Oa$1(23,`strong`),DT(24,`param decorators`),cf(),DT(25,` that you can use in HTTP route handlers. The following table lists them along with the plain Express (or Fastify) objects they represent:`),cf(),Oa$1(26,`table`)(27,`tbody`)(28,`tr`)(29,`td`)(30,`code`),DT(31,`@Request
608(), @Req()`),cf()(),Oa$1(32,`td`)(33,`code`),DT(34,`req`),cf()()(),Oa$1(35,`tr`)(36,`td`)(37,`code`),DT(38,`@Response(), @Res()`),cf()(),Oa$1(39,`td`)(40,`code`),DT(41,`res`),cf()()(),Oa$1(42,`tr`)(43,`td`)(44,`code`),DT(45,`@Next()`),cf()(),Oa$1(46,`td`)(47,`code`),DT(48,`next`),cf()()(),Oa$1(49,`tr`)(50,`td`)(51,`code`),DT(52,`@Session()`),cf()(),Oa$1(53,`td`)(54,`code`),DT(55,`req.session`),cf()()(),Oa$1(56,`tr`)(57,`td`)(58,`code`),DT(59,`@Param(param?: string)`),cf()(),Oa$1(60,`td`)(61,`code`),DT(62,`req.params`),cf(),DT(63,` / `),Oa$1(64,`code`),DT(65,`req.params[param]`),cf()()(),Oa$1(66,`tr`)(67,`td`)(68,`code`),DT(69,`@Body(param?: string)`),cf()(),Oa$1(70,`td`)(71,`code`),DT(72,`req.body`),cf(),DT(73,` / `),Oa$1(74,`code`),DT(75,`req.body[param]`),cf()()(),Oa$1(76,`tr`)(77,`td`)(78,`code`),DT(79,`@Query(param?: string)`),cf()(),Oa$1(80,`td`)(81,`code`),DT(82,`req.query`),cf(),DT(83,` / `),Oa$1(84,`code`),DT(85,`req.query[param]`),cf()()(),Oa$1(86,`tr`)(87,`td`)(88,`code`),DT(89,`@Headers(param?: string)`),cf()(),Oa$1(90,`td`)(91,`code`),DT(92,`req.headers`),cf(),DT(93,` / `),Oa$1(94,`code`),DT(95,`req.headers[param]`),cf()()(),Oa$1(96,`tr`)(97,`td`)(98,`code`),DT(99,`@Ip()`),cf()(),Oa$1(100,`td`)(101,`code`),DT(102,`req.ip`),cf()()(),Oa$1(103,`tr`)(104,`td`)(105,`code`),DT(106,`@HostParam(param?: string)`),cf()(),Oa$1(107,`td`)(108,`code`),DT(109,`req.hosts`),cf(),DT(110,` / `),Oa$1(111,`code`),DT(112,`req.hosts[param]`),cf()()()()(),Oa$1(113,`p`),DT(114,`You can also create your own `),Oa$1(115,`strong`),DT(116,`custom decorators`),cf(),DT(117,`. To see why this is useful, consider a common pattern in Node.js applications: properties are attached to the `),Oa$1(118,`strong`),DT(119,`request`),cf(),DT(120,` object and then extracted manually in each route handler, with code like the following:`),cf(),Oa$1(121,`app-copy-button`)(122,`pre`)(123,`code`,13),DT(124,`
609const user = req.user;
610`),cf()()(),Oa$1(125,`p`),DT(126,`To make your code more readable and transparent, you can create a `),Oa$1(127,`code`),DT(128,`@User()`),cf(),DT(129,` decorator and reuse it across all of your controllers:`),cf(),Oa$1(130,`app-copy-button`,14)(131,`span`,15),DT(132),AT(133,`extension`),Za$1(134,`app-tabs`,null,1),cf(),Oa$1(136,`pre`)(137,`code`,13),DT(138,`
611import { createParamDecorator, ExecutionContext } from '@nestjs/common';
612
613export const User = createParamDecorator(
614  (data: unknown, ctx: ExecutionContext) => {
615    const request = ctx.switchToHttp().getRequest();
616    return request.user;
617  },
618);
619`),cf()()(),Oa$1(139,`p`),DT(140,`You can then use it wherever you need it:`),cf(),Oa$1(141,`app-copy-button`,14)(142,`span`,15),Za$1(143,`app-tabs`,null,2),cf(),Oa$1(145,`pre`)(146,`code`,13),DT(147,`
620@Get()
621async findOne(@User() user: UserEntity) {
622  console.log(user);
623}
624`),cf()(),Oa$1(148,`pre`)(149,`code`,13),DT(150,`
625@Get()
626@Bind(User())
627async findOne(user) {
628  console.log(user);
629}
630`),cf()()(),Oa$1(151,`h4`,16)(152,`span`),DT(153,`Passing data`),cf()(),Oa$1(154,`p`),DT(155,`When the behavior of your decorator depends on some condition, use the `),Oa$1(156,`code`),DT(157,`data`),cf(),DT(158,` parameter to pass an argument to the decorator's factory function. One use case is a custom decorator that extracts a property from the request object by key. Suppose, for example, that your `),Oa$1(159,`a`,17),DT(160,`authentication layer`),cf(),DT(161,` validates requests and attaches a user entity to the request object. The user entity for an authenticated request might look like this:`),cf(),Oa$1(162,`pre`)(163,`code`,18),DT(164,`
631{
632  "id": 101,
633  "firstName": "Alan",
634  "lastName": "Turing",
635  "email": "[email protected]",
636  "roles": ["admin"]
637}
638`),cf()(),Oa$1(165,`p`),DT(166,`Let's define a decorator that takes a property name as a key and returns the associated value if it exists (or `),Oa$1(167,`code`),DT(168,`undefined`),cf(),DT(169,` if it doesn't, or if the `),Oa$1(170,`code`),DT(171,`user`),cf(),DT(172,` object has not been created):`),cf(),Oa$1(173,`app-copy-button`,14)(174,`span`,15),DT(175),AT(176,`extension`),Za$1(177,`app-tabs`,null,3),cf(),Oa$1(179,`pre`)(180,`code`,13),DT(181,`
639import { createParamDecorator, ExecutionContext } from '@nestjs/common';
640
641export const User = createParamDecorator(
642  (data: string, ctx: ExecutionContext) => {
643    const request = ctx.switchToHttp().getRequest();
644    const user = request.user;
645
646    return data ? user?.[data] : user;
647  },
648);
649`),cf()(),Oa$1(182,`pre`)(183,`code`,13),DT(184,`
650import { createParamDecorator } from '@nestjs/common';
651
652export const User = createParamDecorator((data, ctx) => {
653  const request = ctx.switchToHttp().getRequest();
654  const user = request.user;
655
656  return data ? user && user[data] : user;
657});
658`),cf()()(),Oa$1(185,`p`),DT(186,`You can then access a particular property through the `),Oa$1(187,`code`),DT(188,`@User()`),cf(),DT(189,` decorator in the controller:`),cf(),Oa$1(190,`app-copy-button`,14)(191,`span`,15),Za$1(192,`app-tabs`,null,4),cf(),Oa$1(194,`pre`)(195,`code`,13),DT(196,`
659@Get()
660async findOne(@User('firstName') firstName: string) {
661  console.log(\`Hello \${firstName}\`);
662}
663`),cf()(),Oa$1(197,`pre`)(198,`code`,13),DT(199,`
664@Get()
665@Bind(User('firstName'))
666async findOne(firstName) {
667  console.log(\`Hello \${firstName}\`);
668}
669`),cf()()(),Oa$1(200,`p`),DT(201,`You can use the same decorator with different keys to access different properties. If the `),Oa$1(202,`code`),DT(203,`user`),cf(),DT(204,` object is deep or complex, this keeps route handler implementations simpler and more readable.`),cf(),Oa$1(205,`blockquote`,19)(206,`strong`),DT(207,`Hint`),cf(),Oa$1(208,`code`),DT(209,`createParamDecorator<T>()`),cf(),DT(210,` is generic, so you can enforce type safety explicitly, e.g., `),Oa$1(211,`code`),DT(212,`createParamDecorator<string>((data, ctx) => ...)`),cf(),DT(213,`. Alternatively, specify a parameter type in the factory function, e.g., `),Oa$1(214,`code`),DT(215,`createParamDecorator((data: string, ctx) => ...)`),cf(),DT(216,`. If you omit both, `),Oa$1(217,`code`),DT(218,`data`),cf(),DT(219,` is typed as `),Oa$1(220,`code`),DT(221,`any`),cf(),DT(222,`.
670`),cf(),Oa$1(223,`h4`,20)(224,`span`),DT(225,`Working with pipes`),cf()(),Oa$1(226,`p`),DT(227,`Nest treats custom param decorators the same way as the built-in ones (`),Oa$1(228,`code`),DT(229,`@Body()`),cf(),DT(230,`, `),Oa$1(231,`code`),DT(232,`@Param()`),cf(),DT(233,`, and `),Oa$1(234,`code`),DT(235,`@Query()`),cf(),DT(236,`). This means pipes also run for parameters annotated with custom decorators (in our examples, the `),Oa$1(237,`code`),DT(238,`user`),cf(),DT(239,` argument). You can also apply a pipe directly to the custom decorator:`),cf(),Oa$1(240,`app-copy-button`,14)(241,`span`,15),Za$1(242,`app-tabs`,null,5),cf(),Oa$1(244,`pre`)(245,`code`,13),DT(246,`
671@Get()
672async findOne(
673  @User(new ValidationPipe({ validateCustomDecorators: true }))
674  user: UserEntity,
675) {
676  console.log(user);
677}
678`),cf()(),Oa$1(247,`pre`)(248,`code`,13),DT(249,`
679@Get()
680@Bind(User(new ValidationPipe({ validateCustomDecorators: true })))
681async findOne(user) {
682  console.log(user);
683}
684`),cf()()(),Oa$1(250,`blockquote`,19)(251,`strong`),DT(252,`Hint`),cf(),DT(253,` By default, `),Oa$1(254,`code`),DT(255,`ValidationPipe`),cf(),DT(256,` does not validate arguments annotated with custom decorators. That's why the example above sets the `),Oa$1(257,`code`),DT(258,`validateCustomDecorators`),cf(),DT(259,` option to `),Oa$1(260,`code`),DT(2
68461,`true`),cf(),DT(262,`.
685`),cf(),Oa$1(263,`p`),DT(264,`Custom decorators also accept the `),Oa$1(265,`code`),DT(266,`schema`),cf(),DT(267,` option of the built-in parameter decorators. Pass a `),Oa$1(268,`a`,21),DT(269,`Standard Schema`),cf(),DT(270,` compatible schema, such as a Zod schema, and a `),Oa$1(271,`code`),DT(272,`StandardSchemaValidationPipe`),cf(),DT(273,` with the `),Oa$1(274,`code`),DT(275,`validateCustomDecorators`),cf(),DT(276,` option enabled validates the decorator's value against it:`),cf(),Oa$1(277,`app-copy-button`)(278,`pre`)(279,`code`,13),DT(280,`
686@Get()
687async findOne(@User('email', { schema: z.email() }) email: string) {
688  console.log(email);
689}
690`),cf()()(),Oa$1(281,`p`),DT(282,`See `),Oa$1(283,`a`,22),DT(284,`Validating custom decorators`),cf(),DT(285,` for details.`),cf(),Oa$1(286,`h4`,23)(287,`span`),DT(288,`Decorator composition`),cf()(),Oa$1(289,`p`),DT(290,`Nest provides the `),Oa$1(291,`code`),DT(292,`applyDecorators()`),cf(),DT(293,` helper to compose multiple decorators. For example, suppose you want to combine all authentication-related decorators into a single decorator:`),cf(),Oa$1(294,`app-copy-button`,14)(295,`span`,15),DT(296),AT(297,`extension`),Za$1(298,`app-tabs`,null,6),cf(),Oa$1(300,`pre`)(301,`code`,13),DT(302,`
691import { applyDecorators, SetMetadata, UseGuards } from '@nestjs/common';
692import { ApiBearerAuth, ApiUnauthorizedResponse } from '@nestjs/swagger';
693
694export function Auth(...roles: Role[]) {
695  return applyDecorators(
696    SetMetadata('roles', roles),
697    UseGuards(AuthGuard, RolesGuard),
698    ApiBearerAuth(),
699    ApiUnauthorizedResponse({ description: 'Unauthorized' }),
700  );
701}
702`),cf()(),Oa$1(303,`pre`)(304,`code`,13),DT(305,`
703import { applyDecorators, SetMetadata, UseGuards } from '@nestjs/common';
704import { ApiBearerAuth, ApiUnauthorizedResponse } from '@nestjs/swagger';
705
706export function Auth(...roles) {
707  return applyDecorators(
708    SetMetadata('roles', roles),
709    UseGuards(AuthGuard, RolesGuard),
710    ApiBearerAuth(),
711    ApiUnauthorizedResponse({ description: 'Unauthorized' }),
712  );
713}
714`),cf()()(),Oa$1(306,`p`),DT(307,`You can then use this custom `),Oa$1(308,`code`),DT(309,`@Auth()`),cf(),DT(310,` decorator as follows:`),cf(),Oa$1(311,`app-copy-button`)(312,`pre`)(313,`code`,13),DT(314,`
715@Get('users')
716@Auth('admin')
717findAllUsers() {}
718`),cf()()(),Oa$1(315,`p`),DT(316,`This applies all four decorators with a single declaration.`),cf(),Oa$1(317,`blockquote`,24)(318,`strong`),DT(319,`Warning`),cf(),DT(320,` The `),Oa$1(321,`code`),DT(322,`@ApiHideProperty()`),cf(),DT(323,` decorator from the `),Oa$1(324,`code`),DT(325,`@nestjs/swagger`),cf(),DT(326,` package is not composable and does not work correctly with the `),Oa$1(327,`code`),DT(328,`applyDecorators()`),cf(),DT(329,` function.
719`),cf()(),Oa$1(330,`a`,25),Za$1(331,`i`,26),Oa$1(332,`span`),DT(333,`Edit on GitHub`),cf()()()),a&2){let l=QS(135),d=QS(144),m=QS(178),h=QS(193),u=QS(243),b=QS(299);UC(132),hf(` `,OT(133,23,`user.decorator`,l.isJsActive),`
720`),UC(13),By(`hide`,d.isJsActive),UC(3),By(`hide`,!d.isJsActive),UC(27),hf(` `,OT(176,26,`user.decorator`,m.isJsActive),`
721`),UC(4),By(`hide`,m.isJsActive),UC(3),By(`hide`,!m.isJsActive),UC(12),By(`hide`,h.isJsActive),UC(3),By(`hide`,!h.isJsActive),UC(47),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(49),hf(` `,OT(297,29,`auth.decorator`,b.isJsActive),`
722`),UC(4),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive)}},dependencies:[xt,tn$1,u,g],encapsulation:2})}return o})();var Vr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-who-uses`]],features:[My],decls:424,vars:0,consts:[[1,`content`],[`id`,`who-is-using-nest`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/nestjs/nest/issues/1006`],[`appAnchor`,``,`id`,`companies`],[1,`companies-wrapper`],[`href`,`https://roche.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/roche-logo.png`,2,`width`,`90px`],[`href`,`https://adidas.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/adidas.svg`,2,`width`,`80px`],[`href`,`https://capgemini.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/capgemini.svg`],[`href`,`https://www.societegenerale.fr/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/societe-generale-logo.png`],[`href`,`https://rewe-digital.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/rewe.svg`,2,`width`,`180px`],[`href`,`https://www.decathlon.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/decathlon.png`],[`href`,`https://www.autodesk.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/autodesk.png`],[`href`,`https://www.neo4j.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/neo4j.png`],[`href`,`https://bmw.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/bmw.svg`],[`href`,`https://gitlab.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/gitlab.png`],[`href`,`https://www.ibm.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/ibm.svg`],[`href`,`https://www.jetbrains.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/jetbrains.svg`],[`href`,`https://www.mercedes-benz.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/mercedes.png`],[`href`,`https://totalenergies.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/totalenergies.svg`],[`href`,`https://www.bytedance.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/bytedance.png`],[`href`,`https://www.shipt.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/shipt.png`],[`href`,`https://github.com/Sanofi-IADC`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/sanofi.png`],[`href`,`https://sitepen.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/sitepen.svg`],[`href`,`https://trilon.io`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`https://nestjs.com/img/trilon.png`],[`href`,`https://www.vuestorefront.io/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/vue-storefront.png`],[`href`,`https://hingehealth.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/hingehealth.png`,2,`width`,`120px`],[`href`,`https://whiskeyhouse.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/whiskey-house.svg`],[1,`companies-list`],[`href`,`https://gorrion.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://balticdatascience.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://prohabits.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://komed-health.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://kerberus.com.co/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://xtremis.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://notadd.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://jsdaddy.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://yumpingo.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://analytics-importer.cz/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://dayzim.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://wizkids.co.uk/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://pilvia.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://wi-q.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://agrofel.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://societegenerale.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://trashpanda.hulan.nl/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bytedance.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://votercircle.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://erento.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://ideas.manticore-labs.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://smartexlab.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://automama.ru/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://iflix.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://frontendwatch.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://mobilejazz.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://cgiandi.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.titlex.com.au/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://codengage.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://budacode.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://blueanchor.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.easymetrics.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://getapollo.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://big-bench.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.qingtui.cn/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.rosebayconsult.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.patrocinium.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://creatorsdaily.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://autoscar.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.mediktiv.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://harmonize.health`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://accerlery.be`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.facile.it`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://shopback.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.ottonova.de`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.radity.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://globalctoforum.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://halojasa.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://hexito.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://rivvy.app`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://padfever.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://datenlotse.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bemum.co`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://weoptimeye.ai`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://nemovote.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://selleo.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://pchas.ir`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://tayeh.ir`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://forwardigital.co.uk`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://rozetka.com.ua`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.itrio.net`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://alexishr.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://dyrector.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://stijlbreuk.nl`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://polygon-software.ch`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bewith.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://swetrix.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://swyftlogistics.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://evershop.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://e-design.ca`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://growthm
722ill.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://tarken.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://remato.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://remberg.de/en`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://uninterrupted.tech`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.digando.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://novu.co`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://aqreach.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://phalco.de`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.tesseractpro.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.kwanso.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://cmdn.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://ayo.so`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://devitjobs.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://formation.tech`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://gofirmex.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://vbdhub.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.arven-tech.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://runsystem.net`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://zenobank.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://github.com/nestjs/docs.nestjs.com/pulls`,`target`,`_blank`]],template:function(a,s){a&1&&(Oa$1(0,`div`,0)(1,`h3`,1),DT(2,`Who is using Nest?`),cf(),Oa$1(3,`p`),DT(4,`Nest helps companies of all sizes build their products at scale.
723If you use Nest and would like to be listed here, comment on the `),Oa$1(5,`a`,2),DT(6,`"Who is using Nest in production?" GitHub issue`),cf(),DT(7,`.
724We'd be glad to add your logo.`),cf(),Oa$1(8,`h4`,3)(9,`span`),DT(10,`Companies`),cf()(),Oa$1(11,`p`),DT(12,`To our knowledge, all of the following companies have built projects on top of Nest:`),cf()(),Oa$1(13,`div`,4)(14,`a`,5),Za$1(15,`img`,6),cf(),Oa$1(16,`a`,7),Za$1(17,`img`,8),cf(),Oa$1(18,`a`,9),Za$1(19,`img`,10),cf(),Oa$1(20,`a`,11),Za$1(21,`img`,12),cf(),Oa$1(22,`a`,13),Za$1(23,`img`,14),cf(),Oa$1(24,`a`,15),Za$1(25,`img`,16),cf(),Oa$1(26,`a`,17),Za$1(27,`img`,18),cf(),Oa$1(28,`a`,19),Za$1(29,`img`,20),cf(),Oa$1(30,`a`,21),Za$1(31,`img`,22),cf(),Oa$1(32,`a`,23),Za$1(33,`img`,24),cf(),Oa$1(34,`a`,25),Za$1(35,`img`,26),cf(),Oa$1(36,`a`,27),Za$1(37,`img`,28),cf(),Oa$1(38,`a`,29),Za$1(39,`img`,30),cf(),Oa$1(40,`a`,31),Za$1(41,`img`,32),cf(),Oa$1(42,`a`,33),Za$1(43,`img`,34),cf(),Oa$1(44,`a`,35),Za$1(45,`img`,36),cf(),Oa$1(46,`a`,37),Za$1(47,`img`,38),cf(),Oa$1(48,`a`,39),Za$1(49,`img`,40),cf(),Oa$1(50,`a`,41),Za$1(51,`img`,42),cf(),Oa$1(52,`a`,43),Za$1(53,`img`,44),cf(),Oa$1(54,`a`,45),Za$1(55,`img`,46),cf(),Oa$1(56,`a`,47),Za$1(57,`img`,48),cf()(),Oa$1(58,`table`,49)(59,`tr`)(60,`td`)(61,`a`,50),DT(62,`https://gorrion.io/`),cf()()(),Oa$1(63,`tr`)(64,`td`)(65,`a`,51),DT(66,`http://balticdatascience.com/`),cf()()(),Oa$1(67,`tr`)(68,`td`)(69,`a`,52),DT(70,`https://prohabits.com/`),cf()()(),Oa$1(71,`tr`)(72,`td`)(73,`a`,53),DT(74,`https://komed-health.com/`),cf()()(),Oa$1(75,`tr`)(76,`td`)(77,`a`,54),DT(78,`https://kerberus.com.co/`),cf()()(),Oa$1(79,`tr`)(80,`td`)(81,`a`,55),DT(82,`http://xtremis.com/`),cf()()(),Oa$1(83,`tr`)(84,`td`)(85,`a`,56),DT(86,`https://notadd.com/`),cf()()(),Oa$1(87,`tr`)(88,`td`)(89,`a`,57),DT(90,`http://jsdaddy.io/`),cf()()(),Oa$1(91,`tr`)(92,`td`)(93,`a`,58),DT(94,`https://yumpingo.com/`),cf()()(),Oa$1(95,`tr`)(96,`td`)(97,`a`,59),DT(98,`https://analytics-importer.cz/`),cf()()(),Oa$1(99,`tr`)(100,`td`)(101,`a`,60),DT(102,`https://dayzim.com/`),cf()()(),Oa$1(103,`tr`)(104,`td`)(105,`a`,61),DT(106,`https://wizkids.co.uk/`),cf()()(),Oa$1(107,`tr`)(108,`td`)(109,`a`,62),DT(110,`https://pilvia.com/`),cf()()(),Oa$1(111,`tr`)(112,`td`)(113,`a`,63),DT(114,`https://wi-q.com/`),cf()()(),Oa$1(115,`tr`)(116,`td`)(117,`a`,64),DT(118,`http://agrofel.com.br`),cf()()(),Oa$1(119,`tr`)(120,`td`)(121,`a`,65),DT(122,`https://societegenerale.com/`),cf()()(),Oa$1(123,`tr`)(124,`td`)(125,`a`,66),DT(126,`https://trashpanda.hulan.nl/`),cf()()(),Oa$1(127,`tr`)(128,`td`)(129,`a`,67),DT(130,`https://bytedance.com/`),cf()()(),Oa$1(131,`tr`)(132,`td`)(133,`a`,68),DT(134,`https://votercircle.com`),cf()()(),Oa$1(135,`tr`)(136,`td`)(137,`a`,69),DT(138,`https://erento.com`),cf()()(),Oa$1(139,`tr`)(140,`td`)(141,`a`,70),DT(142,`https://ideas.manticore-labs.com/`),cf()()(),Oa$1(143,`tr`)(144,`td`)(145,`a`,71),DT(146,`https://smartexlab.com/`),cf()()(),Oa$1(147,`tr`)(148,`td`)(149,`a`,72),DT(150,`https://automama.ru/`),cf()()(),Oa$1(151,`tr`)(152,`td`)(153,`a`,73),DT(154,`https://iflix.com/`),cf()()(),Oa$1(155,`tr`)(156,`td`)(157,`a`,74),DT(158,`https://frontendwatch.com/`),cf()()(),Oa$1(159,`tr`)(160,`td`)(161,`a`,75),DT(162,`https://mobilejazz.com/`),cf()()(),Oa$1(163,`tr`)(164,`td`)(165,`a`,76),DT(166,`https://cgiandi.com/`),cf()()(),Oa$1(167,`tr`)(168,`td`)(169,`a`,77),DT(170,`https://www.titlex.com.au/`),cf()()(),Oa$1(171,`tr`)(172,`td`)(173,`a`,78),DT(174,`https://codengage.com/`),cf()()(),Oa$1(175,`tr`)(176,`td`)(177,`a`,79),DT(178,`https://budacode.com/`),cf()()(),Oa$1(179,`tr`)(180,`td`)(181,`a`,80),DT(182,`https://blueanchor.io/`),cf()()(),Oa$1(183,`tr`)(184,`td`)(185,`a`,81),DT(186,`https://www.easymetrics.com/`),cf()()(),Oa$1(187,`tr`)(188,`td`)(189,`a`,82),DT(190,`https://getapollo.io/`),cf()()(),Oa$1(191,`tr`)(192,`td`)(193,`a`,83),DT(194,`https://big-bench.com/`),cf()()(),Oa$1(195,`tr`)(196,`td`)(197,`a`,84),DT(198,`https://www.qingtui.cn/`),cf()()(),Oa$1(199,`tr`)(200,`td`)(201,`a`,85),DT(202,`https://www.rosebayconsult.com/`),cf()()(),Oa$1(203,`tr`)(204,`td`)(205,`a`,86),DT(206,`https://www.patrocinium.com/`),cf()()(),Oa$1(207,`tr`)(208,`td`)(209,`a`,87),DT(210,`https://creatorsdaily.com`),cf()()(),Oa$1(211,`tr`)(212,`td`)(213,`a`,88),DT(214,`https://autoscar.com.br`),cf()()(),Oa$1(215,`tr`)(216,`td`)(217,`a`,89),DT(218,`https://www.mediktiv.com`),cf()()(),Oa$1(219,`tr`)(220,`td`)(221,`a`,90),DT(222,`https://harmonize.health`),cf()()(),Oa$1(223,`tr`)(224,`td`)(225,`a`,91),DT(226,`https://accerlery.be`),cf()()(),Oa$1(227,`tr`)(228,`td`)(229,`a`,92),DT(230,`https://www.facile.it`),cf()()(),Oa$1(231,`tr`)(232,`td`)(233,`a`,93),DT(234,`https://shopback.com`),cf()()(),Oa$1(235,`tr`)(236,`td`)(237,`a`,94),DT(238,`https://www.ottonova.de`),cf()()(),Oa$1(239,`tr`)(240,`td`)(241,`a`,95),DT(242,`https://www.radity.com`),cf()()(),Oa$1(243,`tr`)(244,`td`)(245,`a`,96),DT(246,`https://globalctoforum.org`),cf()()(),Oa$1(247,`tr`)(248,`td`)(249,`a`,97),DT(250,`https://halojasa.com`),cf()()(),Oa$1(251,`tr`)(252,`td`)(253,`a`,98),DT(254,`https://hexito.com`),cf()()(),Oa$1(255,`tr`)(256,`td`)(257,`a`,99),DT(258,`https://rivvy.app`),cf()()(),Oa$1(259,`tr`)(260,`td`)(261,`a`,100),DT(262,`https://padfever.com/`),cf()()(),Oa$1(263,`tr`)(264,`td`)(265,`a`,101),DT(266,`https://datenlotse.org`),cf()()(),Oa$1(267,`tr`)(268,`td`)(269,`a`,102),DT(270,`https://bemum.co`),cf()()(),Oa$1(271,`tr`)(272,`td`)(273,`a`,103),DT(274,`https://weoptimeye.ai`),cf()()(),Oa$1(275,`tr`)(276,`td`)(277,`a`,104),DT(278,`https://nemovote.com`),cf()()(),Oa$1(279,`tr`)(280,`td`)(281,`a`,105),DT(282,`https://selleo.com`),cf()()(),Oa$1(283,`tr`)(284,`td`)(285,`a`,106),DT(286,`https://pchas.ir`),cf()()(),Oa$1(287,`tr`)(288,`td`)(289,`a`,107),DT(290,`https://tayeh.ir`),cf()()(),Oa$1(291,`tr`)(292,`td`)(293,`a`,108),DT(294,`https://forwardigital.co.uk`),cf()()(),Oa$1(295,`tr`)(296,`td`)(297,`a`,109),DT(298,`https://rozetka.com.ua`),cf()()(),Oa$1(299,`tr`)(300,`td`)(301,`a`,110),DT(302,`https://www.itrio.net`),cf()()(),Oa$1(303,`tr`)(304,`td`)(305,`a`,111),DT(306,`https://alexishr.com`),cf()()(),Oa$1(307,`tr`)(308,`td`)(309,`a`,112),DT(310,`https://dyrector.io`),cf()()(),Oa$1(311,`tr`)(312,`td`)(313,`a`,113),DT(314,`https://stijlbreuk.nl`),cf()()(),Oa$1(315,`tr`)(316,`td`)(317,`a`,114),DT(318,`https://polygon-software.ch`),cf
724()()(),Oa$1(319,`tr`)(320,`td`)(321,`a`,115),DT(322,`https://bewith.io`),cf()()(),Oa$1(323,`tr`)(324,`td`)(325,`a`,116),DT(326,`https://swetrix.com`),cf()()(),Oa$1(327,`tr`)(328,`td`)(329,`a`,117),DT(330,`https://swyftlogistics.com`),cf()()(),Oa$1(331,`tr`)(332,`td`)(333,`a`,118),DT(334,`https://evershop.io`),cf()()(),Oa$1(335,`tr`)(336,`td`)(337,`a`,119),DT(338,`https://e-design.ca`),cf()()(),Oa$1(339,`tr`)(340,`td`)(341,`a`,120),DT(342,`https://growthmill.com`),cf()()(),Oa$1(343,`tr`)(344,`td`)(345,`a`,121),DT(346,`https://tarken.com.br`),cf()()(),Oa$1(347,`tr`)(348,`td`)(349,`a`,122),DT(350,`https://remato.com`),cf()()(),Oa$1(351,`tr`)(352,`td`)(353,`a`,123),DT(354,`https://remberg.de/en`),cf()()(),Oa$1(355,`tr`)(356,`td`)(357,`a`,124),DT(358,`https://uninterrupted.tech`),cf()()(),Oa$1(359,`tr`)(360,`td`)(361,`a`,125),DT(362,`https://www.digando.com`),cf()()(),Oa$1(363,`tr`)(364,`td`)(365,`a`,126),DT(366,`https://novu.co`),cf()()(),Oa$1(367,`tr`)(368,`td`)(369,`a`,127),DT(370,`https://aqreach.com`),cf()()(),Oa$1(371,`tr`)(372,`td`)(373,`a`,128),DT(374,`https://phalco.de`),cf()()(),Oa$1(375,`tr`)(376,`td`)(377,`a`,129),DT(378,`https://www.tesseractpro.io`),cf()()(),Oa$1(379,`tr`)(380,`td`)(381,`a`,130),DT(382,`https://www.kwanso.com`),cf()()(),Oa$1(383,`tr`)(384,`td`)(385,`a`,131),DT(386,`https://cmdn.io`),cf()()(),Oa$1(387,`tr`)(388,`td`)(389,`a`,132),DT(390,`https://ayo.so`),cf()()(),Oa$1(391,`tr`)(392,`td`)(393,`a`,133),DT(394,`https://devitjobs.com`),cf()()(),Oa$1(395,`tr`)(396,`td`)(397,`a`,134),DT(398,`https://formation.tech`),cf()()(),Oa$1(399,`tr`)(400,`td`)(401,`a`,135),DT(402,`https://gofirmex.com`),cf()()(),Oa$1(403,`tr`)(404,`td`)(405,`a`,136),DT(406,`https://vbdhub.org`),cf()()(),Oa$1(407,`tr`)(408,`td`)(409,`a`,137),DT(410,`https://www.arven-tech.com`),cf()()(),Oa$1(411,`tr`)(412,`td`)(413,`a`,138),DT(414,`https://runsystem.net`),cf()()(),Oa$1(415,`tr`)(416,`td`)(417,`a`,139),DT(418,`https://zenobank.io`),cf()()()(),Oa$1(419,`p`),DT(420,` and a lot more but we don't have enough time to update above list. Feel free to create a `),Oa$1(421,`a`,140),DT(422,`pull request`),cf(),DT(423,` though!
725`),cf())},dependencies:[xt],styles:[`@media(max-width:480px){.company-logo[_ngcontent-%COMP%]{width:360px;max-width:100%;display:block;text-align:center;margin:40px auto}.company-logo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:180px!important;max-width:100%;max-height:none}}`]})}return o})();var In=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-enterprise`]],features:[My],decls:76,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`official-nestjs-consulting`],[`id`,`official-support`],[1,`row`],[1,`thumbnail`,`p-l-30`],[`src`,`/assets/enterprise/help.svg`],[1,`thumbnail`,`p-r-30`],[`src`,`/assets/enterprise/contact.svg`],[`appAnchor`,``,`id`,`first-hand-access`],[`appAnchor`,``,`id`,`nestjs-workshops-and-trainings`],[1,`contact-us`],[1,`column`,`column-text`],[1,`column`,`column-action`],[`href`,`mailto:[email protected]`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/enterprise.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),DT(4,`Official NestJS Consulting`),cf(),Oa$1(5,`p`),DT(6,`Our goal is to make your developers successful and productive with NestJS, as well as with other modern technologies in today's ever-changing tech landscape.`),cf(),Oa$1(7,`h3`,4),DT(8,`Official Support`),cf(),Oa$1(9,`p`),DT(10,`With official support, you get expert help directly from the NestJS core team. We tackle your toughest challenges and collaborate with your team on many levels, such as:`),cf(),Oa$1(11,`ul`)(12,`li`),DT(13,`Providing technical guidance and architectural reviews`),cf(),Oa$1(14,`li`)(15,`strong`),DT(16,`Mentoring`),cf(),DT(17,` team members`),cf(),Oa$1(18,`li`),DT(19,`Advising on best practices`),cf(),Oa$1(20,`li`),DT(21,`Resolving design decisions`),cf(),Oa$1(22,`li`),DT(23,`Addressing security and performance concerns`),cf(),Oa$1(24,`li`),DT(25,`Performing `),Oa$1(26,`strong`),DT(27,`in-depth`),cf(),DT(28,` c
725ode reviews`),cf()(),Oa$1(29,`div`,5)(30,`div`,1)(31,`h4`),DT(32,`Team Augmentation & Development`),cf(),Oa$1(33,`p`),DT(34,` With team augmentation, NestJS core team members work directly with your team on a daily basis to help take your project to the next level. Consider us part of your team, tackling the most ambitious projects right by your side. `),cf()(),Oa$1(35,`div`,6),Za$1(36,`img`,7),cf()(),Oa$1(37,`div`,5)(38,`div`,8),Za$1(39,`img`,9),cf(),Oa$1(40,`div`,1)(41,`h4`),DT(42,`NestJS Best Practices`),cf(),Oa$1(43,`p`),DT(44,` Frequent code reviews catch potentially hazardous bugs and issues at an early stage and help enforce best practices. We perform PR reviews and audits to ensure the quality, performance, and security of your code. `),cf()()(),Oa$1(45,`h4`,10)(46,`span`),DT(47,`First-hand access`),cf()(),Oa$1(48,`p`),DT(49,`A direct communication channel boosts team velocity by giving you quick access to the core team to discuss and solve problems.`),cf(),Oa$1(50,`h4`,11)(51,`span`),DT(52,`NestJS Workshops and Trainings`),cf()(),Oa$1(53,`p`),DT(54,`We provide solid kick-off training as well as advanced sessions that give teams an in-depth understanding of NestJS. We offer on-site workshops and intensive remote sessions that get you up and running `),Oa$1(55,`em`),DT(56,`quickly`),cf(),DT(57,` in the NestJS ecosystem.`),cf(),Oa$1(58,`div`,12)(59,`div`,13)(60,`h5`),DT(61,`Contact us`),cf(),Oa$1(62,`p`),DT(63,` Let's talk about how we can help you succeed with NestJS. `),cf()(),Oa$1(64,`div`,14)(65,`a`,15),DT(66,`CONTACT US`),cf()()(),Oa$1(67,`p`),DT(68,`Reach out to us at `),Oa$1(69,`a`,15),DT(70,`[email protected]`),cf(),DT(71,` to talk about your project and your team's needs.`),cf()(),Oa$1(72,`a`,16),Za$1(73,`i`,17),Oa$1(74,`span`),DT(75,`Edit on GitHub`),cf()()())},dependencies:[xt],encapsulation:2})}return o})();var Yr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-exception-filters`]],features:[My],decls:859,vars:60,consts:[[`contentReference`,``],[`appd66b79176e8b8ce3360150af86d5f08f35bfc61c`,``],[`app76aae6ac83560724b78568f5862f6a091b00ecc8`,``],[`app720c72dedbe5fd9f71be06d19c57753f396c1b5d`,``],[`app54c5f1a6e1b08e8c7ef1bb8bcc3d4d685913599b`,``],[`app6c392a0689700a318ec0b2b21c43f499f0989a0e`,``],[`app5c27fa7b669cccfd7e5cb292911233b57b7a18a8`,``],[`app29940489aa185d290a091791fcf3abb10cab5683`,``],[`app6c9d384677001e778829d9451f34f35b1000d459`,``],[`appf8d0f9d52f47502d2ae840ee0385eb2d4ab246e6`,``],[`app203a1614813179e4953c6d57e8acad136c86bfd1`,``],[`appa610436b24beac32174010ee4f8581fe65233a89`,``],[1,`content`],[1,`content-inner`],[`id`,`exception-filters`],[`src`,`/assets/Filter_1.png`,1,`illustrative-image`],[1,`language-json`],[1,`info`],[`appAnchor`,``,`id`,`throwing-standard-exceptions`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/en/blog/release/v16.9.0/#error-cause`],[`appAnchor`,``,`id`,`exceptions-logging`],[`href`,`#exception-filters`],[`appAnchor`,``,`id`,`tracking-errors-in-production`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`src`,`https://www.observe.nestjs.com/docs/telemetry/error-with-source.webp`,`alt`,`Error card with source context`],[`routerLink`,`/observability/error-monitoring`],[`routerLink`,`/observability/overview`],[`href`,`/observability/dashboard#issues`],[`appAnchor`,``,`id`,`custom-exceptions`],[`appAnchor`,``,`id`,`built-in-http-exceptions`],[`appAnchor`,``,`id`,`machine-readable-error-codes`],[`appAnchor`,``,`id`,`exception-filters-1`],[1,`warning`],[`appAnchor`,``,`id`,`arguments-host`],[`routerLink`,`/fundamentals/execution-context`],[`href`,`/fundamentals/execution-context#host-handler-arguments`],[`appAnchor`,``,`id`,`binding-filters`],[`routerLink`,`/fundamentals/custom-providers`],[`href`,`/middleware#error-handling`],[`appAnchor`,``,`id`,`catch-everything`],[`routerLink`,`./faq/http-adapter`],[`appAnchor`,``,`id`,`inheritance`],[`href`,`exception-filters#binding-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/exception-filters.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,12,0)(2,`div`,13)(3,`h3`,14),DT(4,`Exception filters`),cf(),Oa$1(5,`p`),DT(6,`Nest comes with a built-in `),Oa$1(7,`strong`),DT(8,`exceptions layer`),cf(),DT(9,` that processes all unhandled exceptions across an application. When your application code does not handle an exception, this layer catches it and automatically sends an appropriate, user-friendly response.`),cf(),Oa$1(10,`figure`),Za$1(11,`img`,15),cf(),Oa$1(12,`p`),DT(13,`Out of the box, this is done by a built-in `),Oa$1(14,`strong`),DT(15,`global exception filter`),cf(),DT(16,`, which handles exceptions of type `),Oa$1(17,`code`),DT(18,`HttpException`),cf(),DT(19,` (and its subclasses). When an exception is `),Oa$1(20,`strong`),DT(21,`unrecognized`),cf(),DT(22,` (it is neither an `),Oa$1(23,`code`),DT(24,`HttpException`),cf(),DT(25,` nor a class that inherits from `),Oa$1(26,`code`),DT(27,`HttpException`),cf(),DT(28,`), the built-in exception filter generates the following default JSON response:`),cf(),Oa$1(29,`pre`)(30,`code`,16),DT(31,`
726{
727  "statusCode": 500,
728  "message": "Internal server error"
729}
730`),cf()(),Oa$1(32,`blockquote`,17)(33,`strong`),DT(34,`Hint`),cf(),DT(35,` The global exception filter partially supports the `),Oa$1(36,`code`),DT(37,`http-errors`),cf(),DT(38,` library. A thrown error that carries `),Oa$1(39,`code`),DT(40,`statusCode`),cf(),DT(41,` and `),Oa$1(42,`code`),DT(43,`message`),cf(),DT(44,` properties in the shape that library produces is sent back with those values, instead of the default `),Oa$1(45,`code`),DT(46,`InternalServerErrorException`),cf(),DT(47,` response for unrecognized exceptions.
731`),cf(),Oa$1(48,`h4`,18)(49,`span`),DT(50,`Throwing standard exceptions`),cf()(),Oa$1(51,`p`),DT(52,`Nest provides a built-in `),Oa$1(53,`code`),DT(54,`HttpException`),cf(),DT(55,` class, exposed from the `),Oa$1(56,`code`),DT(57,`@nestjs/common`),cf(),DT(58,` package. For typical HTTP-based REST and GraphQL APIs, it's best practice to send standard HTTP response objects when certain error conditions occur.`),cf(),Oa$1(59,`p`),DT(60,`For example, the `),Oa$1(61,`code`),DT(62,`CatsController`),cf(),DT(63,` has a `),Oa$1(64,`code`),DT(65,`findAll(
731)`),cf(),DT(66,` method (a `),Oa$1(67,`code`),DT(68,`GET`),cf(),DT(69,` route handler). Let's assume that this route handler throws an exception. To demonstrate this, we'll hard-code it as follows:`),cf(),Oa$1(70,`app-copy-button`,19)(71,`span`,20),DT(72),AT(73,`extension`),Za$1(74,`app-tabs`,null,1),cf(),Oa$1(76,`pre`)(77,`code`,21),DT(78,`
732@Get()
733async findAll() {
734  throw new HttpException('Forbidden', HttpStatus.FORBIDDEN);
735}
736`),cf()()(),Oa$1(79,`blockquote`,17)(80,`strong`),DT(81,`Hint`),cf(),Oa$1(82,`code`),DT(83,`HttpStatus`),cf(),DT(84,` is a helper enum imported from the `),Oa$1(85,`code`),DT(86,`@nestjs/common`),cf(),DT(87,` package.
737`),cf(),Oa$1(88,`p`),DT(89,`When the client calls this endpoint, the response looks like this:`),cf(),Oa$1(90,`pre`)(91,`code`,16),DT(92,`
738{
739  "statusCode": 403,
740  "message": "Forbidden"
741}
742`),cf()(),Oa$1(93,`p`),DT(94,`The `),Oa$1(95,`code`),DT(96,`HttpException`),cf(),DT(97,` constructor takes two required arguments that determine the response:`),cf(),Oa$1(98,`ul`)(99,`li`),DT(100,`The `),Oa$1(101,`code`),DT(102,`response`),cf(),DT(103,` argument defines the JSON response body. It can be a `),Oa$1(104,`code`),DT(105,`string`),cf(),DT(106,` or an `),Oa$1(107,`code`),DT(108,`object`),cf(),DT(109,`, as described below.`),cf(),Oa$1(110,`li`),DT(111,`The `),Oa$1(112,`code`),DT(113,`status`),cf(),DT(114,` argument defines the `),Oa$1(115,`a`,22),DT(116,`HTTP status code`),cf(),DT(117,`.`),cf()(),Oa$1(118,`p`),DT(119,`By default, the JSON response body contains two properties:`),cf(),Oa$1(120,`ul`)(121,`li`)(122,`code`),DT(123,`statusCode`),cf(),DT(124,`: defaults to the HTTP status code provided in the `),Oa$1(125,`code`),DT(126,`status`),cf(),DT(127,` argument`),cf(),Oa$1(128,`li`)(129,`code`),DT(130,`message`),cf(),DT(131,`: a short description of the HTTP error based on the `),Oa$1(132,`code`),DT(133,`status`),cf()()(),Oa$1(134,`p`),DT(135,`To override only the message portion of the JSON response body, supply a string in the `),Oa$1(136,`code`),DT(137,`response`),cf(),DT(138,` argument. To override the entire JSON response body, pass an object in the `),Oa$1(139,`code`),DT(140,`response`),cf(),DT(141,` argument. Nest serializes the object and returns it as the JSON response body.`),cf(),Oa$1(142,`p`),DT(143,`The second constructor argument, `),Oa$1(144,`code`),DT(145,`status`),cf(),DT(146,`, should be a valid HTTP status code. Best practice is to use the `),Oa$1(147,`code`),DT(148,`HttpStatus`),cf(),DT(149,` enum imported from `),Oa$1(150,`code`),DT(151,`@nestjs/common`),cf(),DT(152,`.`),cf(),Oa$1(153,`p`),DT(154,`An optional `),Oa$1(155,`strong`),DT(156,`third`),cf(),DT(157,` constructor argument, `),Oa$1(158,`code`),DT(159,`options`),cf(),DT(160,`, can be used to provide an error `),Oa$1(161,`a`,23),DT(162,`cause`),cf(),DT(163,`. The `),Oa$1(164,`code`),DT(165,`cause`),cf(),DT(166,` object is not serialized into the response object, but it is useful for logging, as it provides information about the inner error that caused the `),Oa$1(167,`code`),DT(168,`HttpException`),cf(),DT(169,` to be thrown.`),cf(),Oa$1(170,`p`),DT(171,`Here's an example that overrides the entire response body and provides an error cause:`),cf(),Oa$1(172,`app-copy-button`,19)(173,`span`,20),DT(174),AT(175,`extension`),Za$1(176,`app-tabs`,null,2),cf(),Oa$1(178,`pre`)(179,`code`,21),DT(180,`
743@Get()
744async findAll() {
745  try {
746    await this.service.findAll();
747  } catch (error) {
748    throw new HttpException({
749      status: HttpStatus.FORBIDDEN,
750      error: 'This is a custom message',
751    }, HttpStatus.FORBIDDEN, {
752      cause: error
753    });
754  }
755}
756`),cf()()(),Oa$1(181,`p`),DT(182,`The response then looks like this:`),cf(),Oa$1(183,`pre`)(184,`code`,16),DT(185,`
757{
758  "status": 403,
759  "error": "This is a custom message"
760}
761`),cf()(),Oa$1(186,`h4`,24)(187,`span`),DT(188,`Exceptions logging`),cf()(),Oa$1(189,`p`),DT(190,`By default, the exception filter does not log built-in exceptions such as `),Oa$1(191,`code`),DT(192,`HttpException`),cf(),DT(193,` (and any exceptions that inherit from it). These exceptions are treated as part of the normal application flow, so they don't appear in the console. The same applies to `),Oa$1(194,`code`),DT(195,`WsException`),cf(),DT(196,` and `),Oa$1(197,`code`),DT(198,`RpcException`),cf(),DT(199,` in their respective contexts.`),cf(),Oa$1(200,`p`)(201,`code`),DT(202,`HttpException`),cf(),DT(203,` inherits from the `),Oa$1(204,`code`),DT(205,`IntrinsicException`),cf(),DT(206,` class, which is exported from the `),Oa$1(207,`code`),DT(208,`@nestjs/common`),cf(),DT(209,` package. The built-in exception filters never log instances of `),Oa$1(210,`code`),DT(211,`IntrinsicException`),cf(),DT(212,`, which is how they distinguish exceptions that are part of normal operation from those that are not.`),cf(),Oa$1(213,`p`),DT(214,`To log these exceptions, create a custom exception filter, as described in the `),Oa$1(215,`a`,25),DT(216,`Exception filters`),cf(),DT(217,` section below.`),cf(),Oa$1(218,`h4`,26)(219,`span`),DT(220,`Tracking errors in production`),cf()(),Oa$1(221,`p`),DT(222,`An exception filter decides what the `),Oa$1(223,`em`),DT(224,`client`),cf(),DT(225,` sees. On its own, it does not tell you that a `),Oa$1(226,`code`),DT(227,`TypeError`),cf(),DT(228,` started firing in `),Oa$1(229,`code`),DT(230,`OrdersService`),cf(),DT(231,` twelve minutes ago, on 4% of checkouts, only for customers whose cart contains a discounted item. Nor does it tell you which line threw.`),cf(),Oa$1(232,`p`),DT(233,`The usual approach is to log the stack trace and search for it later, which falls short: a stack trace in a log file points at compiled output (`),Oa$1(234,`code`),DT(235,`/var/app/current/dist/orders/orders.service.js:35`),cf(),DT(236,`), carries no source context, and does not tell you whether this is the first occurrence or the ten-thousandth.`),cf(),Oa$1(237,`p`)(238,`a`,27),DT(239,`NestJS Observe`),cf(),DT(240,` treats an unhandled error as a first-class object rather than a log line. Every error that reaches the exceptions layer is captured along with the request that caused it, and:`),cf(),Oa$1(241,`ul`)(242,`li`)(243,`strong`),DT(244,`The stack trace comes with source code.`),cf(),DT(245,` The frame is resolved through your source maps back to `),Oa$1(246,`code`),DT(247,`src/orders/orders.service.ts:35`),cf(),DT(248,`, and the surrounding lines are shown inline, so you can read the failing code in the error card without cloning anything.`),cf(),Oa$1(249,`li`)(250,`strong`),DT(251,`Occurrences are grouped into defects.`),cf(),DT(252,` Errors with the same class and stack shape collapse into one fingerprinted group with a count, first-seen and last-seen timestamps, and the release that introduced it. "New since v2.4.1" is a fact you read off the page rather than infer.`),cf(),Oa$1(253,`li`)(254,`strong`),DT(255,`The failure keeps its context.`),cf(),DT(256,` The trace it belonged to, the user who hit it, the logs written during that request, and the spans that ran before the throw are all attached, so you can see what the request was doing when it failed.`),cf()(),Oa$1(257,`figure`),Za$1(258,`img`,28),cf(),Oa$1(259,`p`),DT(260,`Because the error already carries its own code, you can hand it to a coding agent in one click: `),Oa$1(261,`strong`),DT(262,`Copy agent prompt`),cf(),DT(263,` packages the error, the trimmed stack trace with source lines, the slow spans, and the surrounding logs into a self-contained prompt for Claude Code, Cursor, or any other tool that has y
761our repository open.`),cf(),Oa$1(264,`p`),DT(265,`This complements the filters described in this chapter rather than replacing them: filters shape the response, while instrumentation records what happened on the way there. See `),Oa$1(266,`a`,29),DT(267,`Error monitoring`),cf(),DT(268,` for everything the SDK captures about a failure, the `),Oa$1(269,`a`,30),DT(270,`Observability`),cf(),DT(271,` chapter for setup, and `),Oa$1(272,`a`,31),DT(273,`Dashboard`),cf(),DT(274,` for turning a recurring error into a tracked issue that verifies its own fix.`),cf(),Oa$1(275,`h4`,32)(276,`span`),DT(277,`Custom exceptions`),cf()(),Oa$1(278,`p`),DT(279,`In most cases, you won't need to write custom exceptions and can use the built-in Nest HTTP exceptions described in the next section. If you do need custom exceptions, it's good practice to create your own `),Oa$1(280,`strong`),DT(281,`exception hierarchy`),cf(),DT(282,`, in which your custom exceptions inherit from the base `),Oa$1(283,`code`),DT(284,`HttpException`),cf(),DT(285,` class. Nest then recognizes your exceptions and automatically takes care of the error responses. Let's implement such a custom exception:`),cf(),Oa$1(286,`app-copy-button`,19)(287,`span`,20),DT(288),AT(289,`extension`),Za$1(290,`app-tabs`,null,3),cf(),Oa$1(292,`pre`)(293,`code`,21),DT(294,`
762export class ForbiddenException extends HttpException {
763  constructor() {
764    super('Forbidden', HttpStatus.FORBIDDEN);
765  }
766}
767`),cf()()(),Oa$1(295,`p`),DT(296,`Since `),Oa$1(297,`code`),DT(298,`ForbiddenException`),cf(),DT(299,` extends the base `),Oa$1(300,`code`),DT(301,`HttpException`),cf(),DT(302,`, it works with the built-in exception handler, so we can use it inside the `),Oa$1(303,`code`),DT(304,`findAll()`),cf(),DT(305,` method.`),cf(),Oa$1(306,`app-copy-button`,19)(307,`span`,20),DT(308),AT(309,`extension`),Za$1(310,`app-tabs`,null,4),cf(),Oa$1(312,`pre`)(313,`code`,21),DT(314,`
768@Get()
769async findAll() {
770  throw new ForbiddenException();
771}
772`),cf()()(),Oa$1(315,`h4`,33)(316,`span`),DT(317,`Built-in HTTP exceptions`),cf()(),Oa$1(318,`p`),DT(319,`Nest provides a set of standard exceptions that inherit from the base `),Oa$1(320,`code`),DT(321,`HttpException`),cf(),DT(322,`. They are exposed from the `),Oa$1(323,`code`),DT(324,`@nestjs/common`),cf(),DT(325,` package and represent many of the most common HTTP exceptions:`),cf(),Oa$1(326,`ul`)(327,`li`)(328,`code`),DT(329,`BadRequestException`),cf()(),Oa$1(330,`li`)(331,`code`),DT(332,`UnauthorizedException`),cf()(),Oa$1(333,`li`)(334,`code`),DT(335,`NotFoundException`),cf()(),Oa$1(336,`li`)(337,`code`),DT(338,`ForbiddenException`),cf()(),Oa$1(339,`li`)(340,`code`),DT(341,`NotAcceptableException`),cf()(),Oa$1(342,`li`)(343,`code`),DT(344,`RequestTimeoutException`),cf()(),Oa$1(345,`li`)(346,`code`),DT(347,`ConflictException`),cf()(),Oa$1(348,`li`)(349,`code`),DT(350,`GoneException`),cf()(),Oa$1(351,`li`)(352,`code`),DT(353,`HttpVersionNotSupportedException`),cf()(),Oa$1(354,`li`)(355,`code`),DT(356,`PayloadTooLargeException`),cf()(),Oa$1(357,`li`)(358,`code`),DT(359,`UnsupportedMediaTypeException`),cf()(),Oa$1(360,`li`)(361,`code`),DT(362,`UnprocessableEntityException`),cf()(),Oa$1(363,`li`)(364,`code`),DT(365,`InternalServerErrorException`),cf()(),Oa$1(366,`li`)(367,`code`),DT(368,`NotImplementedException`),cf()(),Oa$1(369,`li`)(370,`code`),DT(371,`ImATeapotException`),cf()(),Oa$1(372,`li`)(373,`code`),DT(374,`MethodNotAllowedException`),cf()(),Oa$1(375,`li`)(376,`code`),DT(377,`MisdirectedException`),cf()(),Oa$1(378,`li`)(379,`code`),DT(380,`BadGatewayException`),cf()(),Oa$1(381,`li`)(382,`code`),DT(383,`ServiceUnavailableException`),cf()(),Oa$1(384,`li`)(385,`code`),DT(386,`GatewayTimeoutException`),cf()(),Oa$1(387,`li`)(388,`code`),DT(389,`PreconditionFailedException`),cf()()(),Oa$1(390,`p`),DT(391,`All the built-in exceptions can also provide an error `),Oa$1(392,`code`),DT(393,`cause`),cf(),DT(394,` and an error description through the `),Oa$1(395,`code`),DT(396,`options`),cf(),DT(397,` parameter:`),cf(),Oa$1(398,`app-copy-button`)(399,`pre`)(400,`code`,21),DT(401,`
773throw new BadRequestException('Something bad happened', {
774  cause: new Error(),
775  description: 'Some error description',
776});
777`),cf()()(),Oa$1(402,`p`),DT(403,`The response then looks like this:`),cf(),Oa$1(404,`pre`)(405,`code`,16),DT(406,`
778{
779  "message": "Something bad happened",
780  "error": "Some error description",
781  "statusCode": 400
782}
783`),cf()(),Oa$1(407,`h4`,34)(408,`span`),DT(409,`Machine-readable error codes`),cf()(),Oa$1(410,`p`),DT(411,`The `),Oa$1(4
vendor: 4,144 bytes, lines 783-823
78312,`code`),DT(413,`status`),cf(),DT(414,` and `),Oa$1(415,`code`),DT(416,`message`),cf(),DT(417,` of an exception describe an error well enough for humans, but they are awkward for clients to branch on. Several distinct failures, such as an invalid email and a weak password, can all surface as `),Oa$1(418,`code`),DT(419,`400 Bad Request`),cf(),DT(420,`, which forces the client to parse the human-readable message string to tell them apart.`),cf(),Oa$1(421,`p`),DT(422,`To avoid that, pass an `),Oa$1(423,`code`),DT(424,`errorCode`),cf(),DT(425,` through the `),Oa$1(426,`code`),DT(427,`options`),cf(),DT(428,` parameter. It is a stable, machine-readable identifier that is serialized into the response body:`),cf(),Oa$1(429,`app-copy-button`)(430,`pre`)(431,`code`,21),DT(432,`
784throw new BadRequestException('Password is too weak', {
785  errorCode: 'WEAK_PASSWORD',
786});
787`),cf()()(),Oa$1(433,`p`),DT(434,`The response then carries the code alongside the usual fields:`),cf(),Oa$1(435,`pre`)(436,`code`,16),DT(437,`
788{
789  "message": "Password is too weak",
790  "errorCode": "WEAK_PASSWORD",
791  "statusCode": 400
792}
793`),cf()(),Oa$1(438,`p`)(439,`code`),DT(440,`errorCode`),cf(),DT(441,` is optional and can be combined with `),Oa$1(442,`code`),DT(443,`cause`),cf(),DT(444,` and `),Oa$1(445,`code`),DT(446,`description`),cf(),DT(447,`. It is also available on `),Oa$1(448,`code`),DT(449,`HttpException`),cf(),DT(450,` itself, so custom exceptions can set it too:`),cf(),Oa$1(451,`app-copy-button`)(452,`pre`)(453,`code`,21),DT(454,`
794throw new HttpException(
795  'Forbidden',
796  HttpStatus.FORBIDDEN,
797  { errorCode: 'ACCOUNT_SUSPENDED' },
798);
799`),cf()()(),Oa$1(455,`blockquote`,17)(456,`strong`),DT(457,`Hint`),cf(),DT(458,` Unlike `),Oa$1(459,`code`),DT(460,`cause`),cf(),DT(461,`, which is intended for logging and is never serialized, `),Oa$1(462,`code`),DT(463,`errorCode`),cf(),DT(464,` is part of the response body and is meant to be consumed by clients.
800`),cf(),Oa$1(465,`h4`,35)(466,`span`),DT(467,`Exception filters`),cf()(),Oa$1(468,`p`),DT(469,`The built-in exception filter handles many cases automatically, but you may want `),Oa$1(470,`strong`),DT(471,`full control`),cf(),DT(472,` over the exceptions layer, e.g., to add logging or to use a different JSON schema based on dynamic factors. `),Oa$1(473,`strong`),DT(474,`Exception filters`),cf(),DT(475,` are designed for exactly this purpose. They let you control the exact flow of execution and the content of the response sent back to the client.`),cf(),Oa$1(476,`p`),DT(477,`Let's create an exception filter that catches exceptions that are instances of the `),Oa$1(478,`code`),DT(479,`HttpException`),cf(),DT(480,` class and implements custom response logic for them. To do this, we need access to the underlying platform `),Oa$1(481,`code`),DT(482,`Request`),cf(),DT(483,` and `),Oa$1(484,`code`),DT(485,`Response`),cf(),DT(486,` objects. We'll use the `),Oa$1(487,`code`),DT(488,`Request`),cf(),DT(489,` object to extract the original `),Oa$1(490,`code`),DT(491,`url`),cf(),DT(492,` and include it in the response, and the `),Oa$1(493,`code`),DT(494,`Response`),cf(),DT(495,` object to take direct control of the response that is sent, using the `),Oa$1(496,`code`),DT(497,`response.json()`),cf(),DT(498,` method.`),cf(),Oa$1(499,`app-copy-button`,19)(500,`span`,20),DT(501),AT(502,`extension`),Za$1(503,`app-tabs`,null,5),cf(),Oa$1(505,`pre`)(506,`code`,21),DT(507,`
801import { ExceptionFilter, Catch, ArgumentsHost, HttpException } from '@nestjs/common';
802import { Request, Response } from 'express';
803
804@Catch(HttpException)
805export class HttpExceptionFilter implements ExceptionFilter {
806  catch(exception: HttpException, host: ArgumentsHost) {
807    const ctx = host.switchToHttp();
808    const response = ctx.getResponse<Response>();
809    const request = ctx.getRequest<Request>();
810    const status = exception.getStatus();
811
812    response
813      .status(status)
814      .json({
815        statusCode: status,
816        timestamp: new Date().toISOString(),
817        path: request.url,
818      });
819  }
820}
821`),cf()(),Oa$1(508,`pre`)(509,`code`,21),DT(510,`
822import { Catch, HttpException } from '@nestjs/common';
823
824@Catch(HttpException)
825export class HttpExceptionFilter {
826  catch(exception, host) {
827    const ctx = host.switchToHttp();
828    const response = ctx.getResponse();
829    const request = ctx.getRequest();
830    const status = exception.getStatus();
831
832    response
833      .status(status)
834      .json({
835        statusCode: status,
836        timestamp: new Date().toISOString(),
837        path: request.url,
838      });
839  }
840}
841`),cf()()(),Oa$1(511,`blockquote`,17)(512,`strong`),DT(513,`Hint`),cf(),DT(514,` All exception filters should implement the generic `),Oa$1(515,`code`),DT(516,`ExceptionFilter<T>`),cf(),DT(517,` interface. This requires you to provide the `),Oa$1(518,`code`),DT(519,`catch(exception: T, host: ArgumentsHost)`),cf(),DT(520,` method with its indicated signature. `),Oa$1(521,`code`),DT(522,`T`),cf(),DT(523,` indicates the type of the exception.
842`),cf(),Oa$1(524,`blockquote`,36)(525,`strong`),DT(526,`Warning`),cf(),DT(527,` If you are using `),Oa$1(528,`code`),DT(529,`@nestjs/platform-fastify`),cf(),DT(530,`, use `),Oa$1(531,`code`),DT(532,`response.send()`),cf(),DT(533,` instead of `),Oa$1(534,`code`),DT(535,`response.json()`),cf(),DT(536,`, and import the corresponding types from `),Oa$1(537,`code`),DT(538,`fastify`),cf(),DT(539,`.
843`),cf(),Oa$1(540,`p`),DT(541,`The `),Oa$1(542,`code`),DT(543,`@Catch(HttpException)`),cf(),DT(544,` decorator binds the required metadata to the exception filter, telling Nest that this particular filter is looking for exceptions of type `),Oa$1(545,`code`),DT(546,`HttpException`),cf(),DT(547,` and nothing else. The `),Oa$1(548,`code`),DT(549,`@Catch()`),cf(),DT(550,` decorator accepts a single parameter or a comma-separated list, which lets you set up the filter for several types of exceptions at once.`),cf(),Oa$1(551,`h4`,37)(552,`span`),DT(553,`Arguments host`),cf()(),Oa$1(554,`p`),DT(555,`Let's look at the parameters of the `),Oa$1(556,`code`),DT(557,`catch()`),cf(),DT(558,` method. The `),Oa$1(559,`code`),DT(560,`exception`),cf(),DT(561,` parameter is the exception object currently being processed. The `),Oa$1(562,`code`),DT(563,`host`),cf(),DT(564,` parameter is an `),Oa$1(565,`code`),DT(566,`ArgumentsHost`),cf(),DT(567,` object, a utility that gives you access to the arguments passed to the original handler, whatever context it was invoked in. In the code sample above, we use its helper methods to obtain the `),Oa$1(568,`code`),DT(569,`Request`),cf(),DT(570,` and `),Oa$1(571,`code`),DT(572,`Response`),cf(),DT(573,` objects of the request in which the exception originated. `),Oa$1(574,`code`),DT(575,`ArgumentsHost`),cf(),DT(576,` is covered in full in the `),Oa$1(577,`a`,38),DT(578,`execution context chapter`),cf(),DT(579,`.`),cf(),Oa$1(580,`p`),DT(581,`The reason for this level of abstraction is that `),Oa$1(582,`code`),DT(583,`ArgumentsHost`),cf(),DT(584,` works in every context: the HTTP server context used here, but also microservices and WebSockets. The execution context chapter shows how to reach the `),Oa$1(585,`a`,39),DT(586,`underlying arguments`),cf(),DT(587,` for `),Oa$1(588,`strong`),DT(589,`any`),cf(),DT(590,` context through the same object, which lets you write a single exception filter that operates across all of them.`),cf(),Oa$1(591,`p`),Za$1(592,`app-banner-courses`),cf(),Oa$1(593,`h4`,40)(594,`span`),DT(595,`Binding filters`),cf()(),Oa$1(596,`p`),DT(597,`Let's bind our new `),Oa$1(598,`code`),DT(599,`HttpExceptionFilter`),cf(),DT(600,` to the `),Oa$1(601,`code`),DT(602,`create()`),cf(),DT(603,` method of the `),Oa$1(604,`code`),DT(605,`CatsController`),cf(),DT(606,`.`),cf(),Oa$1(607,`app-copy-button`,19)(608,`span`,20),DT(609),AT(610,`extension`),Za$1(611,`app-tabs`,null,6),cf(),Oa$1(613,`pre`)(614,`code`,21),DT(615,`
844@Post()
845@UseFilters(new HttpExceptionFilter())
846async create(@Body() createCatDto: CreateCatDto) {
847  throw new ForbiddenException();
848}
849`),cf()(),Oa$1(616,`pre`)(617,`code`,21),DT(618,`
850@Post()
851@UseFilters(new HttpExceptionFilter())
852@Bind(Body())
853async create(createCatDto) {
854  throw new ForbiddenException();
855}
856`),cf()()(),Oa$1(619,`blockquote`,17)(620,`strong`),DT(621,`Hint`),cf(),DT(622,` The `),Oa$1(623,`code`),DT(624,`@UseFilters()`),cf
vendor: 4,478 bytes, lines 856-896
856(),DT(625,` decorator is imported from the `),Oa$1(626,`code`),DT(627,`@nestjs/common`),cf(),DT(628,` package.
857`),cf(),Oa$1(629,`p`),DT(630,`Like the `),Oa$1(631,`code`),DT(632,`@Catch()`),cf(),DT(633,` decorator, `),Oa$1(634,`code`),DT(635,`@UseFilters()`),cf(),DT(636,` accepts a single filter instance or a comma-separated list of filter instances. Here, we created the `),Oa$1(637,`code`),DT(638,`HttpExceptionFilter`),cf(),DT(639,` instance in place. Alternatively, you can pass the class (instead of an instance), which leaves instantiation to the framework and enables `),Oa$1(640,`strong`),DT(641,`dependency injection`),cf(),DT(642,`.`),cf(),Oa$1(643,`app-copy-button`,19)(644,`span`,20),DT(645),AT(646,`extension`),Za$1(647,`app-tabs`,null,7),cf(),Oa$1(649,`pre`)(650,`code`,21),DT(651,`
858@Post()
859@UseFilters(HttpExceptionFilter)
860async create(@Body() createCatDto: CreateCatDto) {
861  throw new ForbiddenException();
862}
863`),cf()(),Oa$1(652,`pre`)(653,`code`,21),DT(654,`
864@Post()
865@UseFilters(HttpExceptionFilter)
866@Bind(Body())
867async create(createCatDto) {
868  throw new ForbiddenException();
869}
870`),cf()()(),Oa$1(655,`blockquote`,17)(656,`strong`),DT(657,`Hint`),cf(),DT(658,` Prefer binding filters by class instead of by instance when possible. This reduces `),Oa$1(659,`strong`),DT(660,`memory usage`),cf(),DT(661,`, since Nest can reuse instances of the same class across your entire module.
871`),cf(),Oa$1(662,`p`),DT(663,`In the example above, the `),Oa$1(664,`code`),DT(665,`HttpExceptionFilter`),cf(),DT(666,` is applied only to the `),Oa$1(667,`code`),DT(668,`create()`),cf(),DT(669,` route handler, which makes it method-scoped. Exception filters can be scoped at different levels: method-scoped (a method of a controller, resolver, or gateway), controller-scoped, or global-scoped. For example, to set up a controller-scoped filter, do the following:`),cf(),Oa$1(670,`app-copy-button`,19)(671,`span`,20),DT(672),AT(673,`extension`),Za$1(674,`app-tabs`,null,8),cf(),Oa$1(676,`pre`)(677,`code`,21),DT(678,`
872@Controller()
873@UseFilters(new HttpExceptionFilter())
874export class CatsController {}
875`),cf()()(),Oa$1(679,`p`),DT(680,`This sets up the `),Oa$1(681,`code`),DT(682,`HttpExceptionFilter`),cf(),DT(683,` for every route handler defined inside the `),Oa$1(684,`code`),DT(685,`CatsController`),cf(),DT(686,`.`),cf(),Oa$1(687,`p`),DT(688,`To create a global-scoped filter, do the following:`),cf(),Oa$1(689,`app-copy-button`,19)(690,`span`,20),DT(691),AT(692,`extension`),Za$1(693,`app-tabs`,null,9),cf(),Oa$1(695,`pre`)(696,`code`,21),DT(697,`
876async function bootstrap() {
877  const app = await NestFactory.create(AppModule);
878  app.useGlobalFilters(new HttpExceptionFilter());
879  await app.listen(process.env.PORT ?? 3000);
880}
881await bootstrap();
882`),cf()()(),Oa$1(698,`blockquote`,36)(699,`strong`),DT(700,`Warning`),cf(),DT(701,` The `),Oa$1(702,`code`),DT(703,`useGlobalFilters()`),cf(),DT(704,` method does not set up filters for gateways or hybrid applications.
883`),cf(),Oa$1(705,`p`),DT(706,`Global-scoped filters are used across the whole application, for every controller and every route handler. In terms of dependency injection, global filters registered from outside of any module (with `),Oa$1(707,`code`),DT(708,`useGlobalFilters()`),cf(),DT(709,`, as in the example above) cannot inject dependencies, since this happens outside the context of any module. To solve this, you can register a global-scoped filter `),Oa$1(710,`strong`),DT(711,`directly from any module`),cf(),DT(712,` using the following construction:`),cf(),Oa$1(713,`app-copy-button`,19)(714,`span`,20),DT(715),AT(716,`extension`),Za$1(717,`app-tabs`,null,10),cf(),Oa$1(719,`pre`)(720,`code`,21),DT(721,`
884import { Module } from '@nestjs/common';
885import { APP_FILTER } from '@nestjs/core';
886
887@Module({
888  providers: [
889    {
890      provide: APP_FILTER,
891      useClass: HttpExceptionFilter,
892    },
893  ],
894})
895export class AppModule {}
896`),cf()()(),Oa$1(722,`blockquote`,17)(723,`strong`),DT(724,`Hint`),cf(),DT(725,` When you use this approach to perform dependency injection for the filter, the filter is global regardless of the module in which this construction is employed. Register it in the module where the filter (`),Oa$1(726,`code`),DT(727,`HttpExceptionFilter`),cf(),DT(728,` in the example above) is defined. Also, `),Oa$1(729,`code`),DT(730,`useClass`),cf(),DT(731,` is not the only way to register a custom provider. Learn more about `),Oa$1(732,`a`,41),DT(733,`custom providers`),cf(),DT(734,`.
897`),cf(),Oa$1(735,`blockquote`,17)(736,`strong`),DT(737,`Hint`),cf(),DT(738,` Exceptions thrown from `),Oa$1(739,`a`,42),DT(740,`middleware`),cf(),DT(741,` are also processed by the exceptions layer. Because middleware runs before a route handler is selected, only `),Oa$1(742,`strong`),DT(743,`global`),cf(),DT(744,` exception filters apply (`),Oa$1(745,`code`),DT(746,`app.useGlobalFilters()`),cf(),DT(747,` or `),Oa$1(748,`code`),DT(749,`APP_FILTER`),cf(),DT(750,`). Method-scoped and controller-scoped `),Oa$1(751,`code`),DT(752,`@UseFilters()`),cf(),DT(753,` bindings are not invoked.
898`),cf(),Oa$1(754,`p`),DT(755,`You can register as many filters as needed with this technique by adding each one to the `),Oa$1(756,`code`),DT(757,`providers`),cf(),DT(758,` array.`),cf(),Oa$1(759,`h4`,43)(760,`span`),DT(761,`Catch everything`),cf()(),Oa$1(762,`p`),DT(763,`To catch `),Oa$1(764,`strong`),DT(765,`every`),cf(),DT(766,` unhandled exception, regardless of its type, leave the `),Oa$1(767,`code`),DT(768,`@Catch()`),cf(),DT(769,` decorator's parameter list empty, i.e., `),Oa$1(770,`code`),DT(771,`@Catch()`),cf(),DT(772,`.`),cf(),Oa$1(773,`p`),DT(774,`The example below is platform-agnostic: it delivers the response through the `),Oa$1(775,`a`,44),DT(776,`HTTP adapter`),cf(),DT(777,` rather than using the platform-specific `),Oa$1(778,`code`),DT(779,`Request`),cf(),DT(780,` and `),Oa$1(781,`code`),DT(782,`Response`),cf(),DT(783,` objects directly, so the same filter works with both Express and Fastify.`),cf(),Oa$1(784,`app-copy-button`)(785,`pre`)(786,`code`,21),DT(787,`
899import {
900  ExceptionFilter,
901  Catch,
902  ArgumentsHost,
903  HttpException,
904  HttpStatus,
905} from '@nestjs/common';
906import { HttpAdapterHost } from '@nestjs/core';
907
908@Catch()
909export class CatchEverythingFilter implements ExceptionFilter {
910  constructor(private readonly httpAdapterHost: HttpAdapterHost) {}
911
912  catch(exception: unknown, host: ArgumentsHost): void {
913    // In certain situations \`httpAdapter\` might not be available in the
914    // constructor, so resolve it here.
915    const { httpAdapter } = this.httpAdapterHost;
916
917    const ctx = host.switchToHttp();
918
919    const httpStatus =
920      exception instanceof HttpException
921        ? exception.getStatus()
922        : HttpStatus.INTERNAL_SERVER_ERROR;
923
924    const responseBody = {
925      statusCode: httpStatus,
926      timestamp: new Date().toISOString(),
927      path: httpAdapter.getRequestUrl(ctx.getRequest()),
928    };
929
930    httpAdapter.reply(ctx.getResponse(), responseBody, httpStatus);
931  }
932}
933`),cf()()(),Oa$1(788,`blockquote`,36)(789,`strong`),DT(790,`Warning`),cf(),DT(791,` When combining a catch-everything filter with one bound to a specific exception type, declare the catch-everything filter `),Oa$1(792,`strong`),DT(793,`first`),cf(),DT(794,`, so the more specific filter can still handle the type it is bound to.
934`),cf(),Oa$1(795,`h4`,45)(796,`span`),DT(797,`Inheritance`),cf()(),Oa$1(798,`p`),DT(799,`Typically, you'll create fully customized exception filters tailored to your application's requirements. However, in some cases you may want to extend the built-in `),Oa$1(800,`strong`),DT(801,`global exception filter`),cf(),DT(802,` and override its behavior only under certain conditions.`),cf(),Oa$1(803,`p`),DT(804,`To delegate exception processing to the base filter, extend `),Oa$1(805,`code`),DT(806,`BaseExceptionFilter`),cf(),DT(807,` and call the inherited `),Oa$1(808,`code`),DT(809,`catch()`),cf(),DT(810,` method.`),cf(),Oa$1(811,`app-copy-button`,19)(812,`span`,20),DT(813),AT(814,`extension`),Za$1(815,`app-tabs`,null,11),cf(),Oa$1(817,`pre`)(818,`code`,21),DT(819,`
935import { Catch, ArgumentsHost } from '@nestjs/common';
936import { BaseExceptionFilter } from '@nestjs/core';
937
938@Catch()
939export class AllExceptionsFilter extends BaseExceptionFilter {
940  catch(exception: unknown, host: ArgumentsHost) {
941    super.catch(exception, host);
942  }
943}
944`),cf()(),Oa$1(820,`pre`)(821,`code`,21),DT(822,`
945import { Catch } from '@nestjs/common';
946import { BaseExceptionFilter } from '@nestjs/core';
947
948@Catch()
949export class AllExceptionsFilter extends BaseExceptionFilter {
950  catch(exception, host) {
951    super.catch(exception, host);
952  }
953}
954`),cf()()(),Oa$1(823,`blockquote`,36)(824,`strong`),DT(825,`Warning`),cf(),DT(826,` Method-scoped and controller-scoped filters that extend the `),Oa$1(827,`code`),DT(828,`BaseExceptionFilter`),cf(),DT(829,` should not be instantiated with `),Oa$1(830,`code`),DT(831,`new`),cf(),DT(832,`. Instead, let the framework instantiate them automatically.
955`),cf(),Oa$1(833,`p`),DT(834,`Global filters `),Oa$1(835,`strong`),DT(836,`can`),cf(),DT(837,` extend the base filter, in one of two ways.`),cf(),Oa$1(838,`p`),DT(839,`The first is to pass the `),Oa$1(840,`code`),DT(841,`HttpAdapter`),cf(),DT(842,` reference to the constructor when instantiating the custom global filter:`),cf(),Oa$1(843,`app-copy-button`)(844,`pre`)(845,`code`,21),DT(846,`
956async function bootstrap() {
957  const app = await NestFactory.create(AppModule);
958
959  const { httpAdapter } = app.get(HttpAdapterHost);
960  app.useGlobalFilters(new AllExceptionsFilter(httpAdapter));
961
962  await app.listen(process.env.PORT ?? 3000);
963}
964await bootstrap();
965`),cf()()(),Oa$1(847,`p`),DT(848,`The second is to register the filter with the `),Oa$1(849,`code`),DT(850,`APP_FILTER`),cf(),DT(851,` token, `),Oa$1(852,`a`,46),DT(853,`as shown earlier`),cf(),DT(854,`.`),cf()(),Oa$1(855,`a`,47),Za$1(856,`i`,48),Oa$1(857,`span`),DT(858,`Edit on GitHub`),cf()()()),a&2){let l=QS(75),d=QS(177),m=QS(291),h=QS(311),u=QS(504),b=QS(612),S=QS(648),k=QS(675),C=QS(694),w=QS(718),P=QS(816);UC(72),hf(` `,OT(73,27,`cats.controller`,l.isJsActive),`
966`),UC(102),hf(` `,OT(175,30,`cats.controller`,d.isJsActive),`
967`),UC(114),hf(` `,OT(289,33,`forbidden.exception`,m.isJsActive),`
968`),UC(20),hf(` `,OT(309,36,`cats.controller`,h.isJsActive),`
969`),UC(193),hf(` `,OT(502,39,`http-exception.filter`,u.isJsActive),`
970`),UC(4),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(101),hf(` `,OT(610,42,`cats.controller`,b.isJsActive),`
971`),UC(4),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive),UC(29),hf(` `,OT(646,45,`cats.controller`,S.isJsActive),`
972`),UC(4),By(`hide`,S.isJsActive),UC(3),By(`hide`,!S.isJsActive),UC(20),hf(` `,OT(673,48,`cats.controller`,k.isJsActive),`
973`),UC(19),hf(` `,OT(692,51,`main`,C.isJsActive),`
974`),UC(24),hf(` `,OT(716,54,`app.module`,w.isJsActive),`
975`),UC(98),hf(` `,OT(814,57,`all-exceptions.filter`,P.isJsActive),`
976`),UC(4),By(`hide`,P.isJsActive),UC(3),By(`hide`,!P.isJsActive)}},dependencies:[xt,tn$1,u,tu,l$1,g],encapsulation:2})}return o})();var Kr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-first-steps`]],features:[My],decls:375,vars:10,consts:[[`contentReference`,``],[`appa87c9d3f6706f1a389bc164b90bab32704b24dae`,``],[1,`content`],[1,`content-inner`],[`id`,`first-steps`],[`appAnchor`,``,`id`,`language`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/en/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://babeljs.io/`],[`appAnchor`,``,`id`,`prerequisites`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org`],[`appAnchor`,``,`id`,`setup`],[`routerLink`,`/cli/overview`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/`],[1,`language-bash`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/tsconfig#strict`],[1,`file-tree`],[1,`item`],[1,`children`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`platform`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.fastify.io`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.fastify.io/`],[`routerLink`,`/http/performance`],[`appAnchor`,``,`id`,`running-the-application`],[`routerLink`,`/recipes/swc`],[`appAnchor`,``,`id`,`linting-and-formatting`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://oxc.rs/docs/guide/usage/linter.html`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prettier.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prettier.io/docs/en/comparison.html`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/package/oxlint`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/package/prettier`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/first-steps.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,2,0)(2,`div`,3)(3,`h3`,4),DT(4,`First steps`),cf(),Oa$1(5,`p`),DT(6,`This set of articles covers the `),Oa$1(7,`strong`),DT(8,`core fundamentals`),cf(),DT(9,` of Nest. To introduce the essential building blocks of a Nest application, we'll build a basic CRUD application whose features cover a lot of ground at an introductory level.`),cf(),Oa$1(10,`h4`,5)(11,`span`),DT(12,`Language`),cf()(),Oa$1(13,`p`),DT(14,`Nest is written in `),Oa$1(15,`a`,6),DT(16,`Type
976Script`),cf(),DT(17,` and runs on `),Oa$1(18,`a`,7),DT(19,`Node.js`),cf(),DT(20,`, and it supports both TypeScript and plain JavaScript. Because Nest relies on the latest language features, using it with plain JavaScript requires `),Oa$1(21,`a`,8),DT(22,`Babel`),cf(),DT(23,`.`),cf(),Oa$1(24,`p`),DT(25,`Most examples in this documentation use TypeScript, but you can `),Oa$1(26,`strong`),DT(27,`switch any code snippet`),cf(),DT(28,` to plain JavaScript syntax with the language toggle in the upper-right corner of the snippet.`),cf(),Oa$1(29,`h4`,9)(30,`span`),DT(31,`Prerequisites`),cf()(),Oa$1(32,`p`),DT(33,`Make sure that `),Oa$1(34,`a`,10),DT(35,`Node.js`),cf(),DT(36,` is installed on your operating system. Running a Nest application requires `),Oa$1(37,`strong`),DT(38,`v20.19 or later`),cf(),DT(39,` (or `),Oa$1(40,`strong`),DT(41,`v22.12+`),cf(),DT(42,` on the 22.x line). The Nest CLI's generators (such as `),Oa$1(43,`code`),DT(44,`nest new`),cf(),DT(45,` and `),Oa$1(46,`code`),DT(47,`nest generate`),cf(),DT(48,`) require `),Oa$1(49,`strong`),DT(50,`v22.22.3+, v24.15+, or v26+`),cf(),DT(51,`. We recommend the latest active LTS release, which satisfies both requirements.`),cf(),Oa$1(52,`h4`,11)(53,`span`),DT(54,`Setup`),cf()(),Oa$1(55,`p`),DT(56,`The quickest way to set up a new project is 
976with the `),Oa$1(57,`a`,12),DT(58,`Nest CLI`),cf(),DT(59,`. With `),Oa$1(60,`a`,13),DT(61,`npm`),cf(),DT(62,` installed, run the following commands in your terminal:`),cf(),Oa$1(63,`pre`)(64,`code`,14),DT(65,`
977$ npm i -g @nestjs/cli
978$ nest new project-name
979`),cf()(),Oa$1(66,`p`),DT(67,`The CLI asks which module system to use: ESM (the default), which uses Vitest as the test runner, or CommonJS, which uses Jest.`),cf(),Oa$1(68,`p`),DT(69,`It also asks whether to set up `),Oa$1(70,`a`,15),DT(71,`NestJS Observe`),cf(),DT(72,`, the official observability platform for Nest. If you answer yes, the generated project includes the `),Oa$1(73,`code`),DT(74,`@nestjs/observe`),cf(),DT(75,` SDK, already wired into `),Oa$1(76,`code`),DT(77,`AppModule`),cf(),DT(78,` and `),Oa$1(79,`code`),DT(80,`NestFactory.create()`),cf(),DT(81,`. Requests, background jobs, errors, and distributed traces start reporting as soon as you supply your app key and secret, and the free plan needs no payment details. In an interactive terminal, the prompt defaults to yes; in non-interactive environments, such as CI, it is skipped and Observe is not added. Pass `),Oa$1(82,`code`),DT(83,`--observe`),cf(),DT(84,` or `),Oa$1(85,`code`),DT(86,`--no-observe`),cf(),DT(87,` to skip the prompt either way. See the `),Oa$1(88,`a`,16),DT(89,`Observability`),cf(),DT(90,` chapter for what Observe covers.`),cf(),Oa$1(91,`blockquote`,17)(92,`strong`),DT(93,`Hint`),cf(),DT(94,` New projects are generated with TypeScript's `),Oa$1(95,`a`,18),DT(96,`strict`),cf(),DT(97,` mode enabled. To opt out, set `),Oa$1(98,`code`),DT(99,`"strict": false`),cf(),DT(100,` in the generated `),Oa$1(101,`code`),DT(102,`tsconfig.json`),cf(),DT(103,`.
980`),cf(),Oa$1(104,`p`),DT(105,`The CLI creates a `),Oa$1(106,`code`),DT(107,`project-name`),cf(),DT(108,` directory, installs the dependencies, generates a few boilerplate files, and populates a `),Oa$1(109,`code`),DT(110,`src/`),cf(),DT(111,` directory with several core files.`),cf(),Oa$1(112,`div`,19)(113,`div`,20),DT(114,`src`),cf(),Oa$1(115,`div`,21)(116,`div`,20),DT(117,`app.controller.spec.ts`),cf(),Oa$1(118,`div`,20),DT(119,`app.controller.ts`),cf(),Oa$1(120,`div`,20),DT(121,`app.module.ts`),cf(),Oa$1(122,`div`,20),DT(123,`app.service.ts`),cf(),Oa$1(124,`div`,20),DT(125,`main.ts`),cf()()(),Oa$1(126,`p`),DT(127,`The following table describes these core files:`),cf(),Oa$1(128,`table`),Za$1(129,`thead`),Oa$1(130,`tbody`)(131,`tr`)(132,`td`)(133,`code`),DT(134,`app.controller.ts`),cf()(),Oa$1(135,`td`),DT(136,`A basic controller with a single route.`),cf()(),Oa$1(137,`tr`)(138,`td`)(139,`code`),DT(140,`app.controller.spec.ts`),cf()(),Oa$1(141,`td`),DT(142,`The unit tests for the controller.`),cf()(),Oa$1(143,`tr`)(144,`td`)(145,`code`),DT(146,`app.module.ts`),cf()(),Oa$1(147,`td`),DT(148,`The root module of the application.`),cf()(),Oa$1(149,`tr`)(150,`td`)(151,`code`),DT(152,`app.service.ts`),cf()(),Oa$1(153,`td`),DT(154,`A basic service with a single method.`),cf()(),Oa$1(155,`tr`)(156,`td`)(157,`code`),DT(158,`main.ts`),cf()(),Oa$1(159,`td`),DT(160,`The entry file of the application. It uses `),Oa$1(161,`code`),DT(162,`NestFactory`),cf
vendor: 3,654 bytes, lines 980-999
980(),DT(163,` to create a Nest application instance.`),cf()()()(),Oa$1(164,`p`),DT(165,`The `),Oa$1(166,`code`),DT(167,`main.ts`),cf(),DT(168,` file contains an async function that `),Oa$1(169,`strong`),DT(170,`bootstraps`),cf(),DT(171,` the application:`),cf(),Oa$1(172,`app-copy-button`,22)(173,`span`,23),DT(174),AT(175,`extension`),Za$1(176,`app-tabs`,null,1),cf(),Oa$1(178,`pre`)(179,`code`,24),DT(180,`
981import { NestFactory } from '@nestjs/core';
982import { AppModule } from './app.module.js';
983
984async function bootstrap() {
985  const app = await NestFactory.create(AppModule);
986  await app.listen(process.env.PORT ?? 3000);
987}
988await bootstrap();
989`),cf()(),Oa$1(181,`pre`)(182,`code`,24),DT(183,`
990import { NestFactory } from '@nestjs/core';
991import { AppModule } from './app.module.js';
992
993async function bootstrap() {
994  const app = await NestFactory.create(AppModule);
995  await app.listen(process.env.PORT ?? 3000);
996}
997await bootstrap();
998`),cf()()(),Oa$1(184,`p`),DT(185,`To create a Nest application instance, use `),Oa$1(186,`code`),DT(187,`NestFactory`),cf(),DT(188,` from `),Oa$1(189,`code`),DT(190,`@nestjs/core`),cf(),DT(191,`, which exposes a few methods for this purpose. The `),Oa$1(192,`code`),DT(193,`create()`),cf(),DT(194,` method returns an application object that implements the `),Oa$1(195,`code`),DT(196,`INestApplication`),cf(),DT(197,` interface. The methods of this object are described in the following chapters. In the `),Oa$1(198,`code`),DT(199,`main.ts`),cf(),DT(200,` example above, the application starts an HTTP listener and waits for inbound HTTP requests.`),cf(),Oa$1(201,`p`),DT(202,`The project structure generated by the Nest CLI encourages the convention of keeping each module in its own dedicated directory.`),cf(),Oa$1(203,`blockquote`,17)(204,`strong`),DT(205,`Hint`),cf(),DT(206,` By default, if an error occurs while the application is being created, the process exits with code `),Oa$1(207,`code`),DT(208,`1`),cf(),DT(209,`. To have the error thrown instead, disable the `),Oa$1(210,`code`),DT(211,`abortOnError`),cf(),DT(212,` option (e.g., `),Oa$1(213,`code`),DT(214),cf(),DT(215,`).
999`),cf(),Oa$1(216,`p`),Za$1(217,`app-banner-courses`),cf(),Oa$1(218,`h4`,25)(219,`span`),DT(220,`Platform`),cf()(),Oa$1(221,`p`),DT(222,`Nest is designed to be platform-agnostic. Platform independence lets you create reusable logical parts that can be used across several different types of applications. Nest can work with any Node.js HTTP framework once an adapter is created for it. Two HTTP platforms are supported out of the box: `),Oa$1(223,`a`,26),DT(224,`Express`),cf(),DT(225,` and `),Oa$1(226,`a`,27),DT(227,`Fastify`),cf(),DT(228,`. Choose the one that best suits your needs.`),cf(),Oa$1(229,`table`),Za$1(230,`thead`),Oa$1(231,`tbody`)(232,`tr`)(233,`td`)(234,`code`),DT(235,`platform-express`),cf()(),Oa$1(236,`td`)(237,`a`,26),DT(238,`Express`),cf(),DT(239,` is a well-known, minimalist web framework for Node.js. It is a battle-tested, production-ready library with extensive community resources. Nest uses the `),Oa$1(240,`code`),DT(241,`@nestjs/platform-express`),cf(),DT(242,` package by default, so no setup is required.`),cf()(),Oa$1(243,`tr`)(244,`td`)(245,`code`),DT(246,`platform-fastify`),cf()(),Oa$1(247,`td`)(248,`a`,28),DT(249,`Fastify`),cf(),DT(250,` is a high-performance, low-overhead framework focused on efficiency and speed. To learn how to use it, see `),Oa$1(251,`a`,29),DT(252,`Performance (Fastify)`),cf(),DT(253,`.`),cf()()()(),Oa$1(254,`p`),DT(255,`Each platform exposes its own application interface: `),Oa$1(256,`code`),DT(257,`NestExpressApplication`),cf(),DT(258,` and `),Oa$1(259,`code`),DT(2
99960,`NestFastifyApplication`),cf(),DT(261,`, respectively.`),cf(),Oa$1(262,`p`),DT(263,`When you pass a type to the `),Oa$1(264,`code`),DT(265,`NestFactory.create()`),cf(),DT(266,` method, as in the example below, the `),Oa$1(267,`code`),DT(268,`app`),cf(),DT(269,` object exposes methods that are available only on that platform. You don't `),Oa$1(270,`strong`),DT(271,`need`),cf(),DT(272,` to specify a type `),Oa$1(273,`strong`),DT(274,`unless`),cf(),DT(275,` you want to access the underlying platform API.`),cf(),Oa$1(276,`app-copy-button`)(277,`pre`)(278,`code`,24),DT(279,`
1000const app = await NestFactory.create<NestExpressApplication>(AppModule);
1001`),cf()()(),Oa$1(280,`h4`,30)(281,`span`),DT(282,`Running the application`),cf()(),Oa$1(283,`p`),DT(284,`Once the installation is complete, run the following command to start the application and listen for inbound HTTP requests:`),cf(),Oa$1(285,`pre`)(286,`code`,14),DT(287,`
1002$ npm run start
1003`),cf()(),Oa$1(288,`blockquote`,17)(289,`strong`),DT(290,`Hint`),cf(),DT(291,` To speed up development builds, use the `),Oa$1(292,`a`,31),DT(293,`SWC builder`),cf(),DT(294,` by passing the `),Oa$1(295,`code`),DT(296,`-b swc`),cf(),DT(297,` flag to the `),Oa$1(298,`code`),DT(299,`start`),cf(),DT(300,` script: `),Oa$1(301,`code`),DT(302,`npm run start -- -b swc`),cf(),DT(303,`.
1004`),cf(),Oa$1(304,`p`),DT(305,`This command starts the HTTP server on the port defined in the `),Oa$1(306,`code`),DT(307,`src/main.ts`),cf(),DT(308,` file (`),Oa$1(309,`code`),DT(310,`3000`),cf(),DT(311,`, unless the `),Oa$1(312,`code`),DT(313,`PORT`),cf(),DT(314,` environment variable is set). Once the application is running, open your browser and navigate to `),Oa$1(315,`code`),DT(316,`http://localhost:3000/`),cf(),DT(317,`. You should see the `),Oa$1(318,`code`),DT(319,`Hello World!`),cf(),DT(320,` message.`),cf(),Oa$1(321,`p`),DT(322,`To watch your files for changes, start the application with the following command instead:`),cf(),Oa$1(323,`pre`)(324,`code`,14),DT(325,`
1005$ npm run start:dev
1006`),cf()(),Oa$1(326,`p`),DT(327,`This command watches your files and, whenever they change, recompiles and restarts the server.`),cf(),Oa$1(328,`h4`,32)(329,`span`),DT(330,`Linting and formatting`),cf()(),Oa$1(331,`p`),DT(332,`The `),Oa$1(333,`a`,12),DT(334,`Nest CLI`),cf(),DT(335,` aims to scaffold a reliable development workflow that scales. For a fast default workflow, generated TypeScript projects come with a code `),Oa$1(336,`strong`),DT(337,`linter`),cf(),DT(338,` and a `),Oa$1(339,`strong`),DT(340,`formatter`),cf(),DT(341,` preinstalled: `),Oa$1(342,`a`,33),DT(343,`oxlint`),cf(),DT(344,` and `),Oa$1(345,`a`,34),DT(346,`Prettier`),cf(),DT(347,`, respectively.`),cf(),Oa$1(348,`blockquote`,17)(349,`strong`),DT(350,`Hint`),cf(),DT(351,` Not sure how formatters and linters differ? See Prettier's `),Oa$1(352,`a`,35),DT(353,`comparison`),cf(),DT(354,`.
1007`),cf(),Oa$1(355,`p`),DT(356,`For headless environments where an IDE is not involved (continuous integration, Git hooks, etc.), the project includes ready-to-use `),Oa$1(357,`code`),DT(358,`npm`),cf(),DT(359,` scripts that run `),Oa$1(360,`a`,36)(361,`code`),DT(362,`oxlint`),cf()(),DT(363,` and `),Oa$1(364,`a`,37)(365,`code`),DT(366,`prettier`),cf()(),DT(367,`:`),cf(),Oa$1(368,`pre`)(369,`code`,14),DT(370,`
1008# Lint with oxlint
1009$ npm run lint
1010
1011# Format with prettier
1012$ npm run format
1013`),cf()()(),Oa$1(371,`a`,38),Za$1(372,`i`,39),Oa$1(373,`span`),DT(374,`Edit on GitHub`),cf()()()),a&2){let l=QS(177);UC(174),hf(` `,OT(175,7,`main`,l.isJsActive),`
1014`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(33),Wy(`NestFactory.create(AppModule, `,`{`,` abortOnError: false `,`}`,`)`)}},dependencies:[xt,tu,tn$1,u,l$1,g],encapsulation:2})}return o})();var Qr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-guards`]],features:[My],decls:482,vars:40,consts:[[`contentReference`,``],[`app9d50b75f15759cce2036fe518ec545401548a0cf`,``],[`app8d30f67ccf47d155eea86c21045b18d1c5a6d9ce`,``],[`appa8077b8eb105dc076775d94c4f2897dbaf805e1e`,``],[`app6f14cab49ff4c0f0281866750038d9f33849f3a1`,``],[`app85549c2454bbaee31cab78c96ad438e15ba0415f`,``],[`app791c91bf030c24ca0e91d2c2270e09a9a127dc69`,``],[`app9d63c5c3b3f8248089fb9365dd762a42b442766a`,``],[`appb326a598dae612a604dfd82e5c727bfcaf4a0e38`,``],[`appa0f7690565f8b266689dc163e1a8a596a3fbcd6e`,``],[1,`content`],[1,`content-inner`],[`id`,`guards`],[`src`,`/assets/Guards_1.png`,1,`illustrative-image`],[`routerLink`,`/middleware`],[1,`info`],[`appAnchor`,``,`id`,`authorization-guard`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`routerLink`,`/security/authentication`],[`routerLink`,`/security/authorization`],[`appAnchor`,``,`id`,`execution-context`],[`href`,`/exception-filters#arguments-host`],[`routerLink`,`/fundamentals/execution-context`],[`appAnchor`,``,`id`,`role-based-authentication`],[`appAnchor`,``,`id`,`binding-guards`],[1,`warning`],[`routerLink`,`/faq/hybrid-application`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`setting-roles-per-handler`],[`href`,`/fundamentals/execution-context#reflection-and-metadata`],[1,`language-ts`],[`href`,`/fundamentals/execution-context#low-level-approach`],[`appAnchor`,``,`id`,`putting-it-all-together`],[1,`language-json`],[`routerLink`,`/exception-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/guards.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),DT(4,`Guards`),cf(),Oa$1(5,`p`),DT(6,`A guard is a class annotated with the `),Oa$1(7,`code`),DT(8,`@Injectable()`),cf(),DT(9,` decorator that implements the `),Oa$1(10,`code`),DT(11,`CanActivate`),cf(),DT(12,` interface.`),cf(),Oa$1(13,`figure`),Za$1(14,`img`,13),cf(),Oa$1(15,`p`),DT(16,`Guards have a `),Oa$1(17,`strong`),DT(18,`single responsibility`),cf
1014(),DT(19,`: they determine whether a given request will be handled by the route handler, based on conditions present at runtime (such as permissions, roles, or ACLs). This is often referred to as `),Oa$1(20,`strong`),DT(21,`authorization`),cf(),DT(22,`. In traditional Express applications, authorization (and its close relative, `),Oa$1(23,`strong`),DT(24,`authentication`),cf(),DT(25,`, with which it usually collaborates) has typically been handled by `),Oa$1(26,`a`,14),DT(27,`middleware`),cf(),DT(28,`. Middleware is a good fit for authentication, because tasks such as validating a token and attaching properties to the `),Oa$1(29,`code`),DT(30,`request`),cf(),DT(31,` object are not tied to a particular route context (and its metadata).`),cf(),Oa$1(32,`p`),DT(33,`Middleware, however, is context-blind by nature: it doesn't know which handler will be executed after it calls `),Oa$1(34,`code`),DT(35,`next()`),cf(),DT(36,`. `),Oa$1(37,`strong`),DT(38,`Guards`),cf(),DT(39,`, on the other hand, have access to the `),Oa$1(40,`code`),DT(41,`ExecutionContext`),cf(),DT(42,` instance, so they know exactly what will be executed next. Like exception filters, pipes, and interceptors, guards let you interpose processing logic at exactly the right point in the request/response cycle, and do so declaratively. This helps keep your code DRY.`),cf(),Oa$1(43,`blockquote`,15)(44,`strong`),DT(45,`Hint`),cf(),DT(46,` Guards are executed `),Oa$1(47,`strong`),DT(48,`after`),cf(),DT(49,` all middleware, but `),Oa$1(50,`strong`),DT(51,`before`),cf(),DT(52,` any interceptor or pipe.
1015`),cf(),Oa$1(53,`h4`,16)(54,`span`),DT(55,`Authorization guard`),cf()(),Oa$1(56,`p`),DT(57,`As mentioned, `),Oa$1(58,`strong`),DT(59,`authorization`),cf(),DT(60,` is a common use case for guards, because specific routes should be available only when the caller (usually a specific authenticated user) has sufficient permissions. The `),Oa$1(61,`code`),DT(62,`AuthGuard`),cf(),DT(63,` we'll build now assumes an authenticated user, and therefore a token attached to the request headers. It extracts and validates the token, and uses the extracted information to determine whether the request can proceed.`),
vendor: 5,288 bytes, lines 1015-1064
1015cf(),Oa$1(64,`app-copy-button`,17)(65,`span`,18),DT(66),AT(67,`extension`),Za$1(68,`app-tabs`,null,1),cf(),Oa$1(70,`pre`)(71,`code`,19),DT(72,`
1016import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
1017import { Observable } from 'rxjs';
1018
1019@Injectable()
1020export class AuthGuard implements CanActivate {
1021  canActivate(
1022    context: ExecutionContext,
1023  ): boolean | Promise<boolean> | Observable<boolean> {
1024    const request = context.switchToHttp().getRequest();
1025    return validateRequest(request);
1026  }
1027}
1028`),cf()(),Oa$1(73,`pre`)(74,`code`,19),DT(75,`
1029import { Injectable } from '@nestjs/common';
1030
1031@Injectable()
1032export class AuthGuard {
1033  async canActivate(context) {
1034    const request = context.switchToHttp().getRequest();
1035    return validateRequest(request);
1036  }
1037}
1038`),cf()()(),Oa$1(76,`blockquote`,15)(77,`strong`),DT(78,`Hint`),cf(),DT(79,` For a real-world example of an authentication mechanism, see the `),Oa$1(80,`a`,20),DT(81,`authentication`),cf(),DT(82,` chapter. For a more sophisticated authorization example, see the `),Oa$1(83,`a`,21),DT(84,`authorization`),cf(),DT(85,` chapter.
1039`),cf(),Oa$1(86,`p`),DT(87,`The logic inside the `),Oa$1(88,`code`),DT(89,`validateRequest()`),cf(),DT(90,` function can be as simple or as sophisticated as needed. The point of this example is to show how guards fit into the request/response cycle.`),cf(),Oa$1(91,`p`),DT(92,`Every guard must implement a `),Oa$1(93,`code`),DT(94,`canActivate()`),cf(),DT(95,` method. It returns a boolean indicating whether the current request is allowed, either synchronously or asynchronously (via a `),Oa$1(96,`code`),DT(97,`Promise`),cf(),DT(98,` or an `),Oa$1(99,`code`),DT(100,`Observable`),cf(),DT(101,`). Nest uses the return value to decide what happens next:`),cf(),Oa$1(102,`ul`)(103,`li`),DT(104,`if it returns `),Oa$1(105,`code`),DT(106,`true`),cf(),DT(107,`, the request is processed.`),cf(),Oa$1(108,`li`),DT(109,`if it returns `),Oa$1(110,`code`),DT(111,`false`),cf(),DT(112,`, Nest denies the request.`),cf()(),Oa$1(113,`p`),Za$1(114,`app-banner-enterprise`),cf(),Oa$1(115,`h4`,22)(116,`span`),DT(117,`Execution context`),cf()(),Oa$1(118,`p`),DT(119,`The `),Oa$1(120,`code`),DT(121,`canActivate()`),cf(),DT(122,` method takes a single argument, the `),Oa$1(123,`code`),DT(124,`ExecutionContext`),cf(),DT(125,` instance. `),Oa$1(126,`code`),DT(127,`ExecutionContext`),cf(),DT(128,` extends `),Oa$1(129,`code`),DT(130,`ArgumentsHost`),cf(),DT(131,`, which we covered in the exception filters chapter. The sample above uses the same helper methods defined on `),Oa$1(132,`code`),DT(133,`ArgumentsHost`),cf(),DT(134,` to get a reference to the `),Oa$1(135,`code`),DT(136,`Request`),cf(),DT(137,` object. See the `),Oa$1(138,`strong`),DT(139,`Arguments host`),cf(),DT(140,` section of the `),Oa$1(141,`a`,23),DT(142,`exception filters`),cf(),DT(143,` chapter for more on this topic.`),cf(),Oa$1(144,`p`),DT(145,`By extending `),Oa$1(146,`code`),DT(147,`ArgumentsHost`),cf(),DT(148,`, `),Oa$1(149,`code`),DT(150,`ExecutionContext`),cf(),DT(151,` adds several helper methods that provide additional details about the current execution process. These details help you build more generic guards that work across a broad set of controllers, methods, and execution contexts. See the `),Oa$1(152,`a`,24),DT(153,`execution context`),cf(),DT(154,` chapter to learn more about `),Oa$1(155,`code`),DT(156,`ExecutionContext`),cf(),DT(157,`.`),cf(),Oa$1(158,`h4`,25)(159,`span`),DT(160,`Role-based authentication`),cf()(),Oa$1(161,`p`),DT(162,`Let's build a more functional guard that permits access only to users with a specific role. We'll start with a basic guard template and build on it in the following sections. For now, it allows all requests to proceed:`),cf(),Oa$1(163,`app-copy-button`,17)(164,`span`,18),DT(165),AT(166,`extension`),Za$1(167,`app-tabs`,null,2),cf(),Oa$1(169,`pre`)(170,`code`,19),DT(171,`
1040import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
1041import { Observable } from 'rxjs';
1042
1043@Injectable()
1044export class RolesGuard implements CanActivate {
1045  canActivate(
1046    context: ExecutionContext,
1047  ): boolean | Promise<boolean> | Observable<boolean> {
1048    return true;
1049  }
1050}
1051`),cf()(),Oa$1(172,`pre`)(173,`code`,19),DT(174,`
1052import { Injectable } from '@nestjs/common';
1053
1054@Injectable()
1055export class RolesGuard {
1056  canActivate(context) {
1057    return true;
1058  }
1059}
1060`),cf()()(),Oa$1(175,`h4`,26)(176,`span`),DT(177,`Binding guards`),cf()(),Oa$1(178,`p`),DT(179,`Like pipes and exception filters, guards can be controller-scoped, method-scoped, or global-scoped. Below, we set up a controller-scoped guard using the `),Oa$1(180,`code`),DT(181,`@UseGuards()`),cf(),DT(182,` decorator. The decorator accepts a single guard or a comma-separated list of guards, so you can apply a whole set of guards with one declaration.`),cf(),Oa$1(183,`app-copy-button`,17)(184,`span`,18),Za$1(185,`app-tabs`,null,3),cf(),Oa$1(187,`pre`)(188,`code`,19),DT(189,`
1061@Controller('cats')
1062@UseGuards(RolesGuard)
1063export class CatsController {}
1064`),cf()()(),Oa$1(190,`blockquote`,15)(191,`strong`),DT(192,`Hint`),cf(),DT(193,` The `),Oa$1(194,`code`),DT(195,`@UseGuards()`),cf(),DT(196,` decorator is imported from the `),Oa$1(197,`code`),DT(198,`@nestjs/common`),cf(),DT(199,` package.
1065`),cf(),Oa$1(200,`p`),DT(201,`Above, we passed the `),Oa$1(202,`code`),DT(203,`RolesGuard`),cf(),DT(204,` class (instead of an instance), leaving responsibility for instantiation to the framework and enabling dependency injection. As with pipes and exception filters, you can also pass an in-place instance:`),cf(),Oa$1(205,`app-copy-button`,17)(206,`span`,18),Za$1(207,`app-tabs`,null,4),cf(),Oa$1(209,`pre`)(210,`code`,19),DT(211,`
1066@Controller('cats')
1067@UseGuards(new RolesGuard())
1068export class CatsController {}
1069`),cf()()(),Oa$1(212,`p`),DT(213,`The construction above attaches the guard to every handler declared by this controller. To apply the guard to a single method only, use the `),Oa$1(214,`code`),DT(215,`@UseGuards()`),cf(),DT(216,` decorator at the `),Oa$1(217,`strong`),DT(218,`method level`),cf(),DT(219,`.`),cf(),Oa$1(220,`p`),DT(221,`To set up a global guard, use the `),Oa$1(222,`code`),DT(223,`useGlobalGuards()`),cf(),DT(224,` method of the Nest application instance:`),cf(),Oa$1(225,`app-copy-button`,17)(226,`span`,18),Za$1(227,`app-tabs`,null,5),cf(),Oa$1(229,`pre`)(230,`code`,19),DT(231,`
1070const app = await NestFactory.create(AppModule);
1071app.useGlobalGuards(new RolesGuard());
1072`),cf()()(),Oa$1(232,`blockquote`,27)(233,`strong`),DT(234,`Notice`),cf(),DT(235,` In a hybrid application, `),Oa$1(236,`code`),DT(237,`useGlobalGuards()`),cf(),DT(238,` doesn't set up guards for connected microservices by default (see `),Oa$1(239,`a`,28),DT(240,`Hybrid application`),cf(),DT(241,` to change this behavior). In a standard (non-hybrid) microservice application, `),Oa$1(242,`code`),DT(243,`useGlobalGuards()`),cf(),DT(244,` does mount the guards globally.
1073`),cf(),Oa$1(245,`p`),DT(246,`Global guards apply to every controller and every route handler in the application. However, a global guard registered outside of any module (with `),Oa$1(247,`code`),DT(248,`useGlobalGuards()`),cf(),DT(249,`, as in the example above) cannot inject dependencies, because the registration happens outside the context of any module. To solve this, register the guard directly from any module using the following construction:`),cf(),Oa$1(250,`app-copy-button`,17)(251,`span`,18),DT(252),AT(253,`extension`),Za$1(254,`app-tabs`,null,6),cf(),Oa$1(256,`pre`)(257,`code`,19),DT(258,`
1074import { Module } from '@nestjs/common';
1075import { APP_GUARD } from '@nestjs/core';
1076
1077@Module({
1078  providers: [
1079    {
1080      provide: APP_GUARD,
1081      useClass: RolesGuard,
1082    },
1083  ],
1084})
1085export class AppModule {}
1086`),cf()()(),Oa$1(259,`blockquote`,15)(260,`strong`),DT(261,`Hint`),cf(),DT(262,` When you use this approach to perform dependency injection for the guard, the guard is global regardless of the module in which you register it. We recommend registering it in the module where the guard (`),Oa$1(263,`code`),DT(2
vendor: 5,368 bytes, lines 1086-1118
108664,`RolesGuard`),cf(),DT(265,` in the example above) is defined. Also, `),Oa$1(266,`code`),DT(267,`useClass`),cf(),DT(268,` is not the only way to register a custom provider. See `),Oa$1(269,`a`,29),DT(270,`Custom providers`),cf(),DT(271,` to learn more.
1087`),cf(),Oa$1(272,`blockquote`,15)(273,`strong`),DT(274,`Hint`),cf(),DT(275,` You can register the `),Oa$1(276,`code`),DT(277,`APP_GUARD`),cf(),DT(278,` token multiple times (in the same or different modules); every registered guard runs for each request, in registration order. `),Oa$1(279,`code`),DT(280,`APP_GUARD`),cf(),DT(281,` (like the other `),Oa$1(282,`code`),DT(283,`APP_*`),cf(),DT(284,` tokens) is a pseudo-provider that the framework consumes during bootstrap: it cannot be retrieved later with `),Oa$1(285,`code`),DT(286,`app.get()`),cf(),DT(287,` or injected elsewhere.
1088`),cf(),Oa$1(288,`h4`,30)(289,`span`),DT(290,`Setting roles per handler`),cf()(),Oa$1(291,`p`),DT(292,`Our `),Oa$1(293,`code`),DT(294,`RolesGuard`),cf(),DT(295,` works, but it isn't very smart yet: it doesn't take advantage of the most important guard feature, the `),Oa$1(296,`a`,24),DT(297,`execution context`),cf(),DT(298,`. It doesn't know about roles, or which roles are allowed for each handler. The `),Oa$1(299,`code`),DT(300,`CatsController`),cf(),DT(301,`, for example, could have different permission schemes for different routes. Some routes might be available only to admin users, while others are open to everyone. How can we match roles to routes in a flexible and reusable way?`),cf(),Oa$1(302,`p`),DT(303,`This is where `),Oa$1(304,`strong`),DT(305,`custom metadata`),cf(),DT(306,` comes into play (see `),Oa$1(307,`a`,31),DT(308,`Reflection and metadata`),cf(),DT(309,`). Nest lets you attach custom `),Oa$1(310,`strong`),DT(311,`metadata`),cf(),DT(312,` to route handlers, either through decorators created with the static `),Oa$1(313,`code`),DT(314,`Reflector.createDecorator()`),cf(),DT(315,` method or through the built-in `),Oa$1(316,`code`),DT(317,`@SetMetadata()`),cf(),DT(318,` decorator.`),cf(),Oa$1(319,`p`),DT(320,`For example, let's create a `),Oa$1(321,`code`),DT(322,`@Roles()`),cf(),DT(323,` decorator with the `),Oa$1(324,`code`),DT(325,`Reflector.createDecorator()`),cf(),DT(326,` method that attaches the metadata to the handler. `),Oa$1(327,`code`),DT(328,`Reflector`),cf(),DT(329,` is provided by the framework out of the box and exported from the `),Oa$1(330,`code`),DT(331,`@nestjs/core`),cf(),DT(332,` package.`),cf(),Oa$1(333,`app-copy-button`,17)(334,`span`,18),DT(335),AT(336,`extension`),Za$1(337,`app-tabs`,null,7),cf(),Oa$1(339,`pre`)(340,`code`,32),DT(341,`
1089import { Reflector } from '@nestjs/core';
1090
1091export const Roles = Reflector.createDecorator<string[]>();
1092`),cf()()(),Oa$1(342,`p`),DT(343,`The `),Oa$1(344,`code`),DT(345,`Roles`),cf(),DT(346,` decorator is a function that takes a single argument of type `),Oa$1(347,`code`),DT(348,`string[]`),cf(),DT(349,`.`),cf(),Oa$1(350,`p`),DT(351,`To use this decorator, annotate the handler with it:`),cf(),Oa$1(352,`app-copy-button`,17)(353,`span`,18),DT(354),AT(355,`extension`),Za$1(356,`app-tabs`,null,8),cf(),Oa$1(358,`pre`)(359,`code`,19),DT(360,`
1093@Post()
1094@Roles(['admin'])
1095async create(@Body() createCatDto: CreateCatDto) {
1096  this.catsService.create(createCatDto);
1097}
1098`),cf()(),Oa$1(361,`pre`)(362,`code`,19),DT(363,`
1099@Post()
1100@Roles(['admin'])
1101@Bind(Body())
1102async create(createCatDto) {
1103  this.catsService.create(createCatDto);
1104}
1105`),cf()()(),Oa$1(364,`p`),DT(365,`Here we've attached the `),Oa$1(366,`code`),DT(367,`Roles`),cf(),DT(368,` decorator metadata to the `),Oa$1(369,`code`),DT(370,`create()`),cf(),DT(371,` method, indicating that only users with the `),Oa$1(372,`code`),DT(373,`admin`),cf(),DT(374,` role should be allowed to access this route.`),cf(),Oa$1(375,`p`),DT(376,`Alternatively, instead of using the `),Oa$1(377,`code`),DT(378,`Reflector.createDecorator()`),cf(),DT(379,` method, you can use the built-in `),Oa$1(380,`code`),DT(381,`@SetMetadata()`),cf(),DT(382,` decorator. See the `),Oa$1(383,`a`,33),DT(384,`low-level approach`),cf(),DT(385,` to learn more.`),cf(),Oa$1(386,`h4`,34)(387,`span`),DT(388,`Putting it all together`),cf()(),Oa$1(389,`p`),DT(390,`Let's now tie this together with our `),Oa$1(391,`code`),DT(392,`RolesGuard`),cf(),DT(393,`. Currently, it returns `),Oa$1(394,`code`),DT(395,`true`),cf(),DT(396,` in all cases, allowing every request to proceed. We want to make the return value conditional, based on comparing the `),Oa$1(397,`strong`),DT(398,`roles assigned to the current user`),cf(),DT(399,` with the roles required by the route being processed. To access the route's role(s) (custom metadata), we use the `),Oa$1(400,`code`),DT(401,`Reflector`),cf(),DT(402,` class again, as follows:`),cf(),Oa$1(403,`app-copy-button`,17)(404,`span`,18),DT(405),AT(406,`extension`),Za$1(407,`app-tabs`,null,9),cf(),Oa$1(409,`pre`)(410,`code`,19),DT(411,`
1106import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
1107import { Reflector } from '@nestjs/core';
1108import { Roles } from './roles.decorator.js';
1109
1110@Injectable()
1111export class RolesGuard implements CanActivate {
1112  constructor(private reflector: Reflector) {}
1113
1114  canActivate(context: ExecutionContext): boolean {
1115    const roles = this.reflector.get(Roles, context.getHandler());
1116    if (!roles) {
1117      return true;
1118    }
1119    const request = context.switchToHttp().getRequest();
1120    const user = request.user;
1121    return matchRoles(roles, user.roles);
1122  }
1123}
1124`),cf()(),Oa$1(412,`pre`)(413,`code`,19),DT(414,`
1125import { Injectable, Dependencies } from '@nestjs/common';
1126import { Reflector } from '@nestjs/core';
1127import { Roles } from './roles.decorator.js';
1128
1129@Injectable()
1130@Dependencies(Reflector)
1131export class RolesGuard {
1132  constructor(reflector) {
1133    this.reflector = reflector;
1134  }
1135
1136  canActivate(context) {
1137    const roles = this.reflector.get(Roles, context.getHandler());
1138    if (!roles) {
1139      return true;
1140    }
1141    const request = context.switchToHttp().getRequest();
1142    const user = request.user;
1143    return matchRoles(roles, user.roles);
1144  }
1145}
1146`),cf()()(),Oa$1(415,`blockquote`,15)(416,`strong`),DT(417,`Hint`),cf(),DT(418,` In Node.js applications, it's common practice to attach the authorized user to the `),Oa$1(419,`code`),DT(420,`request`),cf(),DT(421,` object. The sample above therefore assumes that `),Oa$1(422,`code`),DT(423,`request.user`),cf(),DT(424,` contains the user instance and its roles. In your app, you will probably make that association in a custom `),Oa$1(425,`strong`),DT(426,`authentication guard`),cf(),DT(427,` (or middleware). See the `),Oa$1(428,`a`,20),DT(429,`authentication`),cf(),DT(430,` chapter for more information on this topic.
1147`),cf(),Oa$1(431,`blockquote`,27)(432,`strong`),DT(433,`Warning`),cf(),DT(434,` The `),Oa$1(435,`code`),DT(436,`matchRoles()`),cf(),DT(437,` function is not provided by Nest. Its logic can be as simple or as sophisticated as your application requires; the point of this example is to show how guards fit into the request/response cycle.
1148`),cf(),Oa$1(438,`p`),DT(439,`See the `),Oa$1(440,`a`,31),DT(441,`Reflection and metadata`),cf(),DT(442,` section of the `),Oa$1(443,`strong`),DT(444,`Execution context`),cf(),DT(445,` chapter for more details on using `),Oa$1(446,`code`),DT(447,`Reflector`),cf(),DT(448,` in a context-sensitive way.`),cf(),Oa$1(449,`p`),DT(450,`When a user with insufficient privileges requests an endpoint, Nest automatically returns the following response:`),cf(),Oa$1(451,`pre`)(452,`code`,35),DT(453,`
1149{
1150  "statusCode": 403,
1151  "message": "Forbidden resource",
1152  "error": "Forbidden"
1153}
1154`),cf()(),Oa$1(454,`p`),DT(455,`Behind the scenes, when a guard returns `),Oa$1(456,`code`),DT(457,`false`),cf(),DT(458,`, the framework throws a `),Oa$1(459,`code`),DT(460,`ForbiddenException`),cf(),DT(461,`. To return a different error response, throw your own exception instead. For example:`),cf(),Oa$1(462,`app-copy-button`)(463,`pre`)(464,`code`,19),DT(465,`
1155throw new UnauthorizedException();
1156`),cf()()(),Oa$1(466,`p`),DT(467,`Any exception thrown by a guard is handled by the `),Oa$1(468,`a`,36),DT(469,`exceptions layer`),cf(),DT(470,` (the global exception filter and any exception filters applied to the current context).`),cf(),Oa$1(471,`blockquote`,15)(472,`strong`),DT(473,`Hint`),cf(),DT(474,` For a real-world example of how to implement authorization, see the `),Oa$1(475,`a`,21),DT(476,`authorization`),cf(),DT(477,` chapter.
1157`),cf()(),Oa$1(478,`a`,37),Za$1(479,`i`,38),Oa$1(480,`span`),DT(481,`Edit on GitHub`),cf()()()),a&2){let l=QS(69),d=QS(168),m=QS(255),h=QS(338),u=QS(357),b=QS(408);UC(66),hf(` `,OT(67,22,`auth.guard`,l.isJsActive),`
1158`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(92),hf(` `,OT(166,25,`roles.guard`,d.isJsActive),`
1159`),UC(4),By(`hide`,d.isJsActive),UC(3),By(`hide`,!d.isJsActive),UC(80),hf(` `,OT(253,28,`app.module`,m.isJsActive),`
1160`),UC(83),hf(` `,OT(336,31,`roles.decorator`,h.isJsActive),`
1161`),UC(19),hf(` `,OT(355,34,`cats.controller`,u.isJsActive),`
1162`),UC(4),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(44),hf(` `,OT(406,37,`roles.guard`,b.isJsActive),`
1163`),UC(4),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive)}},dependencies:[tu,xt,tn$1,u,l,g],encapsulation:2})}return o})();var $r=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-interceptors`]],features:[My],decls:537,vars:56,consts:[[`contentReference`,``],[`appa87e96405ebd31f9788755a4ca00a574cfb434d4`,``],[`app8e417d339c429a8ac79ac69f19b5c31a64e42d2d`,``],[`app46594234993f71b4cf5cd4b79b674af9704fdf21`,``],[`app38944d443ac0407a54f1f5677590d4ce2700bf37`,``],[`app503459b0a0635fe62227fe3def3b6967da2edbe1`,``],[`app77500866ea5918216cb1c44b50fcef815b2ade3a`,``],[`app63ce919e3d2771f9009cd9366836b7449403cd36`,``],[`appa357021beb7221819addce1dc82a07400716591d`,``],[`app14bec0cec676eab6dcb2b4bef33c6fdac6367d07`,``],[1,`content`],[1,`content-inner`],[`id`,`interceptors`],[`src`,`/assets/Interceptors_1.png`,1,`illustrative-image`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Aspect-oriented_programming`],[`appAnchor`,``,`id`,`basics`],[`routerLink`,`/guards`],[`href`,`/exception-filters#arguments-host`],[`appAnchor`,``,`id`,`execution-context`],[`routerLink`,`/fundamentals/execution-context`],[`appAnchor`,``,`id`,`call-handler`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/ReactiveX
1163/rxjs`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Pointcut`],[`appAnchor`,``,`id`,`aspect-interception`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[1,`info`],[1,`warning`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`binding-interceptors`],[`routerLink`,`/pipes`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`response-mapping`],[`href`,`/controllers#library-specific-approach`],[1,`language-json`],[`appAnchor`,``,`id`,`exception-mapping`],[`appAnchor`,``,`id`,`stream-overriding`],[`appAnchor`,``,`id`,`more-operators`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/interceptors.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),DT(4,`Interceptors`),cf(),Oa$1(5,`p`),DT(6,`An interceptor is a class annotated with the `),Oa$1(7,`code`),DT(8,`@Injectable()`),cf(),DT(9,` decorator that implements the `),Oa$1(10,`code`),DT(11,`NestInterceptor`),cf(),DT(12,` interface.`),cf(),Oa$1(13,`figure`),Za$1(14,`img`,13),cf(),Oa$1(15,`p`),DT(16,`Interceptors offer a set of capabilities inspired by the `),Oa$1(17,`a`,14),DT(18,`Aspect Oriented Programming`),cf(),DT(19,` (AOP) technique. They make it possible to:`),cf(),Oa$1(20,`ul`)(21,`li`),DT(22,`bind extra logic before or after method execution`),cf(),Oa$1(23,`li`),DT(24,`transform the result returned from a function`),cf(),Oa$1(25,`li`),DT(26,`transform the exception thrown from a function`),cf(),Oa$1(27,`li`),DT(28,`extend the basic function behavior`),cf(),Oa$1(29,`li`),DT(30,`completely override a function depending on specific conditions (e.g., for caching purposes)`),cf()(),Oa$1(31,`h4`,15)(32,`span`),DT(33,`Basics`),cf()(),Oa$1(34,`p`),DT(35,`Each interceptor implements the `),Oa$1(36,`code`),DT(37,`intercept()`),cf(),DT(38,` method, which takes two arguments. The first is the `),Oa$1(39,`code`),DT(40,`ExecutionContext`),cf(),DT(41,` instance (exactly the same object as for `),Oa$1(42,`a`,16),DT(43,`guards`),cf(),DT(44,`). `),Oa$1(45,`code`),DT(46,`ExecutionContext`),cf(),DT(47,` extends `),Oa$1(48,`code`),DT(49,`ArgumentsHost`),cf(),DT(50,`, which we covered in the exception filters chapter. There, we saw that it's a wrapper around the arguments passed to the original handler, and that it contains different argument arrays depending on the type of application. See the `),Oa$1(51,`a`,17),DT(52,`exception filters`),cf(),DT(53,` chapter for more on this topic.`),cf(),Oa$1(54,`h4`,18)(55,`span`),DT(56,`Execution context`),cf()(),Oa$1(57,`p`),DT(58,`By extending `),Oa$1(59,`code`),DT(60,`ArgumentsHost`),cf(),DT(61,`, `),Oa$1(62,`code`),DT(63,`ExecutionContext`),cf(),DT(64,` adds several helper methods that provide additional details about the current execution process. These details help you build more generic interceptors that work across a broad set of controllers, methods, and execution contexts. See the `),Oa$1(65,`a`,19),DT(66,`execution context`),cf(),DT(67,` chapter to learn more about `),Oa$1(68,`code`),DT(69,`ExecutionContext`),cf(),DT(70,`.`),cf(),Oa$1(71,`h4`,20)(72,`span`),DT(73,`Call handler`),cf()(),Oa$1(74,`p`),DT(75,`The second argument is a `),Oa$1(76,`code`),DT(77,`CallHandler`),cf(),DT(78,`. The `),Oa$1(79,`code`),DT(80,`CallHandler`),cf(),DT(81,` interface exposes a `),Oa$1(82,`code`),DT(83,`handle()`),cf(),DT(84,` method, which you use to invoke the route handler method at some point in your interceptor. If you don't call `),Oa$1(85,`code`),DT(86,`handle()`),cf(),DT(87,` in your implementation of the `),Oa$1(88,`code`),DT(89,`intercept()`),cf(),DT(90,` method, the route handler method won't be executed at all.`),cf(),Oa$1(91,`p`),DT(92,`This means that the `),Oa$1(93,`code`),DT(94,`intercept()`),cf(),DT(95,` method effectively `),Oa$1(96,`strong`),DT(97,`wraps`),cf(),DT(98,` the request/response stream. As a result, you can implement custom logic `),Oa$1(99,`strong`),DT(100,`both before and after`),cf(),DT(101,` the execution of the final route handler. Running code `),Oa$1(102,`strong`),DT(103,`before`),cf(),DT(104,` the handler is straightforward: place it before the `),Oa$1(105,`code`),DT(106,`handle()`),cf(),DT(107,` call. To act on what happens afterward, use the `),Oa$1(108,`code`),DT(109,`Observable`),cf(),DT(110,` that `),Oa$1(111,`code`),DT(112,`handle()`),cf(),DT(113,` returns: you can apply `),Oa$1(114,`a`,21),DT(115,`RxJS`),cf(),DT(116,` operators to it to further manipulate the response. In Aspect Oriented Programming terminology, the invocation of the route handler (i.e., calling `),Oa$1(117,`code`),DT(118,`handle()`),cf(),DT(119,`) is called a `),Oa$1(120,`a`,22),DT(121,`Pointcut`),cf(),DT(122,`, indicating that it's the point at which our additional logic is inserted.`),
vendor: 14,517 bytes, lines 1163-1320
1163cf(),Oa$1(123,`p`),DT(124,`Consider, for example, an incoming `),Oa$1(125,`code`),DT(126,`POST /cats`),cf(),DT(127,` request. This request is destined for the `),Oa$1(128,`code`),DT(129,`create()`),cf(),DT(130,` handler defined inside `),Oa$1(131,`code`),DT(132,`CatsController`),cf(),DT(133,`. If an interceptor that doesn't call `),Oa$1(134,`code`),DT(135,`handle()`),cf(),DT(136,` is invoked anywhere along the way, the `),Oa$1(137,`code`),DT(138,`create()`),cf(),DT(139,` method won't be executed. Once `),Oa$1(140,`code`),DT(141,`handle()`),cf(),DT(142,` is called and the `),Oa$1(143,`code`),DT(144,`Observable`),cf(),DT(145,` it returns is subscribed to (Nest subscribes to the stream your `),Oa$1(146,`code`),DT(147,`intercept()`),cf(),DT(148,` method returns), the `),Oa$1(149,`code`),DT(150,`create()`),cf(),DT(151,` handler is triggered. As the handler's result flows through the stream, you can apply additional operations to it before the final result is returned to the caller.`),cf(),Oa$1(152,`p`),Za$1(153,`app-banner-devtools`),cf(),Oa$1(154,`h4`,23)(155,`span`),DT(156,`Aspect interception`),cf()(),Oa$1(157,`p`),DT(158,`The first use case we'll look at is using an interceptor to log user interaction (e.g., storing user calls, asynchronously dispatching events, or calculating a timestamp). The following example shows a simple `),Oa$1(159,`code`),DT(160,`LoggingInterceptor`),cf(),DT(161,`:`),cf(),Oa$1(162,`app-copy-button`,24)(163,`span`,25),DT(164),AT(165,`extension`),Za$1(166,`app-tabs`,null,1),cf(),Oa$1(168,`pre`)(169,`code`,26),DT(170,`
1164import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
1165import { Observable } from 'rxjs';
1166import { tap } from 'rxjs/operators';
1167
1168@Injectable()
1169export class LoggingInterceptor implements NestInterceptor {
1170  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
1171    console.log('Before...');
1172
1173    const now = Date.now();
1174    return next
1175      .handle()
1176      .pipe(
1177        tap(() => console.log(\`After... \${Date.now() - now}ms\`)),
1178      );
1179  }
1180}
1181`),cf()(),Oa$1(171,`pre`)(172,`code`,26),DT(173,`
1182import { Injectable } from '@nestjs/common';
1183import { tap } from 'rxjs/operators';
1184
1185@Injectable()
1186export class LoggingInterceptor {
1187  intercept(context, next) {
1188    console.log('Before...');
1189
1190    const now = Date.now();
1191    return next
1192      .handle()
1193      .pipe(
1194        tap(() => console.log(\`After... \${Date.now() - now}ms\`)),
1195      );
1196  }
1197}
1198`),cf()()(),Oa$1(174,`blockquote`,27)(175,`strong`),DT(176,`Hint`),cf(),Oa$1(177,`code`),DT(178,`NestInterceptor<T, R>`),cf(),DT(179,` is a generic interface in which `),Oa$1(180,`code`),DT(181,`T`),cf(),DT(182,` is the type of the values emitted by the `),Oa$1(183,`code`),DT(184,`Observable<T>`),cf(),DT(185,` that `),Oa$1(186,`code`),DT(187,`next.handle()`),cf(),DT(188,` returns (the response stream), and `),Oa$1(189,`code`),DT(190,`R`),cf(),DT(191,` is the type of the values emitted by the `),Oa$1(192,`code`),DT(193,`Observable<R>`),cf(),DT(194,` that `),Oa$1(195,`code`),DT(196,`intercept()`),cf(),DT(197,` returns.
1199`),cf(),Oa$1(198,`blockquote`,28)(199,`strong`),DT(200,`Notice`),cf(),DT(201,` Interceptors, like controllers, providers, guards, and so on, can `),Oa$1(202,`strong`),DT(203,`inject dependencies`),cf(),DT(204,` through their `),Oa$1(205,`code`),DT(206,`constructor`),cf(),DT(207,`.
1200`),cf(),Oa$1(208,`p`),DT(209,`Since `),Oa$1(210,`code`),DT(211,`handle()`),cf(),DT(212,` returns an RxJS `),Oa$1(213,`code`),DT(214,`Observable`),cf(),DT(215,`, you can choose from a wide range of operators to manipulate the stream. The example above uses the `),Oa$1(216,`code`),DT(217,`tap()`),cf(),DT(218,` operator, which calls our logging function when the stream emits the route handler's result, without otherwise interfering with the response cycle. Note that this function is not called if the route handler throws; to run logic in that case as well, pass an observer object with an `),Oa$1(219,`code`),DT(220,`error`),cf(),DT(221,` callback to `),Oa$1(222,`code`),DT(223,`tap()`),cf(),DT(224,`, or use the `),Oa$1(225,`code`),DT(226,`finalize()`),cf(),DT(227,` operator.`),cf(),Oa$1(228,`blockquote`,27)(229,`strong`),DT(230,`Hint`),cf(),DT(231,` Timing a handler by hand, as above, is a minimal version of what an APM does. `),Oa$1(232,`a`,29),DT(233,`NestJS Observe`),cf(),DT(234,` records the same measurement for every controller, provider, and queue consumer, with no interceptor to write or bind. It also records the time each one spent on its own, with everything it awaited subtracted out. See the `),Oa$1(235,`a`,30),DT(236,`Observability`),cf(),DT(237,` chapter.
1201`),cf(),Oa$1(238,`h4`,31)(239,`span`),DT(240,`Binding interceptors`),cf()(),Oa$1(241,`p`),DT(242,`To set up the interceptor, use the `),Oa$1(243,`code`),DT(244,`@UseInterceptors()`),cf(),DT(245,` decorator. Like `),Oa$1(246,`a`,32),DT(247,`pipes`),cf(),DT(248,` and `),Oa$1(249,`a`,16),DT(250,`guards`),cf(),DT(251,`, interceptors can be controller-scoped, method-scoped, or global-scoped.`),cf(),Oa$1(252,`app-copy-button`,24)(253,`span`,25),DT(254),AT(255,`extension`),Za$1(256,`app-tabs`,null,2),cf(),Oa$1(258,`pre`)(259,`code`,26),DT(260,`
1202@UseInterceptors(LoggingInterceptor)
1203export class CatsController {}
1204`),cf()()(),Oa$1(261,`blockquote`,27)(262,`strong`),DT(263,`Hint`),cf(),DT(264,` The `),Oa$1(265,`code`),DT(266,`@UseInterceptors()`),cf(),DT(267,` decorator is imported from the `),Oa$1(268,`code`),DT(269,`@nestjs/common`),cf(),DT(270,` package.
1205`),cf(),Oa$1(271,`p`),DT(272,`With the construction above, each route handler defined in `),Oa$1(273,`code`),DT(274,`CatsController`),cf(),DT(275,` uses `),Oa$1(276,`code`),DT(277,`LoggingInterceptor`),cf(),DT(278,`. When a client calls the `),Oa$1(279,`code`),DT(280,`GET /cats`),cf(),DT(281,` endpoint, you'll see the following in standard output:`),cf(),Oa$1(282,`app-copy-button`)(283,`pre`)(284,`code`,26),DT(285,`
1206Before...
1207After... 1ms
1208`),cf()()(),Oa$1(286,`p`),DT(287,`Note that we passed the `),Oa$1(288,`code`),DT(289,`LoggingInterceptor`),cf(),DT(290,` class (instead of an instance), leaving responsibility for instantiation to the framework and enabling dependency injection. As with pipes, guards, and exception filters, you can also pass an in-place instance:`),cf(),Oa$1(291,`app-copy-button`,24)(292,`span`,25),DT(293),AT(294,`extension`),Za$1(295,`app-tabs`,null,3),cf(),Oa$1(297,`pre`)(298,`code`,26),DT(299,`
1209@UseInterceptors(new LoggingInterceptor())
1210export class CatsController {}
1211`),cf()()(),Oa$1(300,`p`),DT(301,`The construction above attaches the interceptor to every handler declared by this controller. To restrict the interceptor to a single method, apply the decorator at the `),Oa$1(302,`strong`),DT(303,`method level`),cf(),DT(304,`.`),cf(),Oa$1(305,`p`),DT(306,`To set up a global interceptor, use the `),Oa$1(307,`code`),DT(308,`useGlobalInterceptors()`),cf(),DT(309,` method of the Nest application instance:`),cf(),Oa$1(310,`app-copy-button`)(311,`pre`)(312,`code`,26),DT(313,`
1212const app = await NestFactory.create(AppModule);
1213app.useGlobalInterceptors(new LoggingInterceptor());
1214`),cf()()(),Oa$1(314,`p`),DT(315,`Global interceptors apply to every controller and every route handler in the application. However, a global interceptor registered outside of any module (with `),Oa$1(316,`code`),DT(317,`useGlobalInterceptors()`),cf(),DT(318,`, as in the example above) cannot inject dependencies, because the registration happens outside the context of any module. To solve this, register the interceptor `),Oa$1(319,`strong`),DT(320,`directly from any module`),cf(),DT(321,` using the following construction:`),cf(),Oa$1(322,`app-copy-button`,24)(323,`span`,25),DT(324),AT(325,`extension`),Za$1(326,`app-tabs`,null,4),cf(),Oa$1(328,`pre`)(329,`code`,26),DT(330,`
1215import { Module } from '@nestjs/common';
1216import { APP_INTERCEPTOR } from '@nestjs/core';
1217
1218@Module({
1219  providers: [
1220    {
1221      provide: APP_INTERCEPTOR,
1222      useClass: LoggingInterceptor,
1223    },
1224  ],
1225})
1226export class AppModule {}
1227`),cf()()(),Oa$1(331,`blockquote`,27)(332,`strong`),DT(333,`Hint`),cf(),DT(334,` When you use this approach to perform dependency injection for the interceptor, the interceptor is global regardless of the module in which you register it. We recommend registering it in the module where the interceptor (`),Oa$1(335,`code`),DT(336,`LoggingInterceptor`),cf(),DT(337,` in the example above) is defined. Also, `),Oa$1(338,`code`),DT(339,`useClass`),cf(),DT(340,` is not the only way to register a custom provider. See `),Oa$1(341,`a`,33),DT(342,`Custom providers`),cf(),DT(343,` to learn more.
1228`),cf(),Oa$1(344,`h4`,34)(345,`span`),DT(346,`Response mapping`),cf()(),Oa$1(347,`p`),DT(348,`The stream returned by `),Oa$1(349,`code`),DT(350,`handle()`),cf(),DT(351,` contains the value `),Oa$1(352,`strong`),DT(353,`returned`),cf(),DT(354,` from the route handler, so you can transform it with RxJS's `),Oa$1(355,`code`),DT(356,`map()`),cf(),DT(357,` operator.`),cf(),Oa$1(358,`blockquote`,28)(359,`strong`),DT(360,`Warning`),cf(),DT(361,` Response mapping doesn't work with the library-specific response strategy, i.e., when a route handler injects the response object with `),Oa$1(362,`code`),DT(363,`@Res()`),cf(),DT(364,` and sends the response itself. To combine the two, enable the `),Oa$1(365,`code`),DT(366,`passthrough`),cf(),DT(367,` option (see `),Oa$1(368,`a`,35),DT(369,`Library-specific approach`),cf(),DT(370,`).
1229`),cf(),Oa$1(371,`p`),DT(372,`Let's create a `),Oa$1(373,`code`),DT(374,`TransformInterceptor`),cf(),DT(375,` that modifies each response in a trivial way to demonstrate the process. It uses RxJS's `),Oa$1(376,`code`),DT(377,`map()`),cf(),DT(378,` operator to assign the response object to the `),Oa$1(379,`code`),DT(380,`data`),cf(),DT(381,` property of a newly created object, and returns the new object to the client.`),cf(),Oa$1(382,`app-copy-button`,24)(383,`span`,25),DT(384),AT(385,`extension`),Za$1(386,`app-tabs`,null,5),cf(),Oa$1(388,`pre`)(389,`code`,26),DT(390,`
1230import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
1231import { Observable } from 'rxjs';
1232import { map } from 'rxjs/operators';
1233
1234export interface Response<T> {
1235  data: T;
1236}
1237
1238@Injectable()
1239export class TransformInterceptor<T> implements NestInterceptor<T, Response<T>> {
1240  intercept(context: ExecutionContext, next: CallHandler): Observable<Response<T>> {
1241    return next.handle().pipe(map(data => ({ data })));
1242  }
1243}
1244`),cf()(),Oa$1(391,`pre`)(392,`code`,26),DT(393,`
1245import { Injectable } from '@nestjs/common';
1246import { map } from 'rxjs/operators';
1247
1248@Injectable()
1249export class TransformInterceptor {
1250  intercept(context, next) {
1251    return next.handle().pipe(map(data => ({ data })));
1252  }
1253}
1254`),cf()()(),Oa$1(394,`blockquote`,27)(395,`strong`),DT(396,`Hint`),cf(),DT(397,` The `),Oa$1(398,`code`),DT(399,`intercept()`),cf(),DT(400,` method can be synchronous or asynchronous. Declare it `),Oa$1(401,`code`),DT(402,`async`),cf(),DT(403,` if you need to await something before returning the stream.
1255`),cf(),Oa$1(404,`p`),DT(405,`With this interceptor bound, a `),Oa$1(406,`code`),DT(407,`GET /cats`),cf(),DT(408,` request whose route handler returns an empty array `),Oa$1(409,`code`),DT(410,`[]`),cf(),DT(411,` produces the following response:`),cf(),Oa$1(412,`pre`)(413,`code`,36),DT(414,`
1256{
1257  "data": []
1258}
1259`),cf()(),Oa$1(415,`p`),DT(416,`Interceptors are well suited to building reusable solutions for requirements that span the entire application. For example, imagine you need to replace every `),Oa$1(417,`code`),DT(418,`null`),cf(),DT(419,` response value with an empty string `),Oa$1(420,`code`),DT(421,`''`),cf(),DT(422,`. You can do this with one line of code, and bind the interceptor globally so that every registered handler uses it automatically.`),cf(),Oa$1(423,`app-copy-button`,24)(424,`span`,25),Za$1(425,`app-tabs`,null,6),cf(),Oa$1(427,`pre`)(428,`code`,26),DT(429,`
1260import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
1261import { Observable } from 'rxjs';
1262import { map } from 'rxjs/operators';
1263
1264@Injectable()
1265export class ExcludeNullInterceptor implements NestInterceptor {
1266  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
1267    return next
1268      .handle()
1269      .pipe(map(value => value === null ? '' : value ));
1270  }
1271}
1272`),cf()(),Oa$1(430,`pre`)(431,`code`,26),DT(432,`
1273import { Injectable } from '@nestjs/common';
1274import { map } from 'rxjs/operators';
1275
1276@Injectable()
1277export class ExcludeNullInterceptor {
1278  intercept(context, next) {
1279    return next
1280      .handle()
1281      .pipe(map(value => value === null ? '' : value ));
1282  }
1283}
1284`),cf()()(),Oa$1(433,`h4`,37)(434,`span`),DT(435,`Exception mapping`),cf()(),Oa$1(436,`p`),DT(437,`Another use case is overriding thrown exceptions with RxJS's `),Oa$1(438,`code`),DT(439,`catchError()`),cf(),DT(440,` operator:`),cf(),Oa$1(441,`app-copy-button`,24)(442,`span`,25),DT(443),AT(444,`extension`),Za$1(445,`app-tabs`,null,7),cf(),Oa$1(447,`pre`)(448,`code`,26),DT(449,`
1285import {
1286  Injectable,
1287  NestInterceptor,
1288  ExecutionContext,
1289  BadGatewayException,
1290  CallHandler,
1291} from '@nestjs/common';
1292import { Observable, throwError } from 'rxjs';
1293import { catchError } from 'rxjs/operators';
1294
1295@Injectable()
1296export class ErrorsInterceptor implements NestInterceptor {
1297  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
1298    return next
1299      .handle()
1300      .pipe(
1301        catchError(err => throwError(() => new BadGatewayException())),
1302      );
1303  }
1304}
1305`),cf()(),Oa$1(450,`pre`)(451,`code`,26),DT(452,`
1306import { Injectable, BadGatewayException } from '@nestjs/common';
1307import { throwError } from 'rxjs';
1308import { catchError } from 'rxjs/operators';
1309
1310@Injectable()
1311export class ErrorsInterceptor {
1312  intercept(context, next) {
1313    return next
1314      .handle()
1315      .pipe(
1316        catchError(err => throwError(() => new BadGatewayException())),
1317      );
1318  }
1319}
1320`),cf()()(),Oa$1(453,`h4`,38)(454,`span`),DT(455,`Stream overriding`),cf()(),Oa$1(456,`p`),DT(457,`Sometimes you may want to skip calling the handler entirely and return a different value instead. A typical example is a cache that improves response time. Let's look at a simple `),Oa$1(458,`strong`),DT(459,`cache interceptor`),cf(),DT(460,` that returns its response from a cache. A realistic implementation would also need to consider factors such as TTL, cache invalidation, and cache size, which are beyond the scope of this discu
1320ssion. The following basic example demonstrates the main concept.`),cf(),Oa$1(461,`app-copy-button`,24)(462,`span`,25),DT(463),AT(464,`extension`),Za$1(465,`app-tabs`,null,8),cf(),Oa$1(467,`pre`)(468,`code`,26),DT(469,`
1321import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
1322import { Observable, of } from 'rxjs';
1323
1324@Injectable()
1325export class CacheInterceptor implements NestInterceptor {
1326  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
1327    const isCached = true;
1328    if (isCached) {
1329      return of([]);
1330    }
1331    return next.handle();
1332  }
1333}
1334`),cf()(),Oa$1(470,`pre`)(471,`code`,26),DT(472,`
1335import { Injectable } from '@nestjs/common';
1336import { of } from 'rxjs';
1337
1338@Injectable()
1339export class CacheInterceptor {
1340  intercept(context, next) {
1341    const isCached = true;
1342    if (isCached) {
1343      return of([]);
1344    }
1345    return next.handle();
1346  }
1347}
1348`),cf()()(),Oa$1(473,`p`),DT(474,`Our `),Oa$1(475,`code`),DT(476,`CacheInterceptor`),cf(),DT(477,` has a hardcoded `),Oa$1(478,`code`),DT(479,`isCached`),cf(),DT(480,` variable and a hardcoded response `),Oa$1(481,`code`),DT(482,`[]`),cf(),DT(483,`. The key point is that it returns a new stream, created by RxJS's `),Oa$1(484,`code`),DT(485,`of()`),cf(),DT(486,` function, so the route handler `),Oa$1(487,`strong`),DT(488,`won't be called`),cf(),DT(489,` at all. When someone calls an endpoint that uses `),Oa$1(490,`code`),DT(491,`CacheInterceptor`),cf(),DT(492,`, the response (a hardcoded, empty array) is returned immediately. To build a generic solution, use `),Oa$1(493,`code`),DT(494,`Reflector`),cf(),DT(495,` together with a custom decorator, as described in the `),Oa$1(496,`a`,16),DT(497,`guards`),cf(),DT(498,` chapter.`),cf(),Oa$1(499,`h4`,39)(500,`span`),DT(501,`More operators`),cf()(),Oa$1(502,`p`),DT(503,`Manipulating the stream with RxJS operators opens up many possibilities. Consider another common use case: handling `),Oa$1(504,`strong`),DT(505,`timeouts`),cf(),DT(506,` on route requests. If an endpoint doesn't return anything within a given period, you want to terminate the request with an error response. The following construction enables this:`),cf(),Oa$1(507,`app-copy-button`,24)(508,`span`,25),DT(509),AT(510,`extension`),Za$1(511,`app-tabs`,null,9),cf(),Oa$1(513,`pre`)(514,`code`,26),DT(515,`
1349import { Injectable, NestInterceptor, ExecutionContext, CallHandler, RequestTimeoutException } from '@nestjs/common';
1350import { Observable, throwError, TimeoutError } from 'rxjs';
1351import { catchError, timeout } from 'rxjs/operators';
1352
1353@Injectable()
1354export class TimeoutInterceptor implements NestInterceptor {
1355  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
1356    return next.handle().pipe(
1357      timeout(5000),
1358      catchError(err => {
1359        if (err instanceof TimeoutError) {
1360          return throwError(() => new RequestTimeoutException());
1361        }
1362        return throwError(() => err);
1363      }),
1364    );
1365  }
1366}
1367`),cf()(),Oa$1(516,`pre`)(517,`code`,26),DT(518,`
1368import { Injectable, RequestTimeoutException } from '@nestjs/common';
1369import { throwError, TimeoutError } from 'rxjs';
1370import { catchError, timeout } from 'rxjs/operators';
1371
1372@Injectable()
1373export class TimeoutInterceptor {
1374  intercept(context, next) {
1375    return next.handle().pipe(
1376      timeout(5000),
1377      catchError(err => {
1378        if (err instanceof TimeoutError) {
1379          return throwError(() => new RequestTimeoutException());
1380        }
1381        return throwError(() => err);
1382      }),
1383    );
1384  }
1385}
1386`),cf()()(),Oa$1(519,`p`),DT(520,`If the route handler doesn't emit a result within 5 seconds, `),Oa$1(521,`code`),DT(522,`timeout()`),cf(),DT(523,` fails the stream with a `),Oa$1(524,`code`),DT(525,`TimeoutError`),cf(),DT(526,`, which the interceptor maps to a `),Oa$1(527,`code`),DT(528,`RequestTimeoutException`),cf(),DT(529,`. Unsubscribing from the handler's stream doesn't abort work the handler has already started (such as a pending database query), so add custom logic before throwing `),Oa$1(530,`code`),DT(531,`RequestTimeoutException`),cf(),DT(532,` if you need to release resources.`),cf()(),Oa$1(533,`a`,40),Za$1(534,`i`,41),Oa$1(535,`span`),DT(536,`Edit on GitHub`),cf()()()),a&2){let l=QS(167),d=QS(257),m=QS(296),h=QS(327),u=QS(387),b=QS(426),S=QS(446),k=QS(466),C=QS(512);UC(164),hf(` `,OT(165,32,`logging.interceptor`,l.isJsActive),`
1387`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(83),hf(` `,OT(255,35,`cats.controller`,d.isJsActive),`
1388`),UC(39),hf(` `,OT(294,38,`cats.controller`,m.isJsActive),`
1389`),UC(31),hf(` `,OT(325,41,`app.module`,h.isJsActive),`
1390`),UC(60),hf(` `,OT(385,44,`transform.interceptor`,u.isJsActive),`
1391`),UC(4),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(36),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive),UC(13),hf(` `,OT(444,47,`errors.interceptor`,S.isJsActive),`
1392`),UC(4),By(`hide`,S.isJsActive),UC(3),By(`hide`,!S.isJsActive),UC(13),hf(` `,OT(464,50,`cache.interceptor`,k.isJsActive),`
1393`),UC(4),By(`hide`,k.isJsActive),UC(3),By(`hide`,!k.isJsActive),UC(39),hf(` `,OT(510,53,`timeout.interceptor`,C.isJsActive),`
1394`),UC(4),By(`hide`,C.isJsActive),UC(3),By(`hide`,!C.isJsActive)}},dependencies:[xt,tu,s,tn$1,u,g],encapsulation:2})}return o})();var Xr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-introduction`]],features:[My],decls:114,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`introduction`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/fastify/fastify`],[`appAnchor`,``,`id`,`philosophy`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/facebook/react`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/vuejs/core`],[`appAnchor`,``,`id`,`installation`],[`routerLink`,`/cli/overview`],[`href`,`#alternatives`],[`routerLink`,`/first-steps`],[1,`language-bash`],[`appAnchor`,``,`id`,`alternatives`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/Rich-Harris/degit`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`http://localhost:3000/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://dev.to/micalevisk/5-steps-to-create-a-bare-minimum-nestjs-app-from-scratch-5c3b`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/introduction.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),DT(4,`Introduction`),cf(),Oa$1(5,`p`),DT(6,`Nest (NestJS) is a framework for building efficient, scalable `),Oa$1(7,`a`,4),DT(8,`Node.js`),cf(),DT(9,` server-side applications. It uses progressive JavaScript, is built with and fully supports `),Oa$1(10,`a`,5),DT(11,`TypeScript`),cf(),DT(12,` (while still letting you write plain JavaScript), and combines elements of OOP (object-oriented programming), FP (functional programming), and FRP (functional reactive programming).`),cf(),Oa$1(13,`p`),DT(14,`Under the hood, Nest uses robust HTTP server frameworks such as `),Oa$1(15,`a`,6),DT(16,`Express`),cf(),DT(17,` (the default), and can optionally be configured to use `),Oa$1(18,`a`,7),DT(19,`Fastify`),cf(),DT(20,` instead.`),cf(),Oa$1(21,`p`),DT(22,`Nest provides a level of abstraction above these common Node.js frameworks (Express and Fastify), but also exposes their APIs directly to the developer. This gives you the freedom to use the myriad third-party modules available for the underlying platform.`),cf(),Oa$1(23,`h4`,8)(24,`span`),DT(25,`Philosophy`),cf()(),Oa$1(26,`p`),DT(27,`In recent years, thanks to Node.js, JavaScript has become the "lingua franca" of the web for both frontend and backend applications. This has given rise to projects like `),Oa$1(28,`a`,9),DT(29,`Angular`),cf(),DT(30,`, `),Oa$1(31,`a`,10),DT(32,`React`),cf(),DT(33,`, and `),Oa$1(34,`a`,11),DT(35,`Vue`),cf(),DT(36,`, which improve developer productivity and enable the creation of fast, testable, and extensible frontend applications. However, while plenty of excellent libraries, helpers, and tools exist for Node.js (and server-side JavaScript), none of them effectively solves the main problem of `),Oa$1(37,`strong`),DT(38,`architecture`),cf(),DT(39,`.`),cf(),Oa$1(40,`p`),DT(41,`Nest provides an out-of-the-box application architecture that lets developers and team
1394s create highly testable, scalable, loosely coupled, and maintainable applications. The architecture is heavily inspired by Angular.`),cf(),Oa$1(42,`h4`,12)(43,`span`),DT(44,`Installation`),cf()(),Oa$1(45,`p`),DT(46,`To get started, you can either scaffold the project with the `),Oa$1(47,`a`,13),DT(48,`Nest CLI`),cf(),DT(49,` or `),Oa$1(50,`a`,14),DT(51,`clone a starter project`),cf(),DT(52,`. Both produce the same outcome.`),cf(),Oa$1(53,`p`),DT(54,`To scaffold the project with the Nest CLI, run the following commands. They create a new project directory and populate it with the initial core Nest files and supporting modules, giving your project a conventional base structure. We recommend the `),Oa$1(55,`strong`),DT(56,`Nest CLI`),cf(),DT(57,` for first-time users, and the `),Oa$1(58,`a`,15),DT(59,`First steps`),cf(),DT(60,` chapter continues with this approach.`),cf(),Oa$1(61,`pre`)(62,`code`,16),DT(63,`
1395$ npm i -g @nestjs/cli
1396$ nest new project-name
1397`),cf()(),Oa$1(64,`h4`,17)(65,`span`),DT(66,`Alternatives`),cf()(),Oa$1(67,`p`),DT(68,`Alternatively, you can install the TypeScript starter project with `),Oa$1(69,`strong`),DT(70,`Git`),cf(),DT(71,`:`),cf(),Oa$1(72,`pre`)(73,`code`,16),DT(74,`
1398$ git clone https://github.com/nestjs/typescript-starter.git project
1399$ cd project
1400$ npm install
1401$ npm run start
1402`),cf()(),Oa$1(75,`blockquote`,18)(76,`strong`),DT(77,`Hint`),cf(),DT(78,` To clone the repository without its Git history, use `),Oa$1(79,`a`,19),DT(80,`degit`),cf(),DT(81,`.
1403`),cf(),Oa$1(82,`p`),DT(83,`Open your browser and navigate to `),Oa$1(84,`a`,20)(85,`code`),DT(86,`http://localhost:3000/`),cf()(),DT(87,`.`),cf(),Oa$1(88,`p`),DT(89,`To install the JavaScript flavor of the starter project, use `),Oa$1(90,`code`),DT(91,`javascript-starter.git`),cf(),DT(92,` in the command sequence above.`),cf(),Oa$1(93,`p`),DT(94,`You can also start a new project from scratch by installing the core and supporting packages yourself. In that case, you need to set up the project boilerplate files on your own. At a minimum, you need these dependencies: `),Oa$1(95,`code`),DT(96,`@nestjs/core`),cf(),DT(97,`, `),Oa$1(98,`code`),DT(99,`@nestjs/common`),cf(),DT(100,`, `),Oa$1(101,`code`),DT(102,`rxjs`),cf(),DT(103,`, and `),Oa$1(104,`code`),DT(105,`reflect-metadata`),cf(),DT(106,`. For a walkthrough of creating a complete project this way, see `),Oa$1(107,`a`,21),DT(108,`5 steps to create a bare minimum NestJS app from scratch`),cf(),DT(109,`.`),cf()(),Oa$1(110,`a`,22),Za$1(111,`i`,23),Oa$1(112,`span`),DT(113,`Edit on GitHub`),cf()()())},dependencies:[xt,tu],encapsulation:2})}return o})();var Zr=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-middlewares`]],features:[My],decls:514,vars:60,consts:[[`contentReference`,``],[`app648b00b11b6bfc1db96d4e809c1e8e3d8bc094fa`,``],[`appf61d5d56ed1b4f93f8bbc4ab0dffce73b12d24fc`,``],[`app8828c2df6aa929efdb02fe50ab890da69abb0fa3`,``],[`app956881d2054c0d8e1199333049126cfad8c902c3`,``],[`app2723102ac99d95f93e6417604168593e9aae65b7`,``],[`app8969e80ada6e1b488a8d4792faee61d1c2a390d3`,``],[`app5ee6cae4cfa90246a29dd408e6df7688104e1c80`,``],[`app04b96ae68ffa428710e51f4370b4a7ab4f62966a`,``],[`appa96228c9166f5a63623e3232e0247a3108cfe2c2`,``],[1,`content`],[1,`content-inner`],[`id`,`middleware`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/4x/api.html#req`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/4x/api.html#res`],[`src`,`/assets/Middlewares_1.png`,1,`illustrative-image`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/guide/using-middleware.html`],[1,`external`],[1,`warning`],[`href`,`/http/performance#middleware`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`dependency-injection`],[`appAnchor`,``,`id`,`applying-middleware`],[1,`info`],[`appAnchor`,``,`id`,`route-wildcards`],[`appAnchor`,``,`id`,`middleware-consumer`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Fluent_interface`],[`href`,`/middleware#multiple-middleware`],[`appAnchor`,``,`id`,`excluding-routes`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/pillarjs/path-to-regexp#parameters`],[`appAnchor`,``,`id`,`functional-middleware`],[`appAnchor`,``,`id`,`multiple-middleware`],[`appAnchor`,``,`id`,`global-middleware`],[`href`,`middleware#functional-middleware`],[`appAnchor`,``,`id`,`error-handling`],[`routerLink`,`/exception-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/middlewares.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),DT(4,`Middleware`),cf(),Oa$1(5,`p`),DT(6,`Middleware is a function that is called `),Oa$1(7,`strong`),DT(8,`before`),cf(),DT(9,` the route handler. Middleware functions have access to the `),Oa$1(10,`a`,13),DT(11,`request`),cf(),DT(12,` and `),Oa$1(13,`a`,14),DT(14,`response`),cf(),DT(15,` objects, and to the `),Oa$1(16,`code`),DT(17,`next()`),cf(),DT(18,` middleware function in the application's request-response cycle. The `),Oa$1(19,`strong`),DT(20,`next`),cf(),DT(21,` middleware function is commonly denoted by a variable named `),Oa$1(22,`code`),DT(23,`next`),cf(),DT(24,`.`),cf(),Oa$1(25,`figure`),Za$1(26,`img`,15),cf(),Oa$1(27,`p`),DT(28,`By default, Nest middleware is equivalent to `),Oa$1(29,`a`,16),DT(30,`Express`),cf(),DT(31,` middleware. The official Express documentation describes the capabilities of middleware as follows:`),cf(),Oa$1(32,`blockquote`,17),DT(33,` Middleware functions can perform the following tasks: `),Oa$1(34,`ul`)(35,`li`),DT(36,`execute any code.`),cf(),Oa$1(37,`li`),DT(38,`make changes to the request and the response objects.`),cf(),Oa$1(39,`li`),DT(40,`end the request-response cycle.`),cf(),Oa$1(41,`li`),DT(42,`call the next middleware function in the stack.`),cf(),Oa$1(43,`li`),DT(44,`if the current middleware function does not end the request-response cycle, it must call `),Oa$1(45,`code`),DT(46,`next()`),cf(),DT(47,` to pass control to the next middleware function. Otherwise, the request will be left hanging.`),cf()()(),Oa$1(48,`p`),DT(49,`You implement custom Nest middleware either as a function or as a class with the `),Oa$1(50,`code`),DT(51,`@Injectable()`),cf(),DT(52,` decorator. A class should implement the `),Oa$1(53,`code`),DT(54,`NestMiddleware`),cf(),DT(55,` interface, while a function has no special requirements. Let's start by implementing a simple middleware class.`),cf(),Oa$1(56,`blockquote`,18)(57,`strong`),DT(58,`Warning`),cf(),DT(59,` Express and Fastify handle middleware differently and provide different method signatures. See the `),Oa$1(60,`a`,19),DT(61,`Performance (Fastify)`),cf(),DT(62,` chapter for details.
1404`),cf(),Oa$1(63,`app-copy-button`,20)(64,`span`,21),DT(65),AT(66,`extension`),Za$1(67,`app-tabs`,null,1),cf(),Oa$1(69,`pre`)(70,`code`,22),DT(71,`
1405import { Injectable, NestMiddleware } from '@nestjs/common';
1406import { Request, Response, NextFunction } from 'express';
1407
1408@Injectable()
1409export class LoggerMiddleware implements NestMiddleware {
1410  use(req: Request, res: Response, next: NextFunction) {
1411    console.log('Request...');
1412    next();
1413  }
1414}
1415`),cf()(),Oa$1(72,`pre`)(73,`code`,22),DT(74,`
1416import { Injectable } from '@nestjs/common';
1417
1418@Injectable()
1419export class LoggerMiddleware {
1420  use(req, res, next) {
1421    console.log('Request...');
1422    next();
1423  }
1424}
1425`),cf()()(),Oa$1(75,`h4`,23)(76,`span`),DT(77,`Dependency injection`),cf()(),Oa$1(78,`p`),DT(79,`Nest middleware fully supports depen
1425dency injection. Like providers and controllers, middleware classes can `),Oa$1(80,`strong`),DT(81,`inject dependencies`),cf(),DT(82,` that are available within the same module. As usual, dependencies are injected through the `),Oa$1(83,`code`),DT(84,`constructor`),cf(),DT(85,`.`),cf(),Oa$1(86,`h4`,24)(87,`span`),DT(88,`Applying middleware`),cf()(),Oa$1(89,`p`),DT(90,`Middleware is not registered in the `),Oa$1(91,`code`),DT(92,`@Module()`),cf(),DT(93,` decorator. Instead, you set it up in the `),Oa$1(94,`code`),DT(95,`configure()`),cf(),DT(96,` method of the module class. Modules that include middleware must implement the `),Oa$1(97,`code`),DT(98,`NestModule`),cf(),DT(99,` interface. Let's set up the `),Oa$1(100,`code`),DT(101,`LoggerMiddleware`),cf(),DT(102,` at the `),Oa$1(103,`code`),DT(104,`AppModule`),cf(),DT(105,` level.`),cf(),Oa$1(106,`app-copy-button`,20)(107,`span`,21),DT(108),AT(109,`extension`),Za$1(110,`app-tabs`,null,2),cf(),Oa$1(112,`pre`)(113,`code`,22),DT(114,`
1426import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
1427import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1428import { CatsModule } from './cats/cats.module.js';
1429
1430@Module({
1431  imports: [CatsModule],
1432})
1433export class AppModule implements NestModule {
1434  configure(consumer: MiddlewareConsumer) {
1435    consumer
1436      .apply(LoggerMiddleware)
1437      .forRoutes('cats');
1438  }
1439}
1440`),cf()(),Oa$1(115,`pre`)(116,`code`,22),DT(117,`
1441import { Module } from '@nestjs/common';
1442import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1443import { CatsModule } from './cats/cats.module.js';
1444
1445@Module({
1446  imports: [CatsModule],
1447})
1448export class AppModule {
1449  configure(consumer) {
1450    consumer
1451      .apply(LoggerMiddleware)
1452      .forRoutes('cats');
1453  }
1454}
1455`),cf()()(),Oa$1(118,`p`),DT(119,`In the example above, the `),Oa$1(120,`code`),DT(121,`LoggerMiddleware`),cf(),DT(122,` is applied to the `),Oa$1(123,`code`),DT(124,`/cats`),cf(),DT(125,` route handlers defined in the `),Oa$1(126,`code`),DT(127,`CatsController`),cf(),DT(128,`. To restrict middleware to a particular request method, pass an object c
1455ontaining the route `),Oa$1(129,`code`),DT(130,`path`),cf(),DT(131,` and the request `),Oa$1(132,`code`),DT(133,`method`),cf(),DT(134,` to the `),Oa$1(135,`code`),DT(136,`forRoutes()`),cf(),DT(137,` method. The example below imports the `),Oa$1(138,`code`),DT(139,`RequestMethod`),cf(),DT(140,` enum to reference the desired request method.`),cf(),Oa$1(141,`app-copy-button`,20)(142,`span`,21),DT(143),AT(144,`extension`),Za$1(145,`app-tabs`,null,3),cf(),Oa$1(147,`pre`)(148,`code`,22),DT(149,`
1456import { Module, NestModule, RequestMethod, MiddlewareConsumer } from '@nestjs/common';
1457import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1458import { CatsModule } from './cats/cats.module.js';
1459
1460@Module({
1461  imports: [CatsModule],
1462})
1463export class AppModule implements NestModule {
1464  configure(consumer: MiddlewareConsumer) {
1465    consumer
1466      .apply(LoggerMiddleware)
1467      .forRoutes({ path: 'cats', method: RequestMethod.GET });
1468  }
1469}
1470`),cf()(),Oa$1(150,`pre`)(151,`code`,22),DT(152,`
1471import { Module, RequestMethod } from '@nestjs/common';
1472import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1473import { CatsModule } from './cats/cats.module.js';
1474
1475@Module({
1476  imports: [CatsModule],
1477})
1478export class AppModule {
1479  configure(consumer) {
1480    consumer
1481      .apply(LoggerMiddleware)
1482      .forRoutes({ path: 'cats', method: RequestMethod.GET });
1483  }
1484}
1485`),cf()()(),Oa$1(153,`blockquote`,25)(154,`strong`),DT(155,`Hint`),cf(),DT(156,` The `),Oa$1(157,`code`),DT(158,`configure()`),cf(),DT(159,` method can be asynchronous. Declare it with `),Oa$1(160,`code`),DT(161,`async`),cf(),DT(162,` to `),Oa$1(163,`code`),DT(164,`await`),cf(),DT(165,` the completion of an asynchronous operation inside the method body.
1486`),cf(),Oa$1(166,`blockquote`,18)(167,`strong`),DT(168,`Warning`),cf(),DT(169,` With the Express adapter, Nest registers the `),Oa$1(170,`code`),DT(171,`json`),cf(),DT(172,` and `),Oa$1(173,`code`),DT(174,`urlencoded`),cf(),DT(175,` body parsers (`),Oa$1(176,`code`),DT(177,`express.json()`),cf(),DT(178,` and `),Oa$1(179,`code`),DT(180,`express.urlencoded()`),cf(),DT(181,`) by default. To customize these parsers through the `),Oa$1(182,`code`),DT(183,`MiddlewareConsumer`),cf(),DT(184,`, disable the defaults by setting the `),Oa$1(185,`code`),DT(186,`bodyParser`),cf(),DT(187,` option to `),Oa$1(188,`code`),DT(189,`false`),cf(),DT(190,` when creating the application with `),Oa$1(191,`code`),DT(192,`NestFactory.create()`),cf(),DT(193,`.
1487`),cf(),Oa$1(194,`h4`,26)(195,`span`),DT(196,`Route wildcards`),cf()(),Oa$1(197,`p`),DT(198,`Middleware also supports pattern-based routes. For example, the named wildcard (`),Oa$1(199,`code`),DT(200,`*splat`),cf(),DT(201,`) matches any combination of characters in a route. In the following example, the middleware runs for any route that starts with `),Oa$1(202,`code`),DT(203,`abcd/`),cf(),DT(204,`, regardless of how many characters follow.`),cf(),Oa$1(205,`app-copy-button`)(206,`pre`)(207,`code`,22),DT(208,`
1488forRoutes({
1489  path: 'abcd/*splat',
1490  method: RequestMethod.ALL,
1491});
1492`),cf()()(),Oa$1(209,`blockquote`,25)(210,`strong`),DT(211,`Hint`),cf(),Oa$1(212,`code`),DT(213,`splat`),cf(),DT(214,` is only the name of the wildcard parameter and has no special meaning. You can use any name, e.g., `),Oa$1(215,`code`),DT(216,`*wildcard`),cf(),DT(217,`.
1493`),cf(),Oa$1(218,`p`),DT(219,`The `),Oa$1(220,`code`),DT(221,`'abcd/*splat'`),cf(),DT(222,` route path matches `),Oa$1(223,`code`),DT(224,`abcd/1`),cf(),DT(225,`, `),Oa$1(226,`code`),DT(227,`abcd/123`),cf(),DT(228,`, `),Oa$1(229,`code`),DT(230,`abcd/abc`),cf(),DT(231,`, and so on. String-based paths interpret the hyphen (`),Oa$1(232,`code`),DT(233,`-`),cf(),DT(234,`) and the dot (`),Oa$1(235,`code`),DT(236,`.`),cf(),DT(237,`) literally. However, `),Oa$1(238,`code`),DT(239,`abcd/`),cf(),DT(240,` with no additional characters does not match. To match it as well, wrap the wildcard in braces to make it optional:`),cf(),Oa$1(241,`app-copy-button`)(242,`pre`)(243,`code`,22),DT(244,`
1494forRoutes({
1495  path: 'abcd/{*splat}',
1496  method: RequestMethod.ALL,
1497});
1498`),cf()()(),Oa$1(245,`h4`,27)(246,`span`),DT(247,`Middleware consumer`),cf()(),Oa$1(248,`p`),DT(249,`The `),Oa$1(250,`code`),DT(251,`MiddlewareConsumer`),cf(),DT(252,` is a helper class that provides several built-in methods to manage middleware. All of them can be `),Oa$1(253,`strong`),DT(254,`chained`),cf(),DT(255,` in the `),Oa$1(256,`a`,28),DT(257,`fluent style`),cf(),DT(258,`. The `),Oa$1(259,`
1498code`),DT(260,`forRoutes()`),cf(),DT(261,` method accepts a single string, multiple strings, a `),Oa$1(262,`code`),DT(263,`RouteInfo`),cf(),DT(264,` object, a controller class, or multiple controller classes. In most cases, you'll pass a comma-separated list of `),Oa$1(265,`strong`),DT(266,`controllers`),cf(),DT(267,`. Below is an example with a single controller:`),cf(),Oa$1(268,`app-copy-button`,20)(269,`span`,21),DT(270),AT(271,`extension`),Za$1(272,`app-tabs`,null,4),cf(),Oa$1(274,`pre`)(275,`code`,22),DT(276,`
1499import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
1500import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1501import { CatsModule } from './cats/cats.module.js';
1502import { CatsController } from './cats/cats.controller.js';
1503
1504@Module({
1505  imports: [CatsModule],
1506})
1507export class AppModule implements NestModule {
1508  configure(consumer: MiddlewareConsumer) {
1509    consumer
1510      .apply(LoggerMiddleware)
1511      .forRoutes(CatsController);
1512  }
1513}
1514`),cf()(),Oa$1(277,`pre`)(278,`code`,22),DT(279,`
1515import { Module } from '@nestjs/common';
1516import { LoggerMiddleware } from './common/middleware/logger.middleware.js';
1517import { CatsModule } from './cats/cats.module.js';
1518import { CatsController } from './cats/cats.controller.js';
1519
1520@Module({
1521  imports: [CatsModule],
1522})
1523export class AppModule {
1524  configure(consumer) {
1525    consumer
1526      .apply(LoggerMiddleware)
1527      .forRoutes(CatsController);
1528  }
1529}
1530`),cf()()(),Oa$1(280,`blockquote`,25)(281,`strong`),DT(282,`Hint`),cf(),DT(283,` The `),Oa$1(284,`code`),DT(285,`apply()`),cf(),DT(286,` method accepts either a single middleware or multiple arguments to specify `),Oa$1(287,`a`,29),DT(288,`multiple middleware`),cf(),DT(289,`.
1531`),cf(),Oa$1(290,`h4`,30)(291,`span`),DT(292,`Excluding routes`),cf()(),Oa$1(293,`p`),DT(294,`To `),Oa$1(295,`strong`),DT(296,`exclude`),cf(),DT(297,` certain routes from having middleware applied, use the `),Oa$1(298,`code`),DT(299,`exclude()`),cf(),DT(300,` method. It accepts a single string, multiple strings, or a `),Oa$1(301,`code`),DT(302,`RouteInfo`),cf(),DT(303,` object that identifies the routes to exclude:`),cf(),Oa$1(304,`app-copy-button`)(305,`pre`)(306,`code`,22),DT(307,`
1532consumer
1533  .apply(LoggerMiddleware)
1534  .exclude(
1535    { path: 'cats', method: RequestMethod.GET },
1536    { path: 'cats', method: RequestMethod.POST },
1537    'cats/{*splat}',
1538  )
1539  .forRoutes(CatsController);
1540`),cf()()(),Oa$1(308,`p`),DT(309,`With the example above, `),Oa$1(310,`code`),DT(311,`LoggerMiddleware`),cf(),DT(312,` is bound to all routes defined inside `),Oa$1(313,`code`),DT(314,`CatsController`),cf(),Oa$1(315,`strong`),DT(316,`except`),cf(),DT(317,` those matching the three entries passed to the `),Oa$1(318,`code`),DT(319,`exclude()`),cf(),DT(320,` method.`),cf(),Oa$1(321,`blockquote`,25)(322,`strong`),DT(323,`Hint`),cf(),DT(324,` The `),Oa$1(325,`code`),DT(326,`exclude()`),cf(),DT(327,` method supports wildcard parameters using the `),Oa$1(328,`a`,31),DT(329,`path-to-regexp`),cf(),DT(330,` package.
1541`),cf(),Oa$1(331,`h4`,32)(332,`span`),DT(333,`Functional middleware`),cf()(),Oa$1(334,`p`),DT(335,`The `),Oa$1(336,`code`),DT(337,`LoggerMiddleware`),cf(),DT(338,` class we've been using is minimal: it has no members, no additional methods, and no dependencies. Middleware like this can be defined as a plain function instead of a class. This type of middleware is called `),Oa$1(339,`strong`),DT(340,`functional middleware`),cf(),DT(341,`. Let's convert the logger middleware from a class into a function to illustrate the difference:`),cf(),Oa$1(342,`app-copy-button`,20)(343,`span`,21),DT(344),AT(345,`extension`),Za$1(346,`app-tabs`,null,5),cf(),Oa$1(348,`pre`)(349,`code`,22),DT(350,`
1542import { Request, Response, NextFunction } from 'express';
1543
1544export function logger(req: Request, res: Response, next: NextFunction) {
1545  console.log('Request...');
1546  next();
1547}
1548`),cf()(),Oa$1(351,`pre`)(352,`code`,22),DT(353,`
1549export function logger(req, res, next) {
1550  console.log('Request...');
1551  next();
1552}
1553`),cf()()(),Oa$1(354,`p`),DT(355,`Then use it within the `),Oa$1(356,`code`),DT(357,`AppModule`),cf(),DT(358,`:`),cf(),Oa$1(359,`app-copy-button`,20)(360,`span`,21),DT(361),AT(362,`extension`),Za$1(363,`app-tabs`,null,6),cf(),Oa$1(365,`pre`)(366,`code`,22),DT(367,`
1554consumer
1555  .apply(logger)
1556  .forRoutes(CatsController);
1557`),cf()()(),Oa$1(368,`blockquote`,25)(369,`strong`),DT(370,`Hint`),cf(),DT(371,` Consider using `),Oa$1(372,`strong`),DT(373,`functional middleware`),cf(),DT(374,` whenever your middleware doesn't need any dependencies.
1558`),cf(),Oa$1(375,`h4`,33)(376,`span`),DT(377,`Multiple middleware`),cf()(),Oa$1(378,`p`),DT(379,`To bind multiple middleware that execute sequentially, pass a comma-separated list to the `),Oa$1(380,`code`),DT(381,`apply()`),cf(),DT(382,` method:`),cf(),Oa$1(383,`app-copy-button`)(384,`pre`)(385,`code`,22),DT(386,`
1559consumer.apply(cors(), helmet(), logger).forRoutes(CatsController);
1560`),cf()()(),Oa$1(387,`h4`,34)(388,`span`),DT(389,`Global middleware`),cf()(),Oa$1(390,`p`),DT(391,`To bind middleware to every registered route at once, use the `),Oa$1(392,`code`),DT(393,`use()`),cf(),DT(394,` method of the `),Oa$1(395,`code`),DT(396,`INestApplication`),cf(),DT(397,` instance:`),cf(),Oa$1(398,`app-copy-button`,20)(399,`span`,21),DT(400),AT(401,`extension`),Za$1(402,`app-tabs`,null,7),cf(),Oa$1(404,`pre`)(405,`code`,22),DT(406,`
1561const app = await NestFactory.create(AppModule);
1562app.use(logger);
1563await app.listen(process.env.PORT ?? 3000);
1564`),cf()()(),Oa$1(407,`blockquote`,25)(408,`strong`),DT(409,`Hint`),cf(),DT(410,` Global middleware registered with `),Oa$1(4
vendor: 4,102 bytes, lines 1564-1616
156411,`code`),DT(412,`app.use()`),cf(),DT(413,` cannot access the DI container, so use `),Oa$1(414,`a`,35),DT(415,`functional middleware`),cf(),DT(416,` there. Alternatively, use a class middleware and bind it with `),Oa$1(417,`code`),DT(418,`.forRoutes('*')`),cf(),DT(419,` within the `),Oa$1(420,`code`),DT(421,`AppModule`),cf(),DT(422,` (or any other module).
1565`),cf(),Oa$1(423,`h4`,36)(424,`span`),DT(425,`Error handling`),cf()(),Oa$1(426,`p`),DT(427,`When middleware throws an exception, Nest's `),Oa$1(428,`a`,37),DT(429,`exceptions layer`),cf(),DT(430,` catches it and sends an appropriate response, just as it does for exceptions thrown from a route handler. The recommended approach is to throw an `),Oa$1(431,`code`),DT(432,`HttpException`),cf(),DT(433,` (or a built-in subclass such as `),Oa$1(434,`code`),DT(435,`UnauthorizedException`),cf(),DT(436,`):`),cf(),Oa$1(437,`app-copy-button`,20)(438,`span`,21),DT(439),AT(440,`extension`),Za$1(441,`app-tabs`,null,8),cf(),Oa$1(443,`pre`)(444,`code`,22),DT(445,`
1566import {
1567  Injectable,
1568  NestMiddleware,
1569  UnauthorizedException,
1570} from '@nestjs/common';
1571import { Request, Response, NextFunction } from 'express';
1572
1573@Injectable()
1574export class AuthMiddleware implements NestMiddleware {
1575  use(req: Request, res: Response, next: NextFunction) {
1576    if (!req.headers.authorization) {
1577      throw new UnauthorizedException();
1578    }
1579    next();
1580  }
1581}
1582`),cf()(),Oa$1(446,`pre`)(447,`code`,22),DT(448,`
1583import { Injectable, UnauthorizedException } from '@nestjs/common';
1584
1585@Injectable()
1586export class AuthMiddleware {
1587  use(req, res, next) {
1588    if (!req.headers.authorization) {
1589      throw new UnauthorizedException();
1590    }
1591    next();
1592  }
1593}
1594`),cf()()(),Oa$1(449,`p`),DT(450,`If the middleware is asynchronous, declare `),Oa$1(451,`code`),DT(452,`use()`),cf(),DT(453,` as `),Oa$1(454,`code`),DT(455,`async`),cf(),DT(456,` (or return a `),Oa$1(457,`code`),DT(458,`Promise`),cf(),DT(459,`) so that a rejected promise is forwarded to the exceptions layer:`),cf(),Oa$1(460,`app-copy-button`,20)(461,`span`,21),DT(462),AT(463,`extension`),Za$1(464,`app-tabs`,null,9),cf(),Oa$1(466,`pre`)(467,`code`,22),DT(468,`
1595@Injectable()
1596export class AuthMiddleware implements NestMiddleware {
1597  constructor(private readonly authService: AuthService) {}
1598
1599  async use(req: Request, res: Response, next: NextFunction) {
1600    const user = await this.authService.verify(req.headers.authorization);
1601    if (!user) {
1602      throw new UnauthorizedException();
1603    }
1604    req['user'] = user;
1605    next();
1606  }
1607}
1608`),cf()()(),Oa$1(469,`p`),DT(470,`You can also pass the error to `),Oa$1(471,`code`),DT(472,`next()`),cf(),DT(473,`. This is useful when wrapping existing Express-style middleware that reports failures through the callback:`),cf(),Oa$1(474,`app-copy-button`)(475,`pre`)(476,`code`,22),DT(477,`
1609use(req: Request, res: Response, next: NextFunction) {
1610  if (!req.headers.authorization) {
1611    return next(new UnauthorizedException());
1612  }
1613  next();
1614}
1615`),cf()()(),Oa$1(478,`blockquote`,18)(479,`strong`),DT(480,`Warning`),cf(),DT(481,` Because middleware runs before a route handler is selected, only `),Oa$1(482,`strong`),DT(483,`global`),cf(),DT(484,` exception filters (registered with `),Oa$1(485,`code`),DT(486,`app.useGlobalFilters()`),cf(),DT(487,` or the `),Oa$1(488,`code`),DT(489,`APP_FILTER`),cf(),DT(490,` token) catch exceptions thrown from middleware. Method-scoped and controller-scoped filters are not invoked, and binding filters to a middleware class with `),Oa$1(491,`code`),DT(492,`@UseFilters()`),cf(),DT(493,` is not supported.
1616`),cf(),Oa$1(494,`blockquote`,25)(495,`strong`),DT(496,`Hint`),cf(),DT(497,` Middleware registered with `),Oa$1(498,`code`),DT(499,`app.use()`),cf(),DT(500,` is handled by the underlying HTTP platform (Express or Fastify), not by Nest's `),Oa$1(501,`code`),DT(502,`MiddlewareModule`),cf(),DT(503,`. Prefer throwing errors (or calling `),Oa$1(504,`code`),DT(505,`next(err)`),cf(),DT(506,`) from middleware bound with the `),Oa$1(507,`code`),DT(508,`MiddlewareConsumer`),cf(),DT(509,`, so that the exceptions layer can process them.
1617`),cf()(),Oa$1(510,`a`,38),Za$1(511,`i`,39),Oa$1(512,`span`),DT(513,`Edit on GitHub`),cf()()()),a&2){let l=QS(68),d=QS(111),m=QS(146),h=QS(273),u=QS(347),b=QS(364),S=QS(403),k=QS(442),C=QS(465);UC(65),hf(` `,OT(66,33,`logger.middleware`,l.isJsActive),`
1618`),UC(4),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(36),hf(` `,OT(109,36,`app.module`,d.isJsActive),`
1619`),UC(4),By(`hide`,d.isJsActive),UC(3),By(`hide`,!d.isJsActive),UC(28),hf(` `,OT(144,39,`app.module`,m.isJsActive),`
1620`),UC(4),By(`hide`,m.isJsActive),UC(3),By(`hide`,!m.isJsActive),UC(120),hf(` `,OT(271,42,`app.module`,h.isJsActive),`
1621`),UC(4),By(`hide`,h.isJsActive),UC(3),By(`hide`,!h.isJsActive),UC(67),hf(` `,OT(345,45,`logger.middleware`,u.isJsActive),`
1622`),UC(4),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(10),hf(` `,OT(362,48,`app.module`,b.isJsActive),`
1623`),UC(39),hf(` `,OT(401,51,`main`,S.isJsActive),`
1624`),UC(39),hf(` `,OT(440,54,`auth.middleware`,k.isJsActive),`
1625`),UC(4),By(`hide`,k.isJsActive),UC(3),By(`hide`,!k.isJsActive),UC(16),hf(` `,OT(463,57,`auth.middleware`,C.isJsActive),`
1626`)}},dependencies:[tu,tn$1,u,xt,g],encapsulation:2,changeDetection:1})}return o})();var ea=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-migration`]],features:[My],decls:1099,vars:2,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`migration-guide`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`upgrading-packages`],[1,`language-bash`],[`href`,`/cli/usages#nest-upgrade`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://npmjs.com/package/npm-check-updates`],[`appAnchor`,``,`id`,`nodejs-requirements`],[1,`language-text`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html#nodejs-experimental`],[`appAnchor`,``,`id`,`esm-packages`],[`href`,`#switching-your-project-to-esm`],[`href`,`#moving-your-own-code-to-esm`],[`appAnchor`,``,`id`,`new-project-defaults`],[`appAnchor`,``,`id`,`testing-stack`],[1,`warning`],[`appAnchor`,``,`id`,`linting-defaults`],[`appAnchor`,``,`id`,`route-decorator-schemas`],[1,`language-typescript`],[`href`,`/openapi/introduction#standard-schema-zod-valibot`],[`appAnchor`,``,`id`,`standard-schema-serialization`],[`appAnchor`,``,`id`,`graphql-ide-configuration`],[`appAnchor`,``,`id`,`graphql-subscriptions-transport`],[`appAnchor`,``,`id`,`nats-v3`],[`appAnchor`,``,`id`,`lifecycle-hook-ordering`],[`appAnchor`,``,`id`,`optional-is-no-longer-inherited`],[`appAnchor`,``,`id`,`class-validator-and-class-transformer`],[`appAnchor`,``,`id`,`config-module`],[`href`,`/application/configuration#schema-validation`],[`appAnchor`,``,`id`,`terminus-module`],[`href`,`/recipes/terminus#timeouts-and-caching`],[`appAnchor`,``,`id`,`webpack-deprecation-in-cli-workflows`],[`appAnchor`,``,`id`,`new-cli-commands-and-flags`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://mau.nestjs.com/`],[`appAnchor`,``,`id`,`route-conflict-diagnostics`],[`href`,`/controllers#route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`machine-readable-error-codes`],[`href`,`/exception-filters#machine-readable-error-codes`],[`appAnchor`,``,`id`,`structured-logging-params`],[`href`,`/application/logger#structured-logging-params`],[`appAnchor`,``,`id`,`native-observability-support`],[`href`,`/observability/overview`],[`routerLink`,`/observability/sdk`],[`appAnchor`,``,`id`,`other-notable-release-changes`],[`href`,`/microservices/grpc#exception-handling`],[`href`,`/microservices/kafka#regular-expression-patterns`],[`href`,`/websockets/gateways#request-scoped-gateways`],[`appAnchor`,``,`id`,`switching-your-project-to-esm`],[1,`language-json`],[`appAnchor`,``,`id`,`moving-your-own-code-to-esm`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/migration.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),DT(4,`Migration guide`),cf(),Oa$1(5,`p`),DT(6,`This article walks y
1626ou through migrating from NestJS version 11 to version 12. Version 12 centers on ESM packages, updated CLI defaults, first-class support for `),Oa$1(7,`a`,4),DT(8,`Standard Schema`),cf(),DT(9,`-based validation and serialization, and native `),Oa$1(10,`a`,5),DT(11,`observability`),cf(),DT(12,` support.`),cf(),Oa$1(13,`h4`,6)(14,`span`),DT(15,`Upgrading packages`),cf()(),Oa$1(16,`p`),DT(17,`Start by upgrading the Nest CLI itself, because the upgrade command used below ships with it:`),cf(),Oa$1(18,`pre`)(19,`code`,7),DT(20,`
1627$ npm i -g @nestjs/cli@latest @nestjs/schematics@latest
1628`),cf()(),Oa$1(21,`p`),DT(22,`If your project keeps the CLI as a local dev dependency, update it there as well:`),cf(),Oa$1(23,`pre`)(24,`code`,7),DT(25,`
1629$ npm i -D @nestjs/cli@latest @nestjs/schematics@latest
1630`),cf()(),Oa$1(26,`p`),DT(27,`With the latest CLI in place, run `),Oa$1(28,`code`),DT(29,`nest upgrade`),cf(),DT(30,` from the root of your project:`),cf(),Oa$1(31,`pre`)(32,`code`,7),DT(33,`
1631$ nest upgrade
1632`),cf()(),Oa$1(34,`p`),DT(35,`The command moves every recognized `),Oa$1(36,`code`),DT(37,`@nestjs/*`),cf(),DT(38,` package to its v12-compatible major at once, so the framework, platform adapters, and companion packages stay in sync, and then installs them. It also bumps TypeScript to v6 and applies the mechanical parts of the migration described in this guide (`),Oa$1(39,`code`),DT(40,`nest-cli.json`),cf(),DT(41,` webpack options, the GraphQL `),Oa$1(42,`code`),DT(43,`playground`),cf(),DT(44,` and subscriptions transport changes, the NATS package swap, and `),Oa$1(45,`code`),DT(46,`@nestjs/config`),cf(),DT(47,` validation options). Finally, it prints a report of everything it changed, plus notes on the behavioral changes it can't migrate for you. To see that report without touching your files, run the command with `),Oa$1(48,`code`),DT(49,`--dry-run`),cf(),DT(50,` first. See `),Oa$1(51,`a`,8),DT(52,`nest upgrade`),cf(),DT(53,` for the full list of steps and options.`),cf(),Oa$1(54,`blockquote`,9)(55,`strong`),DT(56,`Hint`),cf(),Oa$1(57,`code`),DT(58,`nest upgrade`),cf(),DT(59,` replaces the manual `),Oa$1(60,`a`,10),DT(61,`npm-check-updates (ncu)`),cf(),DT(62,` flow previously recommended here. You can still upgrade packages manually if you prefer; what matters is that every Nest package moves to the same major at once. The command only bumps the CLI dependency inside your project, which is why you upgrade the global binary first.
1633`),cf(),Oa$1(63,`h4`,11)(64,`span`),DT(65,`Node.js requirements`),cf()(),Oa$1(66,`p`),DT(67,`The Node.js requirement differs depending on whether you are `),Oa$1(68,`strong`),DT(69,`running`),cf(),DT(70,` an application or `),Oa$1(71,`strong`),DT(72,`generating`),cf(),DT(73,` code with the CLI:`),cf(),Oa$1(74,`table`)(75,`thead`)(76,`tr`)(77,`th`),DT(78,`What you are doing`),cf(),Oa$1(79,`th`),DT(80,`Minimum Node.js`),cf()()(),Oa$1(81,`tbody`)(82,`tr`)(83,`td`),DT(84,`Running a Nest 12 application`),cf(),Oa$1(85,`td`)(86,`strong`),DT(87,`v20.19+`),cf(),DT(88,`, or `),Oa$1(89,`strong`),DT(90,`v22.12+`),cf(),DT(91,` on the 22.x line`),cf()(),Oa$1(92,`tr`)(93,`td`)(94,`code`),DT(95,`nest new`),cf(),DT(96,`, `),Oa$1(97,`code`),DT(98,`nest generate`),cf(),DT(99,`, `),Oa$1(100,`code`),DT(101,`nest upgrade`),cf(),DT(102,` (`),Oa$1(103,`code`),DT(104,`@nestjs/schematics`),cf(),DT(105,`)`),cf(),Oa$1(106,`td`)(107,`strong`),DT(108,`v22.22.3+`),cf(),DT(109,`, `),Oa$1(110,`strong`),DT(111,`v24.15+`),cf(),DT(112,`, or `),Oa$1(113,`strong`),DT(114,`v26+`),cf()()()()(),Oa$1(115,`p`)(116,`code`),DT(117,`@nestjs/core`),cf(),DT(118,` itself still declares `),Oa$1(119,`code`),DT(120,`>= 20`),cf(),DT(121,`, but the v12 packages are ESM-only, and consuming them from a CommonJS application relies on `),Oa$1(122,`
1633code`),DT(123,`require(esm)`),cf(),DT(124,`, which is unflagged only from Node.js 20.19 and 22.12 onwards. The 21.x line never received it and is not supported. `),Oa$1(125,`code`),DT(126,`nest upgrade`),cf(),DT(127,` enforces exactly this and refuses to run on an older release.`),cf(),Oa$1(128,`p`),DT(129,`AWS Lambda disables `),Oa$1(130,`code`),DT(131,`require(esm)`),cf(),DT(132,` by default on its Node.js 20, 22, and 24 runtimes, even when the corresponding upstream Node.js release enables it. To run a CommonJS Nest 12 application on these Lambda runtimes, enable it through the function's `),Oa$1(133,`code`),DT(134,`NODE_OPTIONS`),cf(),DT(135,` environment variable:`),cf(),Oa$1(136,`pre`)(137,`code`,12),DT(138,`
1634NODE_OPTIONS=--experimental-require-module
1635`),cf()(),Oa$1(139,`p`),DT(140,`If `),Oa$1(141,`code`),DT(142,`NODE_OPTIONS`),cf(),DT(143,` already contains other flags, append this flag to the existing value. See the `),Oa$1(144,`a`,13),DT(145,`AWS Lambda documentation`),cf(),DT(146,` for details and for the support limitations of experimental features.`),cf(),Oa$1(147,`p`),DT(148,`The CLI's schematics have a higher floor of their own: `),Oa$1(149,`code`),DT(150,`@nestjs/schematics`),cf(),DT(151,` requires `),Oa$1(152,`strong`),DT(153,`Node.js v22.22.3+, v24.15+, or v26+`),cf(),DT(154,`, inherited from the Angular devkit it builds on. Scaffolding and upgrading therefore need a newer runtime than running the framework does. The 23.x and 25.x lines, as well as earlier 22.x and 24.x releases, are excluded.`),cf(),Oa$1(155,`blockquote`,9)(156,`strong`),DT(157,`Hint`),cf(),DT(158,` The simplest way to satisfy every requirement is to run the latest active LTS release. Pick the bare minimum only if you have a specific reason to stay there. If you do, keep in mind that Node.js 20.19 is enough to run your application, but not to use the CLI's generators.
1636`),cf(),Oa$1(159,`h4`,14)(160,`span`),DT(161,`ESM packages`),cf()(),Oa$1(162,`p`),DT(163,`All core Nest packages now ship as ESM. For most existing applications, this is much less disruptive than it would have been a few years ago, because modern Node.js releases support `),Oa$1(164,`code`),DT(165,`require(esm)`),cf(),DT(166,`.`),cf(),Oa$1(167,`blockquote`,9)(168,`strong`),DT(169,`Hint`),cf(),DT(170,` Migrating `),Oa$1(171,`strong`),DT(172,`your own`),cf(),DT(173,` application to ESM is entirely optional and `),Oa$1(174,`strong`),DT(175,`not`),cf(),DT(176,` part of upgrading to v12. Because Nest's ESM packages can be consumed from CommonJS through `),Oa$1(177,`code`),DT(178,`require(esm)`),cf(),DT(179,`, a CommonJS application can upgrade to v12 and stay CommonJS for as long as you like; `),Oa$1(180,`code`),DT(181,`nest upgrade`),cf(),DT(182,` deliberately leaves your module format alone. Whether you switch is a matter of preference. If you decide to, the last two sections of this guide, `),Oa$1(183,`a`,15),DT(184,`Switching your project to ESM`),cf(),DT(185,` and `),Oa$1(186,`a`,16),DT(187,`Moving your own code to ESM`),cf(),DT(188,`, walk you through it.
1637`),cf(),Oa$1(189,`p`),DT(190,`In practice, this means:`),cf(),Oa$1(191,`ul`)(192,`li`),DT(193,`Many existing CommonJS applications continue to work without a full rewrite`),cf(),Oa$1(194,`li`),DT(195,`Review custom bootstrapping scripts, build tooling, and test runners if they make assumptions about CommonJS-only packages`),cf(),Oa$1(196,`li`),DT(197,`If you maintain a custom bundler or runtime configuration, make sure it matches the module format your project actually uses`),cf()(),Oa$1(198,`p`),DT(199,`For new projects, the CLI now lets you choose between a CommonJS and an ESM project layout.`),cf(),Oa$1(200,`h4`,17)(201,`span`),DT(202,`New project defaults`),cf()(),Oa$1(203,`p`)(204,`code`),DT(205,`nest new`),cf(),DT(206,` now prompts you to choose whether to generate a CommonJS or an ESM project.`),cf(),Oa$1(207,`ul`)(208,`li`),DT(209,`ESM projects use Vitest by default (CommonJS projects use Jest)`),cf(),Oa$1(210,`li`),DT(211,`All generated projects use oxlint by default`),cf()(),Oa$1(212,`p`),DT(213,`This only changes what the CLI scaffolds for you. Existing projects can keep their current tooling and migrate on their own schedule.`),cf(),Oa$1(214,`h4`,18)(215,`span`),DT(216,`Testing stack`),cf()(),Oa$1(217,`p`),DT(218,`Nest's testing utilities remain the same. The main change is the default stack used by generated ESM projects and by the framework's own repositories and samples: Vitest is now the primary default for ESM workflows.`),cf(),Oa$1(219,`p`),DT(220,`If your application already uses a different test runner, you don't need to migrate immediately. `),Oa$1(221,`code`),DT(222,`@nestjs/testing`),cf(),DT(223,` remains test-runner agnostic.`),cf(),Oa$1(224,`blockquote`,19)(225,`strong`),DT(226,`Warning`),cf(),DT(227,` If you stay on Jest, note that it can load the ESM-only v12 packages only on Node.js v24.9 or later (older versions fail with `),Oa$1(228,`code`),DT(229,`ERR_REQUIRE_ASYNC_MODULE`),cf(),DT(230,`). Run your test suite on Node.js v24.9+, or consider migrating to Vitest. `),Oa$1(231,`code`),DT(232,`nest upgrade`),cf(),DT(233,` bumps Jest to v30 and warns about this.
1638`),cf(),Oa$1(234,`p`),DT(235,`When you do decide to migrate:`),cf
1638(),Oa$1(236,`ul`)(237,`li`),DT(238,`Update your `),Oa$1(239,`code`),DT(240,`test`),cf(),DT(241,`, `),Oa$1(242,`code`),DT(243,`test:watch`),cf(),DT(244,`, `),Oa$1(245,`code`),DT(246,`test:cov`),cf(),DT(247,`, and `),Oa$1(248,`code`),DT(249,`test:e2e`),cf(),DT(250,` scripts`),cf(),Oa$1(251,`li`),DT(252,`Review any runner-specific globals and replace them with Vitest equivalents where needed`),cf(),Oa$1(253,`li`),DT(254,`Check your `),Oa$1(255,`code`),DT(256,`supertest`),cf(),DT(257,` imports in E2E tests if your Vitest setup expects default imports`),cf()(),Oa$1(258,`h4`,20)(259,`span`),DT(260,`Linting defaults`),cf()(),Oa$1(261,`p`),DT(262,`Newly generated projects use oxlint by default. You only need to migrate if you want your repository to match the new CLI scaffolding.`),cf(),Oa$1(263,`h4`,21)(264,`span`),DT(265,`Route decorator schemas`),cf()(),Oa$1(266,`p`),DT(267,`Nest adds a new `),Oa$1(268,`code`),DT(269,`schema`),cf(),DT(270,` option to route parameter decorators such as `),Oa$1(271,`code`),DT(272,`@Body()`),cf(),DT(273,`, `),Oa$1(274,`code`),DT(275,`@Query()`),cf(),DT(276,`, `),Oa$1(277,`code`),DT(278,`@Param()`),cf(),DT(279,`, and `),Oa$1(280,`code`),DT(281,`@RawBody()`),cf(),DT(282,`. The schema metadata is designed for `),Oa$1(283,`a`,4),DT(284,`Standard Schema`),cf(),DT(285,`-compatible libraries such as Zod, Valibot, and ArkType.`),cf(),Oa$1(286,`p`),DT(287,`For example:`),cf(),Oa$1(288,`app-copy-button`)(289,`pre`)(290,`code`,22),DT(291,`
1639@Post()
1640create(@Body({ schema: createUserSchema }) body: CreateUserDto) {
1641  return this.usersService.create(body);
1642}
1643
1644@Get(':id')
1645findOne(@Param('id', { schema: z.coerce.number().int().positive() }) id: number) {
1646  return this.usersService.findOne(id);
1647}
1648`),cf()()(),Oa$1(292,`p`),DT(293,`On its own, the decorator only attaches schema metadata. To validate against it, register the built-in `),Oa$1(294,`code`),DT(295,`StandardSchemaValidationPipe`),cf(),DT(296,`:`),cf(),Oa$1(297,`app-copy-button`)(298,`pre`)(299,`code`,22),DT(300,`
1649app.useGlobalPipes(new StandardSchemaValidationPipe());
1650`),cf()()(),Oa$1(301,`p`),DT(302,`This is a schema-first alternative to the traditional `),Oa$1(303,`code`),DT(304,`ValidationPipe`),cf(),DT(305,` plus `),Oa$1(306,`code`),DT(307,`class-validator`),cf(),DT(308,` flow. The same schemas can also feed OpenAPI generation (see `),Oa$1(309,`a`,23),DT(310,`Standard Schema (Zod, Valibot)`),cf(),DT(311,`).`),cf(),Oa$1(312,`p`),DT(313,`The existing decorator-based approach remains fully supported, and there are no plans to remove it. The `),Oa$1(314,`code`),DT(315,`schema`),cf(),DT(316,` option is an additional choice for teams that prefer schema-first libraries such as Zod.`),cf(),Oa$1(317,`h4`,24)(318,`span`),DT(319,`Standard Schema serialization`),cf()(),Oa$1(320,`p`),DT(321,`Nest also introduces `),Oa$1(322,`code`),DT(323,`StandardSchemaSerializerInterceptor`),cf(),DT(324,`, which validates and transforms outgoing responses with the same Standard Schema ecosystem.`),cf(),Oa$1(325,`app-copy-button`)(326,`pre`)(327,`code`,22),DT(328,`
1651@UseInterceptors(StandardSchemaSerializerInterceptor)
1652@SerializeOptions({ schema: userResponseSchema })
1653@Get(':id')
1654findOne(@Param('id') id: string) {
1655  return this.usersService.findOne(id);
1656}
1657`),cf()()(),Oa$1(329,`p`),DT(330,`Use it when you want a schema, instead of `),Oa$1(331,`code`),DT(332,`class-transformer`),cf(),DT(333,` decorators, to drive response shaping.`),cf(),Oa$1(334,`h4`,25)(335,`span`),DT(336,`GraphQL IDE configuration`),cf()(),Oa$1(337,`p`),DT(338,`GraphiQL is now the default GraphQL IDE. If you need to customize it, pass a `),Oa$1(339,`code`),DT(340,`graphiql`),cf(),DT(341,` options object instead of setting `),Oa$1(342,`code`),DT(343,`graphiql: true`),cf(),DT(344,`.`),cf(),Oa$1(345,`app-copy-button`)(346,`pre`)(347,`code`,22),DT(348,`
1658GraphQLModule.forRoot<ApolloDriverConfig>({
1659  driver: ApolloDriver,
1660  graphiql: {
1661    url: '/graphql',
1662    headers: {
1663      authorization: 'Bearer <token>',
1664    },
1665    shouldPersistHeaders: true,
1666    isHeadersEditorEnabled: true,
1667  },
1668});
1669`),cf()()(),Oa$1(349,`p`),DT(350,`This customizes the IDE endpoint and editor behavior while keeping GraphiQL enabled.`),cf(),Oa$1(351,`h4`,26)(352,`span`),DT(353,`GraphQL subscriptions transport`),cf()(),Oa$1(354,`p`),DT(355,`The latest `),Oa$1(356,`code`),DT(357,`@nestjs/gra
1669phql`),cf(),DT(358,` release removes support for `),Oa$1(359,`code`),DT(360,`subscriptions-transport-ws`),cf(),DT(361,`. Use `),Oa$1(362,`code`),DT(363,`graphql-ws`),cf(),DT(364,` for GraphQL subscriptions instead.`),cf(),Oa$1(365,`app-copy-button`)(366,`pre`)(367,`code`,22),DT(368,`
1670GraphQLModule.forRoot<ApolloDriverConfig>({
1671  driver: ApolloDriver,
1672  subscriptions: {
1673    'graphql-ws': true,
1674  },
1675});
1676`),cf()()(),Oa$1(369,`p`),DT(370,`If your application still depends on `),Oa$1(371,`code`),DT(372,`subscriptions-transport-ws`),cf(),DT(373,`, plan that migration as part of your GraphQL package upgrade.`),cf(),Oa$1(374,`h4`,27)(375,`span`),DT(376,`NATS v3`),cf()(),Oa$1(377,`p`),DT(378,`The microservices package now targets NATS v3, which includes a breaking dependency change. If you use the NATS transport, replace the old `),Oa$1(379,`code`),DT(380,`nats`),cf(),DT(381,` package with `),Oa$1(382,`code`),DT(383,`@nats-io/transport-node`),cf(),DT(384,`:`),cf(),Oa$1(385,`pre`)(386,`code`,7),DT(387,`
1677$ npm uninstall nats
1678$ npm install @nats-io/transport-node
1679`),cf()(),Oa$1(388,`p`),DT(389,`If your application imports NATS helpers directly, install `),Oa$1(390,`code`),DT(391,`@nats-io/nats-core`),cf(),DT(392,` as well and update those imports. NATS v3 also dropped the `),Oa$1(393,`code`),DT(394,`StringCodec`),cf(),DT(395,` and `),Oa$1(396,`code`),DT(397,`JSONCodec`),cf(),DT(398,` helpers. For example, the `),Oa$1(399,`code`),DT(400,`headers()`),cf(),DT(401,` helper now comes from `),Oa$1(402,`code`),DT(403,`@nats-io/nats-core`),cf(),DT(404,`:`),cf(),Oa$1(405,`app-copy-button`)(406,`pre`)(407,`code`,22),DT(408,`
1680import * as nats from '@nats-io/nats-core';
1681import { NatsRecordBuilder } from '@nestjs/microservices';
1682
1683const headers = nats.headers();
1684headers.set('x-version', '1.0.0');
1685
1686const record = new NatsRecordBuilder(payload).setHeaders(headers).build();
1687return this.client.send('record-builder-duplex', record);
1688`),cf()()(),Oa$1(409,`p`),DT(410,`Also review any custom serializers or deserializers. Nest now serializes NATS packets as JSON strings, and custom NATS deserializers receive the full NATS message object instead of a raw `),Oa$1(4
vendor: 4,577 bytes, lines 1688-1706
168811,`code`),DT(412,`Uint8Array`),cf(),DT(413,`. In practice, custom deserializers should read the payload with `),Oa$1(414,`code`),DT(415,`msg.json()`),cf(),DT(416,` instead of decoding bytes manually.`),cf(),Oa$1(417,`h4`,28)(418,`span`),DT(419,`Lifecycle hook ordering`),cf()(),Oa$1(420,`p`),DT(421,`Lifecycle hooks are now called by component hierarchy level. This can change the execution order of hooks such as `),Oa$1(422,`code`),DT(423,`onModuleInit`),cf(),DT(424,`, `),Oa$1(425,`code`),DT(426,`onApplicationBootstrap`),cf(),DT(427,`, and the shutdown hooks when multiple providers or modules depend on one another.`),cf(),Oa$1(428,`p`),DT(429,`If your application relies on a specific hook order between related providers, review that flow during the upgrade and update any assumptions in initialization logic, teardown logic, or tests.`),cf(),Oa$1(430,`h4`,29)(431,`span`)(432,`code`),DT(433,`@Optional()`),cf(),DT(434,` is no longer inherited`),cf()(),Oa$1(435,`p`),DT(436,`Nest now reads the optional markers of constructor parameters with `),Oa$1(437,`code`),DT(438,`Reflect.getOwnMetadata`),cf(),DT(439,`, so a subclass no longer inherits the markers its parent declared. Parameter types are still inherited. As a result, a subclass without its own constructor keeps its parent's parameters but loses their optional status, and Nest throws `),Oa$1(440,`code`),DT(441,`UnknownDependenciesException`),cf(),DT(442,` where v11 resolved the parameter as `),Oa$1(443,`code`),DT(444,`undefined`),cf(),DT(445,`.`),cf(),Oa$1(446,`p`),DT(447,`This is deliberate: a dependency that was genuinely missing used to resolve to `),Oa$1(448,`code`),DT(449,`undefined`),cf(),DT(450,` silently. Give the subclass its own constructor and declare the marker again:`),cf(),Oa$1(451,`app-copy-button`)(452,`pre`)(453,`code`,22),DT(454,`
1689@Injectable()
1690class Child extends Base {
1691  constructor(@Optional() options?: Options) {
1692    super(options);
1693  }
1694}
1695`),cf()()(),Oa$1(455,`h4`,30)(456,`span`),DT(457,`class-validator and class-transformer`),cf()(),Oa$1(458,`p`),DT(459,`The existing decorator-based workflow still works in v12. `),Oa$1(460,`code`),DT(461,`ValidationPipe`),cf(),DT(462,` and `),Oa$1(463,`code`),DT(464,`ClassSerializerInterceptor`),cf(),DT(465,` remain supported and are still a good fit for class-based DTO projects.`),cf(),Oa$1(466,`p`),DT(467,`Version 12 broadens the built-in options rather than replacing the existing ones:`),cf(),Oa$1(468,`ul`)(469,`li`),DT(470,`Use `),Oa$1(471,`code`),DT(472,`ValidationPipe`),cf(),DT(473,` when your DTOs are class-based and rely on decorators`),cf(),Oa$1(474,`li`),DT(475,`Use `),Oa$1(476,`code`),DT(477,`StandardSchemaValidationPipe`),cf(),DT(478,` when your validation library already exposes a Standard Schema-compatible schema`),cf(),Oa$1(479,`li`),DT(480,`Use `),Oa$1(481,`code`),DT(482,`ClassSerializerInterceptor`),cf(),DT(483,` when your response shaping is based on `),Oa$1(484,`code`),DT(485,`class-transformer`),cf()(),Oa$1(486,`li`),DT(487,`Use `),Oa$1(488,`code`),DT(489,`StandardSchemaSerializerInterceptor`),cf(),DT(490,` when your response shape should be derived from a schema`),cf()(),Oa$1(491,`h4`,31)(492,`span`),DT(493,`Config module`),cf()(),Oa$1(494,`p`)(495,`code`),DT(496,`@nestjs/config`),cf(),DT(497,` moves from Joi-specific validation to `),Oa$1(498,`a`,4),DT(499,`Standard Schema`),cf(),DT(500,`. The `),Oa$1(501,`code`),DT(502,`validationSchema`),cf(),DT(503,` option now accepts any Standard Schema-compatible schema, such as Zod, Valibot, or ArkType.`),cf(),Oa$1(504,`app-copy-button`)(505,`pre`)(506,`code`,22),DT(507,`
1696import { z } from 'zod';
1697
1698ConfigModule.forRoot({
1699  validationSchema: z.object({
1700    NODE_ENV: z
1701      .enum(['development', 'production', 'test', 'provision'])
1702      .default('development'),
1703    PORT: z.coerce.number().default(3000),
1704  }),
1705});
1706`),cf()()(),Oa$1(508,`p`),DT(509,`Because validation is no longer tied to a single library, we now recommend a modern Standard Schema library such as Zod for new projects, and the `),Oa$1(510,`a`,32),DT(511,`Configuration chapter`),cf(),DT(512,` has been rewritten around it.`),cf(),Oa$1(513,`p`),DT(514,`Your existing Joi schemas still work, with two caveats:`),cf(),Oa$1(515,`ul`)(516,`li`),DT(517,`You must upgrade to `),Oa$1(518,`strong`),DT(519,`Joi v18 or later`),cf(),DT(520,`, which implements the Standard Schema specification`),cf(),Oa$1(521,`li`),DT(522,`Library-specific settings previously passed directly under `),Oa$1(523,`code`),DT(524,`validationOptions`),cf(),DT(525,` now go under `),Oa$1(526,`code`),DT(527,`val
1706idationOptions.libraryOptions`),cf()()(),Oa$1(528,`app-copy-button`)(529,`pre`)(530,`code`,22),DT(531,`
1707// Before
1708validationOptions: {
1709  allowUnknown: false,
1710  abortEarly: true,
1711},
1712
1713// After
1714validationOptions: {
1715  libraryOptions: {
1716    allowUnknown: false,
1717    abortEarly: true,
1718  },
1719},
1720`),cf()()(),Oa$1(532,`p`),DT(533,`For Joi schemas, `),Oa$1(534,`code`),DT(535,`@nestjs/config`),cf(),DT(536,` keeps its historical defaults of `),Oa$1(537,`code`),DT(538,`allowUnknown: true`),cf(),DT(539,` and `),Oa$1(540,`code`),DT(541,`abortEarly: false`),cf(),DT(542,`, and merges anything you pass on top of them.`),cf(),Oa$1(543,`h4`,33)(544,`span`),DT(545,`Terminus module`),cf()(),Oa$1(546,`p`),DT(547,`The legacy health indicator API, deprecated in version 11, has been removed. If your custom health indicators still extend `),Oa$1(548,`code`),DT(549,`HealthIndicator`),cf(),DT(550,` or throw a `),Oa$1(551,`code`),DT(552,`HealthCheckError`),cf(),DT(553,`, migrate them to `),Oa$1(554,`code`),DT(555,`HealthIndicatorService`),cf(),DT(556,`.`),cf(),Oa$1(557,`p`)(558,`strong`),DT(559,`Previous Approach`),cf()(),Oa$1(560,`p`),DT(561,`Before version 12, a custom health indicator could report an unhealthy state by throwing a `),Oa$1(562,`code`),DT(563,`HealthCheckError`),cf(),DT(564,`:`),cf(),Oa$1(565,`app-copy-button`)(566,`pre`)(567,`code`,22),DT(568,`
1721@Injectable()
1722export class DogHealthIndicator extends HealthIndicator {
1723  constructor(private readonly dogService: DogService) {
1724    super();
1725  }
1726
1727  async isHealthy(key: string) {
1728    const badboys = await this.dogService.getBadboys();
1729    const isHealthy = badboys.length === 0;
1730    const result = this.getStatus(key, isHealthy, { badboys: badboys.length });
1731
1732    if (!isHealthy) {
1733      throw new HealthCheckError('Dog check failed', result);
1734    }
1735
1736    return result;
1737  }
1738}
1739`),cf()()(),Oa$1(569,`p`)(570,`strong`),DT(571,`Updated Approach (NestJS Terminus v12)`),cf()(),Oa$1(572,`p`),DT(573,`In version 12, the health indicator returns its result in both cases. Throwing is no longer a way to report an unhealthy state. The indicator either returns `),Oa$1(574,`code`),DT(575,`up()`),cf(),DT(576,` / `),Oa$1(577,`code`),DT(578,`down()`),cf(),DT(579,` explicitly, or hands the operation to `),Oa$1(580,`code`),DT(581,`attempt()`),cf(),DT(582,`, which marks the indicator as `),Oa$1(583,`code`),DT(584,`'down'`),cf(),DT(585,` when the operation throws:`),cf(),Oa$1(586,`app-copy-button`)(587,`pre`)(588,`code`,22),DT(589,`
1740@Injectable()
1741export class DogHealthIndicator {
1742  constructor(
1743    private readonly dogService: DogService,
1744    // Inject the \`HealthIndicatorService\` provided by the \`TerminusModule\`
1745    private readonly healthIndicatorService: HealthIndicatorService,
1746  ) {}
1747
1748  async isHealthy(key: string) {
1749    const indicator = this.healthIndicatorService.check(key);
1750    const badboys = await this.dogService.getBadboys();
1751
1752    if (badboys.length > 0) {
1753      // Mark the indicator as "down" and add additional info to the response
1754      return indicator.down({ badboys: badboys.length });
1755    }
1756
1757    // Mark the health indicator as "up"
1758    return indicator.up();
1759  }
1760}
1761`),cf()()(),Oa$1(590,`p`),DT(591,`If the indicator only needs to know whether an operation succeeded (e.g., that the dog service is reachable), `),Oa$1(592,`code`),DT(593,`attempt()`),cf(),DT(594,` is the shorter form:`),cf(),Oa$1(595,`app-copy-button`)(596,`pre`)(597,`code`,22),DT(598,`
1762isHealthy(key: string) {
1763  return this.healthIndicatorService
1764    .check(key)
1765    .attempt(() => this.dogService.ping())
1766    .withTimeout(1000);
1767}
1768`),cf()()(),Oa$1(599,`p`),DT(600,`The `),Oa$1(601,`code`),DT(602,`timeout`),cf(),DT(603,` option of the built-in database, microservice, and gRPC indicators (e.g., `),Oa$1(604,`code`),DT(605),cf(),DT(606,`) is deprecated. Chain `),Oa$1(607,`code`),DT(608,`.withTimeout(1500)`),cf(),DT(609,` on the returned attempt instead. See the `),Oa$1(610,`a`,34),DT(611,`Terminus chapter`),cf(),DT(612,` for details.`),cf(),Oa$1(613,`h4`,35)(614,`span`),DT(615,`Webpack deprecation in CLI workflows`),cf()(),Oa$1(616,`p`),DT(617,`The v12 release also marks the shift away from webpack-centric CLI workflows. Rspack is now the default bundler for monorepos, and the `),Oa$1(618,`code`),DT(619,`--webpack`),cf(),DT(620,` / `),Oa$1(621,`code`),DT(622,`--webpackPath`),cf(),DT(623,` CLI flags (and their `),Oa$1(624,`co
1768de`),DT(625,`webpack`),cf(),DT(626,` / `),Oa$1(627,`code`),DT(628,`webpackConfigPath`),cf(),DT(629,` counterparts in `),Oa$1(630,`code`),DT(631,`nest-cli.json`),cf(),DT(632,`) are deprecated in favor of `),Oa$1(633,`code`),DT(634,`--builder rspack`),cf(),DT(635,`. If your project generation or build setup relies on webpack, plan to migrate it over time.`),cf(),Oa$1(636,`p`),DT(637,`The CLI also adds `),Oa$1(638,`code`),DT(639,`bun`),cf(),DT(640,` as a supported package manager, and the `),Oa$1(641,`code`),DT(642,`decorator`),cf(),DT(643,` schematic now generates decorators in the `),Oa$1(644,`code`),DT(645,`Reflector.createDecorator()`),cf(),DT(646,` form. The `),Oa$1(647,`code`),DT(648,`angular`),cf(),DT(649,` schematic has been removed.`),cf(),Oa$1(650,`h4`,36)(651,`span`),DT(652,`New CLI commands and flags`),cf()(),Oa$1(653,`p`),DT(654,`The CLI gains a `),Oa$1(655,`code`),DT(656,`deploy`),cf(),DT(657,` command that forwards to `),Oa$1(658,`a`,37),DT(659,`Mau`),cf(),DT(660,`, installing `),Oa$1(661,`code`),DT(662,`@nestjs/mau`),cf(),DT(663,` as a dev dependency on first use:`),cf(),Oa$1(664,`pre`)(665,`code`,7),DT(666,`
1769$ nest deploy
1770`),cf()(),Oa$1(667,`p`)(668,`code`),DT(669,`nest build`),cf(),DT(670,` and `),Oa$1(671,`code`),DT(672,`nest start`),cf(),DT(673,` also pick up several new options:`),cf(),Oa$1(674,`ul`)(675,`li`)(676,`code`),DT(677,`--rspackPath [path]`),cf(),DT(678,`: path to a Rspack configuration file, the counterpart to the deprecated `),Oa$1(679,`code`),DT(680,`--webpackPath`),cf()(),Oa$1(681,`li`)(682,`code`),DT(683,`--emit-declarations`),cf(),DT(684,`: emit `),Oa$1(685,`code`),DT(686,`.d.ts`),cf(),DT(687,` files when using the SWC builder (also available as `),Oa$1(688,`code`),DT(689,`emitDeclarations`),cf(),DT(690,` in `),Oa$1(691,`code`),DT(692,`nest-cli.json`),cf(),DT(693,`)`),cf(),Oa$1(694,`li`)(695,`code`),DT(696,`--no-type-check`),cf(),DT(697,`: explicitly disable SWC type checking`),cf(),Oa$1(698,`li`)(699,`code`),DT(700,`--silent`),cf(),DT(701,`: suppress informational compiler logs`),cf()(),Oa$1(702,`p`)(703,`code`),DT(704,`nest build`),cf(),DT(705,` also supports `),Oa$1(706,`code`),DT(707,`--parallel [concurrency]`),cf(),DT(708,`, which builds monorepo projects in parallel when combined with `),Oa$1(709,`code`),DT(710,`--all`),cf(),DT(711,`. In addition, `),Oa$1(712,`code`),DT(713,`nest-cli.json`),cf(),DT(714,` gains an `),Oa$1(715,`code`),DT(716,`includeLibraryAssets`),cf(),DT(717,` property for copying library assets into an application build.`),cf(),Oa$1(718,`h4`,38)(719,`span`),DT(720,`Route conflict diagnostics`),cf()(),Oa$1(721,`p`),DT(722,`Nest registers routes in declaration order. On order-sensitive adapters such as Express, this means `),Oa$1(723,`code`),DT(724,`@Get(':id')`),cf(),DT(725,` can silently shadow a `),Oa$1(726,`code`),DT(727,`@Get('me')`),cf(),DT(728,` declared after it. v12 adds two `),Oa$1(729,`strong`),DT(730,`opt-in`),cf(),DT(731,` options to `),Oa$1(732,`code`),DT(733,`NestApplicationOptions`),cf(),DT(734,` to address this:`),cf(),Oa$1(735,`app-copy-button`)(736,`pre`)(737,`code`,22),DT(738,`
1771const app = await NestFactory.create(AppModule, {
1772  routeConflictPolicy: { duplicate: 'error', shadow: 'warn' },
1773  routeResolutionStrategy: 'specificity',
1774});
1775`),cf()()(),Oa$1(739,`p`),DT(740,`Both default to the previous behavior, so existing applications are unaffected unless you set them. See the `),Oa$1(741,`a`,39),DT(742,`Controllers chapter`),cf(),DT(743,` for the full description.`),cf(),Oa$1(744,`h4`,40)(745,`span`),DT(746,`Machine-readable error codes`),cf()(),Oa$1(747,`p`)(748,`code`),DT(749,`HttpExceptionOptions`),cf(),DT(750,` accepts a new `),Oa$1(751,`code`),DT(752,`errorCode`),cf(),DT(753,` property. It is serialized into the response body, so clients can branch on a stable identifier instead of parsing the message string:`),cf(),Oa$1(754,`app-copy-button`)(755,`pre`)(756,`code`,22),DT(757,`
1776throw new BadRequestException('Password is too weak', {
1777  errorCode: 'WEAK_PASSWORD',
1778});
1779`),cf()()(),Oa$1(758,`p`),DT(759,`See `),Oa$1(760,`a`,41),DT(761,`Machine-readable error codes`),cf(),DT(762,` in the Exception filters chapter.`),cf(),Oa$1(763,`h4`,42)(764,`span`),DT(765,`Structured logging params`),cf()(),Oa$1(766,`p`)(767,`code`),DT(768,`ConsoleLogger`),cf(),DT(769,` now treats plain objects passed after the message as structured params attached to the same log entry, instead of emitting them as separate records:`),cf(),Oa$1(770,`app-copy-button`)(771,`pre`)(772,`code`,22),DT(773,`
1780logger.log('User created', { userId: 1, email: '[email protected]' });
1781`),cf()()(),Oa$1(774,`p`),DT(775,`In JSON mode, they are nested under a `),Oa$1(776,`code`),DT(777,`params`),cf(),DT(778,` key, or spread into the root object if you enable `),Oa$1(779,`code`),DT(780,`flattenParams`),cf(),DT(781,`. This behavior is on by default in v12; set `),Oa$1(782,`code`),DT(783,`structuredParams: false`),cf(),DT(784,` to restore the previous behavior. See `),Oa$1(785,`a`,43),DT(786,`Structured logging params`),cf(),DT(787,` in the Logger chapter.`),cf(),Oa$1(788,`h4`,44)(789,`span`),DT(790,`Native observability support`),cf()(),Oa$1(791,`p`),DT(792,`Version 12 adds first-class observability support through the official `),Oa$1(793,`a`,45)(794,`code`),DT(795,`@nestjs/observe`),cf()(),DT(796,` SDK. Instead of attaching a generic Node.js APM agent to the HTTP server, the SDK plugs into Nest's own request lifecycle through the `),Oa$1(797,`code`),DT(798,`instrument`),cf(),DT(799,` application option. As a result, requests, jobs, errors, and traces are reported in terms of your controllers, providers, resolvers, and queue consumers.`),cf(),Oa$1(800,`app-copy-button`)(801,`pre`)(802,`code`,22),DT(803,`
1782// app.module.ts
1783import { Module } from '@nestjs/common';
1784import { createObserveModule } from '@nestjs/observe';
1785
1786export const { ObserveModule, ObserveInstrument } = createObserveModule();
1787
1788@Module({
1789  imports: [ObserveModule.forRoot({ serviceId: 'cats-app' })],
1790})
1791export class AppModule {}
1792`),cf()()(),Oa$1(804,`app-copy-button`)(805,`pre`)(806,`code`,22),DT(807,`
1793// main.ts
1794import { NestFactory } from '@nestjs/core';
1795import { AppModule, ObserveInstrument } from './app.module.js';
1796
1797const app = await NestFactory.create(AppModule, {
1798  instrument: ObserveInstrument,
1799});
1800`),cf()()(),Oa$1(808,`p`),DT(809,`There is nothing to migrate here: it is a new, opt-in capability. See the `),Oa$1(810,`a`,5),DT(811,`Observability chapter`),cf(),DT(812,` for what auto-instrumentation covers, and the `),Oa$1(813,`a`,46),DT(814,`SDK reference`),cf(),DT(815,` for configuration options.`),cf(),Oa$1(816,`h4`,47)(817,`span`),DT(818,`Other notable release changes`),cf()(),Oa$1(819,`p`),DT(820,`Depending on which Nest packages you use, you may also want to review the following changes:`),cf(),Oa$1(821,`ul`)(822,`li`)(823,`strong`),DT(824,`Pipe transform signatures`),cf(),DT(825,` have been refined for stronger type safety, and `),Oa$1(826,`code`),DT(827,`ArgumentMetadata`),cf(),DT(828,` now takes a generic parameter. Custom pipes with hand-written signatures may need their types adjusted.`),cf(),Oa$1(829,`li`)(830,`strong`)(831,`code`),DT(832,`ValidationPipe`),cf(),DT(833,` error format`),cf(),DT(834,`: the new `),Oa$1(835,`code`),DT(836,`errorFormat`),cf(),DT(837,` option (`),Oa$1(838,`code`),DT(839,`'list'`),cf(),DT(840,` or `),Oa$1(841,`code`),DT(842,`'grouped'`),cf(),DT(843,`) controls the shape of validation error responses.`),cf(),Oa$1(844,`li`)(845,`strong`),DT(846,`gRPC exception filter`),cf(),DT(847,`: `),Oa$1(848,`code`),DT(849,`GrpcExceptionFilter`),cf(),DT(850,`, plus a family of status-specific exceptions, maps errors to the proper gRPC status codes instead of `),Oa$1(851,`code`),DT(852,`UNKNOWN`),cf(),DT(853,`. See the `),Oa$1(854,`a`,48),DT(855,`gRPC chapter`),cf(),DT(856,`.`),cf(),Oa$1(857,`li`)(858,`strong`),DT(859,`Regex Kafka patterns`),cf(),DT(860,`: `),Oa$1(861,`code`),DT(862,`@MessagePattern()`),cf(),DT(863,` and `),Oa$1(864,`code`),DT(865,`@EventPattern()`),cf(),DT(866,` now accept a `),Oa$1(867,`code`),DT(868,`RegExp`),cf(),DT(869,` on the Kafka transport. See the `),Oa$1(870,`a`,49),DT(871,`Kafka chapter`),cf(),DT(872,`.`),cf(),Oa$1(873,`li`)(874,`strong`),DT(875,`Request-scoped WebSocket gateways`),cf(),DT(876,`: gateways now support request-scoped providers, with the socket injectable through the `),Oa$1(877,`code`),DT(878,`REQUEST`),cf(),DT(879,` token. See the `),Oa$1(880,`a`,50),DT(881,`Gateways chapter`),cf(),DT(882,`.`),cf(),Oa$1(883,`li`)(884,`strong`),DT(885,`WebSocket disconnect reason`),cf(),DT(886,`: `),Oa$1(887,`code`),DT(888,`handleDisconnect`),cf(),DT(889,` can now receive the reason for the disconnection.`),cf(),Oa$1(890,`li`)(891,`strong`),DT(892,`Microservices pre-request hook`),cf(),DT(893,`: a new hook runs before a message handler is invoked.`),cf(),Oa$1(894,`li`)(895,`strong`),DT(896,`Express graceful shutdown`),cf(),DT(897,`: the Express adapter now drains in-flight requests on shutdown.`),cf(),Oa$1(898,`li`)(899,`strong`),DT(900,`HTTP adapter error mapping`),cf(),DT(901,` has been reworked across the core, Express, and Fastify adapters.`),cf()(),Oa$1(902,`p`),DT(903,`If you depend on one of these areas, verify the corresponding behavior with your test suite after upgrading.`),cf(),Oa$1(904,`h4`,51)(905,`span`),DT(906,`Switching your project to ESM`),cf()(),Oa$1(907,`blockquote`,19)(908,`strong`),DT(909,`Optional`),cf(),DT(910,` This section and the next one are `),Oa$1(911,`strong`),DT(912,`not`),cf(),DT(913,` part of upgrading to v12, which is why they come last. A CommonJS application runs on v12 unchanged: `),Oa$1(914,`code`),DT(915,`nest upgrade`),cf(),DT(916,` doesn't touch your module format, and nothing in the framework requires you to switch. Read on only if you `),Oa$1(917,`em`),DT(918,`want`),cf(),DT(919,` to move your project to ESM, on whatever schedule suits you.
1801`),cf(),Oa$1(920,`p`),DT(921,`The switch itself happens in `),Oa$1(922,`code`),DT(923,`package.json`),cf(),DT(924,`, not in `),Oa$1(925,`code`),DT(926,`tsconfig.json`),cf(),DT(927,`. Add a `),Oa$1(928,`code`),DT(929,`type`),cf(),DT(930,` field set to `),Oa$1(931,`code`),DT(932,`module`),cf(),DT(933,`:`),cf(),Oa$1(934,`pre`)(935,`code`,52),DT(936,`
1802{
1803  "name": "my-app",
1804  "type": "module"
1805}
1806`),cf()(),Oa$1(937,`p`),DT(938,`That single field tells Node.js (and, through `),Oa$1(939,`code`),DT(940,`"module": "nodenext"`),cf(),DT(941,`, TypeScript) to treat your `),Oa$1(942,`code`),DT(943,`.js`),cf(),DT(944,` output as ESM.`),cf(),Oa$1(945,`p`),DT(946,`Whether you also need to change `),Oa$1(947,`code`),DT(948,`tsconfig.json`),cf(),DT(949,` depends on how old your project is:`),cf(),Oa$1(950,`ul`)(951,`li`)(952,`strong`),DT(953,`Projects generated 
1806with a recent v11 CLI`),cf(),DT(954,` (`),Oa$1(955,`code`),DT(956,`@nestjs/schematics`),cf(),DT(957,` 11.0.6 or later) already use `),Oa$1(958,`code`),DT(959,`"module": "nodenext"`),cf(),DT(960,` and `),Oa$1(961,`code`),DT(962,`"moduleResolution": "nodenext"`),cf(),DT(963,`. Nothing in `),Oa$1(964,`code`),DT(965,`tsconfig.json`),cf(),DT(966,` needs to change; adding `),Oa$1(967,`code`),DT(968,`"type": "module"`),cf(),DT(969,` is enough.`),cf(),Oa$1(970,`li`)(971,`strong`),DT(972,`Projects generated with earlier releases`),cf(),DT(973,` (v10, or early v11) typically still have `),Oa$1(974,`code`),DT(975,`"module": "commonjs"`),cf(),DT(976,` and no `),Oa$1(977,`code`),DT(978,`moduleResolution`),cf(),DT(979,` entry. Update both before adding `),Oa$1(980,`code`),DT(981,`"type": "module"`),cf(),DT(982,`:`),cf()(),Oa$1(983,`pre`)(984,`code`,52),DT(985,`
1807{
1808  "compilerOptions": {
1809    "module": "nodenext",
1810    "moduleResolution": "nodenext",
1811    "resolvePackageJsonExports": true,
1812    "target": "ES2023"
1813  }
1814}
1815`),cf()(),Oa$1(986,`p`),DT(987,`For reference, this is the complete `),Oa$1(988,`code`),DT(989,`compilerOptions`),cf(),DT(990,` set used by the ESM project that `),Oa$1(991,`code`),DT(992,`nest new`),cf(),DT(993,` generates:`),cf(),Oa$1(994,`pre`)(995,`code`,52),DT(996,`
1816{
1817  "compilerOptions": {
1818    "module": "nodenext",
1819    "moduleResolution": "nodenext",
1820    "resolvePackageJsonExports": true,
1821    "esModuleInterop": true,
1822    "isolatedModules": true,
1823    "declaration": true,
1824    "removeComments": true,
1825    "emitDecoratorMetadata": true,
1826    "experimentalDecorators": true,
1827    "allowSyntheticDefaultImports": true,
1828    "target": "ES2023",
1829    "sourceMap": true,
1830    "outDir": "./dist",
1831    "rootDir": ".",
1832    "incremental": true,
1833    "skipLibCheck": true,
1834    "strict": true,
1835    "strictPropertyInitialization": false,
1836    "types": ["vitest/globals", "node"]
1837  }
1838}
1839`),cf()(),Oa$1(997,`blockquote`,9)(998,`strong`),DT(999,`Hint`),cf(),Oa$1(1e3,`code`),DT(1001,`nest-cli.json`),cf(),DT(1002,` and `),Oa$1(1003,`code`),DT(1004,`tsconfig.build.json`),cf(),DT(1005,` are identical in the CommonJS and ESM project variants, so neither needs changes. The `),Oa$1(1006,`code`),DT(1007,`types`),cf(),DT(1008,` entry above differs only because ESM projects default to Vitest; a CommonJS project on Jest uses `),Oa$1(1009,`code`),DT(1010,`["node", "jest"]`),cf(),DT(1011,` instead.
1840`),cf(),Oa$1(1012,`blockquote`,19)(1013,`strong`),DT(1014,`Warning`),cf(),Oa$1(1015,`code`),DT(1016,`"module": "nodenext"`),cf(),DT(1017,` derives the module format of each file from the nearest `),Oa$1(1018,`code`),DT(1019,`package.json`),cf(),DT(1020,`. Adding `),Oa$1(1021,`code`),DT(1022,`"type": "module"`),cf(),DT(1023,` therefore changes how `),Oa$1(1024,`strong`),DT(1025,`every`),cf(),Oa$1(1026,`code`),DT(1027,`.ts`),cf(),DT(1028,` file in the project is emitted, and TypeScript starts reporting the missing import extensions described below. Expect to fix them in the same pass rather than incrementally.
1841`),cf(),Oa$1(1029,`h4`,53)(1030,`span`),DT(1031,`Moving your own code to ESM`),cf()(),Oa$1(1032,`p`),DT(1033,`With the configuration in place, the two things in your own code that most often need attention are relative imports and CommonJS-only globals.`),cf(),Oa$1(1034,`p`),DT(1035,`Relative imports must carry a file extension:`),cf(),Oa$1(1036,`app-copy-button`)(1037,`pre`)(1038,`code`,22),DT(1039,`
1842// Before
1843import { AppModule } from './app.module';
1844
1845// After
1846import { AppModule } from './app.module.js';
1847`),cf()()(),Oa$1(1040,`p`),DT(1041,`The extension is `),Oa$1(1042,`code`),DT(1043,`.js`),cf(),DT(1044,` even though the source file is `),Oa$1(1045,`code`),DT(1046,`.ts`),cf(),DT(1047,`, because the specifier refers to the emitted file.`),cf(),Oa$1(1048,`p`)(1049,`code`),DT(1050,`__dirname`),cf(),DT(1051,` and `),Oa$1(1052,`code`),DT(1053,`__filename`),cf(),DT(1054,` do not exist in ESM. Use `),Oa$1(1055,`code`),DT(1056,`import.meta.dirname`),cf(),DT(1057,` instead (or `),Oa$1(1058,`code`),DT(1059,`import.meta.url`),cf(),DT(1060,` with `),Oa$1(1061,`code`),DT(1062,`fileURLToPath`),cf(),DT(1063,` on older Node.js versions):`),cf(),Oa$1(1064,`app-copy-button`)(1065,`pre`)(1066,`code`,22),DT(1067,`
1848// Before
1849protoPath: join(__dirname, 'hero/hero.proto'),
1850
1851// After
1852protoPath: join(import.meta.dirname, 'hero/hero.proto'),
1853`),cf()()(),Oa$1(1068,`p`),DT(1069,`Similarly, `),Oa$1(1070,`code`),DT(1071,`require()`),cf(),DT(1072,` is unavailable. If you need it for interop, create it explicitly with `),Oa$1(1073,`code`),DT(1074,`createRequire(import.meta.url)`),cf(),DT(1075,` from `),Oa$1(1076,`code`),DT(1077,`node:module`),cf(),DT(1078,`.`),cf(),Oa$1(1079,`blockquote`,9)(1080,`strong`),DT(1081,`Hint`),cf(),DT(1082,` Many code samples throughout these docs use the ESM conventions above. If your project is still CommonJS, drop the `),Oa$1(1083,`code`),DT(1084,`.js`),cf(),DT(1085,` extensions, keep `),Oa$1(1086,`code`),DT(1087,`__dirname`),cf(),DT(1088,`, and call `),Oa$1(1089,`code`),DT(1090,`bootstrap()`),cf
1853(),DT(1091,` without `),Oa$1(1092,`code`),DT(1093,`await`),cf(),DT(1094,`.
1854`),cf()(),Oa$1(1095,`a`,54),Za$1(1096,`i`,55),Oa$1(1097,`span`),DT(1098,`Edit on GitHub`),cf()()()),a&2&&(UC(605),Wy(`db.pingCheck('database', `,`{`,` timeout: 1500 `,`}`,`)`))},dependencies:[xt,tn$1,tu],encapsulation:2})}return o})();var ta=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-modules`]],features:[My],decls:492,vars:44,consts:[[`contentReference`,``],[`app7d4f7b92cc88b89307d07519ce04387b1d629baa`,``],[`app27dfdc9a89fff776349852015a66d54faf73b2f5`,``],[`app11c0fb9b5fd81af26ab3051730b0eb974839f7c4`,``],[`app5e36e71e3eb4051258ba2242406e288932f0736c`,``],[`app668ff84f7ace308fb4d2589737f59ddc5461a0ae`,``],[`app23de71e75df46c8bcb8f9b5f8b33078aff883ef7`,``],[`app15971bdbc3d41e4bdbf4b83426c3353f52c0dfdb`,``],[`appcc6dabb6095629a21b748877b10092fa85e4ae1e`,``],[1,`content`],[1,`content-inner`],[`id`,`modules`],[`src`,`/assets/Modules_1.png`,1,`illustrative-image`],[`appAnchor`,``,`id`,`feature-modules`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/SOLID`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[1,`info`],[1,`file-tree`],[1,`item`],[1,`children`],[`appAnchor`,``,`id`,`shared-modules`],[`src`,`/assets/Shared_Module_1.png`,1,`illustrative-image`],[`appAnchor`,``,`id`,`module-re-exporting`],[`appAnchor`,``,`id`,`dependency-injection`],[`routerLink`,`/fundamentals/circular-dependency`],[`appAnchor`,``,`id`,`global-modules`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev`],[`appAnchor`,``,`id`,`dynamic-modules`],[`href`,`/fundamentals/custom-providers#non-class-based-provider-tokens`],[1,`warning`],[`routerLink`,`/fundamentals/dynamic-modules`],[`href`,`/fundamentals/dynamic-modules#configurable-module-builder`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/modules.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,9,0)(2,`div`,10)(3,`h3`,11),DT(4,`Modules`),cf(),Oa$1(5,`p`),DT(6,`A module is a class annotated with the `),Oa$1(7,`code`),DT(8,`@Module()`),cf(),DT(9,` decorator. The decorator provides metadata that `),Oa$1(10,`strong`),DT(11,`Nest`),cf(),DT(12,` uses to organize and manage the application structure.`),cf(),Oa$1(13,`figure`),Za$1(14,`img`,12),cf(),Oa$1(15,`p`),DT(16,`Every Nest application has at least one module, the `),Oa$1(17,`strong`),DT(18,`root module`),cf(),DT(19,`. It is the starting point from which Nest builds the `),Oa$1(20,`strong`),DT(21,`application graph`),cf(),DT(22,`, the internal structure Nest uses to resolve relationships and dependencies between modules and providers. A very small application may have only a root module, but most applications have multiple modules, each encapsulating a closely related set of `),Oa$1(23,`strong`),DT(24,`capabilities`),cf(),DT(25,`. Modules are the `),Oa$1(26,`strong`),DT(27,`recommended`),cf(),DT(28,` way to organize your components.`),cf(),Oa$1(29,`p`),DT(30,`The `),Oa$1(31,`code`),DT(32,`@Module()`),cf(),DT(33,` decorator takes a single object with properties that describe the module:`),cf(),Oa$1(34,`table`),Za$1(35,`thead`),Oa$1(36,`tbody`)(37,`tr`)(38,`td`)(39,`code`),DT(40,`providers`),cf()(),Oa$1(41,`td`),DT(42,`the providers that will be instantiated by the Nest injector and that may be shared at least across this module`),cf()(),Oa$1(43,`tr`)(44,`td`)(45,`code`),DT(46,`controllers`),cf()(),Oa$1(47,`td`),DT(48,`the set of controllers defined in this module that must be instantiated`),cf()(),Oa$1(49,`tr`)(50,`td`)(51,`code`),DT(52,`imports`),cf()(),Oa$1(53,`td`),DT(54,`the list of imported modules that export the providers required in this module`),cf()(),Oa$1(55,`tr`)(56,`td`)(57,`code`),DT(58,`exports`),cf()(),Oa$1(59,`td`),DT(60,`the subset of `),Oa$1(61,`code`),DT(62,`providers`),cf(),DT(63,` that this module provides and that should be available to other modules importing it. You can use either the provider itself or its token (the `),Oa$1(64,`code`),DT(65,`provide`),cf(),DT(66,` value)`),cf()()()(),Oa$1(67,`p`),DT(68,`A module `),Oa$1(69,`strong`),DT(70,`encapsulates`),cf
vendor: 4,893 bytes, lines 1854-1884
1854(),DT(71,` its providers by default: you can inject only providers that are part of the current module or that are explicitly exported by an imported module. A module's exported providers form its public interface, or API.`),cf(),Oa$1(72,`h4`,13)(73,`span`),DT(74,`Feature modules`),cf()(),Oa$1(75,`p`),DT(76,`In our example, `),Oa$1(77,`code`),DT(78,`CatsController`),cf(),DT(79,` and `),Oa$1(80,`code`),DT(81,`CatsService`),cf(),DT(82,` are closely related and serve the same application domain, so it makes sense to group them into a feature module. A feature module organizes the code for a specific feature, which keeps boundaries clear. This becomes more important as the application or team grows, and it aligns with the `),Oa$1(83,`a`,14),DT(84,`SOLID`),cf(),DT(85,` principles.`),cf(),Oa$1(86,`p`),DT(87,`Next, we'll create a `),Oa$1(88,`code`),DT(89,`CatsModule`),cf(),DT(90,` that groups the controller and the service:`),cf(),Oa$1(91,`app-copy-button`,15)(92,`span`,16),DT(93),AT(94,`extension`),Za$1(95,`app-tabs`,null,1),cf(),Oa$1(97,`pre`)(98,`code`,17),DT(99,`
1855import { Module } from '@nestjs/common';
1856import { CatsController } from './cats.controller.js';
1857import { CatsService } from './cats.service.js';
1858
1859@Module({
1860  controllers: [CatsController],
1861  providers: [CatsService],
1862})
1863export class CatsModule {}
1864`),cf()()(),Oa$1(100,`blockquote`,18)(101,`strong`),DT(102,`Hint`),cf(),DT(103,` To create a module with the CLI, run `),Oa$1(104,`code`),DT(105,`$ nest g module cats`),cf(),DT(106,`.
1865`),cf(),Oa$1(107,`p`),DT(108,`Above, we defined `),Oa$1(109,`code`),DT(110,`CatsModule`),cf(),DT(111,` in the `),Oa$1(112,`code`),DT(113,`cats.module.ts`),cf(),DT(114,` file and moved everything related to it into the `),Oa$1(115,`code`),DT(116,`cats`),cf(),DT(117,` directory. The last step is to import this module into the root module (`),Oa$1(118,`code`),DT(119,`AppModule`),cf(),DT(120,`, defined in the `),Oa$1(121,`code`),DT(122,`app.module.ts`),cf(),DT(123,` file):`),cf(),Oa$1(124,`app-copy-button`,15)(125,`span`,16),DT(126),AT(127,`extension`),Za$1(128,`app-tabs`,null,2),cf(),Oa$1(130,`pre`)(131,`code`,17),DT(132,`
1866import { Module } from '@nestjs/common';
1867import { CatsModule } from './cats/cats.module.js';
1868
1869@Module({
1870  imports: [CatsModule],
1871})
1872export class AppModule {}
1873`),cf()()(),Oa$1(133,`p`),DT(134,`The directory structure now looks like this:`),cf(),Oa$1(135,`div`,19)(136,`div`,20),DT(137,`src`),cf(),Oa$1(138,`div`,21)(139,`div`,20),DT(140,`cats`),cf(),Oa$1(141,`div`,21)(142,`div`,20),DT(143,`dto`),cf(),Oa$1(144,`div`,21)(145,`div`,20),DT(146,`create-cat.dto.ts`),cf()(),Oa$1(147,`div`,20),DT(148,`interfaces`),cf(),Oa$1(149,`div`,21)(150,`div`,20),DT(151,`cat.interface.ts`),cf()(),Oa$1(152,`div`,20),DT(153,`cats.controller.ts`),cf(),Oa$1(154,`div`,20),DT(155,`cats.module.ts`),cf(),Oa$1(156,`div`,20),DT(157,`cats.service.ts`),cf()(),Oa$1(158,`div`,20),DT(159,`app.module.ts`),cf(),Oa$1(160,`div`,20),DT(161,`main.ts`),cf()()(),Oa$1(162,`h4`,22)(163,`span`),DT(164,`Shared modules`),cf()(),Oa$1(165,`p`),DT(166,`In Nest, modules are `),Oa$1(167,`strong`),DT(168,`singletons`),cf(),DT(169,` by default, so you can share the same instance of any provider between multiple modules.`),cf(),Oa$1(170,`figure`),Za$1(171,`img`,23),cf(),Oa$1(172,`p`),DT(173,`Every module is automatically a `),Oa$1(174,`strong`),DT(175,`shared module`),cf(),DT(176,`: once created, it can be reused by any other module. Suppose you want to share an instance of `),Oa$1(177,`code`),DT(178,`CatsService`),cf(),DT(179,` between several other modules. To do so, first `),Oa$1(180,`strong`),DT(181,`export`),cf(),DT(182,` the `),Oa$1(183,`code`),DT(184,`CatsService`),cf(),DT(185,` provider by adding it to the module's `),Oa$1(186,`code`),DT(187,`exports`),cf(),DT(188,` array:`),cf(),Oa$1(189,`app-copy-button`,15)(190,`span`,16),DT(191),AT(192,`extension`),Za$1(193,`app-tabs`,null,3),cf(),Oa$1(195,`pre`)(196,`code`,17),DT(197,`
1874import { Module } from '@nestjs/common';
1875import { CatsController } from './cats.controller.js';
1876import { CatsService } from './cats.service.js';
1877
1878@Module({
1879  controllers: [CatsController],
1880  providers: [CatsService],
1881  exports: [CatsService],
1882})
1883export class CatsModule {}
1884`),cf()()(),Oa$1(198,`p`),DT(199,`Any module that imports `),Oa$1(200,`code`),DT(201,`CatsModule`),cf(),DT(202,` now has access to `),Oa$1(203,`code`),DT(204,`CatsService`),cf(),DT(205,` and shares the same instance with every other module that imports it.`),cf(),Oa$1(206,`p`),DT(207,`Registering `),Oa$1(208,`code`),DT(209,`CatsService`),cf(),DT(210,` directly in every module that needs it would also work, but each module would then get its own separate instance of the service. Multiple instances increase memory usage and can cause unexpected behavior, such as inconsistent state if the service holds internal state.`),cf(),Oa$1(211,`p`),DT(212,`Encapsulating `),Oa$1(213,`
1884code`),DT(214,`CatsService`),cf(),DT(215,` in a module such as `),Oa$1(216,`code`),DT(217,`CatsModule`),cf(),DT(218,` and exporting it ensures that every module importing `),Oa$1(219,`code`),DT(220,`CatsModule`),cf(),DT(221,` reuses the same instance. This reduces memory consumption and makes behavior more predictable, because shared state and resources are managed in one place. Sharing services efficiently across the application is one of the key benefits of modularity and dependency injection.`),cf(),Oa$1(222,`p`),Za$1(223,`app-banner-devtools`),cf(),Oa$1(224,`h4`,24)(225,`span`),DT(226,`Module re-exporting`),cf()(),Oa$1(227,`p`),DT(228,`As shown above, modules can export their internal providers. They can also re-export modules that they import. In the example below, `),Oa$1(229,`code`),DT(230,`CommonModule`),cf(),DT(231,` is both imported into `),Oa$1(232,`strong`),DT(233,`and`),cf(),DT(234,` exported from `),Oa$1(235,`code`),DT(236,`CoreModule`),cf(),DT(237,`, which makes it available to any module that imports `),Oa$1(238,`code`),DT(239,`CoreModule`),cf(),DT(240,`.`),cf(),Oa$1(241,`app-copy-button`)(242,`pre`)(243,`code`,17),DT(244,`
1885@Module({
1886  imports: [CommonModule],
1887  exports: [CommonModule],
1888})
1889export class CoreModule {}
1890`),cf()()(),Oa$1(245,`h4`,25)(246,`span`),DT(247,`Dependency injection`),cf()(),Oa$1(248,`p`),DT(249,`A module class can also `),Oa$1(250,`strong`),DT(251,`inject`),cf(),DT(252,` providers (e.g., for configuration purposes):`),cf(),Oa$1(253,`app-copy-button`,15)(254,`span`,16),DT(255),AT(256,`extension`),Za$1(257,`app-tabs`,null,4),cf(),Oa$1(259,`pre`)(260,`code`,17),DT(261,`
1891import { Module } from '@nestjs/common';
1892import { CatsController } from './cats.controller.js';
1893import { CatsService } from './cats.service.js';
1894
1895@Module({
1896  controllers: [CatsController],
1897  providers: [CatsService],
1898})
1899export class CatsModule {
1900  constructor(private catsService: CatsService) {}
1901}
1902`),cf()(),Oa$1(262,`pre`)(263,`code`,17),DT(264,`
1903import { Module, Dependencies } from '@nestjs/common';
1904import { CatsController } from './cats.controller.js';
1905import { CatsService } from './cats.service.js';
1906
1907@Module({
1908  controllers: [CatsController],
1909  providers: [CatsService],
1910})
1911@Dependencies(CatsService)
1912export class CatsModule {
1913  constructor(catsService) {
1914    this.catsService = catsService;
1915  }
1916}
1917`),cf()()(),Oa$1(265,`p`),DT(266,`However, module classes themselves cannot be injected as providers due to `),Oa$1(267,`a`,26),DT(268,`circular dependencies`),cf(),DT(269,`.`),cf(),Oa$1(270,`h4`,27)(271,`span`),DT(272,`Global modules`),cf()(),Oa$1(273,`p`),DT(274,`Importing the same set of modules everywhere can become tedious. In `),Oa$1(275,`a`,28),DT(276,`Angular`),cf(),DT(277,`, `),Oa$1(278,`code`),DT(279,`providers`),cf(),DT(280,` are registered in the global scope and, once defined, are available everywhere. Nest, by contrast, encapsulates providers inside the module scope: you can't use a module's providers elsewhere without first importing the module that encapsulates them.`),cf(),Oa$1(281,`p`),DT(282,`To make a set of providers available everywhere out of the box (e.g., helpers or database connections), make the module `),Oa$1(283,`strong`),DT(284,`global`),cf(),DT(285,` with the `),Oa$1(286,`code`),DT(287,`@Global()`),cf(),DT(288,` decorator:`),cf(),Oa$1(289,`app-copy-button`)(290,`pre`)(291,`code`,17),DT(292,`
1918import { Module, Global } from '@nestjs/common';
1919import { CatsController } from './cats.controller.js';
1920import { CatsService } from './cats.service.js';
1921
1922@Global()
1923@Module({
1924  controllers: [CatsController],
1925  providers: [CatsService],
1926  exports: [CatsService],
1927})
1928export class CatsModule {}
1929`),cf()()(),Oa$1(293,`p`),DT(294,`The `),Oa$1(295,`code`),DT(296,`@Global()`),cf(),DT(297,` decorator makes the module global-scoped. Register global modules `),Oa$1(298,`strong`),DT(299,`only once`),cf(),DT(300,`, typically in the root or core module. In the example above, the `),Oa$1(301,`code`),DT(302,`CatsService`),cf(),DT(303,` provider is available everywhere, and modules that inject it don't need to add `),Oa$1(304,`code`),DT(305,`CatsModule`),cf(),DT(306,` to their `),Oa$1(307,`code`),DT(308,`imports`),cf(),DT(309,` array.`),cf(),Oa$1(310,`blockquote`,18)(311,`strong`),DT(312,`Hint`),cf(),DT(313,` Making everything global is not a recommended design practice. Global modules reduce boilerplate, but the `),Oa$1(314,`code`),DT(315,`imports`),cf(),DT(316,` array makes a module's API available to other modules in a controlled, explicit way. This keeps the application structure maintainable, shares only the parts of a module that others need, and avoids unnecessary coupling between unrelated parts of the application.
1930`),cf(),Oa$1(317,`h4`,29)(318,`span`),DT(319,`Dynamic modules`),cf
vendor: 4,388 bytes, lines 1930-2007
1930()(),Oa$1(320,`p`),DT(321,`Dynamic modules let you create modules that are configured at runtime. They are useful when a module's providers depend on options supplied by the module that imports it. For example, the following `),Oa$1(322,`code`),DT(323,`FeatureFlagsModule`),cf(),DT(324,` receives the application's feature flags through its static `),Oa$1(325,`code`),DT(326,`forRoot()`),cf(),DT(327,` method:`),cf(),Oa$1(328,`app-copy-button`,15)(329,`span`,16),DT(330),AT(331,`extension`),Za$1(332,`app-tabs`,null,5),cf(),Oa$1(334,`pre`)(335,`code`,17),DT(336,`
1931import { DynamicModule, Module } from '@nestjs/common';
1932import { FEATURE_FLAGS } from './feature-flags.constants.js';
1933import { FeatureFlagsService } from './feature-flags.service.js';
1934
1935@Module({
1936  providers: [FeatureFlagsService],
1937  exports: [FeatureFlagsService],
1938})
1939export class FeatureFlagsModule {
1940  static forRoot(flags: Record<string, boolean>): DynamicModule {
1941    return {
1942      module: FeatureFlagsModule,
1943      providers: [{ provide: FEATURE_FLAGS, useValue: flags }],
1944    };
1945  }
1946}
1947`),cf()(),Oa$1(337,`pre`)(338,`code`,17),DT(339,`
1948import { Module } from '@nestjs/common';
1949import { FEATURE_FLAGS } from './feature-flags.constants.js';
1950import { FeatureFlagsService } from './feature-flags.service.js';
1951
1952@Module({
1953  providers: [FeatureFlagsService],
1954  exports: [FeatureFlagsService],
1955})
1956export class FeatureFlagsModule {
1957  static forRoot(flags) {
1958    return {
1959      module: FeatureFlagsModule,
1960      providers: [{ provide: FEATURE_FLAGS, useValue: flags }],
1961    };
1962  }
1963}
1964`),cf()()(),Oa$1(340,`p`),DT(341,`The `),Oa$1(342,`code`),DT(343,`FEATURE_FLAGS`),cf(),DT(344,` injection token is a plain constant (`),Oa$1(345,`code`),DT(346,`export const FEATURE_FLAGS = 'FEATURE_FLAGS';`),cf(),DT(347,`), as described in `),Oa$1(348,`a`,30),DT(349,`Non-class-based provider tokens`),cf(),DT(350,`.`),cf(),Oa$1(351,`blockquote`,18)(352,`strong`),DT(353,`Hint`),cf(),DT(354,` The `),Oa$1(355,`code`),DT(356,`forRoot()`),cf(),DT(357,` method may return a dynamic module either synchronously or asynchronously (i.e., via a `),Oa$1(358,`code`),DT(359,`Promise`),cf(),DT(360,`).
1965`),cf(),Oa$1(361,`p`),DT(362,`The properties returned by `),Oa$1(363,`code`),DT(364,`forRoot()`),cf(),Oa$1(365,`strong`),DT(366,`extend`),cf(),DT(367,` (rather than override) the metadata defined in the `),Oa$1(368,`code`),DT(369,`@Module()`),cf(),DT(370,` decorator. The resulting module therefore has both the statically declared `),Oa$1(371,`code`),DT(372,`FeatureFlagsService`),cf(),DT(373,` and the dynamically registered `),Oa$1(374,`code`),DT(375,`FEATURE_FLAGS`),cf(),DT(376,` provider. Because they belong to the same module, the service can inject the flags:`),cf(),Oa$1(377,`app-copy-button`,15)(378,`span`,16),DT(379),AT(380,`extension`),Za$1(381,`app-tabs`,null,6),cf(),Oa$1(383,`pre`)(384,`code`,17),DT(385,`
1966import { Inject, Injectable } from '@nestjs/common';
1967import { FEATURE_FLAGS } from './feature-flags.constants.js';
1968
1969@Injectable()
1970export class FeatureFlagsService {
1971  constructor(
1972    @Inject(FEATURE_FLAGS) private readonly flags: Record<string, boolean>,
1973  ) {}
1974
1975  isEnabled(flag: string): boolean {
1976    return this.flags[flag] ?? false;
1977  }
1978}
1979`),cf()(),Oa$1(386,`pre`)(387,`code`,17),DT(388,`
1980import { Dependencies, Injectable } from '@nestjs/common';
1981import { FEATURE_FLAGS } from './feature-flags.constants.js';
1982
1983@Injectable()
1984@Dependencies(FEATURE_FLAGS)
1985export class FeatureFlagsService {
1986  constructor(flags) {
1987    this.flags = flags;
1988  }
1989
1990  isEnabled(flag) {
1991    return this.flags[flag] ?? false;
1992  }
1993}
1994`),cf()()(),Oa$1(389,`p`),DT(390,`The module exports only `),Oa$1(391,`code`),DT(392,`FeatureFlagsService`),cf(),DT(393,`, so the flags themselves stay an implementation detail of the module.`),cf(),Oa$1(394,`p`),DT(395,`Import and configure the `),Oa$1(396,`code`),DT(397,`FeatureFlagsModule`),cf(),DT(398,` as follows:`),cf(),Oa$1(399,`app-copy-button`,15)(400,`span`,16),DT(401),AT(402,`extension`),Za$1(403,`app-tabs`,null,7),cf(),Oa$1(405,`pre`)(406,`code`,17),DT(407,`
1995import { Module } from '@nestjs/common';
1996import { FeatureFlagsModule } from './feature-flags/feature-flags.module.js';
1997
1998@Module({
1999  imports: [
2000    FeatureFlagsModule.forRoot({
2001      newCheckout: true,
2002      betaDashboard: false,
2003    }),
2004  ],
2005})
2006export class AppModule {}
2007`),cf()()(),Oa$1(408,`p`),DT(409,`Only the module that imports `),Oa$1(4
200710,`code`),DT(411,`FeatureFlagsModule.forRoot()`),cf(),DT(412,` can inject `),Oa$1(413,`code`),DT(414,`FeatureFlagsService`),cf(),DT(415,`. Calling `),Oa$1(416,`code`),DT(417,`forRoot()`),cf(),DT(418,` again in another module would create a second, separately configured instance. To share a single instance, configure the module once and re-export it. To re-export a dynamic module, list the module class in the `),Oa$1(419,`code`),DT(420,`exports`),cf(),DT(421,` array, without calling `),Oa$1(422,`code`),DT(423,`forRoot()`),cf(),DT(424,` again:`),cf(),Oa$1(425,`app-copy-button`,15)(426,`span`,16),DT(427),AT(428,`extension`),Za$1(429,`app-tabs`,null,8),cf(),Oa$1(431,`pre`)(432,`code`,17),DT(433,`
2008import { Module } from '@nestjs/common';
2009import { FeatureFlagsModule } from '../feature-flags/feature-flags.module.js';
2010
2011@Module({
2012  imports: [
2013    FeatureFlagsModule.forRoot({
2014      newCheckout: true,
2015      betaDashboard: false,
2016    }),
2017  ],
2018  exports: [FeatureFlagsModule],
2019})
2020export class CoreModule {}
2021`),cf()()(),Oa$1(434,`p`),DT(435,`Every module that imports `),Oa$1(436,`code`),DT(437,`CoreModule`),cf(),DT(438,` can now inject `),Oa$1(439,`code`),DT(440,`FeatureFlagsService`),cf(),DT(441,`, and all of them share the same flags.`),cf(),Oa$1(442,`p`),DT(443,`Alternatively, to register a dynamic module in the global scope, set the `),Oa$1(444,`code`),DT(445,`global`),cf(),DT(446,` property to `),Oa$1(447,`code`),DT(448,`true`),cf(),DT(449,` in the object returned by `),Oa$1(450,`code`),DT(451,`forRoot()`),cf(),DT(452,`. `),Oa$1(453,`code`),DT(454,`FeatureFlagsService`),cf(),DT(455,` then becomes injectable everywhere, without importing any module:`),cf(),Oa$1(456,`app-copy-button`)(457,`pre`)(458,`code`,17),DT(459,`
2022return {
2023  global: true,
2024  module: FeatureFlagsModule,
2025  providers: [{ provide: FEATURE_FLAGS, useValue: flags }],
2026};
2027`),cf()()(),Oa$1(460,`blockquote`,31)(461,`strong`),DT(462,`Warning`),cf(),DT(463,` As mentioned above, making everything global `),Oa$1(464,`strong`),DT(465,`is not a good design decision`),cf(),DT(466,`.
2028`),cf(),Oa$1(467,`p`),DT(468,`Options known only at runtime, such as values read by `),Oa$1(469,`code`),DT(470,`ConfigService`),cf(),DT(471,`, call for an asynchronous variant of `),Oa$1(472,`code`),DT(473,`forRoot()`),cf(),DT(474,`. The `),Oa$1(475,`a`,32),DT(476,`Dynamic modules`),cf(),DT(477,` chapter covers this and more.`),cf(),Oa$1(478,`blockquote`,18)(479,`strong`),DT(480,`Hint`),cf(),DT(481,` To learn how to build highly customizable dynamic modules with `),Oa$1(482,`code`),DT(483,`ConfigurableModuleBuilder`),cf(),DT(484,`, see the `),Oa$1(485,`a`,33),DT(486,`Configurable module builder`),cf(),DT(487,` section.
2029`),cf()(),Oa$1(488,`a`,34),Za$1(489,`i`,35),Oa$1(490,`span`),DT(491,`Edit on GitHub`),cf()()()),a&2){let l=QS(96),d=QS(129),m=QS(194),h=QS(258),u=QS(333),b=QS(382),S=QS(404),k=QS(430);UC(93),hf(` `,OT(94,20,`cats/cats.module`,l.isJsActive),`
2030`),UC(33),hf(` `,OT(127,23,`app.module`,d.isJsActive),`
2031`),UC(65),hf(` `,OT(192,26,`cats.module`,m.isJsActive),`
2032`),UC(64),hf(` `,OT(256,29,`cats.module`,h.isJsActive),`
2033`),UC(4),By(`hide`,h.isJsActive),UC(3),By(`hide`,!h.isJsActive),UC(68),hf(` `,OT(331,32,`feature-flags.module`,u.isJsActive),`
2034`),UC(4),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(42),hf(` `,OT(380,35,`feature-flags.service`,b.isJsActive),`
2035`),UC(4),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive),UC(15),hf(` `,OT(402,38,`app.module`,S.isJsActive),`
2036`),UC(26),hf(` `,OT(428,41,`core.module`,k.isJsActive),`
2037`)}},dependencies:[xt,tn$1,u,s,tu,g],encapsulation:2})}return o})();var na=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-pipes`]],features:[My],decls:958,vars:72,consts:[[`contentReference`,``],[`app77fac9372851a3f2c81335cc8b7975fdd8d15a30`,``],[`app0f26de212e2ac43ba0bea7fe98973a34a0b16b72`,``],[`appb6a59c84004558e7a32ecab3c5e5765c4959e8e1`,``],[`app37217e71cfc7b4c306ee920bd22f436fdc0d09b7`,``],[`app1fd065a7aa52e6638b9b9791c28551ee57aec3c6`,``],[`app05e3900cb30634748b6b11f161fa64cc23d7031b`,``],[`appb17a89be6b802e725820308ab5a1bd500a85d34d`,``],[`app0770f8e5f00f76be5820f317f05ff08be0a47979`,``],[`appc8929a3f5841a2b5de00e32f853bd9b28a366096`,``],[`app6bdc5842e7aebbec1f850dfd46858c99c213f514`,``],[`appa7d905bbda65458adc3238e539460ebfd70a142d`,``],[`appd689e4500f10064e6bfd22f62ef3128eaf8b7745`,``],[`appe98f5742ee0101965b3cf6b28e460c531903072a`,``],[`app81e1e43187a61c542174dc439de10967a596feb5`,``],[`app672f366107b34d7190ad7d8be8606c6e16d9b123`,``],[1,`content`],[1,`content-inner`],[`id`,`pipes`],[`src`,`/assets/Pipe_1.png`,1,`illustrative-image`],[`href`,`controllers#route-parameters`],[1,`info`],[`routerLink`,`/exception-filters`],[`appAnchor`,``,`id`,`built-in-pipes`],[`appAnchor`,``,`id`,`binding-pipes`],[1,`language-typescript`],[1,`language-bash`],[1,`language-json`],[1,`with-heading`],[1,`filename`],[`routerLink`,`/application/validation`],[`appAnchor`,``,`id`,`custom-pipes`],[`routerLink`,`/custom-decorators`],[1,`warning`],[`appAnchor`,``,`id`,`schema-based-validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`href`,`/application/validation#schema-based-validation`],[`appAnchor`,``,`id`,`object-schema-validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Don%27t_repeat_yourself`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://zod.dev/`],[`appAnchor`,``,`id`,`binding-validation-pipes`],[`appAnchor`,``,`id`,`class-validator`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator#usage`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-transformer`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator#custom-validation-classes`],[`appAnchor`,``,`id`,`global-scoped-pipes`],[`routerLink`,`/faq/hybrid-application`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`the-built-in-validationpipe`],[`appAnchor`,``,`id`,`transformation-use-case`],[`appAnchor`,``,`id`,`providing-defaults`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/pipes.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Oa$1(0,`div`,16,0)(2,`div`,17)(3,`h3`,18),DT(4,`Pipes`),cf(),Oa$1(5,`p`),DT(6,`A pipe is a class annotated with the `),Oa$1(7,`code`),DT(8,`@Injectable()`),cf(),DT(9,` decorator that implements the `),Oa$1(10,`code`),DT(11,`PipeTransform`),cf(),DT(12,` interface.`),cf(),Oa$1(13,`figure`),Za$1(14,`img`,19),cf(),Oa$1(15,`p`),DT(16,`Pipes have tw
2037o typical use cases:`),cf(),Oa$1(17,`ul`)(18,`li`)(19,`strong`),DT(20,`transformation`),cf(),DT(21,`: transform input data to the desired form (e.g., from string to integer)`),cf(),Oa$1(22,`li`)(23,`strong`),DT(24,`validation`),cf(),DT(25,`: evaluate input data and, if valid, pass it through unchanged; otherwise, throw an exception`),cf()(),Oa$1(26,`p`),DT(27,`In both cases, pipes operate on the arguments being processed by a `),Oa$1(28,`a`,20),DT(29,`controller route handler`),cf(),DT(30,`. Nest interposes a pipe immediately before a method is invoked; the pipe receives the arguments destined for the method and operates on them. Any transformation or validation takes place at that point, after which the route handler is invoked with the (potentially) transformed arguments.`),cf(),Oa$1(31,`p`),DT(32,`Nest comes with a number of built-in pipes that you can use out of the box, and you can also build your own. This chapter introduces the built-in pipes and shows how to bind them to route handlers. It then walks through several custom pipes to show how to build one from scratch.`),cf(),Oa$1(33,`blockquote`,21)(34,`strong`),DT(35,`Hint`),cf(),DT(36,` Pipes run inside the exceptions zone. An exception thrown by a pipe is handled by the exceptions layer (the global exception filter and any `),Oa$1(37,`a`,22),DT(38,`exception filters`),cf(),DT(39,` applied to the current context). When a pipe throws an exception, the route handler is not executed. This makes pipes the recommended place to validate data that enters the application from external sources, at the system boundary.
2038`),cf(),Oa$1(40,`h4`,23)(41,`span`),DT(42,`Built-in pipes`),cf()(),Oa$1(43,`p`),DT(44,`Nest provides the following pipes out of the box, all exported from the `),Oa$1(45,`code`),DT(46,`@nestjs/common`),cf(),DT(47,` package:`),cf(),Oa$1(48,`ul`)(49,`li`)(50,`code`),DT(51,`ValidationPipe`),cf()(),Oa$1(52,`li`)(53,`code`),DT(54,`StandardSchemaValidationPipe`),cf()(),Oa$1(55,`li`)(56,`code`),DT(57,`ParseIntPipe`),cf()(),Oa$1(58,`li`)(59,`code`),DT(60,`ParseFloatPipe`),cf()(),Oa$1(61,`li`)(62,`code`),DT(63,`ParseBoolPipe`),cf()(),Oa$1(64,`li`)(65,`code`),DT(66,`ParseArrayPipe`),cf()(),Oa$1(67,`li`)(68,`code`),DT(69,`ParseUUIDPipe`),cf()(),Oa$1(70,`li`)(71,`code`),DT(72,`ParseEnumPipe`),cf()(),Oa$1(73,`li`)(74,`code`),DT(75,`DefaultValuePipe`),cf()(),Oa$1(76,`li`)(77,`code`),DT(78,`ParseFilePipe`),cf()(),Oa$1(79,`li`)(80,`code`),DT(81,`ParseDatePipe`),cf()()(),Oa$1(82,`p`),DT(83,`Let's start with `),Oa$1(84,`code`),DT(85,`ParseIntPipe`),cf(),DT(86,`. It is an example of the `),Oa$1(87,`strong`),DT(88,`transformation`),cf(),DT(89,` use case: the pipe ensures that a route handler parameter is converted to a JavaScript integer, or throws an exception if the conversion fails. Later in this chapter, we'll build a simple custom implementation of `),Oa$1(90,`code`),DT(91,`ParseIntPipe`),cf(),DT(92,`. The techniques below also apply to the other built-in transformation pipes (`),Oa$1(93,`code`),DT(94,`ParseBoolPipe`),cf(),DT(95,`, `),Oa$1(96,`code`),DT(97,`ParseFloatPipe`),cf(),DT(98,`, `),Oa$1(99,`code`),DT(100,`ParseEnumPipe`),cf(),DT(101,`, `),Oa$1(102,`code`),DT(103,`ParseArrayPipe`),cf(),DT(104,`, `),Oa$1(105,`code`),DT(106,`ParseDatePipe`),cf(),DT(107,`, and `),Oa$1(108,`code`),DT(109,`ParseUUIDPipe`),cf(),DT(110,`), which this chapter refers to collectively as the `),Oa$1(111,`code`),DT(112,`Parse*`),cf(),DT(113,` pipes.`),cf(),Oa$1(114,`h4`,24)(115,`span`),DT(116,`Binding pipes`),cf()(),Oa$1(117,`p`),DT(118,`To use a pipe, bind an instance of the pipe class to the appropriate context. In the `),Oa$1(119,`code`),DT(120,`ParseIntPipe`),cf(),DT(121,` example, we want to associate the pipe with a particular route handler method and make sure it runs before the method is called. The following construct does this; we refer to it as binding the pipe at the method parameter level:`),cf(),Oa$1(122,`app-copy-button`)(123,`pre`)(124,`code`,25),DT(125,`
2039@Get(':id')
2040async findOne(@Param('id', ParseIntPipe) id: number) {
2041  return this.catsService.findOne(id);
2042}
2043`),cf()()(),Oa$1(126,`p`),DT(127,`This guarantees one of two outcomes: either the parameter received by `),Oa$1(128,`code`),DT(129,`findOne()`),cf(),DT(130,` is a number (as `),Oa$1(131,`code`),DT(132,`this.catsService.findOne()`),cf(),DT(133,` expects), or an exception is thrown before the route handler is called.`),cf(),Oa$1(134,`p`),DT(135,`For example, suppose the route is called as follows:`),cf(),Oa$1(136,`pre`)(137,`code`,26),DT(138,`
2044GET localhost:3000/abc
2045`),cf()(),Oa$1(139,`p`),DT(140,`Nest throws an exception, which produces the following response:`),cf(),Oa$1(141,`pre`)(142,`code`,27),DT(143,`
2046{
2047  "statusCode": 400,
2048  "message": "Validation failed (numeric string is expected)",
2049  "error": "Bad Request"
2050}
2051`),cf()(),Oa$1(144,`p`),DT(145,`The exception prevents the body of the `),Oa$1(146,`code`),DT(147,`findOne()`),cf(),DT(148,` method from executing.`),cf(),Oa$1(149,`p`),DT(150,`In the example above, we pass a class (`),Oa$1(151,`code`),DT(152,`ParseIntPipe`),cf(),DT(153,`), not an instance. This leaves instantiation to the framework and enables dependency injection. As with guards and exception filters, you can instead pass an in-place instance, which is useful when you want to customize the built-in pipe's behavior b
2051y passing options:`),cf(),Oa$1(154,`app-copy-button`)(155,`pre`)(156,`code`,25),DT(157,`
2052@Get(':id')
2053async findOne(
2054  @Param('id', new ParseIntPipe({ errorHttpStatusCode: HttpStatus.NOT_ACCEPTABLE }))
2055  id: number,
2056) {
2057  return this.catsService.findOne(id);
2058}
2059`),cf()()(),Oa$1(158,`p`),DT(159,`The other transformation pipes (all of the `),Oa$1(160,`strong`),DT(161,`Parse*`),cf(),DT(162,` pipes) are bound the same way. They work with route parameters, query string parameters, and request body values.`),cf(),Oa$1(163,`p`),DT(164,`For example, with a query string parameter:`),cf(),Oa$1(165,`app-copy-button`)(166,`pre`)(167,`code`,25),DT(168,`
2060@Get()
2061async findOne(@Query('id', ParseIntPipe) id: number) {
2062  return this.catsService.findOne(id);
2063}
2064`),cf()()(),Oa$1(169,`p`),DT(170,`The following example uses `),Oa$1(171,`code`),DT(172,`ParseUUIDPipe`),cf(),DT(173,` to verify that a string parameter is a UUID:`),cf(),Oa$1(174,`app-copy-button`,28)(175,`span`,29),Za$1(176,`app-tabs`,null,1),cf(),Oa$1(178,`pre`)(179,`code`,25),DT(180,`
2065@Get(':uuid')
2066async findOne(@Param('uuid', new ParseUUIDPipe()) uuid: string) {
2067  return this.catsService.findOne(uuid);
2068}
2069`),cf()(),Oa$1(181,`pre`)(182,`code`,25),DT(183,`
2070@Get(':uuid')
2071@Bind(Param('uuid', new ParseUUIDPipe()))
2072async findOne(uuid) {
2073  return this.catsService.findOne(uuid);
2074}
2075`),cf()()(),Oa$1(184,`blockquote`,21)(185,`strong`),DT(186,`Hint`),cf(),DT(187,` By default, `),Oa$1(188,`code`),DT(189,`ParseUUIDPipe`),cf(),DT(190,` accepts a UUID of any version (versions 1 through 8, Nil, and Max 
2075UUIDs). To require a specific version, pass the `),Oa$1(191,`code`),DT(192,`version`),cf(),DT(193,` option (`),Oa$1(194,`code`),DT(195,`'1'`),cf(),DT(196,`, `),Oa$1(197,`code`),DT(198,`'2'`),cf(),DT(199,`, `),Oa$1(200,`code`),DT(201,`'3'`),cf(),DT(202,`, `),Oa$1(203,`code`),DT(204,`'4'`),cf(),DT(205,`, `),Oa$1(206,`code`),DT(207,`'5'`),cf(),DT(208,`, `),Oa$1(209,`code`),DT(210,`'6'`),cf(),DT(211,`, `),Oa$1(212,`code`),DT(213,`'7'`),cf(),DT(214,`, or `),Oa$1(215,`code`),DT(216,`'8'`),cf(),DT(217,`).
2076`),cf(),Oa$1(218,`p`),DT(219,`Binding validation pipes works slightly differently; we cover it later in this chapter.`),cf(),Oa$1(220,`blockquote`,21)(221,`strong`),DT(222,`Hint`),cf(),DT(223,` See `),Oa$1(224,`a`,30),DT(225,`Validation techniques`),cf(),DT(226,` for extensive examples of validation pipes.
2077`),cf(),Oa$1(227,`h4`,31)(228,`span`),DT(229,`Custom pipes`),cf()(),Oa$1(230,`p`),DT(231,`As mentioned, you can build your own pipes. Although Nest provides robust built-in `),Oa$1(232,`code`),DT(233,`ParseIntPipe`),cf(),DT(234,` and `),Oa$1(235,`code`),DT(236,`ValidationPipe`),cf(),DT(237,` implementations, let's build simple versions of each from scratch to see how custom pipes are constructed.`),cf(),Oa$1(238,`p`),DT(239,`We start with a simple `),Oa$1(240,`code`),DT(241,`ValidationPipe`),cf(),DT(242,`. Initially, it takes an input value and returns it unchanged, behaving like an identity function.`),cf(),Oa$1(243,`app-copy-button`,28)(244,`span`,29),DT(245),AT(246,`extension`),Za$1(247,`app-tabs`,null,2),cf(),Oa$1(249,`pre`)(250,`code`,25),DT(251,`
2078import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common';
2079
2080@Injectable()
2081export class ValidationPipe implements PipeTransform {
2082  transform(value: any, metadata: ArgumentMetadata) {
2083    return value;
2084  }
2085}
2086`),cf()(),Oa$1(252,`pre`)(253,`code`,25),DT(254,`
2087import { Injectable } from '@nestjs/common';
2088
2089@Injectable()
2090export class ValidationPipe {
2091  transform(value, metadata) {
2092    return value;
2093  }
2094}
2095`),cf()()(),Oa$1(255,`blockquote`,21)(256,`strong`),DT(257,`Hint`),cf(),Oa$1(258,`code`),DT(259,`PipeTransform<T, R>`),cf(),DT(260,` is a generic interface that every pipe must implement. `),Oa$1(261,`code`),DT(2
vendor: 4,321 bytes, lines 2095-2106
209562,`T`),cf(),DT(263,` indicates the type of the input `),Oa$1(264,`code`),DT(265,`value`),cf(),DT(266,`, and `),Oa$1(267,`code`),DT(268,`R`),cf(),DT(269,` indicates the return type of the `),Oa$1(270,`code`),DT(271,`transform()`),cf(),DT(272,` method.
2096`),cf(),Oa$1(273,`p`),DT(274,`Every pipe must implement the `),Oa$1(275,`code`),DT(276,`transform()`),cf(),DT(277,` method to fulfill the `),Oa$1(278,`code`),DT(279,`PipeTransform`),cf(),DT(280,` interface contract. This method has two parameters:`),cf(),Oa$1(281,`ul`)(282,`li`)(283,`code`),DT(284,`value`),cf()(),Oa$1(285,`li`)(286,`code`),DT(287,`metadata`),cf()()(),Oa$1(288,`p`),DT(289,`The `),Oa$1(290,`code`),DT(291,`value`),cf(),DT(292,` parameter is the method argument currently being processed (before the route handler receives it), and `),Oa$1(293,`code`),DT(294,`metadata`),cf(),DT(295,` is that argument's metadata. The metadata object has the following properties:`),cf(),Oa$1(296,`app-copy-button`)(297,`pre`)(298,`code`,25),DT(299,`
2097export interface ArgumentMetadata {
2098  type: 'body' | 'query' | 'param' | 'custom';
2099  metatype?: Type<unknown>;
2100  data?: string;
2101  schema?: StandardSchemaV1;
2102}
2103`),cf()()(),Oa$1(300,`p`),DT(301,`These properties describe the argument being processed:`),cf(),Oa$1(302,`table`)(303,`tr`)(304,`td`)(305,`code`),DT(306,`type`),cf()(),Oa$1(307,`td`),DT(308,`Indicates whether the argument is a body (`),Oa$1(309,`code`),DT(310,`@Body()`),cf(),DT(311,`), query (`),Oa$1(312,`code`),DT(313,`@Query()`),cf(),DT(314,`), param (`),Oa$1(315,`code`),DT(316,`@Param()`),cf(),DT(317,`), or custom parameter (see `),Oa$1(318,`a`,32),DT(319,`custom decorators`),cf(),DT(320,`).`),cf()(),Oa$1(321,`tr`)(322,`td`)(323,`code`),DT(324,`metatype`),cf()(),Oa$1(325,`td`),DT(326,` The metatype of the argument, for example, `),Oa$1(327,`code`),DT(328,`String`),cf(),DT(329,`. The value is `),Oa$1(330,`code`),DT(331,`undefined`),cf(),DT(332,` if you omit the type declaration in the route handler signature or use vanilla JavaScript. `),cf()(),Oa$1(333,`tr`)(334,`td`)(335,`code`),DT(336,`data`),cf()(),Oa$1(337,`td`),DT(338,`The string passed to the decorator, for example, `),Oa$1(339,`code`),DT(340,`@Body('string')`),cf(),DT(341,`. It's `),Oa$1(342,`code`),DT(343,`undefined`),cf(),DT(344,` if you don't pass a string to the decorator, as in `),Oa$1(345,`code`),DT(346,`@Body()`),cf(),DT(347,`.`),cf()(),Oa$1(348,`tr`)(349,`td`)(350,`code`),DT(351,`schema`),cf()(),Oa$1(352,`td`),DT(353,` A Standard Schema compatible schema attached through parameter decorator options such as `),Oa$1(354,`code`),DT(355),cf(),DT(356,` or `),Oa$1(357,`code`),DT(358),cf(),DT(359,`. It's `),Oa$1(360,`code`),DT(361,`undefined`),cf(),DT(362,` if no schema is attached. `),cf()()(),Oa$1(363,`blockquote`,33)(364,`strong`),DT(365,`Warning`),cf(),DT(366,` TypeScript interfaces disappear during transpilation. If a method parameter's type is declared as an interface instead of a class, the `),Oa$1(367,`code`),DT(368,`metatype`),cf(),DT(369,` value is `),Oa$1(370,`code`),DT(371,`Object`),cf(),DT(372,`.
2104`),cf(),Oa$1(373,`blockquote`,21)(374,`strong`),DT(375,`Hint`),cf(),DT(376,` The built-in `),Oa$1(377,`code`),DT(378,`StandardSchemaValidationPipe`),cf(),DT(379,` uses the `),Oa$1(380,`code`),DT(381,`schema`),cf(),DT(382,` field to validate arguments with any Standard Schema compatible library. Arguments without a schema pass through unchanged.
2105`),cf(),Oa$1(383,`h4`,34)(384,`span`),DT(385,`Schema based validation`),cf()(),Oa$1(386,`blockquote`,21)(387,`strong`),DT(388,`Hint`),cf(),DT(389,` The following sections build validation pipes from scratch to show how pipes work. For schema-based validation in production, use the built-in `),Oa$1(390,`code`),DT(391,`StandardSchemaValidationPipe`),cf(),DT(392,` instead. It works with Zod, Valibot, ArkType, and any other `),Oa$1(393,`a`,35),DT(394,`Standard Schema`),cf(),DT(395,` compatible library, and reads the schema you attach through the `),Oa$1(396,`code`),DT(397,`schema`),cf(),DT(398,` option of parameter decorators such as `),Oa$1(399,`code`),DT(400,`@Body()`),cf(),DT(401,` and `),Oa$1(402,`code`),DT(403,`@Param()`),cf(),DT(404,`. See `),Oa$1(405,`a`,36),DT(406,`Schema-based validation`),cf(),DT(407,` for details.
2106`),cf(),Oa$1(408,`p`),DT(409,`Let's make our validation pipe more useful. C
2106onsider the `),Oa$1(410,`code`),DT(411,`create()`),cf(),DT(412,` method of the `),Oa$1(413,`code`),DT(414,`CatsController`),cf(),DT(415,`: we want to ensure that the POST body object is valid before running the service method.`),cf(),Oa$1(416,`app-copy-button`,28)(417,`span`,29),Za$1(418,`app-tabs`,null,3),cf(),Oa$1(420,`pre`)(421,`code`,25),DT(422,`
2107@Post()
2108async create(@Body() createCatDto: CreateCatDto) {
2109  this.catsService.create(createCatDto);
2110}
2111`),cf()(),Oa$1(423,`pre`)(424,`code`,25),DT(425,`
2112@Post()
2113async create(@Body() createCatDto) {
2114  this.catsService.create(createCatDto);
2115}
2116`),cf()()(),Oa$1(426,`p`),DT(427,`The `),Oa$1(428,`code`),DT(429,`createCatDto`),cf(),DT(430,` body parameter is of type `),Oa$1(431,`code`),DT(432,`CreateCatDto`),cf(),DT(433,`:`),cf(),Oa$1(434,`app-copy-button`,28)(435,`span`,29),DT(436),AT(437,`extension`),Za$1(438,`app-tabs`,null,4),cf(),Oa$1(440,`pre`)(441,`code`,25),DT(442,`
2117export class CreateCatDto {
2118  name: string;
2119  age: number;
2120  breed: string;
2121}
2122`),cf()()(),Oa$1(443,`p`),DT(444,`Every request to the `),Oa$1(445,`code`),DT(446,`create()`),cf(),DT(447,` method must contain a valid body, so we need to validate the three members of the `),Oa$1(448,`code`),DT(449,`createCatDto`),cf(),DT(450,` object. We could do this inside the route handler, but that would break the `),Oa$1(451,`strong`),DT(452,`single responsibility principle`),cf(),DT(453,` (SRP).`),cf(),Oa$1(454,`p`),DT(455,`Another approach is to create a `),Oa$1(456,`strong`),DT(457,`validator class`),cf(),DT(458,` and delegate the task to it. The disadvantage is that we would have to remember to call the validator at the beginning of each method.`),cf(),Oa$1(459,`p`),DT(460,`What about validation middleware? This could work, but it's not possible to create `),Oa$1(461,`strong`),DT(462,`generic middleware`),cf(),DT(463,` that can be used in every context across the application. Middleware is unaware of the `),Oa$1(464,`strong`),DT(465,`execution context`),cf(),DT(466,`, including the handler that will be called and its parameters.`),cf(),Oa$1(467,`p`),DT(468,`Pipes are designed for exactly this use case, so we will refine our validation pipe.`),cf(),Oa$1(469,`p`),Za$1(470,`app-banner-courses`),cf(),Oa$1(471,`h4`,37)(472,`span`),DT(473,`Object schema validation`),cf()(),Oa$1(474,`p`),DT(475,`There are several ways to validate objects in a clean, `),Oa$1(476,`a`,38),DT(477,`DRY`),cf(),DT(478,` way. One common approach is `),Oa$1(479,`strong`),DT(480,`schema-based`),cf(),DT(481,` validation, which we use here.`),cf(),Oa$1(482,`p`),DT(483,`The `),Oa$1(484,`a`,39),DT(485,`Zod`),cf(),DT(486,` library lets you define schemas with a readable API. Let's build a validation pipe that uses Zod schemas.`),cf(),Oa$1(487,`p`),DT(488,`Start by installing the required package:`),cf(),Oa$1(489,`pre`)(490,`code`,26),DT(491,`
2123$ npm install --save zod
2124`),cf()(),Oa$1(492,`p`),DT(493,`The class below takes a schema as a constructor argument and calls `),Oa$1(494,`code`),DT(495,`schema.parse()`),cf(),DT(496,`, which validates the incoming argument against that schema.`),cf(),Oa$1(497,`p`),DT(498,`As noted earlier, a `),Oa$1(499,`strong`),DT(500,`validation pipe`),cf(),DT(501,` either returns the value or throws an exception. This pipe returns the value parsed by the schema, or throws a `),Oa$1(502,`code`),DT(503,`BadRequestException`),cf(),DT(504,` if validation fails.`),cf(),Oa$1(505,`p`),DT(506,`The next section shows how to supply the appropriate schema for a given route handler using the `),Oa$1(507,`code`),DT(508,`@UsePipes()`),cf(),DT(509,` decorator. This makes the validation pipe reusable across contexts, which is what we set out to do.`),cf(),Oa$1(510,`app-copy-button`,28)(511,`span`,29),Za$1(512,`app-tabs`,null,5),cf(),Oa$1(514,`pre`)(515,`code`,25),DT(516,`
2125import { PipeTransform, ArgumentMetadata, BadRequestException } from '@nestjs/common';
2126import { ZodType } from 'zod';
2127
2128export class ZodValidationPipe implements PipeTransform {
2129  constructor(private schema: ZodType) {}
2130
2131  transform(value: unknown, metadata: ArgumentMetadata) {
2132    try {
2133      const parsedValue = this.schema.parse(value);
2134      return parsedValue;
2135    } catch (error) {
2136      throw new BadRequestException('Validation failed');
2137    }
2138  }
2139}
2140`),cf()(),Oa$1(517,`pre`)(518,`code`,25),DT(519,`
2141import { BadRequestException } from '@nestjs/common';
2142
2143export class ZodValidationPipe {
2144  constructor(schema) {
2145    this.schema = schema;
2146  }
2147
2148  transform(value, metadata) {
2149    try {
2150      const parsedValue = this.schema.parse(value);
2151      return parsedValue;
2152    } catch (error) {
2153      throw new BadRequestException('Validation failed');
2154    }
2155  }
2156}
2157`),cf()()(),Oa$1(520,`h4`,40)(521,`span`),DT(522,`Binding validation pipes`),cf()(),Oa$1(523,`p`),DT(524,`Earlier, we saw how to bind transformation pipes (such as `),Oa$1(525,`code`),DT(526,`ParseIntPipe`),cf(),DT(527,` and the rest of the `),Oa$1(528,`code`),DT(529,`Parse*`),cf(),DT(530,` pipes). Binding validation pipes is equally straightforward.`),cf(),Oa$1(531,`p`),DT(532,`In this case, we want to bind the pipe at the method level. To use the `),Oa$1(533,`code`),DT(534,`ZodValidationPipe`),cf(),DT(535,` in our example, we need to:`),cf(),Oa$1(536,`ol`)(537,`li`),DT(538,`Create an instance of the `),Oa$1(539,`code`),DT(540,`ZodValidationPipe`),cf()(),Oa$1(541,`li`),DT(542,`Pass the context-specific Zod schema to the pipe's constructor`),cf(),Oa$1(543,`li`),DT(544,`Bind the pipe to the method`),cf()(),Oa$1(545,`p`),DT(546,`Here's an example Zod schema:`),cf(),Oa$1(547,`app-copy-button`)(548,`pre`)(549,`code`,25),DT(550,`
2158import { z } from 'zod';
2159
2160export const createCatSchema = z.object({
2161  name: z.string(),
2162  age: z.number(),
2163  breed: z.string(),
2164});
2165
2166export type CreateCatDto = z.infer<typeof createCatSchema>;
2167`),cf()()(),Oa$1(551,`p`),DT(552,`Bind the pipe with the `),Oa$1(553,`code`),DT(554,`@UsePipes()`),cf
vendor: 14,921 bytes, lines 2167-2310
2167(),DT(555,` decorator:`),cf(),Oa$1(556,`app-copy-button`,28)(557,`span`,29),DT(558),AT(559,`extension`),Za$1(560,`app-tabs`,null,6),cf(),Oa$1(562,`pre`)(563,`code`,25),DT(564,`
2168@Post()
2169@UsePipes(new ZodValidationPipe(createCatSchema))
2170async create(@Body() createCatDto: CreateCatDto) {
2171  this.catsService.create(createCatDto);
2172}
2173`),cf()(),Oa$1(565,`pre`)(566,`code`,25),DT(567,`
2174@Post()
2175@Bind(Body())
2176@UsePipes(new ZodValidationPipe(createCatSchema))
2177async create(createCatDto) {
2178  this.catsService.create(createCatDto);
2179}
2180`),cf()()(),Oa$1(568,`blockquote`,21)(569,`strong`),DT(570,`Hint`),cf(),DT(571,` The `),Oa$1(572,`code`),DT(573,`@UsePipes()`),cf(),DT(574,` decorator is imported from the `),Oa$1(575,`code`),DT(576,`@nestjs/common`),cf(),DT(577,` package.
2181`),cf(),Oa$1(578,`p`),DT(579,`You can also bind the `),Oa$1(580,`code`),DT(581,`ZodValidationPipe`),cf(),DT(582,` to a specific parameter, alongside built-in pipes. The following example validates the `),Oa$1(583,`code`),DT(584,`id`),cf(),DT(585,` route parameter with `),Oa$1(586,`code`),DT(587,`ParseIntPipe`),cf(),DT(588,` and the request body with `),Oa$1(589,`code`),DT(590,`ZodValidationPipe`),cf(),DT(591,`:`),cf(),Oa$1(592,`app-copy-button`)(593,`pre`)(594,`code`,25),DT(595,`
2182@Put('/:id')
2183async update(
2184  @Param('id', ParseIntPipe) id: number,
2185  @Body(new ZodValidationPipe(createCatSchema)) body: CreateCatDto
2186): Promise<void> {
2187  this.catsService.update(id, body);
2188}
2189`),cf()()(),Oa$1(596,`blockquote`,33)(597,`strong`),DT(598,`Warning`),cf(),DT(599,` The `),Oa$1(600,`code`),DT(601,`zod`),cf(),DT(602,` library requires the `),Oa$1(603,`code`),DT(604,`strictNullChecks`),cf(),DT(605,` compiler option to be enabled in your `),Oa$1(606,`code`),DT(607,`tsconfig.json`),cf(),DT(608,` file.
2190`),cf(),Oa$1(609,`h4`,41)(610,`span`),DT(611,`Class validator`),cf()(),Oa$1(612,`blockquote`,33)(613,`strong`),DT(614,`Warning`),cf(),DT(615,` The techniques in this section require TypeScript and are not available if your app is written in vanilla JavaScript.
2191`),cf(),Oa$1(616,`p`),DT(617,`This section presents an alternative implementation of our validation technique.`),cf(),Oa$1(618,`p`),DT(619,`Nest works well with the `),Oa$1(620,`a`,42),DT(621,`class-validator`),cf(),DT(622,` library, which provides decorator-based validation. Decorator-based validation pairs well with Nest's `),Oa$1(623,`strong`),DT(624,`pipe`),cf(),DT(625,` capabilities, because a pipe has access to the `),Oa$1(626,`code`),DT(627,`metatype`),cf(),DT(628,` of the processed argument. Before we start, install the required packages:`),cf(),Oa$1(629,`pre`)(630,`code`,26),DT(631,`
2192$ npm i --save class-validator class-transformer
2193`),cf()(),Oa$1(632,`p`),DT(633,`Once these are installed, add a few decorators to the `),Oa$1(634,`code`),DT(635,`CreateCatDto`),cf(),DT(636,` class. This shows a significant advantage of the technique: the `),Oa$1(637,`code`),DT(638,`CreateCatDto`),cf(),DT(639,` class remains the single source of truth for the POST body object, so you don't need a separate validation class.`),cf(),Oa$1(640,`app-copy-button`,28)(641,`span`,29),DT(642),AT(643,`extension`),Za$1(644,`app-tabs`,null,7),cf(),Oa$1(646,`pre`)(647,`code`,25),DT(648,`
2194import { IsString, IsInt } from 'class-validator';
2195
2196export class CreateCatDto {
2197  @IsString()
2198  name: string;
2199
2200  @IsInt()
2201  age: number;
2202
2203  @IsString()
2204  breed: string;
2205}
2206`),cf()()(),Oa$1(649,`blockquote`,21)(650,`strong`),DT(651,`Hint`),cf(),DT(652,` Read more about class-validator decorators in the `),Oa$1(653,`a`,43),DT(654,`class-validator documentation`),cf(),DT(655,`.
2207`),cf(),Oa$1(656,`p`),DT(657,`We can now create a `),Oa$1(658,`code`),DT(659,`ValidationPipe`),cf(),DT(660,` class that uses these decorators.`),cf(),Oa$1(661,`app-copy-button`,28)(662,`span`,29),DT(663),AT(664,`extension`),Za$1(665,`app-tabs`,null,8),cf(),Oa$1(667,`pre`)(668,`code`,25),DT(669,`
2208import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from '@nestjs/common';
2209import { validate } from 'class-validator';
2210import { plainToInstance } from 'class-transformer';
2211
2212@Injectable()
2213export class ValidationPipe implements PipeTransform<any> {
2214  async transform(value: any, { metatype }: ArgumentMetadata) {
2215    if (!metatype || !this.toValidate(metatype)) {
2216      return value;
2217    }
2218    const object = plainToInstance(metatype, value);
2219    const errors = await validate(object);
2220    if (errors.length > 0) {
2221      throw new BadRequestException('Validation failed');
2222    }
2223    return value;
2224  }
2225
2226  private toValidate(metatype: Function): boolean {
2227    const types: Function[] = [String, Boolean, Number, Array, Object];
2228    return !types.includes(metatype);
2229  }
2230}
2231`),cf()()(),Oa$1(670,`blockquote`,21)(671,`strong`),DT(672,`Hint`),cf(),DT(673,` This pipe is intentionally basic. You don't have to build a generic validation pipe yourself: Nest provides a more capable `),Oa$1(674,`code`),DT(675,`ValidationPipe`),cf(),DT(676,` out of the box, described at the end of this section.
2232`),cf(),Oa$1(677,`blockquote`,33)(678,`strong`),DT(679,`Notice`),cf(),DT(680,` The code above uses the `),Oa$1(681,`a`,44),DT(682,`class-transformer`),cf(),DT(683,` library, which is made by the same author as the `),Oa$1(684,`strong`),DT(685,`class-validator`),cf(),DT(686,` library, so the two work well together.
2233`),cf(),Oa$1(687,`p`),DT(688,`Let's go through this code. First, the `),Oa$1(689,`code`),DT(690,`transform()`),cf(),DT(691,` method is marked as `),Oa$1(692,`code`),DT(693,`async`),cf(),DT(694,`. This is possible because Nest supports both synchronous and `),Oa$1(695,`strong`),DT(696,`asynchronous`),cf(),DT(697,` pipes. We make this method `),Oa$1(698,`code`),DT(699,`async`),cf(),DT(700,` because some class-validator validations `),Oa$1(701,`a`,45),DT(702,`can be async`),cf(),DT(703,` (they return promises).`),cf(),Oa$1(704,`p`),DT(705,`Next, we use destructuring to extract the `),Oa$1(706,`code`),DT(707,`metatype`),cf(),DT(708,` field from the `),Oa$1(709,`code`),DT(710,`ArgumentMetadata`),cf(),DT(711,` object. This is shorthand for receiving the full `),Oa$1(712,`code`),DT(713,`ArgumentMetadata`),cf(),DT(714,` and then assigning the `),Oa$1(715,`code`),DT(716,`metatype`),cf(),DT(717,` variable in a separate statement.`),cf(),Oa$1(718,`p`),DT(719,`The helper method `),Oa$1(720,`code`),DT(721,`toValidate()`),cf(),DT(722,` skips validation when the argument being processed is a native JavaScript type. Native types can't have validation decorators attached, so there's no reason to validate them.`),cf(),Oa$1(723,`p`),DT(724,`Next, we use the class-transformer function `),Oa$1(725,`code`),DT(726,`plainToInstance()`),cf(),DT(727,` to transform the plain JavaScript argument object into a typed object so that we can apply validation. This is necessary because the incoming POST body, when deserialized from the network request, does `),Oa$1(728,`strong`),DT(729,`not have any type information`),cf(),DT(730,` (this is how the underlying platform, such as Express, works). Because class-validator relies on the validation decorators defined on the DTO earlier, we transform the incoming body into an instance of the decorated class rather than validating a plain object.`),cf(),Oa$1(731,`p`),DT(732,`Finally, because this is a `),Oa$1(733,`strong`),DT(734,`validation pipe`),cf(),DT(735,`, it either returns the value unchanged or throws an exception.`),cf(),Oa$1(736,`p`),DT(737,`The last step is to bind the `),Oa$1(738,`code`),DT(739,`ValidationPipe`),cf(),DT(740,`. Pipes can be parameter-scoped, method-scoped, controller-scoped, or global-scoped. Earlier, we bound the Zod-based validation pipe at the method level with `),Oa$1(741,`code`),DT(742,`@UsePipes()`),cf(),DT(743,`. In the example below, we bind the pipe instance to the route handler's `),Oa$1(744,`code`),DT(745,`@Body()`),cf(),DT(746,` decorator so that the pipe validates the POST body.`),cf(),Oa$1(747,`app-copy-button`,28)(748,`span`,29),DT(749),AT(750,`extension`),Za$1(751,`app-tabs`,null,9),cf(),Oa$1(753,`pre`)(754,`code`,25),DT(755,`
2234@Post()
2235async create(
2236  @Body(new ValidationPipe()) createCatDto: CreateCatDto,
2237) {
2238  this.catsService.create(createCatDto);
2239}
2240`),cf()()(),Oa$1(756,`p`),DT(757,`Parameter-scoped pipes are useful when the validation logic concerns only one parameter.`),cf(),Oa$1(758,`h4`,46)(759,`span`),DT(760,`Global scoped pipes`),cf()(),Oa$1(761,`p`),DT(762,`Because the `),Oa$1(763,`code`),DT(764,`ValidationPipe`),cf(),DT(765,` is designed to be as generic as possible, it is most useful as a `),Oa$1(766,`strong`),DT(767,`global-scoped`),cf(),DT(768,` pipe, applied to every route handler across the entire application.`),cf(),Oa$1(769,`app-copy-button`,28)(770,`span`,29),DT(771),AT(772,`extension`),Za$1(773,`app-tabs`,null,10),cf(),Oa$1(775,`pre`)(776,`code`,25),DT(777,`
2241async function bootstrap() {
2242  const app = await NestFactory.create(AppModule);
2243  app.useGlobalPipes(new ValidationPipe());
2244  await app.listen(process.env.PORT ?? 3000);
2245}
2246await bootstrap();
2247`),cf()()(),Oa$1(778,`blockquote`,33)(779,`strong`),DT(780,`Notice`),cf(),DT(781,` In a hybrid application, `),Oa$1(782,`code`),DT(783,`useGlobalPipes()`),cf(),DT(784,` doesn't set up pipes for connected microservices by default (see `),Oa$1(785,`a`,47),DT(786,`Hybrid application`),cf(),DT(787,` to change this behavior). In a standard (non-hybrid) microservice application, `),Oa$1(788,`code`),DT(789,`useGlobalPipes()`),cf(),DT(790,` does mount the pipes globally.
2248`),cf(),Oa$1(791,`p`),DT(792,`Global pipes registered outside of any module (with `),Oa$1(793,`code`),DT(794,`useGlobalPipes()`),cf(),DT(795,`, as in the example above) cannot inject dependencies, because the binding happens outside the context of any module. To solve this, you can register a global pipe `),Oa$1(796,`strong`),DT(797,`directly from any module`),cf(),DT(798,` using the following construction:`),cf(),Oa$1(799,`app-copy-button`,28)(800,`span`,29),DT(801),AT(802,`extension`),Za$1(803,`app-tabs`,null,11),cf(),Oa$1(805,`pre`)(806,`code`,25),DT(807,`
2249import { Module } from '@nestjs/common';
2250import { APP_PIPE } from '@nestjs/core';
2251
2252@Module({
2253  providers: [
2254    {
2255      provide: APP_PIPE,
2256      useClass: ValidationPipe,
2257    },
2258  ],
2259})
2260export class AppModule {}
2261`),cf()()(),Oa$1(808,`blockquote`,21)(809,`strong`),DT(810,`Hint`),cf(),DT(811,` When you use this approach to perform dependency injection for the pipe, the pipe is global regardless of the module in which you register it. Register it in the module where the pipe (`),Oa$1(812,`code`),DT(813,`ValidationPipe`),cf(),DT(814,` in the example above) is defined. `),Oa$1(815,`code`),DT(816,`useClass`),cf(),DT(817,` is not the only way to register a custom provider; learn more in `),Oa$1(818,`a`,48),DT(819,`Custom providers`),cf(),DT(820,`.
2262`),cf(),Oa$1(821,`h4`,49)(822,`span`),DT(823,`The built-in ValidationPipe`),cf()(),Oa$1(824,`p`),DT(825,`You don't have to build a generic validation pipe yourself: Nest provides `),Oa$1(826,`code`),DT(827,`ValidationPipe`),cf(),DT(828,` out of the box. The built-in `),Oa$1(829,`code`),DT(830,`ValidationPipe`),cf(),DT(831,` offers more options than the sample built in this chapter, which is kept basic to illustrate the mechanics of a custom pipe. For schema-based validation, Nest also provides the built-in `),Oa$1(832,`code`),DT(833,`StandardSchemaValidationPipe`),cf(),DT(834,`. See `),Oa$1(835,`a`,30),DT(836,`Validation techniques`),cf(),DT(837,` for full details and many examples.`),cf(),Oa$1(838,`h4`,50)(839,`span`),DT(840,`Transformation use case`),cf()(),Oa$1(841,`p`),DT(842,`Validation isn't the only use case for custom pipes. As mentioned at the beginning of this chapter, a pipe can also `),Oa$1(843,`strong`),DT(844,`transform`),cf(),DT(845,` input data to the desired format. This is possible because the value returned from the `),Oa$1(846,`code`),DT(847,`transform()`),cf(),DT(848,` method replaces the previous value of the argument.`),cf(),Oa$1(849,`p`),DT(850,`When is this useful? Sometimes the data passed from the client needs to be changed (for example, converted from a string to an integer) before the route handler can process it. Some required fields may also be missing, and you may want to apply default values. `),Oa$1(851,`strong`),DT(852,`Transformation pipes`),cf(),DT(853,` perform these functions by interposing a processing function between the client request and the route handler.`),cf(),Oa$1(854,`p`),DT(855,`Here's a simple `),Oa$1(856,`code`),DT(857,`ParseIntPipe`),cf(),DT(858,` that parses a string into an integer. (As noted above, Nest has a more sophisticated built-in `),Oa$1(859,`code`),DT(860,`ParseIntPipe`),cf(),DT(861,`; this is a simple example of a custom transformation pipe.)`),cf(),Oa$1(862,`app-copy-button`,28)(863,`span`,29),DT(864),AT(865,`extension`),Za$1(866,`app-tabs`,null,12),cf(),Oa$1(868,`pre`)(869,`code`,25),DT(870,`
2263import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from '@nestjs/common';
2264
2265@Injectable()
2266export class ParseIntPipe implements PipeTransform<string, number> {
2267  transform(value: string, metadata: ArgumentMetadata): number {
2268    const val = parseInt(value, 10);
2269    if (isNaN(val)) {
2270      throw new BadRequestException('Validation failed');
2271    }
2272    return val;
2273  }
2274}
2275`),cf()(),Oa$1(871,`pre`)(872,`code`,25),DT(873,`
2276import { Injectable, BadRequestException } from '@nestjs/common';
2277
2278@Injectable()
2279export class ParseIntPipe {
2280  transform(value, metadata) {
2281    const val = parseInt(value, 10);
2282    if (isNaN(val)) {
2283      throw new BadRequestException('Validation failed');
2284    }
2285    return val;
2286  }
2287}
2288`),cf()()(),Oa$1(874,`p`),DT(875,`We can then bind this pipe to the selected parameter:`),cf(),Oa$1(876,`app-copy-button`,28)(877,`span`,29),Za$1(878,`app-tabs`,null,13),cf(),Oa$1(880,`pre`)(881,`code`,25),DT(882,`
2289@Get(':id')
2290async findOne(@Param('id', new ParseIntPipe()) id) {
2291  return this.catsService.findOne(id);
2292}
2293`),cf()(),Oa$1(883,`pre`)(884,`code`,25),DT(885,`
2294@Get(':id')
2295@Bind(Param('id', new ParseIntPipe()))
2296async findOne(id) {
2297  return this.catsService.findOne(id);
2298}
2299`),cf()()(),Oa$1(886,`p`),DT(887,`Another useful transformation is to look up an `),Oa$1(888,`strong`),DT(889,`existing user`),cf(),DT(890,` entity in the database using an ID supplied in the request:`),cf(),Oa$1(891,`app-copy-button`,28)(892,`span`,29),Za$1(893,`app-tabs`,null,14),cf(),Oa$1(895,`pre`)(896,`code`,25),DT(897,`
2300@Get(':id')
2301findOne(@Param('id', UserByIdPipe) userEntity: UserEntity) {
2302  return userEntity;
2303}
2304`),cf()(),Oa$1(898,`pre`)(899,`code`,25),DT(900,`
2305@Get(':id')
2306@Bind(Param('id', UserByIdPipe))
2307findOne(userEntity) {
2308  return userEntity;
2309}
2310`),cf()()(),Oa$1(901,`p`),DT(902,`We leave the implementation of this pipe to the reader. Like all other transformation pipes, it receives an input value (an `),Oa$1(903,`code`),DT(904,`id`),cf(),DT(905,`) and returns an output value (a `),Oa$1(906,`code`),DT(907,`UserEntity`),cf
2310(),DT(908,` object). This makes your code more declarative and `),Oa$1(909,`a`,38),DT(910,`DRY`),cf(),DT(911,` by moving boilerplate out of the route handler and into a reusable pipe.`),cf(),Oa$1(912,`h4`,51)(913,`span`),DT(914,`Providing defaults`),cf()(),Oa$1(915,`p`),DT(916,`By default, `),Oa$1(917,`code`),DT(918,`Parse*`),cf(),DT(919,` pipes expect a parameter's value to be defined and throw an exception when they receive `),Oa$1(920,`code`),DT(921,`null`),cf(),DT(922,` or `),Oa$1(923,`code`),DT(924,`undefined`),cf(),DT(925,` (unless you set their `),Oa$1(926,`code`),DT(927,`optional`),cf(),DT(928,` option to `),Oa$1(929,`code`),DT(930,`true`),cf(),DT(931,`). To let an endpoint handle missing query string parameters, provide a default value that is applied before the `),Oa$1(932,`code`),DT(933,`Parse*`),cf(),DT(934,` pipes operate on it. The `),Oa$1(935,`code`),DT(936,`DefaultValuePipe`),cf(),DT(937,` serves this purpose. Instantiate a `),Oa$1(938,`code`),DT(939,`DefaultValuePipe`),cf(),DT(940,` in the `),Oa$1(941,`code`),DT(942,`@Query()`),cf(),DT(943,` decorator before the relevant `),Oa$1(944,`code`),DT(945,`Parse*`),cf(),DT(946,` pipe, as shown below:`),cf(),Oa$1(947,`app-copy-button`,28)(948,`span`,29),Za$1(949,`app-tabs`,null,15),cf(),Oa$1(951,`pre`)(952,`code`,25),DT(953,`
2311@Get()
2312async findAll(
2313  @Query('activeOnly', new DefaultValuePipe(false), ParseBoolPipe) activeOnly: boolean,
2314  @Query('page', new DefaultValuePipe(0), ParseIntPipe) page: number,
2315) {
2316  return this.catsService.findAll({ activeOnly, page });
2317}
2318`),cf()()()(),Oa$1(954,`a`,52),Za$1(955,`i`,53),Oa$1(956,`span`),DT(957,`Edit on GitHub`),cf()()()),a&2){let l=QS(177),d=QS(248),m=QS(419),h=QS(439),u=QS(513),b=QS(561),S=QS(645),k=QS(666),C=QS(752),w=QS(774),P=QS(804),F=QS(867),J=QS(879),V=QS(894);UC(178),By(`hide`,l.isJsActive),UC(3),By(`hide`,!l.isJsActive),UC(64),hf(` `,OT(246,45,`validation.pipe`,d.isJsActive),`
2319`),UC(4),By(`hide`,d.isJsActive),UC(3),By(`hide`,!d.isJsActive),UC(103),Wy(`@Body(`,`{`,` schema `,`}`,`)`),UC(3),Wy(`@Param('id', `,`{`,` schema `,`}`,`)`),UC(62),By(`hide`,m.isJsActive),UC(3),By(`hide`,!m.isJsActive),UC(13),hf(` `,OT(437,48,`create-cat.dto`,h.isJsActive),`
2320`),UC(78),By(`hide`,u.isJsActive),UC(3),By(`hide`,!u.isJsActive),UC(41),hf(` `,OT(559,51,`cats.controller`,b.isJsActive),`
2321`),UC(4),By(`hide`,b.isJsActive),UC(3),By(`hide`,!b.isJsActive),UC(77),hf(` `,OT(643,54,`create-cat.dto`,S.isJsActive),`
2322`),UC(21),hf(` `,OT(664,57,`validation.pipe`,k.isJsActive),`
2323`),UC(86),hf(` `,OT(750,60,`cats.controller`,C.isJsActive),`
2324`),UC(22),hf(` `,OT(772,63,`main`,w.isJsActive),`
2325`),UC(30),hf(` `,OT(802,66,`app.module`,P.isJsActive),`
2326`),UC(63),hf(` `,OT(865,69,`parse-int.pipe`,F.isJsActive),`
2327`),UC(4),By(`hide`,F.isJsActive),UC(3),By(`hide`,!F.isJsActive),UC(9),By(`hide`,J.isJsActive),UC(3),By(`hide`,!J.isJsActive),UC(12),By(`hide`,V.isJsActive),UC(3),By(`hide`,!V.isJsActive)}},dependencies:[tu,xt,tn$1,u,l$1,g],encapsulation:2})}return o})();var ia=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-support`]],features:[My],decls:40,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`support`],[`appAnchor`,``,`id`,`how-can-you-help`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://opencollective.com/nest`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://paypal.me/kamilmysliwiec`],[`href`,`mailto:[email protected]`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/support.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),DT(4,`Support`),cf(),Oa$1(5,`p`),DT(6,`Nest is an MIT-licensed open source project whose ongoing development is made possible by the support of the community. The framework is the result of a long road of sleepless nights, work `),Oa$1(7,`strong`),DT(8,`after hours`),cf(),DT(9,`, and busy weekends.`),cf(),Oa$1(10,`h4`,4)(11,`span`),DT(12,`How can you help?`),cf()(),Oa$1(13,`p`),DT(14,`Nest isn't backed by a large company that continuously pays for the hours spent on its development. I rely entirely on the `),Oa$1(15,`strong`),DT(16,`goodness`),cf(),DT(17,` ❤️ of the community. I would love to make the framework even better and stay fully focused on delivering solutions that make coding enjoyable. To make that possible, I run a few support platforms:`),cf(),Oa$1(18,`ul`)(19,`li`),DT(20,`become a backer or sponsor on `),Oa$1(21,`a`,5),DT(22,`OpenCollective`),cf()(),Oa$1(23,`li`),DT(24,`send a one-time donation via `),Oa$1(25,`a`,6),DT(26,`PayPal`),cf()(),Oa$1(27,`li`),DT(28,`or reach me directly at `),Oa$1(29,`a`,7),DT(30,`[email protected]`),cf()()(),Oa$1(31,`p`),DT(32,`If you love Nest, or your business uses it, consider sponsoring its development to ensure that the project your product relies on is `),Oa$1(33,`strong`),DT(34,`actively maintained`),cf(),DT(35,` and improved. Your support also helps me create more content for the whole Nest community, such as educational blog posts and videos.`),cf()(),Oa$1(36,`a`,8),Za$1(37,`i`,9),Oa$1(38,`span`),DT(39,`Edit on GitHub`),cf()()())},dependencies:[xt],encapsulation:2})}return o}
2327)();var ra=o=>(window.location.href=o.data.externalUrl,!0);var aa=(()=>{class o extends At$1{static ɵfac=(()=>{let i;return function(s){return(i||(i=rm(o)))(s||o)}})();static ɵcmp=ef({type:o,selectors:[[`app-deployment`]],features:[My],decls:637,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`deployment`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://mau.nestjs.com/`,`title`,`Deploy Nest`],[`href`,`/deployment#easy-deployment-with-mau`],[`appAnchor`,``,`id`,`prerequisites`],[`href`,`/first-steps#prerequisites`],[1,`info`],[`appAnchor`,``,`id`,`building-your-application`],[1,`language-bash`],[`appAnchor`,``,`id`,`production-environment`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://azure.microsoft.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://cloud.google.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.hetzner.com/`],[`appAnchor`,``,`id`,`node_envproduction`],[`appAnchor`,``,`id`,`running-your-application`],[`appAnchor`,``,`id`,`health-checks`],[`routerLink`,`/recipes/terminus`],[`appAnchor`,``,`id`,`logging`],[`routerLink`,`/application/logger`],[`appAnchor`,``,`id`,`observability`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[1,`language-typescript`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`scaling-up-or-out`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.docker.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://kubernetes.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/elasticloadbalancing/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://azure.microsoft.com/en-us/services/load-balancer/`],[`appAnchor`,``,`id`,`some-other-tips`],[`routerLink`,`/security/helmet`],[`routerLink`,`/security/cors`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prometheus.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://newrelic.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/cloudwatch/`],[`routerLink`,`/security/rate-limiting`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/waf/`],[`appAnchor`,``,`id`,`dockerizing-your-application`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.docker.com/get-started`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://hub.docker.com/_/node`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://hub.docker.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/ecr/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://cloud.google.com/artifact-registry`],[`appAnchor`,``,`id`,`easy-deployment-with-mau`],[`appAnchor`,``,`id`,`deploying`],[`href`,`/cli/usages#nest-deploy`],[`appAnchor`,``,`id`,`why-mau`],[`src`,`https://www.mau.nestjs.com/docs/applications/dashboard.png`],[`appAnchor`,``,`id`,`how-mau-maps-to-this-guide`],[`href`,`/deployment#node_envproduction`],[`href`,`/deployment#logging`],[`href`,`/application/logger`],[`href`,`/deployment#scaling-up-or-out`],[`href`,`/deployment#health-checks`],[`href`,`/recipes/terminus`],[`href`,`/deployment#some-other-tips`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/deployment.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Oa$1(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),DT(4,`Deployment`),cf(),Oa$1(5,`p`),DT(6,`When you're ready to deploy your NestJS application to production, there are key steps you can take to ensure it runs as efficiently as possible. This guide covers essential tips and best practices for deploying your NestJS application successfully.`),cf(),Oa$1(7,`p`),DT(8,`If you'd rather not manage infrastructure yourself, `),Oa$1(9,`a`,4),DT(10,`Mau`),cf(),DT(11,`, our official deployment platform, gets you to production on AWS with a single command. Jump straight to `),Oa$1(12,`a`,5),DT(13,`Easy deployment with Mau`),cf(),DT(14,`, or read on for the underlying concepts that apply to any hosting choice.`),cf(),Oa$1(15,`h4`,6)(16,`span`),DT(17,`Prerequisites`),cf
2327()(),Oa$1(18,`p`),DT(19,`Before deploying your NestJS application, ensure you have:`),cf(),Oa$1(20,`ul`)(21,`li`),DT(22,`A working NestJS application that is ready for deployment.`),cf(),Oa$1(23,`li`),DT(24,`Access to a deployment platform or server where you can host your application.`),cf(),Oa$1(25,`li`),DT(26,`All necessary environment variables set up for your application.`),cf(),Oa$1(27,`li`),DT(28,`Any required services, like a database, set up and ready to go.`),cf(),Oa$1(29,`li`),DT(30,`Node.js 20.19 or later (22.12 or later on the 22.x line) installed on your deployment platform, as described in `),Oa$1(31,`a`,7),DT(32,`Prerequisites`),cf(),DT(33,`. Prefer a Node.js version that is still in active LTS.`),cf()(),Oa$1(34,`blockquote`,8)(35,`strong`),DT(36,`Hint`),cf(),DT(37,` With `),Oa$1(38,`a`,4),DT(39,`Mau`),cf(),DT(40,`, most of the list above is handled for you: it provisions the server, the databases and brokers your app needs, and the environment variables, so the only prerequisite left is the application itself.
2328`),cf(),Oa$1(41,`h4`,9)(42,`span`),DT(43,`Building your application`),cf()(),Oa$1(44,`p`),DT(45,`To build your NestJS application, compile your TypeScript code into JavaScript. This process generates a `),Oa$1(46,`code`),DT(47,`dist`),cf(),DT(48,` directory containing the compiled files. Build your application by running the following command:`),cf(),Oa$1(49,`pre`)(50,`code`,10),DT(51,`
2329$ npm run build
2330`),cf()(),Oa$1(52,`p`),DT(53,`This command typically runs `),Oa$1(54,`code`),DT(55,`nest build`),cf(),DT(56,` under the hood, which is a wrapper around the TypeScript compiler with some additional features (such as copying assets). If you have a custom build script, you can run it directly. For Nest CLI monorepos, pass the name of the project to build as an argument (`),Oa$1(57,`code`),DT(58,`npm run build my-app`),cf
2330(),DT(59,`).`),cf(),Oa$1(60,`p`),DT(61,`After a successful compilation, you should see a `),Oa$1(62,`code`),DT(63,`dist`),cf(),DT(64,` directory in your project root containing the compiled files, with `),Oa$1(65,`code`),DT(66,`main.js`),cf(),DT(67,` as the entry point. If you have any `),Oa$1(68,`code`),DT(69,`.ts`),cf(),DT(70,` files in the root directory of your project (and your `),Oa$1(71,`code`),DT(72,`tsconfig.json`),cf(),DT(73,` is configured to compile them), they are compiled into the `),Oa$1(74,`code`),DT(75,`dist`),cf(),DT(76,` directory as well, which changes the directory structure: instead of `),Oa$1(77,`code`),DT(78,`dist/main.js`),cf(),DT(79,`, you get `),Oa$1(80,`code`),DT(81,`dist/src/main.js`),cf(),DT(82,`. Keep that in mind when configuring your server.`),cf(),Oa$1(83,`h4`,11)(84,`span`),DT(85,`Production environment`),cf()(),Oa$1(86,`p`),DT(87,`Your production environment is where your application is accessible to external users. This could be a cloud-based platform like `),Oa$1(88,`a`,12),DT(89,`AWS`),cf(),DT(90,` (with EC2, ECS, etc.), `),Oa$1(91,`a`,13),DT(92,`Azure`),cf(),DT(93,`, or `),Oa$1(94,`a`,14),DT(95,`Google Cloud`),cf(),DT(96,`, or a dedicated server you manage, such as `),Oa$1(97,`a`,15),DT(98,`Hetzner`),cf(),DT(99,`.`),cf(),Oa$1(100,`p`),DT(101,`To simplify the deployment process and avoid manual setup, you can use `),Oa$1(102,`a`,4),DT(103,`Mau`),cf(),DT(104,`, our official platform for deploying NestJS applications on AWS. It gives you the benefits of AWS listed below without requiring you to configure any of it yourself. See `),Oa$1(105,`a`,5),DT(106,`Easy deployment with Mau`),cf(),DT(107,` for details.`),cf(),Oa$1(108,`p`),DT(109,`Some of the pros of using a `),Oa$1(110,`strong`),DT(111,`cloud-based platform`),cf(),DT(112,` or service like `),Oa$1(113,`a`,4),DT(114,`Mau`),cf(),DT(115,` include:`),cf(),Oa$1(116,`ul`)(117,`li`),DT(118,`Scalability: Scale your application as your user base grows.`),cf(),Oa$1(119,`li`),DT(120,`Security: Benefit from built-in security features and compliance certifications.`),cf(),Oa$1(121,`li`),DT(122,`Monitoring: Monitor your application's performance and health in real time.`),cf(),Oa$1(123,`li`),DT(124,`Reliability: Ensure your application is always available with high uptime guarantees.`),cf()(),Oa$1(125,`p`),DT(126,`On the other hand, cloud-based platforms are typically more expensive than self-hosting, and you may have less control over the underlying infrastructure. A simple VPS can be a good choice if you're looking for a more cost-effective solution and have the technical expertise to manage the server yourself. Keep in mind that you'll need to handle tasks like server maintenance, security, and backups manually.`),cf(),Oa$1(127,`h4`,16)(128,`span`),DT(129,`NODE_ENV=production`),cf()(),Oa$1(130,`p`),DT(131,`While there's technically no difference between development and production in Node.js and NestJS, it's good practice to set the `),Oa$1(132,`code`),DT(133,`NODE_ENV`),cf(),DT(134,` environment variable to `),Oa$1(135,`code`),DT(136,`production`),cf(),DT(137,` when running your application in a production environment, because some libraries in the ecosystem behave differently based on this variable (e.g., enabling or disabling debugging output).`),cf(),Oa$1(138,`p`),DT(139,`You can set the `),Oa$1(140,`code`),DT(141,`NODE_ENV`),cf(),DT(142,` environment variable when starting your application:`),cf(),Oa$1(143,`pre`)(144,`code`,10),DT(145,`
2331$ NODE_ENV=production node dist/main.js
2332`),cf()(),Oa$1(146,`p`),DT(147,`Alternatively, set it in your cloud provider's or Mau's dashboard.`),cf(),Oa$1(148,`h4`,17)(149,`span`),DT(150,`Running your application`),cf()(),Oa$1(151,`p`),DT(152,`To run your NestJS application in production, use the following command:`),cf(),Oa$1(153,`pre`)(154,`code`,10),DT(155,`
2333$ node dist/main.js # Adjust this based on your entry point location
2334`),cf()(),Oa$1(156,`p`),DT(157,`This command starts your application, which listens on the port passed to `),Oa$1(158,`code`),DT(159,`app.listen()`),cf(),DT(160,` (`),Oa$1(161,`code`),DT(162,`3000`),cf(),DT(163,` in newly generated projects, unless the `),Oa$1(164,`code`),DT(165,`PORT`),cf(),DT(166,` environment variable is set). Make sure your deployment platform routes traffic to that port.`),cf(),Oa$1(167,`p`),DT(168,`Alternatively, you can use the `),Oa$1(169,`code`),DT(170,`nest start`),cf(),DT(171,` command. It is a wrapper around `),Oa$1(172,`code`),DT(173,`node dist/main.js`),cf(),DT(174,`, with one key difference: it runs `),Oa$1(175,`code`),DT(176,`nest build`),cf(),DT(177,` before starting the application, so you don't need to run `),Oa$1(178,`code`),DT(179,`npm run build`),cf(),DT(180,` manually.`),cf(),Oa$1(181,`h4`,18)(182,`span`),DT(183,`Health checks`),cf()(),Oa$1(184,`p`),DT(185,`Health checks are essential for monitoring the health and status of your NestJS application in production. With a health check endpoint, you can regularly verify that your app is running as expected and respond to issues before they become critical.`),cf(),Oa$1(186,`p`),DT(187,`In NestJS, you can implement health checks with the `),Oa$1(188,`strong`),DT(189,`@nestjs/terminus`),cf(),DT(190,` package, which supports checks for database connections, external services, and custom indicators.`),cf(),Oa$1(191,`p`),DT(192,`See the `),Oa$1(193,`a`,19),DT(194,`health checks (Terminus)`),cf(),DT(195,` recipe to learn how to implement health checks in your NestJS application.`),cf(),Oa$1(196,`h4`,20)(197,`span`),DT(198,`Logging`),cf()(),Oa$1(199,`p`),DT(200,`Logging is essential for any production-ready application. It helps you track errors, monitor behavior, and troubleshoot issues. In NestJS, you can manage logging with the `),Oa$1(201,`a`,21),DT(202,`built-in logger`),cf(),DT(203,`, or opt for external libraries if you need more advanced features.`),cf(),Oa$1(204,`p`),DT(205,`Best practices for logging:`),cf
2334(),Oa$1(206,`ul`)(207,`li`),DT(208,`Log errors, not exceptions: Focus on logging detailed error messages to speed up debugging and issue resolution.`),cf(),Oa$1(209,`li`),DT(210,`Avoid sensitive data: Never log sensitive information such as passwords or tokens.`),cf(),Oa$1(211,`li`),DT(212,`Use correlation IDs: In distributed systems, include unique identifiers (like correlation IDs) in your logs to trace requests across services.`),cf(),Oa$1(213,`li`),DT(214,`Use log levels: Categorize logs by severity (e.g., `),Oa$1(215,`code`),DT(216,`info`),cf(),DT(217,`, `),Oa$1(218,`code`),DT(219,`warn`),cf(),DT(220,`, `),Oa$1(221,`code`),DT(222,`error`),cf(),DT(223,`), and disable debug or verbose logs in production to reduce noise.`),cf()(),Oa$1(224,`blockquote`,8)(225,`strong`),DT(226,`Hint`),cf(),DT(227,` If you're using `),Oa$1(228,`a`,12),DT(229,`AWS`),cf(),DT(230,` (with `),Oa$1(231,`a`,4),DT(232,`Mau`),cf(),DT(233,` or directly), consider JSON logging to make it easier to parse and analyze your logs.
2335`),cf(),Oa$1(234,`p`),DT(235,`For distributed applications, a centralized logging service such as Elasticsearch, Loggly, or Datadog is very useful. These tools offer log aggregation, search, and visualization, making it easier to monitor and analyze your application's performance and behavior.`),cf(),Oa$1(236,`h4`,22)(237,`span`),DT(238,`Observability`),cf()(),Oa$1(239,`p`),DT(240,`Health checks and logs tell you whether the application is up; they don't tell you which route got slower after the last deploy, which class is burning the time, or which line threw. For that, instrument the application with `),Oa$1(241,`a`,23),DT(242,`NestJS Observe`),cf(),DT(243,`, our official observability platform: install the `),Oa$1(244,`code`),DT(245,`@nestjs/observe`),cf(),DT(246,` SDK, pass an API key, and requests, jobs, errors, logs, and traces start streaming to a dashboard with no manual span wiring or collector to run.`),cf(),Oa$1(247,`app-copy-button`)(248,`pre`)(249,`code`,24),DT(250,`
2336const app = await NestFactory.create(AppModule, {
2337  instrument: ObserveInstrument,
2338});
2339`),cf()()(),Oa$1(251,`p`),DT(252,`See the `),Oa$1(253,`a`,25),DT(254,`Observability`),cf(),DT(255,` chapter for the full setup, including versioning deployments with `),Oa$1(256,`code`),DT(257,`serviceVersion`),cf(),DT(258,` so each release is compared against the one before it.`),cf(),Oa$1(259,`h4`,26)(260,`span`),DT(261,`Scaling up or out`),cf()(),Oa$1(262,`p`),DT(263,`Scaling your NestJS application effectively is crucial for handling increased traffic and ensuring optimal performance. There are two primary strategies for scaling: `),Oa$1(264,`strong`),DT(265,`vertical scaling`),cf(),DT(266,` and `),Oa$1(267,`strong`),DT(268,`horizontal scaling`),cf(),DT(269,`. Understanding both helps you design your application to manage load efficiently.`),cf(),Oa$1(270,`p`)(271,`strong`),DT(272,`Vertical scaling`),cf(),DT(273,`, often referred to as "scaling up", involves increasing the resources of a single server to improve its performance. This could mean adding more CPU, RAM, or storage to your existing machine. Key points to consider:`),cf(),Oa$1(274,`ul`)(275,`li`),DT(276,`Simplicity: Vertical scaling is generally simpler to implement since you only need to upgrade your existing server rather than manage multiple instances.`),cf(),Oa$1(277,`li`),DT(278,`Limitations: There are physical limits to how much you can scale a single machine. Once you reach the maximum capacity, you may need to consider other options.`),cf(),Oa$1(279,`li`),DT(280,`Cost-effectiveness: For applications with moderate traffic, vertical scaling can be cost-effective, as it reduces the need for additional infrastructure.`),cf()(),Oa$1(281,`p`),DT(282,`Example: If your NestJS app is hosted on a virtual machine and you notice that it's running slowly during peak hours, you can upgrade the VM to a larger instance with more resources, typically by selecting a larger instance type in your provider's dashboard.`),cf(),Oa$1(283,`p`)(284,`strong`),DT(285,`Horizontal scaling`),cf(),DT(286,`, or "scaling out", involves adding more servers or instances to distribute the load. This strategy is widely used in cloud environments and is essential for applications expecting high traffic. Benefits and considerations:`),cf(),Oa$1(287,`ul`)(288,`li`),DT(289,`Increased capacity: By adding more instances of your application, you can handle a larger number of concurrent users without degrading performance.`),cf(),Oa$1(290,`li`),DT(291,`Redundancy: The failure of one server doesn't bring down your entire application, because traffic can be redistributed among the remaining servers.`),cf(),Oa$1(292,`li`),DT(293,`Load balancing: To manage multiple instances effectively, use load balancers (like Nginx or AWS Elastic Load Balancing) to distribute incoming traffic evenly across your servers.`),cf()(),Oa$1(294,`p`),DT(295,`Example: For a NestJS application experiencing high traffic, you can deploy multiple instances of your app in a cloud environment and use a load balancer to route requests, ensuring that no single instance becomes a bottleneck.`),cf(),Oa$1(296,`p`),DT(297,`Containerization technologies like `),Oa$1(298,`a`,27),DT(299,`Docker`),cf(),DT(300,` and container orchestration platforms such as `),Oa$1(301,`a`,28),DT(302,`Kubernetes`),cf(),DT(303,` make this process straightforward. You can also use cloud-specific load balancers like `),Oa$1(304,`a`,29),DT(305,`AWS Elastic Load Balancing`),cf(),DT(306,` or `),Oa$1(307,`a`,30),DT(308,`Azure Load Balancer`),cf(),DT(309,` to distribute traffic across your application instances.`),cf(),Oa$1(310,`blockquote`,8)(311,`strong`),DT(312,`Hint`),cf(),Oa$1(313,`a`,4),DT(314,`Mau`),cf(),DT(315,` offers built-in supp
2339ort for horizontal scaling on AWS, so you can deploy multiple instances of your NestJS application and manage them with just a few clicks.
2340`),cf(),Oa$1(316,`h4`,31)(317,`span`),DT(318,`Some other tips`),cf()(),Oa$1(319,`p`),DT(320,`Keep these additional tips in mind when deploying your NestJS application:`),cf(),Oa$1(321,`ul`)(322,`li`)(323,`strong`),DT(324,`Security`),cf(),DT(325,`: Protect your application from common threats such as SQL injection and XSS. See the chapters in the "Security" category, such as `),Oa$1(326,`a`,32),DT(327,`Helmet`),cf(),DT(328,` and `),Oa$1(329,`a`,33),DT(330,`CORS`),cf(),DT(331,`, for details.`),cf(),Oa$1(332,`li`)(333,`strong`),DT(334,`Monitoring`),cf(),DT(335,`: Use monitoring tools like `),Oa$1(336,`a`,34),DT(337,`Prometheus`),cf(),DT(338,` or `),Oa$1(339,`a`,35),DT(340,`New Relic`),cf(),DT(341,` to track your application's performance and health. Cloud providers and Mau may offer built-in monitoring services (such as `),Oa$1(342,`a`,36),DT(343,`AWS CloudWatch`),cf(),DT(344,`).`),cf(),Oa$1(345,`li`)(346,`strong`),DT(347,`Do not hardcode environment variables`),cf(),DT(348,`: Avoid hardcoding sensitive information like API keys, passwords, or tokens in your code. Use environment variables or a secrets manager to store and access these values securely.`),cf(),Oa$1(349,`li`)(350,`strong`),DT(351,`Backups`),cf(),DT(352,`: Regularly back up your data to prevent data loss in case of an incident.`),cf(),Oa$1(353,`li`)(354,`strong`),DT(355,`Automate deployments`),cf(),DT(356,`: Use CI/CD pipelines to automate your deployment process and ensure consistency across environments.`),cf(),Oa$1(357,`li`)(358,`strong`),DT(359,`Rate limiting`),cf(),DT(360,`: Implement rate limiting to prevent abuse and protect your application from DDoS attacks. See the `),Oa$1(361,`a`,37),DT(362,`rate limiting`),cf(),DT(363,` chapter for details, or use a service like `),Oa$1(364,`a`,38),DT(365,`AWS WAF`),cf(),DT(366,` for advanced protection.`),cf()(),Oa$1(367,`h4`,39)(368,`span`),DT(369,`Dockerizing your application`),cf()(),Oa$1(370,`p`)(371,`a`,27),DT(372,`Docker`),cf(),DT(373,` is a platform that uses containerization to let developers package applications along with their dependencies into a standardized unit called a container. Containers are lightweight, portable, and isolated, which makes them ideal for deploying applications in various environments, from local development to production.`),cf(),Oa$1(374,`p`),DT(375,`Benefits of Dockerizing your NestJS application:`),cf(),Oa$1(376,`ul`)(377,`li`),DT(378,`Consistency: Docker ensures that your application runs the same way on any machine, eliminating the "it works on my machine" problem.`),cf(),Oa$1(379,`li`),DT(380,`Isolation: Each container runs in its own isolated environment, preventing conflicts between dependencies.`),cf(),Oa$1(381,`li`),DT(382,`Scalability: You can scale your application by running multiple containers across different machines or cloud instances.`),cf(),Oa$1(383,`li`),DT(384,`Portability: Containers move between environments without changes, so you can deploy your application on different platforms.`),cf()(),Oa$1(385,`p`),DT(386,`To install Docker, follow the instructions on the `),Oa$1(387,`a`,40),DT(388,`Docker website`),cf(),DT(389,`. Once Docker is installed, create a `),Oa$1(390,`code`),DT(391,`Dockerfile`),cf(),DT(392,` in your NestJS project. It is a text file that contains the instructions Docker uses to build your container image.`),cf(),Oa$1(393,`p`),DT(394,`Here's a sample `),Oa$1(395,`code`),DT(396,`Dockerfile`),cf(),DT(397,` for a NestJS application:`),cf(),Oa$1(398,`pre`)(399,`code`,10),DT(400,`
2341# Use the official Node.js image as the base image
2342FROM node:24
2343
2344# Set the working directory inside the container
2345WORKDIR /usr/src/app
2346
2347# Copy package.json and package-lock.json to the working directory
2348COPY package*.json ./
2349
2350# Install the application dependencies
2351RUN npm install
2352
2353# Copy the rest of the application files
2354COPY . .
2355
2356# Build the NestJS application
2357RUN npm run build
2358
2359# Expose the application port
2360EXPOSE 3000
2361
2362# Command to run the application
2363CMD ["node", "dist/main"]
2364`),cf()(),Oa$1(401,`blockquote`,8)(402,`strong`),DT(403,`Hint`),cf(),DT(404,` Replace `),Oa$1(405,`code`),DT(406,`node:24`),cf(),DT(407,` with the Node.js version your project uses (NestJS v12 requires Node.js 20.19 or later, or 22.12 or later on the 22.x line). You can find the available Node.js Docker images in the `),Oa$1(408,`a`,41),DT(409,`official Docker Hub repository`),cf
2364(),DT(410,`.
2365`),cf(),Oa$1(411,`p`),DT(412,`This basic `),Oa$1(413,`code`),DT(414,`Dockerfile`),cf(),DT(415,` sets up a Node.js environment, installs the application dependencies, builds the NestJS application, and runs it. You can customize it based on your project requirements (e.g., use a different base image, optimize the build process, or install only production dependencies).`),cf(),Oa$1(416,`p`),DT(417,`Next, create a `),Oa$1(418,`code`),DT(419,`.dockerignore`),cf(),DT(420,` file in your project root to specify which files and directories Docker should ignore when building the image:`),cf(),Oa$1(421,`pre`)(422,`code`,10),DT(423,`
2366node_modules
2367dist
2368*.log
2369*.md
2370.git
2371`),cf()(),Oa$1(424,`p`),DT(425,`This file keeps unnecessary files out of the container image, keeping it lightweight. With the `),Oa$1(426,`code`),DT(427,`Dockerfile`),cf(),DT(428,` in place, you can build your Docker image. Open your terminal, navigate to your project directory, and run the following command:`),cf(),Oa$1(429,`pre`)(430,`code`,10),DT(431,`
2372docker build -t my-nestjs-app .
2373`),cf()(),Oa$1(432,`p`),DT(433,`In this command:`),cf(),Oa$1(434,`ul`)(435,`li`)(436,`code`),DT(437,`-t my-nestjs-app`),cf(),DT(438,`: Tags the image with the name `),Oa$1(439,`code`),DT(440,`my-nestjs-app`),cf(),DT(441,`.`),cf(),Oa$1(442,`li`)(443,`code`),DT(444,`.`),cf(),DT(445,`: Indicates the current directory as the build context.`),cf()(),Oa$1(446,`p`),DT(447,`After building the image, run it as a container:`),cf(),Oa$1(448,`pre`)(449,`code`,10),DT(450,`
2374docker run -p 3000:3000 my-nestjs-app
2375`),cf()(),Oa$1(451,`p`),DT(452,`In this command:`),cf(),Oa$1(453,`ul`)(454,`li`)(455,`code`),DT(456,`-p 3000:3000`),cf(),DT(457,`: Maps port 3000 on your host machine to port 3000 in the container.`),cf(),Oa$1(458,`li`)(459,`code`),DT(460,`my-nestjs-app`),cf(),DT(461,`: Specifies the image to run.`),cf()(),Oa$1(462,`p`),DT(463,`Your NestJS application should now be running inside a Docker container.`),cf(),Oa$1(464,`p`),DT(465,`To deploy your Docker image to a cloud provider or share it with others, push it to a container registry (such as `),Oa$1(466,`a`,42),DT(467,`Docker Hub`),cf(),DT(468,`, `),Oa$1(469,`a`,43),DT(470,`Amazon ECR`),cf(),DT(471,`, or `),Oa$1(472,`a`,44),DT(473,`Google Artifact Registry`),cf(),DT(474,`).`),cf(),Oa$1(475,`p`),DT(476,`Once you've chosen a registry, push your image:`),cf(),Oa$1(477,`pre`)(478,`code`,10),DT(479,`
2376docker login # Log in to your Docker registry
2377docker tag my-nestjs-app your-dockerhub-username/my-nestjs-app # Tag your image
2378docker push your-dockerhub-username/my-nestjs-app # Push your image
2379`),cf()(),Oa$1(480,`p`),DT(481,`Replace `),Oa$1(482,`code`),DT(483,`your-dockerhub-username`),cf(),DT(484,` with your Docker Hub username or the appropriate registry URL. After pushing your image, you can pull it on any machine and run it as a container.`),cf(),Oa$1(485,`p`),DT(486,`Cloud providers like AWS, Azure, and Google Cloud offer managed container services that simplify deploying and managing containers at scale. These services provide features like auto-scaling, load balancing, and monitoring for your NestJS application in production.`),cf(),Oa$1(487,`h4`,45)(488,`span`),DT(489,`Easy deployment with Mau`),cf()(),Oa$1(490,`p`)(491,`a`,4),DT(492,`Mau`),cf(),DT(493,` is our official platform for deploying NestJS applications on `),Oa$1(494,`a`,12),DT(495,`AWS`),cf(),DT(496,`. It handles everything the previous sections described (provisioning the server, wiring up databases and brokers, managing environment variables, scaling, monitoring, and CI/CD), so you don't have to assemble it yourself.`),cf(),Oa$1(497,`h5`,46)(498,`span`),DT(499,`Deploying`),cf()(),Oa$1(500,`p`),DT(501,`As of NestJS v12, the Nest CLI ships a `),Oa$1(502,`code`),DT(503,`deploy`),cf(),DT(504,` command. Run it from your project root:`),cf(),Oa$1(505,`pre`)(506,`code`,10),DT(507,`
2380$ nest deploy
2381`),cf()(),Oa$1(508,`p`),DT(509,`If Mau isn't installed yet, the command offers to add `),Oa$1(510,`code`),DT(511,`@nestjs/mau`),cf(),DT(512,` as a dev dependency and then continues. Any options you pass are forwarded to `),Oa$1(513,`code`),DT(514,`mau deploy`),cf(),DT(515,`. See `),Oa$1(516,`a`,47),DT(517,`nest deploy`),cf(),DT(518,` for details.`),cf(),Oa$1(519,`p`),DT(520,`You can also install the Mau CLI globally and invoke it directly. This is the right choice for CI environments, where interactive prompts aren't available:`),cf
2381(),Oa$1(521,`pre`)(522,`code`,10),DT(523,`
2382$ npm install -g @nestjs/mau
2383$ mau deploy
2384`),cf()(),Oa$1(524,`p`),DT(525,`Once the deployment completes, your application is live on AWS, typically within minutes of your first run.`),cf(),Oa$1(526,`h5`,48)(527,`span`),DT(528,`Why Mau`),cf()(),Oa$1(529,`p`),DT(530,`With Mau, provisioning and maintaining your infrastructure takes just a few clicks. Under the hood, Mau uses `),Oa$1(531,`strong`),DT(532,`Amazon Web Services`),cf(),DT(533,` to give you a powerful and reliable platform, while abstracting away the complexity of AWS. You get the advantages of AWS without having to learn and manage its details, which makes Mau a good fit for startups, small-to-medium businesses, large enterprises, and any developer who would rather ship than configure infrastructure.`),cf(),Oa$1(534,`figure`),Za$1(535,`img`,49),cf(),Oa$1(536,`p`),DT(537,`With `),Oa$1(538,`a`,4),DT(539,`Mau`),cf(),DT(540,`, you can:`),cf(),Oa$1(541,`ul`)(542,`li`),DT(543,`Deploy your NestJS applications with just a few clicks (APIs, microservices, etc.).`),cf(),Oa$1(544,`li`),DT(545,`Provision `),Oa$1(546,`strong`),DT(547,`databases`),cf(),DT(548,` such as:`),Oa$1(549,`ul`)(550,`li`),DT(551,`PostgreSQL`),cf(),Oa$1(552,`li`),DT(553,`MySQL`),cf(),Oa$1(554,`li`),DT(555,`MongoDB (DocumentDB)`),cf(),Oa$1(556,`li`),DT(557,`Redis`),cf(),Oa$1(558,`li`),DT(559,`more`),cf()()(),Oa$1(560,`li`),DT(561,`Set up broker services like:`),Oa$1(562,`ul`)(563,`li`),DT(564,`RabbitMQ`),cf(),Oa$1(565,`li`),DT(566,`Kafka`),cf(),Oa$1(567,`li`),DT(568,`NATS`),cf()()(),Oa$1(569,`li`),DT(570,`Deploy scheduled tasks (`),Oa$1(571,`strong`),DT(572,`CRON jobs`),cf(),DT(573,`) and background workers.`),cf(),Oa$1(574,`li`),DT(575,`Deploy lambda functions and serverless applications.`),cf(),Oa$1(576,`li`),DT(577,`Set up `),Oa$1(578,`strong`),DT(579,`CI/CD pipelines`),cf(),DT(580,` for automated deployments.`),cf(),Oa$1(581,`li`),DT(582,`And much more.`),cf()(),Oa$1(583,`h5`,50)(584,`span`),DT(585,`How Mau maps to this guide`),cf()(),Oa$1(586,`p`),DT(587,`Each topic covered earlier in this chapter has a managed equivalent in Mau:`),cf(),Oa$1(588,`table`)(589,`tr`)(590,`td`)(591,`a`,51),DT(592,`Environment variables`),cf()(),Oa$1(593,`td`),DT(594,`Set `),Oa$1(595,`code`),DT(596,`NODE_ENV`),cf(),DT(597,` and your secrets in the Mau dashboard instead of managing them on the server.`),cf()(),Oa$1(598,`tr`)(599,`td`)(600,`a`,52),DT(601,`Logging`),cf()(),Oa$1(602,`td`),DT(603,`Logs are collected and viewable in the dashboard. JSON logging is especially useful here; see the `),Oa$1(604,`a`,53),DT(605,`Logger chapter`),cf(),DT(606,`.`),cf()(),Oa$1(607,`tr`)(608,`td`)(609,`a`,54),DT(610,`Scaling`),cf()(),Oa$1(611,`td`),DT(612,`Built-in support for horizontal scaling: run multiple instances of your application and manage them from the dashboard.`),cf()(),Oa$1(613,`tr`)(614,`td`)(615,`a`,55),DT(616,`Health checks`),cf()(),Oa$1(617,`td`),DT(618,`Point Mau at the endpoint you expose with `),Oa$1(619,`a`,56),DT(620,`Terminus`),cf(),DT(621,` and unhealthy instances are handled for you.`),cf()(),Oa$1(622,`tr`)(623,`td`)(624,`a`,57),DT(625,`Monitoring and backups`),cf()(),Oa$1(626,`td`),DT(627,`Metrics come from AWS CloudWatch, and managed databases are backed up automatically.`),cf()()(),Oa$1(628,`p`),DT(629,`Sign up today and `),Oa$1(630,`a`,4),DT(631,`deploy with Mau`),cf(),DT(632,` to get your NestJS applications up and running on AWS in minutes.`),cf()(),Oa$1(633,`a`,58),Za$1(634,`i`,59),Oa$1(635,`span`),DT(636,`Edit on GitHub`),cf()()())},dependencies:[xt,tn$1,tu],encapsulation:2})}return o})();var Wo=[{path:``,component:Hr,children:[{path:``,component:Xr},{path:`first-steps`,component:Kr,data:{title:`First steps`}},{path:`controllers`,component:Ur,data:{title:`Controllers`}},{path:`components`,redirectTo:`providers`},{path:`providers`,component:Gr,data:{title:`Providers`}},{path:`modules`,component:ta,data:{title:`Modules`}},{path:`middleware`,component:Zr,data:{title:`Middleware`}},{path:`pipes`,component:na,data:{title:`Pipes`}},{path:`guards`,component:Qr,data:{title:`Guards`}},{path:`exception-filters`,component:Yr,data:{title:`Exception filters`}},{path:`interceptors`,component:$r,data:{title:`Interceptors`}},{path:`custom-decorators`,component:Wr,data:{title:`Custom decorators`}},{path:`standalone-applications`,component:Jr,data:{title:`Standalone applications`}},{path:`application-context`,redirectTo:`standalone-applications`},{path:`discover/companies`,component:Vr,data:{title:`Discover - Who is using Nest?`}},{path:`migration-guide`,component:ea,data:{title:`Migration guide - FAQ`}},{path:`deployment`,component:aa,data:{title:`Deployment`}}
2384,{path:`support`,component:ia,data:{title:`Support`}},{path:`consulting`,component:In,resolve:{url:`externalUrlRedirectResolver`},canActivate:[ra],data:{externalUrl:`https://enterprise.nestjs.com`}},{path:`enterprise`,redirectTo:`consulting`},{path:`enterprise`,component:In,data:{title:`Official Support`}},{path:`fundamentals`,loadChildren:()=>import(`./chunk-DFsqiYdE.js`).then(o=>o.FUNDAMENTALS_ROUTES)},{path:`techniques`,loadChildren:()=>import(`./chunk-CVeIuF81.js`).then(o=>o.TECHNIQUES_ROUTES)},{path:`application`,loadChildren:()=>import(`./chunk-CQ2kDAA7.js`).then(o=>o.APPLICATION_ROUTES)},{path:`data`,loadChildren:()=>import(`./chunk-KwU5YinL.js`).then(o=>o.DATA_ROUTES)},{path:`reliability`,loadChildren:()=>import(`./chunk-BogvD8zg.js`).then(o=>o.RELIABILITY_ROUTES)},{path:`http`,loadChildren:()=>import(`./chunk-C6vS4K3d.js`).then(o=>o.HTTP_ROUTES)},{path:`security`,loadChildren:()=>import(`./chunk-CeGv9OCg.js`).then(o=>o.SECURITY_ROUTES)},{path:`graphql`,loadChildren:()=>import(`./chunk-DGdATwZE.js`).then(o=>o.GRAPHQL_ROUTES)},{path:`websockets`,loadChildren:()=>import(`./chunk-1a_Q8Avm.js`).then(o=>o.WEBSOCKETS_ROUTES)},{path:`microservices`,loadChildren:()=>import(`./chunk-5icBr8qA.js`).then(o=>o.MICROSERVICES_ROUTES)},{path:`recipes`,loadChildren:()=>import(`./chunk-iHcpAzUX.js`).then(o=>o.RECIPES_ROUTES)},{path:`faq`,loadChildren:()=>import(`./chunk-O6W6PbCo.js`).then(o=>o.FAQ_ROUTES)},{path:`cli`,loadChildren:()=>import(`./chunk-DkhFtZBL.js`).then(o=>o.CLI_ROUTES)},{path:`openapi`,loadChildren:()=>import(`./chunk-rgrK2l3Z.js`).then(o=>o.OPENAPI_ROUTES)},{path:`devtools`,loadChildren:()=>import(`./chunk-CgzPF14S.js`).then(o=>o.DEVTOOLS_ROUTES)},{path:`observability`,loadChildren:()=>import(`./chunk-CZv-vHS_.js`).then(o=>o.OBSERVABILITY_ROUTES)}]},{path:`**`,redirectTo:Cr}];var oa=sR.forRoot(Wo,{scrollPositionRestoration:`enabled`,anchorScrolling:`enabled`,preloadingStrategy:nR,onSameUrlNavigation:`reload`});var Vo=1e3;var Yo=1e4;var sa=[`wheel`,`touchstart`,`keydown`,`mousedown`];var la=(()=>{class o{document=p(Y);window=this.document.defaultView;offset=()=>[0,0];lastPathname;stopPinning;setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,a){this.stopPinning?.(),this.lastPathname=this.window.location.pathname,this.window.scrollTo(j(m({},a),{left:i[0],top:i[1]}))}scrollToAnchor(i,a){this.stopPinning?.();let s=this.lastPathname===this.window.location.pathname;if(this.lastPathname=this.window.location.pathname,!s){this.pinAnchor(i);return}let l=this.findAnchor(i);l&&(this.scrollBy(this.distanceToTarget(l),a),l.focus({preventScroll:!0}))}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch(a){}}pinAnchor(i){let a=this.window.performance.now(),s=a,l=null,d=0,m=()=>{this.window.cancelAnimationFrame(d);for(let u of sa)this.window.removeEventListener(u,m,!0);this.stopPinning===m&&(this.stopPinning=void 0)};for(let u of sa)this.window.addEventListener(u,m,{capture:!0,passive:!0});this.stopPinning=m;let h=()=>{let u=this.window.performance.now();if(l||(l=this.findAnchor(i),l?.focus({preventScroll:!0})),l&&this.scrollBy(this.distanceToTarget(l),{behavior:`instant`})&&(s=u),u-s>=Vo||u-a>=Yo){m();return}d=this.window.requestAnimationFrame(h)};h()}distanceToTarget(i){let a=parseFloat(this.window.getComputedStyle(i).scrollMarginTop)||0;return i.getBoundingClientRect().top-a-this.offset()[1]}scrollBy(i,a){if(Math.abs(i)<1)return!1;let s=this.window.scrollY;return this.window.scrollTo(j(m({},a),{top:s+i})),this.window.scrollY!==s}findAnchor(i){return this.document.getElementById(i)??this.document.getElementsByName(i)[0]??null}static ɵfac=function(a){return new(a||o)};static ɵprov=S({token:o,factory:o.ɵfac})}return o})();wt.production;dM(_r,{providers:[yH(),bp(vM,oa),Q_(X_(),K_()),Er(),{provide:Mf,useClass:la}]});export{rm as A,Zy as C,lf as D,hf as E,uf as M,wt$1 as N,p as O,xy as P,Za$1 as S,ef as T,QS as _,u as a,Wy as b,s as c,DT as d,Jw as f,Oa$1 as g,OT as h,g as i,tu as j,qy as k,AT as l,My as m,tn$1 as n,l as o,Ky as p,xt as r,l$1 as s,At$1 as t,By as u,Qy as v,cf as w,Yy as x,UC as y};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.