mahjong/dist/main.js

2 lines
301 KiB
JavaScript

"use strict";var nL=Object.defineProperty,rL=Object.defineProperties,oL=Object.getOwnPropertyDescriptors,tb=Object.getOwnPropertySymbols,iL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,nb=(_t,tt,$e)=>tt in _t?nL(_t,tt,{enumerable:!0,configurable:!0,writable:!0,value:$e}):_t[tt]=$e,Ge=(_t,tt)=>{for(var $e in tt||(tt={}))iL.call(tt,$e)&&nb(_t,$e,tt[$e]);if(tb)for(var $e of tb(tt))sL.call(tt,$e)&&nb(_t,$e,tt[$e]);return _t},Lo=(_t,tt)=>rL(_t,oL(tt));(self.webpackChunkmah=self.webpackChunkmah||[]).push([[179],{99:(_t,tt,$e)=>{function Vo(t){return"function"==typeof t}let El=!1;const $t={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else El&&console.log("RxJS: Back to a better error behavior. Thank you. <3");El=t},get useDeprecatedSynchronousErrorHandling(){return El}};function Pr(t){setTimeout(()=>{throw t},0)}const cs={closed:!0,next(t){},error(t){if($t.useDeprecatedSynchronousErrorHandling)throw t;Pr(t)},complete(){}},bl=Array.isArray||(t=>t&&"number"==typeof t.length);function vl(t){return null!==t&&"object"==typeof t}const ds=(()=>{function t(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return t.prototype=Object.create(Error.prototype),t})();class _e{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:o,_subscriptions:i}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof _e)n.remove(this);else if(null!==n)for(let s=0;s<n.length;++s)n[s].remove(this);if(Vo(o)){r&&(this._unsubscribe=void 0);try{o.call(this)}catch(s){e=s instanceof ds?kf(s.errors):[s]}}if(bl(i)){let s=-1,a=i.length;for(;++s<a;){const l=i[s];if(vl(l))try{l.unsubscribe()}catch(u){e=e||[],u instanceof ds?e=e.concat(kf(u.errors)):e.push(u)}}}if(e)throw new ds(e)}add(e){let n=e;if(!e)return _e.EMPTY;switch(typeof e){case"function":n=new _e(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof _e)){const i=n;n=new _e,n._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof _e){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n}remove(e){const n=this._subscriptions;if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1)}}}var t;function kf(t){return t.reduce((e,n)=>e.concat(n instanceof ds?n.errors:n),[])}_e.EMPTY=((t=new _e).closed=!0,t);const fs="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Le extends _e{constructor(e,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=cs;break;case 1:if(!e){this.destination=cs;break}if("object"==typeof e){e instanceof Le?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Lf(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Lf(this,e,n,r)}}[fs](){return this}static create(e,n,r){const o=new Le(e,n,r);return o.syncErrorThrowable=!1,o}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Lf extends Le{constructor(e,n,r,o){super(),this._parentSubscriber=e;let i,s=this;Vo(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==cs&&(s=Object.create(n),Vo(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=i,this._error=r,this._complete=o}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;$t.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=$t;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=e,n.syncErrorThrown=!0):Pr(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Pr(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const n=()=>this._complete.call(this._context);$t.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,n){try{e.call(this._context,n)}catch(r){if(this.unsubscribe(),$t.useDeprecatedSynchronousErrorHandling)throw r;Pr(r)}}__tryOrSetError(e,n,r){if(!$t.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(o){return $t.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=o,e.syncErrorThrown=!0,!0):(Pr(o),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const Bo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Vf(t){return t}let De=(()=>{class t{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,o){const{operator:i}=this,s=function(t,e,n){if(t){if(t instanceof Le)return t;if(t[fs])return t[fs]()}return t||e||n?new Le(t,e,n):new Le(cs)}(n,r,o);if(s.add(i?i.call(s,this.source):this.source||$t.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),$t.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){$t.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof Le?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=Hf(r))((o,i)=>{let s;s=this.subscribe(a=>{try{n(a)}catch(l){i(l),s&&s.unsubscribe()}},i,o)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[Bo](){return this}pipe(...n){return 0===n.length?this:function(t){return 0===t.length?Vf:1===t.length?t[0]:function(n){return t.reduce((r,o)=>o(r),n)}}(n)(this)}toPromise(n){return new(n=Hf(n))((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return t.create=e=>new t(e),t})();function Hf(t){if(t||(t=$t.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Nr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class jf extends _e{constructor(e,n){super(),this.subject=e,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,n=e.observers;if(this.subject=null,!n||0===n.length||e.isStopped||e.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class Uf extends Le{constructor(e){super(e),this.destination=e}}let Ho=(()=>{class t extends De{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[fs](){return new Uf(this)}lift(n){const r=new Gf(this,this);return r.operator=n,r}next(n){if(this.closed)throw new Nr;if(!this.isStopped){const{observers:r}=this,o=r.length,i=r.slice();for(let s=0;s<o;s++)i[s].next(n)}}error(n){if(this.closed)throw new Nr;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:r}=this,o=r.length,i=r.slice();for(let s=0;s<o;s++)i[s].error(n);this.observers.length=0}complete(){if(this.closed)throw new Nr;this.isStopped=!0;const{observers:n}=this,r=n.length,o=n.slice();for(let i=0;i<r;i++)o[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new Nr;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new Nr;return this.hasError?(n.error(this.thrownError),_e.EMPTY):this.isStopped?(n.complete(),_e.EMPTY):(this.observers.push(n),new jf(this,n))}asObservable(){const n=new De;return n.source=this,n}}return t.create=(e,n)=>new Gf(e,n),t})();class Gf extends Ho{constructor(e,n){super(),this.destination=e,this.source=n}next(e){const{destination:n}=this;n&&n.next&&n.next(e)}error(e){const{destination:n}=this;n&&n.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:n}=this;return n?this.source.subscribe(e):_e.EMPTY}}function $f(t){return t&&"function"==typeof t.schedule}function un(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new ib(t,e))}}class ib{constructor(e,n){this.project=e,this.thisArg=n}call(e,n){return n.subscribe(new sb(e,this.project,this.thisArg))}}class sb extends Le{constructor(e,n,r){super(e),this.project=n,this.count=0,this.thisArg=r||this}_next(e){let n;try{n=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(n)}}const Wf=t=>e=>{for(let n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()},hs="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",zf=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function qf(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Kf=t=>{if(t&&"function"==typeof t[Bo])return(t=>e=>{const n=t[Bo]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)})(t);if(zf(t))return Wf(t);if(qf(t))return(t=>e=>(t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,Pr),e))(t);if(t&&"function"==typeof t[hs])return(t=>e=>{const n=t[hs]();for(;;){let r;try{r=n.next()}catch(o){return e.error(o),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add(()=>{n.return&&n.return()}),e})(t);{const n=`You provided ${vl(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(n)}};function wl(t,e){return new De(n=>{const r=new _e;let o=0;return r.add(e.schedule(function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function jo(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[Bo]}(t))return function(t,e){return new De(n=>{const r=new _e;return r.add(e.schedule(()=>{const o=t[Bo]();r.add(o.subscribe({next(i){r.add(e.schedule(()=>n.next(i)))},error(i){r.add(e.schedule(()=>n.error(i)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(qf(t))return function(t,e){return new De(n=>{const r=new _e;return r.add(e.schedule(()=>t.then(o=>{r.add(e.schedule(()=>{n.next(o),r.add(e.schedule(()=>n.complete()))}))},o=>{r.add(e.schedule(()=>n.error(o)))}))),r})}(t,e);if(zf(t))return wl(t,e);if(function(t){return t&&"function"==typeof t[hs]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new De(n=>{const r=new _e;let o;return r.add(()=>{o&&"function"==typeof o.return&&o.return()}),r.add(e.schedule(()=>{o=t[hs](),r.add(e.schedule(function(){if(n.closed)return;let i,s;try{const a=o.next();i=a.value,s=a.done}catch(a){return void n.error(a)}s?n.complete():(n.next(i),this.schedule())}))})),r})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof De?t:new De(Kf(t))}class Qf extends Le{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Yf extends Le{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function Jf(t,e){if(!e.closed)return t instanceof De?t.subscribe(e):Kf(t)(e)}function Ml(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(Ml((o,i)=>jo(t(o,i)).pipe(un((s,a)=>e(o,s,i,a))),n)):("number"==typeof e&&(n=e),r=>r.lift(new _b(t,n)))}class _b{constructor(e,n=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=n}call(e,n){return n.subscribe(new yb(e,this.project,this.concurrent))}}class yb extends Yf{constructor(e,n,r=Number.POSITIVE_INFINITY){super(e),this.project=n,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let n;const r=this.index++;try{n=this.project(e,r)}catch(o){return void this.destination.error(o)}this.active++,this._innerSub(n)}_innerSub(e){const n=new Qf(this),r=this.destination;r.add(n);const o=Jf(e,n);o!==n&&r.add(o)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e){this.destination.next(e)}notifyComplete(){const e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Zf(t=Number.POSITIVE_INFINITY){return Ml(Vf,t)}function Xf(t,e){return e?wl(t,e):new De(Wf(t))}function eh(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return $f(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof De?t[0]:Zf(e)(Xf(t,n))}function th(){return function(e){return e.lift(new Cb(e))}}class Cb{constructor(e){this.connectable=e}call(e,n){const{connectable:r}=this;r._refCount++;const o=new Db(e,r),i=n.subscribe(o);return o.closed||(o.connection=r.connect()),i}}class Db extends Le{constructor(e,n){super(e),this.connectable=n}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const n=e._refCount;if(n<=0)return void(this.connection=null);if(e._refCount=n-1,n>1)return void(this.connection=null);const{connection:r}=this,o=e._connection;this.connection=null,o&&(!r||o===r)&&o.unsubscribe()}}class Eb extends De{constructor(e,n){super(),this.source=e,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new _e,e.add(this.source.subscribe(new vb(this.getSubject(),this))),e.closed&&(this._connection=null,e=_e.EMPTY)),e}refCount(){return th()(this)}}const bb=(()=>{const t=Eb.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 vb extends Uf{constructor(e,n){super(e),this.connectable=n}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const n=e._connection;e._refCount=0,e._subject=null,e._connection=null,n&&n.unsubscribe()}}}function Tb(){return new Ho}function oe(t){for(let e in t)if(t[e]===oe)return e;throw Error("Could not find renamed property on target object.")}function Sl(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function Q(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Q).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 Tl(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Ib=oe({__forward_ref__:oe});function ce(t){return t.__forward_ref__=ce,t.toString=function(){return Q(this())},t}function P(t){return nh(t)?t():t}function nh(t){return"function"==typeof t&&t.hasOwnProperty(Ib)&&t.__forward_ref__===ce}class ir extends Error{constructor(e,n){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(e,n)),this.code=e}}function $(t){return"string"==typeof t?t:null==t?"":String(t)}function nt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():$(t)}function ps(t,e){const n=e?` in ${e}`:"";throw new ir("201",`No provider for ${nt(t)} found${n}`)}function Ct(t,e){null==t&&function(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t}`+(null==r?"":` [Expected=> ${n} ${r} ${e} <=Actual]`))}(e,t,null,"!=")}function B(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ft(t){return{providers:t.providers||[],imports:t.imports||[]}}function Mn(t){return rh(t,gs)||rh(t,ih)}function rh(t,e){return t.hasOwnProperty(e)?t[e]:null}function oh(t){return t&&(t.hasOwnProperty(Il)||t.hasOwnProperty(kb))?t[Il]:null}const gs=oe({\u0275prov:oe}),Il=oe({\u0275inj:oe}),ih=oe({ngInjectableDef:oe}),kb=oe({ngInjectorDef:oe});var F=(()=>((F=F||{})[F.Default=0]="Default",F[F.Host=1]="Host",F[F.Self=2]="Self",F[F.SkipSelf=4]="SkipSelf",F[F.Optional=8]="Optional",F))();let Al;function Vn(t){const e=Al;return Al=t,e}function sh(t,e,n){const r=Mn(t);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&F.Optional?null:void 0!==e?e:void ps(Q(t),"Injector")}function Bn(t){return{toString:t}.toString()}var Tt=(()=>((Tt=Tt||{})[Tt.OnPush=0]="OnPush",Tt[Tt.Default=1]="Default",Tt))(),Dt=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Dt||(Dt={})),Dt))();const Vb="undefined"!=typeof globalThis&&globalThis,Bb="undefined"!=typeof window&&window,Hb="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,ne=Vb||"undefined"!=typeof global&&global||Bb||Hb,xr={},ie=[],ms=oe({\u0275cmp:oe}),Pl=oe({\u0275dir:oe}),Nl=oe({\u0275pipe:oe}),ah=oe({\u0275mod:oe}),Sn=oe({\u0275fac:oe}),Uo=oe({__NG_ELEMENT_ID__:oe});let jb=0;function Ot(t){return Bn(()=>{const n={},r={type:t.type,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:n,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Tt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ie,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Dt.Emulated,id:"c",styles:t.styles||ie,_:null,setInput:null,schemas:t.schemas||null,tView:null},o=t.directives,i=t.features,s=t.pipes;return r.id+=jb++,r.inputs=dh(t.inputs,n),r.outputs=dh(t.outputs),i&&i.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(lh):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(uh):null,r})}function lh(t){return qe(t)||function(t){return t[Pl]||null}(t)}function uh(t){return function(t){return t[Nl]||null}(t)}const ch={};function It(t){return Bn(()=>{const e={type:t.type,bootstrap:t.bootstrap||ie,declarations:t.declarations||ie,imports:t.imports||ie,exports:t.exports||ie,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(ch[t.id]=t.type),e})}function dh(t,e){if(null==t)return xr;const n={};for(const r in t)if(t.hasOwnProperty(r)){let o=t[r],i=o;Array.isArray(o)&&(i=o[1],o=o[0]),n[o]=r,e&&(e[o]=i)}return n}const V=Ot;function We(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function qe(t){return t[ms]||null}function At(t,e){const n=t[ah]||null;if(!n&&!0===e)throw new Error(`Type ${Q(t)} does not have '\u0275mod' property.`);return n}const z=11;function cn(t){return Array.isArray(t)&&"object"==typeof t[1]}function zt(t){return Array.isArray(t)&&!0===t[1]}function Fl(t){return 0!=(8&t.flags)}function Ds(t){return 2==(2&t.flags)}function Es(t){return 1==(1&t.flags)}function qt(t){return null!==t.template}function qb(t){return 0!=(512&t[2])}function cr(t,e){return t.hasOwnProperty(Sn)?t[Sn]:null}class hh{constructor(e,n,r){this.previousValue=e,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function Be(){return ph}function ph(t){return t.type.prototype.ngOnChanges&&(t.setInput=Jb),Yb}function Yb(){const t=mh(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===xr)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function Jb(t,e,n,r){const o=mh(t)||function(t,e){return t[gh]=e}(t,{previous:xr,current:null}),i=o.current||(o.current={}),s=o.previous,a=this.declaredInputs[n],l=s[a];i[a]=new hh(l&&l.currentValue,e,s===xr),t[r]=e}Be.ngInherit=!0;const gh="__ngSimpleChanges__";function mh(t){return t[gh]||null}const _h="http://www.w3.org/2000/svg";let Vl;function Bl(){return void 0!==Vl?Vl:"undefined"!=typeof document?document:void 0}function Ee(t){return!!t.listen}const Ch={createRenderer:(t,e)=>Bl()};function Te(t){for(;Array.isArray(t);)t=t[0];return t}function bs(t,e){return Te(e[t])}function xt(t,e){return Te(e[t.index])}function Hl(t,e){return t.data[e]}function Vr(t,e){return t[e]}function bt(t,e){const n=e[t];return cn(n)?n:n[0]}function jl(t){return 128==(128&t[2])}function jn(t,e){return null==e?null:t[e]}function Eh(t){t[18]=0}function Ul(t,e){t[5]+=e;let n=t,r=t[3];for(;null!==r&&(1===e&&1===n[5]||-1===e&&0===n[5]);)r[5]+=e,n=r,r=r[3]}const H={lFrame:Ih(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function bh(){return H.bindingsEnabled}function b(){return H.lFrame.lView}function ee(){return H.lFrame.tView}function Me(t){return H.lFrame.contextLView=t,t[8]}function Pe(){let t=vh();for(;null!==t&&64===t.type;)t=t.parent;return t}function vh(){return H.lFrame.currentTNode}function dn(t,e){const n=H.lFrame;n.currentTNode=t,n.isParent=e}function Gl(){return H.lFrame.isParent}function $l(){H.lFrame.isParent=!1}function vs(){return H.isInCheckNoChangesMode}function ws(t){H.isInCheckNoChangesMode=t}function rt(){const t=H.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Br(){return H.lFrame.bindingIndex++}function On(t){const e=H.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function fv(t,e){const n=H.lFrame;n.bindingIndex=n.bindingRootIndex=t,Wl(e)}function Wl(t){H.lFrame.currentDirectiveIndex=t}function ql(t){H.lFrame.currentQueryIndex=t}function pv(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Th(t,e,n){if(n&F.SkipSelf){let o=e,i=t;for(;!(o=o.parent,null!==o||n&F.Host||(o=pv(i),null===o||(i=i[15],10&o.type))););if(null===o)return!1;e=o,t=i}const r=H.lFrame=Oh();return r.currentTNode=e,r.lView=t,!0}function Ms(t){const e=Oh(),n=t[1];H.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Oh(){const t=H.lFrame,e=null===t?null:t.child;return null===e?Ih(t):e}function Ih(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Ah(){const t=H.lFrame;return H.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Ph=Ah;function Ss(){const t=Ah();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function ot(){return H.lFrame.selectedIndex}function Un(t){H.lFrame.selectedIndex=t}function be(){const t=H.lFrame;return Hl(t.tView,t.selectedIndex)}function Hr(){H.lFrame.currentNamespace=_h}function Ts(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){const i=t.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:u,ngOnDestroy:c}=i;s&&(t.contentHooks||(t.contentHooks=[])).push(-n,s),a&&((t.contentHooks||(t.contentHooks=[])).push(n,a),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,a)),l&&(t.viewHooks||(t.viewHooks=[])).push(-n,l),u&&((t.viewHooks||(t.viewHooks=[])).push(n,u),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,u)),null!=c&&(t.destroyHooks||(t.destroyHooks=[])).push(n,c)}}function Os(t,e,n){Nh(t,e,3,n)}function Is(t,e,n,r){(3&t[2])===n&&Nh(t,e,n,r)}function Kl(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function Nh(t,e,n,r){const i=null!=r?r:-1,s=e.length-1;let a=0;for(let l=void 0!==r?65535&t[18]:0;l<s;l++)if("number"==typeof e[l+1]){if(a=e[l],null!=r&&a>=r)break}else e[l]<0&&(t[18]+=65536),(a<i||-1==i)&&(bv(t,n,e,l),t[18]=(4294901760&t[18])+l+2),l++}function bv(t,e,n,r){const o=n[r]<0,i=n[r+1],a=t[o?-n[r]:n[r]];if(o){if(t[2]>>11<t[18]>>16&&(3&t[2])===e){t[2]+=2048;try{i.call(a)}finally{}}}else try{i.call(a)}finally{}}class qo{constructor(e,n,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function As(t,e,n){const r=Ee(t);let o=0;for(;o<n.length;){const i=n[o];if("number"==typeof i){if(0!==i)break;o++;const s=n[o++],a=n[o++],l=n[o++];r?t.setAttribute(e,a,l,s):e.setAttributeNS(s,a,l)}else{const s=i,a=n[++o];Yl(s)?r&&t.setProperty(e,s,a):r?t.setAttribute(e,s,a):e.setAttribute(s,a),o++}}return o}function xh(t){return 3===t||4===t||6===t}function Yl(t){return 64===t.charCodeAt(0)}function Ps(t,e){if(null!==e&&0!==e.length)if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){const o=e[r];"number"==typeof o?n=o:0===n||Rh(t,n,o,null,-1===n||2===n?e[++r]:null)}}return t}function Rh(t,e,n,r,o){let i=0,s=t.length;if(-1===e)s=-1;else for(;i<t.length;){const a=t[i++];if("number"==typeof a){if(a===e){s=-1;break}if(a>e){s=i-1;break}}}for(;i<t.length;){const a=t[i];if("number"==typeof a)break;if(a===n){if(null===r)return void(null!==o&&(t[i+1]=o));if(r===t[i+1])return void(t[i+2]=o)}i++,null!==r&&i++,null!==o&&i++}-1!==s&&(t.splice(s,0,e),i=s+1),t.splice(i++,0,n),null!==r&&t.splice(i++,0,r),null!==o&&t.splice(i++,0,o)}function Fh(t){return-1!==t}function jr(t){return 32767&t}function Ur(t,e){let n=function(t){return t>>16}(t),r=e;for(;n>0;)r=r[15],n--;return r}let Jl=!0;function Ns(t){const e=Jl;return Jl=t,e}let Ov=0;function Qo(t,e){const n=Xl(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,Zl(r.data,t),Zl(e,null),Zl(r.blueprint,null));const o=xs(t,e),i=t.injectorIndex;if(Fh(o)){const s=jr(o),a=Ur(o,e),l=a[1].data;for(let u=0;u<8;u++)e[i+u]=a[s+u]|l[s+u]}return e[i+8]=o,i}function Zl(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Xl(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function xs(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,o=e;for(;null!==o;){const i=o[1],s=i.type;if(r=2===s?i.declTNode:1===s?o[6]:null,null===r)return-1;if(n++,o=o[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function Rs(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Uo)&&(r=n[Uo]),null==r&&(r=n[Uo]=Ov++);const o=255&r;e.data[t+(o>>5)]|=1<<o}(t,e,n)}function Vh(t,e,n){if(n&F.Optional)return t;ps(e,"NodeInjector")}function Bh(t,e,n,r){if(n&F.Optional&&void 0===r&&(r=null),0==(n&(F.Self|F.Host))){const o=t[9],i=Vn(void 0);try{return o?o.get(e,r,n&F.Optional):sh(e,r,n&F.Optional)}finally{Vn(i)}}return Vh(r,e,n)}function Hh(t,e,n,r=F.Default,o){if(null!==t){const i=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Uo)?t[Uo]:void 0;return"number"==typeof e?e>=0?255&e:Pv:e}(n);if("function"==typeof i){if(!Th(e,t,r))return r&F.Host?Vh(o,n,r):Bh(e,n,r,o);try{const s=i(r);if(null!=s||r&F.Optional)return s;ps(n)}finally{Ph()}}else if("number"==typeof i){let s=null,a=Xl(t,e),l=-1,u=r&F.Host?e[16][6]:null;for((-1===a||r&F.SkipSelf)&&(l=-1===a?xs(t,e):e[a+8],-1!==l&&Gh(r,!1)?(s=e[1],a=jr(l),e=Ur(l,e)):a=-1);-1!==a;){const c=e[1];if(Uh(i,a,c.data)){const d=Nv(a,e,n,s,r,u);if(d!==jh)return d}l=e[a+8],-1!==l&&Gh(r,e[1].data[a+8]===u)&&Uh(i,a,e)?(s=c,a=jr(l),e=Ur(l,e)):a=-1}}}return Bh(e,n,r,o)}const jh={};function Pv(){return new Gr(Pe(),b())}function Nv(t,e,n,r,o,i){const s=e[1],a=s.data[t+8],c=function(t,e,n,r,o){const i=t.providerIndexes,s=e.data,a=1048575&i,l=t.directiveStart,c=i>>20,f=o?a+c:t.directiveEnd;for(let h=r?a:a+c;h<f;h++){const p=s[h];if(h<l&&n===p||h>=l&&p.type===n)return h}if(o){const h=s[l];if(h&&qt(h)&&h.type===n)return l}return null}(a,s,n,null==r?Ds(a)&&Jl:r!=s&&0!=(3&a.type),o&F.Host&&i===a);return null!==c?Yo(e,s,c,a):jh}function Yo(t,e,n,r){let o=t[n];const i=e.data;if(function(t){return t instanceof qo}(o)){const s=o;s.resolving&&function(t,e){throw new ir("200",`Circular dependency in DI detected for ${t}`)}(nt(i[n]));const a=Ns(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Vn(s.injectImpl):null;Th(t,r,F.Default);try{o=t[n]=s.factory(void 0,i,t,r),e.firstCreatePass&&n>=r.directiveStart&&function(t,e,n){const{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=e.type.prototype;if(r){const s=ph(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,o),i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i))}(n,i[n],e)}finally{null!==l&&Vn(l),Ns(a),s.resolving=!1,Ph()}}return o}function Uh(t,e,n){return!!(n[e+(t>>5)]&1<<t)}function Gh(t,e){return!(t&F.Self||t&F.Host&&e)}class Gr{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,r){return Hh(this._tNode,this._lView,e,r,n)}}function Qe(t){return Bn(()=>{const e=t.prototype.constructor,n=e[Sn]||eu(e),r=Object.prototype;let o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==r;){const i=o[Sn]||eu(o);if(i&&i!==n)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function eu(t){return nh(t)?()=>{const e=eu(P(t));return e&&e()}:cr(t)}const Wr="__parameters__";function dr(t,e,n){return Bn(()=>{const r=function(t){return function(...n){if(t){const r=t(...n);for(const o in r)this[o]=r[o]}}}(e);function o(...i){if(this instanceof o)return r.apply(this,i),this;const s=new o(...i);return a.annotation=s,a;function a(l,u,c){const d=l.hasOwnProperty(Wr)?l[Wr]:Object.defineProperty(l,Wr,{value:[]})[Wr];for(;d.length<=c;)d.push(null);return(d[c]=d[c]||[]).push(s),l}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}class q{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=B({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}toString(){return`InjectionToken ${this._desc}`}}function fn(t,e){t.forEach(n=>Array.isArray(n)?fn(n,e):e(n))}function ks(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function fr(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function vt(t,e,n){let r=qr(t,e);return r>=0?t[1|r]=n:(r=~r,function(t,e,n,r){let o=t.length;if(o==e)t.push(n,r);else if(1===o)t.push(r,t[0]),t[0]=n;else{for(o--,t.push(t[o-1],t[o]);o>e;)t[o]=t[o-2],o--;t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function ou(t,e){const n=qr(t,e);if(n>=0)return t[1|n]}function qr(t,e){return function(t,e,n){let r=0,o=t.length>>n;for(;o!==r;){const i=r+(o-r>>1),s=t[i<<n];if(e===s)return i<<n;s>e?o=i:r=i+1}return~(o<<n)}(t,e,1)}const ti={},su="__NG_DI_FLAG__",Kr="ngTempTokenPath",Wv=/\n/gm,au="__source",lu=oe({provide:String,useValue:oe});let ni;function Qr(t){const e=ni;return ni=t,e}function qv(t,e=F.Default){if(void 0===ni)throw new Error("inject() must be called from an injection context");return null===ni?sh(t,void 0,e):ni.get(t,e&F.Optional?null:void 0,e)}function I(t,e=F.Default){return(Al||qv)(P(t),e)}function hr(t){const e=[];for(let n=0;n<t.length;n++){const r=P(t[n]);if(Array.isArray(r)){if(0===r.length)throw new Error("Arguments array must have arguments.");let o,i=F.Default;for(let s=0;s<r.length;s++){const a=r[s],l=Kv(a);"number"==typeof l?-1===l?o=a.token:i|=l:o=a}e.push(I(o,i))}else e.push(I(r))}return e}function ri(t,e){return t[su]=e,t.prototype[su]=e,t}function Kv(t){return t[su]}function Kh(t,e,n,r){const o=t[Kr];throw e[au]&&o.unshift(e[au]),t.message=function(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let o=Q(e);if(Array.isArray(e))o=e.map(Q).join(" -> ");else if("object"==typeof e){let i=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];i.push(s+":"+("string"==typeof a?JSON.stringify(a):Q(a)))}o=`{${i.join(", ")}}`}return`${n}${r?"("+r+")":""}[${o}]: ${t.replace(Wv,"\n ")}`}("\n"+t.message,o,n,r),t.ngTokenPath=o,t[Kr]=null,t}const oi=ri(dr("Inject",t=>({token:t})),-1),hn=ri(dr("Optional"),8),pr=ri(dr("SkipSelf"),4);let Hs,js;function Jr(t){var e;return(null==(e=function(){if(void 0===Hs&&(Hs=null,ne.trustedTypes))try{Hs=ne.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return Hs}())?void 0:e.createHTML(t))||t}function Xh(t){var e;return(null==(e=function(){if(void 0===js&&(js=null,ne.trustedTypes))try{js=ne.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return js}())?void 0:e.createHTML(t))||t}class gr{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class iw extends gr{getTypeName(){return"HTML"}}class sw extends gr{getTypeName(){return"Style"}}class aw extends gr{getTypeName(){return"Script"}}class lw extends gr{getTypeName(){return"URL"}}class uw extends gr{getTypeName(){return"ResourceURL"}}function wt(t){return t instanceof gr?t.changingThisBreaksApplicationSecurity:t}function pn(t,e){const n=np(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see https://g.co/ng/security#xss)`)}return n===e}function np(t){return t instanceof gr&&t.getTypeName()||null}class gw{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{const n=(new window.DOMParser).parseFromString(Jr(e),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(e):(n.removeChild(n.firstChild),n)}catch(n){return null}}}class mw{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);const r=this.inertDocument.createElement("body");n.appendChild(r)}}getInertBodyElement(e){const n=this.inertDocument.createElement("template");if("content"in n)return n.innerHTML=Jr(e),n;const r=this.inertDocument.createElement("body");return r.innerHTML=Jr(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(e){const n=e.attributes;for(let o=n.length-1;0<o;o--){const s=n.item(o).name;("xmlns:ns1"===s||0===s.indexOf("ns1:"))&&e.removeAttribute(s)}let r=e.firstChild;for(;r;)r.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(r),r=r.nextSibling}}const yw=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,Cw=/^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 si(t){return(t=String(t)).match(yw)||t.match(Cw)?t:"unsafe:"+t}function op(t){return(t=String(t)).split(",").map(e=>si(e.trim())).join(", ")}function gn(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function ai(...t){const e={};for(const n of t)for(const r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}const ip=gn("area,br,col,hr,img,wbr"),sp=gn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),ap=gn("rp,rt"),fu=ai(ip,ai(sp,gn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),ai(ap,gn("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")),ai(ap,sp)),hu=gn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),pu=gn("srcset"),lp=ai(hu,pu,gn("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"),gn("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")),Dw=gn("script,style,template");class Ew{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let n=e.firstChild,r=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let o=this.checkClobberedElement(n,n.nextSibling);if(o){n=o;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(e){const n=e.nodeName.toLowerCase();if(!fu.hasOwnProperty(n))return this.sanitizedSomething=!0,!Dw.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const r=e.attributes;for(let o=0;o<r.length;o++){const i=r.item(o),s=i.name,a=s.toLowerCase();if(!lp.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=i.value;hu[a]&&(l=si(l)),pu[a]&&(l=op(l)),this.buf.push(" ",s,'="',up(l),'"')}return this.buf.push(">"),!0}endElement(e){const n=e.nodeName.toLowerCase();fu.hasOwnProperty(n)&&!ip.hasOwnProperty(n)&&(this.buf.push("</"),this.buf.push(n),this.buf.push(">"))}chars(e){this.buf.push(up(e))}checkClobberedElement(e,n){if(n&&(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return n}}const bw=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vw=/([^\#-~ |!])/g;function up(t){return t.replace(/&/g,"&amp;").replace(bw,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vw,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Us;function cp(t,e){let n=null;try{Us=Us||function(t){const e=new mw(t);return function(){try{return!!(new window.DOMParser).parseFromString(Jr(""),"text/html")}catch(t){return!1}}()?new gw(e):e}(t);let r=e?String(e):"";n=Us.getInertBodyElement(r);let o=5,i=r;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=n.innerHTML,n=Us.getInertBodyElement(r)}while(r!==i);return Jr((new Ew).sanitizeChildren(gu(n)||n))}finally{if(n){const r=gu(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function gu(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ae=(()=>((ae=ae||{})[ae.NONE=0]="NONE",ae[ae.HTML=1]="HTML",ae[ae.STYLE=2]="STYLE",ae[ae.SCRIPT=3]="SCRIPT",ae[ae.URL=4]="URL",ae[ae.RESOURCE_URL=5]="RESOURCE_URL",ae))();function dp(t){const e=ui();return e?Xh(e.sanitize(ae.HTML,t)||""):pn(t,"HTML")?Xh(wt(t)):cp(Bl(),$(t))}function li(t){const e=ui();return e?e.sanitize(ae.URL,t)||"":pn(t,"URL")?wt(t):si($(t))}function ui(){const t=b();return t&&t[12]}const pp="__ngContext__";function Ye(t,e){t[pp]=e}function _u(t){const e=function(t){return t[pp]||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Gs(t){return t.ngOriginalError}function Hw(t,...e){t.error(...e)}class mr{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e),r=this._findContext(e),o=function(t){return t&&t.ngErrorLogger||Hw}(e);o(this._console,"ERROR",e),n&&o(this._console,"ORIGINAL ERROR",n),r&&o(this._console,"ERROR CONTEXT",r)}_findContext(e){return e?function(t){return t.ngDebugContext}(e)||this._findContext(Gs(e)):null}_findOriginalError(e){let n=e&&Gs(e);for(;n&&Gs(n);)n=Gs(n);return n||null}}const vp=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(ne))();function wp(t){return t.ownerDocument.defaultView}function Mp(t){return t.ownerDocument}function Cu(t){return t.ownerDocument.body}function mn(t){return t instanceof Function?t():t}var Mt=(()=>((Mt=Mt||{})[Mt.Important=1]="Important",Mt[Mt.DashCase=2]="DashCase",Mt))();function Eu(t,e){return undefined(t,e)}function di(t){const e=t[3];return zt(e)?e[3]:e}function bu(t){return Ap(t[13])}function vu(t){return Ap(t[4])}function Ap(t){for(;null!==t&&!zt(t);)t=t[4];return t}function Xr(t,e,n,r,o){if(null!=r){let i,s=!1;zt(r)?i=r:cn(r)&&(s=!0,r=r[0]);const a=Te(r);0===t&&null!==n?null==o?kp(e,n,a):_r(e,n,a,o||null,!0):1===t&&null!==n?_r(e,n,a,o||null,!0):2===t?function(t,e,n){const r=Ws(t,e);r&&function(t,e,n,r){Ee(t)?t.removeChild(e,n,r):e.removeChild(n)}(t,r,e,n)}(e,a,s):3===t&&e.destroyNode(a),null!=i&&function(t,e,n,r,o){const i=n[7];i!==Te(n)&&Xr(e,t,r,i,o);for(let a=10;a<n.length;a++){const l=n[a];fi(l[1],l,t,e,r,i)}}(e,t,i,n,o)}}function Mu(t,e,n){return Ee(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function Np(t,e){const n=t[9],r=n.indexOf(e),o=e[3];1024&e[2]&&(e[2]&=-1025,Ul(o,-1)),n.splice(r,1)}function Su(t,e){if(t.length<=10)return;const n=10+e,r=t[n];if(r){const o=r[17];null!==o&&o!==t&&Np(o,r),e>0&&(t[n-1][4]=r[4]);const i=fr(t,10+e);!function(t,e){fi(t,e,e[z],2,null,null),e[0]=null,e[6]=null}(r[1],r);const s=i[19];null!==s&&s.detachView(i[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function xp(t,e){if(!(256&e[2])){const n=e[z];Ee(n)&&n.destroyNode&&fi(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Tu(t[1],t);for(;e;){let n=null;if(cn(e))n=e[13];else{const r=e[10];r&&(n=r)}if(!n){for(;e&&!e[4]&&e!==t;)cn(e)&&Tu(e[1],e),e=e[3];null===e&&(e=t),cn(e)&&Tu(e[1],e),n=e&&e[4]}e=n}}(e)}}function Tu(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 r=0;r<n.length;r+=2){const o=e[n[r]];if(!(o instanceof qo)){const i=n[r+1];if(Array.isArray(i))for(let s=0;s<i.length;s+=2){const a=o[i[s]],l=i[s+1];try{l.call(a)}finally{}}else try{i.call(o)}finally{}}}}(t,e),function(t,e){const n=t.cleanup,r=e[7];let o=-1;if(null!==n)for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const s=n[i+1],a="function"==typeof s?s(e):Te(e[s]),l=r[o=n[i+2]],u=n[i+3];"boolean"==typeof u?a.removeEventListener(n[i],l,u):u>=0?r[o=u]():r[o=-u].unsubscribe(),i+=2}else{const s=r[o=n[i+1]];n[i].call(s)}if(null!==r){for(let i=o+1;i<r.length;i++)r[i]();e[7]=null}}(t,e),1===e[1].type&&Ee(e[z])&&e[z].destroy();const n=e[17];if(null!==n&&zt(e[3])){n!==e[3]&&Np(n,e);const r=e[19];null!==r&&r.detachView(t)}}}function Rp(t,e,n){return function(t,e,n){let r=e;for(;null!==r&&40&r.type;)r=(e=r).parent;if(null===r)return n[0];if(2&r.flags){const o=t.data[r.directiveStart].encapsulation;if(o===Dt.None||o===Dt.Emulated)return null}return xt(r,n)}(t,e.parent,n)}function _r(t,e,n,r,o){Ee(t)?t.insertBefore(e,n,r,o):e.insertBefore(n,r,o)}function kp(t,e,n){Ee(t)?t.appendChild(e,n):e.appendChild(n)}function Lp(t,e,n,r,o){null!==r?_r(t,e,n,r,o):kp(t,e,n)}function Ws(t,e){return Ee(t)?t.parentNode(e):e.parentNode}let Hp=function(t,e,n){return 40&t.type?xt(t,n):null};function zs(t,e,n,r){const o=Rp(t,r,e),i=e[z],a=function(t,e,n){return Hp(t,e,n)}(r.parent||e[6],r,e);if(null!=o)if(Array.isArray(n))for(let l=0;l<n.length;l++)Lp(i,o,n[l],a,!1);else Lp(i,o,n,a,!1)}function qs(t,e){if(null!==e){const n=e.type;if(3&n)return xt(e,t);if(4&n)return Iu(-1,t[e.index]);if(8&n){const r=e.child;if(null!==r)return qs(t,r);{const o=t[e.index];return zt(o)?Iu(-1,o):Te(o)}}if(32&n)return Eu(e,t)()||Te(t[e.index]);{const r=Up(t,e);return null!==r?Array.isArray(r)?r[0]:qs(di(t[16]),r):qs(t,e.next)}}return null}function Up(t,e){return null!==e?t[16][6].projection[e.projection]:null}function Iu(t,e){const n=10+t+1;if(n<e.length){const r=e[n],o=r[1].firstChild;if(null!==o)return qs(r,o)}return e[7]}function Au(t,e,n,r,o,i,s){for(;null!=n;){const a=r[n.index],l=n.type;if(s&&0===e&&(a&&Ye(Te(a),r),n.flags|=4),64!=(64&n.flags))if(8&l)Au(t,e,n.child,r,o,i,!1),Xr(e,t,o,a,i);else if(32&l){const u=Eu(n,r);let c;for(;c=u();)Xr(e,t,o,c,i);Xr(e,t,o,a,i)}else 16&l?$p(t,e,r,n,o,i):Xr(e,t,o,a,i);n=s?n.projectionNext:n.next}}function fi(t,e,n,r,o,i){Au(n,r,t.firstChild,e,o,i,!1)}function $p(t,e,n,r,o,i){const s=n[16],l=s[6].projection[r.projection];if(Array.isArray(l))for(let u=0;u<l.length;u++)Xr(e,t,o,l[u],i);else Au(t,e,l,s[3],o,i,!0)}function Wp(t,e,n){Ee(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Pu(t,e,n){Ee(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}function zp(t,e,n){let r=t.length;for(;;){const o=t.indexOf(e,n);if(-1===o)return o;if(0===o||t.charCodeAt(o-1)<=32){const i=e.length;if(o+i===r||t.charCodeAt(o+i)<=32)return o}n=o+1}}const qp="ng-template";function c0(t,e,n){let r=0;for(;r<t.length;){let o=t[r++];if(n&&"class"===o){if(o=t[r],-1!==zp(o.toLowerCase(),e,0))return!0}else if(1===o){for(;r<t.length&&"string"==typeof(o=t[r++]);)if(o.toLowerCase()===e)return!0;return!1}}return!1}function Kp(t){return 4===t.type&&t.value!==qp}function d0(t,e,n){return e===(4!==t.type||n?t.value:qp)}function f0(t,e,n){let r=4;const o=t.attrs||[],i=function(t){for(let e=0;e<t.length;e++)if(xh(t[e]))return e;return t.length}(o);let s=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!s)if(4&r){if(r=2|1&r,""!==l&&!d0(t,l,n)||""===l&&1===e.length){if(Kt(r))return!1;s=!0}}else{const u=8&r?l:e[++a];if(8&r&&null!==t.attrs){if(!c0(t.attrs,u,n)){if(Kt(r))return!1;s=!0}continue}const d=h0(8&r?"class":l,o,Kp(t),n);if(-1===d){if(Kt(r))return!1;s=!0;continue}if(""!==u){let f;f=d>i?"":o[d+1].toLowerCase();const h=8&r?f:null;if(h&&-1!==zp(h,u,0)||2&r&&u!==f){if(Kt(r))return!1;s=!0}}}}else{if(!s&&!Kt(r)&&!Kt(l))return!1;if(s&&Kt(l))continue;s=!1,r=l|1&r}}return Kt(r)||s}function Kt(t){return 0==(1&t)}function h0(t,e,n,r){if(null===e)return-1;let o=0;if(r||!n){let i=!1;for(;o<e.length;){const s=e[o];if(s===t)return o;if(3===s||6===s)i=!0;else{if(1===s||2===s){let a=e[++o];for(;"string"==typeof a;)a=e[++o];continue}if(4===s)break;if(0===s){o+=4;continue}}o+=i?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const r=t[n];if("number"==typeof r)return-1;if(r===e)return n;n++}return-1}(e,t)}function Qp(t,e,n=!1){for(let r=0;r<e.length;r++)if(f0(t,e[r],n))return!0;return!1}function Yp(t,e){return t?":not("+e.trim()+")":e}function y0(t){let e=t[0],n=1,r=2,o="",i=!1;for(;n<t.length;){let s=t[n];if("string"==typeof s)if(2&r){const a=t[++n];o+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&r?o+="."+s:4&r&&(o+=" "+s);else""!==o&&!Kt(s)&&(e+=Yp(i,o),o=""),r=s,i=i||!Kt(r);n++}return""!==o&&(e+=Yp(i,o)),e}const W={};function E(t){Jp(ee(),b(),ot()+t,vs())}function Jp(t,e,n,r){if(!r)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&Os(e,i,n)}else{const i=t.preOrderHooks;null!==i&&Is(e,i,0,n)}Un(n)}function Ks(t,e){return t<<17|e<<2}function Qt(t){return t>>17&32767}function Nu(t){return 2|t}function In(t){return(131068&t)>>2}function xu(t,e){return-131069&t|e<<2}function Ru(t){return 1|t}function lg(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r<n.length;r+=2){const o=n[r],i=n[r+1];if(-1!==i){const s=t.data[i];ql(o),s.contentQueries(2,e[i],i)}}}function hi(t,e,n,r,o,i,s,a,l,u){const c=e.blueprint.slice();return c[0]=o,c[2]=140|r,Eh(c),c[3]=c[15]=t,c[8]=n,c[10]=s||t&&t[10],c[z]=a||t&&t[z],c[12]=l||t&&t[12]||null,c[9]=u||t&&t[9]||null,c[6]=i,c[16]=2==e.type?t[16]:c,c}function eo(t,e,n,r,o){let i=t.data[e];if(null===i)i=function(t,e,n,r,o){const i=vh(),s=Gl(),l=t.data[e]=function(t,e,n,r,o,i){return{type:n,index:r,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:o,attrs:i,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}}(0,s?i:i&&i.parent,n,e,r,o);return null===t.firstChild&&(t.firstChild=l),null!==i&&(s?null==i.child&&null!==l.parent&&(i.child=l):null===i.next&&(i.next=l)),l}(t,e,n,r,o),H.lFrame.inI18n&&(i.flags|=64);else if(64&i.type){i.type=n,i.value=r,i.attrs=o;const s=function(){const t=H.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();i.injectorIndex=null===s?-1:s.injectorIndex}return dn(i,!0),i}function to(t,e,n,r){if(0===n)return-1;const o=e.length;for(let i=0;i<n;i++)e.push(r),t.blueprint.push(r),t.data.push(null);return o}function pi(t,e,n){Ms(e);try{const r=t.viewQuery;null!==r&&Zu(1,r,n);const o=t.template;null!==o&&ug(t,e,o,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&lg(t,e),t.staticViewQueries&&Zu(2,t.viewQuery,n);const i=t.components;null!==i&&function(t,e){for(let n=0;n<e.length;n++)eM(t,e[n])}(e,i)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),r}finally{e[2]&=-5,Ss()}}function no(t,e,n,r){const o=e[2];if(256==(256&o))return;Ms(e);const i=vs();try{Eh(e),function(t){H.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==n&&ug(t,e,n,2,r);const s=3==(3&o);if(!i)if(s){const u=t.preOrderCheckHooks;null!==u&&Os(e,u,null)}else{const u=t.preOrderHooks;null!==u&&Is(e,u,0,null),Kl(e,0)}if(function(t){for(let e=bu(t);null!==e;e=vu(e)){if(!e[2])continue;const n=e[9];for(let r=0;r<n.length;r++){const o=n[r],i=o[3];0==(1024&o[2])&&Ul(i,1),o[2]|=1024}}}(e),function(t){for(let e=bu(t);null!==e;e=vu(e))for(let n=10;n<e.length;n++){const r=e[n],o=r[1];jl(r)&&no(o,r,o.template,r[8])}}(e),null!==t.contentQueries&&lg(t,e),!i)if(s){const u=t.contentCheckHooks;null!==u&&Os(e,u)}else{const u=t.contentHooks;null!==u&&Is(e,u,1),Kl(e,1)}!function(t,e){const n=t.hostBindingOpCodes;if(null!==n)try{for(let r=0;r<n.length;r++){const o=n[r];if(o<0)Un(~o);else{const i=o,s=n[++r],a=n[++r];fv(s,i),a(2,e[i])}}}finally{Un(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)X0(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&Zu(2,l,r),!i)if(s){const u=t.viewCheckHooks;null!==u&&Os(e,u)}else{const u=t.viewHooks;null!==u&&Is(e,u,2),Kl(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),i||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Ul(e[3],-1))}finally{Ss()}}function R0(t,e,n,r){const o=e[10],i=!vs(),s=function(t){return 4==(4&t[2])}(e);try{i&&!s&&o.begin&&o.begin(),s&&pi(t,e,r),no(t,e,n,r)}finally{i&&!s&&o.end&&o.end()}}function ug(t,e,n,r,o){const i=ot(),s=2&r;try{Un(-1),s&&e.length>20&&Jp(t,e,20,vs()),n(r,o)}finally{Un(i)}}function cg(t,e,n){if(Fl(e)){const o=e.directiveEnd;for(let i=e.directiveStart;i<o;i++){const s=t.data[i];s.contentQueries&&s.contentQueries(1,n[i],i)}}}function $u(t,e,n){!bh()||(function(t,e,n,r){const o=n.directiveStart,i=n.directiveEnd;t.firstCreatePass||Qo(n,e),Ye(r,e);const s=n.initialInputs;for(let a=o;a<i;a++){const l=t.data[a],u=qt(l);u&&K0(e,n,l);const c=Yo(e,t,a,n);Ye(c,e),null!==s&&Q0(0,a-o,c,l,0,s),u&&(bt(n.index,e)[8]=c)}}(t,e,n,xt(n,e)),128==(128&n.flags)&&function(t,e,n){const r=n.directiveStart,o=n.directiveEnd,s=n.index,a=H.lFrame.currentDirectiveIndex;try{Un(s);for(let l=r;l<o;l++){const u=t.data[l],c=e[l];Wl(l),(null!==u.hostBindings||0!==u.hostVars||null!==u.hostAttrs)&&yg(u,c)}}finally{Un(-1),Wl(a)}}(t,e,n))}function Wu(t,e,n=xt){const r=e.localNames;if(null!==r){let o=e.index+1;for(let i=0;i<r.length;i+=2){const s=r[i+1],a=-1===s?n(e,t):t[s];t[o++]=a}}}function dg(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Js(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Js(t,e,n,r,o,i,s,a,l,u){const c=20+r,d=c+o,f=function(t,e){const n=[];for(let r=0;r<e;r++)n.push(r<t?null:W);return n}(c,d),h="function"==typeof u?u():u;return f[1]={type:t,blueprint:f,template:n,queries:null,viewQuery:a,declTNode:e,data:f.slice().fill(null,c),bindingStartIndex:c,expandoStartIndex:d,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof i?i():i,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:l,consts:h,incompleteFirstPass:!1}}function gg(t,e,n){for(let r in t)if(t.hasOwnProperty(r)){const o=t[r];(n=null===n?{}:n).hasOwnProperty(r)?n[r].push(e,o):n[r]=[e,o]}return n}function St(t,e,n,r,o,i,s,a){const l=xt(e,n);let c,u=e.inputs;!a&&null!=u&&(c=u[r])?(Og(t,n,c,r,o),Ds(e)&&function(t,e){const n=bt(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3&e.type&&(r=function(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(r),o=null!=s?s(o,e.value||"",r):o,Ee(i)?i.setProperty(l,r,o):Yl(r)||(l.setProperty?l.setProperty(r,o):l[r]=o))}function zu(t,e,n,r){let o=!1;if(bh()){const i=function(t,e,n){const r=t.directiveRegistry;let o=null;if(r)for(let i=0;i<r.length;i++){const s=r[i];Qp(n,s.selectors,!1)&&(o||(o=[]),Rs(Qo(n,e),t,s.type),qt(s)?(Cg(t,n),o.unshift(s)):o.push(s))}return o}(t,e,n),s=null===r?null:{"":-1};if(null!==i){o=!0,Dg(n,t.data.length,i.length);for(let c=0;c<i.length;c++){const d=i[c];d.providersResolver&&d.providersResolver(d)}let a=!1,l=!1,u=to(t,e,i.length,null);for(let c=0;c<i.length;c++){const d=i[c];n.mergedAttrs=Ps(n.mergedAttrs,d.hostAttrs),Eg(t,n,e,u,d),q0(u,d,s),null!==d.contentQueries&&(n.flags|=8),(null!==d.hostBindings||null!==d.hostAttrs||0!==d.hostVars)&&(n.flags|=128);const f=d.type.prototype;!a&&(f.ngOnChanges||f.ngOnInit||f.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index),a=!0),!l&&(f.ngOnChanges||f.ngDoCheck)&&((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index),l=!0),u++}!function(t,e){const r=e.directiveEnd,o=t.data,i=e.attrs,s=[];let a=null,l=null;for(let u=e.directiveStart;u<r;u++){const c=o[u],d=c.inputs,f=null===i||Kp(e)?null:Y0(d,i);s.push(f),a=gg(d,u,a),l=gg(c.outputs,u,l)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=a,e.outputs=l}(t,n)}s&&function(t,e,n){if(e){const r=t.localNames=[];for(let o=0;o<e.length;o+=2){const i=n[e[o+1]];if(null==i)throw new ir("301",`Export of name '${e[o+1]}' not found!`);r.push(e[o],i)}}}(n,r,s)}return n.mergedAttrs=Ps(n.mergedAttrs,n.attrs),o}function _g(t,e,n,r,o,i){const s=i.hostBindings;if(s){let a=t.hostBindingOpCodes;null===a&&(a=t.hostBindingOpCodes=[]);const l=~e.index;(function(t){let e=t.length;for(;e>0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(a)!=l&&a.push(l),a.push(r,o,s)}}function yg(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Cg(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function q0(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;qt(e)&&(n[""]=t)}}function Dg(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Eg(t,e,n,r,o){t.data[r]=o;const i=o.factory||(o.factory=cr(o.type)),s=new qo(i,qt(o),null);t.blueprint[r]=s,n[r]=s,_g(t,e,0,r,to(t,n,o.hostVars,W),o)}function K0(t,e,n){const r=xt(e,t),o=dg(n),i=t[10],s=Zs(t,hi(t,o,null,n.onPush?64:16,r,e,i,i.createRenderer(r,n),null,null));t[e.index]=s}function _n(t,e,n,r,o,i){const s=xt(t,e);!function(t,e,n,r,o,i,s){if(null==i)Ee(t)?t.removeAttribute(e,o,n):e.removeAttribute(o);else{const a=null==s?$(i):s(i,r||"",o);Ee(t)?t.setAttribute(e,o,a,n):n?e.setAttributeNS(n,o,a):e.setAttribute(o,a)}}(e[z],s,i,t.value,n,r,o)}function Q0(t,e,n,r,o,i){const s=i[e];if(null!==s){const a=r.setInput;for(let l=0;l<s.length;){const u=s[l++],c=s[l++],d=s[l++];null!==a?r.setInput(n,d,u,c):n[c]=d}}}function Y0(t,e){let n=null,r=0;for(;r<e.length;){const o=e[r];if(0!==o)if(5!==o){if("number"==typeof o)break;t.hasOwnProperty(o)&&(null===n&&(n=[]),n.push(o,t[o],e[r+1])),r+=2}else r+=2;else r+=4}return n}function bg(t,e,n,r){return new Array(t,!0,!1,e,null,0,r,n,null,null)}function X0(t,e){const n=bt(e,t);if(jl(n)){const r=n[1];80&n[2]?no(r,n,r.template,n[8]):n[5]>0&&Ku(n)}}function Ku(t){for(let r=bu(t);null!==r;r=vu(r))for(let o=10;o<r.length;o++){const i=r[o];if(1024&i[2]){const s=i[1];no(s,i,s.template,i[8])}else i[5]>0&&Ku(i)}const n=t[1].components;if(null!==n)for(let r=0;r<n.length;r++){const o=bt(n[r],t);jl(o)&&o[5]>0&&Ku(o)}}function eM(t,e){const n=bt(e,t),r=n[1];(function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])})(r,n),pi(r,n,n[8])}function Zs(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Qu(t){for(;t;){t[2]|=64;const e=di(t);if(qb(t)&&!e)return t;t=e}return null}function Ju(t,e,n){const r=e[10];r.begin&&r.begin();try{no(t,e,t.template,n)}catch(o){throw Tg(e,o),o}finally{r.end&&r.end()}}function vg(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],r=_u(n),o=r[1];R0(o,r,o.template,n)}}(t[8])}function Zu(t,e,n){ql(0),e(t,n)}const iM=(()=>Promise.resolve(null))();function wg(t){return t[7]||(t[7]=[])}function Mg(t){return t.cleanup||(t.cleanup=[])}function Tg(t,e){const n=t[9],r=n?n.get(mr,null):null;r&&r.handleError(e)}function Og(t,e,n,r,o){for(let i=0;i<n.length;){const s=n[i++],a=n[i++],l=e[s],u=t.data[s];null!==u.setInput?u.setInput(l,o,r,a):l[a]=o}}function An(t,e,n){const r=bs(e,t);!function(t,e,n){Ee(t)?t.setValue(e,n):e.textContent=n}(t[z],r,n)}function Xs(t,e,n){let r=n?t.styles:null,o=n?t.classes:null,i=0;if(null!==e)for(let s=0;s<e.length;s++){const a=e[s];"number"==typeof a?i=a:1==i?o=Tl(o,a):2==i&&(r=Tl(r,a+": "+e[++s]+";"))}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=o:t.classesWithoutHost=o}const gi=new q("INJECTOR",-1);class Ig{get(e,n=ti){if(n===ti){const r=new Error(`NullInjectorError: No provider for ${Q(e)}!`);throw r.name="NullInjectorError",r}return n}}const mi=new q("Set Injector scope."),_i={},lM={};let Xu;function Ag(){return void 0===Xu&&(Xu=new Ig),Xu}function Pg(t,e=null,n=null,r){return new cM(t,n,e||Ag(),r)}class cM{constructor(e,n,r,o=null){this.parent=r,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const i=[];n&&fn(n,a=>this.processProvider(a,e,n)),fn([e],a=>this.processInjectorType(a,[],i)),this.records.set(gi,ro(void 0,this));const s=this.records.get(mi);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof e?null:Q(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,n=ti,r=F.Default){this.assertNotDestroyed();const o=Qr(this),i=Vn(void 0);try{if(!(r&F.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function(t){return"function"==typeof t||"object"==typeof t&&t instanceof q}(e)&&Mn(e);a=l&&this.injectableDefInScope(l)?ro(ec(e),_i):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&F.Self?Ag():this.parent).get(e,n=r&F.Optional&&n===ti?null:n)}catch(s){if("NullInjectorError"===s.name){if((s[Kr]=s[Kr]||[]).unshift(Q(e)),o)throw s;return Kh(s,e,"R3InjectorError",this.source)}throw s}finally{Vn(i),Qr(o)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((r,o)=>e.push(Q(o))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,n,r){if(!(e=P(e)))return!1;let o=oh(e);const i=null==o&&e.ngModule||void 0,s=void 0===i?e:i,a=-1!==r.indexOf(s);if(void 0!==i&&(o=oh(i)),null==o)return!1;if(null!=o.imports&&!a){let c;r.push(s);try{fn(o.imports,d=>{this.processInjectorType(d,n,r)&&(void 0===c&&(c=[]),c.push(d))})}finally{}if(void 0!==c)for(let d=0;d<c.length;d++){const{ngModule:f,providers:h}=c[d];fn(h,p=>this.processProvider(p,f,h||ie))}}this.injectorDefTypes.add(s);const l=cr(s)||(()=>new s);this.records.set(s,ro(l,_i));const u=o.providers;if(null!=u&&!a){const c=e;fn(u,d=>this.processProvider(d,c,u))}return void 0!==i&&void 0!==e.providers}processProvider(e,n,r){let o=oo(e=P(e))?e:P(e&&e.provide);const i=function(t,e,n){return xg(t)?ro(void 0,t.useValue):ro(Ng(t),_i)}(e);if(oo(e)||!0!==e.multi)this.records.get(o);else{let s=this.records.get(o);s||(s=ro(void 0,_i,!0),s.factory=()=>hr(s.multi),this.records.set(o,s)),o=e,s.multi.push(e)}this.records.set(o,i)}hydrate(e,n){return n.value===_i&&(n.value=lM,n.value=n.factory()),"object"==typeof n.value&&n.value&&function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this.onDestroy.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=P(e.providedIn);return"string"==typeof n?"any"===n||n===this.scope:this.injectorDefTypes.has(n)}}function ec(t){const e=Mn(t),n=null!==e?e.factory:cr(t);if(null!==n)return n;if(t instanceof q)throw new Error(`Token ${Q(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const r=function(t,e){const n=[];for(let r=0;r<t;r++)n.push(e);return n}(e,"?");throw new Error(`Can't resolve all parameters for ${Q(t)}: (${r.join(", ")}).`)}const n=function(t){const e=t&&(t[gs]||t[ih]);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 a future version of Angular. 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 Ng(t,e,n){let r;if(oo(t)){const o=P(t);return cr(o)||ec(o)}if(xg(t))r=()=>P(t.useValue);else if(function(t){return!(!t||!t.useFactory)}(t))r=()=>t.useFactory(...hr(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))r=()=>I(P(t.useExisting));else{const o=P(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return cr(o)||ec(o);r=()=>new o(...hr(t.deps))}return r}function ro(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function xg(t){return null!==t&&"object"==typeof t&&lu in t}function oo(t){return"function"==typeof t}const Rg=function(t,e,n){return function(t,e=null,n=null,r){const o=Pg(t,e,n,r);return o._resolveInjectorDefTypes(),o}({name:n},e,t,n)};let le=(()=>{class t{static create(n,r){return Array.isArray(n)?Rg(n,r,""):Rg(n.providers,n.parent,n.name||"")}}return t.THROW_IF_NOT_FOUND=ti,t.NULL=new Ig,t.\u0275prov=B({token:t,providedIn:"any",factory:()=>I(gi)}),t.__NG_ELEMENT_ID__=-1,t})();function PM(t,e){Ts(_u(t)[1],Pe())}function fe(t){let e=function(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),n=!0;const r=[t];for(;e;){let o;if(qt(t))o=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");o=e.\u0275dir}if(o){if(n){r.push(o);const s=t;s.inputs=sc(t.inputs),s.declaredInputs=sc(t.declaredInputs),s.outputs=sc(t.outputs);const a=o.hostBindings;a&&FM(t,a);const l=o.viewQuery,u=o.contentQueries;if(l&&xM(t,l),u&&RM(t,u),Sl(t.inputs,o.inputs),Sl(t.declaredInputs,o.declaredInputs),Sl(t.outputs,o.outputs),qt(o)&&o.data.animation){const c=t.data;c.animation=(c.animation||[]).concat(o.data.animation)}}const i=o.features;if(i)for(let s=0;s<i.length;s++){const a=i[s];a&&a.ngInherit&&a(t),a===fe&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,n=null;for(let r=t.length-1;r>=0;r--){const o=t[r];o.hostVars=e+=o.hostVars,o.hostAttrs=Ps(o.hostAttrs,n=Ps(n,o.hostAttrs))}}(r)}function sc(t){return t===xr?{}:t===ie?[]:t}function xM(t,e){const n=t.viewQuery;t.viewQuery=n?(r,o)=>{e(r,o),n(r,o)}:e}function RM(t,e){const n=t.contentQueries;t.contentQueries=n?(r,o,i)=>{e(r,o,i),n(r,o,i)}:e}function FM(t,e){const n=t.hostBindings;t.hostBindings=n?(r,o)=>{e(r,o),n(r,o)}:e}let ea=null;function io(){if(!ea){const t=ne.Symbol;if(t&&t.iterator)ea=t.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let n=0;n<e.length;++n){const r=e[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(ea=r)}}}return ea}function Ci(t){return!!ac(t)&&(Array.isArray(t)||!(t instanceof Map)&&io()in t)}function ac(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function yn(t,e,n){return t[e]=n}function Je(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function yr(t,e,n,r){const o=Je(t,e,n);return Je(t,e+1,r)||o}function st(t,e,n,r){const o=b();return Je(o,Br(),e)&&(ee(),_n(be(),o,t,e,n,r)),st}function ao(t,e,n,r){return Je(t,Br(),n)?e+$(n)+r:W}function lo(t,e,n,r,o,i){const a=yr(t,H.lFrame.bindingIndex,n,o);return On(2),a?e+$(n)+r+$(o)+i:W}function ue(t,e,n,r,o,i,s,a){const l=b(),u=ee(),c=t+20,d=u.firstCreatePass?function(t,e,n,r,o,i,s,a,l){const u=e.consts,c=eo(e,t,4,s||null,jn(u,a));zu(e,n,c,jn(u,l)),Ts(e,c);const d=c.tViews=Js(2,c,r,o,i,e.directiveRegistry,e.pipeRegistry,null,e.schemas,u);return null!==e.queries&&(e.queries.template(e,c),d.queries=e.queries.embeddedTView(c)),c}(c,u,l,e,n,r,o,i,s):u.data[c];dn(d,!1);const f=l[z].createComment("");zs(u,l,f,d),Ye(f,l),Zs(l,l[c]=bg(f,l,f,d)),Es(d)&&$u(u,l,d),null!=s&&Wu(l,d,a)}function v(t,e=F.Default){const n=b();return null===n?I(t,e):Hh(Pe(),n,P(t),e)}function j(t,e,n){const r=b();return Je(r,Br(),e)&&St(ee(),be(),r,t,e,r[z],n,!1),j}function fc(t,e,n,r,o){const s=o?"class":"style";Og(t,n,e.inputs[s],s,r)}function m(t,e,n,r){const o=b(),i=ee(),s=20+t,a=o[z],l=o[s]=Mu(a,e,H.lFrame.currentNamespace),u=i.firstCreatePass?function(t,e,n,r,o,i,s){const a=e.consts,u=eo(e,t,2,o,jn(a,i));return zu(e,n,u,jn(a,s)),null!==u.attrs&&Xs(u,u.attrs,!1),null!==u.mergedAttrs&&Xs(u,u.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,u),u}(s,i,o,0,e,n,r):i.data[s];dn(u,!0);const c=u.mergedAttrs;null!==c&&As(a,l,c);const d=u.classes;null!==d&&Pu(a,l,d);const f=u.styles;null!==f&&Wp(a,l,f),64!=(64&u.flags)&&zs(i,o,l,u),0===H.lFrame.elementDepthCount&&Ye(l,o),H.lFrame.elementDepthCount++,Es(u)&&($u(i,o,u),cg(i,u,o)),null!==r&&Wu(o,u)}function _(){let t=Pe();Gl()?$l():(t=t.parent,dn(t,!1));const e=t;H.lFrame.elementDepthCount--;const n=ee();n.firstCreatePass&&(Ts(n,t),Fl(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&fc(n,e,b(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&fc(n,e,b(),e.stylesWithoutHost,!1)}function te(t,e,n,r){m(t,e,n,r),_()}function Ei(t,e,n){const r=b(),o=ee(),i=t+20,s=o.firstCreatePass?function(t,e,n,r,o){const i=e.consts,s=jn(i,r),a=eo(e,t,8,"ng-container",s);return null!==s&&Xs(a,s,!0),zu(e,n,a,jn(i,o)),null!==e.queries&&e.queries.elementStart(e,a),a}(i,o,r,e,n):o.data[i];dn(s,!0);const a=r[i]=r[z].createComment("");zs(o,r,a,s),Ye(a,r),Es(s)&&($u(o,r,s),cg(o,s,r)),null!=n&&Wu(r,s)}function bi(){let t=Pe();const e=ee();Gl()?$l():(t=t.parent,dn(t,!1)),e.firstCreatePass&&(Ts(e,t),Fl(t)&&e.queries.elementEnd(t))}function pt(){return b()}function ra(t){return!!t&&"function"==typeof t.then}const hc=function(t){return!!t&&"function"==typeof t.subscribe};function x(t,e,n,r){const o=b(),i=ee(),s=Pe();return function(t,e,n,r,o,i,s,a){const l=Es(r),c=t.firstCreatePass&&Mg(t),d=e[8],f=wg(e);let h=!0;if(3&r.type||a){const g=xt(r,e),D=a?a(g):g,C=f.length,T=a?N=>a(Te(N[r.index])):r.index;if(Ee(n)){let N=null;if(!a&&l&&(N=function(t,e,n,r){const o=t.cleanup;if(null!=o)for(let i=0;i<o.length-1;i+=2){const s=o[i];if(s===n&&o[i+1]===r){const a=e[7],l=o[i+2];return a.length>l?a[l]:null}"string"==typeof s&&(i+=2)}return null}(t,e,o,r.index)),null!==N)(N.__ngLastListenerFn__||N).__ngNextListenerFn__=i,N.__ngLastListenerFn__=i,h=!1;else{i=pc(r,e,d,i,!1);const Y=n.listen(D,o,i);f.push(i,Y),c&&c.push(o,T,C,C+1)}}else i=pc(r,e,d,i,!0),D.addEventListener(o,i,s),f.push(i),c&&c.push(o,T,C,s)}else i=pc(r,e,d,i,!1);const p=r.outputs;let y;if(h&&null!==p&&(y=p[o])){const g=y.length;if(g)for(let D=0;D<g;D+=2){const ke=e[y[D]][y[D+1]].subscribe(i),Gt=f.length;f.push(i,ke),c&&c.push(o,r.index,Gt,-(Gt+1))}}}(i,o,o[z],s,t,e,!!n,r),x}function Em(t,e,n,r){try{return!1!==n(r)}catch(o){return Tg(t,o),!1}}function pc(t,e,n,r,o){return function i(s){if(s===Function)return r;const a=2&t.flags?bt(t.index,e):e;0==(32&e[2])&&Qu(a);let l=Em(e,0,r,s),u=i.__ngNextListenerFn__;for(;u;)l=Em(e,0,u,s)&&l,u=u.__ngNextListenerFn__;return o&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function Z(t=1){return function(t){return(H.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,H.lFrame.contextLView))[8]}(t)}function gt(t,e,n){return qn(t,"",e,"",n),gt}function qn(t,e,n,r,o){const i=b(),s=ao(i,e,n,r);return s!==W&&St(ee(),be(),i,t,s,i[z],o,!1),qn}function Am(t,e,n,r,o){const i=t[n+1],s=null===e;let a=r?Qt(i):In(i),l=!1;for(;0!==a&&(!1===l||s);){const c=t[a+1];bS(t[a],e)&&(l=!0,t[a+1]=r?Ru(c):Nu(c)),a=r?Qt(c):In(c)}l&&(t[n+1]=r?Nu(i):Ru(i))}function bS(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&qr(t,e)>=0}const xe={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Pm(t){return t.substring(xe.key,xe.keyEnd)}function Nm(t,e){const n=xe.textEnd;return n===e?-1:(e=xe.keyEnd=function(t,e,n){for(;e<n&&t.charCodeAt(e)>32;)e++;return e}(t,xe.key=e,n),_o(t,e,n))}function _o(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function gc(t,e,n){return Jt(t,e,n,!1),gc}function Cn(t,e){return Jt(t,e,null,!0),Cn}function En(t,e){for(let n=function(t){return function(t){xe.key=0,xe.keyEnd=0,xe.value=0,xe.valueEnd=0,xe.textEnd=t.length}(t),Nm(t,_o(t,0,xe.textEnd))}(e);n>=0;n=Nm(e,n))vt(t,Pm(e),!0)}function Jt(t,e,n,r){const o=b(),i=ee(),s=On(2);i.firstUpdatePass&&Vm(i,t,s,r),e!==W&&Je(o,s,e)&&Hm(i,i.data[ot()],o,o[z],t,o[s+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=Q(wt(t)))),t}(e,n),r,s)}function Lm(t,e){return e>=t.expandoStartIndex}function Vm(t,e,n,r){const o=t.data;if(null===o[n+1]){const i=o[ot()],s=Lm(t,n);Um(i,r)&&null===e&&!s&&(e=!1),e=function(t,e,n,r){const o=function(t){const e=H.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let i=r?e.residualClasses:e.residualStyles;if(null===o)0===(r?e.classBindings:e.styleBindings)&&(n=vi(n=mc(null,t,e,n,r),e.attrs,r),i=null);else{const s=e.directiveStylingLast;if(-1===s||t[s]!==o)if(n=mc(o,t,e,n,r),null===i){let l=function(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==In(r))return t[Qt(r)]}(t,e,r);void 0!==l&&Array.isArray(l)&&(l=mc(null,t,e,l[1],r),l=vi(l,e.attrs,r),function(t,e,n,r){t[Qt(n?e.classBindings:e.styleBindings)]=r}(t,e,r,l))}else i=function(t,e,n){let r;const o=e.directiveEnd;for(let i=1+e.directiveStylingLast;i<o;i++)r=vi(r,t[i].hostAttrs,n);return vi(r,e.attrs,n)}(t,e,r)}return void 0!==i&&(r?e.residualClasses=i:e.residualStyles=i),n}(o,i,e,r),function(t,e,n,r,o,i){let s=i?e.classBindings:e.styleBindings,a=Qt(s),l=In(s);t[r]=n;let c,u=!1;if(Array.isArray(n)){const d=n;c=d[1],(null===c||qr(d,c)>0)&&(u=!0)}else c=n;if(o)if(0!==l){const f=Qt(t[a+1]);t[r+1]=Ks(f,a),0!==f&&(t[f+1]=xu(t[f+1],r)),t[a+1]=function(t,e){return 131071&t|e<<17}(t[a+1],r)}else t[r+1]=Ks(a,0),0!==a&&(t[a+1]=xu(t[a+1],r)),a=r;else t[r+1]=Ks(l,0),0===a?a=r:t[l+1]=xu(t[l+1],r),l=r;u&&(t[r+1]=Nu(t[r+1])),Am(t,c,r,!0),Am(t,c,r,!1),function(t,e,n,r,o){const i=o?t.residualClasses:t.residualStyles;null!=i&&"string"==typeof e&&qr(i,e)>=0&&(n[r+1]=Ru(n[r+1]))}(e,c,t,r,i),s=Ks(a,l),i?e.classBindings=s:e.styleBindings=s}(o,i,e,n,s,r)}}function mc(t,e,n,r,o){let i=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<s&&(i=e[a],r=vi(r,i.hostAttrs,o),i!==t);)a++;return null!==t&&(n.directiveStylingLast=a),r}function vi(t,e,n){const r=n?1:2;let o=-1;if(null!==e)for(let i=0;i<e.length;i++){const s=e[i];"number"==typeof s?o=s:o===r&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),vt(t,s,!!n||e[++i]))}return void 0===t?null:t}function Hm(t,e,n,r,o,i,s,a){if(!(3&e.type))return;const l=t.data,u=l[a+1];oa(function(t){return 1==(1&t)}(u)?jm(l,e,n,o,In(u),s):void 0)||(oa(i)||function(t){return 2==(2&t)}(u)&&(i=jm(l,null,n,o,a,s)),function(t,e,n,r,o){const i=Ee(t);if(e)o?i?t.addClass(n,r):n.classList.add(r):i?t.removeClass(n,r):n.classList.remove(r);else{let s=-1===r.indexOf("-")?void 0:Mt.DashCase;if(null==o)i?t.removeStyle(n,r,s):n.style.removeProperty(r);else{const a="string"==typeof o&&o.endsWith("!important");a&&(o=o.slice(0,-10),s|=Mt.Important),i?t.setStyle(n,r,o,s):n.style.setProperty(r,o,a?"important":"")}}}(r,s,bs(ot(),n),o,i))}function jm(t,e,n,r,o,i){const s=null===e;let a;for(;o>0;){const l=t[o],u=Array.isArray(l),c=u?l[1]:l,d=null===c;let f=n[o+1];f===W&&(f=d?ie:void 0);let h=d?ou(f,r):c===r?f:void 0;if(u&&!oa(h)&&(h=ou(l,r)),oa(h)&&(a=h,s))return a;const p=t[o+1];o=s?Qt(p):In(p)}if(null!==e){let l=i?e.residualClasses:e.residualStyles;null!=l&&(a=ou(l,r))}return a}function oa(t){return void 0!==t}function Um(t,e){return 0!=(t.flags&(e?16:32))}function S(t,e=""){const n=b(),r=ee(),o=t+20,i=r.firstCreatePass?eo(r,o,1,e,null):r.data[o],s=n[o]=function(t,e){return Ee(t)?t.createText(e):t.createTextNode(e)}(n[z],e);zs(r,n,s,i),dn(i,!1)}function k(t){return Cr("",t,""),k}function Cr(t,e,n){const r=b(),o=ao(r,t,e,n);return o!==W&&An(r,ot(),o),Cr}function yo(t,e,n,r,o){const i=b(),s=lo(i,t,e,n,r,o);return s!==W&&An(i,ot(),s),yo}function _c(t,e,n){!function(t,e,n,r){const o=ee(),i=On(2);o.firstUpdatePass&&Vm(o,null,i,r);const s=b();if(n!==W&&Je(s,i,n)){const a=o.data[ot()];if(Um(a,r)&&!Lm(o,i)){let l=r?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(n=Tl(l,n||"")),fc(o,a,s,n,r)}else!function(t,e,n,r,o,i,s,a){o===W&&(o=ie);let l=0,u=0,c=0<o.length?o[0]:null,d=0<i.length?i[0]:null;for(;null!==c||null!==d;){const f=l<o.length?o[l+1]:void 0,h=u<i.length?i[u+1]:void 0;let y,p=null;c===d?(l+=2,u+=2,f!==h&&(p=d,y=h)):null===d||null!==c&&c<d?(l+=2,p=c):(u+=2,p=d,y=h),null!==p&&Hm(t,e,n,r,p,y,s,a),c=l<o.length?o[l]:null,d=u<i.length?i[u]:null}}(o,a,s,s[z],s[i+1],s[i+1]=function(t,e,n){if(null==n||""===n)return ie;const r=[],o=wt(n);if(Array.isArray(o))for(let i=0;i<o.length;i++)t(r,o[i],!0);else if("object"==typeof o)for(const i in o)o.hasOwnProperty(i)&&t(r,i,o[i]);else"string"==typeof o&&e(r,o);return r}(t,e,n),r,i)}}(vt,En,ao(b(),t,e,n),!0)}const Dr=void 0;var nT=["en",[["a","p"],["AM","PM"],Dr],[["AM","PM"],Dr,Dr],[["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"]],Dr,[["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"]],Dr,[["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}",Dr,"{1} 'at' {0}",Dr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){const n=Math.floor(Math.abs(t)),r=t.toString().replace(/^[^.]*\.?/,"").length;return 1===n&&0===r?1:5}];let Co={};function l_(t){return t in Co||(Co[t]=ne.ng&&ne.ng.common&&ne.ng.common.locales&&ne.ng.common.locales[t]),Co[t]}var M=(()=>((M=M||{})[M.LocaleId=0]="LocaleId",M[M.DayPeriodsFormat=1]="DayPeriodsFormat",M[M.DayPeriodsStandalone=2]="DayPeriodsStandalone",M[M.DaysFormat=3]="DaysFormat",M[M.DaysStandalone=4]="DaysStandalone",M[M.MonthsFormat=5]="MonthsFormat",M[M.MonthsStandalone=6]="MonthsStandalone",M[M.Eras=7]="Eras",M[M.FirstDayOfWeek=8]="FirstDayOfWeek",M[M.WeekendRange=9]="WeekendRange",M[M.DateFormat=10]="DateFormat",M[M.TimeFormat=11]="TimeFormat",M[M.DateTimeFormat=12]="DateTimeFormat",M[M.NumberSymbols=13]="NumberSymbols",M[M.NumberFormats=14]="NumberFormats",M[M.CurrencyCode=15]="CurrencyCode",M[M.CurrencySymbol=16]="CurrencySymbol",M[M.CurrencyName=17]="CurrencyName",M[M.Currencies=18]="Currencies",M[M.Directionality=19]="Directionality",M[M.PluralCase=20]="PluralCase",M[M.ExtraData=21]="ExtraData",M))();const ia="en-US";let u_=ia;function Dc(t,e,n,r,o){if(t=P(t),Array.isArray(t))for(let i=0;i<t.length;i++)Dc(t[i],e,n,r,o);else{const i=ee(),s=b();let a=oo(t)?t:P(t.provide),l=Ng(t);const u=Pe(),c=1048575&u.providerIndexes,d=u.directiveStart,f=u.providerIndexes>>20;if(oo(t)||!t.multi){const h=new qo(l,o,v),p=bc(a,e,o?c:c+f,d);-1===p?(Rs(Qo(u,s),i,a),Ec(i,t,e.length),e.push(a),u.directiveStart++,u.directiveEnd++,o&&(u.providerIndexes+=1048576),n.push(h),s.push(h)):(n[p]=h,s[p]=h)}else{const h=bc(a,e,c+f,d),p=bc(a,e,c,c+f),y=h>=0&&n[h],g=p>=0&&n[p];if(o&&!g||!o&&!y){Rs(Qo(u,s),i,a);const D=function(t,e,n,r,o){const i=new qo(t,n,v);return i.multi=[],i.index=e,i.componentProviders=0,x_(i,o,r&&!n),i}(o?eO:XT,n.length,o,r,l);!o&&g&&(n[p].providerFactory=D),Ec(i,t,e.length,0),e.push(a),u.directiveStart++,u.directiveEnd++,o&&(u.providerIndexes+=1048576),n.push(D),s.push(D)}else Ec(i,t,h>-1?h:p,x_(n[o?p:h],l,!o&&r));!o&&r&&g&&n[p].componentProviders++}}}function Ec(t,e,n,r){const o=oo(e);if(o||function(t){return!!t.useClass}(e)){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const a=t.destroyHooks||(t.destroyHooks=[]);if(!o&&e.multi){const l=a.indexOf(n);-1===l?a.push(n,[r,s]):a[l+1].push(r,s)}else a.push(n,s)}}}function x_(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function bc(t,e,n,r){for(let o=n;o<r;o++)if(e[o]===t)return o;return-1}function XT(t,e,n,r){return vc(this.multi,[])}function eO(t,e,n,r){const o=this.multi;let i;if(this.providerFactory){const s=this.providerFactory.componentProviders,a=Yo(n,n[1],this.providerFactory.index,r);i=a.slice(0,s),vc(o,i);for(let l=s;l<a.length;l++)i.push(a[l])}else i=[],vc(o,i);return i}function vc(t,e){for(let n=0;n<t.length;n++)e.push((0,t[n])());return e}function me(t,e=[]){return n=>{n.providersResolver=(r,o)=>function(t,e,n){const r=ee();if(r.firstCreatePass){const o=qt(t);Dc(n,r.data,r.blueprint,o,!0),Dc(e,r.data,r.blueprint,o,!1)}}(r,o?o(t):t,e)}}class R_{}const k_="ngComponent";class rO{resolveComponentFactory(e){throw function(t){const e=Error(`No component factory found for ${Q(t)}. Did you add it to @NgModule.entryComponents?`);return e[k_]=t,e}(e)}}let Eo=(()=>{class t{}return t.NULL=new rO,t})();function ca(...t){}function bo(t,e){return new Re(xt(t,e))}const sO=function(){return bo(Pe(),b())};let Re=(()=>{class t{constructor(n){this.nativeElement=n}}return t.__NG_ELEMENT_ID__=sO,t})();class da{}let Er=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>lO(),t})();const lO=function(){const t=b(),n=bt(Pe().index,t);return function(t){return t[z]}(cn(n)?n:t)};let Mc=(()=>{class t{}return t.\u0275prov=B({token:t,providedIn:"root",factory:()=>null}),t})();class fa{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const V_=new fa("13.0.1"),vo={};function ha(t,e,n,r,o=!1){for(;null!==n;){const i=e[n.index];if(null!==i&&r.push(Te(i)),zt(i))for(let a=10;a<i.length;a++){const l=i[a],u=l[1].firstChild;null!==u&&ha(l[1],l,u,r)}const s=n.type;if(8&s)ha(t,e,n.child,r);else if(32&s){const a=Eu(n,e);let l;for(;l=a();)r.push(l)}else if(16&s){const a=Up(e,n);if(Array.isArray(a))r.push(...a);else{const l=di(e[16]);ha(l[1],l,a,r,!0)}}n=o?n.projectionNext:n.next}return r}class Oi{constructor(e,n){this._lView=e,this._cdRefInjectingView=n,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,n=e[1];return ha(n,e,n.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(zt(e)){const n=e[8],r=n?n.indexOf(this):-1;r>-1&&(Su(e,r),fr(n,r))}this._attachedToViewContainer=!1}xp(this._lView[1],this._lView)}onDestroy(e){!function(t,e,n,r){const o=wg(e);null===n?o.push(r):(o.push(n),t.firstCreatePass&&Mg(t).push(r,o.length-1))}(this._lView[1],this._lView,null,e)}markForCheck(){Qu(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Ju(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){ws(!0);try{Ju(t,e,n)}finally{ws(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function(t,e){fi(t,e,e[z],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class dO extends Oi{constructor(e){super(e),this._view=e}detectChanges(){vg(this._view)}checkNoChanges(){!function(t){ws(!0);try{vg(t)}finally{ws(!1)}}(this._view)}get context(){return null}}class B_ extends Eo{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=qe(e);return new Sc(n,this.ngModule)}}function H_(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const hO=new q("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>vp});class Sc extends R_{constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function(t){return t.map(y0).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}get inputs(){return H_(this.componentDef.inputs)}get outputs(){return H_(this.componentDef.outputs)}create(e,n,r,o){const i=(o=o||this.ngModule)?function(t,e){return{get:(n,r,o)=>{const i=t.get(n,vo,o);return i!==vo||r===vo?i:e.get(n,r,o)}}}(e,o.injector):e,s=i.get(da,Ch),a=i.get(Mc,null),l=s.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",c=r?function(t,e,n){if(Ee(t))return t.selectRootElement(e,n===Dt.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(l,r,this.componentDef.encapsulation):Mu(s.createRenderer(null,this.componentDef),u,function(t){const e=t.toLowerCase();return"svg"===e?_h:"math"===e?"http://www.w3.org/1998/MathML/":null}(u)),d=this.componentDef.onPush?576:528,f=function(t,e){return{components:[],scheduler:t||vp,clean:iM,playerHandler:e||null,flags:0}}(),h=Js(0,null,null,1,0,null,null,null,null,null),p=hi(null,h,f,d,null,null,s,l,a,i);let y,g;Ms(p);try{const D=function(t,e,n,r,o,i){const s=n[1];n[20]=t;const l=eo(s,20,2,"#host",null),u=l.mergedAttrs=e.hostAttrs;null!==u&&(Xs(l,u,!0),null!==t&&(As(o,t,u),null!==l.classes&&Pu(o,t,l.classes),null!==l.styles&&Wp(o,t,l.styles)));const c=r.createRenderer(t,e),d=hi(n,dg(e),null,e.onPush?64:16,n[20],l,r,c,i||null,null);return s.firstCreatePass&&(Rs(Qo(l,n),s,e.type),Cg(s,l),Dg(l,n.length,1)),Zs(n,d),n[20]=d}(c,this.componentDef,p,s,l);if(c)if(r)As(l,c,["ng-version",V_.full]);else{const{attrs:C,classes:T}=function(t){const e=[],n=[];let r=1,o=2;for(;r<t.length;){let i=t[r];if("string"==typeof i)2===o?""!==i&&e.push(i,t[++r]):8===o&&n.push(i);else{if(!Kt(o))break;o=i}r++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);C&&As(l,c,C),T&&T.length>0&&Pu(l,c,T.join(" "))}if(g=Hl(h,20),void 0!==n){const C=g.projection=[];for(let T=0;T<this.ngContentSelectors.length;T++){const N=n[T];C.push(null!=N?Array.from(N):null)}}y=function(t,e,n,r,o){const i=n[1],s=function(t,e,n){const r=Pe();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Eg(t,r,e,to(t,e,1,null),n));const o=Yo(e,t,r.directiveStart,r);Ye(o,e);const i=xt(r,e);return i&&Ye(i,e),o}(i,n,e);if(r.components.push(s),t[8]=s,o&&o.forEach(l=>l(s,e)),e.contentQueries){const l=Pe();e.contentQueries(1,s,l.directiveStart)}const a=Pe();return!i.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(Un(a.index),_g(n[1],a,0,a.directiveStart,a.directiveEnd,e),yg(e,s)),s}(D,this.componentDef,p,f,[PM]),pi(h,p,null)}finally{Ss()}return new mO(this.componentType,y,bo(g,p),p,g)}}class mO extends class{}{constructor(e,n,r,o,i){super(),this.location=r,this._rootLView=o,this._tNode=i,this.instance=n,this.hostView=this.changeDetectorRef=new dO(o),this.componentType=e}get injector(){return new Gr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class br{}const wo=new Map;class U_ extends br{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new B_(this);const r=At(e);this._bootstrapComponents=mn(r.bootstrap),this._r3Injector=Pg(e,n,[{provide:br,useValue:this},{provide:Eo,useValue:this.componentFactoryResolver}],Q(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,n=le.THROW_IF_NOT_FOUND,r=F.Default){return e===le||e===br||e===gi?this:this._r3Injector.get(e,n,r)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class Oc extends class{}{constructor(e){super(),this.moduleType=e,null!==At(e)&&function(t){const e=new Set;!function n(r){const o=At(r,!0),i=o.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${Q(e)} vs ${Q(e.name)}`)}(i,wo.get(i),r),wo.set(i,r));const s=mn(o.imports);for(const a of s)e.has(a)||(e.add(a),n(a))}(t)}(e)}create(e){return new U_(this.moduleType,e)}}function Ii(t,e){const n=t[e];return n===W?void 0:n}function O(t,e){const n=ee();let r;const o=t+20;n.firstCreatePass?(r=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(t===r.name)return r}throw new ir("302",`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(o,r.onDestroy)):r=n.data[o];const i=r.factory||(r.factory=cr(r.type)),s=Vn(v);try{const a=Ns(!1),l=i();return Ns(a),function(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}(n,b(),o,l),l}finally{Vn(s)}}function A(t,e,n){const r=t+20,o=b(),i=Vr(o,r);return Ai(o,r)?function(t,e,n,r,o,i){const s=e+n;return Je(t,s,o)?yn(t,s+1,i?r.call(i,o):r(o)):Ii(t,s+1)}(o,rt(),e,i.transform,n,i):i.transform(n)}function K_(t,e,n,r){const o=t+20,i=b(),s=Vr(i,o);return Ai(i,o)?function(t,e,n,r,o,i,s){const a=e+n;return yr(t,a,o,i)?yn(t,a+2,s?r.call(s,o,i):r(o,i)):Ii(t,a+2)}(i,rt(),e,s.transform,n,r,s):s.transform(n,r)}function Ai(t,e){return t[1].data[e].pure}function Ic(t){return e=>{setTimeout(t,void 0,e)}}const se=class extends Ho{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,r){var l,u,c;let o=e,i=n||(()=>null),s=r;if(e&&"object"==typeof e){const d=e;o=null==(l=d.next)?void 0:l.bind(d),i=null==(u=d.error)?void 0:u.bind(d),s=null==(c=d.complete)?void 0:c.bind(d)}this.__isAsync&&(i=Ic(i),o&&(o=Ic(o)),s&&(s=Ic(s)));const a=super.subscribe({next:o,error:i,complete:s});return e instanceof _e&&e.add(a),a}};Symbol;const LO=function(){return function(t,e){return 4&t.type?new BO(e,t,bo(t,e)):null}(Pe(),b())};let Nn=(()=>{class t{}return t.__NG_ELEMENT_ID__=LO,t})();const VO=Nn,BO=class extends VO{constructor(e,n,r){super(),this._declarationLView=e,this._declarationTContainer=n,this.elementRef=r}createEmbeddedView(e){const n=this._declarationTContainer.tViews,r=hi(this._declarationLView,n,e,16,null,n.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const i=this._declarationLView[19];return null!==i&&(r[19]=i.createEmbeddedView(n)),pi(n,r,e),new Oi(r)}};const UO=function(){return function(t,e){let n;const r=e[t.index];if(zt(r))n=r;else{let o;if(8&t.type)o=Te(r);else{const i=e[z];o=i.createComment("");const s=xt(t,e);_r(i,Ws(i,s),o,function(t,e){return Ee(t)?t.nextSibling(e):e.nextSibling}(i,s),!1)}e[t.index]=n=bg(r,e,o,t),Zs(e,n)}return new Q_(n,t,e)}(Pe(),b())};let bn=(()=>{class t{}return t.__NG_ELEMENT_ID__=UO,t})();const $O=bn,Q_=class extends $O{constructor(e,n,r){super(),this._lContainer=e,this._hostTNode=n,this._hostLView=r}get element(){return bo(this._hostTNode,this._hostLView)}get injector(){return new Gr(this._hostTNode,this._hostLView)}get parentInjector(){const e=xs(this._hostTNode,this._hostLView);if(Fh(e)){const n=Ur(e,this._hostLView),r=jr(e);return new Gr(n[1].data[r+8],n)}return new Gr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const n=Y_(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,n,r){const o=e.createEmbeddedView(n||{});return this.insert(o,r),o}createComponent(e,n,r,o,i){const s=e&&!function(t){return"function"==typeof t}(e);let a;if(s)a=n;else{const d=n||{};a=d.index,r=d.injector,o=d.projectableNodes,i=d.ngModuleRef}const l=s?e:new Sc(qe(e)),u=r||this.parentInjector;if(!i&&null==l.ngModule&&u){const d=u.get(br,null);d&&(i=d)}const c=l.create(u,o,void 0,i);return this.insert(c.hostView,a),c}insert(e,n){const r=e._lView,o=r[1];if(function(t){return zt(t[3])}(r)){const c=this.indexOf(e);if(-1!==c)this.detach(c);else{const d=r[3],f=new Q_(d,d[6],d[3]);f.detach(f.indexOf(e))}}const i=this._adjustIndex(n),s=this._lContainer;!function(t,e,n,r){const o=10+r,i=n.length;r>0&&(n[o-1][4]=e),r<i-10?(e[4]=n[o],ks(n,10+r,e)):(n.push(e),e[4]=null),e[3]=n;const s=e[17];null!==s&&n!==s&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(s,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(o,r,s,i);const a=Iu(i,s),l=r[z],u=Ws(l,s[7]);return null!==u&&function(t,e,n,r,o,i){r[0]=o,r[6]=e,fi(t,r,n,1,o,i)}(o,s[6],l,r,u,a),e.attachToViewContainerRef(),ks(Ac(s),i,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=Y_(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),r=Su(this._lContainer,n);r&&(fr(Ac(this._lContainer),n),xp(r[1],r))}detach(e){const n=this._adjustIndex(e,-1),r=Su(this._lContainer,n);return r&&null!=fr(Ac(this._lContainer),n)?new Oi(r):null}_adjustIndex(e,n=0){return null==e?this.length+n:e}};function Y_(t){return t[8]}function Ac(t){return t[8]||(t[8]=[])}const ya=new q("Application Initializer");let So=(()=>{class t{constructor(n){this.appInits=n,this.resolve=ca,this.reject=ca,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,o)=>{this.resolve=r,this.reject=o})}runInitializers(){if(this.initialized)return;const n=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let o=0;o<this.appInits.length;o++){const i=this.appInits[o]();if(ra(i))n.push(i);else if(hc(i)){const s=new Promise((a,l)=>{i.subscribe({complete:a,error:l})});n.push(s)}}Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),0===n.length&&r(),this.initialized=!0}}return t.\u0275fac=function(n){return new(n||t)(I(ya,8))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const Ni=new q("AppId"),AI={provide:Ni,useFactory:function(){return`${jc()}${jc()}${jc()}`},deps:[]};function jc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Dy=new q("Platform Initializer"),xi=new q("Platform ID"),PI=new q("appBootstrapListener");let Uc=(()=>{class t{log(n){console.log(n)}warn(n){console.warn(n)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const Kn=new q("LocaleId"),Ey=new q("DefaultCurrencyCode");class xI{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}const Gc=function(t){return new Oc(t)},RI=Gc,FI=function(t){return Promise.resolve(Gc(t))},vy=function(t){const e=Gc(t),r=mn(At(t).declarations).reduce((o,i)=>{const s=qe(i);return s&&o.push(new Sc(s)),o},[]);return new xI(e,r)},kI=vy,LI=function(t){return Promise.resolve(vy(t))};let wy=(()=>{class t{constructor(){this.compileModuleSync=RI,this.compileModuleAsync=FI,this.compileModuleAndAllComponentsSync=kI,this.compileModuleAndAllComponentsAsync=LI}clearCache(){}clearCacheFor(n){}getModuleId(n){}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const HI=(()=>Promise.resolve(0))();function $c(t){"undefined"==typeof Zone?HI.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class ze{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new se(!1),this.onMicrotaskEmpty=new se(!1),this.onStable=new se(!1),this.onError=new se(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!r&&n,o.shouldCoalesceRunChangeDetection=r,o.lastRequestAnimationFrameId=-1,o.nativeRequestAnimationFrame=function(){let t=ne.requestAnimationFrame,e=ne.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ne,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,zc(t),t.isCheckStableRunning=!0,Wc(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),zc(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,o,i,s,a)=>{try{return My(t),n.invokeTask(o,i,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===i.type||t.shouldCoalesceRunChangeDetection)&&e(),Sy(t)}},onInvoke:(n,r,o,i,s,a,l)=>{try{return My(t),n.invoke(o,i,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),Sy(t)}},onHasTask:(n,r,o,i)=>{n.hasTask(o,i),r===o&&("microTask"==i.change?(t._hasPendingMicrotasks=i.microTask,zc(t),Wc(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(n,r,o,i)=>(n.handleError(o,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}(o)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ze.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ze.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,o){const i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,e,UI,ca,ca);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}}const UI={};function Wc(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 zc(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function My(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Sy(t){t._nesting--,Wc(t)}class WI{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new se,this.onMicrotaskEmpty=new se,this.onStable=new se,this.onError=new se}run(e,n,r){return e.apply(n,r)}runGuarded(e,n,r){return e.apply(n,r)}runOutsideAngular(e){return e()}runTask(e,n,r,o){return e.apply(n,r)}}let qc=(()=>{class t{constructor(n){this._ngZone=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),n.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:()=>{ze.assertNotInAngularZone(),$c(()=>{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())$c(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb(this._didWork)}this._didWork=!1});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,o){let i=-1;r&&r>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==i),n(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:n,timeoutId:i,updateCb:o})}whenStable(n,r,o){if(o&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,o),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(n,r,o){return[]}}return t.\u0275fac=function(n){return new(n||t)(I(ze))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),Ty=(()=>{class t{constructor(){this._applications=new Map,Kc.addToWindow(this)}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return Kc.findTestabilityInTree(this,n,r)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class zI{addToWindow(e){}findTestabilityInTree(e,n,r){return null}}let Kc=new zI,Oy=!0,Iy=!1;let Xt;const Py=new q("AllowMultipleToken");function Ny(t,e,n=[]){const r=`Platform: ${e}`,o=new q(r);return(i=[])=>{let s=xy();if(!s||s.injector.get(Py,!1))if(t)t(n.concat(i).concat({provide:o,useValue:!0}));else{const a=n.concat(i).concat({provide:o,useValue:!0},{provide:mi,useValue:"platform"});!function(t){if(Xt&&!Xt.destroyed&&!Xt.injector.get(Py,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Xt=t.get(Ry);const e=t.get(Dy,null);e&&e.forEach(n=>n())}(le.create({providers:a,name:r}))}return function(t){const e=xy();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}(o)}}function xy(){return Xt&&!Xt.destroyed?Xt:null}let Ry=(()=>{class t{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const a=function(t,e){let n;return n="noop"===t?new WI:("zone.js"===t?void 0:t)||new ze({enableLongStackTrace:(Iy=!0,Oy),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),n}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:ze,useValue:a}];return a.run(()=>{const u=le.create({providers:l,parent:this.injector,name:n.moduleType.name}),c=n.create(u),d=c.injector.get(mr,null);if(!d)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:h=>{d.handleError(h)}});c.onDestroy(()=>{Qc(this._modules,c),f.unsubscribe()})}),function(t,e,n){try{const r=n();return ra(r)?r.catch(o=>{throw e.runOutsideAngular(()=>t.handleError(o)),o}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(d,a,()=>{const f=c.injector.get(So);return f.runInitializers(),f.donePromise.then(()=>(function(t){Ct(t,"Expected localeId to be defined"),"string"==typeof t&&(u_=t.toLowerCase().replace(/_/g,"-"))}(c.injector.get(Kn,ia)||ia),this._moduleDoBootstrap(c),c))})})}bootstrapModule(n,r=[]){const o=Fy({},r);return function(t,e,n){const r=new Oc(n);return Promise.resolve(r)}(0,0,n).then(i=>this.bootstrapModuleFactory(i,o))}_moduleDoBootstrap(n){const r=n.injector.get(Ri);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(o=>r.bootstrap(o));else{if(!n.instance.ngDoBootstrap)throw new Error(`The module ${Q(n.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(n){return new(n||t)(I(le))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function Fy(t,e){return Array.isArray(e)?e.reduce(Fy,t):Ge(Ge({},t),e)}let Ri=(()=>{class t{constructor(n,r,o,i,s){this._zone=n,this._injector=r,this._exceptionHandler=o,this._componentFactoryResolver=i,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new De(u=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{u.next(this._stable),u.complete()})}),l=new De(u=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{ze.assertNotInAngularZone(),$c(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,u.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{ze.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{u.next(!1)}))});return()=>{c.unsubscribe(),d.unsubscribe()}});this.isStable=eh(a,l.pipe(t=>th()(function(t,e){return function(r){let o;o="function"==typeof t?t:function(){return t};const i=Object.create(r,bb);return i.source=r,i.subjectFactory=o,i}}(Tb)(t))))}bootstrap(n,r){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 o;o=n instanceof R_?n:this._componentFactoryResolver.resolveComponentFactory(n),this.componentTypes.push(o.componentType);const i=function(t){return t.isBoundToModule}(o)?void 0:this._injector.get(br),a=o.create(le.NULL,[],r||o.selector,i),l=a.location.nativeElement,u=a.injector.get(qc,null),c=u&&a.injector.get(Ty);return u&&c&&c.registerApplication(l,u),a.onDestroy(()=>{this.detachView(a.hostView),Qc(this.components,a),c&&c.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(n))}finally{this._runningTick=!1}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;Qc(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(PI,[]).concat(this._bootstrapListeners).forEach(o=>o(n))}ngOnDestroy(){this._views.slice().forEach(n=>n.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(n){return new(n||t)(I(ze),I(le),I(mr),I(Eo),I(So))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function Qc(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lA=function(t){return function(t,e,n){if(Ds(t)&&!n){const r=bt(t.index,e);return new Oi(r,r)}return 47&t.type?new Oi(e[16],e):null}(Pe(),b(),16==(16&t))};let Ly=(()=>{class t{}return t.__NG_ELEMENT_ID__=lA,t})();class Gy{constructor(){}supports(e){return Ci(e)}create(e){return new EA(e)}}const DA=(t,e)=>e;class EA{constructor(e){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=e||DA}forEachItem(e){let n;for(n=this._itHead;null!==n;n=n._next)e(n)}forEachOperation(e){let n=this._itHead,r=this._removalsHead,o=0,i=null;for(;n||r;){const s=!r||n&&n.currentIndex<Wy(r,o,i)?n:r,a=Wy(s,o,i),l=s.currentIndex;if(s===r)o--,r=r._nextRemoved;else if(n=n._next,null==s.previousIndex)o++;else{i||(i=[]);const u=a-o,c=l-o;if(u!=c){for(let f=0;f<u;f++){const h=f<i.length?i[f]:i[f]=0,p=h+f;c<=p&&p<u&&(i[f]=h+1)}i[s.previousIndex]=c-u}}a!==l&&e(s,a,l)}}forEachPreviousItem(e){let n;for(n=this._previousItHead;null!==n;n=n._nextPrevious)e(n)}forEachAddedItem(e){let n;for(n=this._additionsHead;null!==n;n=n._nextAdded)e(n)}forEachMovedItem(e){let n;for(n=this._movesHead;null!==n;n=n._nextMoved)e(n)}forEachRemovedItem(e){let n;for(n=this._removalsHead;null!==n;n=n._nextRemoved)e(n)}forEachIdentityChange(e){let n;for(n=this._identityChangesHead;null!==n;n=n._nextIdentityChange)e(n)}diff(e){if(null==e&&(e=[]),!Ci(e))throw new Error(`Error trying to diff '${Q(e)}'. Only arrays and iterables are allowed`);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let o,i,s,n=this._itHead,r=!1;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)i=e[a],s=this._trackByFn(a,i),null!==n&&Object.is(n.trackById,s)?(r&&(n=this._verifyReinsertion(n,i,s,a)),Object.is(n.item,i)||this._addIdentityChange(n,i)):(n=this._mismatch(n,i,s,a),r=!0),n=n._next}else o=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[io()]();let r;for(;!(r=n.next()).done;)e(r.value)}}(e,a=>{s=this._trackByFn(o,a),null!==n&&Object.is(n.trackById,s)?(r&&(n=this._verifyReinsertion(n,a,s,o)),Object.is(n.item,a)||this._addIdentityChange(n,a)):(n=this._mismatch(n,a,s,o),r=!0),n=n._next,o++}),this.length=o;return this._truncate(n),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,n,r,o){let i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._reinsertAfter(e,i,o)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,o))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._moveAfter(e,i,o)):e=this._addAfter(new bA(n,r),i,o),e}_verifyReinsertion(e,n,r,o){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==i?e=this._reinsertAfter(i,e._prev,o):e.currentIndex!=o&&(e.currentIndex=o,this._addToMoves(e,o)),e}_truncate(e){for(;null!==e;){const n=e._next;this._addToRemovals(this._unlink(e)),e=n}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(e,n,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const o=e._prevRemoved,i=e._nextRemoved;return null===o?this._removalsHead=i:o._nextRemoved=i,null===i?this._removalsTail=o:i._prevRemoved=o,this._insertAfter(e,n,r),this._addToMoves(e,r),e}_moveAfter(e,n,r){return this._unlink(e),this._insertAfter(e,n,r),this._addToMoves(e,r),e}_addAfter(e,n,r){return this._insertAfter(e,n,r),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,n,r){const o=null===n?this._itHead:n._next;return e._next=o,e._prev=n,null===o?this._itTail=e:o._prev=e,null===n?this._itHead=e:n._next=e,null===this._linkedRecords&&(this._linkedRecords=new $y),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const n=e._prev,r=e._next;return null===n?this._itHead=r:n._next=r,null===r?this._itTail=n:r._prev=n,e}_addToMoves(e,n){return e.previousIndex===n||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new $y),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,n){return e.item=n,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class bA{constructor(e,n){this.item=e,this.trackById=n,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 vA{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,n){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===n||n<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const n=e._prevDup,r=e._nextDup;return null===n?this._head=r:n._nextDup=r,null===r?this._tail=n:r._prevDup=n,null===this._head}}class $y{constructor(){this.map=new Map}put(e){const n=e.trackById;let r=this.map.get(n);r||(r=new vA,this.map.set(n,r)),r.add(e)}get(e,n){const o=this.map.get(e);return o?o.get(e,n):null}remove(e){const n=e.trackById;return this.map.get(n).remove(e)&&this.map.delete(n),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Wy(t,e,n){const r=t.previousIndex;if(null===r)return r;let o=0;return n&&r<n.length&&(o=n[r]),r+e+o}class zy{constructor(){}supports(e){return e instanceof Map||ac(e)}create(){return new wA}}class wA{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(e){let n;for(n=this._mapHead;null!==n;n=n._next)e(n)}forEachPreviousItem(e){let n;for(n=this._previousMapHead;null!==n;n=n._nextPrevious)e(n)}forEachChangedItem(e){let n;for(n=this._changesHead;null!==n;n=n._nextChanged)e(n)}forEachAddedItem(e){let n;for(n=this._additionsHead;null!==n;n=n._nextAdded)e(n)}forEachRemovedItem(e){let n;for(n=this._removalsHead;null!==n;n=n._nextRemoved)e(n)}diff(e){if(e){if(!(e instanceof Map||ac(e)))throw new Error(`Error trying to diff '${Q(e)}'. Only maps and objects are allowed`)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(e,(r,o)=>{if(n&&n.key===o)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{const i=this._getOrCreateRecordForKey(o,r);n=this._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){const r=e._prev;return n._next=e,n._prev=r,e._prev=n,r&&(r._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){const o=this._records.get(e);this._maybeAddToChanges(o,n);const i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}const r=new MA(e);return this._records.set(e,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(r=>n(e[r],r))}}class MA{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function qy(){return new Fi([new Gy])}let Fi=(()=>{class t{constructor(n){this.factories=n}static create(n,r){if(null!=r){const o=r.factories.slice();n=n.concat(o)}return new t(n)}static extend(n){return{provide:t,useFactory:r=>t.create(n,r||qy()),deps:[[t,new pr,new hn]]}}find(n){const r=this.factories.find(o=>o.supports(n));if(null!=r)return r;throw new Error(`Cannot find a differ supporting object '${n}' of type '${function(t){return t.name||typeof t}(n)}'`)}}return t.\u0275prov=B({token:t,providedIn:"root",factory:qy}),t})();function Ky(){return new To([new zy])}let To=(()=>{class t{constructor(n){this.factories=n}static create(n,r){if(r){const o=r.factories.slice();n=n.concat(o)}return new t(n)}static extend(n){return{provide:t,useFactory:r=>t.create(n,r||Ky()),deps:[[t,new pr,new hn]]}}find(n){const r=this.factories.find(o=>o.supports(n));if(r)return r;throw new Error(`Cannot find a differ supporting object '${n}'`)}}return t.\u0275prov=B({token:t,providedIn:"root",factory:Ky}),t})();const TA=[new zy],IA=new Fi([new Gy]),AA=new To(TA),PA=Ny(null,"core",[{provide:xi,useValue:"unknown"},{provide:Ry,deps:[le]},{provide:Ty,deps:[]},{provide:Uc,deps:[]}]),kA=[{provide:Ri,useClass:Ri,deps:[ze,le,mr,Eo,So]},{provide:hO,deps:[ze],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(n){e.push(n)}}},{provide:So,useClass:So,deps:[[new hn,ya]]},{provide:wy,useClass:wy,deps:[]},AI,{provide:Fi,useFactory:function(){return IA},deps:[]},{provide:To,useFactory:function(){return AA},deps:[]},{provide:Kn,useFactory:function(t){return t||"undefined"!=typeof $localize&&$localize.locale||ia},deps:[[new oi(Kn),new hn,new pr]]},{provide:Ey,useValue:"USD"}];let VA=(()=>{class t{constructor(n){}}return t.\u0275fac=function(n){return new(n||t)(I(Ri))},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:kA}),t})(),Na=null;function Jn(){return Na}const Ue=new q("DocumentToken");var Oe=(()=>((Oe=Oe||{})[Oe.Zero=0]="Zero",Oe[Oe.One=1]="One",Oe[Oe.Two=2]="Two",Oe[Oe.Few=3]="Few",Oe[Oe.Many=4]="Many",Oe[Oe.Other=5]="Other",Oe))();const HP=function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=l_(e);if(n)return n;const r=e.split("-")[0];if(n=l_(r),n)return n;if("en"===r)return nT;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[M.PluralCase]};class Ua{}let gN=(()=>{class t extends Ua{constructor(n){super(),this.locale=n}getPluralCategory(n,r){switch(HP(r||this.locale)(n)){case Oe.Zero:return"zero";case Oe.One:return"one";case Oe.Two:return"two";case Oe.Few:return"few";case Oe.Many:return"many";default:return"other"}}}return t.\u0275fac=function(n){return new(n||t)(I(Kn))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function UC(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const r=n.indexOf("="),[o,i]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()===e)return decodeURIComponent(i)}return null}class yN{constructor(e,n,r,o){this.$implicit=e,this.ngForOf=n,this.index=r,this.count=o}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 Qi=(()=>{class t{constructor(n,r,o){this._viewContainer=n,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(n){n&&(this._template=n)}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(r){throw new Error(`Cannot find a differ supporting object '${n}' of type '${function(t){return t.name||typeof t}(n)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){const r=[];n.forEachOperation((o,i,s)=>{if(null==o.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new yN(null,this._ngForOf,-1,-1),null===s?void 0:s),l=new GC(o,a);r.push(l)}else if(null==s)this._viewContainer.remove(null===i?void 0:i);else if(null!==i){const a=this._viewContainer.get(i);this._viewContainer.move(a,s);const l=new GC(o,a);r.push(l)}});for(let o=0;o<r.length;o++)this._perViewChange(r[o].view,r[o].record);for(let o=0,i=this._viewContainer.length;o<i;o++){const s=this._viewContainer.get(o);s.context.index=o,s.context.count=i,s.context.ngForOf=this._ngForOf}n.forEachIdentityChange(o=>{this._viewContainer.get(o.currentIndex).context.$implicit=o.item})}_perViewChange(n,r){n.context.$implicit=r.item}static ngTemplateContextGuard(n,r){return!0}}return t.\u0275fac=function(n){return new(n||t)(v(bn),v(Nn),v(Fi))},t.\u0275dir=V({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class GC{constructor(e,n){this.record=e,this.view=n}}let Ga=(()=>{class t{constructor(n,r){this._viewContainer=n,this._context=new DN,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){$C("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){$C("ngIfElse",n),this._elseTemplateRef=n,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(n,r){return!0}}return t.\u0275fac=function(n){return new(n||t)(v(bn),v(Nn))},t.\u0275dir=V({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class DN{constructor(){this.$implicit=null,this.ngIf=null}}function $C(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Q(e)}'.`)}let qC=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:[{provide:Ua,useClass:gN}]}),t})();const KC="browser";class YC{}class Fd extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function(t){Na||(Na=t)}(new Fd)}onAndCancel(e,n,r){return e.addEventListener(n,r,!1),()=>{e.removeEventListener(n,r,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=(Yi=Yi||document.querySelector("base"),Yi?Yi.getAttribute("href"):null);return null==n?null:function(t){$a=$a||document.createElement("a"),$a.setAttribute("href",t);const e=$a.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){Yi=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return UC(document.cookie,e)}}let $a,Yi=null;const JC=new q("TRANSITION_ID"),nx=[{provide:ya,useFactory:function(t,e,n){return()=>{n.get(So).donePromise.then(()=>{const r=Jn(),o=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let i=0;i<o.length;i++)r.remove(o[i])})}},deps:[JC,Ue,le],multi:!0}];class kd{static init(){!function(t){Kc=t}(new kd)}addToWindow(e){ne.getAngularTestability=(r,o=!0)=>{const i=e.findTestabilityInTree(r,o);if(null==i)throw new Error("Could not find testability for element.");return i},ne.getAllAngularTestabilities=()=>e.getAllTestabilities(),ne.getAllAngularRootElements=()=>e.getAllRootElements(),ne.frameworkStabilizers||(ne.frameworkStabilizers=[]),ne.frameworkStabilizers.push(r=>{const o=ne.getAllAngularTestabilities();let i=o.length,s=!1;const a=function(l){s=s||l,i--,0==i&&r(s)};o.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,n,r){if(null==n)return null;const o=e.getTestability(n);return null!=o?o:r?Jn().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null}}let rx=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const Ji=new q("EventManagerPlugins");let za=(()=>{class t{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>o.manager=this),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}addGlobalEventListener(n,r,o){return this._findPluginFor(r).addGlobalEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){const r=this._eventNameToPlugin.get(n);if(r)return r;const o=this._plugins;for(let i=0;i<o.length;i++){const s=o[i];if(s.supports(n))return this._eventNameToPlugin.set(n,s),s}throw new Error(`No event manager plugin found for event ${n}`)}}return t.\u0275fac=function(n){return new(n||t)(I(Ji),I(ze))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class Ld{constructor(e){this._doc=e}addGlobalEventListener(e,n,r){const o=Jn().getGlobalEventTarget(this._doc,e);if(!o)throw new Error(`Unsupported event target ${o} for event ${n}`);return this.addEventListener(o,n,r)}}let XC=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(n){const r=new Set;n.forEach(o=>{this._stylesSet.has(o)||(this._stylesSet.add(o),r.add(o))}),this.onStylesAdded(r)}onStylesAdded(n){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),Zi=(()=>{class t extends XC{constructor(n){super(),this._doc=n,this._hostNodes=new Map,this._hostNodes.set(n.head,[])}_addStylesToHost(n,r,o){n.forEach(i=>{const s=this._doc.createElement("style");s.textContent=i,o.push(r.appendChild(s))})}addHost(n){const r=[];this._addStylesToHost(this._stylesSet,n,r),this._hostNodes.set(n,r)}removeHost(n){const r=this._hostNodes.get(n);r&&r.forEach(eD),this._hostNodes.delete(n)}onStylesAdded(n){this._hostNodes.forEach((r,o)=>{this._addStylesToHost(n,o,r)})}ngOnDestroy(){this._hostNodes.forEach(n=>n.forEach(eD))}}return t.\u0275fac=function(n){return new(n||t)(I(Ue))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function eD(t){Jn().remove(t)}const Vd={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/"},Bd=/%COMP%/g;function qa(t,e,n){for(let r=0;r<e.length;r++){let o=e[r];Array.isArray(o)?qa(t,o,n):(o=o.replace(Bd,t),n.push(o))}return n}function rD(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Hd=(()=>{class t{constructor(n,r,o){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.rendererByCompId=new Map,this.defaultRenderer=new jd(n)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;switch(r.encapsulation){case Dt.Emulated:{let o=this.rendererByCompId.get(r.id);return o||(o=new yx(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,o)),o.applyToHost(n),o}case 1:case Dt.ShadowDom:return new Cx(this.eventManager,this.sharedStylesHost,n,r);default:if(!this.rendererByCompId.has(r.id)){const o=qa(r.id,r.styles,[]);this.sharedStylesHost.addStyles(o),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(n){return new(n||t)(I(za),I(Zi),I(Ni))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class jd{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(Vd[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){e.appendChild(n)}insertBefore(e,n,r){e&&e.insertBefore(n,r)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return n||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,r,o){if(o){n=o+":"+n;const i=Vd[o];i?e.setAttributeNS(i,n,r):e.setAttribute(n,r)}else e.setAttribute(n,r)}removeAttribute(e,n,r){if(r){const o=Vd[r];o?e.removeAttributeNS(o,n):e.removeAttribute(`${r}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,r,o){o&(Mt.DashCase|Mt.Important)?e.style.setProperty(n,r,o&Mt.Important?"important":""):e.style[n]=r}removeStyle(e,n,r){r&Mt.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,r){e[n]=r}setValue(e,n){e.nodeValue=n}listen(e,n,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,rD(r)):this.eventManager.addEventListener(e,n,rD(r))}}class yx extends jd{constructor(e,n,r,o){super(e),this.component=r;const i=qa(o+"-"+r.id,r.styles,[]);n.addStyles(i),this.contentAttr=function(t){return"_ngcontent-%COMP%".replace(Bd,t)}(o+"-"+r.id),this.hostAttr=function(t){return"_nghost-%COMP%".replace(Bd,t)}(o+"-"+r.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,n){const r=super.createElement(e,n);return super.setAttribute(r,this.contentAttr,""),r}}class Cx extends jd{constructor(e,n,r,o){super(e),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const i=qa(o.id,o.styles,[]);for(let s=0;s<i.length;s++){const a=document.createElement("style");a.textContent=i[s],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,r){return super.insertBefore(this.nodeOrShadowRoot(e),n,r)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let Dx=(()=>{class t extends Ld{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}}return t.\u0275fac=function(n){return new(n||t)(I(Ue))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const sD=["alt","control","meta","shift"],Tx={"\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"},aD={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"},Ox={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Ix=(()=>{class t extends Ld{constructor(n){super(n)}supports(n){return null!=t.parseEventName(n)}addEventListener(n,r,o){const i=t.parseEventName(r),s=t.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Jn().onAndCancel(n,i.domEventName,s))}static parseEventName(n){const r=n.toLowerCase().split("."),o=r.shift();if(0===r.length||"keydown"!==o&&"keyup"!==o)return null;const i=t._normalizeKey(r.pop());let s="";if(sD.forEach(l=>{const u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=i,0!=r.length||0===i.length)return null;const a={};return a.domEventName=o,a.fullKey=s,a}static getEventFullKey(n){let r="",o=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&&aD.hasOwnProperty(e)&&(e=aD[e]))}return Tx[e]||e}(n);return o=o.toLowerCase()," "===o?o="space":"."===o&&(o="dot"),sD.forEach(i=>{i!=o&&Ox[i](n)&&(r+=i+".")}),r+=o,r}static eventCallback(n,r,o){return i=>{t.getEventFullKey(i)===n&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return"esc"===n?"escape":n}}return t.\u0275fac=function(n){return new(n||t)(I(Ue))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),Ka=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:function(n){let r=null;return r=n?new(n||t):I(Gd),r},providedIn:"root"}),t})(),Gd=(()=>{class t extends Ka{constructor(n){super(),this._doc=n}sanitize(n,r){if(null==r)return null;switch(n){case ae.NONE:return r;case ae.HTML:return pn(r,"HTML")?wt(r):cp(this._doc,String(r)).toString();case ae.STYLE:return pn(r,"Style")?wt(r):r;case ae.SCRIPT:if(pn(r,"Script"))return wt(r);throw new Error("unsafe value used in a script context");case ae.URL:return np(r),pn(r,"URL")?wt(r):si(String(r));case ae.RESOURCE_URL:if(pn(r,"ResourceURL"))return wt(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${n} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(n){return function(t){return new iw(t)}(n)}bypassSecurityTrustStyle(n){return function(t){return new sw(t)}(n)}bypassSecurityTrustScript(n){return function(t){return new aw(t)}(n)}bypassSecurityTrustUrl(n){return function(t){return new lw(t)}(n)}bypassSecurityTrustResourceUrl(n){return function(t){return new uw(t)}(n)}}return t.\u0275fac=function(n){return new(n||t)(I(Ue))},t.\u0275prov=B({token:t,factory:function(n){let r=null;return r=n?new n:function(t){return new Gd(t.get(Ue))}(I(le)),r},providedIn:"root"}),t})();const Fx=[{provide:xi,useValue:KC},{provide:Dy,useValue:function(){Fd.makeCurrent(),kd.init()},multi:!0},{provide:Ue,useFactory:function(){return function(t){Vl=t}(document),document},deps:[]}],Lx=Ny(PA,"browser",Fx),Vx=[[],{provide:mi,useValue:"root"},{provide:mr,useFactory:function(){return new mr},deps:[]},{provide:Ji,useClass:Dx,multi:!0,deps:[Ue,ze,xi]},{provide:Ji,useClass:Ix,multi:!0,deps:[Ue]},[],{provide:Hd,useClass:Hd,deps:[za,Zi,Ni]},{provide:da,useExisting:Hd},{provide:XC,useExisting:Zi},{provide:Zi,useClass:Zi,deps:[Ue]},{provide:qc,useClass:qc,deps:[ze]},{provide:za,useClass:za,deps:[Ji,ze]},{provide:YC,useClass:rx,deps:[]},[]];let Bx=(()=>{class t{constructor(n){if(n)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(n){return{ngModule:t,providers:[{provide:Ni,useValue:n.appId},{provide:JC,useExisting:Ni},nx]}}}return t.\u0275fac=function(n){return new(n||t)(I(t,12))},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:Vx,imports:[qC,VA]}),t})(),lD=(()=>{class t{constructor(n){this._doc=n,this._dom=Jn()}addTag(n,r=!1){return n?this._getOrCreateElement(n,r):null}addTags(n,r=!1){return n?n.reduce((o,i)=>(i&&o.push(this._getOrCreateElement(i,r)),o),[]):[]}getTag(n){return n&&this._doc.querySelector(`meta[${n}]`)||null}getTags(n){if(!n)return[];const r=this._doc.querySelectorAll(`meta[${n}]`);return r?[].slice.call(r):[]}updateTag(n,r){if(!n)return null;r=r||this._parseSelector(n);const o=this.getTag(r);return o?this._setMetaElementAttributes(n,o):this._getOrCreateElement(n,!0)}removeTag(n){this.removeTagElement(this.getTag(n))}removeTagElement(n){n&&this._dom.remove(n)}_getOrCreateElement(n,r=!1){if(!r){const s=this._parseSelector(n),a=this.getTags(s).filter(l=>this._containsAttributes(n,l))[0];if(void 0!==a)return a}const o=this._dom.createElement("meta");return this._setMetaElementAttributes(n,o),this._doc.getElementsByTagName("head")[0].appendChild(o),o}_setMetaElementAttributes(n,r){return Object.keys(n).forEach(o=>r.setAttribute(this._getMetaKeyMap(o),n[o])),r}_parseSelector(n){const r=n.name?"name":"property";return`${r}="${n[r]}"`}_containsAttributes(n,r){return Object.keys(n).every(o=>r.getAttribute(this._getMetaKeyMap(o))===n[o])}_getMetaKeyMap(n){return jx[n]||n}}return t.\u0275fac=function(n){return new(n||t)(I(Ue))},t.\u0275prov=B({token:t,factory:function(n){let r=null;return r=n?new n:new lD(I(Ue)),r},providedIn:"root"}),t})();const jx={httpEquiv:"http-equiv"};function an(...t){let e=t[t.length-1];return $f(e)?(t.pop(),wl(t,e)):Xf(t)}function cD(t,e){return Ml(t,e,1)}"undefined"!=typeof window&&window;class Qx{constructor(e,n){this.predicate=e,this.thisArg=n}call(e,n){return n.subscribe(new Yx(e,this.predicate,this.thisArg))}}class Yx extends Le{constructor(e,n,r){super(e),this.predicate=n,this.thisArg=r,this.count=0}_next(e){let n;try{n=this.predicate.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}n&&this.destination.next(e)}}class dD{}class fD{}class Fn{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(n=>{const r=n.indexOf(":");if(r>0){const o=n.slice(0,r),i=o.toLowerCase(),s=n.slice(r+1).trim();this.maybeSetNormalizedName(o,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(n=>{let r=e[n];const o=n.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(this.headers.set(o,r),this.maybeSetNormalizedName(n,o))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const n=this.headers.get(e.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,n){return this.clone({name:e,value:n,op:"a"})}set(e,n){return this.clone({name:e,value:n,op:"s"})}delete(e,n){return this.clone({name:e,value:n,op:"d"})}maybeSetNormalizedName(e,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,e)}init(){this.lazyInit&&(this.lazyInit instanceof Fn?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(n=>{this.headers.set(n,e.headers.get(n)),this.normalizedNames.set(n,e.normalizedNames.get(n))})}clone(e){const n=new Fn;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof Fn?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}applyUpdate(e){const n=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(e.name,n);const o=("a"===e.op?this.headers.get(n):void 0)||[];o.push(...r),this.headers.set(n,o);break;case"d":const i=e.value;if(i){let s=this.headers.get(n);if(!s)return;s=s.filter(a=>-1===i.indexOf(a)),0===s.length?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}else this.headers.delete(n),this.normalizedNames.delete(n)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>e(this.normalizedNames.get(n),this.headers.get(n)))}}class Jx{encodeKey(e){return hD(e)}encodeValue(e){return hD(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const Xx=/%(\d[a-f0-9])/gi,eR={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function hD(t){return encodeURIComponent(t).replace(Xx,(e,n)=>{var r;return null!=(r=eR[n])?r:e})}function pD(t){return`${t}`}class Xn{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new Jx,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{const i=o.indexOf("="),[s,a]=-1==i?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,i)),e.decodeValue(o.slice(i+1))],l=n.get(s)||[];l.push(a),n.set(s,l)}),n}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(n=>{const r=e.fromObject[n];this.map.set(n,Array.isArray(r)?r:[r])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const n=this.map.get(e);return n?n[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,n){return this.clone({param:e,value:n,op:"a"})}appendAll(e){const n=[];return Object.keys(e).forEach(r=>{const o=e[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(e,n){return this.clone({param:e,value:n,op:"s"})}delete(e,n){return this.clone({param:e,value:n,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const n=this.encoder.encodeKey(e);return this.map.get(e).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const n=new Xn({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(e),n}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const n=("a"===e.op?this.map.get(e.param):void 0)||[];n.push(pD(e.value)),this.map.set(e.param,n);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let r=this.map.get(e.param)||[];const o=r.indexOf(pD(e.value));-1!==o&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class tR{constructor(){this.map=new Map}set(e,n){return this.map.set(e,n),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}keys(){return this.map.keys()}}function gD(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function mD(t){return"undefined"!=typeof Blob&&t instanceof Blob}function _D(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Xi{constructor(e,n,r,o){let i;if(this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||o?(this.body=void 0!==r?r:null,i=o):i=r,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params)),this.headers||(this.headers=new Fn),this.context||(this.context=new tR),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{const a=n.indexOf("?");this.urlWithParams=n+(-1===a?"?":a<n.length-1?"&":"")+s}}else this.params=new Xn,this.urlWithParams=n}serializeBody(){return null===this.body?null:gD(this.body)||mD(this.body)||_D(this.body)||function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof Xn?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||_D(this.body)?null:mD(this.body)?this.body.type||null:gD(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Xn?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(e={}){var d;const n=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,i=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,a=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let l=e.headers||this.headers,u=e.params||this.params;const c=null!=(d=e.context)?d:this.context;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce((f,h)=>f.set(h,e.setHeaders[h]),l)),e.setParams&&(u=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),u)),new Xi(n,r,i,{params:u,headers:l,context:c,reportProgress:a,responseType:o,withCredentials:s})}}var Ae=(()=>((Ae=Ae||{})[Ae.Sent=0]="Sent",Ae[Ae.UploadProgress=1]="UploadProgress",Ae[Ae.ResponseHeader=2]="ResponseHeader",Ae[Ae.DownloadProgress=3]="DownloadProgress",Ae[Ae.Response=4]="Response",Ae[Ae.User=5]="User",Ae))();class Wd{constructor(e,n=200,r="OK"){this.headers=e.headers||new Fn,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class zd extends Wd{constructor(e={}){super(e),this.type=Ae.ResponseHeader}clone(e={}){return new zd({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Qa extends Wd{constructor(e={}){super(e),this.type=Ae.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Qa({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class yD extends Wd{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function qd(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Kd=(()=>{class t{constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof Xi)i=n;else{let l,u;l=o.headers instanceof Fn?o.headers:new Fn(o.headers),o.params&&(u=o.params instanceof Xn?o.params:new Xn({fromObject:o.params})),i=new Xi(n,r,void 0!==o.body?o.body:null,{headers:l,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials})}const s=an(i).pipe(cD(l=>this.handler.handle(l)));if(n instanceof Xi||"events"===o.observe)return s;const a=s.pipe(function(t,e){return function(r){return r.lift(new Qx(t,undefined))}}(l=>l instanceof Qa));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(un(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(un(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(un(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(un(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:(new Xn).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,qd(o,r))}post(n,r,o={}){return this.request("POST",n,qd(o,r))}put(n,r,o={}){return this.request("PUT",n,qd(o,r))}}return t.\u0275fac=function(n){return new(n||t)(I(dD))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class CD{constructor(e,n){this.next=e,this.interceptor=n}handle(e){return this.interceptor.intercept(e,this.next)}}const DD=new q("HTTP_INTERCEPTORS");let oR=(()=>{class t{intercept(n,r){return r.handle(n)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const iR=/^\)\]\}',?\n/;let ED=(()=>{class t{constructor(n){this.xhrFactory=n}handle(n){if("JSONP"===n.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new De(r=>{const o=this.xhrFactory.build();if(o.open(n.method,n.urlWithParams),n.withCredentials&&(o.withCredentials=!0),n.headers.forEach((h,p)=>o.setRequestHeader(h,p.join(","))),n.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){const h=n.detectContentTypeHeader();null!==h&&o.setRequestHeader("Content-Type",h)}if(n.responseType){const h=n.responseType.toLowerCase();o.responseType="json"!==h?h:"text"}const i=n.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const h=1223===o.status?204:o.status,p=o.statusText||"OK",y=new Fn(o.getAllResponseHeaders()),g=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(o)||n.url;return s=new zd({headers:y,status:h,statusText:p,url:g}),s},l=()=>{let{headers:h,status:p,statusText:y,url:g}=a(),D=null;204!==p&&(D=void 0===o.response?o.responseText:o.response),0===p&&(p=D?200:0);let C=p>=200&&p<300;if("json"===n.responseType&&"string"==typeof D){const T=D;D=D.replace(iR,"");try{D=""!==D?JSON.parse(D):null}catch(N){D=T,C&&(C=!1,D={error:N,text:D})}}C?(r.next(new Qa({body:D,headers:h,status:p,statusText:y,url:g||void 0})),r.complete()):r.error(new yD({error:D,headers:h,status:p,statusText:y,url:g||void 0}))},u=h=>{const{url:p}=a(),y=new yD({error:h,status:o.status||0,statusText:o.statusText||"Unknown Error",url:p||void 0});r.error(y)};let c=!1;const d=h=>{c||(r.next(a()),c=!0);let p={type:Ae.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),"text"===n.responseType&&!!o.responseText&&(p.partialText=o.responseText),r.next(p)},f=h=>{let p={type:Ae.UploadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),r.next(p)};return o.addEventListener("load",l),o.addEventListener("error",u),o.addEventListener("timeout",u),o.addEventListener("abort",u),n.reportProgress&&(o.addEventListener("progress",d),null!==i&&o.upload&&o.upload.addEventListener("progress",f)),o.send(i),r.next({type:Ae.Sent}),()=>{o.removeEventListener("error",u),o.removeEventListener("abort",u),o.removeEventListener("load",l),o.removeEventListener("timeout",u),n.reportProgress&&(o.removeEventListener("progress",d),null!==i&&o.upload&&o.upload.removeEventListener("progress",f)),o.readyState!==o.DONE&&o.abort()}})}}return t.\u0275fac=function(n){return new(n||t)(I(YC))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const Qd=new q("XSRF_COOKIE_NAME"),Yd=new q("XSRF_HEADER_NAME");class bD{}let aR=(()=>{class t{constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=UC(n,this.cookieName),this.lastCookieString=n),this.lastToken}}return t.\u0275fac=function(n){return new(n||t)(I(Ue),I(xi),I(Qd))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),Jd=(()=>{class t{constructor(n,r){this.tokenService=n,this.headerName=r}intercept(n,r){const o=n.url.toLowerCase();if("GET"===n.method||"HEAD"===n.method||o.startsWith("http://")||o.startsWith("https://"))return r.handle(n);const i=this.tokenService.getToken();return null!==i&&!n.headers.has(this.headerName)&&(n=n.clone({headers:n.headers.set(this.headerName,i)})),r.handle(n)}}return t.\u0275fac=function(n){return new(n||t)(I(bD),I(Yd))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),lR=(()=>{class t{constructor(n,r){this.backend=n,this.injector=r,this.chain=null}handle(n){if(null===this.chain){const r=this.injector.get(DD,[]);this.chain=r.reduceRight((o,i)=>new CD(o,i),this.backend)}return this.chain.handle(n)}}return t.\u0275fac=function(n){return new(n||t)(I(fD),I(le))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),uR=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Jd,useClass:oR}]}}static withOptions(n={}){return{ngModule:t,providers:[n.cookieName?{provide:Qd,useValue:n.cookieName}:[],n.headerName?{provide:Yd,useValue:n.headerName}:[]]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:[Jd,{provide:DD,useExisting:Jd,multi:!0},{provide:bD,useClass:aR},{provide:Qd,useValue:"XSRF-TOKEN"},{provide:Yd,useValue:"X-XSRF-TOKEN"}]}),t})(),cR=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:[Kd,{provide:dD,useClass:lR},ED,{provide:fD,useExisting:ED}],imports:[[uR.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function vD(...t){if(1===t.length){const e=t[0];if(bl(e))return Ya(e,null);if(vl(e)&&Object.getPrototypeOf(e)===Object.prototype){const n=Object.keys(e);return Ya(n.map(r=>e[r]),n)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Ya(t=1===t.length&&bl(t[0])?t[0]:t,null).pipe(un(n=>e(...n)))}return Ya(t,null)}function Ya(t,e){return new De(n=>{const r=t.length;if(0===r)return void n.complete();const o=new Array(r);let i=0,s=0;for(let a=0;a<r;a++){const l=jo(t[a]);let u=!1;n.add(l.subscribe({next:c=>{u||(u=!0,s++),o[a]=c},error:c=>n.error(c),complete:()=>{i++,(i===r||!u)&&(s===r&&n.next(e?e.reduce((c,d,f)=>(c[d]=o[f],c),{}):o),n.complete())}}))}})}let wD=(()=>{class t{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}}return t.\u0275fac=function(n){return new(n||t)(v(Er),v(Re))},t.\u0275dir=V({type:t}),t})(),Tr=(()=>{class t extends wD{}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275dir=V({type:t,features:[fe]}),t})();const vn=new q("NgValueAccessor"),fR={provide:vn,useExisting:ce(()=>Ja),multi:!0},pR=new q("CompositionEventMode");let Ja=(()=>{class t extends wD{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Jn()?Jn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(n){this.setProperty("value",null==n?"":n)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}}return t.\u0275fac=function(n){return new(n||t)(v(Er),v(Re),v(pR,8))},t.\u0275dir=V({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(n,r){1&n&&x("input",function(i){return r._handleInput(i.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(i){return r._compositionEnd(i.target.value)})},features:[me([fR]),fe]}),t})();const et=new q("NgValidators"),tr=new q("NgAsyncValidators");function FD(t){return null!=t}function kD(t){const e=ra(t)?jo(t):t;return hc(e),e}function LD(t){let e={};return t.forEach(n=>{e=null!=n?Ge(Ge({},e),n):e}),0===Object.keys(e).length?null:e}function VD(t,e){return e.map(n=>n(t))}function BD(t){return t.map(e=>function(t){return!t.validate}(e)?e:n=>e.validate(n))}function Zd(t){return null!=t?function(t){if(!t)return null;const e=t.filter(FD);return 0==e.length?null:function(n){return LD(VD(n,e))}}(BD(t)):null}function Xd(t){return null!=t?function(t){if(!t)return null;const e=t.filter(FD);return 0==e.length?null:function(n){return vD(VD(n,e).map(kD)).pipe(un(LD))}}(BD(t)):null}function UD(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function ef(t){return t?Array.isArray(t)?t:[t]:[]}function Za(t,e){return Array.isArray(t)?t.includes(e):t===e}function WD(t,e){const n=ef(e);return ef(t).forEach(o=>{Za(n,o)||n.push(o)}),n}function zD(t,e){return ef(e).filter(n=>!Za(t,n))}class qD{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}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}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Zd(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Xd(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,n){return!!this.control&&this.control.hasError(e,n)}getError(e,n){return this.control?this.control.getError(e,n):null}}class ct extends qD{get formDirective(){return null}get path(){return null}}class nr extends qD{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class KD{constructor(e){this._cd=e}is(e){var n,r,o;return"submitted"===e?!!(null==(n=this._cd)?void 0:n.submitted):!!(null==(o=null==(r=this._cd)?void 0:r.control)?void 0:o[e])}}let tf=(()=>{class t extends KD{constructor(n){super(n)}}return t.\u0275fac=function(n){return new(n||t)(v(nr,2))},t.\u0275dir=V({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){2&n&&Cn("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))},features:[fe]}),t})(),QD=(()=>{class t extends KD{constructor(n){super(n)}}return t.\u0275fac=function(n){return new(n||t)(v(ct,10))},t.\u0275dir=V({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){2&n&&Cn("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))("ng-submitted",r.is("submitted"))},features:[fe]}),t})();function ts(t,e){of(t,e),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&YD(t,e)})}(t,e),function(t,e){const n=(r,o)=>{e.valueAccessor.writeValue(r),o&&e.viewToModelUpdate(r)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&YD(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=r=>{e.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function nl(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function of(t,e){const n=function(t){return t._rawValidators}(t);null!==e.validator?t.setValidators(UD(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const r=function(t){return t._rawAsyncValidators}(t);null!==e.asyncValidator?t.setAsyncValidators(UD(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]);const o=()=>t.updateValueAndValidity();nl(e._rawValidators,o),nl(e._rawAsyncValidators,o)}function YD(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function ol(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ns="VALID",il="INVALID",xo="PENDING",rs="DISABLED";function lf(t){return(cf(t)?t.validators:t)||null}function XD(t){return Array.isArray(t)?Zd(t):t||null}function uf(t,e){return(cf(e)?e.asyncValidators:t)||null}function eE(t){return Array.isArray(t)?Xd(t):t||null}function cf(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class df{constructor(e,n){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=XD(this._rawValidators),this._composedAsyncValidatorFn=eE(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===ns}get invalid(){return this.status===il}get pending(){return this.status==xo}get disabled(){return this.status===rs}get enabled(){return this.status!==rs}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=XD(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=eE(e)}addValidators(e){this.setValidators(WD(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(WD(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(zD(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(zD(e,this._rawAsyncValidators))}hasValidator(e){return Za(this._rawValidators,e)}hasAsyncValidator(e){return Za(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=xo,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=rs,this.errors=null,this._forEachChild(r=>{r.disable(Lo(Ge({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Lo(Ge({},e),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=ns,this._forEachChild(r=>{r.enable(Lo(Ge({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Lo(Ge({},e),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ns||this.status===xo)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?rs:ns}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=xo,this._hasOwnPendingAsyncValidator=!0;const n=kD(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(!1!==n.emitEvent)}get(e){return function(t,e,n){if(null==e||(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length))return null;let r=t;return e.forEach(o=>{r=r instanceof ff?r.controls.hasOwnProperty(o)?r.controls[o]:null:r instanceof OR&&r.at(o)||null}),r}(this,e)}getError(e,n){const r=n?this.get(n):this;return r&&r.errors?r.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new se,this.statusChanges=new se}_calculateStatus(){return this._allControlsDisabled()?rs:this.errors?il:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xo)?xo:this._anyControlsHaveStatus(il)?il:ns}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){cf(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class sl extends df{constructor(e=null,n,r){super(lf(n),uf(r,n)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=null,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ol(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ol(this._onDisabledChange,e)}_forEachChild(e){}_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(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class ff extends df{constructor(e,n,r){super(lf(n),uf(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,r={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(r=>{this._throwIfControlMissing(r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(Object.keys(e).forEach(r=>{this.controls[r]&&this.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((r,o)=>{r.reset(e[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,r)=>(e[r]=n instanceof sl?n.value:n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,r)=>!!r._syncPendingControls()||n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){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[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(n=>{const r=this.controls[n];r&&e(r,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const n of Object.keys(this.controls)){const r=this.controls[n];if(this.contains(n)&&e(r))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(e,n){let r=e;return this._forEachChild((o,i)=>{r=n(r,o,i)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((n,r)=>{if(void 0===e[r])throw new Error(`Must supply a value for form control with name: '${r}'.`)})}}class OR extends df{constructor(e,n,r){super(lf(n),uf(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,r={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),n&&(this.controls.splice(e,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){this._checkAllValuesPresent(e),e.forEach((r,o)=>{this._throwIfControlMissing(o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(e.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((r,o)=>{r.reset(e[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e instanceof sl?e.value:e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((n,r)=>!!r._syncPendingControls()||n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){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(e))throw new Error(`Cannot find form control at index ${e}`)}_forEachChild(e){this.controls.forEach((n,r)=>{e(n,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((n,r)=>{if(void 0===e[r])throw new Error(`Must supply a value for form control at index: ${r}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const IR={provide:ct,useExisting:ce(()=>al)},os=(()=>Promise.resolve(null))();let al=(()=>{class t extends ct{constructor(n,r){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new se,this.form=new ff({},Zd(n),Xd(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){os.then(()=>{const r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),ts(n.control,n),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){os.then(()=>{const r=this._findContainer(n.path);r&&r.removeControl(n.name),ol(this._directives,n)})}addFormGroup(n){os.then(()=>{const r=this._findContainer(n.path),o=new ff({});(function(t,e){of(t,e)})(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){os.then(()=>{const r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){os.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submitted=!0,function(t,e){t._syncPendingControls(),e.forEach(n=>{const r=n.control;"submit"===r.updateOn&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(n),!1}onReset(){this.resetForm()}resetForm(n){this.form.reset(n),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}}return t.\u0275fac=function(n){return new(n||t)(v(et,10),v(tr,10))},t.\u0275dir=V({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){1&n&&x("submit",function(i){return r.onSubmit(i)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[me([IR]),fe]}),t})();const PR={provide:nr,useExisting:ce(()=>ll)},rE=(()=>Promise.resolve(null))();let ll=(()=>{class t extends nr{constructor(n,r,o,i){super(),this.control=new sl,this._registered=!1,this.update=new se,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=function(t,e){if(!e)return null;let n,r,o;return Array.isArray(e),e.forEach(i=>{i.constructor===Ja?n=i:function(t){return Object.getPrototypeOf(t.constructor)===Tr}(i)?r=i:o=i}),o||r||n||null}(0,i)}ngOnChanges(n){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in n&&this._updateDisabled(n),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?function(t,e){return[...e.path,t]}(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_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(){ts(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(n){rE.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1})})}_updateDisabled(n){const r=n.isDisabled.currentValue,o=""===r||r&&"false"!==r;rE.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(n){return new(n||t)(v(ct,9),v(et,10),v(tr,10),v(vn,10))},t.\u0275dir=V({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:[me([PR]),fe,Be]}),t})(),oE=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275dir=V({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const xR={provide:vn,useExisting:ce(()=>hf),multi:!0};let sE=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({}),t})(),RR=(()=>{class t{constructor(){this._accessors=[]}add(n,r){this._accessors.push([n,r])}remove(n){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===n)return void this._accessors.splice(r,1)}select(n){this._accessors.forEach(r=>{this._isSameGroup(r,n)&&r[1]!==n&&r[1].fireUncheck(n.value)})}_isSameGroup(n,r){return!!n[0].control&&n[0]._parent===r._control._parent&&n[1].name===r.name}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:sE}),t})(),hf=(()=>{class t extends Tr{constructor(n,r,o,i){super(n,r),this._registry=o,this._injector=i,this.onChange=()=>{}}ngOnInit(){this._control=this._injector.get(nr),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(n){this._state=n===this.value,this.setProperty("checked",this._state)}registerOnChange(n){this._fn=n,this.onChange=()=>{n(this.value),this._registry.select(this)}}fireUncheck(n){this.writeValue(n)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(n){return new(n||t)(v(Er),v(Re),v(RR),v(le))},t.\u0275dir=V({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,r){1&n&&x("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[me([xR]),fe]}),t})();const jR={provide:vn,useExisting:ce(()=>ul),multi:!0};function fE(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let ul=(()=>{class t extends Tr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;const r=this._getOptionId(n);null==r&&this.setProperty("selectedIndex",-1);const o=fE(r,n);this.setProperty("value",o)}registerOnChange(n){this.onChange=r=>{this.value=this._getOptionValue(r),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),n))return r;return null}_getOptionValue(n){const r=function(t){return t.split(":")[0]}(n);return this._optionMap.has(r)?this._optionMap.get(r):n}}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275dir=V({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){1&n&&x("change",function(i){return r.onChange(i.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[me([jR]),fe]}),t})(),hE=(()=>{class t{constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(n){null!=this._select&&(this._select._optionMap.set(this.id,n),this._setElementValue(fE(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(n){return new(n||t)(v(Re),v(Er),v(ul,9))},t.\u0275dir=V({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const GR={provide:vn,useExisting:ce(()=>_f),multi:!0};function pE(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let _f=(()=>{class t extends Tr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){let r;if(this.value=n,Array.isArray(n)){const o=n.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(n){this.onChange=r=>{const o=[];if(void 0!==r.selectedOptions){const i=r.selectedOptions;for(let s=0;s<i.length;s++){const a=i.item(s),l=this._getOptionValue(a.value);o.push(l)}}else{const i=r.options;for(let s=0;s<i.length;s++){const a=i.item(s);if(a.selected){const l=this._getOptionValue(a.value);o.push(l)}}}this.value=o,n(o)}}_registerOption(n){const r=(this._idCounter++).toString();return this._optionMap.set(r,n),r}_getOptionId(n){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r)._value,n))return r;return null}_getOptionValue(n){const r=function(t){return t.split(":")[0]}(n);return this._optionMap.has(r)?this._optionMap.get(r)._value:n}}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275dir=V({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){1&n&&x("change",function(i){return r.onChange(i.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[me([GR]),fe]}),t})(),gE=(()=>{class t{constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){null!=this._select&&(this._value=n,this._setElementValue(pE(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(pE(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(n){return new(n||t)(v(Re),v(Er),v(_f,9))},t.\u0275dir=V({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})(),XR=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({imports:[[sE]]}),t})(),eF=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({imports:[XR]}),t})();function Or(t){return!!t&&(t instanceof De||"function"==typeof t.lift&&"function"==typeof t.subscribe)}function ME(...t){return Zf(1)(an(...t))}const nF=new De(t=>t.complete());function Cf(t){return t?function(t){return new De(e=>t.schedule(()=>e.complete()))}(t):nF}function SE(t){return new De(e=>{let n;try{n=t()}catch(o){return void e.error(o)}return(n?jo(n):Cf()).subscribe(e)})}const oF=(()=>{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 dl(t){return e=>0===t?Cf():e.lift(new iF(t))}class iF{constructor(e){if(this.total=e,this.total<0)throw new oF}call(e,n){return n.subscribe(new sF(e,this.total))}}class sF extends Le{constructor(e,n){super(e),this.total=n,this.count=0}_next(e){const n=this.total,r=++this.count;r<=n&&(this.destination.next(e),r===n&&(this.destination.complete(),this.unsubscribe()))}}class aF extends _e{constructor(e,n){super()}schedule(e,n=0){return this}}class TE extends aF{constructor(e,n){super(e,n),this.scheduler=e,this.work=n,this.pending=!1}schedule(e,n=0){if(this.closed)return this;this.state=e;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(o,this.id,n),this}requestAsyncId(e,n,r=0){return setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,n,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return n;clearInterval(n)}execute(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,n){let o,r=!1;try{this.work(e)}catch(i){r=!0,o=!!i&&i||new Error(i)}if(r)return this.unsubscribe(),o}_unsubscribe(){const e=this.id,n=this.scheduler,r=n.actions,o=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==o&&r.splice(o,1),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null}}let OE=(()=>{class t{constructor(n,r=t.now){this.SchedulerAction=n,this.now=r}schedule(n,r=0,o){return new this.SchedulerAction(this,n).schedule(o,r)}}return t.now=()=>Date.now(),t})();class kn extends OE{constructor(e,n=OE.now){super(e,()=>kn.delegate&&kn.delegate!==this?kn.delegate.now():n()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,n=0,r){return kn.delegate&&kn.delegate!==this?kn.delegate.schedule(e,n,r):super.schedule(e,n,r)}flush(e){const{actions:n}=this;if(this.active)return void n.push(e);let r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=n.shift());if(this.active=!1,r){for(;e=n.shift();)e.unsubscribe();throw r}}}const cF=new class extends kn{}(class extends TE{constructor(e,n){super(e,n),this.scheduler=e,this.work=n}schedule(e,n=0){return n>0?super.schedule(e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)}execute(e,n){return n>0||this.closed?super.execute(e,n):this._execute(e,n)}requestAsyncId(e,n,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(e,n,r):e.flush(this)}});class Ht{constructor(e,n,r){this.kind=e,this.value=n,this.error=r,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,n,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return n&&n(this.error);case"C":return r&&r()}}accept(e,n,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,n,r)}toObservable(){switch(this.kind){case"N":return an(this.value);case"E":return function(t,e){return new De(n=>n.error(t))}(this.error);case"C":return Cf()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new Ht("N",e):Ht.undefinedValueNotification}static createError(e){return new Ht("E",void 0,e)}static createComplete(){return Ht.completeNotification}}Ht.completeNotification=new Ht("C"),Ht.undefinedValueNotification=new Ht("N",void 0);class fl extends Le{constructor(e,n,r=0){super(e),this.scheduler=n,this.delay=r}static dispatch(e){const{notification:n,destination:r}=e;n.observe(r),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(fl.dispatch,this.delay,new pF(e,this.destination)))}_next(e){this.scheduleMessage(Ht.createNext(e))}_error(e){this.scheduleMessage(Ht.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(Ht.createComplete()),this.unsubscribe()}}class pF{constructor(e,n){this.notification=e,this.destination=n}}class gF extends Ho{constructor(e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new mF(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;let s;if(this.closed)throw new Nr;if(this.isStopped||this.hasError?s=_e.EMPTY:(this.observers.push(e),s=new jf(this,e)),o&&e.add(e=new fl(e,o)),n)for(let a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(let a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),s}_getNow(){return(this.scheduler||cF).now()}_trimBufferThenGetEvents(){const e=this._getNow(),n=this._bufferSize,r=this._windowTime,o=this._events,i=o.length;let s=0;for(;s<i&&!(e-o[s].time<r);)s++;return i>n&&(s=Math.max(s,i-n)),s>0&&o.splice(0,s),o}}class mF{constructor(e,n){this.time=e,this.value=n}}function IE(t,e,n){let r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},o=>o.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:n,scheduler:r}){let o,s,i=0,a=!1,l=!1;return function(c){let d;i++,!o||a?(a=!1,o=new gF(t,e,r),d=o.subscribe(this),s=c.subscribe({next(f){o.next(f)},error(f){a=!0,o.error(f)},complete(){l=!0,s=void 0,o.complete()}}),l&&(s=void 0)):d=o.subscribe(this),this.add(()=>{i--,d.unsubscribe(),d=void 0,s&&!l&&n&&0===i&&(s.unsubscribe(),s=void 0,o=void 0)})}}(r))}function Df(t,e){return"function"==typeof e?n=>n.pipe(Df((r,o)=>jo(t(r,o)).pipe(un((i,s)=>e(r,i,o,s))))):n=>n.lift(new yF(t))}class yF{constructor(e){this.project=e}call(e,n){return n.subscribe(new CF(e,this.project))}}class CF extends Yf{constructor(e,n){super(e),this.project=n,this.index=0}_next(e){let n;const r=this.index++;try{n=this.project(e,r)}catch(o){return void this.destination.error(o)}this._innerSub(n)}_innerSub(e){const n=this.innerSubscription;n&&n.unsubscribe();const r=new Qf(this),o=this.destination;o.add(r),this.innerSubscription=Jf(e,r),this.innerSubscription!==r&&o.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}class hl{}let AE=(()=>{class t extends hl{getTranslation(n){return an({})}}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class Ef{}let PE=(()=>{class t{handle(n){return n.key}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function pl(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let o,i,s,n=typeof t;if(n==typeof e&&"object"==n){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(i in s=Object.create(null),t){if(!pl(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((o=t.length)==e.length){for(i=0;i<o;i++)if(!pl(t[i],e[i]))return!1;return!0}}return!1}function rr(t){return null!=t}function bf(t){return t&&"object"==typeof t&&!Array.isArray(t)}function NE(t,e){let n=Object.assign({},t);return bf(t)&&bf(e)&&Object.keys(e).forEach(r=>{bf(e[r])?r in t?n[r]=NE(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}class gl{}let xE=(()=>{class t extends gl{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(n,r){let o;return o="string"==typeof n?this.interpolateString(n,r):"function"==typeof n?this.interpolateFunction(n,r):n,o}getValue(n,r){let o="string"==typeof r?r.split("."):[r];r="";do{r+=o.shift(),!rr(n)||!rr(n[r])||"object"!=typeof n[r]&&o.length?o.length?r+=".":n=void 0:(n=n[r],r="")}while(o.length);return n}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(o,i)=>{let s=this.getValue(r,i);return rr(s)?s:o}):n}}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class ml{}let RE=(()=>{class t extends ml{compile(n,r){return n}compileTranslations(n,r){return n}}return t.\u0275fac=function(){let e;return function(r){return(e||(e=Qe(t)))(r||t)}}(),t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();class FE{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new se,this.onLangChange=new se,this.onDefaultLangChange=new se}}const vf=new q("USE_STORE"),wf=new q("USE_DEFAULT_LANG"),Mf=new q("DEFAULT_LANGUAGE"),Sf=new q("USE_EXTEND");let Ir=(()=>{class t{constructor(n,r,o,i,s,a=!0,l=!1,u=!1,c){this.store=n,this.currentLoader=r,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.isolate=l,this.extend=u,this.pending=!1,this._onTranslationChange=new se,this._onLangChange=new se,this._onDefaultLangChange=new se,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}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(n){this.isolate?this._defaultLang=n:this.store.defaultLang=n}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(n){this.isolate?this._currentLang=n:this.store.currentLang=n}get langs(){return this.isolate?this._langs:this.store.langs}set langs(n){this.isolate?this._langs=n:this.store.langs=n}get translations(){return this.isolate?this._translations:this.store.translations}set translations(n){this.isolate?this._translations=n:this.store.translations=n}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);void 0!==r?(null==this.defaultLang&&(this.defaultLang=n),r.pipe(dl(1)).subscribe(o=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(n===this.currentLang)return an(this.translations[n]);let r=this.retrieveTranslations(n);return void 0!==r?(this.currentLang||(this.currentLang=n),r.pipe(dl(1)).subscribe(o=>{this.changeLang(n)}),r):(this.changeLang(n),an(this.translations[n]))}retrieveTranslations(n){let r;return(void 0===this.translations[n]||this.extend)&&(this._translationRequests[n]=this._translationRequests[n]||this.getTranslation(n),r=this._translationRequests[n]),r}getTranslation(n){this.pending=!0;const r=this.currentLoader.getTranslation(n).pipe(IE(1),dl(1));return this.loadingTranslations=r.pipe(un(o=>this.compiler.compileTranslations(o,n)),IE(1),dl(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[n]=this.extend&&this.translations[n]?Ge(Ge({},o),this.translations[n]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),r}setTranslation(n,r,o=!1){r=this.compiler.compileTranslations(r,n),this.translations[n]=(o||this.extend)&&this.translations[n]?NE(this.translations[n],r):r,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){n.forEach(r=>{-1===this.langs.indexOf(r)&&this.langs.push(r)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(n,r,o){let i;if(r instanceof Array){let s={},a=!1;for(let l of r)s[l]=this.getParsedResult(n,l,o),Or(s[l])&&(a=!0);return a?vD(r.map(u=>Or(s[u])?s[u]:an(s[u]))).pipe(un(u=>{let c={};return u.forEach((d,f)=>{c[r[f]]=d}),c})):s}if(n&&(i=this.parser.interpolate(this.parser.getValue(n,r),o)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],r),o)),void 0===i){let s={key:r,translateService:this};void 0!==o&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return void 0!==i?i:r}get(n,r){if(!rr(n)||!n.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(cD(o=>Or(o=this.getParsedResult(o,n,r))?o:an(o)));{let o=this.getParsedResult(this.translations[this.currentLang],n,r);return Or(o)?o:an(o)}}getStreamOnTranslationChange(n,r){if(!rr(n)||!n.length)throw new Error('Parameter "key" required');return ME(SE(()=>this.get(n,r)),this.onTranslationChange.pipe(Df(o=>{const i=this.getParsedResult(o.translations,n,r);return"function"==typeof i.subscribe?i:an(i)})))}stream(n,r){if(!rr(n)||!n.length)throw new Error('Parameter "key" required');return ME(SE(()=>this.get(n,r)),this.onLangChange.pipe(Df(o=>{const i=this.getParsedResult(o.translations,n,r);return Or(i)?i:an(i)})))}instant(n,r){if(!rr(n)||!n.length)throw new Error('Parameter "key" required');let o=this.getParsedResult(this.translations[this.currentLang],n,r);if(Or(o)){if(n instanceof Array){let i={};return n.forEach((s,a)=>{i[n[a]]=n[a]}),i}return n}return o}set(n,r,o=this.currentLang){this.translations[o][n]=this.compiler.compile(r,o),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeLang(n){this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),null==this.defaultLang&&this.changeDefaultLang(n)}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.getTranslation(n)}resetLang(n){this._translationRequests[n]=void 0,this.translations[n]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let n=window.navigator.languages?window.navigator.languages[0]:null;return n=n||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==n?(-1!==n.indexOf("-")&&(n=n.split("-")[0]),-1!==n.indexOf("_")&&(n=n.split("_")[0]),n):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let n=window.navigator.languages?window.navigator.languages[0]:null;return n=n||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,n}}return t.\u0275fac=function(n){return new(n||t)(I(FE),I(hl),I(ml),I(gl),I(Ef),I(wf),I(vf),I(Sf),I(Mf))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),Ar=(()=>{class t{constructor(n,r){this.translate=n,this._ref=r,this.value="",this.lastKey=null,this.lastParams=[]}updateValue(n,r,o){let i=s=>{this.value=void 0!==s?s:n,this.lastKey=n,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,n,r);Or(s.subscribe)?s.subscribe(i):i(s)}this.translate.get(n,r).subscribe(i)}transform(n,...r){if(!n||!n.length)return n;if(pl(n,this.lastKey)&&pl(r,this.lastParams))return this.value;let o;if(rr(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){let i=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{o=JSON.parse(i)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else"object"==typeof r[0]&&!Array.isArray(r[0])&&(o=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o))})),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(n){return new(n||t)(v(Ir,16),v(Ly,16))},t.\u0275pipe=We({name:"translate",type:t,pure:!1}),t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),DF=(()=>{class t{static forRoot(n={}){return{ngModule:t,providers:[n.loader||{provide:hl,useClass:AE},n.compiler||{provide:ml,useClass:RE},n.parser||{provide:gl,useClass:xE},n.missingTranslationHandler||{provide:Ef,useClass:PE},FE,{provide:vf,useValue:n.isolate},{provide:wf,useValue:n.useDefaultLang},{provide:Sf,useValue:n.extend},{provide:Mf,useValue:n.defaultLanguage},Ir]}}static forChild(n={}){return{ngModule:t,providers:[n.loader||{provide:hl,useClass:AE},n.compiler||{provide:ml,useClass:RE},n.parser||{provide:gl,useClass:xE},n.missingTranslationHandler||{provide:Ef,useClass:PE},{provide:vf,useValue:n.isolate},{provide:wf,useValue:n.useDefaultLang},{provide:Sf,useValue:n.extend},{provide:Mf,useValue:n.defaultLanguage},Ir]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({}),t})();class jt{constructor(e,n,r,o,i){this.picked=!1,this.group=[],this.z=e,this.x=n,this.y=r,this.v=o,this.groupnr=i}isBlocked(){return jt.hasStone(this.nodes.top)||jt.hasStone(this.nodes.left)&&jt.hasStone(this.nodes.right)}isLoose(){return!jt.hasStone(this.nodes.left)&&!jt.hasStone(this.nodes.right)&&!jt.hasStone(this.nodes.bottom)}static hasStone(e){for(const n of e)if(!n.picked)return!0;return!1}}const is=(t,e,n,r)=>{for(let o=0,i=t.length;o<i;o++)if(t[o].z===e&&t[o].x===n&&t[o].y===r)return t[o]},kE=[{img:void 0,name:"BACK_NONE"},{img:"bamboo.jpg",name:"BACK_BAMBOO"},{img:"blueclouds.jpg",name:"BACK_BLUE_CLOUDS"},{img:"grayclouds.jpg",name:"BACK_GRAY_CLOUDS"},{img:"grass-1.jpg",name:"BACK_GRAY_GRASS"},{img:"stones-1.jpg",name:"BACK_GRAY_STONES"},{img:"wood.jpg",name:"BACK_GRAY_WOOD"},{img:"wood-grain-1.jpg",name:"BACK_GRAY_WOOD_GRAIN"}],EF=[{id:"riichi",type:"SVG",name:"Riichi",url:"https://github.com/FluffyStuff/riichi-mahjong-tiles"},{id:"uni",type:"SVG",name:"Uni",url:"https://commons.wikimedia.org/wiki/Category:Unicode_1F000-1F02F_Mahjong_Tiles_(color)"},{id:"bzhmaddog",type:"SVG",name:"Bzhmaddog",url:"https://github.com/bzhmaddog/html5-mahjong-solitaire/tree/master/res/skins/default/tiles"},{id:"cheshire137",type:"SVG",name:"Cheshire",url:"https://github.com/cheshire137/Mahjong/tree/master/app/assets/images/tiles"},{id:"recri2",type:"SVG",name:"Recri",url:"https://github.com/recri/mahjong"},{id:"unib",type:"SVG",name:"Black",url:"https://commons.wikimedia.org/wiki/Category:Unicode_1F000-1F02F_Mahjong_Tiles"},{id:"gleitz",type:"PNG",name:"Gleitz",url:"https://github.com/gleitz/mahjong/tree/master/public/img/tiles"},{id:"recri",type:"PNG",name:"Recri",url:"https://github.com/recri/mahjong"},{id:"open-fruits",type:"PNG",name:"Fruits",url:"https://github.com/xunkar/open-mahjong/tree/master/resources/tiles/fruits"},{id:"picasso",type:"PNG",name:"Picasso",url:"http://star.physics.yale.edu/~ullrich/software/SolitaireMahjong/"},{id:"modern",type:"PNG",name:"Modern",url:"http://star.physics.yale.edu/~ullrich/software/SolitaireMahjong/"},{id:"classic",type:"PNG",name:"Classic",url:"http://star.physics.yale.edu/~ullrich/software/SolitaireMahjong/"}],bF=[["t_do1","t_do1","t_do1","t_do1"],["t_do2","t_do2","t_do2","t_do2"],["t_do3","t_do3","t_do3","t_do3"],["t_do4","t_do4","t_do4","t_do4"],["t_do5","t_do5","t_do5","t_do5"],["t_do6","t_do6","t_do6","t_do6"],["t_do7","t_do7","t_do7","t_do7"],["t_do8","t_do8","t_do8","t_do8"],["t_do9","t_do9","t_do9","t_do9"],["t_ch1","t_ch1","t_ch1","t_ch1"],["t_ch2","t_ch2","t_ch2","t_ch2"],["t_ch3","t_ch3","t_ch3","t_ch3"],["t_ch4","t_ch4","t_ch4","t_ch4"],["t_ch5","t_ch5","t_ch5","t_ch5"],["t_ch6","t_ch6","t_ch6","t_ch6"],["t_ch7","t_ch7","t_ch7","t_ch7"],["t_ch8","t_ch8","t_ch8","t_ch8"],["t_ch9","t_ch9","t_ch9","t_ch9"],["t_ba1","t_ba1","t_ba1","t_ba1"],["t_ba2","t_ba2","t_ba2","t_ba2"],["t_ba3","t_ba3","t_ba3","t_ba3"],["t_ba4","t_ba4","t_ba4","t_ba4"],["t_ba5","t_ba5","t_ba5","t_ba5"],["t_ba6","t_ba6","t_ba6","t_ba6"],["t_ba7","t_ba7","t_ba7","t_ba7"],["t_ba8","t_ba8","t_ba8","t_ba8"],["t_ba9","t_ba9","t_ba9","t_ba9"],["t_se_spring","t_se_summer","t_se_fall","t_se_winter"],["t_wi_north","t_wi_north","t_wi_north","t_wi_north"],["t_wi_south","t_wi_south","t_wi_south","t_wi_south"],["t_wi_east","t_wi_east","t_wi_east","t_wi_east"],["t_wi_west","t_wi_west","t_wi_west","t_wi_west"],["t_fl_bamboo","t_fl_chrysanthemum","t_fl_orchid","t_fl_plum"],["t_dr_green","t_dr_green","t_dr_green","t_dr_green"],["t_dr_white","t_dr_white","t_dr_white","t_dr_white"],["t_dr_red","t_dr_red","t_dr_red","t_dr_red"]],vF=[{name:"TILES_SUITS",groups:[{name:"TILES_SUIT_CIRCLES",tiles:["t_do1","t_do2","t_do3","t_do4","t_do5","t_do6","t_do7","t_do8","t_do9"]},{name:"TILES_SUIT_BAMBOO",tiles:["t_ba1","t_ba2","t_ba3","t_ba4","t_ba5","t_ba6","t_ba7","t_ba8","t_ba9"]},{name:"TILES_SUIT_CHARACTERS",tiles:["t_ch1","t_ch2","t_ch3","t_ch4","t_ch5","t_ch6","t_ch7","t_ch8","t_ch9"]}]},{name:"TILES_BONUS",groups:[{name:"TILES_BONUS_SEASONS",tiles:["t_se_spring","t_se_summer","t_se_fall","t_se_winter"]},{name:"TILES_BONUS_FLOWERS",tiles:["t_fl_bamboo","t_fl_orchid","t_fl_plum","t_fl_chrysanthemum"]}]},{name:"TILES_HONORS",groups:[{name:"TILES_HONORS_WINDS",tiles:["t_wi_east","t_wi_south","t_wi_west","t_wi_north"]},{name:"TILES_HONORS_DRAGONS",tiles:["t_dr_red","t_dr_green","t_dr_white"]}]}];class wF{constructor(){this.list=[],this.groups=[];let e=0;bF.map(r=>r.map(o=>({id:o}))).forEach((r,o)=>{const i={v:o,tiles:[]};this.groups.push(i),r.forEach(s=>{e++;const a={groupnr:o,v:e,img:s};i.tiles.push(a),this.list[e]=a})})}}function Ln(t){const e=function(t){return Math.floor(Math.random()*t.length)}(t);return t.splice(e,1)[0]}function ss(t,e){const n={};return t.forEach(r=>{const o=e.list[r.v];r.img=o?o.img:{id:void 0},n[r.groupnr]=n[r.groupnr]||[],n[r.groupnr].push(r),r.nodes=function(t,e){const n={left:[],right:[],top:[],bottom:[]};let r;for(let o=e.y-1;o<=e.y+1;o++){r=is(t,e.z,e.x-2,o),r&&n.left.push(r),r=is(t,e.z,e.x+2,o),r&&n.right.push(r);for(let i=e.x-1;i<=e.x+1;i++)r=is(t,e.z+1,i,o),r&&n.top.push(r),r=is(t,e.z-1,i,o),r&&n.bottom.push(r)}return n}(t,r)}),Object.keys(n).forEach(r=>{const o=n[parseInt(r,10)];o.forEach(i=>{i.group=o.filter(s=>s!==i)})}),t}class AF{build(e,n){const r=[];return e.forEach(o=>{const i=n.list[o[3]];if(i){const s=new jt(o[0],o[1],o[2],o[3],i.groupnr);r.push(s)}}),ss(r,n),r}}const VE=[{id:"MODE_SOLVABLE",builder:class{build(e,n){const r=[];e.forEach(s=>{r.push(new jt(s[0],s[1],s[2],0,0))}),ss(r,n);let o=this.solve(r,n),i=1;for(;0===o.length&&i<100;)r.forEach(s=>{s.picked=!1,s.v=0,s.groupnr=0}),o=this.solve(r,n),i++;return r.forEach(s=>{s.picked=!1}),ss(r,n),r.sort((s,a)=>s.v-a.v),r}solve(e,n){const r=[],o=[];for(n.groups.forEach(i=>{const s=i.tiles.slice(),a=Ln(s),l=Ln(s),u=Ln(s),c=s[0];o.push([a,l]),o.push([u,c])});o.length>0;){const i=Ln(o),s=e.filter(u=>!u.picked&&!u.isBlocked());if(s.length<2)return[];const a=Ln(s),l=Ln(s);a.v=i[0].v,a.img=i[0].img,a.groupnr=i[0].groupnr,a.picked=!0,l.v=i[1].v,l.img=i[1].img,l.groupnr=i[1].groupnr,l.picked=!0,r.push(i)}return r}}},{id:"MODE_LINEAR",builder:class{build(e,n){const r=n.list.filter(i=>void 0!==i),o=[];return e.forEach(i=>{const s=Ln(r),a=new jt(i[0],i[1],i[2],s.v,s.groupnr);o.push(a)}),ss(o,n),o}}},{id:"MODE_RANDOM",builder:class{build(e,n){const r=n.list.filter(s=>void 0!==s),o=[],i=e.slice(0);for(;r.length>0;){const s=Ln(r),a=Ln(i);o.push(new jt(a[0],a[1],a[2],s.v,s.groupnr))}return ss(o,n),o}}}];class BE{constructor(){this.tiles=new wF,this.modes=VE}build(e,n){let r;if("load"===e)r=new AF;else{const o=VE.find(i=>i.id===e);o&&(r=new o.builder)}if(r)return r.build(n,this.tiles)}}class PF{constructor(){this.builder=new BE,this.free=[],this.stones=[],this.count=0,this.hints={groups:[],current:void 0},this.selected=void 0}clearSelection(){this.selected&&(this.selected.selected=!1),this.selected=void 0}setStoneSelected(e){this.clearSelection(),e&&(e.selected=!0,this.selected=e)}clearHints(){this.hints.current&&this.hints.current.stones.forEach(e=>{e.hinted=!1}),this.hints={groups:[],current:void 0}}hint(){if(this.hintNext()||(this.clearHints(),0===this.free.length))return;const e=this.collectHints();if(this.selected){const r=this.selected.groupnr;e.sort((o,i)=>o.group===r?-1:i.group===r?1:0)}const n=e[0];this.hints={groups:e,current:n},n.stones.forEach(r=>{r.hinted=!0})}reset(){this.clearSelection(),this.clearHints(),this.free=[],this.count=0,this.stones=[]}update(){const n=[];let r=0;this.stones.forEach(o=>{o.state={blocked:!o.picked&&o.isBlocked(),removable:!1},r+=o.picked?0:1}),this.stones.forEach(o=>{o.state.removable=!o.picked&&!o.state.blocked&&(o=>o.group.filter(i=>!i.picked&&!i.isBlocked()).length>0)(o),o.state.removable&&n.push(o)}),this.free=n,this.count=r}load(e,n){if(!e)return;const r=this.builder.build("load",e);!r||(n.forEach(o=>{const i=is(r,o[0],o[1],o[2]);i&&(i.picked=!0)}),this.stones=r)}save(){return this.stones.map(e=>[e.z,e.x,e.y,e.v])}applyMapping(e,n){this.stones=this.builder.build(n,e)||[]}hintNext(){if(!this.hints.current)return!1;this.hints.current.stones.forEach(n=>{n.hinted=!1});let e=this.hints.groups.indexOf(this.hints.current);return e>=0&&(e++,e>=this.hints.groups.length&&(e=0),e<this.hints.groups.length)&&(this.hints.current=this.hints.groups[e],this.hints.current.stones.forEach(n=>{n.hinted=!0}),!0)}collectHints(){const e={};return this.free.forEach(n=>{const r=n.groupnr.toString();e[r]=e[r]||[],e[r].push(n)}),Object.keys(e).map(n=>({group:e[n][0].groupnr,stones:e[n]}))}}class NF{constructor(){this.elapsed=0,this.lastTime=0,this.started=0,this.timer=void 0}start(){this.timer||(this.elapsed=this.elapsed||0)}reset(){this.timer&&(window.clearTimeout(this.timer),this.timer=void 0),this.started=0,this.lastTime=0,this.elapsed=0}run(){this.timer||(this.lastTime=Date.now(),this.timer=window.setTimeout(()=>{this.step()},1e3))}pause(){if(!this.timer)return;window.clearTimeout(this.timer),this.timer=void 0;const e=Date.now();this.elapsed+=e-this.lastTime}step(){const e=Date.now();this.elapsed+=e-this.lastTime,this.lastTime=e,this.timer=window.setTimeout(()=>{this.step()},1e3)}}class xF{constructor(){this.enabled=!0,this.audioplayers={}}play(e){if(this.enabled){if(!this.audioplayers[e]){const n=new Audio;n.src=`addon/mahjong/dist/assets/sounds/${e}.ogg`,n.load(),this.audioplayers[e]=n}this.audioplayers[e].play().catch(n=>{console.error(n)})}}pause(e){this.audioplayers[e]&&this.audioplayers[e].pause()}}class RF{constructor(e){this.storage=e,this.clock=new NF,this.board=new PF,this.sound=new xF,this.state=0,this.layoutID=void 0,this.undo=[]}init(){this.load(),this.board.update(),1===this.state&&this.pause(),this.message={msgID:this.isPaused()?"MSG_CONTINUE_SAVE":"MSG_START"}}click(e){return e?!this.isRunning()||e.state.blocked?(this.sound.play("invalid"),!0):(0===this.clock.elapsed&&this.clock.run(),this.board.selected&&e&&e!==this.board.selected&&e.groupnr===this.board.selected.groupnr?(this.resolveMatchingStone(e),!0):(this.board.setStoneSelected(this.board.selected!==e?e:void 0),this.sound.play("select"),!0)):(this.board.clearSelection(),!1)}isRunning(){return 1===this.state}isFreezed(){return 3===this.state}isPaused(){return 2===this.state}isIdle(){return 0===this.state}resume(){this.run(),this.clock.run()}freeze(){this.setState(3),this.clock.pause()}unfreeze(){this.setState(1),this.clock.run()}run(){this.board.clearHints(),this.board.update(),this.setState(1)}hint(){this.board.hint()}toggle(){1===this.state?this.pause():2===this.state&&this.resume()}pause(){this.clock.pause(),this.setState(2,"MSG_CONTINUE_PAUSE"),this.save()}reset(){this.clock.reset(),this.setState(0),this.board.reset(),this.undo=[]}start(e,n){this.layoutID=e.id,this.board.applyMapping(e.mapping,n),this.board.update(),this.run()}back(){if(!this.isRunning()||this.undo.length<2)return;this.board.clearSelection(),this.board.clearHints();const e=this.undo.pop(),n=this.undo.pop();!e||!n||(this.board.stones.forEach(r=>{(r.z===e[0]&&r.x===e[1]&&r.y===e[2]||r.z===n[0]&&r.x===n[1]&&r.y===n[2])&&(r.picked=!1)}),this.board.update())}load(){try{const e=this.storage.getState();if(e&&e.stones)return this.clock.elapsed=e.elapsed||0,this.undo=e.undo||[],this.layoutID=e.layout,this.state=e.state||0,this.board.load(e.stones,this.undo),!0}catch(e){console.error("load state failed",e)}return!1}save(){try{this.storage.storeState({elapsed:this.clock.elapsed,state:this.state,layout:this.layoutID||"",undo:this.undo,stones:this.board.save()})}catch(e){console.error("storing state failed",e)}}gameOverLoosing(){const e=this.layoutID||"unknown",n=this.storage.getScore(e)||{};n.playCount=(n.playCount||0)+1,this.storage.storeScore(e,n),this.gameOver("MSG_FAIL")}gameOverWining(){const e=this.layoutID||"unknown",n=this.clock.elapsed,r=this.storage.getScore(e)||{};r.playCount=(r.playCount||0)+1,!r.bestTime||r.bestTime>n?(r.bestTime=n,this.gameOver("MSG_BEST",n)):this.gameOver("MSG_GOOD",n),this.storage.storeScore(e,r)}delayedSave(){setTimeout(()=>{this.save()},500)}resolveMatchingStone(e){const n=this.board.selected;!n||(this.board.clearSelection(),this.undo.push([n.z,n.x,n.y],[e.z,e.x,e.y]),this.board.clearHints(),n.picked=!0,e.picked=!0,this.board.update(),this.board.count<2?this.gameOverWining():this.board.free.length<1?this.gameOverLoosing():(this.sound.play("match"),this.delayedSave()))}gameOver(e,n){this.sound.play("over"),this.setState(0,e,n),this.clock.reset(),this.delayedSave()}setState(e,n,r){this.message=n?{msgID:n,playTime:r}:void 0,this.state=e}}const FF=JSON.parse('{"RESTART":"New Game","UNDO":"Undo","PAUSE":"Pause","HINT":"Hint","STONES":"Stones","FREE":"Free","FULLSCREEN":"Fullscreen","HINT_LONG":"Show possible moves","UNDO_LONG":"Undo last move","RESTART_LONG":"Start a new game","PAUSE_LONG":"Continue/Pause game","MSG_CONTINUE_PAUSE":"Continue Game\u2026","MSG_CONTINUE_SAVE":"Continue Saved Game\u2026","MSG_START":"Start Game","MSG_PLAY_AGAIN":"Play again","MSG_BEST":"Congratulations, new best time!","MSG_GOOD":"Well done!","MSG_FAIL":"No more matching tiles.","STATS_GAMES":"Nr. of Games","STATS_BEST":"Best Time","LICENSE":"License","SHORTCUTS":"Shortcuts","SETTINGS":"Settings","STATS":"Stats","MODE":"Board Fill Algorithm","MODE_SOLVABLE":"Solvable","MODE_LINEAR":"Linear","MODE_RANDOM":"Random","AUDIO":"Audio","AUDIO_SOUNDS":"Sounds on/off","AUDIO_MUSIC":"Music","LANG":"Language","LANG_AUTO":"[Default]","OPEN_SETTINGS":"Click here to open the settings","OPEN_HELP":"Click here to open the help dialog","READ_MORE_WIKIPEDIA":"Read more on wikipedia","READ_MORE_WIKIPEDIA_URL":"https://en.wikipedia.org/wiki/Mahjong_tiles","TILES_INFO":"Tiles Information","TILES":"Tiles","MODE_SOLVABLE_DESC":"A random fill with at least one solving possibility","MODE_RANDOM_DESC":"A total random fill, maybe unsolvable","MODE_LINEAR_DESC":"A backwards fill, always solvable, maybe boring to experienced players","SELECT_BOARD":"Select Board","BOARD_GENERATOR":"Board Generator","START_SELECTED":"Start Selected","START_RANDOM":"Start Random","TILESET":"Tileset Art","BACKGROUND":"Background","INFO":"Info","BEST_TIMES":"Best Times","BEST_TIMES_CLEAR":"Clear Best Times","BEST_TIMES_CLEAR_SURE":"Clear All Best Times?\\nThis cannot be undone.","BEST_TIME_CLEAR":"Clear Best Time","BEST_TIME_CLEAR_SURE":"Clear Best Time?\\nThis cannot be undone.","SOURCE":"Source","GAME":"Game","DESIGNS":"Designs","SOUNDS":"Sounds","FONTS":"Fonts","BACKGROUNDS":"Backgrounds","BACK_NONE":"[None]","BACK_BAMBOO":"Bamboo","BACK_BLUE_CLOUDS":"Blue Clouds","BACK_GRAY_CLOUDS":"Gray Clouds","BACK_GRAY_GRASS":"Grass","BACK_GRAY_STONES":"Stones","BACK_GRAY_WOOD":"Wood Table","BACK_GRAY_WOOD_GRAIN":"Wood Grain","t_do1":"Pearl","t_do2":"Pine tree","t_do3":"Phoenix","t_do4":"Jade","t_do5":"Dragon","t_do6":"Peach","t_do7":"Insect","t_do8":"White Tiger","t_do9":"Unicorn","t_ba1":"Peacock","t_ba2":"Duck","t_ba3":"Toad","t_ba4":"Carp","t_ba5":"Lotus flower","t_ba6":"Water","t_ba7":"Tortoise","t_ba8":"Mushroom","t_ba9":"Willow tree","t_ch1":"Bar of door","t_ch2":"Sword","t_ch3":"Earth","t_ch4":"Lute","t_ch5":"House","t_ch6":"Fire","t_ch7":"Seven stars","t_ch8":"Knot","t_ch9":"Heaven","t_se_spring":"Spring","t_se_summer":"Summer","t_se_fall":"Fall","t_se_winter":"Winter","t_fl_bamboo":"Bamboo","t_fl_orchid":"Orchid","t_fl_plum":"Plum Blossom","t_fl_chrysanthemum":"Chrysan&shy;themum","t_wi_east":"East","t_wi_south":"South","t_wi_west":"West","t_wi_north":"North","t_dr_red":"Red dragon","t_dr_green":"Green dragon","t_dr_white":"White dragon","TILES_SUIT_CIRCLES":"Circles","TILES_SUIT_BAMBOO":"Bamboo","TILES_SUIT_CHARACTERS":"Characters","TILES_SUITS":"Suits","TILES_BONUS":"Bonus","TILES_BONUS_SEASONS":"Seasons","TILES_BONUS_FLOWERS":"Flowers","TILES_HONORS":"Honors","TILES_HONORS_WINDS":"Winds","TILES_HONORS_DRAGONS":"Dragons"}');var kF=$e.t(FF,2);const LF=JSON.parse('{"RESTART":"Neues Spiel","UNDO":"Zur\xfcck","PAUSE":"Pause","HINT":"Tip","STONES":"Steine","FREE":"Frei","FULLSCREEN":"Vollbild","HINT_LONG":"M\xf6gliche Z\xfcge anzeigen","UNDO_LONG":"Letzten Zug r\xfcckg\xe4ngig machen","RESTART_LONG":"Neues Spiel beginnen","PAUSE_LONG":"Spiel anhalten/fortfahren","MSG_CONTINUE_PAUSE":"Spiel fortsetzen\u2026","MSG_CONTINUE_SAVE":"Geladenes Spiel fortsetzen\u2026","MSG_START":"Spiel starten","MSG_PLAY_AGAIN":"Nochmal spielen","MSG_BEST":"Gratulation, neue Bestzeit!","MSG_GOOD":"Sehr sch\xf6n!","MSG_FAIL":"Keine passenden Ziegel mehr!","STATS_GAMES":"Anzahl Spiele","STATS_BEST":"Bestzeit","LICENSE":"Lizenz","SHORTCUTS":"Tastaturk\xfcrzel","SETTINGS":"Einstellungen","STATS":"Statistik","MODE":"Spielbrett-Algorithmus","MODE_SOLVABLE":"L\xf6sbar","MODE_LINEAR":"Linear","MODE_RANDOM":"Zuf\xe4llig","AUDIO":"Audio","AUDIO_SOUNDS":"T\xf6ne an/aus","AUDIO_MUSIC":"Musik","LANG":"Sprache","LANG_AUTO":"[Standard]","OPEN_SETTINGS":"Klick hier um die Einstellungen zu \xf6ffnen","OPEN_HELP":"Klick hier um die Hilfe zu \xf6ffnen","READ_MORE_WIKIPEDIA":"Mehr bei Wikipedia lesen","READ_MORE_WIKIPEDIA_URL":"https://de.wikipedia.org/wiki/Mah-Jongg","TILES_INFO":"Steinverzeichnis","TILES":"Steine","MODE_SOLVABLE_DESC":"Fast zuf\xe4lliger Aufbau mit mindestens einer L\xf6sung","MODE_RANDOM_DESC":"Zuf\xe4lliger Aufbau, vielleicht unl\xf6sbar","MODE_LINEAR_DESC":"Umgekehrter linearer Aufbau, immer l\xf6sbar, m\xf6glicherweise zu langweilig f\xfcr erfahrene Spieler*innen","SELECT_BOARD":"Spielbrett ausw\xe4hlen","BOARD_GENERATOR":"Spielgenerator","START_SELECTED":"Auswahl starten","START_RANDOM":"Zuf\xe4lliges starten","TILESET":"Stein-Motive","BACKGROUND":"Hintergrund","INFO":"Info","BEST_TIMES":"Bestzeiten","BEST_TIMES_CLEAR":"Bestzeiten l\xf6schen","BEST_TIMES_CLEAR_SURE":"Alle Bestzeiten l\xf6schen?\\nDies kann nicht r\xfcckg\xe4ngig gemacht werden.","BEST_TIME_CLEAR":"Bestzeit l\xf6schen","BEST_TIME_CLEAR_SURE":"Bestzeit l\xf6schen?\\nDies kann nicht r\xfcckg\xe4ngig gemacht werden.","SOURCE":"Quelle","GAME":"Spiel","DESIGNS":"Designs","SOUNDS":"T\xf6ne","FONTS":"Schriftarten","BACKGROUNDS":"Hintergr\xfcnde","BACK_NONE":"[Keiner]","BACK_BAMBOO":"Bambus","BACK_BLUE_CLOUDS":"Blaue Wolken","BACK_GRAY_CLOUDS":"Graue Wolken","BACK_GRAY_GRASS":"Gras","BACK_GRAY_STONES":"Steine","BACK_GRAY_WOOD":"Holztisch","BACK_GRAY_WOOD_GRAIN":"Holzmaserung","t_do1":"Perle","t_do2":"Kiefer","t_do3":"Ph\xf6nix","t_do4":"Jade","t_do5":"Drache","t_do6":"Pfirsich","t_do7":"Insekt","t_do8":"Wei\xdfer Tiger","t_do9":"Einhorn","t_ba1":"Pfau","t_ba2":"Ente","t_ba3":"Kr\xf6te","t_ba4":"Karpfen","t_ba5":"Lotusblume","t_ba6":"Wasser","t_ba7":"Schildkr\xf6te","t_ba8":"Pilz","t_ba9":"Weidenbaum","t_ch1":"Riegel","t_ch2":"Schwert","t_ch3":"Erde","t_ch4":"Laute","t_ch5":"Haus","t_ch6":"Feuer","t_ch7":"Sieben Sterne","t_ch8":"Knoten","t_ch9":"Himmel","t_se_spring":"Fr\xfchling","t_se_summer":"Summer","t_se_fall":"Herbst","t_se_winter":"Winter","t_fl_bamboo":"Bambus","t_fl_orchid":"Orchidee","t_fl_plum":"Pflaumenbl\xfcte","t_fl_chrysanthemum":"Chrysantheme","t_wi_east":"Osten","t_wi_south":"S\xfcden","t_wi_west":"Westen","t_wi_north":"Norden","t_dr_red":"Roter Drache","t_dr_green":"Gr\xfcne Drache","t_dr_white":"Wei\xdfer Drache","TILES_SUIT_CIRCLES":"Kreise","TILES_SUIT_BAMBOO":"Bambus","TILES_SUIT_CHARACTERS":"Zahlen","TILES_SUITS":"Grundfarben","TILES_BONUS":"Bonus","TILES_BONUS_SEASONS":"Jahreszeiten","TILES_BONUS_FLOWERS":"Blumen","TILES_HONORS":"Tr\xfcmpfe","TILES_HONORS_WINDS":"Winde","TILES_HONORS_DRAGONS":"Drachen"}');var VF=$e.t(LF,2);const BF=JSON.parse('{"RESTART":"Nieuw spel","UNDO":"Ongedaan maken","PAUSE":"Onderbreken","HINT":"Hint","STONES":"Aantal stenen","FREE":"Waarvan vrijliggend","FULLSCREEN":"Beeldvullend","HINT_LONG":"Toon de mogelijke zetten","UNDO_LONG":"Maak de vorige zet ongedaan","RESTART_LONG":"Start een nieuw spel","PAUSE_LONG":"Onderbreek/Hervat een spel","MSG_CONTINUE_PAUSE":"Spel voortzetten\u2026","MSG_CONTINUE_SAVE":"Opgeslagen spel voortzetten\u2026","MSG_START":"Spel starten","MSG_PLAY_AGAIN":"Opnieuw spelen","MSG_BEST":"Je hebt een nieuw record neergezet!","MSG_GOOD":"Goed gedaan!","MSG_FAIL":"Er zijn geen zetten meer mogelijk.","STATS_GAMES":"Aantal keer gespeeld","STATS_BEST":"Record","LICENSE":"Licentie","SHORTCUTS":"Sneltoetsen","SETTINGS":"Instellingen","STATS":"Statistieken","MODE":"Legwijze","MODE_SOLVABLE":"Oplosbaar","MODE_LINEAR":"Lineair","MODE_RANDOM":"Willekeurig","AUDIO":"Geluid","AUDIO_SOUNDS":"Geluid aan/uit","AUDIO_MUSIC":"Muziek","LANG":"Taal","LANG_AUTO":"[standaard]","OPEN_SETTINGS":"Klik hier om de instellingen te openen","OPEN_HELP":"Klik hier om het hulpvenster te openen","READ_MORE_WIKIPEDIA":"Lees meer hierover op Wikipedia (Engels)","READ_MORE_WIKIPEDIA_URL":"https://en.wikipedia.org/wiki/Mahjong_tiles","TILES_INFO":"Toon informatie over de stenen","TILES":"Stenen","MODE_SOLVABLE_DESC":"Een willekeurige legwijze met ten minste \xe9\xe9n oplossing","MODE_RANDOM_DESC":"Een willekeurige legwijze, mogelijk zonder oplossing","MODE_LINEAR_DESC":"Een achterwaarste legwijze met gegarandeerde oplossing","SELECT_BOARD":"Kies een spelbord","BOARD_GENERATOR":"Bordsamensteller","START_SELECTED":"Gekozen bord neerleggen","START_RANDOM":"Willekeurig bord","TILESET":"Steendecoraties","BACKGROUND":"Achtergrond","INFO":"Informatie","BEST_TIMES":"Records","BEST_TIMES_CLEAR":"Records wissen","BEST_TIMES_CLEAR_SURE":"Weet je zeker dat je alle records wilt wissen?\\nDit kan niet ongedaan worden gemaakt.","BEST_TIME_CLEAR":"Record wissen","BEST_TIME_CLEAR_SURE":"Weet je zeker dat je dit record wilt wissen?\\nDit kan niet ongedaan worden gemaakt.","SOURCE":"Bron","GAME":"Spel","DESIGNS":"Vormgeving","SOUNDS":"Geluiden","FONTS":"Lettertypen","BACKGROUNDS":"Achtergronden","BACK_NONE":"[geen]","BACK_BAMBOO":"Bamboe","BACK_BLUE_CLOUDS":"Blauwe lucht","BACK_GRAY_CLOUDS":"Grijze lucht","BACK_GRAY_GRASS":"Gras","BACK_GRAY_STONES":"Stenen","BACK_GRAY_WOOD":"Houten tafel","BACK_GRAY_WOOD_GRAIN":"Houtnerven","t_do1":"Parel","t_do2":"Pijnboom","t_do3":"Feniks","t_do4":"Jade","t_do5":"Draak","t_do6":"Perzik","t_do7":"Insect","t_do8":"Witte tijger","t_do9":"Eenhoorn","t_ba1":"Dagpauwoog","t_ba2":"Eend","t_ba3":"Pad","t_ba4":"Karper","t_ba5":"Lotusbloem","t_ba6":"Water","t_ba7":"Schildpad","t_ba8":"Paddestoel","t_ba9":"Wilg","t_ch1":"Deurklink","t_ch2":"Zwaard","t_ch3":"Aarde","t_ch4":"Luit","t_ch5":"Huis","t_ch6":"Vuur","t_ch7":"Zeven sterren","t_ch8":"Knoop","t_ch9":"Hemel","t_se_spring":"Lente","t_se_summer":"Zomer","t_se_fall":"Herfst","t_se_winter":"Winter","t_fl_bamboo":"Bamboe","t_fl_orchid":"Orchidee","t_fl_plum":"Japanse abrikoos","t_fl_chrysanthemum":"Chrysan&shy;themum","t_wi_east":"Oosten","t_wi_south":"Zuiden","t_wi_west":"Westen","t_wi_north":"Noorden","t_dr_red":"Rode draak","t_dr_green":"Groene draak","t_dr_white":"Witte draak","TILES_SUIT_CIRCLES":"Cirkels","TILES_SUIT_BAMBOO":"Bamboe","TILES_SUIT_CHARACTERS":"Symbolen","TILES_SUITS":"Sets","TILES_BONUS":"Bonus","TILES_BONUS_SEASONS":"Seizoenen","TILES_BONUS_FLOWERS":"Bloemen","TILES_HONORS":"Eretekens","TILES_HONORS_WINDS":"Winden","TILES_HONORS_DRAGONS":"Draken"}');var HF=$e.t(BF,2);const jF=JSON.parse('{"RESTART":"Novo Jogo","UNDO":"Voltar","PAUSE":"Pausar","HINT":"Dica","STONES":"Pe\xe7as","FREE":"Livres","FULLSCREEN":"Tela Cheia","HINT_LONG":"Mostrar movimentos poss\xedveis","UNDO_LONG":"Desfazer \xfaltima jogada","RESTART_LONG":"Come\xe7ar um novo jogo","PAUSE_LONG":"Continuar/Pausar jogo","MSG_CONTINUE_PAUSE":"Continuar\u2026","MSG_CONTINUE_SAVE":"Continuar Jogo Salvo\u2026","MSG_START":"Come\xe7ar","MSG_PLAY_AGAIN":"Jogar novamente","MSG_BEST":"Parab\xe9ns, novo tempo recorde!","MSG_GOOD":"Parab\xe9ns!","MSG_FAIL":"N\xe3o h\xe1 mais pe\xe7as livres.","STATS_GAMES":"N\xfamero de Jogos","STATS_BEST":"Melhor tempo","LICENSE":"Licensa","SHORTCUTS":"Atalhos","SETTINGS":"Configura\xe7\xf5es","STATS":"Estat\xedsticas","MODE":"Algoritmo de preenchimento de placa","MODE_SOLVABLE":"Sol\xfavel","MODE_LINEAR":"Linear","MODE_RANDOM":"Aleatoriamente","AUDIO":"\xc1udio","AUDIO_SOUNDS":"Sons","AUDIO_MUSIC":"M\xfasica","LANG":"L\xedngua","LANG_AUTO":"[Autom\xe1tico]","OPEN_SETTINGS":"Clique aqui para abrir as configura\xe7\xf5es","OPEN_HELP":"Clique aqui para abrir a ajuda","READ_MORE_WIKIPEDIA":"Leia mais na wikipedia","READ_MORE_WIKIPEDIA_URL":"https://pt.wikipedia.org/wiki/Mahjong","TILES_INFO":"Informa\xe7\xf5es sobre as pe\xe7as","TILES":"Pe\xe7as","MODE_SOLVABLE_DESC":"Um preenchimento aleat\xf3rio com pelo menos uma possibilidade de solu\xe7\xe3o","MODE_RANDOM_DESC":"Um preenchimento totalmente aleat\xf3rio, talvez insol\xfavel","MODE_LINEAR_DESC":"Um preenchimento reverso, sempre solucion\xe1vel, talvez enfadonho para jogadores experientes","SELECT_BOARD":"Selecione o tabuleiro","BOARD_GENERATOR":"Gerador de placa","START_SELECTED":"Jogar Selecionado","START_RANDOM":"Jogar Aleat\xf3rio","TILESET":"Pe\xe7as","BACKGROUND":"Papel de Parede","INFO":"Informa\xe7\xf5es","BEST_TIMES":"Melhores tempos","BEST_TIMES_CLEAR":"Limpar os melhores tempos","BEST_TIMES_CLEAR_SURE":"Limpar todos os melhores momentos?\\nIsto n\xe3o pode ser desfeito.","BEST_TIME_CLEAR":"Limpar melhor hora","BEST_TIME_CLEAR_SURE":"Limpar melhor hora?\\nIsto n\xe3o pode ser desfeito.","SOURCE":"Fonte","GAME":"Jogo","DESIGNS":"Desenhos","SOUNDS":"Sons","FONTS":"Fontes","BACKGROUNDS":"Fundos","BACK_NONE":"[Nenhum]","BACK_BAMBOO":"Bambu","BACK_BLUE_CLOUDS":"Nuvens Azuis","BACK_GRAY_CLOUDS":"Nuvens Cinzentas","BACK_GRAY_GRASS":"Grama","BACK_GRAY_STONES":"Pedras","BACK_GRAY_WOOD":"Mesa de madeira","BACK_GRAY_WOOD_GRAIN":"Gr\xe3o de madeira","t_do1":"Pearl","t_do2":"Pine tree","t_do3":"Phoenix","t_do4":"Jade","t_do5":"Dragon","t_do6":"Peach","t_do7":"Insect","t_do8":"White Tiger","t_do9":"Unicorn","t_ba1":"Peacock","t_ba2":"Duck","t_ba3":"Toad","t_ba4":"Carp","t_ba5":"Lotus flower","t_ba6":"Water","t_ba7":"Tortoise","t_ba8":"Mushroom","t_ba9":"Willow tree","t_ch1":"Bar of door","t_ch2":"Sword","t_ch3":"Earth","t_ch4":"Lute","t_ch5":"House","t_ch6":"Fire","t_ch7":"Seven stars","t_ch8":"Knot","t_ch9":"Heaven","t_se_spring":"Spring","t_se_summer":"Summer","t_se_fall":"Fall","t_se_winter":"Winter","t_fl_bamboo":"Bamboo","t_fl_orchid":"Orchid","t_fl_plum":"Plum Blossom","t_fl_chrysanthemum":"Chrysan&shy;themum","t_wi_east":"East","t_wi_south":"South","t_wi_west":"West","t_wi_north":"North","t_dr_red":"Red dragon","t_dr_green":"Green dragon","t_dr_white":"White dragon","TILES_SUIT_CIRCLES":"Circles","TILES_SUIT_BAMBOO":"Bamboo","TILES_SUIT_CHARACTERS":"Characters","TILES_SUITS":"Suits","TILES_BONUS":"Bonus","TILES_BONUS_SEASONS":"Seasons","TILES_BONUS_FLOWERS":"Flowers","TILES_HONORS":"Honors","TILES_HONORS_WINDS":"Winds","TILES_HONORS_DRAGONS":"Dragons"}');var UF=$e.t(jF,2);const GF=JSON.parse('{"RESTART":"\u041d\u043e\u0432\u0430\u044f \u0438\u0433\u0440\u0430","UNDO":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c","PAUSE":"\u041f\u0430\u0443\u0437\u0430","HINT":"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430","STONES":"\u0424\u0438\u0448\u043a\u0438","FREE":"\u0425\u043e\u0434\u044b","FULLSCREEN":"\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439","HINT_LONG":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0445\u043e\u0434\u044b","UNDO_LONG":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0445\u043e\u0434","RESTART_LONG":"\u041d\u0430\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0438\u0433\u0440\u0443","PAUSE_LONG":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c / \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0433\u0440\u0443","MSG_CONTINUE_PAUSE":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u0433\u0440\u0443\u2026","MSG_CONTINUE_SAVE":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u0443\u044e \u0438\u0433\u0440\u0443\u2026","MSG_START":"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0433\u0440\u0443","MSG_PLAY_AGAIN":"\u0418\u0433\u0440\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430","MSG_BEST":"\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0441 \u043d\u043e\u0432\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c!","MSG_GOOD":"\u041e\u0442\u043b\u0438\u0447\u043d\u043e!","MSG_FAIL":"\u041d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0444\u0438\u0448\u0435\u043a.","STATS_GAMES":"\u2116 \u0438\u0433\u0440","STATS_BEST":"\u041b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f","LICENSE":"\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f","SHORTCUTS":"\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438","SETTINGS":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","STATS":"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430","MODE":"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u043a\u0438","MODE_SOLVABLE":"\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c\u044b\u0439","MODE_LINEAR":"\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439","MODE_RANDOM":"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439","AUDIO":"\u0410\u0443\u0434\u0438\u043e","AUDIO_SOUNDS":"\u0417\u0432\u0443\u043a\u0438","AUDIO_MUSIC":"\u041c\u0443\u0437\u044b\u043a\u0430","LANG":"\u042f\u0437\u044b\u043a","LANG_AUTO":"[\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e]","OPEN_SETTINGS":"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","OPEN_HELP":"\u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u0438","READ_MORE_WIKIPEDIA":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438","READ_MORE_WIKIPEDIA_URL":"https://ru.wikipedia.org/wiki/%D0%9C%D0%B0%D0%B4%D0%B6%D0%BE%D0%BD%D0%B3_(%D0%BF%D0%B0%D1%81%D1%8C%D1%8F%D0%BD%D1%81)","TILES_INFO":"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0433\u0440\u044b","TILES":"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","MODE_SOLVABLE_DESC":"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0430 \u0441 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f","MODE_RANDOM_DESC":"\u041f\u043e\u043b\u043d\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c\u0430\u044f ","MODE_LINEAR_DESC":"\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0435\u0448\u0430\u0435\u043c\u0430\u044f, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u0443\u0447\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u043a\u043e\u0432","SELECT_BOARD":"\u0412\u044b\u0431\u043e\u0440 \u043a\u0430\u0440\u0442\u044b","BOARD_GENERATOR":"\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043b\u0430\u0442\u044b","START_SELECTED":"\u041d\u0430\u0447\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043e","START_RANDOM":"\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439","TILESET":"\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0444\u0438\u0448\u0435\u043a","BACKGROUND":"\u0424\u043e\u043d","INFO":"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","BEST_TIMES":"\u041b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f","BEST_TIMES_CLEAR":"\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f","BEST_TIMES_CLEAR_SURE":"\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f?\\n\u042d\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e.","BEST_TIME_CLEAR":"\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f","BEST_TIME_CLEAR_SURE":"\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f?\\n\u042d\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e.","SOURCE":"\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a","GAME":"\u0418\u0433\u0440\u0430","DESIGNS":"\u0414\u0438\u0437\u0430\u0439\u043d","SOUNDS":"\u0417\u0432\u0443\u043a\u0438","FONTS":"\u0428\u0440\u0438\u0444\u0442\u044b","BACKGROUNDS":"\u0424\u043e\u043d\u044b","BACK_NONE":"[\u041d\u0438\u043a\u0442\u043e]","BACK_BAMBOO":"\u0411\u0430\u043c\u0431\u0443\u043a","BACK_BLUE_CLOUDS":"\u0421\u0438\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u043a\u0430","BACK_GRAY_CLOUDS":"\u0421\u0435\u0440\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430","BACK_GRAY_GRASS":"\u0422\u0440\u0430\u0432\u0430","BACK_GRAY_STONES":"\u041a\u0430\u043c\u043d\u0438","BACK_GRAY_WOOD":"\u0414\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b","BACK_GRAY_WOOD_GRAIN":"\u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u0434\u0440\u0435\u0432\u0435\u0441\u0438\u043d\u044b","t_do1":"Pearl","t_do2":"Pine tree","t_do3":"Phoenix","t_do4":"Jade","t_do5":"Dragon","t_do6":"Peach","t_do7":"Insect","t_do8":"White Tiger","t_do9":"Unicorn","t_ba1":"Peacock","t_ba2":"Duck","t_ba3":"Toad","t_ba4":"Carp","t_ba5":"Lotus flower","t_ba6":"Water","t_ba7":"Tortoise","t_ba8":"Mushroom","t_ba9":"Willow tree","t_ch1":"Bar of door","t_ch2":"Sword","t_ch3":"Earth","t_ch4":"Lute","t_ch5":"House","t_ch6":"Fire","t_ch7":"Seven stars","t_ch8":"Knot","t_ch9":"Heaven","t_se_spring":"Spring","t_se_summer":"Summer","t_se_fall":"Fall","t_se_winter":"Winter","t_fl_bamboo":"Bamboo","t_fl_orchid":"Orchid","t_fl_plum":"Plum Blossom","t_fl_chrysanthemum":"Chrysan&shy;themum","t_wi_east":"East","t_wi_south":"South","t_wi_west":"West","t_wi_north":"North","t_dr_red":"Red dragon","t_dr_green":"Green dragon","t_dr_white":"White dragon","TILES_SUIT_CIRCLES":"Circles","TILES_SUIT_BAMBOO":"Bamboo","TILES_SUIT_CHARACTERS":"Characters","TILES_SUITS":"Suits","TILES_BONUS":"Bonus","TILES_BONUS_SEASONS":"Seasons","TILES_BONUS_FLOWERS":"Flowers","TILES_HONORS":"Honors","TILES_HONORS_WINDS":"Winds","TILES_HONORS_DRAGONS":"Dragons"}'),as={en:{title:"English",data:kF},de:{title:"Deutsch",data:VF},nl:{title:"Nederlands",data:HF},pt:{title:"Portugu\xeas",data:UF},ru:{title:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",data:$e.t(GF,2)}},WF=Object.keys(as).map(t=>({key:t,title:as[t].title}));class zF{constructor(e){this.storageProvider=e,this.lang="auto",this.sounds=!0,this.tileset="riichi",this.background="",this.stats={games:0,bestTime:0}}load(){try{const e=this.storageProvider.getSettings();return e&&(this.lang=e.lang||"auto",this.tileset=e.tileset||"riichi",this.background=e.background,this.sounds=e.sounds||!1),!0}catch(e){console.error("load settings failed",e)}return!1}save(){try{return this.storageProvider.storeSettings({lang:this.lang,sounds:this.sounds,background:this.background,tileset:this.tileset}),!0}catch(e){console.error("storing settings failed",e)}return!1}}let yl=(()=>{class t{constructor(){this.prefix="mah.",this.updateData()}getScore(n){return this.get(`score.${n}`)}getSettings(){return this.get("settings")}getState(){return this.get("state")}getLastPlayed(){if(localStorage)try{return localStorage.getItem("last")||void 0}catch(n){console.error(n)}}storeLastPlayed(n){if(localStorage)try{n?localStorage.setItem("last",n):localStorage.removeItem("last")}catch(r){console.error(r)}}storeScore(n,r){this.set(`score.${n}`,r)}clearScore(n){this.set(`score.${n}`,void 0)}storeSettings(n){this.set("settings",n)}storeState(n){this.set("state",n)}get(n){if(localStorage)try{const r=localStorage.getItem(`${this.prefix}${n}`);return r?JSON.parse(r):void 0}catch(r){return}}set(n,r){!localStorage||(void 0===r?localStorage.removeItem(`${this.prefix}${n}`):localStorage.setItem(this.prefix+n,JSON.stringify(r)))}updateData(){if(localStorage)try{let n=localStorage.getItem("state");n&&(localStorage.removeItem("state"),this.set("state",JSON.parse(n))),n=localStorage.getItem("settings"),n&&(localStorage.removeItem("settings"),this.set("settings",JSON.parse(n)))}catch(n){console.error(n)}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ls=(()=>{class t{constructor(n,r){this.storage=n,this.translate=r,this.name="Mah Jong",this.game=new RF(n),this.settings=new zF(n),this.settings.load(),this.setupTranslations(),this.setLang(),this.game.init()}setLang(){let n;n=this.settings.lang&&"auto"!==this.settings.lang?this.settings.lang:(navigator.language.split("-")[0]||"en").toLowerCase(),Object.keys(as).indexOf(n)>=0?this.translate.use(n):this.translate.use("en")}toggleSound(){this.settings.sounds=!this.settings.sounds,this.game.sound.enabled=this.settings.sounds,this.settings.save()}setupTranslations(){Object.keys(as).forEach(n=>{this.translate.setTranslation(n,as[n].data)}),this.translate.setDefaultLang("en")}}return t.\u0275fac=function(n){return new(n||t)(I(yl),I(Ir))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();function or(t,e,n,r){return new(n||(n=Promise))(function(i,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?i(c.value):function(i){return i instanceof n?i:new n(function(s){s(i)})}(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function JF(t){return or(this,void 0,void 0,function*(){const e=t.replace(/\r\n/g,"\n").split("\n"),n=e[0]||"";if(["Kyodai 3.0","Kyodai 6.0"].includes(n)){const r=(e[1]||"").split("::"),o=r[0]||"",i=r[1],s=e[2]||"",a=yield function(t,e){return or(this,void 0,void 0,function*(){return function(t,e,n,r,o){return or(this,void 0,void 0,function*(){const i=e*n;if(o.length!==i*t)return Promise.reject(Error("Invalid Matrix Pattern length"));const a={name:r,cat:"Import",mapping:[]};for(let l=0;l<t;l++){const u=o.slice(l*i,(l+1)*i);for(let c=0;c<e;c++)u.slice(c*n,(c+1)*n).split("").forEach((f,h)=>{"1"===f&&a.mapping.push([l,h,c])})}return a})}(5,20,34,t,e)})}(o,s);return a.cat=i||a.cat,a}return Promise.reject(Error(`Unknown .lay format ${JSON.stringify((n||"").slice(0,50))}`))})}function ZF(t){const e=[];return t.forEach(n=>{const r=n[0];n[1].forEach(i=>{const s=i[0],a=i[1];Array.isArray(a)?a.forEach(l=>{if(Array.isArray(l)){let u=l[0];const c=l[1];for(let d=0;d<c;d++)e.push([r,u,s]),u+=2}else e.push([r,l,s])}):e.push([r,a,s])})}),e}function ek(t){const e=[];return t&&t.forEach(n=>{for(let r=0;r<(n[3]||1);r++)e.push([n[0],n[1]+2*r,n[2]])}),e}function $E(t){return function(t){let n,r,e=0;if(0===t.length)return e;for(n=0;n<t.length;n++)r=t.charCodeAt(n),e=(e<<5)-e+r,e|=0;return e+2147483647}(JSON.stringify(t)).toString()}function WE(t,e,n){const r={x:77*e/2-8*t+37.5,y:102*n/2-8*t+50,z:n+18*(e+38*t),translate:""};return r.translate=`translate(${r.x},${r.y})`,r}function zE(t){const e=n=>n.pos.z;return t.sort((n,r)=>{const o=e(n),i=e(r);return o<i?-1:o>i?1:0})}function qE(t,e,n,r){const o=function(t,e,n){const r=Math.max(e,n),o=[r,r,0,0];return t.forEach(i=>{o[0]=Math.min(o[0],i.pos.x),o[1]=Math.min(o[1],i.pos.y),o[2]=Math.max(o[2],i.pos.x),o[3]=Math.max(o[3],i.pos.y)}),o}(t,e,n);return(r?[-o[3]-100-10,-o[0]-30,o[3]+100-10,o[2]+o[0]+75+40]:[o[0]-40,o[1]-20,o[2]+100+40,o[3]+100+20]).join(" ")}function KE(t){const e=function(t){const e=new jt(0,0,0,0,0);return zE(t.map(r=>({z:r[0],x:r[1],y:r[2],v:0,visible:!0,pos:WE(r[0],r[1],r[2]),source:e})))}(t),n=qE(e,1470,960,!1),r=[];r.push(`<svg xmlns="http://www.w3.org/2000/svg" class="board-svg" viewBox="${n}" preserveAspectRatio="xMidYMid meet" height="100%" width="100%">`);for(const o of e)r.push(`<g transform="${o.pos.translate}"><rect class="stone" fill="#FFF9E5" stroke-width="2" stroke="black" x="0" y="0" width="75" height="100" rx="10" ry="10"></rect></g>`);return r.push("</svg>"),`data:image/svg+xml;base64,${window.btoa(r.join(""))}`}let Dl=(()=>{class t{constructor(n,r){this.http=n,this.sanitizer=r}get(){return or(this,void 0,void 0,function*(){if(this.layouts)return this.layouts;const n=yield this.http.get("addon/mahjong/dist/assets/data/boards.json").toPromise(),r=[];for(const o of n){const i=o.name,s=o.cat||"Classic";let a=[];if(o.map&&(a=ZF(o.map)),o.mapping&&(a=ek(o.mapping)),a.length>0){const l={id:o.id?o.id:$E(a),name:i,category:s,mapping:a,previewSVG:this.sanitizer.bypassSecurityTrustUrl(KE(a))};r.push(l)}}return this.layouts={items:r},this.layouts})}importFile(n){return or(this,void 0,void 0,function*(){const r=yield t.readFile(n);let o=yield JF(r);o=function(t){t.name=t.name.trim();const e=t.name.split(" by ");e.length>1&&(t.name=e[0].trim(),t.by=e[1].trim()),t.name=t.name.split(" ").map(i=>i[0].toUpperCase()+i.slice(1)).join(" ");let n=t.mapping[0][0],r=t.mapping[0][1],o=t.mapping[0][2];return t.mapping.forEach(i=>{n=Math.min(i[0],n),r=Math.min(i[1],r),o=Math.min(i[2],o)}),t.mapping.forEach(i=>{i[0]=i[0]-(n||0),i[1]=i[1]-(r||0),i[2]=i[2]-(o||0)}),t}(o);const i=this.sanitizer.bypassSecurityTrustUrl(KE(o.mapping));return{id:$E(o.mapping),name:o.name,mapping:o.mapping,category:o.cat||"Import",previewSVG:i}})}static readFile(n){return or(this,void 0,void 0,function*(){const r=new FileReader;return new Promise((o,i)=>{r.onload=()=>{o(r.result)},r.onerror=()=>{i(Error(`Reading File failed: ${r.error}`))},r.readAsBinaryString(n)})})}}return t.\u0275fac=function(n){return new(n||t)(I(Kd),I(Ka))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})(),QE=(()=>{class t{constructor(n){this.http=n,this.cache={}}get(n){return or(this,void 0,void 0,function*(){let r=this.cache[n];if(r){if(r.data)return r.data;if(r.request)return r.request}r={};const o=new Promise((i,s)=>{this.http.get(`addon/mahjong/dist/assets/svg/${n}.svg`,{responseType:"text"}).subscribe(a=>{r.data=a,r.request=void 0,i(a)},a=>{s(a)})});return r.request=o,this.cache[n]=r,o})}}return t.\u0275fac=function(n){return new(n||t)(I(Kd))},t.\u0275prov=B({token:t,factory:t.\u0275fac}),t})();const ok=["app-image-set-loader",""];let YE=(()=>{class t{constructor(n,r){this.elementRef=n,this.svgdef=r}ngOnChanges(n){this.getImageSet()}getImageSet(){!this.imageSet||this.svgdef.get(this.imageSet).then(n=>{let r=n.split("<defs>")[1].split("</defs>")[0];r=r.replace(/xlink:href="\./g,'xlink:href="assets/svg').replace(/ id="t_/g,` id="${this.prefix}t_`),setTimeout(()=>{for(;this.elementRef.nativeElement.firstChild;)this.elementRef.nativeElement.removeChild(this.elementRef.nativeElement.firstChild);if(this.elementRef.nativeElement.innerHTML=r,!this.elementRef.nativeElement.firstChild){const o=(new DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">${r}</svg>`,"application/xml"),i=this.elementRef.nativeElement.ownerDocument.importNode(o.documentElement,!0);this.elementRef.nativeElement.appendChild(i)}},0)}).catch(n=>{console.error(n)})}}return t.\u0275fac=function(n){return new(n||t)(v(Re),v(QE))},t.\u0275cmp=Ot({type:t,selectors:[["","app-image-set-loader",""]],inputs:{imageSet:"imageSet",prefix:"prefix"},features:[Be],attrs:ok,decls:1,vars:0,template:function(n,r){1&n&&(Hr(),te(0,"defs"))},encapsulation:2}),t})(),ik=(()=>{class t{transform(n,r){return`${r}${n}`}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=We({name:"prefix",type:t,pure:!0}),t})();function sk(t,e){if(1&t&&(Hr(),m(0,"title"),S(1),O(2,"translate"),_()),2&t){const n=Z().$implicit;E(1),k(A(2,1,n.url))}}function ak(t,e){if(1&t){const n=pt();Hr(),m(0,"g",9),x("mousedown",function(o){const s=Me(n).$implicit;return Z().onClick(o,s)}),m(1,"g",10),ue(2,sk,3,3,"title",11),te(3,"rect",12),te(4,"rect",13),te(5,"use",14),O(6,"prefix"),te(7,"use",15),_(),_()}if(2&t){const n=e.$implicit,r=Z();Cn("selected",n.source.selected)("hidden",n.source.picked)("hinted",n.source.hinted),st("transform",n.pos.translate),E(2),j("ngIf",n.url),E(3),st("href",K_(6,9,n.url,r.urlPrefix),null,"xlink")}}let lk=(()=>{class t{constructor(){this.clickEvent=new se,this.drawStones=[],this.rotate=!1,this.translate="",this.viewport="0 0 1470 960"}ngOnInit(){this.resize(window)}trackByDrawStone(n,r){return`${r.source.groupnr}/${r.source.v}`}ngOnChanges(n){n.tiles&&this.updateTiles(n.tiles.currentValue),n.background&&this.updateBackground(n.background.currentValue),n.imageSet&&(this.prefix=`b_${n.imageSet.currentValue}_`,this.urlPrefix=`#b_${n.imageSet.currentValue}_`)}onClick(n,r){this.clickEvent.emit(r?r.source:void 0),n.stopPropagation()}resize(n){const r=n.innerHeight>n.innerWidth;r!==this.rotate&&(this.rotate=r,this.translate=this.rotate?"rotate(90)":"",this.setViewPort())}onResize(n){const r=n.target;r&&this.resize(r)}setViewPort(){this.viewport=qE(this.drawStones,1470,960,this.rotate)}updateTiles(n){if(!n)return;const r=n.filter(o=>void 0!==o).map(o=>{var i;return{z:o.z,x:o.x,y:o.y,v:o.v,visible:!0,url:null===(i=o.img)||void 0===i?void 0:i.id,pos:WE(o.z,o.x,o.y),source:o}});this.drawStones=zE(r),this.setViewPort()}updateBackground(n){const r=kE.find(o=>o.img===n);this.backgroundUrl=r&&r.img?`url("assets/img/${r.img}")`:void 0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=Ot({type:t,selectors:[["app-board"]],hostVars:2,hostBindings:function(n,r){2&n&&gc("background-image",r.backgroundUrl)},inputs:{background:"background",imageSet:"imageSet",tiles:"tiles"},outputs:{clickEvent:"clickEvent"},features:[Be],decls:10,vars:8,consts:[["xmlns","http://www.w3.org/2000/svg","preserveAspectRatio","xMidYMid meet",1,"board-svg",3,"resize","mousedown"],["id","filter4198-8",2,"color-interpolation-filters","sRGB"],["in","SourceGraphic","stdDeviation","8"],["id","front","width","300","height","400","viewBox","0 0 300 400"],["d","m 151.73588,1025.0177 c -3.32683,-9.3138 -10.24843,-68.45389 5.31821,-90.62655 20.27717,-26.12032 219.43558,-16.45796 231.55506,-9.93184 11.07433,5.31702 -178.60366,0.0589 -204.85126,34.86646 -21.59349,30.0006 -26.50086,82.17843 -32.02201,65.69193 z","transform","rotate(180,228.93649,666.47892)",2,"fill","#000000","fill-opacity","0.15","fill-rule","evenodd","stroke","none","filter","url(#filter4198-8)"],["transform","translate(5.9349307,-644.92912)","d","M -4.7687833,775.07096 C -9.6501835,741.99485 -16.84552,674.23676 -1.2788716,652.0641 18.998297,625.94378 233.50094,631.63117 263.31435,653.90999 276.21398,662.64856 70.349579,663.12124 47.099353,691.74479 24.390958,719.11242 0.65060847,818.18718 -4.7687833,775.07096 Z",2,"fill","#ffffff","fill-opacity","0.4","fill-rule","evenodd","stroke","none","filter","url(#filter4198-8)"],["app-image-set-loader","",3,"imageSet","prefix"],[1,"stage"],["class","draw",3,"selected","hidden","hinted","mousedown",4,"ngFor","ngForOf","ngForTrackBy"],[1,"draw",3,"mousedown"],[1,"tile"],[4,"ngIf"],["x","3","y","3","width","75px","height","100px","rx","10","ry","10",1,"shadow"],["x","0","y","0","width","75","height","100","rx","10","ry","10",1,"stone"],["x","6","y","6","width","63","height","88"],[0,"xlink","href","#front","x","0","y","0","width","75","height","100"]],template:function(n,r){1&n&&(Hr(),m(0,"svg",0),x("resize",function(i){return r.onResize(i)},!1,wp)("mousedown",function(i){return r.onClick(i)}),m(1,"defs"),m(2,"filter",1),te(3,"feGaussianBlur",2),_(),m(4,"svg",3),te(5,"path",4),te(6,"path",5),_(),_(),te(7,"defs",6),m(8,"g",7),ue(9,ak,8,12,"g",8),_(),_()),2&n&&(Cn("rotate",r.rotate),st("viewBox",r.viewport),E(7),j("imageSet",r.imageSet)("prefix",r.prefix),E(1),st("transform",r.translate),E(1),j("ngForOf",r.drawStones)("ngForTrackBy",r.trackByDrawStone))},directives:[YE,Qi,Ga],pipes:[ik,Ar],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block;background-repeat:repeat;background-size:cover}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.stage[_ngcontent-%COMP%]{transition:opacity .5s}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%]{transform-origin:50px 32.5px;opacity:1}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.hinted[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%]{transform:scale(1.12)}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.hinted[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%] > rect[_ngcontent-%COMP%]{stroke:#9f0000;stroke-width:3px}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.selected[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%]{transform:scale(1.04)}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.selected[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%] rect.stone[_ngcontent-%COMP%]{stroke:#000;fill:#f8eabb}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.selected.hinted[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%]{transform:scale(1.14)}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.selected.hinted[_ngcontent-%COMP%] g.tile[_ngcontent-%COMP%] > rect[_ngcontent-%COMP%]{stroke:#9f0000;stroke-width:3px}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.draw[_ngcontent-%COMP%] rect.shadow[_ngcontent-%COMP%]{fill:#191919;opacity:.6;stroke-width:1;stroke:#000}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.draw[_ngcontent-%COMP%] rect.stone[_ngcontent-%COMP%]{fill:#fff9e5;stroke-width:1;stroke:#000}[_nghost-%COMP%] .board-svg[_ngcontent-%COMP%] g.hidden[_ngcontent-%COMP%]{opacity:0}"]}),t})();let uk=(()=>{class t{constructor(n){this.app=n,this.version="1.3.1"}}return t.\u0275fac=function(n){return new(n||t)(v(ls))},t.\u0275cmp=Ot({type:t,selectors:[["app-help"]],decls:103,vars:53,consts:[[1,"help-content"],[1,"license"],[1,"license-list"],[1,"name"],[1,"info"],["rel","noopener","target","_blank","href","https://github.com/ffalt/mah/blob/main/README.md"],["rel","noopener","target","_blank","href","https://github.com/ffalt/mah/tree/main/src/assets/svg/README.md"],["rel","noopener","href","https://github.com/ffalt/mah/blob/main/src/assets/sounds/README.md"],["rel","noopener","target","_blank","href","https://github.com/ffalt/mah/blob/main/src/fonts/README.md"],["rel","noopener","target","_blank","href","https://github.com/ffalt/mah/blob/main/src/assets/img/README.md"],[1,"keyboard"],[1,"keyboard-list"],[1,"key"],[1,"func"]],template:function(n,r){1&n&&(m(0,"h1"),S(1),_(),m(2,"div",0),m(3,"div",1),m(4,"p"),S(5),O(6,"translate"),_(),m(7,"div",2),m(8,"div"),m(9,"div",3),S(10),O(11,"translate"),_(),m(12,"div",4),m(13,"a",5),S(14,"MIT"),_(),_(),_(),m(15,"div"),m(16,"div",3),S(17),O(18,"translate"),_(),m(19,"div",4),m(20,"a",6),S(21,"MIT / Public Domain / CCA4.0 / GNU"),_(),_(),_(),m(22,"div"),m(23,"div",3),S(24),O(25,"translate"),_(),m(26,"div",4),m(27,"a",7),S(28,"CC0/CC-BY3.0"),_(),_(),_(),m(29,"div"),m(30,"div",3),S(31),O(32,"translate"),_(),m(33,"div",4),m(34,"a",8),S(35,"SIL"),_(),_(),_(),m(36,"div"),m(37,"div",3),S(38),O(39,"translate"),_(),m(40,"div",4),m(41,"a",9),S(42,"Public Domain"),_(),_(),_(),_(),_(),m(43,"div",10),m(44,"p"),S(45),O(46,"translate"),_(),m(47,"div",11),m(48,"div"),m(49,"div",3),m(50,"span",12),S(51,"T"),_(),_(),m(52,"div",4),m(53,"span"),S(54),O(55,"translate"),_(),m(56,"span",13),S(57),O(58,"translate"),_(),_(),_(),m(59,"div"),m(60,"div",3),m(61,"span",12),S(62,"U"),_(),_(),m(63,"div",4),m(64,"span"),S(65),O(66,"translate"),_(),m(67,"span",13),S(68),O(69,"translate"),_(),_(),_(),m(70,"div"),m(71,"div",3),m(72,"span",12),S(73,"N"),_(),_(),m(74,"div",4),m(75,"span"),S(76),O(77,"translate"),_(),m(78,"span",13),S(79),O(80,"translate"),_(),_(),_(),m(81,"div"),m(82,"div",3),m(83,"span",12),S(84,"P"),_(),_(),m(85,"div",4),m(86,"span"),S(87),O(88,"translate"),_(),m(89,"span",13),S(90),O(91,"translate"),_(),_(),_(),m(92,"div"),m(93,"div",3),m(94,"span",12),S(95,"I"),_(),_(),m(96,"div",4),m(97,"span"),S(98),O(99,"translate"),_(),m(100,"span",13),S(101),O(102,"translate"),_(),_(),_(),_(),_(),_()),2&n&&(E(1),yo("\u{1f004}\ufe0f",r.app.name," Solitaire v",r.version,""),E(4),k(A(6,19,"LICENSE")),E(5),k(A(11,21,"GAME")),E(7),k(A(18,23,"DESIGNS")),E(7),k(A(25,25,"SOUNDS")),E(7),k(A(32,27,"FONTS")),E(7),k(A(39,29,"BACKGROUNDS")),E(7),k(A(46,31,"SHORTCUTS")),E(9),k(A(55,33,"HINT")),E(3),k(A(58,35,"HINT_LONG")),E(8),k(A(66,37,"UNDO")),E(3),k(A(69,39,"UNDO_LONG")),E(8),k(A(77,41,"RESTART")),E(3),k(A(80,43,"RESTART_LONG")),E(8),k(A(88,45,"PAUSE")),E(3),k(A(91,47,"PAUSE_LONG")),E(8),k(A(99,49,"INFO")),E(3),k(A(102,51,"TILES_INFO")))},pipes:[Ar],styles:["[_nghost-%COMP%]{display:block;margin-bottom:8px;height:100%;width:100%}[_nghost-%COMP%] h1[_ngcontent-%COMP%]{text-align:center;color:#47b00a;margin-top:0;margin-bottom:10px;line-height:1.3em}@media only screen and (max-width: 400px){[_nghost-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.2em}}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:10px 0 4px;font-weight:bold;border-bottom:1px solid #345060}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap}@media only screen and (max-width: 500px){[_nghost-%COMP%] .help-content[_ngcontent-%COMP%]{flex-direction:column}}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;margin-right:10px}@media only screen and (max-width: 700px){[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:row}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], [_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{padding-right:2em}@media only screen and (max-width: 400px){[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex-direction:column}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{min-width:inherit;max-width:inherit;padding-right:0;width:100%}[_nghost-%COMP%] .help-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{padding-right:0;padding-bottom:4px}}[_nghost-%COMP%] .license[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{min-width:40%;max-width:40%}[_nghost-%COMP%] .keyboard[_ngcontent-%COMP%] .keyboard-list[_ngcontent-%COMP%] .func[_ngcontent-%COMP%]{font-size:.8em;display:block}[_nghost-%COMP%] .keyboard[_ngcontent-%COMP%] .keyboard-list[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{min-width:50px;max-width:50px}[_nghost-%COMP%] .keyboard[_ngcontent-%COMP%] .keyboard-list[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{font-weight:bold;text-transform:uppercase;padding-left:10px;padding-right:10px;border:2px solid #f5f5f5;border-radius:6px;min-width:40px;display:inline-block;letter-spacing:1px;background:black;color:#f5f5f5;box-shadow:0 5px #000;text-align:center;margin-right:.3em;margin-bottom:.3em}@media only screen and (max-width: 400px){[_nghost-%COMP%] .keyboard[_ngcontent-%COMP%] .keyboard-list[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{padding-left:5px;padding-right:5px;min-width:20px;margin-bottom:6px}}"]}),t})();function ck(t,e){if(1&t){const n=pt();m(0,"li"),m(1,"input",8),x("ngModelChange",function(o){return Me(n),Z().app.settings.lang=o})("ngModelChange",function(){return Me(n),Z().app.setLang()}),_(),m(2,"label",9),S(3),_(),_()}if(2&t){const n=e.$implicit,r=e.index,o=Z();E(1),j("id","lang"+(r+1))("value",n.key)("ngModel",o.app.settings.lang),E(1),j("for","lang"+(r+1)),E(1),k(n.title)}}function dk(t,e){if(1&t){const n=pt();m(0,"li"),m(1,"input",10),x("ngModelChange",function(o){return Me(n),Z().app.settings.tileset=o}),_(),m(2,"label",9),S(3),m(4,"a",11),S(5),O(6,"translate"),_(),_(),_()}if(2&t){const n=e.$implicit,r=e.index,o=Z();E(1),qn("id","imageset",r,""),j("value",n.id)("ngModel",o.app.settings.tileset),E(1),qn("for","imageset",r,""),E(1),Cr("",n.name," "),E(1),gt("href",n.url,li),E(1),k(A(6,7,"SOURCE"))}}function fk(t,e){if(1&t){const n=pt();m(0,"li"),m(1,"input",12),x("ngModelChange",function(o){return Me(n),Z().app.settings.background=o}),_(),m(2,"label",9),S(3),O(4,"translate"),_(),_()}if(2&t){const n=e.$implicit,r=e.index,o=Z();E(1),qn("id","back",r,""),j("value",n.img)("ngModel",o.app.settings.background),E(1),qn("for","back",r,""),E(1),k(A(4,5,n.name))}}let hk=(()=>{class t{constructor(n,r,o,i){this.app=n,this.storage=r,this.layoutService=o,this.translate=i,this.sets=EF,this.backs=kE,this.languages=WF}clearTimes(){return or(this,void 0,void 0,function*(){const n=yield this.layoutService.get();for(const r of n.items)this.storage.clearScore(r.id)})}clearTimesClick(){confirm(this.translate.instant("BEST_TIMES_CLEAR_SURE"))&&this.clearTimes().catch(n=>{console.error(n)})}}return t.\u0275fac=function(n){return new(n||t)(v(ls),v(yl),v(Dl),v(Ir))},t.\u0275cmp=Ot({type:t,selectors:[["app-settings"]],decls:40,vars:25,consts:[[1,"settings-content"],[1,"settings"],[1,"buttons"],[1,"radio"],["type","radio","name","lang","id","lang0","value","auto",3,"ngModel","ngModelChange"],["for","lang0"],[4,"ngFor","ngForOf"],[3,"click"],["type","radio","name","lang",3,"id","value","ngModel","ngModelChange"],[3,"for"],["type","radio","name","imageset",3,"id","value","ngModel","ngModelChange"],["target","_blank","rel","noopener",3,"href"],["type","radio","name","back",3,"id","value","ngModel","ngModelChange"]],template:function(n,r){1&n&&(m(0,"h1"),S(1),O(2,"translate"),_(),m(3,"div",0),m(4,"div",1),m(5,"p"),S(6),O(7,"translate"),_(),m(8,"div",2),m(9,"form"),m(10,"ul",3),m(11,"li"),m(12,"input",4),x("ngModelChange",function(i){return r.app.settings.lang=i})("ngModelChange",function(){return r.app.setLang()}),_(),m(13,"label",5),S(14),O(15,"translate"),_(),_(),ue(16,ck,4,5,"li",6),_(),_(),_(),m(17,"p"),S(18),O(19,"translate"),_(),m(20,"div"),m(21,"button",7),x("click",function(){return r.clearTimesClick()}),S(22),O(23,"translate"),_(),_(),_(),m(24,"div",1),m(25,"p"),S(26),O(27,"translate"),_(),m(28,"div",2),m(29,"form"),m(30,"ul",3),ue(31,dk,7,9,"li",6),_(),_(),_(),_(),m(32,"div",1),m(33,"p"),S(34),O(35,"translate"),_(),m(36,"div",2),m(37,"form"),m(38,"ul",3),ue(39,fk,5,7,"li",6),_(),_(),_(),_(),_()),2&n&&(E(1),Cr("\u{1f004}\ufe0f",A(2,11,"SETTINGS"),""),E(5),k(A(7,13,"LANG")),E(6),j("ngModel",r.app.settings.lang),E(2),k(A(15,15,"LANG_AUTO")),E(2),j("ngForOf",r.languages),E(2),k(A(19,17,"BEST_TIMES")),E(4),k(A(23,19,"BEST_TIMES_CLEAR")),E(4),k(A(27,21,"TILESET")),E(5),j("ngForOf",r.sets),E(3),k(A(35,23,"BACKGROUND")),E(5),j("ngForOf",r.backs))},directives:[oE,QD,al,hf,Ja,tf,ll,Qi],pipes:[Ar],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] h1[_ngcontent-%COMP%]{text-align:center;color:#47b00a;margin-top:0;margin-bottom:.2em}@media only screen and (max-width: 400px){[_nghost-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.2em}}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:10px 0 4px;font-weight:bold;border-bottom:1px solid #345060}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:30%;margin-right:10px}@media only screen and (max-width: 500px){[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:row}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .settings-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{max-width:40%}[_nghost-%COMP%] button[_ngcontent-%COMP%]{margin-top:10px;padding:12px}[_nghost-%COMP%] .radio[_ngcontent-%COMP%]{text-align:left;list-style:none;padding:0;margin:0;vertical-align:middle}[_nghost-%COMP%] .radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{vertical-align:middle;margin-left:2px}[_nghost-%COMP%] .radio[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:right;margin-left:3px;font-size:.8em}[_nghost-%COMP%] .close[_ngcontent-%COMP%]{margin-top:0}"]}),t})(),pk=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=Ot({type:t,selectors:[["app-tile"]],inputs:{imageSet:"imageSet",tile:"tile"},decls:7,vars:6,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 75 100","preserveAspectRatio","xMidYMid meet"],["app-image-set-loader","",3,"imageSet","prefix"],["x","0","y","0","width","75","height","100","rx","10","ry","10",1,"stone"],["x","6","y","6","width","63","height","88"]],template:function(n,r){1&n&&(Hr(),m(0,"svg",0),te(1,"defs",1),te(2,"rect",2),m(3,"title"),S(4),O(5,"translate"),_(),te(6,"use",3),_()),2&n&&(E(1),j("imageSet",r.imageSet)("prefix","t_"+r.imageSet+"_"),E(3),k(A(5,4,r.tile)),E(2),st("href","#t_"+r.imageSet+"_"+r.tile,null,"xlink"))},directives:[YE],pipes:[Ar],styles:["[_nghost-%COMP%]{display:block;width:100%;height:auto;margin:0 auto;max-width:1.5em}[_nghost-%COMP%] > svg[_ngcontent-%COMP%]{height:100%;width:100%;background-color:#fff9e5;border:1px solid #4b4b4b}[_nghost-%COMP%] > svg[_ngcontent-%COMP%] rect.stone[_ngcontent-%COMP%]{fill:none;stroke:none}"]}),t})();function gk(t,e){if(1&t&&(m(0,"div",7),te(1,"app-tile",8),te(2,"div",9),O(3,"translate"),_()),2&t){const n=e.$implicit,r=Z(3);E(1),j("tile",n)("imageSet",r.imageSet),E(1),j("innerHtml",A(3,3,n),dp)}}function mk(t,e){if(1&t&&(m(0,"div"),m(1,"div",5),S(2),O(3,"translate"),_(),m(4,"div"),ue(5,gk,4,5,"div",6),_(),_()),2&t){const n=e.$implicit;_c("tiles-section tiles-section-",n.tiles.length,""),E(2),k(A(3,8,n.name)),E(2),_c("tiles-set tiles-set-",n.tiles.length,""),E(1),j("ngForOf",n.tiles)}}function _k(t,e){if(1&t&&(Ei(0),ue(1,mk,6,10,"div",4),bi()),2&t){const n=e.$implicit;E(1),j("ngForOf",n.groups)}}let yk=(()=>{class t{constructor(){this.info=vF}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=Ot({type:t,selectors:[["app-tiles-info"]],inputs:{imageSet:"imageSet"},decls:10,vars:10,consts:[[1,"tiles-content"],[4,"ngFor","ngForOf"],[1,"tiles-reference"],["rel","noopener","target","_blank",3,"href"],[3,"class",4,"ngFor","ngForOf"],[1,"tiles-title"],["class","tile",4,"ngFor","ngForOf"],[1,"tile"],[3,"tile","imageSet"],[3,"innerHtml"]],template:function(n,r){1&n&&(m(0,"h1"),S(1),O(2,"translate"),_(),m(3,"div",0),ue(4,_k,2,1,"ng-container",1),_(),m(5,"div",2),m(6,"a",3),O(7,"translate"),S(8),O(9,"translate"),_(),_()),2&n&&(E(1),Cr("\u{1f004}\ufe0f",A(2,4,"TILES"),""),E(3),j("ngForOf",r.info),E(2),gt("href",A(7,6,"READ_MORE_WIKIPEDIA_URL"),li),E(2),k(A(9,8,"READ_MORE_WIKIPEDIA")))},directives:[Qi,pk],pipes:[Ar],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] h1[_ngcontent-%COMP%]{text-align:center;color:#47b00a;margin-top:0;margin-bottom:.2em}[_nghost-%COMP%] .tiles-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap}[_nghost-%COMP%] .tiles-reference[_ngcontent-%COMP%]{padding-top:5px;text-align:right}[_nghost-%COMP%] .tile[_ngcontent-%COMP%]{flex:1 100%;min-width:auto;text-align:center;word-break:normal;margin-top:5px;margin-bottom:5px;display:flex;flex-direction:column;padding-left:5px;padding-right:5px}[_nghost-%COMP%] .tiles-title[_ngcontent-%COMP%]{flex:1;margin-top:.2em;font-weight:bold;text-align:center;border-bottom:1px solid #345060}[_nghost-%COMP%] .tiles-section[_ngcontent-%COMP%]{padding:0 6px}[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%]{flex:100%}[_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%]{flex:50%}[_nghost-%COMP%] .tiles-set[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-around}@media only screen and (max-width: 700px){[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%]{flex-wrap:wrap}[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{flex:20%}[_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%]{flex:100%}}@media only screen and (max-width: 500px){[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%]{flex-wrap:wrap}[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{flex:25%}}@media only screen and (max-width: 400px){[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%]{flex-wrap:wrap}[_nghost-%COMP%] .tiles-section-9[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-4[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%], [_nghost-%COMP%] .tiles-section-3[_ngcontent-%COMP%] .tiles-set[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{flex:50%}}"]}),t})();const ZE=new kn(TE),XE={leading:!0,trailing:!1};class bk{constructor(e,n,r,o){this.duration=e,this.scheduler=n,this.leading=r,this.trailing=o}call(e,n){return n.subscribe(new vk(e,this.duration,this.scheduler,this.leading,this.trailing))}}class vk extends Le{constructor(e,n,r,o,i){super(e),this.duration=n,this.scheduler=r,this.leading=o,this.trailing=i,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(wk,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}}function wk(t){const{subscriber:e}=t;e.clearThrottle()}class Sk{constructor(e,n){this.dueTime=e,this.scheduler=n}call(e,n){return n.subscribe(new Tk(e,this.dueTime,this.scheduler))}}class Tk extends Le{constructor(e,n,r){super(e),this.dueTime=n,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Ok,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function Ok(t){t.debouncedNext()}class Ut{constructor(e,n,r,o){this.left=e,this.top=n,this.right=r,this.bottom=o}static fromElement(e){const{left:n,top:r,right:o,bottom:i}=e.getBoundingClientRect();return new Ut(n,r,o,i)}static fromWindow(e){return new Ut(0,0,e.innerWidth,e.innerHeight)}inflate(e){this.left-=e,this.top-=e,this.right+=e,this.bottom+=e}intersectsWith(e){return e.left<this.right&&this.left<e.right&&e.top<this.bottom&&this.top<e.bottom}intersectsWithY(e){return e.top<this.bottom&&this.top<e.bottom}getIntersectionWith(e){const n=Math.max(this.left,e.left),r=Math.max(this.top,e.top),o=Math.min(this.right,e.right),i=Math.min(this.bottom,e.bottom);return o>=n&&i>=r?new Ut(n,r,o,i):Ut.empty}}Ut.empty=new Ut(0,0,0,0);let If=(()=>{class t{constructor(n){this.platformId=n,this.scrollNotify=new se,this.observeNotify=new se,this.currentViewport=new Ut(0,0,0,0),this.scrollSubject=new Ho,this.isBrowser=function(t){return t===KC}(this.platformId),this.hasIntersectionObserver=t.checkIntersectionObserver();const r=this.scrollSubject.asObservable();this.scrollObservable=eh(r.pipe(function(t,e=ZE,n=XE){return r=>r.lift(new bk(t,e,n.leading,n.trailing))}(300)),r.pipe(function(t,e=ZE){return n=>n.lift(new Sk(t,e))}(100))),this.scrollObservable.subscribe(o=>{this.scrollNotify.emit(o)}),this.currentViewport=Ut.fromWindow(window)}getObserver(){return this.intersectionObserver||(this.intersectionObserver=new IntersectionObserver(n=>{this.observeNotify.next(n)},{threshold:0})),this.intersectionObserver}notifyScroll(n){if(this.hasIntersectionObserver)return;const r=n.element?Ut.fromElement(n.element):Ut.fromWindow(window),o=r.bottom-r.top;r.bottom+=o,r.top-=o,this.currentViewport=r,this.scrollSubject.next({rect:r})}static checkIntersectionObserver(){const n="IntersectionObserver"in window,o=window.navigator.userAgent.match(/Edge\/(\d*)\./i),i=!!o&&o.length>1,s=i&&!!o&&parseInt(o[1],10)>15;return n&&(!i||s)}}return t.\u0275fac=function(n){return new(n||t)(I(xi))},t.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ik=(()=>{class t{constructor(n,r){this.element=n,this.scrollNotify=r}ngOnChanges(n){if(n.scrollTo&&n.scrollTo.currentValue){const r=n.scrollTo.currentValue;if(r.id&&r.id.length>0){const o=document.getElementById(r.id);o&&(this.element.nativeElement.scrollTop=o.offsetTop-o.offsetHeight)}}}scrollTrack(n){this.scrollNotify.notifyScroll({name:"scroll-host",element:this.element.nativeElement})}}return t.\u0275fac=function(n){return new(n||t)(v(Re),v(If))},t.\u0275dir=V({type:t,selectors:[["","appDeferLoadScrollHost",""]],hostBindings:function(n,r){1&n&&x("scroll",function(i){return r.scrollTrack(i)})},inputs:{scrollTo:"scrollTo"},features:[Be]}),t})(),Ak=(()=>{class t{constructor(){this.fileDrop=new se,this.preventBodyDrop=!0,this.active=!1}onDrop(n){n.preventDefault(),this.active=!1;const{dataTransfer:r}=n;if(null==r?void 0:r.items){const o=[];for(let i=0;i<r.items.length;i++)if(r.items[i]&&"file"===r.items[i].kind){const s=r.items[i].getAsFile();null!=s&&o.push(s)}r.items.clear(),this.fileDrop.emit(o)}else if(r){const o=null==r?void 0:r.files;r.clearData(),o&&this.fileDrop.emit(Array.from(o))}}onDragOver(n){n.stopPropagation(),n.preventDefault(),this.active=!0}onDragLeave(n){this.active=!1}onBodyDragOver(n){this.preventBodyDrop&&(n.preventDefault(),n.stopPropagation())}onBodyDrop(n){this.preventBodyDrop&&n.preventDefault()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275dir=V({type:t,selectors:[["","appDropZone",""]],hostVars:2,hostBindings:function(n,r){1&n&&x("drop",function(i){return r.onDrop(i)})("dragover",function(i){return r.onDragOver(i)})("dragleave",function(i){return r.onDragLeave(i)})("dragover",function(i){return r.onBodyDragOver(i)},!1,Cu)("drop",function(i){return r.onBodyDrop(i)},!1,Cu),2&n&&Cn("drop-zone-active",r.active)},inputs:{preventBodyDrop:"preventBodyDrop"},outputs:{fileDrop:"appDropZone"}}),t})(),Pk=(()=>{class t{constructor(n,r){this.elementRef=n,this.deferLoadService=r,this.preRender=!1,this.appDeferLoad=new se,this.timeoutLoadMS=20}ngAfterViewInit(){this.deferLoadService.isBrowser?this.deferLoadService.hasIntersectionObserver?this.registerIntersectionObserver():this.addScrollListeners():this.preRender&&this.load()}ngOnDestroy(){this.removeListeners()}static getScrollPosition(){return(window.scrollY||window.pageYOffset)+(document.documentElement.clientHeight||document.body.clientHeight)}loadAndUnobserve(){this.load(),this.unobserve(),this.removeListeners()}cancelDelayLoad(){!this.timeoutId||(clearTimeout(this.timeoutId),this.timeoutId=void 0)}delayLoad(){this.timeoutId||(this.timeoutId=setTimeout(()=>{this.loadAndUnobserve(),this.cancelDelayLoad()},this.timeoutLoadMS))}manageIntersection(n){this.checkIfIntersecting(n)?this.delayLoad():this.cancelDelayLoad()}registerIntersectionObserver(){this.intersectionObserver||(this.intersectionObserver=this.deferLoadService.getObserver(),this.intersectionObserver&&this.elementRef.nativeElement&&(this.intersectionObserver.observe(this.elementRef.nativeElement),this.onbserveSubscription=this.deferLoadService.observeNotify.subscribe(n=>{this.checkForIntersection(n)})))}checkForIntersection(n){n.forEach(r=>{r.target===this.elementRef.nativeElement&&this.manageIntersection(r)})}checkIfIntersecting(n){return n&&n.time?n.isIntersecting:this.isVisible()}load(){this.removeListeners(),this.appDeferLoad.emit()}loadFromScroll(){setTimeout(()=>{this.load()})}addScrollListeners(){this.scrollSubscription=this.deferLoadService.scrollNotify.subscribe(n=>{this.checkInView(n.rect)&&this.loadFromScroll()}),setTimeout(()=>{this.checkInView(this.deferLoadService.currentViewport)&&this.loadFromScroll()})}unobserve(){this.intersectionObserver&&this.elementRef.nativeElement&&(this.intersectionObserver.unobserve(this.elementRef.nativeElement),this.intersectionObserver=void 0)}removeListeners(){this.scrollSubscription&&(this.scrollSubscription.unsubscribe(),this.scrollSubscription=void 0),this.unobserve(),this.onbserveSubscription&&(this.onbserveSubscription.unsubscribe(),this.onbserveSubscription=void 0)}checkInView(n){return Ut.fromElement(this.elementRef.nativeElement).intersectsWithY(n)}isVisible(){const n=t.getScrollPosition();return this.elementRef.nativeElement.offsetTop<=n}}return t.\u0275fac=function(n){return new(n||t)(v(Re),v(If))},t.\u0275dir=V({type:t,selectors:[["","appDeferLoad",""]],inputs:{preRender:"preRender"},outputs:{appDeferLoad:"appDeferLoad"}}),t})(),Nk=(()=>{class t{ngOnChanges(n){n.layout&&this.updateLayout(n.layout.currentValue)}updateLayout(n){this.svg=n.previewSVG}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=Ot({type:t,selectors:[["app-layout-preview"]],inputs:{layout:"layout"},features:[Be],decls:1,vars:1,consts:[[3,"src"]],template:function(n,r){1&n&&te(0,"img",0),2&n&&j("src",r.svg,li)},styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;-o-object-fit:contain;object-fit:contain}"],changeDetection:0}),t})();function Af(t){return(t<10?"0":"")+t.toString()}let eb=(()=>{class t{transform(n){if(isNaN(n)||0===n)return"-";const r=Math.floor(n/1e3),o=Math.floor(r/3600),i=Math.floor((r-3600*o)/60),s=r-3600*o-60*i;return`${o>0?`${Af(o)}:`:""}${Af(i)}:${Af(s)}`}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=We({name:"duration",type:t,pure:!0}),t})();function xk(t,e){if(1&t){const n=pt();m(0,"a",13),x("click",function(){const i=Me(n).index;return Z(2).scrollToGroup(i)}),S(1),_()}if(2&t){const n=e.$implicit;E(1),k(n.name)}}function Rk(t,e){if(1&t&&(m(0,"div",11),ue(1,xk,2,1,"a",12),_()),2&t){const n=Z();E(1),j("ngForOf",n.groups)}}function Fk(t,e){if(1&t&&(m(0,"div",18),S(1),_()),2&t){const n=Z().$implicit;E(1),yo("",n.name," (",n.layouts.length,")")}}function kk(t,e){1&t&&te(0,"app-layout-preview",24),2&t&&j("layout",Z().$implicit.layout)}function Lk(t,e){if(1&t){const n=pt();m(0,"div",25),S(1),O(2,"translate"),O(3,"duration"),m(4,"a",13),x("click",function(o){Me(n);const i=Z().$implicit;return Z(3).clearBestTimeClick(o,i)}),te(5,"i",26),_(),_()}if(2&t){const n=Z().$implicit;E(1),yo("",A(2,2,"STATS_BEST"),": ",A(3,4,n.bestTime)," ")}}function Vk(t,e){if(1&t){const n=pt();m(0,"div",20),x("click",function(){const i=Me(n).$implicit;return Z(3).onStart(i.layout)})("appDeferLoad",function(){return Me(n).$implicit.visible=!0}),ue(1,kk,1,1,"app-layout-preview",21),ue(2,Lk,6,6,"div",22),m(3,"div",23),S(4),_(),_()}if(2&t){const n=e.$implicit;Cn("selected",n.selected),j("id","item-"+n.layout.id),E(1),j("ngIf",n.visible),E(1),j("ngIf",n.bestTime),E(2),k(n.layout.name)}}function Bk(t,e){if(1&t&&(Ei(0),ue(1,Vk,5,6,"div",19),bi()),2&t){const n=Z().$implicit;E(1),j("ngForOf",n.layouts)}}function Hk(t,e){if(1&t&&(m(0,"div",28),m(1,"div",23),S(2),_(),_()),2&t){const n=e.$implicit;Cn("selected",n.selected),j("id","item-"+n.layout.id),E(2),k(n.layout.name)}}function jk(t,e){if(1&t&&(Ei(0),ue(1,Hk,3,4,"div",27),bi()),2&t){const n=Z().$implicit;E(1),j("ngForOf",n.layouts)}}function Uk(t,e){if(1&t){const n=pt();m(0,"div",14),x("appDeferLoad",function(){return Me(n).$implicit.visible=!0}),ue(1,Fk,2,2,"div",15),m(2,"div",16),ue(3,Bk,2,1,"ng-container",17),ue(4,jk,2,1,"ng-container",17),_(),_()}if(2&t){const n=e.$implicit,r=e.index,o=Z();qn("id","group-",r,""),E(1),j("ngIf",o.groups.length>1),E(2),j("ngIf",n.visible),E(1),j("ngIf",!n.visible)}}function Gk(t,e){if(1&t&&(m(0,"option",29),S(1),O(2,"translate"),O(3,"translate"),_()),2&t){const n=e.$implicit;gt("value",n.id),E(1),yo("",A(2,3,n.id)," - ",A(3,5,n.id+"_DESC"),"")}}let $k=(()=>{class t{constructor(n,r,o){this.layoutService=n,this.storage=r,this.translate=o,this.startEvent=new se,this.groups=[],this.mode="MODE_SOLVABLE",this.builder=new BE}ngOnChanges(n){this.layouts&&this.buildGroups(),setTimeout(()=>{this.selectLastPlayed()})}onStart(n){n&&(this.startEvent.emit({layout:n,mode:this.mode}),this.storage.storeLastPlayed(n.id))}selectLastPlayed(){const n=this.storage.getLastPlayed();n&&(this.groups.forEach(r=>{r.layouts.forEach(o=>{o.selected=o.layout.id===n})}),this.scrollToItem(n))}buildGroups(){const n=[],r={};for(const o of this.layouts.items){r[o.category]||(r[o.category]={name:o.category,layouts:[],visible:!1},n.push(r[o.category]));const i=this.storage.getScore(o.id)||{};r[o.category].layouts.push({layout:o,playCount:i.playCount,bestTime:i.bestTime,visible:!1})}this.groups=n}randomGame(){const n=Math.floor(Math.random()*this.layouts.items.length);this.onStart(this.layouts.items[n])}onDrop(n){this.layoutService.importFile(n[0]).then(r=>{this.layouts.items.push(r),this.buildGroups()}).catch(r=>{alert(r)})}scrollToGroup(n){const r=document.getElementById(`group-${n}`);r&&r.scrollIntoView()}scrollToItem(n){const r=document.getElementById(`item-${n}`);r&&r.scrollIntoView()}clearBestTimeClick(n,r){n.stopPropagation(),confirm(this.translate.instant("BEST_TIME_CLEAR_SURE"))&&(this.storage.clearScore(r.layout.id),r.bestTime=void 0,r.playCount=void 0)}}return t.\u0275fac=function(n){return new(n||t)(v(Dl),v(yl),v(Ir))},t.\u0275cmp=Ot({type:t,selectors:[["app-choose-layout"]],inputs:{layouts:"layouts"},outputs:{startEvent:"startEvent"},features:[Be],decls:18,vars:13,consts:[[1,"headline"],["class","headline-anchors",4,"ngIf"],["appDeferLoadScrollHost","",1,"groups",3,"appDropZone"],["class","group",3,"id","appDeferLoad",4,"ngFor","ngForOf"],[1,"choose-buttons"],[1,"generator"],["for","board-generator-select"],["id","board-generator-select",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"start-links"],[1,"link",3,"click"],[1,"headline-anchors"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"group",3,"id","appDeferLoad"],["class","group-name",4,"ngIf"],[1,"previews"],[4,"ngIf"],[1,"group-name"],["class","preview",3,"id","selected","click","appDeferLoad",4,"ngFor","ngForOf"],[1,"preview",3,"id","click","appDeferLoad"],["class","svg-board",3,"layout",4,"ngIf"],["class","preview-best-time",4,"ngIf"],[1,"preview-name"],[1,"svg-board",3,"layout"],[1,"preview-best-time"],[1,"icon-trash-empty"],["class","preview",3,"id","selected",4,"ngFor","ngForOf"],[1,"preview",3,"id"],[3,"value"]],template:function(n,r){1&n&&(m(0,"div",0),m(1,"div"),S(2),O(3,"translate"),_(),_(),ue(4,Rk,2,1,"div",1),m(5,"div",2),x("appDropZone",function(i){return r.onDrop(i)}),ue(6,Uk,5,4,"div",3),_(),m(7,"div",4),m(8,"div",5),m(9,"label",6),S(10),O(11,"translate"),_(),m(12,"select",7),x("ngModelChange",function(i){return r.mode=i}),ue(13,Gk,4,7,"option",8),_(),_(),m(14,"div",9),m(15,"button",10),x("click",function(){return r.randomGame()}),S(16),O(17,"translate"),_(),_(),_()),2&n&&(E(2),k(A(3,7,"SELECT_BOARD")),E(2),j("ngIf",r.groups.length>1),E(2),j("ngForOf",r.groups),E(4),Cr("",A(11,9,"BOARD_GENERATOR"),":"),E(2),j("ngModel",r.mode),E(1),j("ngForOf",r.builder.modes),E(3),k(A(17,11,"START_RANDOM")))},directives:[Ga,Ik,Ak,Qi,ul,tf,ll,Pk,Nk,hE,gE],pipes:[Ar,eb],styles:["[_nghost-%COMP%]{padding:0;margin:0;width:100%;height:100%;display:flex;flex-direction:column}[_nghost-%COMP%] .headline[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px;border-bottom:1px solid #afafaf}[_nghost-%COMP%] .headline-anchors[_ngcontent-%COMP%]{border-bottom:1px solid #afafaf;width:100%;display:flex;flex-direction:row;flex-wrap:wrap}[_nghost-%COMP%] .headline-anchors[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{flex-grow:1;flex-basis:0;display:inline-block;padding:2px 4px;font-size:.9em;cursor:pointer;text-align:center}[_nghost-%COMP%] .headline-anchors[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#51c80b}[_nghost-%COMP%] .groups[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;width:100%;flex:1}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]{width:100%;padding-bottom:16px}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .group-name[_ngcontent-%COMP%]{border-top:1px solid #d5d5d5;padding-top:16px;text-align:center}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:first-of-type .group-name[_ngcontent-%COMP%]{border-top:inherit}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .previews[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-evenly}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%]{margin-top:10px;width:300px;height:200px;cursor:pointer;border:1px solid #afafaf;display:block;background-color:#2b424f;position:relative;overflow:hidden}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview.selected[_ngcontent-%COMP%]{border:1px solid #000000}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] app-layout-preview[_ngcontent-%COMP%]{display:block;width:300px;height:200px;text-align:center;padding-bottom:1.5em}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] .preview-best-time[_ngcontent-%COMP%]{position:absolute;top:0;right:0;background-color:#181818cc;color:#fff;border-bottom-left-radius:3px;padding:3px 3px 3px 6px;text-shadow:1px 1px black}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] .preview-best-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;min-width:1.2em;text-align:right;transition:all .1s}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] .preview-best-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8em}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] .preview-best-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{transform:scale(1.3)}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] .preview-name[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;background-color:#fffc;text-align:center;text-shadow:1px 1px white}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%]:hover{background-color:#636056}@media only screen and (max-width: 1000px){[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%], [_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] app-layout-preview[_ngcontent-%COMP%]{width:200px;height:180px}}@media only screen and (max-width: 700px){[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%]{width:50%}[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%] app-layout-preview[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 400px){[_nghost-%COMP%] .groups[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] .preview[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%]{border-top:1px solid #afafaf;padding-top:10px;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-end}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%] .start-links[_ngcontent-%COMP%]{text-align:right;display:inline-block;width:50%}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%] .start-links[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{color:#000;margin-left:8px;text-decoration:none}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%] .generator[_ngcontent-%COMP%]{width:50%}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%] .generator[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:2px}[_nghost-%COMP%] .choose-buttons[_ngcontent-%COMP%] .generator[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding-left:8px;width:100%;text-overflow:ellipsis}"]}),t})();function Wk(t,e){if(1&t){const n=pt();m(0,"div",25),x("click",function(){return Me(n),Z().toggleHelp()}),m(1,"div",26),x("click",function(o){return o.stopPropagation()}),m(2,"span",27),x("click",function(){return Me(n),Z().toggleHelp()}),te(3,"i",28),_(),te(4,"app-help"),_(),_()}}function zk(t,e){if(1&t){const n=pt();m(0,"div",29),x("click",function(){return Me(n),Z().toggleSettings()}),m(1,"div",26),x("click",function(o){return o.stopPropagation()}),m(2,"span",27),x("click",function(){return Me(n),Z().toggleSettings()}),te(3,"i",28),_(),te(4,"app-settings"),_(),_()}}function qk(t,e){if(1&t&&(m(0,"div"),S(1),O(2,"translate"),_()),2&t){const n=Z(2);E(1),k(A(2,1,n.game.message.msgID))}}function Kk(t,e){if(1&t&&(m(0,"div"),S(1),O(2,"duration"),_()),2&t){const n=Z(2);E(1),k(A(2,1,n.game.message.playTime))}}function Qk(t,e){if(1&t){const n=pt();m(0,"div",30),x("click",function(){return Me(n),Z().clickMessage()}),m(1,"div",31),ue(2,qk,3,3,"div",32),ue(3,Kk,3,3,"div",32),_(),_()}if(2&t){const n=Z();E(2),j("ngIf",n.game.message.msgID),E(1),j("ngIf",n.game.message.playTime)}}function Yk(t,e){if(1&t){const n=pt();m(0,"div",33),x("click",function(){return Me(n),Z().toggleTilesInfo()}),m(1,"div",26),x("click",function(o){return o.stopPropagation()}),m(2,"span",27),x("click",function(){return Me(n),Z().toggleTilesInfo()}),te(3,"i",28),_(),te(4,"app-tiles-info",34),_(),_()}if(2&t){const n=Z();E(4),j("imageSet",n.app.settings.tileset)}}function Jk(t,e){if(1&t){const n=pt();m(0,"div",35),x("click",function(){return Me(n),Z().toggleNewGame()}),m(1,"div",26),x("click",function(o){return o.stopPropagation()}),m(2,"span",27),x("click",function(){return Me(n),Z().toggleNewGame()}),te(3,"i",28),_(),m(4,"app-choose-layout",36),x("startEvent",function(o){return Me(n),Z().startGame(o)}),_(),_(),_()}if(2&t){const n=Z();E(4),j("layouts",n.layouts)}}let Zk=(()=>{class t{constructor(n){this.app=n,this.tilesInfoVisible=!1,this.helpVisible=!1,this.settingsVisible=!1,this.newGameVisible=!1,this.game=n.game,this.game.isIdle()&&(this.newGameVisible=!0)}handleKeyDownEvent(n){if(this.helpVisible)27===n.keyCode&&this.toggleHelp();else if(this.newGameVisible)27===n.keyCode&&(this.newGameVisible=!this.newGameVisible);else if(this.tilesInfoVisible)27===n.keyCode&&this.toggleTilesInfo();else if(this.settingsVisible)27===n.keyCode&&this.toggleSettings();else switch(n.which){case 72:this.toggleHelp();break;case 73:this.toggleTilesInfo();break;case 83:this.toggleSettings();break;case 84:this.game.hint();break;case 85:this.game.back();break;case 78:this.game.pause(),this.newGameVisible=!0;break;case 32:case 80:this.game.isRunning()?this.game.pause():this.game.isPaused()&&this.game.resume()}}stoneClick(n){this.game.click(n)}enterFullScreen(){const n=window.document;if(n.fullScreen||n.fullscreen||n.mozFullScreen||n.webkitIsFullScreen)return void(n.exitFullscreen?n.exitFullscreen().catch(o=>{console.error(o)}):n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitExitFullscreen&&n.webkitExitFullscreen());const r=document.body;r.requestFullscreen?r.requestFullscreen().catch(o=>{console.error(o)}):r.webkitRequestFullScreen?r.webkitRequestFullScreen():r.mozRequestFullScreen&&r.mozRequestFullScreen()}newGame(){this.game.pause(),this.newGameVisible=!0}startGame(n){this.newGameVisible=!1,this.game.reset(),this.game.start(n.layout,n.mode)}toggleNewGame(){this.newGameVisible=!this.newGameVisible}toggleTilesInfo(){this.tilesInfoVisible=!this.tilesInfoVisible}toggleSettings(){this.settingsVisible=!this.settingsVisible,this.settingsVisible||this.app.settings.save()}toggleHelp(){this.helpVisible=!this.helpVisible}clickMessage(){this.game.isPaused()?this.game.resume():(this.game.reset(),this.newGameVisible=!0)}}return t.\u0275fac=function(n){return new(n||t)(v(ls))},t.\u0275cmp=Ot({type:t,selectors:[["app-game-component"]],hostBindings:function(n,r){1&n&&x("keydown",function(i){return r.handleKeyDownEvent(i)},!1,Mp)},inputs:{layouts:"layouts"},decls:74,vars:65,consts:[[1,"controls","controls-top"],[1,"ctrl","ctrl-name"],[1,"link","button",3,"title","click"],[1,"symbol"],[1,"name"],[1,"ctrl","ctrl-game"],[1,"icon-resize-full-alt"],[1,"label"],[1,"icon-pause"],[1,"icon-undo"],[1,"icon-lightbulb"],[1,"icon-loop"],[1,"board",3,"tiles","imageSet","background","clickEvent"],[1,"controls","controls-bottom"],[1,"ctrl","ctrl-stats"],[1,"icon-cog"],[1,"icon-volume-low"],[1,"icon-calendar"],[1,"label","button"],[1,"ctrl","ctrl-time"],["class","overlay overlay-help",3,"click",4,"ngIf"],["class","overlay overlay-settings",3,"click",4,"ngIf"],["class","overlay overlay-message",3,"click",4,"ngIf"],["class","overlay overlay-tiles-info",3,"click",4,"ngIf"],["class","overlay overlay-newgame",3,"click",4,"ngIf"],[1,"overlay","overlay-help",3,"click"],[1,"overlay-popup",3,"click"],[1,"close",3,"click"],[1,"icon-cancel-circled2","pull-right"],[1,"overlay","overlay-settings",3,"click"],[1,"overlay","overlay-message",3,"click"],[1,"overlay-popup"],[4,"ngIf"],[1,"overlay","overlay-tiles-info",3,"click"],[3,"imageSet"],[1,"overlay","overlay-newgame",3,"click"],[1,"choose",3,"layouts","startEvent"]],template:function(n,r){1&n&&(m(0,"div",0),m(1,"div",1),m(2,"span",2),x("click",function(){return r.toggleHelp()}),O(3,"translate"),m(4,"span",3),S(5,"\u{1f004}\ufe0f"),_(),m(6,"span",4),S(7),_(),_(),_(),m(8,"div",5),m(9,"span",2),x("click",function(){return r.enterFullScreen()}),O(10,"translate"),te(11,"i",6),m(12,"span",7),S(13),O(14,"translate"),_(),_(),m(15,"span",2),x("click",function(){return r.game.toggle()}),O(16,"translate"),te(17,"i",8),m(18,"span",7),S(19),O(20,"translate"),_(),_(),m(21,"span",2),x("click",function(){return r.game.back()}),O(22,"translate"),te(23,"i",9),m(24,"span",7),S(25),O(26,"translate"),_(),_(),m(27,"span",2),x("click",function(){return r.game.hint()}),O(28,"translate"),te(29,"i",10),m(30,"span",7),S(31),O(32,"translate"),_(),_(),m(33,"span",2),x("click",function(){return r.newGame()}),O(34,"translate"),te(35,"i",11),m(36,"span",7),S(37),O(38,"translate"),_(),_(),_(),_(),m(39,"app-board",12),x("clickEvent",function(i){return r.stoneClick(i)}),_(),m(40,"div",13),m(41,"div",14),m(42,"span",2),x("click",function(){return r.toggleSettings()}),O(43,"translate"),te(44,"i",15),_(),m(45,"span",2),x("click",function(){return r.app.toggleSound()}),O(46,"translate"),te(47,"i",16),_(),m(48,"span",2),x("click",function(){return r.toggleTilesInfo()}),O(49,"translate"),te(50,"i",17),_(),m(51,"span",18),m(52,"small"),S(53),O(54,"translate"),_(),S(55,": "),m(56,"span"),S(57),_(),_(),m(58,"span",18),m(59,"small"),S(60),O(61,"translate"),_(),S(62,": "),m(63,"span"),S(64),_(),_(),_(),m(65,"div",19),m(66,"span"),S(67),O(68,"duration"),_(),_(),_(),ue(69,Wk,5,0,"div",20),ue(70,zk,5,0,"div",21),ue(71,Qk,4,2,"div",22),ue(72,Yk,5,1,"div",23),ue(73,Jk,5,1,"div",24)),2&n&&(E(2),gt("title",A(3,31,"OPEN_HELP")),E(5),k(r.app.name),E(2),gt("title",A(10,33,"FULLSCREEN")),E(4),k(A(14,35,"FULLSCREEN")),E(2),gt("title",A(16,37,"PAUSE_LONG")),E(4),k(A(20,39,"PAUSE")),E(2),gt("title",A(22,41,"UNDO_LONG")),st("disabled",0===r.game.undo.length||null),E(4),k(A(26,43,"UNDO")),E(2),gt("title",A(28,45,"HINT_LONG")),E(4),k(A(32,47,"HINT")),E(2),gt("title",A(34,49,"RESTART_LONG")),E(4),k(A(38,51,"RESTART")),E(2),j("tiles",r.game.board.stones)("imageSet",r.app.settings.tileset)("background",r.app.settings.background),E(3),gt("title",A(43,53,"OPEN_SETTINGS")),E(3),Cn("inactive",!r.app.settings.sounds),gt("title",A(46,55,"AUDIO_SOUNDS")),E(3),gt("title",A(49,57,"TILES_INFO")),E(5),k(A(54,59,"STONES")),E(4),k(r.game.board.count),E(3),k(A(61,61,"FREE")),E(4),k(r.game.board.free.length),E(3),k(A(68,63,r.game.clock.elapsed)),E(2),j("ngIf",r.helpVisible),E(1),j("ngIf",r.settingsVisible),E(1),j("ngIf",r.game.message),E(1),j("ngIf",r.tilesInfoVisible),E(1),j("ngIf",r.layouts&&r.newGameVisible))},directives:[lk,Ga,uk,hk,yk,$k],pipes:[Ar,eb],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;height:100%;width:100%;min-height:100vh}[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{min-width:170px;padding:0 .8em}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%]{display:inline-block;color:#47b00a;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{text-decoration:none;font-weight:normal;color:#47b00a;margin-left:16px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:2px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]:hover{color:#51c80b}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .link[disabled][_ngcontent-%COMP%]{color:#348007}@media only screen and (min-width: 400px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin-left:10px}}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-name[_ngcontent-%COMP%]{font-weight:600;cursor:pointer}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-name[_ngcontent-%COMP%] span.symbol[_ngcontent-%COMP%]{margin-left:6px;vertical-align:middle}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-name[_ngcontent-%COMP%] span.name[_ngcontent-%COMP%]{margin-left:6px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .inactive[_ngcontent-%COMP%]{color:#348007}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .inactive[_ngcontent-%COMP%]:hover{color:#3d9809}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl[_ngcontent-%COMP%] .off[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-game[_ngcontent-%COMP%]{float:right}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-time[_ngcontent-%COMP%]{cursor:default;float:right}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-stats[_ngcontent-%COMP%]{cursor:default}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .ctrl.ctrl-stats[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:10px}@media only screen and (min-width: 700px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.2em}}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.3em}}@media only screen and (min-width: 1900px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.6em}}@media only screen and (min-width: 2200px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:2.3em}}@media only screen and (min-width: 3000px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:4em}}@media only screen and (max-width: 500px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.3em;padding:0 6px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] span.label[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width: 400px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.5em}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] span.name[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width: 280px){[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{font-size:1.2em}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] span.name[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .controls-top[_ngcontent-%COMP%]{border-bottom:1px solid #345060;padding-top:3px}[_nghost-%COMP%] .controls-bottom[_ngcontent-%COMP%]{border-top:1px solid #345060}[_nghost-%COMP%] .board[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;overflow:hidden}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{height:100%;width:100%;position:fixed;top:0;left:0;z-index:10000;background-color:#0003;max-height:100%;font-size:.9em}@media only screen and (min-width: 700px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{font-size:1.1em}}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{font-size:1.2em}}@media only screen and (min-width: 1900px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{font-size:1.2em}}@media only screen and (min-width: 2200px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{font-size:2em}}@media only screen and (max-height: 500px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{font-size:.9em}}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-height:90%;max-width:90%;margin-left:auto;margin-right:auto;border:1px solid #707070;background-color:#f5f1e4;padding:1em;line-height:1.2em;border-radius:12px;box-shadow:12px 14px 16px #00000080}@media only screen and (min-width: 2200px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{border-radius:30px}}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .overlay[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{max-height:80%;max-width:80%}}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{right:4px;top:4px;position:absolute;color:#a9a9a9;cursor:pointer;padding:4px;border-radius:6px}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{border:1px solid #707070}[_nghost-%COMP%] .overlay-help[_ngcontent-%COMP%], [_nghost-%COMP%] .overlay-settings[_ngcontent-%COMP%], [_nghost-%COMP%] .overlay-tiles-info[_ngcontent-%COMP%]{z-index:10010}[_nghost-%COMP%] .overlay-help[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%], [_nghost-%COMP%] .overlay-settings[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%], [_nghost-%COMP%] .overlay-tiles-info[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{width:90%;overflow-y:auto;padding:1.5em 2em}[_nghost-%COMP%] .overlay-message[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{cursor:pointer;font-weight:600;text-align:center;color:#47b00a;padding:1.5em 2em;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .overlay-newgame[_ngcontent-%COMP%] .overlay-popup[_ngcontent-%COMP%]{width:90%;height:90%;padding:1.5em 2em}"]}),t})(),Xk=(()=>{class t{constructor(n,r,o,i,s){this.layoutService=n,this.storage=r,this.translate=o,this.meta=i,this.app=s,this.loading=!0,this.updateName(),this.loadLayouts(),this.registerWindowListeners()}loadLayouts(){this.layoutService.get().then(n=>{this.layouts=n,this.loading=!1}).catch(n=>{console.error(n)})}registerWindowListeners(){window.addEventListener("beforeunload",()=>{this.app.game.isRunning()&&this.app.game.pause()},!1),window.addEventListener("blur",()=>{this.app.game.isRunning()&&this.app.game.pause()},!1)}updateName(){const n=this.meta.getTag("name=application-name");this.app.name=n?n.content:this.app.name}}return t.\u0275fac=function(n){return new(n||t)(v(Dl),v(yl),v(Ir),v(lD),v(ls))},t.\u0275cmp=Ot({type:t,selectors:[["app-root"]],decls:1,vars:2,consts:[[3,"hidden","layouts"]],template:function(n,r){1&n&&te(0,"app-game-component",0),2&n&&j("hidden",r.loading)("layouts",r.layouts)},directives:[Zk],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}"]}),t})(),eL=(()=>{class t{static forRoot(){return{ngModule:t}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t}),t.\u0275inj=ft({providers:[If],imports:[[qC]]}),t})(),tL=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=It({type:t,bootstrap:[Xk]}),t.\u0275inj=ft({providers:[ls,Dl,QE],imports:[[Bx,eF,cR,eL.forRoot(),DF.forRoot()]]}),t})();Lx().bootstrapModule(tL).catch(t=>{console.error(t)})}},_t=>{_t(_t.s=99)}]);