@wizishop/img-manager-webelement 0.0.81 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{5-es2015.0.0.81.js → 5-es2015.0.0.82.js} +0 -0
- package/{5-es5.0.0.81.js → 5-es5.0.0.82.js} +0 -0
- package/{main-es2015.0.0.81.js → main-es2015.0.0.82.js} +1 -1
- package/{main-es5.0.0.81.js → main-es5.0.0.82.js} +1 -1
- package/package.json +1 -1
- package/{polyfills-es2015.0.0.81.js → polyfills-es2015.0.0.82.js} +0 -0
- package/{polyfills-es5.0.0.81.js → polyfills-es5.0.0.82.js} +0 -0
- package/{runtime-es2015.0.0.81.js → runtime-es2015.0.0.82.js} +0 -0
- package/{runtime-es5.0.0.81.js → runtime-es5.0.0.82.js} +0 -0
- package/{styles.0.0.81.css → styles.0.0.82.css} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},"0Tit":function(t,e){var n="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function r(t){return 3*t}function o(t,e,n){return((i(e,n)*t+s(e,n))*t+r(e))*t}function a(t,e,n){return 3*i(e,n)*t*t+2*s(e,n)*t+r(e)}function l(t){return t}t.exports=function(t,e,i,s){if(!(0<=t&&t<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&i===s)return l;for(var r=n?new Float32Array(11):new Array(11),c=0;c<11;++c)r[c]=o(.1*c,t,i);return function(n){return 0===n?0:1===n?1:o(function(e){for(var n=0,s=1;10!==s&&r[s]<=e;++s)n+=.1;--s;var l=n+(e-r[s])/(r[s+1]-r[s])*.1,c=a(l,t,i);return c>=.001?function(t,e,n,i){for(var s=0;s<4;++s){var r=a(e,n,i);if(0===r)return e;e-=(o(e,n,i)-t)/r}return e}(e,l,t,i):0===c?l:function(t,e,n,i,s){var r,a,l=0;do{(r=o(a=e+(n-e)/2,i,s)-t)>0?n=a:e=a}while(Math.abs(r)>1e-7&&++l<10);return a}(e,n,n+.1,t,i)}(n),e,s)}}},"4fRq":function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);t.exports=function(){return n(i),i}}else{var s=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),s[e]=t>>>((3&e)<<3)&255;return s}}},EcEN:function(t,e,n){var i=n("xDdU"),s=n("xk4V"),r=s;r.v1=i,r.v4=s,t.exports=r},I2ZF:function(t,e){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}},xDdU:function(t,e,n){var i,s,r=n("4fRq"),o=n("I2ZF"),a=0,l=0;t.exports=function(t,e,n){var c=e&&n||0,h=e||[],u=(t=t||{}).node||i,d=void 0!==t.clockseq?t.clockseq:s;if(null==u||null==d){var p=r();null==u&&(u=i=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=s=16383&(p[6]<<8|p[7]))}var g=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:l+1,f=g-a+(m-l)/1e4;if(f<0&&void 0===t.clockseq&&(d=d+1&16383),(f<0||g>a)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=g,l=m,s=d;var _=(1e4*(268435455&(g+=122192928e5))+m)%4294967296;h[c++]=_>>>24&255,h[c++]=_>>>16&255,h[c++]=_>>>8&255,h[c++]=255&_;var v=g/4294967296*1e4&268435455;h[c++]=v>>>8&255,h[c++]=255&v,h[c++]=v>>>24&15|16,h[c++]=v>>>16&255,h[c++]=d>>>8|128,h[c++]=255&d;for(var y=0;y<6;++y)h[c+y]=u[y];return e||o(h)}},xk4V:function(t,e,n){var i=n("4fRq"),s=n("I2ZF");t.exports=function(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[r+a]=o[a];return e||s(o)}},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let s=!1;const r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else s&&console.log("RxJS: Back to a better error behavior. Thank you. <3");s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(r.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const h=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let u=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_unsubscribe:s,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;t<n.length;++t)n[t].remove(this);if(i(s))try{s.call(this)}catch(o){e=o instanceof h?d(o.errors):[o]}if(l(r)){let t=-1,n=r.length;for(;++t<n;){const n=r[t];if(c(n))try{n.unsubscribe()}catch(o){e=e||[],o instanceof h?e=e.concat(d(o.errors)):e.push(o)}}}if(e)throw new h(e)}add(e){let n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){const e=n;n=new t,n._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:i}=n;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}const s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}return t.EMPTY=function(t){return t.closed=!0,t}(new t),t})();function d(t){return t.reduce((t,e)=>t.concat(e instanceof h?e.errors:e),[])}const p=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class g extends u{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof g?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new m(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new m(this,t,e,n)}}[p](){return this}static create(t,e,n){const i=new g(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class m extends g{constructor(t,e,n,s){let r;super(),this._parentSubscriber=t;let o=this;i(e)?r=e:e&&(r=e.next,n=e.error,s=e.complete,e!==a&&(o=Object.create(e),i(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;r.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=r;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);r.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),r.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!r.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return r.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(o(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const f=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function _(t){return t}function v(...t){return y(t)}function y(t){return 0===t.length?_:1===t.length?t[0]:function(e){return t.reduce((t,e)=>e(t),e)}}let b=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:i}=this,s=function(t,e,n){if(t){if(t instanceof g)return t;if(t[p])return t[p]()}return t||e||n?new g(t,e,n):new g(a)}(t,e,n);if(s.add(i?i.call(s,this.source):this.source||r.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),r.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){r.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:i}=t;if(e||i)return!1;t=n&&n instanceof g?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=w(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(s){n(s),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[f](){return this}pipe(...t){return 0===t.length?this:y(t)(this)}toPromise(t){return new(t=w(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function w(t){if(t||(t=r.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const C=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class S extends u{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class I extends g{constructor(t){super(t),this.destination=t}}let E=(()=>{class t extends b{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[p](){return new I(this)}lift(t){const e=new x(this,this);return e.operator=t,e}next(t){if(this.closed)throw new C;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].next(t)}}error(t){if(this.closed)throw new C;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].error(t);this.observers.length=0}complete(){if(this.closed)throw new C;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new C;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new C;return this.hasError?(t.error(this.thrownError),u.EMPTY):this.isStopped?(t.complete(),u.EMPTY):(this.observers.push(t),new S(this,t))}asObservable(){const t=new b;return t.source=this,t}}return t.create=(t,e)=>new x(t,e),t})();class x extends E{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):u.EMPTY}}function P(t){return t&&"function"==typeof t.schedule}class T extends g{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const k=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.complete()};function M(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}const D=M(),A=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function O(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const R=t=>{if(t&&"function"==typeof t[f])return i=t,t=>{const e=i[f]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(A(t))return k(t);if(O(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[D])return e=t,t=>{const n=e[D]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,i};function L(t,e,n,i,s=new T(t,n,i)){if(!s.closed)return e instanceof b?e.subscribe(s):R(e)(s)}class N extends g{notifyNext(t,e,n,i,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function z(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new F(t,e))}}class F{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new V(t,this.project,this.thisArg))}}class V extends g{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function U(t,e){return new b(n=>{const i=new u;let s=0;return i.add(e.schedule((function(){s!==t.length?(n.next(t[s++]),n.closed||i.add(this.schedule())):n.complete()}))),i})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[f]}(t))return function(t,e){return new b(n=>{const i=new u;return i.add(e.schedule(()=>{const s=t[f]();i.add(s.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if(O(t))return function(t,e){return new b(n=>{const i=new u;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if(A(t))return U(t,e);if(function(t){return t&&"function"==typeof t[D]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new b(n=>{const i=new u;let s;return i.add(()=>{s&&"function"==typeof s.return&&s.return()}),i.add(e.schedule(()=>{s=t[D](),i.add(e.schedule((function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())})))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof b?t:new b(R(t))}function B(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(B((n,i)=>j(t(n,i)).pipe(z((t,s)=>e(n,t,i,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new H(t,n)))}class H{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new $(t,this.project,this.concurrent))}}class $ extends N{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){const i=new T(this,e,n),s=this.destination;s.add(i);const r=L(this,t,void 0,void 0,i);r!==i&&s.add(r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,i,s){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function W(t=Number.POSITIVE_INFINITY){return B(_,t)}function q(t,e){return e?U(t,e):new b(k(t))}function G(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return P(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof b?t[0]:W(e)(q(t,n))}function Q(){return function(t){return t.lift(new K(t))}}class K{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new Z(t,n),s=e.subscribe(i);return i.closed||(i.connection=n.connect()),s}}class Z extends g{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class Y extends b{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new u,t.add(this.source.subscribe(new J(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.EMPTY)),t}refCount(){return Q()(this)}}const X=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class J extends I{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function tt(){return new E}function et(t){return{toString:t}.toString()}function nt(t,e,n){return et(()=>{const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return i.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,i){const s=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;s.length<=i;)s.push(null);return(s[i]=s[i]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const it=nt("Inject",t=>({token:t})),st=nt("Optional"),rt=nt("Self"),ot=nt("SkipSelf");var at=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function lt(t){for(let e in t)if(t[e]===lt)return e;throw Error("Could not find renamed property on target object.")}function ct(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ht(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ut(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function dt(t){return pt(t,t[mt])||pt(t,t[vt])}function pt(t,e){return e&&e.token===t?e:null}function gt(t){return t&&(t.hasOwnProperty(ft)||t.hasOwnProperty(yt))?t[ft]:null}const mt=lt({"\u0275prov":lt}),ft=lt({"\u0275inj":lt}),_t=lt({"\u0275provFallback":lt}),vt=lt({ngInjectableDef:lt}),yt=lt({ngInjectorDef:lt});function bt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function wt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Ct=lt({__forward_ref__:lt});function St(t){return t.__forward_ref__=St,t.toString=function(){return bt(this())},t}function It(t){return Et(t)?t():t}function Et(t){return"function"==typeof t&&t.hasOwnProperty(Ct)&&t.__forward_ref__===St}const xt="undefined"!=typeof globalThis&&globalThis,Pt="undefined"!=typeof window&&window,Tt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,kt="undefined"!=typeof global&&global,Mt=xt||kt||Pt||Tt,Dt=lt({"\u0275cmp":lt}),At=lt({"\u0275dir":lt}),Ot=lt({"\u0275pipe":lt}),Rt=lt({"\u0275mod":lt}),Lt=lt({"\u0275loc":lt}),Nt=lt({"\u0275fac":lt}),zt=lt({__NG_ELEMENT_ID__:lt});class Ft{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ht({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const Vt=new Ft("INJECTOR",-1),Ut={},jt=/\n/gm,Bt=lt({provide:String,useValue:lt});let Ht,$t=void 0;function Wt(t){const e=$t;return $t=t,e}function qt(t){const e=Ht;return Ht=t,e}function Gt(t,e=at.Default){if(void 0===$t)throw new Error("inject() must be called from an injection context");return null===$t?Zt(t,void 0,e):$t.get(t,e&at.Optional?null:void 0,e)}function Qt(t,e=at.Default){return(Ht||Gt)(It(t),e)}const Kt=Qt;function Zt(t,e,n){const i=dt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&at.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}function Yt(t){const e=[];for(let n=0;n<t.length;n++){const i=It(t[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let t=void 0,n=at.Default;for(let e=0;e<i.length;e++){const s=i[e];s instanceof st||"Optional"===s.ngMetadataName||s===st?n|=at.Optional:s instanceof ot||"SkipSelf"===s.ngMetadataName||s===ot?n|=at.SkipSelf:s instanceof rt||"Self"===s.ngMetadataName||s===rt?n|=at.Self:t=s instanceof it||s===it?s.token:s}e.push(Qt(t,n))}else e.push(Qt(i))}return e}class Xt{get(t,e=Ut){if(e===Ut){const e=new Error(`NullInjectorError: No provider for ${bt(t)}!`);throw e.name="NullInjectorError",e}return e}}class Jt{}class te{}function ee(t,e){t.forEach(t=>Array.isArray(t)?ee(t,e):e(t))}function ne(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function ie(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function se(t,e){const n=[];for(let i=0;i<t;i++)n.push(e);return n}function re(t,e,n){let i=ae(t,e);return i>=0?t[1|i]=n:(i=~i,function(t,e,n,i){let s=t.length;if(s==e)t.push(n,i);else if(1===s)t.push(i,t[0]),t[0]=n;else{for(s--,t.push(t[s-1],t[s]);s>e;)t[s]=t[s-2],s--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function oe(t,e){const n=ae(t,e);if(n>=0)return t[1|n]}function ae(t,e){return function(t,e,n){let i=0,s=t.length>>1;for(;s!==i;){const n=i+(s-i>>1),r=t[n<<1];if(e===r)return n<<1;r>e?s=n:i=n+1}return~(s<<1)}(t,e)}const le=function(){var t={OnPush:0,Default:1};return t[t.OnPush]="OnPush",t[t.Default]="Default",t}(),ce=function(){var t={Emulated:0,Native:1,None:2,ShadowDom:3};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t[t.ShadowDom]="ShadowDom",t}(),he={},ue=[];let de=0;function pe(t){return et(()=>{const e=t.type,n=e.prototype,i={},s={type:e,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onChanges:null,onInit:n.ngOnInit||null,doCheck:n.ngDoCheck||null,afterContentInit:n.ngAfterContentInit||null,afterContentChecked:n.ngAfterContentChecked||null,afterViewInit:n.ngAfterViewInit||null,afterViewChecked:n.ngAfterViewChecked||null,onDestroy:n.ngOnDestroy||null,onPush:t.changeDetection===le.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ue,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ce.Emulated,id:"c",styles:t.styles||ue,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,o=t.features,a=t.pipes;return s.id+=de++,s.inputs=ve(t.inputs,i),s.outputs=ve(t.outputs),o&&o.forEach(t=>t(s)),s.directiveDefs=r?()=>("function"==typeof r?r():r).map(ge):null,s.pipeDefs=a?()=>("function"==typeof a?a():a).map(me):null,s})}function ge(t){return we(t)||function(t){return t[At]||null}(t)}function me(t){return function(t){return t[Ot]||null}(t)}const fe={};function _e(t){const e={type:t.type,bootstrap:t.bootstrap||ue,declarations:t.declarations||ue,imports:t.imports||ue,exports:t.exports||ue,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&et(()=>{fe[t.id]=t.type}),e}function ve(t,e){if(null==t)return he;const n={};for(const i in t)if(t.hasOwnProperty(i)){let s=t[i],r=s;Array.isArray(s)&&(r=s[1],s=s[0]),n[s]=i,e&&(e[s]=r)}return n}const ye=pe;function be(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function we(t){return t[Dt]||null}function Ce(t,e){return t.hasOwnProperty(Nt)?t[Nt]:null}function Se(t,e){const n=t[Rt]||null;if(!n&&!0===e)throw new Error(`Type ${bt(t)} does not have '\u0275mod' property.`);return n}function Ie(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ee(t){return Array.isArray(t)&&!0===t[1]}function xe(t){return 0!=(8&t.flags)}function Pe(t){return 2==(2&t.flags)}function Te(t){return 1==(1&t.flags)}function ke(t){return null!==t.template}function Me(t){return 0!=(512&t[2])}let De=void 0;function Ae(){return void 0!==De?De:"undefined"!=typeof document?document:void 0}function Oe(t){return!!t.listen}const Re={createRenderer:(t,e)=>Ae()};function Le(t){for(;Array.isArray(t);)t=t[0];return t}function Ne(t,e){return Le(e[t+20])}function ze(t,e){return Le(e[t.index])}function Fe(t,e){return t.data[e+20]}function Ve(t,e){return t[e+20]}function Ue(t,e){const n=e[t];return Ie(n)?n:n[0]}function je(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Be(t){return 4==(4&t[2])}function He(t){return 128==(128&t[2])}function $e(t,e){return null===t||null==e?null:t[e]}function We(t){t[18]=0}function qe(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const Ge={lFrame:fn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Qe(){return Ge.bindingsEnabled}function Ke(){return Ge.lFrame.lView}function Ze(){return Ge.lFrame.tView}function Ye(t){Ge.lFrame.contextLView=t}function Xe(){return Ge.lFrame.previousOrParentTNode}function Je(t,e){Ge.lFrame.previousOrParentTNode=t,Ge.lFrame.isParent=e}function tn(){return Ge.lFrame.isParent}function en(){Ge.lFrame.isParent=!1}function nn(){return Ge.checkNoChangesMode}function sn(t){Ge.checkNoChangesMode=t}function rn(){const t=Ge.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function on(){return Ge.lFrame.bindingIndex}function an(){return Ge.lFrame.bindingIndex++}function ln(t){const e=Ge.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function cn(t,e){const n=Ge.lFrame;n.bindingIndex=n.bindingRootIndex=t,hn(e)}function hn(t){Ge.lFrame.currentDirectiveIndex=t}function un(){return Ge.lFrame.currentQueryIndex}function dn(t){Ge.lFrame.currentQueryIndex=t}function pn(t,e){const n=mn();Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function gn(t,e){const n=mn(),i=t[1];Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=i,n.contextLView=t,n.bindingIndex=i.bindingStartIndex}function mn(){const t=Ge.lFrame,e=null===t?null:t.child;return null===e?fn(t):e}function fn(t){const e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentSanitizer:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function _n(){const t=Ge.lFrame;return Ge.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}const vn=_n;function yn(){const t=_n();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.currentSanitizer=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function bn(){return Ge.lFrame.selectedIndex}function wn(t){Ge.lFrame.selectedIndex=t}function Cn(){const t=Ge.lFrame;return Fe(t.tView,t.selectedIndex)}function Sn(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n<i;n++){const e=t.data[n];e.afterContentInit&&(t.contentHooks||(t.contentHooks=[])).push(-n,e.afterContentInit),e.afterContentChecked&&((t.contentHooks||(t.contentHooks=[])).push(n,e.afterContentChecked),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,e.afterContentChecked)),e.afterViewInit&&(t.viewHooks||(t.viewHooks=[])).push(-n,e.afterViewInit),e.afterViewChecked&&((t.viewHooks||(t.viewHooks=[])).push(n,e.afterViewChecked),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,e.afterViewChecked)),null!=e.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(n,e.onDestroy)}}function In(t,e,n){Pn(t,e,3,n)}function En(t,e,n,i){(3&t[2])===n&&Pn(t,e,n,i)}function xn(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function Pn(t,e,n,i){const s=null!=i?i:-1;let r=0;for(let o=void 0!==i?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(r=e[o],null!=i&&r>=i)break}else e[o]<0&&(t[18]+=65536),(r<s||-1==s)&&(Tn(t,n,e,o),t[18]=(4294901760&t[18])+o+2),o++}function Tn(t,e,n,i){const s=n[i]<0,r=n[i+1],o=t[s?-n[i]:n[i]];s?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,r.call(o)):r.call(o)}class kn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Mn(t,e,n){const i=Oe(t);let s=0;for(;s<n.length;){const r=n[s];if("number"==typeof r){if(0!==r)break;s++;const o=n[s++],a=n[s++],l=n[s++];i?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=r,a=n[++s];An(o)?i&&t.setProperty(e,o,a):i?t.setAttribute(e,o,a):e.setAttribute(o,a),s++}}return s}function Dn(t){return 3===t||4===t||6===t}function An(t){return 64===t.charCodeAt(0)}function On(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let i=0;i<e.length;i++){const s=e[i];"number"==typeof s?n=s:0===n||Rn(t,n,s,null,-1===n||2===n?e[++i]:null)}}return t}function Rn(t,e,n,i,s){let r=0,o=t.length;if(-1===e)o=-1;else for(;r<t.length;){const n=t[r++];if("number"==typeof n){if(n===e){o=-1;break}if(n>e){o=r-1;break}}}for(;r<t.length;){const e=t[r];if("number"==typeof e)break;if(e===n){if(null===i)return void(null!==s&&(t[r+1]=s));if(i===t[r+1])return void(t[r+2]=s)}r++,null!==i&&r++,null!==s&&r++}-1!==o&&(t.splice(o,0,e),r=o+1),t.splice(r++,0,n),null!==i&&t.splice(r++,0,i),null!==s&&t.splice(r++,0,s)}function Ln(t){return-1!==t}function Nn(t){return 32767&t}function zn(t){return t>>16}function Fn(t,e){let n=zn(t),i=e;for(;n>0;)i=i[15],n--;return i}function Vn(t){return"string"==typeof t?t:null==t?"":""+t}function Un(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Vn(t)}const jn=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Mt))();function Bn(t){return{name:"window",target:t.ownerDocument.defaultView}}function Hn(t){return{name:"document",target:t.ownerDocument}}function $n(t){return t instanceof Function?t():t}let Wn=!0;function qn(t){const e=Wn;return Wn=t,e}let Gn=0;function Qn(t,e){const n=Zn(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Kn(i.data,t),Kn(e,null),Kn(i.blueprint,null));const s=Yn(t,e),r=t.injectorIndex;if(Ln(s)){const t=Nn(s),n=Fn(s,e),i=n[1].data;for(let s=0;s<8;s++)e[r+s]=n[t+s]|i[t+s]}return e[r+8]=s,r}function Kn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Zn(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function Yn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=e[6],i=1;for(;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function Xn(t,e,n){!function(t,e,n){let i="string"!=typeof n?n[zt]:n.charCodeAt(0)||0;null==i&&(i=n[zt]=Gn++);const s=255&i,r=1<<s,o=64&s,a=32&s,l=e.data;128&s?o?a?l[t+7]|=r:l[t+6]|=r:a?l[t+5]|=r:l[t+4]|=r:o?a?l[t+3]|=r:l[t+2]|=r:a?l[t+1]|=r:l[t]|=r}(t,e,n)}function Jn(t,e,n,i=at.Default,s){if(null!==t){const s=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t[zt];return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof s){pn(e,t);try{const t=s();if(null!=t||i&at.Optional)return t;throw new Error(`No provider for ${Un(n)}!`)}finally{vn()}}else if("number"==typeof s){if(-1===s)return new oi(t,e);let r=null,o=Zn(t,e),a=-1,l=i&at.Host?e[16][6]:null;for((-1===o||i&at.SkipSelf)&&(a=-1===o?Yn(t,e):e[o+8],ri(i,!1)?(r=e[1],o=Nn(a),e=Fn(a,e)):o=-1);-1!==o;){a=e[o+8];const t=e[1];if(si(s,o,t.data)){const t=ei(o,e,n,r,i,l);if(t!==ti)return t}ri(i,e[1].data[o+8]===l)&&si(s,o,e)?(r=t,o=Nn(a),e=Fn(a,e)):o=-1}}}if(i&at.Optional&&void 0===s&&(s=null),0==(i&(at.Self|at.Host))){const t=e[9],r=qt(void 0);try{return t?t.get(n,s,i&at.Optional):Zt(n,s,i&at.Optional)}finally{qt(r)}}if(i&at.Optional)return s;throw new Error(`NodeInjector: NOT_FOUND [${Un(n)}]`)}const ti={};function ei(t,e,n,i,s,r){const o=e[1],a=o.data[t+8],l=ni(a,o,n,null==i?Pe(a)&&Wn:i!=o&&3===a.type,s&at.Host&&r===a);return null!==l?ii(e,o,l,a):ti}function ni(t,e,n,i,s){const r=t.providerIndexes,o=e.data,a=65535&r,l=t.directiveStart,c=r>>16,h=s?a+c:t.directiveEnd;for(let u=i?a:a+c;u<h;u++){const t=o[u];if(u<l&&n===t||u>=l&&t.type===n)return u}if(s){const t=o[l];if(t&&ke(t)&&t.type===n)return l}return null}function ii(t,e,n,i){let s=t[n];const r=e.data;if(s instanceof kn){const o=s;if(o.resolving)throw new Error("Circular dep for "+Un(r[n]));const a=qn(o.canSeeViewProviders);let l;o.resolving=!0,o.injectImpl&&(l=qt(o.injectImpl)),pn(t,i);try{s=t[n]=o.factory(void 0,r,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{onChanges:i,onInit:s,doCheck:r}=e;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)),s&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-t,s),r&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r))}(n,r[n],e)}finally{o.injectImpl&&qt(l),qn(a),o.resolving=!1,vn()}}return s}function si(t,e,n){const i=64&t,s=32&t;let r;return r=128&t?i?s?n[e+7]:n[e+6]:s?n[e+5]:n[e+4]:i?s?n[e+3]:n[e+2]:s?n[e+1]:n[e],!!(r&1<<t)}function ri(t,e){return!(t&at.Self||t&at.Host&&e)}class oi{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Jn(this._tNode,this._lView,t,void 0,e)}}function ai(t){const e=t;if(Et(t))return()=>{const t=ai(It(e));return t?t():null};let n=Ce(e);if(null===n){const t=gt(e);n=t&&t.factory}return n||null}function li(t){return et(()=>{const e=t.prototype.constructor,n=e[Nt]||ai(e),i=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==i;){const t=s[Nt]||ai(s);if(t&&t!==n)return t;s=Object.getPrototypeOf(s)}return t=>new t})}function ci(t){return t.ngDebugContext}function hi(t){return t.ngOriginalError}function ui(t,...e){t.error(...e)}class di{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||ui}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?ci(t)?ci(t):this._findContext(hi(t)):null}_findOriginalError(t){let e=hi(t);for(;e&&hi(e);)e=hi(e);return e}}class pi{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class gi extends pi{getTypeName(){return"HTML"}}class mi extends pi{getTypeName(){return"Style"}}class fi extends pi{getTypeName(){return"Script"}}class _i extends pi{getTypeName(){return"URL"}}class vi extends pi{getTypeName(){return"ResourceURL"}}function yi(t){return t instanceof pi?t.changingThisBreaksApplicationSecurity:t}function bi(t,e){const n=wi(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function wi(t){return t instanceof pi&&t.getTypeName()||null}let Ci=!0,Si=!1;function Ii(){return Si=!0,Ci}class Ei{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");let e=this.inertDocument.body;if(null==e){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),e=this.inertDocument.createElement("body"),t.appendChild(e)}e.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!e.querySelector||e.querySelector("svg")?(e.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=e.querySelector&&e.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(i){return null}const e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(void 0);const n=e.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(t){t="<body><remove></remove>"+t+"</body>";try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}getInertBodyElement_InertDocument(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;const n=this.inertDocument.createElement("body");return n.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0<i;i--){const n=e.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const xi=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Pi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Ti(t){return(t=String(t)).match(xi)||t.match(Pi)?t:(Ii()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function ki(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Mi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const Di=ki("area,br,col,hr,img,wbr"),Ai=ki("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Oi=ki("rp,rt"),Ri=Mi(Oi,Ai),Li=Mi(Di,Mi(Ai,ki("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")),Mi(Oi,ki("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")),Ri),Ni=ki("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),zi=ki("srcset"),Fi=Mi(Ni,zi,ki("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),ki("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Vi=ki("script,style,template");class Ui{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!Li.hasOwnProperty(e))return this.sanitizedSomething=!0,!Vi.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let s=0;s<n.length;s++){const t=n.item(s),e=t.name,r=e.toLowerCase();if(!Fi.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let o=t.value;Ni[r]&&(o=Ti(o)),zi[r]&&(i=o,o=(i=String(i)).split(",").map(t=>Ti(t.trim())).join(", ")),this.buf.push(" ",e,'="',Hi(o),'"')}var i;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();Li.hasOwnProperty(e)&&!Di.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Hi(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const ji=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bi=/([^\#-~ |!])/g;function Hi(t){return t.replace(/&/g,"&").replace(ji,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(Bi,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let $i;function Wi(t,e){let n=null;try{$i=$i||new Ei(t);let i=e?String(e):"";n=$i.getInertBodyElement(i);let s=5,r=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=r,r=n.innerHTML,n=$i.getInertBodyElement(i)}while(i!==r);const o=new Ui,a=o.sanitizeChildren(qi(n)||n);return Ii()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=qi(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function qi(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}const Gi=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}(),Qi=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Ki=/^url\(([^)]+)\)$/;function Zi(t){if(!(t=String(t).trim()))return"";const e=t.match(Ki);return e&&Ti(e[1])===e[1]||t.match(Qi)&&function(t){let e=!0,n=!0;for(let i=0;i<t.length;i++){const s=t.charAt(i);"'"===s&&n?e=!e:'"'===s&&e&&(n=!n)}return e&&n}(t)?t:(Ii()&&console.warn(`WARNING: sanitizing unsafe style value ${t} (see http://g.co/ng/security#xss).`),"unsafe")}function Yi(t){const e=es();return e?e.sanitize(Gi.HTML,t)||"":bi(t,"HTML")?yi(t):Wi(Ae(),Vn(t))}function Xi(t){const e=es();return e?e.sanitize(Gi.STYLE,t)||"":bi(t,"Style")?yi(t):Zi(Vn(t))}function Ji(t){const e=es();return e?e.sanitize(Gi.URL,t)||"":bi(t,"URL")?yi(t):Ti(Vn(t))}const ts=function(t,e,n){if(void 0===e&&void 0===n)return Xi(t);let i=!0;return 1&(n=n||3)&&(i=function(t){return"background-image"===t||"backgroundImage"===t||"background"===t||"border-image"===t||"borderImage"===t||"border-image-source"===t||"borderImageSource"===t||"filter"===t||"list-style"===t||"listStyle"===t||"list-style-image"===t||"listStyleImage"===t||"clip-path"===t||"clipPath"===t}(t)),2&n?i?Xi(e):yi(e):i};function es(){const t=Ke();return t&&t[12]}function ns(t,e){t.__ngContext__=e}function is(t){throw new Error("Multiple components match node with tagname "+t.tagName)}function ss(){throw new Error("Cannot mix multi providers and regular providers")}function rs(t,e,n){let i=t.length;for(;;){const s=t.indexOf(e,n);if(-1===s)return s;if(0===s||t.charCodeAt(s-1)<=32){const n=e.length;if(s+n===i||t.charCodeAt(s+n)<=32)return s}n=s+1}}function os(t,e,n){let i=0;for(;i<t.length;){let s=t[i++];if(n&&"class"===s){if(s=t[i],-1!==rs(s.toLowerCase(),e,0))return!0}else if(1===s){for(;i<t.length&&"string"==typeof(s=t[i++]);)if(s.toLowerCase()===e)return!0;return!1}}return!1}function as(t){return 0===t.type&&"ng-template"!==t.tagName}function ls(t,e,n){return e===(0!==t.type||n?t.tagName:"ng-template")}function cs(t,e,n){let i=4;const s=t.attrs||[],r=function(t){for(let e=0;e<t.length;e++)if(Dn(t[e]))return e;return t.length}(s);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!ls(t,l,n)||""===l&&1===e.length){if(hs(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==t.attrs){if(!os(t.attrs,c,n)){if(hs(i))return!1;o=!0}continue}const h=us(8&i?"class":l,s,as(t),n);if(-1===h){if(hs(i))return!1;o=!0;continue}if(""!==c){let t;t=h>r?"":s[h+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==rs(e,c,0)||2&i&&c!==t){if(hs(i))return!1;o=!0}}}}else{if(!o&&!hs(i)&&!hs(l))return!1;if(o&&hs(l))continue;o=!1,i=l|1&i}}return hs(i)||o}function hs(t){return 0==(1&t)}function us(t,e,n,i){if(null===e)return-1;let s=0;if(i||!n){let n=!1;for(;s<e.length;){const i=e[s];if(i===t)return s;if(3===i||6===i)n=!0;else{if(1===i||2===i){let t=e[++s];for(;"string"==typeof t;)t=e[++s];continue}if(4===i)break;if(0===i){s+=4;continue}}s+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const i=t[n];if("number"==typeof i)return-1;if(i===e)return n;n++}return-1}(e,t)}function ds(t,e,n=!1){for(let i=0;i<e.length;i++)if(cs(t,e[i],n))return!0;return!1}function ps(t,e){t:for(let n=0;n<e.length;n++){const i=e[n];if(t.length===i.length){for(let e=0;e<t.length;e++)if(t[e]!==i[e])continue t;return!0}}return!1}function gs(t,e){return t?":not("+e.trim()+")":e}function ms(t){let e=t[0],n=1,i=2,s="",r=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&i){const e=t[++n];s+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&i?s+="."+o:4&i&&(s+=" "+o);else""===s||hs(o)||(e+=gs(r,s),s=""),i=o,r=r||!hs(i);n++}return""!==s&&(e+=gs(r,s)),e}const fs={};function _s(t){const e=t[3];return Ee(e)?e[3]:e}function vs(t){return bs(t[13])}function ys(t){return bs(t[4])}function bs(t){for(;null!==t&&!Ee(t);)t=t[4];return t}function ws(t){Cs(Ze(),Ke(),bn()+t,nn())}function Cs(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&In(e,i,n)}else{const i=t.preOrderHooks;null!==i&&En(e,i,0,n)}wn(n)}function Ss(t,e){return t<<17|e<<2}function Is(t){return t>>17&32767}function Es(t){return 2|t}function xs(t){return(131068&t)>>2}function Ps(t,e){return-131069&t|e<<2}function Ts(t){return 1|t}function ks(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const s=n[i],r=n[i+1];if(-1!==r){const n=t.data[r];dn(s),n.contentQueries(2,e[r],r)}}}function Ms(t,e,n){return Oe(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function Ds(t,e,n,i,s,r,o,a,l,c){const h=e.blueprint.slice();return h[0]=s,h[2]=140|i,We(h),h[3]=h[15]=t,h[8]=n,h[10]=o||t&&t[10],h[11]=a||t&&t[11],h[12]=l||t&&t[12]||null,h[9]=c||t&&t[9]||null,h[6]=r,h[16]=2==e.type?t[16]:h,h}function As(t,e,n,i,s,r){const o=n+20,a=t.data[o]||function(t,e,n,i,s,r){const o=Xe(),a=tn(),l=a?o:o&&o.parent,c=t.data[n]=Bs(0,l&&l!==e?l:null,i,n,s,r);return null===t.firstChild&&(t.firstChild=c),o&&(!a||null!=o.child||null===c.parent&&2!==o.type?a||(o.next=c):o.child=c),c}(t,e,o,i,s,r);return Je(a,!0),a}function Os(t,e,n){gn(e,e[6]);try{const i=t.viewQuery;null!==i&&hr(1,i,n);const s=t.template;null!==s&&Ns(t,e,s,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&ks(t,e),t.staticViewQueries&&hr(2,t.viewQuery,n);const r=t.components;null!==r&&function(t,e){for(let n=0;n<e.length;n++)rr(t,e[n])}(e,r)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),i}finally{e[2]&=-5,yn()}}function Rs(t,e,n,i){const s=e[2];if(256==(256&s))return;gn(e,e[6]);const r=nn();try{We(e),Ge.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&Ns(t,e,n,2,i);const o=3==(3&s);if(!r)if(o){const n=t.preOrderCheckHooks;null!==n&&In(e,n,null)}else{const n=t.preOrderHooks;null!==n&&En(e,n,0,null),xn(e,0)}if(function(t){for(let e=vs(t);null!==e;e=ys(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],i=n[3];0==(1024&n[2])&&qe(i,1),n[2]|=1024}}}(e),function(t){for(let e=vs(t);null!==e;e=ys(e))for(let t=10;t<e.length;t++){const n=e[t],i=n[1];He(n)&&Rs(i,n,i.template,n[8])}}(e),null!==t.contentQueries&&ks(t,e),!r)if(o){const n=t.contentCheckHooks;null!==n&&In(e,n)}else{const n=t.contentHooks;null!==n&&En(e,n,1),xn(e,1)}!function(t,e){try{const n=t.expandoInstructions;if(null!==n){let i=t.expandoStartIndex,s=-1,r=-1;for(let t=0;t<n.length;t++){const o=n[t];"number"==typeof o?o<=0?(r=0-o,wn(r),i+=9+n[++t],s=i):i+=o:(null!==o&&(cn(i,s),o(2,e[s])),s++)}}}finally{wn(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)sr(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&hr(2,l,i),!r)if(o){const n=t.viewCheckHooks;null!==n&&In(e,n)}else{const n=t.viewHooks;null!==n&&En(e,n,2),xn(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),r||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,qe(e[3],-1))}finally{yn()}}function Ls(t,e,n,i){const s=e[10],r=!nn(),o=Be(e);try{r&&!o&&s.begin&&s.begin(),o&&Os(t,e,i),Rs(t,e,n,i)}finally{r&&!o&&s.end&&s.end()}}function Ns(t,e,n,i,s){const r=bn();try{wn(-1),2&i&&e.length>20&&Cs(t,e,0,nn()),n(i,s)}finally{wn(r)}}function zs(t,e,n){if(xe(e)){const i=e.directiveEnd;for(let s=e.directiveStart;s<i;s++){const e=t.data[s];e.contentQueries&&e.contentQueries(1,n[s],s)}}}function Fs(t,e,n){Qe()&&(function(t,e,n,i){const s=n.directiveStart,r=n.directiveEnd;t.firstCreatePass||Qn(n,e),ns(i,e);const o=n.initialInputs;for(let a=s;a<r;a++){const i=t.data[a],r=ke(i);r&&tr(e,n,i);const l=ii(e,t,a,n);ns(l,e),null!==o&&er(0,a-s,l,i,0,o),r&&(Ue(n.index,e)[8]=l)}}(t,e,n,ze(n,e)),128==(128&n.flags)&&function(t,e,n){const i=n.directiveStart,s=n.directiveEnd,r=t.expandoInstructions,o=t.firstCreatePass,a=n.index-20,l=Ge.lFrame.currentDirectiveIndex;try{wn(a);for(let n=i;n<s;n++){const i=t.data[n],s=e[n];hn(n),null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs?Qs(i,s):o&&r.push(null)}}finally{wn(-1),hn(l)}}(t,e,n))}function Vs(t,e,n=ze){const i=e.localNames;if(null!==i){let s=e.index+1;for(let r=0;r<i.length;r+=2){const o=i[r+1],a=-1===o?n(e,t):t[o];t[s++]=a}}}function Us(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=js(1,-1,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function js(t,e,n,i,s,r,o,a,l,c){const h=20+i,u=h+s,d=function(t,e){const n=[];for(let i=0;i<e;i++)n.push(i<t?null:fs);return n}(h,u);return d[1]={type:t,id:e,blueprint:d,template:n,queries:null,viewQuery:a,node:null,data:d.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:u,expandoInstructions: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:"function"==typeof r?r():r,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:c,incompleteFirstPass:!1}}function Bs(t,e,n,i,s,r){return{type:n,index:i,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:s,attrs:r,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Hs(t,e,n){for(let i in t)if(t.hasOwnProperty(i)){const s=t[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(e,s):n[i]=[e,s]}return n}function $s(t,e,n,i,s,r,o,a){const l=ze(e,n);let c,h=e.inputs;var u;!a&&null!=h&&(c=h[i])?(mr(t,n,c,i,s),Pe(e)&&function(t,e){const n=Ue(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3===e.type&&(i="class"===(u=i)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,s=null!=o?o(s,e.tagName||"",i):s,Oe(r)?r.setProperty(l,i,s):An(i)||(l.setProperty?l.setProperty(i,s):l[i]=s))}function Ws(t,e,n,i){let s=!1;if(Qe()){const r=function(t,e,n){const i=t.directiveRegistry;let s=null;if(i)for(let r=0;r<i.length;r++){const o=i[r];ds(n,o.selectors,!1)&&(s||(s=[]),Xn(Qn(n,e),t,o.type),ke(o)?(2&n.flags&&is(n),Zs(t,n),s.unshift(o)):s.push(o))}return s}(t,e,n),o=null===i?null:{"":-1};if(null!==r){let i=0;s=!0,Xs(n,t.data.length,r.length);for(let t=0;t<r.length;t++){const e=r[t];e.providersResolver&&e.providersResolver(e)}Ks(t,n,r.length);let a=!1,l=!1;for(let s=0;s<r.length;s++){const c=r[s];n.mergedAttrs=On(n.mergedAttrs,c.hostAttrs),Js(t,e,c),Ys(t.data.length-1,c,o),null!==c.contentQueries&&(n.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(n.flags|=128),!a&&(c.onChanges||c.onInit||c.doCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index-20),a=!0),l||!c.onChanges&&!c.doCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index-20),l=!0),qs(t,c),i+=c.hostVars}!function(t,e){const n=e.directiveEnd,i=t.data,s=e.attrs,r=[];let o=null,a=null;for(let l=e.directiveStart;l<n;l++){const t=i[l],n=t.inputs,c=null===s||as(e)?null:nr(n,s);r.push(c),o=Hs(n,l,o),a=Hs(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=r,e.inputs=o,e.outputs=a}(t,n),Gs(t,e,i)}o&&function(t,e,n){if(e){const i=t.localNames=[];for(let t=0;t<e.length;t+=2){const s=n[e[t+1]];if(null==s)throw new Error(`Export of name '${e[t+1]}' not found!`);i.push(e[t],s)}}}(n,i,o)}return n.mergedAttrs=On(n.mergedAttrs,n.attrs),s}function qs(t,e){const n=t.expandoInstructions;n.push(e.hostBindings),0!==e.hostVars&&n.push(e.hostVars)}function Gs(t,e,n){for(let i=0;i<n;i++)e.push(fs),t.blueprint.push(fs),t.data.push(null)}function Qs(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Ks(t,e,n){const i=20-e.index,s=t.data.length-(65535&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(i,s,n)}function Zs(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ys(t,e,n){if(n){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;ke(e)&&(n[""]=t)}}function Xs(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Js(t,e,n){t.data.push(n);const i=n.factory||(n.factory=Ce(n.type)),s=new kn(i,ke(n),null);t.blueprint.push(s),e.push(s)}function tr(t,e,n){const i=ze(e,t),s=Us(n),r=t[10],o=or(t,Ds(t,s,null,n.onPush?64:16,i,e,r,r.createRenderer(i,n)));t[e.index]=o}function er(t,e,n,i,s,r){const o=r[e];if(null!==o){const t=i.setInput;for(let e=0;e<o.length;){const s=o[e++],r=o[e++],a=o[e++];null!==t?i.setInput(n,a,s,r):n[r]=a}}}function nr(t,e){let n=null,i=0;for(;i<e.length;){const s=e[i];if(0!==s)if(5!==s){if("number"==typeof s)break;t.hasOwnProperty(s)&&(null===n&&(n=[]),n.push(s,t[s],e[i+1])),i+=2}else i+=2;else i+=4}return n}function ir(t,e,n,i){return new Array(t,!0,!1,e,null,0,i,n,null,null)}function sr(t,e){const n=Ue(e,t);if(He(n)){const t=n[1];80&n[2]?Rs(t,n,t.template,n[8]):n[5]>0&&function t(e){for(let i=vs(e);null!==i;i=ys(i))for(let e=10;e<i.length;e++){const n=i[e];if(1024&n[2]){const t=n[1];Rs(t,n,t.template,n[8])}else n[5]>0&&t(n)}const n=e[1].components;if(null!==n)for(let i=0;i<n.length;i++){const s=Ue(n[i],e);He(s)&&s[5]>0&&t(s)}}(n)}}function rr(t,e){const n=Ue(e,t),i=n[1];!function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(i,n),Os(i,n,n[8])}function or(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function ar(t){for(;t;){t[2]|=64;const e=_s(t);if(Me(t)&&!e)return t;t=e}return null}function lr(t,e,n){const i=e[10];i.begin&&i.begin();try{Rs(t,e,t.template,n)}catch(s){throw gr(e,s),s}finally{i.end&&i.end()}}function cr(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],i=je(n),s=i[1];Ls(s,i,s.template,n)}}(t[8])}function hr(t,e,n){dn(0),e(t,n)}const ur=(()=>Promise.resolve(null))();function dr(t){return t[7]||(t[7]=[])}function pr(t){return t.cleanup||(t.cleanup=[])}function gr(t,e){const n=t[9],i=n?n.get(di,null):null;i&&i.handleError(e)}function mr(t,e,n,i,s){for(let r=0;r<n.length;){const o=n[r++],a=n[r++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,s,i,a):l[a]=s}}function fr(t,e,n){const i=Ne(e,t),s=t[11];Oe(s)?s.setValue(i,n):i.textContent=n}function _r(t,e){const n=e[3];return-1===t.index?Ee(n)?n:null:n}function vr(t,e){const n=_r(t,e);return n?Mr(e[11],n[7]):null}function yr(t,e,n,i,s){if(null!=i){let r,o=!1;Ee(i)?r=i:Ie(i)&&(o=!0,i=i[0]);const a=Le(i);0===t&&null!==n?null==s?Tr(e,n,a):Pr(e,n,a,s||null):1===t&&null!==n?Pr(e,n,a,s||null):2===t?function(t,e,n){const i=Mr(t,e);i&&function(t,e,n,i){Oe(t)?t.removeChild(e,n,i):e.removeChild(n)}(t,i,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=r&&function(t,e,n,i,s){const r=n[7];r!==Le(n)&&yr(e,t,i,r,s);for(let o=10;o<n.length;o++){const s=n[o];Lr(s[1],s,t,e,i,r)}}(e,t,r,n,s)}}function br(t,e,n,i){const s=vr(t.node,e);s&&Lr(t,e,e[11],n?1:2,s,i)}function wr(t,e){const n=t[9],i=n.indexOf(e);1024&e[2]&&qe(e[3],-1),n.splice(i,1)}function Cr(t,e){if(t.length<=10)return;const n=10+e,i=t[n];if(i){const s=i[17];null!==s&&s!==t&&wr(s,i),e>0&&(t[n-1][4]=i[4]);const r=ie(t,10+e);br(i[1],i,!1,null);const o=r[19];null!==o&&o.detachView(r[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Sr(t,e){if(!(256&e[2])){const n=e[11];Oe(n)&&n.destroyNode&&Lr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Er(t[1],t);for(;e;){let n=null;if(Ie(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)Ie(e)&&Er(e[1],e),e=Ir(e,t);null===e&&(e=t),Ie(e)&&Er(e[1],e),n=e&&e[4]}e=n}}(e)}}function Ir(t,e){let n;return Ie(t)&&(n=t[6])&&2===n.type?_r(n,t):t[3]===e?null:t[3]}function Er(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i<n.length;i+=2){const t=e[n[i]];if(!(t instanceof kn)){const e=n[i+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2)e[n+1].call(t[e[n]]);else e.call(t)}}}(t,e),function(t,e){const n=t.cleanup;if(null!==n){const t=e[7];for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const s=n[i+1],r="function"==typeof s?s(e):Le(e[s]),o=t[n[i+2]],a=n[i+3];"boolean"==typeof a?r.removeEventListener(n[i],o,a):a>=0?t[a]():t[-a].unsubscribe(),i+=2}else n[i].call(t[n[i+1]]);e[7]=null}}(t,e);const n=e[6];n&&3===n.type&&Oe(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&Ee(e[3])){i!==e[3]&&wr(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function xr(t,e,n){let i=e.parent;for(;null!=i&&(4===i.type||5===i.type);)i=(e=i).parent;if(null==i){const t=n[6];return 2===t.type?vr(t,n):n[0]}if(e&&5===e.type&&4&e.flags)return ze(e,n).parentNode;if(2&i.flags){const e=t.data,n=e[e[i.index].directiveStart].encapsulation;if(n!==ce.ShadowDom&&n!==ce.Native)return null}return ze(i,n)}function Pr(t,e,n,i){Oe(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function Tr(t,e,n){Oe(t)?t.appendChild(e,n):e.appendChild(n)}function kr(t,e,n,i){null!==i?Pr(t,e,n,i):Tr(t,e,n)}function Mr(t,e){return Oe(t)?t.parentNode(e):e.parentNode}function Dr(t,e){if(2===t.type){const n=_r(t,e);return null===n?null:Or(n.indexOf(e,10)-10,n)}return 4===t.type||5===t.type?ze(t,e):null}function Ar(t,e,n,i){const s=xr(t,i,e);if(null!=s){const t=e[11],r=Dr(i.parent||e[6],e);if(Array.isArray(n))for(let e=0;e<n.length;e++)kr(t,s,n[e],r);else kr(t,s,n,r)}}function Or(t,e){const n=10+t+1;if(n<e.length){const t=e[n],i=t[1].firstChild;if(null!==i)return function t(e,n){if(null!==n){const i=n.type;if(3===i)return ze(n,e);if(0===i)return Or(-1,e[n.index]);if(4===i||5===i){const i=n.child;if(null!==i)return t(e,i);{const t=e[n.index];return Ee(t)?Or(-1,t):Le(t)}}{const i=e[16],s=i[6],r=_s(i),o=s.projection[n.projection];return null!=o?t(r,o):t(e,n.next)}}return null}(t,i)}return e[7]}function Rr(t,e,n,i,s,r,o){for(;null!=n;){const a=i[n.index],l=n.type;o&&0===e&&(a&&ns(Le(a),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(Rr(t,e,n.child,i,s,r,!1),yr(e,t,s,a,r)):1===l?Nr(t,e,i,n,s,r):yr(e,t,s,a,r)),n=o?n.projectionNext:n.next}}function Lr(t,e,n,i,s,r){Rr(n,i,t.node.child,e,s,r,!1)}function Nr(t,e,n,i,s,r){const o=n[16],a=o[6].projection[i.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)yr(e,t,s,a[l],r);else Rr(t,e,a,o[3],s,r,!0)}function zr(t,e,n){Oe(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Fr(t,e,n){Oe(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}class Vr{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView;return null==t[0]?function t(e,n,i,s,r=!1){for(;null!==i;){const o=n[i.index];if(null!==o&&s.push(Le(o)),Ee(o))for(let e=10;e<o.length;e++){const n=o[e],i=n[1].firstChild;null!==i&&t(n[1],n,i,s)}const a=i.type;if(4===a||5===a)t(e,n,i.child,s);else if(1===a){const e=n[16],r=e[6].projection[i.projection];if(Array.isArray(r))s.push(...r);else{const n=_s(e);t(n[1],n,r,s,!0)}}i=r?i.projectionNext:i.next}return s}(t[1],t,t[6].child,[]):[]}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}Sr(this._lView[1],this._lView)}onDestroy(t){var e,n,i;e=this._lView[1],i=t,dr(n=this._lView).push(i),e.firstCreatePass&&pr(e).push(n[7].length-1,null)}markForCheck(){ar(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){lr(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){sn(!0);try{lr(t,e,n)}finally{sn(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Lr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Ur extends Vr{constructor(t){super(t),this._view=t}detectChanges(){cr(this._view)}checkNoChanges(){!function(t){sn(!0);try{cr(t)}finally{sn(!1)}}(this._view)}get context(){return null}}let jr,Br,Hr;function $r(t,e,n){return jr||(jr=class extends t{}),new jr(ze(e,n))}function Wr(t,e,n,i){return Br||(Br=class extends t{constructor(t,e,n){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=Ds(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];const i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Os(e,n,t),new Vr(n)}}),0===n.type?new Br(i,n,$r(e,n,i)):null}function qr(t,e,n,i){let s;Hr||(Hr=class extends t{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostView=n}get element(){return $r(e,this._hostTNode,this._hostView)}get injector(){return new oi(this._hostTNode,this._hostView)}get parentInjector(){const t=Yn(this._hostTNode,this._hostView),e=Fn(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){const t=n.parent.injectorIndex;let e=n.parent;for(;null!=e.parent&&t==e.parent.injectorIndex;)e=e.parent;return e}let i=zn(t),s=e,r=e[6];for(;i>1;)s=s[15],r=s[6],i--;return r}(t,this._hostView,this._hostTNode);return Ln(t)&&null!=n?new oi(n,e):new oi(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,s){const r=n||this.parentInjector;if(!s&&null==t.ngModule&&r){const t=r.get(Jt,null);t&&(s=t)}const o=t.create(r,i,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ee(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new Hr(e,e[6],e[3]);i.detach(i.indexOf(t))}}const s=this._adjustIndex(e);return function(t,e,n,i){const s=10+i,r=n.length;i>0&&(n[s-1][4]=e),i<r-10?(e[4]=n[s],ne(n,10+i,e)):(n.push(e),e[4]=null),e[3]=n;const o=e[17];null!==o&&n!==o&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(i,n,this._lContainer,s),br(i,n,!0,Or(s,this._lContainer)),t.attachToViewContainerRef(this),ne(this._lContainer[8],s,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1);!function(t,e){const n=Cr(t,e);n&&Sr(n[1],n)}(this._lContainer,e),ie(this._lContainer[8],e)}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=Cr(this._lContainer,e);return n&&null!=ie(this._lContainer[8],e)?new Vr(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const r=i[n.index];if(Ee(r))s=r;else{let t;if(4===n.type)t=Le(r);else if(t=i[11].createComment(""),Me(i)){const e=i[11],s=ze(n,i);Pr(e,Mr(e,s),t,function(t,e){return Oe(t)?t.nextSibling(e):e.nextSibling}(e,s))}else Ar(i[1],i,t,n);i[n.index]=s=ir(r,i,t,n),or(i,s)}return new Hr(s,n,i)}function Gr(t=!1){return function(t,e,n){if(!n&&Pe(t)){const n=Ue(t.index,e);return new Vr(n,n)}return 3===t.type||0===t.type||4===t.type||5===t.type?new Vr(e[16],e):null}(Xe(),Ke(),t)}let Qr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Kr(),t})();const Kr=Gr,Zr=new Ft("Set Injector scope."),Yr={},Xr={},Jr=[];let to=void 0;function eo(){return void 0===to&&(to=new Xt),to}function no(t,e=null,n=null,i){return new io(t,n,e||eo(),i)}class io{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const s=[];e&&ee(e,n=>this.processProvider(n,t,e)),ee([t],t=>this.processInjectorType(t,[],s)),this.records.set(Vt,oo(void 0,this));const r=this.records.get(Zr);this.scope=null!=r?r.value:null,this.source=i||("object"==typeof t?null:bt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Ut,n=at.Default){this.assertNotDestroyed();const i=Wt(this);try{if(!(n&at.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(s=t)||"object"==typeof s&&s instanceof Ft)&&dt(t);e=n&&this.injectableDefInScope(n)?oo(so(t),Yr):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&at.Self?eo():this.parent).get(t,e=n&at.Optional&&e===Ut?null:e)}catch(r){if("NullInjectorError"===r.name){if((r.ngTempTokenPath=r.ngTempTokenPath||[]).unshift(bt(t)),i)throw r;return function(t,e,n,i){const s=t.ngTempTokenPath;throw e.__source&&s.unshift(e.__source),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=bt(e);if(Array.isArray(e))s=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}s=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${s}]: ${t.replace(jt,"\n ")}`}("\n"+t.message,s,n,i),t.ngTokenPath=s,t.ngTempTokenPath=null,t}(r,t,"R3InjectorError",this.source)}throw r}finally{Wt(i)}var s}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(bt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=It(t)))return!1;let i=gt(t);const s=null==i&&t.ngModule||void 0,r=void 0===s?t:s,o=-1!==n.indexOf(r);if(void 0!==s&&(i=gt(s)),null==i)return!1;if(null!=i.imports&&!o){let t;n.push(r);try{ee(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:i}=t[e];ee(i,t=>this.processProvider(t,n,i||Jr))}}this.injectorDefTypes.add(r),this.records.set(r,oo(i.factory,Yr));const a=i.providers;if(null!=a&&!o){const e=t;ee(a,t=>this.processProvider(t,e,a))}return void 0!==s&&void 0!==t.providers}processProvider(t,e,n){let i=lo(t=It(t))?t:It(t&&t.provide);const s=function(t,e,n){return ao(t)?oo(void 0,t.useValue):oo(ro(t,e,n),Yr)}(t,e,n);if(lo(t)||!0!==t.multi){const t=this.records.get(i);t&&void 0!==t.multi&&ss()}else{let e=this.records.get(i);e?void 0===e.multi&&ss():(e=oo(void 0,Yr,!0),e.factory=()=>Yt(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,s)}hydrate(t,e){var n;return e.value===Xr?function(t){throw new Error("Cannot instantiate cyclic dependency! "+t)}(bt(t)):e.value===Yr&&(e.value=Xr,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function so(t){const e=dt(t),n=null!==e?e.factory:Ce(t);if(null!==n)return n;const i=gt(t);if(null!==i)return i.factory;if(t instanceof Ft)throw new Error(`Token ${bt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=se(e,"?");throw new Error(`Can't resolve all parameters for ${bt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[mt]||t[vt]||t[_t]&&t[_t]());if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in v10. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function ro(t,e,n){let i=void 0;if(lo(t)){const e=It(t);return Ce(e)||so(e)}if(ao(t))i=()=>It(t.useValue);else if((s=t)&&s.useFactory)i=()=>t.useFactory(...Yt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Qt(It(t.useExisting));else{const s=It(t&&(t.useClass||t.provide));if(s||function(t,e,n){let i="";throw t&&e&&(i=` - only instances of Provider and Type are allowed, got: [${e.map(t=>t==n?"?"+n+"?":"...").join(", ")}]`),new Error(`Invalid provider for the NgModule '${bt(t)}'`+i)}(e,n,t),!function(t){return!!t.deps}(t))return Ce(s)||so(s);i=()=>new s(...Yt(t.deps))}var s;return i}function oo(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function ao(t){return null!==t&&"object"==typeof t&&Bt in t}function lo(t){return"function"==typeof t}const co=function(t,e,n){return function(t,e=null,n=null,i){const s=no(t,e,n,i);return s._resolveInjectorDefTypes(),s}({name:n},e,t,n)};let ho=(()=>{class t{static create(t,e){return Array.isArray(t)?co(t,e,""):co(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Ut,t.NULL=new Xt,t.\u0275prov=ht({token:t,providedIn:"any",factory:()=>Qt(Vt)}),t.__NG_ELEMENT_ID__=-1,t})();const uo=new Ft("AnalyzeForEntryComponents");let po=new Map;const go=new Set;function mo(t){return"string"==typeof t?t:t.text()}function fo(t,e,n){let i=n?t.styles:null,s=n?t.classes:null,r=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?r=t:1==r?s=wt(s,t):2==r&&(i=wt(i,t+": "+e[++o]+";"))}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=s:t.classesWithoutHost=s}let _o=null;function vo(){if(!_o){const t=Mt.Symbol;if(t&&t.iterator)_o=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(_o=n)}}}return _o}function yo(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}class bo{constructor(t){this.wrapped=t}static wrap(t){return new bo(t)}static unwrap(t){return bo.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof bo}}function wo(t){return!!Co(t)&&(Array.isArray(t)||!(t instanceof Map)&&vo()in t)}function Co(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function So(t,e,n){return t[e]=n}function Io(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function Eo(t,e,n,i){const s=Io(t,e,n);return Io(t,e+1,i)||s}function xo(t,e,n,i,s){const r=Eo(t,e,n,i);return Io(t,e+2,s)||r}function Po(t,e,n,i,s,r){const o=Eo(t,e,n,i);return Eo(t,e+2,s,r)||o}function To(t,e,n,i){const s=Ke();return Io(s,an(),e)&&(Ze(),function(t,e,n,i,s,r){const o=ze(t,e),a=e[11];if(null==i)Oe(a)?a.removeAttribute(o,n,r):o.removeAttribute(n);else{const e=null==s?Vn(i):s(i,t.tagName||"",n);Oe(a)?a.setAttribute(o,n,e,r):r?o.setAttributeNS(r,n,e):o.setAttribute(n,e)}}(Cn(),s,t,e,n,i)),To}function ko(t,e,n,i){return Io(t,an(),n)?e+Vn(n)+i:fs}function Mo(t,e,n,i,s,r,o,a){const l=Ke(),c=Ze(),h=t+20,u=c.firstCreatePass?function(t,e,n,i,s,r,o,a,l){const c=e.consts,h=As(e,n[6],t,0,o||null,$e(c,a));Ws(e,n,h,$e(c,l)),Sn(e,h);const u=h.tViews=js(2,-1,i,s,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c),d=Bs(0,null,2,-1,null,null);return d.injectorIndex=h.injectorIndex,u.node=d,null!==e.queries&&(e.queries.template(e,h),u.queries=e.queries.embeddedTView(h)),h}(t,c,l,e,n,i,s,r,o):c.data[h];Je(u,!1);const d=l[11].createComment("");Ar(c,l,d,u),ns(d,l),or(l,l[h]=ir(d,l,d,u)),Te(u)&&Fs(c,l,u),null!=o&&Vs(l,u,a)}function Do(t){return Ve(Ge.lFrame.contextLView,t)}function Ao(t,e=at.Default){const n=Ke();return null==n?Qt(t,e):Jn(Xe(),n,It(t),e)}function Oo(){throw new Error("invalid")}function Ro(t,e,n){const i=Ke();return Io(i,an(),e)&&$s(Ze(),Cn(),i,t,e,i[11],n,!1),Ro}function Lo(t,e,n,i,s){const r=s?"class":"style";mr(t,n,e.inputs[r],r,i)}function No(t,e,n,i){const s=Ke(),r=Ze(),o=20+t,a=s[11],l=s[o]=Ms(e,a,Ge.lFrame.currentNamespace),c=r.firstCreatePass?function(t,e,n,i,s,r,o){const a=e.consts,l=$e(a,r),c=As(e,n[6],t,3,s,l);return Ws(e,n,c,$e(a,o)),null!==c.attrs&&fo(c,c.attrs,!1),null!==c.mergedAttrs&&fo(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,r,s,0,e,n,i):r.data[o];Je(c,!0);const h=c.mergedAttrs;null!==h&&Mn(a,l,h);const u=c.classes;null!==u&&Fr(a,l,u);const d=c.styles;null!==d&&zr(a,l,d),Ar(r,s,l,c),0===Ge.lFrame.elementDepthCount&&ns(l,s),Ge.lFrame.elementDepthCount++,Te(c)&&(Fs(r,s,c),zs(r,c,s)),null!==i&&Vs(s,c)}function zo(){let t=Xe();tn()?en():(t=t.parent,Je(t,!1));const e=t;Ge.lFrame.elementDepthCount--;const n=Ze();n.firstCreatePass&&(Sn(n,t),xe(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&Lo(n,e,Ke(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&Lo(n,e,Ke(),e.stylesWithoutHost,!1)}function Fo(t,e,n,i){No(t,e,n,i),zo()}function Vo(t,e,n){const i=Ke(),s=Ze(),r=t+20,o=s.firstCreatePass?function(t,e,n,i,s){const r=e.consts,o=$e(r,i),a=As(e,n[6],t,4,"ng-container",o);return null!==o&&fo(a,o,!0),Ws(e,n,a,$e(r,s)),null!==e.queries&&e.queries.elementStart(e,a),a}(t,s,i,e,n):s.data[r];Je(o,!0);const a=i[r]=i[11].createComment("");Ar(s,i,a,o),ns(a,i),Te(o)&&(Fs(s,i,o),zs(s,o,i)),null!=n&&Vs(i,o)}function Uo(){let t=Xe();const e=Ze();tn()?en():(t=t.parent,Je(t,!1)),e.firstCreatePass&&(Sn(e,t),xe(t)&&e.queries.elementEnd(t))}function jo(){return Ke()}function Bo(t){return!!t&&"function"==typeof t.then}function Ho(t){return!!t&&"function"==typeof t.subscribe}function $o(t,e,n=!1,i){const s=Ke(),r=Ze(),o=Xe();return function(t,e,n,i,s,r,o=!1,a){const l=Te(i),c=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),h=dr(e);let u=!0;if(3===i.type){const d=ze(i,e),p=a?a(d):he,g=p.target||d,m=h.length,f=a?t=>a(Le(t[i.index])).target:i.index;if(Oe(n)){let o=null;if(!a&&l&&(o=function(t,e,n,i){const s=t.cleanup;if(null!=s)for(let r=0;r<s.length-1;r+=2){const t=s[r];if(t===n&&s[r+1]===i){const t=e[7],n=s[r+2];return t.length>n?t[n]:null}"string"==typeof t&&(r+=2)}return null}(t,e,s,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=r,o.__ngLastListenerFn__=r,u=!1;else{r=qo(i,e,r,!1);const t=n.listen(p.name||g,s,r);h.push(r,t),c&&c.push(s,f,m,m+1)}}else r=qo(i,e,r,!0),g.addEventListener(s,r,o),h.push(r),c&&c.push(s,f,m,o)}const d=i.outputs;let p;if(u&&null!==d&&(p=d[s])){const t=p.length;if(t)for(let n=0;n<t;n+=2){const t=e[p[n]][p[n+1]].subscribe(r),o=h.length;h.push(r,t),c&&c.push(s,i.index,o,-(o+1))}}}(r,s,s[11],o,t,e,n,i),$o}function Wo(t,e,n){try{return!1!==e(n)}catch(i){return gr(t,i),!1}}function qo(t,e,n,i){return function s(r){if(r===Function)return n;const o=2&t.flags?Ue(t.index,e):e;0==(32&e[2])&&ar(o);let a=Wo(e,n,r),l=s.__ngNextListenerFn__;for(;l;)a=Wo(e,l,r)&&a,l=l.__ngNextListenerFn__;return i&&!1===a&&(r.preventDefault(),r.returnValue=!1),a}}function Go(t=1){return function(t){return(Ge.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Ge.lFrame.contextLView))[8]}(t)}function Qo(t,e){let n=null;const i=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let s=0;s<e.length;s++){const r=e[s];if("*"!==r){if(null===i?ds(t,r,!0):ps(i,r))return s}else n=s}return n}function Ko(t){const e=Ke()[16][6];if(!e.projection){const n=e.projection=se(t?t.length:1,null),i=n.slice();let s=e.child;for(;null!==s;){const e=t?Qo(s,t):0;null!==e&&(i[e]?i[e].projectionNext=s:n[e]=s,i[e]=s),s=s.next}}}function Zo(t,e=0,n){const i=Ke(),s=Ze(),r=As(s,i[6],t,1,null,n||null);null===r.projection&&(r.projection=e),en(),function(t,e,n){Nr(e[11],0,e,n,xr(t,n,e),Dr(n.parent||e[6],e))}(s,i,r)}function Yo(t,e,n){return Xo(t,"",e,"",n),Yo}function Xo(t,e,n,i,s){const r=Ke(),o=ko(r,e,n,i);return o!==fs&&$s(Ze(),Cn(),r,t,o,r[11],s,!1),Xo}const Jo=[];function ta(t,e,n,i,s){const r=t[n+1],o=null===e;let a=i?Is(r):xs(r),l=!1;for(;0!==a&&(!1===l||o);){const n=t[a+1];ea(t[a],e)&&(l=!0,t[a+1]=i?Ts(n):Es(n)),a=i?Is(n):xs(n)}l&&(t[n+1]=i?Es(r):Ts(r))}function ea(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&ae(t,e)>=0}const na={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function ia(t){return t.substring(na.key,na.keyEnd)}function sa(t,e){const n=na.textEnd;return n===e?-1:(e=na.keyEnd=function(t,e,n){for(;e<n&&t.charCodeAt(e)>32;)e++;return e}(t,na.key=e,n),ra(t,e,n))}function ra(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function oa(t,e,n){return ha(t,e,n,!1),oa}function aa(t,e){return ha(t,e,null,!0),aa}function la(t){ua(re,ca,t,!0)}function ca(t,e){for(let n=function(t){return function(t){na.key=0,na.keyEnd=0,na.value=0,na.valueEnd=0,na.textEnd=t.length}(t),sa(t,ra(t,0,na.textEnd))}(e);n>=0;n=sa(e,n))re(t,ia(e),!0)}function ha(t,e,n,i){const s=Ke(),r=Ze(),o=ln(2);if(r.firstUpdatePass&&pa(r,t,o,i),e!==fs&&Io(s,o,e)){let a;null==n&&(a=function(){const t=Ge.lFrame;return null===t?null:t.currentSanitizer}())&&(n=a),fa(r,r.data[bn()+20],s,s[11],t,s[o+1]=function(t,e){return null==t||("function"==typeof e?t=e(t):"string"==typeof e?t+=e:"object"==typeof t&&(t=bt(yi(t)))),t}(e,n),i,o)}}function ua(t,e,n,i){const s=Ze(),r=ln(2);s.firstUpdatePass&&pa(s,null,r,i);const o=Ke();if(n!==fs&&Io(o,r,n)){const a=s.data[bn()+20];if(ya(a,i)&&!da(s,r)){let t=i?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=wt(t,n||"")),Lo(s,a,o,n,i)}else!function(t,e,n,i,s,r,o,a){s===fs&&(s=Jo);let l=0,c=0,h=0<s.length?s[0]:null,u=0<r.length?r[0]:null;for(;null!==h||null!==u;){const d=l<s.length?s[l+1]:void 0,p=c<r.length?r[c+1]:void 0;let g=null,m=void 0;h===u?(l+=2,c+=2,d!==p&&(g=u,m=p)):null===u||null!==h&&h<u?(l+=2,g=h):(c+=2,g=u,m=p),null!==g&&fa(t,e,n,i,g,m,o,a),h=l<s.length?s[l]:null,u=c<r.length?r[c]:null}}(s,a,o,o[11],o[r+1],o[r+1]=function(t,e,n){if(null==n||""===n)return Jo;const i=[],s=yi(n);if(Array.isArray(s))for(let r=0;r<s.length;r++)t(i,s[r],!0);else if("object"==typeof s)for(const r in s)s.hasOwnProperty(r)&&t(i,r,s[r]);else"string"==typeof s&&e(i,s);return i}(t,e,n),i,r)}}function da(t,e){return e>=t.expandoStartIndex}function pa(t,e,n,i){const s=t.data;if(null===s[n+1]){const r=s[bn()+20],o=da(t,n);ya(r,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){const s=function(t){const e=Ge.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let r=i?e.residualClasses:e.residualStyles;if(null===s)0===(i?e.classBindings:e.styleBindings)&&(n=ma(n=ga(null,t,e,n,i),e.attrs,i),r=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==s)if(n=ga(s,t,e,n,i),null===r){let n=function(t,e,n){const i=n?e.classBindings:e.styleBindings;if(0!==xs(i))return t[Is(i)]}(t,e,i);void 0!==n&&Array.isArray(n)&&(n=ga(null,t,e,n[1],i),n=ma(n,e.attrs,i),function(t,e,n,i){t[Is(n?e.classBindings:e.styleBindings)]=i}(t,e,i,n))}else r=function(t,e,n){let i=void 0;const s=e.directiveEnd;for(let r=1+e.directiveStylingLast;r<s;r++)i=ma(i,t[r].hostAttrs,n);return ma(i,e.attrs,n)}(t,e,i)}return void 0!==r&&(i?e.residualClasses=r:e.residualStyles=r),n}(s,r,e,i),function(t,e,n,i,s,r){let o=r?e.classBindings:e.styleBindings,a=Is(o),l=xs(o);t[i]=n;let c,h=!1;if(Array.isArray(n)){const t=n;c=t[1],(null===c||ae(t,c)>0)&&(h=!0)}else c=n;if(s)if(0!==l){const e=Is(t[a+1]);t[i+1]=Ss(e,a),0!==e&&(t[e+1]=Ps(t[e+1],i)),t[a+1]=131071&t[a+1]|i<<17}else t[i+1]=Ss(a,0),0!==a&&(t[a+1]=Ps(t[a+1],i)),a=i;else t[i+1]=Ss(l,0),0===a?a=i:t[l+1]=Ps(t[l+1],i),l=i;h&&(t[i+1]=Es(t[i+1])),ta(t,c,i,!0),ta(t,c,i,!1),function(t,e,n,i,s){const r=s?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof e&&ae(r,e)>=0&&(n[i+1]=Ts(n[i+1]))}(e,c,t,i,r),o=Ss(a,l),r?e.classBindings=o:e.styleBindings=o}(s,r,e,n,o,i)}}function ga(t,e,n,i,s){let r=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(r=e[a],i=ma(i,r.hostAttrs,s),r!==t);)a++;return null!==t&&(n.directiveStylingLast=a),i}function ma(t,e,n){const i=n?1:2;let s=-1;if(null!==e)for(let r=0;r<e.length;r++){const o=e[r];"number"==typeof o?s=o:s===i&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),re(t,o,!!n||e[++r]))}return void 0===t?null:t}function fa(t,e,n,i,s,r,o,a){if(3!==e.type)return;const l=t.data,c=l[a+1];va(1==(1&c)?_a(l,e,n,s,xs(c),o):void 0)||(va(r)||function(t){return 2==(2&t)}(c)&&(r=_a(l,null,n,s,a,o)),function(t,e,n,i,s){const r=Oe(t);if(e)s?r?t.addClass(n,i):n.classList.add(i):r?t.removeClass(n,i):n.classList.remove(i);else{const e=-1==i.indexOf("-")?void 0:2;null==s?r?t.removeStyle(n,i,e):n.style.removeProperty(i):r?t.setStyle(n,i,s,e):n.style.setProperty(i,s)}}(i,o,Ne(bn(),n),s,r))}function _a(t,e,n,i,s,r){const o=null===e;let a=void 0;for(;s>0;){const e=t[s],r=Array.isArray(e),l=r?e[1]:e,c=null===l;let h=n[s+1];h===fs&&(h=c?Jo:void 0);let u=c?oe(h,i):l===i?h:void 0;if(r&&!va(u)&&(u=oe(e,i)),va(u)&&(a=u,o))return a;const d=t[s+1];s=o?Is(d):xs(d)}if(null!==e){let t=r?e.residualClasses:e.residualStyles;null!=t&&(a=oe(t,i))}return a}function va(t){return void 0!==t}function ya(t,e){return 0!=(t.flags&(e?16:32))}function ba(t,e=""){const n=Ke(),i=Ze(),s=t+20,r=i.firstCreatePass?As(i,n[6],t,3,null,null):i.data[s],o=n[s]=function(t,e){return Oe(e)?e.createText(t):e.createTextNode(t)}(e,n[11]);Ar(i,n,o,r),Je(r,!1)}function wa(t){return Ca("",t,""),wa}function Ca(t,e,n){const i=Ke(),s=ko(i,t,e,n);return s!==fs&&fr(i,bn(),s),Ca}function Sa(t,e,n,i,s){const r=Ke(),o=function(t,e,n,i,s,r){const o=Eo(t,on(),n,s);return ln(2),o?e+Vn(n)+i+Vn(s)+r:fs}(r,t,e,n,i,s);return o!==fs&&fr(r,bn(),o),Sa}function Ia(t,e,n){ua(re,ca,ko(Ke(),t,e,n),!0)}function Ea(t,e,n){const i=Ke();return Io(i,an(),e)&&$s(Ze(),Cn(),i,t,e,i[11],n,!0),Ea}function xa(t,e){const n=je(t)[1],i=n.data.length-1;Sn(n,{directiveStart:i,directiveEnd:i+1})}function Pa(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0;const i=[t];for(;e;){let s=void 0;if(ke(t))s=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");s=e.\u0275dir}if(s){if(n){i.push(s);const e=t;e.inputs=Ta(t.inputs),e.declaredInputs=Ta(t.declaredInputs),e.outputs=Ta(t.outputs);const n=s.hostBindings;n&&Da(t,n);const r=s.viewQuery,o=s.contentQueries;if(r&&ka(t,r),o&&Ma(t,o),ct(t.inputs,s.inputs),ct(t.declaredInputs,s.declaredInputs),ct(t.outputs,s.outputs),ke(s)&&s.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(s.data.animation)}e.afterContentChecked=e.afterContentChecked||s.afterContentChecked,e.afterContentInit=t.afterContentInit||s.afterContentInit,e.afterViewChecked=t.afterViewChecked||s.afterViewChecked,e.afterViewInit=t.afterViewInit||s.afterViewInit,e.doCheck=t.doCheck||s.doCheck,e.onDestroy=t.onDestroy||s.onDestroy,e.onInit=t.onInit||s.onInit}const e=s.features;if(e)for(let i=0;i<e.length;i++){const s=e[i];s&&s.ngInherit&&s(t),s===Pa&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,n=null;for(let i=t.length-1;i>=0;i--){const s=t[i];s.hostVars=e+=s.hostVars,s.hostAttrs=On(s.hostAttrs,n=On(n,s.hostAttrs))}}(i)}function Ta(t){return t===he?{}:t===ue?[]:t}function ka(t,e){const n=t.viewQuery;t.viewQuery=n?(t,i)=>{e(t,i),n(t,i)}:e}function Ma(t,e){const n=t.contentQueries;t.contentQueries=n?(t,i,s)=>{e(t,i,s),n(t,i,s)}:e}function Da(t,e){const n=t.hostBindings;t.hostBindings=n?(t,i)=>{e(t,i),n(t,i)}:e}class Aa{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Oa(t){t.type.prototype.ngOnChanges&&(t.setInput=Ra,t.onChanges=function(){const t=La(this),e=t&&t.current;if(e){const n=t.previous;if(n===he)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}})}function Ra(t,e,n,i){const s=La(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:he,current:null}),r=s.current||(s.current={}),o=s.previous,a=this.declaredInputs[n],l=o[a];r[a]=new Aa(l&&l.currentValue,e,o===he),t[i]=e}function La(t){return t.__ngSimpleChanges__||null}function Na(t,e,n,i,s){if(t=It(t),Array.isArray(t))for(let r=0;r<t.length;r++)Na(t[r],e,n,i,s);else{const r=Ze(),o=Ke();let a=lo(t)?t:It(t.provide),l=ro(t);const c=Xe(),h=65535&c.providerIndexes,u=c.directiveStart,d=c.providerIndexes>>16;if(lo(t)||!t.multi){const i=new kn(l,s,Ao),p=Va(a,e,s?h:h+d,u);-1===p?(Xn(Qn(c,o),r,a),za(r,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=65536),n.push(i),o.push(i)):(n[p]=i,o[p]=i)}else{const p=Va(a,e,h+d,u),g=Va(a,e,h,h+d),m=p>=0&&n[p],f=g>=0&&n[g];if(s&&!f||!s&&!m){Xn(Qn(c,o),r,a);const h=function(t,e,n,i,s){const r=new kn(t,n,Ao);return r.multi=[],r.index=e,r.componentProviders=0,Fa(r,s,i&&!n),r}(s?ja:Ua,n.length,s,i,l);!s&&f&&(n[g].providerFactory=h),za(r,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=65536),n.push(h),o.push(h)}else za(r,t,p>-1?p:g,Fa(n[s?g:p],l,!s&&i));!s&&i&&f&&n[g].componentProviders++}}}function za(t,e,n,i){const s=lo(e);if(s||e.useClass){const r=(e.useClass||e).prototype.ngOnDestroy;if(r){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[i,r]):o[t+1].push(i,r)}else o.push(n,r)}}}function Fa(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Va(t,e,n,i){for(let s=n;s<i;s++)if(e[s]===t)return s;return-1}function Ua(t,e,n,i){return Ba(this.multi,[])}function ja(t,e,n,i){const s=this.multi;let r;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=ii(n,n[1],this.providerFactory.index,i);r=e.slice(0,t),Ba(s,r);for(let n=t;n<e.length;n++)r.push(e[n])}else r=[],Ba(s,r);return r}function Ba(t,e){for(let n=0;n<t.length;n++)e.push((0,t[n])());return e}function Ha(t,e=[]){return n=>{n.providersResolver=(n,i)=>function(t,e,n){const i=Ze();if(i.firstCreatePass){const s=ke(t);Na(n,i.data,i.blueprint,s,!0),Na(e,i.data,i.blueprint,s,!1)}}(n,i?i(t):t,e)}}Oa.ngInherit=!0;class $a{}class Wa{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let qa=(()=>{class t{}return t.NULL=new Wa,t})(),Ga=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Qa(t),t})();const Qa=function(t){return $r(t,Xe(),Ke())};class Ka{}const Za=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}();let Ya=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Xa(),t})();const Xa=function(){const t=Ke(),e=Ue(Xe().index,t);return function(t){const e=t[11];if(Oe(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ie(e)?e:t)};let Ja=(()=>{class t{}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>null}),t})();class tl{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const el=new tl("9.1.12");class nl{constructor(){}supports(t){return wo(t)}create(t){return new sl(t)}}const il=(t,e)=>e;class sl{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||il}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,s=null;for(;e||n;){const r=!n||e&&e.currentIndex<ll(n,i,s)?e:n,o=ll(r,i,s),a=r.currentIndex;if(r===n)i--,n=n._nextRemoved;else if(e=e._next,null==r.previousIndex)i++;else{s||(s=[]);const t=o-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<s.length?s[n]:s[n]=0,r=i+n;e<=r&&r<t&&(s[n]=i+1)}s[r.previousIndex]=e-t}}o!==a&&t(r,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!wo(t))throw new Error(`Error trying to diff '${bt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,s=this._itHead,r=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],i=this._trackByFn(e,n),null!==s&&yo(s.trackById,i)?(r&&(s=this._verifyReinsertion(s,n,i,e)),yo(s.item,n)||this._addIdentityChange(s,n)):(s=this._mismatch(s,n,i,e),r=!0),s=s._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[vo()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==s&&yo(s.trackById,i)?(r&&(s=this._verifyReinsertion(s,t,i,e)),yo(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,i,e),r=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(yo(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(yo(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,i)):t=this._addAfter(new rl(e,n),s,i),t}_verifyReinsertion(t,e,n,i){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,s=t._nextRemoved;return null===i?this._removalsHead=s:i._nextRemoved=s,null===s?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new al),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new al),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class rl{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class ol{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&yo(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class al{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new ol,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ll(t,e,n){const i=t.previousIndex;if(null===i)return i;let s=0;return n&&i<n.length&&(s=n[i]),i+e+s}class cl{constructor(){}supports(t){return t instanceof Map||Co(t)}create(){return new hl}}class hl{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Co(t)))throw new Error(`Error trying to diff '${bt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}const n=new ul(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){yo(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ul{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let dl=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ot,new st]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new t([new nl])}),t})(),pl=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ot,new st]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new t([new cl])}),t})();const gl=[new cl],ml=new dl([new nl]),fl=new pl(gl);let _l=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>vl(t,Ga),t})();const vl=function(t,e){return Wr(t,e,Xe(),Ke())};let yl=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>bl(t,Ga),t})();const bl=function(t,e){return qr(t,e,Xe(),Ke())},wl={};class Cl extends qa{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=we(t);return new El(e,this.ngModule)}}function Sl(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Il=new Ft("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>jn});class El extends $a{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(ms).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Sl(this.componentDef.inputs)}get outputs(){return Sl(this.componentDef.outputs)}create(t,e,n,i){const s=(i=i||this.ngModule)?function(t,e){return{get:(n,i,s)=>{const r=t.get(n,wl,s);return r!==wl||i===wl?r:e.get(n,i,s)}}}(t,i.injector):t,r=s.get(Ka,Re),o=s.get(Ja,null),a=r.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Oe(t))return t.selectRootElement(e,n===ce.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):Ms(l,r.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),h=this.componentDef.onPush?576:528,u="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),d={components:[],scheduler:jn,clean:ur,playerHandler:null,flags:0},p=js(0,-1,null,1,0,null,null,null,null,null),g=Ds(null,p,d,h,null,null,r,a,o,s);let m,f;gn(g,null);try{const t=function(t,e,n,i,s,r){const o=n[1];n[20]=t;const a=As(o,null,0,3,null,null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(fo(a,l,!0),null!==t&&(Mn(s,t,l),null!==a.classes&&Fr(s,t,a.classes),null!==a.styles&&zr(s,t,a.styles)));const c=i.createRenderer(t,e),h=Ds(n,Us(e),null,e.onPush?64:16,n[20],a,i,c,void 0);return o.firstCreatePass&&(Xn(Qn(a,n),o,e.type),Zs(o,a),Xs(a,n.length,1)),or(n,h),n[20]=h}(c,this.componentDef,g,r,a);if(c)if(n)Mn(a,c,["ng-version",el.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,s=2;for(;i<t.length;){let r=t[i];if("string"==typeof r)2===s?""!==r&&e.push(r,t[++i]):8===s&&n.push(r);else{if(!hs(s))break;s=r}i++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&Mn(a,c,t),e&&e.length>0&&Fr(a,c,e.join(" "))}if(f=Fe(p,0),void 0!==e){const t=f.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=e[n];t.push(null!=i?Array.from(i):null)}}m=function(t,e,n,i,s){const r=n[1],o=function(t,e,n){const i=Xe();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Ks(t,i,1),Js(t,e,n));const s=ii(e,t,e.length-1,i);ns(s,e);const r=ze(i,e);return r&&ns(r,e),s}(r,n,e);i.components.push(o),t[8]=o,s&&s.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,n.length-1);const a=Xe();if(r.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){wn(a.index-20);const t=n[1];qs(t,e),Gs(t,n,e.hostVars),Qs(e,o)}return o}(t,this.componentDef,g,d,[xa]),Os(p,g,null)}finally{yn()}const _=new xl(this.componentType,m,$r(Ga,f,g),g,f);return n&&!u||(p.node.child=f),_}}class xl extends class{}{constructor(t,e,n,i,s){super(),this.location=n,this._rootLView=i,this._tNode=s,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Ur(i),function(t,e,n,i){let s=t.node;null==s&&(t.node=s=Bs(0,null,2,-1,null,null)),i[6]=s}(i[1],0,0,i),this.componentType=t}get injector(){return new oi(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const Pl=void 0;var Tl=["en",[["a","p"],["AM","PM"],Pl],[["AM","PM"],Pl,Pl],[["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"]],Pl,[["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"]],Pl,[["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}",Pl,"{1} 'at' {0}",Pl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let kl={};function Ml(t){return t in kl||(kl[t]=Mt.ng&&Mt.ng.common&&Mt.ng.common.locales&&Mt.ng.common.locales[t]),kl[t]}const Dl=function(){var t={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};return t[t.LocaleId]="LocaleId",t[t.DayPeriodsFormat]="DayPeriodsFormat",t[t.DayPeriodsStandalone]="DayPeriodsStandalone",t[t.DaysFormat]="DaysFormat",t[t.DaysStandalone]="DaysStandalone",t[t.MonthsFormat]="MonthsFormat",t[t.MonthsStandalone]="MonthsStandalone",t[t.Eras]="Eras",t[t.FirstDayOfWeek]="FirstDayOfWeek",t[t.WeekendRange]="WeekendRange",t[t.DateFormat]="DateFormat",t[t.TimeFormat]="TimeFormat",t[t.DateTimeFormat]="DateTimeFormat",t[t.NumberSymbols]="NumberSymbols",t[t.NumberFormats]="NumberFormats",t[t.CurrencyCode]="CurrencyCode",t[t.CurrencySymbol]="CurrencySymbol",t[t.CurrencyName]="CurrencyName",t[t.Currencies]="Currencies",t[t.Directionality]="Directionality",t[t.PluralCase]="PluralCase",t[t.ExtraData]="ExtraData",t}();let Al="en-US";function Ol(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Al=t.toLowerCase().replace(/_/g,"-"))}const Rl=new Map;class Ll extends Jt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Cl(this);const n=Se(t),i=t[Lt]||null;i&&Ol(i),this._bootstrapComponents=$n(n.bootstrap),this._r3Injector=no(t,e,[{provide:Jt,useValue:this},{provide:qa,useValue:this.componentFactoryResolver}],bt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ho.THROW_IF_NOT_FOUND,n=at.Default){return t===ho||t===Jt||t===Vt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Nl extends te{constructor(t){super(),this.moduleType=t,null!==Se(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${bt(e)} vs ${bt(e.name)}`)})(t,Rl.get(t),e),Rl.set(t,e)}let n=e.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(e=>t(e))}(t)}create(t){return new Ll(this.moduleType,t)}}function zl(t,e,n,i){return Bl(Ke(),rn(),t,e,n,i)}function Fl(t,e,n,i,s){return Hl(Ke(),rn(),t,e,n,i,s)}function Vl(t,e,n,i,s,r){return $l(Ke(),rn(),t,e,n,i,s,r)}function Ul(t,e,n,i,s,r,o){return function(t,e,n,i,s,r,o,a,l){const c=e+n;return Po(t,c,s,r,o,a)?So(t,c+4,l?i.call(l,s,r,o,a):i(s,r,o,a)):jl(t,c+4)}(Ke(),rn(),t,e,n,i,s,r,o)}function jl(t,e){const n=t[e];return n===fs?void 0:n}function Bl(t,e,n,i,s,r){const o=e+n;return Io(t,o,s)?So(t,o+1,r?i.call(r,s):i(s)):jl(t,o+1)}function Hl(t,e,n,i,s,r,o){const a=e+n;return Eo(t,a,s,r)?So(t,a+2,o?i.call(o,s,r):i(s,r)):jl(t,a+2)}function $l(t,e,n,i,s,r,o,a){const l=e+n;return xo(t,l,s,r,o)?So(t,l+3,a?i.call(a,s,r,o):i(s,r,o)):jl(t,l+3)}function Wl(t,e){const n=Ze();let i;const s=t+20;n.firstCreatePass?(i=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const i=e[n];if(t===i.name)return i}throw new Error(`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[s]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(s,i.onDestroy)):i=n.data[s];const r=i.factory||(i.factory=Ce(i.type)),o=qt(Ao),a=qn(!1),l=r();return qn(a),qt(o),function(t,e,n,i){const s=n+20;s>=t.data.length&&(t.data[s]=null,t.blueprint[s]=null),e[s]=i}(n,Ke(),t,l),l}function ql(t,e,n){const i=Ke(),s=Ve(i,t);return Zl(i,Kl(i,t)?Bl(i,rn(),e,s.transform,n,s):s.transform(n))}function Gl(t,e,n,i){const s=Ke(),r=Ve(s,t);return Zl(s,Kl(s,t)?Hl(s,rn(),e,r.transform,n,i,r):r.transform(n,i))}function Ql(t,e,n,i,s){const r=Ke(),o=Ve(r,t);return Zl(r,Kl(r,t)?$l(r,rn(),e,o.transform,n,i,s,o):o.transform(n,i,s))}function Kl(t,e){return t[1].data[e+20].pure}function Zl(t,e){return bo.isWrapped(e)&&(e=bo.unwrap(e),t[on()]=fs),e}class Yl extends E{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,s=t=>null,r=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(r=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(r=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(i,s,r);return t instanceof u&&t.add(o),o}}function Xl(){return this._results[vo()]()}class Jl{constructor(){this.dirty=!0,this._results=[],this.changes=new Yl,this.length=0;const t=vo(),e=Jl.prototype;e[t]||(e[t]=Xl)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,n){void 0===n&&(n=e);for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?(n===e&&(n=e.slice(0,i)),t(s,n)):n!==e&&n.push(s)}return n}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class tc{constructor(t){this.queryList=t,this.matches=null}clone(){return new tc(this.queryList)}setDirty(){this.queryList.setDirty()}}class ec{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);i.push(this.queries[n.indexInDeclarationView].clone())}return new ec(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==_c(t,e).matches&&this.queries[e].setDirty()}}class nc{constructor(t,e,n,i=null){this.predicate=t,this.descendants=e,this.isStatic=n,this.read=i}}class ic{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const i=null!==e?e.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,null!==e?e.push(s):e=[s])}return null!==e?new ic(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class sc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new sc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&4===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(t,e){if(Array.isArray(this.metadata.predicate)){const n=this.metadata.predicate;for(let i=0;i<n.length;i++)this.matchTNodeWithReadOption(t,e,rc(e,n[i]))}else{const n=this.metadata.predicate;n===_l?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,ni(e,t,n,!1,!1))}}matchTNodeWithReadOption(t,e,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===Ga||i===yl||i===_l&&0===e.type)this.addMatch(e.index,-2);else{const n=ni(e,t,i,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function rc(t,e){const n=t.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1];return null}function oc(t,e,n,i){return-1===n?function(t,e){return 3===t.type||4===t.type?$r(Ga,t,e):0===t.type?Wr(_l,Ga,t,e):null}(e,t):-2===n?function(t,e,n){return n===Ga?$r(Ga,e,t):n===_l?Wr(_l,Ga,e,t):n===yl?qr(yl,Ga,e,t):void 0}(t,e,i):ii(t,t[1],n,e)}function ac(t,e,n,i){const s=e[19].queries[i];if(null===s.matches){const i=t.data,r=n.matches,o=[];for(let t=0;t<r.length;t+=2){const s=r[t];o.push(s<0?null:oc(e,i[s],r[t+1],n.metadata.read))}s.matches=o}return s.matches}function lc(t){const e=Ke(),n=Ze(),i=un();dn(i+1);const s=_c(n,i);if(t.dirty&&Be(e)===s.metadata.isStatic){if(null===s.matches)t.reset([]);else{const r=s.crossesNgTemplate?function t(e,n,i,s){const r=e.queries.getByIndex(i),o=r.matches;if(null!==o){const a=ac(e,n,r,i);for(let e=0;e<o.length;e+=2){const i=o[e];if(i>0)s.push(a[e/2]);else{const r=o[e+1],a=n[-i];for(let e=10;e<a.length;e++){const n=a[e];n[17]===n[3]&&t(n[1],n,r,s)}if(null!==a[9]){const e=a[9];for(let n=0;n<e.length;n++){const i=e[n];t(i[1],i,r,s)}}}}}return s}(n,e,i,[]):ac(n,e,s,i);t.reset(r),t.notifyOnChanges()}return!0}return!1}function cc(t,e,n){uc(Ze(),Ke(),t,e,n,!0)}function hc(t,e,n){uc(Ze(),Ke(),t,e,n,!1)}function uc(t,e,n,i,s,r){t.firstCreatePass&&(fc(t,new nc(n,i,r,s),-1),r&&(t.staticViewQueries=!0)),mc(t,e)}function dc(t,e,n,i){pc(Ze(),Ke(),e,n,i,!1,Xe(),t)}function pc(t,e,n,i,s,r,o,a){t.firstCreatePass&&(fc(t,new nc(n,i,r,s),o.index),function(t,e){const n=t.contentQueries||(t.contentQueries=[]);e!==(t.contentQueries.length?n[n.length-1]:-1)&&n.push(t.queries.length-1,e)}(t,a),r&&(t.staticContentQueries=!0)),mc(t,e)}function gc(){return t=Ke(),e=un(),t[19].queries[e].queryList;var t,e}function mc(t,e){const n=new Jl;!function(t,e,n,i){const s=dr(e);s.push(n),t.firstCreatePass&&pr(t).push(i,s.length-1)}(t,e,n,n.destroy),null===e[19]&&(e[19]=new ec),e[19].queries.push(new tc(n))}function fc(t,e,n){null===t.queries&&(t.queries=new ic),t.queries.track(new sc(e,n))}function _c(t,e){return t.queries.getByIndex(e)}const vc=new Ft("Application Initializer");let yc=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();Bo(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Qt(vc,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const bc=new Ft("AppId"),wc={provide:bc,useFactory:function(){return`${Cc()}${Cc()}${Cc()}`},deps:[]};function Cc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Sc=new Ft("Platform Initializer"),Ic=new Ft("Platform ID"),Ec=new Ft("appBootstrapListener");let xc=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Pc=new Ft("LocaleId"),Tc=new Ft("DefaultCurrencyCode");class kc{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Mc=function(t){return new Nl(t)},Dc=Mc,Ac=function(t){return Promise.resolve(Mc(t))},Oc=function(t){const e=Mc(t),n=$n(Se(t).declarations).reduce((t,e)=>{const n=we(e);return n&&t.push(new El(n)),t},[]);return new kc(e,n)},Rc=Oc,Lc=function(t){return Promise.resolve(Oc(t))};let Nc=(()=>{class t{constructor(){this.compileModuleSync=Dc,this.compileModuleAsync=Ac,this.compileModuleAndAllComponentsSync=Rc,this.compileModuleAndAllComponentsAsync=Lc}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const zc=new Ft("compilerOptions"),Fc=(()=>Promise.resolve(0))();function Vc(t){"undefined"==typeof Zone?Fc.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Uc{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Yl(!1),this.onMicrotaskEmpty=new Yl(!1),this.onStable=new Yl(!1),this.onError=new Yl(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=Mt.requestAnimationFrame,e=Mt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Mt,()=>{t.lastRequestAnimationFrameId=-1,$c(t),Hc(t)}),$c(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,i,s,r,o,a)=>{try{return Wc(t),n.invokeTask(s,r,o,a)}finally{e&&"eventTask"===r.type&&e(),qc(t)}},onInvoke:(e,n,i,s,r,o,a)=>{try{return Wc(t),e.invoke(i,s,r,o,a)}finally{qc(t)}},onHasTask:(e,n,i,s)=>{e.hasTask(i,s),n===i&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,$c(t),Hc(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,i,s)=>(e.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Uc.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Uc.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const s=this._inner,r=s.scheduleEventTask("NgZoneEvent: "+i,t,Bc,jc,jc);try{return s.runTask(r,e,n)}finally{s.cancelTask(r)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function jc(){}const Bc={};function Hc(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function $c(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function Wc(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function qc(t){t._nesting--,Hc(t)}class Gc{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Yl,this.onMicrotaskEmpty=new Yl,this.onStable=new Yl,this.onError=new Yl}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Qc=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Uc.assertNotInAngularZone(),Vc(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Vc(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Kc=(()=>{class t{constructor(){this._applications=new Map,Xc.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Xc.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zc{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Yc,Xc=new Zc,Jc=function(t,e,n){const i=t.get(zc,[]).concat(e),s=new Nl(n);if(0===po.size)return Promise.resolve(s);const r=function(t){const e=[];return t.forEach(t=>t&&e.push(...t)),e}(i.map(t=>t.providers));if(0===r.length)return Promise.resolve(s);const o=function(){const t=Mt.ng;if(!t||!t.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return t.\u0275compilerFacade}(),a=ho.create({providers:r}).get(o.ResourceLoader);return function(t){const e=[],n=new Map;function i(t){let e=n.get(t);if(!e){const i=(t=>Promise.resolve(a.get(t)))(t);n.set(t,e=i.then(mo))}return e}return po.forEach((t,n)=>{const s=[];t.templateUrl&&s.push(i(t.templateUrl).then(e=>{t.template=e}));const r=t.styleUrls,o=t.styles||(t.styles=[]),a=t.styles.length;r&&r.forEach((e,n)=>{o.push(""),s.push(i(e).then(i=>{o[a+n]=i,r.splice(r.indexOf(e),1),0==r.length&&(t.styleUrls=void 0)}))});const l=Promise.all(s).then(()=>function(t){go.delete(t)}(n));e.push(l)}),po=new Map,Promise.all(e).then(()=>{})}().then(()=>s)};const th=new Ft("AllowMultipleToken");class eh{constructor(t,e){this.name=t,this.token=e}}function nh(t,e,n=[]){const i="Platform: "+e,s=new Ft(i);return(e=[])=>{let r=ih();if(!r||r.injector.get(th,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:Zr,useValue:"platform"});!function(t){if(Yc&&!Yc.destroyed&&!Yc.injector.get(th,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Yc=t.get(sh);const e=t.get(Sc,null);e&&e.forEach(t=>t())}(ho.create({providers:t,name:i}))}return function(t){const e=ih();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function ih(){return Yc&&!Yc.destroyed?Yc:null}let sh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Gc:("zone.js"===t?void 0:t)||new Uc({enableLongStackTrace:Ii(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),i=[{provide:Uc,useValue:n}];return n.run(()=>{const e=ho.create({providers:i,parent:this.injector,name:t.moduleType.name}),s=t.create(e),r=s.injector.get(di,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>ah(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{r.handleError(t)}})),function(t,e,n){try{const i=n();return Bo(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}(r,n,()=>{const t=s.injector.get(yc);return t.runInitializers(),t.donePromise.then(()=>(Ol(s.injector.get(Pc,"en-US")||"en-US"),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=rh({},e);return Jc(this.injector,n,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(oh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function rh(t,e){return Array.isArray(e)?e.reduce(rh,t):Object.assign(Object.assign({},t),e)}let oh=(()=>{class t{constructor(t,e,n,i,s,r){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=s,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ii(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new b(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new b(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Uc.assertNotInAngularZone(),Vc(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Uc.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=G(o,a.pipe(t=>{return Q()((e=tt,function(t){let n;n="function"==typeof e?e:function(){return e};const i=Object.create(t,X);return i.source=t,i.subjectFactory=n,i})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof $a?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(Jt),s=n.create(ho.NULL,[],e||n.selector,i);s.onDestroy(()=>{this._unloadComponent(s)});const r=s.injector.get(Qc,null);return r&&s.injector.get(Kc).registerApplication(s.location.nativeElement,r),this._loadComponent(s),Ii()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;ah(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Ec,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),ah(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(xc),Qt(ho),Qt(di),Qt(qa),Qt(yc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function ah(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class lh{}class ch{}const hh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let uh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||hh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,i]=t.split("#");return void 0===i&&(i="default"),n("zn8P")(e).then(t=>t[i]).then(t=>dh(t,e,i)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,i]=t.split("#"),s="NgFactory";return void 0===i&&(i="default",s=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[i+s]).then(t=>dh(t,e,i))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Nc),Qt(ch,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function dh(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const ph=nh(null,"core",[{provide:Ic,useValue:"unknown"},{provide:sh,deps:[ho]},{provide:Kc,deps:[]},{provide:xc,deps:[]}]),gh=[{provide:oh,useClass:oh,deps:[Uc,xc,ho,di,qa,yc]},{provide:Il,deps:[Uc],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:yc,useClass:yc,deps:[[new st,vc]]},{provide:Nc,useClass:Nc,deps:[]},wc,{provide:dl,useFactory:function(){return ml},deps:[]},{provide:pl,useFactory:function(){return fl},deps:[]},{provide:Pc,useFactory:function(t){return Ol(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new it(Pc),new st,new ot]]},{provide:Tc,useValue:"USD"}];let mh=(()=>{class t{constructor(t){}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(oh))},providers:gh}),t})();const fh={isWizishopcom:!1,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"http://debugshop.wizilocal.com/_i/",assets_route:"assets/img-manager/",translations_route:"./assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:131,token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyX2lkIjo2LCJleHAiOjE2MzczOTQzNDIsImlhdCI6MTYzNDgwMjM0Mn0.1UhLbMA3euzDDr3zdy2KfUzbdordXbTg4lMjdslPZ9QHiTXoYG5n6SlZV7AAOdWjt_t5eKqgVLKIaQQj9jVA2j2DGtzpnv-rbxHGbatXZ8phWEaYGMXxtOX684aogFrTOP8poDVN0bIerFwBfjuu8U2zDqspx0gpbPHToJE-0W-mQcP0WCOh9quFnLpgziQ-gD-SuuQ5zyTF9l8ToNW2jVzEZ3tO_uk7gULzB2HD-uCcmUIKFhai1NQXEzog8tPSWJNifLyF0Ja0kTrIDrN8oZaf2pEj5yX2Z7xfm9s14XIKX-m2wpU10acBiIhq0RWLOKHLiWbyj_iLGvQV6_DfeA"},product_sheet_endpoint:"/products/ajax",isPhotosTab:!0},_h={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"https://media.wizilocal.com/_i/",assets_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},vh={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.wizishop.com/",wizi_api:"https://api.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},yh={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.dropilocal.com/",wizi_api:"https://api.dropilocal.com/v3",CDN_URL:"https://media.dropilocal.com/_i/",assets_route:"https://js.dropilocal.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},bh={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.dropizi.fr/",wizi_api:"https://api-staging.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},wh=Object.assign({},function(){const t=!!window.location.hostname.match(/local/),e=!!window.location.hostname.match(/wizi/);return window.location.port?fh:t?e?_h:yh:e?vh:bh}());let Ch=null;function Sh(){return Ch}const Ih=new Ft("DocumentToken");let Eh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:xh,token:t,providedIn:"platform"}),t})();function xh(){return Qt(Th)}const Ph=new Ft("Location Initialized");let Th=(()=>{class t extends Eh{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=Sh().getLocation(),this._history=Sh().getHistory()}getBaseHrefFromDOM(){return Sh().getBaseHref(this._doc)}onPopState(t){Sh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){Sh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}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(t){this.location.pathname=t}pushState(t,e,n){kh()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){kh()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({factory:Mh,token:t,providedIn:"platform"}),t})();function kh(){return!!window.history.pushState}function Mh(){return new Th(Qt(Ih))}function Dh(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Ah(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Oh(t){return t&&"?"!==t[0]?"?"+t:t}let Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:Lh,token:t,providedIn:"root"}),t})();function Lh(t){const e=Qt(Ih).location;return new zh(Qt(Eh),e&&e.origin||"")}const Nh=new Ft("appBaseHref");let zh=(()=>{class t extends Rh{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Dh(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+Oh(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,i){const s=this.prepareExternalUrl(n+Oh(i));this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,i){const s=this.prepareExternalUrl(n+Oh(i));this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Eh),Qt(Nh,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fh=(()=>{class t extends Rh{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=Dh(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,i){let s=this.prepareExternalUrl(n+Oh(i));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,i){let s=this.prepareExternalUrl(n+Oh(i));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Eh),Qt(Nh,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Vh=(()=>{class t{constructor(t,e){this._subject=new Yl,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=Ah(jh(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+Oh(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,jh(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Oh(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Oh(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)})}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(Qt(Rh),Qt(Eh))},t.normalizeQueryParams=Oh,t.joinWithSlash=Dh,t.stripTrailingSlash=Ah,t.\u0275prov=ht({factory:Uh,token:t,providedIn:"root"}),t})();function Uh(){return new Vh(Qt(Rh),Qt(Eh))}function jh(t){return t.replace(/\/index.html$/,"")}const Bh=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}();class Hh{}let $h=(()=>{class t extends Hh{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Ml(e);if(n)return n;const i=e.split("-")[0];if(n=Ml(i),n)return n;if("en"===i)return Tl;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[Dl.PluralCase]}(e||this.locale)(t)){case Bh.Zero:return"zero";case Bh.One:return"one";case Bh.Two:return"two";case Bh.Few:return"few";case Bh.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Pc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Wh(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}let qh=(()=>{class t{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(wo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+bt(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(Ao(dl),Ao(pl),Ao(Ga),Ao(Ya))},t.\u0275dir=ye({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class Gh{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Qh=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Ii()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Gh(null,this._ngForOf,-1,-1),null===i?void 0:i),s=new Kh(t,n);e.push(s)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const s=this._viewContainer.get(n);this._viewContainer.move(s,i);const r=new Kh(t,s);e.push(r)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=i,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(yl),Ao(_l),Ao(dl))},t.\u0275dir=ye({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class Kh{constructor(t,e){this.record=t,this.view=e}}let Zh=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Yh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Xh("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Xh("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(yl),Ao(_l))},t.\u0275dir=ye({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Yh{constructor(){this.$implicit=null,this.ngIf=null}}function Xh(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}let Jh=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,i]=t.split(".");null!=(e=null!=e&&i?`${e}${i}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(pl),Ao(Ya))},t.\u0275dir=ye({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),tu=(()=>{class t{constructor(t){this.differs=t,this.keyValues=[]}transform(t,e=eu){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const n=this.differ.diff(t);return n&&(this.keyValues=[],n.forEachItem(t=>{this.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues}}return t.\u0275fac=function(e){return new(e||t)(Ao(pl))},t.\u0275pipe=be({name:"keyvalue",type:t,pure:!1}),t})();function eu(t,e){const n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;const s=String(n),r=String(i);return s==r?0:s<r?-1:1}let nu=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[{provide:Hh,useClass:$h}]}),t})();function iu(t){return"browser"===t}let su=(()=>{class t{}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new ru(Qt(Ih),window,Qt(di))}),t})();class ru{constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportScrollRestoration()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportScrollRestoration()){t=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(t):t.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{const e=this.document.querySelector("#"+t);if(e)return void this.scrollToElement(e);const n=this.document.querySelector(`[name='${t}']`);if(n)return void this.scrollToElement(n)}catch(e){this.errorHandler.handleError(e)}}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],i-s[1])}supportScrollRestoration(){try{return!!this.window&&!!this.window.scrollTo}catch(t){return!1}}}class ou extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new ou,Ch||(Ch=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=lu||(lu=document.querySelector("base"),lu)?lu.getAttribute("href"):null;return null==e?null:(n=e,au||(au=document.createElement("a")),au.setAttribute("href",n),"/"===au.pathname.charAt(0)?au.pathname:"/"+au.pathname);var n}resetBaseElement(){lu=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Wh(document.cookie,t)}}let au,lu=null;const cu=new Ft("TRANSITION_ID"),hu=[{provide:vc,useFactory:function(t,e,n){return()=>{n.get(yc).donePromise.then(()=>{const n=Sh();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[cu,Ih,ho],multi:!0}];class uu{static init(){var t;t=new uu,Xc=t}addToWindow(t){Mt.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Mt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Mt.getAllAngularRootElements=()=>t.getAllRootElements(),Mt.frameworkStabilizers||(Mt.frameworkStabilizers=[]),Mt.frameworkStabilizers.push(t=>{const e=Mt.getAllAngularTestabilities();let n=e.length,i=!1;const s=function(e){i=i||e,n--,0==n&&t(i)};e.forEach((function(t){t.whenStable(s)}))})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?Sh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const du=new Ft("EventManagerPlugins");let pu=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(du),Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class gu{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const i=Sh().getGlobalEventTarget(this._doc,t);if(!i)throw new Error(`Unsupported event target ${i} for event ${e}`);return this.addEventListener(i,e,n)}}let mu=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),fu=(()=>{class t extends mu{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Sh().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const _u={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/"},vu=/%COMP%/g;function yu(t,e,n){for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?yu(t,s,n):(s=s.replace(vu,t),n.push(s))}return n}function bu(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let wu=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Cu(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ce.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Su(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case ce.Native:case ce.ShadowDom:return new Iu(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=yu(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Qt(pu),Qt(fu),Qt(bc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Cu{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(_u[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const s=_u[i];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=_u[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&Za.DashCase?t.style.setProperty(e,n,i&Za.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Za.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,bu(n)):this.eventManager.addEventListener(t,e,bu(n))}}class Su extends Cu{constructor(t,e,n,i){super(t),this.component=n;const s=yu(i+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(vu,i+"-"+n.id),this.hostAttr=function(t){return"_nghost-%COMP%".replace(vu,t)}(i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Iu extends Cu{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=i,this.shadowRoot=i.encapsulation===ce.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=yu(i.id,i.styles,[]);for(let r=0;r<s.length;r++){const t=document.createElement("style");t.textContent=s[r],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Eu=(()=>{class t extends gu{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const xu=["alt","control","meta","shift"],Pu={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tu={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ku={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Mu=(()=>{class t extends gu{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,i){const s=t.parseEventName(n),r=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Sh().onAndCancel(e,s.domEventName,r))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const s=t._normalizeKey(n.pop());let r="";if(xu.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),r+=t+".")}),r+=s,0!=n.length||0===s.length)return null;const o={};return o.domEventName=i,o.fullKey=r,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Tu.hasOwnProperty(e)&&(e=Tu[e]))}return Pu[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),xu.forEach(i=>{i!=n&&(0,ku[i])(t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return s=>{t.getEventFullKey(s)===e&&i.runGuarded(()=>n(s))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return Qt(Au)},token:t,providedIn:"root"}),t})(),Au=(()=>{class t extends Du{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case Gi.NONE:return e;case Gi.HTML:return bi(e,"HTML")?yi(e):Wi(this._doc,String(e));case Gi.STYLE:return bi(e,"Style")?yi(e):Zi(e);case Gi.SCRIPT:if(bi(e,"Script"))return yi(e);throw new Error("unsafe value used in a script context");case Gi.URL:return wi(e),bi(e,"URL")?yi(e):Ti(String(e));case Gi.RESOURCE_URL:if(bi(e,"ResourceURL"))return yi(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return new gi(t)}bypassSecurityTrustStyle(t){return new mi(t)}bypassSecurityTrustScript(t){return new fi(t)}bypassSecurityTrustUrl(t){return new _i(t)}bypassSecurityTrustResourceUrl(t){return new vi(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({factory:function(){return t=Qt(Vt),new Au(t.get(Ih));var t},token:t,providedIn:"root"}),t})();const Ou=nh(ph,"browser",[{provide:Ic,useValue:"browser"},{provide:Sc,useValue:function(){ou.makeCurrent(),uu.init()},multi:!0},{provide:Ih,useFactory:function(){return function(t){De=t}(document),document},deps:[]}]),Ru=[[],{provide:Zr,useValue:"root"},{provide:di,useFactory:function(){return new di},deps:[]},{provide:du,useClass:Eu,multi:!0,deps:[Ih,Uc,Ic]},{provide:du,useClass:Mu,multi:!0,deps:[Ih]},[],{provide:wu,useClass:wu,deps:[pu,fu,bc]},{provide:Ka,useExisting:wu},{provide:mu,useExisting:fu},{provide:fu,useClass:fu,deps:[Ih]},{provide:Qc,useClass:Qc,deps:[Uc]},{provide:pu,useClass:pu,deps:[du,Uc]},[]];let Lu=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:bc,useValue:e.appId},{provide:cu,useExisting:bc},hu]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(t,12))},providers:Ru,imports:[nu,mh]}),t})();"undefined"!=typeof window&&window;class Nu{}function zu(t,e){return{type:7,name:t,definitions:e,options:{}}}function Fu(t,e=null){return{type:4,styles:e,timings:t}}function Vu(t,e=null){return{type:2,steps:t,options:e}}function Uu(t){return{type:6,styles:t,offset:null}}function ju(t,e,n){return{type:0,name:t,styles:e,options:n}}function Bu(t){return{type:5,steps:t}}function Hu(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function $u(t,e,n=null){return{type:11,selector:t,animation:e,options:n}}function Wu(t,e){return{type:12,timings:t,animation:e}}function qu(t){Promise.resolve(null).then(t)}class Gu{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){qu(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Qu{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const s=this.players.length;0==s?qu(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++i==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function Ku(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Zu(t){switch(t.length){case 0:return new Gu;case 1:return t[0];default:return new Qu(t)}}function Yu(t,e,n,i,s={},r={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(t=>{const n=t.offset,i=n==l,h=i&&c||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),a){case"!":a=s[n];break;case"*":a=r[n];break;default:a=e.normalizeStyleValue(n,i,a,o)}h[i]=a}),i||a.push(h),c=h,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function Xu(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&Ju(n,"start",t)));break;case"done":t.onDone(()=>i(n&&Ju(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&Ju(n,"destroy",t)))}}function Ju(t,e,n){const i=n.totalTime,s=td(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),r=t._data;return null!=r&&(s._data=r),s}function td(t,e,n,i,s="",r=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:s,totalTime:r,disabled:!!o}}function ed(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function nd(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let id=(t,e)=>!1,sd=(t,e)=>!1,rd=(t,e,n)=>[];const od=Ku();(od||"undefined"!=typeof Element)&&(id=(t,e)=>t.contains(e),sd=(()=>{if(od||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):sd}})(),rd=(t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i});let ad=null,ld=!1;function cd(t){ad||(ad=("undefined"!=typeof document?document.body:null)||{},ld=!!ad.style&&"WebkitAppearance"in ad.style);let e=!0;return ad.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in ad.style,!e&&ld)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ad.style),e}const hd=sd,ud=id,dd=rd;function pd(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let gd=(()=>{class t{validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,s,r=[],o){return new Gu(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),md=(()=>{class t{}return t.NOOP=new gd,t})();function fd(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:_d(parseFloat(e[1]),e[2])}function _d(t,e){switch(e){case"s":return 1e3*t;default:return t}}function vd(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,s=0,r="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=_d(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(s=_d(parseFloat(o),n[4]));const a=n[5];a&&(r=a)}else i=t;if(!n){let n=!1,r=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(r,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:s,easing:r}}(t,e,n)}function yd(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function bd(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else yd(t,n);return n}function wd(t,e,n){return n?e+":"+n+";":""}function Cd(t){let e="";for(let n=0;n<t.style.length;n++){const i=t.style.item(n);e+=wd(0,i,t.style.getPropertyValue(i))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=wd(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[n]));t.setAttribute("style",e)}function Sd(t,e,n){t.style&&(Object.keys(e).forEach(i=>{const s=Dd(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[s]),t.style[s]=e[i]}),Ku()&&Cd(t))}function Id(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Dd(e);t.style[n]=""}),Ku()&&Cd(t))}function Ed(t){return Array.isArray(t)?1==t.length?t[0]:Vu(t):t}const xd=new RegExp("{{\\s*(.+?)\\s*}}","g");function Pd(t){let e=[];if("string"==typeof t){let n;for(;n=xd.exec(t);)e.push(n[1]);xd.lastIndex=0}return e}function Td(t,e,n){const i=t.toString(),s=i.replace(xd,(t,i)=>{let s=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),s=""),s.toString()});return s==i?t:s}function kd(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Md=/-+([a-z0-9])/g;function Dd(t){return t.replace(Md,(...t)=>t[1].toUpperCase())}function Ad(t,e){return 0===t||0===e}function Od(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let r=e[0],o=[];if(i.forEach(t=>{r.hasOwnProperty(t)||o.push(t),r[t]=n[t]}),o.length)for(var s=1;s<e.length;s++){let n=e[s];o.forEach((function(e){n[e]=Ld(t,e)}))}}return e}function Rd(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function Ld(t,e){return window.getComputedStyle(t)[e]}function Nd(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=i[1],r=i[2],o=i[3];e.push(Vd(s,o)),"<"!=r[0]||"*"==s&&"*"==o||e.push(Vd(o,s))}(t,n,e)):n.push(t),n}const zd=new Set(["true","1"]),Fd=new Set(["false","0"]);function Vd(t,e){const n=zd.has(t)||Fd.has(t),i=zd.has(e)||Fd.has(e);return(s,r)=>{let o="*"==t||t==s,a="*"==e||e==r;return!o&&n&&"boolean"==typeof s&&(o=s?zd.has(t):Fd.has(t)),!a&&i&&"boolean"==typeof r&&(a=r?zd.has(e):Fd.has(e)),o&&a}}const Ud=new RegExp("s*:selfs*,?","g");function jd(t,e,n){return new Bd(t).build(e,n)}class Bd{constructor(t){this._driver=t}build(t,e){const n=new Hd(e);return this._resetContextStyleTimingState(n),Rd(this,Ed(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const s=[],r=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,i+=s.depCount,r.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:r,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,r=i||{};if(n.styles.forEach(t=>{if($d(t)){const e=t;Object.keys(e).forEach(t=>{Pd(e[t]).forEach(t=>{r.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=kd(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Rd(this,Ed(t.animation),e);return{type:1,matchers:Nd(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Wd(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Rd(this,t,e)),options:Wd(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const s=t.steps.map(t=>{e.currentTime=n;const s=Rd(this,t,e);return i=Math.max(i,e.currentTime),s});return e.currentTime=i,{type:3,steps:s,options:Wd(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return qd(vd(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=qd(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||vd(i,e),qd(n.duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let s=t.styles?t.styles:Uu({});if(5==s.type)i=this.visitKeyframes(s,e);else{let s=t.styles,r=!1;if(!s){r=!0;const t={};n.easing&&(t.easing=n.easing),s=Uu(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(s,e);o.isEmptyStep=r,i=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,s=null;return n.forEach(t=>{if($d(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const r=e.collectedStyles[e.currentQuerySelector],o=r[n];let a=!0;o&&(s!=i&&s>=o.startTime&&i<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${i}ms"`),a=!1),s=o.startTime),a&&(r[n]={startTime:s,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},s=Pd(t);s.length&&s.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const s=[];let r=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if($d(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if($d(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(i++,c=n.offset=l),o=o||c<0||c>1,r=r||c<a,a=c,s.push(c),n});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),r&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let h=0;i>0&&i<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(h=1/(c-1));const u=c-1,d=e.currentTime,p=e.currentAnimateTimings,g=p.duration;return l.forEach((t,i)=>{const r=h>0?i==u?1:h*i:s[i],o=r*g;e.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=r,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Rd(this,Ed(t.animation),e),options:Wd(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Wd(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Wd(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[s,r]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Ud,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ed(e.collectedStyles,e.currentQuerySelector,{});const o=Rd(this,Ed(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:r,animation:o,originalSelector:t.selector,options:Wd(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:vd(t.timings,e.errors,!0);return{type:12,animation:Rd(this,Ed(t.animation),e),timings:n,options:null}}}class Hd{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function $d(t){return!Array.isArray(t)&&"object"==typeof t}function Wd(t){var e;return t?(t=yd(t)).params&&(t.params=(e=t.params)?yd(e):null):t={},t}function qd(t,e,n){return{duration:t,delay:e,easing:n}}function Gd(t,e,n,i,s,r,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:a}}class Qd{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const Kd=new RegExp(":enter","g"),Zd=new RegExp(":leave","g");function Yd(t,e,n,i,s,r={},o={},a,l,c=[]){return(new Xd).buildKeyframes(t,e,n,i,s,r,o,a,l,c)}class Xd{buildKeyframes(t,e,n,i,s,r,o,a,l,c=[]){l=l||new Qd;const h=new tp(t,e,l,i,s,c,[]);h.options=a,h.currentTimeline.setStyles([r],null,h.errors,a),Rd(this,n,h);const u=h.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(o).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,h.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[Gd(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),s=e.currentTimeline.currentTime,r=this._visitSubInstructions(n,i,i.options);s!=r&&e.transformIntoNewTimeline(r)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const s=null!=n.duration?fd(n.duration):null,r=null!=n.delay?fd(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,r);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),Rd(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const s=t.options;if(s&&(s.params||s.delay)&&(i=e.createSubContext(s),i.transformIntoNewTimeline(),null!=s.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Jd);const t=fd(s.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Rd(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?fd(t.options.delay):0;t.steps.forEach(r=>{const o=e.createSubContext(t.options);s&&o.delayNextStep(s),Rd(this,r,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return vd(e.params?Td(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,s=n.duration,r=e.createSubContext().currentTimeline;r.easing=n.easing,t.styles.forEach(t=>{r.forwardTime((t.offset||0)*s),r.setStyles(t.styles,t.easing,e.errors,e.options),r.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(r),e.transformIntoNewTimeline(i+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},s=i.delay?fd(i.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Jd);let r=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{e.currentQueryIndex=i;const o=e.createSubContext(t.options,n);s&&o.delayNextStep(s),n===e.element&&(a=o.currentTimeline),Rd(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),r=Math.max(r,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(r),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,s=t.timings,r=Math.abs(s.duration),o=r*(e.currentQueryTotal-1);let a=r*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Rd(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}const Jd={};class tp{constructor(t,e,n,i,s,r,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=s,this.errors=r,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Jd,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new ep(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=fd(n.duration)),null!=n.delay&&(i.delay=fd(n.delay));const s=n.params;if(s){let t=i.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Td(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,s=new tp(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=Jd,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new np(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,s,r){let o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Kd,"."+this._enterClassName)).replace(Zd,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return s||0!=o.length||r.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class ep{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new ep(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const s=i&&i.params||{},r=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]="*"})):bd(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(r).forEach(t=>{const e=Td(r[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((s,r)=>{const o=bd(s,!0);Object.keys(o).forEach(n=>{const i=o[n];"!"==i?t.add(n):"*"==i&&e.add(n)}),n||(o.offset=r/this.duration),i.push(o)});const s=t.size?kd(t.values()):[],r=e.size?kd(e.values()):[];if(n){const t=i[0],e=yd(t);t.offset=0,e.offset=1,i=[t,e]}return Gd(this.element,i,s,r,this.duration,this.startTime,this.easing,!1)}}class np extends ep{constructor(t,e,n,i,s,r,o=!1){super(t,e,r.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],r=n+e,o=e/r,a=bd(t[0],!1);a.offset=0,s.push(a);const l=bd(t[0],!1);l.offset=ip(o),s.push(l);const c=t.length-1;for(let i=1;i<=c;i++){let o=bd(t[i],!1);o.offset=ip((e+o.offset*n)/r),s.push(o)}n=r,e=0,i="",t=s}return Gd(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function ip(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class sp{}class rp extends sp{normalizePropertyName(t,e){return Dd(t)}normalizeStyleValue(t,e,n,i){let s="";const r=n.toString().trim();if(op[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return r+s}}const op=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("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".split(",")))();function ap(t,e,n,i,s,r,o,a,l,c,h,u,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:d}}const lp={};class cp{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,s){return t.some(t=>t(e,n,i,s))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],s=this._stateStyles[t],r=i?i.buildStyles(e,n):{};return s?s.buildStyles(e,n):r}build(t,e,n,i,s,r,o,a,l,c){const h=[],u=this.ast.options&&this.ast.options.params||lp,d=this.buildStyles(n,o&&o.params||lp,h),p=a&&a.params||lp,g=this.buildStyles(i,p,h),m=new Set,f=new Map,_=new Map,v="void"===i,y={params:Object.assign(Object.assign({},u),p)},b=c?[]:Yd(t,e,this.ast.animation,s,r,d,g,y,l,h);let w=0;if(b.forEach(t=>{w=Math.max(t.duration+t.delay,w)}),h.length)return ap(e,this._triggerName,n,i,v,d,g,[],[],f,_,w,h);b.forEach(t=>{const n=t.element,i=ed(f,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const s=ed(_,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&m.add(n)});const C=kd(m.values());return ap(e,this._triggerName,n,i,v,d,g,b,C,f,_,w)}}class hp{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=yd(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let r=s[t];r.length>1&&(r=Td(r,i,e)),n[t]=r})}}),n}}class up{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new hp(t.style,t.options&&t.options.params||{})}),dp(this.states,"true","1"),dp(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new cp(t,e,this.states))}),this.fallbackTransition=new cp(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(s=>s.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function dp(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const pp=new Qd;class gp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=jd(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,s=Yu(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],s=this._animations[t];let r;const o=new Map;if(s?(r=Yd(this._driver,e,s,"ng-enter","ng-leave",{},{},n,pp,i),r.forEach(t=>{const e=ed(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),r=[]),i.length)throw new Error("Unable to create the animation due to the following errors: "+i.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,"*")})});const a=Zu(r.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,i){const s=td(e,"","","");return Xu(this._getPlayer(t),n,s,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const mp=[],fp={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},_p={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class vp{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(i=n?t.value:t)?i:null,n){const e=yd(t);delete e.value,this.options=e}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const yp=new vp("void");class bp{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Pp(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(s=n)&&"done"!=s)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var s;const r=ed(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};r.push(o);const a=ed(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Pp(t,"ng-trigger"),Pp(t,"ng-trigger-"+e),a[e]=yp),()=>{this._engine.afterFlush(()=>{const t=r.indexOf(o);t>=0&&r.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const s=this._getTrigger(e),r=new Cp(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Pp(t,"ng-trigger"),Pp(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new vp(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=yp),"void"!==l.value&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let s=0;s<n.length;s++){const i=n[s];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,l.params)){const e=[],n=s.matchStyles(a.value,a.params,e),i=s.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Id(t,n),Sd(t,i)})}return}const c=ed(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let h=s.matchTransition(a.value,l.value,t,l.params),u=!1;if(!h){if(!i)return;h=s.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:a,toState:l,player:r,isFallbackTransition:u}),u||(Pp(t,"ng-animate-queued"),r.onStart(()=>{Tp(t,"ng-animate-queued")})),r.onDone(()=>{let e=this.players.indexOf(r);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(r);t>=0&&n.splice(t,1)}}),this.players.push(r),c.push(r),r}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,".ng-trigger",!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const s=this._engine.statesByElement.get(t);if(s){const r=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,"void",i);n&&r.push(n)}}),r.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Zu(r).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const s=this._triggers[i].fallbackTransition,r=this._engine.statesByElement.get(t)[i]||yp,o=new vp("void"),a=new Cp(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:s,fromState:r,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t.__ng_removed;i&&i!==fp||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Pp(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const s=n.element,r=this._elementListeners.get(s);r&&r.forEach(e=>{if(e.name==n.triggerName){const i=td(s,n.triggerName,n.fromState.value,n.toState.value);i._data=t,Xu(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class wp{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new bp(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const s=n[t[i]].namespaceId;if(s){const t=this._fetchNamespace(s);t&&e.add(t)}}}return e}trigger(t,e,n,i){if(Sp(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!Sp(e))return;const s=e.__ng_removed;if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Pp(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Tp(t,"ng-animate-disabled"))}removeNode(t,e,n,i){if(Sp(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,s){return Sp(e)?this._fetchNamespace(t).listen(e,n,i,s):()=>{}}_buildInstruction(t,e,n,i,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Zu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=fp,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Pp(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?Zu(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new Qd,i=[],s=new Map,r=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)c.add(e[n])});const h=this.bodyNode,u=Array.from(this.statesByElement.keys()),d=xp(u,this.collectedEnterElements),p=new Map;let g=0;d.forEach((t,e)=>{const n="ng-enter"+g++;p.set(e,n),t.forEach(t=>Pp(t,n))});const m=[],f=new Set,_=new Set;for(let M=0;M<this.collectedLeaveElements.length;M++){const t=this.collectedLeaveElements[M],e=t.__ng_removed;e&&e.setForRemoval&&(m.push(t),f.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>f.add(t)):_.add(t))}const v=new Map,y=xp(u,Array.from(f));y.forEach((t,e)=>{const n="ng-leave"+g++;v.set(e,n),t.forEach(t=>Pp(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=p.get(e);t.forEach(t=>Tp(t,n))}),y.forEach((t,e)=>{const n=v.get(e);t.forEach(t=>Tp(t,n))}),m.forEach(t=>{this.processLeaveNode(t)})});const b=[],w=[];for(let M=this._namespaceList.length-1;M>=0;M--)this._namespaceList[M].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(b.push(e),this.collectedEnterElements.length){const t=s.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!h||!this.driver.containsElement(h,s),u=v.get(s),d=p.get(s),g=this._buildInstruction(t,n,d,u,c);if(g.errors&&g.errors.length)w.push(g);else{if(c)return e.onStart(()=>Id(s,g.fromStyles)),e.onDestroy(()=>Sd(s,g.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>Id(s,g.fromStyles)),e.onDestroy(()=>Sd(s,g.toStyles)),void i.push(e);g.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,g.timelines),r.push({instruction:g,player:e,element:s}),g.queriedElements.forEach(t=>ed(o,t,[]).push(e)),g.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),g.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const C=new Map,S=new Map;r.forEach(t=>{const e=t.element;n.has(e)&&(S.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,C))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{ed(C,e,[]).push(t),t.destroy()})});const I=m.filter(t=>Mp(t,a,l)),E=new Map;Ep(E,this.driver,_,l,"*").forEach(t=>{Mp(t,a,l)&&I.push(t)});const x=new Map;d.forEach((t,e)=>{Ep(x,this.driver,new Set(t),a,"!")}),I.forEach(t=>{const e=E.get(t),n=x.get(t);E.set(t,Object.assign(Object.assign({},e),n))});const P=[],T=[],k={};r.forEach(t=>{const{element:e,player:r,instruction:o}=t;if(n.has(e)){if(c.has(e))return r.onDestroy(()=>Sd(e,o.toStyles)),r.disabled=!0,r.overrideTotalTime(o.totalTime),void i.push(r);let t=k;if(S.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=S.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>S.set(e,t))}const n=this._buildAnimation(r.namespaceId,o,C,s,x,E);if(r.setRealPlayer(n),t===k)P.push(r);else{const e=this.playersByElement.get(t);e&&e.length&&(r.parentPlayer=Zu(e)),i.push(r)}}else Id(e,o.fromStyles),r.onDestroy(()=>Sd(e,o.toStyles)),T.push(r),c.has(e)&&i.push(r)}),T.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=Zu(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let M=0;M<m.length;M++){const t=m[M],e=t.__ng_removed;if(Tp(t,"ng-leave"),e&&e.hasAnimation)continue;let n=[];if(o.size){let e=o.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,".ng-animating",!0);for(let t=0;t<i.length;t++){let e=o.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?kp(this,t,i):this.processLeaveNode(t)}return m.length=0,P.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),P}elementContainsData(t,e){let n=!1;const i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,s){let r=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(r=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||"void"==s;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&r.push(e)})}}return(n||i)&&(r=r.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),r}_beforeAnimationBuild(t,e,n){const i=e.element,s=e.isRemovalTransition?void 0:t,r=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==i,l=ed(n,t,[]);this._getPreviousPlayers(t,a,s,r,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Id(i,e.fromStyles)}_buildAnimation(t,e,n,i,s,r){const o=e.triggerName,a=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(e=>{const u=e.element;c.add(u);const d=u.__ng_removed;if(d&&d.removedBeforeQueried)return new Gu(e.duration,e.delay);const p=u!==a,g=function(t){const e=[];return function t(e,n){for(let i=0;i<e.length;i++){const s=e[i];s instanceof Qu?t(s.players,n):n.push(s)}}(t,e),e}((n.get(u)||mp).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),m=s.get(u),f=r.get(u),_=Yu(0,this._normalizer,0,e.keyframes,m,f),v=this._buildPlayer(e,_,g);if(e.subTimeline&&i&&h.add(u),p){const e=new Cp(t,o,u);e.setRealPlayer(v),l.push(e)}return v});l.forEach(t=>{ed(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Pp(t,"ng-animating"));const d=Zu(u);return d.onDestroy(()=>{c.forEach(t=>Tp(t,"ng-animating")),Sd(a,e.toStyles)}),h.forEach(t=>{ed(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new Gu(t.duration,t.delay)}}class Cp{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Gu,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>Xu(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ed(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Sp(t){return t&&1===t.nodeType}function Ip(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function Ep(t,e,n,i,s){const r=[];n.forEach(t=>r.push(Ip(t)));const o=[];i.forEach((n,i)=>{const r={};n.forEach(t=>{const n=r[t]=e.computeStyle(i,t,s);n&&0!=n.length||(i.__ng_removed=_p,o.push(i))}),t.set(i,r)});let a=0;return n.forEach(t=>Ip(t,r[a++])),o}function xp(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),s=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let r=s.get(e);if(r)return r;const o=e.parentNode;return r=n.has(o)?o:i.has(o)?1:t(o),s.set(e,r),r}(t);1!==e&&n.get(e).push(t)}),n}function Pp(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Tp(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function kp(t,e,n){Zu(n).onDone(()=>t.processLeaveNode(e))}function Mp(t,e,n){const i=n.get(t);if(!i)return!1;let s=e.get(t);return s?i.forEach(t=>s.add(t)):e.set(t,i),n.delete(t),!0}class Dp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new wp(t,e,n),this._timelineEngine=new gp(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,s){const r=t+"-"+i;let o=this._triggerCache[r];if(!o){const t=[],e=jd(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new up(t,e)}(i,e),this._triggerCache[r]=o}this._transitionEngine.registerTrigger(e,i,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,s]=nd(n);this._timelineEngine.command(t,e,s,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,s){if("@"==n.charAt(0)){const[t,i]=nd(n);return this._timelineEngine.listen(t,e,i,s)}return this._transitionEngine.listen(t,e,n,i,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Ap(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=Rp(e[0]),e.length>1&&(i=Rp(e[e.length-1]))):e&&(n=Rp(e)),n||i?new Op(t,n,i):null}let Op=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let s=t.initialStylesByElement.get(e);s||t.initialStylesByElement.set(e,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Sd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Sd(this._element,this._initialStyles),this._endStyles&&(Sd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Id(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Id(this._element,this._endStyles),this._endStyles=null),Sd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Rp(t){let e=null;const n=Object.keys(t);for(let i=0;i<n.length;i++){const s=n[i];Lp(s)&&(e=e||{},e[s]=t[s])}return e}function Lp(t){return"display"===t||"position"===t}class Np{constructor(t,e,n,i,s,r,o){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=s,this._fillMode=r,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const n=Bp(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++}(n),e=`${n}, ${e}`),jp(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Up(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){zp(this._element,this._name,"paused")}resume(){zp(this._element,this._name,"running")}setPosition(t){const e=Fp(this._element,this._name);this._position=t*this._duration,jp(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Up(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=Bp(t,"").split(","),i=Vp(n,e);i>=0&&(n.splice(i,1),jp(t,"",n.join(",")))}(this._element,this._name))}}function zp(t,e,n){jp(t,"PlayState",n,Fp(t,e))}function Fp(t,e){const n=Bp(t,"");return n.indexOf(",")>0?Vp(n.split(","),e):Vp([n],e)}function Vp(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Up(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function jp(t,e,n,i){const s="animation"+e;if(null!=i){const e=t.style[s];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[s]=n}function Bp(t,e){return t.style["animation"+e]}class Hp{constructor(t,e,n,i,s,r,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=s,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=r||"linear",this.totalTime=i+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Np(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Ld(this.element,n))})}this.currentSnapshot=t}}class $p extends Gu{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=pd(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class Wp{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>pd(t));let i=`@keyframes ${e} {\n`,s="";n.forEach(t=>{s=" ";const e=parseFloat(t.offset);i+=`${s}${100*e}% {\n`,s+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${s}animation-timing-function: ${n};\n`));default:return void(i+=`${s}${e}: ${n};\n`)}}),i+=s+"}\n"}),i+="}\n";const r=document.createElement("style");return r.innerHTML=i,r}animate(t,e,n,i,s,r=[],o){o&&this._notifyFaultyScrubber();const a=r.filter(t=>t instanceof Hp),l={};Ad(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Od(t,e,l));if(0==n)return new $p(t,c);const h="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,h,e);document.querySelector("head").appendChild(u);const d=Ap(t,e),p=new Hp(t,e,h,n,i,s,c,d);return p.onDestroy(()=>{var t;(t=u).parentNode.removeChild(t)}),p}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class qp{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Ld(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Gp{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Qp().toString()),this._cssKeyframesDriver=new Wp}validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,s,r=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,s,r);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};s&&(a.easing=s);const l={},c=r.filter(t=>t instanceof qp);Ad(n,i)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=Ap(t,e=Od(t,e=e.map(t=>bd(t,!1)),l));return new qp(t,e,a,h)}}function Qp(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let Kp=(()=>{class t extends Nu{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ce.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?Vu(t):t;return Xp(this._renderer,null,e,"register",[n]),new Zp(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ka),Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zp extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Yp(this._id,t,e||{},this._renderer)}}class Yp{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Xp(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function Xp(t,e,n,i,s){return t.setProperty(e,`@@${n}:${i}`,s)}let Jp=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new tg("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const r=e=>{Array.isArray(e)?e.forEach(r):this.engine.registerTrigger(i,s,t,e.name,e)};return e.data.animation.forEach(r),new eg(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ka),Qt(Dp),Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class tg{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class eg extends tg{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if("@"==e.charAt(0)){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),r="";return"@"!=s.charAt(0)&&([s,r]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,i,s,r,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let ng=(()=>{class t extends Dp{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(md),Qt(sp))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const ig=[{provide:md,useFactory:function(){return"function"==typeof Qp()?new Gp:new Wp}},{provide:new Ft("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Nu,useClass:Kp},{provide:sp,useFactory:function(){return new rp}},{provide:Dp,useClass:ng},{provide:Ka,useFactory:function(t,e,n){return new Jp(t,e,n)},deps:[wu,Dp,Uc]}];let sg=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:ig,imports:[Lu]}),t})();class rg extends u{constructor(t,e){super()}schedule(t,e=0){return this}}class og extends rg{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,i=void 0;try{this.work(t)}catch(s){n=!0,i=!!s&&s||new Error(s)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}class ag extends og{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}let lg=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class cg extends lg{constructor(t,e=lg.now){super(t,()=>cg.delegate&&cg.delegate!==this?cg.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return cg.delegate&&cg.delegate!==this?cg.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}class hg extends cg{}const ug=new hg(ag),dg=new b(t=>t.complete());function pg(t){return t?function(t){return new b(e=>t.schedule(()=>e.complete()))}(t):dg}function gg(...t){let e=t[t.length-1];return P(e)?(t.pop(),U(t,e)):q(t)}let mg=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return gg(this.value);case"E":return t=this.error,new b(e=>e.error(t));case"C":return pg()}var t;throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class fg extends g{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(fg.dispatch,this.delay,new _g(t,this.destination)))}_next(t){this.scheduleMessage(mg.createNext(t))}_error(t){this.scheduleMessage(mg.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(mg.createComplete()),this.unsubscribe()}}class _g{constructor(t,e){this.notification=t,this.destination=e}}class vg extends E{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),super.next(t)}nextTimeWindow(t){this._events.push(new yg(this._getNow(),t)),this._trimBufferThenGetEvents(),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,s=n.length;let r;if(this.closed)throw new C;if(this.isStopped||this.hasError?r=u.EMPTY:(this.observers.push(t),r=new S(this,t)),i&&t.add(t=new fg(t,i)),e)for(let o=0;o<s&&!t.closed;o++)t.next(n[o]);else for(let o=0;o<s&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),r}_getNow(){return(this.scheduler||ug).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,s=i.length;let r=0;for(;r<s&&!(t-i[r].time<n);)r++;return s>e&&(r=Math.max(r,s-e)),r>0&&i.splice(0,r),i}}class yg{constructor(t,e){this.time=t,this.value=e}}class bg extends E{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new C;return this._value}next(t){super.next(this._value=t)}}function wg(...t){if(1===t.length){const e=t[0];if(l(e))return Cg(e,null);if(c(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Cg(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Cg(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(z(t=>e(...t)))}return Cg(t,null)}function Cg(t,e){return new b(n=>{const i=t.length;if(0===i)return void n.complete();const s=new Array(i);let r=0,o=0;for(let a=0;a<i;a++){const l=j(t[a]);let c=!1;n.add(l.subscribe({next:t=>{c||(c=!0,o++),s[a]=t},error:t=>n.error(t),complete:()=>{r++,r!==i&&c||(o===i&&n.next(e?e.reduce((t,e,n)=>(t[e]=s[n],t),{}):s),n.complete())}}))}})}function Sg(t,e){return B(t,e,1)}function Ig(t,e){return function(n){return n.lift(new Eg(t,e))}}class Eg{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new xg(t,this.predicate,this.thisArg))}}class xg extends g{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}class Pg{}class Tg{}class kg{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof kg?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new kg;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof kg?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===s.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class Mg{encodeKey(t){return Dg(t)}encodeValue(t){return Dg(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function Dg(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class Ag{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Mg,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[s,r]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],o=n.get(s)||[];o.push(r),n.set(s,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Ag({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function Og(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Rg(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Lg(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Ng{constructor(t,e,n,i){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new kg),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new Ag,this.urlWithParams=e}serializeBody(){return null===this.body?null:Og(this.body)||Rg(this.body)||Lg(this.body)||"string"==typeof this.body?this.body:this.body instanceof Ag?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||Lg(this.body)?null:Rg(this.body)?this.body.type||null:Og(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Ag?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,n=t.url||this.url,i=t.responseType||this.responseType,s=void 0!==t.body?t.body:this.body,r=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Ng(e,n,s,{params:l,headers:a,reportProgress:o,responseType:i,withCredentials:r})}}const zg=function(){var t={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return t[t.Sent]="Sent",t[t.UploadProgress]="UploadProgress",t[t.ResponseHeader]="ResponseHeader",t[t.DownloadProgress]="DownloadProgress",t[t.Response]="Response",t[t.User]="User",t}();class Fg{constructor(t,e=200,n="OK"){this.headers=t.headers||new kg,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Vg extends Fg{constructor(t={}){super(t),this.type=zg.ResponseHeader}clone(t={}){return new Vg({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Ug extends Fg{constructor(t={}){super(t),this.type=zg.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Ug({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class jg extends Fg{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function Bg(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Hg=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Ng)i=t;else{let s=void 0;s=n.headers instanceof kg?n.headers:new kg(n.headers);let r=void 0;n.params&&(r=n.params instanceof Ag?n.params:new Ag({fromObject:n.params})),i=new Ng(t,e,void 0!==n.body?n.body:null,{headers:s,params:r,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=gg(i).pipe(Sg(t=>this.handler.handle(t)));if(t instanceof Ng||"events"===n.observe)return s;const r=s.pipe(Ig(t=>t instanceof Ug));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return r.pipe(z(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return r.pipe(z(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return r.pipe(z(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return r.pipe(z(t=>t.body))}case"response":return r;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new Ag).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,Bg(n,e))}post(t,e,n={}){return this.request("POST",t,Bg(n,e))}put(t,e,n={}){return this.request("PUT",t,Bg(n,e))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Pg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class $g{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const Wg=new Ft("HTTP_INTERCEPTORS");let qg=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Gg=/^\)\]\}',?\n/;class Qg{}let Kg=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Zg=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new b(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let s=null;const r=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,i=n.statusText||"OK",r=new kg(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return s=new Vg({headers:r,status:e,statusText:i,url:o}),s},o=()=>{let{headers:i,status:s,statusText:o,url:a}=r(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let c=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Gg,"");try{l=""!==l?JSON.parse(l):null}catch(h){l=t,c&&(c=!1,l={error:h,text:l})}}c?(e.next(new Ug({body:l,headers:i,status:s,statusText:o,url:a||void 0})),e.complete()):e.error(new jg({error:l,headers:i,status:s,statusText:o,url:a||void 0}))},a=t=>{const{url:i}=r(),s=new jg({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});e.error(s)};let l=!1;const c=i=>{l||(e.next(r()),l=!0);let s={type:zg.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(s.total=i.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},h=t=>{let n={type:zg.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==i&&n.upload&&n.upload.addEventListener("progress",h)),n.send(i),e.next({type:zg.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==i&&n.upload&&n.upload.removeEventListener("progress",h)),n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Qt(Qg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Yg=new Ft("XSRF_COOKIE_NAME"),Xg=new Ft("XSRF_HEADER_NAME");class Jg{}let tm=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wh(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Ic),Qt(Yg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),em=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Jg),Qt(Xg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),nm=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(Wg,[]);this.chain=t.reduceRight((t,e)=>new $g(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Tg),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),im=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:em,useClass:qg}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Yg,useValue:e.cookieName}:[],e.headerName?{provide:Xg,useValue:e.headerName}:[]]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[em,{provide:Wg,useExisting:em,multi:!0},{provide:Jg,useClass:tm},{provide:Yg,useValue:"XSRF-TOKEN"},{provide:Xg,useValue:"X-XSRF-TOKEN"}]}),t})(),sm=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Hg,{provide:Pg,useClass:nm},Zg,{provide:Tg,useExisting:Zg},Kg,{provide:Qg,useExisting:Kg}],imports:[[im.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function rm(t){return!!t&&(t instanceof b||"function"==typeof t.lift&&"function"==typeof t.subscribe)}function om(){return W(1)}function am(...t){return om()(gg(...t))}function lm(t){return new b(e=>{let n;try{n=t()}catch(i){return void e.error(i)}return(n?j(n):pg()).subscribe(e)})}const cm=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function hm(t){return e=>0===t?pg():e.lift(new um(t))}class um{constructor(t){if(this.total=t,this.total<0)throw new cm}call(t,e){return e.subscribe(new dm(t,this.total))}}class dm extends g{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function pm(t,e,n){let i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:n,scheduler:i}){let s,r,o=0,a=!1,l=!1;return function(c){o++,s&&!a||(a=!1,s=new vg(t,e,i),r=c.subscribe({next(t){s.next(t)},error(t){a=!0,s.error(t)},complete(){l=!0,r=void 0,s.complete()}}));const h=s.subscribe(this);this.add(()=>{o--,h.unsubscribe(),r&&!l&&n&&0===o&&(r.unsubscribe(),r=void 0,s=void 0)})}}(i))}function gm(t,e){return"function"==typeof e?n=>n.pipe(gm((n,i)=>j(t(n,i)).pipe(z((t,s)=>e(n,t,i,s))))):e=>e.lift(new mm(t))}class mm{constructor(t){this.project=t}call(t,e){return e.subscribe(new fm(t,this.project))}}class fm extends N{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e,t,n)}_innerSub(t,e,n){const i=this.innerSubscription;i&&i.unsubscribe();const s=new T(this,e,n),r=this.destination;r.add(s),this.innerSubscription=L(this,t,void 0,void 0,s),this.innerSubscription!==s&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}}class _m{}let vm=(()=>{class t extends _m{getTranslation(t){return gg({})}}return t.\u0275fac=function(e){return ym(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const ym=li(vm);class bm{}let wm=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Cm(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let n,i,s,r=typeof t;if(r==typeof e&&"object"==r){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(i in s=Object.create(null),t){if(!Cm(t[i],e[i]))return!1;s[i]=!0}for(i in e)if(!(i in s)&&void 0!==e[i])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(i=0;i<n;i++)if(!Cm(t[i],e[i]))return!1;return!0}}return!1}function Sm(t){return null!=t}function Im(t){return t&&"object"==typeof t&&!Array.isArray(t)}class Em{}let xm=(()=>{class t extends Em{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let n;return n="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,n}getValue(t,e){let n="string"==typeof e?e.split("."):[e];e="";do{e+=n.shift(),!Sm(t)||!Sm(t[e])||"object"!=typeof t[e]&&n.length?n.length?e+=".":t=void 0:(t=t[e],e="")}while(n.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,n)=>{let i=this.getValue(e,n);return Sm(i)?i:t}):t}}return t.\u0275fac=function(e){return Pm(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Pm=li(xm);class Tm{}let km=(()=>{class t extends Tm{compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return Mm(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Mm=li(km);class Dm{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new Yl,this.onLangChange=new Yl,this.onDefaultLangChange=new Yl}}const Am=new Ft("USE_STORE"),Om=new Ft("USE_DEFAULT_LANG"),Rm=new Ft("DEFAULT_LANGUAGE"),Lm=new Ft("USE_EXTEND");let Nm=(()=>{class t{constructor(t,e,n,i,s,r=!0,o=!1,a=!1,l){this.store=t,this.currentLoader=e,this.compiler=n,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=r,this.isolate=o,this.extend=a,this.pending=!1,this._onTranslationChange=new Yl,this._onLangChange=new Yl,this._onDefaultLangChange=new Yl,this._langs=[],this._translations={},this._translationRequests={},l&&this.setDefaultLang(l)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(hm(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return gg(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(hm(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),gg(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(pm(1),hm(1));return this.loadingTranslations=e.pipe(z(e=>this.compiler.compileTranslations(e,t)),pm(1),hm(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,n=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(n||this.extend)&&this.translations[t]?function t(e,n){let i=Object.assign({},e);return Im(e)&&Im(n)&&Object.keys(n).forEach(s=>{Im(n[s])?s in e?i[s]=t(e[s],n[s]):Object.assign(i,{[s]:n[s]}):Object.assign(i,{[s]:n[s]})}),i}(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,n){let i;if(e instanceof Array){let i={},s=!1;for(let r of e)i[r]=this.getParsedResult(t,r,n),rm(i[r])&&(s=!0);return s?wg(e.map(t=>rm(i[t])?i[t]:gg(i[t]))).pipe(z(t=>{let n={};return t.forEach((t,i)=>{n[e[i]]=t}),n})):i}if(t&&(i=this.parser.interpolate(this.parser.getValue(t,e),n)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),n)),void 0===i){let t={key:e,translateService:this};void 0!==n&&(t.interpolateParams=n),i=this.missingTranslationHandler.handle(t)}return void 0!==i?i:e}get(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Sg(n=>rm(n=this.getParsedResult(n,t,e))?n:gg(n)));{let n=this.getParsedResult(this.translations[this.currentLang],t,e);return rm(n)?n:gg(n)}}getStreamOnTranslationChange(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');return am(lm(()=>this.get(t,e)),this.onTranslationChange.pipe(gm(n=>{const i=this.getParsedResult(n.translations,t,e);return"function"==typeof i.subscribe?i:gg(i)})))}stream(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');return am(lm(()=>this.get(t,e)),this.onLangChange.pipe(gm(n=>{const i=this.getParsedResult(n.translations,t,e);return rm(i)?i:gg(i)})))}instant(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');let n=this.getParsedResult(this.translations[this.currentLang],t,e);if(rm(n)){if(t instanceof Array){let e={};return t.forEach((n,i)=>{e[t[i]]=t[i]}),e}return t}return n}set(t,e,n=this.currentLang){this.translations[n][t]=this.compiler.compile(e,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(Qt(Dm),Qt(_m),Qt(Tm),Qt(Em),Qt(bm),Qt(Om),Qt(Am),Qt(Lm),Qt(Rm))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),zm=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,n){let i=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(n){let s=this.translate.getParsedResult(n,t,e);rm(s.subscribe)?s.subscribe(i):i(s)}this.translate.get(t,e).subscribe(i)}transform(t,...e){if(!t||!t.length)return t;if(Cm(t,this.lastKey)&&Cm(e,this.lastParams))return this.value;let n;if(Sm(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{n=JSON.parse(t)}catch(i){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(n=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,n),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Nm),function(t=at.Default){const e=Gr(!0);if(null!=e||t&at.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}())},t.\u0275pipe=be({name:"translate",type:t,pure:!1}),t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fm=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:_m,useClass:vm},e.compiler||{provide:Tm,useClass:km},e.parser||{provide:Em,useClass:xm},e.missingTranslationHandler||{provide:bm,useClass:wm},Dm,{provide:Am,useValue:e.isolate},{provide:Om,useValue:e.useDefaultLang},{provide:Lm,useValue:e.extend},{provide:Rm,useValue:e.defaultLanguage},Nm]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:_m,useClass:vm},e.compiler||{provide:Tm,useClass:km},e.parser||{provide:Em,useClass:xm},e.missingTranslationHandler||{provide:bm,useClass:wm},{provide:Am,useValue:e.isolate},{provide:Om,useValue:e.useDefaultLang},{provide:Lm,useValue:e.extend},{provide:Rm,useValue:e.defaultLanguage},Nm]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();const Vm=new Ft("NgValueAccessor"),Um={provide:Vm,useExisting:St(()=>jm),multi:!0};let jm=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[Ha([Um])]}),t})();const Bm={provide:Vm,useExisting:St(()=>$m),multi:!0},Hm=new Ft("CompositionEventMode");let $m=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Sh()?Sh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga),Ao(Hm,8))},t.\u0275dir=ye({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&$o("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[Ha([Bm])]}),t})(),Wm=(()=>{class t{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t}),t})(),qm=(()=>{class t extends Wm{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return Gm(e||t)},t.\u0275dir=ye({type:t,features:[Pa]}),t})();const Gm=li(qm);function Qm(){throw new Error("unimplemented")}class Km extends Wm{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return Qm()}get asyncValidator(){return Qm()}}let Zm=(()=>{class t extends class{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Km,2))},t.\u0275dir=ye({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&aa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[Pa]}),t})();function Ym(t){return null==t||0===t.length}const Xm=new Ft("NgValidators"),Jm=new Ft("NgAsyncValidators"),tf=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ef{static min(t){return e=>{if(Ym(e.value)||Ym(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(Ym(e.value)||Ym(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Ym(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Ym(t.value)||tf.test(t.value)?null:{email:!0}}static minLength(t){return e=>{if(Ym(e.value))return null;const n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}static maxLength(t){return e=>{const n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}}static pattern(t){if(!t)return ef.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Ym(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(nf);return 0==e.length?null:function(t){return rf(function(t,e){return e.map(e=>e(t))}(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(nf);return 0==e.length?null:function(t){return wg(function(t,e){return e.map(e=>e(t))}(t,e).map(sf)).pipe(z(rf))}}}function nf(t){return null!=t}function sf(t){const e=Bo(t)?j(t):t;if(!Ho(e))throw new Error("Expected validator to return Promise or Observable.");return e}function rf(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function of(t){return t.validate?e=>t.validate(e):t}function af(t){return t.validate?e=>t.validate(e):t}const lf={provide:Vm,useExisting:St(()=>cf),multi:!0};let cf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[Ha([lf])]}),t})();const hf={provide:Vm,useExisting:St(()=>df),multi:!0};let uf=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),df=(()=>{class t{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(Km),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga),Ao(uf),Ao(ho))},t.\u0275dir=ye({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Ha([hf])]}),t})();const pf={provide:Vm,useExisting:St(()=>gf),multi:!0};let gf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[Ha([pf])]}),t})();const mf='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',ff='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',_f={provide:Vm,useExisting:St(()=>yf),multi:!0};function vf(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let yf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=yo}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=vf(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[Ha([_f])]}),t})(),bf=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(vf(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(yf,9))},t.\u0275dir=ye({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const wf={provide:Vm,useExisting:St(()=>Sf),multi:!0};function Cf(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Sf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=yo}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(e.hasOwnProperty("selectedOptions")){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const i=t.item(e),s=this._getOptionValue(i.value);n.push(s)}}else{const t=e.options;for(let e=0;e<t.length;e++){const i=t.item(e);if(i.selected){const t=this._getOptionValue(i.value);n.push(t)}}}this.value=n,t(n)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[Ha([wf])]}),t})(),If=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Cf(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Cf(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Sf,9))},t.\u0275dir=ye({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function Ef(t,e){return[...e.path,t]}function xf(t,e){t||Tf(e,"Cannot find control with"),e.valueAccessor||Tf(e,"No value accessor for form control with"),t.validator=ef.compose([t.validator,e.validator]),t.asyncValidator=ef.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Pf(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Pf(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function Pf(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Tf(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function kf(t){return null!=t?ef.compose(t.map(of)):null}function Mf(t){return null!=t?ef.composeAsync(t.map(af)):null}const Df=[jm,gf,cf,yf,Sf,df];function Af(t){const e=Rf(t)?t.validators:t;return Array.isArray(e)?kf(e):e||null}function Of(t,e){const n=Rf(e)?e.asyncValidators:t;return Array.isArray(n)?Mf(n):n||null}function Rf(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class Lf{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this.validator=Af(t)}setAsyncValidators(t){this.asyncValidator=Of(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING";const e=sf(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let i=t;return e.forEach(t=>{i=i instanceof zf?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof Ff&&i.at(t)||null}),i}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new Yl,this.statusChanges=new Yl}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Rf(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class Nf extends Lf{constructor(t=null,e,n){super(Af(e),Of(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class zf extends Lf{constructor(t,e,n){super(Af(e),Of(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Nf?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){let e=!1;return this._forEachChild((n,i)=>{e=e||this.contains(i)&&t(n)}),e}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Ff extends Lf{constructor(t,e,n){super(Af(e),Of(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof Nf?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Vf={provide:qm,useExisting:St(()=>jf)},Uf=(()=>Promise.resolve(null))();let jf=(()=>{class t extends qm{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new Yl,this.form=new zf({},kf(t),Mf(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Uf.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),xf(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Uf.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this._directives,t)})}addFormGroup(t){Uf.then(()=>{const e=this._findContainer(t.path),n=new zf({});(function(t,e){null==t&&Tf(e,"Cannot find control with"),t.validator=ef.compose([t.validator,e.validator]),t.asyncValidator=ef.composeAsync([t.asyncValidator,e.asyncValidator])})(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Uf.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){Uf.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,e=this._directives,this.form._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(Ao(Xm,10),Ao(Jm,10))},t.\u0275dir=ye({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&$o("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ha([Vf]),Pa]}),t})(),Bf=(()=>{class t extends qm{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Ef(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return kf(this._validators)}get asyncValidator(){return Mf(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return Hf(e||t)},t.\u0275dir=ye({type:t,features:[Pa]}),t})();const Hf=li(Bf);class $f{static modelParentException(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')}static formGroupNameException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${mf}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${ff}`)}static missingNameException(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')}static modelGroupParentException(){throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${mf}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${ff}`)}}const Wf={provide:qm,useExisting:St(()=>qf)};let qf=(()=>{class t extends Bf{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){this._parent instanceof t||this._parent instanceof jf||$f.modelGroupParentException()}}return t.\u0275fac=function(e){return new(e||t)(Ao(qm,5),Ao(Xm,10),Ao(Jm,10))},t.\u0275dir=ye({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Ha([Wf]),Pa]}),t})();const Gf={provide:Km,useExisting:St(()=>Kf)},Qf=(()=>Promise.resolve(null))();let Kf=(()=>{class t extends Km{constructor(t,e,n,i){super(),this.control=new Nf,this._registered=!1,this.update=new Yl,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e)||Tf(t,"Value accessor was not provided as an array for form control with");let n=void 0,i=void 0,s=void 0;return e.forEach(e=>{var r;e.constructor===$m?n=e:(r=e,Df.some(t=>r.constructor===t)?(i&&Tf(t,"More than one built-in value accessor matches form control with"),i=e):(s&&Tf(t,"More than one custom value accessor matches form control with"),s=e))}),s||i||n||(Tf(t,"No valid value accessor for form control with"),null)}(this,i)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!yo(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?Ef(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return kf(this._rawValidators)}get asyncValidator(){return Mf(this._rawAsyncValidators)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){xf(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){!(this._parent instanceof qf)&&this._parent instanceof Bf?$f.formGroupNameException():this._parent instanceof qf||this._parent instanceof jf||$f.modelParentException()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||$f.missingNameException()}_updateValue(t){Qf.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;Qf.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(Ao(qm,9),Ao(Xm,10),Ao(Jm,10),Ao(Vm,10))},t.\u0275dir=ye({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ha([Gf]),Pa,Oa]}),t})();const Zf=new Ft("NgModelWithFormControlWarning");let Yf=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})(),Xf=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let i=null,s=null,r=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(i=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,r=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new zf(n,{asyncValidators:s,updateOn:r,validators:i})}control(t,e,n){return new Nf(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new Ff(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Nf||t instanceof zf||t instanceof Ff?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Jf=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[uf],imports:[Yf]}),t})(),t_=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Zf,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Xf,uf],imports:[Yf]}),t})();function e_(t,e,n,s){return i(n)&&(s=n,n=void 0),s?e_(t,e,n).pipe(z(t=>l(t)?s(...t):s(t))):new b(i=>{!function t(e,n,i,s,r){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(n,i,r),o=()=>t.removeEventListener(n,i,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(n,i),o=()=>t.off(n,i)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(n,i),o=()=>t.removeListener(n,i)}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let o=0,a=e.length;o<a;o++)t(e[o],n,i,s,r)}s.add(o)}(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)})}function n_(t){return e=>e.lift(new i_(t))}class i_{constructor(t){this.callback=t}call(t,e){return e.subscribe(new s_(t,this.callback))}}class s_ extends g{constructor(t,e){super(t),this.add(new u(e))}}function r_(t){return e=>e.lift(new o_(t))}class o_{constructor(t){this.notifier=t}call(t,e){const n=new a_(t),i=L(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}class a_ extends N{constructor(t){super(t),this.seenValue=!1}notifyNext(t,e,n,i,s){this.seenValue=!0,this.complete()}notifyComplete(){}}function l_(t){return null!=t&&""+t!="false"}function c_(t,e=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function h_(t){return t instanceof Ga?t.nativeElement:t}const u_=new Ft("cdk-dir-doc",{providedIn:"root",factory:function(){return Kt(Ih)}});let d_,p_=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new Yl,t){const e=t.documentElement?t.documentElement.dir:null,n=(t.body?t.body.dir:null)||e;this.value="ltr"===n||"rtl"===n?n:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(Qt(u_,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(u_,8))},token:t,providedIn:"root"}),t})(),g_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();try{d_="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(QP){d_=!1}let m_,f_,__,v_=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?iu(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!d_)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ic))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ic))},token:t,providedIn:"root"}),t})(),y_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();function b_(t){return function(){if(null==m_&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>m_=!0}))}finally{m_=m_||!1}return m_}()?t:!!t.capture}function w_(){if("object"!=typeof document||!document)return 0;if(null==f_){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",t.appendChild(n),document.body.appendChild(t),f_=0,0===t.scrollLeft&&(t.scrollLeft=1,f_=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return f_}class C_ extends og{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(t,e,n);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}class S_ extends cg{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,i=-1,s=e.length;t=t||e.shift();do{if(n=t.execute(t.state,t.delay))break}while(++i<s&&(t=e.shift()));if(this.active=!1,n){for(;++i<s&&(t=e.shift());)t.unsubscribe();throw n}}}const I_=new S_(C_);function E_(t,e){return n=>n.lift(new x_(t,e))}class x_{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new P_(t,this.compare,this.keySelector))}}class P_ extends g{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}const T_=new cg(og);class k_{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new M_(t,this.durationSelector))}}class M_ extends N{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let n;try{const{durationSelector:e}=this;n=e(t)}catch(e){return this.destination.error(e)}const i=L(this,n);!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:t,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}notifyNext(t,e,n,i){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function D_(t){return!l(t)&&t-parseFloat(t)+1>=0}function A_(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function O_(t,e=T_){return n=()=>function(t=0,e,n){let i=-1;return D_(e)?i=Number(e)<1?1:Number(e):P(e)&&(n=e),P(n)||(n=T_),new b(e=>{const s=D_(t)?t:+t-n.now();return n.schedule(A_,s,{index:0,period:i,subscriber:e})})}(t,e),function(t){return t.lift(new k_(n))};var n}function R_(...t){const e=t[t.length-1];return P(e)?(t.pop(),n=>am(t,n,e)):e=>am(t,e)}class L_{call(t,e){return e.subscribe(new N_(t))}}class N_ extends g{constructor(t){super(t),this.hasPrev=!1}_next(t){let e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)}}let z_=(()=>{class t{constructor(t,e,n){this._ngZone=t,this._platform=e,this._scrolled=new E,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=n}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new b(e=>{this._globalSubscription||this._addGlobalListener();const n=t>0?this._scrolled.pipe(O_(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):gg()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Ig(t=>!t||n.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((n,i)=>{this._scrollableContainsElement(i,t)&&e.push(i)}),e}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollableContainsElement(t,e){let n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>e_(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(v_),Qt(Ih,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(Uc),Qt(v_),Qt(Ih,8))},token:t,providedIn:"root"}),t})(),F_=(()=>{class t{constructor(t,e,n){this._platform=t,this._change=new E,this._changeListener=t=>{this._change.next(t)},this._document=n,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:n}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,height:n,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._getDocument(),e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(O_(t)):this._change}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(Qt(v_),Qt(Uc),Qt(Ih,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(v_),Qt(Uc),Qt(Ih,8))},token:t,providedIn:"root"}),t})(),V_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})(),U_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[g_,y_,V_],g_,V_]}),t})(),j_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[U_]]}),t})();const B_=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})(),H_={};class $_{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new W_(t,this.resultSelector))}}class W_ extends N{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(H_),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add(L(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,i,s){const r=this.values,o=this.toRespond?r[n]===H_?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function q_(t){return function(e){return 0===t?pg():e.lift(new G_(t))}}class G_{constructor(t){if(this.total=t,this.total<0)throw new cm}call(t,e){return e.subscribe(new Q_(t,this.total))}}class Q_ extends g{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let s=0;s<n;s++){const s=e++%n;t.next(i[s])}}t.complete()}}function K_(t=X_){return e=>e.lift(new Z_(t))}class Z_{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Y_(t,this.errorFactory))}}class Y_ extends g{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function X_(){return new B_}function J_(t=null){return e=>e.lift(new tv(t))}class tv{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new ev(t,this.defaultValue))}}class ev extends g{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function nv(t,e){const n=arguments.length>=2;return i=>i.pipe(t?Ig((e,n)=>t(e,n,i)):_,q_(1),n?J_(e):K_(()=>new B_))}function iv(t){return function(e){const n=new sv(t),i=e.lift(n);return n.caught=i}}class sv{constructor(t){this.selector=t}call(t,e){return e.subscribe(new rv(t,this.selector,this.caught))}}class rv extends N{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const i=new T(this,void 0,void 0);this.add(i);const s=L(this,n,void 0,void 0,i);s!==i&&this.add(s)}}}function ov(t,e){const n=arguments.length>=2;return i=>i.pipe(t?Ig((e,n)=>t(e,n,i)):_,hm(1),n?J_(e):K_(()=>new B_))}class av{constructor(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}call(t,e){return e.subscribe(new lv(t,this.predicate,this.thisArg,this.source))}}class lv extends g{constructor(t,e,n,i){super(t),this.predicate=e,this.thisArg=n,this.source=i,this.index=0,this.thisArg=n||this}notifyComplete(t){this.destination.next(t),this.destination.complete()}_next(t){let e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)}_complete(){this.notifyComplete(!0)}}function cv(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new hv(t,e,n))}}class hv{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new uv(t,this.accumulator,this.seed,this.hasSeed))}}class uv extends g{constructor(t,e,n,i){super(t),this.accumulator=e,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}function dv(){}function pv(t,e,n){return function(i){return i.lift(new gv(t,e,n))}}class gv{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new mv(t,this.nextOrObserver,this.error,this.complete))}}class mv extends g{constructor(t,e,n,s){super(t),this._tapNext=dv,this._tapError=dv,this._tapComplete=dv,this._tapError=n||dv,this._tapComplete=s||dv,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||dv,this._tapError=e.error||dv,this._tapComplete=e.complete||dv)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class fv{constructor(t,e){this.id=t,this.url=e}}class _v extends fv{constructor(t,e,n="imperative",i=null){super(t,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class vv extends fv{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class yv extends fv{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class bv extends fv{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class wv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Cv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Sv extends fv{constructor(t,e,n,i,s){super(t,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=s}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Iv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ev extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class xv{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Pv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Tv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class kv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Mv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Dv{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Av{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Ov=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&Fo(0,"router-outlet")},directives:function(){return[Rb]},encapsulation:2}),t})();class Rv{constructor(t){this.params=t||{}}has(t){return this.params.hasOwnProperty(t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Lv(t){return new Rv(t)}function Nv(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function zv(t,e,n){const i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length<t.length))return null;const s={};for(let r=0;r<i.length;r++){const e=i[r],n=t[r];if(e.startsWith(":"))s[e.substring(1)]=n;else if(e!==n.path)return null}return{consumed:t.slice(0,i.length),posParams:s}}class Fv{constructor(t,e){this.routes=t,this.module=e}}function Vv(t,e=""){for(let n=0;n<t.length;n++){const i=t[n];Uv(i,jv(e,i))}}function Uv(t,e){if(!t)throw new Error(`\n Invalid configuration of route '${e}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(t))throw new Error(`Invalid configuration of route '${e}': Array cannot be specified`);if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error(`Invalid configuration of route '${e}': a componentless route without children or loadChildren cannot have a named outlet set`);if(t.redirectTo&&t.children)throw new Error(`Invalid configuration of route '${e}': redirectTo and children cannot be used together`);if(t.redirectTo&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': redirectTo and loadChildren cannot be used together`);if(t.children&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': children and loadChildren cannot be used together`);if(t.redirectTo&&t.component)throw new Error(`Invalid configuration of route '${e}': redirectTo and component cannot be used together`);if(t.path&&t.matcher)throw new Error(`Invalid configuration of route '${e}': path and matcher cannot be used together`);if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error(`Invalid configuration of route '${e}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===t.path&&void 0===t.matcher)throw new Error(`Invalid configuration of route '${e}': routes must have either a path or a matcher specified`);if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error(`Invalid configuration of route '${e}': path cannot start with a slash`);if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error(`Invalid configuration of route '{path: "${e}", redirectTo: "${t.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error(`Invalid configuration of route '${e}': pathMatch can only be set to 'prefix' or 'full'`);t.children&&Vv(t.children,e)}function jv(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:`${t}/${e.path}`:"":t}function Bv(t){const e=t.children&&t.children.map(Bv),n=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!n.component&&(e||n.loadChildren)&&n.outlet&&"primary"!==n.outlet&&(n.component=Ov),n}function Hv(t,e){const n=Object.keys(t),i=Object.keys(e);if(!n||!i||n.length!=i.length)return!1;let s;for(let r=0;r<n.length;r++)if(s=n[r],!$v(t[s],e[s]))return!1;return!0}function $v(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length==e.length&&t.every(t=>e.indexOf(t)>-1):t===e}function Wv(t){return Array.prototype.concat.apply([],t)}function qv(t){return t.length>0?t[t.length-1]:null}function Gv(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Qv(t){return Ho(t)?t:Bo(t)?j(Promise.resolve(t)):gg(t)}function Kv(t,e,n){return n?function(t,e){return Hv(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!Jv(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children){if(!e.children[i])return!1;if(!t(e.children[i],n.children[i]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>$v(t[n],e[n]))}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,i,s){if(n.segments.length>s.length)return!!Jv(n.segments.slice(0,s.length),s)&&!i.hasChildren();if(n.segments.length===s.length){if(!Jv(n.segments,s))return!1;for(const e in i.children){if(!n.children[e])return!1;if(!t(n.children[e],i.children[e]))return!1}return!0}{const t=s.slice(0,n.segments.length),r=s.slice(n.segments.length);return!!Jv(n.segments,t)&&!!n.children.primary&&e(n.children.primary,i,r)}}(e,n,n.segments)}(t.root,e.root)}class Zv{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Lv(this.queryParams)),this._queryParamMap}toString(){return iy.serialize(this)}}class Yv{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Gv(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return sy(this)}}class Xv{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Lv(this.parameters)),this._parameterMap}toString(){return hy(this)}}function Jv(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function ty(t,e){let n=[];return Gv(t.children,(t,i)=>{"primary"===i&&(n=n.concat(e(t,i)))}),Gv(t.children,(t,i)=>{"primary"!==i&&(n=n.concat(e(t,i)))}),n}class ey{}class ny{parse(t){const e=new my(t);return new Zv(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+function t(e,n){if(!e.hasChildren())return sy(e);if(n){const n=e.children.primary?t(e.children.primary,!1):"",i=[];return Gv(e.children,(e,n)=>{"primary"!==n&&i.push(`${n}:${t(e,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=ty(e,(n,i)=>"primary"===i?[t(e.children.primary,!1)]:[`${i}:${t(n,!1)}`]);return`${sy(e)}/(${n.join("//")})`}}(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${oy(e)}=${oy(t)}`).join("&"):`${oy(e)}=${oy(n)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const iy=new ny;function sy(t){return t.segments.map(t=>hy(t)).join("/")}function ry(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function oy(t){return ry(t).replace(/%3B/gi,";")}function ay(t){return ry(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ly(t){return decodeURIComponent(t)}function cy(t){return ly(t.replace(/\+/g,"%20"))}function hy(t){return`${ay(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${ay(t)}=${ay(e[t])}`).join("")}`;var e}const uy=/^[^\/()?;=#]+/;function dy(t){const e=t.match(uy);return e?e[0]:""}const py=/^[^=?&#]+/,gy=/^[^?&#]+/;class my{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Yv([],{}):new Yv([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Yv(t,e)),n}parseSegment(){const t=dy(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Xv(ly(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=dy(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=dy(this.remaining);t&&(n=t,this.capture(n))}t[ly(e)]=ly(n)}parseQueryParam(t){const e=function(t){const e=t.match(py);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(gy);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const i=cy(e),s=cy(n);if(t.hasOwnProperty(i)){let e=t[i];Array.isArray(e)||(e=[e],t[i]=e),e.push(s)}else t[i]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=dy(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let s=void 0;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s="primary");const r=this.parseChildren();e[s]=1===Object.keys(r).length?r.primary:new Yv([],r),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class fy{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=_y(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=_y(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=vy(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return vy(t,this._root).map(t=>t.value)}}function _y(t,e){if(t===e.value)return e;for(const n of e.children){const e=_y(t,n);if(e)return e}return null}function vy(t,e){if(t===e.value)return[e];for(const n of e.children){const i=vy(t,n);if(i.length)return i.unshift(e),i}return[]}class yy{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function by(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class wy extends fy{constructor(t,e){super(t),this.snapshot=e,Py(this,t)}toString(){return this.snapshot.toString()}}function Cy(t,e){const n=function(t,e){const n=new Ey([],{},{},"",{},"primary",e,null,t.root,-1,{});return new xy("",new yy(n,[]))}(t,e),i=new bg([new Xv("",{})]),s=new bg({}),r=new bg({}),o=new bg({}),a=new bg(""),l=new Sy(i,s,o,a,r,"primary",e,n.root);return l.snapshot=n.root,new wy(new yy(l,[]),n)}class Sy{constructor(t,e,n,i,s,r,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=r,this.component=o,this._futureSnapshot=a}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._paramMap=this.params.pipe(z(t=>Lv(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(z(t=>Lv(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Iy(t,e="emptyOnly"){const n=t.pathFromRoot;let i=0;if("always"!==e)for(i=n.length-1;i>=1;){const t=n[i],e=n[i-1];if(t.routeConfig&&""===t.routeConfig.path)i--;else{if(e.component)break;i--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Ey{constructor(t,e,n,i,s,r,o,a,l,c,h){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=r,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}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._paramMap=Lv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Lv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class xy extends fy{constructor(t,e){super(e),this.url=t,Py(this,e)}toString(){return Ty(this._root)}}function Py(t,e){e.value._routerState=t,e.children.forEach(e=>Py(t,e))}function Ty(t){const e=t.children.length>0?` { ${t.children.map(Ty).join(", ")} } `:"";return`${t.value}${e}`}function ky(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Hv(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Hv(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!Hv(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),Hv(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function My(t,e){var n,i;return Hv(t.params,e.params)&&Jv(n=t.url,i=e.url)&&n.every((t,e)=>Hv(t.parameters,i[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||My(t.parent,e.parent))}function Dy(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Ay(t,e,n,i,s){let r={};return i&&Gv(i,(t,e)=>{r[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new Zv(n.root===t?e:function t(e,n,i){const s={};return Gv(e.children,(e,r)=>{s[r]=e===n?i:t(e,n,i)}),new Yv(e.segments,s)}(n.root,t,e),r,s)}class Oy{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(t=>"object"==typeof t&&null!=t&&t.outlets);if(i&&i!==qv(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ry{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function Ly(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function Ny(t,e,n){if(t||(t=new Yv([],{})),0===t.segments.length&&t.hasChildren())return zy(t,e,n);const i=function(t,e,n){let i=0,s=e;const r={match:!1,pathIndex:0,commandIndex:0};for(;s<t.segments.length;){if(i>=n.length)return r;const e=t.segments[s],o=Ly(n[i]),a=i<n.length-1?n[i+1]:null;if(s>0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!jy(o,a,e))return r;i+=2}else{if(!jy(o,{},e))return r;i++}s++}return{match:!0,pathIndex:s,commandIndex:i}}(t,e,n),s=n.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){const e=new Yv(t.segments.slice(0,i.pathIndex),{});return e.children.primary=new Yv(t.segments.slice(i.pathIndex),t.children),zy(e,0,s)}return i.match&&0===s.length?new Yv(t.segments,{}):i.match&&!t.hasChildren()?Fy(t,e,n):i.match?zy(t,0,s):Fy(t,e,n)}function zy(t,e,n){if(0===n.length)return new Yv(t.segments,{});{const i=function(t){return"object"!=typeof t[0]||void 0===t[0].outlets?{primary:t}:t[0].outlets}(n),s={};return Gv(i,(n,i)=>{null!==n&&(s[i]=Ny(t.children[i],e,n))}),Gv(t.children,(t,e)=>{void 0===i[e]&&(s[e]=t)}),new Yv(t.segments,s)}}function Fy(t,e,n){const i=t.segments.slice(0,e);let s=0;for(;s<n.length;){if("object"==typeof n[s]&&void 0!==n[s].outlets){const t=Vy(n[s].outlets);return new Yv(i,t)}if(0===s&&Dy(n[0])){i.push(new Xv(t.segments[e].path,n[0])),s++;continue}const r=Ly(n[s]),o=s<n.length-1?n[s+1]:null;r&&o&&Dy(o)?(i.push(new Xv(r,Uy(o))),s+=2):(i.push(new Xv(r,{})),s++)}return new Yv(i,{})}function Vy(t){const e={};return Gv(t,(t,n)=>{null!==t&&(e[n]=Fy(new Yv([],{}),0,t))}),e}function Uy(t){const e={};return Gv(t,(t,n)=>e[n]=""+t),e}function jy(t,e,n){return t==n.path&&Hv(e,n.parameters)}class By{constructor(t,e,n,i){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=i}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),ky(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const i=by(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,i[e],n),delete i[e]}),Gv(i,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const i=t.value,s=e?e.value:null;if(i===s)if(i.component){const s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else s&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:i})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const i=by(t),s=t.value.component?n.children:e;Gv(i,(t,e)=>this.deactivateRouteAndItsChildren(t,s)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const i=by(e);t.children.forEach(t=>{this.activateRoutes(t,i[t.value.outlet],n),this.forwardEvent(new Dv(t.value.snapshot))}),t.children.length&&this.forwardEvent(new kv(t.value.snapshot))}activateRoutes(t,e,n){const i=t.value,s=e?e.value:null;if(ky(i),i===s)if(i.component){const s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(i.component){const e=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const t=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),Hy(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),s=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=i,e.resolver=s,e.outlet&&e.outlet.activateWith(i,s),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function Hy(t){ky(t.value),t.children.forEach(Hy)}function $y(t){return"function"==typeof t}function Wy(t){return t instanceof Zv}class qy{constructor(t){this.segmentGroup=t||null}}class Gy{constructor(t){this.urlTree=t}}function Qy(t){return new b(e=>e.error(new qy(t)))}function Ky(t){return new b(e=>e.error(new Gy(t)))}function Zy(t){return new b(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Yy{constructor(t,e,n,i,s){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(Jt)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(z(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(iv(t=>{if(t instanceof Gy)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof qy)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(z(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(iv(t=>{if(t instanceof qy)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const i=t.segments.length>0?new Yv([],{primary:t}):t;return new Zv(i,e,n)}expandSegmentGroup(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(z(t=>new Yv([],t))):this.expandSegment(t,n,e,n.segments,i,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return gg({});const n=[],i=[],s={};return Gv(t,(t,r)=>{const o=e(r,t).pipe(z(t=>s[r]=t));"primary"===r?n.push(o):i.push(o)}),gg.apply(null,n.concat(i)).pipe(om(),nv(),z(()=>s))}(n.children,(n,i)=>this.expandSegmentGroup(t,e,i,n))}expandSegment(t,e,n,i,s,r){return gg(...n).pipe(z(o=>this.expandSegmentAgainstRoute(t,e,n,o,i,s,r).pipe(iv(t=>{if(t instanceof qy)return gg(null);throw t}))),om(),ov(t=>!!t),iv((t,n)=>{if(t instanceof B_||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,i,s))return gg(new Yv([],{}));throw new qy(e)}throw t}))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,i,s,r,o){return eb(i)!==r?Qy(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r):Qy(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,r):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,i){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Ky(s):this.lineralizeSegments(n,s).pipe(B(n=>{const s=new Yv(n,{});return this.expandSegment(t,s,e,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Xy(e,i,s);if(!o)return Qy(e);const h=this.applyRedirectCommands(a,i.redirectTo,c);return i.redirectTo.startsWith("/")?Ky(h):this.lineralizeSegments(i,h).pipe(B(i=>this.expandSegment(t,e,n,i.concat(s.slice(l)),r,!1)))}matchSegmentAgainstRoute(t,e,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(z(t=>(n._loadedConfig=t,new Yv(i,{})))):gg(new Yv(i,{}));const{matched:s,consumedSegments:r,lastChild:o}=Xy(e,n,i);if(!s)return Qy(e);const a=i.slice(o);return this.getChildConfig(t,n,i).pipe(B(t=>{const n=t.module,i=t.routes,{segmentGroup:s,slicedSegments:o}=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some(n=>tb(t,e,n)&&"primary"!==eb(n))}(t,n,i)?{segmentGroup:Jy(new Yv(e,function(t,e){const n={};n.primary=e;for(const i of t)""===i.path&&"primary"!==eb(i)&&(n[eb(i)]=new Yv([],{}));return n}(i,new Yv(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>tb(t,e,n))}(t,n,i)?{segmentGroup:Jy(new Yv(t.segments,function(t,e,n,i){const s={};for(const r of n)tb(t,e,r)&&!i[eb(r)]&&(s[eb(r)]=new Yv([],{}));return Object.assign(Object.assign({},i),s)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,r,a,i);return 0===o.length&&s.hasChildren()?this.expandChildren(n,i,s).pipe(z(t=>new Yv(r,t))):0===i.length&&0===o.length?gg(new Yv(r,{})):this.expandSegment(n,s,i,o,"primary",!0).pipe(z(t=>new Yv(r.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?gg(new Fv(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?gg(e._loadedConfig):function(t,e,n){const i=e.canLoad;return i&&0!==i.length?j(i).pipe(z(i=>{const s=t.get(i);let r;if(function(t){return t&&$y(t.canLoad)}(s))r=s.canLoad(e,n);else{if(!$y(s))throw new Error("Invalid CanLoad guard");r=s(e,n)}return Qv(r)})).pipe(om(),(s=t=>!0===t,t=>t.lift(new av(s,void 0,t)))):gg(!0);var s}(t.injector,e,n).pipe(B(n=>n?this.configLoader.load(t.injector,e).pipe(z(t=>(e._loadedConfig=t,t))):function(t){return new b(e=>e.error(Nv(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):gg(new Fv([],t))}lineralizeSegments(t,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return gg(n);if(i.numberOfChildren>1||!i.children.primary)return Zy(t.redirectTo);i=i.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,i){const s=this.createSegmentGroup(t,e.root,n,i);return new Zv(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return Gv(t,(t,i)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[i]=e[s]}else n[i]=t}),n}createSegmentGroup(t,e,n,i){const s=this.createSegments(t,e.segments,n,i);let r={};return Gv(e.children,(e,s)=>{r[s]=this.createSegmentGroup(t,e,n,i)}),new Yv(s,r)}createSegments(t,e,n,i){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,i):this.findOrReturn(e,n))}findPosParam(t,e,n){const i=n[e.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return i}findOrReturn(t,e){let n=0;for(const i of e){if(i.path===t.path)return e.splice(n),i;n++}return t}}function Xy(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(e.matcher||zv)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Jy(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new Yv(t.segments.concat(e.segments),e.children)}return t}function tb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function eb(t){return t.outlet||"primary"}class nb{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class ib{constructor(t,e){this.component=t,this.route=e}}function sb(t,e,n){const i=t._root;return function t(e,n,i,s,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=by(n);return e.children.forEach(e=>{!function(e,n,i,s,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,a=n?n.value:null,l=i?i.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const c=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Jv(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Jv(t.url,e.url)||!Hv(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!My(t,e)||!Hv(t.queryParams,e.queryParams);case"paramsChange":default:return!My(t,e)}}(a,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new nb(s)):(o.data=a.data,o._resolvedData=a._resolvedData),t(e,n,o.component?l?l.children:null:i,s,r),c&&r.canDeactivateChecks.push(new ib(l&&l.outlet&&l.outlet.component||null,a))}else a&&ob(n,l,r),r.canActivateChecks.push(new nb(s)),t(e,null,o.component?l?l.children:null:i,s,r)}(e,o[e.value.outlet],i,s.concat([e.value]),r),delete o[e.value.outlet]}),Gv(o,(t,e)=>ob(t,i.getContext(e),r)),r}(i,e?e._root:null,n,[i.value])}function rb(t,e,n){const i=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function ob(t,e,n){const i=by(t),s=t.value;Gv(i,(t,i)=>{ob(t,s.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new ib(s.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,s))}const ab=Symbol("INITIAL_VALUE");function lb(){return gm(t=>function(...t){let e=null,n=null;return P(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),q(t,n).lift(new $_(e))}(...t.map(t=>t.pipe(hm(1),R_(ab)))).pipe(cv((t,e)=>{let n=!1;return e.reduce((t,i,s)=>{if(t!==ab)return t;if(i===ab&&(n=!0),!n){if(!1===i)return i;if(s===e.length-1||Wy(i))return i}return t},t)},ab),Ig(t=>t!==ab),z(t=>Wy(t)?t:!0===t),hm(1)))}function cb(t,e){return null!==t&&e&&e(new Mv(t)),gg(!0)}function hb(t,e){return null!==t&&e&&e(new Tv(t)),gg(!0)}function ub(t,e,n){const i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?gg(i.map(i=>lm(()=>{const s=rb(i,e,n);let r;if(function(t){return t&&$y(t.canActivate)}(s))r=Qv(s.canActivate(e,t));else{if(!$y(s))throw new Error("Invalid CanActivate guard");r=Qv(s(e,t))}return r.pipe(ov())}))).pipe(lb()):gg(!0)}function db(t,e,n){const i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>lm(()=>gg(e.guards.map(s=>{const r=rb(s,e.node,n);let o;if(function(t){return t&&$y(t.canActivateChild)}(r))o=Qv(r.canActivateChild(i,t));else{if(!$y(r))throw new Error("Invalid CanActivateChild guard");o=Qv(r(i,t))}return o.pipe(ov())})).pipe(lb())));return gg(s).pipe(lb())}class pb{}class gb{constructor(t,e,n,i,s,r){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=r}recognize(){try{const t=_b(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new Ey([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new yy(n,e),s=new xy(this.url,i);return this.inheritParamsAndData(s._root),gg(s)}catch(t){return new b(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=Iy(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=ty(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),i=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${i}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,i){for(const r of t)try{return this.processSegmentAgainstRoute(r,e,n,i)}catch(s){if(!(s instanceof pb))throw s}if(this.noLeftoversInUrl(e,n,i))return[];throw new pb}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,i){if(t.redirectTo)throw new pb;if((t.outlet||"primary")!==i)throw new pb;let s,r=[],o=[];if("**"===t.path){const r=n.length>0?qv(n).parameters:{};s=new Ey(n,r,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,bb(t),i,t.component,t,mb(e),fb(e)+n.length,wb(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new pb;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(e.matcher||zv)(n,t,e);if(!i)throw new pb;const s={};Gv(i.posParams,(t,e)=>{s[e]=t.path});const r=i.consumed.length>0?Object.assign(Object.assign({},s),i.consumed[i.consumed.length-1].parameters):s;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:r}}(e,t,n);r=a.consumedSegments,o=n.slice(a.lastChild),s=new Ey(r,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,bb(t),i,t.component,t,mb(e),fb(e)+r.length,wb(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=_b(e,r,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new yy(s,t)]}if(0===a.length&&0===c.length)return[new yy(s,[])];const h=this.processSegment(a,l,c,"primary");return[new yy(s,h)]}}function mb(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function fb(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function _b(t,e,n,i,s){if(n.length>0&&function(t,e,n){return n.some(n=>vb(t,e,n)&&"primary"!==yb(n))}(t,n,i)){const s=new Yv(e,function(t,e,n,i){const s={};s.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;for(const r of n)if(""===r.path&&"primary"!==yb(r)){const n=new Yv([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,s[yb(r)]=n}return s}(t,e,i,new Yv(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>vb(t,e,n))}(t,n,i)){const r=new Yv(t.segments,function(t,e,n,i,s,r){const o={};for(const a of i)if(vb(t,n,a)&&!s[yb(a)]){const n=new Yv([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===r?t.segments.length:e.length,o[yb(a)]=n}return Object.assign(Object.assign({},s),o)}(t,e,n,i,t.children,s));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}const r=new Yv(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}function vb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function yb(t){return t.outlet||"primary"}function bb(t){return t.data||{}}function wb(t){return t.resolve||{}}function Cb(t,e,n,i){const s=rb(t,e,i);return Qv(s.resolve?s.resolve(e,n):s(e,n))}function Sb(t){return function(e){return e.pipe(gm(e=>{const n=t(e);return n?j(n).pipe(z(()=>e)):j([e])}))}}class Ib{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}const Eb=new Ft("ROUTES");class xb{constructor(t,e,n,i){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=i}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(z(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const i=n.create(t);return new Fv(Wv(i.injector.get(Eb)).map(Bv),i)}))}loadModuleFactory(t){return"string"==typeof t?j(this.loader.load(t)):Qv(t()).pipe(B(t=>t instanceof te?gg(t):j(this.compiler.compileModuleAsync(t))))}}class Pb{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function Tb(t){throw t}function kb(t,e,n){return e.parse("/")}function Mb(t,e){return gg(null)}let Db=(()=>{class t{constructor(t,e,n,i,s,r,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=i,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new E,this.errorHandler=Tb,this.malformedUriErrorHandler=kb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Mb,afterPreactivation:Mb},this.urlHandlingStrategy=new Pb,this.routeReuseStrategy=new Ib,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(Jt),this.console=s.get(xc);const l=s.get(Uc);this.isNgZoneEnabled=l instanceof Uc,this.resetConfig(a),this.currentUrlTree=new Zv(new Yv([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new xb(r,o,t=>this.triggerEvent(new xv(t)),t=>this.triggerEvent(new Pv(t))),this.routerState=Cy(this.currentUrlTree,this.rootComponentType),this.transitions=new bg({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(Ig(t=>0!==t.id),z(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),gm(t=>{let n=!1,i=!1;return gg(t).pipe(pv(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),gm(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return gg(t).pipe(gm(t=>{const n=this.transitions.getValue();return e.next(new _v(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?dg:[t]}),gm(t=>Promise.resolve(t)),(i=this.ngModule.injector,s=this.configLoader,r=this.urlSerializer,o=this.config,function(t){return t.pipe(gm(t=>function(t,e,n,i,s){return new Yy(t,e,n,i,s).apply()}(i,s,r,t.extractedUrl,o).pipe(z(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),pv(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,i,s){return function(r){return r.pipe(B(r=>function(t,e,n,i,s="emptyOnly",r="legacy"){return new gb(t,e,n,i,s,r).recognize()}(t,e,r.urlAfterRedirects,n(r.urlAfterRedirects),i,s).pipe(z(t=>Object.assign(Object.assign({},r),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),pv(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),pv(t=>{const n=new wv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var i,s,r,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:s,restoredState:r,extras:o}=t,a=new _v(n,this.serializeUrl(i),s,r);e.next(a);const l=Cy(i,this.rootComponentType).snapshot;return gg(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),dg}),Sb(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:s,extras:{skipLocationChange:r,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:s,skipLocationChange:!!r,replaceUrl:!!o})}),pv(t=>{const e=new Cv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),z(t=>Object.assign(Object.assign({},t),{guards:sb(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(B(n=>{const{targetSnapshot:i,currentSnapshot:s,guards:{canActivateChecks:r,canDeactivateChecks:o}}=n;return 0===o.length&&0===r.length?gg(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return j(t).pipe(B(t=>function(t,e,n,i,s){const r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return r&&0!==r.length?gg(r.map(r=>{const o=rb(r,e,s);let a;if(function(t){return t&&$y(t.canDeactivate)}(o))a=Qv(o.canDeactivate(t,e,n,i));else{if(!$y(o))throw new Error("Invalid CanDeactivate guard");a=Qv(o(t,e,n,i))}return a.pipe(ov())})).pipe(lb()):gg(!0)}(t.component,t.route,n,e,i)),ov(t=>!0!==t,!0))}(o,i,s,t).pipe(B(n=>n&&"boolean"==typeof n?function(t,e,n,i){return j(e).pipe(Sg(e=>j([hb(e.route.parent,i),cb(e.route,i),db(t,e.path,n),ub(t,e.route,n)]).pipe(om(),ov(t=>!0!==t,!0))),ov(t=>!0!==t,!0))}(i,r,t,e):gg(n)),z(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),pv(t=>{if(Wy(t.guardsResult)){const e=Nv(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),pv(t=>{const e=new Sv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Ig(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new yv(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),Sb(t=>{if(t.guards.canActivateChecks.length)return gg(t).pipe(pv(t=>{const e=new Iv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),(e=this.paramsInheritanceStrategy,n=this.ngModule.injector,function(t){return t.pipe(B(t=>{const{targetSnapshot:i,guards:{canActivateChecks:s}}=t;return s.length?j(s).pipe(Sg(t=>function(t,e,n,i){return function(t,e,n,i){const s=Object.keys(t);if(0===s.length)return gg({});if(1===s.length){const r=s[0];return Cb(t[r],e,n,i).pipe(z(t=>({[r]:t})))}const r={};return j(s).pipe(B(s=>Cb(t[s],e,n,i).pipe(z(t=>(r[s]=t,t))))).pipe(nv(),z(()=>r))}(t._resolve,t,e,i).pipe(z(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Iy(t,n).resolve),null)))}(t.route,i,e,n)),function(t,e){return arguments.length>=2?function(n){return v(cv(t,e),q_(1),J_(e))(n)}:function(e){return v(cv((e,n,i)=>t(e,n,i+1)),q_(1))(e)}}((t,e)=>t),z(e=>t)):gg(t)}))}),pv(t=>{const e=new Ev(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}));var e,n}),Sb(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:s,extras:{skipLocationChange:r,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:s,skipLocationChange:!!r,replaceUrl:!!o})}),z(t=>{const e=function(t,e,n){const i=function t(e,n,i){if(i&&e.shouldReuseRoute(n.value,i.value.snapshot)){const s=i.value;s._futureSnapshot=n.value;const r=function(e,n,i){return n.children.map(n=>{for(const s of i.children)if(e.shouldReuseRoute(s.value.snapshot,n.value))return t(e,n,s);return t(e,n)})}(e,n,i);return new yy(s,r)}{const i=e.retrieve(n.value);if(i){const t=i.route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(let i=0;i<e.children.length;++i)t(e.children[i],n.children[i])}(n,t),t}{const i=new Sy(new bg((s=n.value).url),new bg(s.params),new bg(s.queryParams),new bg(s.fragment),new bg(s.data),s.outlet,s.component,s),r=n.children.map(n=>t(e,n));return new yy(i,r)}}var s}(t,e._root,n?n._root:void 0);return new wy(i,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),pv(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(s=this.rootContexts,r=this.routeReuseStrategy,o=t=>this.triggerEvent(t),z(t=>(new By(r,t.targetRouterState,t.currentRouterState,o).activate(s),t))),pv({next(){n=!0},complete(){n=!0}}),n_(()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new yv(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null}),iv(n=>{if(i=!0,(s=n)&&s.ngNavigationCancelingError){const i=Wy(n.url);i||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new yv(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),i?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const i=new bv(t.id,this.serializeUrl(t.extractedUrl),n);e.next(i);try{t.resolve(this.errorHandler(n))}catch(r){t.reject(r)}}var s;return dg}));var s,r,o}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{let e=this.parseUrl(t.url);const n="popstate"===t.type?"popstate":"hashchange",i=t.state&&t.state.navigationId?t.state:null;setTimeout(()=>{this.scheduleNavigation(e,n,i,{replaceUrl:!0})},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Vv(t),this.config=t.map(Bv),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:i,fragment:s,preserveQueryParams:r,queryParamsHandling:o,preserveFragment:a}=e;Ii()&&r&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,c=a?this.currentUrlTree.fragment:s;let h=null;if(o)switch(o){case"merge":h=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=i||null}else h=r?this.currentUrlTree.queryParams:i||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,n,i,s){if(0===n.length)return Ay(e.root,e.root,e,i,s);const r=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Oy(!0,0,t);let e=0,n=!1;const i=t.reduce((t,i,s)=>{if("object"==typeof i&&null!=i){if(i.outlets){const e={};return Gv(i.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(i.segmentPath)return[...t,i.segmentPath]}return"string"!=typeof i?[...t,i]:0===s?(i.split("/").forEach((i,s)=>{0==s&&"."===i||(0==s&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))}),t):[...t,i]},[]);return new Oy(n,e,i)}(n);if(r.toRoot())return Ay(e.root,new Yv([],{}),e,i,s);const o=function(t,e,n){if(t.isAbsolute)return new Ry(e.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new Ry(n.snapshot._urlSegment,!0,0);const i=Dy(t.commands[0])?0:1;return function(t,e,n){let i=t,s=e,r=n;for(;r>s;){if(r-=s,i=i.parent,!i)throw new Error("Invalid number of '../'");s=i.segments.length}return new Ry(i,!1,s-r)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(r,e,t),a=o.processChildren?zy(o.segmentGroup,o.index,r.commands):Ny(o.segmentGroup,o.index,r.commands);return Ay(o.segmentGroup,a,e,i,s)}(l,this.currentUrlTree,t,h,c)}navigateByUrl(t,e={skipLocationChange:!1}){Ii()&&this.isNgZoneEnabled&&!Uc.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=Wy(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const n=t[e];if(null==n)throw new Error(`The requested path contains ${n} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}isActive(t,e){if(Wy(t))return Kv(this.currentUrlTree,t,e);const n=this.parseUrl(t);return Kv(this.currentUrlTree,n,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return null!=i&&(e[n]=i),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new vv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,i,s){const r=this.getTransition();if(r&&"imperative"!==e&&"imperative"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"hashchange"==e&&"popstate"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"popstate"==e&&"hashchange"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);let o,a,l;s?(o=s.resolve,a=s.reject,l=s.promise):l=new Promise((t,e)=>{o=t,a=e});const c=++this.navigationId;return this.setTransition({id:c,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:o,reject:a,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,i){const s=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(t){Oo()},t.\u0275dir=ye({type:t}),t})();class Ab{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ob,this.attachRef=null}}class Ob{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Ab,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}let Rb=(()=>{class t{constructor(t,e,n,i,s){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Yl,this.deactivateEvents=new Yl,this.name=i||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,s=new Lb(t,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ob),Ao(yl),Ao(qa),("name",function(t,e){const n=t.attrs;if(n){const t=n.length;let e=0;for(;e<t;){const i=n[e];if(Dn(i))break;if(0===i)e+=2;else if("number"==typeof i)for(e++;e<t&&"string"==typeof n[e];)e++;else{if("name"===i)return n[e+1];e+=2}}}return null}(Xe())),Ao(Qr))},t.\u0275dir=ye({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class Lb{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===Sy?this.route:t===Ob?this.childContexts:this.parent.get(t,e)}}class Nb{}class zb{preload(t,e){return gg(null)}}let Fb=(()=>{class t{constructor(t,e,n,i,s){this.router=t,this.injector=i,this.preloadingStrategy=s,this.loader=new xb(e,n,e=>t.triggerEvent(new xv(e)),e=>t.triggerEvent(new Pv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Ig(t=>t instanceof vv),Sg(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Jt);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const i of e)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const t=i._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(t,i)):i.children&&n.push(this.processRoutes(t,i.children));return j(n).pipe(W(),z(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(B(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Db),Qt(lh),Qt(Nc),Qt(ho),Qt(Nb))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Vb=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof _v?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof vv&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Av&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new Av(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(t){Oo()},t.\u0275dir=ye({type:t}),t})();const Ub=new Ft("ROUTER_CONFIGURATION"),jb=new Ft("ROUTER_FORROOT_GUARD"),Bb=[Vh,{provide:ey,useClass:ny},{provide:Db,useFactory:function(t,e,n,i,s,r,o,a={},l,c){const h=new Db(null,t,e,n,i,s,r,Wv(o));if(l&&(h.urlHandlingStrategy=l),c&&(h.routeReuseStrategy=c),a.errorHandler&&(h.errorHandler=a.errorHandler),a.malformedUriErrorHandler&&(h.malformedUriErrorHandler=a.malformedUriErrorHandler),a.enableTracing){const t=Sh();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return a.onSameUrlNavigation&&(h.onSameUrlNavigation=a.onSameUrlNavigation),a.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=a.paramsInheritanceStrategy),a.urlUpdateStrategy&&(h.urlUpdateStrategy=a.urlUpdateStrategy),a.relativeLinkResolution&&(h.relativeLinkResolution=a.relativeLinkResolution),h},deps:[ey,Ob,Vh,ho,lh,Nc,Eb,Ub,[class{},new st],[class{},new st]]},Ob,{provide:Sy,useFactory:function(t){return t.routerState.root},deps:[Db]},{provide:lh,useClass:uh},Fb,zb,class{preload(t,e){return e().pipe(iv(()=>gg(null)))}},{provide:Ub,useValue:{enableTracing:!1}}];function Hb(){return new eh("Router",Db)}let $b=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Bb,Qb(e),{provide:jb,useFactory:Gb,deps:[[Db,new st,new ot]]},{provide:Ub,useValue:n||{}},{provide:Rh,useFactory:qb,deps:[Eh,[new it(Nh),new st],Ub]},{provide:Vb,useFactory:Wb,deps:[Db,su,Ub]},{provide:Nb,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:zb},{provide:eh,multi:!0,useFactory:Hb},[Kb,{provide:vc,multi:!0,useFactory:Zb,deps:[Kb]},{provide:Xb,useFactory:Yb,deps:[Kb]},{provide:Ec,multi:!0,useExisting:Xb}]]}}static forChild(e){return{ngModule:t,providers:[Qb(e)]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(jb,8),Qt(Db,8))}}),t})();function Wb(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Vb(t,e,n)}function qb(t,e,n={}){return n.useHash?new Fh(t,e):new zh(t,e)}function Gb(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Qb(t){return[{provide:uo,multi:!0,useValue:t},{provide:Eb,multi:!0,useValue:t}]}let Kb=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new E}appInitializer(){return this.injector.get(Ph,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(Db),i=this.injector.get(Ub);if(this.isLegacyDisabled(i)||this.isLegacyEnabled(i))t(!0);else if("disabled"===i.initialNavigation)n.setUpLocationChangeListener(),t(!0);else{if("enabled"!==i.initialNavigation)throw new Error(`Invalid initialNavigation options: '${i.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?gg(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()}return e})}bootstrapListener(t){const e=this.injector.get(Ub),n=this.injector.get(Fb),i=this.injector.get(Vb),s=this.injector.get(Db),r=this.injector.get(oh);t===r.components[0]&&(this.isLegacyEnabled(e)?s.initialNavigation():this.isLegacyDisabled(e)&&s.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),s.resetRootComponentType(r.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}isLegacyDisabled(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}return t.\u0275fac=function(e){return new(e||t)(Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Zb(t){return t.appInitializer.bind(t)}function Yb(t){return t.bootstrapListener.bind(t)}const Xb=new Ft("Router Initializer");function Jb(t,e){if(1&t&&(No(0,"span",4),Fo(1,"i"),zo()),2&t){const t=Go();ws(1),la(t.config.icon)}}const tw=function(t){return{"is-active":t}},ew=["componentSection"],nw=["okButton"],iw=["cancelButton"],sw=["backdropButton"],rw=["header"],ow=["footer"];function aw(t,e){if(1&t){const t=jo();No(0,"button",13,14),$o("click",(function(){return Ye(t),Go(2).backdropHandler()})),zo()}}function lw(t,e){if(1&t&&(No(0,"header",9,10),No(2,"p",11),ba(3),zo(),Mo(4,aw,2,0,"button",12),zo()),2&t){const t=Go();ws(3),wa(t.config.title),ws(1),Ro("ngIf",t.config.hasBackdrop)}}function cw(t,e){1&t&&(No(0,"section",15),Fo(1,"nwb-spinner"),zo())}function hw(t,e){1&t&&Fo(0,"section",16),2&t&&Ro("innerHTML",Go().config.message,Yi)}function uw(t,e){if(1&t){const t=jo();No(0,"button",21,22),$o("click",(function(){return Ye(t),Go(2).cancelHandler()})),ba(2),zo()}if(2&t){const t=Go(2);ws(2),Ca("",t.config.cancelButtonText," ")}}function dw(t,e){if(1&t){const t=jo();No(0,"button",23,24),$o("click",(function(){return Ye(t),Go(2).okHandler()})),ba(2),zo()}if(2&t){const t=Go(2);ws(2),Ca("",t.config.okButtonText," ")}}function pw(t,e){if(1&t&&(No(0,"footer",17,18),Mo(2,uw,3,1,"button",19),Mo(3,dw,3,1,"button",20),zo()),2&t){const t=Go();ws(2),Ro("ngIf",t.config.cancelButtonText),ws(1),Ro("ngIf",t.config.okButtonText)}}const gw=function(t){return{width:t}},mw=function(t){return{"is-hidden":t}},fw=["inputSearch"];function _w(t,e){1&t&&Fo(0,"header",14,15)}const vw=function(t,e,n,i){return{selected:t,"not-selectable":e,"is-child":n,"is-parent":i}};function yw(t,e){if(1&t){const t=jo();No(0,"a",18),$o("mousemove",(function(){return Ye(t),Go(2).mouseMove()}))("mouseover",(function(){Ye(t);const n=e.index;return Go(2).mouseOver(n)}))("click",(function(){return Ye(t),Go(2).selectValue()})),Fo(1,"div",19),zo()}if(2&t){const t=e.$implicit,n=e.index,i=Go(2);Ro("ngClass",Ul(3,vw,t.isSelectable&&n===i.selectedFoundRow,!t.isSelectable,t.isChild,t.isParent))("tabindex",n),ws(1),Ro("innerHTML",t.text,Yi)}}function bw(t,e){if(1&t&&(No(0,"div",16),Mo(1,yw,2,8,"a",17),zo()),2&t){const t=Go();ws(1),Ro("ngForOf",t.foundRows)}}function ww(t,e){1&t&&Fo(0,"nwb-spinner")}function Cw(t,e){1&t&&Fo(0,"footer",20,21)}const Sw=function(t,e){return{"has-no-header":t,"has-no-footer":e}};function Iw(t,e){if(1&t){const t=jo();No(0,"div",3),No(1,"button",4),$o("click",(function(){return Ye(t),Go().dismiss(!0)})),ba(2),zo(),zo()}if(2&t){const t=Go();ws(1),la("button "+(t.config.buttonColor?t.config.buttonColor:"is-success")),ws(1),Ca("",t.config.action," ")}}const Ew=function(t){return{"is-half":t}};let xw=(()=>{class t{constructor(){this.availableColors=["#a2c739","#dbdbdb","#00d1b2","#4baed0"]}ngOnInit(){this.color||(this.color=this.availableColors[Math.floor(Math.random()*this.availableColors.length)])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-spinner"]],hostAttrs:[1,"nwb-spinner"],inputs:{color:"color"},decls:1,vars:2,consts:[[1,"is-spinning"]],template:function(t,e){1&t&&Fo(0,"div",0),2&t&&oa("border-color",e.color)},encapsulation:2}),t})(),Pw=(()=>{class t{constructor(t){this.el=t,this.el.nativeElement.classList.add("tooltip")}set nwbToolTip(t){this.el.nativeElement.setAttribute("data-tooltip",t)}set nwbToolTipPosition(t){this.el.nativeElement.classList.remove("is-tooltip-top"),this.el.nativeElement.classList.remove("is-tooltip-left"),this.el.nativeElement.classList.remove("is-tooltip-right"),this.el.nativeElement.classList.remove("is-tooltip-bottom"),this.el.nativeElement.classList.add("is-tooltip-"+t)}set nwbToolTipIsMultiline(t){t?this.el.nativeElement.classList.add("is-tooltip-multiline"):this.el.nativeElement.classList.remove("is-tooltip-multiline")}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","nwbToolTip",""]],inputs:{nwbToolTip:"nwbToolTip",nwbToolTipPosition:"nwbToolTipPosition",nwbToolTipIsMultiline:"nwbToolTipIsMultiline"}}),t})();class Tw{constructor(t,e){this.name=t,this.valuesChange$=new E,this.group=new Map,Object.keys(e).forEach(t=>{const n=e[t],i=new kw(t,n,n);this.group.set(t,i)})}set(t,e){this._valueChange(t,e)&&this.emitChange()}get(t){if(!this.group.has(t))throw new Error(`FilterGroup: They key ${t} doesn't exist`);return this.group.get(t).value}setValues(t){let e=!1;Object.keys(t).forEach(n=>{this._valueChange(n,t[n])&&(e=!0)}),e&&this.emitChange()}_valueChange(t,e){if(!this.group.has(t))throw new Error(`FilterGroup: They key ${t} doesn't exist`);return"string"==typeof e&&(e=e.trim()),this.group.get(t).value!=e&&(this.group.get(t).value=e,!0)}emitChange(){const t=[];this.group.forEach(e=>t.push(e)),this.valuesChange$.next(t)}getFilters(){const t=[];return this.group.forEach(e=>t.push(e)),t}}class kw{constructor(t,e,n){this.key=t,this.defaultValue=e,this.value=n}isDefaultValue(){return this.defaultValue===this.value}}let Mw=(()=>{class t{constructor(t,e){this.router=t,this.route=e,this.groupCounter=0,this.filterGroups=new Map,this.route.queryParams.subscribe(t=>{this.queryParamsChange(t)})}queryParamsChange(t){const e=new Map;Object.keys(t).forEach(n=>{const i=this.getParsedKey(n),s=e.has(i.filterGroupName)?e.get(i.filterGroupName):{};s[i.filterKey]=t[n],e.set(i.filterGroupName,s)}),this.filterGroups.forEach(t=>{const n={};t.getFilters().forEach(t=>{n[t.key]=t.defaultValue});const i=e.has(t.name)?e.get(t.name):{};t.setValues(Object.assign(n,i))})}group(t,e){e||(e="fg_"+this.groupCounter++);const n=new Tw(e,t);return this.filterGroups.set(n.name,n),n.valuesChange$.subscribe(t=>{this.updateRouting(n.name,t)}),this.route.queryParams.subscribe(t=>{this.queryParamsChange(t)}).unsubscribe(),n}addFilterGroupNameToQueryParamKey(t,e){return t+":"+e}getParsedKey(t){const e=t.split(":");return{filterGroupName:e[0],filterKey:e[1]}}updateRouting(t,e){this.route.queryParamMap.subscribe(n=>{const i={};n.keys.forEach(t=>{i[t]=n.get(t)});const s=Object.assign({},i);e.forEach(e=>{const n=this.addFilterGroupNameToQueryParamKey(t,e.key);if(e.isDefaultValue())s.hasOwnProperty(n)&&delete s[n];else{let t=e.value;t instanceof Date&&(t=t.toISOString()),s[n]=t}}),this.router.navigate([],{queryParams:s,relativeTo:this.route})}).unsubscribe()}remove(t){this.filterGroups.has(t.name)&&this.filterGroups.delete(t.name)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Db),Qt(Sy))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Dw=(()=>{class t{getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=document.createElement("div");t.classList.add("nwb-overlay-container"),document.body.appendChild(t),this._containerElement=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Aw={provide:Dw,deps:[[new st,new ot,Dw]],useFactory:function(t){return t||new Dw}};let Ow=(()=>{class t{constructor(t,e,n,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=n,this.overlayContainer=i}attachComponentPortal(t,e){const n=this.componentFactoryResolver.resolveComponentFactory(t).create(e||this.injector);return this.appRef.attachView(n.hostView),this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}return t.\u0275fac=function(e){return new(e||t)(Qt(qa),Qt(oh),Qt(ho),Qt(Dw))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Rw={provide:Ow,deps:[[new st,new ot,Ow],qa,oh,ho,Dw],useFactory:function(t,e,n,i,s){return t||new Ow(e,n,i,s)}};let Lw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Aw,Rw,Mw],imports:[[nu,Jf]]}),t})(),Nw=(()=>{class t{constructor(){this._afterClosed=new E,this.open=!1}ngOnInit(){setTimeout(()=>{this.open=!0},50),this.config.duration>0&&(this.timer=setTimeout(()=>this.dismiss(),this.config.duration))}dismiss(){this.open=!1,setTimeout(()=>{this._afterClosed.next(!0),this._afterClosed.complete()},200)}afterClosed(){return this._afterClosed.asObservable()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-alert"]],hostAttrs:[1,"nwb-alert"],decls:4,vars:7,consts:[[3,"ngClass"],[1,"alert--message"],["class","icon",4,"ngIf"],[3,"innerHTML"],[1,"icon"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),Mo(2,Jb,2,2,"span",2),Fo(3,"p",3),zo(),zo()),2&t&&(la("alert "+(e.config.color?e.config.color:" is-primary")+(e.config.extraClasses?" "+e.config.extraClasses:"")+(e.config.position?" "+e.config.position:"")),Ro("ngClass",zl(5,tw,e.open)),ws(2),Ro("ngIf",e.config.icon),ws(1),Ro("innerHTML",e.config.message,Yi))},directives:[qh,Zh],encapsulation:2}),t})(),zw=(()=>{class t{constructor(t){this.domService=t}open(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=this.domService.attachComponentPortal(Nw);return t=Object.assign({position:"is-top"},t),e.instance.config=t,e.instance.afterClosed().subscribe(()=>{e.destroy()}),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[zw],imports:[[nu,Lw]]}),t})(),Vw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),Uw=(()=>{class t{constructor(t){this.componentFactoryResolver=t,this.ready=new Yl,this.hasComponent=!1,this._afterClosed=new E,this.open=!1,this.fromOkButton=!1}ngOnInit(){this.open=!0,this.ready.next(!0)}_keypress(){this.config.hasBackdrop&&this.dismiss(!1)}backdropHandler(){this.config.hasBackdrop&&this.dismiss(!1)}cancelHandler(){this.config.cancelHandler&&"function"==typeof this.config.cancelHandler?this.config.cancelHandler():this.dismiss(!1)}okHandler(){this.config.okHandler&&"function"==typeof this.config.okHandler?this.config.okHandler():this.dismiss(!0)}disableButtonsAndMakeOkButtonLoading(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl.nativeElement.classList.add("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.setAttribute("disabled","disabled")}enableButtonsAndMakeOkButtonNotLoading(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl.nativeElement.classList.remove("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.removeAttribute("disabled")}dismiss(t){this.open=!1,this.fromOkButton=t}animationDone(t){"active"===t.fromState&&"inactive"===t.toState&&(this._afterClosed.next(this.fromOkButton),this._afterClosed.complete())}afterClosed(){return this._afterClosed.asObservable()}hideSpinner(){this.config.loading=!1}displaySpinner(){this.config.loading=!0}_setComponent(t){let e;if(t instanceof _l)this.componentSection.createEmbeddedView(t);else{e=this.componentFactoryResolver.resolveComponentFactory(t);const n=this.componentSection.createComponent(e);this.componentInstance=n.instance}this.hasComponent=!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(qa))},t.\u0275cmp=pe({type:t,selectors:[["nwb-dialog"]],viewQuery:function(t,e){var n;1&t&&(cc(ew,!0,yl),hc(nw,!0),hc(iw,!0),hc(sw,!0),hc(rw,!0),hc(ow,!0)),2&t&&(lc(n=gc())&&(e.componentSection=n.first),lc(n=gc())&&(e.okButtonEl=n.first),lc(n=gc())&&(e.cancelButtonEl=n.first),lc(n=gc())&&(e.backdropButtonEl=n.first),lc(n=gc())&&(e.headerEl=n.first),lc(n=gc())&&(e.footerEl=n.first))},hostAttrs:[1,"nwb-dialog"],hostBindings:function(t,e){1&t&&$o("keydown.escape",(function(){return e._keypress()}),!1,Hn)},decls:10,vars:11,consts:[[1,"modal","is-active"],[1,"modal-background",3,"click"],[1,"modal-card",3,"ngStyle"],["class","modal-card-head",4,"ngIf"],["class","modal-card-body",4,"ngIf"],["class","modal-card-body",3,"innerHTML",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],["componentSection",""],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"modal-card-title"],["class","delete",3,"click",4,"ngIf"],[1,"delete",3,"click"],["backdropButton",""],[1,"modal-card-body"],[1,"modal-card-body",3,"innerHTML"],[1,"modal-card-foot"],["footer",""],["class","button column is-medium is-danger is-4",3,"click",4,"ngIf"],["class","button column is-medium is-success is-offset-4",3,"click",4,"ngIf"],[1,"button","column","is-medium","is-danger","is-4",3,"click"],["cancelButton",""],[1,"button","column","is-medium","is-success","is-offset-4",3,"click"],["okButton",""]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),$o("click",(function(){return e.backdropHandler()})),zo(),No(2,"div",2),$o("@modalState.done",(function(t){return e.animationDone(t)})),Mo(3,lw,5,2,"header",3),Mo(4,cw,2,0,"section",4),Mo(5,hw,1,1,"section",5),No(6,"section",6),Fo(7,"div",null,7),zo(),Mo(9,pw,4,2,"footer",8),zo(),zo()),2&t&&(ws(2),Ro("@modalState",e.open?"active":"inactive")("ngStyle",zl(7,gw,e.config.width)),ws(1),Ro("ngIf",e.config.title),ws(1),Ro("ngIf",e.config.loading),ws(1),Ro("ngIf",!e.config.loading&&e.config.message&&e.config.message.length>0),ws(1),Ro("ngClass",zl(9,mw,!e.hasComponent||e.config.loading)),ws(3),Ro("ngIf",!e.config.loading&&(e.config.cancelButtonText.length>0||e.config.okButtonText.length>0)))},directives:[Jh,Zh,qh,xw],encapsulation:2,data:{animation:[zu("modalState",[Hu("void => active",Fu("200ms",Bu([Uu({opacity:"0",top:"5%",offset:0}),Uu({opacity:"1",top:"0",offset:1})]))),Hu("active => inactive",Fu("200ms",Bu([Uu({opacity:"1",offset:0}),Uu({opacity:"0",top:"5%",offset:1})])))])]}}),t})();class jw{constructor(t,e){this._parentInjector=t,this._customTokens=e}get(t,e){const n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)}}function Bw(t,...e){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(let n of e)if(null!=n)for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}let Hw=(()=>{class t{constructor(t,e){this.domService=t,this.injector=e}open(t){return this.getComponentRef(t).instance}openFromComponent(t,e){const n=this.getComponentRef(e);return n.instance._setComponent(t),n.instance}getComponentRef(t){const e=new WeakMap;e.set(Uw,Uw);let n=new jw(this.injector,e);const i=this.domService.attachComponentPortal(Uw,n);return i.instance.config=Bw(new $w,t),i.instance.afterClosed().subscribe(()=>{i.destroy()}),i}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class $w{constructor(){this.okButtonText="",this.cancelButtonText="",this.width="",this.hasBackdrop=!0,this.okHandler=null,this.cancelHandler=null,this.loading=!1}}let Ww=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Hw],imports:[[nu,Lw]]}),t})(),qw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),Gw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw,Jf,t_]]}),t})(),Qw=(()=>{class t{constructor(){this.selectedValue$=new E,this.afterViewInit$=new Yl,this.selectedFoundRow=0,this.isActive=!1,this.foundRows=[],this.isSearching=!1,this.searchString="",this.enabled=!0,this._isMouseNavigating=!1}ngAfterViewInit(){this.afterViewInit$.emit()}open(){this.enabled&&(this._reset(),this.focusInputSearch(),this.isActive=!0,this.searching(""))}close(){this.isActive=!1,this._reset()}_reset(){this.foundRows=[],this.selectedFoundRow=0,this.searchString="",setTimeout(()=>{this.inputSearch.nativeElement.value=""})}inputOnKeyDown(t){27===t.keyCode&&this.close()}documentOnKeyDown(t){let e=!1;this._isMouseNavigating=!1,e=this.openFromKeyboard(t)||e,e=this.keyboardNavigate(t)||e,e=this.onEnter(t)||e,e&&t.preventDefault()}mouseMove(){this._isMouseNavigating=!0}mouseOver(t){this._isMouseNavigating&&(this.selectedFoundRow=t)}getSpecialKey(t){return t.metaKey?navigator.platform.match("Mac")?"cmd":"windows":t.ctrlKey?"ctrl":t.shiftKey?"shift":t.altKey?"alt":null}isSubscribedKey(t){return this.config.keyCodes.filter(e=>this.getSpecialKey(t)===e.specialKey&&t.key===e.key).length>0}openFromKeyboard(t){return!(this.isActive||!this.config||!this.isSubscribedKey(t)||(this.open(),0))}keyboardNavigate(t){const e=t.keyCode;if(!this.isActive)return!1;let n=!1;if(40===e||9===e){do{this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}while(!this.isSelectedFoundRowSelectable());n=!0}else if(38===e){do{this.selectedFoundRow--,this.selectedFoundRow<0&&(this.selectedFoundRow=this.foundRows.length-1)}while(!this.isSelectedFoundRowSelectable());n=!0}if(n){const t=document.querySelector(`a.nwb-modal-search-row[tabindex="${this.selectedFoundRow}"`);t&&(t.focus(),this.focusInputSearch())}return n}focusInputSearch(){setTimeout(()=>{this.inputSearch.nativeElement.focus()})}onEnter(t){if(!this.isActive)return!1;13===t.keyCode&&this.selectValue()}isSelectedFoundRowSelectable(){return this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&this.foundRows[this.selectedFoundRow].isSelectable}selectFirstSelectableRow(){if(0!==this.foundRows.length)for(this.selectedFoundRow=0;!this.isSelectedFoundRowSelectable();)this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}selectValue(){this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&(this.selectedValue$.next(this.foundRows[this.selectedFoundRow]),this.close())}searching(t){let e;this.searchSubscription&&this.searchSubscription.unsubscribe(),"function"==typeof this.config.customSearchFn?e=this.config.customSearchFn(t):this.config.records&&(e=this.searchFromRecords(t)),Array.isArray(e)?(this.foundRows=this.flattenNwbFoundRow(e),this.selectFirstSelectableRow()):e&&(this.isSearching=!0,this.searchSubscription=e.pipe(n_(()=>this.isSearching=!1)).subscribe(t=>{this.foundRows=this.flattenNwbFoundRow(t),this.selectFirstSelectableRow()}))}flattenNwbFoundRow(t){let e=[],n=!1;return t.forEach(t=>{const i={text:t.text,isSelectable:!t.hasOwnProperty("isSelectable")||t.isSelectable,isChild:!1,data:t.data||null,isParent:t.children&&t.children.length>0};i.isSelectable&&(n=!0),e.push(i),t.children&&t.children.forEach(t=>{const i={text:t.text,isSelectable:!t.hasOwnProperty("isSelectable")||t.isSelectable,isChild:!0,data:t.data||null,isParent:!1};i.isSelectable&&(n=!0),e.push(i)})}),!n&&e.length>0&&(console.error("No selectable rows! empty found rows to avoid infinite loop"),e=[]),e}searchFromRecords(t){return b.create(e=>{const n=this.searchAllWordsInFoundRows(t,this.config.records);e.next(n),e.complete()})}searchAllWordsInFoundRows(t,e){const n=t.split(" ").map(t=>`(?=.*${t})`).join(""),i=new RegExp(n,"ig"),s=[];return e.forEach(t=>{let e=[];if(t.children&&(e=t.children.filter(t=>-1!==t.text.search(i))),e.length||-1!==t.text.search(i)){const n=Object.assign({},t);n.children=e,s.push(n)}}),s}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-modal-search"]],viewQuery:function(t,e){var n;1&t&&(hc(rw,!0),cc(fw,!0),hc(ow,!0)),2&t&&(lc(n=gc())&&(e.header=n.first),lc(n=gc())&&(e.inputSearch=n.first),lc(n=gc())&&(e.footer=n.first))},hostAttrs:[1,"nwb-modal-search"],hostBindings:function(t,e){1&t&&$o("keydown",(function(t){return e.documentOnKeyDown(t)}),!1,Hn)},decls:14,vars:19,consts:[[3,"ngClass"],[1,"modal-background",3,"click"],[1,"modal-content","modal-card",3,"ngClass","click"],["class","modal-card-head",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],[1,"field","nwb-modal-search"],[1,"control","has-icons-left"],["type","text",1,"input",3,"ngModel","placeholder","ngModelChange","keydown"],["inputSearch",""],[1,"icon","is-large","is-left"],[1,"fa","fa-search"],["class","nwb-modal-search-found-rows",4,"ngIf"],[4,"ngIf"],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"nwb-modal-search-found-rows"],["class","nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click",4,"ngFor","ngForOf"],[1,"nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click"],[1,"nwb-modal-search-row-content",3,"innerHTML"],[1,"modal-card-foot"],["footer",""]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),$o("click",(function(){return e.close()})),zo(),No(2,"div",2),$o("click",(function(){return e.focusInputSearch()})),Mo(3,_w,2,0,"header",3),No(4,"section",4),No(5,"div",5),No(6,"div",6),No(7,"input",7,8),$o("ngModelChange",(function(t){return e.searching(t)}))("keydown",(function(t){return e.inputOnKeyDown(t)})),zo(),No(9,"span",9),Fo(10,"i",10),zo(),zo(),Mo(11,bw,2,1,"div",11),Mo(12,ww,1,0,"nwb-spinner",12),zo(),zo(),Mo(13,Cw,2,0,"footer",13),zo(),zo()),2&t&&(Ia("modal ",e.config.extraClasses?" "+e.config.extraClasses:"",""),Ro("ngClass",zl(12,tw,e.isActive)),ws(2),Ro("ngClass",zl(14,tw,e.isActive)),ws(1),Ro("ngIf",e.config.hasHeader),ws(1),Ro("ngClass",Fl(16,Sw,!e.config.hasHeader,!e.config.hasFooter)),ws(3),Yo("placeholder",e.config.inputPlaceholder),Ro("ngModel",e.searchString),ws(4),Ro("ngIf",!e.isSearching&&e.foundRows.length>0),ws(1),Ro("ngIf",e.isSearching),ws(1),Ro("ngIf",e.config.hasFooter))},directives:[qh,Zh,$m,Zm,Kf,Qh,xw],encapsulation:2}),t})(),Kw=(()=>{class t{constructor(t,e){this.domService=t,this.injector=e}create(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=new WeakMap;e.set(Qw,Qw);let n=new jw(this.injector,e);const i=this.domService.attachComponentPortal(Qw,n);return i.instance.config=Bw(new Zw,t),i}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zw{constructor(){this.hasHeader=!1,this.hasFooter=!1,this.keyCodes=[{specialKey:"cmd",key:"k"},{specialKey:"ctrl",key:"k"}],this.inputPlaceholder="Jump to...",this.extraClasses=""}}let Yw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Kw],imports:[[nu,Jf,Lw]]}),t})(),Xw=(()=>{class t{constructor(){this.changes=new E,this.itemsPerPageLabel="Items per page:",this.ofLabel="of",this.getRangeLabel=(t,e,n)=>{if(0==n||0==e)return`0 ${this.ofLabel} ${n}`;const i=t*e;return`${i+1} - ${i<(n=Math.max(n,0))?Math.min(i+e,n):i+e} ${this.ofLabel} ${n}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Jw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Xw],imports:[[nu,Lw]]}),t})(),tC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),eC=(()=>{class t{constructor(){this._afterClosed=new E,this.open=!1,this.manualClose=!1}ngOnInit(){this.open=!0,this.config.duration>0&&(this.timer=setTimeout(()=>this.dismiss(!1),this.config.duration))}dismiss(t){this.open=!1,this.manualClose=t}animationDone(t){"active"===t.fromState&&"inactive"===t.toState&&(this._afterClosed.next(this.manualClose),this._afterClosed.complete())}afterClosed(){return this._afterClosed.asObservable()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-snack-bar"]],hostAttrs:[1,"nwb-snack-bar"],decls:4,vars:8,consts:[[1,"columns"],[1,"column","notification--message",3,"ngClass","innerHTML"],["class","column is-half",4,"ngIf"],[1,"column","is-half"],[3,"click"]],template:function(t,e){1&t&&(No(0,"div"),$o("@state.done",(function(t){return e.animationDone(t)})),No(1,"div",0),Fo(2,"div",1),Mo(3,Iw,3,3,"div",2),zo(),zo()),2&t&&(la("notification is-active "+(e.config.color?e.config.color:"is-transparent")),Ro("@state",e.open?"active":"inactive"),ws(2),Ro("ngClass",zl(6,Ew,e.config.action))("innerHTML",e.config.message,Yi),ws(1),Ro("ngIf",e.config.action))},directives:[qh,Zh],encapsulation:2,data:{animation:[zu("state",[ju("void",Uu({bottom:"-100px"})),ju("inactive",Uu({bottom:"-100px"})),ju("active",Uu({bottom:"0px"})),Hu("void => active",Fu(300)),Hu("active => inactive",Fu(300))])]}}),t})(),nC=(()=>{class t{constructor(t){this.domService=t}open(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=this.domService.attachComponentPortal(eC);return e.instance.config=t,e.instance.afterClosed().subscribe(()=>{e.destroy()}),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),iC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[nC],imports:[[nu,Lw]]}),t})(),sC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw,j_]]}),t})(),rC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Jf,Lw]]}),t})(),oC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),aC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),lC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[],Lw,Fw,Vw,Ww,qw,Yw,Jw,tC,iC,sC,rC,oC,Gw,aC]}),t})();function cC(t,e=T_){return n=>n.lift(new hC(t,e))}class hC{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new uC(t,this.dueTime,this.scheduler))}}class uC extends g{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(dC,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function dC(t){t.debouncedNext()}let pC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();class gC{constructor(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}call(t,e){return e.subscribe(new mC(t,this.project,this.concurrent,this.scheduler))}}class mC extends N{constructor(t,e,n,i){super(t),this.project=e,this.concurrent=n,this.scheduler=i,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}static dispatch(t){const{subscriber:e,result:n,value:i,index:s}=t;e.subscribeToProjection(n,i,s)}_next(t){const e=this.destination;if(e.closed)return void this._complete();const n=this.index++;if(this.active<this.concurrent){e.next(t);try{const{project:e}=this,i=e(t,n);this.scheduler?this.destination.add(this.scheduler.schedule(mC.dispatch,0,{subscriber:this,result:i,value:t,index:n})):this.subscribeToProjection(i,t,n)}catch(i){e.error(i)}}else this.buffer.push(t)}subscribeToProjection(t,e,n){this.active++,this.destination.add(L(this,t,e,n))}_complete(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,i,s){this._next(e)}notifyComplete(t){const e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}class fC{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new _C(t,this.predicate,this.inclusive))}}class _C extends g{constructor(t,e,n){super(t),this.predicate=e,this.inclusive=n,this.index=0}_next(t){const e=this.destination;let n;try{n=this.predicate(t,this.index++)}catch(i){return void e.error(i)}this.nextOrComplete(t,n)}nextOrComplete(t,e){const n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}var vC=n("0Tit"),yC=n.n(vC);const bC=new Ft("SMOOTH_SCROLL_OPTIONS");let wC=(()=>{class t{constructor(t,e,n){this._document=t,this._platform=e,this._onGoingScrolls=new Map,this._defaultOptions=Object.assign({duration:468,easing:{x1:.42,y1:0,x2:.58,y2:1}},n)}get _w(){return this._document.defaultView}get _now(){return this._w.performance&&this._w.performance.now?this._w.performance.now.bind(this._w.performance):Date.now}_scrollElement(t,e,n){t.scrollLeft=e,t.scrollTop=n}_getElement(t,e){return"string"==typeof t?(e||this._document).querySelector(t):h_(t)}_initSmoothScroll(t){return this._onGoingScrolls.has(t)&&this._onGoingScrolls.get(t).next(),this._onGoingScrolls.set(t,new E).get(t)}_isFinished(t,e,n){return t.currentX!==t.x||t.currentY!==t.y||(e.next(),n(),!1)}_interrupted(t,e){return G(e_(t,"wheel",{passive:!0,capture:!0}),e_(t,"touchmove",{passive:!0,capture:!0}),e).pipe(hm(1))}_destroy(t,e){e.complete(),this._onGoingScrolls.delete(t)}_step(t){return new b(e=>{let n=(this._now()-t.startTime)/t.duration;n=n>1?1:n;const i=t.easing(n);t.currentX=t.startX+(t.x-t.startX)*i,t.currentY=t.startY+(t.y-t.startY)*i,this._scrollElement(t.scrollable,t.currentX,t.currentY),I_.schedule(()=>e.next(t))})}_applyScrollToOptions(t,e){if(!e.duration)return this._scrollElement(t,e.left,e.top),Promise.resolve();const n=this._initSmoothScroll(t),i={scrollable:t,startTime:this._now(),startX:t.scrollLeft,startY:t.scrollTop,x:null==e.left?t.scrollLeft:~~e.left,y:null==e.top?t.scrollTop:~~e.top,duration:e.duration,easing:yC()(e.easing.x1,e.easing.y1,e.easing.x2,e.easing.y2)};return new Promise(e=>{gg(null).pipe(function(t,e=Number.POSITIVE_INFINITY,n){return e=(e||0)<1?Number.POSITIVE_INFINITY:e,i=>i.lift(new gC(t,e,n))}(()=>this._step(i).pipe(function(t,e=!1){return n=>n.lift(new fC(t,e))}(t=>this._isFinished(t,n,e)))),r_(this._interrupted(t,n)),n_(()=>this._destroy(t,n))).subscribe()})}scrollTo(t,e){if(iu(this._platform)){const n=this._getElement(t),i="rtl"===getComputedStyle(n).direction,s=w_(),r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),e),{left:null==e.left?i?e.end:e.start:e.left,right:null==e.right?i?e.start:e.end:e.right});return null!=r.bottom&&(r.top=n.scrollHeight-n.clientHeight-r.bottom),i&&0!==s?(null!=r.left&&(r.right=n.scrollWidth-n.clientWidth-r.left),2===s?r.left=r.right:1===s&&(r.left=r.right?-r.right:r.right)):null!=r.right&&(r.left=n.scrollWidth-n.clientWidth-r.right),this._applyScrollToOptions(n,r)}return Promise.resolve()}scrollToElement(t,e,n){const i=this._getElement(t),s=this._getElement(e,i),r=Object.assign(Object.assign({},n),{left:s.offsetLeft+(n.left||0),top:s.offsetTop+(n.top||0)});return s?this.scrollTo(i,r):Promise.resolve()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Ic),Qt(bC,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(Ic),Qt(bC,8))},token:t,providedIn:"root"}),t})(),CC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();function SC(...t){const e=t.length;if(0===e)throw new Error("list of properties cannot be empty.");return n=>z(function(t,e){return n=>{let i=n;for(let s=0;s<e;s++){const e=i[t[s]];if(void 0===e)return;i=e}return i}}(t,e))(n)}function IC(t,e){if(1&t&&Fo(0,"scrollbar-x"),2&t){const t=Go(2);To("scrollable",t.state.isHorizontallyScrollable)("fit",t.state.verticalUsed)}}function EC(t,e){if(1&t&&Fo(0,"scrollbar-y"),2&t){const t=Go(2);To("scrollable",t.state.isVerticallyScrollable)("fit",t.state.horizontalUsed)}}function xC(t,e){if(1&t&&(Vo(0),Mo(1,IC,1,2,"scrollbar-x",3),Mo(2,EC,1,2,"scrollbar-y",3),Uo()),2&t){const t=Go();ws(1),Ro("ngIf",t.state.horizontalUsed),ws(1),Ro("ngIf",t.state.verticalUsed)}}const PC=["*"];function TC(t){return pv(()=>{t.onselectstart=()=>!1})}function kC(t){return pv(()=>{t.onselectstart=null})}function MC(){return pv(t=>t.stopPropagation())}function DC(t,e){return t.clientX>=e.left&&t.clientX<=e.left+e.width&&t.clientY>=e.top&&t.clientY<=e.top+e.height}let AC=(()=>{class t{constructor(t,e){this.viewPort=t,this.document=e,this.nativeElement=t.nativeElement}get clientHeight(){return this.nativeElement.clientHeight}get clientWidth(){return this.nativeElement.clientWidth}get scrollHeight(){return this.nativeElement.scrollHeight}get scrollWidth(){return this.nativeElement.scrollWidth}get scrollTop(){return this.nativeElement.scrollTop}get scrollLeft(){return this.nativeElement.scrollLeft}get scrollMaxX(){return this.scrollWidth-this.clientWidth}get scrollMaxY(){return this.scrollHeight-this.clientHeight}get contentHeight(){return this.contentWrapperElement.clientHeight}activatePointerEvents(t,e){this.hovered=new b(n=>{const i=e_(this.nativeElement,"mousemove",{passive:!0});G(t?i:i.pipe(MC()),e_(this.nativeElement,"mouseleave").pipe(z(()=>!1))).pipe(pv(t=>n.next(t)),r_(e)).subscribe()}),this.clicked=new b(t=>{const n=e_(this.nativeElement,"mousedown",{passive:!0}).pipe(pv(e=>t.next(e))),i=e_(this.nativeElement,"mouseup",{passive:!0}).pipe(pv(()=>t.next(!1)));n.pipe(gm(()=>i),r_(e)).subscribe()})}setAsWrapper(){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-layer",this.nativeElement.firstElementChild&&(this.nativeElement.firstElementChild.className="ng-scroll-layer")}setAsViewport(t){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-viewport "+t,this.nativeElement.firstElementChild&&(this.contentWrapperElement=this.nativeElement.firstElementChild,this.contentWrapperElement.classList.add("ng-scroll-content"))}scrollYTo(t){this.nativeElement.scrollTop=t}scrollXTo(t){this.nativeElement.scrollLeft=t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollViewport",""]]}),t})();const OC=new Ft("NG_SCROLLBAR_OPTIONS"),RC={viewClass:"",trackClass:"",thumbClass:"",track:"vertical",appearance:"compact",visibility:"native",position:"native",pointerEventsMethod:"viewport",trackClickScrollDuration:300,minThumbSize:20,windowResizeDebounce:0,sensorDebounce:0,scrollAuditTime:0,viewportPropagateMouseMove:!0};let LC=(()=>{class t{constructor(t){this.globalOptions=t?Object.assign(Object.assign({},RC),t):RC,this.rtlScrollAxisType=w_()}}return t.\u0275fac=function(e){return new(e||t)(Qt(OC,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(OC,8))},token:t,providedIn:"root"}),t})(),NC=(()=>{class t{constructor(t,e,n,i,s,r){this.el=t,this.zone=e,this.changeDetectorRef=n,this.dir=i,this.smoothScroll=s,this.manager=r,this._disabled=!1,this._sensorDisabled=this.manager.globalOptions.sensorDisabled,this._pointerEventsDisabled=this.manager.globalOptions.pointerEventsDisabled,this._viewportPropagateMouseMove=this.manager.globalOptions.viewportPropagateMouseMove,this.viewClass=this.manager.globalOptions.viewClass,this.trackClass=this.manager.globalOptions.trackClass,this.thumbClass=this.manager.globalOptions.thumbClass,this.minThumbSize=this.manager.globalOptions.minThumbSize,this.trackClickScrollDuration=this.manager.globalOptions.trackClickScrollDuration,this.pointerEventsMethod=this.manager.globalOptions.pointerEventsMethod,this.track=this.manager.globalOptions.track,this.visibility=this.manager.globalOptions.visibility,this.appearance=this.manager.globalOptions.appearance,this.position=this.manager.globalOptions.position,this.sensorDebounce=this.manager.globalOptions.sensorDebounce,this.scrollAuditTime=this.manager.globalOptions.scrollAuditTime,this.updated=new Yl,this.state={},this.destroyed=new E}get disabled(){return this._disabled}set disabled(t){this._disabled=l_(t)}get sensorDisabled(){return this._sensorDisabled}set sensorDisabled(t){this._sensorDisabled=l_(t)}get pointerEventsDisabled(){return this._pointerEventsDisabled}set pointerEventsDisabled(t){this._pointerEventsDisabled=l_(t)}get viewportPropagateMouseMove(){return this._viewportPropagateMouseMove}set viewportPropagateMouseMove(t){this._viewportPropagateMouseMove=l_(t)}get nativeElement(){return this.el.nativeElement}updateState(){let t=!1,e=!1,n=!1,i=!1;"all"!==this.track&&"vertical"!==this.track||(n=this.viewport.scrollHeight>this.viewport.clientHeight,t="always"===this.visibility||n),"all"!==this.track&&"horizontal"!==this.track||(i=this.viewport.scrollWidth>this.viewport.clientWidth,e="always"===this.visibility||i),this._updateState({position:this.position,track:this.track,appearance:this.appearance,visibility:this.visibility,deactivated:this.disabled,dir:this.dir.value,pointerEventsMethod:this.pointerEventsMethod,verticalUsed:t,horizontalUsed:e,isVerticallyScrollable:n,isHorizontallyScrollable:i})}_updateState(t){this.state=Object.assign(Object.assign({},this.state),t),this.changeDetectorRef.detectChanges()}getScrolledByDirection(t){let e;return this.scrolled.pipe(pv(t=>e=t),SC("target",t),t=>t.lift(new L_),Ig(([t,e])=>t!==e),z(()=>e))}setHovered(t){this.zone.run(()=>this._updateState(Object.assign({},t)))}setDragging(t){this.zone.run(()=>this._updateState(Object.assign({},t)))}setClicked(t){this.zone.run(()=>this._updateState({scrollbarClicked:t}))}ngOnInit(){this.zone.runOutsideAngular(()=>{this.customViewPort?(this.viewport=this.customViewPort,this.defaultViewPort.setAsWrapper()):this.viewport=this.defaultViewPort,this.viewport.setAsViewport(this.viewClass);let t=e_(this.viewport.nativeElement,"scroll",{passive:!0});t=this.scrollAuditTime?t.pipe(O_(this.scrollAuditTime)):t,this.scrolled=new b(e=>t.pipe(r_(this.destroyed)).subscribe(e)),this.verticalScrolled=this.getScrolledByDirection("scrollTop"),this.horizontalScrolled=this.getScrolledByDirection("scrollLeft")})}ngAfterViewChecked(){this.updateState()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}update(){this.state.horizontalUsed||(this.nativeElement.style.height=this.viewport.contentHeight+"px"),this.updated.next(),this.changeDetectorRef.detectChanges()}scrollTo(t){return this.smoothScroll.scrollTo(this.viewport.nativeElement,t)}scrollToElement(t,e){return this.smoothScroll.scrollToElement(this.viewport.nativeElement,t,e)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Uc),Ao(Qr),Ao(p_),Ao(wC),Ao(LC))},t.\u0275cmp=pe({type:t,selectors:[["ng-scrollbar"]],contentQueries:function(t,e,n){var i,s,r;1&t&&(s=n,r=AC,!0,pc(Ze(),Ke(),r,!0,void 0,!0,Xe(),s)),2&t&&lc(i=gc())&&(e.customViewPort=i.first)},viewQuery:function(t,e){var n;1&t&&cc(AC,!0),2&t&&lc(n=gc())&&(e.defaultViewPort=n.first)},hostVars:2,hostBindings:function(t,e){2&t&&aa("ng-scrollbar",!0)},inputs:{viewClass:"viewClass",trackClass:"trackClass",thumbClass:"thumbClass",minThumbSize:"minThumbSize",trackClickScrollDuration:"trackClickScrollDuration",pointerEventsMethod:"pointerEventsMethod",track:"track",visibility:"visibility",appearance:"appearance",position:"position",sensorDebounce:"sensorDebounce",scrollAuditTime:"scrollAuditTime",disabled:"disabled",sensorDisabled:"sensorDisabled",pointerEventsDisabled:"pointerEventsDisabled",viewportPropagateMouseMove:"viewportPropagateMouseMove"},outputs:{updated:"updated"},exportAs:["ngScrollbar"],ngContentSelectors:PC,decls:6,vars:4,consts:[[1,"ng-scrollbar-wrapper",3,"ngAttr"],[1,"ng-scroll-viewport-wrapper",3,"sensorDebounce","sensorDisabled","resizeSensor"],["scrollViewport","","hideNativeScrollbar",""],[4,"ngIf"]],template:function(t,e){1&t&&(Ko(),No(0,"div",0),No(1,"div",1),$o("resizeSensor",(function(){return e.update()})),No(2,"div",2),No(3,"div"),Zo(4),zo(),zo(),zo(),Mo(5,xC,3,2,"ng-container",3),zo()),2&t&&(Ro("ngAttr",e.state),ws(1),Ro("sensorDebounce",e.sensorDebounce)("sensorDisabled",e.sensorDisabled),ws(4),Ro("ngIf",!e.disabled))},directives:function(){return[VC,jC,AC,FC,Zh,ZC,KC]},styles:[".ng-scrollbar-measure{-ms-overflow-style:none;left:0;overflow:scroll;position:fixed;scrollbar-width:none;top:-9999px} .ng-scrollbar-measure::-webkit-scrollbar{display:none}[_nghost-%COMP%]{--scrollbar-border-radius:7px;--scrollbar-hover-size:var(--scrollbar-size);--scrollbar-padding:4px;--scrollbar-size:5px;--scrollbar-thumb-color:rgba(0,0,0,0.2);--scrollbar-thumb-hover-color:var(--scrollbar-thumb-color);--scrollbar-thumb-transition:height ease-out 150ms,width ease-out 150ms;--scrollbar-track-color:transparent;--scrollbar-track-transition:height ease-out 150ms,width ease-out 150ms;display:block;height:100%;max-height:100%;max-width:100%;position:relative}[_nghost-%COMP%] > .ng-scrollbar-wrapper[_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);--scrollbar-total-size:calc(var(--scrollbar-size) + var(--scrollbar-padding)*2);--vertical-scrollbar-size:var(--scrollbar-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalHovered=true][_ngcontent-%COMP%]{--vertical-scrollbar-size:var(--scrollbar-hover-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalHovered=true][_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-hover-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:var(--scrollbar-total-size);top:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-bottom:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:0;top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport::-webkit-scrollbar, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{bottom:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:0;right:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:var(--native-scrollbar-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%] > .scrollbar-control[_ngcontent-%COMP%]{opacity:0;transition-delay:.8s;transition-duration:.4s;transition-property:opacity}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:active > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:focus > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:hover > .scrollbar-control[_ngcontent-%COMP%]{opacity:1;transition-delay:0ms;transition-duration:.4s}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow:auto}.ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{overflow:hidden}.ng-scroll-viewport[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;contain:strict;will-change:scroll-position} .ng-scroll-content{display:inline-block;min-width:100%;position:relative!important}.ng-scroll-layer[_ngcontent-%COMP%], .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], .ng-scrollbar-wrapper[_ngcontent-%COMP%], .ng-scroll-viewport{bottom:0;left:0;position:absolute;right:0;top:0}",".ng-scrollbar-wrapper[pointerEventsMethod=viewport]>.scrollbar-control{pointer-events:none} .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none} .ng-scrollbar-wrapper>.scrollbar-control{align-items:center;display:flex;justify-content:center;position:absolute;transition:var(--scrollbar-track-transition)} .ng-scrollbar-wrapper>.scrollbar-control[scrollable=false] .ng-scrollbar-thumb{display:none} .ng-scrollbar-track{background-color:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);cursor:default;height:100%;overflow:hidden;transition:var(--scrollbar-track-transition);width:100%;z-index:1} .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:inherit;box-sizing:border-box;position:relative;transform:translateZ(0);transition:var(--scrollbar-thumb-transition)}"],changeDetection:0}),t})(),zC=(()=>{class t{constructor(t,e,n){this.document=t,this.manager=e,this.platform=n,this._scrollbarSize=new bg(this.getNativeScrollbarSize()),this.scrollbarSize=this._scrollbarSize.asObservable(),n.isBrowser&&e_(this.document.defaultView,"resize",{passive:!0}).pipe(cC(this.manager.globalOptions.windowResizeDebounce),z(()=>this.getNativeScrollbarSize()),E_(),pv(t=>this._scrollbarSize.next(t))).subscribe()}getNativeScrollbarSize(){if(!this.platform.isBrowser)return 0;if(this.platform.IOS)return 6;const t=this.document.createElement("div");t.className="ng-scrollbar-measure",this.document.body.appendChild(t);const e=t.getBoundingClientRect().right;return this.document.body.removeChild(t),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(LC),Qt(v_))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(LC),Qt(v_))},token:t,providedIn:"root"}),t})(),FC=(()=>{class t{constructor(t,e,n){this.renderer=e,this.hideNativeScrollbar=n,this._subscriber=u.EMPTY,this._subscriber=n.scrollbarSize.subscribe(e=>{this.renderer.setStyle(t.nativeElement,"--native-scrollbar-size",`-${e}px`,Za.DashCase)})}ngOnDestroy(){this._subscriber.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(zC))},t.\u0275dir=ye({type:t,selectors:[["","hideNativeScrollbar",""]]}),t})(),VC=(()=>{class t{constructor(t){this.el=t}set ngAttr(t){for(const[e,n]of Object.entries(t))this.el.nativeElement.setAttribute(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","ngAttr",""]],inputs:{ngAttr:"ngAttr"}}),t})(),UC=(()=>{class t{constructor(t,e){if(this.resizeObserverSource=new bg(null),this.resizeObserverLoader=this.resizeObserverSource.asObservable(),e.isBrowser){const e=t.defaultView.ResizeObserver?gg(t.defaultView.ResizeObserver):j(n.e(5).then(n.bind(null,"HR/i"))).pipe(z(t=>t.ResizeObserver),iv(t=>(console.log("Unable to load ResizeObserver polyfill",t),dg)));this.resizeObserverSource.next(e)}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(v_))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(v_))},token:t,providedIn:"root"}),t})(),jC=(()=>{class t{constructor(t,e,n,i){if(this.zone=t,this.platform=e,this.resizeObserverFactory=n,this.scrollbar=i,this._disabled=!1,this._subscription=null,this.resizeSensor=new Yl,!i)throw new Error("[NgScrollbar Resize Sensor Directive]: Host element must be an NgScrollbar component.")}get debounce(){return this._debounce}set debounce(t){this._debounce=c_(t),this._subscribe()}get disabled(){return this._disabled}set disabled(t){this._disabled=l_(t),this._disabled?this._unsubscribe():this._subscribe()}ngAfterContentInit(){this._subscription||this._disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_createObserver(t){return new b(e=>{this._resizeObserver=new t(()=>e.next()),this._resizeObserver.observe(this.scrollbar.viewport.nativeElement),this.scrollbar.viewport.contentWrapperElement&&this._resizeObserver.observe(this.scrollbar.viewport.contentWrapperElement)})}_subscribe(){this._unsubscribe(),this.platform.isBrowser&&this.zone.runOutsideAngular(()=>{this._subscription=this.resizeObserverFactory.resizeObserverLoader.pipe(gm(t=>t),gm(t=>{if(t){const e=this._createObserver(t);return this.debounce?e.pipe(cC(this._debounce)):e}return dg})).subscribe(()=>this.resizeSensor.emit())})}_unsubscribe(){this._resizeObserver&&this._resizeObserver.disconnect(),this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Uc),Ao(v_),Ao(UC),Ao(NC))},t.\u0275dir=ye({type:t,selectors:[["","resizeSensor",""]],inputs:{debounce:["sensorDebounce","debounce"],disabled:["sensorDisabled","disabled"]},outputs:{resizeSensor:"resizeSensor"}}),t})(),BC=(()=>{class t{constructor(t,e,n){this.cmp=t,this.trackElement=e,this.document=n}get clicked(){return G(e_(this.trackElement,"mousedown",{passive:!0}).pipe(MC(),TC(this.document)),e_(this.document,"mouseup",{passive:!0}).pipe(MC(),kC(this.document),gm(()=>dg)))}get hovered(){return G(e_(this.trackElement,"mouseenter",{passive:!0}).pipe(MC(),z(()=>!0)),e_(this.trackElement,"mouseleave",{passive:!0}).pipe(MC(),z(()=>!1)))}get clientRect(){return this.trackElement.getBoundingClientRect()}onTrackClicked(t,e,n){return gg(t).pipe(SC(this.pageProperty),z(t=>(t-this.offset-e/2)/this.size*n),pv(t=>{this.cmp.scrollTo(Object.assign(Object.assign({},this.mapToScrollToOption(t)),{duration:c_(this.cmp.trackClickScrollDuration)}))}))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(HTMLElement),Ao(void 0))},t.\u0275dir=ye({type:t}),t})(),HC=(()=>{class t{constructor(t,e,n){this.cmp=t,this.thumbElement=e,this.document=n,this._dragging=new E,this.dragging=this._dragging.pipe(E_())}get trackMax(){return this.track.size-this.size}get clientRect(){return this.thumbElement.getBoundingClientRect()}get clicked(){return e_(this.thumbElement,"mousedown",{passive:!0}).pipe(MC())}update(){const t=(e=this.track.size,Math.max(~~(e/this.viewportScrollSize*e),this.cmp.minThumbSize));var e;const n=this.viewportScrollOffset*this.trackMax/this.viewportScrollMax;I_.schedule(()=>this.updateStyles(this.handleDirection(n,this.trackMax),t))}dragged(t){let e,n;const i=gg(t).pipe(TC(this.document),pv(()=>{e=this.trackMax,n=this.viewportScrollMax,this.setDragging(!0)})),s=e_(this.document,"mousemove",{capture:!0,passive:!0}).pipe(MC()),r=e_(this.document,"mouseup",{capture:!0}).pipe(MC(),kC(this.document),pv(()=>this.setDragging(!1)));return i.pipe(SC(this.pageProperty),z(t=>t-this.dragStartOffset),B(t=>s.pipe(SC(this.clientProperty),z(t=>t-this.track.offset),z(i=>n*(i-t)/e),z(t=>this.handleDrag(t,n)),pv(t=>this.scrollTo(t)),r_(r))))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(HTMLElement),Ao(void 0))},t.\u0275dir=ye({type:t,inputs:{track:"track"},outputs:{dragging:"dragging"}}),t})(),$C=(()=>{class t extends HC{constructor(t,e,n,i){super(t,e.nativeElement,n),this.cmp=t,this.element=e,this.document=n,this.dir=i}get clientProperty(){return"clientX"}get pageProperty(){return"pageX"}get viewportScrollSize(){return this.cmp.viewport.scrollWidth}get viewportScrollOffset(){return this.cmp.viewport.scrollLeft}get viewportScrollMax(){return this.cmp.viewport.scrollMaxX}get dragStartOffset(){return this.clientRect.left}get size(){return this.thumbElement.clientWidth}updateStyles(t,e){this.thumbElement.style.width=e+"px",this.thumbElement.style.transform=`translate3d(${t}px, 0, 0)`}handleDrag(t,e){if("rtl"===this.dir.value){if(1===this.cmp.manager.rtlScrollAxisType)return t-e;if(2===this.cmp.manager.rtlScrollAxisType)return e-t}return t}handleDirection(t,e){if("rtl"===this.dir.value){if(2===this.cmp.manager.rtlScrollAxisType)return-t;if(0===this.cmp.manager.rtlScrollAxisType)return t-e}return t}setDragging(t){this.cmp.setDragging({horizontalDragging:t})}scrollTo(t){this.cmp.viewport.scrollXTo(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih),Ao(p_))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarThumbX",""]],features:[Pa]}),t})(),WC=(()=>{class t extends HC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.element=e,this.document=n}get pageProperty(){return"pageY"}get viewportScrollSize(){return this.cmp.viewport.scrollHeight}get viewportScrollOffset(){return this.cmp.viewport.scrollTop}get viewportScrollMax(){return this.cmp.viewport.scrollMaxY}get clientProperty(){return"clientY"}get dragStartOffset(){return this.clientRect.top}get size(){return this.thumbElement.clientHeight}updateStyles(t,e){this.thumbElement.style.height=e+"px",this.thumbElement.style.transform=`translate3d(0px, ${t}px, 0)`}handleDrag(t){return t}handleDirection(t){return t}setDragging(t){this.cmp.setDragging({verticalDragging:t})}scrollTo(t){this.cmp.viewport.scrollYTo(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarThumbY",""]],features:[Pa]}),t})(),qC=(()=>{class t extends BC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.document=n}get pageProperty(){return"pageX"}get offset(){return this.clientRect.left}get size(){return this.trackElement.clientWidth}mapToScrollToOption(t){return{left:t}}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarTrackX",""]],features:[Pa]}),t})(),GC=(()=>{class t extends BC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.document=n}get pageProperty(){return"pageY"}get offset(){return this.clientRect.top}get size(){return this.trackElement.clientHeight}mapToScrollToOption(t){return{top:t}}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarTrackY",""]],features:[Pa]}),t})(),QC=(()=>{class t{constructor(t,e,n,i){this.cmp=t,this.platform=e,this.document=n,this.zone=i,this.destroyed=new E}activatePointerEvents(){let t=dg,e=dg,n=dg;return"viewport"===this.cmp.pointerEventsMethod?(this.viewportTrackClicked=new E,this.viewportThumbClicked=new E,this.cmp.viewport.activatePointerEvents(this.cmp.viewportPropagateMouseMove,this.destroyed),t=this.viewportThumbClicked,e=this.viewportTrackClicked,n=this.cmp.viewport.hovered.pipe(z(t=>DC(t,this.track.clientRect)),E_(),pv(t=>this.document.onselectstart=t?()=>!1:null)),this.cmp.viewport.clicked.pipe(pv(t=>{t?DC(t,this.thumb.clientRect)?this.viewportThumbClicked.next(t):DC(t,this.track.clientRect)&&(this.cmp.setClicked(!0),this.viewportTrackClicked.next(t)):this.cmp.setClicked(!1)}),r_(this.destroyed)).subscribe()):(t=this.thumb.clicked,e=this.track.clicked,n=this.track.hovered),G(n.pipe(pv(t=>this.setHovered(t))),t.pipe(gm(t=>this.thumb.dragged(t))),e.pipe(gm(t=>this.track.onTrackClicked(t,this.thumb.size,this.viewportScrollSize))))}ngOnInit(){this.zone.runOutsideAngular(()=>{this.platform.IOS||this.platform.ANDROID||this.cmp.pointerEventsDisabled||this.activatePointerEvents().pipe(r_(this.destroyed)).subscribe();const t=this.cmp.updated.pipe(pv(()=>this.onUpdated()));G(this.cmp.scrolled,t).pipe(pv(()=>this.thumb.update()),r_(this.destroyed)).subscribe(),T_.schedule(()=>this.thumb.update(),100)})}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete(),this.viewportThumbClicked&&this.viewportTrackClicked&&(this.viewportTrackClicked.complete(),this.viewportThumbClicked.complete())}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(v_),Ao(void 0),Ao(Uc))},t.\u0275dir=ye({type:t}),t})(),KC=(()=>{class t extends QC{constructor(t,e,n,i){super(t,e,n,i),this.cmp=t,this.platform=e,this.document=n,this.zone=i}get viewportScrollSize(){return this.cmp.viewport.scrollHeight}setHovered(t){this.cmp.setHovered({verticalHovered:t})}onUpdated(){}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(v_),Ao(Ih),Ao(Uc))},t.\u0275cmp=pe({type:t,selectors:[["scrollbar-y"]],viewQuery:function(t,e){var n;1&t&&(cc(GC,!0),cc(WC,!0)),2&t&&(lc(n=gc())&&(e.track=n.first),lc(n=gc())&&(e.thumb=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&aa("scrollbar-control",!0)},features:[Pa],decls:2,vars:7,consts:[["scrollbarTrackY",""],["scrollbarThumbY","",3,"track"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"div",1),zo()),2&t&&(Ia("ng-scrollbar-track ",e.cmp.trackClass,""),ws(1),Ia("ng-scrollbar-thumb ",e.cmp.thumbClass,""),Ro("track",e.track))},directives:[GC,WC],styles:[".ng-scrollbar-wrapper>scrollbar-y.scrollbar-control{width:var(--vertical-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track{height:calc(100% - var(--scrollbar-padding)*2);width:var(--vertical-scrollbar-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:0;width:100%} .ng-scrollbar-wrapper[verticalDragging=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[verticalHovered=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-y.scrollbar-control{bottom:0;top:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertY]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl]>scrollbar-y.scrollbar-control{left:0;right:unset} .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertY]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][track=all]>scrollbar-y.scrollbar-control[fit=true]{bottom:var(--scrollbar-total-size);top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertAll]>scrollbar-y.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertX]>scrollbar-y.scrollbar-control[fit=true]{bottom:0;top:var(--scrollbar-total-size)}"],changeDetection:0}),t})(),ZC=(()=>{class t extends QC{constructor(t,e,n,i,s){super(e,n,i,s),this.el=t,this.cmp=e,this.platform=n,this.document=i,this.zone=s}get viewportScrollSize(){return this.cmp.viewport.scrollWidth}get thickness(){return this.el.nativeElement.clientHeight}setHovered(t){this.cmp.setHovered({horizontalHovered:t})}onUpdated(){this.cmp.nativeElement.style.height="standard"===this.cmp.appearance?this.cmp.viewport.contentHeight+this.thickness+"px":this.cmp.viewport.contentHeight+"px"}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(NC),Ao(v_),Ao(Ih),Ao(Uc))},t.\u0275cmp=pe({type:t,selectors:[["scrollbar-x"]],viewQuery:function(t,e){var n;1&t&&(cc(qC,!0),cc($C,!0)),2&t&&(lc(n=gc())&&(e.track=n.first),lc(n=gc())&&(e.thumb=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&aa("scrollbar-control",!0)},features:[Pa],decls:2,vars:7,consts:[["scrollbarTrackX",""],["scrollbarThumbX","",3,"track"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"div",1),zo()),2&t&&(Ia("ng-scrollbar-track ",e.cmp.trackClass,""),ws(1),Ia("ng-scrollbar-thumb ",e.cmp.thumbClass,""),Ro("track",e.track))},directives:[qC,$C],styles:[".ng-scrollbar-wrapper>scrollbar-x.scrollbar-control{height:var(--horizontal-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track{height:var(--horizontal-scrollbar-size);width:calc(100% - var(--scrollbar-padding)*2)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:100%;width:0} .ng-scrollbar-wrapper[horizontalDragging=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[horizontalHovered=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-x.scrollbar-control{bottom:0;left:0;right:0;top:unset} .ng-scrollbar-wrapper[deactivated=false][position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertY]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl]>scrollbar-x.scrollbar-control[fit=true]{left:var(--scrollbar-total-size);right:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertY]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)}"],changeDetection:0}),t})(),YC=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:OC,useValue:e}]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[nu,g_,pC,y_,CC]]}),t})();class XC{static reachedTop(t,e){return XC.reached(-e.target.scrollTop,0,t)}static reachedBottom(t,e){return XC.reached(e.target.scrollTop+e.target.clientHeight,e.target.scrollHeight,t)}static reachedStart(t,e,n,i){return"rtl"===n?1===i?XC.reached(e.target.scrollLeft,0,t):2===i?XC.reached(-e.target.scrollLeft,0,t):XC.reached(e.target.scrollLeft+e.target.clientWidth,e.target.scrollWidth,t):XC.reached(-e.target.scrollLeft,0,t)}static reachedEnd(t,e,n,i){return"rtl"===n?1===i?XC.reached(-(e.target.scrollLeft-e.target.clientWidth),e.target.scrollWidth,t):2===i?XC.reached(-(e.target.scrollLeft+e.target.clientWidth),e.target.scrollWidth,t):XC.reached(-e.target.scrollLeft,0,t):XC.reached(e.target.scrollLeft+e.target.clientWidth,e.target.scrollWidth,t)}static reached(t,e,n){return t>=e-n}}let JC=(()=>{class t{constructor(t,e){this.scrollbar=t,this.zone=e,this.offset=0,this.scrollEvent=new E,this.subscription=u.EMPTY,this.reachedEvent=new b(t=>this.scrollReached().subscribe(e=>Promise.resolve().then(()=>this.zone.run(()=>t.next(e))))),t||console.warn("[NgScrollbarReached Directive]: Host element must be an NgScrollbar component.")}ngOnDestroy(){this.subscription.unsubscribe()}scrollReached(){let t;return this.scrollEvent.pipe(pv(e=>t=e),z(t=>this.reached(this.offset,t)),E_(),Ig(t=>t),z(()=>t))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,inputs:{offset:["reachedOffset","offset"]}}),t})(),tS=(()=>{class t extends JC{constructor(t,e){super(t,e),this.scrollbar=t,this.zone=e}ngOnInit(){this.subscription=this.scrollbar.verticalScrolled.subscribe(this.scrollEvent)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,features:[Pa]}),t})(),eS=(()=>{class t extends tS{constructor(t,e){super(t,e),this.scrollbar=t,this.zone=e,this.reachedBottom=this.reachedEvent}ngOnInit(){super.ngOnInit()}reached(t,e){return XC.reachedBottom(t,e)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,selectors:[["","reachedBottom",""],["","reached-bottom",""]],outputs:{reachedBottom:"reachedBottom"},features:[Pa]}),t})(),nS=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[YC,g_]]}),t})();const iS=["wrapper"],sS=["sourceImage"];function rS(t,e){if(1&t){const t=jo();No(0,"img",4,5),$o("load",(function(){return Ye(t),Go().imageLoadedInView()})),zo()}if(2&t){const t=Go();oa("visibility",t.imageVisible?"visible":"hidden")("transform",t.safeTransformStyle),Ro("src",t.safeImgDataUrl,Ji)}}function oS(t,e){if(1&t){const t=jo();Vo(0),No(1,"span",9),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topleft")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topleft")})),Fo(2,"span",10),zo(),No(3,"span",11),Fo(4,"span",10),zo(),No(5,"span",12),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topright")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topright")})),Fo(6,"span",10),zo(),No(7,"span",13),Fo(8,"span",10),zo(),No(9,"span",14),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomright")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomright")})),Fo(10,"span",10),zo(),No(11,"span",15),Fo(12,"span",10),zo(),No(13,"span",16),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomleft")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomleft")})),Fo(14,"span",10),zo(),No(15,"span",17),Fo(16,"span",10),zo(),No(17,"span",18),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"top")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"top")})),zo(),No(18,"span",19),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"right")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"right")})),zo(),No(19,"span",20),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottom")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottom")})),zo(),No(20,"span",21),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"left")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"left")})),zo(),Uo()}}function aS(t,e){if(1&t){const t=jo();No(0,"div",6),$o("keydown",(function(e){return Ye(t),Go().keyboardAccess(e)})),No(1,"div",7),$o("mousedown",(function(e){Ye(t);const n=Go();return n.startMove(e,n.moveTypes.Move)}))("touchstart",(function(e){Ye(t);const n=Go();return n.startMove(e,n.moveTypes.Move)})),zo(),Mo(2,oS,21,0,"ng-container",8),zo()}if(2&t){const t=Go();oa("top",t.cropper.y1,"px")("left",t.cropper.x1,"px")("width",t.cropper.x2-t.cropper.x1,"px")("height",t.cropper.y2-t.cropper.y1,"px")("margin-left","center"===t.alignImage?t.marginLeft:null)("visibility",t.imageVisible?"visible":"hidden"),aa("rounded",t.roundCropper),ws(2),Ro("ngIf",!t.hideResizeSquares)}}const lS={Move:"move",Resize:"resize",Pinch:"pinch"};let cS=(()=>{class t{constructor(t,e){this.sanitizer=t,this.cd=e,this.Hammer="undefined"!=typeof window?window.Hammer:null,this.setImageMaxSizeRetries=0,this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.exifTransform={rotate:0,flip:!1},this.autoRotateSupported=new Promise(t=>{const e=new Image;e.onload=()=>{t(1===e.width&&2===e.height)},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="}),this.stepSize=3,this.marginLeft="0px",this.imageVisible=!1,this.moveTypes=lS,this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage="center",this.disabled=!1,this.imageCropped=new Yl,this.startCropImage=new Yl,this.imageLoaded=new Yl,this.cropperReady=new Yl,this.loadImageFailed=new Yl,this.initCropper()}ngOnChanges(t){this.cropperStaticHeight&&this.cropperStaticWidth&&(this.hideResizeSquares=!0,this.cropperMinWidth=this.cropperStaticWidth,this.cropperMinHeight=this.cropperStaticHeight,this.maintainAspectRatio=!1),this.onChangesInputImage(t),this.originalImage&&this.originalImage.complete&&this.exifTransform&&(t.containWithinAspectRatio||t.canvasRotation)&&this.transformOriginalImage(),t.cropper&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.checkCropperPosition(!1),this.doAutoCrop(),this.cd.markForCheck()),t.aspectRatio&&this.imageVisible&&this.resetCropperPosition(),t.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop())}onChangesInputImage(t){(t.imageChangedEvent||t.imageURL||t.imageBase64||t.imageFile)&&this.initCropper(),t.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),t.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),t.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),t.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){return this.imageChangedEvent&&this.imageChangedEvent.target&&this.imageChangedEvent.target.files&&this.imageChangedEvent.target.files.length>0}setCssTransform(){this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("scaleX("+(this.transform.scale||1)*(this.transform.flipH?-1:1)+")scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+")rotate("+(this.transform.rotate||0)+"deg)")}ngOnInit(){this.stepSize=this.initialStepSize,this.activatePinchGesture()}initCropper(){this.imageVisible=!1,this.transformedImage=null,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.originalSize={width:0,height:0},this.transformedSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}loadImage(t,e){this.isValidImageType(e)?this.loadBase64Image(t):this.loadImageFailed.emit()}loadImageFile(t){const e=new FileReader;e.onload=e=>this.loadImage(e.target.result,t.type),e.readAsDataURL(t)}isValidImageType(t){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(t)}loadBase64Image(t){this.autoRotateSupported.then(e=>this.checkExifAndLoadBase64Image(t,e)).then(()=>this.transformOriginalImage()).catch(t=>{this.loadImageFailed.emit(),this.originalImage=null,this.originalBase64=null,console.error(t)})}checkExifAndLoadBase64Image(t,e){return new Promise((n,i)=>{this.originalImage=new Image,this.originalImage.onload=()=>{this.originalBase64=t,this.exifTransform=function(t){switch("string"==typeof t&&(t=function(t){const e=new DataView(function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");const e=atob(t),n=e.length,i=new Uint8Array(n);for(let s=0;s<n;s++)i[s]=e.charCodeAt(s);return i.buffer}(t));if(65496!=e.getUint16(0,!1))return-2;const n=e.byteLength;let i=2;for(;i<n;){if(e.getUint16(i+2,!1)<=8)return-1;const t=e.getUint16(i,!1);if(i+=2,65505==t){if(1165519206!=e.getUint32(i+=2,!1))return-1;const t=18761==e.getUint16(i+=6,!1);i+=e.getUint32(i+4,t);const n=e.getUint16(i,t);i+=2;for(let s=0;s<n;s++)if(274==e.getUint16(i+12*s,t))return e.getUint16(i+12*s+8,t)}else{if(65280!=(65280&t))break;i+=e.getUint16(i,!1)}}return-1}(t)),t){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}(e?-1:t),this.originalSize.width=this.originalImage.naturalWidth,this.originalSize.height=this.originalImage.naturalHeight,n()},this.originalImage.onerror=i,this.originalImage.src=t})}loadImageFromURL(t){const e=new Image;e.onerror=()=>this.loadImageFailed.emit(),e.onload=()=>{const t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.width,t.height=e.height,n.drawImage(e,0,0),this.loadBase64Image(t.toDataURL())},e.crossOrigin="anonymous",e.src=t}transformOriginalImage(){if(!this.originalImage||!this.originalImage.complete||!this.exifTransform)return Promise.reject(new Error("No image loaded"));const t=this.transformImageBase64();return this.setTransformedImage(t)}transformImageBase64(){const t=this.canvasRotation+this.exifTransform.rotate;if(0===t&&!this.exifTransform.flip&&!this.containWithinAspectRatio)return this.originalBase64;const e=this.getTransformedSize(),n=document.createElement("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");return i.setTransform(this.exifTransform.flip?-1:1,0,0,1,n.width/2,n.height/2),i.rotate(Math.PI*(t/2)),i.drawImage(this.originalImage,-this.originalSize.width/2,-this.originalSize.height/2),n.toDataURL()}getTransformedSize(){const t=this.canvasRotation+this.exifTransform.rotate;if(this.containWithinAspectRatio){if(t%2){const t=this.originalSize.height/this.aspectRatio;return{width:Math.max(this.originalSize.height,this.originalSize.width*this.aspectRatio),height:Math.max(this.originalSize.width,t)}}{const t=this.originalSize.width/this.aspectRatio;return{width:Math.max(this.originalSize.width,this.originalSize.height*this.aspectRatio),height:Math.max(this.originalSize.height,t)}}}return t%2?{height:this.originalSize.width,width:this.originalSize.height}:{width:this.originalSize.width,height:this.originalSize.height}}setTransformedImage(t){return new Promise(e=>{this.transformedBase64=t,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(t),this.transformedImage=new Image,this.transformedImage.onload=()=>{this.transformedSize.width=this.transformedImage.naturalWidth,this.transformedSize.height=this.transformedImage.naturalHeight,this.cd.markForCheck(),e()},this.transformedImage.src=this.transformedBase64})}imageLoadedInView(){null!=this.transformedImage&&(this.imageLoaded.emit(),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.resetCropperPosition(),this.cropperReady.emit(Object.assign({},this.maxSize)),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){return this.sourceImage&&this.sourceImage.nativeElement&&this.sourceImage.nativeElement.offsetWidth>0}onResize(){this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize()}activatePinchGesture(){if(this.Hammer){const t=new this.Hammer(this.wrapper.nativeElement);t.get("pinch").set({enable:!0}),t.on("pinchmove",this.onPinch.bind(this)),t.on("pinchend",this.pinchStop.bind(this)),t.on("pinchstart",this.startPinch.bind(this))}else Ii()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}resizeCropperPosition(){const t=this.sourceImage.nativeElement;this.maxSize.width===t.offsetWidth&&this.maxSize.height===t.offsetHeight||(this.cropper.x1=this.cropper.x1*t.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*t.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*t.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*t.offsetHeight/this.maxSize.height)}resetCropperPosition(){const t=this.sourceImage.nativeElement;if(this.cropperStaticHeight&&this.cropperStaticWidth)this.cropper.x1=0,this.cropper.x2=t.offsetWidth>this.cropperStaticWidth?this.cropperStaticWidth:t.offsetWidth,this.cropper.y1=0,this.cropper.y2=t.offsetHeight>this.cropperStaticHeight?this.cropperStaticHeight:t.offsetHeight;else if(this.maintainAspectRatio)if(t.offsetWidth/this.aspectRatio<t.offsetHeight){this.cropper.x1=0,this.cropper.x2=t.offsetWidth;const e=t.offsetWidth/this.aspectRatio;this.cropper.y1=(t.offsetHeight-e)/2,this.cropper.y2=this.cropper.y1+e}else{this.cropper.y1=0,this.cropper.y2=t.offsetHeight;const e=t.offsetHeight*this.aspectRatio;this.cropper.x1=(t.offsetWidth-e)/2,this.cropper.x2=this.cropper.x1+e}else this.cropper.x1=0,this.cropper.x2=t.offsetWidth,this.cropper.y1=0,this.cropper.y2=t.offsetHeight;this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(t){this.changeKeyboardStepSize(t),this.keyboardMoveCropper(t)}changeKeyboardStepSize(t){t.key>="1"&&t.key<="9"&&(this.stepSize=+t.key)}keyboardMoveCropper(t){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(t.key))return;const e=t.shiftKey?lS.Resize:lS.Move,n=t.altKey?this.getInvertedPositionForKey(t.key):this.getPositionForKey(t.key),i=this.getEventForKey(t.key,this.stepSize);t.preventDefault(),t.stopPropagation(),this.startMove({clientX:0,clientY:0},e,n),this.moveImg(i),this.moveStop()}getPositionForKey(t){switch(t){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}getInvertedPositionForKey(t){switch(t){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}getEventForKey(t,e){switch(t){case"ArrowUp":return{clientX:0,clientY:-1*e};case"ArrowRight":return{clientX:e,clientY:0};case"ArrowDown":return{clientX:0,clientY:e};case"ArrowLeft":default:return{clientX:-1*e,clientY:0}}}startMove(t,e,n=null){this.moveStart&&this.moveStart.active&&this.moveStart.type===lS.Pinch||(t.preventDefault&&t.preventDefault(),this.moveStart=Object.assign({active:!0,type:e,position:n,clientX:this.getClientX(t),clientY:this.getClientY(t)},this.cropper))}startPinch(t){this.safeImgDataUrl&&(t.preventDefault&&t.preventDefault(),this.moveStart=Object.assign({active:!0,type:lS.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2},this.cropper))}moveImg(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===lS.Move?(this.move(t),this.checkCropperPosition(!0)):this.moveStart.type===lS.Resize&&(this.cropperStaticWidth||this.cropperStaticHeight||this.resize(t),this.checkCropperPosition(!1)),this.cd.detectChanges())}onPinch(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===lS.Pinch&&(this.resize(t),this.checkCropperPosition(!1)),this.cd.detectChanges())}setMaxSize(){if(this.sourceImage){const t=this.sourceImage.nativeElement;this.maxSize.width=t.offsetWidth,this.maxSize.height=t.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){this.transformedImage?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.transformedImage.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.transformedImage.height*this.maxSize.height):20}checkCropperPosition(t=!1){this.cropper.x1<0&&(this.cropper.x2-=t?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=t?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=t?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=t?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}moveStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}move(t){const e=this.getClientX(t)-this.moveStart.clientX,n=this.getClientY(t)-this.moveStart.clientY;this.cropper.x1=this.moveStart.x1+e,this.cropper.y1=this.moveStart.y1+n,this.cropper.x2=this.moveStart.x2+e,this.cropper.y2=this.moveStart.y2+n}resize(t){const e=this.getClientX(t)-this.moveStart.clientX,n=this.getClientY(t)-this.moveStart.clientY;switch(this.moveStart.position){case"left":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth);break;case"topleft":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"top":this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"topright":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"right":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth);break;case"bottomright":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottom":this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottomleft":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"center":const i=t.scale,s=Math.abs(this.moveStart.x2-this.moveStart.x1)*i,r=Math.abs(this.moveStart.y2-this.moveStart.y1)*i,o=this.cropper.x1,a=this.cropper.y1;this.cropper.x1=Math.min(this.moveStart.clientX-s/2,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.clientY-r/2,this.cropper.y2-this.cropperScaledMinHeight),this.cropper.x2=Math.max(this.moveStart.clientX+s/2,o+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.clientY+r/2,a+this.cropperScaledMinHeight)}this.maintainAspectRatio&&this.checkAspectRatio()}checkAspectRatio(){let t=0,e=0;switch(this.moveStart.position){case"top":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"bottom":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"topleft":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(0-this.cropper.x1,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x1+=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"topright":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"right":case"bottomright":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"left":case"bottomleft":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(0-this.cropper.x1,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x1+=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"center":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio;const n=Math.max(0-this.cropper.x1,0),i=Math.max(this.cropper.x2-this.maxSize.width,0),s=Math.max(this.cropper.y2-this.maxSize.height,0),r=Math.max(0-this.cropper.y1,0);(n>0||i>0||s>0||r>0)&&(this.cropper.x1+=s*this.aspectRatio>n?s*this.aspectRatio:n,this.cropper.x2-=r*this.aspectRatio>i?r*this.aspectRatio:i,this.cropper.y1+=r*this.aspectRatio>i?r:i/this.aspectRatio,this.cropper.y2-=s*this.aspectRatio>n?s:n/this.aspectRatio)}}doAutoCrop(){this.autoCrop&&this.crop()}crop(){if(this.sourceImage&&this.sourceImage.nativeElement&&null!=this.transformedImage){this.startCropImage.emit();const t=this.getImagePosition(),e=t.x2-t.x1,n=t.y2-t.y1,i=document.createElement("canvas");i.width=e,i.height=n;const s=i.getContext("2d");if(s){null!=this.backgroundColor&&(s.fillStyle=this.backgroundColor,s.fillRect(0,0,e,n));const r=(this.transform.scale||1)*(this.transform.flipH?-1:1),o=(this.transform.scale||1)*(this.transform.flipV?-1:1);s.setTransform(r,0,0,o,this.transformedSize.width/2,this.transformedSize.height/2),s.translate(-t.x1/r,-t.y1/o),s.rotate((this.transform.rotate||0)*Math.PI/180),s.drawImage(this.transformedImage,-this.transformedSize.width/2,-this.transformedSize.height/2);const a={width:e,height:n,imagePosition:t,cropperPosition:Object.assign({},this.cropper)};this.containWithinAspectRatio&&(a.offsetImagePosition=this.getOffsetImagePosition());const l=this.getResizeRatio(e,n);return 1!==l&&(a.width=Math.round(e*l),a.height=this.maintainAspectRatio?Math.round(a.width/this.aspectRatio):Math.round(n*l),function(t,e,n){const i=t.width,s=t.height,r=i/(e=Math.round(e)),o=s/(n=Math.round(n)),a=Math.ceil(r/2),l=Math.ceil(o/2),c=t.getContext("2d");if(c){const h=c.getImageData(0,0,i,s),u=c.createImageData(e,n),d=h.data,p=u.data;for(let t=0;t<n;t++)for(let n=0;n<e;n++){const c=4*(n+t*e),h=t*o;let u=0,g=0,m=0,f=0,_=0,v=0,y=0;const b=Math.floor(n*r),w=Math.floor(t*o);let C=Math.ceil((n+1)*r),S=Math.ceil((t+1)*o);C=Math.min(C,i),S=Math.min(S,s);for(let t=w;t<S;t++){const e=Math.abs(h-t)/l,s=n*r,o=e*e;for(let n=b;n<C;n++){const e=Math.abs(s-n)/a,r=Math.sqrt(o+e*e);if(r>=1)continue;u=2*r*r*r-3*r*r+1;const l=4*(n+t*i);y+=u*d[l+3],m+=u,d[l+3]<255&&(u=u*d[l+3]/250),f+=u*d[l],_+=u*d[l+1],v+=u*d[l+2],g+=u}}p[c]=f/g,p[c+1]=_/g,p[c+2]=v/g,p[c+3]=y/m}t.width=e,t.height=n,c.putImageData(u,0,0)}}(i,a.width,a.height)),a.base64=this.cropToBase64(i),this.imageCropped.emit(a),a}}return null}getImagePosition(){const t=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth,e={x1:Math.round(this.cropper.x1*t),y1:Math.round(this.cropper.y1*t),x2:Math.round(this.cropper.x2*t),y2:Math.round(this.cropper.y2*t)};return this.containWithinAspectRatio||(e.x1=Math.max(e.x1,0),e.y1=Math.max(e.y1,0),e.x2=Math.min(e.x2,this.transformedSize.width),e.y2=Math.min(e.y2,this.transformedSize.height)),e}getOffsetImagePosition(){const t=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth;let e,n;(this.canvasRotation+this.exifTransform.rotate)%2?(e=(this.transformedSize.width-this.originalSize.height)/2,n=(this.transformedSize.height-this.originalSize.width)/2):(e=(this.transformedSize.width-this.originalSize.width)/2,n=(this.transformedSize.height-this.originalSize.height)/2);const i={x1:Math.round(this.cropper.x1*t)-e,y1:Math.round(this.cropper.y1*t)-n,x2:Math.round(this.cropper.x2*t)-e,y2:Math.round(this.cropper.y2*t)-n};return this.containWithinAspectRatio||(i.x1=Math.max(i.x1,0),i.y1=Math.max(i.y1,0),i.x2=Math.min(i.x2,this.transformedSize.width),i.y2=Math.min(i.y2,this.transformedSize.height)),i}cropToBase64(t){return t.toDataURL("image/"+this.format,this.getQuality())}getQuality(){return Math.min(1,Math.max(0,this.imageQuality/100))}getResizeRatio(t,e){const n=this.resizeToWidth/t,i=this.resizeToHeight/e,s=new Array;this.resizeToWidth>0&&s.push(n),this.resizeToHeight>0&&s.push(i);const r=0===s.length?1:Math.min(...s);return r>1&&!this.onlyScaleDown?r:Math.min(r,1)}getClientX(t){return(t.touches&&t.touches[0]?t.touches[0].clientX:t.clientX)||0}getClientY(t){return(t.touches&&t.touches[0]?t.touches[0].clientY:t.clientY)||0}}return t.\u0275fac=function(e){return new(e||t)(Ao(Du),Ao(Qr))},t.\u0275cmp=pe({type:t,selectors:[["image-cropper"]],viewQuery:function(t,e){var n;1&t&&(cc(iS,!0),hc(sS,!0)),2&t&&(lc(n=gc())&&(e.wrapper=n.first),lc(n=gc())&&(e.sourceImage=n.first))},hostVars:4,hostBindings:function(t,e){1&t&&$o("resize",(function(){return e.onResize()}),!1,Bn)("mousemove",(function(t){return e.moveImg(t)}),!1,Hn)("touchmove",(function(t){return e.moveImg(t)}),!1,Hn)("mouseup",(function(){return e.moveStop()}),!1,Hn)("touchend",(function(){return e.moveStop()}),!1,Hn),2&t&&(oa("text-align",e.alignImage),aa("disabled",e.disabled))},inputs:{format:"format",maintainAspectRatio:"maintainAspectRatio",transform:"transform",aspectRatio:"aspectRatio",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",backgroundColor:"backgroundColor"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed"},features:[Oa],decls:5,vars:10,consts:[["wrapper",""],["class","source-image",3,"src","visibility","transform","load",4,"ngIf"],[1,"overlay"],["class","cropper","tabindex","0",3,"rounded","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"source-image",3,"src","load"],["sourceImage",""],["tabindex","0",1,"cropper",3,"keydown"],[1,"move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"resize","topleft",3,"mousedown","touchstart"],[1,"square"],[1,"resize","top"],[1,"resize","topright",3,"mousedown","touchstart"],[1,"resize","right"],[1,"resize","bottomright",3,"mousedown","touchstart"],[1,"resize","bottom"],[1,"resize","bottomleft",3,"mousedown","touchstart"],[1,"resize","left"],[1,"resize-bar","top",3,"mousedown","touchstart"],[1,"resize-bar","right",3,"mousedown","touchstart"],[1,"resize-bar","bottom",3,"mousedown","touchstart"],[1,"resize-bar","left",3,"mousedown","touchstart"]],template:function(t,e){1&t&&(No(0,"div",null,0),Mo(2,rS,2,5,"img",1),Fo(3,"div",2),Mo(4,aS,3,15,"div",3),zo()),2&t&&(oa("background",e.imageVisible&&e.backgroundColor,ts),ws(2),Ro("ngIf",e.safeImgDataUrl),ws(1),oa("width",e.maxSize.width,"px")("height",e.maxSize.height,"px")("margin-left","center"===e.alignImage?e.marginLeft:null),ws(1),Ro("ngIf",e.imageVisible))},directives:[Zh],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color,#fff) solid 100vw;top:0;left:0}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:0 0;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color,rgba(255,255,255,.3)) solid 100vw;touch-action:none}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;bottom:0;left:0;right:0;pointer-events:none;border:1px dashed;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:focus .move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%] .square[_ngcontent-%COMP%]{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw rgba(255,255,255,.3);box-shadow:0 0 0 100vw var(--cropper-outline-color,rgba(255,255,255,.3))}@media (orientation:portrait){[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{outline-width:100vh}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh rgba(255,255,255,.3);box-shadow:0 0 0 100vh var(--cropper-outline-color,rgba(255,255,255,.3))}}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),t})(),hS=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[nu]]}),t})();function uS(t){const{subscriber:e,counter:n,period:i}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}function dS(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function pS(t,e){const n=e?"":"none";dS(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function gS(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function mS(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function fS(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function _S(t,e,n){const{top:i,bottom:s,left:r,right:o}=t;return n>=i&&n<=s&&e>=r&&e<=o}function vS(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function yS(t,e,n,i){const{top:s,right:r,bottom:o,left:a,width:l,height:c}=t,h=l*e,u=c*e;return i>s-u&&i<o+u&&n>a-h&&n<r+h}class bS{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:fS(t)})})}handleScroll(t){const e=t.target,n=this.positions.get(e);if(!n)return null;const i=e===this._document?e.documentElement:e,s=n.scrollPosition;let r,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();r=t.top,o=t.left}else r=e.scrollTop,o=e.scrollLeft;const a=s.top-r,l=s.left-o;return this.positions.forEach((t,n)=>{t.clientRect&&e!==n&&i.contains(n)&&vS(t.clientRect,a,l)}),s.top=r,s.left=o,{top:a,left:l}}}function wS(t){const e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<n.length;s++)n[s].removeAttribute("id");return"canvas"===i?ES(t,e):"input"!==i&&"select"!==i&&"textarea"!==i||IS(t,e),CS("canvas",t,e,ES),CS("input, textarea, select",t,e,IS),e}function CS(t,e,n,i){const s=e.querySelectorAll(t);if(s.length){const e=n.querySelectorAll(t);for(let t=0;t<s.length;t++)i(s[t],e[t])}}let SS=0;function IS(t,e){e.value=t.value,"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${SS++}`)}function ES(t,e){const n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch(QP){}}const xS=b_({passive:!0}),PS=b_({passive:!1});class TS{constructor(t,e,n,i,s,r){this._config=e,this._document=n,this._ngZone=i,this._viewportRuler=s,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new E,this._pointerMoveSubscription=u.EMPTY,this._pointerUpSubscription=u.EMPTY,this._scrollSubscription=u.EMPTY,this._resizeSubscription=u.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new E,this.started=new E,this.released=new E,this.ended=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const n=t.target;return!!n&&(n===e||e.contains(n))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{t.preventDefault();const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._getDragStartDelay(t)))return void this._endDragSequence(t);this._dropContainer&&this._dropContainer.isDragging()||(this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()));const n=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,e);else{const t=this._activeTransform;t.x=n.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=n.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:t,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t),this._parentPositions=new bS(n,s),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=l_(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){return this._handles=t.map(t=>h_(t)),this._handles.forEach(t=>pS(t,!1)),this._toggleNativeDragInteractions(),this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=h_(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,PS),e.addEventListener("touchstart",this._pointerDown,xS)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?h_(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&DS(this._rootElement),DS(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}enableHandle(t){this._disabledHandles.delete(t)}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&DS(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&DS(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){AS(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,i=t.parentNode,s=this._preview=this._createPreviewElement(),r=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,t),t.style.display="none",this._document.body.appendChild(i.replaceChild(r,t)),(n=this._document,n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body).appendChild(s),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;var n;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){e.stopPropagation();const n=this.isDragging(),i=AS(e),s=!i&&0!==e.button,r=this._rootElement,o=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),n||s||o)return;this._handles.length&&(this._rootElementTapHighlight=r.style.webkitTapHighlightColor||"",r.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=fS(this._boundaryElement));const a=this._previewTemplate;this._pickupPositionInElement=a&&a.template&&!a.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){this._rootElement.style.display="",this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,n=e.getItemIndex(this),i=this._getPointerPositionOnPage(t),s=this._getDragDistance(this._getPointerPositionOnPage(t)),r=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:s}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s}),e.drop(this,n,this._initialContainer,r,s,this._initialIndex),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:i}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=kS(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,n=t?t.template:null;let i;if(n&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,s=t.viewContainer.createEmbeddedView(n,t.context);s.detectChanges(),i=OS(s,this._document),this._previewRef=s,t.matchSize?RS(i,e):i.style.transform=kS(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;i=wS(t),RS(i,t.getBoundingClientRect())}return dS(i.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),pS(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>i.classList.add(t)):i.classList.add(e)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=kS(t.left,t.top);const e=function(t){const e=getComputedStyle(t),n=mS(e,"transition-property"),i=n.find(t=>"transform"===t||"all"===t);if(!i)return 0;const s=n.indexOf(i),r=mS(e,"transition-duration"),o=mS(e,"transition-delay");return gS(r[s])+gS(o[s])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const n=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",n),t(),clearTimeout(i))},i=setTimeout(n,1.5*e);this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let n;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),n=OS(this._placeholderRef,this._document)):n=wS(this._rootElement),n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e){const n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,s=i?i.getBoundingClientRect():n,r=AS(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:s.left-n.left+(r.pageX-s.left-o.left),y:s.top-n.top+(r.pageY-s.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),n=AS(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,s=n.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=i,e.y=s,e.matrixTransform(t.inverse())}}return{x:i,y:s}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:i}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?i=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(n=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,s=this._boundaryRect,r=this._previewRect,o=s.top+e,a=s.bottom-(r.height-e);n=MS(n,s.left+t,s.right-(r.width-t)),i=MS(i,o,a)}return{x:n,y:i}}_updatePointerDirectionDelta(t){const{x:e,y:n}=t,i=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-s.x),o=Math.abs(n-s.y);return r>this._config.pointerDirectionChangeThreshold&&(i.x=e>s.x?1:-1,s.x=e),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>s.y?1:-1,s.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,pS(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,PS),t.removeEventListener("touchstart",this._pointerDown,xS)}_applyRootElementTransform(t,e){const n=kS(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const n=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===n.width&&0===n.height||0===i.width&&0===i.height)return;const s=n.left-i.left,r=i.right-n.right,o=n.top-i.top,a=i.bottom-n.bottom;n.width>i.width?(s>0&&(t+=s),r>0&&(t-=r)):t=0,n.height>i.height?(o>0&&(e+=o),a>0&&(e-=a)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:AS(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const n=t.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&vS(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}}function kS(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function MS(t,e,n){return Math.max(e,Math.min(n,t))}function DS(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function AS(t){return"t"===t.type[0]}function OS(t,e){const n=t.rootNodes;if(1===n.length&&n[0].nodeType===e.ELEMENT_NODE)return n[0];const i=e.createElement("div");return n.forEach(t=>i.appendChild(t)),i}function RS(t,e){t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.transform=kS(e.left,e.top)}function LS(t,e){return Math.max(0,Math.min(e,t))}class NS{constructor(t,e,n,i,s){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=()=>!0,this.beforeStarted=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.sorted=new E,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=u.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new E,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function(t=0,e=T_){return(!D_(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=T_),new b(n=>(n.add(e.schedule(uS,t,{subscriber:n,counter:0,period:t})),n))}(0,I_).pipe(r_(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode;1===this._verticalScrollDirection?FS(t,-2):2===this._verticalScrollDirection&&FS(t,2),1===this._horizontalScrollDirection?VS(t,-2):2===this._horizontalScrollDirection&&VS(t,2)})},this.element=h_(t),this._document=n,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new bS(n,s)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){const t=h_(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach(t=>t._startReceiving(this)),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}enter(t,e,n,i){let s;this.start(),null==i?(s=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===s&&(s=this._getItemIndexFromPointerPosition(t,e,n))):s=i;const r=this._activeDraggables,o=r.indexOf(t),a=t.getPlaceholderElement();let l=r[s];if(l===t&&(l=r[s+1]),o>-1&&r.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(a,e),r.splice(s,0,t)}else if(this._shouldEnterAsFirstChild(e,n)){const e=r[0].getRootElement();e.parentNode.insertBefore(a,e),r.unshift(t)}else h_(this.element).appendChild(a),r.push(t);a.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,n,i,s,r){this._reset(),null==r&&(r=n.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:s})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=h_(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?zS("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,n,i){if(this.sortingDisabled||!yS(this._clientRect,.05,e,n))return;const s=this._itemPositions,r=this._getItemIndexFromPointerPosition(t,e,n,i);if(-1===r&&s.length>0)return;const o="horizontal"===this._orientation,a=zS(s,e=>e.drag===t),l=s[r],c=l.clientRect,h=a>r?1:-1,u=this._getItemOffsetPx(s[a].clientRect,c,h),d=this._getSiblingOffsetPx(a,s,h),p=s.slice();!function(t,e,n){const i=LS(e,t.length-1),s=LS(n,t.length-1);if(i===s)return;const r=t[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)t[a]=t[a+o];t[s]=r}(s,a,r),this.sorted.next({previousIndex:a,currentIndex:r,container:this,item:t}),s.forEach((e,n)=>{if(p[n]===e)return;const i=e.drag===t,s=i?u:d,r=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=s,o?(r.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,vS(e.clientRect,0,s)):(r.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,vS(e.clientRect,s,0))}),this._previousSwap.overlaps=_S(c,e,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?i.x:i.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,i=0,s=0;if(this._parentPositions.positions.forEach((r,o)=>{o!==this._document&&r.clientRect&&!n&&yS(r.clientRect,.05,t,e)&&([i,s]=function(t,e,n,i){const s=US(e,i),r=jS(e,n);let o=0,a=0;if(s){const e=t.scrollTop;1===s?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(r){const e=t.scrollLeft;1===r?e>0&&(a=1):t.scrollWidth-e>t.clientWidth&&(a=2)}return[o,a]}(o,r.clientRect,t,e),(i||s)&&(n=o))}),!i&&!s){const{width:r,height:o}=this._viewportRuler.getViewportSize(),a={width:r,height:o,top:0,right:r,bottom:o,left:0};i=US(a,e),s=jS(a,t),n=window}!n||i===this._verticalScrollDirection&&s===this._horizontalScrollDirection&&n===this._scrollNode||(this._verticalScrollDirection=i,this._horizontalScrollDirection=s,this._scrollNode=n,(i||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_cacheParentPositions(){const t=h_(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:fS(e)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_reset(){this._isDragging=!1;const t=h_(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,n){const i="horizontal"===this._orientation,s=e[t].clientRect,r=e[t+-1*n];let o=s[i?"width":"height"]*n;if(r){const t=i?"left":"top",e=i?"right":"bottom";-1===n?o-=r.clientRect[t]-s[e]:o+=s[t]-r.clientRect[e]}return o}_getItemOffsetPx(t,e,n){const i="horizontal"===this._orientation;let s=i?e.left-t.left:e.top-t.top;return-1===n&&(s+=i?e.width-t.width:e.height-t.height),s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){const s=n[n.length-1].clientRect;return i?t>=s.right:e>=s.bottom}{const s=n[0].clientRect;return i?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,n,i){const s="horizontal"===this._orientation;return zS(this._itemPositions,({drag:r,clientRect:o},a,l)=>{if(r===t)return l.length<2;if(i){const t=s?i.x:i.y;if(r===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return s?e>=Math.floor(o.left)&&e<Math.floor(o.right):n>=Math.floor(o.top)&&n<Math.floor(o.bottom)})}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return _S(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(i=>i._canReceive(t,e,n))}_canReceive(t,e,n){if(!_S(this._clientRect,e,n)||!this.enterPredicate(t,this))return!1;const i=this._getShadowRoot().elementFromPoint(e,n);if(!i)return!1;const s=h_(this.element);return i===s||s.contains(i)}_startReceiving(t){const e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{vS(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=function(t){if(function(){if(null==__){const t="undefined"!=typeof document?document.head:null;__=!(!t||!t.createShadowRoot&&!t.attachShadow)}return __}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(h_(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}function zS(t,e){for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1}function FS(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function VS(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function US(t,e){const{top:n,bottom:i,height:s}=t,r=.05*s;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}function jS(t,e){const{left:n,right:i,width:s}=t,r=.05*s;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}const BS=b_({passive:!1,capture:!0});let HS=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new E,this.pointerUp=new E,this.scroll=new E,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.size&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.size&&(t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,BS)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,BS)}startDragging(t,e){if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:BS}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:BS}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances.has(t)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(Ih))},t.\u0275prov=ht({factory:function(){return new t(Qt(Uc),Qt(Ih))},token:t,providedIn:"root"}),t})();const $S={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let WS=(()=>{class t{constructor(t,e,n,i){this._document=t,this._ngZone=e,this._viewportRuler=n,this._dragDropRegistry=i}createDrag(t,e=$S){return new TS(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new NS(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Uc),Qt(F_),Qt(HS))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(Uc),Qt(F_),Qt(HS))},token:t,providedIn:"root"}),t})();const qS=new Ft("CDK_DRAG_PARENT"),GS=new Ft("CdkDropListGroup"),QS=new Ft("CDK_DRAG_CONFIG");let KS=0;const ZS=new Ft("CdkDropList");let YS=(()=>{class t{constructor(e,n,i,s,r,o,a){this.element=e,this._changeDetectorRef=i,this._dir=s,this._group=r,this._scrollDispatcher=o,this._destroyed=new E,this.connectedTo=[],this.id="cdk-drop-list-"+KS++,this.enterPredicate=()=>!0,this.dropped=new Yl,this.entered=new Yl,this.exited=new Yl,this.sorted=new Yl,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,a&&this._assignDefaults(a),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),r&&r._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=l_(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(R_(this._dir.value),r_(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const n=(i=this.connectedTo,Array.isArray(i)?i:[i]).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);var i;if(this._group&&this._group._items.forEach(t=>{-1===n.indexOf(t)&&n.push(t)}),!this._scrollableParentsResolved&&this._scrollDispatcher){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=l_(this.sortingDisabled),e.autoScrollDisabled=l_(this.autoScrollDisabled),e.connectedTo(n.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:n,sortingDisabled:i,listAutoScrollDisabled:s,listOrientation:r}=t;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=s&&s,this.orientation=r||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(WS),Ao(Qr),Ao(p_,8),Ao(GS,12),Ao(z_),Ao(QS,8))},t.\u0275dir=ye({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(Ea("id",e.id),aa("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[Ha([{provide:GS,useValue:void 0},{provide:ZS,useExisting:t}])]}),t._dropLists=[],t})();const XS=new Ft("CdkDragHandle"),JS=new Ft("CdkDragPlaceholder"),tI=new Ft("CdkDragPreview");let eI=(()=>{class t{constructor(t,e,n,i,s,r,o,a,l,c){this.element=t,this.dropContainer=e,this._document=n,this._ngZone=i,this._viewContainerRef=s,this._dir=o,this._changeDetectorRef=l,this._selfHandle=c,this._destroyed=new E,this.started=new Yl,this.released=new Yl,this.ended=new Yl,this.entered=new Yl,this.exited=new Yl,this.dropped=new Yl,this.moved=new b(t=>{const e=this._dragRef.moved.pipe(z(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=a.createDrag(t,{dragStartThreshold:r&&null!=r.dragStartThreshold?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&null!=r.pointerDirectionChangeThreshold?r.pointerDirectionChangeThreshold:5,zIndex:null==r?void 0:r.zIndex}),this._dragRef.data=this,r&&this._assignDefaults(r),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=l_(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(hm(1),r_(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(R_(this._handles),pv(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),gm(t=>G(...t.map(t=>t._stateChanges.pipe(R_(t))))),r_(this._destroyed)).subscribe(t=>{const e=this._dragRef,n=t.element.nativeElement;t.disabled?e.disableHandle(n):e.enableHandle(n)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,n=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?nI(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?nI(this.element.nativeElement,t):h_(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const e=this._dir,n=this.dragStartDelay,i=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof n&&n?n:c_(n),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(i).withPreviewTemplate(s),e&&t.withDirection(e.value)}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:n,constrainPosition:i,previewClass:s,boundaryElement:r,draggingDisabled:o,rootElementSelector:a}=t;this.disabled=null!=o&&o,this.dragStartDelay=n||0,e&&(this.lockAxis=e),i&&(this.constrainPosition=i),s&&(this.previewClass=s),r&&(this.boundaryElement=r),a&&(this.rootElementSelector=a)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(ZS,12),Ao(Ih),Ao(Uc),Ao(yl),Ao(QS,8),Ao(p_,8),Ao(WS),Ao(Qr),Ao(XS,10))},t.\u0275dir=ye({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,n){var i;1&t&&(dc(n,tI,!0),dc(n,JS,!0),dc(n,XS,!0)),2&t&&(lc(i=gc())&&(e._previewTemplate=i.first),lc(i=gc())&&(e._placeholderTemplate=i.first),lc(i=gc())&&(e._handles=i))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&aa("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Ha([{provide:qS,useExisting:t}]),Oa]}),t})();function nI(t,e){let n=t.parentElement;for(;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}let iI=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[WS],imports:[V_]}),t})();var sI=n("EcEN");function rI(t,e){1&t&&(No(0,"div",3),Fo(1,"img-selection"),zo())}function oI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openSmall()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",11),zo()}}function aI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openSmall()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",12),zo()}}function lI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openFull()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",12),zo()}}function cI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).onClose()})),No(1,"span"),ba(2,"Close"),zo(),Fo(3,"i",13),zo()}}function hI(t,e){if(1&t&&(No(0,"div",8),Mo(1,oI,4,0,"button",9),Mo(2,aI,4,0,"button",9),Mo(3,lI,4,0,"button",9),Mo(4,cI,4,0,"button",9),zo()),2&t){const t=Go(2);ws(1),Ro("ngIf","full"===t.stateDisplayed),ws(1),Ro("ngIf","closed"===t.stateDisplayed),ws(1),Ro("ngIf","small"===t.stateDisplayed),ws(1),Ro("ngIf","closed"!==t.stateDisplayed)}}const uI=function(t,e,n,i){return{"wz-img-manager__module--small":t,"wz-img-manager__module--full":e,"wz-img-manager__module--window":n,"wz-img-manager__module--edit":i}},dI=function(t){return{"wz-block--window":t}};function pI(t,e){if(1&t){const t=jo();No(0,"div",4),Mo(1,hI,5,4,"div",5),No(2,"div",6),No(3,"img-tabs",7),$o("imgManagerClosed",(function(){return Ye(t),Go().onImgManagerClosed()}))("currentTab",(function(e){return Ye(t),Go().setCurrentTab(e)})),zo(),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",Ul(6,uI,"small"===t.stateDisplayed,"full"===t.stateDisplayed,"window"===t.stateDisplayed,t.hideTab)),ws(1),Ro("ngIf","window"!==t.stateDisplayed),ws(1),Ro("ngClass",zl(11,dI,"window"===t.stateDisplayed)),ws(1),Ro("stateDisplayed",t.stateDisplayed)("multipleImgMode",t.multipleImgMode)("listDisplayed",t.listDisplayed)}}const gI=["dragAndDropBox"];function mI(t,e){1&t&&(No(0,"div",8),Fo(1,"wz-loader",9),zo()),2&t&&(ws(1),Ro("small",!0)("position","relative"))}function fI(t,e){1&t&&Fo(0,"img",15),2&t&&Ro("src",Go(2).assetsIcon,Ji)}function _I(t,e){if(1&t&&(Vo(0),No(1,"div",10),Mo(2,fI,1,1,"img",11),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),No(6,"p",12),ba(7),Wl(8,"translate"),zo(),No(9,"div",13),Fo(10,"i",14),ba(11),Wl(12,"translate"),zo(),Uo()),2&t){const t=Go();ws(2),Ro("ngIf",t.assetsIcon),ws(2),wa(ql(5,4,"ImgManager.ImgUpload.dropImg")),ws(3),wa(ql(8,6,"ImgManager.ImgUpload.or")),ws(4),Ca("",ql(12,8,"ImgManager.ImgUpload.selectImg")," ")}}const vI=function(t){return{"img-upload--small":t}},yI=function(t){return{"img-upload__container--small":t}};function bI(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Uo()),2&t&&(ws(1),wa(ql(2,1,"ImgManager.UploadList.imgSuccessImport")))}function wI(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Uo()),2&t&&(ws(1),wa(ql(2,1,"ImgManager.UploadList.imgSuccessImportOne")))}function CI(t,e){if(1&t){const t=jo();No(0,"div",16),No(1,"img-card",17),$o("toggleImgSelected",(function(){Ye(t);const n=e.index;return Go().onToggleSelectImg(n)}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),No(2,"div",18),No(3,"button",19),Fo(4,"i",13),zo(),zo(),zo()}if(2&t){const t=e.$implicit,n=Go();ws(1),Ro("picture",t)("stateDisplayed",n.stateDisplayed)}}const SI=function(t){return{smallDisplay:t}},II=function(t,e){return{"upload-list__scroll--smallDisplay":t,"upload-list__scroll--window":e}},EI=["imgUploadedImg"],xI=function(t){return{"is-active":t}};function PI(t,e){if(1&t&&(No(0,"li",12),No(1,"a"),ba(2),Wl(3,"translate"),zo(),zo()),2&t){const t=Go();Ro("ngClass",zl(4,xI,t.tabActive===t.tabs[3])),ws(2),wa(ql(3,2,"ImgManager.Tabs.Editor"))}}function TI(t,e){if(1&t&&Fo(0,"images-view",21),2&t){const t=Go(2);Ro("stateDisplayed",t.stateDisplayed)("listDisplayed",!1)("multipleImgMode",t.multipleImgMode)("tabDisplayed",t.tabActive)("maxLengthCardShow","small"===t.stateDisplayed?16:8)("fullSize",!1)}}const kI=function(t,e){return{"img-tabs__tabsFirst--small":t,"img-tabs__tabsFirst--window":e}},MI=function(t){return{"img-tabs__tabsFirst__list--upload":t}};function DI(t,e){if(1&t){const t=jo();No(0,"div",13),No(1,"div",14),No(2,"img-upload",15),$o("imgUploaded",(function(e){return Ye(t),Go().onImgUploaded(e)})),zo(),zo(),No(3,"div",16),Mo(4,TI,1,6,"images-view",17),No(5,"div",18),Fo(6,"upload-list",19,20),zo(),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",Fl(8,kI,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),ws(2),Ro("stateDisplayed",t.stateDisplayed),ws(1),Ro("ngClass",zl(11,MI,t.imgUpload)),ws(1),Ro("ngIf",!t.imgUpload),ws(1),Ro("hidden",!t.imgUpload),ws(1),Ro("stateDisplayed",t.stateDisplayed)("tabDisplayed",t.tabActive)("multipleImgMode",t.multipleImgMode)}}function AI(t,e){if(1&t&&(No(0,"div",22),No(1,"div",23),Fo(2,"images-view",24),zo(),zo()),2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)("listDisplayed",t.listDisplayed)("multipleImgMode",t.multipleImgMode)("tabDisplayed",t.tabActive)("fullSize",!0)}}function OI(t,e){if(1&t){const t=jo();No(0,"div",25),No(1,"div",23),No(2,"pexels-lib",7),$o("showImgUploaded",(function(){return Ye(t),Go().onShowImgUploaded()})),zo(),zo(),zo()}if(2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)}}function RI(t,e){if(1&t){const t=jo();No(0,"div",26),No(1,"div",23),No(2,"img-editor",27),$o("editClosed",(function(e){return Ye(t),Go().onEditClosed(e)})),zo(),zo(),zo()}if(2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)("imgToEdit",t.imgToEdit)}}const LI=function(t){return{small:t}},NI=function(t,e){return{"tabs--notWindow":t,"tabs--notDisplayed":e}},zI=function(t){return{"img-tabs__canva--window":t}},FI=["outerElement"],VI=function(t){return{"pexels-lib__search--smallDisplay":t}};function UI(t,e){if(1&t){const t=jo();No(0,"div",8),No(1,"wz-input-search",9),$o("ngModelChange",(function(e){return Ye(t),Go().searchValue=e}))("changeDebounced",(function(){return Ye(t),Go().onSearchNameChanged()})),Wl(2,"translate"),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(6,VI,"small"===t.stateDisplayed)),ws(1),Ro("ngModel",t.searchValue)("placeholder",ql(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===t.stateDisplayed)}}function jI(t,e){if(1&t&&(No(0,"p",14),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(2);ws(1),Sa("",ql(2,2,"ImgManager.PexelLib.nbImgFound")," : ",t.nbResult,"")}}function BI(t,e){1&t&&(Vo(0),ba(1," \xa0"),Fo(2,"i",35),Uo())}function HI(t,e){if(1&t){const t=jo();No(0,"div",32),$o("click",(function(){Ye(t);const e=Go().$implicit;return Go(3).uploadPhoto(e,e.src.large2x)})),No(1,"span"),ba(2),Wl(3,"translate"),zo(),No(4,"span",33),Fo(5,"i",34),zo(),Mo(6,BI,3,0,"ng-container",6),zo()}if(2&t){const t=Go().$implicit;ws(2),wa(ql(3,2,"ImgManager.PexelLib.import")),ws(4),Ro("ngIf",t.uploaded)}}function $I(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Fo(3,"span",36),Uo()),2&t&&(ws(1),Ca(" ",ql(2,1,"ImgManager.PexelLib.importation")," "))}const WI=function(t){return{"is-hoverable":t}};function qI(t,e){if(1&t){const t=jo();No(0,"div",17),Fo(1,"img",18),No(2,"div",19),No(3,"span",20),ba(4),zo(),No(5,"div",21),No(6,"div",22),No(7,"button",23),Mo(8,HI,7,4,"div",24),Mo(9,$I,4,3,"ng-container",6),zo(),zo(),No(10,"div",25),No(11,"div",26),No(12,"div",27),No(13,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.portrait)})),No(14,"p"),ba(15),Wl(16,"translate"),zo(),Fo(17,"i",29),zo(),No(18,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.landscape)})),No(19,"p"),ba(20),Wl(21,"translate"),zo(),Fo(22,"i",30),zo(),No(23,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.large2x)})),No(24,"p"),ba(25),Wl(26,"translate"),zo(),Fo(27,"i",31),zo(),zo(),zo(),zo(),zo(),zo(),zo()}if(2&t){const t=e.$implicit;ws(1),Ro("alt",t.src.medium)("src",t.src.medium,Ji),ws(3),Sa(" ",t.width," x ",t.height," "),ws(1),Ro("ngClass",zl(16,WI,!t.uploading)),ws(3),Ro("ngIf",!t.uploading),ws(1),Ro("ngIf",t.uploading),ws(6),wa(ql(16,10,"ImgManager.PexelLib.portrait")),ws(5),wa(ql(21,12,"ImgManager.PexelLib.landscape")),ws(5),wa(ql(26,14,"ImgManager.PexelLib.original"))}}function GI(t,e){if(1&t&&(No(0,"div",15),Mo(1,qI,28,18,"div",16),zo()),2&t){const t=e.$implicit;Ro("@listAnimation",t.photos.length),ws(1),Ro("ngForOf",t.photos)}}function QI(t,e){if(1&t&&(No(0,"div",10),Mo(1,jI,3,4,"p",11),No(2,"div",12),Mo(3,GI,2,2,"div",13),zo(),zo()),2&t){const t=Go();ws(1),Ro("ngIf",t.nbResult),ws(2),Ro("ngForOf",t.photosColumns)}}function KI(t,e){1&t&&(Vo(0),Fo(1,"wz-loader"),Uo())}function ZI(t,e){1&t&&(No(0,"div",37),No(1,"wz-alert",38),ba(2),Wl(3,"translate"),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(1),Ro("warning",!0),ws(1),Ca(" ",ql(3,3,"ImgManager.PexelLib.noResult")," "))}const YI=function(t){return{"pexels-lib__scroll--smallDisplay":t}};function XI(t,e){1&t&&Fo(0,"i",25)}function JI(t,e){1&t&&Fo(0,"i",26)}function tE(t,e){if(1&t){const t=jo();No(0,"button",22),$o("click",(function(){return Ye(t),Go(2).onToggleImgSelected()})),Mo(1,XI,1,0,"i",23),Mo(2,JI,1,0,"i",24),No(3,"span"),ba(4),Wl(5,"translate"),zo(),zo()}if(2&t){const t=Go(2);ws(1),Ro("ngIf",!t.picture.selected),ws(1),Ro("ngIf",t.picture.selected),ws(2),wa(ql(5,3,"ImgManager.ImgCard.select"))}}function eE(t,e){if(1&t){const t=jo();No(0,"div",12),No(1,"button",13),Fo(2,"i",14),No(3,"span"),ba(4),zo(),zo(),No(5,"button",15),$o("click",(function(){Ye(t);const e=Go();return e.onDownloadImg(e.picture.display_name,e.picture.file_name)})),Fo(6,"i",16),No(7,"span"),ba(8),Wl(9,"translate"),zo(),zo(),No(10,"button",17),$o("click",(function(){Ye(t);const e=Go();return e.onEdit(e.picture)})),Fo(11,"i",18),No(12,"span"),ba(13),Wl(14,"translate"),zo(),zo(),No(15,"button",19),$o("click",(function(){return Ye(t),Go().activeConfirmDelete=!0})),Fo(16,"i",20),No(17,"span"),ba(18),Wl(19,"translate"),zo(),zo(),Mo(20,tE,6,5,"button",21),zo()}if(2&t){const t=Go();ws(4),Sa("",t.picture.raw_height,"x",t.picture.raw_width,""),ws(4),wa(ql(9,6,"ImgManager.ImgCard.download")),ws(5),wa(ql(14,8,"ImgManager.ImgCard.edit")),ws(5),wa(ql(19,10,"ImgManager.ImgCard.del")),ws(2),Ro("ngIf","window"!==t.stateDisplayed)}}function nE(t,e){1&t&&(No(0,"div",27),Fo(1,"i",28),No(2,"span"),ba(3),Wl(4,"translate"),zo(),zo()),2&t&&(ws(3),wa(ql(4,1,"ImgManager.ImgCard.validImgSmall")))}const iE=function(t){return{"img-card__container__overlay--smallDisplay":t}};function sE(t,e){if(1&t){const t=jo();No(0,"div",29),No(1,"i",30),$o("click",(function(){return Ye(t),Go().onToggleImgSelected()})),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(1,iE,"small"===t.stateDisplayed||t.isUploadSection))}}function rE(t,e){1&t&&Fo(0,"span",31)}const oE=function(t){return{fullSize:t}},aE=function(t,e,n){return{smallDisplay:t,imgSelected:e,deletion:n}},lE=function(t){return{show:t}},cE=function(t,e){return{smallNameDisplay:t,focus:e}};function hE(t,e){1&t&&Fo(0,"span",12)}const uE=function(t,e,n){return{"img-editor__scroll--full":t,"img-editor__scroll--smallDisplay":e,"img-editor__scroll--window":n}},dE=function(t){return{"img-editor__infoSection__actions__save--disable":t}};function pE(t,e){1&t&&Fo(0,"span",13)}function gE(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"div",15),$o("click",(function(){Ye(t);const e=Go();return e.onOpenCanva(e.expectedWidth,e.expectedHeight)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),No(5,"p"),ba(6),zo(),zo(),zo()}if(2&t){const t=Go();ws(3),wa(ql(4,3,"ImgManager.CanvaBtn.recommanded")),ws(3),Sa("",t.expectedWidth,"*",t.expectedHeight,"")}}function mE(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"div",16),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onOpenCanva(n.value.width,n.value.height)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),No(5,"p"),ba(6),zo(),zo(),zo()}if(2&t){const t=e.$implicit;ws(3),wa(ql(4,3,t.key)),ws(3),Sa("",t.value.width,"*",t.value.height,"")}}const fE=function(t,e){return{"is-up":t,noTooltip:e}},_E=function(t){return{displayDropDownMenu:t}};function vE(t,e){if(1&t&&(Fo(0,"img",12),Wl(1,"imgSrc")),2&t){const t=Go().$implicit;Ro("src",Gl(1,2,t.file_name,"400"),Ji)("title",t.display_name)}}function yE(t,e){if(1&t&&(Fo(0,"img",12),Wl(1,"imgSrc")),2&t){const t=Go().$implicit;Ro("src",Gl(1,2,t.file_name,"200"),Ji)("title",t.display_name)}}function bE(t,e){if(1&t){const t=jo();No(0,"div",8),$o("cdkDragStarted",(function(){return Ye(t),Go(2).dragStart=!0}))("cdkDragEnded",(function(){return Ye(t),Go(2).dragStart=!1})),Mo(1,vE,2,5,"img",9),Mo(2,yE,2,5,"img",9),No(3,"div",10),$o("click",(function(){Ye(t);const n=e.index;return Go(2).removeImg(n)})),ba(4),Wl(5,"translate"),zo(),No(6,"span",11),ba(7),Wl(8,"translate"),zo(),zo()}if(2&t){const t=e.index;ws(1),Ro("ngIf",t<1),ws(1),Ro("ngIf",t>0),ws(2),wa(ql(5,4,"ImgManager.ImgSelection.deleteImg")),ws(3),wa(ql(8,6,"ImgManager.ImgSelection.tooltips"))}}const wE=function(t){return{"img-selection--visible":t}},CE=function(t){return[t]};function SE(t,e){if(1&t){const t=jo();No(0,"div",4),No(1,"div",5,6),$o("cdkDropListDropped",(function(e){return Ye(t),Go().drop(e)})),Mo(3,bE,9,8,"div",7),zo(),zo()}if(2&t){const t=Go(),e=Do(1);Ro("ngClass",zl(3,wE,t.imgSelectedList&&t.imgSelectedList.length)),ws(1),Ro("cdkDropListConnectedTo",zl(5,CE,e)),ws(2),Ro("ngForOf",t.imgSelectedList)}}function IE(t,e){1&t&&(Vo(0),Fo(1,"wz-loader"),Uo())}const EE=[[["","label",""]],[["","item",""]]],xE=["[label]","[item]"];function PE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"div",15),$o("click",(function(){return Ye(t),Go().confirmCrop()})),Wl(2,"translate"),Fo(3,"i",16),No(4,"p"),ba(5),Wl(6,"translate"),zo(),zo(),zo()}2&t&&(ws(1),Ro("nwbToolTip",ql(2,2,"ImgManager.ImgEditor.ValidtToolTip")),ws(4),wa(ql(6,4,"ImgManager.ImgEditor.Valid")))}const TE=function(t){return{"active-item":t}};function kE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.index;return Go().changeResolutionSize(n)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(4,TE,t.active)),ws(2),wa(ql(4,2,t.label))}}function ME(t,e){1&t&&Fo(0,"i",20),2&t&&Ro("ngClass",Go().$implicit.icon)}function DE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().applyMethod(n.method)})),Mo(2,ME,1,1,"i",19),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(5,TE,t.active)),ws(1),Ro("ngIf",t.icon),ws(2),wa(ql(5,3,t.label))}}function AE(t,e){1&t&&Fo(0,"i",20),2&t&&Ro("ngClass",Go().$implicit.icon)}function OE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().applyMethod(n.method)})),Mo(2,AE,1,1,"i",19),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(5,TE,t.active)),ws(1),Ro("ngIf",t.icon),ws(2),wa(ql(5,3,t.label))}}const RE=["imgLibContainer"];function LE(t,e){if(1&t&&(No(0,"div"),No(1,"p",10),ba(2),Wl(3,"translate"),zo(),zo()),2&t){const t=Go(2);ws(2),Sa("",ql(3,2,"ImgManager.ImgLib.nbImg")," : ",t.length,"")}}function NE(t,e){1&t&&(No(0,"div"),No(1,"p",10),ba(2),Wl(3,"translate"),zo(),zo()),2&t&&(ws(2),wa(ql(3,1,"ImgManager.ImgLib.lastImgs")))}function zE(t,e){if(1&t){const t=jo();No(0,"button",25),$o("click",(function(){return Ye(t),Go(3).selectImgChosen()})),Fo(1,"i",26),ba(2),Wl(3,"translate"),zo()}if(2&t){const t=Go(3);Ro("@insertRemoveAnnim",void 0),ws(2),Sa(" ",ql(3,3,"ImgManager.ImgLib.select")," (",t.nbImgToDelSelected,") ")}}function FE(t,e){1&t&&Fo(0,"span",30)}function VE(t,e){if(1&t){const t=jo();No(0,"button",27),$o("click",(function(){return Ye(t),Go(3).displayConfirmImgSup()})),Fo(1,"i",28),ba(2),Wl(3,"translate"),Mo(4,FE,1,0,"span",29),zo()}if(2&t){const t=Go(3);Ro("@insertRemoveAnnim",void 0),ws(2),Sa("",ql(3,4,"ImgManager.ImgLib.delMlt")," (",t.nbImgToDelSelected,") "),ws(2),Ro("ngIf",t.delListImgLoader)}}const UE=function(t){return{nbImage:t}};function jE(t,e){if(1&t&&(No(0,"p",31),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(3);ws(1),wa(Gl(2,1,"ImgManager.ImgLib.confirmSupQuestions",zl(4,UE,t.nbImgToDelSelected)))}}function BE(t,e){if(1&t&&(No(0,"p",31),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(3);ws(1),wa(Gl(2,1,"ImgManager.ImgLib.confirmSupQuestion",zl(4,UE,t.nbImgToDelSelected)))}}const HE=function(t){return{"images-view__container__boxAction__confirmSup--visible":t}},$E=function(t){return{actifDisplayed:t}};function WE(t,e){if(1&t){const t=jo();No(0,"div",11),No(1,"div",12),Mo(2,zE,4,5,"button",13),Mo(3,VE,5,6,"button",14),No(4,"div",15),Mo(5,jE,3,6,"p",16),Mo(6,BE,3,6,"p",16),No(7,"div"),No(8,"button",17),$o("click",(function(){return Ye(t),Go(2).cancelSup()})),ba(9),Wl(10,"translate"),zo(),No(11,"button",18),$o("click",(function(){return Ye(t),Go(2).removeListImg()})),ba(12),Wl(13,"translate"),zo(),zo(),zo(),zo(),No(14,"div",19),No(15,"div",20),No(16,"div",21),$o("click",(function(){return Ye(t),Go(2).onSwitchFormatDisplayed(!1)})),No(17,"span",22),Fo(18,"i",23),zo(),zo(),zo(),No(19,"div",20),No(20,"div",21),$o("click",(function(){return Ye(t),Go(2).onSwitchFormatDisplayed(!0)})),No(21,"span",22),Fo(22,"i",24),zo(),zo(),zo(),zo(),zo()}if(2&t){const t=Go(2);ws(2),Ro("ngIf",t.listDisplayed&&t.nbImgToDelSelected&&!t.confirmImgSup&&!t.delListImgLoader&&t.multipleImgMode),ws(1),Ro("ngIf",t.listDisplayed&&t.nbImgToDelSelected&&!t.confirmImgSup),ws(1),Ro("ngClass",zl(13,HE,t.confirmImgSup)),ws(1),Ro("ngIf",t.nbImgToDelSelected>1),ws(1),Ro("ngIf",1===t.nbImgToDelSelected),ws(3),Ca(" ",ql(10,9,"ImgManager.ImgLib.cancel")," "),ws(3),Ca(" ",ql(13,11,"ImgManager.ImgLib.confirm")," "),ws(4),Ro("ngClass",zl(15,$E,!t.listDisplayed)),ws(4),Ro("ngClass",zl(17,$E,t.listDisplayed))}}const qE=function(t,e){return{"images-view__container--uploadTab":t,"images-view__container--window":e}};function GE(t,e){if(1&t&&(No(0,"div",8),Mo(1,LE,4,4,"div",6),Mo(2,NE,4,3,"div",6),Mo(3,WE,23,19,"div",9),zo()),2&t){const t=Go();Ro("ngClass",Fl(4,qE,"img-upload"===t.tabDisplayed,"window"===t.stateDisplayed)),ws(1),Ro("ngIf","img-upload"!==t.tabDisplayed),ws(1),Ro("ngIf","img-upload"===t.tabDisplayed),ws(1),Ro("ngIf","img-upload"!==t.tabDisplayed)}}function QE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"mosaic-view",32),$o("picturesListChange",(function(){return Ye(t),Go().onPicturesListChange()}))("filtersChange",(function(){return Ye(t),Go().onFiltersChange()}))("disableChange",(function(e){return Ye(t),Go().disable=e}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("picturesList",t.picturesList)("tableFilters",t.tableFilters)("disable",t.disable)("nbFakeImg",t.nbFakeImg)("stateDisplayed",t.stateDisplayed)("tabDisplayed",t.tabDisplayed)("displayPexelsResults",t.displayPexelsResults)("isLoading",t.isLoading)("fullSize",t.fullSize)}}function KE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"table-view",33),$o("picturesListChange",(function(){return Ye(t),Go().onPicturesListChange()}))("filtersChange",(function(){return Ye(t),Go().onFiltersChange()}))("disableChange",(function(e){return Ye(t),Go().disable=e}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("picturesList",t.picturesList)("tableFilters",t.tableFilters)("disable",t.disable)("displayPexelsResults",t.displayPexelsResults)("stateDisplayed",t.stateDisplayed)("isLoading",t.isLoading)}}function ZE(t,e){if(1&t){const t=jo();No(0,"div",34),No(1,"pexels-lib",35),$o("showImgUploaded",(function(){return Ye(t),Go().onShowImgUploaded()})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("searchValue",t.tableFilters.searchValue)("disableSearch",!0)}}const YE=function(t,e){return{fullSize:t,small:e}},XE=function(t,e,n,i,s,r,o){return{"images-view__scroll--hide--mosaic":t,"images-view__scroll--hide--mosaic--small":e,"images-view__scroll--hide--table":n,"images-view__scroll--full":i,"images-view__scroll--smallDisplay":s,"images-view__scroll--smallUploadDisplay":r,"images-view__scroll--window":o}},JE=function(t){return{"mosaic__search--small":t}};function tx(t,e){if(1&t){const t=jo();No(0,"div",5),No(1,"wz-input-search",6),$o("ngModelChange",(function(e){return Ye(t),Go().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Ye(t),Go().onSearchChange(e)})),Wl(2,"translate"),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(6,JE,"small"===t.stateDisplayed)),ws(1),Ro("ngModel",t.tableFilters.searchValue)("placeholder",ql(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===t.stateDisplayed)}}function ex(t,e){if(1&t){const t=jo();No(0,"img-card",10),$o("toggleImgSelected",(function(){Ye(t);const n=e.index;return Go(2).onToggleSelectImg(n)}))("pictureNameChange",(function(e){return Ye(t),Go(2).onCardRenamePicture(e)})),zo()}if(2&t){const t=e.$implicit,n=Go(2);Ro("picture",t)("stateDisplayed",n.stateDisplayed)("tabDisplayed",n.tabDisplayed)("disable",n.disable)("fullSize",n.fullSize)}}const nx=function(t){return{"mosaic__container__cards__fakeImg--smallFakeImg":t}};function ix(t,e){if(1&t&&Fo(0,"div",11),2&t){const t=Go(2);Ro("ngClass",zl(1,nx,"small"===t.stateDisplayed||"img-upload"===t.tabDisplayed))}}const sx=function(t){return{"mosaic__container__cards--padding":t}};function rx(t,e){if(1&t&&(No(0,"div",7),Mo(1,ex,1,5,"img-card",8),Mo(2,ix,1,3,"div",9),Wl(3,"numberToArray"),zo()),2&t){const t=Go();Ro("ngClass",zl(6,sx,"window"!==t.stateDisplayed))("@listAnimation",t.picturesList.length),ws(1),Ro("ngForOf",t.picturesList),ws(1),Ro("ngForOf",ql(3,4,t.nbFakeImg))}}function ox(t,e){1&t&&(No(0,"div",12),Fo(1,"wz-loader",13),zo()),2&t&&(ws(1),Ro("small",!0))}function ax(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"wz-pagination",15),$o("pageChange",(function(){return Ye(t),Go().onFiltersChange()})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("pagination",t.tableFilters)}}const lx=function(t,e,n){return{fullSize:t,small:e,"mosaic--displayPexelsImg":n}};function cx(t,e){1&t&&(No(0,"div",25),Fo(1,"i",26),zo())}const hx=function(t){return{imgSelected:t}},ux=function(t){return{pictureDeletion:t}},dx=function(t){return{desabled:t}};function px(t,e){if(1&t){const t=jo();No(0,"div",6),$o("checkBoxValueChange",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),No(1,"div",7),No(2,"div",8),No(3,"div",9),$o("click",(function(){Ye(t);const n=e.index;return Go().onToggleSelectImg(n)})),No(4,"img",10),$o("error",(function(n){Ye(t);const i=e.$implicit,s=Go();return i.imgNotLoaded=!0,s.onPictureNotLoading(n)})),Wl(5,"imgSrc"),zo(),Mo(6,cx,2,0,"div",11),zo(),No(7,"input",12),$o("ngModelChange",(function(n){return Ye(t),e.$implicit.display_name=n}))("focus",(function(){Ye(t);const n=e.$implicit;return Go().previousName=n.display_name}))("blur",(function(){Ye(t);const n=e.$implicit;return Go().onNameChange(n.id_file)}))("click",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),zo(),zo(),zo(),No(8,"div",13),$o("click",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),No(9,"p",14),ba(10),zo(),zo(),No(11,"div",15),No(12,"dropdown",16),Vo(13,17),No(14,"div",18),No(15,"span"),Fo(16,"i",19),zo(),zo(),Uo(),Vo(17,20),No(18,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onDownloadImg(n.display_name,n.file_name)})),Fo(19,"i",22),ba(20,"\xa0 "),No(21,"p"),ba(22),Wl(23,"translate"),zo(),zo(),Uo(),Vo(24,20),No(25,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onEdit(n)})),Fo(26,"i",23),ba(27,"\xa0 "),No(28,"p"),ba(29),Wl(30,"translate"),zo(),zo(),Uo(),Vo(31,20),No(32,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onRemoveImg(n)})),Fo(33,"i",24),ba(34,"\xa0 "),No(35,"p"),ba(36),Wl(37,"translate"),zo(),zo(),Uo(),zo(),zo(),zo()}if(2&t){const t=e.$implicit;Ro("checkBoxValue",t.delSelected),ws(3),Ro("ngClass",zl(23,hx,t.selected)),ws(1),Ro("src",Gl(5,14,t.file_name,"100"),Ji)("ngClass",zl(25,ux,t.deleted)),ws(2),Ro("ngIf",t.imgNotLoaded),ws(1),Ro("ngModel",t.display_name)("ngClass",zl(27,dx,t.deleted))("disabled",t.deleted),ws(3),Sa("",t.raw_height,"x",t.raw_width,""),ws(2),Ro("disable",t.deleted),ws(10),wa(ql(23,17,"ImgManager.ImgList.download")),ws(7),wa(ql(30,19,"ImgManager.ImgList.edit")),ws(7),wa(ql(37,21,"ImgManager.ImgList.remove"))}}function gx(t,e){if(1&t){const t=jo();No(0,"div",8),No(1,"wz-checkbox",9),$o("change",(function(e){return Ye(t),Go().onToggleAllCheckBox(e)})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("id",t.headerCheckBoxId)("alone",!0)}}function mx(t,e){if(1&t){const t=jo();No(0,"div",10),No(1,"wz-input-search",11),$o("ngModelChange",(function(e){return Ye(t),Go().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Ye(t),Go().searchChange(e)})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("ngModel",t.tableFilters.searchValue)("placeholder",t.placeholder)("smallPadding",!0)}}function fx(t,e){1&t&&(No(0,"div",12),Fo(1,"wz-loader",13),zo()),2&t&&(ws(1),Ro("small",!0))}function _x(t,e){1&t&&Zo(0,1,["*ngIf","!isLoading"])}function vx(t,e){if(1&t){const t=jo();No(0,"wz-pagination",14),$o("pageChange",(function(){return Ye(t),Go().pageChange()})),zo()}2&t&&Ro("pagination",Go().tableFilters)}const yx=[[["","headerCell",""]],[["","tableRow",""]]],bx=["[headerCell]","[tableRow]"];function wx(t,e){if(1&t&&(Vo(0),No(1,"option",11),ba(2),zo(),Uo()),2&t){const t=e.$implicit,n=Go(2);ws(1),Ro("selected",t===n.pagination.currentPage)("value",t),ws(1),Ca(" ",t," ")}}const Cx=function(t){return{width:t}},Sx=function(t){return{"wz-pagination__wrapper__arrows__arrow--disabled":t}};function Ix(t,e){if(1&t){const t=jo();No(0,"div",1),No(1,"div",2),No(2,"div",3),No(3,"p"),ba(4),Wl(5,"translate"),zo(),No(6,"select",4),$o("change",(function(e){return Ye(t),Go().onGotoPageChange(e)})),Mo(7,wx,3,3,"ng-container",5),Wl(8,"ArrayTotalPages"),zo(),zo(),No(9,"div",6),No(10,"p"),ba(11),Wl(12,"customPagniationText"),zo(),zo(),No(13,"div",7),No(14,"div",8),$o("click",(function(){return Ye(t),Go().decrementPage()})),Fo(15,"span",9),zo(),No(16,"div",10),$o("click",(function(){return Ye(t),Go().incrementPage()})),Wl(17,"IsLastPage"),Fo(18,"span",9),zo(),zo(),zo(),zo()}if(2&t){const t=Go();ws(4),wa(ql(5,6,"PaginationComponent.page")),ws(2),Ro("ngStyle",zl(19,Cx,40+10*t.pagination.currentPage.toString().length+"px")),ws(1),Ro("ngForOf",Gl(8,8,t.pagination.totalItems,t.pagination.itemsPerPage)),ws(4),wa(Ql(12,11,t.pagination.currentPage,t.pagination.totalItems,t.pagination.itemsPerPage)),ws(3),Ro("ngClass",zl(21,Sx,1===t.pagination.currentPage)),ws(2),Ro("ngClass",zl(23,Sx,Ql(17,15,t.pagination.currentPage,t.pagination.totalItems,t.pagination.itemsPerPage)))}}const Ex=function(t,e){return{"field--nowrap":t,alone:e}};function xx(t,e){1&t&&Fo(0,"p",3),2&t&&Ro("innerHTML",Go().text,Yi)}const Px=function(t){return{"is-small":t}},Tx=function(t){return{position:t}};function kx(t,e){1&t&&Fo(0,"i",2),2&t&&Ro("ngClass",Go().iconClass)}const Mx=function(t,e){return{success:t,warning:e}},Dx=["*"];let Ax=(()=>{let t=class{constructor(){this.imgSelectedList=[],this.multipleImgMode=!1,this.imgSelectionSubscriber=[],this.imgListLoading=new vg}getImgSelection(){return this.imgSelectedList}setImgSelection(t){this.imgSelectedList.length=0,t&&t.length&&t.forEach(t=>this.imgSelectedList.push(t)),this.emitImgSelectionChange()}addImgSelected(t){this.multipleImgMode?this.imgSelectedList.push(t):this.imgSelectedList=[t],this.emitImgSelectionChange()}getImgSelectionChange(){return new b(t=>{this.imgSelectionSubscriber.push(t)})}emitImgSelectionChange(){this.imgSelectionSubscriber.map(t=>t.next(JSON.parse(JSON.stringify(this.imgSelectedList))))}removeImgSelectedByIndex(t){this.imgSelectedList.splice(t,1),this.emitImgSelectionChange()}removeImgSelectedById(t){if(!this.multipleImgMode)return void(this.imgSelectedList=[]);let e=0;for(const n of this.imgSelectedList){if(n.id_file===t){this.removeImgSelectedByIndex(e);break}e++}}removeImgSelectionByIds(t){if(this.multipleImgMode)for(let e=this.imgSelectedList.length-1;e>-1;e--)-1!==t.indexOf(this.imgSelectedList[e].id_file)&&this.removeImgSelectedByIndex(e);else this.imgSelectedList=[]}removeAllImgSelected(){this.imgSelectedList.length=0,this.emitImgSelectionChange()}setMultipleImgMode(t){this.multipleImgMode=t}initImgSelectedList(t){t?this.imgSelectedList=t:this.imgSelectedList&&this.imgSelectedList.length?this.imgSelectedList.splice(0,this.imgSelectedList.length):this.imgSelectedList=[]}emitImgListLoading(t){this.imgListLoading.next(t)}getImgListLoadingEventListner(){return this.imgListLoading.asObservable()}moveImgOrder(t){this.imgSelectedList.splice(t.currentIndex,0,this.imgSelectedList.splice(t.previousIndex,1)[0]),this.emitImgSelectionChange()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})();class Ox{}let Rx=(()=>{let t=class{constructor(t){this.http=t,this.params=(new Ag).set("limit","20").set("page","1"),this.pageFicheProductConfig={stateDisplayed:"closed",multipleImgMode:!0,showImgManagerModule:!0,showSelection:!0,displayBtn:!0,pageficheProduct:!0},this.wiziblockConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1},this.simpleWithButtonOpenerConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!0},this.fullWindowConfig={stateDisplayed:"window",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1}}setApiConfig(t,e){this.imgManagerRoute=t,this.shopToken=e}getOptionsHeaders(t){const e={headers:new kg({Authorization:"Bearer "+this.shopToken})};return t&&(this.getParams(t),e.params=this.params),e}getShopImgList(t){return this.http.get(this.imgManagerRoute+"/images",this.getOptionsHeaders(t))}getShopTotalImgList(t){return this.http.get(this.imgManagerRoute+"/total/images",this.getOptionsHeaders(t))}getShopImg(t){return this.http.get(`${this.imgManagerRoute}/images/${t}`,this.getOptionsHeaders())}getParams(t){this.params=new Ag,this.params=this.params.set("id_file:sort","desc");for(const e in t)this.params=this.params.set(e,t[e])}uploadFile(t){return this.http.post(this.imgManagerRoute+"/images/template",t,this.getOptionsHeaders())}uploadFileByUrl(t,e){return this.http.post(this.imgManagerRoute+"/images/template",{url:t,fileName:e},this.getOptionsHeaders())}replaceImg(t,e){return this.http.put(`${this.imgManagerRoute}/images/${e}/replace`,{imageBase64:t,type:"RAW"},this.getOptionsHeaders())}changeImgName(t,e){return this.http.put(`${this.imgManagerRoute}/images/${e}?file_name=${t}`,null,this.getOptionsHeaders())}removeImg(t){return this.http.delete(`${this.imgManagerRoute}/images/${t}`,this.getOptionsHeaders())}removeMultipleImg(t){return this.http.post(this.imgManagerRoute+"/images-multiple-delete",{id_array:t},this.getOptionsHeaders())}getImgManagerDisplayConfig(t){switch(t){case"window":return this.fullWindowConfig;case"wizi-block":return this.wiziblockConfig;case"fiche-product":return this.pageFicheProductConfig;case"simple-with-button":return this.simpleWithButtonOpenerConfig;default:return}}getAllImgManagerDisplayConfig(){return[this.fullWindowConfig,this.wiziblockConfig,this.pageFicheProductConfig,this.simpleWithButtonOpenerConfig]}};return t.\u0275fac=function(e){return new(e||t)(Qt(Hg))},t.\u0275prov=ht({factory:function(){return new t(Qt(Hg))},token:t,providedIn:"root"}),t})(),Lx=(()=>{let t=class{constructor(){this.imgCDNConfig=null}setImgCDNConfig(t){this.imgCDNConfig=t}getUrlImg(t){const e=Object.keys(this.imgCDNConfig).filter(e=>new RegExp(t,"i").test(e))[0];return this.imgCDNConfig[e]}getAllSize(){return Object.keys(this.imgCDNConfig).map(t=>t.match(/_(\w+)_/)[1])}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Nx=(()=>{let t=class{constructor(t,e){this.imgManagerService=t,this.imgCDNService=e}setExternalConfig(t){this.externalConfig=t,this.imgManagerService.setApiConfig(t.api.image_manager_route,t.api.shop_token),this.imgCDNService.setImgCDNConfig(t.imgCDNConfig)}getCanvaApiURL(){return this.externalConfig.api.canva_url}getCanvaApiToken(){return this.externalConfig.api.canva_token}getRouteAssets(){return this.externalConfig.api.assets_route}getPexelsApiURL(){return this.externalConfig.api.pexels_route}getPexelsApiToken(){return this.externalConfig.api.pexels_token}getShopCategory(){return this.externalConfig.api.shop_category}};return t.\u0275fac=function(e){return new(e||t)(Qt(Rx),Qt(Lx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Rx),Qt(Lx))},token:t,providedIn:"root"}),t})(),zx=(()=>{let t=class{constructor(){this.userdisplayPreference="WzImgManagerListDisplayed"}setUserDisplayPreference(t){localStorage.setItem(this.userdisplayPreference,""+t)}getUserDisplayPreference(){return"true"==localStorage.getItem(this.userdisplayPreference)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Fx=(()=>{let t=class{constructor(t){this.externalConfigService=t,this.bindExpectedImgSizeEvent=new bg(null),this.bindExpectedSizeDone=this.bindExpectedImgSizeEvent.asObservable()}setCanvaApiConfig(){this.canvaApiURL=this.externalConfigService.getCanvaApiURL(),this.canvaApiKey=this.externalConfigService.getCanvaApiToken()}getCanvaLogo(){return this.externalConfigService.getRouteAssets()+"canva/icon_canva.svg"}bindEventExepectedImgSizeChange(){return this.bindExpectedSizeDone}expectedImgSizesChange(t){this.bindExpectedImgSizeEvent.next(t)}getCanvaApi(){return this.canvaApiURL&&this.canvaApiKey||this.setCanvaApiConfig(),new b(t=>{this.loadCanva().subscribe({complete:()=>{this.canvaApi&&Canva.DesignButton?(t.next(this.canvaApi),t.complete()):this.initializeCanva(t)}})})}initializeCanva(t){Canva.DesignButton&&Canva.DesignButton.initialize({apiKey:this.canvaApiKey}).then(e=>{this.canvaApi=e,t.next(this.canvaApi),t.complete()})}loadCanva(){return new b(t=>{this.canvaApi?t.complete():this.loadCanvaScript(t)})}loadCanvaScript(t){const e=document.createElement("script");e.src=this.canvaApiURL,e.type="text/javascript",e.async=!1,e.charset="utf-8",e.onload=()=>{t.complete()},document.getElementsByTagName("head")[0].appendChild(e)}};return t.\u0275fac=function(e){return new(e||t)(Qt(Nx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Nx))},token:t,providedIn:"root"}),t})(),Vx=(()=>{let t=class{constructor(){this.imgToEditEvent=new E,this.imgRemoved=new E,this.imgAdded=new E,this.listDisplayedChange=new E}emitImgRemoved(t){this.imgRemoved.next(t)}getImgRemovedEventListner(){return this.imgRemoved.asObservable()}emitImgToEdit(t){this.imgToEditEvent.next(t)}getImgToEditEventListner(){return this.imgToEditEvent.asObservable()}emitImgAdded(t){this.imgAdded.next(t)}getImgAddedEventListner(){return this.imgAdded.asObservable()}emitlistDisplayedChange(t){this.listDisplayedChange.next(t)}getlistDisplayedChange(){return this.listDisplayedChange.asObservable()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ux=(()=>{let t=class{constructor(){this.documentEventSource=new E,this.documentEventDone=this.documentEventSource.asObservable(),this.documentScrollSource=new E,this.documentScrollDone=this.documentScrollSource.asObservable()}documentEvent(){return this.documentEventDone}setDocumentEventListener(){document.body.addEventListener("click",t=>{this.documentEventSource.next(t.target)})}documentScroll(){return this.documentScrollDone}setScrollEventListener(){window.onscroll=()=>{this.documentScrollSource.next(window)}}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),jx=(()=>{let t=class{constructor(t,e,n,i,s,r){this.imgSelectionService=t,this.externalConfigService=e,this.userSettingsService=n,this.canvaService=i,this.imgEventService=s,this.domService=r,this.showSelection=!1,this.imgManagerClosed=new Yl,this._multipleImgMode=!1,this._showImgManagerModule=!1,this.close=!1,this.listDisplayed=!1,this.hideTab=!1}set multipleImgMode(t){this._multipleImgMode=t,this.imgSelectionService.setMultipleImgMode(this._multipleImgMode)}get multipleImgMode(){return this._multipleImgMode}set showImgManagerModule(t){this._showImgManagerModule=t,t&&this.displaySmall()}get showImgManagerModule(){return this._multipleImgMode}onKeydownHandler(t){this.stateDisplayed&&"window"!==this.stateDisplayed&&this.onClose()}ngOnInit(){this.externalConfigService.setExternalConfig(this.externalConfig),this.imgSelectionService.setMultipleImgMode(this._multipleImgMode),this.imgSelectionService.initImgSelectedList(null),this.selectImgEvent=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{t&&t.length&&this.checkCloseImgManager()&&this.onClose()}),this.checkUserDisplayPreference(),this.listDisplayedEvent=this.imgEventService.getlistDisplayedChange().subscribe(t=>this.listDisplayed=t),this.domService.setDocumentEventListener()}checkUserDisplayPreference(){"window"!==this.stateDisplayed&&"full"!==this.stateDisplayed||(this.listDisplayed=this.userSettingsService.getUserDisplayPreference())}setCurrentTab(t){this.hideTab="img-edition"===t}displaySmall(){"window"!==this.stateDisplayed&&setTimeout(()=>{this.stateDisplayed="small",this.addBodyBottomPaddingForModule()},10)}openSmall(){this.stateDisplayed="small",this.setBodyMainScroll(),this.listDisplayed=!1}openFull(){this.stateDisplayed="full",this.checkUserDisplayPreference(),this.hideBodyMainScroll()}onClose(){this.stateDisplayed="closed",this.hideTab=!1,this.setBodyMainScroll(),this.removeBodyBottomPaddingForModule(),setTimeout(()=>{this.imgManagerClosed.emit()},250)}onImgManagerClosed(){this.onClose()}checkCloseImgManager(){return!this.multipleImgMode&&"window"!==this.stateDisplayed}hideBodyMainScroll(){const t=document.getElementsByTagName("html")[0];this.overflowHTML||(this.overflowHTML=t.style.overflowY),t.style.overflowY="hidden"}setBodyMainScroll(){document.getElementsByTagName("html")[0].style.overflowY=this.overflowHTML?this.overflowHTML:"scroll"}addBodyBottomPaddingForModule(){const t=document.getElementsByTagName("body")[0];this.bodyPadding=this.bodyPadding?parseInt(t.style.paddingBottom):0,t.style.paddingBottom=this.bodyPadding+300+"px"}removeBodyBottomPaddingForModule(){void 0!==this.bodyPadding&&(document.getElementsByTagName("body")[0].style.paddingBottom=this.bodyPadding+"px",this.bodyPadding=0)}ngOnDestroy(){this.selectImgEvent.unsubscribe(),this.canvaService.expectedImgSizesChange(null),this.listDisplayedEvent.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax),Ao(Nx),Ao(zx),Ao(Fx),Ao(Vx),Ao(Ux))},t.\u0275cmp=pe({type:t,selectors:[["wz-img-manager"]],hostBindings:function(t,e){1&t&&$o("keydown.escape",(function(t){return e.onKeydownHandler(t)}),!1,Hn)},inputs:{showSelection:"showSelection",multipleImgMode:"multipleImgMode",showImgManagerModule:"showImgManagerModule",stateDisplayed:"stateDisplayed",externalConfig:"externalConfig"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:3,vars:2,consts:[[1,"wz-img-manager"],["class","wz-img-manager__selectionHandler",4,"ngIf"],["class","wz-img-manager__module",3,"ngClass",4,"ngIf"],[1,"wz-img-manager__selectionHandler"],[1,"wz-img-manager__module",3,"ngClass"],["class","wz-img-manager__module__header",4,"ngIf"],[1,"wz-img-manager__module__content","wz-block",3,"ngClass"],[3,"stateDisplayed","multipleImgMode","listDisplayed","imgManagerClosed","currentTab"],[1,"wz-img-manager__module__header"],[3,"click",4,"ngIf"],[3,"click"],[1,"fal","fa-compress-alt"],[1,"fal","fa-expand-alt"],[1,"fal","fa-times"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,rI,2,0,"div",1),Mo(2,pI,4,13,"div",2),zo()),2&t&&(ws(1),Ro("ngIf",e.showSelection),ws(1),Ro("ngIf",e._showImgManagerModule))},directives:function(){return[Zh,nP,qh,Gx]},encapsulation:2}),t})();const Bx=zu("easeInOut",[ju("in",Uu({opacity:1})),Hu(":enter",[Uu({opacity:0}),Fu("0.5s ease-in-out")])]);let Hx=(()=>{let t=class{constructor(t,e){this.nwbAlertService=t,this.translateService=e,this.actionMsg="ImgManager.alert.action",this.alertConfig={message:"",duration:5e3}}openAlert(t){this.closePreviousAlert(),this.translateService.get(t).subscribe(e=>{this.alertConfig.message=e,this.setAlertColor(t),this.alertRefComponent=this.nwbAlertService.open(this.alertConfig),this.alertRefComponent.afterClosed().subscribe()})}openAlertWithBackendRespons(t,e){this.translateService.get(t).subscribe(t=>{this.alertConfig.message=t,this.alertConfig.message+="<br/>"+JSON.parse(e).message,this.closePreviousAlert(),this.alertRefComponent=this.nwbAlertService.open(this.alertConfig),this.alertRefComponent.afterClosed().subscribe()})}closePreviousAlert(){this.alertRefComponent&&this.alertRefComponent.dismiss()}setAlertColor(t){const e=/error/i.test(t);this.alertConfig.color=e?"is-danger":"is-success"}};return t.\u0275fac=function(e){return new(e||t)(Qt(zw),Qt(Nm))},t.\u0275prov=ht({factory:function(){return new t(Qt(zw),Qt(Nm))},token:t,providedIn:"root"}),t})(),$x=(()=>{let t=class{constructor(t,e,n){this.imgManager=t,this.alertService=e,this.externalConfigService=n,this.files=[],this.isLoading=!1,this.imgUploaded=new Yl,this.loadingText="ImgManager.ImgUpload.loading",this.errorUploadingImg="ImgManager.ImgUpload.errorUploadingImg",this.errorNotImg="ImgManager.ImgUpload.errorNotImg"}ngOnInit(){this.assetsIcon=this.getAssets()}filesChangeByClick(t){this.uploadFile(t.target.files)}getAssets(){return this.externalConfigService.getRouteAssets()+"img/icon_picture.svg"}filesChangeByDragAndDrop(t){this.removeDragAndDropStyle(),this.uploadFile(t)}uploadFile(t){if(t&&!t.length)return;this.isLoading=!0;const e=[];for(const n of t){const t=new FormData;t.append("image",n,n.name),this.isFileImage(n.type)?e.push(this.imgManager.uploadFile(t)):(this.alertService.openAlert(this.errorNotImg),this.isLoading=!1)}wg(e).subscribe(t=>{this.onImgUpload(t),this.isLoading=!1},t=>{this.alertService.openAlert(this.errorUploadingImg),this.isLoading=!1})}onImgUpload(t){this.imgUploaded.emit(t)}isFileImage(t){return"image"===t.split("/")[0]}removeDragAndDropStyle(){this.dragAndDropBox.nativeElement.style=""}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Hx),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["img-upload"]],viewQuery:function(t,e){var n;1&t&&hc(gI,!0),2&t&&lc(n=gc())&&(e.dragAndDropBox=n.first)},inputs:{stateDisplayed:"stateDisplayed"},outputs:{imgUploaded:"imgUploaded"},decls:8,vars:9,consts:[["appDragDrop","",1,"img-upload","has-text-centered",3,"ngClass","click","onFileDropped"],["dragAndDropBox",""],["hidden","","type","file","accept","image/*","multiple","",3,"change"],["fileInput",""],[1,"img-upload__container",3,"ngClass"],[1,"img-upload__container__wrapper"],["class","img-upload__container__loader",4,"ngIf"],[4,"ngIf"],[1,"img-upload__container__loader"],[3,"small","position"],[1,"blueColor","img-upload__container__dropImgIconDiv"],["alt","icon picture",3,"src",4,"ngIf"],[1,"img-upload__container__or"],[1,"img-upload__container__text"],[1,"fal","fa-file-upload"],["alt","icon picture",3,"src"]],template:function(t,e){if(1&t){const t=jo();No(0,"div",0,1),$o("click",(function(){return Ye(t),Do(3).click()}))("onFileDropped",(function(t){return e.filesChangeByDragAndDrop(t)})),No(2,"input",2,3),$o("change",(function(t){return e.filesChangeByClick(t)})),zo(),No(4,"div",4),No(5,"div",5),Mo(6,mI,2,2,"div",6),Mo(7,_I,13,10,"ng-container",7),zo(),zo(),zo()}2&t&&(Ro("ngClass",zl(5,vI,"small"===e.stateDisplayed))("@easeInOut","in"),ws(4),Ro("ngClass",zl(7,yI,"small"===e.stateDisplayed)),ws(2),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading))},directives:function(){return[Qx,qh,Zh,DP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),Wx=(()=>{let t=class{constructor(t,e){this.imgManager=t,this.alertService=e,this.picturesList=[],this.pictureNameChanged=new E,this.errorRenameImg="ImgManager.ImgList.errorRenameImg",this.msgSavingImgName="ImgManager.ImgLib.savingImgName",this.msgImgNameSaved="ImgManager.ImgLib.imgNameSaved",this.setEvents()}setPicturesList(t){this.picturesList=t}onRenamePicture(t){this.pictureNameChanged.next(t)}setEvents(){this.pictureNameChanged.pipe(cC(800)).subscribe(t=>{this.renamePicture(t)})}renamePicture(t){const e=this.getPictureById(t.id);e?(this.alertService.openAlert(this.msgSavingImgName),this.imgManager.changeImgName(e.display_name,e.id_file).subscribe(t=>{e.display_name=t.display_name,this.alertService.openAlert(this.msgImgNameSaved)},n=>{e.display_name=t.previousName,this.alertService.openAlert(this.errorRenameImg)})):this.alertService.openAlert(this.errorRenameImg)}getPictureById(t){if(this.picturesList){for(const e of this.picturesList)if(e.id_file===t)return e;return null}}};return t.\u0275fac=function(e){return new(e||t)(Qt(Rx),Qt(Hx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Rx),Qt(Hx))},token:t,providedIn:"root"}),t})(),qx=(()=>{let t=class{constructor(t,e){this.imgSelectionService=t,this.renamePictureService=e,this.picturesList=[],this.multipleImgMode=!1}ngOnInit(){this.setEvents()}onImgUploaded(t){t.forEach(t=>this.picturesList.push(t)),this.renamePictureService.setPicturesList(this.picturesList)}onToggleSelectImg(t){"window"!==this.stateDisplayed&&(this.picturesList[t].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[t].id_file),this.picturesList[t].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[t]),this.picturesList[t].selected=!0))}onRenamePicture(t){this.renamePictureService.onRenamePicture(t)}setEvents(){this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{const e=[];t.map(t=>e.push(t.id_file));for(const n of this.picturesList)-1===e.indexOf(n.id_file)&&(n.selected=!1)})}ngOnDestroy(){this.imgSelectionChange.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax),Ao(Wx))},t.\u0275cmp=pe({type:t,selectors:[["upload-list"]],inputs:{multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed"},decls:45,vars:25,consts:[[1,"upload-list",3,"ngClass"],[1,"upload-list__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"upload-list__box"],[1,"upload-list__box__container"],[1,"mainColor"],[4,"ngIf"],[1,"dropdown","is-hoverable"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menuInfoSeo",1,"fas","fa-info-circle"],["id","dropdown-menuInfoSeo","role","menu",1,"dropdown-menu","dropDownShadow"],[1,"dropdown-content"],[1,"dropdown-item"],[1,"fal","fa-check"],[1,"upload-list__box__cards"],["class","upload-list__box__cards__card",4,"ngFor","ngForOf"],[1,"upload-list__box__cards__card"],[3,"picture","stateDisplayed","toggleImgSelected","pictureNameChange"],[1,"upload-list__box__cards__card__btnBox"],[1,"button","success","upload-list__box__cards__card__btnBox__btn"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"ng-scrollbar",1,2),No(3,"div",3),No(4,"div",4),No(5,"div"),No(6,"p",5),ba(7),Mo(8,bI,3,3,"ng-container",6),Mo(9,wI,3,3,"ng-container",6),zo(),No(10,"div",7),No(11,"div",8),Fo(12,"i",9),zo(),No(13,"div",10),No(14,"div",11),No(15,"div",12),No(16,"p"),ba(17),Wl(18,"translate"),zo(),No(19,"p"),Fo(20,"i",13),ba(21," 100%"),zo(),zo(),No(22,"div",12),No(23,"p"),ba(24),Wl(25,"translate"),zo(),No(26,"p"),Fo(27,"i",13),ba(28," 100%"),zo(),zo(),No(29,"div",12),No(30,"p"),ba(31),Wl(32,"translate"),zo(),No(33,"p"),Fo(34,"i",13),ba(35," 100%"),zo(),zo(),No(36,"div",12),No(37,"p"),ba(38),Wl(39,"translate"),zo(),No(40,"p"),Fo(41,"i",13),ba(42," 100%"),zo(),zo(),zo(),zo(),zo(),zo(),zo(),No(43,"div",14),Mo(44,CI,5,2,"div",15),zo(),zo(),zo(),zo()),2&t&&(Ro("ngClass",zl(20,SI,"small"===e.stateDisplayed))("@easeInOut","in"),ws(1),Ro("visibility","native")("ngClass",Fl(22,II,"small"===e.stateDisplayed,"window"===e.stateDisplayed)),ws(6),Ca(" ",e.picturesList?e.picturesList.length:""," "),ws(1),Ro("ngIf",e.picturesList&&e.picturesList.length>1),ws(1),Ro("ngIf",e.picturesList&&1===e.picturesList.length),ws(8),wa(ql(18,12,"ImgManager.UploadList.seo.rezise")),ws(7),wa(ql(25,14,"ImgManager.UploadList.seo.webp")),ws(7),wa(ql(32,16,"ImgManager.UploadList.seo.cdn")),ws(7),wa(ql(39,18,"ImgManager.UploadList.seo.lazyloading")),ws(6),Ro("ngForOf",e.picturesList))},directives:function(){return[qh,NC,Zh,Qh,Jx]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),Gx=(()=>{let t=class{constructor(t,e){this.imgEventEditService=t,this.alertService=e,this.multipleImgMode=!1,this.listDisplayed=!1,this.imgManagerClosed=new Yl,this.currentTab=new Yl,this.tabActive="images-view",this.tabs=["img-upload","images-view","pexels-lib","img-edition"],this.editTab=!1,this.imgUpload=!1,this.snackBarNewVersionConfig={message:"",duration:3e3}}ngOnInit(){this.imgEventEditService.getImgToEditEventListner().subscribe(t=>{this.tabActive=this.tabs[3],this.imgToEdit=t,this.editTab=!0,this.currentTab.emit(this.tabs[3])})}toggleTabs(t){this.imgUpload=!1,this.editTab=!1,this.tabActive=t}onImgUploaded(t){this.imgUpload=!0,this.imgUploadedComponent.onImgUploaded(t)}onEditClosed(t){this.editTab=!1,this.toggleTabs(this.tabs[1]),t&&this.alertService.openAlert(t),this.currentTab.emit("close")}onShowImgUploaded(){this.tabActive=this.tabs[1]}onImgManagerClosed(){this.imgManagerClosed.emit()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Vx),Ao(Hx))},t.\u0275cmp=pe({type:t,selectors:[["img-tabs"]],viewQuery:function(t,e){var n;1&t&&hc(EI,!0),2&t&&lc(n=gc())&&(e.imgUploadedComponent=n.first)},inputs:{multipleImgMode:"multipleImgMode",listDisplayed:"listDisplayed",stateDisplayed:"stateDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed",currentTab:"currentTab"},decls:23,vars:34,consts:[[1,"img-tabs",3,"ngClass"],[1,"wrapper-tabs"],[1,"tabs",3,"ngClass"],[1,"is-active",3,"ngClass","click"],[3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[1,"img-tabs__canva",3,"ngClass"],[3,"stateDisplayed","showImgUploaded"],["class","columns img-tabs__tabsFirst",3,"ngClass",4,"ngIf"],["class","columns img-tabs__tabsSecond",4,"ngIf"],["class","columns img-tabs__tabsThird",4,"ngIf"],["class","columns img-tabs__tabsEdit",4,"ngIf"],[3,"ngClass"],[1,"columns","img-tabs__tabsFirst",3,"ngClass"],[1,"column","img-tabs__tabsFirst__upload"],[3,"stateDisplayed","imgUploaded"],[1,"column","img-tabs__tabsFirst__list",3,"ngClass"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize",4,"ngIf"],[3,"hidden"],[3,"stateDisplayed","tabDisplayed","multipleImgMode"],["imgUploadedImg",""],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize"],[1,"columns","img-tabs__tabsSecond"],[1,"column"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","fullSize"],[1,"columns","img-tabs__tabsThird"],[1,"columns","img-tabs__tabsEdit"],[3,"stateDisplayed","imgToEdit","editClosed"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div",2),No(3,"ul"),No(4,"li",3),$o("click",(function(){return e.toggleTabs(e.tabs[0])})),No(5,"a"),ba(6),Wl(7,"translate"),zo(),zo(),No(8,"li",4),$o("click",(function(){return e.toggleTabs(e.tabs[1])})),No(9,"a"),ba(10),Wl(11,"translate"),zo(),zo(),No(12,"li",4),$o("click",(function(){return e.toggleTabs(e.tabs[2])})),No(13,"a"),ba(14),Wl(15,"translate"),zo(),zo(),Mo(16,PI,4,6,"li",5),zo(),No(17,"div",6),No(18,"canva-btn",7),$o("showImgUploaded",(function(){return e.onShowImgUploaded()})),zo(),zo(),zo(),zo(),Mo(19,DI,8,13,"div",8),Mo(20,AI,3,5,"div",9),Mo(21,OI,3,1,"div",10),Mo(22,RI,3,2,"div",11),zo()),2&t&&(Ro("ngClass",zl(21,LI,"small"===e.stateDisplayed)),ws(2),Ro("ngClass",Fl(23,NI,"window"!==e.stateDisplayed,"window"===e.stateDisplayed&&e.tabActive===e.tabs[3])),ws(2),Ro("ngClass",zl(26,xI,e.tabActive===e.tabs[0])),ws(2),wa(ql(7,15,"ImgManager.Tabs.addImg")),ws(2),Ro("ngClass",zl(28,xI,e.tabActive===e.tabs[1])),ws(2),wa(ql(11,17,"ImgManager.Tabs.imgLib")),ws(2),Ro("ngClass",zl(30,xI,e.tabActive===e.tabs[2])),ws(2),wa(ql(15,19,"ImgManager.Tabs.freeImgLib")),ws(2),Ro("ngIf",e.editTab),ws(1),Ro("ngClass",zl(32,zI,"window"===e.stateDisplayed)),ws(1),Ro("stateDisplayed",e.stateDisplayed),ws(1),Ro("ngIf",e.tabActive===e.tabs[0]),ws(1),Ro("ngIf",e.tabActive===e.tabs[1]),ws(1),Ro("ngIf",e.tabActive===e.tabs[2]),ws(1),Ro("ngIf",e.tabActive===e.tabs[3]))},directives:function(){return[qh,Zh,eP,$x,qx,hP,Yx,tP]},pipes:function(){return[zm]},encapsulation:2}),t})(),Qx=(()=>{let t=class{constructor(){this.onFileDropped=new Yl,this.background="#fff",this.opacity="1"}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.background="#f5f5f5",this.opacity="0.8"}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.background="#fff",this.opacity="1"}ondrop(t){t.preventDefault(),t.stopPropagation(),this.background="#f5f5f5",this.opacity="1";const e=t.dataTransfer.files;e.length>0&&this.onFileDropped.emit(e)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["","appDragDrop",""]],hostVars:4,hostBindings:function(t,e){1&t&&$o("dragover",(function(t){return e.onDragOver(t)}))("dragleave",(function(t){return e.onDragLeave(t)}))("drop",(function(t){return e.ondrop(t)})),2&t&&oa("background-color",e.background)("opacity",e.opacity)},outputs:{onFileDropped:"onFileDropped"}}),t})(),Kx=(()=>{let t=class{constructor(t,e,n){this.http=t,this.externalConfigService=e,this.translateService=n,this.languages={fr:"fr-FR",en:"en-US",it:"it-IT",es:"es-ES"},this.setLang(this.translateService.currentLang),this.translateService.onLangChange.subscribe(t=>{this.setLang(t.lang)})}setLang(t){this.lang=this.languages[t]?this.languages[t]:"fr-FR"}searchOnPexels(t,e,n){this.apiBaseUrl&&!this.apiKey||(this.apiBaseUrl=this.externalConfigService.getPexelsApiURL(),this.apiKey=this.externalConfigService.getPexelsApiToken());const i={headers:new kg({Authorization:"Bearer "+this.apiKey})};let s;if(t&&!/^\s*$/.test(t))s=`/search?query=${t}&per_page=${e}&page=${n}&locale=${this.lang}`;else{const t=this.externalConfigService.getShopCategory();s=t&&"other"!==t&&"btob"!==t?`/search?query=${t}&per_page=${e}&page=${n}&locale=en-US`:`/curated?per_page=${e}&page=${n}`}return this.http.get(this.apiBaseUrl+s,i).pipe(z(t=>t))}};return t.\u0275fac=function(e){return new(e||t)(Qt(Hg),Qt(Nx),Qt(Nm))},t.\u0275prov=ht({factory:function(){return new t(Qt(Hg),Qt(Nx),Qt(Nm))},token:t,providedIn:"root"}),t})();const Zx=zu("listAnimation",[Hu(":enter, * => 0, * => -1",[]),Hu(":increment",[$u(":enter",[Uu({opacity:0,transform:"translateY(100px)"}),Wu(50,[Fu("500ms cubic-bezier(0.35, 0, 0.25, 1)",Uu({opacity:1,transform:"none"}))])],{optional:!0})])]);let Yx=(()=>{let t=class{constructor(t,e,n,i){this.wzImgLibService=t,this.imgManager=e,this.alertService=n,this.translateService=i,this.searchValue="",this.disableSearch=!1,this.showImgUploaded=new Yl,this.perPage=30,this.searchUpdated=new E,this.nbResult=0,this.currentPage=1,this.isLoading=!0,this.initComponent=!0,this.photosColumns=[],this.nbColumuns=6,this.responsiveColumns=[1250,1050,750,500],this.outerElement=null,this.uploadingImg="ImgManager.PexelLib.uploadingImg",this.untitled="ImgManager.PexelLib.untitled",this.successUploadPhoto="ImgManager.PexelLib.successImport",this.errorUploadPhoto="ImgManager.PexelLib.errorUploadPhoto",this.errorRetrievePhotos="ImgManager.PexelLib.errorRetrievePhotos",this.subs=[]}set content(t){this.outerElement=t}ngOnInit(){}ngAfterViewInit(){this.oldSearchValue=this.searchValue,this.isLoading=!1,this.setNbColumnsToDisplayPhoto(),this.setPhotosColumns(),this.search()}setNbColumnsToDisplayPhoto(){const t=this.outerElement.nativeElement.offsetWidth;"window"!==this.stateDisplayed&&(this.nbColumuns=8),this.responsiveColumns.forEach(e=>{t<e&&this.nbColumuns--})}onSearchNameChanged(){this.onSearchChange()}onBottomReached(){this.scrollHandler()}onSearchChange(){this.search()}search(){if(this.isLoading)return;if(this.searchValue!==this.oldSearchValue&&this.resetSearch(),this.nbResult&&this.nbResult<=(this.currentPage-1)*this.perPage)return;this.isLoading=!0;const t=this.wzImgLibService.searchOnPexels(this.searchValue,this.perPage,this.currentPage).subscribe(t=>{this.wzImgLibDto=t,this.nbResult=this.wzImgLibDto.total_results,this.nbResult&&t.photos.forEach(t=>{const e=this.getBestColumn();this.photosColumns[e].height+=t.height/t.width*1e3,this.photosColumns[e].photos.push(t)}),this.isLoading=!1,this.initComponent=!1},t=>{this.isLoading=!1,this.initComponent=!1,this.alertService.openAlert(this.errorRetrievePhotos)});this.subs.push(t)}scrollHandler(){if(this.isLoading)return;const t=this.getBestColumn(),e=this.photosColumns[t].photos[this.photosColumns[t].photos.length-1];e&&document.querySelector('img[src="'+e.src.medium+'"]')&&(this.isLoading||(this.currentPage+=1,this.search()))}setPhotosColumns(){for(let t=0;t<this.nbColumuns;t++)this.photosColumns.push({height:0,photos:[]})}getBestColumn(){const t={index:0,height:this.photosColumns[0].height};return this.photosColumns.forEach((e,n)=>{t.height>e.height&&(t.index=n,t.height=e.height)}),t.index}resetSearch(){this.oldSearchValue=this.searchValue,this.photosColumns=[],this.currentPage=1,this.setPhotosColumns()}uploadPhoto(t,e){t.uploading=!0;const n=this.imgManager.uploadFileByUrl(e,this.translateService.instant(this.untitled)).subscribe(e=>{t.uploading=!1,t.uploaded=!0,this.alertService.openAlert(this.successUploadPhoto)},e=>{t.uploading=!1,406===e.error.code&&e.error.message?this.alertService.openAlertWithBackendRespons(this.errorUploadPhoto,e.error.message):this.alertService.openAlert(this.errorUploadPhoto)});this.alertService.openAlert(this.uploadingImg),this.subs.push(n)}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}};return t.\u0275fac=function(e){return new(e||t)(Ao(Kx),Ao(Rx),Ao(Hx),Ao(Nm))},t.\u0275cmp=pe({type:t,selectors:[["pexels-lib"]],viewQuery:function(t,e){var n;1&t&&hc(FI,!0),2&t&&lc(n=gc())&&(e.content=n.first)},inputs:{searchValue:"searchValue",disableSearch:"disableSearch",stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:8,vars:9,consts:[[1,"pexels-lib"],["outerElement",""],["reachedOffset","50",1,"pexels-lib__scroll",3,"visibility","ngClass","reachedBottom"],["scrollable",""],["class","pexels-lib__search",3,"ngClass",4,"ngIf"],["class","pexels-lib__wrapper",4,"ngIf"],[4,"ngIf"],["class","pexels-lib__alert",4,"ngIf"],[1,"pexels-lib__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"pexels-lib__wrapper"],["class","pexels-lib__wrapper__result-nb",4,"ngIf"],[1,"pexels-lib__wrapper__result"],["class","pexels-lib__wrapper__result__column",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result-nb"],[1,"pexels-lib__wrapper__result__column"],["class","pexels-lib__wrapper__result__column__element",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result__column__element"],[1,"pexels-lib__wrapper__result__column__element__img",3,"alt","src"],[1,"pexels-lib__wrapper__result__column__element__wrapper"],[1,"pexels-lib__wrapper__result__column__element__wrapper__infos"],[1,"dropdown","is-up",3,"ngClass"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"button","pexels-lib__wrapper__result__column__element__wrapper__button"],[3,"click",4,"ngIf"],["id","dropdown-menu","role","menu",1,"dropdown-menu","pexels-lib__wrapper__result__column__element__wrapper__dropdown"],[1,"dropdown-content"],[1,"dropdown-content__wrapper"],[1,"dropdown-item",3,"click"],[1,"fal","fa-check","iPortrait"],[1,"fal","fa-check","iLandscape"],[1,"fal","fa-check","iOriginal"],[3,"click"],[1,"icon","is-small"],["aria-hidden","true",1,"fas","fa-angle-up"],[1,"fal","fa-check"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"pexels-lib__alert"],[3,"warning"]],template:function(t,e){1&t&&(No(0,"div",0,1),No(2,"ng-scrollbar",2,3),$o("reachedBottom",(function(){return e.onBottomReached()})),Mo(4,UI,3,8,"div",4),Mo(5,QI,4,2,"div",5),Mo(6,KI,2,0,"ng-container",6),Mo(7,ZI,4,5,"div",7),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(2),Ro("visibility","hover")("ngClass",zl(7,YI,"small"===e.stateDisplayed)),ws(2),Ro("ngIf",!e.disableSearch),ws(1),Ro("ngIf",!e.initComponent),ws(1),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading&&!e.nbResult))},directives:function(){return[NC,qh,eS,Zh,fP,Zm,Kf,Qh,iP,DP,AP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx,Zx]}}),t})(),Xx=(()=>{let t=class{constructor(t,e,n,i,s,r,o,a){this.imgManager=t,this.imgSelectionService=e,this.http=n,this.imgCDNService=i,this.imgEventCardService=s,this.alertService=r,this.translateService=o,this.externalService=a,this.picturesList=[],this.picturesListChange=new Yl,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:30,currentPage:1},this.displayPexelsResults=!1,this.disable=!1,this.disableChange=new Yl,this.filtersChange=new Yl,this.pictureNameChange=new Yl,this.isLoading=!1,this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg",this.errorAlreadyUsedImg="ImgManager.ImgList.errorAlreadyUsed",this.fakeImgRoute=this.externalService.getRouteAssets()+"img/fake.png"}onToggleAllCheckBoxRow(t){this.picturesList.forEach(e=>{e.delSelected=t}),this._pictureListeChange()}onToggleDelSelection(t){this.disable||(this.picturesList[t].delSelected=!this.picturesList[t].delSelected,this._pictureListeChange())}onFiltersChange(){this.filtersChange.emit()}onEdit(t){this.imgEventCardService.emitImgToEdit(t)}onToggleSelectImg(t){this.disable||"window"===this.stateDisplayed||(this.picturesList[t].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[t].id_file),this.picturesList[t].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[t]),this.picturesList[t].selected=!0))}onRemoveImg(t){t.deleted=!0,this.imgManager.removeImg(t.id_file).subscribe(e=>{this.imgEventCardService.emitImgRemoved(t.id_file),this.imgSelectionService.removeImgSelectedById(t.id_file)},e=>{const n=409===e.status?this.errorAlreadyUsedImg:this.errorRemoveImg;t.deleted=!1,this.alertService.openAlert(n)})}onPictureNotLoading(t){t.target.src=this.fakeImgRoute}onDownloadImg(t,e){this.http.get(this.getRAWImgRoute(e),{responseType:"blob"}).subscribe(e=>{let n=URL.createObjectURL(e);this.downloadUrl(n,t),URL.revokeObjectURL(n)})}onNameChange(t){this.pictureNameChange.emit({id:t,previousName:this.previousName})}getRAWImgRoute(t){return this.imgCDNService.getUrlImg("raw")+t}_pictureListeChange(){this.picturesListChange.emit()}downloadUrl(t,e){const n=document.createElement("a");n.href=t,n.download=e,n.click()}ngDestroy(){this.getDataAPISub&&this.getDataAPISub.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275dir=ye({type:t,inputs:{picturesList:"picturesList",tableFilters:"tableFilters",displayPexelsResults:"displayPexelsResults",disable:"disable",isLoading:"isLoading",stateDisplayed:"stateDisplayed"},outputs:{picturesListChange:"picturesListChange",disableChange:"disableChange",filtersChange:"filtersChange",pictureNameChange:"pictureNameChange"}}),t})(),Jx=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.focusInput=!1,this.toggleImgSelected=new Yl,this.isUploadSection=!1,this.activeConfirmDelete=!1}ngOnInit(){this.isUploadSection="img-upload"===this.tabDisplayed}onToggleImgSelected(){this.toggleImgSelected.next()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["img-card"]],inputs:{tabDisplayed:"tabDisplayed",fullSize:"fullSize",picture:"picture",index:"index"},outputs:{toggleImgSelected:"toggleImgSelected"},features:[Pa],decls:24,vars:36,consts:[[1,"addCssPriority",3,"ngClass"],[1,"img-card"],[1,"img-card__container",3,"ngClass"],[1,"img-card__container__img",3,"src","alt","click","error"],["class","img-card__container__config",4,"ngIf"],[1,"img-card__container__delete",3,"ngClass"],[3,"click"],["class","img-card__container__valid",4,"ngIf"],["class","img-card__container__overlay",3,"ngClass",4,"ngIf"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"img-card__nameContainer",3,"ngClass"],["type","text",1,"wzImgMngInput","img-card__nameContainer__name",3,"ngModel","ngModelChange","focus","blur"],[1,"img-card__container__config"],[1,"size"],[1,"fal","fa-image-polaroid"],[1,"dl",3,"click"],[1,"fal","fa-download"],[1,"edit",3,"click"],[1,"far","fa-crop-alt"],[1,"deleted",3,"click"],[1,"fal","fa-times"],["class","selected",3,"click",4,"ngIf"],[1,"selected",3,"click"],["class","fal fa-square",4,"ngIf"],["class","fas fa-check-square checked",4,"ngIf"],[1,"fal","fa-square"],[1,"fas","fa-check-square","checked"],[1,"img-card__container__valid"],[1,"far","fa-check"],[1,"img-card__container__overlay",3,"ngClass"],[1,"fad","fa-folder-times",3,"click"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div",2),No(3,"img",3),$o("click",(function(){return e.onToggleImgSelected()}))("error",(function(t){return e.picture.imgNotLoaded=!0,e.onPictureNotLoading(t)})),Wl(4,"imgSrc"),zo(),Mo(5,eE,21,12,"div",4),No(6,"div",5),No(7,"span"),ba(8),Wl(9,"translate"),zo(),No(10,"div"),No(11,"button",6),$o("click",(function(){return e.activeConfirmDelete=!1})),ba(12),Wl(13,"translate"),zo(),No(14,"button",6),$o("click",(function(){return e.onRemoveImg(e.picture),e.activeConfirmDelete=!1})),ba(15),Wl(16,"translate"),zo(),zo(),zo(),Mo(17,nE,5,3,"div",7),Mo(18,sE,2,3,"div",8),Mo(19,rE,1,0,"span",9),zo(),No(20,"div",10),No(21,"input",11),$o("ngModelChange",(function(t){return e.picture.display_name=t}))("ngModelChange",(function(){return e.onNameChange(e.picture.id_file)}))("focus",(function(){return e.previousName=e.picture.display_name,e.focusInput=!0}))("blur",(function(){return e.focusInput=!1})),zo(),No(22,"span"),ba(23),zo(),zo(),zo(),zo()),2&t&&(Ro("@easeInOut","in")("ngClass",zl(25,oE,e.fullSize)),ws(2),Ro("ngClass",Vl(27,aE,"small"===e.stateDisplayed||e.isUploadSection,e.picture.selected,e.picture.deleted)),ws(1),Ro("src",Gl(4,16,e.picture.file_name,"400"),Ji)("alt",e.picture.display_name),ws(2),Ro("ngIf",!e.picture.deleted&&"small"!==e.stateDisplayed),ws(1),Ro("ngClass",zl(31,lE,e.activeConfirmDelete)),ws(2),wa(ql(9,19,"ImgManager.ImgCard.confirmDeleteImg")),ws(4),wa(ql(13,21,"no")),ws(3),wa(ql(16,23,"yes")),ws(2),Ro("ngIf","small"===e.stateDisplayed&&"img-upload"==e.tabDisplayed),ws(1),Ro("ngIf",e.picture.imgNotLoaded),ws(1),Ro("ngIf",e.picture.deleted),ws(1),Ro("ngClass",Fl(33,cE,"small"===e.stateDisplayed||e.isUploadSection,e.focusInput)),ws(1),Ro("ngModel",e.picture.display_name),ws(2),wa(e.picture.display_name))},directives:function(){return[qh,Zh,$m,Zm,Kf,iP]},pipes:function(){return[TP,zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),tP=(()=>{let t=class{constructor(t){this.imgManagerService=t,this.editClosed=new Yl,this.isLoading=!1,this.isImgModified=!1,this.isNameModified=!1,this.currentCroppedImage="",this.msgFailSave="ImgManager.ImgEditor.msgFailSave",this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.msgSuccessEdit="Les modifications de l'image ont bien \xe9t\xe9 enregistr\xe9es."}ngOnInit(){this.previousName=this.imgToEdit.display_name}onSave(){if(this.isLoading)return;this.isLoading=!0;const t=this.imgManagerService.replaceImg(this.currentCroppedImage,this.imgToEdit.id_file),e=this.imgManagerService.changeImgName(this.imgToEdit.display_name,this.imgToEdit.id_file);this.isImgModified&&this.isNameModified?this.ranameAndReplaceImg(e,t):this.isImgModified?t.subscribe(t=>{this.isLoading=!1,this.onEditClosed(this.msgSuccessEdit)},t=>{this.isLoading=!1,this.currentCroppedImage="",this.onEditClosed(this.msgFailSave)}):(this.isNameModified&&e.subscribe(t=>{this.isLoading=!1,this.previousName=this.imgToEdit.display_name,this.onEditClosed(this.msgSuccessEdit)},t=>{this.isLoading=!1,this.imgToEdit.display_name=this.previousName,this.onEditClosed(this.msgFailSave)}),this.isNameModified=!1)}onEditClosed(t){this.editClosed.emit(t)}onRestartEdit(){this.isImgModified=!1,this.isNameModified=!1,this.imgToEdit.display_name=this.previousName}onCancel(){this.onEditClosed("")}onImgCropped(t){this.currentCroppedImage=t}ranameAndReplaceImg(t,e){t.subscribe(t=>{e.subscribe(t=>{this.onEditClosed(this.msgSuccessEdit)},t=>{this.onEditClosed(this.msgFailSave)})},t=>{this.onEditClosed(this.msgFailSave)})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx))},t.\u0275cmp=pe({type:t,selectors:[["img-editor"]],inputs:{stateDisplayed:"stateDisplayed",imgToEdit:"imgToEdit"},outputs:{editClosed:"editClosed"},decls:17,vars:22,consts:[[1,"img-editor"],[1,"img-editor__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"columns"],[1,"column","is-one-third","img-editor__infoSection"],[3,"imgToEdit","isNameModified","isNameModifiedChange"],[1,"img-editor__infoSection__actions"],[1,"button","img-editor__infoSection__actions__cancel",3,"disabled","click"],[1,"button","danger","button","img-editor__infoSection__actions__save",3,"ngClass","click"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"column","img-editor__container"],[3,"imgToEdit","isImgModified","isImgModifiedChange","currentCroppedImageChange","editClosed"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"ng-scrollbar",1,2),No(3,"div",3),No(4,"div",4),No(5,"info-section",5),$o("isNameModifiedChange",(function(t){return e.isNameModified=t})),zo(),No(6,"div",6),No(7,"div"),No(8,"button",7),$o("click",(function(){return e.onCancel()})),ba(9),Wl(10,"translate"),zo(),No(11,"div",8),$o("click",(function(){return e.onSave()})),ba(12),Wl(13,"translate"),Mo(14,hE,1,0,"span",9),zo(),zo(),zo(),zo(),No(15,"div",10),No(16,"cropper",11),$o("isImgModifiedChange",(function(t){return e.isImgModified=t}))("currentCroppedImageChange",(function(t){return e.onImgCropped(t)}))("editClosed",(function(t){return e.onEditClosed(t)})),zo(),zo(),zo(),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(1),Ro("visibility","native")("ngClass",Vl(16,uE,"full"===e.stateDisplayed,"small"===e.stateDisplayed,"window"===e.stateDisplayed)),ws(4),Ro("imgToEdit",e.imgToEdit)("isNameModified",e.isNameModified),ws(3),Ro("disabled",e.isLoading),ws(1),Ca(" ",ql(10,12,"ImgManager.ImgLib.cancel")," "),ws(2),Ro("ngClass",zl(20,dE,e.isLoading)),ws(1),Ca(" ",ql(13,14,"ImgManager.ImgEditor.saveBtn")," "),ws(2),Ro("ngIf",e.isLoading),ws(2),Ro("imgToEdit",e.imgToEdit)("isImgModified",e.isImgModified))},directives:function(){return[NC,qh,aP,Zh,cP,iP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),eP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.canvaService=t,this.imgManager=e,this.wzImgEventService=n,this.translateService=i,this.alertService=s,this.renderer=r,this.showImgUploaded=new Yl,this.imgLoading=!1,this.availableFormat={"ImgManager.CanvaBtn.smallSquare":{width:500,height:500},"ImgManager.CanvaBtn.mediumSquare":{width:1e3,height:1e3},"ImgManager.CanvaBtn.bigSquare":{width:2500,height:2500}},this.openDropDownMenu=!1,this.subs=[],this.uploadingImg="ImgManager.CanvaBtn.uploadingImg",this.successUploadPhoto="ImgManager.CanvaBtn.successImport",this.errorUploadCanvaImg="ImgManager.CanvaBtn.errorUploadCanvaImg",this.errorRenameCanvaImg="ImgManager.CanvaBtn.errorRenameCanvaImg"}ngOnInit(){this.canvaLogoRouteAssets=this.canvaService.getCanvaLogo(),this.listenCanvaExpectedSize()}listenCanvaExpectedSize(){const t=this.canvaService.bindEventExepectedImgSizeChange().subscribe(t=>{t?(this.expectedWidth=parseInt(t.image_width,10),this.expectedHeight=parseInt(t.image_height,10)):(this.expectedWidth=void 0,this.expectedHeight=void 0)});this.subs.push(t)}onOpenCanva(t,e){if(this.imgLoading)return;const n=this.canvaService.getCanvaApi().subscribe(n=>{this.canvaApi=n,this.addOverflowBody(),this.createDesign(t,e)});this.subs.push(n)}createDesign(t,e){const n={type:"EtsyShopIcon",dimensions:{units:"px",width:t||void 0,height:e||void 0},publishLabel:this.translateService.instant("ImgManager.CanvaBtn.publish")};this.canvaApi.createDesign({design:n,onDesignPublish:({exportUrl:t,designTitle:e})=>this.designPublished(t,e),onDesignClose:()=>{this.removeOverflowBody()}})}designPublished(t,e){this.alertService.openAlert(this.uploadingImg),this.imgLoading=!0;const n=this.imgManager.uploadFileByUrl(t,e).subscribe(t=>{this.imgLoading=!1,this.removeOverflowBody(),this.wzImgEventService.emitImgAdded(t.id_file),this.alertService.openAlert(this.successUploadPhoto)},t=>{this.imgLoading=!1,this.removeOverflowBody(),406===t.error.code&&t.error.message?this.alertService.openAlertWithBackendRespons(this.errorUploadCanvaImg,t.error.message):this.alertService.openAlert(this.errorUploadCanvaImg)});this.subs.push(n)}addOverflowBody(){this.renderer.addClass(document.body,"ovh-canva")}removeOverflowBody(){this.renderer.removeClass(document.body,"ovh-canva")}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}};return t.\u0275fac=function(e){return new(e||t)(Ao(Fx),Ao(Rx),Ao(Vx),Ao(Nm),Ao(Hx),Ao(Ya))},t.\u0275cmp=pe({type:t,selectors:[["canva-btn"]],inputs:{stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:24,vars:23,consts:[["wzAutoHide","",1,"canva","dropdown","is-right","is-hoverable",3,"ngClass","clickOutside"],[1,"dropdown-trigger"],["aria-controls","dropdown-menuCanva",1,"button","canva-btn",3,"click"],[1,"canva-btn__logo",3,"src"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["id","dropdown-menuCanva","role","menu",1,"dropdown-menu","dropDownShadow",3,"ngClass"],[1,"smallScroll",3,"visibility"],["scrollable",""],[1,"dropdown-content"],[1,"dropdownTitle"],[1,"infoItem"],["class","dropdown-item-wrapper",4,"ngIf"],["class","dropdown-item-wrapper",4,"ngFor","ngForOf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"dropdown-item-wrapper"],[1,"dropdown-item","expectedSizes",3,"click"],[1,"dropdown-item",3,"click"]],template:function(t,e){1&t&&(No(0,"div",0),$o("clickOutside",(function(){return e.openDropDownMenu=!1})),No(1,"div",1),No(2,"div",2),$o("click",(function(){return e.openDropDownMenu=!0})),No(3,"span"),ba(4),Wl(5,"translate"),zo(),Fo(6,"img",3),Mo(7,pE,1,0,"span",4),zo(),zo(),No(8,"div",5),No(9,"ng-scrollbar",6,7),No(11,"div",8),No(12,"div",9),No(13,"p"),ba(14),Wl(15,"translate"),zo(),zo(),No(16,"div",10),No(17,"p"),ba(18),Wl(19,"translate"),zo(),zo(),Vo(20),Mo(21,gE,7,5,"div",11),Uo(),Mo(22,mE,7,5,"div",12),Wl(23,"keyvalue"),zo(),zo(),zo(),zo()),2&t&&(Ro("ngClass",Fl(18,fE,"small"===e.stateDisplayed,"small"!==e.stateDisplayed)),ws(4),wa(ql(5,10,"ImgManager.CanvaBtn.createImg")),ws(2),Ro("src",e.canvaLogoRouteAssets,Ji),ws(1),Ro("ngIf",e.imgLoading),ws(1),Ro("ngClass",zl(21,_E,e.openDropDownMenu)),ws(1),Ro("visibility","hover"),ws(5),wa(ql(15,12,"ImgManager.CanvaBtn.createImg.title")),ws(4),wa(ql(19,14,"ImgManager.CanvaBtn.info")),ws(3),Ro("ngIf",e.expectedWidth&&e.expectedHeight),ws(1),Ro("ngForOf",ql(23,16,e.availableFormat)))},directives:function(){return[sP,qh,Zh,NC,Qh,iP]},pipes:function(){return[zm,tu]},encapsulation:2}),t})(),nP=(()=>{let t=class{constructor(t){this.imgSelectionService=t,this.imgManagerClosed=new Yl,this.imgSelectedList=[],this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1,this.dragStart=!1,this.isLoading=!1,this.trashPositionIndex=0,this.trashPositionLeft="-5px"}ngOnInit(){this.getImgSelected(),this.imgSelectionService.getImgListLoadingEventListner().subscribe(t=>{this.isLoading=t})}init(){this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1}getImgSelected(){this.imgSelectedList=this.imgSelectionService.getImgSelection()}removeImg(t){this.imgSelectionService.removeImgSelectedByIndex(t)}drop(t){t.previousIndex!==t.currentIndex&&this.imgSelectionService.moveImgOrder(t)}removeImgFromSelection(t){this.imgSelectionService.removeImgSelectedByIndex(t.previousIndex)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax))},t.\u0275cmp=pe({type:t,selectors:[["img-selection"]],inputs:{tabDisplayed:"tabDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:7,vars:5,consts:[["cdkDropList","",1,"trash",3,"cdkDropListDropped"],["unSelectList","cdkDropList"],["class","img-selection",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"img-selection",3,"ngClass"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"list_img_selection",3,"cdkDropListConnectedTo","cdkDropListDropped"],["selectionList","cdkDropList"],["class","img_box","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf"],["cdkDrag","",1,"img_box",3,"cdkDragStarted","cdkDragEnded"],["class","drag__img",3,"src","title",4,"ngIf"],[1,"delete-btn",3,"click"],[1,"drag__tooltips"],[1,"drag__img",3,"src","title"]],template:function(t,e){1&t&&(No(0,"div",0,1),$o("cdkDropListDropped",(function(t){return e.removeImgFromSelection(t)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),zo(),Mo(5,SE,4,7,"div",2),Mo(6,IE,2,0,"ng-container",3)),2&t&&(ws(3),wa(ql(4,3,"ImgManager.ImgSelection.unselect")),ws(2),Ro("ngIf",!e.isLoading),ws(1),Ro("ngIf",e.isLoading))},directives:function(){return[YS,Zh,qh,Qh,eI,DP]},pipes:function(){return[zm,TP]},encapsulation:2}),t})(),iP=(()=>{let t=class{constructor(t){this.currentLoading=0,this.interval=null,this.element=t,this.launchLoading()}launchLoading(){null===this.interval&&(this.currentLoading=10,this.element.nativeElement.style.width=this.currentLoading+"%",this.interval=setInterval(()=>{this.currentLoading<80&&(this.currentLoading+=Math.floor(15*Math.random()),this.element.nativeElement.style.width=this.currentLoading+"%"),this.currentLoading>=80&&this.currentLoading<95&&(this.currentLoading+=Math.floor(2*Math.random()),this.element.nativeElement.style.width=this.currentLoading+"%")},70))}ngOnDestroy(){this.interval&&(clearInterval(this.interval),this.interval=null)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","btnLoadingAnim",""]]}),t})(),sP=(()=>{let t=class{constructor(t,e){this._elementRef=t,this.domService=e,this.forceOn=null,this.clickOutside=new Yl}ngAfterViewInit(){this.domService.documentEvent().subscribe(t=>{const e=this._elementRef.nativeElement.contains(t),n=t.getAttribute("class");if(e||null!==n&&n.includes(this.triggerElement)||this.clickOutside.emit(null),null!=this.forceOn&&null!==n){let t=!0;this.forceOn.forEach(e=>{n.includes(e)||(t=!1)}),t&&this.clickOutside.emit(null)}})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ux))},t.\u0275dir=ye({type:t,selectors:[["","wzAutoHide",""]],inputs:{forceOn:"forceOn",triggerElement:"triggerElement"},outputs:{clickOutside:"clickOutside"}}),t})(),rP=(()=>{let t=class{constructor(){this.copied=new Yl}onClick(t){if(t.preventDefault(),!this.payload)return;let e=t=>{(t.clipboardData||window.clipboardData).setData("text",this.payload.toString()),t.preventDefault(),this.copied.emit(this.payload)};document.addEventListener("copy",e,!1),document.execCommand("copy"),document.removeEventListener("copy",e,!1)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["","copy-clipboard",""]],hostBindings:function(t,e){1&t&&$o("click",(function(t){return e.onClick(t)}))},inputs:{payload:["copy-clipboard","payload"]},outputs:{copied:"copied"}}),t})(),oP=(()=>{let t=class{constructor(){this.disable=!1}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["dropdown"]],inputs:{disable:"disable",dropDownMenuClass:"dropDownMenuClass"},ngContentSelectors:xE,decls:6,vars:4,consts:[[1,"dropdown","dropdownWizi",3,"ngClass"],[1,"dropdown-trigger"],["role","menu",1,"dropdown-menu",3,"ngClass"],[1,"dropdown-content"]],template:function(t,e){1&t&&(Ko(EE),No(0,"div",0),No(1,"div",1),Zo(2),zo(),No(3,"div",2),No(4,"div",3),Zo(5,1),zo(),zo(),zo()),2&t&&(Ro("ngClass",zl(2,WI,!e.disable)),ws(3),Ro("ngClass",e.dropDownMenuClass))},directives:[qh],encapsulation:2}),t})(),aP=(()=>{let t=class{constructor(t){this.alertService=t,this._isNameModified=!1,this.isNameModifiedChange=new Yl,this.msgCopyToClipBoard="ImgManager.ImgEditor.copytoClipBoard"}set isNameModified(t){this._isNameModified=t}get isNameModified(){return this._isNameModified}ngOnInit(){this.init()}init(){this.imgName=this.imgToEdit.display_name}getFileSize(){return this.imgToEdit?Math.round(parseInt(this.imgToEdit.size)/1e3):"-"}copyToClipBoard(t){this.alertService.openAlert(this.msgCopyToClipBoard)}onNameChange(){this.isNameModifiedChange.emit(!0)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Hx))},t.\u0275cmp=pe({type:t,selectors:[["info-section"]],inputs:{isNameModified:"isNameModified",imgToEdit:"imgToEdit"},outputs:{isNameModifiedChange:"isNameModifiedChange"},decls:76,vars:60,consts:[[1,"img-editor__infoSection__propertyEditable"],[1,"mainColor"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertyEditable__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"],[1,"fas","fa-info-circle"],["type","text","debounceKeyUp","",1,"img-editor__infoSection__propertyEditable__input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[3,"copy-clipboard","copied"],[1,"img-editor__infoSection__propertyEditable__span"],[1,"far","fa-copy"],[1,"img-editor__infoSection__property"],[1,"img-editor__infoSection__divider"],[1,"img-editor__infoSection__titleSEO"],[1,"img-editor__infoSection__propertySEO"],[1,"fal","fa-check"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertySEO__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"p",1),ba(2),Wl(3,"translate"),No(4,"span",2),Wl(5,"translate"),Fo(6,"i",3),zo(),zo(),No(7,"input",4),$o("ngModelChange",(function(t){return e.imgToEdit.display_name=t}))("onEventChange",(function(){return e.onNameChange()})),Wl(8,"translate"),zo(),zo(),No(9,"div",0),No(10,"p",1),ba(11),Wl(12,"translate"),zo(),No(13,"button",5),$o("copied",(function(t){return e.copyToClipBoard(t)})),Wl(14,"imgSrc"),No(15,"span",6),ba(16),zo(),ba(17,"\xa0\xa0"),Fo(18,"i",7),zo(),zo(),No(19,"div",8),No(20,"p",1),ba(21),Wl(22,"translate"),zo(),No(23,"p"),ba(24),zo(),zo(),No(25,"div",8),No(26,"p",1),ba(27),Wl(28,"translate"),zo(),No(29,"p"),ba(30),zo(),zo(),Fo(31,"span",9),No(32,"div",10),No(33,"p",1),ba(34),Wl(35,"translate"),zo(),zo(),No(36,"div",11),No(37,"p",1),ba(38),Wl(39,"translate"),zo(),No(40,"p"),Fo(41,"i",12),ba(42,"\xa0100%"),zo(),No(43,"p",13),Wl(44,"translate"),Fo(45,"i",3),zo(),zo(),No(46,"div",11),No(47,"p",1),ba(48),Wl(49,"translate"),zo(),No(50,"p"),Fo(51,"i",12),ba(52,"\xa0100%"),zo(),No(53,"p",13),Wl(54,"translate"),Fo(55,"i",3),zo(),zo(),No(56,"div",11),No(57,"p",1),ba(58),Wl(59,"translate"),zo(),No(60,"p"),Fo(61,"i",12),ba(62,"\xa0100%"),zo(),No(63,"p",13),Wl(64,"translate"),Fo(65,"i",3),zo(),zo(),No(66,"div",11),No(67,"p",1),ba(68),Wl(69,"translate"),zo(),No(70,"p"),Fo(71,"i",12),ba(72,"\xa0100%"),zo(),No(73,"p",13),Wl(74,"translate"),Fo(75,"i",3),zo(),zo()),2&t&&(ws(2),Ca(" ",ql(3,27,"ImgManager.UploadList.properties.imgName")," "),ws(2),Ro("nwbToolTip",ql(5,29,"ImgManager.ImgEditor.NameInfo"))("nwbToolTipIsMultiline",!0),ws(3),Xo("placeholder","",ql(8,31,"ImgManager.ImgEditor.nameEx")," "),Ro("ngModel",e.imgToEdit.display_name)("debounceTime",500),ws(4),wa(ql(12,33,"ImgManager.UploadList.properties.imgURL")),ws(2),Ro("copy-clipboard",Gl(14,35,e.imgToEdit.file_name,"raw")),ws(3),wa(e.imgToEdit.file_name),ws(5),Ca("",ql(22,38,"ImgManager.UploadList.properties.imgSize"),"\xa0:"),ws(3),Sa("",e.imgToEdit.raw_height,"*",e.imgToEdit.raw_width,"px"),ws(3),Ca("",ql(28,40,"ImgManager.UploadList.properties.imgWeight"),"\xa0:"),ws(3),Ca("",e.getFileSize(),"\xa0ko"),ws(4),wa(ql(35,42,"ImgManager.UploadList.seo.title")),ws(4),wa(ql(39,44,"ImgManager.UploadList.seo.rezise")),ws(5),Ro("nwbToolTip",ql(44,46,"ImgManager.UploadList.seo.reziseTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(49,48,"ImgManager.UploadList.seo.webp")),ws(5),Ro("nwbToolTip",ql(54,50,"ImgManager.UploadList.seo.webpTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(59,52,"ImgManager.UploadList.seo.cdn")),ws(5),Ro("nwbToolTip",ql(64,54,"ImgManager.UploadList.seo.cdnTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(69,56,"ImgManager.UploadList.seo.lazyloading")),ws(5),Ro("nwbToolTip",ql(74,58,"ImgManager.UploadList.seo.lazyloadingTooltips"))("nwbToolTipIsMultiline",!0))},directives:function(){return[Pw,MP,$m,Zm,Kf,rP]},pipes:function(){return[zm,TP]},encapsulation:2}),t})();const lP=zu("insertRemoveAnnim",[Hu(":enter",[Uu({opacity:0}),Fu("0.5s ease-in-out",Uu({opacity:1}))])]);let cP=(()=>{let t=class{constructor(t){this.imgCDNService=t,this._isImgModified=!1,this.isImgModifiedChange=new Yl,this.editClosed=new Yl,this.currentCroppedImageChange=new Yl,this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.isNameModified=!1,this.isCropperReady=!1,this.currentCroppedImage="",this.isCropped=!1,this.isLoading=!1,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.imageChangedEvent="",this.croppedImage="",this.canvasRotation=0,this.rotation=0,this.scale=1,this.showCropper=!1,this.containWithinAspectRatio=!1,this.transform={},this.resolutionConfig=[{label:"ImgManager.ImgEditor.config.origin",config:{maintainAspectRatio:!0}},{label:"ImgManager.ImgEditor.config.free",config:{maintainAspectRatio:!1},active:!0},{label:"ImgManager.ImgEditor.config.square",config:{maintainAspectRatio:!0,aspectRatio:1}},{label:"ImgManager.ImgEditor.config.Portrait",config:{maintainAspectRatio:!0,aspectRatio:3/4}},{label:"ImgManager.ImgEditor.config.landscape",config:{maintainAspectRatio:!0,aspectRatio:5/3}}],this.rotationConfig=[{label:"ImgManager.ImgEditor.config.schedule",icon:"fal fa-redo-alt",method:"rotateRight",active:!0},{label:"ImgManager.ImgEditor.config.AntiSchedule",icon:"fal fa-undo-alt",method:"rotateLeft"},{label:"ImgManager.ImgEditor.config.flipVert",icon:"fal fa-sort-alt",method:"flipVertical"},{label:"ImgManager.ImgEditor.config.flipHoriz",icon:"fal fa-exchange-alt",method:"flipHorizontal"}],this.zoomConfig=[{label:"ImgManager.ImgEditor.config.zoom",icon:"fal fa-search-plus",method:"zoomIn",active:!0},{label:"ImgManager.ImgEditor.config.dezoom",icon:"fal fa-search-minus",method:"zoomOut"}],this.imgCropperConfig={maintainAspectRatio:!1,aspectRatio:void 0}}set isImgModified(t){this._isImgModified=t,t||this.restartEdit()}get isImgModified(){return this._isImgModified}ngOnInit(){this.init()}init(){this.imgRoute=this.getRAWImgRoute(),this.imgType=this.getImgType(),this.croppedImage=null,this.setDefautAspectRatio()}getRAWImgRoute(){return this.imgCDNService.getUrlImg("raw")+this.imgToEdit.file_name}getImgType(){return this.imgToEdit.file_name?this.imgToEdit.file_name.split(".").pop():void 0}setDefautAspectRatio(){const t=parseInt(this.imgToEdit.raw_height),e=parseInt(this.imgToEdit.raw_width);this.defaultAspectRatio=t/e,this.resolutionConfig[0].config.aspectRatio=this.defaultAspectRatio,this.imgCropperConfig.aspectRatio=this.defaultAspectRatio}onEditClosed(t){this.editClosed.emit(t)}onRestart(){this.isImgModifiedChange.emit(!1)}restartEdit(){this.init(),this.resetConfCropper()}onImgModified(){this.isImgModified=!0,this.isImgModifiedChange.emit(!0)}fileChangeEvent(t){this.imageChangedEvent=t}imageCropped(t){this.detectImgCropperChange(),this.currentCroppedImage=t.base64,this.currentCroppedImageChange.emit(this.currentCroppedImage)}imageLoaded(){this.showCropper=!0}cropperReady(){this.isCropperReady=!0}loadImageFailed(){this.onEditClosed(this.msgFailLoad)}changeResolutionSize(t){this.setActiveItem(this.resolutionConfig,t),this.setCropperProperties(this.resolutionConfig[t].config)}confirmCrop(){this.imgRoute=null,this.croppedImage=this.currentCroppedImage,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.resetConfCropper(),this.onImgModified()}resetConfCropper(){this.scale=1,this.rotation=0,this.canvasRotation=0,this.transform={}}setActiveItem(t,e){t.forEach((t,n)=>{t.active=n===e})}setCropperProperties(t){for(const e in t)this.imgCropperConfig[e]=t[e]}detectImgCropperChange(){this.isImgCropped=this.isImgCroppedInitilized,this.isImgCroppedInitilized=!0}rotateLeft(){this.canvasRotation--,this.flipAfterRotate(),this.onImgModified()}rotateRight(){this.canvasRotation++,this.flipAfterRotate(),this.onImgModified()}flipHorizontal(){this.transform=Object.assign(Object.assign({},this.transform),{flipH:!this.transform.flipH}),this.onImgModified()}flipVertical(){this.transform=Object.assign(Object.assign({},this.transform),{flipV:!this.transform.flipV}),this.onImgModified()}flipAfterRotate(){const t=this.transform.flipH,e=this.transform.flipV;this.transform=Object.assign(Object.assign({},this.transform),{flipH:e,flipV:t})}zoomOut(){this.scale-=this.scale<.2?0:.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}zoomIn(){this.scale+=.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}applyMethod(t){this[t]()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Lx))},t.\u0275cmp=pe({type:t,selectors:[["cropper"]],inputs:{isImgModified:"isImgModified",imgToEdit:"imgToEdit"},outputs:{isImgModifiedChange:"isImgModifiedChange",editClosed:"editClosed",currentCroppedImageChange:"currentCroppedImageChange"},decls:33,vars:31,consts:[[1,"img-editor__container__toolsContainer"],[4,"ngIf"],["dropdownId","dropdown-resolution"],["label",""],[1,"img-editor__container__toolsContainer__tool"],[1,"far","fa-crop"],["item","",4,"ngFor","ngForOf"],["dropdownId","dropdown-rotation"],[1,"img-editor__container__toolsContainer__tool",3,"click"],[1,"far","fa-expand-arrows-alt"],["dropdownId","dropdown-rotation","dropDownMenuClass","img-editor__container__toolsContainer__RotationDropdown"],[1,"far","fa-redo"],[1,"far","fa-retweet-alt"],[1,"img-editor__image-cropper"],[3,"imageURL","imageBase64","maintainAspectRatio","containWithinAspectRatio","aspectRatio","onlyScaleDown","roundCropper","canvasRotation","transform","alignImage","format","backgroundColor","imageCropped","imageLoaded","cropperReady","loadImageFailed"],["nwbToolTipPosition","left",1,"img-editor__container__toolsContainer__tool","img-editor__container__toolsContainer__tool--button",3,"nwbToolTip","click"],[1,"far","fa-check"],["item",""],[1,"dropdown-item",3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,PE,7,6,"div",1),No(2,"dropdown",2),Vo(3,3),No(4,"div",4),Fo(5,"i",5),No(6,"p"),ba(7),Wl(8,"translate"),zo(),zo(),Uo(),Mo(9,kE,5,6,"ng-container",6),zo(),No(10,"dropdown",7),Vo(11,3),No(12,"div",8),$o("click",(function(){return e.zoomIn()})),Fo(13,"i",9),No(14,"p"),ba(15),Wl(16,"translate"),zo(),zo(),Uo(),Mo(17,DE,6,7,"ng-container",6),zo(),No(18,"dropdown",10),Vo(19,3),No(20,"div",8),$o("click",(function(){return e.rotateRight()})),Fo(21,"i",11),No(22,"p"),ba(23),Wl(24,"translate"),zo(),zo(),Uo(),Mo(25,OE,6,7,"ng-container",6),zo(),No(26,"div",8),$o("click",(function(){return e.onRestart()})),Fo(27,"i",12),No(28,"p"),ba(29),Wl(30,"translate"),zo(),zo(),zo(),No(31,"div",13),No(32,"image-cropper",14),$o("imageCropped",(function(t){return e.imageCropped(t)}))("imageLoaded",(function(){return e.imageLoaded()}))("cropperReady",(function(){return e.cropperReady()}))("loadImageFailed",(function(){return e.loadImageFailed()})),zo(),zo()),2&t&&(ws(1),Ro("ngIf",e.isImgCropped),ws(6),wa(ql(8,23,"ImgManager.ImgEditor.crop")),ws(2),Ro("ngForOf",e.resolutionConfig),ws(6),wa(ql(16,25,"ImgManager.ImgEditor.display")),ws(2),Ro("ngForOf",e.zoomConfig),ws(6),wa(ql(24,27,"ImgManager.ImgEditor.rotation")),ws(2),Ro("ngForOf",e.rotationConfig),ws(1),Ro("@insertRemoveAnnim",void 0),ws(3),wa(ql(30,29,"ImgManager.ImgEditor.restart")),ws(3),oa("display",e.showCropper?null:"none"),Ro("imageURL",e.imgRoute)("imageBase64",e.croppedImage)("maintainAspectRatio",e.imgCropperConfig.maintainAspectRatio)("containWithinAspectRatio",e.containWithinAspectRatio)("aspectRatio",e.imgCropperConfig.aspectRatio)("onlyScaleDown",!0)("roundCropper",!1)("canvasRotation",e.canvasRotation)("transform",e.transform)("alignImage","center")("format",e.imgType)("backgroundColor","white"))},directives:[Zh,oP,Qh,cS,Pw,qh],pipes:[zm],encapsulation:2,data:{animation:[lP]}}),t})(),hP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.imgManager=t,this.imgEventService=e,this.imgSelectionService=n,this.alertService=i,this.userSettingsService=s,this.renamePictureService=r,this.listDisplayed=!1,this.multipleImgMode=!1,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:0,currentPage:1},this.widthLargeCard=219,this.widthSmallCard=160,this.nbFakeImg=0,this.imgFullWidthConfig=[{max:419,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:499,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:719,largeImgWidthFactor:.5,smallImgWidthFactor:.3333},{max:1023,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1599,largeImgWidthFactor:.2,smallImgWidthFactor:.1111},{largeImgWidthFactor:.1666,smallImgWidthFactor:.1}],this.imgWidthConfig=[{max:1024,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1199,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1299,largeImgWidthFactor:.3333,smallImgWidthFactor:.1666},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.1666},{max:1599,largeImgWidthFactor:.25,smallImgWidthFactor:.14},{largeImgWidthFactor:.25,smallImgWidthFactor:.125}],this.searchQueryChanged=new E,this.filtersChanged=new E,this.picturesList=[],this.savePictureList=[],this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!0,this.isTotalRetieved=!1,this.delListImgLoader=!1,this.initComponent=!0,this.failLoaded=!1,this.displayPexelsResults=!1,this.confirmImgSup=!1,this.pageIndex=0,this.length=0,this.pageSize=30,this.pageSizeOptions=[25,50,100,250],this.errorGetAllImg="ImgManager.ImgLib.errorGetAllImg",this.errorGetTotalImg="ImgManager.ImgLib.errorGetTotalImg",this.errorGetImg="ImgManager.ImgLib.errorGetCanvaImg",this.msgNoImgFound="ImgManager.ImgLib.noImgFound",this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg"}ngOnInit(){this.maxLengthCardShow&&this.reducePictureListMaxLength(),this.setEvents(),this.imgSelectedList=this.imgSelectionService.getImgSelection()}ngAfterViewInit(){this.setNbImgToDisplay(),this._getImgList(),this.savePictureList||(this.savePictureList=this.picturesList)}reducePictureListMaxLength(){this.picturesList.splice(0,this.maxLengthCardShow)}getImgList(){this.filtersChanged.next()}onSwitchFormatDisplayed(t){this.listDisplayed=t,this.userSettingsService.setUserDisplayPreference(t),this.imgEventService.emitlistDisplayedChange(t)}onImgSelected(){this.setNbImgToDelSelected()}onShowImgUploaded(){this.searchText=null,this.searchedValue=null,this.getImgList()}onRenamePicture(t){this.renamePictureService.onRenamePicture(t)}removeListImg(){if(this.disable)return;this.disable=!0,this.delListImgLoader=!0,this.confirmImgSup=!1;const t=[];this.picturesList.forEach(e=>{e.delSelected&&(e.deleted=!0,t.push(e.id_file))}),this.imgManager.removeMultipleImg(t).subscribe(()=>{this.getImgList(),this.imgSelectionService.removeImgSelectionByIds(t)},t=>{this.getImgList(),this.alertService.openAlert(this.errorRemoveImg)})}selectImgChosen(){if(this.disable)return;const t=[];this.picturesList.map(e=>{e.delSelected&&(e.delSelected=!1,e.selected=!0),e.selected&&t.push(e)}),this.setNbImgToDelSelected(),this.imgSelectionService.setImgSelection(t)}displayConfirmImgSup(){this.disable||(this.confirmImgSup=!0)}cancelSup(){this.confirmImgSup=!1}onPicturesListChange(){this.setNbImgToDelSelected()}onFiltersChange(){this.getImgList()}setNbImgToDisplay(){const t=this.imgLibContainer.nativeElement.offsetWidth+30,e=window.innerWidth-document.body.offsetWidth,[n,i]=this.getImgWidthFactors(),s=Math.floor(t*i),r=Math.ceil((t+e)*n);this.nbMaxImgPerLine=Math.floor(t/s),this.nbMinImgPerLine=Math.floor((t+e)/r),this.pageSize=this.getTotalImgPerPage()}getImgWidthFactors(){const t=window.innerWidth;let e=0,n=[];const i=this.fullSize?this.imgFullWidthConfig:this.imgWidthConfig;for(const s of i){if(!s.max){n=[s.largeImgWidthFactor,s.smallImgWidthFactor];break}if(e<t&&t<=s.max){n=[s.largeImgWidthFactor,s.smallImgWidthFactor];break}e=s.max}return n}getTotalImgPerPage(){let t=this.nbMinImgPerLine;for(;t<30||t%this.nbMaxImgPerLine!=0||t%this.nbMinImgPerLine!=0;)t+=this.nbMinImgPerLine;return t}setParams(){this.params={limit:this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage.toString():this.pageSize.toString(),page:this.tableFilters.currentPage.toString()},this.tableFilters.searchValue&&(this.params["display_name:contains"]=this.tableFilters.searchValue.toString())}initVariables(t){this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!1,this.delListImgLoader=!1,this.initComponent=!1,this.displayPexelsResults=!1,this.failLoaded=!t,this.nbFakeImg=0}selectImgSelected(){if(!this.imgSelectedList||!this.imgSelectedList.length)return;const t=[];this.imgSelectedList.forEach(e=>t.push(e.id_file)),this.picturesList.forEach(e=>{-1!==t.indexOf(e.id_file)&&(e.selected=!0)})}displayPexelsLib(){this.displayPexelsResults=!0,this.alertService.openAlert(this.msgNoImgFound)}calculNbImgFake(t){const e="small"===this.stateDisplayed||"img-upload"===this.tabDisplayed?this.nbMaxImgPerLine:this.nbMinImgPerLine;t%e!=0&&(this.nbFakeImg=e-t%e)}getImg(t){this.imgManager.getShopImg(t).pipe(hm(1)).subscribe(t=>{this.imgAlreadyExist(t.id_file)||(this.picturesList.unshift(t),this.length+=1)},t=>{this.alertService.openAlert(this.errorGetImg)})}imgAlreadyExist(t){for(const e of this.picturesList)if(e.id_file===t)return!0;return!1}setNbImgToDelSelected(){this.nbImgToDelSelected=this.picturesList.filter(t=>t.delSelected).length,this.nbImgToDelSelected||(this.confirmImgSup=!1)}setEvents(){this.searchQueryChanged.pipe(cC(400)).subscribe(t=>{this.getImgList()}),this.filtersChanged.pipe(cC(800)).subscribe(t=>{this._getImgList()}),this.imgRemovedEvent=this.imgEventService.getImgRemovedEventListner().subscribe(t=>{this.getImgList()}),this.imgAddedEvent=this.imgEventService.getImgAddedEventListner().subscribe(t=>{t&&!this.imgAlreadyExist(t)&&this.getImg(t)}),this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{if(this.listDisplayed)return;const e=[];t.map(t=>e.push(t.id_file));for(const n of this.picturesList)-1===e.indexOf(n.id_file)&&(n.selected=!1)})}_getImgList(){this.isLoading=!0,this.displayPexelsResults=!1,this.isTotalRetieved=!1,this.setParams(),this.imgManager.getShopImgList(this.params).pipe(hm(1)).subscribe(t=>{this.initVariables(!0),this.calculNbImgFake(t.data.length),this.picturesList=t.data,this.renamePictureService.setPicturesList(this.picturesList),this.selectImgSelected(),this.length=this.isTotalRetieved?this.length:t.totalRecords,this.tableFilters.totalItems=this.isTotalRetieved?this.tableFilters.totalItems:t.totalRecords,this.tableFilters.itemsPerPage=this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage:this.pageSize,this.maxLengthCardShow&&(this.picturesList=this.picturesList.splice(0,8)),0===t.totalRecords&&this.displayPexelsLib(),this.refreshTotalImgList()},t=>{this.alertService.openAlert(this.errorGetAllImg),this.initVariables(!1)})}refreshTotalImgList(){this.imgManager.getShopTotalImgList(this.params).pipe(hm(1)).subscribe(t=>{this.isTotalRetieved=!0,this.length=t.totalRecords,this.tableFilters.totalItems=t.totalRecords},t=>{this.alertService.openAlert(this.errorGetTotalImg),this.initVariables(!1)})}ngOnDestroy(){this.searchQueryChanged.unsubscribe(),this.imgRemovedEvent.unsubscribe(),this.imgAddedEvent.unsubscribe(),this.imgSelectionChange.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Vx),Ao(Ax),Ao(Hx),Ao(zx),Ao(Wx))},t.\u0275cmp=pe({type:t,selectors:[["images-view"]],viewQuery:function(t,e){var n;1&t&&hc(RE,!0),2&t&&lc(n=gc())&&(e.imgLibContainer=n.first)},inputs:{listDisplayed:"listDisplayed",multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed",fullSize:"fullSize",maxLengthCardShow:"maxLengthCardShow"},decls:9,vars:19,consts:[[1,"images-view",3,"ngClass"],["class","images-view__container",3,"ngClass",4,"ngIf"],[1,"images-view__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"images-view__wrapper"],["imgLibContainer",""],[4,"ngIf"],["class","images-view--pexels",4,"ngIf"],[1,"images-view__container",3,"ngClass"],["class","field has-addons subHeaderActions",4,"ngIf"],[1,"mainColor"],[1,"field","has-addons","subHeaderActions"],[1,"images-view__container__boxAction"],["class","button success images-view__container__boxAction__import",3,"click",4,"ngIf"],["class","button images-view__container__boxAction__delBtn danger",3,"click",4,"ngIf"],[1,"images-view__container__boxAction__confirmSup",3,"ngClass"],["class","images-view__container__boxAction__confirmSup__text",4,"ngIf"],[1,"button","images-view__container__boxAction__confirmSup__cancel",3,"click"],[1,"button","images-view__container__delBtn","danger",3,"click"],[1,"field","has-addons","images-view__container__buttonBox"],[1,"control"],[1,"button","is-lighted","images-view__container__buttonBox__btn",3,"ngClass","click"],[1,"icon","is-small"],[1,"far","fa-th"],[1,"fas","fa-bars"],[1,"button","success","images-view__container__boxAction__import",3,"click"],[1,"fal","fa-check"],[1,"button","images-view__container__boxAction__delBtn","danger",3,"click"],[1,"fal","fa-times"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"images-view__container__boxAction__confirmSup__text"],[3,"picturesList","tableFilters","disable","nbFakeImg","stateDisplayed","tabDisplayed","displayPexelsResults","isLoading","fullSize","picturesListChange","filtersChange","disableChange","pictureNameChange"],[3,"picturesList","tableFilters","disable","displayPexelsResults","stateDisplayed","isLoading","picturesListChange","filtersChange","disableChange","pictureNameChange"],[1,"images-view--pexels"],[3,"searchValue","disableSearch","showImgUploaded"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,GE,4,7,"div",1),zo(),No(2,"ng-scrollbar",2,3),No(4,"div",4,5),Mo(6,QE,2,10,"div",6),Mo(7,KE,2,7,"div",6),zo(),zo(),Mo(8,ZE,2,3,"div",7)),2&t&&(Ro("ngClass",Fl(8,YE,e.fullSize,"small"===e.stateDisplayed))("@easeInOut","in"),ws(1),Ro("ngIf","small"!==e.stateDisplayed||"img-upload"===e.tabDisplayed),ws(1),Ro("visibility","native")("ngClass",function(t,e,n,i,s,r,o,a,l,c){const h=rn()+11,u=Ke();let d=Po(u,h,n,i,s,r);return xo(u,h+4,o,a,l)||d?So(u,h+7,e(n,i,s,r,o,a,l)):function(t,e){return t[e]}(u,h+7)}(0,XE,e.displayPexelsResults&&!e.listDisplayed,e.displayPexelsResults&&!e.listDisplayed&&"small"===e.stateDisplayed,e.displayPexelsResults&&e.listDisplayed,"full"===e.stateDisplayed,"small"===e.stateDisplayed&&"img-upload"!==e.tabDisplayed,"small"===e.stateDisplayed&&"img-upload"===e.tabDisplayed,"window"===e.stateDisplayed)),ws(4),Ro("ngIf",!e.listDisplayed||"small"===e.stateDisplayed),ws(1),Ro("ngIf",e.listDisplayed&&"small"!==e.stateDisplayed),ws(1),Ro("ngIf",e.displayPexelsResults))},directives:function(){return[qh,Zh,NC,iP,uP,dP,Yx]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx,lP]}}),t})(),uP=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.nbFakeImg=0}ngOnInit(){}onSearchChange(t){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.filtersChange.emit(this.tableFilters)}onCardRenamePicture(t){this.pictureNameChange.next(t)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["mosaic-view"]],inputs:{nbFakeImg:"nbFakeImg",tabDisplayed:"tabDisplayed",fullSize:"fullSize"},features:[Pa],decls:5,vars:9,consts:[[1,"mosaic",3,"ngClass"],["class","mosaic__search",3,"ngClass",4,"ngIf"],["class","mosaic__container__cards",3,"ngClass",4,"ngIf"],["class","mosaic__container__loader",4,"ngIf"],["class","mosaic__pagination",4,"ngIf"],[1,"mosaic__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"mosaic__container__cards",3,"ngClass"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange",4,"ngFor","ngForOf"],["class","mosaic__container__cards__fakeImg",3,"ngClass",4,"ngFor","ngForOf"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange"],[1,"mosaic__container__cards__fakeImg",3,"ngClass"],[1,"mosaic__container__loader"],[3,"small"],[1,"mosaic__pagination"],[3,"pagination","pageChange"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,tx,3,8,"div",1),Mo(2,rx,4,8,"div",2),Mo(3,ox,2,1,"div",3),Mo(4,ax,2,1,"div",4),zo()),2&t&&(Ro("ngClass",Vl(5,lx,e.fullSize,"small"===e.stateDisplayed,e.displayPexelsResults)),ws(1),Ro("ngIf","img-upload"!==e.tabDisplayed),ws(1),Ro("ngIf",!e.isLoading&&!e.displayPexelsResults),ws(1),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",e.picturesList.length&&"img-upload"!==e.tabDisplayed&&!e.displayPexelsResults))},directives:function(){return[qh,Zh,fP,Zm,Kf,Qh,Jx,DP,vP]},pipes:function(){return[zm,OP]},encapsulation:2,data:{animation:[Zx]}}),t})(),dP=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.dataTableName="imgagesView"}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["table-view"]],features:[Pa],decls:9,vars:15,consts:[[1,"table-view"],[3,"checkbox","tableFilters","placeholder","disablePagniation","isLoading","toggleAllCheckBox","tableFiltersChange"],["headerCell","","columnSize","2","sortName","name",3,"headerName"],["headerCell","","centerCell","center",3,"headerName"],["headerCell","","columnSize","0"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange",4,"ngFor","ngForOf"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange"],["tableColumn","","columnSize","2"],[1,"table-view__row__container"],[1,"table-view__row__container__imgContainer",3,"ngClass","click"],["alt","picture.display_name",1,"table-view__row__container__imgContainer__img",3,"src","ngClass","error"],["class","table-view__row__container__imgContainer__overlay",4,"ngIf"],["type","text",1,"wzImgMngInput","table-view__row__container__name",3,"ngModel","ngClass","disabled","ngModelChange","focus","blur","click"],["tableColumn","","centerCell","center",3,"click"],[1,"grey"],["tableColumn","","centerCell","center","columnSize","0",1,"table-view__dropdown-options"],["dropdownId","dropdown-options",3,"disable"],["label",""],[1,"table-view__dropdown-options__label","rotate"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"far","fa-ellipsis-h","is-size-4"],["item",""],[1,"dropdown-item",3,"click"],[1,"far","fa-download","download"],[1,"far","fa-crop-alt","edit"],[1,"fal","fa-times","deleted"],[1,"table-view__row__container__imgContainer__overlay"],[1,"fad","fa-folder-times"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"wz-table",1),$o("toggleAllCheckBox",(function(t){return e.onToggleAllCheckBoxRow(t)}))("tableFiltersChange",(function(t){return e.tableFilters=t}))("tableFiltersChange",(function(){return e.onFiltersChange()})),Wl(2,"translate"),Fo(3,"div",2),Wl(4,"translate"),Fo(5,"div",3),Wl(6,"translate"),Fo(7,"div",4),Mo(8,px,38,29,"div",5),zo(),zo()),2&t&&(Ro("@listAnimation",e.picturesList.length),ws(1),Ro("checkbox",!0)("tableFilters",e.tableFilters)("placeholder",ql(2,9,"ImgManager.SearchBar.placeholder"))("disablePagniation",e.displayPexelsResults)("isLoading",e.isLoading),ws(2),Ro("headerName",ql(4,11,"ImgManager.ImgList.titleImgName")),ws(2),Ro("headerName",ql(6,13,"ImgManager.ImgList.titleResolution")),ws(3),Ro("ngForOf",e.picturesList))},directives:function(){return[gP,xP,Qh,PP,SP,EP,qh,Zh,$m,Zm,Kf,oP]},pipes:function(){return[zm,TP]},encapsulation:2,data:{animation:[Zx]}}),t})(),pP=(()=>{let t=class{constructor(t){this.filterRoutingBuilder=t,this.filterGroups=new Map,this.dataTableFilters={sort:void 0,order:void 0,searchValue:void 0,totalItems:0,itemsPerPage:0,currentPage:0},this.sortSubject=new E}getTableFilterGroup(t){if(this.filterGroups.has(t))return this.filterGroups.get(t);const e=this.filterRoutingBuilder.group(this.dataTableFilters,t);return this.filterGroups.set(t,e),e}emitSortChange(t,e,n){this.sortSubject.next({dataTableName:t,sortName:e,order:n})}getSortChangeListner(){return this.sortSubject.asObservable()}setPaginationFilters(t,e,n,i){this.getTableFilterGroup(t).setValues({itemsPerPage:n,currentPage:i})}setInitialPaginationFiltersIfNotExist(t,e,n){const i=this.getTableFilterGroup(t);i.setValues({itemsPerPage:i.get("itemsPerPage")?parseInt(i.get("itemsPerPage")):e,currentPage:i.get("currentPage")?parseInt(i.get("currentPage")):n})}};return t.\u0275fac=function(e){return new(e||t)(Qt(Mw))},t.\u0275prov=ht({factory:function(){return new t(Qt(Mw))},token:t,providedIn:"root"}),t})(),gP=(()=>{let t=class{constructor(t){this.filtersTableService=t,this.tableFiltersChange=new Yl,this.placeholder="",this.checkbox=!1,this.toggleAllCheckBox=new Yl,this.disableSearch=!1,this.disablePagniation=!1,this.isLoading=!1}ngOnInit(){this.headerCheckBoxId=Object(sI.v4)(),this.tableRoutingName&&(this._filterGroup=this.filtersTableService.getTableFilterGroup(this.tableRoutingName),this._filterGroup.valuesChange$.next([]),this.setTablesFilters(),this.filterGroupChangeSub=this._filterGroup.valuesChange$.subscribe(t=>{this.setTablesFilters()}))}onToggleAllCheckBox(t){this.toggleAllCheckBox.emit(t.target.checked)}searchChange(t){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({searchValue:this.tableFilters.searchValue,sort:void 0,order:void 0,currentPage:1})}pageChange(){this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({itemsPerPage:this.tableFilters.itemsPerPage,currentPage:this.tableFilters.currentPage})}setTablesFilters(){this.tableFilters={sort:this._filterGroup.get("sort"),order:this._filterGroup.get("order"),searchValue:this._filterGroup.get("searchValue"),itemsPerPage:this._filterGroup.get("itemsPerPage")?parseInt(this._filterGroup.get("itemsPerPage")):0,currentPage:this._filterGroup.get("currentPage")?parseInt(this._filterGroup.get("currentPage")):0,totalItems:this.tableFilters.totalItems},this.tableFiltersChange.emit(this.tableFilters)}ngDestroy(){this.filterGroupChangeSub&&this.filterGroupChangeSub.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(pP))},t.\u0275cmp=pe({type:t,selectors:[["wz-table"]],inputs:{placeholder:"placeholder",checkbox:"checkbox",disableSearch:"disableSearch",disablePagniation:"disablePagniation",isLoading:"isLoading",tableFilters:"tableFilters",tableRoutingName:"tableRoutingName"},outputs:{tableFiltersChange:"tableFiltersChange",toggleAllCheckBox:"toggleAllCheckBox"},ngContentSelectors:bx,decls:9,vars:5,consts:[[1,"wz-table"],["id","headerTable",1,"wz-table__head"],["class","wz-table__head__cell wz-table__head__cell--checkbox",4,"ngIf"],["class","wz-table__search",4,"ngIf"],[1,"wz-table__body"],["class","wz-table__body__loader",4,"ngIf"],[4,"ngIf"],[3,"pagination","pageChange",4,"ngIf"],[1,"wz-table__head__cell","wz-table__head__cell--checkbox"],[3,"id","alone","change"],[1,"wz-table__search"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"wz-table__body__loader"],[3,"small"],[3,"pagination","pageChange"]],template:function(t,e){1&t&&(Ko(yx),No(0,"div",0),No(1,"div",1),Mo(2,gx,2,2,"div",2),Zo(3),zo(),Mo(4,mx,2,3,"div",3),No(5,"div",4),Mo(6,fx,2,1,"div",5),Mo(7,_x,1,0,void 0,6),zo(),Mo(8,vx,1,1,"wz-pagination",7),zo()),2&t&&(ws(2),Ro("ngIf",e.checkbox),ws(2),Ro("ngIf",!e.disableSearch),ws(2),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading),ws(1),Ro("ngIf",!e.disablePagniation))},directives:function(){return[Zh,CP,fP,Zm,Kf,DP,vP]},encapsulation:2}),t})();var mP;let fP=(()=>{let t=mP=class{constructor(){this.placeholder="",this.smallPadding=!1,this.innerValue="",this.changeDebounced=new Yl,this.onTouchedCallback=()=>{},this.onChangeCallback=()=>{}}get value(){return this.innerValue}set value(t){t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t))}writeValue(t){t!==this.innerValue&&(this.innerValue=t)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}handleDebouncedKeyUp(t){this.changeDebounced.emit(t.target.value)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-input-search"]],inputs:{placeholder:"placeholder",smallPadding:"smallPadding",id:"id"},outputs:{changeDebounced:"changeDebounced"},features:[Ha([{provide:Vm,useExisting:mP,multi:!0}])],decls:4,vars:5,consts:[[1,"input-search","field",3,"ngClass"],[1,"control","has-icons-left","has-icons-right"],["value","","type","text","debounceKeyUp","",1,"input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[1,"icon","fal","fa-search"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"p",1),No(2,"input",2),$o("ngModelChange",(function(t){return e.value=t}))("onEventChange",(function(t){return e.handleDebouncedKeyUp(t)})),zo(),Fo(3,"i",3),zo(),zo()),2&t&&(Ro("ngClass",e.smallPadding?"small-padding":""),ws(2),Ro("placeholder",e.placeholder)("ngModel",e.value)("debounceTime",1e3),To("id",e.id))},directives:function(){return[qh,MP,$m,Zm,Kf]},encapsulation:2}),t})(),_P=(()=>{let t=class{transform(t,e,n){if(!(t>=0&&e>=0&&n>=0))throw new Error("currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.");return t===Math.ceil(e/n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"IsLastPage",type:t,pure:!0}),t})(),vP=(()=>{let t=class{constructor(){this.pageChange=new Yl}set pagination(t){this._pagination=t}get pagination(){return this._pagination}decrementPage(){this.pagination.currentPage<=1||(this.pagination.currentPage--,this.pageChange.emit(this.pagination))}incrementPage(){(new _P).transform(this.pagination.currentPage,this.pagination.totalItems,this.pagination.itemsPerPage)||(this.pagination.currentPage++,this.pageChange.emit(this.pagination))}onGotoPageChange(t){this.pagination.currentPage=parseInt(t.target.value),this.pageChange.emit(this.pagination)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-pagination"]],inputs:{pagination:"pagination"},outputs:{pageChange:"pageChange"},decls:1,vars:1,consts:[["class","wz-pagination",4,"ngIf"],[1,"wz-pagination"],[1,"wz-pagination__wrapper"],[1,"wz-pagination__wrapper__page"],["name","page",3,"ngStyle","change"],[4,"ngFor","ngForOf"],[1,"wz-pagination__wrapper__elements"],[1,"wz-pagination__wrapper__arrows"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--left",3,"ngClass","click"],[1,"wz-pagination__wrapper__arrows__arrow__icon"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--right",3,"ngClass","click"],[3,"selected","value"]],template:function(t,e){1&t&&Mo(0,Ix,19,25,"div",0),2&t&&Ro("ngIf",e.pagination&&e.pagination.itemsPerPage)},directives:function(){return[Zh,Jh,Qh,qh,bf,If]},pipes:function(){return[zm,yP,bP,_P]},encapsulation:2}),t})(),yP=(()=>{let t=class{transform(t,e){if(!(t>=0&&e>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");const n=Math.ceil(t/e);return Array.apply(null,{length:n}).map(Number.call,Number).map(t=>t+1)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"ArrayTotalPages",type:t,pure:!0}),t})(),bP=(()=>{let t=class{constructor(t){this.translateService=t}transform(t,e,n){let i=0,s=0;return e&&(i=(t-1)*n+1,s=t*n),s>e&&(s=e),this.translateService.instant("PaginationComponent.on",{low:i,high:s,total:e})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Nm))},t.\u0275pipe=be({name:"customPagniationText",type:t,pure:!0}),t})();var wP;let CP=(()=>{let t=wP=class{constructor(){this.label="",this.alone=!1,this.checked=!1,this.id="",this.disabled=!1}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}writeValue(t){this.value=t}onChange(t){this._onChange&&this._onChange(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-checkbox"]],inputs:{label:"label",alone:"alone",checked:"checked",id:"id",value:"value",type:"type",name:"name"},features:[Ha([{provide:Vm,useExisting:wP,multi:!0}])],decls:5,vars:12,consts:[[1,"checkBoxField","field",3,"ngClass"],[1,"field__row"],["type","checkbox",1,"is-checkradio",3,"id","name","value","disabled","ngModel","checked","ngModelChange"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"input",2),$o("ngModelChange",(function(t){return e.value=t}))("ngModelChange",(function(t){return e.onChange(t)})),zo(),No(3,"label"),ba(4),zo(),zo(),zo()),2&t&&(Ro("ngClass",Fl(9,Ex,"column"===e.type,e.alone)),ws(2),Ro("id",e.id)("name",e.name)("value",e.value)("disabled",e.disabled)("ngModel",e.value)("checked",e.checked),ws(1),To("for",e.id),ws(1),wa(e.label))},directives:[qh,jm,Zm,Kf],encapsulation:2}),t})(),SP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.currentRow=t,this.appRef=e,this.renderer=n,this.document=i,this.resolver=s,this.injector=r,this.checkBoxValueChange=new Yl}set checkBoxValue(t){this._value=t,this.checkboxComponentRef&&this.setCheckBoxValue()}get checkBoxValue(){return this._value}ngOnInit(){this.createCheckBoxComponent(),this.handleChecboxInputs(),this.handleCheckboxOutputs()}createCheckBoxComponent(){const t=document.createElement("div");t.className="wz-table__body__line__cell wz-table__body__line__cell--checkbox",this.renderer.insertBefore(this.currentRow.nativeElement,t,this.currentRow.nativeElement.firstChild),this.htmlContainer=new IP(t,this.appRef,this.resolver,this.injector),this.checkboxComponentRef=this.htmlContainer.attach(CP)}handleChecboxInputs(){this.checkboxComponentRef.instance.id=this.checkBoxId?this.checkBoxId:Object(sI.v4)(),this.checkboxComponentRef.instance.name=this.checkBoxName?this.checkBoxName:void 0,this.checkboxComponentRef.instance.alone=!0,this.setCheckBoxValue()}setCheckBoxValue(){this.checkboxComponentRef.instance.value=this.checkBoxValue}handleCheckboxOutputs(){this.checkboxComponentRef.instance.registerOnChange(()=>{this._toggleCheckbox()})}_toggleCheckbox(){this.checkBoxValue=!this.checkBoxValue,this.checkBoxValueChange.emit(this.checkBoxValue)}ngOnDestroy(){this.htmlContainer.dispose()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(oh),Ao(Ya),Ao(Ih),Ao(qa),Ao(ho))},t.\u0275dir=ye({type:t,selectors:[["","checkBoxRow",""]],inputs:{checkBoxValue:"checkBoxValue",checkBoxId:"checkBoxId",checkBoxName:"checkBoxName"},outputs:{checkBoxValueChange:"checkBoxValueChange"}}),t})();class IP{constructor(t,e,n,i){this.hostElement=t,this.appRef=e,this.componentFactoryResolver=n,this.injector=i,this.attached=!1}attach(t){if(this.attached)throw new Error("component has already been attached");this.attached=!0;let e=this.componentFactoryResolver.resolveComponentFactory(t).create(this.injector);return this.appRef.attachView(e.hostView),this.disposeFn=()=>{this.appRef.detachView(e.hostView),e.destroy()},this.hostElement.appendChild(e.hostView.rootNodes[0]),e}dispose(){this.attached&&this.disposeFn()}}let EP=(()=>{let t=class{constructor(t,e,n){this.currentCell=t,this.renderer=e,this.document=n,this.centerCellValue=["left","center","right"]}ngAfterViewInit(){this.applyCustomStylesOnCell()}applyCustomStylesOnCell(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell--center--"+this.centerCell)}}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","tableColumn",""]],inputs:{columnSize:"columnSize",centerCell:"centerCell"}}),t})(),xP=(()=>{let t=class{constructor(t,e,n,i){this.currentCell=t,this.renderer=e,this.document=n,this.filtersTableService=i,this._headerName="",this.filterRouting=!1,this.onSortChange=new Yl,this.tableFiltersChange=new Yl,this.centerCellValue=["left","center","right"],this.subscriptions=[]}set headerName(t){this._headerName=t,this.setHeaderName()}get headerName(){return this._headerName}ngOnInit(){this.tableName&&this.sortName&&(this.filterRouting?this.handleSortRouting():this.handleSortBasic())}ngAfterViewInit(){this.applyCustomStylesOnCell(),this.renderHeaderColumn()}handleSortRouting(){this.filterGroup=this.filtersTableService.getTableFilterGroup(this.tableName);const t=this.filterGroup.valuesChange$.subscribe(t=>{const e=t.filter(t=>"sort"===t.key)[0];this.sortName!==e.value&&this.resetSortIcon()});this.subscriptions.push(t)}handleSortBasic(){const t=this.filtersTableService.getSortChangeListner().subscribe(t=>{this.tableName===t.dataTableName&&this.sortName!==t.sortName&&this.resetSortIcon()});this.subscriptions.push(t)}resetSortIcon(){this.contentHeader.className=this.contentHeader.className.replace(this.getCurrentSortIcon(),"idle")}applyCustomStylesOnCell(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell--center--"+this.centerCell)}}renderHeaderColumn(){this.createHeaderContent(),this.renderer.appendChild(this.currentCell.nativeElement,this.contentHeader)}createHeaderContent(){this.contentHeader=document.createElement("a"),this.contentHeader.className="wz-table__head__cell__search",this.setHeaderName(),this.tableName&&this.sortName&&this.handleSort()}setHeaderName(){this.contentHeader&&(this.contentHeader.innerHTML=this.headerName)}handleSort(){this.contentHeader.className+=" wz-table__head__cell__search--"+this.getInitialSortIcon(),this.renderer.listen(this.contentHeader,"click",()=>{const t=this.getCurrentSortIcon();let e,n,i;switch(t){case"idle":e="up",n=this.sortName,i=!0;break;case"up":e="down",n=this.sortName,i=!1;break;case"down":default:e="idle"}this.contentHeader.className=this.contentHeader.className.replace(t,e),this.emitEvents(n,i)})}getInitialSortIcon(){if(!this.filterRouting)return"idle";let t="idle";return this.filterGroup.get("sort")===this.sortName&&(t="true"==this.filterGroup.get("order")?"up":"down"),t}getCurrentSortIcon(){const{groups:t}=/wz-table__head__cell__search--(?<icon>\w+)/.exec(this.contentHeader.className);return t.icon}emitEvents(t,e){this.filterRouting?this.filterGroup.setValues({sort:t,order:e,currentPage:1}):this.filtersTableService.emitSortChange(this.tableName,this.sortName,e),this.tableFilters&&(this.tableFilters.sort=this.sortName,this.tableFilters.order=e,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters)),this.onSortChange.emit(e)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih),Ao(pP))},t.\u0275dir=ye({type:t,selectors:[["","headerCell",""]],inputs:{filterRouting:"filterRouting",headerName:"headerName",columnSize:"columnSize",tableName:"tableName",sortName:"sortName",centerCell:"centerCell",tableFilters:"tableFilters"},outputs:{onSortChange:"onSortChange",tableFiltersChange:"tableFiltersChange"}}),t})(),PP=(()=>{let t=class{constructor(t,e,n){this.currentCell=t,this.renderer=e,this.document=n}ngAfterViewInit(){this.applyCustomStylesOnCell()}applyCustomStylesOnCell(){this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line")}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","tableRow",""]]}),t})(),TP=(()=>{let t=class{constructor(t){this.imgCDNService=t}transform(t,e){if(!e)throw"The size is undefined in ImageSrcPipe.";const n=this.imgCDNService.getUrlImg(e);if(!n)throw"The expected size is not defined in ImageSrcPipe.";return n+t}};return t.\u0275fac=function(e){return new(e||t)(Ao(Lx))},t.\u0275pipe=be({name:"imgSrc",type:t,pure:!0}),t})(),kP=(()=>{let t=class{constructor(){this.debounceTime=500,this.onEventChange=new Yl,this.emitEvent$=new E,this.subscription$=new E}ngOnInit(){this.emitEvent$.pipe(r_(this.subscription$),cC(this.debounceTime),E_(),pv(t=>this.emitChange(t))).subscribe()}emitChange(t){this.onEventChange.emit(t)}ngOnDestroy(){this.subscription$.next(),this.subscription$.complete()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["AbstractDebounceDirective"]],inputs:{debounceTime:"debounceTime"},outputs:{onEventChange:"onEventChange"}}),t})(),MP=(()=>{let t=class extends kP{constructor(){super()}onKeyUp(t){t.preventDefault(),this.emitEvent$.next(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["input","debounceKeyUp",""]],hostBindings:function(t,e){1&t&&$o("keyup",(function(t){return e.onKeyUp(t)}))},features:[Pa]}),t})(),DP=(()=>{let t=class{constructor(){this.small=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-loader"]],inputs:{small:"small",text:"text",position:"position"},decls:9,vars:7,consts:[[1,"wz-loader",3,"ngClass","ngStyle"],[1,"loader","loader1"],["class","is-textcentered",3,"innerHTML",4,"ngIf"],[1,"is-textcentered",3,"innerHTML"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div"),No(3,"div"),No(4,"div"),No(5,"div"),No(6,"div"),Fo(7,"div"),zo(),zo(),zo(),zo(),zo(),zo(),Mo(8,xx,1,1,"p",2),zo()),2&t&&(Ro("ngClass",zl(3,Px,e.small))("ngStyle",zl(5,Tx,e.position)),ws(8),Ro("ngIf",e.text))},directives:[qh,Jh,Zh],encapsulation:2}),t})(),AP=(()=>{let t=class{constructor(){this.icon=!0,this.warning=!1,this.success=!1,this.iconClass="fas fa-info"}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-alert"]],inputs:{icon:"icon",warning:"warning",success:"success",iconClass:"iconClass"},ngContentSelectors:Dx,decls:4,vars:5,consts:[[1,"wz-alert",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(t,e){1&t&&(Ko(),No(0,"div",0),Mo(1,kx,1,1,"i",1),No(2,"p"),Zo(3),zo(),zo()),2&t&&(Ro("ngClass",Fl(2,Mx,e.success,e.warning)),ws(1),Ro("ngIf",e.icon))},directives:[qh,Zh],styles:[".wz-alert[_ngcontent-%COMP%]{width:100%;background-color:rgba(82,174,205,.15);color:#52aecd;border-radius:3px;display:-webkit-box;display:flex;flex-wrap:nowrap;-webkit-box-pack:justify;justify-content:space-between;padding:20px}.wz-alert.success[_ngcontent-%COMP%]{background-color:rgba(46,204,113,.15)}.wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#11552e}.wz-alert.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2ecc71}.wz-alert.warning[_ngcontent-%COMP%]{background-color:rgba(233,86,86,.15)}.wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#3a0505}.wz-alert.warning[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e95656}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;font-size:rem(14);line-height:rem(25);margin:0;padding:0;color:#1e5568}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#1e5568}.wz-alert[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:auto;margin:0 10px 0 0;color:inherit;font-size:rem(14);line-height:rem(25)}"]}),t})(),OP=(()=>{let t=class{transform(t){return Array.from("x".repeat(t))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"numberToArray",type:t,pure:!0}),t})(),RP=(()=>{let t=class{};return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,sm,Jf,YC,nS,lC,hS,j_,iI,Fm]]}),t})();class LP{constructor(){this.image_manager_route="",this.pexels_route="",this.canva_url="",this.assets_route="assets/img-manager/"}}class NP{constructor(){this.url_raw_image="",this.url_100_image="",this.url_200_image="",this.url_400_image="",this.url_800_image=""}}class zP{constructor(t,e="/assets/i18n/",n=".json"){this.http=t,this.prefix=e,this.suffix=n}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}}let FP=(()=>{class t{constructor(){}sendImgSelectedToPage(t){t&&(t.cdn_img_src=`${wh.CDN_URL}${t.id_shop}/`);const e=new CustomEvent("imgSelected",{detail:{file:t,from:this.emitter}});document.getElementById("imgManagerModule").dispatchEvent(e)}pageAskForImg(){return e_(document.getElementById("imgManagerModule"),"openImgManager")}setEmitter(t){this.emitter=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VP=(()=>{class t{constructor(t,e,n,i){this.http=t,this.imgSelectionService=e,this.eventService=n,this.canvaService=i,this.image_manager_api=wh.wizi_api+"/image-manager/shops/",this.isPhotosTab=!1,this.isVariantsTab=!1,this.loadProductImgSelection=!1,this.expectedMediaDto={id:void 0,image_url:void 0,image_width:"900",image_height:"900"},this.subscriptions=[]}setApiConfig(t,e){this.shopToken=e,this.shopId=t;const n=window.location.pathname.match(/\/(\w+)\/products\/(\d+)\/edit/);this.productSheetApiRoute=wh.wizi_admin_api+(n&&n[1]?n[1]:"fr")+wh.product_sheet_endpoint,this.productId=n&&n[2]?n[2]:"0",this.isProductCreation=/\/products\/create/.test(window.location.pathname)}handleTabs(){return new b(t=>{const e=this.switchTabs().subscribe(e=>{if(!e||!e.detail||!e.detail.currentTab)return;const n=e.detail.currentTab;this.isPhotosTab="photos"===n,this.isVariantsTab="variation"===n,this.isPhotosTab?(this.loadProductImgSelection=!0,this.currentProductImgSelection&&this.currentProductImgSelection.length?(this.applyCurrentImgSelection(),this.loadProductImgSelection=!1):this.initProductImgSelection()):this.isVariantsTab&&this.saveCurrentImgSelection(),t.next(this.isPhotosTab)});this.subscriptions.push(e)})}getShopImg(t){return this.http.get(`${this.image_manager_api}${this.shopId}/images/${t}`,this.getOptionsHeadersWithBearer())}initProductImgSelection(){this.imgSelectionService.emitImgListLoading(!0);const t=this.retrieveImgSelection().subscribe(t=>{if(!(t&&t.photos&&t.photos.infos&&t.photos.infos.files&&t.photos.infos.files.length))return this.loadProductImgSelection=!1,void this.imgSelectionService.emitImgListLoading(!1);const e=[];t.photos.infos.files.forEach(t=>e.push(this.getShopImg(t.toString()).pipe(hm(1))));const n=wg(e).subscribe(t=>{this.saveCurrentImgSelection(t),this.applyCurrentImgSelection(),this.loadProductImgSelection=!1},t=>{this.loadProductImgSelection=!1,this.imgSelectionService.emitImgListLoading(!1)});this.subscriptions.push(n)});this.subscriptions.push(t),this.canvaService.expectedImgSizesChange(this.expectedMediaDto)}retrieveInfoSelection(){const t=new FormData;return t.append("rub","main"),t.append("action","getInfos"),t.append("prodId",this.productId),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}retrieveImgSelection(){const t=new FormData;return t.append("rub","main"),t.append("action","getAllInfos"),t.append("prodId",this.productId),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}updateImgSelectionOnChange(){const t=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{if(t)if(this.isPhotosTab&&!this.loadProductImgSelection){const e=[];t.forEach(t=>{e.push(parseInt(t.id_file))}),this.updateProductImgSelection(e)}else!this.isPhotosTab&&t.length&&this.eventService.sendImgSelectedToPage(t[0])});this.subscriptions.push(t)}updateProductImgSelection(t){if(this.productId&&"0"!==this.productId||!Wizi._produit.global.PROD_ID||(this.productId=Wizi._produit.global.PROD_ID.toString()),Wizi._produit._dataTmp.photos.infos={},Wizi._produit._dataTmp.photos.infos.files=t,this.emitImgSelectionChange(t),this.productId&&"0"!==this.productId){const e=this.submitProductImg(t).subscribe();return void this.subscriptions.push(e)}const e=this.createProduct().subscribe(e=>{if(!e)throw"No product id created. Can not link image(s) to the new product.";Wizi._produit.global.PROD_ID=e,this.productId=e.toString(),this.submitProductImg(t).subscribe()});this.subscriptions.push(e)}submitProductImg(t){const e={files:t,couls:[]},n=new FormData;return n.append("rub","photos"),n.append("action","save"),n.append("newProd",this.isProductCreation?"1":"0"),n.append("prodId",this.productId),n.append("_token",this.shopToken),n.append("_shid",this.shopId.toString()),n.append("data",JSON.stringify(e)),this.http.post(this.productSheetApiRoute,n,this.getOptionsHeaders())}createProduct(){const t=new FormData;return t.append("rub","main"),t.append("action","createProd"),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}switchTabs(){return e_(document.getElementById("imgManagerModule"),"switchTab")}emitImgSelectionChange(t){const e=new CustomEvent("onImgSelectionChange",{detail:{idsImgList:t}});document.getElementById("imgManagerModule").dispatchEvent(e)}saveCurrentImgSelection(t){this.currentProductImgSelection=t||JSON.parse(JSON.stringify(this.imgSelectionService.getImgSelection()))}applyCurrentImgSelection(){this.imgSelectionService.setImgSelection(this.currentProductImgSelection),this.imgSelectionService.emitImgListLoading(!1)}getOptionsHeaders(){return{headers:new kg({"Access-Control-Allow-Origin":"*"})}}getOptionsHeadersWithBearer(){return{headers:new kg({Authorization:"Bearer "+this.shopToken})}}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(Qt(Hg),Qt(Ax),Qt(FP),Qt(Fx))},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),UP=(()=>{class t{constructor(){this.subscriptions=new Map,window.addEventListener("storage",t=>{this.subscriptions.has(t.key)&&this.subscriptions.get(t.key).next(this.unserialize(t.newValue))})}unserialize(t){let e=null;if(t)try{e=JSON.parse(t).data}catch(n){}return e}serialize(t){return JSON.stringify({data:t})}subscribe(t){return this.subscriptions.has(t)||this.subscriptions.set(t,new E),this.subscriptions.get(t)}get(t){const e=localStorage.getItem(t);return Promise.resolve(this.unserialize(e))}set(t,e){return localStorage.setItem(t,this.serialize(e)),Promise.resolve(!0)}remove(t){return localStorage.removeItem(t),Promise.resolve(!0)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),jP=(()=>{class t{constructor(t){this.storage=t,this.credentials=null,this.credentials$=this.storage.subscribe(wh.wiziApiCredentialsKey)}get(){return this.credentials?Promise.resolve(this.credentials):this.storage.get(wh.wiziApiCredentialsKey).then(t=>(this.credentials=t,this.credentials))}set(t){return this.storage.set(wh.wiziApiCredentialsKey,t).then(e=>(e&&(this.credentials=t),e))}remove(){return this.storage.remove(wh.wiziApiCredentialsKey).then(t=>(t&&(this.credentials=null),t))}}return t.\u0275fac=function(e){return new(e||t)(Qt(UP))},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function BP(t,e){1&t&&(Vo(0),No(1,"h3",3),ba(2),Wl(3,"translate"),zo(),Uo()),2&t&&(ws(2),wa(ql(3,1,"ImgManager.webElement.photosTitle")))}function HP(t,e){if(1&t){const t=jo();No(0,"p",8),No(1,"a",9),$o("click",(function(){return Ye(t),Go(2).open()})),ba(2),Wl(3,"translate"),zo(),zo()}2&t&&(ws(2),wa(ql(3,1,"ImgManager.webElement.OpenBtn")))}function $P(t,e){if(1&t){const t=jo();Vo(0),Mo(1,HP,4,3,"p",4),No(2,"div",5),No(3,"wz-img-manager",6,7),$o("imgManagerClosed",(function(){return Ye(t),Go().onImgManagerClosed()})),zo(),zo(),Uo()}if(2&t){const t=Go();ws(1),Ro("ngIf",t.imgManagerDisplayConfig.displayBtn&&t.isPhotosTab),ws(2),Ro("stateDisplayed",t.imgManagerDisplayConfig.stateDisplayed)("multipleImgMode",t.imgManagerDisplayConfig.multipleImgMode)("showImgManagerModule",t.imgManagerDisplayConfig.showImgManagerModule&&t.openImgManager)("showSelection",t.imgManagerDisplayConfig.showSelection)("externalConfig",t.imgExternalConfig)}}let WP=(()=>{class t{constructor(t,e,n,i,s,r,o,a){this.translateService=t,this.imgSelectionService=e,this.canvaService=n,this.ficheProductService=i,this.authCredentialsService=s,this.http=r,this.eventService=o,this.imgManagerService=a,this.openImgManager=!1,this.loading=!0,this.isPhotosTab=wh.isPhotosTab,this.subscriptions=[]}ngOnInit(){this.loading=!0,this.pageficheProductConfig=this.imgManagerService.getImgManagerDisplayConfig("fiche-product"),this.pageEventConfig=this.imgManagerService.getImgManagerDisplayConfig("wizi-block"),this.setCurrentLanguage(),this.setDisplayedPageConfig();const t=this.getCredentials().subscribe(t=>{this.loading=!1,this.initVariables(t),this.imgManagerDisplayConfig.pageficheProduct?this.setFicheProductPage():this.setPageWithEvents()});this.subscriptions.push(t)}initVariables(t){if(!t){if(wh.isWizishopcom)return;return this.setAppVars(null,wh.local.shopId,null,wh.local.token),this.setImgManagerExtraConfig(),void(this.imgManagerDisplayConfig=this.pageficheProductConfig)}this.setAppVars(t.user_id,t.shop_id,t.account_id,t.token),this.setImgManagerExtraConfig()}setFicheProductPage(){this.ficheProductService.setApiConfig(this.id_shop,this.token_shop),this.handleFicheProductTab(),this.closeImgManagerOnSwitchingTab(),this.subscribePageAskForImg(),this.ficheProductService.updateImgSelectionOnChange()}setPageWithEvents(){this.subscribePageAskForImg();const t=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{t&&t.length&&this.eventService.sendImgSelectedToPage(t[0])});this.subscriptions.push(t)}subscribePageAskForImg(){const t=this.eventService.pageAskForImg().subscribe(t=>{this.eventService.setEmitter(t&&t.detail?t.detail.from:null),this.imgSelectionService.setImgSelection(null),this.open()});this.subscriptions.push(t)}open(){this.openImgManager=!0}onImgManagerClosed(){this.openImgManager=!1}setCurrentLanguage(){const t=window.location.pathname.match(/^\/(\w+)\//);this.translateService.use(t&&t[1]?t[1]:"fr")}setDisplayedPageConfig(){const t=/\/products\/(\d+\/edit|create)/.test(window.location.pathname);this.imgManagerDisplayConfig=t?this.pageficheProductConfig:this.pageEventConfig}handleFicheProductTab(){const t=this.ficheProductService.handleTabs().subscribe(t=>{this.imgManagerDisplayConfig=t?this.pageficheProductConfig:this.pageEventConfig,this.isPhotosTab=t});this.subscriptions.push(t)}closeImgManagerOnSwitchingTab(){const t=this.ficheProductService.switchTabs().subscribe(t=>{this.openImgManager=!1});this.subscriptions.push(t)}getCredentials(){return j(this.authCredentialsService.get())}setAppVars(t,e,n,i){this.userId=t,this.id_shop=e,this.accountId=n,this.token_shop=i}setImgManagerExtraConfig(){const t=new LP;t.shop_token=this.token_shop,t.image_manager_route=wh.wizi_api+"/image-manager/shops/"+this.id_shop,t.canva_token="wdByHayF5v57nj2ZSLvu055O",t.canva_url="https://sdk.canva.com/designbutton/v2/api.js",t.pexels_token="563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94",t.pexels_route="https://api.pexels.com/v1",t.shop_category="other",t.assets_route=wh.assets_route;const e=new NP;e.url_raw_image=`${wh.CDN_URL}${this.id_shop}/RAW-`,e.url_100_image=`${wh.CDN_URL}${this.id_shop}/m100-`,e.url_200_image=`${wh.CDN_URL}${this.id_shop}/cs200-`,e.url_400_image=`${wh.CDN_URL}${this.id_shop}/cs400-`,e.url_800_image=`${wh.CDN_URL}${this.id_shop}/cs800-`,this.imgExternalConfig=new Ox,this.imgExternalConfig.api=t,this.imgExternalConfig.imgCDNConfig=e;const n=this.getShopCategory().subscribe(t=>{t&&t.category&&(this.imgExternalConfig.api.shop_category=t.category)});this.subscriptions.push(n)}getShopCategory(){return this.http.get(`${wh.wizi_api}/shops/${this.id_shop}`,this.getOptionsHeadersWithBearer())}getOptionsHeadersWithBearer(){return{headers:new kg({Authorization:"Bearer "+this.token_shop})}}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(Ao(Nm),Ao(Ax),Ao(Fx),Ao(VP),Ao(jP),Ao(Hg),Ao(FP),Ao(Rx))},t.\u0275cmp=pe({type:t,selectors:[["img-manager"]],decls:5,vars:5,consts:[[1,"info-bulle"],[1,"info-bulle-content",3,"innerHTML"],[4,"ngIf"],[1,"wizicss-sous-titre"],["class","img-manager-open",4,"ngIf"],[1,"imgManagerBox"],[3,"stateDisplayed","multipleImgMode","showImgManagerModule","showSelection","externalConfig","imgManagerClosed"],["wzImgManager",""],[1,"img-manager-open"],[3,"click"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"p",1),Wl(2,"translate"),Mo(3,BP,4,3,"ng-container",2),Mo(4,$P,5,6,"ng-container",2),zo()),2&t&&(ws(1),Ro("innerHTML",ql(2,3,"ImgManager.webElement.infoBulle"),Yi),ws(2),Ro("ngIf",e.imgManagerDisplayConfig.pageficheProduct&&e.isPhotosTab),ws(1),Ro("ngIf",!e.loading&&e.id_shop&&e.imgManagerDisplayConfig))},directives:[Zh,jx],pipes:[zm],styles:[""]}),t})();function qP(t){return new zP(t,wh.translations_route,".json?version=0.0.81")}let GP=(()=>{class t{}return t.\u0275mod=_e({type:t,bootstrap:[WP]}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[{provide:Nh,useValue:"/"}],imports:[[Lu,sg,RP,$b.forRoot([{path:"**",component:WP}]),Fm.forRoot({defaultLanguage:"fr",loader:{provide:_m,useFactory:qP,deps:[Hg]}})]]}),t})();wh.production&&function(){if(Si)throw new Error("Cannot enable prod mode after platform setup.");Ci=!1}(),Ou().bootstrapModule(GP).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},"0Tit":function(t,e){var n="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function r(t){return 3*t}function o(t,e,n){return((i(e,n)*t+s(e,n))*t+r(e))*t}function a(t,e,n){return 3*i(e,n)*t*t+2*s(e,n)*t+r(e)}function l(t){return t}t.exports=function(t,e,i,s){if(!(0<=t&&t<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&i===s)return l;for(var r=n?new Float32Array(11):new Array(11),c=0;c<11;++c)r[c]=o(.1*c,t,i);return function(n){return 0===n?0:1===n?1:o(function(e){for(var n=0,s=1;10!==s&&r[s]<=e;++s)n+=.1;--s;var l=n+(e-r[s])/(r[s+1]-r[s])*.1,c=a(l,t,i);return c>=.001?function(t,e,n,i){for(var s=0;s<4;++s){var r=a(e,n,i);if(0===r)return e;e-=(o(e,n,i)-t)/r}return e}(e,l,t,i):0===c?l:function(t,e,n,i,s){var r,a,l=0;do{(r=o(a=e+(n-e)/2,i,s)-t)>0?n=a:e=a}while(Math.abs(r)>1e-7&&++l<10);return a}(e,n,n+.1,t,i)}(n),e,s)}}},"4fRq":function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);t.exports=function(){return n(i),i}}else{var s=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),s[e]=t>>>((3&e)<<3)&255;return s}}},EcEN:function(t,e,n){var i=n("xDdU"),s=n("xk4V"),r=s;r.v1=i,r.v4=s,t.exports=r},I2ZF:function(t,e){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}},xDdU:function(t,e,n){var i,s,r=n("4fRq"),o=n("I2ZF"),a=0,l=0;t.exports=function(t,e,n){var c=e&&n||0,h=e||[],u=(t=t||{}).node||i,d=void 0!==t.clockseq?t.clockseq:s;if(null==u||null==d){var p=r();null==u&&(u=i=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=s=16383&(p[6]<<8|p[7]))}var g=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:l+1,f=g-a+(m-l)/1e4;if(f<0&&void 0===t.clockseq&&(d=d+1&16383),(f<0||g>a)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=g,l=m,s=d;var _=(1e4*(268435455&(g+=122192928e5))+m)%4294967296;h[c++]=_>>>24&255,h[c++]=_>>>16&255,h[c++]=_>>>8&255,h[c++]=255&_;var v=g/4294967296*1e4&268435455;h[c++]=v>>>8&255,h[c++]=255&v,h[c++]=v>>>24&15|16,h[c++]=v>>>16&255,h[c++]=d>>>8|128,h[c++]=255&d;for(var y=0;y<6;++y)h[c+y]=u[y];return e||o(h)}},xk4V:function(t,e,n){var i=n("4fRq"),s=n("I2ZF");t.exports=function(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[r+a]=o[a];return e||s(o)}},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let s=!1;const r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else s&&console.log("RxJS: Back to a better error behavior. Thank you. <3");s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(r.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const h=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let u=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_unsubscribe:s,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;t<n.length;++t)n[t].remove(this);if(i(s))try{s.call(this)}catch(o){e=o instanceof h?d(o.errors):[o]}if(l(r)){let t=-1,n=r.length;for(;++t<n;){const n=r[t];if(c(n))try{n.unsubscribe()}catch(o){e=e||[],o instanceof h?e=e.concat(d(o.errors)):e.push(o)}}}if(e)throw new h(e)}add(e){let n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){const e=n;n=new t,n._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:i}=n;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}const s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}return t.EMPTY=function(t){return t.closed=!0,t}(new t),t})();function d(t){return t.reduce((t,e)=>t.concat(e instanceof h?e.errors:e),[])}const p=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class g extends u{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof g?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new m(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new m(this,t,e,n)}}[p](){return this}static create(t,e,n){const i=new g(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class m extends g{constructor(t,e,n,s){let r;super(),this._parentSubscriber=t;let o=this;i(e)?r=e:e&&(r=e.next,n=e.error,s=e.complete,e!==a&&(o=Object.create(e),i(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;r.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=r;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);r.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),r.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!r.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return r.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(o(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const f=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function _(t){return t}function v(...t){return y(t)}function y(t){return 0===t.length?_:1===t.length?t[0]:function(e){return t.reduce((t,e)=>e(t),e)}}let b=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:i}=this,s=function(t,e,n){if(t){if(t instanceof g)return t;if(t[p])return t[p]()}return t||e||n?new g(t,e,n):new g(a)}(t,e,n);if(s.add(i?i.call(s,this.source):this.source||r.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),r.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){r.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:i}=t;if(e||i)return!1;t=n&&n instanceof g?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=w(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(s){n(s),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[f](){return this}pipe(...t){return 0===t.length?this:y(t)(this)}toPromise(t){return new(t=w(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function w(t){if(t||(t=r.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const C=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class S extends u{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class I extends g{constructor(t){super(t),this.destination=t}}let E=(()=>{class t extends b{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[p](){return new I(this)}lift(t){const e=new x(this,this);return e.operator=t,e}next(t){if(this.closed)throw new C;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].next(t)}}error(t){if(this.closed)throw new C;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].error(t);this.observers.length=0}complete(){if(this.closed)throw new C;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new C;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new C;return this.hasError?(t.error(this.thrownError),u.EMPTY):this.isStopped?(t.complete(),u.EMPTY):(this.observers.push(t),new S(this,t))}asObservable(){const t=new b;return t.source=this,t}}return t.create=(t,e)=>new x(t,e),t})();class x extends E{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):u.EMPTY}}function P(t){return t&&"function"==typeof t.schedule}class T extends g{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const k=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.complete()};function M(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}const D=M(),A=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function O(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const R=t=>{if(t&&"function"==typeof t[f])return i=t,t=>{const e=i[f]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(A(t))return k(t);if(O(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[D])return e=t,t=>{const n=e[D]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,i};function L(t,e,n,i,s=new T(t,n,i)){if(!s.closed)return e instanceof b?e.subscribe(s):R(e)(s)}class N extends g{notifyNext(t,e,n,i,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function z(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new F(t,e))}}class F{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new V(t,this.project,this.thisArg))}}class V extends g{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function U(t,e){return new b(n=>{const i=new u;let s=0;return i.add(e.schedule((function(){s!==t.length?(n.next(t[s++]),n.closed||i.add(this.schedule())):n.complete()}))),i})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[f]}(t))return function(t,e){return new b(n=>{const i=new u;return i.add(e.schedule(()=>{const s=t[f]();i.add(s.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if(O(t))return function(t,e){return new b(n=>{const i=new u;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if(A(t))return U(t,e);if(function(t){return t&&"function"==typeof t[D]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new b(n=>{const i=new u;let s;return i.add(()=>{s&&"function"==typeof s.return&&s.return()}),i.add(e.schedule(()=>{s=t[D](),i.add(e.schedule((function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())})))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof b?t:new b(R(t))}function B(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(B((n,i)=>j(t(n,i)).pipe(z((t,s)=>e(n,t,i,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new H(t,n)))}class H{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new $(t,this.project,this.concurrent))}}class $ extends N{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){const i=new T(this,e,n),s=this.destination;s.add(i);const r=L(this,t,void 0,void 0,i);r!==i&&s.add(r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,i,s){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function W(t=Number.POSITIVE_INFINITY){return B(_,t)}function q(t,e){return e?U(t,e):new b(k(t))}function G(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return P(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof b?t[0]:W(e)(q(t,n))}function Q(){return function(t){return t.lift(new K(t))}}class K{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new Z(t,n),s=e.subscribe(i);return i.closed||(i.connection=n.connect()),s}}class Z extends g{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class Y extends b{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new u,t.add(this.source.subscribe(new J(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.EMPTY)),t}refCount(){return Q()(this)}}const X=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class J extends I{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function tt(){return new E}function et(t){return{toString:t}.toString()}function nt(t,e,n){return et(()=>{const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return i.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,i){const s=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;s.length<=i;)s.push(null);return(s[i]=s[i]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const it=nt("Inject",t=>({token:t})),st=nt("Optional"),rt=nt("Self"),ot=nt("SkipSelf");var at=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function lt(t){for(let e in t)if(t[e]===lt)return e;throw Error("Could not find renamed property on target object.")}function ct(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ht(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ut(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function dt(t){return pt(t,t[mt])||pt(t,t[vt])}function pt(t,e){return e&&e.token===t?e:null}function gt(t){return t&&(t.hasOwnProperty(ft)||t.hasOwnProperty(yt))?t[ft]:null}const mt=lt({"\u0275prov":lt}),ft=lt({"\u0275inj":lt}),_t=lt({"\u0275provFallback":lt}),vt=lt({ngInjectableDef:lt}),yt=lt({ngInjectorDef:lt});function bt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function wt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Ct=lt({__forward_ref__:lt});function St(t){return t.__forward_ref__=St,t.toString=function(){return bt(this())},t}function It(t){return Et(t)?t():t}function Et(t){return"function"==typeof t&&t.hasOwnProperty(Ct)&&t.__forward_ref__===St}const xt="undefined"!=typeof globalThis&&globalThis,Pt="undefined"!=typeof window&&window,Tt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,kt="undefined"!=typeof global&&global,Mt=xt||kt||Pt||Tt,Dt=lt({"\u0275cmp":lt}),At=lt({"\u0275dir":lt}),Ot=lt({"\u0275pipe":lt}),Rt=lt({"\u0275mod":lt}),Lt=lt({"\u0275loc":lt}),Nt=lt({"\u0275fac":lt}),zt=lt({__NG_ELEMENT_ID__:lt});class Ft{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ht({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const Vt=new Ft("INJECTOR",-1),Ut={},jt=/\n/gm,Bt=lt({provide:String,useValue:lt});let Ht,$t=void 0;function Wt(t){const e=$t;return $t=t,e}function qt(t){const e=Ht;return Ht=t,e}function Gt(t,e=at.Default){if(void 0===$t)throw new Error("inject() must be called from an injection context");return null===$t?Zt(t,void 0,e):$t.get(t,e&at.Optional?null:void 0,e)}function Qt(t,e=at.Default){return(Ht||Gt)(It(t),e)}const Kt=Qt;function Zt(t,e,n){const i=dt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&at.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}function Yt(t){const e=[];for(let n=0;n<t.length;n++){const i=It(t[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let t=void 0,n=at.Default;for(let e=0;e<i.length;e++){const s=i[e];s instanceof st||"Optional"===s.ngMetadataName||s===st?n|=at.Optional:s instanceof ot||"SkipSelf"===s.ngMetadataName||s===ot?n|=at.SkipSelf:s instanceof rt||"Self"===s.ngMetadataName||s===rt?n|=at.Self:t=s instanceof it||s===it?s.token:s}e.push(Qt(t,n))}else e.push(Qt(i))}return e}class Xt{get(t,e=Ut){if(e===Ut){const e=new Error(`NullInjectorError: No provider for ${bt(t)}!`);throw e.name="NullInjectorError",e}return e}}class Jt{}class te{}function ee(t,e){t.forEach(t=>Array.isArray(t)?ee(t,e):e(t))}function ne(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function ie(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function se(t,e){const n=[];for(let i=0;i<t;i++)n.push(e);return n}function re(t,e,n){let i=ae(t,e);return i>=0?t[1|i]=n:(i=~i,function(t,e,n,i){let s=t.length;if(s==e)t.push(n,i);else if(1===s)t.push(i,t[0]),t[0]=n;else{for(s--,t.push(t[s-1],t[s]);s>e;)t[s]=t[s-2],s--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function oe(t,e){const n=ae(t,e);if(n>=0)return t[1|n]}function ae(t,e){return function(t,e,n){let i=0,s=t.length>>1;for(;s!==i;){const n=i+(s-i>>1),r=t[n<<1];if(e===r)return n<<1;r>e?s=n:i=n+1}return~(s<<1)}(t,e)}const le=function(){var t={OnPush:0,Default:1};return t[t.OnPush]="OnPush",t[t.Default]="Default",t}(),ce=function(){var t={Emulated:0,Native:1,None:2,ShadowDom:3};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t[t.ShadowDom]="ShadowDom",t}(),he={},ue=[];let de=0;function pe(t){return et(()=>{const e=t.type,n=e.prototype,i={},s={type:e,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onChanges:null,onInit:n.ngOnInit||null,doCheck:n.ngDoCheck||null,afterContentInit:n.ngAfterContentInit||null,afterContentChecked:n.ngAfterContentChecked||null,afterViewInit:n.ngAfterViewInit||null,afterViewChecked:n.ngAfterViewChecked||null,onDestroy:n.ngOnDestroy||null,onPush:t.changeDetection===le.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ue,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ce.Emulated,id:"c",styles:t.styles||ue,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,o=t.features,a=t.pipes;return s.id+=de++,s.inputs=ve(t.inputs,i),s.outputs=ve(t.outputs),o&&o.forEach(t=>t(s)),s.directiveDefs=r?()=>("function"==typeof r?r():r).map(ge):null,s.pipeDefs=a?()=>("function"==typeof a?a():a).map(me):null,s})}function ge(t){return we(t)||function(t){return t[At]||null}(t)}function me(t){return function(t){return t[Ot]||null}(t)}const fe={};function _e(t){const e={type:t.type,bootstrap:t.bootstrap||ue,declarations:t.declarations||ue,imports:t.imports||ue,exports:t.exports||ue,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&et(()=>{fe[t.id]=t.type}),e}function ve(t,e){if(null==t)return he;const n={};for(const i in t)if(t.hasOwnProperty(i)){let s=t[i],r=s;Array.isArray(s)&&(r=s[1],s=s[0]),n[s]=i,e&&(e[s]=r)}return n}const ye=pe;function be(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function we(t){return t[Dt]||null}function Ce(t,e){return t.hasOwnProperty(Nt)?t[Nt]:null}function Se(t,e){const n=t[Rt]||null;if(!n&&!0===e)throw new Error(`Type ${bt(t)} does not have '\u0275mod' property.`);return n}function Ie(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ee(t){return Array.isArray(t)&&!0===t[1]}function xe(t){return 0!=(8&t.flags)}function Pe(t){return 2==(2&t.flags)}function Te(t){return 1==(1&t.flags)}function ke(t){return null!==t.template}function Me(t){return 0!=(512&t[2])}let De=void 0;function Ae(){return void 0!==De?De:"undefined"!=typeof document?document:void 0}function Oe(t){return!!t.listen}const Re={createRenderer:(t,e)=>Ae()};function Le(t){for(;Array.isArray(t);)t=t[0];return t}function Ne(t,e){return Le(e[t+20])}function ze(t,e){return Le(e[t.index])}function Fe(t,e){return t.data[e+20]}function Ve(t,e){return t[e+20]}function Ue(t,e){const n=e[t];return Ie(n)?n:n[0]}function je(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Be(t){return 4==(4&t[2])}function He(t){return 128==(128&t[2])}function $e(t,e){return null===t||null==e?null:t[e]}function We(t){t[18]=0}function qe(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const Ge={lFrame:fn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Qe(){return Ge.bindingsEnabled}function Ke(){return Ge.lFrame.lView}function Ze(){return Ge.lFrame.tView}function Ye(t){Ge.lFrame.contextLView=t}function Xe(){return Ge.lFrame.previousOrParentTNode}function Je(t,e){Ge.lFrame.previousOrParentTNode=t,Ge.lFrame.isParent=e}function tn(){return Ge.lFrame.isParent}function en(){Ge.lFrame.isParent=!1}function nn(){return Ge.checkNoChangesMode}function sn(t){Ge.checkNoChangesMode=t}function rn(){const t=Ge.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function on(){return Ge.lFrame.bindingIndex}function an(){return Ge.lFrame.bindingIndex++}function ln(t){const e=Ge.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function cn(t,e){const n=Ge.lFrame;n.bindingIndex=n.bindingRootIndex=t,hn(e)}function hn(t){Ge.lFrame.currentDirectiveIndex=t}function un(){return Ge.lFrame.currentQueryIndex}function dn(t){Ge.lFrame.currentQueryIndex=t}function pn(t,e){const n=mn();Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function gn(t,e){const n=mn(),i=t[1];Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=i,n.contextLView=t,n.bindingIndex=i.bindingStartIndex}function mn(){const t=Ge.lFrame,e=null===t?null:t.child;return null===e?fn(t):e}function fn(t){const e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentSanitizer:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function _n(){const t=Ge.lFrame;return Ge.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}const vn=_n;function yn(){const t=_n();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.currentSanitizer=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function bn(){return Ge.lFrame.selectedIndex}function wn(t){Ge.lFrame.selectedIndex=t}function Cn(){const t=Ge.lFrame;return Fe(t.tView,t.selectedIndex)}function Sn(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n<i;n++){const e=t.data[n];e.afterContentInit&&(t.contentHooks||(t.contentHooks=[])).push(-n,e.afterContentInit),e.afterContentChecked&&((t.contentHooks||(t.contentHooks=[])).push(n,e.afterContentChecked),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,e.afterContentChecked)),e.afterViewInit&&(t.viewHooks||(t.viewHooks=[])).push(-n,e.afterViewInit),e.afterViewChecked&&((t.viewHooks||(t.viewHooks=[])).push(n,e.afterViewChecked),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,e.afterViewChecked)),null!=e.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(n,e.onDestroy)}}function In(t,e,n){Pn(t,e,3,n)}function En(t,e,n,i){(3&t[2])===n&&Pn(t,e,n,i)}function xn(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function Pn(t,e,n,i){const s=null!=i?i:-1;let r=0;for(let o=void 0!==i?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(r=e[o],null!=i&&r>=i)break}else e[o]<0&&(t[18]+=65536),(r<s||-1==s)&&(Tn(t,n,e,o),t[18]=(4294901760&t[18])+o+2),o++}function Tn(t,e,n,i){const s=n[i]<0,r=n[i+1],o=t[s?-n[i]:n[i]];s?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,r.call(o)):r.call(o)}class kn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Mn(t,e,n){const i=Oe(t);let s=0;for(;s<n.length;){const r=n[s];if("number"==typeof r){if(0!==r)break;s++;const o=n[s++],a=n[s++],l=n[s++];i?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=r,a=n[++s];An(o)?i&&t.setProperty(e,o,a):i?t.setAttribute(e,o,a):e.setAttribute(o,a),s++}}return s}function Dn(t){return 3===t||4===t||6===t}function An(t){return 64===t.charCodeAt(0)}function On(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let i=0;i<e.length;i++){const s=e[i];"number"==typeof s?n=s:0===n||Rn(t,n,s,null,-1===n||2===n?e[++i]:null)}}return t}function Rn(t,e,n,i,s){let r=0,o=t.length;if(-1===e)o=-1;else for(;r<t.length;){const n=t[r++];if("number"==typeof n){if(n===e){o=-1;break}if(n>e){o=r-1;break}}}for(;r<t.length;){const e=t[r];if("number"==typeof e)break;if(e===n){if(null===i)return void(null!==s&&(t[r+1]=s));if(i===t[r+1])return void(t[r+2]=s)}r++,null!==i&&r++,null!==s&&r++}-1!==o&&(t.splice(o,0,e),r=o+1),t.splice(r++,0,n),null!==i&&t.splice(r++,0,i),null!==s&&t.splice(r++,0,s)}function Ln(t){return-1!==t}function Nn(t){return 32767&t}function zn(t){return t>>16}function Fn(t,e){let n=zn(t),i=e;for(;n>0;)i=i[15],n--;return i}function Vn(t){return"string"==typeof t?t:null==t?"":""+t}function Un(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Vn(t)}const jn=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Mt))();function Bn(t){return{name:"window",target:t.ownerDocument.defaultView}}function Hn(t){return{name:"document",target:t.ownerDocument}}function $n(t){return t instanceof Function?t():t}let Wn=!0;function qn(t){const e=Wn;return Wn=t,e}let Gn=0;function Qn(t,e){const n=Zn(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Kn(i.data,t),Kn(e,null),Kn(i.blueprint,null));const s=Yn(t,e),r=t.injectorIndex;if(Ln(s)){const t=Nn(s),n=Fn(s,e),i=n[1].data;for(let s=0;s<8;s++)e[r+s]=n[t+s]|i[t+s]}return e[r+8]=s,r}function Kn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Zn(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function Yn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=e[6],i=1;for(;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function Xn(t,e,n){!function(t,e,n){let i="string"!=typeof n?n[zt]:n.charCodeAt(0)||0;null==i&&(i=n[zt]=Gn++);const s=255&i,r=1<<s,o=64&s,a=32&s,l=e.data;128&s?o?a?l[t+7]|=r:l[t+6]|=r:a?l[t+5]|=r:l[t+4]|=r:o?a?l[t+3]|=r:l[t+2]|=r:a?l[t+1]|=r:l[t]|=r}(t,e,n)}function Jn(t,e,n,i=at.Default,s){if(null!==t){const s=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t[zt];return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof s){pn(e,t);try{const t=s();if(null!=t||i&at.Optional)return t;throw new Error(`No provider for ${Un(n)}!`)}finally{vn()}}else if("number"==typeof s){if(-1===s)return new oi(t,e);let r=null,o=Zn(t,e),a=-1,l=i&at.Host?e[16][6]:null;for((-1===o||i&at.SkipSelf)&&(a=-1===o?Yn(t,e):e[o+8],ri(i,!1)?(r=e[1],o=Nn(a),e=Fn(a,e)):o=-1);-1!==o;){a=e[o+8];const t=e[1];if(si(s,o,t.data)){const t=ei(o,e,n,r,i,l);if(t!==ti)return t}ri(i,e[1].data[o+8]===l)&&si(s,o,e)?(r=t,o=Nn(a),e=Fn(a,e)):o=-1}}}if(i&at.Optional&&void 0===s&&(s=null),0==(i&(at.Self|at.Host))){const t=e[9],r=qt(void 0);try{return t?t.get(n,s,i&at.Optional):Zt(n,s,i&at.Optional)}finally{qt(r)}}if(i&at.Optional)return s;throw new Error(`NodeInjector: NOT_FOUND [${Un(n)}]`)}const ti={};function ei(t,e,n,i,s,r){const o=e[1],a=o.data[t+8],l=ni(a,o,n,null==i?Pe(a)&&Wn:i!=o&&3===a.type,s&at.Host&&r===a);return null!==l?ii(e,o,l,a):ti}function ni(t,e,n,i,s){const r=t.providerIndexes,o=e.data,a=65535&r,l=t.directiveStart,c=r>>16,h=s?a+c:t.directiveEnd;for(let u=i?a:a+c;u<h;u++){const t=o[u];if(u<l&&n===t||u>=l&&t.type===n)return u}if(s){const t=o[l];if(t&&ke(t)&&t.type===n)return l}return null}function ii(t,e,n,i){let s=t[n];const r=e.data;if(s instanceof kn){const o=s;if(o.resolving)throw new Error("Circular dep for "+Un(r[n]));const a=qn(o.canSeeViewProviders);let l;o.resolving=!0,o.injectImpl&&(l=qt(o.injectImpl)),pn(t,i);try{s=t[n]=o.factory(void 0,r,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{onChanges:i,onInit:s,doCheck:r}=e;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)),s&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-t,s),r&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r))}(n,r[n],e)}finally{o.injectImpl&&qt(l),qn(a),o.resolving=!1,vn()}}return s}function si(t,e,n){const i=64&t,s=32&t;let r;return r=128&t?i?s?n[e+7]:n[e+6]:s?n[e+5]:n[e+4]:i?s?n[e+3]:n[e+2]:s?n[e+1]:n[e],!!(r&1<<t)}function ri(t,e){return!(t&at.Self||t&at.Host&&e)}class oi{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Jn(this._tNode,this._lView,t,void 0,e)}}function ai(t){const e=t;if(Et(t))return()=>{const t=ai(It(e));return t?t():null};let n=Ce(e);if(null===n){const t=gt(e);n=t&&t.factory}return n||null}function li(t){return et(()=>{const e=t.prototype.constructor,n=e[Nt]||ai(e),i=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==i;){const t=s[Nt]||ai(s);if(t&&t!==n)return t;s=Object.getPrototypeOf(s)}return t=>new t})}function ci(t){return t.ngDebugContext}function hi(t){return t.ngOriginalError}function ui(t,...e){t.error(...e)}class di{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||ui}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?ci(t)?ci(t):this._findContext(hi(t)):null}_findOriginalError(t){let e=hi(t);for(;e&&hi(e);)e=hi(e);return e}}class pi{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class gi extends pi{getTypeName(){return"HTML"}}class mi extends pi{getTypeName(){return"Style"}}class fi extends pi{getTypeName(){return"Script"}}class _i extends pi{getTypeName(){return"URL"}}class vi extends pi{getTypeName(){return"ResourceURL"}}function yi(t){return t instanceof pi?t.changingThisBreaksApplicationSecurity:t}function bi(t,e){const n=wi(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function wi(t){return t instanceof pi&&t.getTypeName()||null}let Ci=!0,Si=!1;function Ii(){return Si=!0,Ci}class Ei{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");let e=this.inertDocument.body;if(null==e){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),e=this.inertDocument.createElement("body"),t.appendChild(e)}e.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!e.querySelector||e.querySelector("svg")?(e.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=e.querySelector&&e.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(i){return null}const e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(void 0);const n=e.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(t){t="<body><remove></remove>"+t+"</body>";try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}getInertBodyElement_InertDocument(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;const n=this.inertDocument.createElement("body");return n.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0<i;i--){const n=e.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const xi=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Pi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Ti(t){return(t=String(t)).match(xi)||t.match(Pi)?t:(Ii()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function ki(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Mi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const Di=ki("area,br,col,hr,img,wbr"),Ai=ki("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Oi=ki("rp,rt"),Ri=Mi(Oi,Ai),Li=Mi(Di,Mi(Ai,ki("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")),Mi(Oi,ki("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")),Ri),Ni=ki("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),zi=ki("srcset"),Fi=Mi(Ni,zi,ki("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),ki("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Vi=ki("script,style,template");class Ui{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!Li.hasOwnProperty(e))return this.sanitizedSomething=!0,!Vi.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let s=0;s<n.length;s++){const t=n.item(s),e=t.name,r=e.toLowerCase();if(!Fi.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let o=t.value;Ni[r]&&(o=Ti(o)),zi[r]&&(i=o,o=(i=String(i)).split(",").map(t=>Ti(t.trim())).join(", ")),this.buf.push(" ",e,'="',Hi(o),'"')}var i;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();Li.hasOwnProperty(e)&&!Di.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Hi(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const ji=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bi=/([^\#-~ |!])/g;function Hi(t){return t.replace(/&/g,"&").replace(ji,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(Bi,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let $i;function Wi(t,e){let n=null;try{$i=$i||new Ei(t);let i=e?String(e):"";n=$i.getInertBodyElement(i);let s=5,r=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=r,r=n.innerHTML,n=$i.getInertBodyElement(i)}while(i!==r);const o=new Ui,a=o.sanitizeChildren(qi(n)||n);return Ii()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=qi(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function qi(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}const Gi=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}(),Qi=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Ki=/^url\(([^)]+)\)$/;function Zi(t){if(!(t=String(t).trim()))return"";const e=t.match(Ki);return e&&Ti(e[1])===e[1]||t.match(Qi)&&function(t){let e=!0,n=!0;for(let i=0;i<t.length;i++){const s=t.charAt(i);"'"===s&&n?e=!e:'"'===s&&e&&(n=!n)}return e&&n}(t)?t:(Ii()&&console.warn(`WARNING: sanitizing unsafe style value ${t} (see http://g.co/ng/security#xss).`),"unsafe")}function Yi(t){const e=es();return e?e.sanitize(Gi.HTML,t)||"":bi(t,"HTML")?yi(t):Wi(Ae(),Vn(t))}function Xi(t){const e=es();return e?e.sanitize(Gi.STYLE,t)||"":bi(t,"Style")?yi(t):Zi(Vn(t))}function Ji(t){const e=es();return e?e.sanitize(Gi.URL,t)||"":bi(t,"URL")?yi(t):Ti(Vn(t))}const ts=function(t,e,n){if(void 0===e&&void 0===n)return Xi(t);let i=!0;return 1&(n=n||3)&&(i=function(t){return"background-image"===t||"backgroundImage"===t||"background"===t||"border-image"===t||"borderImage"===t||"border-image-source"===t||"borderImageSource"===t||"filter"===t||"list-style"===t||"listStyle"===t||"list-style-image"===t||"listStyleImage"===t||"clip-path"===t||"clipPath"===t}(t)),2&n?i?Xi(e):yi(e):i};function es(){const t=Ke();return t&&t[12]}function ns(t,e){t.__ngContext__=e}function is(t){throw new Error("Multiple components match node with tagname "+t.tagName)}function ss(){throw new Error("Cannot mix multi providers and regular providers")}function rs(t,e,n){let i=t.length;for(;;){const s=t.indexOf(e,n);if(-1===s)return s;if(0===s||t.charCodeAt(s-1)<=32){const n=e.length;if(s+n===i||t.charCodeAt(s+n)<=32)return s}n=s+1}}function os(t,e,n){let i=0;for(;i<t.length;){let s=t[i++];if(n&&"class"===s){if(s=t[i],-1!==rs(s.toLowerCase(),e,0))return!0}else if(1===s){for(;i<t.length&&"string"==typeof(s=t[i++]);)if(s.toLowerCase()===e)return!0;return!1}}return!1}function as(t){return 0===t.type&&"ng-template"!==t.tagName}function ls(t,e,n){return e===(0!==t.type||n?t.tagName:"ng-template")}function cs(t,e,n){let i=4;const s=t.attrs||[],r=function(t){for(let e=0;e<t.length;e++)if(Dn(t[e]))return e;return t.length}(s);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!ls(t,l,n)||""===l&&1===e.length){if(hs(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==t.attrs){if(!os(t.attrs,c,n)){if(hs(i))return!1;o=!0}continue}const h=us(8&i?"class":l,s,as(t),n);if(-1===h){if(hs(i))return!1;o=!0;continue}if(""!==c){let t;t=h>r?"":s[h+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==rs(e,c,0)||2&i&&c!==t){if(hs(i))return!1;o=!0}}}}else{if(!o&&!hs(i)&&!hs(l))return!1;if(o&&hs(l))continue;o=!1,i=l|1&i}}return hs(i)||o}function hs(t){return 0==(1&t)}function us(t,e,n,i){if(null===e)return-1;let s=0;if(i||!n){let n=!1;for(;s<e.length;){const i=e[s];if(i===t)return s;if(3===i||6===i)n=!0;else{if(1===i||2===i){let t=e[++s];for(;"string"==typeof t;)t=e[++s];continue}if(4===i)break;if(0===i){s+=4;continue}}s+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const i=t[n];if("number"==typeof i)return-1;if(i===e)return n;n++}return-1}(e,t)}function ds(t,e,n=!1){for(let i=0;i<e.length;i++)if(cs(t,e[i],n))return!0;return!1}function ps(t,e){t:for(let n=0;n<e.length;n++){const i=e[n];if(t.length===i.length){for(let e=0;e<t.length;e++)if(t[e]!==i[e])continue t;return!0}}return!1}function gs(t,e){return t?":not("+e.trim()+")":e}function ms(t){let e=t[0],n=1,i=2,s="",r=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&i){const e=t[++n];s+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&i?s+="."+o:4&i&&(s+=" "+o);else""===s||hs(o)||(e+=gs(r,s),s=""),i=o,r=r||!hs(i);n++}return""!==s&&(e+=gs(r,s)),e}const fs={};function _s(t){const e=t[3];return Ee(e)?e[3]:e}function vs(t){return bs(t[13])}function ys(t){return bs(t[4])}function bs(t){for(;null!==t&&!Ee(t);)t=t[4];return t}function ws(t){Cs(Ze(),Ke(),bn()+t,nn())}function Cs(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&In(e,i,n)}else{const i=t.preOrderHooks;null!==i&&En(e,i,0,n)}wn(n)}function Ss(t,e){return t<<17|e<<2}function Is(t){return t>>17&32767}function Es(t){return 2|t}function xs(t){return(131068&t)>>2}function Ps(t,e){return-131069&t|e<<2}function Ts(t){return 1|t}function ks(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const s=n[i],r=n[i+1];if(-1!==r){const n=t.data[r];dn(s),n.contentQueries(2,e[r],r)}}}function Ms(t,e,n){return Oe(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function Ds(t,e,n,i,s,r,o,a,l,c){const h=e.blueprint.slice();return h[0]=s,h[2]=140|i,We(h),h[3]=h[15]=t,h[8]=n,h[10]=o||t&&t[10],h[11]=a||t&&t[11],h[12]=l||t&&t[12]||null,h[9]=c||t&&t[9]||null,h[6]=r,h[16]=2==e.type?t[16]:h,h}function As(t,e,n,i,s,r){const o=n+20,a=t.data[o]||function(t,e,n,i,s,r){const o=Xe(),a=tn(),l=a?o:o&&o.parent,c=t.data[n]=Bs(0,l&&l!==e?l:null,i,n,s,r);return null===t.firstChild&&(t.firstChild=c),o&&(!a||null!=o.child||null===c.parent&&2!==o.type?a||(o.next=c):o.child=c),c}(t,e,o,i,s,r);return Je(a,!0),a}function Os(t,e,n){gn(e,e[6]);try{const i=t.viewQuery;null!==i&&hr(1,i,n);const s=t.template;null!==s&&Ns(t,e,s,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&ks(t,e),t.staticViewQueries&&hr(2,t.viewQuery,n);const r=t.components;null!==r&&function(t,e){for(let n=0;n<e.length;n++)rr(t,e[n])}(e,r)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),i}finally{e[2]&=-5,yn()}}function Rs(t,e,n,i){const s=e[2];if(256==(256&s))return;gn(e,e[6]);const r=nn();try{We(e),Ge.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&Ns(t,e,n,2,i);const o=3==(3&s);if(!r)if(o){const n=t.preOrderCheckHooks;null!==n&&In(e,n,null)}else{const n=t.preOrderHooks;null!==n&&En(e,n,0,null),xn(e,0)}if(function(t){for(let e=vs(t);null!==e;e=ys(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],i=n[3];0==(1024&n[2])&&qe(i,1),n[2]|=1024}}}(e),function(t){for(let e=vs(t);null!==e;e=ys(e))for(let t=10;t<e.length;t++){const n=e[t],i=n[1];He(n)&&Rs(i,n,i.template,n[8])}}(e),null!==t.contentQueries&&ks(t,e),!r)if(o){const n=t.contentCheckHooks;null!==n&&In(e,n)}else{const n=t.contentHooks;null!==n&&En(e,n,1),xn(e,1)}!function(t,e){try{const n=t.expandoInstructions;if(null!==n){let i=t.expandoStartIndex,s=-1,r=-1;for(let t=0;t<n.length;t++){const o=n[t];"number"==typeof o?o<=0?(r=0-o,wn(r),i+=9+n[++t],s=i):i+=o:(null!==o&&(cn(i,s),o(2,e[s])),s++)}}}finally{wn(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)sr(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&hr(2,l,i),!r)if(o){const n=t.viewCheckHooks;null!==n&&In(e,n)}else{const n=t.viewHooks;null!==n&&En(e,n,2),xn(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),r||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,qe(e[3],-1))}finally{yn()}}function Ls(t,e,n,i){const s=e[10],r=!nn(),o=Be(e);try{r&&!o&&s.begin&&s.begin(),o&&Os(t,e,i),Rs(t,e,n,i)}finally{r&&!o&&s.end&&s.end()}}function Ns(t,e,n,i,s){const r=bn();try{wn(-1),2&i&&e.length>20&&Cs(t,e,0,nn()),n(i,s)}finally{wn(r)}}function zs(t,e,n){if(xe(e)){const i=e.directiveEnd;for(let s=e.directiveStart;s<i;s++){const e=t.data[s];e.contentQueries&&e.contentQueries(1,n[s],s)}}}function Fs(t,e,n){Qe()&&(function(t,e,n,i){const s=n.directiveStart,r=n.directiveEnd;t.firstCreatePass||Qn(n,e),ns(i,e);const o=n.initialInputs;for(let a=s;a<r;a++){const i=t.data[a],r=ke(i);r&&tr(e,n,i);const l=ii(e,t,a,n);ns(l,e),null!==o&&er(0,a-s,l,i,0,o),r&&(Ue(n.index,e)[8]=l)}}(t,e,n,ze(n,e)),128==(128&n.flags)&&function(t,e,n){const i=n.directiveStart,s=n.directiveEnd,r=t.expandoInstructions,o=t.firstCreatePass,a=n.index-20,l=Ge.lFrame.currentDirectiveIndex;try{wn(a);for(let n=i;n<s;n++){const i=t.data[n],s=e[n];hn(n),null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs?Qs(i,s):o&&r.push(null)}}finally{wn(-1),hn(l)}}(t,e,n))}function Vs(t,e,n=ze){const i=e.localNames;if(null!==i){let s=e.index+1;for(let r=0;r<i.length;r+=2){const o=i[r+1],a=-1===o?n(e,t):t[o];t[s++]=a}}}function Us(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=js(1,-1,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function js(t,e,n,i,s,r,o,a,l,c){const h=20+i,u=h+s,d=function(t,e){const n=[];for(let i=0;i<e;i++)n.push(i<t?null:fs);return n}(h,u);return d[1]={type:t,id:e,blueprint:d,template:n,queries:null,viewQuery:a,node:null,data:d.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:u,expandoInstructions: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:"function"==typeof r?r():r,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:c,incompleteFirstPass:!1}}function Bs(t,e,n,i,s,r){return{type:n,index:i,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:s,attrs:r,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Hs(t,e,n){for(let i in t)if(t.hasOwnProperty(i)){const s=t[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(e,s):n[i]=[e,s]}return n}function $s(t,e,n,i,s,r,o,a){const l=ze(e,n);let c,h=e.inputs;var u;!a&&null!=h&&(c=h[i])?(mr(t,n,c,i,s),Pe(e)&&function(t,e){const n=Ue(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3===e.type&&(i="class"===(u=i)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,s=null!=o?o(s,e.tagName||"",i):s,Oe(r)?r.setProperty(l,i,s):An(i)||(l.setProperty?l.setProperty(i,s):l[i]=s))}function Ws(t,e,n,i){let s=!1;if(Qe()){const r=function(t,e,n){const i=t.directiveRegistry;let s=null;if(i)for(let r=0;r<i.length;r++){const o=i[r];ds(n,o.selectors,!1)&&(s||(s=[]),Xn(Qn(n,e),t,o.type),ke(o)?(2&n.flags&&is(n),Zs(t,n),s.unshift(o)):s.push(o))}return s}(t,e,n),o=null===i?null:{"":-1};if(null!==r){let i=0;s=!0,Xs(n,t.data.length,r.length);for(let t=0;t<r.length;t++){const e=r[t];e.providersResolver&&e.providersResolver(e)}Ks(t,n,r.length);let a=!1,l=!1;for(let s=0;s<r.length;s++){const c=r[s];n.mergedAttrs=On(n.mergedAttrs,c.hostAttrs),Js(t,e,c),Ys(t.data.length-1,c,o),null!==c.contentQueries&&(n.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(n.flags|=128),!a&&(c.onChanges||c.onInit||c.doCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index-20),a=!0),l||!c.onChanges&&!c.doCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index-20),l=!0),qs(t,c),i+=c.hostVars}!function(t,e){const n=e.directiveEnd,i=t.data,s=e.attrs,r=[];let o=null,a=null;for(let l=e.directiveStart;l<n;l++){const t=i[l],n=t.inputs,c=null===s||as(e)?null:nr(n,s);r.push(c),o=Hs(n,l,o),a=Hs(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=r,e.inputs=o,e.outputs=a}(t,n),Gs(t,e,i)}o&&function(t,e,n){if(e){const i=t.localNames=[];for(let t=0;t<e.length;t+=2){const s=n[e[t+1]];if(null==s)throw new Error(`Export of name '${e[t+1]}' not found!`);i.push(e[t],s)}}}(n,i,o)}return n.mergedAttrs=On(n.mergedAttrs,n.attrs),s}function qs(t,e){const n=t.expandoInstructions;n.push(e.hostBindings),0!==e.hostVars&&n.push(e.hostVars)}function Gs(t,e,n){for(let i=0;i<n;i++)e.push(fs),t.blueprint.push(fs),t.data.push(null)}function Qs(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Ks(t,e,n){const i=20-e.index,s=t.data.length-(65535&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(i,s,n)}function Zs(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ys(t,e,n){if(n){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;ke(e)&&(n[""]=t)}}function Xs(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Js(t,e,n){t.data.push(n);const i=n.factory||(n.factory=Ce(n.type)),s=new kn(i,ke(n),null);t.blueprint.push(s),e.push(s)}function tr(t,e,n){const i=ze(e,t),s=Us(n),r=t[10],o=or(t,Ds(t,s,null,n.onPush?64:16,i,e,r,r.createRenderer(i,n)));t[e.index]=o}function er(t,e,n,i,s,r){const o=r[e];if(null!==o){const t=i.setInput;for(let e=0;e<o.length;){const s=o[e++],r=o[e++],a=o[e++];null!==t?i.setInput(n,a,s,r):n[r]=a}}}function nr(t,e){let n=null,i=0;for(;i<e.length;){const s=e[i];if(0!==s)if(5!==s){if("number"==typeof s)break;t.hasOwnProperty(s)&&(null===n&&(n=[]),n.push(s,t[s],e[i+1])),i+=2}else i+=2;else i+=4}return n}function ir(t,e,n,i){return new Array(t,!0,!1,e,null,0,i,n,null,null)}function sr(t,e){const n=Ue(e,t);if(He(n)){const t=n[1];80&n[2]?Rs(t,n,t.template,n[8]):n[5]>0&&function t(e){for(let i=vs(e);null!==i;i=ys(i))for(let e=10;e<i.length;e++){const n=i[e];if(1024&n[2]){const t=n[1];Rs(t,n,t.template,n[8])}else n[5]>0&&t(n)}const n=e[1].components;if(null!==n)for(let i=0;i<n.length;i++){const s=Ue(n[i],e);He(s)&&s[5]>0&&t(s)}}(n)}}function rr(t,e){const n=Ue(e,t),i=n[1];!function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(i,n),Os(i,n,n[8])}function or(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function ar(t){for(;t;){t[2]|=64;const e=_s(t);if(Me(t)&&!e)return t;t=e}return null}function lr(t,e,n){const i=e[10];i.begin&&i.begin();try{Rs(t,e,t.template,n)}catch(s){throw gr(e,s),s}finally{i.end&&i.end()}}function cr(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],i=je(n),s=i[1];Ls(s,i,s.template,n)}}(t[8])}function hr(t,e,n){dn(0),e(t,n)}const ur=(()=>Promise.resolve(null))();function dr(t){return t[7]||(t[7]=[])}function pr(t){return t.cleanup||(t.cleanup=[])}function gr(t,e){const n=t[9],i=n?n.get(di,null):null;i&&i.handleError(e)}function mr(t,e,n,i,s){for(let r=0;r<n.length;){const o=n[r++],a=n[r++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,s,i,a):l[a]=s}}function fr(t,e,n){const i=Ne(e,t),s=t[11];Oe(s)?s.setValue(i,n):i.textContent=n}function _r(t,e){const n=e[3];return-1===t.index?Ee(n)?n:null:n}function vr(t,e){const n=_r(t,e);return n?Mr(e[11],n[7]):null}function yr(t,e,n,i,s){if(null!=i){let r,o=!1;Ee(i)?r=i:Ie(i)&&(o=!0,i=i[0]);const a=Le(i);0===t&&null!==n?null==s?Tr(e,n,a):Pr(e,n,a,s||null):1===t&&null!==n?Pr(e,n,a,s||null):2===t?function(t,e,n){const i=Mr(t,e);i&&function(t,e,n,i){Oe(t)?t.removeChild(e,n,i):e.removeChild(n)}(t,i,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=r&&function(t,e,n,i,s){const r=n[7];r!==Le(n)&&yr(e,t,i,r,s);for(let o=10;o<n.length;o++){const s=n[o];Lr(s[1],s,t,e,i,r)}}(e,t,r,n,s)}}function br(t,e,n,i){const s=vr(t.node,e);s&&Lr(t,e,e[11],n?1:2,s,i)}function wr(t,e){const n=t[9],i=n.indexOf(e);1024&e[2]&&qe(e[3],-1),n.splice(i,1)}function Cr(t,e){if(t.length<=10)return;const n=10+e,i=t[n];if(i){const s=i[17];null!==s&&s!==t&&wr(s,i),e>0&&(t[n-1][4]=i[4]);const r=ie(t,10+e);br(i[1],i,!1,null);const o=r[19];null!==o&&o.detachView(r[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Sr(t,e){if(!(256&e[2])){const n=e[11];Oe(n)&&n.destroyNode&&Lr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Er(t[1],t);for(;e;){let n=null;if(Ie(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)Ie(e)&&Er(e[1],e),e=Ir(e,t);null===e&&(e=t),Ie(e)&&Er(e[1],e),n=e&&e[4]}e=n}}(e)}}function Ir(t,e){let n;return Ie(t)&&(n=t[6])&&2===n.type?_r(n,t):t[3]===e?null:t[3]}function Er(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i<n.length;i+=2){const t=e[n[i]];if(!(t instanceof kn)){const e=n[i+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2)e[n+1].call(t[e[n]]);else e.call(t)}}}(t,e),function(t,e){const n=t.cleanup;if(null!==n){const t=e[7];for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const s=n[i+1],r="function"==typeof s?s(e):Le(e[s]),o=t[n[i+2]],a=n[i+3];"boolean"==typeof a?r.removeEventListener(n[i],o,a):a>=0?t[a]():t[-a].unsubscribe(),i+=2}else n[i].call(t[n[i+1]]);e[7]=null}}(t,e);const n=e[6];n&&3===n.type&&Oe(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&Ee(e[3])){i!==e[3]&&wr(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function xr(t,e,n){let i=e.parent;for(;null!=i&&(4===i.type||5===i.type);)i=(e=i).parent;if(null==i){const t=n[6];return 2===t.type?vr(t,n):n[0]}if(e&&5===e.type&&4&e.flags)return ze(e,n).parentNode;if(2&i.flags){const e=t.data,n=e[e[i.index].directiveStart].encapsulation;if(n!==ce.ShadowDom&&n!==ce.Native)return null}return ze(i,n)}function Pr(t,e,n,i){Oe(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function Tr(t,e,n){Oe(t)?t.appendChild(e,n):e.appendChild(n)}function kr(t,e,n,i){null!==i?Pr(t,e,n,i):Tr(t,e,n)}function Mr(t,e){return Oe(t)?t.parentNode(e):e.parentNode}function Dr(t,e){if(2===t.type){const n=_r(t,e);return null===n?null:Or(n.indexOf(e,10)-10,n)}return 4===t.type||5===t.type?ze(t,e):null}function Ar(t,e,n,i){const s=xr(t,i,e);if(null!=s){const t=e[11],r=Dr(i.parent||e[6],e);if(Array.isArray(n))for(let e=0;e<n.length;e++)kr(t,s,n[e],r);else kr(t,s,n,r)}}function Or(t,e){const n=10+t+1;if(n<e.length){const t=e[n],i=t[1].firstChild;if(null!==i)return function t(e,n){if(null!==n){const i=n.type;if(3===i)return ze(n,e);if(0===i)return Or(-1,e[n.index]);if(4===i||5===i){const i=n.child;if(null!==i)return t(e,i);{const t=e[n.index];return Ee(t)?Or(-1,t):Le(t)}}{const i=e[16],s=i[6],r=_s(i),o=s.projection[n.projection];return null!=o?t(r,o):t(e,n.next)}}return null}(t,i)}return e[7]}function Rr(t,e,n,i,s,r,o){for(;null!=n;){const a=i[n.index],l=n.type;o&&0===e&&(a&&ns(Le(a),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(Rr(t,e,n.child,i,s,r,!1),yr(e,t,s,a,r)):1===l?Nr(t,e,i,n,s,r):yr(e,t,s,a,r)),n=o?n.projectionNext:n.next}}function Lr(t,e,n,i,s,r){Rr(n,i,t.node.child,e,s,r,!1)}function Nr(t,e,n,i,s,r){const o=n[16],a=o[6].projection[i.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)yr(e,t,s,a[l],r);else Rr(t,e,a,o[3],s,r,!0)}function zr(t,e,n){Oe(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Fr(t,e,n){Oe(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}class Vr{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView;return null==t[0]?function t(e,n,i,s,r=!1){for(;null!==i;){const o=n[i.index];if(null!==o&&s.push(Le(o)),Ee(o))for(let e=10;e<o.length;e++){const n=o[e],i=n[1].firstChild;null!==i&&t(n[1],n,i,s)}const a=i.type;if(4===a||5===a)t(e,n,i.child,s);else if(1===a){const e=n[16],r=e[6].projection[i.projection];if(Array.isArray(r))s.push(...r);else{const n=_s(e);t(n[1],n,r,s,!0)}}i=r?i.projectionNext:i.next}return s}(t[1],t,t[6].child,[]):[]}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}Sr(this._lView[1],this._lView)}onDestroy(t){var e,n,i;e=this._lView[1],i=t,dr(n=this._lView).push(i),e.firstCreatePass&&pr(e).push(n[7].length-1,null)}markForCheck(){ar(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){lr(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){sn(!0);try{lr(t,e,n)}finally{sn(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Lr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Ur extends Vr{constructor(t){super(t),this._view=t}detectChanges(){cr(this._view)}checkNoChanges(){!function(t){sn(!0);try{cr(t)}finally{sn(!1)}}(this._view)}get context(){return null}}let jr,Br,Hr;function $r(t,e,n){return jr||(jr=class extends t{}),new jr(ze(e,n))}function Wr(t,e,n,i){return Br||(Br=class extends t{constructor(t,e,n){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=Ds(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];const i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Os(e,n,t),new Vr(n)}}),0===n.type?new Br(i,n,$r(e,n,i)):null}function qr(t,e,n,i){let s;Hr||(Hr=class extends t{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostView=n}get element(){return $r(e,this._hostTNode,this._hostView)}get injector(){return new oi(this._hostTNode,this._hostView)}get parentInjector(){const t=Yn(this._hostTNode,this._hostView),e=Fn(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){const t=n.parent.injectorIndex;let e=n.parent;for(;null!=e.parent&&t==e.parent.injectorIndex;)e=e.parent;return e}let i=zn(t),s=e,r=e[6];for(;i>1;)s=s[15],r=s[6],i--;return r}(t,this._hostView,this._hostTNode);return Ln(t)&&null!=n?new oi(n,e):new oi(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,s){const r=n||this.parentInjector;if(!s&&null==t.ngModule&&r){const t=r.get(Jt,null);t&&(s=t)}const o=t.create(r,i,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ee(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new Hr(e,e[6],e[3]);i.detach(i.indexOf(t))}}const s=this._adjustIndex(e);return function(t,e,n,i){const s=10+i,r=n.length;i>0&&(n[s-1][4]=e),i<r-10?(e[4]=n[s],ne(n,10+i,e)):(n.push(e),e[4]=null),e[3]=n;const o=e[17];null!==o&&n!==o&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(i,n,this._lContainer,s),br(i,n,!0,Or(s,this._lContainer)),t.attachToViewContainerRef(this),ne(this._lContainer[8],s,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1);!function(t,e){const n=Cr(t,e);n&&Sr(n[1],n)}(this._lContainer,e),ie(this._lContainer[8],e)}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=Cr(this._lContainer,e);return n&&null!=ie(this._lContainer[8],e)?new Vr(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const r=i[n.index];if(Ee(r))s=r;else{let t;if(4===n.type)t=Le(r);else if(t=i[11].createComment(""),Me(i)){const e=i[11],s=ze(n,i);Pr(e,Mr(e,s),t,function(t,e){return Oe(t)?t.nextSibling(e):e.nextSibling}(e,s))}else Ar(i[1],i,t,n);i[n.index]=s=ir(r,i,t,n),or(i,s)}return new Hr(s,n,i)}function Gr(t=!1){return function(t,e,n){if(!n&&Pe(t)){const n=Ue(t.index,e);return new Vr(n,n)}return 3===t.type||0===t.type||4===t.type||5===t.type?new Vr(e[16],e):null}(Xe(),Ke(),t)}let Qr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Kr(),t})();const Kr=Gr,Zr=new Ft("Set Injector scope."),Yr={},Xr={},Jr=[];let to=void 0;function eo(){return void 0===to&&(to=new Xt),to}function no(t,e=null,n=null,i){return new io(t,n,e||eo(),i)}class io{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const s=[];e&&ee(e,n=>this.processProvider(n,t,e)),ee([t],t=>this.processInjectorType(t,[],s)),this.records.set(Vt,oo(void 0,this));const r=this.records.get(Zr);this.scope=null!=r?r.value:null,this.source=i||("object"==typeof t?null:bt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Ut,n=at.Default){this.assertNotDestroyed();const i=Wt(this);try{if(!(n&at.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(s=t)||"object"==typeof s&&s instanceof Ft)&&dt(t);e=n&&this.injectableDefInScope(n)?oo(so(t),Yr):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&at.Self?eo():this.parent).get(t,e=n&at.Optional&&e===Ut?null:e)}catch(r){if("NullInjectorError"===r.name){if((r.ngTempTokenPath=r.ngTempTokenPath||[]).unshift(bt(t)),i)throw r;return function(t,e,n,i){const s=t.ngTempTokenPath;throw e.__source&&s.unshift(e.__source),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=bt(e);if(Array.isArray(e))s=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}s=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${s}]: ${t.replace(jt,"\n ")}`}("\n"+t.message,s,n,i),t.ngTokenPath=s,t.ngTempTokenPath=null,t}(r,t,"R3InjectorError",this.source)}throw r}finally{Wt(i)}var s}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(bt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=It(t)))return!1;let i=gt(t);const s=null==i&&t.ngModule||void 0,r=void 0===s?t:s,o=-1!==n.indexOf(r);if(void 0!==s&&(i=gt(s)),null==i)return!1;if(null!=i.imports&&!o){let t;n.push(r);try{ee(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:i}=t[e];ee(i,t=>this.processProvider(t,n,i||Jr))}}this.injectorDefTypes.add(r),this.records.set(r,oo(i.factory,Yr));const a=i.providers;if(null!=a&&!o){const e=t;ee(a,t=>this.processProvider(t,e,a))}return void 0!==s&&void 0!==t.providers}processProvider(t,e,n){let i=lo(t=It(t))?t:It(t&&t.provide);const s=function(t,e,n){return ao(t)?oo(void 0,t.useValue):oo(ro(t,e,n),Yr)}(t,e,n);if(lo(t)||!0!==t.multi){const t=this.records.get(i);t&&void 0!==t.multi&&ss()}else{let e=this.records.get(i);e?void 0===e.multi&&ss():(e=oo(void 0,Yr,!0),e.factory=()=>Yt(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,s)}hydrate(t,e){var n;return e.value===Xr?function(t){throw new Error("Cannot instantiate cyclic dependency! "+t)}(bt(t)):e.value===Yr&&(e.value=Xr,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function so(t){const e=dt(t),n=null!==e?e.factory:Ce(t);if(null!==n)return n;const i=gt(t);if(null!==i)return i.factory;if(t instanceof Ft)throw new Error(`Token ${bt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=se(e,"?");throw new Error(`Can't resolve all parameters for ${bt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[mt]||t[vt]||t[_t]&&t[_t]());if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in v10. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function ro(t,e,n){let i=void 0;if(lo(t)){const e=It(t);return Ce(e)||so(e)}if(ao(t))i=()=>It(t.useValue);else if((s=t)&&s.useFactory)i=()=>t.useFactory(...Yt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Qt(It(t.useExisting));else{const s=It(t&&(t.useClass||t.provide));if(s||function(t,e,n){let i="";throw t&&e&&(i=` - only instances of Provider and Type are allowed, got: [${e.map(t=>t==n?"?"+n+"?":"...").join(", ")}]`),new Error(`Invalid provider for the NgModule '${bt(t)}'`+i)}(e,n,t),!function(t){return!!t.deps}(t))return Ce(s)||so(s);i=()=>new s(...Yt(t.deps))}var s;return i}function oo(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function ao(t){return null!==t&&"object"==typeof t&&Bt in t}function lo(t){return"function"==typeof t}const co=function(t,e,n){return function(t,e=null,n=null,i){const s=no(t,e,n,i);return s._resolveInjectorDefTypes(),s}({name:n},e,t,n)};let ho=(()=>{class t{static create(t,e){return Array.isArray(t)?co(t,e,""):co(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Ut,t.NULL=new Xt,t.\u0275prov=ht({token:t,providedIn:"any",factory:()=>Qt(Vt)}),t.__NG_ELEMENT_ID__=-1,t})();const uo=new Ft("AnalyzeForEntryComponents");let po=new Map;const go=new Set;function mo(t){return"string"==typeof t?t:t.text()}function fo(t,e,n){let i=n?t.styles:null,s=n?t.classes:null,r=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?r=t:1==r?s=wt(s,t):2==r&&(i=wt(i,t+": "+e[++o]+";"))}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=s:t.classesWithoutHost=s}let _o=null;function vo(){if(!_o){const t=Mt.Symbol;if(t&&t.iterator)_o=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(_o=n)}}}return _o}function yo(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}class bo{constructor(t){this.wrapped=t}static wrap(t){return new bo(t)}static unwrap(t){return bo.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof bo}}function wo(t){return!!Co(t)&&(Array.isArray(t)||!(t instanceof Map)&&vo()in t)}function Co(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function So(t,e,n){return t[e]=n}function Io(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function Eo(t,e,n,i){const s=Io(t,e,n);return Io(t,e+1,i)||s}function xo(t,e,n,i,s){const r=Eo(t,e,n,i);return Io(t,e+2,s)||r}function Po(t,e,n,i,s,r){const o=Eo(t,e,n,i);return Eo(t,e+2,s,r)||o}function To(t,e,n,i){const s=Ke();return Io(s,an(),e)&&(Ze(),function(t,e,n,i,s,r){const o=ze(t,e),a=e[11];if(null==i)Oe(a)?a.removeAttribute(o,n,r):o.removeAttribute(n);else{const e=null==s?Vn(i):s(i,t.tagName||"",n);Oe(a)?a.setAttribute(o,n,e,r):r?o.setAttributeNS(r,n,e):o.setAttribute(n,e)}}(Cn(),s,t,e,n,i)),To}function ko(t,e,n,i){return Io(t,an(),n)?e+Vn(n)+i:fs}function Mo(t,e,n,i,s,r,o,a){const l=Ke(),c=Ze(),h=t+20,u=c.firstCreatePass?function(t,e,n,i,s,r,o,a,l){const c=e.consts,h=As(e,n[6],t,0,o||null,$e(c,a));Ws(e,n,h,$e(c,l)),Sn(e,h);const u=h.tViews=js(2,-1,i,s,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c),d=Bs(0,null,2,-1,null,null);return d.injectorIndex=h.injectorIndex,u.node=d,null!==e.queries&&(e.queries.template(e,h),u.queries=e.queries.embeddedTView(h)),h}(t,c,l,e,n,i,s,r,o):c.data[h];Je(u,!1);const d=l[11].createComment("");Ar(c,l,d,u),ns(d,l),or(l,l[h]=ir(d,l,d,u)),Te(u)&&Fs(c,l,u),null!=o&&Vs(l,u,a)}function Do(t){return Ve(Ge.lFrame.contextLView,t)}function Ao(t,e=at.Default){const n=Ke();return null==n?Qt(t,e):Jn(Xe(),n,It(t),e)}function Oo(){throw new Error("invalid")}function Ro(t,e,n){const i=Ke();return Io(i,an(),e)&&$s(Ze(),Cn(),i,t,e,i[11],n,!1),Ro}function Lo(t,e,n,i,s){const r=s?"class":"style";mr(t,n,e.inputs[r],r,i)}function No(t,e,n,i){const s=Ke(),r=Ze(),o=20+t,a=s[11],l=s[o]=Ms(e,a,Ge.lFrame.currentNamespace),c=r.firstCreatePass?function(t,e,n,i,s,r,o){const a=e.consts,l=$e(a,r),c=As(e,n[6],t,3,s,l);return Ws(e,n,c,$e(a,o)),null!==c.attrs&&fo(c,c.attrs,!1),null!==c.mergedAttrs&&fo(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,r,s,0,e,n,i):r.data[o];Je(c,!0);const h=c.mergedAttrs;null!==h&&Mn(a,l,h);const u=c.classes;null!==u&&Fr(a,l,u);const d=c.styles;null!==d&&zr(a,l,d),Ar(r,s,l,c),0===Ge.lFrame.elementDepthCount&&ns(l,s),Ge.lFrame.elementDepthCount++,Te(c)&&(Fs(r,s,c),zs(r,c,s)),null!==i&&Vs(s,c)}function zo(){let t=Xe();tn()?en():(t=t.parent,Je(t,!1));const e=t;Ge.lFrame.elementDepthCount--;const n=Ze();n.firstCreatePass&&(Sn(n,t),xe(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&Lo(n,e,Ke(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&Lo(n,e,Ke(),e.stylesWithoutHost,!1)}function Fo(t,e,n,i){No(t,e,n,i),zo()}function Vo(t,e,n){const i=Ke(),s=Ze(),r=t+20,o=s.firstCreatePass?function(t,e,n,i,s){const r=e.consts,o=$e(r,i),a=As(e,n[6],t,4,"ng-container",o);return null!==o&&fo(a,o,!0),Ws(e,n,a,$e(r,s)),null!==e.queries&&e.queries.elementStart(e,a),a}(t,s,i,e,n):s.data[r];Je(o,!0);const a=i[r]=i[11].createComment("");Ar(s,i,a,o),ns(a,i),Te(o)&&(Fs(s,i,o),zs(s,o,i)),null!=n&&Vs(i,o)}function Uo(){let t=Xe();const e=Ze();tn()?en():(t=t.parent,Je(t,!1)),e.firstCreatePass&&(Sn(e,t),xe(t)&&e.queries.elementEnd(t))}function jo(){return Ke()}function Bo(t){return!!t&&"function"==typeof t.then}function Ho(t){return!!t&&"function"==typeof t.subscribe}function $o(t,e,n=!1,i){const s=Ke(),r=Ze(),o=Xe();return function(t,e,n,i,s,r,o=!1,a){const l=Te(i),c=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),h=dr(e);let u=!0;if(3===i.type){const d=ze(i,e),p=a?a(d):he,g=p.target||d,m=h.length,f=a?t=>a(Le(t[i.index])).target:i.index;if(Oe(n)){let o=null;if(!a&&l&&(o=function(t,e,n,i){const s=t.cleanup;if(null!=s)for(let r=0;r<s.length-1;r+=2){const t=s[r];if(t===n&&s[r+1]===i){const t=e[7],n=s[r+2];return t.length>n?t[n]:null}"string"==typeof t&&(r+=2)}return null}(t,e,s,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=r,o.__ngLastListenerFn__=r,u=!1;else{r=qo(i,e,r,!1);const t=n.listen(p.name||g,s,r);h.push(r,t),c&&c.push(s,f,m,m+1)}}else r=qo(i,e,r,!0),g.addEventListener(s,r,o),h.push(r),c&&c.push(s,f,m,o)}const d=i.outputs;let p;if(u&&null!==d&&(p=d[s])){const t=p.length;if(t)for(let n=0;n<t;n+=2){const t=e[p[n]][p[n+1]].subscribe(r),o=h.length;h.push(r,t),c&&c.push(s,i.index,o,-(o+1))}}}(r,s,s[11],o,t,e,n,i),$o}function Wo(t,e,n){try{return!1!==e(n)}catch(i){return gr(t,i),!1}}function qo(t,e,n,i){return function s(r){if(r===Function)return n;const o=2&t.flags?Ue(t.index,e):e;0==(32&e[2])&&ar(o);let a=Wo(e,n,r),l=s.__ngNextListenerFn__;for(;l;)a=Wo(e,l,r)&&a,l=l.__ngNextListenerFn__;return i&&!1===a&&(r.preventDefault(),r.returnValue=!1),a}}function Go(t=1){return function(t){return(Ge.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Ge.lFrame.contextLView))[8]}(t)}function Qo(t,e){let n=null;const i=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let s=0;s<e.length;s++){const r=e[s];if("*"!==r){if(null===i?ds(t,r,!0):ps(i,r))return s}else n=s}return n}function Ko(t){const e=Ke()[16][6];if(!e.projection){const n=e.projection=se(t?t.length:1,null),i=n.slice();let s=e.child;for(;null!==s;){const e=t?Qo(s,t):0;null!==e&&(i[e]?i[e].projectionNext=s:n[e]=s,i[e]=s),s=s.next}}}function Zo(t,e=0,n){const i=Ke(),s=Ze(),r=As(s,i[6],t,1,null,n||null);null===r.projection&&(r.projection=e),en(),function(t,e,n){Nr(e[11],0,e,n,xr(t,n,e),Dr(n.parent||e[6],e))}(s,i,r)}function Yo(t,e,n){return Xo(t,"",e,"",n),Yo}function Xo(t,e,n,i,s){const r=Ke(),o=ko(r,e,n,i);return o!==fs&&$s(Ze(),Cn(),r,t,o,r[11],s,!1),Xo}const Jo=[];function ta(t,e,n,i,s){const r=t[n+1],o=null===e;let a=i?Is(r):xs(r),l=!1;for(;0!==a&&(!1===l||o);){const n=t[a+1];ea(t[a],e)&&(l=!0,t[a+1]=i?Ts(n):Es(n)),a=i?Is(n):xs(n)}l&&(t[n+1]=i?Es(r):Ts(r))}function ea(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&ae(t,e)>=0}const na={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function ia(t){return t.substring(na.key,na.keyEnd)}function sa(t,e){const n=na.textEnd;return n===e?-1:(e=na.keyEnd=function(t,e,n){for(;e<n&&t.charCodeAt(e)>32;)e++;return e}(t,na.key=e,n),ra(t,e,n))}function ra(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function oa(t,e,n){return ha(t,e,n,!1),oa}function aa(t,e){return ha(t,e,null,!0),aa}function la(t){ua(re,ca,t,!0)}function ca(t,e){for(let n=function(t){return function(t){na.key=0,na.keyEnd=0,na.value=0,na.valueEnd=0,na.textEnd=t.length}(t),sa(t,ra(t,0,na.textEnd))}(e);n>=0;n=sa(e,n))re(t,ia(e),!0)}function ha(t,e,n,i){const s=Ke(),r=Ze(),o=ln(2);if(r.firstUpdatePass&&pa(r,t,o,i),e!==fs&&Io(s,o,e)){let a;null==n&&(a=function(){const t=Ge.lFrame;return null===t?null:t.currentSanitizer}())&&(n=a),fa(r,r.data[bn()+20],s,s[11],t,s[o+1]=function(t,e){return null==t||("function"==typeof e?t=e(t):"string"==typeof e?t+=e:"object"==typeof t&&(t=bt(yi(t)))),t}(e,n),i,o)}}function ua(t,e,n,i){const s=Ze(),r=ln(2);s.firstUpdatePass&&pa(s,null,r,i);const o=Ke();if(n!==fs&&Io(o,r,n)){const a=s.data[bn()+20];if(ya(a,i)&&!da(s,r)){let t=i?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=wt(t,n||"")),Lo(s,a,o,n,i)}else!function(t,e,n,i,s,r,o,a){s===fs&&(s=Jo);let l=0,c=0,h=0<s.length?s[0]:null,u=0<r.length?r[0]:null;for(;null!==h||null!==u;){const d=l<s.length?s[l+1]:void 0,p=c<r.length?r[c+1]:void 0;let g=null,m=void 0;h===u?(l+=2,c+=2,d!==p&&(g=u,m=p)):null===u||null!==h&&h<u?(l+=2,g=h):(c+=2,g=u,m=p),null!==g&&fa(t,e,n,i,g,m,o,a),h=l<s.length?s[l]:null,u=c<r.length?r[c]:null}}(s,a,o,o[11],o[r+1],o[r+1]=function(t,e,n){if(null==n||""===n)return Jo;const i=[],s=yi(n);if(Array.isArray(s))for(let r=0;r<s.length;r++)t(i,s[r],!0);else if("object"==typeof s)for(const r in s)s.hasOwnProperty(r)&&t(i,r,s[r]);else"string"==typeof s&&e(i,s);return i}(t,e,n),i,r)}}function da(t,e){return e>=t.expandoStartIndex}function pa(t,e,n,i){const s=t.data;if(null===s[n+1]){const r=s[bn()+20],o=da(t,n);ya(r,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){const s=function(t){const e=Ge.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let r=i?e.residualClasses:e.residualStyles;if(null===s)0===(i?e.classBindings:e.styleBindings)&&(n=ma(n=ga(null,t,e,n,i),e.attrs,i),r=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==s)if(n=ga(s,t,e,n,i),null===r){let n=function(t,e,n){const i=n?e.classBindings:e.styleBindings;if(0!==xs(i))return t[Is(i)]}(t,e,i);void 0!==n&&Array.isArray(n)&&(n=ga(null,t,e,n[1],i),n=ma(n,e.attrs,i),function(t,e,n,i){t[Is(n?e.classBindings:e.styleBindings)]=i}(t,e,i,n))}else r=function(t,e,n){let i=void 0;const s=e.directiveEnd;for(let r=1+e.directiveStylingLast;r<s;r++)i=ma(i,t[r].hostAttrs,n);return ma(i,e.attrs,n)}(t,e,i)}return void 0!==r&&(i?e.residualClasses=r:e.residualStyles=r),n}(s,r,e,i),function(t,e,n,i,s,r){let o=r?e.classBindings:e.styleBindings,a=Is(o),l=xs(o);t[i]=n;let c,h=!1;if(Array.isArray(n)){const t=n;c=t[1],(null===c||ae(t,c)>0)&&(h=!0)}else c=n;if(s)if(0!==l){const e=Is(t[a+1]);t[i+1]=Ss(e,a),0!==e&&(t[e+1]=Ps(t[e+1],i)),t[a+1]=131071&t[a+1]|i<<17}else t[i+1]=Ss(a,0),0!==a&&(t[a+1]=Ps(t[a+1],i)),a=i;else t[i+1]=Ss(l,0),0===a?a=i:t[l+1]=Ps(t[l+1],i),l=i;h&&(t[i+1]=Es(t[i+1])),ta(t,c,i,!0),ta(t,c,i,!1),function(t,e,n,i,s){const r=s?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof e&&ae(r,e)>=0&&(n[i+1]=Ts(n[i+1]))}(e,c,t,i,r),o=Ss(a,l),r?e.classBindings=o:e.styleBindings=o}(s,r,e,n,o,i)}}function ga(t,e,n,i,s){let r=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(r=e[a],i=ma(i,r.hostAttrs,s),r!==t);)a++;return null!==t&&(n.directiveStylingLast=a),i}function ma(t,e,n){const i=n?1:2;let s=-1;if(null!==e)for(let r=0;r<e.length;r++){const o=e[r];"number"==typeof o?s=o:s===i&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),re(t,o,!!n||e[++r]))}return void 0===t?null:t}function fa(t,e,n,i,s,r,o,a){if(3!==e.type)return;const l=t.data,c=l[a+1];va(1==(1&c)?_a(l,e,n,s,xs(c),o):void 0)||(va(r)||function(t){return 2==(2&t)}(c)&&(r=_a(l,null,n,s,a,o)),function(t,e,n,i,s){const r=Oe(t);if(e)s?r?t.addClass(n,i):n.classList.add(i):r?t.removeClass(n,i):n.classList.remove(i);else{const e=-1==i.indexOf("-")?void 0:2;null==s?r?t.removeStyle(n,i,e):n.style.removeProperty(i):r?t.setStyle(n,i,s,e):n.style.setProperty(i,s)}}(i,o,Ne(bn(),n),s,r))}function _a(t,e,n,i,s,r){const o=null===e;let a=void 0;for(;s>0;){const e=t[s],r=Array.isArray(e),l=r?e[1]:e,c=null===l;let h=n[s+1];h===fs&&(h=c?Jo:void 0);let u=c?oe(h,i):l===i?h:void 0;if(r&&!va(u)&&(u=oe(e,i)),va(u)&&(a=u,o))return a;const d=t[s+1];s=o?Is(d):xs(d)}if(null!==e){let t=r?e.residualClasses:e.residualStyles;null!=t&&(a=oe(t,i))}return a}function va(t){return void 0!==t}function ya(t,e){return 0!=(t.flags&(e?16:32))}function ba(t,e=""){const n=Ke(),i=Ze(),s=t+20,r=i.firstCreatePass?As(i,n[6],t,3,null,null):i.data[s],o=n[s]=function(t,e){return Oe(e)?e.createText(t):e.createTextNode(t)}(e,n[11]);Ar(i,n,o,r),Je(r,!1)}function wa(t){return Ca("",t,""),wa}function Ca(t,e,n){const i=Ke(),s=ko(i,t,e,n);return s!==fs&&fr(i,bn(),s),Ca}function Sa(t,e,n,i,s){const r=Ke(),o=function(t,e,n,i,s,r){const o=Eo(t,on(),n,s);return ln(2),o?e+Vn(n)+i+Vn(s)+r:fs}(r,t,e,n,i,s);return o!==fs&&fr(r,bn(),o),Sa}function Ia(t,e,n){ua(re,ca,ko(Ke(),t,e,n),!0)}function Ea(t,e,n){const i=Ke();return Io(i,an(),e)&&$s(Ze(),Cn(),i,t,e,i[11],n,!0),Ea}function xa(t,e){const n=je(t)[1],i=n.data.length-1;Sn(n,{directiveStart:i,directiveEnd:i+1})}function Pa(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0;const i=[t];for(;e;){let s=void 0;if(ke(t))s=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");s=e.\u0275dir}if(s){if(n){i.push(s);const e=t;e.inputs=Ta(t.inputs),e.declaredInputs=Ta(t.declaredInputs),e.outputs=Ta(t.outputs);const n=s.hostBindings;n&&Da(t,n);const r=s.viewQuery,o=s.contentQueries;if(r&&ka(t,r),o&&Ma(t,o),ct(t.inputs,s.inputs),ct(t.declaredInputs,s.declaredInputs),ct(t.outputs,s.outputs),ke(s)&&s.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(s.data.animation)}e.afterContentChecked=e.afterContentChecked||s.afterContentChecked,e.afterContentInit=t.afterContentInit||s.afterContentInit,e.afterViewChecked=t.afterViewChecked||s.afterViewChecked,e.afterViewInit=t.afterViewInit||s.afterViewInit,e.doCheck=t.doCheck||s.doCheck,e.onDestroy=t.onDestroy||s.onDestroy,e.onInit=t.onInit||s.onInit}const e=s.features;if(e)for(let i=0;i<e.length;i++){const s=e[i];s&&s.ngInherit&&s(t),s===Pa&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,n=null;for(let i=t.length-1;i>=0;i--){const s=t[i];s.hostVars=e+=s.hostVars,s.hostAttrs=On(s.hostAttrs,n=On(n,s.hostAttrs))}}(i)}function Ta(t){return t===he?{}:t===ue?[]:t}function ka(t,e){const n=t.viewQuery;t.viewQuery=n?(t,i)=>{e(t,i),n(t,i)}:e}function Ma(t,e){const n=t.contentQueries;t.contentQueries=n?(t,i,s)=>{e(t,i,s),n(t,i,s)}:e}function Da(t,e){const n=t.hostBindings;t.hostBindings=n?(t,i)=>{e(t,i),n(t,i)}:e}class Aa{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Oa(t){t.type.prototype.ngOnChanges&&(t.setInput=Ra,t.onChanges=function(){const t=La(this),e=t&&t.current;if(e){const n=t.previous;if(n===he)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}})}function Ra(t,e,n,i){const s=La(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:he,current:null}),r=s.current||(s.current={}),o=s.previous,a=this.declaredInputs[n],l=o[a];r[a]=new Aa(l&&l.currentValue,e,o===he),t[i]=e}function La(t){return t.__ngSimpleChanges__||null}function Na(t,e,n,i,s){if(t=It(t),Array.isArray(t))for(let r=0;r<t.length;r++)Na(t[r],e,n,i,s);else{const r=Ze(),o=Ke();let a=lo(t)?t:It(t.provide),l=ro(t);const c=Xe(),h=65535&c.providerIndexes,u=c.directiveStart,d=c.providerIndexes>>16;if(lo(t)||!t.multi){const i=new kn(l,s,Ao),p=Va(a,e,s?h:h+d,u);-1===p?(Xn(Qn(c,o),r,a),za(r,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=65536),n.push(i),o.push(i)):(n[p]=i,o[p]=i)}else{const p=Va(a,e,h+d,u),g=Va(a,e,h,h+d),m=p>=0&&n[p],f=g>=0&&n[g];if(s&&!f||!s&&!m){Xn(Qn(c,o),r,a);const h=function(t,e,n,i,s){const r=new kn(t,n,Ao);return r.multi=[],r.index=e,r.componentProviders=0,Fa(r,s,i&&!n),r}(s?ja:Ua,n.length,s,i,l);!s&&f&&(n[g].providerFactory=h),za(r,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=65536),n.push(h),o.push(h)}else za(r,t,p>-1?p:g,Fa(n[s?g:p],l,!s&&i));!s&&i&&f&&n[g].componentProviders++}}}function za(t,e,n,i){const s=lo(e);if(s||e.useClass){const r=(e.useClass||e).prototype.ngOnDestroy;if(r){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[i,r]):o[t+1].push(i,r)}else o.push(n,r)}}}function Fa(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Va(t,e,n,i){for(let s=n;s<i;s++)if(e[s]===t)return s;return-1}function Ua(t,e,n,i){return Ba(this.multi,[])}function ja(t,e,n,i){const s=this.multi;let r;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=ii(n,n[1],this.providerFactory.index,i);r=e.slice(0,t),Ba(s,r);for(let n=t;n<e.length;n++)r.push(e[n])}else r=[],Ba(s,r);return r}function Ba(t,e){for(let n=0;n<t.length;n++)e.push((0,t[n])());return e}function Ha(t,e=[]){return n=>{n.providersResolver=(n,i)=>function(t,e,n){const i=Ze();if(i.firstCreatePass){const s=ke(t);Na(n,i.data,i.blueprint,s,!0),Na(e,i.data,i.blueprint,s,!1)}}(n,i?i(t):t,e)}}Oa.ngInherit=!0;class $a{}class Wa{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let qa=(()=>{class t{}return t.NULL=new Wa,t})(),Ga=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Qa(t),t})();const Qa=function(t){return $r(t,Xe(),Ke())};class Ka{}const Za=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}();let Ya=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Xa(),t})();const Xa=function(){const t=Ke(),e=Ue(Xe().index,t);return function(t){const e=t[11];if(Oe(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ie(e)?e:t)};let Ja=(()=>{class t{}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>null}),t})();class tl{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const el=new tl("9.1.12");class nl{constructor(){}supports(t){return wo(t)}create(t){return new sl(t)}}const il=(t,e)=>e;class sl{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||il}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,s=null;for(;e||n;){const r=!n||e&&e.currentIndex<ll(n,i,s)?e:n,o=ll(r,i,s),a=r.currentIndex;if(r===n)i--,n=n._nextRemoved;else if(e=e._next,null==r.previousIndex)i++;else{s||(s=[]);const t=o-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<s.length?s[n]:s[n]=0,r=i+n;e<=r&&r<t&&(s[n]=i+1)}s[r.previousIndex]=e-t}}o!==a&&t(r,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!wo(t))throw new Error(`Error trying to diff '${bt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,s=this._itHead,r=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],i=this._trackByFn(e,n),null!==s&&yo(s.trackById,i)?(r&&(s=this._verifyReinsertion(s,n,i,e)),yo(s.item,n)||this._addIdentityChange(s,n)):(s=this._mismatch(s,n,i,e),r=!0),s=s._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[vo()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==s&&yo(s.trackById,i)?(r&&(s=this._verifyReinsertion(s,t,i,e)),yo(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,i,e),r=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(yo(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(yo(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,i)):t=this._addAfter(new rl(e,n),s,i),t}_verifyReinsertion(t,e,n,i){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,s=t._nextRemoved;return null===i?this._removalsHead=s:i._nextRemoved=s,null===s?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new al),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new al),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class rl{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class ol{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&yo(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class al{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new ol,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ll(t,e,n){const i=t.previousIndex;if(null===i)return i;let s=0;return n&&i<n.length&&(s=n[i]),i+e+s}class cl{constructor(){}supports(t){return t instanceof Map||Co(t)}create(){return new hl}}class hl{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Co(t)))throw new Error(`Error trying to diff '${bt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}const n=new ul(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){yo(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ul{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let dl=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ot,new st]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new t([new nl])}),t})(),pl=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new ot,new st]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new t([new cl])}),t})();const gl=[new cl],ml=new dl([new nl]),fl=new pl(gl);let _l=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>vl(t,Ga),t})();const vl=function(t,e){return Wr(t,e,Xe(),Ke())};let yl=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>bl(t,Ga),t})();const bl=function(t,e){return qr(t,e,Xe(),Ke())},wl={};class Cl extends qa{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=we(t);return new El(e,this.ngModule)}}function Sl(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Il=new Ft("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>jn});class El extends $a{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(ms).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Sl(this.componentDef.inputs)}get outputs(){return Sl(this.componentDef.outputs)}create(t,e,n,i){const s=(i=i||this.ngModule)?function(t,e){return{get:(n,i,s)=>{const r=t.get(n,wl,s);return r!==wl||i===wl?r:e.get(n,i,s)}}}(t,i.injector):t,r=s.get(Ka,Re),o=s.get(Ja,null),a=r.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Oe(t))return t.selectRootElement(e,n===ce.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):Ms(l,r.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),h=this.componentDef.onPush?576:528,u="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),d={components:[],scheduler:jn,clean:ur,playerHandler:null,flags:0},p=js(0,-1,null,1,0,null,null,null,null,null),g=Ds(null,p,d,h,null,null,r,a,o,s);let m,f;gn(g,null);try{const t=function(t,e,n,i,s,r){const o=n[1];n[20]=t;const a=As(o,null,0,3,null,null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(fo(a,l,!0),null!==t&&(Mn(s,t,l),null!==a.classes&&Fr(s,t,a.classes),null!==a.styles&&zr(s,t,a.styles)));const c=i.createRenderer(t,e),h=Ds(n,Us(e),null,e.onPush?64:16,n[20],a,i,c,void 0);return o.firstCreatePass&&(Xn(Qn(a,n),o,e.type),Zs(o,a),Xs(a,n.length,1)),or(n,h),n[20]=h}(c,this.componentDef,g,r,a);if(c)if(n)Mn(a,c,["ng-version",el.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,s=2;for(;i<t.length;){let r=t[i];if("string"==typeof r)2===s?""!==r&&e.push(r,t[++i]):8===s&&n.push(r);else{if(!hs(s))break;s=r}i++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&Mn(a,c,t),e&&e.length>0&&Fr(a,c,e.join(" "))}if(f=Fe(p,0),void 0!==e){const t=f.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=e[n];t.push(null!=i?Array.from(i):null)}}m=function(t,e,n,i,s){const r=n[1],o=function(t,e,n){const i=Xe();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Ks(t,i,1),Js(t,e,n));const s=ii(e,t,e.length-1,i);ns(s,e);const r=ze(i,e);return r&&ns(r,e),s}(r,n,e);i.components.push(o),t[8]=o,s&&s.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,n.length-1);const a=Xe();if(r.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){wn(a.index-20);const t=n[1];qs(t,e),Gs(t,n,e.hostVars),Qs(e,o)}return o}(t,this.componentDef,g,d,[xa]),Os(p,g,null)}finally{yn()}const _=new xl(this.componentType,m,$r(Ga,f,g),g,f);return n&&!u||(p.node.child=f),_}}class xl extends class{}{constructor(t,e,n,i,s){super(),this.location=n,this._rootLView=i,this._tNode=s,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Ur(i),function(t,e,n,i){let s=t.node;null==s&&(t.node=s=Bs(0,null,2,-1,null,null)),i[6]=s}(i[1],0,0,i),this.componentType=t}get injector(){return new oi(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const Pl=void 0;var Tl=["en",[["a","p"],["AM","PM"],Pl],[["AM","PM"],Pl,Pl],[["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"]],Pl,[["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"]],Pl,[["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}",Pl,"{1} 'at' {0}",Pl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let kl={};function Ml(t){return t in kl||(kl[t]=Mt.ng&&Mt.ng.common&&Mt.ng.common.locales&&Mt.ng.common.locales[t]),kl[t]}const Dl=function(){var t={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};return t[t.LocaleId]="LocaleId",t[t.DayPeriodsFormat]="DayPeriodsFormat",t[t.DayPeriodsStandalone]="DayPeriodsStandalone",t[t.DaysFormat]="DaysFormat",t[t.DaysStandalone]="DaysStandalone",t[t.MonthsFormat]="MonthsFormat",t[t.MonthsStandalone]="MonthsStandalone",t[t.Eras]="Eras",t[t.FirstDayOfWeek]="FirstDayOfWeek",t[t.WeekendRange]="WeekendRange",t[t.DateFormat]="DateFormat",t[t.TimeFormat]="TimeFormat",t[t.DateTimeFormat]="DateTimeFormat",t[t.NumberSymbols]="NumberSymbols",t[t.NumberFormats]="NumberFormats",t[t.CurrencyCode]="CurrencyCode",t[t.CurrencySymbol]="CurrencySymbol",t[t.CurrencyName]="CurrencyName",t[t.Currencies]="Currencies",t[t.Directionality]="Directionality",t[t.PluralCase]="PluralCase",t[t.ExtraData]="ExtraData",t}();let Al="en-US";function Ol(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Al=t.toLowerCase().replace(/_/g,"-"))}const Rl=new Map;class Ll extends Jt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Cl(this);const n=Se(t),i=t[Lt]||null;i&&Ol(i),this._bootstrapComponents=$n(n.bootstrap),this._r3Injector=no(t,e,[{provide:Jt,useValue:this},{provide:qa,useValue:this.componentFactoryResolver}],bt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ho.THROW_IF_NOT_FOUND,n=at.Default){return t===ho||t===Jt||t===Vt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Nl extends te{constructor(t){super(),this.moduleType=t,null!==Se(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${bt(e)} vs ${bt(e.name)}`)})(t,Rl.get(t),e),Rl.set(t,e)}let n=e.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(e=>t(e))}(t)}create(t){return new Ll(this.moduleType,t)}}function zl(t,e,n,i){return Bl(Ke(),rn(),t,e,n,i)}function Fl(t,e,n,i,s){return Hl(Ke(),rn(),t,e,n,i,s)}function Vl(t,e,n,i,s,r){return $l(Ke(),rn(),t,e,n,i,s,r)}function Ul(t,e,n,i,s,r,o){return function(t,e,n,i,s,r,o,a,l){const c=e+n;return Po(t,c,s,r,o,a)?So(t,c+4,l?i.call(l,s,r,o,a):i(s,r,o,a)):jl(t,c+4)}(Ke(),rn(),t,e,n,i,s,r,o)}function jl(t,e){const n=t[e];return n===fs?void 0:n}function Bl(t,e,n,i,s,r){const o=e+n;return Io(t,o,s)?So(t,o+1,r?i.call(r,s):i(s)):jl(t,o+1)}function Hl(t,e,n,i,s,r,o){const a=e+n;return Eo(t,a,s,r)?So(t,a+2,o?i.call(o,s,r):i(s,r)):jl(t,a+2)}function $l(t,e,n,i,s,r,o,a){const l=e+n;return xo(t,l,s,r,o)?So(t,l+3,a?i.call(a,s,r,o):i(s,r,o)):jl(t,l+3)}function Wl(t,e){const n=Ze();let i;const s=t+20;n.firstCreatePass?(i=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const i=e[n];if(t===i.name)return i}throw new Error(`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[s]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(s,i.onDestroy)):i=n.data[s];const r=i.factory||(i.factory=Ce(i.type)),o=qt(Ao),a=qn(!1),l=r();return qn(a),qt(o),function(t,e,n,i){const s=n+20;s>=t.data.length&&(t.data[s]=null,t.blueprint[s]=null),e[s]=i}(n,Ke(),t,l),l}function ql(t,e,n){const i=Ke(),s=Ve(i,t);return Zl(i,Kl(i,t)?Bl(i,rn(),e,s.transform,n,s):s.transform(n))}function Gl(t,e,n,i){const s=Ke(),r=Ve(s,t);return Zl(s,Kl(s,t)?Hl(s,rn(),e,r.transform,n,i,r):r.transform(n,i))}function Ql(t,e,n,i,s){const r=Ke(),o=Ve(r,t);return Zl(r,Kl(r,t)?$l(r,rn(),e,o.transform,n,i,s,o):o.transform(n,i,s))}function Kl(t,e){return t[1].data[e+20].pure}function Zl(t,e){return bo.isWrapped(e)&&(e=bo.unwrap(e),t[on()]=fs),e}class Yl extends E{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,s=t=>null,r=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(r=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(r=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(i,s,r);return t instanceof u&&t.add(o),o}}function Xl(){return this._results[vo()]()}class Jl{constructor(){this.dirty=!0,this._results=[],this.changes=new Yl,this.length=0;const t=vo(),e=Jl.prototype;e[t]||(e[t]=Xl)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,n){void 0===n&&(n=e);for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?(n===e&&(n=e.slice(0,i)),t(s,n)):n!==e&&n.push(s)}return n}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class tc{constructor(t){this.queryList=t,this.matches=null}clone(){return new tc(this.queryList)}setDirty(){this.queryList.setDirty()}}class ec{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);i.push(this.queries[n.indexInDeclarationView].clone())}return new ec(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==_c(t,e).matches&&this.queries[e].setDirty()}}class nc{constructor(t,e,n,i=null){this.predicate=t,this.descendants=e,this.isStatic=n,this.read=i}}class ic{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const i=null!==e?e.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,null!==e?e.push(s):e=[s])}return null!==e?new ic(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class sc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new sc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&4===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(t,e){if(Array.isArray(this.metadata.predicate)){const n=this.metadata.predicate;for(let i=0;i<n.length;i++)this.matchTNodeWithReadOption(t,e,rc(e,n[i]))}else{const n=this.metadata.predicate;n===_l?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,ni(e,t,n,!1,!1))}}matchTNodeWithReadOption(t,e,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===Ga||i===yl||i===_l&&0===e.type)this.addMatch(e.index,-2);else{const n=ni(e,t,i,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function rc(t,e){const n=t.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1];return null}function oc(t,e,n,i){return-1===n?function(t,e){return 3===t.type||4===t.type?$r(Ga,t,e):0===t.type?Wr(_l,Ga,t,e):null}(e,t):-2===n?function(t,e,n){return n===Ga?$r(Ga,e,t):n===_l?Wr(_l,Ga,e,t):n===yl?qr(yl,Ga,e,t):void 0}(t,e,i):ii(t,t[1],n,e)}function ac(t,e,n,i){const s=e[19].queries[i];if(null===s.matches){const i=t.data,r=n.matches,o=[];for(let t=0;t<r.length;t+=2){const s=r[t];o.push(s<0?null:oc(e,i[s],r[t+1],n.metadata.read))}s.matches=o}return s.matches}function lc(t){const e=Ke(),n=Ze(),i=un();dn(i+1);const s=_c(n,i);if(t.dirty&&Be(e)===s.metadata.isStatic){if(null===s.matches)t.reset([]);else{const r=s.crossesNgTemplate?function t(e,n,i,s){const r=e.queries.getByIndex(i),o=r.matches;if(null!==o){const a=ac(e,n,r,i);for(let e=0;e<o.length;e+=2){const i=o[e];if(i>0)s.push(a[e/2]);else{const r=o[e+1],a=n[-i];for(let e=10;e<a.length;e++){const n=a[e];n[17]===n[3]&&t(n[1],n,r,s)}if(null!==a[9]){const e=a[9];for(let n=0;n<e.length;n++){const i=e[n];t(i[1],i,r,s)}}}}}return s}(n,e,i,[]):ac(n,e,s,i);t.reset(r),t.notifyOnChanges()}return!0}return!1}function cc(t,e,n){uc(Ze(),Ke(),t,e,n,!0)}function hc(t,e,n){uc(Ze(),Ke(),t,e,n,!1)}function uc(t,e,n,i,s,r){t.firstCreatePass&&(fc(t,new nc(n,i,r,s),-1),r&&(t.staticViewQueries=!0)),mc(t,e)}function dc(t,e,n,i){pc(Ze(),Ke(),e,n,i,!1,Xe(),t)}function pc(t,e,n,i,s,r,o,a){t.firstCreatePass&&(fc(t,new nc(n,i,r,s),o.index),function(t,e){const n=t.contentQueries||(t.contentQueries=[]);e!==(t.contentQueries.length?n[n.length-1]:-1)&&n.push(t.queries.length-1,e)}(t,a),r&&(t.staticContentQueries=!0)),mc(t,e)}function gc(){return t=Ke(),e=un(),t[19].queries[e].queryList;var t,e}function mc(t,e){const n=new Jl;!function(t,e,n,i){const s=dr(e);s.push(n),t.firstCreatePass&&pr(t).push(i,s.length-1)}(t,e,n,n.destroy),null===e[19]&&(e[19]=new ec),e[19].queries.push(new tc(n))}function fc(t,e,n){null===t.queries&&(t.queries=new ic),t.queries.track(new sc(e,n))}function _c(t,e){return t.queries.getByIndex(e)}const vc=new Ft("Application Initializer");let yc=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();Bo(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Qt(vc,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const bc=new Ft("AppId"),wc={provide:bc,useFactory:function(){return`${Cc()}${Cc()}${Cc()}`},deps:[]};function Cc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Sc=new Ft("Platform Initializer"),Ic=new Ft("Platform ID"),Ec=new Ft("appBootstrapListener");let xc=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Pc=new Ft("LocaleId"),Tc=new Ft("DefaultCurrencyCode");class kc{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Mc=function(t){return new Nl(t)},Dc=Mc,Ac=function(t){return Promise.resolve(Mc(t))},Oc=function(t){const e=Mc(t),n=$n(Se(t).declarations).reduce((t,e)=>{const n=we(e);return n&&t.push(new El(n)),t},[]);return new kc(e,n)},Rc=Oc,Lc=function(t){return Promise.resolve(Oc(t))};let Nc=(()=>{class t{constructor(){this.compileModuleSync=Dc,this.compileModuleAsync=Ac,this.compileModuleAndAllComponentsSync=Rc,this.compileModuleAndAllComponentsAsync=Lc}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const zc=new Ft("compilerOptions"),Fc=(()=>Promise.resolve(0))();function Vc(t){"undefined"==typeof Zone?Fc.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Uc{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Yl(!1),this.onMicrotaskEmpty=new Yl(!1),this.onStable=new Yl(!1),this.onError=new Yl(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=Mt.requestAnimationFrame,e=Mt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Mt,()=>{t.lastRequestAnimationFrameId=-1,$c(t),Hc(t)}),$c(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,i,s,r,o,a)=>{try{return Wc(t),n.invokeTask(s,r,o,a)}finally{e&&"eventTask"===r.type&&e(),qc(t)}},onInvoke:(e,n,i,s,r,o,a)=>{try{return Wc(t),e.invoke(i,s,r,o,a)}finally{qc(t)}},onHasTask:(e,n,i,s)=>{e.hasTask(i,s),n===i&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,$c(t),Hc(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,i,s)=>(e.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Uc.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Uc.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const s=this._inner,r=s.scheduleEventTask("NgZoneEvent: "+i,t,Bc,jc,jc);try{return s.runTask(r,e,n)}finally{s.cancelTask(r)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function jc(){}const Bc={};function Hc(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function $c(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function Wc(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function qc(t){t._nesting--,Hc(t)}class Gc{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Yl,this.onMicrotaskEmpty=new Yl,this.onStable=new Yl,this.onError=new Yl}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Qc=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Uc.assertNotInAngularZone(),Vc(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Vc(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Kc=(()=>{class t{constructor(){this._applications=new Map,Xc.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Xc.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zc{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Yc,Xc=new Zc,Jc=function(t,e,n){const i=t.get(zc,[]).concat(e),s=new Nl(n);if(0===po.size)return Promise.resolve(s);const r=function(t){const e=[];return t.forEach(t=>t&&e.push(...t)),e}(i.map(t=>t.providers));if(0===r.length)return Promise.resolve(s);const o=function(){const t=Mt.ng;if(!t||!t.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return t.\u0275compilerFacade}(),a=ho.create({providers:r}).get(o.ResourceLoader);return function(t){const e=[],n=new Map;function i(t){let e=n.get(t);if(!e){const i=(t=>Promise.resolve(a.get(t)))(t);n.set(t,e=i.then(mo))}return e}return po.forEach((t,n)=>{const s=[];t.templateUrl&&s.push(i(t.templateUrl).then(e=>{t.template=e}));const r=t.styleUrls,o=t.styles||(t.styles=[]),a=t.styles.length;r&&r.forEach((e,n)=>{o.push(""),s.push(i(e).then(i=>{o[a+n]=i,r.splice(r.indexOf(e),1),0==r.length&&(t.styleUrls=void 0)}))});const l=Promise.all(s).then(()=>function(t){go.delete(t)}(n));e.push(l)}),po=new Map,Promise.all(e).then(()=>{})}().then(()=>s)};const th=new Ft("AllowMultipleToken");class eh{constructor(t,e){this.name=t,this.token=e}}function nh(t,e,n=[]){const i="Platform: "+e,s=new Ft(i);return(e=[])=>{let r=ih();if(!r||r.injector.get(th,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:Zr,useValue:"platform"});!function(t){if(Yc&&!Yc.destroyed&&!Yc.injector.get(th,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Yc=t.get(sh);const e=t.get(Sc,null);e&&e.forEach(t=>t())}(ho.create({providers:t,name:i}))}return function(t){const e=ih();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function ih(){return Yc&&!Yc.destroyed?Yc:null}let sh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Gc:("zone.js"===t?void 0:t)||new Uc({enableLongStackTrace:Ii(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),i=[{provide:Uc,useValue:n}];return n.run(()=>{const e=ho.create({providers:i,parent:this.injector,name:t.moduleType.name}),s=t.create(e),r=s.injector.get(di,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>ah(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{r.handleError(t)}})),function(t,e,n){try{const i=n();return Bo(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}(r,n,()=>{const t=s.injector.get(yc);return t.runInitializers(),t.donePromise.then(()=>(Ol(s.injector.get(Pc,"en-US")||"en-US"),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=rh({},e);return Jc(this.injector,n,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(oh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function rh(t,e){return Array.isArray(e)?e.reduce(rh,t):Object.assign(Object.assign({},t),e)}let oh=(()=>{class t{constructor(t,e,n,i,s,r){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=s,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ii(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new b(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new b(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Uc.assertNotInAngularZone(),Vc(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Uc.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=G(o,a.pipe(t=>{return Q()((e=tt,function(t){let n;n="function"==typeof e?e:function(){return e};const i=Object.create(t,X);return i.source=t,i.subjectFactory=n,i})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof $a?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(Jt),s=n.create(ho.NULL,[],e||n.selector,i);s.onDestroy(()=>{this._unloadComponent(s)});const r=s.injector.get(Qc,null);return r&&s.injector.get(Kc).registerApplication(s.location.nativeElement,r),this._loadComponent(s),Ii()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;ah(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Ec,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),ah(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(xc),Qt(ho),Qt(di),Qt(qa),Qt(yc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function ah(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class lh{}class ch{}const hh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let uh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||hh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,i]=t.split("#");return void 0===i&&(i="default"),n("zn8P")(e).then(t=>t[i]).then(t=>dh(t,e,i)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,i]=t.split("#"),s="NgFactory";return void 0===i&&(i="default",s=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[i+s]).then(t=>dh(t,e,i))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Nc),Qt(ch,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function dh(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const ph=nh(null,"core",[{provide:Ic,useValue:"unknown"},{provide:sh,deps:[ho]},{provide:Kc,deps:[]},{provide:xc,deps:[]}]),gh=[{provide:oh,useClass:oh,deps:[Uc,xc,ho,di,qa,yc]},{provide:Il,deps:[Uc],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:yc,useClass:yc,deps:[[new st,vc]]},{provide:Nc,useClass:Nc,deps:[]},wc,{provide:dl,useFactory:function(){return ml},deps:[]},{provide:pl,useFactory:function(){return fl},deps:[]},{provide:Pc,useFactory:function(t){return Ol(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new it(Pc),new st,new ot]]},{provide:Tc,useValue:"USD"}];let mh=(()=>{class t{constructor(t){}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(oh))},providers:gh}),t})();const fh={isWizishopcom:!1,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"http://debugshop.wizilocal.com/_i/",assets_route:"assets/img-manager/",translations_route:"./assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:131,token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyX2lkIjo2LCJleHAiOjE2MzczOTQzNDIsImlhdCI6MTYzNDgwMjM0Mn0.1UhLbMA3euzDDr3zdy2KfUzbdordXbTg4lMjdslPZ9QHiTXoYG5n6SlZV7AAOdWjt_t5eKqgVLKIaQQj9jVA2j2DGtzpnv-rbxHGbatXZ8phWEaYGMXxtOX684aogFrTOP8poDVN0bIerFwBfjuu8U2zDqspx0gpbPHToJE-0W-mQcP0WCOh9quFnLpgziQ-gD-SuuQ5zyTF9l8ToNW2jVzEZ3tO_uk7gULzB2HD-uCcmUIKFhai1NQXEzog8tPSWJNifLyF0Ja0kTrIDrN8oZaf2pEj5yX2Z7xfm9s14XIKX-m2wpU10acBiIhq0RWLOKHLiWbyj_iLGvQV6_DfeA"},product_sheet_endpoint:"/products/ajax",isPhotosTab:!0},_h={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"https://media.wizilocal.com/_i/",assets_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},vh={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.wizishop.com/",wizi_api:"https://api.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},yh={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.dropilocal.com/",wizi_api:"https://api.dropilocal.com/v3",CDN_URL:"https://media.dropilocal.com/_i/",assets_route:"https://js.dropilocal.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},bh={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.dropizi.fr/",wizi_api:"https://api-staging.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},wh=Object.assign({},function(){const t=!!window.location.hostname.match(/local/),e=!!window.location.hostname.match(/wizi/);return window.location.port?fh:t?e?_h:yh:e?vh:bh}());let Ch=null;function Sh(){return Ch}const Ih=new Ft("DocumentToken");let Eh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:xh,token:t,providedIn:"platform"}),t})();function xh(){return Qt(Th)}const Ph=new Ft("Location Initialized");let Th=(()=>{class t extends Eh{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=Sh().getLocation(),this._history=Sh().getHistory()}getBaseHrefFromDOM(){return Sh().getBaseHref(this._doc)}onPopState(t){Sh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){Sh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}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(t){this.location.pathname=t}pushState(t,e,n){kh()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){kh()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({factory:Mh,token:t,providedIn:"platform"}),t})();function kh(){return!!window.history.pushState}function Mh(){return new Th(Qt(Ih))}function Dh(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Ah(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Oh(t){return t&&"?"!==t[0]?"?"+t:t}let Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:Lh,token:t,providedIn:"root"}),t})();function Lh(t){const e=Qt(Ih).location;return new zh(Qt(Eh),e&&e.origin||"")}const Nh=new Ft("appBaseHref");let zh=(()=>{class t extends Rh{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Dh(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+Oh(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,i){const s=this.prepareExternalUrl(n+Oh(i));this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,i){const s=this.prepareExternalUrl(n+Oh(i));this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Eh),Qt(Nh,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fh=(()=>{class t extends Rh{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=Dh(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,i){let s=this.prepareExternalUrl(n+Oh(i));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,i){let s=this.prepareExternalUrl(n+Oh(i));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Eh),Qt(Nh,8))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Vh=(()=>{class t{constructor(t,e){this._subject=new Yl,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=Ah(jh(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+Oh(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,jh(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Oh(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Oh(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)})}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(Qt(Rh),Qt(Eh))},t.normalizeQueryParams=Oh,t.joinWithSlash=Dh,t.stripTrailingSlash=Ah,t.\u0275prov=ht({factory:Uh,token:t,providedIn:"root"}),t})();function Uh(){return new Vh(Qt(Rh),Qt(Eh))}function jh(t){return t.replace(/\/index.html$/,"")}const Bh=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}();class Hh{}let $h=(()=>{class t extends Hh{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Ml(e);if(n)return n;const i=e.split("-")[0];if(n=Ml(i),n)return n;if("en"===i)return Tl;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[Dl.PluralCase]}(e||this.locale)(t)){case Bh.Zero:return"zero";case Bh.One:return"one";case Bh.Two:return"two";case Bh.Few:return"few";case Bh.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Pc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Wh(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}let qh=(()=>{class t{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(wo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+bt(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(Ao(dl),Ao(pl),Ao(Ga),Ao(Ya))},t.\u0275dir=ye({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class Gh{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Qh=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Ii()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Gh(null,this._ngForOf,-1,-1),null===i?void 0:i),s=new Kh(t,n);e.push(s)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const s=this._viewContainer.get(n);this._viewContainer.move(s,i);const r=new Kh(t,s);e.push(r)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=i,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(yl),Ao(_l),Ao(dl))},t.\u0275dir=ye({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class Kh{constructor(t,e){this.record=t,this.view=e}}let Zh=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Yh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Xh("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Xh("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(yl),Ao(_l))},t.\u0275dir=ye({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Yh{constructor(){this.$implicit=null,this.ngIf=null}}function Xh(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}let Jh=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,i]=t.split(".");null!=(e=null!=e&&i?`${e}${i}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(pl),Ao(Ya))},t.\u0275dir=ye({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),tu=(()=>{class t{constructor(t){this.differs=t,this.keyValues=[]}transform(t,e=eu){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const n=this.differ.diff(t);return n&&(this.keyValues=[],n.forEachItem(t=>{this.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues}}return t.\u0275fac=function(e){return new(e||t)(Ao(pl))},t.\u0275pipe=be({name:"keyvalue",type:t,pure:!1}),t})();function eu(t,e){const n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;const s=String(n),r=String(i);return s==r?0:s<r?-1:1}let nu=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[{provide:Hh,useClass:$h}]}),t})();function iu(t){return"browser"===t}let su=(()=>{class t{}return t.\u0275prov=ht({token:t,providedIn:"root",factory:()=>new ru(Qt(Ih),window,Qt(di))}),t})();class ru{constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportScrollRestoration()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportScrollRestoration()){t=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(t):t.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{const e=this.document.querySelector("#"+t);if(e)return void this.scrollToElement(e);const n=this.document.querySelector(`[name='${t}']`);if(n)return void this.scrollToElement(n)}catch(e){this.errorHandler.handleError(e)}}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],i-s[1])}supportScrollRestoration(){try{return!!this.window&&!!this.window.scrollTo}catch(t){return!1}}}class ou extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new ou,Ch||(Ch=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=lu||(lu=document.querySelector("base"),lu)?lu.getAttribute("href"):null;return null==e?null:(n=e,au||(au=document.createElement("a")),au.setAttribute("href",n),"/"===au.pathname.charAt(0)?au.pathname:"/"+au.pathname);var n}resetBaseElement(){lu=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Wh(document.cookie,t)}}let au,lu=null;const cu=new Ft("TRANSITION_ID"),hu=[{provide:vc,useFactory:function(t,e,n){return()=>{n.get(yc).donePromise.then(()=>{const n=Sh();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[cu,Ih,ho],multi:!0}];class uu{static init(){var t;t=new uu,Xc=t}addToWindow(t){Mt.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Mt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Mt.getAllAngularRootElements=()=>t.getAllRootElements(),Mt.frameworkStabilizers||(Mt.frameworkStabilizers=[]),Mt.frameworkStabilizers.push(t=>{const e=Mt.getAllAngularTestabilities();let n=e.length,i=!1;const s=function(e){i=i||e,n--,0==n&&t(i)};e.forEach((function(t){t.whenStable(s)}))})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?Sh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const du=new Ft("EventManagerPlugins");let pu=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(du),Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class gu{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const i=Sh().getGlobalEventTarget(this._doc,t);if(!i)throw new Error(`Unsupported event target ${i} for event ${e}`);return this.addEventListener(i,e,n)}}let mu=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),fu=(()=>{class t extends mu{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Sh().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const _u={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/"},vu=/%COMP%/g;function yu(t,e,n){for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?yu(t,s,n):(s=s.replace(vu,t),n.push(s))}return n}function bu(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let wu=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Cu(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ce.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Su(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case ce.Native:case ce.ShadowDom:return new Iu(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=yu(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Qt(pu),Qt(fu),Qt(bc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Cu{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(_u[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const s=_u[i];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=_u[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&Za.DashCase?t.style.setProperty(e,n,i&Za.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Za.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,bu(n)):this.eventManager.addEventListener(t,e,bu(n))}}class Su extends Cu{constructor(t,e,n,i){super(t),this.component=n;const s=yu(i+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(vu,i+"-"+n.id),this.hostAttr=function(t){return"_nghost-%COMP%".replace(vu,t)}(i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Iu extends Cu{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=i,this.shadowRoot=i.encapsulation===ce.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=yu(i.id,i.styles,[]);for(let r=0;r<s.length;r++){const t=document.createElement("style");t.textContent=s[r],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Eu=(()=>{class t extends gu{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const xu=["alt","control","meta","shift"],Pu={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tu={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ku={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Mu=(()=>{class t extends gu{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,i){const s=t.parseEventName(n),r=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Sh().onAndCancel(e,s.domEventName,r))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const s=t._normalizeKey(n.pop());let r="";if(xu.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),r+=t+".")}),r+=s,0!=n.length||0===s.length)return null;const o={};return o.domEventName=i,o.fullKey=r,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Tu.hasOwnProperty(e)&&(e=Tu[e]))}return Pu[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),xu.forEach(i=>{i!=n&&(0,ku[i])(t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return s=>{t.getEventFullKey(s)===e&&i.runGuarded(()=>n(s))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return Qt(Au)},token:t,providedIn:"root"}),t})(),Au=(()=>{class t extends Du{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case Gi.NONE:return e;case Gi.HTML:return bi(e,"HTML")?yi(e):Wi(this._doc,String(e));case Gi.STYLE:return bi(e,"Style")?yi(e):Zi(e);case Gi.SCRIPT:if(bi(e,"Script"))return yi(e);throw new Error("unsafe value used in a script context");case Gi.URL:return wi(e),bi(e,"URL")?yi(e):Ti(String(e));case Gi.RESOURCE_URL:if(bi(e,"ResourceURL"))return yi(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return new gi(t)}bypassSecurityTrustStyle(t){return new mi(t)}bypassSecurityTrustScript(t){return new fi(t)}bypassSecurityTrustUrl(t){return new _i(t)}bypassSecurityTrustResourceUrl(t){return new vi(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih))},t.\u0275prov=ht({factory:function(){return t=Qt(Vt),new Au(t.get(Ih));var t},token:t,providedIn:"root"}),t})();const Ou=nh(ph,"browser",[{provide:Ic,useValue:"browser"},{provide:Sc,useValue:function(){ou.makeCurrent(),uu.init()},multi:!0},{provide:Ih,useFactory:function(){return function(t){De=t}(document),document},deps:[]}]),Ru=[[],{provide:Zr,useValue:"root"},{provide:di,useFactory:function(){return new di},deps:[]},{provide:du,useClass:Eu,multi:!0,deps:[Ih,Uc,Ic]},{provide:du,useClass:Mu,multi:!0,deps:[Ih]},[],{provide:wu,useClass:wu,deps:[pu,fu,bc]},{provide:Ka,useExisting:wu},{provide:mu,useExisting:fu},{provide:fu,useClass:fu,deps:[Ih]},{provide:Qc,useClass:Qc,deps:[Uc]},{provide:pu,useClass:pu,deps:[du,Uc]},[]];let Lu=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:bc,useValue:e.appId},{provide:cu,useExisting:bc},hu]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(t,12))},providers:Ru,imports:[nu,mh]}),t})();"undefined"!=typeof window&&window;class Nu{}function zu(t,e){return{type:7,name:t,definitions:e,options:{}}}function Fu(t,e=null){return{type:4,styles:e,timings:t}}function Vu(t,e=null){return{type:2,steps:t,options:e}}function Uu(t){return{type:6,styles:t,offset:null}}function ju(t,e,n){return{type:0,name:t,styles:e,options:n}}function Bu(t){return{type:5,steps:t}}function Hu(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function $u(t,e,n=null){return{type:11,selector:t,animation:e,options:n}}function Wu(t,e){return{type:12,timings:t,animation:e}}function qu(t){Promise.resolve(null).then(t)}class Gu{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){qu(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Qu{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const s=this.players.length;0==s?qu(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++i==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function Ku(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Zu(t){switch(t.length){case 0:return new Gu;case 1:return t[0];default:return new Qu(t)}}function Yu(t,e,n,i,s={},r={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(t=>{const n=t.offset,i=n==l,h=i&&c||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),a){case"!":a=s[n];break;case"*":a=r[n];break;default:a=e.normalizeStyleValue(n,i,a,o)}h[i]=a}),i||a.push(h),c=h,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function Xu(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&Ju(n,"start",t)));break;case"done":t.onDone(()=>i(n&&Ju(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&Ju(n,"destroy",t)))}}function Ju(t,e,n){const i=n.totalTime,s=td(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),r=t._data;return null!=r&&(s._data=r),s}function td(t,e,n,i,s="",r=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:s,totalTime:r,disabled:!!o}}function ed(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function nd(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let id=(t,e)=>!1,sd=(t,e)=>!1,rd=(t,e,n)=>[];const od=Ku();(od||"undefined"!=typeof Element)&&(id=(t,e)=>t.contains(e),sd=(()=>{if(od||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):sd}})(),rd=(t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i});let ad=null,ld=!1;function cd(t){ad||(ad=("undefined"!=typeof document?document.body:null)||{},ld=!!ad.style&&"WebkitAppearance"in ad.style);let e=!0;return ad.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in ad.style,!e&&ld)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ad.style),e}const hd=sd,ud=id,dd=rd;function pd(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let gd=(()=>{class t{validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,s,r=[],o){return new Gu(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),md=(()=>{class t{}return t.NOOP=new gd,t})();function fd(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:_d(parseFloat(e[1]),e[2])}function _d(t,e){switch(e){case"s":return 1e3*t;default:return t}}function vd(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,s=0,r="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=_d(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(s=_d(parseFloat(o),n[4]));const a=n[5];a&&(r=a)}else i=t;if(!n){let n=!1,r=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(r,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:s,easing:r}}(t,e,n)}function yd(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function bd(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else yd(t,n);return n}function wd(t,e,n){return n?e+":"+n+";":""}function Cd(t){let e="";for(let n=0;n<t.style.length;n++){const i=t.style.item(n);e+=wd(0,i,t.style.getPropertyValue(i))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=wd(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[n]));t.setAttribute("style",e)}function Sd(t,e,n){t.style&&(Object.keys(e).forEach(i=>{const s=Dd(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[s]),t.style[s]=e[i]}),Ku()&&Cd(t))}function Id(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Dd(e);t.style[n]=""}),Ku()&&Cd(t))}function Ed(t){return Array.isArray(t)?1==t.length?t[0]:Vu(t):t}const xd=new RegExp("{{\\s*(.+?)\\s*}}","g");function Pd(t){let e=[];if("string"==typeof t){let n;for(;n=xd.exec(t);)e.push(n[1]);xd.lastIndex=0}return e}function Td(t,e,n){const i=t.toString(),s=i.replace(xd,(t,i)=>{let s=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),s=""),s.toString()});return s==i?t:s}function kd(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Md=/-+([a-z0-9])/g;function Dd(t){return t.replace(Md,(...t)=>t[1].toUpperCase())}function Ad(t,e){return 0===t||0===e}function Od(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let r=e[0],o=[];if(i.forEach(t=>{r.hasOwnProperty(t)||o.push(t),r[t]=n[t]}),o.length)for(var s=1;s<e.length;s++){let n=e[s];o.forEach((function(e){n[e]=Ld(t,e)}))}}return e}function Rd(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function Ld(t,e){return window.getComputedStyle(t)[e]}function Nd(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=i[1],r=i[2],o=i[3];e.push(Vd(s,o)),"<"!=r[0]||"*"==s&&"*"==o||e.push(Vd(o,s))}(t,n,e)):n.push(t),n}const zd=new Set(["true","1"]),Fd=new Set(["false","0"]);function Vd(t,e){const n=zd.has(t)||Fd.has(t),i=zd.has(e)||Fd.has(e);return(s,r)=>{let o="*"==t||t==s,a="*"==e||e==r;return!o&&n&&"boolean"==typeof s&&(o=s?zd.has(t):Fd.has(t)),!a&&i&&"boolean"==typeof r&&(a=r?zd.has(e):Fd.has(e)),o&&a}}const Ud=new RegExp("s*:selfs*,?","g");function jd(t,e,n){return new Bd(t).build(e,n)}class Bd{constructor(t){this._driver=t}build(t,e){const n=new Hd(e);return this._resetContextStyleTimingState(n),Rd(this,Ed(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const s=[],r=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,i+=s.depCount,r.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:r,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,r=i||{};if(n.styles.forEach(t=>{if($d(t)){const e=t;Object.keys(e).forEach(t=>{Pd(e[t]).forEach(t=>{r.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=kd(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Rd(this,Ed(t.animation),e);return{type:1,matchers:Nd(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Wd(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Rd(this,t,e)),options:Wd(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const s=t.steps.map(t=>{e.currentTime=n;const s=Rd(this,t,e);return i=Math.max(i,e.currentTime),s});return e.currentTime=i,{type:3,steps:s,options:Wd(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return qd(vd(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=qd(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||vd(i,e),qd(n.duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let s=t.styles?t.styles:Uu({});if(5==s.type)i=this.visitKeyframes(s,e);else{let s=t.styles,r=!1;if(!s){r=!0;const t={};n.easing&&(t.easing=n.easing),s=Uu(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(s,e);o.isEmptyStep=r,i=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,s=null;return n.forEach(t=>{if($d(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const r=e.collectedStyles[e.currentQuerySelector],o=r[n];let a=!0;o&&(s!=i&&s>=o.startTime&&i<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${i}ms"`),a=!1),s=o.startTime),a&&(r[n]={startTime:s,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},s=Pd(t);s.length&&s.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const s=[];let r=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if($d(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if($d(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(i++,c=n.offset=l),o=o||c<0||c>1,r=r||c<a,a=c,s.push(c),n});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),r&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let h=0;i>0&&i<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(h=1/(c-1));const u=c-1,d=e.currentTime,p=e.currentAnimateTimings,g=p.duration;return l.forEach((t,i)=>{const r=h>0?i==u?1:h*i:s[i],o=r*g;e.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=r,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Rd(this,Ed(t.animation),e),options:Wd(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Wd(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Wd(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[s,r]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Ud,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,ed(e.collectedStyles,e.currentQuerySelector,{});const o=Rd(this,Ed(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:r,animation:o,originalSelector:t.selector,options:Wd(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:vd(t.timings,e.errors,!0);return{type:12,animation:Rd(this,Ed(t.animation),e),timings:n,options:null}}}class Hd{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function $d(t){return!Array.isArray(t)&&"object"==typeof t}function Wd(t){var e;return t?(t=yd(t)).params&&(t.params=(e=t.params)?yd(e):null):t={},t}function qd(t,e,n){return{duration:t,delay:e,easing:n}}function Gd(t,e,n,i,s,r,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:a}}class Qd{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const Kd=new RegExp(":enter","g"),Zd=new RegExp(":leave","g");function Yd(t,e,n,i,s,r={},o={},a,l,c=[]){return(new Xd).buildKeyframes(t,e,n,i,s,r,o,a,l,c)}class Xd{buildKeyframes(t,e,n,i,s,r,o,a,l,c=[]){l=l||new Qd;const h=new tp(t,e,l,i,s,c,[]);h.options=a,h.currentTimeline.setStyles([r],null,h.errors,a),Rd(this,n,h);const u=h.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(o).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,h.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[Gd(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),s=e.currentTimeline.currentTime,r=this._visitSubInstructions(n,i,i.options);s!=r&&e.transformIntoNewTimeline(r)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const s=null!=n.duration?fd(n.duration):null,r=null!=n.delay?fd(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,r);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),Rd(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const s=t.options;if(s&&(s.params||s.delay)&&(i=e.createSubContext(s),i.transformIntoNewTimeline(),null!=s.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Jd);const t=fd(s.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Rd(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?fd(t.options.delay):0;t.steps.forEach(r=>{const o=e.createSubContext(t.options);s&&o.delayNextStep(s),Rd(this,r,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return vd(e.params?Td(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,s=n.duration,r=e.createSubContext().currentTimeline;r.easing=n.easing,t.styles.forEach(t=>{r.forwardTime((t.offset||0)*s),r.setStyles(t.styles,t.easing,e.errors,e.options),r.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(r),e.transformIntoNewTimeline(i+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},s=i.delay?fd(i.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Jd);let r=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{e.currentQueryIndex=i;const o=e.createSubContext(t.options,n);s&&o.delayNextStep(s),n===e.element&&(a=o.currentTimeline),Rd(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),r=Math.max(r,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(r),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,s=t.timings,r=Math.abs(s.duration),o=r*(e.currentQueryTotal-1);let a=r*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Rd(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}const Jd={};class tp{constructor(t,e,n,i,s,r,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=s,this.errors=r,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Jd,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new ep(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=fd(n.duration)),null!=n.delay&&(i.delay=fd(n.delay));const s=n.params;if(s){let t=i.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Td(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,s=new tp(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=Jd,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new np(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,s,r){let o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Kd,"."+this._enterClassName)).replace(Zd,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return s||0!=o.length||r.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class ep{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new ep(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const s=i&&i.params||{},r=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]="*"})):bd(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(r).forEach(t=>{const e=Td(r[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((s,r)=>{const o=bd(s,!0);Object.keys(o).forEach(n=>{const i=o[n];"!"==i?t.add(n):"*"==i&&e.add(n)}),n||(o.offset=r/this.duration),i.push(o)});const s=t.size?kd(t.values()):[],r=e.size?kd(e.values()):[];if(n){const t=i[0],e=yd(t);t.offset=0,e.offset=1,i=[t,e]}return Gd(this.element,i,s,r,this.duration,this.startTime,this.easing,!1)}}class np extends ep{constructor(t,e,n,i,s,r,o=!1){super(t,e,r.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],r=n+e,o=e/r,a=bd(t[0],!1);a.offset=0,s.push(a);const l=bd(t[0],!1);l.offset=ip(o),s.push(l);const c=t.length-1;for(let i=1;i<=c;i++){let o=bd(t[i],!1);o.offset=ip((e+o.offset*n)/r),s.push(o)}n=r,e=0,i="",t=s}return Gd(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function ip(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class sp{}class rp extends sp{normalizePropertyName(t,e){return Dd(t)}normalizeStyleValue(t,e,n,i){let s="";const r=n.toString().trim();if(op[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return r+s}}const op=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("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".split(",")))();function ap(t,e,n,i,s,r,o,a,l,c,h,u,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:d}}const lp={};class cp{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,s){return t.some(t=>t(e,n,i,s))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],s=this._stateStyles[t],r=i?i.buildStyles(e,n):{};return s?s.buildStyles(e,n):r}build(t,e,n,i,s,r,o,a,l,c){const h=[],u=this.ast.options&&this.ast.options.params||lp,d=this.buildStyles(n,o&&o.params||lp,h),p=a&&a.params||lp,g=this.buildStyles(i,p,h),m=new Set,f=new Map,_=new Map,v="void"===i,y={params:Object.assign(Object.assign({},u),p)},b=c?[]:Yd(t,e,this.ast.animation,s,r,d,g,y,l,h);let w=0;if(b.forEach(t=>{w=Math.max(t.duration+t.delay,w)}),h.length)return ap(e,this._triggerName,n,i,v,d,g,[],[],f,_,w,h);b.forEach(t=>{const n=t.element,i=ed(f,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const s=ed(_,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&m.add(n)});const C=kd(m.values());return ap(e,this._triggerName,n,i,v,d,g,b,C,f,_,w)}}class hp{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=yd(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let r=s[t];r.length>1&&(r=Td(r,i,e)),n[t]=r})}}),n}}class up{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new hp(t.style,t.options&&t.options.params||{})}),dp(this.states,"true","1"),dp(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new cp(t,e,this.states))}),this.fallbackTransition=new cp(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(s=>s.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function dp(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const pp=new Qd;class gp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=jd(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,s=Yu(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],s=this._animations[t];let r;const o=new Map;if(s?(r=Yd(this._driver,e,s,"ng-enter","ng-leave",{},{},n,pp,i),r.forEach(t=>{const e=ed(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),r=[]),i.length)throw new Error("Unable to create the animation due to the following errors: "+i.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,"*")})});const a=Zu(r.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,i){const s=td(e,"","","");return Xu(this._getPlayer(t),n,s,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const mp=[],fp={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},_p={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class vp{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(i=n?t.value:t)?i:null,n){const e=yd(t);delete e.value,this.options=e}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const yp=new vp("void");class bp{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Pp(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(s=n)&&"done"!=s)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var s;const r=ed(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};r.push(o);const a=ed(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Pp(t,"ng-trigger"),Pp(t,"ng-trigger-"+e),a[e]=yp),()=>{this._engine.afterFlush(()=>{const t=r.indexOf(o);t>=0&&r.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const s=this._getTrigger(e),r=new Cp(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Pp(t,"ng-trigger"),Pp(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new vp(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=yp),"void"!==l.value&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let s=0;s<n.length;s++){const i=n[s];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,l.params)){const e=[],n=s.matchStyles(a.value,a.params,e),i=s.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Id(t,n),Sd(t,i)})}return}const c=ed(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let h=s.matchTransition(a.value,l.value,t,l.params),u=!1;if(!h){if(!i)return;h=s.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:a,toState:l,player:r,isFallbackTransition:u}),u||(Pp(t,"ng-animate-queued"),r.onStart(()=>{Tp(t,"ng-animate-queued")})),r.onDone(()=>{let e=this.players.indexOf(r);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(r);t>=0&&n.splice(t,1)}}),this.players.push(r),c.push(r),r}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,".ng-trigger",!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const s=this._engine.statesByElement.get(t);if(s){const r=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,"void",i);n&&r.push(n)}}),r.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Zu(r).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const s=this._triggers[i].fallbackTransition,r=this._engine.statesByElement.get(t)[i]||yp,o=new vp("void"),a=new Cp(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:s,fromState:r,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t.__ng_removed;i&&i!==fp||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Pp(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const s=n.element,r=this._elementListeners.get(s);r&&r.forEach(e=>{if(e.name==n.triggerName){const i=td(s,n.triggerName,n.fromState.value,n.toState.value);i._data=t,Xu(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class wp{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new bp(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const s=n[t[i]].namespaceId;if(s){const t=this._fetchNamespace(s);t&&e.add(t)}}}return e}trigger(t,e,n,i){if(Sp(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!Sp(e))return;const s=e.__ng_removed;if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Pp(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Tp(t,"ng-animate-disabled"))}removeNode(t,e,n,i){if(Sp(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,s){return Sp(e)?this._fetchNamespace(t).listen(e,n,i,s):()=>{}}_buildInstruction(t,e,n,i,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Zu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=fp,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Pp(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?Zu(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new Qd,i=[],s=new Map,r=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)c.add(e[n])});const h=this.bodyNode,u=Array.from(this.statesByElement.keys()),d=xp(u,this.collectedEnterElements),p=new Map;let g=0;d.forEach((t,e)=>{const n="ng-enter"+g++;p.set(e,n),t.forEach(t=>Pp(t,n))});const m=[],f=new Set,_=new Set;for(let M=0;M<this.collectedLeaveElements.length;M++){const t=this.collectedLeaveElements[M],e=t.__ng_removed;e&&e.setForRemoval&&(m.push(t),f.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>f.add(t)):_.add(t))}const v=new Map,y=xp(u,Array.from(f));y.forEach((t,e)=>{const n="ng-leave"+g++;v.set(e,n),t.forEach(t=>Pp(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=p.get(e);t.forEach(t=>Tp(t,n))}),y.forEach((t,e)=>{const n=v.get(e);t.forEach(t=>Tp(t,n))}),m.forEach(t=>{this.processLeaveNode(t)})});const b=[],w=[];for(let M=this._namespaceList.length-1;M>=0;M--)this._namespaceList[M].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(b.push(e),this.collectedEnterElements.length){const t=s.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!h||!this.driver.containsElement(h,s),u=v.get(s),d=p.get(s),g=this._buildInstruction(t,n,d,u,c);if(g.errors&&g.errors.length)w.push(g);else{if(c)return e.onStart(()=>Id(s,g.fromStyles)),e.onDestroy(()=>Sd(s,g.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>Id(s,g.fromStyles)),e.onDestroy(()=>Sd(s,g.toStyles)),void i.push(e);g.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,g.timelines),r.push({instruction:g,player:e,element:s}),g.queriedElements.forEach(t=>ed(o,t,[]).push(e)),g.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),g.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const C=new Map,S=new Map;r.forEach(t=>{const e=t.element;n.has(e)&&(S.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,C))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{ed(C,e,[]).push(t),t.destroy()})});const I=m.filter(t=>Mp(t,a,l)),E=new Map;Ep(E,this.driver,_,l,"*").forEach(t=>{Mp(t,a,l)&&I.push(t)});const x=new Map;d.forEach((t,e)=>{Ep(x,this.driver,new Set(t),a,"!")}),I.forEach(t=>{const e=E.get(t),n=x.get(t);E.set(t,Object.assign(Object.assign({},e),n))});const P=[],T=[],k={};r.forEach(t=>{const{element:e,player:r,instruction:o}=t;if(n.has(e)){if(c.has(e))return r.onDestroy(()=>Sd(e,o.toStyles)),r.disabled=!0,r.overrideTotalTime(o.totalTime),void i.push(r);let t=k;if(S.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=S.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>S.set(e,t))}const n=this._buildAnimation(r.namespaceId,o,C,s,x,E);if(r.setRealPlayer(n),t===k)P.push(r);else{const e=this.playersByElement.get(t);e&&e.length&&(r.parentPlayer=Zu(e)),i.push(r)}}else Id(e,o.fromStyles),r.onDestroy(()=>Sd(e,o.toStyles)),T.push(r),c.has(e)&&i.push(r)}),T.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=Zu(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let M=0;M<m.length;M++){const t=m[M],e=t.__ng_removed;if(Tp(t,"ng-leave"),e&&e.hasAnimation)continue;let n=[];if(o.size){let e=o.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,".ng-animating",!0);for(let t=0;t<i.length;t++){let e=o.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?kp(this,t,i):this.processLeaveNode(t)}return m.length=0,P.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),P}elementContainsData(t,e){let n=!1;const i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,s){let r=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(r=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||"void"==s;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&r.push(e)})}}return(n||i)&&(r=r.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),r}_beforeAnimationBuild(t,e,n){const i=e.element,s=e.isRemovalTransition?void 0:t,r=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==i,l=ed(n,t,[]);this._getPreviousPlayers(t,a,s,r,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Id(i,e.fromStyles)}_buildAnimation(t,e,n,i,s,r){const o=e.triggerName,a=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(e=>{const u=e.element;c.add(u);const d=u.__ng_removed;if(d&&d.removedBeforeQueried)return new Gu(e.duration,e.delay);const p=u!==a,g=function(t){const e=[];return function t(e,n){for(let i=0;i<e.length;i++){const s=e[i];s instanceof Qu?t(s.players,n):n.push(s)}}(t,e),e}((n.get(u)||mp).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),m=s.get(u),f=r.get(u),_=Yu(0,this._normalizer,0,e.keyframes,m,f),v=this._buildPlayer(e,_,g);if(e.subTimeline&&i&&h.add(u),p){const e=new Cp(t,o,u);e.setRealPlayer(v),l.push(e)}return v});l.forEach(t=>{ed(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Pp(t,"ng-animating"));const d=Zu(u);return d.onDestroy(()=>{c.forEach(t=>Tp(t,"ng-animating")),Sd(a,e.toStyles)}),h.forEach(t=>{ed(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new Gu(t.duration,t.delay)}}class Cp{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Gu,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>Xu(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ed(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Sp(t){return t&&1===t.nodeType}function Ip(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function Ep(t,e,n,i,s){const r=[];n.forEach(t=>r.push(Ip(t)));const o=[];i.forEach((n,i)=>{const r={};n.forEach(t=>{const n=r[t]=e.computeStyle(i,t,s);n&&0!=n.length||(i.__ng_removed=_p,o.push(i))}),t.set(i,r)});let a=0;return n.forEach(t=>Ip(t,r[a++])),o}function xp(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),s=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let r=s.get(e);if(r)return r;const o=e.parentNode;return r=n.has(o)?o:i.has(o)?1:t(o),s.set(e,r),r}(t);1!==e&&n.get(e).push(t)}),n}function Pp(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Tp(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function kp(t,e,n){Zu(n).onDone(()=>t.processLeaveNode(e))}function Mp(t,e,n){const i=n.get(t);if(!i)return!1;let s=e.get(t);return s?i.forEach(t=>s.add(t)):e.set(t,i),n.delete(t),!0}class Dp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new wp(t,e,n),this._timelineEngine=new gp(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,s){const r=t+"-"+i;let o=this._triggerCache[r];if(!o){const t=[],e=jd(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new up(t,e)}(i,e),this._triggerCache[r]=o}this._transitionEngine.registerTrigger(e,i,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,s]=nd(n);this._timelineEngine.command(t,e,s,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,s){if("@"==n.charAt(0)){const[t,i]=nd(n);return this._timelineEngine.listen(t,e,i,s)}return this._transitionEngine.listen(t,e,n,i,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Ap(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=Rp(e[0]),e.length>1&&(i=Rp(e[e.length-1]))):e&&(n=Rp(e)),n||i?new Op(t,n,i):null}let Op=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let s=t.initialStylesByElement.get(e);s||t.initialStylesByElement.set(e,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Sd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Sd(this._element,this._initialStyles),this._endStyles&&(Sd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Id(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Id(this._element,this._endStyles),this._endStyles=null),Sd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Rp(t){let e=null;const n=Object.keys(t);for(let i=0;i<n.length;i++){const s=n[i];Lp(s)&&(e=e||{},e[s]=t[s])}return e}function Lp(t){return"display"===t||"position"===t}class Np{constructor(t,e,n,i,s,r,o){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=s,this._fillMode=r,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const n=Bp(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++}(n),e=`${n}, ${e}`),jp(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Up(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){zp(this._element,this._name,"paused")}resume(){zp(this._element,this._name,"running")}setPosition(t){const e=Fp(this._element,this._name);this._position=t*this._duration,jp(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Up(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=Bp(t,"").split(","),i=Vp(n,e);i>=0&&(n.splice(i,1),jp(t,"",n.join(",")))}(this._element,this._name))}}function zp(t,e,n){jp(t,"PlayState",n,Fp(t,e))}function Fp(t,e){const n=Bp(t,"");return n.indexOf(",")>0?Vp(n.split(","),e):Vp([n],e)}function Vp(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Up(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function jp(t,e,n,i){const s="animation"+e;if(null!=i){const e=t.style[s];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[s]=n}function Bp(t,e){return t.style["animation"+e]}class Hp{constructor(t,e,n,i,s,r,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=s,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=r||"linear",this.totalTime=i+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Np(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Ld(this.element,n))})}this.currentSnapshot=t}}class $p extends Gu{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=pd(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class Wp{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>pd(t));let i=`@keyframes ${e} {\n`,s="";n.forEach(t=>{s=" ";const e=parseFloat(t.offset);i+=`${s}${100*e}% {\n`,s+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${s}animation-timing-function: ${n};\n`));default:return void(i+=`${s}${e}: ${n};\n`)}}),i+=s+"}\n"}),i+="}\n";const r=document.createElement("style");return r.innerHTML=i,r}animate(t,e,n,i,s,r=[],o){o&&this._notifyFaultyScrubber();const a=r.filter(t=>t instanceof Hp),l={};Ad(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Od(t,e,l));if(0==n)return new $p(t,c);const h="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,h,e);document.querySelector("head").appendChild(u);const d=Ap(t,e),p=new Hp(t,e,h,n,i,s,c,d);return p.onDestroy(()=>{var t;(t=u).parentNode.removeChild(t)}),p}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class qp{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Ld(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Gp{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Qp().toString()),this._cssKeyframesDriver=new Wp}validateStyleProperty(t){return cd(t)}matchesElement(t,e){return hd(t,e)}containsElement(t,e){return ud(t,e)}query(t,e,n){return dd(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,s,r=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,s,r);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};s&&(a.easing=s);const l={},c=r.filter(t=>t instanceof qp);Ad(n,i)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=Ap(t,e=Od(t,e=e.map(t=>bd(t,!1)),l));return new qp(t,e,a,h)}}function Qp(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let Kp=(()=>{class t extends Nu{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ce.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?Vu(t):t;return Xp(this._renderer,null,e,"register",[n]),new Zp(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ka),Qt(Ih))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zp extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Yp(this._id,t,e||{},this._renderer)}}class Yp{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Xp(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function Xp(t,e,n,i,s){return t.setProperty(e,`@@${n}:${i}`,s)}let Jp=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new tg("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const r=e=>{Array.isArray(e)?e.forEach(r):this.engine.registerTrigger(i,s,t,e.name,e)};return e.data.animation.forEach(r),new eg(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ka),Qt(Dp),Qt(Uc))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class tg{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class eg extends tg{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if("@"==e.charAt(0)){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),r="";return"@"!=s.charAt(0)&&([s,r]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,i,s,r,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let ng=(()=>{class t extends Dp{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(md),Qt(sp))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const ig=[{provide:md,useFactory:function(){return"function"==typeof Qp()?new Gp:new Wp}},{provide:new Ft("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Nu,useClass:Kp},{provide:sp,useFactory:function(){return new rp}},{provide:Dp,useClass:ng},{provide:Ka,useFactory:function(t,e,n){return new Jp(t,e,n)},deps:[wu,Dp,Uc]}];let sg=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:ig,imports:[Lu]}),t})();class rg extends u{constructor(t,e){super()}schedule(t,e=0){return this}}class og extends rg{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,i=void 0;try{this.work(t)}catch(s){n=!0,i=!!s&&s||new Error(s)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}class ag extends og{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}let lg=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class cg extends lg{constructor(t,e=lg.now){super(t,()=>cg.delegate&&cg.delegate!==this?cg.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return cg.delegate&&cg.delegate!==this?cg.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}class hg extends cg{}const ug=new hg(ag),dg=new b(t=>t.complete());function pg(t){return t?function(t){return new b(e=>t.schedule(()=>e.complete()))}(t):dg}function gg(...t){let e=t[t.length-1];return P(e)?(t.pop(),U(t,e)):q(t)}let mg=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return gg(this.value);case"E":return t=this.error,new b(e=>e.error(t));case"C":return pg()}var t;throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class fg extends g{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(fg.dispatch,this.delay,new _g(t,this.destination)))}_next(t){this.scheduleMessage(mg.createNext(t))}_error(t){this.scheduleMessage(mg.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(mg.createComplete()),this.unsubscribe()}}class _g{constructor(t,e){this.notification=t,this.destination=e}}class vg extends E{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),super.next(t)}nextTimeWindow(t){this._events.push(new yg(this._getNow(),t)),this._trimBufferThenGetEvents(),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,s=n.length;let r;if(this.closed)throw new C;if(this.isStopped||this.hasError?r=u.EMPTY:(this.observers.push(t),r=new S(this,t)),i&&t.add(t=new fg(t,i)),e)for(let o=0;o<s&&!t.closed;o++)t.next(n[o]);else for(let o=0;o<s&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),r}_getNow(){return(this.scheduler||ug).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,s=i.length;let r=0;for(;r<s&&!(t-i[r].time<n);)r++;return s>e&&(r=Math.max(r,s-e)),r>0&&i.splice(0,r),i}}class yg{constructor(t,e){this.time=t,this.value=e}}class bg extends E{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new C;return this._value}next(t){super.next(this._value=t)}}function wg(...t){if(1===t.length){const e=t[0];if(l(e))return Cg(e,null);if(c(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Cg(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Cg(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(z(t=>e(...t)))}return Cg(t,null)}function Cg(t,e){return new b(n=>{const i=t.length;if(0===i)return void n.complete();const s=new Array(i);let r=0,o=0;for(let a=0;a<i;a++){const l=j(t[a]);let c=!1;n.add(l.subscribe({next:t=>{c||(c=!0,o++),s[a]=t},error:t=>n.error(t),complete:()=>{r++,r!==i&&c||(o===i&&n.next(e?e.reduce((t,e,n)=>(t[e]=s[n],t),{}):s),n.complete())}}))}})}function Sg(t,e){return B(t,e,1)}function Ig(t,e){return function(n){return n.lift(new Eg(t,e))}}class Eg{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new xg(t,this.predicate,this.thisArg))}}class xg extends g{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}class Pg{}class Tg{}class kg{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof kg?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new kg;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof kg?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===s.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class Mg{encodeKey(t){return Dg(t)}encodeValue(t){return Dg(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function Dg(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class Ag{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Mg,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[s,r]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],o=n.get(s)||[];o.push(r),n.set(s,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Ag({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function Og(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Rg(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Lg(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Ng{constructor(t,e,n,i){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new kg),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new Ag,this.urlWithParams=e}serializeBody(){return null===this.body?null:Og(this.body)||Rg(this.body)||Lg(this.body)||"string"==typeof this.body?this.body:this.body instanceof Ag?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||Lg(this.body)?null:Rg(this.body)?this.body.type||null:Og(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Ag?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,n=t.url||this.url,i=t.responseType||this.responseType,s=void 0!==t.body?t.body:this.body,r=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Ng(e,n,s,{params:l,headers:a,reportProgress:o,responseType:i,withCredentials:r})}}const zg=function(){var t={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return t[t.Sent]="Sent",t[t.UploadProgress]="UploadProgress",t[t.ResponseHeader]="ResponseHeader",t[t.DownloadProgress]="DownloadProgress",t[t.Response]="Response",t[t.User]="User",t}();class Fg{constructor(t,e=200,n="OK"){this.headers=t.headers||new kg,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Vg extends Fg{constructor(t={}){super(t),this.type=zg.ResponseHeader}clone(t={}){return new Vg({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Ug extends Fg{constructor(t={}){super(t),this.type=zg.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Ug({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class jg extends Fg{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function Bg(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Hg=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Ng)i=t;else{let s=void 0;s=n.headers instanceof kg?n.headers:new kg(n.headers);let r=void 0;n.params&&(r=n.params instanceof Ag?n.params:new Ag({fromObject:n.params})),i=new Ng(t,e,void 0!==n.body?n.body:null,{headers:s,params:r,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=gg(i).pipe(Sg(t=>this.handler.handle(t)));if(t instanceof Ng||"events"===n.observe)return s;const r=s.pipe(Ig(t=>t instanceof Ug));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return r.pipe(z(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return r.pipe(z(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return r.pipe(z(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return r.pipe(z(t=>t.body))}case"response":return r;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new Ag).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,Bg(n,e))}post(t,e,n={}){return this.request("POST",t,Bg(n,e))}put(t,e,n={}){return this.request("PUT",t,Bg(n,e))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Pg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class $g{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const Wg=new Ft("HTTP_INTERCEPTORS");let qg=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Gg=/^\)\]\}',?\n/;class Qg{}let Kg=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Zg=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new b(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let s=null;const r=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,i=n.statusText||"OK",r=new kg(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return s=new Vg({headers:r,status:e,statusText:i,url:o}),s},o=()=>{let{headers:i,status:s,statusText:o,url:a}=r(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let c=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Gg,"");try{l=""!==l?JSON.parse(l):null}catch(h){l=t,c&&(c=!1,l={error:h,text:l})}}c?(e.next(new Ug({body:l,headers:i,status:s,statusText:o,url:a||void 0})),e.complete()):e.error(new jg({error:l,headers:i,status:s,statusText:o,url:a||void 0}))},a=t=>{const{url:i}=r(),s=new jg({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});e.error(s)};let l=!1;const c=i=>{l||(e.next(r()),l=!0);let s={type:zg.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(s.total=i.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},h=t=>{let n={type:zg.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==i&&n.upload&&n.upload.addEventListener("progress",h)),n.send(i),e.next({type:zg.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==i&&n.upload&&n.upload.removeEventListener("progress",h)),n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Qt(Qg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Yg=new Ft("XSRF_COOKIE_NAME"),Xg=new Ft("XSRF_HEADER_NAME");class Jg{}let tm=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wh(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Ic),Qt(Yg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),em=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Jg),Qt(Xg))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),nm=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(Wg,[]);this.chain=t.reduceRight((t,e)=>new $g(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Tg),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),im=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:em,useClass:qg}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Yg,useValue:e.cookieName}:[],e.headerName?{provide:Xg,useValue:e.headerName}:[]]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[em,{provide:Wg,useExisting:em,multi:!0},{provide:Jg,useClass:tm},{provide:Yg,useValue:"XSRF-TOKEN"},{provide:Xg,useValue:"X-XSRF-TOKEN"}]}),t})(),sm=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Hg,{provide:Pg,useClass:nm},Zg,{provide:Tg,useExisting:Zg},Kg,{provide:Qg,useExisting:Kg}],imports:[[im.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function rm(t){return!!t&&(t instanceof b||"function"==typeof t.lift&&"function"==typeof t.subscribe)}function om(){return W(1)}function am(...t){return om()(gg(...t))}function lm(t){return new b(e=>{let n;try{n=t()}catch(i){return void e.error(i)}return(n?j(n):pg()).subscribe(e)})}const cm=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function hm(t){return e=>0===t?pg():e.lift(new um(t))}class um{constructor(t){if(this.total=t,this.total<0)throw new cm}call(t,e){return e.subscribe(new dm(t,this.total))}}class dm extends g{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function pm(t,e,n){let i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:n,scheduler:i}){let s,r,o=0,a=!1,l=!1;return function(c){o++,s&&!a||(a=!1,s=new vg(t,e,i),r=c.subscribe({next(t){s.next(t)},error(t){a=!0,s.error(t)},complete(){l=!0,r=void 0,s.complete()}}));const h=s.subscribe(this);this.add(()=>{o--,h.unsubscribe(),r&&!l&&n&&0===o&&(r.unsubscribe(),r=void 0,s=void 0)})}}(i))}function gm(t,e){return"function"==typeof e?n=>n.pipe(gm((n,i)=>j(t(n,i)).pipe(z((t,s)=>e(n,t,i,s))))):e=>e.lift(new mm(t))}class mm{constructor(t){this.project=t}call(t,e){return e.subscribe(new fm(t,this.project))}}class fm extends N{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e,t,n)}_innerSub(t,e,n){const i=this.innerSubscription;i&&i.unsubscribe();const s=new T(this,e,n),r=this.destination;r.add(s),this.innerSubscription=L(this,t,void 0,void 0,s),this.innerSubscription!==s&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}}class _m{}let vm=(()=>{class t extends _m{getTranslation(t){return gg({})}}return t.\u0275fac=function(e){return ym(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const ym=li(vm);class bm{}let wm=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Cm(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let n,i,s,r=typeof t;if(r==typeof e&&"object"==r){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(i in s=Object.create(null),t){if(!Cm(t[i],e[i]))return!1;s[i]=!0}for(i in e)if(!(i in s)&&void 0!==e[i])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(i=0;i<n;i++)if(!Cm(t[i],e[i]))return!1;return!0}}return!1}function Sm(t){return null!=t}function Im(t){return t&&"object"==typeof t&&!Array.isArray(t)}class Em{}let xm=(()=>{class t extends Em{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let n;return n="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,n}getValue(t,e){let n="string"==typeof e?e.split("."):[e];e="";do{e+=n.shift(),!Sm(t)||!Sm(t[e])||"object"!=typeof t[e]&&n.length?n.length?e+=".":t=void 0:(t=t[e],e="")}while(n.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,n)=>{let i=this.getValue(e,n);return Sm(i)?i:t}):t}}return t.\u0275fac=function(e){return Pm(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Pm=li(xm);class Tm{}let km=(()=>{class t extends Tm{compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return Mm(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Mm=li(km);class Dm{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new Yl,this.onLangChange=new Yl,this.onDefaultLangChange=new Yl}}const Am=new Ft("USE_STORE"),Om=new Ft("USE_DEFAULT_LANG"),Rm=new Ft("DEFAULT_LANGUAGE"),Lm=new Ft("USE_EXTEND");let Nm=(()=>{class t{constructor(t,e,n,i,s,r=!0,o=!1,a=!1,l){this.store=t,this.currentLoader=e,this.compiler=n,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=r,this.isolate=o,this.extend=a,this.pending=!1,this._onTranslationChange=new Yl,this._onLangChange=new Yl,this._onDefaultLangChange=new Yl,this._langs=[],this._translations={},this._translationRequests={},l&&this.setDefaultLang(l)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(hm(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return gg(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(hm(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),gg(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(pm(1),hm(1));return this.loadingTranslations=e.pipe(z(e=>this.compiler.compileTranslations(e,t)),pm(1),hm(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,n=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(n||this.extend)&&this.translations[t]?function t(e,n){let i=Object.assign({},e);return Im(e)&&Im(n)&&Object.keys(n).forEach(s=>{Im(n[s])?s in e?i[s]=t(e[s],n[s]):Object.assign(i,{[s]:n[s]}):Object.assign(i,{[s]:n[s]})}),i}(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,n){let i;if(e instanceof Array){let i={},s=!1;for(let r of e)i[r]=this.getParsedResult(t,r,n),rm(i[r])&&(s=!0);return s?wg(e.map(t=>rm(i[t])?i[t]:gg(i[t]))).pipe(z(t=>{let n={};return t.forEach((t,i)=>{n[e[i]]=t}),n})):i}if(t&&(i=this.parser.interpolate(this.parser.getValue(t,e),n)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),n)),void 0===i){let t={key:e,translateService:this};void 0!==n&&(t.interpolateParams=n),i=this.missingTranslationHandler.handle(t)}return void 0!==i?i:e}get(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Sg(n=>rm(n=this.getParsedResult(n,t,e))?n:gg(n)));{let n=this.getParsedResult(this.translations[this.currentLang],t,e);return rm(n)?n:gg(n)}}getStreamOnTranslationChange(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');return am(lm(()=>this.get(t,e)),this.onTranslationChange.pipe(gm(n=>{const i=this.getParsedResult(n.translations,t,e);return"function"==typeof i.subscribe?i:gg(i)})))}stream(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');return am(lm(()=>this.get(t,e)),this.onLangChange.pipe(gm(n=>{const i=this.getParsedResult(n.translations,t,e);return rm(i)?i:gg(i)})))}instant(t,e){if(!Sm(t)||!t.length)throw new Error('Parameter "key" required');let n=this.getParsedResult(this.translations[this.currentLang],t,e);if(rm(n)){if(t instanceof Array){let e={};return t.forEach((n,i)=>{e[t[i]]=t[i]}),e}return t}return n}set(t,e,n=this.currentLang){this.translations[n][t]=this.compiler.compile(e,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(Qt(Dm),Qt(_m),Qt(Tm),Qt(Em),Qt(bm),Qt(Om),Qt(Am),Qt(Lm),Qt(Rm))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),zm=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,n){let i=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(n){let s=this.translate.getParsedResult(n,t,e);rm(s.subscribe)?s.subscribe(i):i(s)}this.translate.get(t,e).subscribe(i)}transform(t,...e){if(!t||!t.length)return t;if(Cm(t,this.lastKey)&&Cm(e,this.lastParams))return this.value;let n;if(Sm(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{n=JSON.parse(t)}catch(i){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(n=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,n),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Nm),function(t=at.Default){const e=Gr(!0);if(null!=e||t&at.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}())},t.\u0275pipe=be({name:"translate",type:t,pure:!1}),t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fm=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:_m,useClass:vm},e.compiler||{provide:Tm,useClass:km},e.parser||{provide:Em,useClass:xm},e.missingTranslationHandler||{provide:bm,useClass:wm},Dm,{provide:Am,useValue:e.isolate},{provide:Om,useValue:e.useDefaultLang},{provide:Lm,useValue:e.extend},{provide:Rm,useValue:e.defaultLanguage},Nm]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:_m,useClass:vm},e.compiler||{provide:Tm,useClass:km},e.parser||{provide:Em,useClass:xm},e.missingTranslationHandler||{provide:bm,useClass:wm},{provide:Am,useValue:e.isolate},{provide:Om,useValue:e.useDefaultLang},{provide:Lm,useValue:e.extend},{provide:Rm,useValue:e.defaultLanguage},Nm]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();const Vm=new Ft("NgValueAccessor"),Um={provide:Vm,useExisting:St(()=>jm),multi:!0};let jm=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[Ha([Um])]}),t})();const Bm={provide:Vm,useExisting:St(()=>$m),multi:!0},Hm=new Ft("CompositionEventMode");let $m=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Sh()?Sh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga),Ao(Hm,8))},t.\u0275dir=ye({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&$o("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[Ha([Bm])]}),t})(),Wm=(()=>{class t{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t}),t})(),qm=(()=>{class t extends Wm{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return Gm(e||t)},t.\u0275dir=ye({type:t,features:[Pa]}),t})();const Gm=li(qm);function Qm(){throw new Error("unimplemented")}class Km extends Wm{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return Qm()}get asyncValidator(){return Qm()}}let Zm=(()=>{class t extends class{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Km,2))},t.\u0275dir=ye({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&aa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[Pa]}),t})();function Ym(t){return null==t||0===t.length}const Xm=new Ft("NgValidators"),Jm=new Ft("NgAsyncValidators"),tf=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ef{static min(t){return e=>{if(Ym(e.value)||Ym(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(Ym(e.value)||Ym(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Ym(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Ym(t.value)||tf.test(t.value)?null:{email:!0}}static minLength(t){return e=>{if(Ym(e.value))return null;const n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}static maxLength(t){return e=>{const n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}}static pattern(t){if(!t)return ef.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Ym(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(nf);return 0==e.length?null:function(t){return rf(function(t,e){return e.map(e=>e(t))}(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(nf);return 0==e.length?null:function(t){return wg(function(t,e){return e.map(e=>e(t))}(t,e).map(sf)).pipe(z(rf))}}}function nf(t){return null!=t}function sf(t){const e=Bo(t)?j(t):t;if(!Ho(e))throw new Error("Expected validator to return Promise or Observable.");return e}function rf(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function of(t){return t.validate?e=>t.validate(e):t}function af(t){return t.validate?e=>t.validate(e):t}const lf={provide:Vm,useExisting:St(()=>cf),multi:!0};let cf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[Ha([lf])]}),t})();const hf={provide:Vm,useExisting:St(()=>df),multi:!0};let uf=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),df=(()=>{class t{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(Km),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga),Ao(uf),Ao(ho))},t.\u0275dir=ye({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Ha([hf])]}),t})();const pf={provide:Vm,useExisting:St(()=>gf),multi:!0};let gf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[Ha([pf])]}),t})();const mf='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',ff='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',_f={provide:Vm,useExisting:St(()=>yf),multi:!0};function vf(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let yf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=yo}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=vf(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[Ha([_f])]}),t})(),bf=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(vf(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(yf,9))},t.\u0275dir=ye({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const wf={provide:Vm,useExisting:St(()=>Sf),multi:!0};function Cf(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Sf=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=yo}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(e.hasOwnProperty("selectedOptions")){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const i=t.item(e),s=this._getOptionValue(i.value);n.push(s)}}else{const t=e.options;for(let e=0;e<t.length;e++){const i=t.item(e);if(i.selected){const t=this._getOptionValue(i.value);n.push(t)}}}this.value=n,t(n)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ya),Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&$o("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[Ha([wf])]}),t})(),If=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Cf(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Cf(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Sf,9))},t.\u0275dir=ye({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function Ef(t,e){return[...e.path,t]}function xf(t,e){t||Tf(e,"Cannot find control with"),e.valueAccessor||Tf(e,"No value accessor for form control with"),t.validator=ef.compose([t.validator,e.validator]),t.asyncValidator=ef.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Pf(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Pf(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function Pf(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Tf(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function kf(t){return null!=t?ef.compose(t.map(of)):null}function Mf(t){return null!=t?ef.composeAsync(t.map(af)):null}const Df=[jm,gf,cf,yf,Sf,df];function Af(t){const e=Rf(t)?t.validators:t;return Array.isArray(e)?kf(e):e||null}function Of(t,e){const n=Rf(e)?e.asyncValidators:t;return Array.isArray(n)?Mf(n):n||null}function Rf(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class Lf{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this.validator=Af(t)}setAsyncValidators(t){this.asyncValidator=Of(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING";const e=sf(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let i=t;return e.forEach(t=>{i=i instanceof zf?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof Ff&&i.at(t)||null}),i}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new Yl,this.statusChanges=new Yl}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Rf(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class Nf extends Lf{constructor(t=null,e,n){super(Af(e),Of(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class zf extends Lf{constructor(t,e,n){super(Af(e),Of(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Nf?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){let e=!1;return this._forEachChild((n,i)=>{e=e||this.contains(i)&&t(n)}),e}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Ff extends Lf{constructor(t,e,n){super(Af(e),Of(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof Nf?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Vf={provide:qm,useExisting:St(()=>jf)},Uf=(()=>Promise.resolve(null))();let jf=(()=>{class t extends qm{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new Yl,this.form=new zf({},kf(t),Mf(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Uf.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),xf(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Uf.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this._directives,t)})}addFormGroup(t){Uf.then(()=>{const e=this._findContainer(t.path),n=new zf({});(function(t,e){null==t&&Tf(e,"Cannot find control with"),t.validator=ef.compose([t.validator,e.validator]),t.asyncValidator=ef.composeAsync([t.asyncValidator,e.asyncValidator])})(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Uf.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){Uf.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,e=this._directives,this.form._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(Ao(Xm,10),Ao(Jm,10))},t.\u0275dir=ye({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&$o("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ha([Vf]),Pa]}),t})(),Bf=(()=>{class t extends qm{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Ef(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return kf(this._validators)}get asyncValidator(){return Mf(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return Hf(e||t)},t.\u0275dir=ye({type:t,features:[Pa]}),t})();const Hf=li(Bf);class $f{static modelParentException(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')}static formGroupNameException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${mf}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${ff}`)}static missingNameException(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')}static modelGroupParentException(){throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${mf}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${ff}`)}}const Wf={provide:qm,useExisting:St(()=>qf)};let qf=(()=>{class t extends Bf{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){this._parent instanceof t||this._parent instanceof jf||$f.modelGroupParentException()}}return t.\u0275fac=function(e){return new(e||t)(Ao(qm,5),Ao(Xm,10),Ao(Jm,10))},t.\u0275dir=ye({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Ha([Wf]),Pa]}),t})();const Gf={provide:Km,useExisting:St(()=>Kf)},Qf=(()=>Promise.resolve(null))();let Kf=(()=>{class t extends Km{constructor(t,e,n,i){super(),this.control=new Nf,this._registered=!1,this.update=new Yl,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e)||Tf(t,"Value accessor was not provided as an array for form control with");let n=void 0,i=void 0,s=void 0;return e.forEach(e=>{var r;e.constructor===$m?n=e:(r=e,Df.some(t=>r.constructor===t)?(i&&Tf(t,"More than one built-in value accessor matches form control with"),i=e):(s&&Tf(t,"More than one custom value accessor matches form control with"),s=e))}),s||i||n||(Tf(t,"No valid value accessor for form control with"),null)}(this,i)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!yo(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?Ef(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return kf(this._rawValidators)}get asyncValidator(){return Mf(this._rawAsyncValidators)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){xf(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){!(this._parent instanceof qf)&&this._parent instanceof Bf?$f.formGroupNameException():this._parent instanceof qf||this._parent instanceof jf||$f.modelParentException()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||$f.missingNameException()}_updateValue(t){Qf.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;Qf.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(Ao(qm,9),Ao(Xm,10),Ao(Jm,10),Ao(Vm,10))},t.\u0275dir=ye({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ha([Gf]),Pa,Oa]}),t})();const Zf=new Ft("NgModelWithFormControlWarning");let Yf=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})(),Xf=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let i=null,s=null,r=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(i=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,r=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new zf(n,{asyncValidators:s,updateOn:r,validators:i})}control(t,e,n){return new Nf(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new Ff(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Nf||t instanceof zf||t instanceof Ff?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Jf=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[uf],imports:[Yf]}),t})(),t_=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Zf,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Xf,uf],imports:[Yf]}),t})();function e_(t,e,n,s){return i(n)&&(s=n,n=void 0),s?e_(t,e,n).pipe(z(t=>l(t)?s(...t):s(t))):new b(i=>{!function t(e,n,i,s,r){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(n,i,r),o=()=>t.removeEventListener(n,i,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(n,i),o=()=>t.off(n,i)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(n,i),o=()=>t.removeListener(n,i)}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let o=0,a=e.length;o<a;o++)t(e[o],n,i,s,r)}s.add(o)}(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)})}function n_(t){return e=>e.lift(new i_(t))}class i_{constructor(t){this.callback=t}call(t,e){return e.subscribe(new s_(t,this.callback))}}class s_ extends g{constructor(t,e){super(t),this.add(new u(e))}}function r_(t){return e=>e.lift(new o_(t))}class o_{constructor(t){this.notifier=t}call(t,e){const n=new a_(t),i=L(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}class a_ extends N{constructor(t){super(t),this.seenValue=!1}notifyNext(t,e,n,i,s){this.seenValue=!0,this.complete()}notifyComplete(){}}function l_(t){return null!=t&&""+t!="false"}function c_(t,e=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function h_(t){return t instanceof Ga?t.nativeElement:t}const u_=new Ft("cdk-dir-doc",{providedIn:"root",factory:function(){return Kt(Ih)}});let d_,p_=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new Yl,t){const e=t.documentElement?t.documentElement.dir:null,n=(t.body?t.body.dir:null)||e;this.value="ltr"===n||"rtl"===n?n:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(Qt(u_,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(u_,8))},token:t,providedIn:"root"}),t})(),g_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();try{d_="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(QP){d_=!1}let m_,f_,__,v_=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?iu(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!d_)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ic))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ic))},token:t,providedIn:"root"}),t})(),y_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();function b_(t){return function(){if(null==m_&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>m_=!0}))}finally{m_=m_||!1}return m_}()?t:!!t.capture}function w_(){if("object"!=typeof document||!document)return 0;if(null==f_){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",t.appendChild(n),document.body.appendChild(t),f_=0,0===t.scrollLeft&&(t.scrollLeft=1,f_=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return f_}class C_ extends og{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(t,e,n);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}class S_ extends cg{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,i=-1,s=e.length;t=t||e.shift();do{if(n=t.execute(t.state,t.delay))break}while(++i<s&&(t=e.shift()));if(this.active=!1,n){for(;++i<s&&(t=e.shift());)t.unsubscribe();throw n}}}const I_=new S_(C_);function E_(t,e){return n=>n.lift(new x_(t,e))}class x_{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new P_(t,this.compare,this.keySelector))}}class P_ extends g{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}const T_=new cg(og);class k_{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new M_(t,this.durationSelector))}}class M_ extends N{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let n;try{const{durationSelector:e}=this;n=e(t)}catch(e){return this.destination.error(e)}const i=L(this,n);!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:t,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}notifyNext(t,e,n,i){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function D_(t){return!l(t)&&t-parseFloat(t)+1>=0}function A_(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function O_(t,e=T_){return n=()=>function(t=0,e,n){let i=-1;return D_(e)?i=Number(e)<1?1:Number(e):P(e)&&(n=e),P(n)||(n=T_),new b(e=>{const s=D_(t)?t:+t-n.now();return n.schedule(A_,s,{index:0,period:i,subscriber:e})})}(t,e),function(t){return t.lift(new k_(n))};var n}function R_(...t){const e=t[t.length-1];return P(e)?(t.pop(),n=>am(t,n,e)):e=>am(t,e)}class L_{call(t,e){return e.subscribe(new N_(t))}}class N_ extends g{constructor(t){super(t),this.hasPrev=!1}_next(t){let e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)}}let z_=(()=>{class t{constructor(t,e,n){this._ngZone=t,this._platform=e,this._scrolled=new E,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=n}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new b(e=>{this._globalSubscription||this._addGlobalListener();const n=t>0?this._scrolled.pipe(O_(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):gg()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Ig(t=>!t||n.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((n,i)=>{this._scrollableContainsElement(i,t)&&e.push(i)}),e}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollableContainsElement(t,e){let n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>e_(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(v_),Qt(Ih,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(Uc),Qt(v_),Qt(Ih,8))},token:t,providedIn:"root"}),t})(),F_=(()=>{class t{constructor(t,e,n){this._platform=t,this._change=new E,this._changeListener=t=>{this._change.next(t)},this._document=n,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:n}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,height:n,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._getDocument(),e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(O_(t)):this._change}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(Qt(v_),Qt(Uc),Qt(Ih,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(v_),Qt(Uc),Qt(Ih,8))},token:t,providedIn:"root"}),t})(),V_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})(),U_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[g_,y_,V_],g_,V_]}),t})(),j_=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[U_]]}),t})();const B_=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})(),H_={};class $_{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new W_(t,this.resultSelector))}}class W_ extends N{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(H_),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add(L(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,i,s){const r=this.values,o=this.toRespond?r[n]===H_?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function q_(t){return function(e){return 0===t?pg():e.lift(new G_(t))}}class G_{constructor(t){if(this.total=t,this.total<0)throw new cm}call(t,e){return e.subscribe(new Q_(t,this.total))}}class Q_ extends g{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let s=0;s<n;s++){const s=e++%n;t.next(i[s])}}t.complete()}}function K_(t=X_){return e=>e.lift(new Z_(t))}class Z_{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Y_(t,this.errorFactory))}}class Y_ extends g{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function X_(){return new B_}function J_(t=null){return e=>e.lift(new tv(t))}class tv{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new ev(t,this.defaultValue))}}class ev extends g{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function nv(t,e){const n=arguments.length>=2;return i=>i.pipe(t?Ig((e,n)=>t(e,n,i)):_,q_(1),n?J_(e):K_(()=>new B_))}function iv(t){return function(e){const n=new sv(t),i=e.lift(n);return n.caught=i}}class sv{constructor(t){this.selector=t}call(t,e){return e.subscribe(new rv(t,this.selector,this.caught))}}class rv extends N{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const i=new T(this,void 0,void 0);this.add(i);const s=L(this,n,void 0,void 0,i);s!==i&&this.add(s)}}}function ov(t,e){const n=arguments.length>=2;return i=>i.pipe(t?Ig((e,n)=>t(e,n,i)):_,hm(1),n?J_(e):K_(()=>new B_))}class av{constructor(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}call(t,e){return e.subscribe(new lv(t,this.predicate,this.thisArg,this.source))}}class lv extends g{constructor(t,e,n,i){super(t),this.predicate=e,this.thisArg=n,this.source=i,this.index=0,this.thisArg=n||this}notifyComplete(t){this.destination.next(t),this.destination.complete()}_next(t){let e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)}_complete(){this.notifyComplete(!0)}}function cv(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new hv(t,e,n))}}class hv{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new uv(t,this.accumulator,this.seed,this.hasSeed))}}class uv extends g{constructor(t,e,n,i){super(t),this.accumulator=e,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}function dv(){}function pv(t,e,n){return function(i){return i.lift(new gv(t,e,n))}}class gv{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new mv(t,this.nextOrObserver,this.error,this.complete))}}class mv extends g{constructor(t,e,n,s){super(t),this._tapNext=dv,this._tapError=dv,this._tapComplete=dv,this._tapError=n||dv,this._tapComplete=s||dv,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||dv,this._tapError=e.error||dv,this._tapComplete=e.complete||dv)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class fv{constructor(t,e){this.id=t,this.url=e}}class _v extends fv{constructor(t,e,n="imperative",i=null){super(t,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class vv extends fv{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class yv extends fv{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class bv extends fv{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class wv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Cv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Sv extends fv{constructor(t,e,n,i,s){super(t,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=s}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Iv extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ev extends fv{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class xv{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Pv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Tv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class kv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Mv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Dv{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Av{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Ov=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&Fo(0,"router-outlet")},directives:function(){return[Rb]},encapsulation:2}),t})();class Rv{constructor(t){this.params=t||{}}has(t){return this.params.hasOwnProperty(t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Lv(t){return new Rv(t)}function Nv(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function zv(t,e,n){const i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length<t.length))return null;const s={};for(let r=0;r<i.length;r++){const e=i[r],n=t[r];if(e.startsWith(":"))s[e.substring(1)]=n;else if(e!==n.path)return null}return{consumed:t.slice(0,i.length),posParams:s}}class Fv{constructor(t,e){this.routes=t,this.module=e}}function Vv(t,e=""){for(let n=0;n<t.length;n++){const i=t[n];Uv(i,jv(e,i))}}function Uv(t,e){if(!t)throw new Error(`\n Invalid configuration of route '${e}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(t))throw new Error(`Invalid configuration of route '${e}': Array cannot be specified`);if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error(`Invalid configuration of route '${e}': a componentless route without children or loadChildren cannot have a named outlet set`);if(t.redirectTo&&t.children)throw new Error(`Invalid configuration of route '${e}': redirectTo and children cannot be used together`);if(t.redirectTo&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': redirectTo and loadChildren cannot be used together`);if(t.children&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': children and loadChildren cannot be used together`);if(t.redirectTo&&t.component)throw new Error(`Invalid configuration of route '${e}': redirectTo and component cannot be used together`);if(t.path&&t.matcher)throw new Error(`Invalid configuration of route '${e}': path and matcher cannot be used together`);if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error(`Invalid configuration of route '${e}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===t.path&&void 0===t.matcher)throw new Error(`Invalid configuration of route '${e}': routes must have either a path or a matcher specified`);if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error(`Invalid configuration of route '${e}': path cannot start with a slash`);if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error(`Invalid configuration of route '{path: "${e}", redirectTo: "${t.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error(`Invalid configuration of route '${e}': pathMatch can only be set to 'prefix' or 'full'`);t.children&&Vv(t.children,e)}function jv(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:`${t}/${e.path}`:"":t}function Bv(t){const e=t.children&&t.children.map(Bv),n=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!n.component&&(e||n.loadChildren)&&n.outlet&&"primary"!==n.outlet&&(n.component=Ov),n}function Hv(t,e){const n=Object.keys(t),i=Object.keys(e);if(!n||!i||n.length!=i.length)return!1;let s;for(let r=0;r<n.length;r++)if(s=n[r],!$v(t[s],e[s]))return!1;return!0}function $v(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length==e.length&&t.every(t=>e.indexOf(t)>-1):t===e}function Wv(t){return Array.prototype.concat.apply([],t)}function qv(t){return t.length>0?t[t.length-1]:null}function Gv(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Qv(t){return Ho(t)?t:Bo(t)?j(Promise.resolve(t)):gg(t)}function Kv(t,e,n){return n?function(t,e){return Hv(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!Jv(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children){if(!e.children[i])return!1;if(!t(e.children[i],n.children[i]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>$v(t[n],e[n]))}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,i,s){if(n.segments.length>s.length)return!!Jv(n.segments.slice(0,s.length),s)&&!i.hasChildren();if(n.segments.length===s.length){if(!Jv(n.segments,s))return!1;for(const e in i.children){if(!n.children[e])return!1;if(!t(n.children[e],i.children[e]))return!1}return!0}{const t=s.slice(0,n.segments.length),r=s.slice(n.segments.length);return!!Jv(n.segments,t)&&!!n.children.primary&&e(n.children.primary,i,r)}}(e,n,n.segments)}(t.root,e.root)}class Zv{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Lv(this.queryParams)),this._queryParamMap}toString(){return iy.serialize(this)}}class Yv{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Gv(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return sy(this)}}class Xv{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Lv(this.parameters)),this._parameterMap}toString(){return hy(this)}}function Jv(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function ty(t,e){let n=[];return Gv(t.children,(t,i)=>{"primary"===i&&(n=n.concat(e(t,i)))}),Gv(t.children,(t,i)=>{"primary"!==i&&(n=n.concat(e(t,i)))}),n}class ey{}class ny{parse(t){const e=new my(t);return new Zv(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+function t(e,n){if(!e.hasChildren())return sy(e);if(n){const n=e.children.primary?t(e.children.primary,!1):"",i=[];return Gv(e.children,(e,n)=>{"primary"!==n&&i.push(`${n}:${t(e,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=ty(e,(n,i)=>"primary"===i?[t(e.children.primary,!1)]:[`${i}:${t(n,!1)}`]);return`${sy(e)}/(${n.join("//")})`}}(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${oy(e)}=${oy(t)}`).join("&"):`${oy(e)}=${oy(n)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const iy=new ny;function sy(t){return t.segments.map(t=>hy(t)).join("/")}function ry(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function oy(t){return ry(t).replace(/%3B/gi,";")}function ay(t){return ry(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ly(t){return decodeURIComponent(t)}function cy(t){return ly(t.replace(/\+/g,"%20"))}function hy(t){return`${ay(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${ay(t)}=${ay(e[t])}`).join("")}`;var e}const uy=/^[^\/()?;=#]+/;function dy(t){const e=t.match(uy);return e?e[0]:""}const py=/^[^=?&#]+/,gy=/^[^?&#]+/;class my{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Yv([],{}):new Yv([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Yv(t,e)),n}parseSegment(){const t=dy(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Xv(ly(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=dy(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=dy(this.remaining);t&&(n=t,this.capture(n))}t[ly(e)]=ly(n)}parseQueryParam(t){const e=function(t){const e=t.match(py);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(gy);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const i=cy(e),s=cy(n);if(t.hasOwnProperty(i)){let e=t[i];Array.isArray(e)||(e=[e],t[i]=e),e.push(s)}else t[i]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=dy(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let s=void 0;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s="primary");const r=this.parseChildren();e[s]=1===Object.keys(r).length?r.primary:new Yv([],r),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class fy{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=_y(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=_y(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=vy(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return vy(t,this._root).map(t=>t.value)}}function _y(t,e){if(t===e.value)return e;for(const n of e.children){const e=_y(t,n);if(e)return e}return null}function vy(t,e){if(t===e.value)return[e];for(const n of e.children){const i=vy(t,n);if(i.length)return i.unshift(e),i}return[]}class yy{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function by(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class wy extends fy{constructor(t,e){super(t),this.snapshot=e,Py(this,t)}toString(){return this.snapshot.toString()}}function Cy(t,e){const n=function(t,e){const n=new Ey([],{},{},"",{},"primary",e,null,t.root,-1,{});return new xy("",new yy(n,[]))}(t,e),i=new bg([new Xv("",{})]),s=new bg({}),r=new bg({}),o=new bg({}),a=new bg(""),l=new Sy(i,s,o,a,r,"primary",e,n.root);return l.snapshot=n.root,new wy(new yy(l,[]),n)}class Sy{constructor(t,e,n,i,s,r,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=r,this.component=o,this._futureSnapshot=a}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._paramMap=this.params.pipe(z(t=>Lv(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(z(t=>Lv(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Iy(t,e="emptyOnly"){const n=t.pathFromRoot;let i=0;if("always"!==e)for(i=n.length-1;i>=1;){const t=n[i],e=n[i-1];if(t.routeConfig&&""===t.routeConfig.path)i--;else{if(e.component)break;i--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Ey{constructor(t,e,n,i,s,r,o,a,l,c,h){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=r,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}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._paramMap=Lv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Lv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class xy extends fy{constructor(t,e){super(e),this.url=t,Py(this,e)}toString(){return Ty(this._root)}}function Py(t,e){e.value._routerState=t,e.children.forEach(e=>Py(t,e))}function Ty(t){const e=t.children.length>0?` { ${t.children.map(Ty).join(", ")} } `:"";return`${t.value}${e}`}function ky(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Hv(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Hv(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!Hv(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),Hv(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function My(t,e){var n,i;return Hv(t.params,e.params)&&Jv(n=t.url,i=e.url)&&n.every((t,e)=>Hv(t.parameters,i[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||My(t.parent,e.parent))}function Dy(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Ay(t,e,n,i,s){let r={};return i&&Gv(i,(t,e)=>{r[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new Zv(n.root===t?e:function t(e,n,i){const s={};return Gv(e.children,(e,r)=>{s[r]=e===n?i:t(e,n,i)}),new Yv(e.segments,s)}(n.root,t,e),r,s)}class Oy{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Dy(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(t=>"object"==typeof t&&null!=t&&t.outlets);if(i&&i!==qv(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ry{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function Ly(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function Ny(t,e,n){if(t||(t=new Yv([],{})),0===t.segments.length&&t.hasChildren())return zy(t,e,n);const i=function(t,e,n){let i=0,s=e;const r={match:!1,pathIndex:0,commandIndex:0};for(;s<t.segments.length;){if(i>=n.length)return r;const e=t.segments[s],o=Ly(n[i]),a=i<n.length-1?n[i+1]:null;if(s>0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!jy(o,a,e))return r;i+=2}else{if(!jy(o,{},e))return r;i++}s++}return{match:!0,pathIndex:s,commandIndex:i}}(t,e,n),s=n.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){const e=new Yv(t.segments.slice(0,i.pathIndex),{});return e.children.primary=new Yv(t.segments.slice(i.pathIndex),t.children),zy(e,0,s)}return i.match&&0===s.length?new Yv(t.segments,{}):i.match&&!t.hasChildren()?Fy(t,e,n):i.match?zy(t,0,s):Fy(t,e,n)}function zy(t,e,n){if(0===n.length)return new Yv(t.segments,{});{const i=function(t){return"object"!=typeof t[0]||void 0===t[0].outlets?{primary:t}:t[0].outlets}(n),s={};return Gv(i,(n,i)=>{null!==n&&(s[i]=Ny(t.children[i],e,n))}),Gv(t.children,(t,e)=>{void 0===i[e]&&(s[e]=t)}),new Yv(t.segments,s)}}function Fy(t,e,n){const i=t.segments.slice(0,e);let s=0;for(;s<n.length;){if("object"==typeof n[s]&&void 0!==n[s].outlets){const t=Vy(n[s].outlets);return new Yv(i,t)}if(0===s&&Dy(n[0])){i.push(new Xv(t.segments[e].path,n[0])),s++;continue}const r=Ly(n[s]),o=s<n.length-1?n[s+1]:null;r&&o&&Dy(o)?(i.push(new Xv(r,Uy(o))),s+=2):(i.push(new Xv(r,{})),s++)}return new Yv(i,{})}function Vy(t){const e={};return Gv(t,(t,n)=>{null!==t&&(e[n]=Fy(new Yv([],{}),0,t))}),e}function Uy(t){const e={};return Gv(t,(t,n)=>e[n]=""+t),e}function jy(t,e,n){return t==n.path&&Hv(e,n.parameters)}class By{constructor(t,e,n,i){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=i}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),ky(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const i=by(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,i[e],n),delete i[e]}),Gv(i,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const i=t.value,s=e?e.value:null;if(i===s)if(i.component){const s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else s&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:i})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const i=by(t),s=t.value.component?n.children:e;Gv(i,(t,e)=>this.deactivateRouteAndItsChildren(t,s)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const i=by(e);t.children.forEach(t=>{this.activateRoutes(t,i[t.value.outlet],n),this.forwardEvent(new Dv(t.value.snapshot))}),t.children.length&&this.forwardEvent(new kv(t.value.snapshot))}activateRoutes(t,e,n){const i=t.value,s=e?e.value:null;if(ky(i),i===s)if(i.component){const s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(i.component){const e=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const t=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),Hy(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),s=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=i,e.resolver=s,e.outlet&&e.outlet.activateWith(i,s),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function Hy(t){ky(t.value),t.children.forEach(Hy)}function $y(t){return"function"==typeof t}function Wy(t){return t instanceof Zv}class qy{constructor(t){this.segmentGroup=t||null}}class Gy{constructor(t){this.urlTree=t}}function Qy(t){return new b(e=>e.error(new qy(t)))}function Ky(t){return new b(e=>e.error(new Gy(t)))}function Zy(t){return new b(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Yy{constructor(t,e,n,i,s){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(Jt)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(z(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(iv(t=>{if(t instanceof Gy)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof qy)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(z(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(iv(t=>{if(t instanceof qy)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const i=t.segments.length>0?new Yv([],{primary:t}):t;return new Zv(i,e,n)}expandSegmentGroup(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(z(t=>new Yv([],t))):this.expandSegment(t,n,e,n.segments,i,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return gg({});const n=[],i=[],s={};return Gv(t,(t,r)=>{const o=e(r,t).pipe(z(t=>s[r]=t));"primary"===r?n.push(o):i.push(o)}),gg.apply(null,n.concat(i)).pipe(om(),nv(),z(()=>s))}(n.children,(n,i)=>this.expandSegmentGroup(t,e,i,n))}expandSegment(t,e,n,i,s,r){return gg(...n).pipe(z(o=>this.expandSegmentAgainstRoute(t,e,n,o,i,s,r).pipe(iv(t=>{if(t instanceof qy)return gg(null);throw t}))),om(),ov(t=>!!t),iv((t,n)=>{if(t instanceof B_||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,i,s))return gg(new Yv([],{}));throw new qy(e)}throw t}))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,i,s,r,o){return eb(i)!==r?Qy(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r):Qy(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,r):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,i){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Ky(s):this.lineralizeSegments(n,s).pipe(B(n=>{const s=new Yv(n,{});return this.expandSegment(t,s,e,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,s,r){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Xy(e,i,s);if(!o)return Qy(e);const h=this.applyRedirectCommands(a,i.redirectTo,c);return i.redirectTo.startsWith("/")?Ky(h):this.lineralizeSegments(i,h).pipe(B(i=>this.expandSegment(t,e,n,i.concat(s.slice(l)),r,!1)))}matchSegmentAgainstRoute(t,e,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(z(t=>(n._loadedConfig=t,new Yv(i,{})))):gg(new Yv(i,{}));const{matched:s,consumedSegments:r,lastChild:o}=Xy(e,n,i);if(!s)return Qy(e);const a=i.slice(o);return this.getChildConfig(t,n,i).pipe(B(t=>{const n=t.module,i=t.routes,{segmentGroup:s,slicedSegments:o}=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some(n=>tb(t,e,n)&&"primary"!==eb(n))}(t,n,i)?{segmentGroup:Jy(new Yv(e,function(t,e){const n={};n.primary=e;for(const i of t)""===i.path&&"primary"!==eb(i)&&(n[eb(i)]=new Yv([],{}));return n}(i,new Yv(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>tb(t,e,n))}(t,n,i)?{segmentGroup:Jy(new Yv(t.segments,function(t,e,n,i){const s={};for(const r of n)tb(t,e,r)&&!i[eb(r)]&&(s[eb(r)]=new Yv([],{}));return Object.assign(Object.assign({},i),s)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,r,a,i);return 0===o.length&&s.hasChildren()?this.expandChildren(n,i,s).pipe(z(t=>new Yv(r,t))):0===i.length&&0===o.length?gg(new Yv(r,{})):this.expandSegment(n,s,i,o,"primary",!0).pipe(z(t=>new Yv(r.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?gg(new Fv(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?gg(e._loadedConfig):function(t,e,n){const i=e.canLoad;return i&&0!==i.length?j(i).pipe(z(i=>{const s=t.get(i);let r;if(function(t){return t&&$y(t.canLoad)}(s))r=s.canLoad(e,n);else{if(!$y(s))throw new Error("Invalid CanLoad guard");r=s(e,n)}return Qv(r)})).pipe(om(),(s=t=>!0===t,t=>t.lift(new av(s,void 0,t)))):gg(!0);var s}(t.injector,e,n).pipe(B(n=>n?this.configLoader.load(t.injector,e).pipe(z(t=>(e._loadedConfig=t,t))):function(t){return new b(e=>e.error(Nv(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):gg(new Fv([],t))}lineralizeSegments(t,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return gg(n);if(i.numberOfChildren>1||!i.children.primary)return Zy(t.redirectTo);i=i.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,i){const s=this.createSegmentGroup(t,e.root,n,i);return new Zv(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return Gv(t,(t,i)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[i]=e[s]}else n[i]=t}),n}createSegmentGroup(t,e,n,i){const s=this.createSegments(t,e.segments,n,i);let r={};return Gv(e.children,(e,s)=>{r[s]=this.createSegmentGroup(t,e,n,i)}),new Yv(s,r)}createSegments(t,e,n,i){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,i):this.findOrReturn(e,n))}findPosParam(t,e,n){const i=n[e.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return i}findOrReturn(t,e){let n=0;for(const i of e){if(i.path===t.path)return e.splice(n),i;n++}return t}}function Xy(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(e.matcher||zv)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Jy(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new Yv(t.segments.concat(e.segments),e.children)}return t}function tb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function eb(t){return t.outlet||"primary"}class nb{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class ib{constructor(t,e){this.component=t,this.route=e}}function sb(t,e,n){const i=t._root;return function t(e,n,i,s,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=by(n);return e.children.forEach(e=>{!function(e,n,i,s,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,a=n?n.value:null,l=i?i.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const c=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Jv(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Jv(t.url,e.url)||!Hv(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!My(t,e)||!Hv(t.queryParams,e.queryParams);case"paramsChange":default:return!My(t,e)}}(a,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new nb(s)):(o.data=a.data,o._resolvedData=a._resolvedData),t(e,n,o.component?l?l.children:null:i,s,r),c&&r.canDeactivateChecks.push(new ib(l&&l.outlet&&l.outlet.component||null,a))}else a&&ob(n,l,r),r.canActivateChecks.push(new nb(s)),t(e,null,o.component?l?l.children:null:i,s,r)}(e,o[e.value.outlet],i,s.concat([e.value]),r),delete o[e.value.outlet]}),Gv(o,(t,e)=>ob(t,i.getContext(e),r)),r}(i,e?e._root:null,n,[i.value])}function rb(t,e,n){const i=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function ob(t,e,n){const i=by(t),s=t.value;Gv(i,(t,i)=>{ob(t,s.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new ib(s.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,s))}const ab=Symbol("INITIAL_VALUE");function lb(){return gm(t=>function(...t){let e=null,n=null;return P(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),q(t,n).lift(new $_(e))}(...t.map(t=>t.pipe(hm(1),R_(ab)))).pipe(cv((t,e)=>{let n=!1;return e.reduce((t,i,s)=>{if(t!==ab)return t;if(i===ab&&(n=!0),!n){if(!1===i)return i;if(s===e.length-1||Wy(i))return i}return t},t)},ab),Ig(t=>t!==ab),z(t=>Wy(t)?t:!0===t),hm(1)))}function cb(t,e){return null!==t&&e&&e(new Mv(t)),gg(!0)}function hb(t,e){return null!==t&&e&&e(new Tv(t)),gg(!0)}function ub(t,e,n){const i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?gg(i.map(i=>lm(()=>{const s=rb(i,e,n);let r;if(function(t){return t&&$y(t.canActivate)}(s))r=Qv(s.canActivate(e,t));else{if(!$y(s))throw new Error("Invalid CanActivate guard");r=Qv(s(e,t))}return r.pipe(ov())}))).pipe(lb()):gg(!0)}function db(t,e,n){const i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>lm(()=>gg(e.guards.map(s=>{const r=rb(s,e.node,n);let o;if(function(t){return t&&$y(t.canActivateChild)}(r))o=Qv(r.canActivateChild(i,t));else{if(!$y(r))throw new Error("Invalid CanActivateChild guard");o=Qv(r(i,t))}return o.pipe(ov())})).pipe(lb())));return gg(s).pipe(lb())}class pb{}class gb{constructor(t,e,n,i,s,r){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=r}recognize(){try{const t=_b(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new Ey([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new yy(n,e),s=new xy(this.url,i);return this.inheritParamsAndData(s._root),gg(s)}catch(t){return new b(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=Iy(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=ty(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),i=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${i}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,i){for(const r of t)try{return this.processSegmentAgainstRoute(r,e,n,i)}catch(s){if(!(s instanceof pb))throw s}if(this.noLeftoversInUrl(e,n,i))return[];throw new pb}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,i){if(t.redirectTo)throw new pb;if((t.outlet||"primary")!==i)throw new pb;let s,r=[],o=[];if("**"===t.path){const r=n.length>0?qv(n).parameters:{};s=new Ey(n,r,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,bb(t),i,t.component,t,mb(e),fb(e)+n.length,wb(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new pb;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(e.matcher||zv)(n,t,e);if(!i)throw new pb;const s={};Gv(i.posParams,(t,e)=>{s[e]=t.path});const r=i.consumed.length>0?Object.assign(Object.assign({},s),i.consumed[i.consumed.length-1].parameters):s;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:r}}(e,t,n);r=a.consumedSegments,o=n.slice(a.lastChild),s=new Ey(r,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,bb(t),i,t.component,t,mb(e),fb(e)+r.length,wb(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=_b(e,r,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new yy(s,t)]}if(0===a.length&&0===c.length)return[new yy(s,[])];const h=this.processSegment(a,l,c,"primary");return[new yy(s,h)]}}function mb(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function fb(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function _b(t,e,n,i,s){if(n.length>0&&function(t,e,n){return n.some(n=>vb(t,e,n)&&"primary"!==yb(n))}(t,n,i)){const s=new Yv(e,function(t,e,n,i){const s={};s.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;for(const r of n)if(""===r.path&&"primary"!==yb(r)){const n=new Yv([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,s[yb(r)]=n}return s}(t,e,i,new Yv(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>vb(t,e,n))}(t,n,i)){const r=new Yv(t.segments,function(t,e,n,i,s,r){const o={};for(const a of i)if(vb(t,n,a)&&!s[yb(a)]){const n=new Yv([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===r?t.segments.length:e.length,o[yb(a)]=n}return Object.assign(Object.assign({},s),o)}(t,e,n,i,t.children,s));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}const r=new Yv(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}function vb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function yb(t){return t.outlet||"primary"}function bb(t){return t.data||{}}function wb(t){return t.resolve||{}}function Cb(t,e,n,i){const s=rb(t,e,i);return Qv(s.resolve?s.resolve(e,n):s(e,n))}function Sb(t){return function(e){return e.pipe(gm(e=>{const n=t(e);return n?j(n).pipe(z(()=>e)):j([e])}))}}class Ib{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}const Eb=new Ft("ROUTES");class xb{constructor(t,e,n,i){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=i}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(z(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const i=n.create(t);return new Fv(Wv(i.injector.get(Eb)).map(Bv),i)}))}loadModuleFactory(t){return"string"==typeof t?j(this.loader.load(t)):Qv(t()).pipe(B(t=>t instanceof te?gg(t):j(this.compiler.compileModuleAsync(t))))}}class Pb{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function Tb(t){throw t}function kb(t,e,n){return e.parse("/")}function Mb(t,e){return gg(null)}let Db=(()=>{class t{constructor(t,e,n,i,s,r,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=i,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new E,this.errorHandler=Tb,this.malformedUriErrorHandler=kb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Mb,afterPreactivation:Mb},this.urlHandlingStrategy=new Pb,this.routeReuseStrategy=new Ib,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(Jt),this.console=s.get(xc);const l=s.get(Uc);this.isNgZoneEnabled=l instanceof Uc,this.resetConfig(a),this.currentUrlTree=new Zv(new Yv([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new xb(r,o,t=>this.triggerEvent(new xv(t)),t=>this.triggerEvent(new Pv(t))),this.routerState=Cy(this.currentUrlTree,this.rootComponentType),this.transitions=new bg({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(Ig(t=>0!==t.id),z(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),gm(t=>{let n=!1,i=!1;return gg(t).pipe(pv(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),gm(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return gg(t).pipe(gm(t=>{const n=this.transitions.getValue();return e.next(new _v(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?dg:[t]}),gm(t=>Promise.resolve(t)),(i=this.ngModule.injector,s=this.configLoader,r=this.urlSerializer,o=this.config,function(t){return t.pipe(gm(t=>function(t,e,n,i,s){return new Yy(t,e,n,i,s).apply()}(i,s,r,t.extractedUrl,o).pipe(z(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),pv(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,i,s){return function(r){return r.pipe(B(r=>function(t,e,n,i,s="emptyOnly",r="legacy"){return new gb(t,e,n,i,s,r).recognize()}(t,e,r.urlAfterRedirects,n(r.urlAfterRedirects),i,s).pipe(z(t=>Object.assign(Object.assign({},r),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),pv(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),pv(t=>{const n=new wv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var i,s,r,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:s,restoredState:r,extras:o}=t,a=new _v(n,this.serializeUrl(i),s,r);e.next(a);const l=Cy(i,this.rootComponentType).snapshot;return gg(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),dg}),Sb(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:s,extras:{skipLocationChange:r,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:s,skipLocationChange:!!r,replaceUrl:!!o})}),pv(t=>{const e=new Cv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),z(t=>Object.assign(Object.assign({},t),{guards:sb(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(B(n=>{const{targetSnapshot:i,currentSnapshot:s,guards:{canActivateChecks:r,canDeactivateChecks:o}}=n;return 0===o.length&&0===r.length?gg(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return j(t).pipe(B(t=>function(t,e,n,i,s){const r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return r&&0!==r.length?gg(r.map(r=>{const o=rb(r,e,s);let a;if(function(t){return t&&$y(t.canDeactivate)}(o))a=Qv(o.canDeactivate(t,e,n,i));else{if(!$y(o))throw new Error("Invalid CanDeactivate guard");a=Qv(o(t,e,n,i))}return a.pipe(ov())})).pipe(lb()):gg(!0)}(t.component,t.route,n,e,i)),ov(t=>!0!==t,!0))}(o,i,s,t).pipe(B(n=>n&&"boolean"==typeof n?function(t,e,n,i){return j(e).pipe(Sg(e=>j([hb(e.route.parent,i),cb(e.route,i),db(t,e.path,n),ub(t,e.route,n)]).pipe(om(),ov(t=>!0!==t,!0))),ov(t=>!0!==t,!0))}(i,r,t,e):gg(n)),z(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),pv(t=>{if(Wy(t.guardsResult)){const e=Nv(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),pv(t=>{const e=new Sv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Ig(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new yv(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),Sb(t=>{if(t.guards.canActivateChecks.length)return gg(t).pipe(pv(t=>{const e=new Iv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),(e=this.paramsInheritanceStrategy,n=this.ngModule.injector,function(t){return t.pipe(B(t=>{const{targetSnapshot:i,guards:{canActivateChecks:s}}=t;return s.length?j(s).pipe(Sg(t=>function(t,e,n,i){return function(t,e,n,i){const s=Object.keys(t);if(0===s.length)return gg({});if(1===s.length){const r=s[0];return Cb(t[r],e,n,i).pipe(z(t=>({[r]:t})))}const r={};return j(s).pipe(B(s=>Cb(t[s],e,n,i).pipe(z(t=>(r[s]=t,t))))).pipe(nv(),z(()=>r))}(t._resolve,t,e,i).pipe(z(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Iy(t,n).resolve),null)))}(t.route,i,e,n)),function(t,e){return arguments.length>=2?function(n){return v(cv(t,e),q_(1),J_(e))(n)}:function(e){return v(cv((e,n,i)=>t(e,n,i+1)),q_(1))(e)}}((t,e)=>t),z(e=>t)):gg(t)}))}),pv(t=>{const e=new Ev(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}));var e,n}),Sb(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:s,extras:{skipLocationChange:r,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:s,skipLocationChange:!!r,replaceUrl:!!o})}),z(t=>{const e=function(t,e,n){const i=function t(e,n,i){if(i&&e.shouldReuseRoute(n.value,i.value.snapshot)){const s=i.value;s._futureSnapshot=n.value;const r=function(e,n,i){return n.children.map(n=>{for(const s of i.children)if(e.shouldReuseRoute(s.value.snapshot,n.value))return t(e,n,s);return t(e,n)})}(e,n,i);return new yy(s,r)}{const i=e.retrieve(n.value);if(i){const t=i.route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(let i=0;i<e.children.length;++i)t(e.children[i],n.children[i])}(n,t),t}{const i=new Sy(new bg((s=n.value).url),new bg(s.params),new bg(s.queryParams),new bg(s.fragment),new bg(s.data),s.outlet,s.component,s),r=n.children.map(n=>t(e,n));return new yy(i,r)}}var s}(t,e._root,n?n._root:void 0);return new wy(i,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),pv(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(s=this.rootContexts,r=this.routeReuseStrategy,o=t=>this.triggerEvent(t),z(t=>(new By(r,t.targetRouterState,t.currentRouterState,o).activate(s),t))),pv({next(){n=!0},complete(){n=!0}}),n_(()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new yv(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null}),iv(n=>{if(i=!0,(s=n)&&s.ngNavigationCancelingError){const i=Wy(n.url);i||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new yv(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),i?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const i=new bv(t.id,this.serializeUrl(t.extractedUrl),n);e.next(i);try{t.resolve(this.errorHandler(n))}catch(r){t.reject(r)}}var s;return dg}));var s,r,o}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{let e=this.parseUrl(t.url);const n="popstate"===t.type?"popstate":"hashchange",i=t.state&&t.state.navigationId?t.state:null;setTimeout(()=>{this.scheduleNavigation(e,n,i,{replaceUrl:!0})},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Vv(t),this.config=t.map(Bv),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:i,fragment:s,preserveQueryParams:r,queryParamsHandling:o,preserveFragment:a}=e;Ii()&&r&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,c=a?this.currentUrlTree.fragment:s;let h=null;if(o)switch(o){case"merge":h=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=i||null}else h=r?this.currentUrlTree.queryParams:i||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,n,i,s){if(0===n.length)return Ay(e.root,e.root,e,i,s);const r=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Oy(!0,0,t);let e=0,n=!1;const i=t.reduce((t,i,s)=>{if("object"==typeof i&&null!=i){if(i.outlets){const e={};return Gv(i.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(i.segmentPath)return[...t,i.segmentPath]}return"string"!=typeof i?[...t,i]:0===s?(i.split("/").forEach((i,s)=>{0==s&&"."===i||(0==s&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))}),t):[...t,i]},[]);return new Oy(n,e,i)}(n);if(r.toRoot())return Ay(e.root,new Yv([],{}),e,i,s);const o=function(t,e,n){if(t.isAbsolute)return new Ry(e.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new Ry(n.snapshot._urlSegment,!0,0);const i=Dy(t.commands[0])?0:1;return function(t,e,n){let i=t,s=e,r=n;for(;r>s;){if(r-=s,i=i.parent,!i)throw new Error("Invalid number of '../'");s=i.segments.length}return new Ry(i,!1,s-r)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(r,e,t),a=o.processChildren?zy(o.segmentGroup,o.index,r.commands):Ny(o.segmentGroup,o.index,r.commands);return Ay(o.segmentGroup,a,e,i,s)}(l,this.currentUrlTree,t,h,c)}navigateByUrl(t,e={skipLocationChange:!1}){Ii()&&this.isNgZoneEnabled&&!Uc.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=Wy(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const n=t[e];if(null==n)throw new Error(`The requested path contains ${n} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}isActive(t,e){if(Wy(t))return Kv(this.currentUrlTree,t,e);const n=this.parseUrl(t);return Kv(this.currentUrlTree,n,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return null!=i&&(e[n]=i),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new vv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,i,s){const r=this.getTransition();if(r&&"imperative"!==e&&"imperative"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"hashchange"==e&&"popstate"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"popstate"==e&&"hashchange"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);let o,a,l;s?(o=s.resolve,a=s.reject,l=s.promise):l=new Promise((t,e)=>{o=t,a=e});const c=++this.navigationId;return this.setTransition({id:c,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:o,reject:a,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,i){const s=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(t){Oo()},t.\u0275dir=ye({type:t}),t})();class Ab{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ob,this.attachRef=null}}class Ob{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Ab,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}let Rb=(()=>{class t{constructor(t,e,n,i,s){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Yl,this.deactivateEvents=new Yl,this.name=i||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,s=new Lb(t,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ob),Ao(yl),Ao(qa),("name",function(t,e){const n=t.attrs;if(n){const t=n.length;let e=0;for(;e<t;){const i=n[e];if(Dn(i))break;if(0===i)e+=2;else if("number"==typeof i)for(e++;e<t&&"string"==typeof n[e];)e++;else{if("name"===i)return n[e+1];e+=2}}}return null}(Xe())),Ao(Qr))},t.\u0275dir=ye({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class Lb{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===Sy?this.route:t===Ob?this.childContexts:this.parent.get(t,e)}}class Nb{}class zb{preload(t,e){return gg(null)}}let Fb=(()=>{class t{constructor(t,e,n,i,s){this.router=t,this.injector=i,this.preloadingStrategy=s,this.loader=new xb(e,n,e=>t.triggerEvent(new xv(e)),e=>t.triggerEvent(new Pv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Ig(t=>t instanceof vv),Sg(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Jt);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const i of e)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const t=i._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(t,i)):i.children&&n.push(this.processRoutes(t,i.children));return j(n).pipe(W(),z(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(B(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(Qt(Db),Qt(lh),Qt(Nc),Qt(ho),Qt(Nb))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Vb=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof _v?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof vv&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Av&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new Av(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(t){Oo()},t.\u0275dir=ye({type:t}),t})();const Ub=new Ft("ROUTER_CONFIGURATION"),jb=new Ft("ROUTER_FORROOT_GUARD"),Bb=[Vh,{provide:ey,useClass:ny},{provide:Db,useFactory:function(t,e,n,i,s,r,o,a={},l,c){const h=new Db(null,t,e,n,i,s,r,Wv(o));if(l&&(h.urlHandlingStrategy=l),c&&(h.routeReuseStrategy=c),a.errorHandler&&(h.errorHandler=a.errorHandler),a.malformedUriErrorHandler&&(h.malformedUriErrorHandler=a.malformedUriErrorHandler),a.enableTracing){const t=Sh();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return a.onSameUrlNavigation&&(h.onSameUrlNavigation=a.onSameUrlNavigation),a.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=a.paramsInheritanceStrategy),a.urlUpdateStrategy&&(h.urlUpdateStrategy=a.urlUpdateStrategy),a.relativeLinkResolution&&(h.relativeLinkResolution=a.relativeLinkResolution),h},deps:[ey,Ob,Vh,ho,lh,Nc,Eb,Ub,[class{},new st],[class{},new st]]},Ob,{provide:Sy,useFactory:function(t){return t.routerState.root},deps:[Db]},{provide:lh,useClass:uh},Fb,zb,class{preload(t,e){return e().pipe(iv(()=>gg(null)))}},{provide:Ub,useValue:{enableTracing:!1}}];function Hb(){return new eh("Router",Db)}let $b=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Bb,Qb(e),{provide:jb,useFactory:Gb,deps:[[Db,new st,new ot]]},{provide:Ub,useValue:n||{}},{provide:Rh,useFactory:qb,deps:[Eh,[new it(Nh),new st],Ub]},{provide:Vb,useFactory:Wb,deps:[Db,su,Ub]},{provide:Nb,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:zb},{provide:eh,multi:!0,useFactory:Hb},[Kb,{provide:vc,multi:!0,useFactory:Zb,deps:[Kb]},{provide:Xb,useFactory:Yb,deps:[Kb]},{provide:Ec,multi:!0,useExisting:Xb}]]}}static forChild(e){return{ngModule:t,providers:[Qb(e)]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)(Qt(jb,8),Qt(Db,8))}}),t})();function Wb(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Vb(t,e,n)}function qb(t,e,n={}){return n.useHash?new Fh(t,e):new zh(t,e)}function Gb(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Qb(t){return[{provide:uo,multi:!0,useValue:t},{provide:Eb,multi:!0,useValue:t}]}let Kb=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new E}appInitializer(){return this.injector.get(Ph,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(Db),i=this.injector.get(Ub);if(this.isLegacyDisabled(i)||this.isLegacyEnabled(i))t(!0);else if("disabled"===i.initialNavigation)n.setUpLocationChangeListener(),t(!0);else{if("enabled"!==i.initialNavigation)throw new Error(`Invalid initialNavigation options: '${i.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?gg(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()}return e})}bootstrapListener(t){const e=this.injector.get(Ub),n=this.injector.get(Fb),i=this.injector.get(Vb),s=this.injector.get(Db),r=this.injector.get(oh);t===r.components[0]&&(this.isLegacyEnabled(e)?s.initialNavigation():this.isLegacyDisabled(e)&&s.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),s.resetRootComponentType(r.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}isLegacyDisabled(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}return t.\u0275fac=function(e){return new(e||t)(Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();function Zb(t){return t.appInitializer.bind(t)}function Yb(t){return t.bootstrapListener.bind(t)}const Xb=new Ft("Router Initializer");function Jb(t,e){if(1&t&&(No(0,"span",4),Fo(1,"i"),zo()),2&t){const t=Go();ws(1),la(t.config.icon)}}const tw=function(t){return{"is-active":t}},ew=["componentSection"],nw=["okButton"],iw=["cancelButton"],sw=["backdropButton"],rw=["header"],ow=["footer"];function aw(t,e){if(1&t){const t=jo();No(0,"button",13,14),$o("click",(function(){return Ye(t),Go(2).backdropHandler()})),zo()}}function lw(t,e){if(1&t&&(No(0,"header",9,10),No(2,"p",11),ba(3),zo(),Mo(4,aw,2,0,"button",12),zo()),2&t){const t=Go();ws(3),wa(t.config.title),ws(1),Ro("ngIf",t.config.hasBackdrop)}}function cw(t,e){1&t&&(No(0,"section",15),Fo(1,"nwb-spinner"),zo())}function hw(t,e){1&t&&Fo(0,"section",16),2&t&&Ro("innerHTML",Go().config.message,Yi)}function uw(t,e){if(1&t){const t=jo();No(0,"button",21,22),$o("click",(function(){return Ye(t),Go(2).cancelHandler()})),ba(2),zo()}if(2&t){const t=Go(2);ws(2),Ca("",t.config.cancelButtonText," ")}}function dw(t,e){if(1&t){const t=jo();No(0,"button",23,24),$o("click",(function(){return Ye(t),Go(2).okHandler()})),ba(2),zo()}if(2&t){const t=Go(2);ws(2),Ca("",t.config.okButtonText," ")}}function pw(t,e){if(1&t&&(No(0,"footer",17,18),Mo(2,uw,3,1,"button",19),Mo(3,dw,3,1,"button",20),zo()),2&t){const t=Go();ws(2),Ro("ngIf",t.config.cancelButtonText),ws(1),Ro("ngIf",t.config.okButtonText)}}const gw=function(t){return{width:t}},mw=function(t){return{"is-hidden":t}},fw=["inputSearch"];function _w(t,e){1&t&&Fo(0,"header",14,15)}const vw=function(t,e,n,i){return{selected:t,"not-selectable":e,"is-child":n,"is-parent":i}};function yw(t,e){if(1&t){const t=jo();No(0,"a",18),$o("mousemove",(function(){return Ye(t),Go(2).mouseMove()}))("mouseover",(function(){Ye(t);const n=e.index;return Go(2).mouseOver(n)}))("click",(function(){return Ye(t),Go(2).selectValue()})),Fo(1,"div",19),zo()}if(2&t){const t=e.$implicit,n=e.index,i=Go(2);Ro("ngClass",Ul(3,vw,t.isSelectable&&n===i.selectedFoundRow,!t.isSelectable,t.isChild,t.isParent))("tabindex",n),ws(1),Ro("innerHTML",t.text,Yi)}}function bw(t,e){if(1&t&&(No(0,"div",16),Mo(1,yw,2,8,"a",17),zo()),2&t){const t=Go();ws(1),Ro("ngForOf",t.foundRows)}}function ww(t,e){1&t&&Fo(0,"nwb-spinner")}function Cw(t,e){1&t&&Fo(0,"footer",20,21)}const Sw=function(t,e){return{"has-no-header":t,"has-no-footer":e}};function Iw(t,e){if(1&t){const t=jo();No(0,"div",3),No(1,"button",4),$o("click",(function(){return Ye(t),Go().dismiss(!0)})),ba(2),zo(),zo()}if(2&t){const t=Go();ws(1),la("button "+(t.config.buttonColor?t.config.buttonColor:"is-success")),ws(1),Ca("",t.config.action," ")}}const Ew=function(t){return{"is-half":t}};let xw=(()=>{class t{constructor(){this.availableColors=["#a2c739","#dbdbdb","#00d1b2","#4baed0"]}ngOnInit(){this.color||(this.color=this.availableColors[Math.floor(Math.random()*this.availableColors.length)])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-spinner"]],hostAttrs:[1,"nwb-spinner"],inputs:{color:"color"},decls:1,vars:2,consts:[[1,"is-spinning"]],template:function(t,e){1&t&&Fo(0,"div",0),2&t&&oa("border-color",e.color)},encapsulation:2}),t})(),Pw=(()=>{class t{constructor(t){this.el=t,this.el.nativeElement.classList.add("tooltip")}set nwbToolTip(t){this.el.nativeElement.setAttribute("data-tooltip",t)}set nwbToolTipPosition(t){this.el.nativeElement.classList.remove("is-tooltip-top"),this.el.nativeElement.classList.remove("is-tooltip-left"),this.el.nativeElement.classList.remove("is-tooltip-right"),this.el.nativeElement.classList.remove("is-tooltip-bottom"),this.el.nativeElement.classList.add("is-tooltip-"+t)}set nwbToolTipIsMultiline(t){t?this.el.nativeElement.classList.add("is-tooltip-multiline"):this.el.nativeElement.classList.remove("is-tooltip-multiline")}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","nwbToolTip",""]],inputs:{nwbToolTip:"nwbToolTip",nwbToolTipPosition:"nwbToolTipPosition",nwbToolTipIsMultiline:"nwbToolTipIsMultiline"}}),t})();class Tw{constructor(t,e){this.name=t,this.valuesChange$=new E,this.group=new Map,Object.keys(e).forEach(t=>{const n=e[t],i=new kw(t,n,n);this.group.set(t,i)})}set(t,e){this._valueChange(t,e)&&this.emitChange()}get(t){if(!this.group.has(t))throw new Error(`FilterGroup: They key ${t} doesn't exist`);return this.group.get(t).value}setValues(t){let e=!1;Object.keys(t).forEach(n=>{this._valueChange(n,t[n])&&(e=!0)}),e&&this.emitChange()}_valueChange(t,e){if(!this.group.has(t))throw new Error(`FilterGroup: They key ${t} doesn't exist`);return"string"==typeof e&&(e=e.trim()),this.group.get(t).value!=e&&(this.group.get(t).value=e,!0)}emitChange(){const t=[];this.group.forEach(e=>t.push(e)),this.valuesChange$.next(t)}getFilters(){const t=[];return this.group.forEach(e=>t.push(e)),t}}class kw{constructor(t,e,n){this.key=t,this.defaultValue=e,this.value=n}isDefaultValue(){return this.defaultValue===this.value}}let Mw=(()=>{class t{constructor(t,e){this.router=t,this.route=e,this.groupCounter=0,this.filterGroups=new Map,this.route.queryParams.subscribe(t=>{this.queryParamsChange(t)})}queryParamsChange(t){const e=new Map;Object.keys(t).forEach(n=>{const i=this.getParsedKey(n),s=e.has(i.filterGroupName)?e.get(i.filterGroupName):{};s[i.filterKey]=t[n],e.set(i.filterGroupName,s)}),this.filterGroups.forEach(t=>{const n={};t.getFilters().forEach(t=>{n[t.key]=t.defaultValue});const i=e.has(t.name)?e.get(t.name):{};t.setValues(Object.assign(n,i))})}group(t,e){e||(e="fg_"+this.groupCounter++);const n=new Tw(e,t);return this.filterGroups.set(n.name,n),n.valuesChange$.subscribe(t=>{this.updateRouting(n.name,t)}),this.route.queryParams.subscribe(t=>{this.queryParamsChange(t)}).unsubscribe(),n}addFilterGroupNameToQueryParamKey(t,e){return t+":"+e}getParsedKey(t){const e=t.split(":");return{filterGroupName:e[0],filterKey:e[1]}}updateRouting(t,e){this.route.queryParamMap.subscribe(n=>{const i={};n.keys.forEach(t=>{i[t]=n.get(t)});const s=Object.assign({},i);e.forEach(e=>{const n=this.addFilterGroupNameToQueryParamKey(t,e.key);if(e.isDefaultValue())s.hasOwnProperty(n)&&delete s[n];else{let t=e.value;t instanceof Date&&(t=t.toISOString()),s[n]=t}}),this.router.navigate([],{queryParams:s,relativeTo:this.route})}).unsubscribe()}remove(t){this.filterGroups.has(t.name)&&this.filterGroups.delete(t.name)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Db),Qt(Sy))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Dw=(()=>{class t{getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=document.createElement("div");t.classList.add("nwb-overlay-container"),document.body.appendChild(t),this._containerElement=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Aw={provide:Dw,deps:[[new st,new ot,Dw]],useFactory:function(t){return t||new Dw}};let Ow=(()=>{class t{constructor(t,e,n,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=n,this.overlayContainer=i}attachComponentPortal(t,e){const n=this.componentFactoryResolver.resolveComponentFactory(t).create(e||this.injector);return this.appRef.attachView(n.hostView),this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}return t.\u0275fac=function(e){return new(e||t)(Qt(qa),Qt(oh),Qt(ho),Qt(Dw))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();const Rw={provide:Ow,deps:[[new st,new ot,Ow],qa,oh,ho,Dw],useFactory:function(t,e,n,i,s){return t||new Ow(e,n,i,s)}};let Lw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Aw,Rw,Mw],imports:[[nu,Jf]]}),t})(),Nw=(()=>{class t{constructor(){this._afterClosed=new E,this.open=!1}ngOnInit(){setTimeout(()=>{this.open=!0},50),this.config.duration>0&&(this.timer=setTimeout(()=>this.dismiss(),this.config.duration))}dismiss(){this.open=!1,setTimeout(()=>{this._afterClosed.next(!0),this._afterClosed.complete()},200)}afterClosed(){return this._afterClosed.asObservable()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-alert"]],hostAttrs:[1,"nwb-alert"],decls:4,vars:7,consts:[[3,"ngClass"],[1,"alert--message"],["class","icon",4,"ngIf"],[3,"innerHTML"],[1,"icon"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),Mo(2,Jb,2,2,"span",2),Fo(3,"p",3),zo(),zo()),2&t&&(la("alert "+(e.config.color?e.config.color:" is-primary")+(e.config.extraClasses?" "+e.config.extraClasses:"")+(e.config.position?" "+e.config.position:"")),Ro("ngClass",zl(5,tw,e.open)),ws(2),Ro("ngIf",e.config.icon),ws(1),Ro("innerHTML",e.config.message,Yi))},directives:[qh,Zh],encapsulation:2}),t})(),zw=(()=>{class t{constructor(t){this.domService=t}open(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=this.domService.attachComponentPortal(Nw);return t=Object.assign({position:"is-top"},t),e.instance.config=t,e.instance.afterClosed().subscribe(()=>{e.destroy()}),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Fw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[zw],imports:[[nu,Lw]]}),t})(),Vw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),Uw=(()=>{class t{constructor(t){this.componentFactoryResolver=t,this.ready=new Yl,this.hasComponent=!1,this._afterClosed=new E,this.open=!1,this.fromOkButton=!1}ngOnInit(){this.open=!0,this.ready.next(!0)}_keypress(){this.config.hasBackdrop&&this.dismiss(!1)}backdropHandler(){this.config.hasBackdrop&&this.dismiss(!1)}cancelHandler(){this.config.cancelHandler&&"function"==typeof this.config.cancelHandler?this.config.cancelHandler():this.dismiss(!1)}okHandler(){this.config.okHandler&&"function"==typeof this.config.okHandler?this.config.okHandler():this.dismiss(!0)}disableButtonsAndMakeOkButtonLoading(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl.nativeElement.classList.add("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.setAttribute("disabled","disabled")}enableButtonsAndMakeOkButtonNotLoading(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl.nativeElement.classList.remove("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.removeAttribute("disabled")}dismiss(t){this.open=!1,this.fromOkButton=t}animationDone(t){"active"===t.fromState&&"inactive"===t.toState&&(this._afterClosed.next(this.fromOkButton),this._afterClosed.complete())}afterClosed(){return this._afterClosed.asObservable()}hideSpinner(){this.config.loading=!1}displaySpinner(){this.config.loading=!0}_setComponent(t){let e;if(t instanceof _l)this.componentSection.createEmbeddedView(t);else{e=this.componentFactoryResolver.resolveComponentFactory(t);const n=this.componentSection.createComponent(e);this.componentInstance=n.instance}this.hasComponent=!0}}return t.\u0275fac=function(e){return new(e||t)(Ao(qa))},t.\u0275cmp=pe({type:t,selectors:[["nwb-dialog"]],viewQuery:function(t,e){var n;1&t&&(cc(ew,!0,yl),hc(nw,!0),hc(iw,!0),hc(sw,!0),hc(rw,!0),hc(ow,!0)),2&t&&(lc(n=gc())&&(e.componentSection=n.first),lc(n=gc())&&(e.okButtonEl=n.first),lc(n=gc())&&(e.cancelButtonEl=n.first),lc(n=gc())&&(e.backdropButtonEl=n.first),lc(n=gc())&&(e.headerEl=n.first),lc(n=gc())&&(e.footerEl=n.first))},hostAttrs:[1,"nwb-dialog"],hostBindings:function(t,e){1&t&&$o("keydown.escape",(function(){return e._keypress()}),!1,Hn)},decls:10,vars:11,consts:[[1,"modal","is-active"],[1,"modal-background",3,"click"],[1,"modal-card",3,"ngStyle"],["class","modal-card-head",4,"ngIf"],["class","modal-card-body",4,"ngIf"],["class","modal-card-body",3,"innerHTML",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],["componentSection",""],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"modal-card-title"],["class","delete",3,"click",4,"ngIf"],[1,"delete",3,"click"],["backdropButton",""],[1,"modal-card-body"],[1,"modal-card-body",3,"innerHTML"],[1,"modal-card-foot"],["footer",""],["class","button column is-medium is-danger is-4",3,"click",4,"ngIf"],["class","button column is-medium is-success is-offset-4",3,"click",4,"ngIf"],[1,"button","column","is-medium","is-danger","is-4",3,"click"],["cancelButton",""],[1,"button","column","is-medium","is-success","is-offset-4",3,"click"],["okButton",""]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),$o("click",(function(){return e.backdropHandler()})),zo(),No(2,"div",2),$o("@modalState.done",(function(t){return e.animationDone(t)})),Mo(3,lw,5,2,"header",3),Mo(4,cw,2,0,"section",4),Mo(5,hw,1,1,"section",5),No(6,"section",6),Fo(7,"div",null,7),zo(),Mo(9,pw,4,2,"footer",8),zo(),zo()),2&t&&(ws(2),Ro("@modalState",e.open?"active":"inactive")("ngStyle",zl(7,gw,e.config.width)),ws(1),Ro("ngIf",e.config.title),ws(1),Ro("ngIf",e.config.loading),ws(1),Ro("ngIf",!e.config.loading&&e.config.message&&e.config.message.length>0),ws(1),Ro("ngClass",zl(9,mw,!e.hasComponent||e.config.loading)),ws(3),Ro("ngIf",!e.config.loading&&(e.config.cancelButtonText.length>0||e.config.okButtonText.length>0)))},directives:[Jh,Zh,qh,xw],encapsulation:2,data:{animation:[zu("modalState",[Hu("void => active",Fu("200ms",Bu([Uu({opacity:"0",top:"5%",offset:0}),Uu({opacity:"1",top:"0",offset:1})]))),Hu("active => inactive",Fu("200ms",Bu([Uu({opacity:"1",offset:0}),Uu({opacity:"0",top:"5%",offset:1})])))])]}}),t})();class jw{constructor(t,e){this._parentInjector=t,this._customTokens=e}get(t,e){const n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)}}function Bw(t,...e){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(let n of e)if(null!=n)for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}let Hw=(()=>{class t{constructor(t,e){this.domService=t,this.injector=e}open(t){return this.getComponentRef(t).instance}openFromComponent(t,e){const n=this.getComponentRef(e);return n.instance._setComponent(t),n.instance}getComponentRef(t){const e=new WeakMap;e.set(Uw,Uw);let n=new jw(this.injector,e);const i=this.domService.attachComponentPortal(Uw,n);return i.instance.config=Bw(new $w,t),i.instance.afterClosed().subscribe(()=>{i.destroy()}),i}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class $w{constructor(){this.okButtonText="",this.cancelButtonText="",this.width="",this.hasBackdrop=!0,this.okHandler=null,this.cancelHandler=null,this.loading=!1}}let Ww=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Hw],imports:[[nu,Lw]]}),t})(),qw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),Gw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw,Jf,t_]]}),t})(),Qw=(()=>{class t{constructor(){this.selectedValue$=new E,this.afterViewInit$=new Yl,this.selectedFoundRow=0,this.isActive=!1,this.foundRows=[],this.isSearching=!1,this.searchString="",this.enabled=!0,this._isMouseNavigating=!1}ngAfterViewInit(){this.afterViewInit$.emit()}open(){this.enabled&&(this._reset(),this.focusInputSearch(),this.isActive=!0,this.searching(""))}close(){this.isActive=!1,this._reset()}_reset(){this.foundRows=[],this.selectedFoundRow=0,this.searchString="",setTimeout(()=>{this.inputSearch.nativeElement.value=""})}inputOnKeyDown(t){27===t.keyCode&&this.close()}documentOnKeyDown(t){let e=!1;this._isMouseNavigating=!1,e=this.openFromKeyboard(t)||e,e=this.keyboardNavigate(t)||e,e=this.onEnter(t)||e,e&&t.preventDefault()}mouseMove(){this._isMouseNavigating=!0}mouseOver(t){this._isMouseNavigating&&(this.selectedFoundRow=t)}getSpecialKey(t){return t.metaKey?navigator.platform.match("Mac")?"cmd":"windows":t.ctrlKey?"ctrl":t.shiftKey?"shift":t.altKey?"alt":null}isSubscribedKey(t){return this.config.keyCodes.filter(e=>this.getSpecialKey(t)===e.specialKey&&t.key===e.key).length>0}openFromKeyboard(t){return!(this.isActive||!this.config||!this.isSubscribedKey(t)||(this.open(),0))}keyboardNavigate(t){const e=t.keyCode;if(!this.isActive)return!1;let n=!1;if(40===e||9===e){do{this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}while(!this.isSelectedFoundRowSelectable());n=!0}else if(38===e){do{this.selectedFoundRow--,this.selectedFoundRow<0&&(this.selectedFoundRow=this.foundRows.length-1)}while(!this.isSelectedFoundRowSelectable());n=!0}if(n){const t=document.querySelector(`a.nwb-modal-search-row[tabindex="${this.selectedFoundRow}"`);t&&(t.focus(),this.focusInputSearch())}return n}focusInputSearch(){setTimeout(()=>{this.inputSearch.nativeElement.focus()})}onEnter(t){if(!this.isActive)return!1;13===t.keyCode&&this.selectValue()}isSelectedFoundRowSelectable(){return this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&this.foundRows[this.selectedFoundRow].isSelectable}selectFirstSelectableRow(){if(0!==this.foundRows.length)for(this.selectedFoundRow=0;!this.isSelectedFoundRowSelectable();)this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}selectValue(){this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&(this.selectedValue$.next(this.foundRows[this.selectedFoundRow]),this.close())}searching(t){let e;this.searchSubscription&&this.searchSubscription.unsubscribe(),"function"==typeof this.config.customSearchFn?e=this.config.customSearchFn(t):this.config.records&&(e=this.searchFromRecords(t)),Array.isArray(e)?(this.foundRows=this.flattenNwbFoundRow(e),this.selectFirstSelectableRow()):e&&(this.isSearching=!0,this.searchSubscription=e.pipe(n_(()=>this.isSearching=!1)).subscribe(t=>{this.foundRows=this.flattenNwbFoundRow(t),this.selectFirstSelectableRow()}))}flattenNwbFoundRow(t){let e=[],n=!1;return t.forEach(t=>{const i={text:t.text,isSelectable:!t.hasOwnProperty("isSelectable")||t.isSelectable,isChild:!1,data:t.data||null,isParent:t.children&&t.children.length>0};i.isSelectable&&(n=!0),e.push(i),t.children&&t.children.forEach(t=>{const i={text:t.text,isSelectable:!t.hasOwnProperty("isSelectable")||t.isSelectable,isChild:!0,data:t.data||null,isParent:!1};i.isSelectable&&(n=!0),e.push(i)})}),!n&&e.length>0&&(console.error("No selectable rows! empty found rows to avoid infinite loop"),e=[]),e}searchFromRecords(t){return b.create(e=>{const n=this.searchAllWordsInFoundRows(t,this.config.records);e.next(n),e.complete()})}searchAllWordsInFoundRows(t,e){const n=t.split(" ").map(t=>`(?=.*${t})`).join(""),i=new RegExp(n,"ig"),s=[];return e.forEach(t=>{let e=[];if(t.children&&(e=t.children.filter(t=>-1!==t.text.search(i))),e.length||-1!==t.text.search(i)){const n=Object.assign({},t);n.children=e,s.push(n)}}),s}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-modal-search"]],viewQuery:function(t,e){var n;1&t&&(hc(rw,!0),cc(fw,!0),hc(ow,!0)),2&t&&(lc(n=gc())&&(e.header=n.first),lc(n=gc())&&(e.inputSearch=n.first),lc(n=gc())&&(e.footer=n.first))},hostAttrs:[1,"nwb-modal-search"],hostBindings:function(t,e){1&t&&$o("keydown",(function(t){return e.documentOnKeyDown(t)}),!1,Hn)},decls:14,vars:19,consts:[[3,"ngClass"],[1,"modal-background",3,"click"],[1,"modal-content","modal-card",3,"ngClass","click"],["class","modal-card-head",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],[1,"field","nwb-modal-search"],[1,"control","has-icons-left"],["type","text",1,"input",3,"ngModel","placeholder","ngModelChange","keydown"],["inputSearch",""],[1,"icon","is-large","is-left"],[1,"fa","fa-search"],["class","nwb-modal-search-found-rows",4,"ngIf"],[4,"ngIf"],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"nwb-modal-search-found-rows"],["class","nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click",4,"ngFor","ngForOf"],[1,"nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click"],[1,"nwb-modal-search-row-content",3,"innerHTML"],[1,"modal-card-foot"],["footer",""]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),$o("click",(function(){return e.close()})),zo(),No(2,"div",2),$o("click",(function(){return e.focusInputSearch()})),Mo(3,_w,2,0,"header",3),No(4,"section",4),No(5,"div",5),No(6,"div",6),No(7,"input",7,8),$o("ngModelChange",(function(t){return e.searching(t)}))("keydown",(function(t){return e.inputOnKeyDown(t)})),zo(),No(9,"span",9),Fo(10,"i",10),zo(),zo(),Mo(11,bw,2,1,"div",11),Mo(12,ww,1,0,"nwb-spinner",12),zo(),zo(),Mo(13,Cw,2,0,"footer",13),zo(),zo()),2&t&&(Ia("modal ",e.config.extraClasses?" "+e.config.extraClasses:"",""),Ro("ngClass",zl(12,tw,e.isActive)),ws(2),Ro("ngClass",zl(14,tw,e.isActive)),ws(1),Ro("ngIf",e.config.hasHeader),ws(1),Ro("ngClass",Fl(16,Sw,!e.config.hasHeader,!e.config.hasFooter)),ws(3),Yo("placeholder",e.config.inputPlaceholder),Ro("ngModel",e.searchString),ws(4),Ro("ngIf",!e.isSearching&&e.foundRows.length>0),ws(1),Ro("ngIf",e.isSearching),ws(1),Ro("ngIf",e.config.hasFooter))},directives:[qh,Zh,$m,Zm,Kf,Qh,xw],encapsulation:2}),t})(),Kw=(()=>{class t{constructor(t,e){this.domService=t,this.injector=e}create(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=new WeakMap;e.set(Qw,Qw);let n=new jw(this.injector,e);const i=this.domService.attachComponentPortal(Qw,n);return i.instance.config=Bw(new Zw,t),i}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow),Qt(ho))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})();class Zw{constructor(){this.hasHeader=!1,this.hasFooter=!1,this.keyCodes=[{specialKey:"cmd",key:"k"},{specialKey:"ctrl",key:"k"}],this.inputPlaceholder="Jump to...",this.extraClasses=""}}let Yw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Kw],imports:[[nu,Jf,Lw]]}),t})(),Xw=(()=>{class t{constructor(){this.changes=new E,this.itemsPerPageLabel="Items per page:",this.ofLabel="of",this.getRangeLabel=(t,e,n)=>{if(0==n||0==e)return`0 ${this.ofLabel} ${n}`;const i=t*e;return`${i+1} - ${i<(n=Math.max(n,0))?Math.min(i+e,n):i+e} ${this.ofLabel} ${n}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),Jw=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[Xw],imports:[[nu,Lw]]}),t})(),tC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),eC=(()=>{class t{constructor(){this._afterClosed=new E,this.open=!1,this.manualClose=!1}ngOnInit(){this.open=!0,this.config.duration>0&&(this.timer=setTimeout(()=>this.dismiss(!1),this.config.duration))}dismiss(t){this.open=!1,this.manualClose=t}animationDone(t){"active"===t.fromState&&"inactive"===t.toState&&(this._afterClosed.next(this.manualClose),this._afterClosed.complete())}afterClosed(){return this._afterClosed.asObservable()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["nwb-snack-bar"]],hostAttrs:[1,"nwb-snack-bar"],decls:4,vars:8,consts:[[1,"columns"],[1,"column","notification--message",3,"ngClass","innerHTML"],["class","column is-half",4,"ngIf"],[1,"column","is-half"],[3,"click"]],template:function(t,e){1&t&&(No(0,"div"),$o("@state.done",(function(t){return e.animationDone(t)})),No(1,"div",0),Fo(2,"div",1),Mo(3,Iw,3,3,"div",2),zo(),zo()),2&t&&(la("notification is-active "+(e.config.color?e.config.color:"is-transparent")),Ro("@state",e.open?"active":"inactive"),ws(2),Ro("ngClass",zl(6,Ew,e.config.action))("innerHTML",e.config.message,Yi),ws(1),Ro("ngIf",e.config.action))},directives:[qh,Zh],encapsulation:2,data:{animation:[zu("state",[ju("void",Uu({bottom:"-100px"})),ju("inactive",Uu({bottom:"-100px"})),ju("active",Uu({bottom:"0px"})),Hu("void => active",Fu(300)),Hu("active => inactive",Fu(300))])]}}),t})(),nC=(()=>{class t{constructor(t){this.domService=t}open(t){return this.getComponentRef(t).instance}getComponentRef(t){const e=this.domService.attachComponentPortal(eC);return e.instance.config=t,e.instance.afterClosed().subscribe(()=>{e.destroy()}),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ow))},t.\u0275prov=ht({token:t,factory:t.\u0275fac}),t})(),iC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[nC],imports:[[nu,Lw]]}),t})(),sC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw,j_]]}),t})(),rC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Jf,Lw]]}),t})(),oC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),aC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,Lw]]}),t})(),lC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[],Lw,Fw,Vw,Ww,qw,Yw,Jw,tC,iC,sC,rC,oC,Gw,aC]}),t})();function cC(t,e=T_){return n=>n.lift(new hC(t,e))}class hC{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new uC(t,this.dueTime,this.scheduler))}}class uC extends g{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(dC,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function dC(t){t.debouncedNext()}let pC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();class gC{constructor(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}call(t,e){return e.subscribe(new mC(t,this.project,this.concurrent,this.scheduler))}}class mC extends N{constructor(t,e,n,i){super(t),this.project=e,this.concurrent=n,this.scheduler=i,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}static dispatch(t){const{subscriber:e,result:n,value:i,index:s}=t;e.subscribeToProjection(n,i,s)}_next(t){const e=this.destination;if(e.closed)return void this._complete();const n=this.index++;if(this.active<this.concurrent){e.next(t);try{const{project:e}=this,i=e(t,n);this.scheduler?this.destination.add(this.scheduler.schedule(mC.dispatch,0,{subscriber:this,result:i,value:t,index:n})):this.subscribeToProjection(i,t,n)}catch(i){e.error(i)}}else this.buffer.push(t)}subscribeToProjection(t,e,n){this.active++,this.destination.add(L(this,t,e,n))}_complete(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,i,s){this._next(e)}notifyComplete(t){const e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}class fC{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new _C(t,this.predicate,this.inclusive))}}class _C extends g{constructor(t,e,n){super(t),this.predicate=e,this.inclusive=n,this.index=0}_next(t){const e=this.destination;let n;try{n=this.predicate(t,this.index++)}catch(i){return void e.error(i)}this.nextOrComplete(t,n)}nextOrComplete(t,e){const n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}var vC=n("0Tit"),yC=n.n(vC);const bC=new Ft("SMOOTH_SCROLL_OPTIONS");let wC=(()=>{class t{constructor(t,e,n){this._document=t,this._platform=e,this._onGoingScrolls=new Map,this._defaultOptions=Object.assign({duration:468,easing:{x1:.42,y1:0,x2:.58,y2:1}},n)}get _w(){return this._document.defaultView}get _now(){return this._w.performance&&this._w.performance.now?this._w.performance.now.bind(this._w.performance):Date.now}_scrollElement(t,e,n){t.scrollLeft=e,t.scrollTop=n}_getElement(t,e){return"string"==typeof t?(e||this._document).querySelector(t):h_(t)}_initSmoothScroll(t){return this._onGoingScrolls.has(t)&&this._onGoingScrolls.get(t).next(),this._onGoingScrolls.set(t,new E).get(t)}_isFinished(t,e,n){return t.currentX!==t.x||t.currentY!==t.y||(e.next(),n(),!1)}_interrupted(t,e){return G(e_(t,"wheel",{passive:!0,capture:!0}),e_(t,"touchmove",{passive:!0,capture:!0}),e).pipe(hm(1))}_destroy(t,e){e.complete(),this._onGoingScrolls.delete(t)}_step(t){return new b(e=>{let n=(this._now()-t.startTime)/t.duration;n=n>1?1:n;const i=t.easing(n);t.currentX=t.startX+(t.x-t.startX)*i,t.currentY=t.startY+(t.y-t.startY)*i,this._scrollElement(t.scrollable,t.currentX,t.currentY),I_.schedule(()=>e.next(t))})}_applyScrollToOptions(t,e){if(!e.duration)return this._scrollElement(t,e.left,e.top),Promise.resolve();const n=this._initSmoothScroll(t),i={scrollable:t,startTime:this._now(),startX:t.scrollLeft,startY:t.scrollTop,x:null==e.left?t.scrollLeft:~~e.left,y:null==e.top?t.scrollTop:~~e.top,duration:e.duration,easing:yC()(e.easing.x1,e.easing.y1,e.easing.x2,e.easing.y2)};return new Promise(e=>{gg(null).pipe(function(t,e=Number.POSITIVE_INFINITY,n){return e=(e||0)<1?Number.POSITIVE_INFINITY:e,i=>i.lift(new gC(t,e,n))}(()=>this._step(i).pipe(function(t,e=!1){return n=>n.lift(new fC(t,e))}(t=>this._isFinished(t,n,e)))),r_(this._interrupted(t,n)),n_(()=>this._destroy(t,n))).subscribe()})}scrollTo(t,e){if(iu(this._platform)){const n=this._getElement(t),i="rtl"===getComputedStyle(n).direction,s=w_(),r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),e),{left:null==e.left?i?e.end:e.start:e.left,right:null==e.right?i?e.start:e.end:e.right});return null!=r.bottom&&(r.top=n.scrollHeight-n.clientHeight-r.bottom),i&&0!==s?(null!=r.left&&(r.right=n.scrollWidth-n.clientWidth-r.left),2===s?r.left=r.right:1===s&&(r.left=r.right?-r.right:r.right)):null!=r.right&&(r.left=n.scrollWidth-n.clientWidth-r.right),this._applyScrollToOptions(n,r)}return Promise.resolve()}scrollToElement(t,e,n){const i=this._getElement(t),s=this._getElement(e,i),r=Object.assign(Object.assign({},n),{left:s.offsetLeft+(n.left||0),top:s.offsetTop+(n.top||0)});return s?this.scrollTo(i,r):Promise.resolve()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Ic),Qt(bC,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(Ic),Qt(bC,8))},token:t,providedIn:"root"}),t})(),CC=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)}}),t})();function SC(...t){const e=t.length;if(0===e)throw new Error("list of properties cannot be empty.");return n=>z(function(t,e){return n=>{let i=n;for(let s=0;s<e;s++){const e=i[t[s]];if(void 0===e)return;i=e}return i}}(t,e))(n)}function IC(t,e){if(1&t&&Fo(0,"scrollbar-x"),2&t){const t=Go(2);To("scrollable",t.state.isHorizontallyScrollable)("fit",t.state.verticalUsed)}}function EC(t,e){if(1&t&&Fo(0,"scrollbar-y"),2&t){const t=Go(2);To("scrollable",t.state.isVerticallyScrollable)("fit",t.state.horizontalUsed)}}function xC(t,e){if(1&t&&(Vo(0),Mo(1,IC,1,2,"scrollbar-x",3),Mo(2,EC,1,2,"scrollbar-y",3),Uo()),2&t){const t=Go();ws(1),Ro("ngIf",t.state.horizontalUsed),ws(1),Ro("ngIf",t.state.verticalUsed)}}const PC=["*"];function TC(t){return pv(()=>{t.onselectstart=()=>!1})}function kC(t){return pv(()=>{t.onselectstart=null})}function MC(){return pv(t=>t.stopPropagation())}function DC(t,e){return t.clientX>=e.left&&t.clientX<=e.left+e.width&&t.clientY>=e.top&&t.clientY<=e.top+e.height}let AC=(()=>{class t{constructor(t,e){this.viewPort=t,this.document=e,this.nativeElement=t.nativeElement}get clientHeight(){return this.nativeElement.clientHeight}get clientWidth(){return this.nativeElement.clientWidth}get scrollHeight(){return this.nativeElement.scrollHeight}get scrollWidth(){return this.nativeElement.scrollWidth}get scrollTop(){return this.nativeElement.scrollTop}get scrollLeft(){return this.nativeElement.scrollLeft}get scrollMaxX(){return this.scrollWidth-this.clientWidth}get scrollMaxY(){return this.scrollHeight-this.clientHeight}get contentHeight(){return this.contentWrapperElement.clientHeight}activatePointerEvents(t,e){this.hovered=new b(n=>{const i=e_(this.nativeElement,"mousemove",{passive:!0});G(t?i:i.pipe(MC()),e_(this.nativeElement,"mouseleave").pipe(z(()=>!1))).pipe(pv(t=>n.next(t)),r_(e)).subscribe()}),this.clicked=new b(t=>{const n=e_(this.nativeElement,"mousedown",{passive:!0}).pipe(pv(e=>t.next(e))),i=e_(this.nativeElement,"mouseup",{passive:!0}).pipe(pv(()=>t.next(!1)));n.pipe(gm(()=>i),r_(e)).subscribe()})}setAsWrapper(){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-layer",this.nativeElement.firstElementChild&&(this.nativeElement.firstElementChild.className="ng-scroll-layer")}setAsViewport(t){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-viewport "+t,this.nativeElement.firstElementChild&&(this.contentWrapperElement=this.nativeElement.firstElementChild,this.contentWrapperElement.classList.add("ng-scroll-content"))}scrollYTo(t){this.nativeElement.scrollTop=t}scrollXTo(t){this.nativeElement.scrollLeft=t}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollViewport",""]]}),t})();const OC=new Ft("NG_SCROLLBAR_OPTIONS"),RC={viewClass:"",trackClass:"",thumbClass:"",track:"vertical",appearance:"compact",visibility:"native",position:"native",pointerEventsMethod:"viewport",trackClickScrollDuration:300,minThumbSize:20,windowResizeDebounce:0,sensorDebounce:0,scrollAuditTime:0,viewportPropagateMouseMove:!0};let LC=(()=>{class t{constructor(t){this.globalOptions=t?Object.assign(Object.assign({},RC),t):RC,this.rtlScrollAxisType=w_()}}return t.\u0275fac=function(e){return new(e||t)(Qt(OC,8))},t.\u0275prov=ht({factory:function(){return new t(Qt(OC,8))},token:t,providedIn:"root"}),t})(),NC=(()=>{class t{constructor(t,e,n,i,s,r){this.el=t,this.zone=e,this.changeDetectorRef=n,this.dir=i,this.smoothScroll=s,this.manager=r,this._disabled=!1,this._sensorDisabled=this.manager.globalOptions.sensorDisabled,this._pointerEventsDisabled=this.manager.globalOptions.pointerEventsDisabled,this._viewportPropagateMouseMove=this.manager.globalOptions.viewportPropagateMouseMove,this.viewClass=this.manager.globalOptions.viewClass,this.trackClass=this.manager.globalOptions.trackClass,this.thumbClass=this.manager.globalOptions.thumbClass,this.minThumbSize=this.manager.globalOptions.minThumbSize,this.trackClickScrollDuration=this.manager.globalOptions.trackClickScrollDuration,this.pointerEventsMethod=this.manager.globalOptions.pointerEventsMethod,this.track=this.manager.globalOptions.track,this.visibility=this.manager.globalOptions.visibility,this.appearance=this.manager.globalOptions.appearance,this.position=this.manager.globalOptions.position,this.sensorDebounce=this.manager.globalOptions.sensorDebounce,this.scrollAuditTime=this.manager.globalOptions.scrollAuditTime,this.updated=new Yl,this.state={},this.destroyed=new E}get disabled(){return this._disabled}set disabled(t){this._disabled=l_(t)}get sensorDisabled(){return this._sensorDisabled}set sensorDisabled(t){this._sensorDisabled=l_(t)}get pointerEventsDisabled(){return this._pointerEventsDisabled}set pointerEventsDisabled(t){this._pointerEventsDisabled=l_(t)}get viewportPropagateMouseMove(){return this._viewportPropagateMouseMove}set viewportPropagateMouseMove(t){this._viewportPropagateMouseMove=l_(t)}get nativeElement(){return this.el.nativeElement}updateState(){let t=!1,e=!1,n=!1,i=!1;"all"!==this.track&&"vertical"!==this.track||(n=this.viewport.scrollHeight>this.viewport.clientHeight,t="always"===this.visibility||n),"all"!==this.track&&"horizontal"!==this.track||(i=this.viewport.scrollWidth>this.viewport.clientWidth,e="always"===this.visibility||i),this._updateState({position:this.position,track:this.track,appearance:this.appearance,visibility:this.visibility,deactivated:this.disabled,dir:this.dir.value,pointerEventsMethod:this.pointerEventsMethod,verticalUsed:t,horizontalUsed:e,isVerticallyScrollable:n,isHorizontallyScrollable:i})}_updateState(t){this.state=Object.assign(Object.assign({},this.state),t),this.changeDetectorRef.detectChanges()}getScrolledByDirection(t){let e;return this.scrolled.pipe(pv(t=>e=t),SC("target",t),t=>t.lift(new L_),Ig(([t,e])=>t!==e),z(()=>e))}setHovered(t){this.zone.run(()=>this._updateState(Object.assign({},t)))}setDragging(t){this.zone.run(()=>this._updateState(Object.assign({},t)))}setClicked(t){this.zone.run(()=>this._updateState({scrollbarClicked:t}))}ngOnInit(){this.zone.runOutsideAngular(()=>{this.customViewPort?(this.viewport=this.customViewPort,this.defaultViewPort.setAsWrapper()):this.viewport=this.defaultViewPort,this.viewport.setAsViewport(this.viewClass);let t=e_(this.viewport.nativeElement,"scroll",{passive:!0});t=this.scrollAuditTime?t.pipe(O_(this.scrollAuditTime)):t,this.scrolled=new b(e=>t.pipe(r_(this.destroyed)).subscribe(e)),this.verticalScrolled=this.getScrolledByDirection("scrollTop"),this.horizontalScrolled=this.getScrolledByDirection("scrollLeft")})}ngAfterViewChecked(){this.updateState()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}update(){this.state.horizontalUsed||(this.nativeElement.style.height=this.viewport.contentHeight+"px"),this.updated.next(),this.changeDetectorRef.detectChanges()}scrollTo(t){return this.smoothScroll.scrollTo(this.viewport.nativeElement,t)}scrollToElement(t,e){return this.smoothScroll.scrollToElement(this.viewport.nativeElement,t,e)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Uc),Ao(Qr),Ao(p_),Ao(wC),Ao(LC))},t.\u0275cmp=pe({type:t,selectors:[["ng-scrollbar"]],contentQueries:function(t,e,n){var i,s,r;1&t&&(s=n,r=AC,!0,pc(Ze(),Ke(),r,!0,void 0,!0,Xe(),s)),2&t&&lc(i=gc())&&(e.customViewPort=i.first)},viewQuery:function(t,e){var n;1&t&&cc(AC,!0),2&t&&lc(n=gc())&&(e.defaultViewPort=n.first)},hostVars:2,hostBindings:function(t,e){2&t&&aa("ng-scrollbar",!0)},inputs:{viewClass:"viewClass",trackClass:"trackClass",thumbClass:"thumbClass",minThumbSize:"minThumbSize",trackClickScrollDuration:"trackClickScrollDuration",pointerEventsMethod:"pointerEventsMethod",track:"track",visibility:"visibility",appearance:"appearance",position:"position",sensorDebounce:"sensorDebounce",scrollAuditTime:"scrollAuditTime",disabled:"disabled",sensorDisabled:"sensorDisabled",pointerEventsDisabled:"pointerEventsDisabled",viewportPropagateMouseMove:"viewportPropagateMouseMove"},outputs:{updated:"updated"},exportAs:["ngScrollbar"],ngContentSelectors:PC,decls:6,vars:4,consts:[[1,"ng-scrollbar-wrapper",3,"ngAttr"],[1,"ng-scroll-viewport-wrapper",3,"sensorDebounce","sensorDisabled","resizeSensor"],["scrollViewport","","hideNativeScrollbar",""],[4,"ngIf"]],template:function(t,e){1&t&&(Ko(),No(0,"div",0),No(1,"div",1),$o("resizeSensor",(function(){return e.update()})),No(2,"div",2),No(3,"div"),Zo(4),zo(),zo(),zo(),Mo(5,xC,3,2,"ng-container",3),zo()),2&t&&(Ro("ngAttr",e.state),ws(1),Ro("sensorDebounce",e.sensorDebounce)("sensorDisabled",e.sensorDisabled),ws(4),Ro("ngIf",!e.disabled))},directives:function(){return[VC,jC,AC,FC,Zh,ZC,KC]},styles:[".ng-scrollbar-measure{-ms-overflow-style:none;left:0;overflow:scroll;position:fixed;scrollbar-width:none;top:-9999px} .ng-scrollbar-measure::-webkit-scrollbar{display:none}[_nghost-%COMP%]{--scrollbar-border-radius:7px;--scrollbar-hover-size:var(--scrollbar-size);--scrollbar-padding:4px;--scrollbar-size:5px;--scrollbar-thumb-color:rgba(0,0,0,0.2);--scrollbar-thumb-hover-color:var(--scrollbar-thumb-color);--scrollbar-thumb-transition:height ease-out 150ms,width ease-out 150ms;--scrollbar-track-color:transparent;--scrollbar-track-transition:height ease-out 150ms,width ease-out 150ms;display:block;height:100%;max-height:100%;max-width:100%;position:relative}[_nghost-%COMP%] > .ng-scrollbar-wrapper[_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);--scrollbar-total-size:calc(var(--scrollbar-size) + var(--scrollbar-padding)*2);--vertical-scrollbar-size:var(--scrollbar-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalHovered=true][_ngcontent-%COMP%]{--vertical-scrollbar-size:var(--scrollbar-hover-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalHovered=true][_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-hover-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:var(--scrollbar-total-size);top:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-bottom:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:0;top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport::-webkit-scrollbar, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{bottom:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:0;right:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:var(--native-scrollbar-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%] > .scrollbar-control[_ngcontent-%COMP%]{opacity:0;transition-delay:.8s;transition-duration:.4s;transition-property:opacity}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:active > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:focus > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:hover > .scrollbar-control[_ngcontent-%COMP%]{opacity:1;transition-delay:0ms;transition-duration:.4s}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow:auto}.ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{overflow:hidden}.ng-scroll-viewport[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;contain:strict;will-change:scroll-position} .ng-scroll-content{display:inline-block;min-width:100%;position:relative!important}.ng-scroll-layer[_ngcontent-%COMP%], .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], .ng-scrollbar-wrapper[_ngcontent-%COMP%], .ng-scroll-viewport{bottom:0;left:0;position:absolute;right:0;top:0}",".ng-scrollbar-wrapper[pointerEventsMethod=viewport]>.scrollbar-control{pointer-events:none} .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none} .ng-scrollbar-wrapper>.scrollbar-control{align-items:center;display:flex;justify-content:center;position:absolute;transition:var(--scrollbar-track-transition)} .ng-scrollbar-wrapper>.scrollbar-control[scrollable=false] .ng-scrollbar-thumb{display:none} .ng-scrollbar-track{background-color:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);cursor:default;height:100%;overflow:hidden;transition:var(--scrollbar-track-transition);width:100%;z-index:1} .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:inherit;box-sizing:border-box;position:relative;transform:translateZ(0);transition:var(--scrollbar-thumb-transition)}"],changeDetection:0}),t})(),zC=(()=>{class t{constructor(t,e,n){this.document=t,this.manager=e,this.platform=n,this._scrollbarSize=new bg(this.getNativeScrollbarSize()),this.scrollbarSize=this._scrollbarSize.asObservable(),n.isBrowser&&e_(this.document.defaultView,"resize",{passive:!0}).pipe(cC(this.manager.globalOptions.windowResizeDebounce),z(()=>this.getNativeScrollbarSize()),E_(),pv(t=>this._scrollbarSize.next(t))).subscribe()}getNativeScrollbarSize(){if(!this.platform.isBrowser)return 0;if(this.platform.IOS)return 6;const t=this.document.createElement("div");t.className="ng-scrollbar-measure",this.document.body.appendChild(t);const e=t.getBoundingClientRect().right;return this.document.body.removeChild(t),e}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(LC),Qt(v_))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(LC),Qt(v_))},token:t,providedIn:"root"}),t})(),FC=(()=>{class t{constructor(t,e,n){this.renderer=e,this.hideNativeScrollbar=n,this._subscriber=u.EMPTY,this._subscriber=n.scrollbarSize.subscribe(e=>{this.renderer.setStyle(t.nativeElement,"--native-scrollbar-size",`-${e}px`,Za.DashCase)})}ngOnDestroy(){this._subscriber.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(zC))},t.\u0275dir=ye({type:t,selectors:[["","hideNativeScrollbar",""]]}),t})(),VC=(()=>{class t{constructor(t){this.el=t}set ngAttr(t){for(const[e,n]of Object.entries(t))this.el.nativeElement.setAttribute(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","ngAttr",""]],inputs:{ngAttr:"ngAttr"}}),t})(),UC=(()=>{class t{constructor(t,e){if(this.resizeObserverSource=new bg(null),this.resizeObserverLoader=this.resizeObserverSource.asObservable(),e.isBrowser){const e=t.defaultView.ResizeObserver?gg(t.defaultView.ResizeObserver):j(n.e(5).then(n.bind(null,"HR/i"))).pipe(z(t=>t.ResizeObserver),iv(t=>(console.log("Unable to load ResizeObserver polyfill",t),dg)));this.resizeObserverSource.next(e)}}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(v_))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(v_))},token:t,providedIn:"root"}),t})(),jC=(()=>{class t{constructor(t,e,n,i){if(this.zone=t,this.platform=e,this.resizeObserverFactory=n,this.scrollbar=i,this._disabled=!1,this._subscription=null,this.resizeSensor=new Yl,!i)throw new Error("[NgScrollbar Resize Sensor Directive]: Host element must be an NgScrollbar component.")}get debounce(){return this._debounce}set debounce(t){this._debounce=c_(t),this._subscribe()}get disabled(){return this._disabled}set disabled(t){this._disabled=l_(t),this._disabled?this._unsubscribe():this._subscribe()}ngAfterContentInit(){this._subscription||this._disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_createObserver(t){return new b(e=>{this._resizeObserver=new t(()=>e.next()),this._resizeObserver.observe(this.scrollbar.viewport.nativeElement),this.scrollbar.viewport.contentWrapperElement&&this._resizeObserver.observe(this.scrollbar.viewport.contentWrapperElement)})}_subscribe(){this._unsubscribe(),this.platform.isBrowser&&this.zone.runOutsideAngular(()=>{this._subscription=this.resizeObserverFactory.resizeObserverLoader.pipe(gm(t=>t),gm(t=>{if(t){const e=this._createObserver(t);return this.debounce?e.pipe(cC(this._debounce)):e}return dg})).subscribe(()=>this.resizeSensor.emit())})}_unsubscribe(){this._resizeObserver&&this._resizeObserver.disconnect(),this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Ao(Uc),Ao(v_),Ao(UC),Ao(NC))},t.\u0275dir=ye({type:t,selectors:[["","resizeSensor",""]],inputs:{debounce:["sensorDebounce","debounce"],disabled:["sensorDisabled","disabled"]},outputs:{resizeSensor:"resizeSensor"}}),t})(),BC=(()=>{class t{constructor(t,e,n){this.cmp=t,this.trackElement=e,this.document=n}get clicked(){return G(e_(this.trackElement,"mousedown",{passive:!0}).pipe(MC(),TC(this.document)),e_(this.document,"mouseup",{passive:!0}).pipe(MC(),kC(this.document),gm(()=>dg)))}get hovered(){return G(e_(this.trackElement,"mouseenter",{passive:!0}).pipe(MC(),z(()=>!0)),e_(this.trackElement,"mouseleave",{passive:!0}).pipe(MC(),z(()=>!1)))}get clientRect(){return this.trackElement.getBoundingClientRect()}onTrackClicked(t,e,n){return gg(t).pipe(SC(this.pageProperty),z(t=>(t-this.offset-e/2)/this.size*n),pv(t=>{this.cmp.scrollTo(Object.assign(Object.assign({},this.mapToScrollToOption(t)),{duration:c_(this.cmp.trackClickScrollDuration)}))}))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(HTMLElement),Ao(void 0))},t.\u0275dir=ye({type:t}),t})(),HC=(()=>{class t{constructor(t,e,n){this.cmp=t,this.thumbElement=e,this.document=n,this._dragging=new E,this.dragging=this._dragging.pipe(E_())}get trackMax(){return this.track.size-this.size}get clientRect(){return this.thumbElement.getBoundingClientRect()}get clicked(){return e_(this.thumbElement,"mousedown",{passive:!0}).pipe(MC())}update(){const t=(e=this.track.size,Math.max(~~(e/this.viewportScrollSize*e),this.cmp.minThumbSize));var e;const n=this.viewportScrollOffset*this.trackMax/this.viewportScrollMax;I_.schedule(()=>this.updateStyles(this.handleDirection(n,this.trackMax),t))}dragged(t){let e,n;const i=gg(t).pipe(TC(this.document),pv(()=>{e=this.trackMax,n=this.viewportScrollMax,this.setDragging(!0)})),s=e_(this.document,"mousemove",{capture:!0,passive:!0}).pipe(MC()),r=e_(this.document,"mouseup",{capture:!0}).pipe(MC(),kC(this.document),pv(()=>this.setDragging(!1)));return i.pipe(SC(this.pageProperty),z(t=>t-this.dragStartOffset),B(t=>s.pipe(SC(this.clientProperty),z(t=>t-this.track.offset),z(i=>n*(i-t)/e),z(t=>this.handleDrag(t,n)),pv(t=>this.scrollTo(t)),r_(r))))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(HTMLElement),Ao(void 0))},t.\u0275dir=ye({type:t,inputs:{track:"track"},outputs:{dragging:"dragging"}}),t})(),$C=(()=>{class t extends HC{constructor(t,e,n,i){super(t,e.nativeElement,n),this.cmp=t,this.element=e,this.document=n,this.dir=i}get clientProperty(){return"clientX"}get pageProperty(){return"pageX"}get viewportScrollSize(){return this.cmp.viewport.scrollWidth}get viewportScrollOffset(){return this.cmp.viewport.scrollLeft}get viewportScrollMax(){return this.cmp.viewport.scrollMaxX}get dragStartOffset(){return this.clientRect.left}get size(){return this.thumbElement.clientWidth}updateStyles(t,e){this.thumbElement.style.width=e+"px",this.thumbElement.style.transform=`translate3d(${t}px, 0, 0)`}handleDrag(t,e){if("rtl"===this.dir.value){if(1===this.cmp.manager.rtlScrollAxisType)return t-e;if(2===this.cmp.manager.rtlScrollAxisType)return e-t}return t}handleDirection(t,e){if("rtl"===this.dir.value){if(2===this.cmp.manager.rtlScrollAxisType)return-t;if(0===this.cmp.manager.rtlScrollAxisType)return t-e}return t}setDragging(t){this.cmp.setDragging({horizontalDragging:t})}scrollTo(t){this.cmp.viewport.scrollXTo(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih),Ao(p_))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarThumbX",""]],features:[Pa]}),t})(),WC=(()=>{class t extends HC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.element=e,this.document=n}get pageProperty(){return"pageY"}get viewportScrollSize(){return this.cmp.viewport.scrollHeight}get viewportScrollOffset(){return this.cmp.viewport.scrollTop}get viewportScrollMax(){return this.cmp.viewport.scrollMaxY}get clientProperty(){return"clientY"}get dragStartOffset(){return this.clientRect.top}get size(){return this.thumbElement.clientHeight}updateStyles(t,e){this.thumbElement.style.height=e+"px",this.thumbElement.style.transform=`translate3d(0px, ${t}px, 0)`}handleDrag(t){return t}handleDirection(t){return t}setDragging(t){this.cmp.setDragging({verticalDragging:t})}scrollTo(t){this.cmp.viewport.scrollYTo(t)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarThumbY",""]],features:[Pa]}),t})(),qC=(()=>{class t extends BC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.document=n}get pageProperty(){return"pageX"}get offset(){return this.clientRect.left}get size(){return this.trackElement.clientWidth}mapToScrollToOption(t){return{left:t}}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarTrackX",""]],features:[Pa]}),t})(),GC=(()=>{class t extends BC{constructor(t,e,n){super(t,e.nativeElement,n),this.cmp=t,this.document=n}get pageProperty(){return"pageY"}get offset(){return this.clientRect.top}get size(){return this.trackElement.clientHeight}mapToScrollToOption(t){return{top:t}}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(Ga),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","scrollbarTrackY",""]],features:[Pa]}),t})(),QC=(()=>{class t{constructor(t,e,n,i){this.cmp=t,this.platform=e,this.document=n,this.zone=i,this.destroyed=new E}activatePointerEvents(){let t=dg,e=dg,n=dg;return"viewport"===this.cmp.pointerEventsMethod?(this.viewportTrackClicked=new E,this.viewportThumbClicked=new E,this.cmp.viewport.activatePointerEvents(this.cmp.viewportPropagateMouseMove,this.destroyed),t=this.viewportThumbClicked,e=this.viewportTrackClicked,n=this.cmp.viewport.hovered.pipe(z(t=>DC(t,this.track.clientRect)),E_(),pv(t=>this.document.onselectstart=t?()=>!1:null)),this.cmp.viewport.clicked.pipe(pv(t=>{t?DC(t,this.thumb.clientRect)?this.viewportThumbClicked.next(t):DC(t,this.track.clientRect)&&(this.cmp.setClicked(!0),this.viewportTrackClicked.next(t)):this.cmp.setClicked(!1)}),r_(this.destroyed)).subscribe()):(t=this.thumb.clicked,e=this.track.clicked,n=this.track.hovered),G(n.pipe(pv(t=>this.setHovered(t))),t.pipe(gm(t=>this.thumb.dragged(t))),e.pipe(gm(t=>this.track.onTrackClicked(t,this.thumb.size,this.viewportScrollSize))))}ngOnInit(){this.zone.runOutsideAngular(()=>{this.platform.IOS||this.platform.ANDROID||this.cmp.pointerEventsDisabled||this.activatePointerEvents().pipe(r_(this.destroyed)).subscribe();const t=this.cmp.updated.pipe(pv(()=>this.onUpdated()));G(this.cmp.scrolled,t).pipe(pv(()=>this.thumb.update()),r_(this.destroyed)).subscribe(),T_.schedule(()=>this.thumb.update(),100)})}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete(),this.viewportThumbClicked&&this.viewportTrackClicked&&(this.viewportTrackClicked.complete(),this.viewportThumbClicked.complete())}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(v_),Ao(void 0),Ao(Uc))},t.\u0275dir=ye({type:t}),t})(),KC=(()=>{class t extends QC{constructor(t,e,n,i){super(t,e,n,i),this.cmp=t,this.platform=e,this.document=n,this.zone=i}get viewportScrollSize(){return this.cmp.viewport.scrollHeight}setHovered(t){this.cmp.setHovered({verticalHovered:t})}onUpdated(){}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC),Ao(v_),Ao(Ih),Ao(Uc))},t.\u0275cmp=pe({type:t,selectors:[["scrollbar-y"]],viewQuery:function(t,e){var n;1&t&&(cc(GC,!0),cc(WC,!0)),2&t&&(lc(n=gc())&&(e.track=n.first),lc(n=gc())&&(e.thumb=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&aa("scrollbar-control",!0)},features:[Pa],decls:2,vars:7,consts:[["scrollbarTrackY",""],["scrollbarThumbY","",3,"track"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"div",1),zo()),2&t&&(Ia("ng-scrollbar-track ",e.cmp.trackClass,""),ws(1),Ia("ng-scrollbar-thumb ",e.cmp.thumbClass,""),Ro("track",e.track))},directives:[GC,WC],styles:[".ng-scrollbar-wrapper>scrollbar-y.scrollbar-control{width:var(--vertical-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track{height:calc(100% - var(--scrollbar-padding)*2);width:var(--vertical-scrollbar-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:0;width:100%} .ng-scrollbar-wrapper[verticalDragging=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[verticalHovered=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-y.scrollbar-control{bottom:0;top:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertY]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl]>scrollbar-y.scrollbar-control{left:0;right:unset} .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertY]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][track=all]>scrollbar-y.scrollbar-control[fit=true]{bottom:var(--scrollbar-total-size);top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertAll]>scrollbar-y.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertX]>scrollbar-y.scrollbar-control[fit=true]{bottom:0;top:var(--scrollbar-total-size)}"],changeDetection:0}),t})(),ZC=(()=>{class t extends QC{constructor(t,e,n,i,s){super(e,n,i,s),this.el=t,this.cmp=e,this.platform=n,this.document=i,this.zone=s}get viewportScrollSize(){return this.cmp.viewport.scrollWidth}get thickness(){return this.el.nativeElement.clientHeight}setHovered(t){this.cmp.setHovered({horizontalHovered:t})}onUpdated(){this.cmp.nativeElement.style.height="standard"===this.cmp.appearance?this.cmp.viewport.contentHeight+this.thickness+"px":this.cmp.viewport.contentHeight+"px"}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(NC),Ao(v_),Ao(Ih),Ao(Uc))},t.\u0275cmp=pe({type:t,selectors:[["scrollbar-x"]],viewQuery:function(t,e){var n;1&t&&(cc(qC,!0),cc($C,!0)),2&t&&(lc(n=gc())&&(e.track=n.first),lc(n=gc())&&(e.thumb=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&aa("scrollbar-control",!0)},features:[Pa],decls:2,vars:7,consts:[["scrollbarTrackX",""],["scrollbarThumbX","",3,"track"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"div",1),zo()),2&t&&(Ia("ng-scrollbar-track ",e.cmp.trackClass,""),ws(1),Ia("ng-scrollbar-thumb ",e.cmp.thumbClass,""),Ro("track",e.track))},directives:[qC,$C],styles:[".ng-scrollbar-wrapper>scrollbar-x.scrollbar-control{height:var(--horizontal-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track{height:var(--horizontal-scrollbar-size);width:calc(100% - var(--scrollbar-padding)*2)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:100%;width:0} .ng-scrollbar-wrapper[horizontalDragging=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[horizontalHovered=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-x.scrollbar-control{bottom:0;left:0;right:0;top:unset} .ng-scrollbar-wrapper[deactivated=false][position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertY]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl]>scrollbar-x.scrollbar-control[fit=true]{left:var(--scrollbar-total-size);right:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertY]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)}"],changeDetection:0}),t})(),YC=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:OC,useValue:e}]}}}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[nu,g_,pC,y_,CC]]}),t})();class XC{static reachedTop(t,e){return XC.reached(-e.target.scrollTop,0,t)}static reachedBottom(t,e){return XC.reached(e.target.scrollTop+e.target.clientHeight,e.target.scrollHeight,t)}static reachedStart(t,e,n,i){return"rtl"===n?1===i?XC.reached(e.target.scrollLeft,0,t):2===i?XC.reached(-e.target.scrollLeft,0,t):XC.reached(e.target.scrollLeft+e.target.clientWidth,e.target.scrollWidth,t):XC.reached(-e.target.scrollLeft,0,t)}static reachedEnd(t,e,n,i){return"rtl"===n?1===i?XC.reached(-(e.target.scrollLeft-e.target.clientWidth),e.target.scrollWidth,t):2===i?XC.reached(-(e.target.scrollLeft+e.target.clientWidth),e.target.scrollWidth,t):XC.reached(-e.target.scrollLeft,0,t):XC.reached(e.target.scrollLeft+e.target.clientWidth,e.target.scrollWidth,t)}static reached(t,e,n){return t>=e-n}}let JC=(()=>{class t{constructor(t,e){this.scrollbar=t,this.zone=e,this.offset=0,this.scrollEvent=new E,this.subscription=u.EMPTY,this.reachedEvent=new b(t=>this.scrollReached().subscribe(e=>Promise.resolve().then(()=>this.zone.run(()=>t.next(e))))),t||console.warn("[NgScrollbarReached Directive]: Host element must be an NgScrollbar component.")}ngOnDestroy(){this.subscription.unsubscribe()}scrollReached(){let t;return this.scrollEvent.pipe(pv(e=>t=e),z(t=>this.reached(this.offset,t)),E_(),Ig(t=>t),z(()=>t))}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,inputs:{offset:["reachedOffset","offset"]}}),t})(),tS=(()=>{class t extends JC{constructor(t,e){super(t,e),this.scrollbar=t,this.zone=e}ngOnInit(){this.subscription=this.scrollbar.verticalScrolled.subscribe(this.scrollEvent)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,features:[Pa]}),t})(),eS=(()=>{class t extends tS{constructor(t,e){super(t,e),this.scrollbar=t,this.zone=e,this.reachedBottom=this.reachedEvent}ngOnInit(){super.ngOnInit()}reached(t,e){return XC.reachedBottom(t,e)}}return t.\u0275fac=function(e){return new(e||t)(Ao(NC,8),Ao(Uc))},t.\u0275dir=ye({type:t,selectors:[["","reachedBottom",""],["","reached-bottom",""]],outputs:{reachedBottom:"reachedBottom"},features:[Pa]}),t})(),nS=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[YC,g_]]}),t})();const iS=["wrapper"],sS=["sourceImage"];function rS(t,e){if(1&t){const t=jo();No(0,"img",4,5),$o("load",(function(){return Ye(t),Go().imageLoadedInView()})),zo()}if(2&t){const t=Go();oa("visibility",t.imageVisible?"visible":"hidden")("transform",t.safeTransformStyle),Ro("src",t.safeImgDataUrl,Ji)}}function oS(t,e){if(1&t){const t=jo();Vo(0),No(1,"span",9),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topleft")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topleft")})),Fo(2,"span",10),zo(),No(3,"span",11),Fo(4,"span",10),zo(),No(5,"span",12),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topright")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"topright")})),Fo(6,"span",10),zo(),No(7,"span",13),Fo(8,"span",10),zo(),No(9,"span",14),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomright")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomright")})),Fo(10,"span",10),zo(),No(11,"span",15),Fo(12,"span",10),zo(),No(13,"span",16),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomleft")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottomleft")})),Fo(14,"span",10),zo(),No(15,"span",17),Fo(16,"span",10),zo(),No(17,"span",18),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"top")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"top")})),zo(),No(18,"span",19),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"right")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"right")})),zo(),No(19,"span",20),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottom")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"bottom")})),zo(),No(20,"span",21),$o("mousedown",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"left")}))("touchstart",(function(e){Ye(t);const n=Go(2);return n.startMove(e,n.moveTypes.Resize,"left")})),zo(),Uo()}}function aS(t,e){if(1&t){const t=jo();No(0,"div",6),$o("keydown",(function(e){return Ye(t),Go().keyboardAccess(e)})),No(1,"div",7),$o("mousedown",(function(e){Ye(t);const n=Go();return n.startMove(e,n.moveTypes.Move)}))("touchstart",(function(e){Ye(t);const n=Go();return n.startMove(e,n.moveTypes.Move)})),zo(),Mo(2,oS,21,0,"ng-container",8),zo()}if(2&t){const t=Go();oa("top",t.cropper.y1,"px")("left",t.cropper.x1,"px")("width",t.cropper.x2-t.cropper.x1,"px")("height",t.cropper.y2-t.cropper.y1,"px")("margin-left","center"===t.alignImage?t.marginLeft:null)("visibility",t.imageVisible?"visible":"hidden"),aa("rounded",t.roundCropper),ws(2),Ro("ngIf",!t.hideResizeSquares)}}const lS={Move:"move",Resize:"resize",Pinch:"pinch"};let cS=(()=>{class t{constructor(t,e){this.sanitizer=t,this.cd=e,this.Hammer="undefined"!=typeof window?window.Hammer:null,this.setImageMaxSizeRetries=0,this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.exifTransform={rotate:0,flip:!1},this.autoRotateSupported=new Promise(t=>{const e=new Image;e.onload=()=>{t(1===e.width&&2===e.height)},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="}),this.stepSize=3,this.marginLeft="0px",this.imageVisible=!1,this.moveTypes=lS,this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage="center",this.disabled=!1,this.imageCropped=new Yl,this.startCropImage=new Yl,this.imageLoaded=new Yl,this.cropperReady=new Yl,this.loadImageFailed=new Yl,this.initCropper()}ngOnChanges(t){this.cropperStaticHeight&&this.cropperStaticWidth&&(this.hideResizeSquares=!0,this.cropperMinWidth=this.cropperStaticWidth,this.cropperMinHeight=this.cropperStaticHeight,this.maintainAspectRatio=!1),this.onChangesInputImage(t),this.originalImage&&this.originalImage.complete&&this.exifTransform&&(t.containWithinAspectRatio||t.canvasRotation)&&this.transformOriginalImage(),t.cropper&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.checkCropperPosition(!1),this.doAutoCrop(),this.cd.markForCheck()),t.aspectRatio&&this.imageVisible&&this.resetCropperPosition(),t.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop())}onChangesInputImage(t){(t.imageChangedEvent||t.imageURL||t.imageBase64||t.imageFile)&&this.initCropper(),t.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),t.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),t.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),t.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){return this.imageChangedEvent&&this.imageChangedEvent.target&&this.imageChangedEvent.target.files&&this.imageChangedEvent.target.files.length>0}setCssTransform(){this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("scaleX("+(this.transform.scale||1)*(this.transform.flipH?-1:1)+")scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+")rotate("+(this.transform.rotate||0)+"deg)")}ngOnInit(){this.stepSize=this.initialStepSize,this.activatePinchGesture()}initCropper(){this.imageVisible=!1,this.transformedImage=null,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.originalSize={width:0,height:0},this.transformedSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}loadImage(t,e){this.isValidImageType(e)?this.loadBase64Image(t):this.loadImageFailed.emit()}loadImageFile(t){const e=new FileReader;e.onload=e=>this.loadImage(e.target.result,t.type),e.readAsDataURL(t)}isValidImageType(t){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(t)}loadBase64Image(t){this.autoRotateSupported.then(e=>this.checkExifAndLoadBase64Image(t,e)).then(()=>this.transformOriginalImage()).catch(t=>{this.loadImageFailed.emit(),this.originalImage=null,this.originalBase64=null,console.error(t)})}checkExifAndLoadBase64Image(t,e){return new Promise((n,i)=>{this.originalImage=new Image,this.originalImage.onload=()=>{this.originalBase64=t,this.exifTransform=function(t){switch("string"==typeof t&&(t=function(t){const e=new DataView(function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");const e=atob(t),n=e.length,i=new Uint8Array(n);for(let s=0;s<n;s++)i[s]=e.charCodeAt(s);return i.buffer}(t));if(65496!=e.getUint16(0,!1))return-2;const n=e.byteLength;let i=2;for(;i<n;){if(e.getUint16(i+2,!1)<=8)return-1;const t=e.getUint16(i,!1);if(i+=2,65505==t){if(1165519206!=e.getUint32(i+=2,!1))return-1;const t=18761==e.getUint16(i+=6,!1);i+=e.getUint32(i+4,t);const n=e.getUint16(i,t);i+=2;for(let s=0;s<n;s++)if(274==e.getUint16(i+12*s,t))return e.getUint16(i+12*s+8,t)}else{if(65280!=(65280&t))break;i+=e.getUint16(i,!1)}}return-1}(t)),t){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}(e?-1:t),this.originalSize.width=this.originalImage.naturalWidth,this.originalSize.height=this.originalImage.naturalHeight,n()},this.originalImage.onerror=i,this.originalImage.src=t})}loadImageFromURL(t){const e=new Image;e.onerror=()=>this.loadImageFailed.emit(),e.onload=()=>{const t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.width,t.height=e.height,n.drawImage(e,0,0),this.loadBase64Image(t.toDataURL())},e.crossOrigin="anonymous",e.src=t}transformOriginalImage(){if(!this.originalImage||!this.originalImage.complete||!this.exifTransform)return Promise.reject(new Error("No image loaded"));const t=this.transformImageBase64();return this.setTransformedImage(t)}transformImageBase64(){const t=this.canvasRotation+this.exifTransform.rotate;if(0===t&&!this.exifTransform.flip&&!this.containWithinAspectRatio)return this.originalBase64;const e=this.getTransformedSize(),n=document.createElement("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");return i.setTransform(this.exifTransform.flip?-1:1,0,0,1,n.width/2,n.height/2),i.rotate(Math.PI*(t/2)),i.drawImage(this.originalImage,-this.originalSize.width/2,-this.originalSize.height/2),n.toDataURL()}getTransformedSize(){const t=this.canvasRotation+this.exifTransform.rotate;if(this.containWithinAspectRatio){if(t%2){const t=this.originalSize.height/this.aspectRatio;return{width:Math.max(this.originalSize.height,this.originalSize.width*this.aspectRatio),height:Math.max(this.originalSize.width,t)}}{const t=this.originalSize.width/this.aspectRatio;return{width:Math.max(this.originalSize.width,this.originalSize.height*this.aspectRatio),height:Math.max(this.originalSize.height,t)}}}return t%2?{height:this.originalSize.width,width:this.originalSize.height}:{width:this.originalSize.width,height:this.originalSize.height}}setTransformedImage(t){return new Promise(e=>{this.transformedBase64=t,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(t),this.transformedImage=new Image,this.transformedImage.onload=()=>{this.transformedSize.width=this.transformedImage.naturalWidth,this.transformedSize.height=this.transformedImage.naturalHeight,this.cd.markForCheck(),e()},this.transformedImage.src=this.transformedBase64})}imageLoadedInView(){null!=this.transformedImage&&(this.imageLoaded.emit(),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.resetCropperPosition(),this.cropperReady.emit(Object.assign({},this.maxSize)),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){return this.sourceImage&&this.sourceImage.nativeElement&&this.sourceImage.nativeElement.offsetWidth>0}onResize(){this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize()}activatePinchGesture(){if(this.Hammer){const t=new this.Hammer(this.wrapper.nativeElement);t.get("pinch").set({enable:!0}),t.on("pinchmove",this.onPinch.bind(this)),t.on("pinchend",this.pinchStop.bind(this)),t.on("pinchstart",this.startPinch.bind(this))}else Ii()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}resizeCropperPosition(){const t=this.sourceImage.nativeElement;this.maxSize.width===t.offsetWidth&&this.maxSize.height===t.offsetHeight||(this.cropper.x1=this.cropper.x1*t.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*t.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*t.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*t.offsetHeight/this.maxSize.height)}resetCropperPosition(){const t=this.sourceImage.nativeElement;if(this.cropperStaticHeight&&this.cropperStaticWidth)this.cropper.x1=0,this.cropper.x2=t.offsetWidth>this.cropperStaticWidth?this.cropperStaticWidth:t.offsetWidth,this.cropper.y1=0,this.cropper.y2=t.offsetHeight>this.cropperStaticHeight?this.cropperStaticHeight:t.offsetHeight;else if(this.maintainAspectRatio)if(t.offsetWidth/this.aspectRatio<t.offsetHeight){this.cropper.x1=0,this.cropper.x2=t.offsetWidth;const e=t.offsetWidth/this.aspectRatio;this.cropper.y1=(t.offsetHeight-e)/2,this.cropper.y2=this.cropper.y1+e}else{this.cropper.y1=0,this.cropper.y2=t.offsetHeight;const e=t.offsetHeight*this.aspectRatio;this.cropper.x1=(t.offsetWidth-e)/2,this.cropper.x2=this.cropper.x1+e}else this.cropper.x1=0,this.cropper.x2=t.offsetWidth,this.cropper.y1=0,this.cropper.y2=t.offsetHeight;this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(t){this.changeKeyboardStepSize(t),this.keyboardMoveCropper(t)}changeKeyboardStepSize(t){t.key>="1"&&t.key<="9"&&(this.stepSize=+t.key)}keyboardMoveCropper(t){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(t.key))return;const e=t.shiftKey?lS.Resize:lS.Move,n=t.altKey?this.getInvertedPositionForKey(t.key):this.getPositionForKey(t.key),i=this.getEventForKey(t.key,this.stepSize);t.preventDefault(),t.stopPropagation(),this.startMove({clientX:0,clientY:0},e,n),this.moveImg(i),this.moveStop()}getPositionForKey(t){switch(t){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}getInvertedPositionForKey(t){switch(t){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}getEventForKey(t,e){switch(t){case"ArrowUp":return{clientX:0,clientY:-1*e};case"ArrowRight":return{clientX:e,clientY:0};case"ArrowDown":return{clientX:0,clientY:e};case"ArrowLeft":default:return{clientX:-1*e,clientY:0}}}startMove(t,e,n=null){this.moveStart&&this.moveStart.active&&this.moveStart.type===lS.Pinch||(t.preventDefault&&t.preventDefault(),this.moveStart=Object.assign({active:!0,type:e,position:n,clientX:this.getClientX(t),clientY:this.getClientY(t)},this.cropper))}startPinch(t){this.safeImgDataUrl&&(t.preventDefault&&t.preventDefault(),this.moveStart=Object.assign({active:!0,type:lS.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2},this.cropper))}moveImg(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===lS.Move?(this.move(t),this.checkCropperPosition(!0)):this.moveStart.type===lS.Resize&&(this.cropperStaticWidth||this.cropperStaticHeight||this.resize(t),this.checkCropperPosition(!1)),this.cd.detectChanges())}onPinch(t){this.moveStart.active&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),this.moveStart.type===lS.Pinch&&(this.resize(t),this.checkCropperPosition(!1)),this.cd.detectChanges())}setMaxSize(){if(this.sourceImage){const t=this.sourceImage.nativeElement;this.maxSize.width=t.offsetWidth,this.maxSize.height=t.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){this.transformedImage?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.transformedImage.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.transformedImage.height*this.maxSize.height):20}checkCropperPosition(t=!1){this.cropper.x1<0&&(this.cropper.x2-=t?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=t?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=t?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=t?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}moveStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}move(t){const e=this.getClientX(t)-this.moveStart.clientX,n=this.getClientY(t)-this.moveStart.clientY;this.cropper.x1=this.moveStart.x1+e,this.cropper.y1=this.moveStart.y1+n,this.cropper.x2=this.moveStart.x2+e,this.cropper.y2=this.moveStart.y2+n}resize(t){const e=this.getClientX(t)-this.moveStart.clientX,n=this.getClientY(t)-this.moveStart.clientY;switch(this.moveStart.position){case"left":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth);break;case"topleft":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"top":this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"topright":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"right":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth);break;case"bottomright":this.cropper.x2=Math.max(this.moveStart.x2+e,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottom":this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottomleft":this.cropper.x1=Math.min(this.moveStart.x1+e,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"center":const i=t.scale,s=Math.abs(this.moveStart.x2-this.moveStart.x1)*i,r=Math.abs(this.moveStart.y2-this.moveStart.y1)*i,o=this.cropper.x1,a=this.cropper.y1;this.cropper.x1=Math.min(this.moveStart.clientX-s/2,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.clientY-r/2,this.cropper.y2-this.cropperScaledMinHeight),this.cropper.x2=Math.max(this.moveStart.clientX+s/2,o+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.clientY+r/2,a+this.cropperScaledMinHeight)}this.maintainAspectRatio&&this.checkAspectRatio()}checkAspectRatio(){let t=0,e=0;switch(this.moveStart.position){case"top":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"bottom":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"topleft":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(0-this.cropper.x1,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x1+=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"topright":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(0-this.cropper.y1,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y1+=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"right":case"bottomright":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(this.cropper.x2-this.maxSize.width,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x2-=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"left":case"bottomleft":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,t=Math.max(0-this.cropper.x1,0),e=Math.max(this.cropper.y2-this.maxSize.height,0),(t>0||e>0)&&(this.cropper.x1+=e*this.aspectRatio>t?e*this.aspectRatio:t,this.cropper.y2-=e*this.aspectRatio>t?e:t/this.aspectRatio);break;case"center":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio;const n=Math.max(0-this.cropper.x1,0),i=Math.max(this.cropper.x2-this.maxSize.width,0),s=Math.max(this.cropper.y2-this.maxSize.height,0),r=Math.max(0-this.cropper.y1,0);(n>0||i>0||s>0||r>0)&&(this.cropper.x1+=s*this.aspectRatio>n?s*this.aspectRatio:n,this.cropper.x2-=r*this.aspectRatio>i?r*this.aspectRatio:i,this.cropper.y1+=r*this.aspectRatio>i?r:i/this.aspectRatio,this.cropper.y2-=s*this.aspectRatio>n?s:n/this.aspectRatio)}}doAutoCrop(){this.autoCrop&&this.crop()}crop(){if(this.sourceImage&&this.sourceImage.nativeElement&&null!=this.transformedImage){this.startCropImage.emit();const t=this.getImagePosition(),e=t.x2-t.x1,n=t.y2-t.y1,i=document.createElement("canvas");i.width=e,i.height=n;const s=i.getContext("2d");if(s){null!=this.backgroundColor&&(s.fillStyle=this.backgroundColor,s.fillRect(0,0,e,n));const r=(this.transform.scale||1)*(this.transform.flipH?-1:1),o=(this.transform.scale||1)*(this.transform.flipV?-1:1);s.setTransform(r,0,0,o,this.transformedSize.width/2,this.transformedSize.height/2),s.translate(-t.x1/r,-t.y1/o),s.rotate((this.transform.rotate||0)*Math.PI/180),s.drawImage(this.transformedImage,-this.transformedSize.width/2,-this.transformedSize.height/2);const a={width:e,height:n,imagePosition:t,cropperPosition:Object.assign({},this.cropper)};this.containWithinAspectRatio&&(a.offsetImagePosition=this.getOffsetImagePosition());const l=this.getResizeRatio(e,n);return 1!==l&&(a.width=Math.round(e*l),a.height=this.maintainAspectRatio?Math.round(a.width/this.aspectRatio):Math.round(n*l),function(t,e,n){const i=t.width,s=t.height,r=i/(e=Math.round(e)),o=s/(n=Math.round(n)),a=Math.ceil(r/2),l=Math.ceil(o/2),c=t.getContext("2d");if(c){const h=c.getImageData(0,0,i,s),u=c.createImageData(e,n),d=h.data,p=u.data;for(let t=0;t<n;t++)for(let n=0;n<e;n++){const c=4*(n+t*e),h=t*o;let u=0,g=0,m=0,f=0,_=0,v=0,y=0;const b=Math.floor(n*r),w=Math.floor(t*o);let C=Math.ceil((n+1)*r),S=Math.ceil((t+1)*o);C=Math.min(C,i),S=Math.min(S,s);for(let t=w;t<S;t++){const e=Math.abs(h-t)/l,s=n*r,o=e*e;for(let n=b;n<C;n++){const e=Math.abs(s-n)/a,r=Math.sqrt(o+e*e);if(r>=1)continue;u=2*r*r*r-3*r*r+1;const l=4*(n+t*i);y+=u*d[l+3],m+=u,d[l+3]<255&&(u=u*d[l+3]/250),f+=u*d[l],_+=u*d[l+1],v+=u*d[l+2],g+=u}}p[c]=f/g,p[c+1]=_/g,p[c+2]=v/g,p[c+3]=y/m}t.width=e,t.height=n,c.putImageData(u,0,0)}}(i,a.width,a.height)),a.base64=this.cropToBase64(i),this.imageCropped.emit(a),a}}return null}getImagePosition(){const t=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth,e={x1:Math.round(this.cropper.x1*t),y1:Math.round(this.cropper.y1*t),x2:Math.round(this.cropper.x2*t),y2:Math.round(this.cropper.y2*t)};return this.containWithinAspectRatio||(e.x1=Math.max(e.x1,0),e.y1=Math.max(e.y1,0),e.x2=Math.min(e.x2,this.transformedSize.width),e.y2=Math.min(e.y2,this.transformedSize.height)),e}getOffsetImagePosition(){const t=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth;let e,n;(this.canvasRotation+this.exifTransform.rotate)%2?(e=(this.transformedSize.width-this.originalSize.height)/2,n=(this.transformedSize.height-this.originalSize.width)/2):(e=(this.transformedSize.width-this.originalSize.width)/2,n=(this.transformedSize.height-this.originalSize.height)/2);const i={x1:Math.round(this.cropper.x1*t)-e,y1:Math.round(this.cropper.y1*t)-n,x2:Math.round(this.cropper.x2*t)-e,y2:Math.round(this.cropper.y2*t)-n};return this.containWithinAspectRatio||(i.x1=Math.max(i.x1,0),i.y1=Math.max(i.y1,0),i.x2=Math.min(i.x2,this.transformedSize.width),i.y2=Math.min(i.y2,this.transformedSize.height)),i}cropToBase64(t){return t.toDataURL("image/"+this.format,this.getQuality())}getQuality(){return Math.min(1,Math.max(0,this.imageQuality/100))}getResizeRatio(t,e){const n=this.resizeToWidth/t,i=this.resizeToHeight/e,s=new Array;this.resizeToWidth>0&&s.push(n),this.resizeToHeight>0&&s.push(i);const r=0===s.length?1:Math.min(...s);return r>1&&!this.onlyScaleDown?r:Math.min(r,1)}getClientX(t){return(t.touches&&t.touches[0]?t.touches[0].clientX:t.clientX)||0}getClientY(t){return(t.touches&&t.touches[0]?t.touches[0].clientY:t.clientY)||0}}return t.\u0275fac=function(e){return new(e||t)(Ao(Du),Ao(Qr))},t.\u0275cmp=pe({type:t,selectors:[["image-cropper"]],viewQuery:function(t,e){var n;1&t&&(cc(iS,!0),hc(sS,!0)),2&t&&(lc(n=gc())&&(e.wrapper=n.first),lc(n=gc())&&(e.sourceImage=n.first))},hostVars:4,hostBindings:function(t,e){1&t&&$o("resize",(function(){return e.onResize()}),!1,Bn)("mousemove",(function(t){return e.moveImg(t)}),!1,Hn)("touchmove",(function(t){return e.moveImg(t)}),!1,Hn)("mouseup",(function(){return e.moveStop()}),!1,Hn)("touchend",(function(){return e.moveStop()}),!1,Hn),2&t&&(oa("text-align",e.alignImage),aa("disabled",e.disabled))},inputs:{format:"format",maintainAspectRatio:"maintainAspectRatio",transform:"transform",aspectRatio:"aspectRatio",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",backgroundColor:"backgroundColor"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed"},features:[Oa],decls:5,vars:10,consts:[["wrapper",""],["class","source-image",3,"src","visibility","transform","load",4,"ngIf"],[1,"overlay"],["class","cropper","tabindex","0",3,"rounded","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"source-image",3,"src","load"],["sourceImage",""],["tabindex","0",1,"cropper",3,"keydown"],[1,"move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"resize","topleft",3,"mousedown","touchstart"],[1,"square"],[1,"resize","top"],[1,"resize","topright",3,"mousedown","touchstart"],[1,"resize","right"],[1,"resize","bottomright",3,"mousedown","touchstart"],[1,"resize","bottom"],[1,"resize","bottomleft",3,"mousedown","touchstart"],[1,"resize","left"],[1,"resize-bar","top",3,"mousedown","touchstart"],[1,"resize-bar","right",3,"mousedown","touchstart"],[1,"resize-bar","bottom",3,"mousedown","touchstart"],[1,"resize-bar","left",3,"mousedown","touchstart"]],template:function(t,e){1&t&&(No(0,"div",null,0),Mo(2,rS,2,5,"img",1),Fo(3,"div",2),Mo(4,aS,3,15,"div",3),zo()),2&t&&(oa("background",e.imageVisible&&e.backgroundColor,ts),ws(2),Ro("ngIf",e.safeImgDataUrl),ws(1),oa("width",e.maxSize.width,"px")("height",e.maxSize.height,"px")("margin-left","center"===e.alignImage?e.marginLeft:null),ws(1),Ro("ngIf",e.imageVisible))},directives:[Zh],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color,#fff) solid 100vw;top:0;left:0}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:0 0;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color,rgba(255,255,255,.3)) solid 100vw;touch-action:none}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;bottom:0;left:0;right:0;pointer-events:none;border:1px dashed;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:focus .move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%] .square[_ngcontent-%COMP%]{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw rgba(255,255,255,.3);box-shadow:0 0 0 100vw var(--cropper-outline-color,rgba(255,255,255,.3))}@media (orientation:portrait){[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{outline-width:100vh}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh rgba(255,255,255,.3);box-shadow:0 0 0 100vh var(--cropper-outline-color,rgba(255,255,255,.3))}}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),t})(),hS=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},imports:[[nu]]}),t})();function uS(t){const{subscriber:e,counter:n,period:i}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}function dS(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function pS(t,e){const n=e?"":"none";dS(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function gS(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function mS(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function fS(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function _S(t,e,n){const{top:i,bottom:s,left:r,right:o}=t;return n>=i&&n<=s&&e>=r&&e<=o}function vS(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function yS(t,e,n,i){const{top:s,right:r,bottom:o,left:a,width:l,height:c}=t,h=l*e,u=c*e;return i>s-u&&i<o+u&&n>a-h&&n<r+h}class bS{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:fS(t)})})}handleScroll(t){const e=t.target,n=this.positions.get(e);if(!n)return null;const i=e===this._document?e.documentElement:e,s=n.scrollPosition;let r,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();r=t.top,o=t.left}else r=e.scrollTop,o=e.scrollLeft;const a=s.top-r,l=s.left-o;return this.positions.forEach((t,n)=>{t.clientRect&&e!==n&&i.contains(n)&&vS(t.clientRect,a,l)}),s.top=r,s.left=o,{top:a,left:l}}}function wS(t){const e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<n.length;s++)n[s].removeAttribute("id");return"canvas"===i?ES(t,e):"input"!==i&&"select"!==i&&"textarea"!==i||IS(t,e),CS("canvas",t,e,ES),CS("input, textarea, select",t,e,IS),e}function CS(t,e,n,i){const s=e.querySelectorAll(t);if(s.length){const e=n.querySelectorAll(t);for(let t=0;t<s.length;t++)i(s[t],e[t])}}let SS=0;function IS(t,e){e.value=t.value,"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${SS++}`)}function ES(t,e){const n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch(QP){}}const xS=b_({passive:!0}),PS=b_({passive:!1});class TS{constructor(t,e,n,i,s,r){this._config=e,this._document=n,this._ngZone=i,this._viewportRuler=s,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new E,this._pointerMoveSubscription=u.EMPTY,this._pointerUpSubscription=u.EMPTY,this._scrollSubscription=u.EMPTY,this._resizeSubscription=u.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new E,this.started=new E,this.released=new E,this.ended=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const n=t.target;return!!n&&(n===e||e.contains(n))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{t.preventDefault();const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._getDragStartDelay(t)))return void this._endDragSequence(t);this._dropContainer&&this._dropContainer.isDragging()||(this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()));const n=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,e);else{const t=this._activeTransform;t.x=n.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=n.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:t,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t),this._parentPositions=new bS(n,s),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=l_(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){return this._handles=t.map(t=>h_(t)),this._handles.forEach(t=>pS(t,!1)),this._toggleNativeDragInteractions(),this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=h_(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,PS),e.addEventListener("touchstart",this._pointerDown,xS)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?h_(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&DS(this._rootElement),DS(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}enableHandle(t){this._disabledHandles.delete(t)}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&DS(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&DS(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){AS(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,i=t.parentNode,s=this._preview=this._createPreviewElement(),r=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,t),t.style.display="none",this._document.body.appendChild(i.replaceChild(r,t)),(n=this._document,n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body).appendChild(s),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;var n;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){e.stopPropagation();const n=this.isDragging(),i=AS(e),s=!i&&0!==e.button,r=this._rootElement,o=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),n||s||o)return;this._handles.length&&(this._rootElementTapHighlight=r.style.webkitTapHighlightColor||"",r.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=fS(this._boundaryElement));const a=this._previewTemplate;this._pickupPositionInElement=a&&a.template&&!a.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){this._rootElement.style.display="",this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,n=e.getItemIndex(this),i=this._getPointerPositionOnPage(t),s=this._getDragDistance(this._getPointerPositionOnPage(t)),r=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:s}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s}),e.drop(this,n,this._initialContainer,r,s,this._initialIndex),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:i}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=kS(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,n=t?t.template:null;let i;if(n&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,s=t.viewContainer.createEmbeddedView(n,t.context);s.detectChanges(),i=OS(s,this._document),this._previewRef=s,t.matchSize?RS(i,e):i.style.transform=kS(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;i=wS(t),RS(i,t.getBoundingClientRect())}return dS(i.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),pS(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>i.classList.add(t)):i.classList.add(e)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=kS(t.left,t.top);const e=function(t){const e=getComputedStyle(t),n=mS(e,"transition-property"),i=n.find(t=>"transform"===t||"all"===t);if(!i)return 0;const s=n.indexOf(i),r=mS(e,"transition-duration"),o=mS(e,"transition-delay");return gS(r[s])+gS(o[s])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const n=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",n),t(),clearTimeout(i))},i=setTimeout(n,1.5*e);this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let n;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),n=OS(this._placeholderRef,this._document)):n=wS(this._rootElement),n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e){const n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,s=i?i.getBoundingClientRect():n,r=AS(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:s.left-n.left+(r.pageX-s.left-o.left),y:s.top-n.top+(r.pageY-s.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),n=AS(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,s=n.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=i,e.y=s,e.matrixTransform(t.inverse())}}return{x:i,y:s}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:i}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?i=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(n=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,s=this._boundaryRect,r=this._previewRect,o=s.top+e,a=s.bottom-(r.height-e);n=MS(n,s.left+t,s.right-(r.width-t)),i=MS(i,o,a)}return{x:n,y:i}}_updatePointerDirectionDelta(t){const{x:e,y:n}=t,i=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-s.x),o=Math.abs(n-s.y);return r>this._config.pointerDirectionChangeThreshold&&(i.x=e>s.x?1:-1,s.x=e),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>s.y?1:-1,s.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,pS(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,PS),t.removeEventListener("touchstart",this._pointerDown,xS)}_applyRootElementTransform(t,e){const n=kS(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const n=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===n.width&&0===n.height||0===i.width&&0===i.height)return;const s=n.left-i.left,r=i.right-n.right,o=n.top-i.top,a=i.bottom-n.bottom;n.width>i.width?(s>0&&(t+=s),r>0&&(t-=r)):t=0,n.height>i.height?(o>0&&(e+=o),a>0&&(e-=a)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:AS(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const n=t.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&vS(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}}function kS(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function MS(t,e,n){return Math.max(e,Math.min(n,t))}function DS(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function AS(t){return"t"===t.type[0]}function OS(t,e){const n=t.rootNodes;if(1===n.length&&n[0].nodeType===e.ELEMENT_NODE)return n[0];const i=e.createElement("div");return n.forEach(t=>i.appendChild(t)),i}function RS(t,e){t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.transform=kS(e.left,e.top)}function LS(t,e){return Math.max(0,Math.min(e,t))}class NS{constructor(t,e,n,i,s){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=()=>!0,this.beforeStarted=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.sorted=new E,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=u.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new E,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function(t=0,e=T_){return(!D_(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=T_),new b(n=>(n.add(e.schedule(uS,t,{subscriber:n,counter:0,period:t})),n))}(0,I_).pipe(r_(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode;1===this._verticalScrollDirection?FS(t,-2):2===this._verticalScrollDirection&&FS(t,2),1===this._horizontalScrollDirection?VS(t,-2):2===this._horizontalScrollDirection&&VS(t,2)})},this.element=h_(t),this._document=n,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new bS(n,s)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){const t=h_(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach(t=>t._startReceiving(this)),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}enter(t,e,n,i){let s;this.start(),null==i?(s=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===s&&(s=this._getItemIndexFromPointerPosition(t,e,n))):s=i;const r=this._activeDraggables,o=r.indexOf(t),a=t.getPlaceholderElement();let l=r[s];if(l===t&&(l=r[s+1]),o>-1&&r.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(a,e),r.splice(s,0,t)}else if(this._shouldEnterAsFirstChild(e,n)){const e=r[0].getRootElement();e.parentNode.insertBefore(a,e),r.unshift(t)}else h_(this.element).appendChild(a),r.push(t);a.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,n,i,s,r){this._reset(),null==r&&(r=n.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:s})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=h_(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?zS("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,n,i){if(this.sortingDisabled||!yS(this._clientRect,.05,e,n))return;const s=this._itemPositions,r=this._getItemIndexFromPointerPosition(t,e,n,i);if(-1===r&&s.length>0)return;const o="horizontal"===this._orientation,a=zS(s,e=>e.drag===t),l=s[r],c=l.clientRect,h=a>r?1:-1,u=this._getItemOffsetPx(s[a].clientRect,c,h),d=this._getSiblingOffsetPx(a,s,h),p=s.slice();!function(t,e,n){const i=LS(e,t.length-1),s=LS(n,t.length-1);if(i===s)return;const r=t[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)t[a]=t[a+o];t[s]=r}(s,a,r),this.sorted.next({previousIndex:a,currentIndex:r,container:this,item:t}),s.forEach((e,n)=>{if(p[n]===e)return;const i=e.drag===t,s=i?u:d,r=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=s,o?(r.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,vS(e.clientRect,0,s)):(r.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,vS(e.clientRect,s,0))}),this._previousSwap.overlaps=_S(c,e,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?i.x:i.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,i=0,s=0;if(this._parentPositions.positions.forEach((r,o)=>{o!==this._document&&r.clientRect&&!n&&yS(r.clientRect,.05,t,e)&&([i,s]=function(t,e,n,i){const s=US(e,i),r=jS(e,n);let o=0,a=0;if(s){const e=t.scrollTop;1===s?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(r){const e=t.scrollLeft;1===r?e>0&&(a=1):t.scrollWidth-e>t.clientWidth&&(a=2)}return[o,a]}(o,r.clientRect,t,e),(i||s)&&(n=o))}),!i&&!s){const{width:r,height:o}=this._viewportRuler.getViewportSize(),a={width:r,height:o,top:0,right:r,bottom:o,left:0};i=US(a,e),s=jS(a,t),n=window}!n||i===this._verticalScrollDirection&&s===this._horizontalScrollDirection&&n===this._scrollNode||(this._verticalScrollDirection=i,this._horizontalScrollDirection=s,this._scrollNode=n,(i||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_cacheParentPositions(){const t=h_(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:fS(e)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_reset(){this._isDragging=!1;const t=h_(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,n){const i="horizontal"===this._orientation,s=e[t].clientRect,r=e[t+-1*n];let o=s[i?"width":"height"]*n;if(r){const t=i?"left":"top",e=i?"right":"bottom";-1===n?o-=r.clientRect[t]-s[e]:o+=s[t]-r.clientRect[e]}return o}_getItemOffsetPx(t,e,n){const i="horizontal"===this._orientation;let s=i?e.left-t.left:e.top-t.top;return-1===n&&(s+=i?e.width-t.width:e.height-t.height),s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){const s=n[n.length-1].clientRect;return i?t>=s.right:e>=s.bottom}{const s=n[0].clientRect;return i?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,n,i){const s="horizontal"===this._orientation;return zS(this._itemPositions,({drag:r,clientRect:o},a,l)=>{if(r===t)return l.length<2;if(i){const t=s?i.x:i.y;if(r===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return s?e>=Math.floor(o.left)&&e<Math.floor(o.right):n>=Math.floor(o.top)&&n<Math.floor(o.bottom)})}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return _S(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(i=>i._canReceive(t,e,n))}_canReceive(t,e,n){if(!_S(this._clientRect,e,n)||!this.enterPredicate(t,this))return!1;const i=this._getShadowRoot().elementFromPoint(e,n);if(!i)return!1;const s=h_(this.element);return i===s||s.contains(i)}_startReceiving(t){const e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{vS(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=function(t){if(function(){if(null==__){const t="undefined"!=typeof document?document.head:null;__=!(!t||!t.createShadowRoot&&!t.attachShadow)}return __}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(h_(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}function zS(t,e){for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1}function FS(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function VS(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function US(t,e){const{top:n,bottom:i,height:s}=t,r=.05*s;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}function jS(t,e){const{left:n,right:i,width:s}=t,r=.05*s;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}const BS=b_({passive:!1,capture:!0});let HS=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new E,this.pointerUp=new E,this.scroll=new E,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.size&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.size&&(t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,BS)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,BS)}startDragging(t,e){if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:BS}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:BS}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances.has(t)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(Qt(Uc),Qt(Ih))},t.\u0275prov=ht({factory:function(){return new t(Qt(Uc),Qt(Ih))},token:t,providedIn:"root"}),t})();const $S={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let WS=(()=>{class t{constructor(t,e,n,i){this._document=t,this._ngZone=e,this._viewportRuler=n,this._dragDropRegistry=i}createDrag(t,e=$S){return new TS(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new NS(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(Qt(Ih),Qt(Uc),Qt(F_),Qt(HS))},t.\u0275prov=ht({factory:function(){return new t(Qt(Ih),Qt(Uc),Qt(F_),Qt(HS))},token:t,providedIn:"root"}),t})();const qS=new Ft("CDK_DRAG_PARENT"),GS=new Ft("CdkDropListGroup"),QS=new Ft("CDK_DRAG_CONFIG");let KS=0;const ZS=new Ft("CdkDropList");let YS=(()=>{class t{constructor(e,n,i,s,r,o,a){this.element=e,this._changeDetectorRef=i,this._dir=s,this._group=r,this._scrollDispatcher=o,this._destroyed=new E,this.connectedTo=[],this.id="cdk-drop-list-"+KS++,this.enterPredicate=()=>!0,this.dropped=new Yl,this.entered=new Yl,this.exited=new Yl,this.sorted=new Yl,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,a&&this._assignDefaults(a),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),r&&r._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=l_(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(R_(this._dir.value),r_(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const n=(i=this.connectedTo,Array.isArray(i)?i:[i]).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);var i;if(this._group&&this._group._items.forEach(t=>{-1===n.indexOf(t)&&n.push(t)}),!this._scrollableParentsResolved&&this._scrollDispatcher){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=l_(this.sortingDisabled),e.autoScrollDisabled=l_(this.autoScrollDisabled),e.connectedTo(n.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:n,sortingDisabled:i,listAutoScrollDisabled:s,listOrientation:r}=t;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=s&&s,this.orientation=r||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(WS),Ao(Qr),Ao(p_,8),Ao(GS,12),Ao(z_),Ao(QS,8))},t.\u0275dir=ye({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(Ea("id",e.id),aa("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[Ha([{provide:GS,useValue:void 0},{provide:ZS,useExisting:t}])]}),t._dropLists=[],t})();const XS=new Ft("CdkDragHandle"),JS=new Ft("CdkDragPlaceholder"),tI=new Ft("CdkDragPreview");let eI=(()=>{class t{constructor(t,e,n,i,s,r,o,a,l,c){this.element=t,this.dropContainer=e,this._document=n,this._ngZone=i,this._viewContainerRef=s,this._dir=o,this._changeDetectorRef=l,this._selfHandle=c,this._destroyed=new E,this.started=new Yl,this.released=new Yl,this.ended=new Yl,this.entered=new Yl,this.exited=new Yl,this.dropped=new Yl,this.moved=new b(t=>{const e=this._dragRef.moved.pipe(z(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=a.createDrag(t,{dragStartThreshold:r&&null!=r.dragStartThreshold?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&null!=r.pointerDirectionChangeThreshold?r.pointerDirectionChangeThreshold:5,zIndex:null==r?void 0:r.zIndex}),this._dragRef.data=this,r&&this._assignDefaults(r),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=l_(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(hm(1),r_(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(R_(this._handles),pv(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),gm(t=>G(...t.map(t=>t._stateChanges.pipe(R_(t))))),r_(this._destroyed)).subscribe(t=>{const e=this._dragRef,n=t.element.nativeElement;t.disabled?e.disableHandle(n):e.enableHandle(n)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,n=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?nI(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?nI(this.element.nativeElement,t):h_(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const e=this._dir,n=this.dragStartDelay,i=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof n&&n?n:c_(n),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(i).withPreviewTemplate(s),e&&t.withDirection(e.value)}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:n,constrainPosition:i,previewClass:s,boundaryElement:r,draggingDisabled:o,rootElementSelector:a}=t;this.disabled=null!=o&&o,this.dragStartDelay=n||0,e&&(this.lockAxis=e),i&&(this.constrainPosition=i),s&&(this.previewClass=s),r&&(this.boundaryElement=r),a&&(this.rootElementSelector=a)}}return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(ZS,12),Ao(Ih),Ao(Uc),Ao(yl),Ao(QS,8),Ao(p_,8),Ao(WS),Ao(Qr),Ao(XS,10))},t.\u0275dir=ye({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,n){var i;1&t&&(dc(n,tI,!0),dc(n,JS,!0),dc(n,XS,!0)),2&t&&(lc(i=gc())&&(e._previewTemplate=i.first),lc(i=gc())&&(e._placeholderTemplate=i.first),lc(i=gc())&&(e._handles=i))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&aa("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Ha([{provide:qS,useExisting:t}]),Oa]}),t})();function nI(t,e){let n=t.parentElement;for(;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}let iI=(()=>{class t{}return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[WS],imports:[V_]}),t})();var sI=n("EcEN");function rI(t,e){1&t&&(No(0,"div",3),Fo(1,"img-selection"),zo())}function oI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openSmall()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",11),zo()}}function aI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openSmall()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",12),zo()}}function lI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).openFull()})),No(1,"span"),ba(2,"Expand"),zo(),Fo(3,"i",12),zo()}}function cI(t,e){if(1&t){const t=jo();No(0,"button",10),$o("click",(function(){return Ye(t),Go(3).onClose()})),No(1,"span"),ba(2,"Close"),zo(),Fo(3,"i",13),zo()}}function hI(t,e){if(1&t&&(No(0,"div",8),Mo(1,oI,4,0,"button",9),Mo(2,aI,4,0,"button",9),Mo(3,lI,4,0,"button",9),Mo(4,cI,4,0,"button",9),zo()),2&t){const t=Go(2);ws(1),Ro("ngIf","full"===t.stateDisplayed),ws(1),Ro("ngIf","closed"===t.stateDisplayed),ws(1),Ro("ngIf","small"===t.stateDisplayed),ws(1),Ro("ngIf","closed"!==t.stateDisplayed)}}const uI=function(t,e,n,i){return{"wz-img-manager__module--small":t,"wz-img-manager__module--full":e,"wz-img-manager__module--window":n,"wz-img-manager__module--edit":i}},dI=function(t){return{"wz-block--window":t}};function pI(t,e){if(1&t){const t=jo();No(0,"div",4),Mo(1,hI,5,4,"div",5),No(2,"div",6),No(3,"img-tabs",7),$o("imgManagerClosed",(function(){return Ye(t),Go().onImgManagerClosed()}))("currentTab",(function(e){return Ye(t),Go().setCurrentTab(e)})),zo(),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",Ul(6,uI,"small"===t.stateDisplayed,"full"===t.stateDisplayed,"window"===t.stateDisplayed,t.hideTab)),ws(1),Ro("ngIf","window"!==t.stateDisplayed),ws(1),Ro("ngClass",zl(11,dI,"window"===t.stateDisplayed)),ws(1),Ro("stateDisplayed",t.stateDisplayed)("multipleImgMode",t.multipleImgMode)("listDisplayed",t.listDisplayed)}}const gI=["dragAndDropBox"];function mI(t,e){1&t&&(No(0,"div",8),Fo(1,"wz-loader",9),zo()),2&t&&(ws(1),Ro("small",!0)("position","relative"))}function fI(t,e){1&t&&Fo(0,"img",15),2&t&&Ro("src",Go(2).assetsIcon,Ji)}function _I(t,e){if(1&t&&(Vo(0),No(1,"div",10),Mo(2,fI,1,1,"img",11),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),No(6,"p",12),ba(7),Wl(8,"translate"),zo(),No(9,"div",13),Fo(10,"i",14),ba(11),Wl(12,"translate"),zo(),Uo()),2&t){const t=Go();ws(2),Ro("ngIf",t.assetsIcon),ws(2),wa(ql(5,4,"ImgManager.ImgUpload.dropImg")),ws(3),wa(ql(8,6,"ImgManager.ImgUpload.or")),ws(4),Ca("",ql(12,8,"ImgManager.ImgUpload.selectImg")," ")}}const vI=function(t){return{"img-upload--small":t}},yI=function(t){return{"img-upload__container--small":t}};function bI(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Uo()),2&t&&(ws(1),wa(ql(2,1,"ImgManager.UploadList.imgSuccessImport")))}function wI(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Uo()),2&t&&(ws(1),wa(ql(2,1,"ImgManager.UploadList.imgSuccessImportOne")))}function CI(t,e){if(1&t){const t=jo();No(0,"div",16),No(1,"img-card",17),$o("toggleImgSelected",(function(){Ye(t);const n=e.index;return Go().onToggleSelectImg(n)}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),No(2,"div",18),No(3,"button",19),Fo(4,"i",13),zo(),zo(),zo()}if(2&t){const t=e.$implicit,n=Go();ws(1),Ro("picture",t)("stateDisplayed",n.stateDisplayed)}}const SI=function(t){return{smallDisplay:t}},II=function(t,e){return{"upload-list__scroll--smallDisplay":t,"upload-list__scroll--window":e}},EI=["imgUploadedImg"],xI=function(t){return{"is-active":t}};function PI(t,e){if(1&t&&(No(0,"li",12),No(1,"a"),ba(2),Wl(3,"translate"),zo(),zo()),2&t){const t=Go();Ro("ngClass",zl(4,xI,t.tabActive===t.tabs[3])),ws(2),wa(ql(3,2,"ImgManager.Tabs.Editor"))}}function TI(t,e){if(1&t&&Fo(0,"images-view",21),2&t){const t=Go(2);Ro("stateDisplayed",t.stateDisplayed)("listDisplayed",!1)("multipleImgMode",t.multipleImgMode)("tabDisplayed",t.tabActive)("maxLengthCardShow","small"===t.stateDisplayed?16:8)("fullSize",!1)}}const kI=function(t,e){return{"img-tabs__tabsFirst--small":t,"img-tabs__tabsFirst--window":e}},MI=function(t){return{"img-tabs__tabsFirst__list--upload":t}};function DI(t,e){if(1&t){const t=jo();No(0,"div",13),No(1,"div",14),No(2,"img-upload",15),$o("imgUploaded",(function(e){return Ye(t),Go().onImgUploaded(e)})),zo(),zo(),No(3,"div",16),Mo(4,TI,1,6,"images-view",17),No(5,"div",18),Fo(6,"upload-list",19,20),zo(),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",Fl(8,kI,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),ws(2),Ro("stateDisplayed",t.stateDisplayed),ws(1),Ro("ngClass",zl(11,MI,t.imgUpload)),ws(1),Ro("ngIf",!t.imgUpload),ws(1),Ro("hidden",!t.imgUpload),ws(1),Ro("stateDisplayed",t.stateDisplayed)("tabDisplayed",t.tabActive)("multipleImgMode",t.multipleImgMode)}}function AI(t,e){if(1&t&&(No(0,"div",22),No(1,"div",23),Fo(2,"images-view",24),zo(),zo()),2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)("listDisplayed",t.listDisplayed)("multipleImgMode",t.multipleImgMode)("tabDisplayed",t.tabActive)("fullSize",!0)}}function OI(t,e){if(1&t){const t=jo();No(0,"div",25),No(1,"div",23),No(2,"pexels-lib",7),$o("showImgUploaded",(function(){return Ye(t),Go().onShowImgUploaded()})),zo(),zo(),zo()}if(2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)}}function RI(t,e){if(1&t){const t=jo();No(0,"div",26),No(1,"div",23),No(2,"img-editor",27),$o("editClosed",(function(e){return Ye(t),Go().onEditClosed(e)})),zo(),zo(),zo()}if(2&t){const t=Go();ws(2),Ro("stateDisplayed",t.stateDisplayed)("imgToEdit",t.imgToEdit)}}const LI=function(t){return{small:t}},NI=function(t,e){return{"tabs--notWindow":t,"tabs--notDisplayed":e}},zI=function(t){return{"img-tabs__canva--window":t}},FI=["outerElement"],VI=function(t){return{"pexels-lib__search--smallDisplay":t}};function UI(t,e){if(1&t){const t=jo();No(0,"div",8),No(1,"wz-input-search",9),$o("ngModelChange",(function(e){return Ye(t),Go().searchValue=e}))("changeDebounced",(function(){return Ye(t),Go().onSearchNameChanged()})),Wl(2,"translate"),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(6,VI,"small"===t.stateDisplayed)),ws(1),Ro("ngModel",t.searchValue)("placeholder",ql(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===t.stateDisplayed)}}function jI(t,e){if(1&t&&(No(0,"p",14),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(2);ws(1),Sa("",ql(2,2,"ImgManager.PexelLib.nbImgFound")," : ",t.nbResult,"")}}function BI(t,e){1&t&&(Vo(0),ba(1," \xa0"),Fo(2,"i",35),Uo())}function HI(t,e){if(1&t){const t=jo();No(0,"div",32),$o("click",(function(){Ye(t);const e=Go().$implicit;return Go(3).uploadPhoto(e,e.src.large2x)})),No(1,"span"),ba(2),Wl(3,"translate"),zo(),No(4,"span",33),Fo(5,"i",34),zo(),Mo(6,BI,3,0,"ng-container",6),zo()}if(2&t){const t=Go().$implicit;ws(2),wa(ql(3,2,"ImgManager.PexelLib.import")),ws(4),Ro("ngIf",t.uploaded)}}function $I(t,e){1&t&&(Vo(0),ba(1),Wl(2,"translate"),Fo(3,"span",36),Uo()),2&t&&(ws(1),Ca(" ",ql(2,1,"ImgManager.PexelLib.importation")," "))}const WI=function(t){return{"is-hoverable":t}};function qI(t,e){if(1&t){const t=jo();No(0,"div",17),Fo(1,"img",18),No(2,"div",19),No(3,"span",20),ba(4),zo(),No(5,"div",21),No(6,"div",22),No(7,"button",23),Mo(8,HI,7,4,"div",24),Mo(9,$I,4,3,"ng-container",6),zo(),zo(),No(10,"div",25),No(11,"div",26),No(12,"div",27),No(13,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.portrait)})),No(14,"p"),ba(15),Wl(16,"translate"),zo(),Fo(17,"i",29),zo(),No(18,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.landscape)})),No(19,"p"),ba(20),Wl(21,"translate"),zo(),Fo(22,"i",30),zo(),No(23,"div",28),$o("click",(function(){Ye(t);const n=e.$implicit;return Go(3).uploadPhoto(n,n.src.large2x)})),No(24,"p"),ba(25),Wl(26,"translate"),zo(),Fo(27,"i",31),zo(),zo(),zo(),zo(),zo(),zo(),zo()}if(2&t){const t=e.$implicit;ws(1),Ro("alt",t.src.medium)("src",t.src.medium,Ji),ws(3),Sa(" ",t.width," x ",t.height," "),ws(1),Ro("ngClass",zl(16,WI,!t.uploading)),ws(3),Ro("ngIf",!t.uploading),ws(1),Ro("ngIf",t.uploading),ws(6),wa(ql(16,10,"ImgManager.PexelLib.portrait")),ws(5),wa(ql(21,12,"ImgManager.PexelLib.landscape")),ws(5),wa(ql(26,14,"ImgManager.PexelLib.original"))}}function GI(t,e){if(1&t&&(No(0,"div",15),Mo(1,qI,28,18,"div",16),zo()),2&t){const t=e.$implicit;Ro("@listAnimation",t.photos.length),ws(1),Ro("ngForOf",t.photos)}}function QI(t,e){if(1&t&&(No(0,"div",10),Mo(1,jI,3,4,"p",11),No(2,"div",12),Mo(3,GI,2,2,"div",13),zo(),zo()),2&t){const t=Go();ws(1),Ro("ngIf",t.nbResult),ws(2),Ro("ngForOf",t.photosColumns)}}function KI(t,e){1&t&&(Vo(0),Fo(1,"wz-loader"),Uo())}function ZI(t,e){1&t&&(No(0,"div",37),No(1,"wz-alert",38),ba(2),Wl(3,"translate"),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(1),Ro("warning",!0),ws(1),Ca(" ",ql(3,3,"ImgManager.PexelLib.noResult")," "))}const YI=function(t){return{"pexels-lib__scroll--smallDisplay":t}};function XI(t,e){1&t&&Fo(0,"i",25)}function JI(t,e){1&t&&Fo(0,"i",26)}function tE(t,e){if(1&t){const t=jo();No(0,"button",22),$o("click",(function(){return Ye(t),Go(2).onToggleImgSelected()})),Mo(1,XI,1,0,"i",23),Mo(2,JI,1,0,"i",24),No(3,"span"),ba(4),Wl(5,"translate"),zo(),zo()}if(2&t){const t=Go(2);ws(1),Ro("ngIf",!t.picture.selected),ws(1),Ro("ngIf",t.picture.selected),ws(2),wa(ql(5,3,"ImgManager.ImgCard.select"))}}function eE(t,e){if(1&t){const t=jo();No(0,"div",12),No(1,"button",13),Fo(2,"i",14),No(3,"span"),ba(4),zo(),zo(),No(5,"button",15),$o("click",(function(){Ye(t);const e=Go();return e.onDownloadImg(e.picture.display_name,e.picture.file_name)})),Fo(6,"i",16),No(7,"span"),ba(8),Wl(9,"translate"),zo(),zo(),No(10,"button",17),$o("click",(function(){Ye(t);const e=Go();return e.onEdit(e.picture)})),Fo(11,"i",18),No(12,"span"),ba(13),Wl(14,"translate"),zo(),zo(),No(15,"button",19),$o("click",(function(){return Ye(t),Go().activeConfirmDelete=!0})),Fo(16,"i",20),No(17,"span"),ba(18),Wl(19,"translate"),zo(),zo(),Mo(20,tE,6,5,"button",21),zo()}if(2&t){const t=Go();ws(4),Sa("",t.picture.raw_height,"x",t.picture.raw_width,""),ws(4),wa(ql(9,6,"ImgManager.ImgCard.download")),ws(5),wa(ql(14,8,"ImgManager.ImgCard.edit")),ws(5),wa(ql(19,10,"ImgManager.ImgCard.del")),ws(2),Ro("ngIf","window"!==t.stateDisplayed)}}function nE(t,e){1&t&&(No(0,"div",27),Fo(1,"i",28),No(2,"span"),ba(3),Wl(4,"translate"),zo(),zo()),2&t&&(ws(3),wa(ql(4,1,"ImgManager.ImgCard.validImgSmall")))}const iE=function(t){return{"img-card__container__overlay--smallDisplay":t}};function sE(t,e){if(1&t){const t=jo();No(0,"div",29),No(1,"i",30),$o("click",(function(){return Ye(t),Go().onToggleImgSelected()})),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(1,iE,"small"===t.stateDisplayed||t.isUploadSection))}}function rE(t,e){1&t&&Fo(0,"span",31)}const oE=function(t){return{fullSize:t}},aE=function(t,e,n){return{smallDisplay:t,imgSelected:e,deletion:n}},lE=function(t){return{show:t}},cE=function(t,e){return{smallNameDisplay:t,focus:e}};function hE(t,e){1&t&&Fo(0,"span",12)}const uE=function(t,e,n){return{"img-editor__scroll--full":t,"img-editor__scroll--smallDisplay":e,"img-editor__scroll--window":n}},dE=function(t){return{"img-editor__infoSection__actions__save--disable":t}};function pE(t,e){1&t&&Fo(0,"span",13)}function gE(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"div",15),$o("click",(function(){Ye(t);const e=Go();return e.onOpenCanva(e.expectedWidth,e.expectedHeight)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),No(5,"p"),ba(6),zo(),zo(),zo()}if(2&t){const t=Go();ws(3),wa(ql(4,3,"ImgManager.CanvaBtn.recommanded")),ws(3),Sa("",t.expectedWidth,"*",t.expectedHeight,"")}}function mE(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"div",16),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onOpenCanva(n.value.width,n.value.height)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),No(5,"p"),ba(6),zo(),zo(),zo()}if(2&t){const t=e.$implicit;ws(3),wa(ql(4,3,t.key)),ws(3),Sa("",t.value.width,"*",t.value.height,"")}}const fE=function(t,e){return{"is-up":t,noTooltip:e}},_E=function(t){return{displayDropDownMenu:t}};function vE(t,e){if(1&t&&(Fo(0,"img",12),Wl(1,"imgSrc")),2&t){const t=Go().$implicit;Ro("src",Gl(1,2,t.file_name,"400"),Ji)("title",t.display_name)}}function yE(t,e){if(1&t&&(Fo(0,"img",12),Wl(1,"imgSrc")),2&t){const t=Go().$implicit;Ro("src",Gl(1,2,t.file_name,"200"),Ji)("title",t.display_name)}}function bE(t,e){if(1&t){const t=jo();No(0,"div",8),$o("cdkDragStarted",(function(){return Ye(t),Go(2).dragStart=!0}))("cdkDragEnded",(function(){return Ye(t),Go(2).dragStart=!1})),Mo(1,vE,2,5,"img",9),Mo(2,yE,2,5,"img",9),No(3,"div",10),$o("click",(function(){Ye(t);const n=e.index;return Go(2).removeImg(n)})),ba(4),Wl(5,"translate"),zo(),No(6,"span",11),ba(7),Wl(8,"translate"),zo(),zo()}if(2&t){const t=e.index;ws(1),Ro("ngIf",t<1),ws(1),Ro("ngIf",t>0),ws(2),wa(ql(5,4,"ImgManager.ImgSelection.deleteImg")),ws(3),wa(ql(8,6,"ImgManager.ImgSelection.tooltips"))}}const wE=function(t){return{"img-selection--visible":t}},CE=function(t){return[t]};function SE(t,e){if(1&t){const t=jo();No(0,"div",4),No(1,"div",5,6),$o("cdkDropListDropped",(function(e){return Ye(t),Go().drop(e)})),Mo(3,bE,9,8,"div",7),zo(),zo()}if(2&t){const t=Go(),e=Do(1);Ro("ngClass",zl(3,wE,t.imgSelectedList&&t.imgSelectedList.length)),ws(1),Ro("cdkDropListConnectedTo",zl(5,CE,e)),ws(2),Ro("ngForOf",t.imgSelectedList)}}function IE(t,e){1&t&&(Vo(0),Fo(1,"wz-loader"),Uo())}const EE=[[["","label",""]],[["","item",""]]],xE=["[label]","[item]"];function PE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"div",15),$o("click",(function(){return Ye(t),Go().confirmCrop()})),Wl(2,"translate"),Fo(3,"i",16),No(4,"p"),ba(5),Wl(6,"translate"),zo(),zo(),zo()}2&t&&(ws(1),Ro("nwbToolTip",ql(2,2,"ImgManager.ImgEditor.ValidtToolTip")),ws(4),wa(ql(6,4,"ImgManager.ImgEditor.Valid")))}const TE=function(t){return{"active-item":t}};function kE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.index;return Go().changeResolutionSize(n)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(4,TE,t.active)),ws(2),wa(ql(4,2,t.label))}}function ME(t,e){1&t&&Fo(0,"i",20),2&t&&Ro("ngClass",Go().$implicit.icon)}function DE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().applyMethod(n.method)})),Mo(2,ME,1,1,"i",19),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(5,TE,t.active)),ws(1),Ro("ngIf",t.icon),ws(2),wa(ql(5,3,t.label))}}function AE(t,e){1&t&&Fo(0,"i",20),2&t&&Ro("ngClass",Go().$implicit.icon)}function OE(t,e){if(1&t){const t=jo();Vo(0,17),No(1,"div",18),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().applyMethod(n.method)})),Mo(2,AE,1,1,"i",19),No(3,"p"),ba(4),Wl(5,"translate"),zo(),zo(),Uo()}if(2&t){const t=e.$implicit;ws(1),Ro("ngClass",zl(5,TE,t.active)),ws(1),Ro("ngIf",t.icon),ws(2),wa(ql(5,3,t.label))}}const RE=["imgLibContainer"];function LE(t,e){if(1&t&&(No(0,"div"),No(1,"p",10),ba(2),Wl(3,"translate"),zo(),zo()),2&t){const t=Go(2);ws(2),Sa("",ql(3,2,"ImgManager.ImgLib.nbImg")," : ",t.length,"")}}function NE(t,e){1&t&&(No(0,"div"),No(1,"p",10),ba(2),Wl(3,"translate"),zo(),zo()),2&t&&(ws(2),wa(ql(3,1,"ImgManager.ImgLib.lastImgs")))}function zE(t,e){if(1&t){const t=jo();No(0,"button",25),$o("click",(function(){return Ye(t),Go(3).selectImgChosen()})),Fo(1,"i",26),ba(2),Wl(3,"translate"),zo()}if(2&t){const t=Go(3);Ro("@insertRemoveAnnim",void 0),ws(2),Sa(" ",ql(3,3,"ImgManager.ImgLib.select")," (",t.nbImgToDelSelected,") ")}}function FE(t,e){1&t&&Fo(0,"span",30)}function VE(t,e){if(1&t){const t=jo();No(0,"button",27),$o("click",(function(){return Ye(t),Go(3).displayConfirmImgSup()})),Fo(1,"i",28),ba(2),Wl(3,"translate"),Mo(4,FE,1,0,"span",29),zo()}if(2&t){const t=Go(3);Ro("@insertRemoveAnnim",void 0),ws(2),Sa("",ql(3,4,"ImgManager.ImgLib.delMlt")," (",t.nbImgToDelSelected,") "),ws(2),Ro("ngIf",t.delListImgLoader)}}const UE=function(t){return{nbImage:t}};function jE(t,e){if(1&t&&(No(0,"p",31),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(3);ws(1),wa(Gl(2,1,"ImgManager.ImgLib.confirmSupQuestions",zl(4,UE,t.nbImgToDelSelected)))}}function BE(t,e){if(1&t&&(No(0,"p",31),ba(1),Wl(2,"translate"),zo()),2&t){const t=Go(3);ws(1),wa(Gl(2,1,"ImgManager.ImgLib.confirmSupQuestion",zl(4,UE,t.nbImgToDelSelected)))}}const HE=function(t){return{"images-view__container__boxAction__confirmSup--visible":t}},$E=function(t){return{actifDisplayed:t}};function WE(t,e){if(1&t){const t=jo();No(0,"div",11),No(1,"div",12),Mo(2,zE,4,5,"button",13),Mo(3,VE,5,6,"button",14),No(4,"div",15),Mo(5,jE,3,6,"p",16),Mo(6,BE,3,6,"p",16),No(7,"div"),No(8,"button",17),$o("click",(function(){return Ye(t),Go(2).cancelSup()})),ba(9),Wl(10,"translate"),zo(),No(11,"button",18),$o("click",(function(){return Ye(t),Go(2).removeListImg()})),ba(12),Wl(13,"translate"),zo(),zo(),zo(),zo(),No(14,"div",19),No(15,"div",20),No(16,"div",21),$o("click",(function(){return Ye(t),Go(2).onSwitchFormatDisplayed(!1)})),No(17,"span",22),Fo(18,"i",23),zo(),zo(),zo(),No(19,"div",20),No(20,"div",21),$o("click",(function(){return Ye(t),Go(2).onSwitchFormatDisplayed(!0)})),No(21,"span",22),Fo(22,"i",24),zo(),zo(),zo(),zo(),zo()}if(2&t){const t=Go(2);ws(2),Ro("ngIf",t.listDisplayed&&t.nbImgToDelSelected&&!t.confirmImgSup&&!t.delListImgLoader&&t.multipleImgMode),ws(1),Ro("ngIf",t.listDisplayed&&t.nbImgToDelSelected&&!t.confirmImgSup),ws(1),Ro("ngClass",zl(13,HE,t.confirmImgSup)),ws(1),Ro("ngIf",t.nbImgToDelSelected>1),ws(1),Ro("ngIf",1===t.nbImgToDelSelected),ws(3),Ca(" ",ql(10,9,"ImgManager.ImgLib.cancel")," "),ws(3),Ca(" ",ql(13,11,"ImgManager.ImgLib.confirm")," "),ws(4),Ro("ngClass",zl(15,$E,!t.listDisplayed)),ws(4),Ro("ngClass",zl(17,$E,t.listDisplayed))}}const qE=function(t,e){return{"images-view__container--uploadTab":t,"images-view__container--window":e}};function GE(t,e){if(1&t&&(No(0,"div",8),Mo(1,LE,4,4,"div",6),Mo(2,NE,4,3,"div",6),Mo(3,WE,23,19,"div",9),zo()),2&t){const t=Go();Ro("ngClass",Fl(4,qE,"img-upload"===t.tabDisplayed,"window"===t.stateDisplayed)),ws(1),Ro("ngIf","img-upload"!==t.tabDisplayed),ws(1),Ro("ngIf","img-upload"===t.tabDisplayed),ws(1),Ro("ngIf","img-upload"!==t.tabDisplayed)}}function QE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"mosaic-view",32),$o("picturesListChange",(function(){return Ye(t),Go().onPicturesListChange()}))("filtersChange",(function(){return Ye(t),Go().onFiltersChange()}))("disableChange",(function(e){return Ye(t),Go().disable=e}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("picturesList",t.picturesList)("tableFilters",t.tableFilters)("disable",t.disable)("nbFakeImg",t.nbFakeImg)("stateDisplayed",t.stateDisplayed)("tabDisplayed",t.tabDisplayed)("displayPexelsResults",t.displayPexelsResults)("isLoading",t.isLoading)("fullSize",t.fullSize)}}function KE(t,e){if(1&t){const t=jo();No(0,"div"),No(1,"table-view",33),$o("picturesListChange",(function(){return Ye(t),Go().onPicturesListChange()}))("filtersChange",(function(){return Ye(t),Go().onFiltersChange()}))("disableChange",(function(e){return Ye(t),Go().disable=e}))("pictureNameChange",(function(e){return Ye(t),Go().onRenamePicture(e)})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("picturesList",t.picturesList)("tableFilters",t.tableFilters)("disable",t.disable)("displayPexelsResults",t.displayPexelsResults)("stateDisplayed",t.stateDisplayed)("isLoading",t.isLoading)}}function ZE(t,e){if(1&t){const t=jo();No(0,"div",34),No(1,"pexels-lib",35),$o("showImgUploaded",(function(){return Ye(t),Go().onShowImgUploaded()})),zo(),zo()}if(2&t){const t=Go();Ro("@easeInOut","in"),ws(1),Ro("searchValue",t.tableFilters.searchValue)("disableSearch",!0)}}const YE=function(t,e){return{fullSize:t,small:e}},XE=function(t,e,n,i,s,r,o){return{"images-view__scroll--hide--mosaic":t,"images-view__scroll--hide--mosaic--small":e,"images-view__scroll--hide--table":n,"images-view__scroll--full":i,"images-view__scroll--smallDisplay":s,"images-view__scroll--smallUploadDisplay":r,"images-view__scroll--window":o}},JE=function(t){return{"mosaic__search--small":t}};function tx(t,e){if(1&t){const t=jo();No(0,"div",5),No(1,"wz-input-search",6),$o("ngModelChange",(function(e){return Ye(t),Go().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Ye(t),Go().onSearchChange(e)})),Wl(2,"translate"),zo(),zo()}if(2&t){const t=Go();Ro("ngClass",zl(6,JE,"small"===t.stateDisplayed)),ws(1),Ro("ngModel",t.tableFilters.searchValue)("placeholder",ql(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===t.stateDisplayed)}}function ex(t,e){if(1&t){const t=jo();No(0,"img-card",10),$o("toggleImgSelected",(function(){Ye(t);const n=e.index;return Go(2).onToggleSelectImg(n)}))("pictureNameChange",(function(e){return Ye(t),Go(2).onCardRenamePicture(e)})),zo()}if(2&t){const t=e.$implicit,n=Go(2);Ro("picture",t)("stateDisplayed",n.stateDisplayed)("tabDisplayed",n.tabDisplayed)("disable",n.disable)("fullSize",n.fullSize)}}const nx=function(t){return{"mosaic__container__cards__fakeImg--smallFakeImg":t}};function ix(t,e){if(1&t&&Fo(0,"div",11),2&t){const t=Go(2);Ro("ngClass",zl(1,nx,"small"===t.stateDisplayed||"img-upload"===t.tabDisplayed))}}const sx=function(t){return{"mosaic__container__cards--padding":t}};function rx(t,e){if(1&t&&(No(0,"div",7),Mo(1,ex,1,5,"img-card",8),Mo(2,ix,1,3,"div",9),Wl(3,"numberToArray"),zo()),2&t){const t=Go();Ro("ngClass",zl(6,sx,"window"!==t.stateDisplayed))("@listAnimation",t.picturesList.length),ws(1),Ro("ngForOf",t.picturesList),ws(1),Ro("ngForOf",ql(3,4,t.nbFakeImg))}}function ox(t,e){1&t&&(No(0,"div",12),Fo(1,"wz-loader",13),zo()),2&t&&(ws(1),Ro("small",!0))}function ax(t,e){if(1&t){const t=jo();No(0,"div",14),No(1,"wz-pagination",15),$o("pageChange",(function(){return Ye(t),Go().onFiltersChange()})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("pagination",t.tableFilters)}}const lx=function(t,e,n){return{fullSize:t,small:e,"mosaic--displayPexelsImg":n}};function cx(t,e){1&t&&(No(0,"div",25),Fo(1,"i",26),zo())}const hx=function(t){return{imgSelected:t}},ux=function(t){return{pictureDeletion:t}},dx=function(t){return{desabled:t}};function px(t,e){if(1&t){const t=jo();No(0,"div",6),$o("checkBoxValueChange",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),No(1,"div",7),No(2,"div",8),No(3,"div",9),$o("click",(function(){Ye(t);const n=e.index;return Go().onToggleSelectImg(n)})),No(4,"img",10),$o("error",(function(n){Ye(t);const i=e.$implicit,s=Go();return i.imgNotLoaded=!0,s.onPictureNotLoading(n)})),Wl(5,"imgSrc"),zo(),Mo(6,cx,2,0,"div",11),zo(),No(7,"input",12),$o("ngModelChange",(function(n){return Ye(t),e.$implicit.display_name=n}))("focus",(function(){Ye(t);const n=e.$implicit;return Go().previousName=n.display_name}))("blur",(function(){Ye(t);const n=e.$implicit;return Go().onNameChange(n.id_file)}))("click",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),zo(),zo(),zo(),No(8,"div",13),$o("click",(function(){Ye(t);const n=e.index;return Go().onToggleDelSelection(n)})),No(9,"p",14),ba(10),zo(),zo(),No(11,"div",15),No(12,"dropdown",16),Vo(13,17),No(14,"div",18),No(15,"span"),Fo(16,"i",19),zo(),zo(),Uo(),Vo(17,20),No(18,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onDownloadImg(n.display_name,n.file_name)})),Fo(19,"i",22),ba(20,"\xa0 "),No(21,"p"),ba(22),Wl(23,"translate"),zo(),zo(),Uo(),Vo(24,20),No(25,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onEdit(n)})),Fo(26,"i",23),ba(27,"\xa0 "),No(28,"p"),ba(29),Wl(30,"translate"),zo(),zo(),Uo(),Vo(31,20),No(32,"div",21),$o("click",(function(){Ye(t);const n=e.$implicit;return Go().onRemoveImg(n)})),Fo(33,"i",24),ba(34,"\xa0 "),No(35,"p"),ba(36),Wl(37,"translate"),zo(),zo(),Uo(),zo(),zo(),zo()}if(2&t){const t=e.$implicit;Ro("checkBoxValue",t.delSelected),ws(3),Ro("ngClass",zl(23,hx,t.selected)),ws(1),Ro("src",Gl(5,14,t.file_name,"100"),Ji)("ngClass",zl(25,ux,t.deleted)),ws(2),Ro("ngIf",t.imgNotLoaded),ws(1),Ro("ngModel",t.display_name)("ngClass",zl(27,dx,t.deleted))("disabled",t.deleted),ws(3),Sa("",t.raw_height,"x",t.raw_width,""),ws(2),Ro("disable",t.deleted),ws(10),wa(ql(23,17,"ImgManager.ImgList.download")),ws(7),wa(ql(30,19,"ImgManager.ImgList.edit")),ws(7),wa(ql(37,21,"ImgManager.ImgList.remove"))}}function gx(t,e){if(1&t){const t=jo();No(0,"div",8),No(1,"wz-checkbox",9),$o("change",(function(e){return Ye(t),Go().onToggleAllCheckBox(e)})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("id",t.headerCheckBoxId)("alone",!0)}}function mx(t,e){if(1&t){const t=jo();No(0,"div",10),No(1,"wz-input-search",11),$o("ngModelChange",(function(e){return Ye(t),Go().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Ye(t),Go().searchChange(e)})),zo(),zo()}if(2&t){const t=Go();ws(1),Ro("ngModel",t.tableFilters.searchValue)("placeholder",t.placeholder)("smallPadding",!0)}}function fx(t,e){1&t&&(No(0,"div",12),Fo(1,"wz-loader",13),zo()),2&t&&(ws(1),Ro("small",!0))}function _x(t,e){1&t&&Zo(0,1,["*ngIf","!isLoading"])}function vx(t,e){if(1&t){const t=jo();No(0,"wz-pagination",14),$o("pageChange",(function(){return Ye(t),Go().pageChange()})),zo()}2&t&&Ro("pagination",Go().tableFilters)}const yx=[[["","headerCell",""]],[["","tableRow",""]]],bx=["[headerCell]","[tableRow]"];function wx(t,e){if(1&t&&(Vo(0),No(1,"option",11),ba(2),zo(),Uo()),2&t){const t=e.$implicit,n=Go(2);ws(1),Ro("selected",t===n.pagination.currentPage)("value",t),ws(1),Ca(" ",t," ")}}const Cx=function(t){return{width:t}},Sx=function(t){return{"wz-pagination__wrapper__arrows__arrow--disabled":t}};function Ix(t,e){if(1&t){const t=jo();No(0,"div",1),No(1,"div",2),No(2,"div",3),No(3,"p"),ba(4),Wl(5,"translate"),zo(),No(6,"select",4),$o("change",(function(e){return Ye(t),Go().onGotoPageChange(e)})),Mo(7,wx,3,3,"ng-container",5),Wl(8,"ArrayTotalPages"),zo(),zo(),No(9,"div",6),No(10,"p"),ba(11),Wl(12,"customPagniationText"),zo(),zo(),No(13,"div",7),No(14,"div",8),$o("click",(function(){return Ye(t),Go().decrementPage()})),Fo(15,"span",9),zo(),No(16,"div",10),$o("click",(function(){return Ye(t),Go().incrementPage()})),Wl(17,"IsLastPage"),Fo(18,"span",9),zo(),zo(),zo(),zo()}if(2&t){const t=Go();ws(4),wa(ql(5,6,"PaginationComponent.page")),ws(2),Ro("ngStyle",zl(19,Cx,40+10*t.pagination.currentPage.toString().length+"px")),ws(1),Ro("ngForOf",Gl(8,8,t.pagination.totalItems,t.pagination.itemsPerPage)),ws(4),wa(Ql(12,11,t.pagination.currentPage,t.pagination.totalItems,t.pagination.itemsPerPage)),ws(3),Ro("ngClass",zl(21,Sx,1===t.pagination.currentPage)),ws(2),Ro("ngClass",zl(23,Sx,Ql(17,15,t.pagination.currentPage,t.pagination.totalItems,t.pagination.itemsPerPage)))}}const Ex=function(t,e){return{"field--nowrap":t,alone:e}};function xx(t,e){1&t&&Fo(0,"p",3),2&t&&Ro("innerHTML",Go().text,Yi)}const Px=function(t){return{"is-small":t}},Tx=function(t){return{position:t}};function kx(t,e){1&t&&Fo(0,"i",2),2&t&&Ro("ngClass",Go().iconClass)}const Mx=function(t,e){return{success:t,warning:e}},Dx=["*"];let Ax=(()=>{let t=class{constructor(){this.imgSelectedList=[],this.multipleImgMode=!1,this.imgSelectionSubscriber=[],this.imgListLoading=new vg}getImgSelection(){return this.imgSelectedList}setImgSelection(t){this.imgSelectedList.length=0,t&&t.length&&t.forEach(t=>this.imgSelectedList.push(t)),this.emitImgSelectionChange()}addImgSelected(t){this.multipleImgMode?this.imgSelectedList.push(t):this.imgSelectedList=[t],this.emitImgSelectionChange()}getImgSelectionChange(){return new b(t=>{this.imgSelectionSubscriber.push(t)})}emitImgSelectionChange(){this.imgSelectionSubscriber.map(t=>t.next(JSON.parse(JSON.stringify(this.imgSelectedList))))}removeImgSelectedByIndex(t){this.imgSelectedList.splice(t,1),this.emitImgSelectionChange()}removeImgSelectedById(t){if(!this.multipleImgMode)return void(this.imgSelectedList=[]);let e=0;for(const n of this.imgSelectedList){if(n.id_file===t){this.removeImgSelectedByIndex(e);break}e++}}removeImgSelectionByIds(t){if(this.multipleImgMode)for(let e=this.imgSelectedList.length-1;e>-1;e--)-1!==t.indexOf(this.imgSelectedList[e].id_file)&&this.removeImgSelectedByIndex(e);else this.imgSelectedList=[]}removeAllImgSelected(){this.imgSelectedList.length=0,this.emitImgSelectionChange()}setMultipleImgMode(t){this.multipleImgMode=t}initImgSelectedList(t){t?this.imgSelectedList=t:this.imgSelectedList&&this.imgSelectedList.length?this.imgSelectedList.splice(0,this.imgSelectedList.length):this.imgSelectedList=[]}emitImgListLoading(t){this.imgListLoading.next(t)}getImgListLoadingEventListner(){return this.imgListLoading.asObservable()}moveImgOrder(t){this.imgSelectedList.splice(t.currentIndex,0,this.imgSelectedList.splice(t.previousIndex,1)[0]),this.emitImgSelectionChange()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})();class Ox{}let Rx=(()=>{let t=class{constructor(t){this.http=t,this.params=(new Ag).set("limit","20").set("page","1"),this.pageFicheProductConfig={stateDisplayed:"closed",multipleImgMode:!0,showImgManagerModule:!0,showSelection:!0,displayBtn:!0,pageficheProduct:!0},this.wiziblockConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1},this.simpleWithButtonOpenerConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!0},this.fullWindowConfig={stateDisplayed:"window",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1}}setApiConfig(t,e){this.imgManagerRoute=t,this.shopToken=e}getOptionsHeaders(t){const e={headers:new kg({Authorization:"Bearer "+this.shopToken})};return t&&(this.getParams(t),e.params=this.params),e}getShopImgList(t){return this.http.get(this.imgManagerRoute+"/images",this.getOptionsHeaders(t))}getShopTotalImgList(t){return this.http.get(this.imgManagerRoute+"/total/image",this.getOptionsHeaders(t))}getShopImg(t){return this.http.get(`${this.imgManagerRoute}/images/${t}`,this.getOptionsHeaders())}getParams(t){this.params=new Ag,this.params=this.params.set("id_file:sort","desc");for(const e in t)this.params=this.params.set(e,t[e])}uploadFile(t){return this.http.post(this.imgManagerRoute+"/images/template",t,this.getOptionsHeaders())}uploadFileByUrl(t,e){return this.http.post(this.imgManagerRoute+"/images/template",{url:t,fileName:e},this.getOptionsHeaders())}replaceImg(t,e){return this.http.put(`${this.imgManagerRoute}/images/${e}/replace`,{imageBase64:t,type:"RAW"},this.getOptionsHeaders())}changeImgName(t,e){return this.http.put(`${this.imgManagerRoute}/images/${e}?file_name=${t}`,null,this.getOptionsHeaders())}removeImg(t){return this.http.delete(`${this.imgManagerRoute}/images/${t}`,this.getOptionsHeaders())}removeMultipleImg(t){return this.http.post(this.imgManagerRoute+"/images-multiple-delete",{id_array:t},this.getOptionsHeaders())}getImgManagerDisplayConfig(t){switch(t){case"window":return this.fullWindowConfig;case"wizi-block":return this.wiziblockConfig;case"fiche-product":return this.pageFicheProductConfig;case"simple-with-button":return this.simpleWithButtonOpenerConfig;default:return}}getAllImgManagerDisplayConfig(){return[this.fullWindowConfig,this.wiziblockConfig,this.pageFicheProductConfig,this.simpleWithButtonOpenerConfig]}};return t.\u0275fac=function(e){return new(e||t)(Qt(Hg))},t.\u0275prov=ht({factory:function(){return new t(Qt(Hg))},token:t,providedIn:"root"}),t})(),Lx=(()=>{let t=class{constructor(){this.imgCDNConfig=null}setImgCDNConfig(t){this.imgCDNConfig=t}getUrlImg(t){const e=Object.keys(this.imgCDNConfig).filter(e=>new RegExp(t,"i").test(e))[0];return this.imgCDNConfig[e]}getAllSize(){return Object.keys(this.imgCDNConfig).map(t=>t.match(/_(\w+)_/)[1])}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Nx=(()=>{let t=class{constructor(t,e){this.imgManagerService=t,this.imgCDNService=e}setExternalConfig(t){this.externalConfig=t,this.imgManagerService.setApiConfig(t.api.image_manager_route,t.api.shop_token),this.imgCDNService.setImgCDNConfig(t.imgCDNConfig)}getCanvaApiURL(){return this.externalConfig.api.canva_url}getCanvaApiToken(){return this.externalConfig.api.canva_token}getRouteAssets(){return this.externalConfig.api.assets_route}getPexelsApiURL(){return this.externalConfig.api.pexels_route}getPexelsApiToken(){return this.externalConfig.api.pexels_token}getShopCategory(){return this.externalConfig.api.shop_category}};return t.\u0275fac=function(e){return new(e||t)(Qt(Rx),Qt(Lx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Rx),Qt(Lx))},token:t,providedIn:"root"}),t})(),zx=(()=>{let t=class{constructor(){this.userdisplayPreference="WzImgManagerListDisplayed"}setUserDisplayPreference(t){localStorage.setItem(this.userdisplayPreference,""+t)}getUserDisplayPreference(){return"true"==localStorage.getItem(this.userdisplayPreference)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Fx=(()=>{let t=class{constructor(t){this.externalConfigService=t,this.bindExpectedImgSizeEvent=new bg(null),this.bindExpectedSizeDone=this.bindExpectedImgSizeEvent.asObservable()}setCanvaApiConfig(){this.canvaApiURL=this.externalConfigService.getCanvaApiURL(),this.canvaApiKey=this.externalConfigService.getCanvaApiToken()}getCanvaLogo(){return this.externalConfigService.getRouteAssets()+"canva/icon_canva.svg"}bindEventExepectedImgSizeChange(){return this.bindExpectedSizeDone}expectedImgSizesChange(t){this.bindExpectedImgSizeEvent.next(t)}getCanvaApi(){return this.canvaApiURL&&this.canvaApiKey||this.setCanvaApiConfig(),new b(t=>{this.loadCanva().subscribe({complete:()=>{this.canvaApi&&Canva.DesignButton?(t.next(this.canvaApi),t.complete()):this.initializeCanva(t)}})})}initializeCanva(t){Canva.DesignButton&&Canva.DesignButton.initialize({apiKey:this.canvaApiKey}).then(e=>{this.canvaApi=e,t.next(this.canvaApi),t.complete()})}loadCanva(){return new b(t=>{this.canvaApi?t.complete():this.loadCanvaScript(t)})}loadCanvaScript(t){const e=document.createElement("script");e.src=this.canvaApiURL,e.type="text/javascript",e.async=!1,e.charset="utf-8",e.onload=()=>{t.complete()},document.getElementsByTagName("head")[0].appendChild(e)}};return t.\u0275fac=function(e){return new(e||t)(Qt(Nx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Nx))},token:t,providedIn:"root"}),t})(),Vx=(()=>{let t=class{constructor(){this.imgToEditEvent=new E,this.imgRemoved=new E,this.imgAdded=new E,this.listDisplayedChange=new E}emitImgRemoved(t){this.imgRemoved.next(t)}getImgRemovedEventListner(){return this.imgRemoved.asObservable()}emitImgToEdit(t){this.imgToEditEvent.next(t)}getImgToEditEventListner(){return this.imgToEditEvent.asObservable()}emitImgAdded(t){this.imgAdded.next(t)}getImgAddedEventListner(){return this.imgAdded.asObservable()}emitlistDisplayedChange(t){this.listDisplayedChange.next(t)}getlistDisplayedChange(){return this.listDisplayedChange.asObservable()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ux=(()=>{let t=class{constructor(){this.documentEventSource=new E,this.documentEventDone=this.documentEventSource.asObservable(),this.documentScrollSource=new E,this.documentScrollDone=this.documentScrollSource.asObservable()}documentEvent(){return this.documentEventDone}setDocumentEventListener(){document.body.addEventListener("click",t=>{this.documentEventSource.next(t.target)})}documentScroll(){return this.documentScrollDone}setScrollEventListener(){window.onscroll=()=>{this.documentScrollSource.next(window)}}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({factory:function(){return new t},token:t,providedIn:"root"}),t})(),jx=(()=>{let t=class{constructor(t,e,n,i,s,r){this.imgSelectionService=t,this.externalConfigService=e,this.userSettingsService=n,this.canvaService=i,this.imgEventService=s,this.domService=r,this.showSelection=!1,this.imgManagerClosed=new Yl,this._multipleImgMode=!1,this._showImgManagerModule=!1,this.close=!1,this.listDisplayed=!1,this.hideTab=!1}set multipleImgMode(t){this._multipleImgMode=t,this.imgSelectionService.setMultipleImgMode(this._multipleImgMode)}get multipleImgMode(){return this._multipleImgMode}set showImgManagerModule(t){this._showImgManagerModule=t,t&&this.displaySmall()}get showImgManagerModule(){return this._multipleImgMode}onKeydownHandler(t){this.stateDisplayed&&"window"!==this.stateDisplayed&&this.onClose()}ngOnInit(){this.externalConfigService.setExternalConfig(this.externalConfig),this.imgSelectionService.setMultipleImgMode(this._multipleImgMode),this.imgSelectionService.initImgSelectedList(null),this.selectImgEvent=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{t&&t.length&&this.checkCloseImgManager()&&this.onClose()}),this.checkUserDisplayPreference(),this.listDisplayedEvent=this.imgEventService.getlistDisplayedChange().subscribe(t=>this.listDisplayed=t),this.domService.setDocumentEventListener()}checkUserDisplayPreference(){"window"!==this.stateDisplayed&&"full"!==this.stateDisplayed||(this.listDisplayed=this.userSettingsService.getUserDisplayPreference())}setCurrentTab(t){this.hideTab="img-edition"===t}displaySmall(){"window"!==this.stateDisplayed&&setTimeout(()=>{this.stateDisplayed="small",this.addBodyBottomPaddingForModule()},10)}openSmall(){this.stateDisplayed="small",this.setBodyMainScroll(),this.listDisplayed=!1}openFull(){this.stateDisplayed="full",this.checkUserDisplayPreference(),this.hideBodyMainScroll()}onClose(){this.stateDisplayed="closed",this.hideTab=!1,this.setBodyMainScroll(),this.removeBodyBottomPaddingForModule(),setTimeout(()=>{this.imgManagerClosed.emit()},250)}onImgManagerClosed(){this.onClose()}checkCloseImgManager(){return!this.multipleImgMode&&"window"!==this.stateDisplayed}hideBodyMainScroll(){const t=document.getElementsByTagName("html")[0];this.overflowHTML||(this.overflowHTML=t.style.overflowY),t.style.overflowY="hidden"}setBodyMainScroll(){document.getElementsByTagName("html")[0].style.overflowY=this.overflowHTML?this.overflowHTML:"scroll"}addBodyBottomPaddingForModule(){const t=document.getElementsByTagName("body")[0];this.bodyPadding=this.bodyPadding?parseInt(t.style.paddingBottom):0,t.style.paddingBottom=this.bodyPadding+300+"px"}removeBodyBottomPaddingForModule(){void 0!==this.bodyPadding&&(document.getElementsByTagName("body")[0].style.paddingBottom=this.bodyPadding+"px",this.bodyPadding=0)}ngOnDestroy(){this.selectImgEvent.unsubscribe(),this.canvaService.expectedImgSizesChange(null),this.listDisplayedEvent.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax),Ao(Nx),Ao(zx),Ao(Fx),Ao(Vx),Ao(Ux))},t.\u0275cmp=pe({type:t,selectors:[["wz-img-manager"]],hostBindings:function(t,e){1&t&&$o("keydown.escape",(function(t){return e.onKeydownHandler(t)}),!1,Hn)},inputs:{showSelection:"showSelection",multipleImgMode:"multipleImgMode",showImgManagerModule:"showImgManagerModule",stateDisplayed:"stateDisplayed",externalConfig:"externalConfig"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:3,vars:2,consts:[[1,"wz-img-manager"],["class","wz-img-manager__selectionHandler",4,"ngIf"],["class","wz-img-manager__module",3,"ngClass",4,"ngIf"],[1,"wz-img-manager__selectionHandler"],[1,"wz-img-manager__module",3,"ngClass"],["class","wz-img-manager__module__header",4,"ngIf"],[1,"wz-img-manager__module__content","wz-block",3,"ngClass"],[3,"stateDisplayed","multipleImgMode","listDisplayed","imgManagerClosed","currentTab"],[1,"wz-img-manager__module__header"],[3,"click",4,"ngIf"],[3,"click"],[1,"fal","fa-compress-alt"],[1,"fal","fa-expand-alt"],[1,"fal","fa-times"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,rI,2,0,"div",1),Mo(2,pI,4,13,"div",2),zo()),2&t&&(ws(1),Ro("ngIf",e.showSelection),ws(1),Ro("ngIf",e._showImgManagerModule))},directives:function(){return[Zh,nP,qh,Gx]},encapsulation:2}),t})();const Bx=zu("easeInOut",[ju("in",Uu({opacity:1})),Hu(":enter",[Uu({opacity:0}),Fu("0.5s ease-in-out")])]);let Hx=(()=>{let t=class{constructor(t,e){this.nwbAlertService=t,this.translateService=e,this.actionMsg="ImgManager.alert.action",this.alertConfig={message:"",duration:5e3}}openAlert(t){this.closePreviousAlert(),this.translateService.get(t).subscribe(e=>{this.alertConfig.message=e,this.setAlertColor(t),this.alertRefComponent=this.nwbAlertService.open(this.alertConfig),this.alertRefComponent.afterClosed().subscribe()})}openAlertWithBackendRespons(t,e){this.translateService.get(t).subscribe(t=>{this.alertConfig.message=t,this.alertConfig.message+="<br/>"+JSON.parse(e).message,this.closePreviousAlert(),this.alertRefComponent=this.nwbAlertService.open(this.alertConfig),this.alertRefComponent.afterClosed().subscribe()})}closePreviousAlert(){this.alertRefComponent&&this.alertRefComponent.dismiss()}setAlertColor(t){const e=/error/i.test(t);this.alertConfig.color=e?"is-danger":"is-success"}};return t.\u0275fac=function(e){return new(e||t)(Qt(zw),Qt(Nm))},t.\u0275prov=ht({factory:function(){return new t(Qt(zw),Qt(Nm))},token:t,providedIn:"root"}),t})(),$x=(()=>{let t=class{constructor(t,e,n){this.imgManager=t,this.alertService=e,this.externalConfigService=n,this.files=[],this.isLoading=!1,this.imgUploaded=new Yl,this.loadingText="ImgManager.ImgUpload.loading",this.errorUploadingImg="ImgManager.ImgUpload.errorUploadingImg",this.errorNotImg="ImgManager.ImgUpload.errorNotImg"}ngOnInit(){this.assetsIcon=this.getAssets()}filesChangeByClick(t){this.uploadFile(t.target.files)}getAssets(){return this.externalConfigService.getRouteAssets()+"img/icon_picture.svg"}filesChangeByDragAndDrop(t){this.removeDragAndDropStyle(),this.uploadFile(t)}uploadFile(t){if(t&&!t.length)return;this.isLoading=!0;const e=[];for(const n of t){const t=new FormData;t.append("image",n,n.name),this.isFileImage(n.type)?e.push(this.imgManager.uploadFile(t)):(this.alertService.openAlert(this.errorNotImg),this.isLoading=!1)}wg(e).subscribe(t=>{this.onImgUpload(t),this.isLoading=!1},t=>{this.alertService.openAlert(this.errorUploadingImg),this.isLoading=!1})}onImgUpload(t){this.imgUploaded.emit(t)}isFileImage(t){return"image"===t.split("/")[0]}removeDragAndDropStyle(){this.dragAndDropBox.nativeElement.style=""}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Hx),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["img-upload"]],viewQuery:function(t,e){var n;1&t&&hc(gI,!0),2&t&&lc(n=gc())&&(e.dragAndDropBox=n.first)},inputs:{stateDisplayed:"stateDisplayed"},outputs:{imgUploaded:"imgUploaded"},decls:8,vars:9,consts:[["appDragDrop","",1,"img-upload","has-text-centered",3,"ngClass","click","onFileDropped"],["dragAndDropBox",""],["hidden","","type","file","accept","image/*","multiple","",3,"change"],["fileInput",""],[1,"img-upload__container",3,"ngClass"],[1,"img-upload__container__wrapper"],["class","img-upload__container__loader",4,"ngIf"],[4,"ngIf"],[1,"img-upload__container__loader"],[3,"small","position"],[1,"blueColor","img-upload__container__dropImgIconDiv"],["alt","icon picture",3,"src",4,"ngIf"],[1,"img-upload__container__or"],[1,"img-upload__container__text"],[1,"fal","fa-file-upload"],["alt","icon picture",3,"src"]],template:function(t,e){if(1&t){const t=jo();No(0,"div",0,1),$o("click",(function(){return Ye(t),Do(3).click()}))("onFileDropped",(function(t){return e.filesChangeByDragAndDrop(t)})),No(2,"input",2,3),$o("change",(function(t){return e.filesChangeByClick(t)})),zo(),No(4,"div",4),No(5,"div",5),Mo(6,mI,2,2,"div",6),Mo(7,_I,13,10,"ng-container",7),zo(),zo(),zo()}2&t&&(Ro("ngClass",zl(5,vI,"small"===e.stateDisplayed))("@easeInOut","in"),ws(4),Ro("ngClass",zl(7,yI,"small"===e.stateDisplayed)),ws(2),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading))},directives:function(){return[Qx,qh,Zh,DP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),Wx=(()=>{let t=class{constructor(t,e){this.imgManager=t,this.alertService=e,this.picturesList=[],this.pictureNameChanged=new E,this.errorRenameImg="ImgManager.ImgList.errorRenameImg",this.msgSavingImgName="ImgManager.ImgLib.savingImgName",this.msgImgNameSaved="ImgManager.ImgLib.imgNameSaved",this.setEvents()}setPicturesList(t){this.picturesList=t}onRenamePicture(t){this.pictureNameChanged.next(t)}setEvents(){this.pictureNameChanged.pipe(cC(800)).subscribe(t=>{this.renamePicture(t)})}renamePicture(t){const e=this.getPictureById(t.id);e?(this.alertService.openAlert(this.msgSavingImgName),this.imgManager.changeImgName(e.display_name,e.id_file).subscribe(t=>{e.display_name=t.display_name,this.alertService.openAlert(this.msgImgNameSaved)},n=>{e.display_name=t.previousName,this.alertService.openAlert(this.errorRenameImg)})):this.alertService.openAlert(this.errorRenameImg)}getPictureById(t){if(this.picturesList){for(const e of this.picturesList)if(e.id_file===t)return e;return null}}};return t.\u0275fac=function(e){return new(e||t)(Qt(Rx),Qt(Hx))},t.\u0275prov=ht({factory:function(){return new t(Qt(Rx),Qt(Hx))},token:t,providedIn:"root"}),t})(),qx=(()=>{let t=class{constructor(t,e){this.imgSelectionService=t,this.renamePictureService=e,this.picturesList=[],this.multipleImgMode=!1}ngOnInit(){this.setEvents()}onImgUploaded(t){t.forEach(t=>this.picturesList.push(t)),this.renamePictureService.setPicturesList(this.picturesList)}onToggleSelectImg(t){"window"!==this.stateDisplayed&&(this.picturesList[t].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[t].id_file),this.picturesList[t].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[t]),this.picturesList[t].selected=!0))}onRenamePicture(t){this.renamePictureService.onRenamePicture(t)}setEvents(){this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{const e=[];t.map(t=>e.push(t.id_file));for(const n of this.picturesList)-1===e.indexOf(n.id_file)&&(n.selected=!1)})}ngOnDestroy(){this.imgSelectionChange.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax),Ao(Wx))},t.\u0275cmp=pe({type:t,selectors:[["upload-list"]],inputs:{multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed"},decls:45,vars:25,consts:[[1,"upload-list",3,"ngClass"],[1,"upload-list__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"upload-list__box"],[1,"upload-list__box__container"],[1,"mainColor"],[4,"ngIf"],[1,"dropdown","is-hoverable"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menuInfoSeo",1,"fas","fa-info-circle"],["id","dropdown-menuInfoSeo","role","menu",1,"dropdown-menu","dropDownShadow"],[1,"dropdown-content"],[1,"dropdown-item"],[1,"fal","fa-check"],[1,"upload-list__box__cards"],["class","upload-list__box__cards__card",4,"ngFor","ngForOf"],[1,"upload-list__box__cards__card"],[3,"picture","stateDisplayed","toggleImgSelected","pictureNameChange"],[1,"upload-list__box__cards__card__btnBox"],[1,"button","success","upload-list__box__cards__card__btnBox__btn"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"ng-scrollbar",1,2),No(3,"div",3),No(4,"div",4),No(5,"div"),No(6,"p",5),ba(7),Mo(8,bI,3,3,"ng-container",6),Mo(9,wI,3,3,"ng-container",6),zo(),No(10,"div",7),No(11,"div",8),Fo(12,"i",9),zo(),No(13,"div",10),No(14,"div",11),No(15,"div",12),No(16,"p"),ba(17),Wl(18,"translate"),zo(),No(19,"p"),Fo(20,"i",13),ba(21," 100%"),zo(),zo(),No(22,"div",12),No(23,"p"),ba(24),Wl(25,"translate"),zo(),No(26,"p"),Fo(27,"i",13),ba(28," 100%"),zo(),zo(),No(29,"div",12),No(30,"p"),ba(31),Wl(32,"translate"),zo(),No(33,"p"),Fo(34,"i",13),ba(35," 100%"),zo(),zo(),No(36,"div",12),No(37,"p"),ba(38),Wl(39,"translate"),zo(),No(40,"p"),Fo(41,"i",13),ba(42," 100%"),zo(),zo(),zo(),zo(),zo(),zo(),zo(),No(43,"div",14),Mo(44,CI,5,2,"div",15),zo(),zo(),zo(),zo()),2&t&&(Ro("ngClass",zl(20,SI,"small"===e.stateDisplayed))("@easeInOut","in"),ws(1),Ro("visibility","native")("ngClass",Fl(22,II,"small"===e.stateDisplayed,"window"===e.stateDisplayed)),ws(6),Ca(" ",e.picturesList?e.picturesList.length:""," "),ws(1),Ro("ngIf",e.picturesList&&e.picturesList.length>1),ws(1),Ro("ngIf",e.picturesList&&1===e.picturesList.length),ws(8),wa(ql(18,12,"ImgManager.UploadList.seo.rezise")),ws(7),wa(ql(25,14,"ImgManager.UploadList.seo.webp")),ws(7),wa(ql(32,16,"ImgManager.UploadList.seo.cdn")),ws(7),wa(ql(39,18,"ImgManager.UploadList.seo.lazyloading")),ws(6),Ro("ngForOf",e.picturesList))},directives:function(){return[qh,NC,Zh,Qh,Jx]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),Gx=(()=>{let t=class{constructor(t,e){this.imgEventEditService=t,this.alertService=e,this.multipleImgMode=!1,this.listDisplayed=!1,this.imgManagerClosed=new Yl,this.currentTab=new Yl,this.tabActive="images-view",this.tabs=["img-upload","images-view","pexels-lib","img-edition"],this.editTab=!1,this.imgUpload=!1,this.snackBarNewVersionConfig={message:"",duration:3e3}}ngOnInit(){this.imgEventEditService.getImgToEditEventListner().subscribe(t=>{this.tabActive=this.tabs[3],this.imgToEdit=t,this.editTab=!0,this.currentTab.emit(this.tabs[3])})}toggleTabs(t){this.imgUpload=!1,this.editTab=!1,this.tabActive=t}onImgUploaded(t){this.imgUpload=!0,this.imgUploadedComponent.onImgUploaded(t)}onEditClosed(t){this.editTab=!1,this.toggleTabs(this.tabs[1]),t&&this.alertService.openAlert(t),this.currentTab.emit("close")}onShowImgUploaded(){this.tabActive=this.tabs[1]}onImgManagerClosed(){this.imgManagerClosed.emit()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Vx),Ao(Hx))},t.\u0275cmp=pe({type:t,selectors:[["img-tabs"]],viewQuery:function(t,e){var n;1&t&&hc(EI,!0),2&t&&lc(n=gc())&&(e.imgUploadedComponent=n.first)},inputs:{multipleImgMode:"multipleImgMode",listDisplayed:"listDisplayed",stateDisplayed:"stateDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed",currentTab:"currentTab"},decls:23,vars:34,consts:[[1,"img-tabs",3,"ngClass"],[1,"wrapper-tabs"],[1,"tabs",3,"ngClass"],[1,"is-active",3,"ngClass","click"],[3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[1,"img-tabs__canva",3,"ngClass"],[3,"stateDisplayed","showImgUploaded"],["class","columns img-tabs__tabsFirst",3,"ngClass",4,"ngIf"],["class","columns img-tabs__tabsSecond",4,"ngIf"],["class","columns img-tabs__tabsThird",4,"ngIf"],["class","columns img-tabs__tabsEdit",4,"ngIf"],[3,"ngClass"],[1,"columns","img-tabs__tabsFirst",3,"ngClass"],[1,"column","img-tabs__tabsFirst__upload"],[3,"stateDisplayed","imgUploaded"],[1,"column","img-tabs__tabsFirst__list",3,"ngClass"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize",4,"ngIf"],[3,"hidden"],[3,"stateDisplayed","tabDisplayed","multipleImgMode"],["imgUploadedImg",""],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize"],[1,"columns","img-tabs__tabsSecond"],[1,"column"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","fullSize"],[1,"columns","img-tabs__tabsThird"],[1,"columns","img-tabs__tabsEdit"],[3,"stateDisplayed","imgToEdit","editClosed"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div",2),No(3,"ul"),No(4,"li",3),$o("click",(function(){return e.toggleTabs(e.tabs[0])})),No(5,"a"),ba(6),Wl(7,"translate"),zo(),zo(),No(8,"li",4),$o("click",(function(){return e.toggleTabs(e.tabs[1])})),No(9,"a"),ba(10),Wl(11,"translate"),zo(),zo(),No(12,"li",4),$o("click",(function(){return e.toggleTabs(e.tabs[2])})),No(13,"a"),ba(14),Wl(15,"translate"),zo(),zo(),Mo(16,PI,4,6,"li",5),zo(),No(17,"div",6),No(18,"canva-btn",7),$o("showImgUploaded",(function(){return e.onShowImgUploaded()})),zo(),zo(),zo(),zo(),Mo(19,DI,8,13,"div",8),Mo(20,AI,3,5,"div",9),Mo(21,OI,3,1,"div",10),Mo(22,RI,3,2,"div",11),zo()),2&t&&(Ro("ngClass",zl(21,LI,"small"===e.stateDisplayed)),ws(2),Ro("ngClass",Fl(23,NI,"window"!==e.stateDisplayed,"window"===e.stateDisplayed&&e.tabActive===e.tabs[3])),ws(2),Ro("ngClass",zl(26,xI,e.tabActive===e.tabs[0])),ws(2),wa(ql(7,15,"ImgManager.Tabs.addImg")),ws(2),Ro("ngClass",zl(28,xI,e.tabActive===e.tabs[1])),ws(2),wa(ql(11,17,"ImgManager.Tabs.imgLib")),ws(2),Ro("ngClass",zl(30,xI,e.tabActive===e.tabs[2])),ws(2),wa(ql(15,19,"ImgManager.Tabs.freeImgLib")),ws(2),Ro("ngIf",e.editTab),ws(1),Ro("ngClass",zl(32,zI,"window"===e.stateDisplayed)),ws(1),Ro("stateDisplayed",e.stateDisplayed),ws(1),Ro("ngIf",e.tabActive===e.tabs[0]),ws(1),Ro("ngIf",e.tabActive===e.tabs[1]),ws(1),Ro("ngIf",e.tabActive===e.tabs[2]),ws(1),Ro("ngIf",e.tabActive===e.tabs[3]))},directives:function(){return[qh,Zh,eP,$x,qx,hP,Yx,tP]},pipes:function(){return[zm]},encapsulation:2}),t})(),Qx=(()=>{let t=class{constructor(){this.onFileDropped=new Yl,this.background="#fff",this.opacity="1"}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.background="#f5f5f5",this.opacity="0.8"}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.background="#fff",this.opacity="1"}ondrop(t){t.preventDefault(),t.stopPropagation(),this.background="#f5f5f5",this.opacity="1";const e=t.dataTransfer.files;e.length>0&&this.onFileDropped.emit(e)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["","appDragDrop",""]],hostVars:4,hostBindings:function(t,e){1&t&&$o("dragover",(function(t){return e.onDragOver(t)}))("dragleave",(function(t){return e.onDragLeave(t)}))("drop",(function(t){return e.ondrop(t)})),2&t&&oa("background-color",e.background)("opacity",e.opacity)},outputs:{onFileDropped:"onFileDropped"}}),t})(),Kx=(()=>{let t=class{constructor(t,e,n){this.http=t,this.externalConfigService=e,this.translateService=n,this.languages={fr:"fr-FR",en:"en-US",it:"it-IT",es:"es-ES"},this.setLang(this.translateService.currentLang),this.translateService.onLangChange.subscribe(t=>{this.setLang(t.lang)})}setLang(t){this.lang=this.languages[t]?this.languages[t]:"fr-FR"}searchOnPexels(t,e,n){this.apiBaseUrl&&!this.apiKey||(this.apiBaseUrl=this.externalConfigService.getPexelsApiURL(),this.apiKey=this.externalConfigService.getPexelsApiToken());const i={headers:new kg({Authorization:"Bearer "+this.apiKey})};let s;if(t&&!/^\s*$/.test(t))s=`/search?query=${t}&per_page=${e}&page=${n}&locale=${this.lang}`;else{const t=this.externalConfigService.getShopCategory();s=t&&"other"!==t&&"btob"!==t?`/search?query=${t}&per_page=${e}&page=${n}&locale=en-US`:`/curated?per_page=${e}&page=${n}`}return this.http.get(this.apiBaseUrl+s,i).pipe(z(t=>t))}};return t.\u0275fac=function(e){return new(e||t)(Qt(Hg),Qt(Nx),Qt(Nm))},t.\u0275prov=ht({factory:function(){return new t(Qt(Hg),Qt(Nx),Qt(Nm))},token:t,providedIn:"root"}),t})();const Zx=zu("listAnimation",[Hu(":enter, * => 0, * => -1",[]),Hu(":increment",[$u(":enter",[Uu({opacity:0,transform:"translateY(100px)"}),Wu(50,[Fu("500ms cubic-bezier(0.35, 0, 0.25, 1)",Uu({opacity:1,transform:"none"}))])],{optional:!0})])]);let Yx=(()=>{let t=class{constructor(t,e,n,i){this.wzImgLibService=t,this.imgManager=e,this.alertService=n,this.translateService=i,this.searchValue="",this.disableSearch=!1,this.showImgUploaded=new Yl,this.perPage=30,this.searchUpdated=new E,this.nbResult=0,this.currentPage=1,this.isLoading=!0,this.initComponent=!0,this.photosColumns=[],this.nbColumuns=6,this.responsiveColumns=[1250,1050,750,500],this.outerElement=null,this.uploadingImg="ImgManager.PexelLib.uploadingImg",this.untitled="ImgManager.PexelLib.untitled",this.successUploadPhoto="ImgManager.PexelLib.successImport",this.errorUploadPhoto="ImgManager.PexelLib.errorUploadPhoto",this.errorRetrievePhotos="ImgManager.PexelLib.errorRetrievePhotos",this.subs=[]}set content(t){this.outerElement=t}ngOnInit(){}ngAfterViewInit(){this.oldSearchValue=this.searchValue,this.isLoading=!1,this.setNbColumnsToDisplayPhoto(),this.setPhotosColumns(),this.search()}setNbColumnsToDisplayPhoto(){const t=this.outerElement.nativeElement.offsetWidth;"window"!==this.stateDisplayed&&(this.nbColumuns=8),this.responsiveColumns.forEach(e=>{t<e&&this.nbColumuns--})}onSearchNameChanged(){this.onSearchChange()}onBottomReached(){this.scrollHandler()}onSearchChange(){this.search()}search(){if(this.isLoading)return;if(this.searchValue!==this.oldSearchValue&&this.resetSearch(),this.nbResult&&this.nbResult<=(this.currentPage-1)*this.perPage)return;this.isLoading=!0;const t=this.wzImgLibService.searchOnPexels(this.searchValue,this.perPage,this.currentPage).subscribe(t=>{this.wzImgLibDto=t,this.nbResult=this.wzImgLibDto.total_results,this.nbResult&&t.photos.forEach(t=>{const e=this.getBestColumn();this.photosColumns[e].height+=t.height/t.width*1e3,this.photosColumns[e].photos.push(t)}),this.isLoading=!1,this.initComponent=!1},t=>{this.isLoading=!1,this.initComponent=!1,this.alertService.openAlert(this.errorRetrievePhotos)});this.subs.push(t)}scrollHandler(){if(this.isLoading)return;const t=this.getBestColumn(),e=this.photosColumns[t].photos[this.photosColumns[t].photos.length-1];e&&document.querySelector('img[src="'+e.src.medium+'"]')&&(this.isLoading||(this.currentPage+=1,this.search()))}setPhotosColumns(){for(let t=0;t<this.nbColumuns;t++)this.photosColumns.push({height:0,photos:[]})}getBestColumn(){const t={index:0,height:this.photosColumns[0].height};return this.photosColumns.forEach((e,n)=>{t.height>e.height&&(t.index=n,t.height=e.height)}),t.index}resetSearch(){this.oldSearchValue=this.searchValue,this.photosColumns=[],this.currentPage=1,this.setPhotosColumns()}uploadPhoto(t,e){t.uploading=!0;const n=this.imgManager.uploadFileByUrl(e,this.translateService.instant(this.untitled)).subscribe(e=>{t.uploading=!1,t.uploaded=!0,this.alertService.openAlert(this.successUploadPhoto)},e=>{t.uploading=!1,406===e.error.code&&e.error.message?this.alertService.openAlertWithBackendRespons(this.errorUploadPhoto,e.error.message):this.alertService.openAlert(this.errorUploadPhoto)});this.alertService.openAlert(this.uploadingImg),this.subs.push(n)}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}};return t.\u0275fac=function(e){return new(e||t)(Ao(Kx),Ao(Rx),Ao(Hx),Ao(Nm))},t.\u0275cmp=pe({type:t,selectors:[["pexels-lib"]],viewQuery:function(t,e){var n;1&t&&hc(FI,!0),2&t&&lc(n=gc())&&(e.content=n.first)},inputs:{searchValue:"searchValue",disableSearch:"disableSearch",stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:8,vars:9,consts:[[1,"pexels-lib"],["outerElement",""],["reachedOffset","50",1,"pexels-lib__scroll",3,"visibility","ngClass","reachedBottom"],["scrollable",""],["class","pexels-lib__search",3,"ngClass",4,"ngIf"],["class","pexels-lib__wrapper",4,"ngIf"],[4,"ngIf"],["class","pexels-lib__alert",4,"ngIf"],[1,"pexels-lib__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"pexels-lib__wrapper"],["class","pexels-lib__wrapper__result-nb",4,"ngIf"],[1,"pexels-lib__wrapper__result"],["class","pexels-lib__wrapper__result__column",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result-nb"],[1,"pexels-lib__wrapper__result__column"],["class","pexels-lib__wrapper__result__column__element",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result__column__element"],[1,"pexels-lib__wrapper__result__column__element__img",3,"alt","src"],[1,"pexels-lib__wrapper__result__column__element__wrapper"],[1,"pexels-lib__wrapper__result__column__element__wrapper__infos"],[1,"dropdown","is-up",3,"ngClass"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"button","pexels-lib__wrapper__result__column__element__wrapper__button"],[3,"click",4,"ngIf"],["id","dropdown-menu","role","menu",1,"dropdown-menu","pexels-lib__wrapper__result__column__element__wrapper__dropdown"],[1,"dropdown-content"],[1,"dropdown-content__wrapper"],[1,"dropdown-item",3,"click"],[1,"fal","fa-check","iPortrait"],[1,"fal","fa-check","iLandscape"],[1,"fal","fa-check","iOriginal"],[3,"click"],[1,"icon","is-small"],["aria-hidden","true",1,"fas","fa-angle-up"],[1,"fal","fa-check"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"pexels-lib__alert"],[3,"warning"]],template:function(t,e){1&t&&(No(0,"div",0,1),No(2,"ng-scrollbar",2,3),$o("reachedBottom",(function(){return e.onBottomReached()})),Mo(4,UI,3,8,"div",4),Mo(5,QI,4,2,"div",5),Mo(6,KI,2,0,"ng-container",6),Mo(7,ZI,4,5,"div",7),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(2),Ro("visibility","hover")("ngClass",zl(7,YI,"small"===e.stateDisplayed)),ws(2),Ro("ngIf",!e.disableSearch),ws(1),Ro("ngIf",!e.initComponent),ws(1),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading&&!e.nbResult))},directives:function(){return[NC,qh,eS,Zh,fP,Zm,Kf,Qh,iP,DP,AP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx,Zx]}}),t})(),Xx=(()=>{let t=class{constructor(t,e,n,i,s,r,o,a){this.imgManager=t,this.imgSelectionService=e,this.http=n,this.imgCDNService=i,this.imgEventCardService=s,this.alertService=r,this.translateService=o,this.externalService=a,this.picturesList=[],this.picturesListChange=new Yl,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:30,currentPage:1},this.displayPexelsResults=!1,this.disable=!1,this.disableChange=new Yl,this.filtersChange=new Yl,this.pictureNameChange=new Yl,this.isLoading=!1,this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg",this.errorAlreadyUsedImg="ImgManager.ImgList.errorAlreadyUsed",this.fakeImgRoute=this.externalService.getRouteAssets()+"img/fake.png"}onToggleAllCheckBoxRow(t){this.picturesList.forEach(e=>{e.delSelected=t}),this._pictureListeChange()}onToggleDelSelection(t){this.disable||(this.picturesList[t].delSelected=!this.picturesList[t].delSelected,this._pictureListeChange())}onFiltersChange(){this.filtersChange.emit()}onEdit(t){this.imgEventCardService.emitImgToEdit(t)}onToggleSelectImg(t){this.disable||"window"===this.stateDisplayed||(this.picturesList[t].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[t].id_file),this.picturesList[t].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[t]),this.picturesList[t].selected=!0))}onRemoveImg(t){t.deleted=!0,this.imgManager.removeImg(t.id_file).subscribe(e=>{this.imgEventCardService.emitImgRemoved(t.id_file),this.imgSelectionService.removeImgSelectedById(t.id_file)},e=>{const n=409===e.status?this.errorAlreadyUsedImg:this.errorRemoveImg;t.deleted=!1,this.alertService.openAlert(n)})}onPictureNotLoading(t){t.target.src=this.fakeImgRoute}onDownloadImg(t,e){this.http.get(this.getRAWImgRoute(e),{responseType:"blob"}).subscribe(e=>{let n=URL.createObjectURL(e);this.downloadUrl(n,t),URL.revokeObjectURL(n)})}onNameChange(t){this.pictureNameChange.emit({id:t,previousName:this.previousName})}getRAWImgRoute(t){return this.imgCDNService.getUrlImg("raw")+t}_pictureListeChange(){this.picturesListChange.emit()}downloadUrl(t,e){const n=document.createElement("a");n.href=t,n.download=e,n.click()}ngDestroy(){this.getDataAPISub&&this.getDataAPISub.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275dir=ye({type:t,inputs:{picturesList:"picturesList",tableFilters:"tableFilters",displayPexelsResults:"displayPexelsResults",disable:"disable",isLoading:"isLoading",stateDisplayed:"stateDisplayed"},outputs:{picturesListChange:"picturesListChange",disableChange:"disableChange",filtersChange:"filtersChange",pictureNameChange:"pictureNameChange"}}),t})(),Jx=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.focusInput=!1,this.toggleImgSelected=new Yl,this.isUploadSection=!1,this.activeConfirmDelete=!1}ngOnInit(){this.isUploadSection="img-upload"===this.tabDisplayed}onToggleImgSelected(){this.toggleImgSelected.next()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["img-card"]],inputs:{tabDisplayed:"tabDisplayed",fullSize:"fullSize",picture:"picture",index:"index"},outputs:{toggleImgSelected:"toggleImgSelected"},features:[Pa],decls:24,vars:36,consts:[[1,"addCssPriority",3,"ngClass"],[1,"img-card"],[1,"img-card__container",3,"ngClass"],[1,"img-card__container__img",3,"src","alt","click","error"],["class","img-card__container__config",4,"ngIf"],[1,"img-card__container__delete",3,"ngClass"],[3,"click"],["class","img-card__container__valid",4,"ngIf"],["class","img-card__container__overlay",3,"ngClass",4,"ngIf"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"img-card__nameContainer",3,"ngClass"],["type","text",1,"wzImgMngInput","img-card__nameContainer__name",3,"ngModel","ngModelChange","focus","blur"],[1,"img-card__container__config"],[1,"size"],[1,"fal","fa-image-polaroid"],[1,"dl",3,"click"],[1,"fal","fa-download"],[1,"edit",3,"click"],[1,"far","fa-crop-alt"],[1,"deleted",3,"click"],[1,"fal","fa-times"],["class","selected",3,"click",4,"ngIf"],[1,"selected",3,"click"],["class","fal fa-square",4,"ngIf"],["class","fas fa-check-square checked",4,"ngIf"],[1,"fal","fa-square"],[1,"fas","fa-check-square","checked"],[1,"img-card__container__valid"],[1,"far","fa-check"],[1,"img-card__container__overlay",3,"ngClass"],[1,"fad","fa-folder-times",3,"click"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div",2),No(3,"img",3),$o("click",(function(){return e.onToggleImgSelected()}))("error",(function(t){return e.picture.imgNotLoaded=!0,e.onPictureNotLoading(t)})),Wl(4,"imgSrc"),zo(),Mo(5,eE,21,12,"div",4),No(6,"div",5),No(7,"span"),ba(8),Wl(9,"translate"),zo(),No(10,"div"),No(11,"button",6),$o("click",(function(){return e.activeConfirmDelete=!1})),ba(12),Wl(13,"translate"),zo(),No(14,"button",6),$o("click",(function(){return e.onRemoveImg(e.picture),e.activeConfirmDelete=!1})),ba(15),Wl(16,"translate"),zo(),zo(),zo(),Mo(17,nE,5,3,"div",7),Mo(18,sE,2,3,"div",8),Mo(19,rE,1,0,"span",9),zo(),No(20,"div",10),No(21,"input",11),$o("ngModelChange",(function(t){return e.picture.display_name=t}))("ngModelChange",(function(){return e.onNameChange(e.picture.id_file)}))("focus",(function(){return e.previousName=e.picture.display_name,e.focusInput=!0}))("blur",(function(){return e.focusInput=!1})),zo(),No(22,"span"),ba(23),zo(),zo(),zo(),zo()),2&t&&(Ro("@easeInOut","in")("ngClass",zl(25,oE,e.fullSize)),ws(2),Ro("ngClass",Vl(27,aE,"small"===e.stateDisplayed||e.isUploadSection,e.picture.selected,e.picture.deleted)),ws(1),Ro("src",Gl(4,16,e.picture.file_name,"400"),Ji)("alt",e.picture.display_name),ws(2),Ro("ngIf",!e.picture.deleted&&"small"!==e.stateDisplayed),ws(1),Ro("ngClass",zl(31,lE,e.activeConfirmDelete)),ws(2),wa(ql(9,19,"ImgManager.ImgCard.confirmDeleteImg")),ws(4),wa(ql(13,21,"no")),ws(3),wa(ql(16,23,"yes")),ws(2),Ro("ngIf","small"===e.stateDisplayed&&"img-upload"==e.tabDisplayed),ws(1),Ro("ngIf",e.picture.imgNotLoaded),ws(1),Ro("ngIf",e.picture.deleted),ws(1),Ro("ngClass",Fl(33,cE,"small"===e.stateDisplayed||e.isUploadSection,e.focusInput)),ws(1),Ro("ngModel",e.picture.display_name),ws(2),wa(e.picture.display_name))},directives:function(){return[qh,Zh,$m,Zm,Kf,iP]},pipes:function(){return[TP,zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),tP=(()=>{let t=class{constructor(t){this.imgManagerService=t,this.editClosed=new Yl,this.isLoading=!1,this.isImgModified=!1,this.isNameModified=!1,this.currentCroppedImage="",this.msgFailSave="ImgManager.ImgEditor.msgFailSave",this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.msgSuccessEdit="Les modifications de l'image ont bien \xe9t\xe9 enregistr\xe9es."}ngOnInit(){this.previousName=this.imgToEdit.display_name}onSave(){if(this.isLoading)return;this.isLoading=!0;const t=this.imgManagerService.replaceImg(this.currentCroppedImage,this.imgToEdit.id_file),e=this.imgManagerService.changeImgName(this.imgToEdit.display_name,this.imgToEdit.id_file);this.isImgModified&&this.isNameModified?this.ranameAndReplaceImg(e,t):this.isImgModified?t.subscribe(t=>{this.isLoading=!1,this.onEditClosed(this.msgSuccessEdit)},t=>{this.isLoading=!1,this.currentCroppedImage="",this.onEditClosed(this.msgFailSave)}):(this.isNameModified&&e.subscribe(t=>{this.isLoading=!1,this.previousName=this.imgToEdit.display_name,this.onEditClosed(this.msgSuccessEdit)},t=>{this.isLoading=!1,this.imgToEdit.display_name=this.previousName,this.onEditClosed(this.msgFailSave)}),this.isNameModified=!1)}onEditClosed(t){this.editClosed.emit(t)}onRestartEdit(){this.isImgModified=!1,this.isNameModified=!1,this.imgToEdit.display_name=this.previousName}onCancel(){this.onEditClosed("")}onImgCropped(t){this.currentCroppedImage=t}ranameAndReplaceImg(t,e){t.subscribe(t=>{e.subscribe(t=>{this.onEditClosed(this.msgSuccessEdit)},t=>{this.onEditClosed(this.msgFailSave)})},t=>{this.onEditClosed(this.msgFailSave)})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx))},t.\u0275cmp=pe({type:t,selectors:[["img-editor"]],inputs:{stateDisplayed:"stateDisplayed",imgToEdit:"imgToEdit"},outputs:{editClosed:"editClosed"},decls:17,vars:22,consts:[[1,"img-editor"],[1,"img-editor__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"columns"],[1,"column","is-one-third","img-editor__infoSection"],[3,"imgToEdit","isNameModified","isNameModifiedChange"],[1,"img-editor__infoSection__actions"],[1,"button","img-editor__infoSection__actions__cancel",3,"disabled","click"],[1,"button","danger","button","img-editor__infoSection__actions__save",3,"ngClass","click"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"column","img-editor__container"],[3,"imgToEdit","isImgModified","isImgModifiedChange","currentCroppedImageChange","editClosed"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"ng-scrollbar",1,2),No(3,"div",3),No(4,"div",4),No(5,"info-section",5),$o("isNameModifiedChange",(function(t){return e.isNameModified=t})),zo(),No(6,"div",6),No(7,"div"),No(8,"button",7),$o("click",(function(){return e.onCancel()})),ba(9),Wl(10,"translate"),zo(),No(11,"div",8),$o("click",(function(){return e.onSave()})),ba(12),Wl(13,"translate"),Mo(14,hE,1,0,"span",9),zo(),zo(),zo(),zo(),No(15,"div",10),No(16,"cropper",11),$o("isImgModifiedChange",(function(t){return e.isImgModified=t}))("currentCroppedImageChange",(function(t){return e.onImgCropped(t)}))("editClosed",(function(t){return e.onEditClosed(t)})),zo(),zo(),zo(),zo(),zo()),2&t&&(Ro("@easeInOut","in"),ws(1),Ro("visibility","native")("ngClass",Vl(16,uE,"full"===e.stateDisplayed,"small"===e.stateDisplayed,"window"===e.stateDisplayed)),ws(4),Ro("imgToEdit",e.imgToEdit)("isNameModified",e.isNameModified),ws(3),Ro("disabled",e.isLoading),ws(1),Ca(" ",ql(10,12,"ImgManager.ImgLib.cancel")," "),ws(2),Ro("ngClass",zl(20,dE,e.isLoading)),ws(1),Ca(" ",ql(13,14,"ImgManager.ImgEditor.saveBtn")," "),ws(2),Ro("ngIf",e.isLoading),ws(2),Ro("imgToEdit",e.imgToEdit)("isImgModified",e.isImgModified))},directives:function(){return[NC,qh,aP,Zh,cP,iP]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx]}}),t})(),eP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.canvaService=t,this.imgManager=e,this.wzImgEventService=n,this.translateService=i,this.alertService=s,this.renderer=r,this.showImgUploaded=new Yl,this.imgLoading=!1,this.availableFormat={"ImgManager.CanvaBtn.smallSquare":{width:500,height:500},"ImgManager.CanvaBtn.mediumSquare":{width:1e3,height:1e3},"ImgManager.CanvaBtn.bigSquare":{width:2500,height:2500}},this.openDropDownMenu=!1,this.subs=[],this.uploadingImg="ImgManager.CanvaBtn.uploadingImg",this.successUploadPhoto="ImgManager.CanvaBtn.successImport",this.errorUploadCanvaImg="ImgManager.CanvaBtn.errorUploadCanvaImg",this.errorRenameCanvaImg="ImgManager.CanvaBtn.errorRenameCanvaImg"}ngOnInit(){this.canvaLogoRouteAssets=this.canvaService.getCanvaLogo(),this.listenCanvaExpectedSize()}listenCanvaExpectedSize(){const t=this.canvaService.bindEventExepectedImgSizeChange().subscribe(t=>{t?(this.expectedWidth=parseInt(t.image_width,10),this.expectedHeight=parseInt(t.image_height,10)):(this.expectedWidth=void 0,this.expectedHeight=void 0)});this.subs.push(t)}onOpenCanva(t,e){if(this.imgLoading)return;const n=this.canvaService.getCanvaApi().subscribe(n=>{this.canvaApi=n,this.addOverflowBody(),this.createDesign(t,e)});this.subs.push(n)}createDesign(t,e){const n={type:"EtsyShopIcon",dimensions:{units:"px",width:t||void 0,height:e||void 0},publishLabel:this.translateService.instant("ImgManager.CanvaBtn.publish")};this.canvaApi.createDesign({design:n,onDesignPublish:({exportUrl:t,designTitle:e})=>this.designPublished(t,e),onDesignClose:()=>{this.removeOverflowBody()}})}designPublished(t,e){this.alertService.openAlert(this.uploadingImg),this.imgLoading=!0;const n=this.imgManager.uploadFileByUrl(t,e).subscribe(t=>{this.imgLoading=!1,this.removeOverflowBody(),this.wzImgEventService.emitImgAdded(t.id_file),this.alertService.openAlert(this.successUploadPhoto)},t=>{this.imgLoading=!1,this.removeOverflowBody(),406===t.error.code&&t.error.message?this.alertService.openAlertWithBackendRespons(this.errorUploadCanvaImg,t.error.message):this.alertService.openAlert(this.errorUploadCanvaImg)});this.subs.push(n)}addOverflowBody(){this.renderer.addClass(document.body,"ovh-canva")}removeOverflowBody(){this.renderer.removeClass(document.body,"ovh-canva")}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}};return t.\u0275fac=function(e){return new(e||t)(Ao(Fx),Ao(Rx),Ao(Vx),Ao(Nm),Ao(Hx),Ao(Ya))},t.\u0275cmp=pe({type:t,selectors:[["canva-btn"]],inputs:{stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:24,vars:23,consts:[["wzAutoHide","",1,"canva","dropdown","is-right","is-hoverable",3,"ngClass","clickOutside"],[1,"dropdown-trigger"],["aria-controls","dropdown-menuCanva",1,"button","canva-btn",3,"click"],[1,"canva-btn__logo",3,"src"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["id","dropdown-menuCanva","role","menu",1,"dropdown-menu","dropDownShadow",3,"ngClass"],[1,"smallScroll",3,"visibility"],["scrollable",""],[1,"dropdown-content"],[1,"dropdownTitle"],[1,"infoItem"],["class","dropdown-item-wrapper",4,"ngIf"],["class","dropdown-item-wrapper",4,"ngFor","ngForOf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"dropdown-item-wrapper"],[1,"dropdown-item","expectedSizes",3,"click"],[1,"dropdown-item",3,"click"]],template:function(t,e){1&t&&(No(0,"div",0),$o("clickOutside",(function(){return e.openDropDownMenu=!1})),No(1,"div",1),No(2,"div",2),$o("click",(function(){return e.openDropDownMenu=!0})),No(3,"span"),ba(4),Wl(5,"translate"),zo(),Fo(6,"img",3),Mo(7,pE,1,0,"span",4),zo(),zo(),No(8,"div",5),No(9,"ng-scrollbar",6,7),No(11,"div",8),No(12,"div",9),No(13,"p"),ba(14),Wl(15,"translate"),zo(),zo(),No(16,"div",10),No(17,"p"),ba(18),Wl(19,"translate"),zo(),zo(),Vo(20),Mo(21,gE,7,5,"div",11),Uo(),Mo(22,mE,7,5,"div",12),Wl(23,"keyvalue"),zo(),zo(),zo(),zo()),2&t&&(Ro("ngClass",Fl(18,fE,"small"===e.stateDisplayed,"small"!==e.stateDisplayed)),ws(4),wa(ql(5,10,"ImgManager.CanvaBtn.createImg")),ws(2),Ro("src",e.canvaLogoRouteAssets,Ji),ws(1),Ro("ngIf",e.imgLoading),ws(1),Ro("ngClass",zl(21,_E,e.openDropDownMenu)),ws(1),Ro("visibility","hover"),ws(5),wa(ql(15,12,"ImgManager.CanvaBtn.createImg.title")),ws(4),wa(ql(19,14,"ImgManager.CanvaBtn.info")),ws(3),Ro("ngIf",e.expectedWidth&&e.expectedHeight),ws(1),Ro("ngForOf",ql(23,16,e.availableFormat)))},directives:function(){return[sP,qh,Zh,NC,Qh,iP]},pipes:function(){return[zm,tu]},encapsulation:2}),t})(),nP=(()=>{let t=class{constructor(t){this.imgSelectionService=t,this.imgManagerClosed=new Yl,this.imgSelectedList=[],this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1,this.dragStart=!1,this.isLoading=!1,this.trashPositionIndex=0,this.trashPositionLeft="-5px"}ngOnInit(){this.getImgSelected(),this.imgSelectionService.getImgListLoadingEventListner().subscribe(t=>{this.isLoading=t})}init(){this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1}getImgSelected(){this.imgSelectedList=this.imgSelectionService.getImgSelection()}removeImg(t){this.imgSelectionService.removeImgSelectedByIndex(t)}drop(t){t.previousIndex!==t.currentIndex&&this.imgSelectionService.moveImgOrder(t)}removeImgFromSelection(t){this.imgSelectionService.removeImgSelectedByIndex(t.previousIndex)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ax))},t.\u0275cmp=pe({type:t,selectors:[["img-selection"]],inputs:{tabDisplayed:"tabDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:7,vars:5,consts:[["cdkDropList","",1,"trash",3,"cdkDropListDropped"],["unSelectList","cdkDropList"],["class","img-selection",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"img-selection",3,"ngClass"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"list_img_selection",3,"cdkDropListConnectedTo","cdkDropListDropped"],["selectionList","cdkDropList"],["class","img_box","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf"],["cdkDrag","",1,"img_box",3,"cdkDragStarted","cdkDragEnded"],["class","drag__img",3,"src","title",4,"ngIf"],[1,"delete-btn",3,"click"],[1,"drag__tooltips"],[1,"drag__img",3,"src","title"]],template:function(t,e){1&t&&(No(0,"div",0,1),$o("cdkDropListDropped",(function(t){return e.removeImgFromSelection(t)})),No(2,"p"),ba(3),Wl(4,"translate"),zo(),zo(),Mo(5,SE,4,7,"div",2),Mo(6,IE,2,0,"ng-container",3)),2&t&&(ws(3),wa(ql(4,3,"ImgManager.ImgSelection.unselect")),ws(2),Ro("ngIf",!e.isLoading),ws(1),Ro("ngIf",e.isLoading))},directives:function(){return[YS,Zh,qh,Qh,eI,DP]},pipes:function(){return[zm,TP]},encapsulation:2}),t})(),iP=(()=>{let t=class{constructor(t){this.currentLoading=0,this.interval=null,this.element=t,this.launchLoading()}launchLoading(){null===this.interval&&(this.currentLoading=10,this.element.nativeElement.style.width=this.currentLoading+"%",this.interval=setInterval(()=>{this.currentLoading<80&&(this.currentLoading+=Math.floor(15*Math.random()),this.element.nativeElement.style.width=this.currentLoading+"%"),this.currentLoading>=80&&this.currentLoading<95&&(this.currentLoading+=Math.floor(2*Math.random()),this.element.nativeElement.style.width=this.currentLoading+"%")},70))}ngOnDestroy(){this.interval&&(clearInterval(this.interval),this.interval=null)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga))},t.\u0275dir=ye({type:t,selectors:[["","btnLoadingAnim",""]]}),t})(),sP=(()=>{let t=class{constructor(t,e){this._elementRef=t,this.domService=e,this.forceOn=null,this.clickOutside=new Yl}ngAfterViewInit(){this.domService.documentEvent().subscribe(t=>{const e=this._elementRef.nativeElement.contains(t),n=t.getAttribute("class");if(e||null!==n&&n.includes(this.triggerElement)||this.clickOutside.emit(null),null!=this.forceOn&&null!==n){let t=!0;this.forceOn.forEach(e=>{n.includes(e)||(t=!1)}),t&&this.clickOutside.emit(null)}})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ux))},t.\u0275dir=ye({type:t,selectors:[["","wzAutoHide",""]],inputs:{forceOn:"forceOn",triggerElement:"triggerElement"},outputs:{clickOutside:"clickOutside"}}),t})(),rP=(()=>{let t=class{constructor(){this.copied=new Yl}onClick(t){if(t.preventDefault(),!this.payload)return;let e=t=>{(t.clipboardData||window.clipboardData).setData("text",this.payload.toString()),t.preventDefault(),this.copied.emit(this.payload)};document.addEventListener("copy",e,!1),document.execCommand("copy"),document.removeEventListener("copy",e,!1)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["","copy-clipboard",""]],hostBindings:function(t,e){1&t&&$o("click",(function(t){return e.onClick(t)}))},inputs:{payload:["copy-clipboard","payload"]},outputs:{copied:"copied"}}),t})(),oP=(()=>{let t=class{constructor(){this.disable=!1}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["dropdown"]],inputs:{disable:"disable",dropDownMenuClass:"dropDownMenuClass"},ngContentSelectors:xE,decls:6,vars:4,consts:[[1,"dropdown","dropdownWizi",3,"ngClass"],[1,"dropdown-trigger"],["role","menu",1,"dropdown-menu",3,"ngClass"],[1,"dropdown-content"]],template:function(t,e){1&t&&(Ko(EE),No(0,"div",0),No(1,"div",1),Zo(2),zo(),No(3,"div",2),No(4,"div",3),Zo(5,1),zo(),zo(),zo()),2&t&&(Ro("ngClass",zl(2,WI,!e.disable)),ws(3),Ro("ngClass",e.dropDownMenuClass))},directives:[qh],encapsulation:2}),t})(),aP=(()=>{let t=class{constructor(t){this.alertService=t,this._isNameModified=!1,this.isNameModifiedChange=new Yl,this.msgCopyToClipBoard="ImgManager.ImgEditor.copytoClipBoard"}set isNameModified(t){this._isNameModified=t}get isNameModified(){return this._isNameModified}ngOnInit(){this.init()}init(){this.imgName=this.imgToEdit.display_name}getFileSize(){return this.imgToEdit?Math.round(parseInt(this.imgToEdit.size)/1e3):"-"}copyToClipBoard(t){this.alertService.openAlert(this.msgCopyToClipBoard)}onNameChange(){this.isNameModifiedChange.emit(!0)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Hx))},t.\u0275cmp=pe({type:t,selectors:[["info-section"]],inputs:{isNameModified:"isNameModified",imgToEdit:"imgToEdit"},outputs:{isNameModifiedChange:"isNameModifiedChange"},decls:76,vars:60,consts:[[1,"img-editor__infoSection__propertyEditable"],[1,"mainColor"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertyEditable__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"],[1,"fas","fa-info-circle"],["type","text","debounceKeyUp","",1,"img-editor__infoSection__propertyEditable__input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[3,"copy-clipboard","copied"],[1,"img-editor__infoSection__propertyEditable__span"],[1,"far","fa-copy"],[1,"img-editor__infoSection__property"],[1,"img-editor__infoSection__divider"],[1,"img-editor__infoSection__titleSEO"],[1,"img-editor__infoSection__propertySEO"],[1,"fal","fa-check"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertySEO__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"p",1),ba(2),Wl(3,"translate"),No(4,"span",2),Wl(5,"translate"),Fo(6,"i",3),zo(),zo(),No(7,"input",4),$o("ngModelChange",(function(t){return e.imgToEdit.display_name=t}))("onEventChange",(function(){return e.onNameChange()})),Wl(8,"translate"),zo(),zo(),No(9,"div",0),No(10,"p",1),ba(11),Wl(12,"translate"),zo(),No(13,"button",5),$o("copied",(function(t){return e.copyToClipBoard(t)})),Wl(14,"imgSrc"),No(15,"span",6),ba(16),zo(),ba(17,"\xa0\xa0"),Fo(18,"i",7),zo(),zo(),No(19,"div",8),No(20,"p",1),ba(21),Wl(22,"translate"),zo(),No(23,"p"),ba(24),zo(),zo(),No(25,"div",8),No(26,"p",1),ba(27),Wl(28,"translate"),zo(),No(29,"p"),ba(30),zo(),zo(),Fo(31,"span",9),No(32,"div",10),No(33,"p",1),ba(34),Wl(35,"translate"),zo(),zo(),No(36,"div",11),No(37,"p",1),ba(38),Wl(39,"translate"),zo(),No(40,"p"),Fo(41,"i",12),ba(42,"\xa0100%"),zo(),No(43,"p",13),Wl(44,"translate"),Fo(45,"i",3),zo(),zo(),No(46,"div",11),No(47,"p",1),ba(48),Wl(49,"translate"),zo(),No(50,"p"),Fo(51,"i",12),ba(52,"\xa0100%"),zo(),No(53,"p",13),Wl(54,"translate"),Fo(55,"i",3),zo(),zo(),No(56,"div",11),No(57,"p",1),ba(58),Wl(59,"translate"),zo(),No(60,"p"),Fo(61,"i",12),ba(62,"\xa0100%"),zo(),No(63,"p",13),Wl(64,"translate"),Fo(65,"i",3),zo(),zo(),No(66,"div",11),No(67,"p",1),ba(68),Wl(69,"translate"),zo(),No(70,"p"),Fo(71,"i",12),ba(72,"\xa0100%"),zo(),No(73,"p",13),Wl(74,"translate"),Fo(75,"i",3),zo(),zo()),2&t&&(ws(2),Ca(" ",ql(3,27,"ImgManager.UploadList.properties.imgName")," "),ws(2),Ro("nwbToolTip",ql(5,29,"ImgManager.ImgEditor.NameInfo"))("nwbToolTipIsMultiline",!0),ws(3),Xo("placeholder","",ql(8,31,"ImgManager.ImgEditor.nameEx")," "),Ro("ngModel",e.imgToEdit.display_name)("debounceTime",500),ws(4),wa(ql(12,33,"ImgManager.UploadList.properties.imgURL")),ws(2),Ro("copy-clipboard",Gl(14,35,e.imgToEdit.file_name,"raw")),ws(3),wa(e.imgToEdit.file_name),ws(5),Ca("",ql(22,38,"ImgManager.UploadList.properties.imgSize"),"\xa0:"),ws(3),Sa("",e.imgToEdit.raw_height,"*",e.imgToEdit.raw_width,"px"),ws(3),Ca("",ql(28,40,"ImgManager.UploadList.properties.imgWeight"),"\xa0:"),ws(3),Ca("",e.getFileSize(),"\xa0ko"),ws(4),wa(ql(35,42,"ImgManager.UploadList.seo.title")),ws(4),wa(ql(39,44,"ImgManager.UploadList.seo.rezise")),ws(5),Ro("nwbToolTip",ql(44,46,"ImgManager.UploadList.seo.reziseTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(49,48,"ImgManager.UploadList.seo.webp")),ws(5),Ro("nwbToolTip",ql(54,50,"ImgManager.UploadList.seo.webpTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(59,52,"ImgManager.UploadList.seo.cdn")),ws(5),Ro("nwbToolTip",ql(64,54,"ImgManager.UploadList.seo.cdnTooltips"))("nwbToolTipIsMultiline",!0),ws(5),wa(ql(69,56,"ImgManager.UploadList.seo.lazyloading")),ws(5),Ro("nwbToolTip",ql(74,58,"ImgManager.UploadList.seo.lazyloadingTooltips"))("nwbToolTipIsMultiline",!0))},directives:function(){return[Pw,MP,$m,Zm,Kf,rP]},pipes:function(){return[zm,TP]},encapsulation:2}),t})();const lP=zu("insertRemoveAnnim",[Hu(":enter",[Uu({opacity:0}),Fu("0.5s ease-in-out",Uu({opacity:1}))])]);let cP=(()=>{let t=class{constructor(t){this.imgCDNService=t,this._isImgModified=!1,this.isImgModifiedChange=new Yl,this.editClosed=new Yl,this.currentCroppedImageChange=new Yl,this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.isNameModified=!1,this.isCropperReady=!1,this.currentCroppedImage="",this.isCropped=!1,this.isLoading=!1,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.imageChangedEvent="",this.croppedImage="",this.canvasRotation=0,this.rotation=0,this.scale=1,this.showCropper=!1,this.containWithinAspectRatio=!1,this.transform={},this.resolutionConfig=[{label:"ImgManager.ImgEditor.config.origin",config:{maintainAspectRatio:!0}},{label:"ImgManager.ImgEditor.config.free",config:{maintainAspectRatio:!1},active:!0},{label:"ImgManager.ImgEditor.config.square",config:{maintainAspectRatio:!0,aspectRatio:1}},{label:"ImgManager.ImgEditor.config.Portrait",config:{maintainAspectRatio:!0,aspectRatio:3/4}},{label:"ImgManager.ImgEditor.config.landscape",config:{maintainAspectRatio:!0,aspectRatio:5/3}}],this.rotationConfig=[{label:"ImgManager.ImgEditor.config.schedule",icon:"fal fa-redo-alt",method:"rotateRight",active:!0},{label:"ImgManager.ImgEditor.config.AntiSchedule",icon:"fal fa-undo-alt",method:"rotateLeft"},{label:"ImgManager.ImgEditor.config.flipVert",icon:"fal fa-sort-alt",method:"flipVertical"},{label:"ImgManager.ImgEditor.config.flipHoriz",icon:"fal fa-exchange-alt",method:"flipHorizontal"}],this.zoomConfig=[{label:"ImgManager.ImgEditor.config.zoom",icon:"fal fa-search-plus",method:"zoomIn",active:!0},{label:"ImgManager.ImgEditor.config.dezoom",icon:"fal fa-search-minus",method:"zoomOut"}],this.imgCropperConfig={maintainAspectRatio:!1,aspectRatio:void 0}}set isImgModified(t){this._isImgModified=t,t||this.restartEdit()}get isImgModified(){return this._isImgModified}ngOnInit(){this.init()}init(){this.imgRoute=this.getRAWImgRoute(),this.imgType=this.getImgType(),this.croppedImage=null,this.setDefautAspectRatio()}getRAWImgRoute(){return this.imgCDNService.getUrlImg("raw")+this.imgToEdit.file_name}getImgType(){return this.imgToEdit.file_name?this.imgToEdit.file_name.split(".").pop():void 0}setDefautAspectRatio(){const t=parseInt(this.imgToEdit.raw_height),e=parseInt(this.imgToEdit.raw_width);this.defaultAspectRatio=t/e,this.resolutionConfig[0].config.aspectRatio=this.defaultAspectRatio,this.imgCropperConfig.aspectRatio=this.defaultAspectRatio}onEditClosed(t){this.editClosed.emit(t)}onRestart(){this.isImgModifiedChange.emit(!1)}restartEdit(){this.init(),this.resetConfCropper()}onImgModified(){this.isImgModified=!0,this.isImgModifiedChange.emit(!0)}fileChangeEvent(t){this.imageChangedEvent=t}imageCropped(t){this.detectImgCropperChange(),this.currentCroppedImage=t.base64,this.currentCroppedImageChange.emit(this.currentCroppedImage)}imageLoaded(){this.showCropper=!0}cropperReady(){this.isCropperReady=!0}loadImageFailed(){this.onEditClosed(this.msgFailLoad)}changeResolutionSize(t){this.setActiveItem(this.resolutionConfig,t),this.setCropperProperties(this.resolutionConfig[t].config)}confirmCrop(){this.imgRoute=null,this.croppedImage=this.currentCroppedImage,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.resetConfCropper(),this.onImgModified()}resetConfCropper(){this.scale=1,this.rotation=0,this.canvasRotation=0,this.transform={}}setActiveItem(t,e){t.forEach((t,n)=>{t.active=n===e})}setCropperProperties(t){for(const e in t)this.imgCropperConfig[e]=t[e]}detectImgCropperChange(){this.isImgCropped=this.isImgCroppedInitilized,this.isImgCroppedInitilized=!0}rotateLeft(){this.canvasRotation--,this.flipAfterRotate(),this.onImgModified()}rotateRight(){this.canvasRotation++,this.flipAfterRotate(),this.onImgModified()}flipHorizontal(){this.transform=Object.assign(Object.assign({},this.transform),{flipH:!this.transform.flipH}),this.onImgModified()}flipVertical(){this.transform=Object.assign(Object.assign({},this.transform),{flipV:!this.transform.flipV}),this.onImgModified()}flipAfterRotate(){const t=this.transform.flipH,e=this.transform.flipV;this.transform=Object.assign(Object.assign({},this.transform),{flipH:e,flipV:t})}zoomOut(){this.scale-=this.scale<.2?0:.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}zoomIn(){this.scale+=.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}applyMethod(t){this[t]()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Lx))},t.\u0275cmp=pe({type:t,selectors:[["cropper"]],inputs:{isImgModified:"isImgModified",imgToEdit:"imgToEdit"},outputs:{isImgModifiedChange:"isImgModifiedChange",editClosed:"editClosed",currentCroppedImageChange:"currentCroppedImageChange"},decls:33,vars:31,consts:[[1,"img-editor__container__toolsContainer"],[4,"ngIf"],["dropdownId","dropdown-resolution"],["label",""],[1,"img-editor__container__toolsContainer__tool"],[1,"far","fa-crop"],["item","",4,"ngFor","ngForOf"],["dropdownId","dropdown-rotation"],[1,"img-editor__container__toolsContainer__tool",3,"click"],[1,"far","fa-expand-arrows-alt"],["dropdownId","dropdown-rotation","dropDownMenuClass","img-editor__container__toolsContainer__RotationDropdown"],[1,"far","fa-redo"],[1,"far","fa-retweet-alt"],[1,"img-editor__image-cropper"],[3,"imageURL","imageBase64","maintainAspectRatio","containWithinAspectRatio","aspectRatio","onlyScaleDown","roundCropper","canvasRotation","transform","alignImage","format","backgroundColor","imageCropped","imageLoaded","cropperReady","loadImageFailed"],["nwbToolTipPosition","left",1,"img-editor__container__toolsContainer__tool","img-editor__container__toolsContainer__tool--button",3,"nwbToolTip","click"],[1,"far","fa-check"],["item",""],[1,"dropdown-item",3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,PE,7,6,"div",1),No(2,"dropdown",2),Vo(3,3),No(4,"div",4),Fo(5,"i",5),No(6,"p"),ba(7),Wl(8,"translate"),zo(),zo(),Uo(),Mo(9,kE,5,6,"ng-container",6),zo(),No(10,"dropdown",7),Vo(11,3),No(12,"div",8),$o("click",(function(){return e.zoomIn()})),Fo(13,"i",9),No(14,"p"),ba(15),Wl(16,"translate"),zo(),zo(),Uo(),Mo(17,DE,6,7,"ng-container",6),zo(),No(18,"dropdown",10),Vo(19,3),No(20,"div",8),$o("click",(function(){return e.rotateRight()})),Fo(21,"i",11),No(22,"p"),ba(23),Wl(24,"translate"),zo(),zo(),Uo(),Mo(25,OE,6,7,"ng-container",6),zo(),No(26,"div",8),$o("click",(function(){return e.onRestart()})),Fo(27,"i",12),No(28,"p"),ba(29),Wl(30,"translate"),zo(),zo(),zo(),No(31,"div",13),No(32,"image-cropper",14),$o("imageCropped",(function(t){return e.imageCropped(t)}))("imageLoaded",(function(){return e.imageLoaded()}))("cropperReady",(function(){return e.cropperReady()}))("loadImageFailed",(function(){return e.loadImageFailed()})),zo(),zo()),2&t&&(ws(1),Ro("ngIf",e.isImgCropped),ws(6),wa(ql(8,23,"ImgManager.ImgEditor.crop")),ws(2),Ro("ngForOf",e.resolutionConfig),ws(6),wa(ql(16,25,"ImgManager.ImgEditor.display")),ws(2),Ro("ngForOf",e.zoomConfig),ws(6),wa(ql(24,27,"ImgManager.ImgEditor.rotation")),ws(2),Ro("ngForOf",e.rotationConfig),ws(1),Ro("@insertRemoveAnnim",void 0),ws(3),wa(ql(30,29,"ImgManager.ImgEditor.restart")),ws(3),oa("display",e.showCropper?null:"none"),Ro("imageURL",e.imgRoute)("imageBase64",e.croppedImage)("maintainAspectRatio",e.imgCropperConfig.maintainAspectRatio)("containWithinAspectRatio",e.containWithinAspectRatio)("aspectRatio",e.imgCropperConfig.aspectRatio)("onlyScaleDown",!0)("roundCropper",!1)("canvasRotation",e.canvasRotation)("transform",e.transform)("alignImage","center")("format",e.imgType)("backgroundColor","white"))},directives:[Zh,oP,Qh,cS,Pw,qh],pipes:[zm],encapsulation:2,data:{animation:[lP]}}),t})(),hP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.imgManager=t,this.imgEventService=e,this.imgSelectionService=n,this.alertService=i,this.userSettingsService=s,this.renamePictureService=r,this.listDisplayed=!1,this.multipleImgMode=!1,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:0,currentPage:1},this.widthLargeCard=219,this.widthSmallCard=160,this.nbFakeImg=0,this.imgFullWidthConfig=[{max:419,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:499,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:719,largeImgWidthFactor:.5,smallImgWidthFactor:.3333},{max:1023,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1599,largeImgWidthFactor:.2,smallImgWidthFactor:.1111},{largeImgWidthFactor:.1666,smallImgWidthFactor:.1}],this.imgWidthConfig=[{max:1024,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1199,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1299,largeImgWidthFactor:.3333,smallImgWidthFactor:.1666},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.1666},{max:1599,largeImgWidthFactor:.25,smallImgWidthFactor:.14},{largeImgWidthFactor:.25,smallImgWidthFactor:.125}],this.searchQueryChanged=new E,this.filtersChanged=new E,this.picturesList=[],this.savePictureList=[],this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!0,this.isTotalRetieved=!1,this.delListImgLoader=!1,this.initComponent=!0,this.failLoaded=!1,this.displayPexelsResults=!1,this.confirmImgSup=!1,this.pageIndex=0,this.length=0,this.pageSize=30,this.pageSizeOptions=[25,50,100,250],this.errorGetAllImg="ImgManager.ImgLib.errorGetAllImg",this.errorGetTotalImg="ImgManager.ImgLib.errorGetTotalImg",this.errorGetImg="ImgManager.ImgLib.errorGetCanvaImg",this.msgNoImgFound="ImgManager.ImgLib.noImgFound",this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg"}ngOnInit(){this.maxLengthCardShow&&this.reducePictureListMaxLength(),this.setEvents(),this.imgSelectedList=this.imgSelectionService.getImgSelection()}ngAfterViewInit(){this.setNbImgToDisplay(),this._getImgList(),this.savePictureList||(this.savePictureList=this.picturesList)}reducePictureListMaxLength(){this.picturesList.splice(0,this.maxLengthCardShow)}getImgList(){this.filtersChanged.next()}onSwitchFormatDisplayed(t){this.listDisplayed=t,this.userSettingsService.setUserDisplayPreference(t),this.imgEventService.emitlistDisplayedChange(t)}onImgSelected(){this.setNbImgToDelSelected()}onShowImgUploaded(){this.searchText=null,this.searchedValue=null,this.getImgList()}onRenamePicture(t){this.renamePictureService.onRenamePicture(t)}removeListImg(){if(this.disable)return;this.disable=!0,this.delListImgLoader=!0,this.confirmImgSup=!1;const t=[];this.picturesList.forEach(e=>{e.delSelected&&(e.deleted=!0,t.push(e.id_file))}),this.imgManager.removeMultipleImg(t).subscribe(()=>{this.getImgList(),this.imgSelectionService.removeImgSelectionByIds(t)},t=>{this.getImgList(),this.alertService.openAlert(this.errorRemoveImg)})}selectImgChosen(){if(this.disable)return;const t=[];this.picturesList.map(e=>{e.delSelected&&(e.delSelected=!1,e.selected=!0),e.selected&&t.push(e)}),this.setNbImgToDelSelected(),this.imgSelectionService.setImgSelection(t)}displayConfirmImgSup(){this.disable||(this.confirmImgSup=!0)}cancelSup(){this.confirmImgSup=!1}onPicturesListChange(){this.setNbImgToDelSelected()}onFiltersChange(){this.getImgList()}setNbImgToDisplay(){const t=this.imgLibContainer.nativeElement.offsetWidth+30,e=window.innerWidth-document.body.offsetWidth,[n,i]=this.getImgWidthFactors(),s=Math.floor(t*i),r=Math.ceil((t+e)*n);this.nbMaxImgPerLine=Math.floor(t/s),this.nbMinImgPerLine=Math.floor((t+e)/r),this.pageSize=this.getTotalImgPerPage()}getImgWidthFactors(){const t=window.innerWidth;let e=0,n=[];const i=this.fullSize?this.imgFullWidthConfig:this.imgWidthConfig;for(const s of i){if(!s.max){n=[s.largeImgWidthFactor,s.smallImgWidthFactor];break}if(e<t&&t<=s.max){n=[s.largeImgWidthFactor,s.smallImgWidthFactor];break}e=s.max}return n}getTotalImgPerPage(){let t=this.nbMinImgPerLine;for(;t<30||t%this.nbMaxImgPerLine!=0||t%this.nbMinImgPerLine!=0;)t+=this.nbMinImgPerLine;return t}setParams(){this.params={limit:this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage.toString():this.pageSize.toString(),page:this.tableFilters.currentPage.toString()},this.tableFilters.searchValue&&(this.params["display_name:contains"]=this.tableFilters.searchValue.toString())}initVariables(t){this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!1,this.delListImgLoader=!1,this.initComponent=!1,this.displayPexelsResults=!1,this.failLoaded=!t,this.nbFakeImg=0}selectImgSelected(){if(!this.imgSelectedList||!this.imgSelectedList.length)return;const t=[];this.imgSelectedList.forEach(e=>t.push(e.id_file)),this.picturesList.forEach(e=>{-1!==t.indexOf(e.id_file)&&(e.selected=!0)})}displayPexelsLib(){this.displayPexelsResults=!0,this.alertService.openAlert(this.msgNoImgFound)}calculNbImgFake(t){const e="small"===this.stateDisplayed||"img-upload"===this.tabDisplayed?this.nbMaxImgPerLine:this.nbMinImgPerLine;t%e!=0&&(this.nbFakeImg=e-t%e)}getImg(t){this.imgManager.getShopImg(t).pipe(hm(1)).subscribe(t=>{this.imgAlreadyExist(t.id_file)||(this.picturesList.unshift(t),this.length+=1)},t=>{this.alertService.openAlert(this.errorGetImg)})}imgAlreadyExist(t){for(const e of this.picturesList)if(e.id_file===t)return!0;return!1}setNbImgToDelSelected(){this.nbImgToDelSelected=this.picturesList.filter(t=>t.delSelected).length,this.nbImgToDelSelected||(this.confirmImgSup=!1)}setEvents(){this.searchQueryChanged.pipe(cC(400)).subscribe(t=>{this.getImgList()}),this.filtersChanged.pipe(cC(800)).subscribe(t=>{this._getImgList()}),this.imgRemovedEvent=this.imgEventService.getImgRemovedEventListner().subscribe(t=>{this.getImgList()}),this.imgAddedEvent=this.imgEventService.getImgAddedEventListner().subscribe(t=>{t&&!this.imgAlreadyExist(t)&&this.getImg(t)}),this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{if(this.listDisplayed)return;const e=[];t.map(t=>e.push(t.id_file));for(const n of this.picturesList)-1===e.indexOf(n.id_file)&&(n.selected=!1)})}_getImgList(){this.isLoading=!0,this.displayPexelsResults=!1,this.isTotalRetieved=!1,this.setParams(),this.imgManager.getShopImgList(this.params).pipe(hm(1)).subscribe(t=>{this.initVariables(!0),this.calculNbImgFake(t.data.length),this.picturesList=t.data,this.renamePictureService.setPicturesList(this.picturesList),this.selectImgSelected(),this.length=this.isTotalRetieved?this.length:t.totalRecords,this.tableFilters.totalItems=this.isTotalRetieved?this.tableFilters.totalItems:t.totalRecords,this.tableFilters.itemsPerPage=this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage:this.pageSize,this.maxLengthCardShow&&(this.picturesList=this.picturesList.splice(0,8)),0===t.totalRecords&&this.displayPexelsLib(),this.refreshTotalImgList()},t=>{this.alertService.openAlert(this.errorGetAllImg),this.initVariables(!1)})}refreshTotalImgList(){this.imgManager.getShopTotalImgList(this.params).pipe(hm(1)).subscribe(t=>{this.isTotalRetieved=!0,this.length=t.totalRecords,this.tableFilters.totalItems=t.totalRecords},t=>{this.alertService.openAlert(this.errorGetTotalImg),this.initVariables(!1)})}ngOnDestroy(){this.searchQueryChanged.unsubscribe(),this.imgRemovedEvent.unsubscribe(),this.imgAddedEvent.unsubscribe(),this.imgSelectionChange.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Vx),Ao(Ax),Ao(Hx),Ao(zx),Ao(Wx))},t.\u0275cmp=pe({type:t,selectors:[["images-view"]],viewQuery:function(t,e){var n;1&t&&hc(RE,!0),2&t&&lc(n=gc())&&(e.imgLibContainer=n.first)},inputs:{listDisplayed:"listDisplayed",multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed",fullSize:"fullSize",maxLengthCardShow:"maxLengthCardShow"},decls:9,vars:19,consts:[[1,"images-view",3,"ngClass"],["class","images-view__container",3,"ngClass",4,"ngIf"],[1,"images-view__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"images-view__wrapper"],["imgLibContainer",""],[4,"ngIf"],["class","images-view--pexels",4,"ngIf"],[1,"images-view__container",3,"ngClass"],["class","field has-addons subHeaderActions",4,"ngIf"],[1,"mainColor"],[1,"field","has-addons","subHeaderActions"],[1,"images-view__container__boxAction"],["class","button success images-view__container__boxAction__import",3,"click",4,"ngIf"],["class","button images-view__container__boxAction__delBtn danger",3,"click",4,"ngIf"],[1,"images-view__container__boxAction__confirmSup",3,"ngClass"],["class","images-view__container__boxAction__confirmSup__text",4,"ngIf"],[1,"button","images-view__container__boxAction__confirmSup__cancel",3,"click"],[1,"button","images-view__container__delBtn","danger",3,"click"],[1,"field","has-addons","images-view__container__buttonBox"],[1,"control"],[1,"button","is-lighted","images-view__container__buttonBox__btn",3,"ngClass","click"],[1,"icon","is-small"],[1,"far","fa-th"],[1,"fas","fa-bars"],[1,"button","success","images-view__container__boxAction__import",3,"click"],[1,"fal","fa-check"],[1,"button","images-view__container__boxAction__delBtn","danger",3,"click"],[1,"fal","fa-times"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"images-view__container__boxAction__confirmSup__text"],[3,"picturesList","tableFilters","disable","nbFakeImg","stateDisplayed","tabDisplayed","displayPexelsResults","isLoading","fullSize","picturesListChange","filtersChange","disableChange","pictureNameChange"],[3,"picturesList","tableFilters","disable","displayPexelsResults","stateDisplayed","isLoading","picturesListChange","filtersChange","disableChange","pictureNameChange"],[1,"images-view--pexels"],[3,"searchValue","disableSearch","showImgUploaded"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,GE,4,7,"div",1),zo(),No(2,"ng-scrollbar",2,3),No(4,"div",4,5),Mo(6,QE,2,10,"div",6),Mo(7,KE,2,7,"div",6),zo(),zo(),Mo(8,ZE,2,3,"div",7)),2&t&&(Ro("ngClass",Fl(8,YE,e.fullSize,"small"===e.stateDisplayed))("@easeInOut","in"),ws(1),Ro("ngIf","small"!==e.stateDisplayed||"img-upload"===e.tabDisplayed),ws(1),Ro("visibility","native")("ngClass",function(t,e,n,i,s,r,o,a,l,c){const h=rn()+11,u=Ke();let d=Po(u,h,n,i,s,r);return xo(u,h+4,o,a,l)||d?So(u,h+7,e(n,i,s,r,o,a,l)):function(t,e){return t[e]}(u,h+7)}(0,XE,e.displayPexelsResults&&!e.listDisplayed,e.displayPexelsResults&&!e.listDisplayed&&"small"===e.stateDisplayed,e.displayPexelsResults&&e.listDisplayed,"full"===e.stateDisplayed,"small"===e.stateDisplayed&&"img-upload"!==e.tabDisplayed,"small"===e.stateDisplayed&&"img-upload"===e.tabDisplayed,"window"===e.stateDisplayed)),ws(4),Ro("ngIf",!e.listDisplayed||"small"===e.stateDisplayed),ws(1),Ro("ngIf",e.listDisplayed&&"small"!==e.stateDisplayed),ws(1),Ro("ngIf",e.displayPexelsResults))},directives:function(){return[qh,Zh,NC,iP,uP,dP,Yx]},pipes:function(){return[zm]},encapsulation:2,data:{animation:[Bx,lP]}}),t})(),uP=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.nbFakeImg=0}ngOnInit(){}onSearchChange(t){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.filtersChange.emit(this.tableFilters)}onCardRenamePicture(t){this.pictureNameChange.next(t)}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["mosaic-view"]],inputs:{nbFakeImg:"nbFakeImg",tabDisplayed:"tabDisplayed",fullSize:"fullSize"},features:[Pa],decls:5,vars:9,consts:[[1,"mosaic",3,"ngClass"],["class","mosaic__search",3,"ngClass",4,"ngIf"],["class","mosaic__container__cards",3,"ngClass",4,"ngIf"],["class","mosaic__container__loader",4,"ngIf"],["class","mosaic__pagination",4,"ngIf"],[1,"mosaic__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"mosaic__container__cards",3,"ngClass"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange",4,"ngFor","ngForOf"],["class","mosaic__container__cards__fakeImg",3,"ngClass",4,"ngFor","ngForOf"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange"],[1,"mosaic__container__cards__fakeImg",3,"ngClass"],[1,"mosaic__container__loader"],[3,"small"],[1,"mosaic__pagination"],[3,"pagination","pageChange"]],template:function(t,e){1&t&&(No(0,"div",0),Mo(1,tx,3,8,"div",1),Mo(2,rx,4,8,"div",2),Mo(3,ox,2,1,"div",3),Mo(4,ax,2,1,"div",4),zo()),2&t&&(Ro("ngClass",Vl(5,lx,e.fullSize,"small"===e.stateDisplayed,e.displayPexelsResults)),ws(1),Ro("ngIf","img-upload"!==e.tabDisplayed),ws(1),Ro("ngIf",!e.isLoading&&!e.displayPexelsResults),ws(1),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",e.picturesList.length&&"img-upload"!==e.tabDisplayed&&!e.displayPexelsResults))},directives:function(){return[qh,Zh,fP,Zm,Kf,Qh,Jx,DP,vP]},pipes:function(){return[zm,OP]},encapsulation:2,data:{animation:[Zx]}}),t})(),dP=(()=>{let t=class extends Xx{constructor(t,e,n,i,s,r,o,a){super(t,e,n,i,s,r,o,a),this.dataTableName="imgagesView"}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)(Ao(Rx),Ao(Ax),Ao(Hg),Ao(Lx),Ao(Vx),Ao(Hx),Ao(Nm),Ao(Nx))},t.\u0275cmp=pe({type:t,selectors:[["table-view"]],features:[Pa],decls:9,vars:15,consts:[[1,"table-view"],[3,"checkbox","tableFilters","placeholder","disablePagniation","isLoading","toggleAllCheckBox","tableFiltersChange"],["headerCell","","columnSize","2","sortName","name",3,"headerName"],["headerCell","","centerCell","center",3,"headerName"],["headerCell","","columnSize","0"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange",4,"ngFor","ngForOf"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange"],["tableColumn","","columnSize","2"],[1,"table-view__row__container"],[1,"table-view__row__container__imgContainer",3,"ngClass","click"],["alt","picture.display_name",1,"table-view__row__container__imgContainer__img",3,"src","ngClass","error"],["class","table-view__row__container__imgContainer__overlay",4,"ngIf"],["type","text",1,"wzImgMngInput","table-view__row__container__name",3,"ngModel","ngClass","disabled","ngModelChange","focus","blur","click"],["tableColumn","","centerCell","center",3,"click"],[1,"grey"],["tableColumn","","centerCell","center","columnSize","0",1,"table-view__dropdown-options"],["dropdownId","dropdown-options",3,"disable"],["label",""],[1,"table-view__dropdown-options__label","rotate"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"far","fa-ellipsis-h","is-size-4"],["item",""],[1,"dropdown-item",3,"click"],[1,"far","fa-download","download"],[1,"far","fa-crop-alt","edit"],[1,"fal","fa-times","deleted"],[1,"table-view__row__container__imgContainer__overlay"],[1,"fad","fa-folder-times"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"wz-table",1),$o("toggleAllCheckBox",(function(t){return e.onToggleAllCheckBoxRow(t)}))("tableFiltersChange",(function(t){return e.tableFilters=t}))("tableFiltersChange",(function(){return e.onFiltersChange()})),Wl(2,"translate"),Fo(3,"div",2),Wl(4,"translate"),Fo(5,"div",3),Wl(6,"translate"),Fo(7,"div",4),Mo(8,px,38,29,"div",5),zo(),zo()),2&t&&(Ro("@listAnimation",e.picturesList.length),ws(1),Ro("checkbox",!0)("tableFilters",e.tableFilters)("placeholder",ql(2,9,"ImgManager.SearchBar.placeholder"))("disablePagniation",e.displayPexelsResults)("isLoading",e.isLoading),ws(2),Ro("headerName",ql(4,11,"ImgManager.ImgList.titleImgName")),ws(2),Ro("headerName",ql(6,13,"ImgManager.ImgList.titleResolution")),ws(3),Ro("ngForOf",e.picturesList))},directives:function(){return[gP,xP,Qh,PP,SP,EP,qh,Zh,$m,Zm,Kf,oP]},pipes:function(){return[zm,TP]},encapsulation:2,data:{animation:[Zx]}}),t})(),pP=(()=>{let t=class{constructor(t){this.filterRoutingBuilder=t,this.filterGroups=new Map,this.dataTableFilters={sort:void 0,order:void 0,searchValue:void 0,totalItems:0,itemsPerPage:0,currentPage:0},this.sortSubject=new E}getTableFilterGroup(t){if(this.filterGroups.has(t))return this.filterGroups.get(t);const e=this.filterRoutingBuilder.group(this.dataTableFilters,t);return this.filterGroups.set(t,e),e}emitSortChange(t,e,n){this.sortSubject.next({dataTableName:t,sortName:e,order:n})}getSortChangeListner(){return this.sortSubject.asObservable()}setPaginationFilters(t,e,n,i){this.getTableFilterGroup(t).setValues({itemsPerPage:n,currentPage:i})}setInitialPaginationFiltersIfNotExist(t,e,n){const i=this.getTableFilterGroup(t);i.setValues({itemsPerPage:i.get("itemsPerPage")?parseInt(i.get("itemsPerPage")):e,currentPage:i.get("currentPage")?parseInt(i.get("currentPage")):n})}};return t.\u0275fac=function(e){return new(e||t)(Qt(Mw))},t.\u0275prov=ht({factory:function(){return new t(Qt(Mw))},token:t,providedIn:"root"}),t})(),gP=(()=>{let t=class{constructor(t){this.filtersTableService=t,this.tableFiltersChange=new Yl,this.placeholder="",this.checkbox=!1,this.toggleAllCheckBox=new Yl,this.disableSearch=!1,this.disablePagniation=!1,this.isLoading=!1}ngOnInit(){this.headerCheckBoxId=Object(sI.v4)(),this.tableRoutingName&&(this._filterGroup=this.filtersTableService.getTableFilterGroup(this.tableRoutingName),this._filterGroup.valuesChange$.next([]),this.setTablesFilters(),this.filterGroupChangeSub=this._filterGroup.valuesChange$.subscribe(t=>{this.setTablesFilters()}))}onToggleAllCheckBox(t){this.toggleAllCheckBox.emit(t.target.checked)}searchChange(t){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({searchValue:this.tableFilters.searchValue,sort:void 0,order:void 0,currentPage:1})}pageChange(){this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({itemsPerPage:this.tableFilters.itemsPerPage,currentPage:this.tableFilters.currentPage})}setTablesFilters(){this.tableFilters={sort:this._filterGroup.get("sort"),order:this._filterGroup.get("order"),searchValue:this._filterGroup.get("searchValue"),itemsPerPage:this._filterGroup.get("itemsPerPage")?parseInt(this._filterGroup.get("itemsPerPage")):0,currentPage:this._filterGroup.get("currentPage")?parseInt(this._filterGroup.get("currentPage")):0,totalItems:this.tableFilters.totalItems},this.tableFiltersChange.emit(this.tableFilters)}ngDestroy(){this.filterGroupChangeSub&&this.filterGroupChangeSub.unsubscribe()}};return t.\u0275fac=function(e){return new(e||t)(Ao(pP))},t.\u0275cmp=pe({type:t,selectors:[["wz-table"]],inputs:{placeholder:"placeholder",checkbox:"checkbox",disableSearch:"disableSearch",disablePagniation:"disablePagniation",isLoading:"isLoading",tableFilters:"tableFilters",tableRoutingName:"tableRoutingName"},outputs:{tableFiltersChange:"tableFiltersChange",toggleAllCheckBox:"toggleAllCheckBox"},ngContentSelectors:bx,decls:9,vars:5,consts:[[1,"wz-table"],["id","headerTable",1,"wz-table__head"],["class","wz-table__head__cell wz-table__head__cell--checkbox",4,"ngIf"],["class","wz-table__search",4,"ngIf"],[1,"wz-table__body"],["class","wz-table__body__loader",4,"ngIf"],[4,"ngIf"],[3,"pagination","pageChange",4,"ngIf"],[1,"wz-table__head__cell","wz-table__head__cell--checkbox"],[3,"id","alone","change"],[1,"wz-table__search"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"wz-table__body__loader"],[3,"small"],[3,"pagination","pageChange"]],template:function(t,e){1&t&&(Ko(yx),No(0,"div",0),No(1,"div",1),Mo(2,gx,2,2,"div",2),Zo(3),zo(),Mo(4,mx,2,3,"div",3),No(5,"div",4),Mo(6,fx,2,1,"div",5),Mo(7,_x,1,0,void 0,6),zo(),Mo(8,vx,1,1,"wz-pagination",7),zo()),2&t&&(ws(2),Ro("ngIf",e.checkbox),ws(2),Ro("ngIf",!e.disableSearch),ws(2),Ro("ngIf",e.isLoading),ws(1),Ro("ngIf",!e.isLoading),ws(1),Ro("ngIf",!e.disablePagniation))},directives:function(){return[Zh,CP,fP,Zm,Kf,DP,vP]},encapsulation:2}),t})();var mP;let fP=(()=>{let t=mP=class{constructor(){this.placeholder="",this.smallPadding=!1,this.innerValue="",this.changeDebounced=new Yl,this.onTouchedCallback=()=>{},this.onChangeCallback=()=>{}}get value(){return this.innerValue}set value(t){t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t))}writeValue(t){t!==this.innerValue&&(this.innerValue=t)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}handleDebouncedKeyUp(t){this.changeDebounced.emit(t.target.value)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-input-search"]],inputs:{placeholder:"placeholder",smallPadding:"smallPadding",id:"id"},outputs:{changeDebounced:"changeDebounced"},features:[Ha([{provide:Vm,useExisting:mP,multi:!0}])],decls:4,vars:5,consts:[[1,"input-search","field",3,"ngClass"],[1,"control","has-icons-left","has-icons-right"],["value","","type","text","debounceKeyUp","",1,"input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[1,"icon","fal","fa-search"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"p",1),No(2,"input",2),$o("ngModelChange",(function(t){return e.value=t}))("onEventChange",(function(t){return e.handleDebouncedKeyUp(t)})),zo(),Fo(3,"i",3),zo(),zo()),2&t&&(Ro("ngClass",e.smallPadding?"small-padding":""),ws(2),Ro("placeholder",e.placeholder)("ngModel",e.value)("debounceTime",1e3),To("id",e.id))},directives:function(){return[qh,MP,$m,Zm,Kf]},encapsulation:2}),t})(),_P=(()=>{let t=class{transform(t,e,n){if(!(t>=0&&e>=0&&n>=0))throw new Error("currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.");return t===Math.ceil(e/n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"IsLastPage",type:t,pure:!0}),t})(),vP=(()=>{let t=class{constructor(){this.pageChange=new Yl}set pagination(t){this._pagination=t}get pagination(){return this._pagination}decrementPage(){this.pagination.currentPage<=1||(this.pagination.currentPage--,this.pageChange.emit(this.pagination))}incrementPage(){(new _P).transform(this.pagination.currentPage,this.pagination.totalItems,this.pagination.itemsPerPage)||(this.pagination.currentPage++,this.pageChange.emit(this.pagination))}onGotoPageChange(t){this.pagination.currentPage=parseInt(t.target.value),this.pageChange.emit(this.pagination)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-pagination"]],inputs:{pagination:"pagination"},outputs:{pageChange:"pageChange"},decls:1,vars:1,consts:[["class","wz-pagination",4,"ngIf"],[1,"wz-pagination"],[1,"wz-pagination__wrapper"],[1,"wz-pagination__wrapper__page"],["name","page",3,"ngStyle","change"],[4,"ngFor","ngForOf"],[1,"wz-pagination__wrapper__elements"],[1,"wz-pagination__wrapper__arrows"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--left",3,"ngClass","click"],[1,"wz-pagination__wrapper__arrows__arrow__icon"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--right",3,"ngClass","click"],[3,"selected","value"]],template:function(t,e){1&t&&Mo(0,Ix,19,25,"div",0),2&t&&Ro("ngIf",e.pagination&&e.pagination.itemsPerPage)},directives:function(){return[Zh,Jh,Qh,qh,bf,If]},pipes:function(){return[zm,yP,bP,_P]},encapsulation:2}),t})(),yP=(()=>{let t=class{transform(t,e){if(!(t>=0&&e>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");const n=Math.ceil(t/e);return Array.apply(null,{length:n}).map(Number.call,Number).map(t=>t+1)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"ArrayTotalPages",type:t,pure:!0}),t})(),bP=(()=>{let t=class{constructor(t){this.translateService=t}transform(t,e,n){let i=0,s=0;return e&&(i=(t-1)*n+1,s=t*n),s>e&&(s=e),this.translateService.instant("PaginationComponent.on",{low:i,high:s,total:e})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Nm))},t.\u0275pipe=be({name:"customPagniationText",type:t,pure:!0}),t})();var wP;let CP=(()=>{let t=wP=class{constructor(){this.label="",this.alone=!1,this.checked=!1,this.id="",this.disabled=!1}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}writeValue(t){this.value=t}onChange(t){this._onChange&&this._onChange(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-checkbox"]],inputs:{label:"label",alone:"alone",checked:"checked",id:"id",value:"value",type:"type",name:"name"},features:[Ha([{provide:Vm,useExisting:wP,multi:!0}])],decls:5,vars:12,consts:[[1,"checkBoxField","field",3,"ngClass"],[1,"field__row"],["type","checkbox",1,"is-checkradio",3,"id","name","value","disabled","ngModel","checked","ngModelChange"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"input",2),$o("ngModelChange",(function(t){return e.value=t}))("ngModelChange",(function(t){return e.onChange(t)})),zo(),No(3,"label"),ba(4),zo(),zo(),zo()),2&t&&(Ro("ngClass",Fl(9,Ex,"column"===e.type,e.alone)),ws(2),Ro("id",e.id)("name",e.name)("value",e.value)("disabled",e.disabled)("ngModel",e.value)("checked",e.checked),ws(1),To("for",e.id),ws(1),wa(e.label))},directives:[qh,jm,Zm,Kf],encapsulation:2}),t})(),SP=(()=>{let t=class{constructor(t,e,n,i,s,r){this.currentRow=t,this.appRef=e,this.renderer=n,this.document=i,this.resolver=s,this.injector=r,this.checkBoxValueChange=new Yl}set checkBoxValue(t){this._value=t,this.checkboxComponentRef&&this.setCheckBoxValue()}get checkBoxValue(){return this._value}ngOnInit(){this.createCheckBoxComponent(),this.handleChecboxInputs(),this.handleCheckboxOutputs()}createCheckBoxComponent(){const t=document.createElement("div");t.className="wz-table__body__line__cell wz-table__body__line__cell--checkbox",this.renderer.insertBefore(this.currentRow.nativeElement,t,this.currentRow.nativeElement.firstChild),this.htmlContainer=new IP(t,this.appRef,this.resolver,this.injector),this.checkboxComponentRef=this.htmlContainer.attach(CP)}handleChecboxInputs(){this.checkboxComponentRef.instance.id=this.checkBoxId?this.checkBoxId:Object(sI.v4)(),this.checkboxComponentRef.instance.name=this.checkBoxName?this.checkBoxName:void 0,this.checkboxComponentRef.instance.alone=!0,this.setCheckBoxValue()}setCheckBoxValue(){this.checkboxComponentRef.instance.value=this.checkBoxValue}handleCheckboxOutputs(){this.checkboxComponentRef.instance.registerOnChange(()=>{this._toggleCheckbox()})}_toggleCheckbox(){this.checkBoxValue=!this.checkBoxValue,this.checkBoxValueChange.emit(this.checkBoxValue)}ngOnDestroy(){this.htmlContainer.dispose()}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(oh),Ao(Ya),Ao(Ih),Ao(qa),Ao(ho))},t.\u0275dir=ye({type:t,selectors:[["","checkBoxRow",""]],inputs:{checkBoxValue:"checkBoxValue",checkBoxId:"checkBoxId",checkBoxName:"checkBoxName"},outputs:{checkBoxValueChange:"checkBoxValueChange"}}),t})();class IP{constructor(t,e,n,i){this.hostElement=t,this.appRef=e,this.componentFactoryResolver=n,this.injector=i,this.attached=!1}attach(t){if(this.attached)throw new Error("component has already been attached");this.attached=!0;let e=this.componentFactoryResolver.resolveComponentFactory(t).create(this.injector);return this.appRef.attachView(e.hostView),this.disposeFn=()=>{this.appRef.detachView(e.hostView),e.destroy()},this.hostElement.appendChild(e.hostView.rootNodes[0]),e}dispose(){this.attached&&this.disposeFn()}}let EP=(()=>{let t=class{constructor(t,e,n){this.currentCell=t,this.renderer=e,this.document=n,this.centerCellValue=["left","center","right"]}ngAfterViewInit(){this.applyCustomStylesOnCell()}applyCustomStylesOnCell(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell--center--"+this.centerCell)}}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","tableColumn",""]],inputs:{columnSize:"columnSize",centerCell:"centerCell"}}),t})(),xP=(()=>{let t=class{constructor(t,e,n,i){this.currentCell=t,this.renderer=e,this.document=n,this.filtersTableService=i,this._headerName="",this.filterRouting=!1,this.onSortChange=new Yl,this.tableFiltersChange=new Yl,this.centerCellValue=["left","center","right"],this.subscriptions=[]}set headerName(t){this._headerName=t,this.setHeaderName()}get headerName(){return this._headerName}ngOnInit(){this.tableName&&this.sortName&&(this.filterRouting?this.handleSortRouting():this.handleSortBasic())}ngAfterViewInit(){this.applyCustomStylesOnCell(),this.renderHeaderColumn()}handleSortRouting(){this.filterGroup=this.filtersTableService.getTableFilterGroup(this.tableName);const t=this.filterGroup.valuesChange$.subscribe(t=>{const e=t.filter(t=>"sort"===t.key)[0];this.sortName!==e.value&&this.resetSortIcon()});this.subscriptions.push(t)}handleSortBasic(){const t=this.filtersTableService.getSortChangeListner().subscribe(t=>{this.tableName===t.dataTableName&&this.sortName!==t.sortName&&this.resetSortIcon()});this.subscriptions.push(t)}resetSortIcon(){this.contentHeader.className=this.contentHeader.className.replace(this.getCurrentSortIcon(),"idle")}applyCustomStylesOnCell(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell--center--"+this.centerCell)}}renderHeaderColumn(){this.createHeaderContent(),this.renderer.appendChild(this.currentCell.nativeElement,this.contentHeader)}createHeaderContent(){this.contentHeader=document.createElement("a"),this.contentHeader.className="wz-table__head__cell__search",this.setHeaderName(),this.tableName&&this.sortName&&this.handleSort()}setHeaderName(){this.contentHeader&&(this.contentHeader.innerHTML=this.headerName)}handleSort(){this.contentHeader.className+=" wz-table__head__cell__search--"+this.getInitialSortIcon(),this.renderer.listen(this.contentHeader,"click",()=>{const t=this.getCurrentSortIcon();let e,n,i;switch(t){case"idle":e="up",n=this.sortName,i=!0;break;case"up":e="down",n=this.sortName,i=!1;break;case"down":default:e="idle"}this.contentHeader.className=this.contentHeader.className.replace(t,e),this.emitEvents(n,i)})}getInitialSortIcon(){if(!this.filterRouting)return"idle";let t="idle";return this.filterGroup.get("sort")===this.sortName&&(t="true"==this.filterGroup.get("order")?"up":"down"),t}getCurrentSortIcon(){const{groups:t}=/wz-table__head__cell__search--(?<icon>\w+)/.exec(this.contentHeader.className);return t.icon}emitEvents(t,e){this.filterRouting?this.filterGroup.setValues({sort:t,order:e,currentPage:1}):this.filtersTableService.emitSortChange(this.tableName,this.sortName,e),this.tableFilters&&(this.tableFilters.sort=this.sortName,this.tableFilters.order=e,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters)),this.onSortChange.emit(e)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih),Ao(pP))},t.\u0275dir=ye({type:t,selectors:[["","headerCell",""]],inputs:{filterRouting:"filterRouting",headerName:"headerName",columnSize:"columnSize",tableName:"tableName",sortName:"sortName",centerCell:"centerCell",tableFilters:"tableFilters"},outputs:{onSortChange:"onSortChange",tableFiltersChange:"tableFiltersChange"}}),t})(),PP=(()=>{let t=class{constructor(t,e,n){this.currentCell=t,this.renderer=e,this.document=n}ngAfterViewInit(){this.applyCustomStylesOnCell()}applyCustomStylesOnCell(){this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line")}};return t.\u0275fac=function(e){return new(e||t)(Ao(Ga),Ao(Ya),Ao(Ih))},t.\u0275dir=ye({type:t,selectors:[["","tableRow",""]]}),t})(),TP=(()=>{let t=class{constructor(t){this.imgCDNService=t}transform(t,e){if(!e)throw"The size is undefined in ImageSrcPipe.";const n=this.imgCDNService.getUrlImg(e);if(!n)throw"The expected size is not defined in ImageSrcPipe.";return n+t}};return t.\u0275fac=function(e){return new(e||t)(Ao(Lx))},t.\u0275pipe=be({name:"imgSrc",type:t,pure:!0}),t})(),kP=(()=>{let t=class{constructor(){this.debounceTime=500,this.onEventChange=new Yl,this.emitEvent$=new E,this.subscription$=new E}ngOnInit(){this.emitEvent$.pipe(r_(this.subscription$),cC(this.debounceTime),E_(),pv(t=>this.emitChange(t))).subscribe()}emitChange(t){this.onEventChange.emit(t)}ngOnDestroy(){this.subscription$.next(),this.subscription$.complete()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["AbstractDebounceDirective"]],inputs:{debounceTime:"debounceTime"},outputs:{onEventChange:"onEventChange"}}),t})(),MP=(()=>{let t=class extends kP{constructor(){super()}onKeyUp(t){t.preventDefault(),this.emitEvent$.next(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ye({type:t,selectors:[["input","debounceKeyUp",""]],hostBindings:function(t,e){1&t&&$o("keyup",(function(t){return e.onKeyUp(t)}))},features:[Pa]}),t})(),DP=(()=>{let t=class{constructor(){this.small=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-loader"]],inputs:{small:"small",text:"text",position:"position"},decls:9,vars:7,consts:[[1,"wz-loader",3,"ngClass","ngStyle"],[1,"loader","loader1"],["class","is-textcentered",3,"innerHTML",4,"ngIf"],[1,"is-textcentered",3,"innerHTML"]],template:function(t,e){1&t&&(No(0,"div",0),No(1,"div",1),No(2,"div"),No(3,"div"),No(4,"div"),No(5,"div"),No(6,"div"),Fo(7,"div"),zo(),zo(),zo(),zo(),zo(),zo(),Mo(8,xx,1,1,"p",2),zo()),2&t&&(Ro("ngClass",zl(3,Px,e.small))("ngStyle",zl(5,Tx,e.position)),ws(8),Ro("ngIf",e.text))},directives:[qh,Jh,Zh],encapsulation:2}),t})(),AP=(()=>{let t=class{constructor(){this.icon=!0,this.warning=!1,this.success=!1,this.iconClass="fas fa-info"}ngOnInit(){}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["wz-alert"]],inputs:{icon:"icon",warning:"warning",success:"success",iconClass:"iconClass"},ngContentSelectors:Dx,decls:4,vars:5,consts:[[1,"wz-alert",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(t,e){1&t&&(Ko(),No(0,"div",0),Mo(1,kx,1,1,"i",1),No(2,"p"),Zo(3),zo(),zo()),2&t&&(Ro("ngClass",Fl(2,Mx,e.success,e.warning)),ws(1),Ro("ngIf",e.icon))},directives:[qh,Zh],styles:[".wz-alert[_ngcontent-%COMP%]{width:100%;background-color:rgba(82,174,205,.15);color:#52aecd;border-radius:3px;display:-webkit-box;display:flex;flex-wrap:nowrap;-webkit-box-pack:justify;justify-content:space-between;padding:20px}.wz-alert.success[_ngcontent-%COMP%]{background-color:rgba(46,204,113,.15)}.wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#11552e}.wz-alert.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2ecc71}.wz-alert.warning[_ngcontent-%COMP%]{background-color:rgba(233,86,86,.15)}.wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#3a0505}.wz-alert.warning[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e95656}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;font-size:rem(14);line-height:rem(25);margin:0;padding:0;color:#1e5568}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#1e5568}.wz-alert[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:auto;margin:0 10px 0 0;color:inherit;font-size:rem(14);line-height:rem(25)}"]}),t})(),OP=(()=>{let t=class{transform(t){return Array.from("x".repeat(t))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=be({name:"numberToArray",type:t,pure:!0}),t})(),RP=(()=>{let t=class{};return t.\u0275mod=_e({type:t}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[],imports:[[nu,sm,Jf,YC,nS,lC,hS,j_,iI,Fm]]}),t})();class LP{constructor(){this.image_manager_route="",this.pexels_route="",this.canva_url="",this.assets_route="assets/img-manager/"}}class NP{constructor(){this.url_raw_image="",this.url_100_image="",this.url_200_image="",this.url_400_image="",this.url_800_image=""}}class zP{constructor(t,e="/assets/i18n/",n=".json"){this.http=t,this.prefix=e,this.suffix=n}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}}let FP=(()=>{class t{constructor(){}sendImgSelectedToPage(t){t&&(t.cdn_img_src=`${wh.CDN_URL}${t.id_shop}/`);const e=new CustomEvent("imgSelected",{detail:{file:t,from:this.emitter}});document.getElementById("imgManagerModule").dispatchEvent(e)}pageAskForImg(){return e_(document.getElementById("imgManagerModule"),"openImgManager")}setEmitter(t){this.emitter=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VP=(()=>{class t{constructor(t,e,n,i){this.http=t,this.imgSelectionService=e,this.eventService=n,this.canvaService=i,this.image_manager_api=wh.wizi_api+"/image-manager/shops/",this.isPhotosTab=!1,this.isVariantsTab=!1,this.loadProductImgSelection=!1,this.expectedMediaDto={id:void 0,image_url:void 0,image_width:"900",image_height:"900"},this.subscriptions=[]}setApiConfig(t,e){this.shopToken=e,this.shopId=t;const n=window.location.pathname.match(/\/(\w+)\/products\/(\d+)\/edit/);this.productSheetApiRoute=wh.wizi_admin_api+(n&&n[1]?n[1]:"fr")+wh.product_sheet_endpoint,this.productId=n&&n[2]?n[2]:"0",this.isProductCreation=/\/products\/create/.test(window.location.pathname)}handleTabs(){return new b(t=>{const e=this.switchTabs().subscribe(e=>{if(!e||!e.detail||!e.detail.currentTab)return;const n=e.detail.currentTab;this.isPhotosTab="photos"===n,this.isVariantsTab="variation"===n,this.isPhotosTab?(this.loadProductImgSelection=!0,this.currentProductImgSelection&&this.currentProductImgSelection.length?(this.applyCurrentImgSelection(),this.loadProductImgSelection=!1):this.initProductImgSelection()):this.isVariantsTab&&this.saveCurrentImgSelection(),t.next(this.isPhotosTab)});this.subscriptions.push(e)})}getShopImg(t){return this.http.get(`${this.image_manager_api}${this.shopId}/images/${t}`,this.getOptionsHeadersWithBearer())}initProductImgSelection(){this.imgSelectionService.emitImgListLoading(!0);const t=this.retrieveImgSelection().subscribe(t=>{if(!(t&&t.photos&&t.photos.infos&&t.photos.infos.files&&t.photos.infos.files.length))return this.loadProductImgSelection=!1,void this.imgSelectionService.emitImgListLoading(!1);const e=[];t.photos.infos.files.forEach(t=>e.push(this.getShopImg(t.toString()).pipe(hm(1))));const n=wg(e).subscribe(t=>{this.saveCurrentImgSelection(t),this.applyCurrentImgSelection(),this.loadProductImgSelection=!1},t=>{this.loadProductImgSelection=!1,this.imgSelectionService.emitImgListLoading(!1)});this.subscriptions.push(n)});this.subscriptions.push(t),this.canvaService.expectedImgSizesChange(this.expectedMediaDto)}retrieveInfoSelection(){const t=new FormData;return t.append("rub","main"),t.append("action","getInfos"),t.append("prodId",this.productId),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}retrieveImgSelection(){const t=new FormData;return t.append("rub","main"),t.append("action","getAllInfos"),t.append("prodId",this.productId),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}updateImgSelectionOnChange(){const t=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{if(t)if(this.isPhotosTab&&!this.loadProductImgSelection){const e=[];t.forEach(t=>{e.push(parseInt(t.id_file))}),this.updateProductImgSelection(e)}else!this.isPhotosTab&&t.length&&this.eventService.sendImgSelectedToPage(t[0])});this.subscriptions.push(t)}updateProductImgSelection(t){if(this.productId&&"0"!==this.productId||!Wizi._produit.global.PROD_ID||(this.productId=Wizi._produit.global.PROD_ID.toString()),Wizi._produit._dataTmp.photos.infos={},Wizi._produit._dataTmp.photos.infos.files=t,this.emitImgSelectionChange(t),this.productId&&"0"!==this.productId){const e=this.submitProductImg(t).subscribe();return void this.subscriptions.push(e)}const e=this.createProduct().subscribe(e=>{if(!e)throw"No product id created. Can not link image(s) to the new product.";Wizi._produit.global.PROD_ID=e,this.productId=e.toString(),this.submitProductImg(t).subscribe()});this.subscriptions.push(e)}submitProductImg(t){const e={files:t,couls:[]},n=new FormData;return n.append("rub","photos"),n.append("action","save"),n.append("newProd",this.isProductCreation?"1":"0"),n.append("prodId",this.productId),n.append("_token",this.shopToken),n.append("_shid",this.shopId.toString()),n.append("data",JSON.stringify(e)),this.http.post(this.productSheetApiRoute,n,this.getOptionsHeaders())}createProduct(){const t=new FormData;return t.append("rub","main"),t.append("action","createProd"),t.append("_token",""),t.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,t,this.getOptionsHeaders())}switchTabs(){return e_(document.getElementById("imgManagerModule"),"switchTab")}emitImgSelectionChange(t){const e=new CustomEvent("onImgSelectionChange",{detail:{idsImgList:t}});document.getElementById("imgManagerModule").dispatchEvent(e)}saveCurrentImgSelection(t){this.currentProductImgSelection=t||JSON.parse(JSON.stringify(this.imgSelectionService.getImgSelection()))}applyCurrentImgSelection(){this.imgSelectionService.setImgSelection(this.currentProductImgSelection),this.imgSelectionService.emitImgListLoading(!1)}getOptionsHeaders(){return{headers:new kg({"Access-Control-Allow-Origin":"*"})}}getOptionsHeadersWithBearer(){return{headers:new kg({Authorization:"Bearer "+this.shopToken})}}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(Qt(Hg),Qt(Ax),Qt(FP),Qt(Fx))},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),UP=(()=>{class t{constructor(){this.subscriptions=new Map,window.addEventListener("storage",t=>{this.subscriptions.has(t.key)&&this.subscriptions.get(t.key).next(this.unserialize(t.newValue))})}unserialize(t){let e=null;if(t)try{e=JSON.parse(t).data}catch(n){}return e}serialize(t){return JSON.stringify({data:t})}subscribe(t){return this.subscriptions.has(t)||this.subscriptions.set(t,new E),this.subscriptions.get(t)}get(t){const e=localStorage.getItem(t);return Promise.resolve(this.unserialize(e))}set(t,e){return localStorage.setItem(t,this.serialize(e)),Promise.resolve(!0)}remove(t){return localStorage.removeItem(t),Promise.resolve(!0)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),jP=(()=>{class t{constructor(t){this.storage=t,this.credentials=null,this.credentials$=this.storage.subscribe(wh.wiziApiCredentialsKey)}get(){return this.credentials?Promise.resolve(this.credentials):this.storage.get(wh.wiziApiCredentialsKey).then(t=>(this.credentials=t,this.credentials))}set(t){return this.storage.set(wh.wiziApiCredentialsKey,t).then(e=>(e&&(this.credentials=t),e))}remove(){return this.storage.remove(wh.wiziApiCredentialsKey).then(t=>(t&&(this.credentials=null),t))}}return t.\u0275fac=function(e){return new(e||t)(Qt(UP))},t.\u0275prov=ht({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function BP(t,e){1&t&&(Vo(0),No(1,"h3",3),ba(2),Wl(3,"translate"),zo(),Uo()),2&t&&(ws(2),wa(ql(3,1,"ImgManager.webElement.photosTitle")))}function HP(t,e){if(1&t){const t=jo();No(0,"p",8),No(1,"a",9),$o("click",(function(){return Ye(t),Go(2).open()})),ba(2),Wl(3,"translate"),zo(),zo()}2&t&&(ws(2),wa(ql(3,1,"ImgManager.webElement.OpenBtn")))}function $P(t,e){if(1&t){const t=jo();Vo(0),Mo(1,HP,4,3,"p",4),No(2,"div",5),No(3,"wz-img-manager",6,7),$o("imgManagerClosed",(function(){return Ye(t),Go().onImgManagerClosed()})),zo(),zo(),Uo()}if(2&t){const t=Go();ws(1),Ro("ngIf",t.imgManagerDisplayConfig.displayBtn&&t.isPhotosTab),ws(2),Ro("stateDisplayed",t.imgManagerDisplayConfig.stateDisplayed)("multipleImgMode",t.imgManagerDisplayConfig.multipleImgMode)("showImgManagerModule",t.imgManagerDisplayConfig.showImgManagerModule&&t.openImgManager)("showSelection",t.imgManagerDisplayConfig.showSelection)("externalConfig",t.imgExternalConfig)}}let WP=(()=>{class t{constructor(t,e,n,i,s,r,o,a){this.translateService=t,this.imgSelectionService=e,this.canvaService=n,this.ficheProductService=i,this.authCredentialsService=s,this.http=r,this.eventService=o,this.imgManagerService=a,this.openImgManager=!1,this.loading=!0,this.isPhotosTab=wh.isPhotosTab,this.subscriptions=[]}ngOnInit(){this.loading=!0,this.pageficheProductConfig=this.imgManagerService.getImgManagerDisplayConfig("fiche-product"),this.pageEventConfig=this.imgManagerService.getImgManagerDisplayConfig("wizi-block"),this.setCurrentLanguage(),this.setDisplayedPageConfig();const t=this.getCredentials().subscribe(t=>{this.loading=!1,this.initVariables(t),this.imgManagerDisplayConfig.pageficheProduct?this.setFicheProductPage():this.setPageWithEvents()});this.subscriptions.push(t)}initVariables(t){if(!t){if(wh.isWizishopcom)return;return this.setAppVars(null,wh.local.shopId,null,wh.local.token),this.setImgManagerExtraConfig(),void(this.imgManagerDisplayConfig=this.pageficheProductConfig)}this.setAppVars(t.user_id,t.shop_id,t.account_id,t.token),this.setImgManagerExtraConfig()}setFicheProductPage(){this.ficheProductService.setApiConfig(this.id_shop,this.token_shop),this.handleFicheProductTab(),this.closeImgManagerOnSwitchingTab(),this.subscribePageAskForImg(),this.ficheProductService.updateImgSelectionOnChange()}setPageWithEvents(){this.subscribePageAskForImg();const t=this.imgSelectionService.getImgSelectionChange().subscribe(t=>{t&&t.length&&this.eventService.sendImgSelectedToPage(t[0])});this.subscriptions.push(t)}subscribePageAskForImg(){const t=this.eventService.pageAskForImg().subscribe(t=>{this.eventService.setEmitter(t&&t.detail?t.detail.from:null),this.imgSelectionService.setImgSelection(null),this.open()});this.subscriptions.push(t)}open(){this.openImgManager=!0}onImgManagerClosed(){this.openImgManager=!1}setCurrentLanguage(){const t=window.location.pathname.match(/^\/(\w+)\//);this.translateService.use(t&&t[1]?t[1]:"fr")}setDisplayedPageConfig(){const t=/\/products\/(\d+\/edit|create)/.test(window.location.pathname);this.imgManagerDisplayConfig=t?this.pageficheProductConfig:this.pageEventConfig}handleFicheProductTab(){const t=this.ficheProductService.handleTabs().subscribe(t=>{this.imgManagerDisplayConfig=t?this.pageficheProductConfig:this.pageEventConfig,this.isPhotosTab=t});this.subscriptions.push(t)}closeImgManagerOnSwitchingTab(){const t=this.ficheProductService.switchTabs().subscribe(t=>{this.openImgManager=!1});this.subscriptions.push(t)}getCredentials(){return j(this.authCredentialsService.get())}setAppVars(t,e,n,i){this.userId=t,this.id_shop=e,this.accountId=n,this.token_shop=i}setImgManagerExtraConfig(){const t=new LP;t.shop_token=this.token_shop,t.image_manager_route=wh.wizi_api+"/image-manager/shops/"+this.id_shop,t.canva_token="wdByHayF5v57nj2ZSLvu055O",t.canva_url="https://sdk.canva.com/designbutton/v2/api.js",t.pexels_token="563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94",t.pexels_route="https://api.pexels.com/v1",t.shop_category="other",t.assets_route=wh.assets_route;const e=new NP;e.url_raw_image=`${wh.CDN_URL}${this.id_shop}/RAW-`,e.url_100_image=`${wh.CDN_URL}${this.id_shop}/m100-`,e.url_200_image=`${wh.CDN_URL}${this.id_shop}/cs200-`,e.url_400_image=`${wh.CDN_URL}${this.id_shop}/cs400-`,e.url_800_image=`${wh.CDN_URL}${this.id_shop}/cs800-`,this.imgExternalConfig=new Ox,this.imgExternalConfig.api=t,this.imgExternalConfig.imgCDNConfig=e;const n=this.getShopCategory().subscribe(t=>{t&&t.category&&(this.imgExternalConfig.api.shop_category=t.category)});this.subscriptions.push(n)}getShopCategory(){return this.http.get(`${wh.wizi_api}/shops/${this.id_shop}`,this.getOptionsHeadersWithBearer())}getOptionsHeadersWithBearer(){return{headers:new kg({Authorization:"Bearer "+this.token_shop})}}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(Ao(Nm),Ao(Ax),Ao(Fx),Ao(VP),Ao(jP),Ao(Hg),Ao(FP),Ao(Rx))},t.\u0275cmp=pe({type:t,selectors:[["img-manager"]],decls:5,vars:5,consts:[[1,"info-bulle"],[1,"info-bulle-content",3,"innerHTML"],[4,"ngIf"],[1,"wizicss-sous-titre"],["class","img-manager-open",4,"ngIf"],[1,"imgManagerBox"],[3,"stateDisplayed","multipleImgMode","showImgManagerModule","showSelection","externalConfig","imgManagerClosed"],["wzImgManager",""],[1,"img-manager-open"],[3,"click"]],template:function(t,e){1&t&&(No(0,"div",0),Fo(1,"p",1),Wl(2,"translate"),Mo(3,BP,4,3,"ng-container",2),Mo(4,$P,5,6,"ng-container",2),zo()),2&t&&(ws(1),Ro("innerHTML",ql(2,3,"ImgManager.webElement.infoBulle"),Yi),ws(2),Ro("ngIf",e.imgManagerDisplayConfig.pageficheProduct&&e.isPhotosTab),ws(1),Ro("ngIf",!e.loading&&e.id_shop&&e.imgManagerDisplayConfig))},directives:[Zh,jx],pipes:[zm],styles:[""]}),t})();function qP(t){return new zP(t,wh.translations_route,".json?version=0.0.82")}let GP=(()=>{class t{}return t.\u0275mod=_e({type:t,bootstrap:[WP]}),t.\u0275inj=ut({factory:function(e){return new(e||t)},providers:[{provide:Nh,useValue:"/"}],imports:[[Lu,sg,RP,$b.forRoot([{path:"**",component:WP}]),Fm.forRoot({defaultLanguage:"fr",loader:{provide:_m,useFactory:qP,deps:[Hg]}})]]}),t})();wh.production&&function(){if(Si)throw new Error("Cannot enable prod mode after platform setup.");Ci=!1}(),Ou().bootstrapModule(GP).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]);
|