',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(e){e="
"+e+"";try{e=encodeURI(e)}catch(r){return null}const t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(void 0);const n=t.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(e){e=" "+e+"";try{const t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(t){return null}}getInertBodyElement_InertDocument(e){const t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0Qe(e.trim())).join(", ")),this.buf.push(" ",t,'="',at(o),'"')}var r;return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();Xe.hasOwnProperty(t)&&!Ze.hasOwnProperty(t)&&(this.buf.push(""),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(at(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&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 t}}const it=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ot=/([^\#-~ |!])/g;function at(e){return e.replace(/&/g,"&").replace(it,(function(e){return""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(ot,(function(e){return""+e.charCodeAt(0)+";"})).replace(//g,">")}let lt;function ct(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}const ut=function(){var e={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return e[e.NONE]="NONE",e[e.HTML]="HTML",e[e.STYLE]="STYLE",e[e.SCRIPT]="SCRIPT",e[e.URL]="URL",e[e.RESOURCE_URL]="RESOURCE_URL",e}();class ht{}const dt=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),pt=/^url\(([^)]+)\)$/,ft=/([A-Z])/g;function mt(e){try{return null!=e?e.toString().slice(0,30):e}catch(t){return"[ERROR] Exception while trying to serialize the value"}}let gt=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>yt(),e})();const yt=(...e)=>{},_t=new we("The presence of this token marks an injector as being the root injector."),vt=function(e,t,n){return new xt(e,t,n)};let wt=(()=>{class e{static create(e,t){return Array.isArray(e)?vt(e,t,""):vt(e.providers,e.parent,e.name||"")}}return e.THROW_IF_NOT_FOUND=Se,e.NULL=new Ie,e.ngInjectableDef=le({token:e,providedIn:"any",factory:()=>ke(be)}),e.__NG_ELEMENT_ID__=-1,e})();const bt=function(e){return e},St=[],Et=bt,Ct=function(){return Array.prototype.slice.call(arguments)};class xt{constructor(e,t=wt.NULL,n=null){this.parent=t,this.source=n;const r=this._records=new Map;r.set(wt,{token:wt,fn:bt,deps:St,value:this,useNew:!1}),r.set(be,{token:be,fn:bt,deps:St,value:this,useNew:!1}),function e(t,n){if(n)if((n=fe(n))instanceof Array)for(let r=0;re.push(he(n))),`StaticInjector[${e.join(", ")}]`}}function Tt(e){return kt("Cannot mix multi providers and regular providers",e)}function kt(e,t){return new Error(Ne(e,t,"StaticInjectorError"))}const It=new we("AnalyzeForEntryComponents");let Nt=null;function At(){if(!Nt){const e=ve.Symbol;if(e&&e.iterator)Nt=e.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t{class e{}return e.NULL=new Ht,e})();class Bt{constructor(e,t,n){this._parent=t,this._ngModule=n,this._factories=new Map;for(let r=0;r{class e{constructor(e){this.nativeElement=e}}return e.__NG_ELEMENT_ID__=()=>Wt(e),e})();const Wt=Qt;class Zt{}class Gt{}const Yt=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}();let Jt=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Xt(),e})();const Xt=Qt;class en{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const tn=new en("8.2.14");class nn{constructor(){}supports(e){return Dt(e)}create(e){return new sn(e)}}const rn=(e,t)=>t;class sn{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||rn}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,s=null;for(;t||n;){const i=!n||t&&t.currentIndex{r=this._trackByFn(t,e),null!==s&&Rt(s.trackById,r)?(i&&(s=this._verifyReinsertion(s,e,r,t)),Rt(s.item,e)||this._addIdentityChange(s,e)):(s=this._mismatch(s,e,r,t),i=!0),s=s._next,t++}),this.length=t;return this._truncate(s),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,t;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=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Rt(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Rt(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):e=this._addAfter(new on(t,n),s,r),e}_verifyReinsertion(e,t,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}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,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new ln),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ln),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,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class on{constructor(e,t){this.item=e,this.trackById=t,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 an{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,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Rt(n.trackById,e))return n;return null}remove(e){const t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class ln{constructor(){this.map=new Map}put(e){const t=e.trackById;let n=this.map.get(t);n||(n=new an,this.map.set(t,n)),n.add(e)}get(e,t){const n=this.map.get(e);return n?n.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function cn(e,t,n){const r=e.previousIndex;if(null===r)return r;let s=0;return n&&r{if(t&&t.key===n)this._maybeAddToChanges(t,e),this._appendAfter=t,t=t._next;else{const r=this._getOrCreateRecordForKey(n,e);t=this._insertBeforeOrAppend(t,r)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let e=t;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const n=this._records.get(e);this._maybeAddToChanges(n,t);const r=n._prev,s=n._next;return r&&(r._next=s),s&&(s._prev=r),n._next=null,n._prev=null,n}const n=new dn(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_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,t){Rt(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,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,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}}class dn{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}}let pn=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(null!=n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ie,new re]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(null!=t)return t;throw new Error(`Cannot find a differ supporting object '${e}' of type '${n=e,n.name||typeof n}'`);var n}}return e.ngInjectableDef=le({token:e,providedIn:"root",factory:()=>new e([new nn])}),e})(),fn=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ie,new re]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(t)return t;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return e.ngInjectableDef=le({token:e,providedIn:"root",factory:()=>new e([new un])}),e})();const mn=[new un],gn=new pn([new nn]),yn=new fn(mn);let _n=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>vn(e,Kt),e})();const vn=Qt;let wn=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>bn(e,Kt),e})();const bn=Qt;function Sn(e,t,n,r){let s=`ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${t}'. Current value: '${n}'.`;return r&&(s+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(e,t){const n=new Error(e);return En(n,t),n}(s,e)}function En(e,t){e.ngDebugContext=t,e.ngErrorLogger=t.logError.bind(t)}function Cn(e){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+e)}function xn(e,t,n){const r=e.state,s=1792&r;return s===t?(e.state=-1793&r|n,e.initIndex=-1,!0):s===n}function Tn(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function kn(e,t){return e.nodes[t]}function In(e,t){return e.nodes[t]}function Nn(e,t){return e.nodes[t]}function An(e,t){return e.nodes[t]}function Rn(e,t){return e.nodes[t]}const Pn={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0},On=()=>{},Dn=new Map;function Mn(e){let t=Dn.get(e);return t||(t=he(e)+"_"+Dn.size,Dn.set(e,t)),t}function Fn(e){return{id:"$$undefined",styles:e.styles,encapsulation:e.encapsulation,data:e.data}}let Ln=0;function jn(e,t,n,r){return!(!(2&e.state)&&Rt(e.oldValues[t.bindingIndex+n],r))}function Un(e,t,n,r){return!!jn(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function $n(e,t,n,r){const s=e.oldValues[t.bindingIndex+n];if(1&e.state||!Pt(s,r)){const i=t.bindings[n].name;throw Sn(Pn.createDebugContext(e,t.nodeIndex),`${i}: ${s}`,`${i}: ${r}`,0!=(1&e.state))}}function Vn(e){let t=e;for(;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function Hn(e,t){let n=e;for(;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function zn(e,t,n,r){try{return Vn(33554432&e.def.nodes[t].flags?In(e,t).componentView:e),Pn.handleEvent(e,t,n,r)}catch(s){e.root.errorHandler.handleError(s)}}function Bn(e){return e.parent?In(e.parent,e.parentNodeDef.nodeIndex):null}function qn(e){return e.parent?e.parentNodeDef.parent:null}function Qn(e,t){switch(201347067&t.flags){case 1:return In(e,t.nodeIndex).renderElement;case 2:return kn(e,t.nodeIndex).renderText}}function Kn(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function Wn(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function Zn(e){const t={};let n=0;const r={};return e&&e.forEach(([e,s])=>{"number"==typeof e?(t[e]=s,n|=function(e){return 1<{let n,r;return Array.isArray(e)?[r,n]=e:(r=0,n=e),n&&("function"==typeof n||"object"==typeof n)&&t&&Object.defineProperty(n,"__source",{value:t,configurable:!0}),{flags:r,token:n,tokenKey:Mn(n)}})}function Yn(e,t,n){let r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===De.Native?In(e,n.renderParent.nodeIndex).renderElement:void 0:t}const Jn=new WeakMap;function Xn(e){let t=Jn.get(e);return t||(t=e(()=>On),t.factory=e,Jn.set(e,t)),t}function er(e,t,n,r,s){3===t&&(n=e.renderer.parentNode(Qn(e,e.def.lastRenderRootNode))),tr(e,t,0,e.def.nodes.length-1,n,r,s)}function tr(e,t,n,r,s,i,o){for(let a=n;a<=r;a++){const n=e.def.nodes[a];11&n.flags&&rr(e,n,t,s,i,o),a+=n.childCount}}function nr(e,t,n,r,s,i){let o=e;for(;o&&!Kn(o);)o=o.parent;const a=o.parent,l=qn(o),c=l.nodeIndex+l.childCount;for(let u=l.nodeIndex+1;u<=c;u++){const e=a.def.nodes[u];e.ngContentIndex===t&&rr(a,e,n,r,s,i),u+=e.childCount}if(!a.parent){const o=e.root.projectableNodes[t];if(o)for(let t=0;t-1}(s,i.providedIn)||"root"===i.providedIn&&s._def.isRoot))){const n=e._providers.length;return e._def.providers[n]=e._def.providersByKey[t.tokenKey]={flags:5120,value:l.factory,deps:[],index:n,token:t.token},e._providers[n]=lr,e._providers[n]=fr(e,e._def.providersByKey[t.tokenKey])}return 4&t.flags?n:e._parent.get(t.token,n)}finally{Te(r)}var s,i}function fr(e,t){let n;switch(201347067&t.flags){case 512:n=function(e,t,n){const r=n.length;switch(r){case 0:return new t;case 1:return new t(pr(e,n[0]));case 2:return new t(pr(e,n[0]),pr(e,n[1]));case 3:return new t(pr(e,n[0]),pr(e,n[1]),pr(e,n[2]));default:const s=new Array(r);for(let t=0;t=n.length)&&(t=n.length-1),t<0)return null;const r=n[t];return r.viewContainerParent=null,Oe(n,t),Pn.dirtyParentQueries(r),yr(r),r}function gr(e,t,n){const r=t?Qn(t,t.def.lastRenderRootNode):e.renderElement,s=n.renderer.parentNode(r),i=n.renderer.nextSibling(r);er(n,2,s,i,void 0)}function yr(e){er(e,3,null,null,void 0)}const _r=new Object;function vr(e,t,n,r,s,i){return new wr(e,t,n,r,s,i)}class wr extends Ut{constructor(e,t,n,r,s,i){super(),this.selector=e,this.componentType=t,this._inputs=r,this._outputs=s,this.ngContentSelectors=i,this.viewDefFactory=n}get inputs(){const e=[],t=this._inputs;for(let n in t)e.push({propName:n,templateName:t[n]});return e}get outputs(){const e=[];for(let t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e}create(e,t,n,r){if(!r)throw new Error("ngModule should be provided");const s=Xn(this.viewDefFactory),i=s.nodes[0].element.componentProvider.nodeIndex,o=Pn.createRootView(e,t||[],n,s,r,_r),a=Nn(o,i).instance;return n&&o.renderer.setAttribute(In(o,0).renderElement,"ng-version",tn.full),new br(o,new xr(o),a)}}class br extends class{}{constructor(e,t,n){super(),this._view=e,this._viewRef=t,this._component=n,this._elDef=this._view.def.nodes[0],this.hostView=t,this.changeDetectorRef=t,this.instance=n}get location(){return new Kt(In(this._view,this._elDef.nodeIndex).renderElement)}get injector(){return new Nr(this._view,this._elDef)}get componentType(){return this._component.constructor}destroy(){this._viewRef.destroy()}onDestroy(e){this._viewRef.onDestroy(e)}}function Sr(e,t,n){return new Er(e,t,n)}class Er{constructor(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}get element(){return new Kt(this._data.renderElement)}get injector(){return new Nr(this._view,this._elDef)}get parentInjector(){let e=this._view,t=this._elDef.parent;for(;!t&&e;)t=qn(e),e=e.parent;return e?new Nr(e,t):new Nr(this._view,null)}clear(){for(let e=this._embeddedViews.length-1;e>=0;e--){const t=mr(this._data,e);Pn.destroyView(t)}}get(e){const t=this._embeddedViews[e];if(t){const e=new xr(t);return e.attachToViewContainerRef(this),e}return null}get length(){return this._embeddedViews.length}createEmbeddedView(e,t,n){const r=e.createEmbeddedView(t||{});return this.insert(r,n),r}createComponent(e,t,n,r,s){const i=n||this.parentInjector;s||e instanceof qt||(s=i.get(Ae));const o=e.create(i,r,void 0,s);return this.insert(o.hostView,t),o}insert(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");const n=e;return function(e,t,n,r){let s=t.viewContainer._embeddedViews;null==n&&(n=s.length),r.viewContainerParent=e,Pe(s,n,r),function(e,t){const n=Bn(t);if(!n||n===e||16&t.state)return;t.state|=16;let r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,t){if(4&t.flags)return;e.nodeFlags|=4,t.flags|=4;let n=t.parent;for(;n;)n.childFlags|=4,n=n.parent}(t.parent.def,t.parentNodeDef)}(t,r),Pn.dirtyParentQueries(r),gr(t,n>0?s[n-1]:null,r)}(this._view,this._data,t,n._view),n.attachToViewContainerRef(this),e}move(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");const n=this._embeddedViews.indexOf(e._view);return function(e,t,n){const r=e.viewContainer._embeddedViews,s=r[t];Oe(r,t),null==n&&(n=r.length),Pe(r,n,s),Pn.dirtyParentQueries(s),yr(s),gr(e,n>0?r[n-1]:null,s)}(this._data,n,t),e}indexOf(e){return this._embeddedViews.indexOf(e._view)}remove(e){const t=mr(this._data,e);t&&Pn.destroyView(t)}detach(e){const t=mr(this._data,e);return t?new xr(t):null}}function Cr(e){return new xr(e)}class xr{constructor(e){this._view=e,this._viewContainerRef=null,this._appRef=null}get rootNodes(){return function(e){const t=[];return er(e,0,void 0,void 0,t),t}(this._view)}get context(){return this._view.context}get destroyed(){return 0!=(128&this._view.state)}markForCheck(){Vn(this._view)}detach(){this._view.state&=-5}detectChanges(){const e=this._view.root.rendererFactory;e.begin&&e.begin();try{Pn.checkAndUpdateView(this._view)}finally{e.end&&e.end()}}checkNoChanges(){Pn.checkNoChangesView(this._view)}reattach(){this._view.state|=4}onDestroy(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)}destroy(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Pn.destroyView(this._view)}detachFromAppRef(){this._appRef=null,yr(this._view),Pn.dirtyParentQueries(this._view)}attachToAppRef(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}attachToViewContainerRef(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}}function Tr(e,t){return new kr(e,t)}class kr extends _n{constructor(e,t){super(),this._parentView=e,this._def=t}createEmbeddedView(e){return new xr(Pn.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))}get elementRef(){return new Kt(In(this._parentView,this._def.nodeIndex).renderElement)}}function Ir(e,t){return new Nr(e,t)}class Nr{constructor(e,t){this.view=e,this.elDef=t}get(e,t=wt.THROW_IF_NOT_FOUND){return Pn.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Mn(e)},t)}}function Ar(e,t){const n=e.def.nodes[t];if(1&n.flags){const t=In(e,n.nodeIndex);return n.element.template?t.template:t.renderElement}if(2&n.flags)return kn(e,n.nodeIndex).renderText;if(20240&n.flags)return Nn(e,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+t)}function Rr(e){return new Pr(e.renderer)}class Pr{constructor(e){this.delegate=e}selectRootElement(e){return this.delegate.selectRootElement(e)}createElement(e,t){const[n,r]=or(t),s=this.delegate.createElement(r,n);return e&&this.delegate.appendChild(e,s),s}createViewRoot(e){return e}createTemplateAnchor(e){const t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t}createText(e,t){const n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n}projectNodes(e,t){for(let n=0;ne())}onDestroy(e){this._destroyListeners.push(e)}}const Mr=Mn(Zt),Fr=Mn(Jt),Lr=Mn(Kt),jr=Mn(wn),Ur=Mn(_n),$r=Mn(gt),Vr=Mn(wt),Hr=Mn(be);function zr(e,t,n,r,s,i,o,a){const l=[];if(o)for(let u in o){const[e,t]=o[u];l[e]={flags:8,name:u,nonMinifiedName:t,ns:null,securityContext:null,suffix:null}}const c=[];if(a)for(let u in a)c.push({type:1,propName:u,target:null,eventName:a[u]});return Br(e,t|=16384,n,r,s,s,i,l,c)}function Br(e,t,n,r,s,i,o,a,l){const{matchedQueries:c,references:u,matchedQueryIds:h}=Zn(n);l||(l=[]),a||(a=[]),i=fe(i);const d=Gn(o,he(s));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:c,matchedQueryIds:h,references:u,ngContentIndex:-1,childCount:r,bindings:a,bindingFlags:ar(a),outputs:l,element:null,provider:{token:s,value:i,deps:d},text:null,query:null,ngContent:null}}function qr(e,t){return Zr(e,t)}function Qr(e,t){let n=e;for(;n.parent&&!Kn(n);)n=n.parent;return Gr(n.parent,qn(n),!0,t.provider.value,t.provider.deps)}function Kr(e,t){const n=Gr(e,t.parent,(32768&t.flags)>0,t.provider.value,t.provider.deps);if(t.outputs.length)for(let r=0;rzn(e,t,n,r)}function Zr(e,t){const n=(8192&t.flags)>0,r=t.provider;switch(201347067&t.flags){case 512:return Gr(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,s){const i=s.length;switch(i){case 0:return r();case 1:return r(Jr(e,t,n,s[0]));case 2:return r(Jr(e,t,n,s[0]),Jr(e,t,n,s[1]));case 3:return r(Jr(e,t,n,s[0]),Jr(e,t,n,s[1]),Jr(e,t,n,s[2]));default:const o=Array(i);for(let r=0;rMe}),is={},os=function(){var e={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencySymbol:15,CurrencyName:16,Currencies:17,PluralCase:18,ExtraData:19};return e[e.LocaleId]="LocaleId",e[e.DayPeriodsFormat]="DayPeriodsFormat",e[e.DayPeriodsStandalone]="DayPeriodsStandalone",e[e.DaysFormat]="DaysFormat",e[e.DaysStandalone]="DaysStandalone",e[e.MonthsFormat]="MonthsFormat",e[e.MonthsStandalone]="MonthsStandalone",e[e.Eras]="Eras",e[e.FirstDayOfWeek]="FirstDayOfWeek",e[e.WeekendRange]="WeekendRange",e[e.DateFormat]="DateFormat",e[e.TimeFormat]="TimeFormat",e[e.DateTimeFormat]="DateTimeFormat",e[e.NumberSymbols]="NumberSymbols",e[e.NumberFormats]="NumberFormats",e[e.CurrencySymbol]="CurrencySymbol",e[e.CurrencyName]="CurrencyName",e[e.Currencies]="Currencies",e[e.PluralCase]="PluralCase",e[e.ExtraData]="ExtraData",e}(),as=void 0;var ls=["en",[["a","p"],["AM","PM"],as],[["AM","PM"],as,as],[["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"]],as,[["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"]],as,[["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}",as,"{1} 'at' {0}",as],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];class cs extends x{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,n){let r,s=e=>null,i=()=>null;e&&"object"==typeof e?(r=this.__isAsync?t=>{setTimeout(()=>e.next(t))}:t=>{e.next(t)},e.error&&(s=this.__isAsync?t=>{setTimeout(()=>e.error(t))}:t=>{e.error(t)}),e.complete&&(i=this.__isAsync?()=>{setTimeout(()=>e.complete())}:()=>{e.complete()})):(r=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)},t&&(s=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)}),n&&(i=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(r,s,i);return e instanceof h&&e.add(o),o}}function us(){return this._results[At()]()}class hs{constructor(){this.dirty=!0,this._results=[],this.changes=new cs,this.length=0;const e=At(),t=hs.prototype;t[e]||(t[e]=us)}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e){this._results=function e(t,n){void 0===n&&(n=t);for(let r=0;r{this.resolve=e,this.reject=t})}runInitializers(){if(this.initialized)return;const e=[],t=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{t()}).catch(e=>{this.reject(e)}),0===e.length&&t(),this.initialized=!0}}const fs=new we("AppId");function ms(){return`${gs()}${gs()}${gs()}`}function gs(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ys=new we("Platform Initializer"),_s=new we("Platform ID"),vs=new we("appBootstrapListener");class ws{log(e){console.log(e)}warn(e){console.warn(e)}}const bs=new we("LocaleId");function Ss(){throw new Error("Runtime compiler is not loaded")}const Es=Ss,Cs=Ss,xs=Ss,Ts=Ss;class ks{constructor(){this.compileModuleSync=Es,this.compileModuleAsync=Cs,this.compileModuleAndAllComponentsSync=xs,this.compileModuleAndAllComponentsAsync=Ts}clearCache(){}clearCacheFor(e){}getModuleId(e){}}class Is{}let Ns,As;function Rs(){const e=ve.wtf;return!(!e||(Ns=e.trace,!Ns)||(As=Ns.events,0))}const Ps=Rs();function Os(e,t){return null}const Ds=Ps?function(e,t=null){return As.createScope(e,t)}:(e,t)=>Os,Ms=Ps?function(e,t){return Ns.leaveScope(e,t),t}:(e,t)=>t,Fs=(()=>Promise.resolve(0))();function Ls(e){"undefined"==typeof Zone?Fs.then(()=>{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}class js{constructor({enableLongStackTrace:e=!1}){if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new cs(!1),this.onMicrotaskEmpty=new cs(!1),this.onStable=new cs(!1),this.onError=new cs(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");var t;Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(t=this)._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,i,o)=>{try{return Hs(t),e.invokeTask(r,s,i,o)}finally{zs(t)}},onInvoke:(e,n,r,s,i,o,a)=>{try{return Hs(t),e.invoke(r,s,i,o,a)}finally{zs(t)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(t.hasPendingMicrotasks=s.microTask,Vs(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!js.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(js.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){const s=this._inner,i=s.scheduleEventTask("NgZoneEvent: "+r,e,$s,Us,Us);try{return s.runTask(i,t,n)}finally{s.cancelTask(i)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}}function Us(){}const $s={};function Vs(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Hs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function zs(e){e._nesting--,Vs(e)}class Bs{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new cs,this.onMicrotaskEmpty=new cs,this.onStable=new cs,this.onError=new cs}run(e){return e()}runGuarded(e){return e()}runOutsideAngular(e){return e()}runTask(e){return e()}}class qs{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.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:()=>{js.assertNotInAngularZone(),Ls(()=>{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())Ls(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(t=>!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,t,n){let r=-1;t&&t>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(e=>e.timeoutId!==r),e(this._didWork,this.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:n})}whenStable(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,t,n){return[]}}class Qs{constructor(){this._applications=new Map,Zs.addToWindow(this)}registerApplication(e,t){this._applications.set(e,t)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,t=!0){return Zs.findTestabilityInTree(this,e,t)}}class Ks{addToWindow(e){}findTestabilityInTree(e,t,n){return null}}let Ws,Zs=new Ks;const Gs=new we("AllowMultipleToken");class Ys{constructor(e,t){this.name=e,this.token=t}}function Js(e,t,n=[]){const r="Platform: "+t,s=new we(r);return(t=[])=>{let i=Xs();if(!i||i.injector.get(Gs,!1))if(e)e(n.concat(t).concat({provide:s,useValue:!0}));else{const e=n.concat(t).concat({provide:s,useValue:!0});!function(e){if(Ws&&!Ws.destroyed&&!Ws.injector.get(Gs,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ws=e.get(ei);const t=e.get(ys,null);t&&t.forEach(e=>e())}(wt.create({providers:e,name:r}))}return function(e){const t=Xs();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(s)}}function Xs(){return Ws&&!Ws.destroyed?Ws:null}class ei{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,t){const n=function(e){let t;return t="noop"===e?new Bs:("zone.js"===e?void 0:e)||new js({enableLongStackTrace:He()}),t}(t?t.ngZone:void 0),r=[{provide:js,useValue:n}];return n.run(()=>{const t=wt.create({providers:r,parent:this.injector,name:e.moduleType.name}),s=e.create(t),i=s.injector.get(Ue,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>ri(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:e=>{i.handleError(e)}})),function(e,t,n){try{const r=n();return Ft(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e.handleError(n)),n}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}(i,n,()=>{const e=s.injector.get(ps);return e.runInitializers(),e.donePromise.then(()=>(this._moduleDoBootstrap(s),s))})})}bootstrapModule(e,t=[]){const n=ti({},t);return function(e,t,n){return e.get(Is).createCompiler([t]).compileModuleAsync(n)}(this.injector,n,e).then(e=>this.bootstrapModuleFactory(e,n))}_moduleDoBootstrap(e){const t=e.injector.get(ni);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(e=>t.bootstrap(e));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${he(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);e.instance.ngDoBootstrap(t)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}function ti(e,t){return Array.isArray(t)?t.reduce(ti,e):Object.assign({},e,t)}let ni=(()=>{class e{constructor(e,t,n,r,s,i){this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=s,this._initStatus=i,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=He(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new w(e=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{e.next(this._stable),e.complete()})}),a=new w(e=>{let t;this._zone.runOutsideAngular(()=>{t=this._zone.onStable.subscribe(()=>{js.assertNotInAngularZone(),Ls(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,e.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{js.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{e.next(!1)}))});return()=>{t.unsubscribe(),n.unsubscribe()}});this.isStable=function(...e){let t=Number.POSITIVE_INFINITY,n=null,r=e[e.length-1];return k(r)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof r&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof w?e[0]:Q(t)(K(e,n))}(o,a.pipe(e=>{return W()((t=ee,function(e){let n;n="function"==typeof t?t:function(){return t};const r=Object.create(e,J);return r.source=e,r.subjectFactory=n,r})(e));var t}))}bootstrap(e,t){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=e instanceof Ut?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);const r=n instanceof qt?null:this._injector.get(Ae),s=n.create(wt.NULL,[],t||n.selector,r);s.onDestroy(()=>{this._unloadComponent(s)});const i=s.injector.get(qs,null);return i&&s.injector.get(Qs).registerApplication(s.location.nativeElement,i),this._loadComponent(s),He()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");const t=e._tickScope();try{this._runningTick=!0;for(let e of this._views)e.detectChanges();if(this._enforceNoNewChanges)for(let e of this._views)e.checkNoChanges()}catch(n){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(n))}finally{this._runningTick=!1,Ms(t)}}attachView(e){const t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){const t=e;ri(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(vs,[]).concat(this._bootstrapListeners).forEach(t=>t(e))}_unloadComponent(e){this.detachView(e.hostView),ri(this.components,e)}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy())}get viewCount(){return this._views.length}}return e._tickScope=Ds("ApplicationRef#tick()"),e})();function ri(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class si{}class ii{}const oi={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};class ai{constructor(e,t){this._compiler=e,this._config=t||oi}load(e){return this._compiler instanceof ks?this.loadFactory(e):this.loadAndCompile(e)}loadAndCompile(e){let[t,r]=e.split("#");return void 0===r&&(r="default"),n("zn8P")(t).then(e=>e[r]).then(e=>li(e,t,r)).then(e=>this._compiler.compileModuleAsync(e))}loadFactory(e){let[t,r]=e.split("#"),s="NgFactory";return void 0===r&&(r="default",s=""),n("zn8P")(this._config.factoryPathPrefix+t+this._config.factoryPathSuffix).then(e=>e[r+s]).then(e=>li(e,t,r))}}function li(e,t,n){if(!e)throw new Error(`Cannot find '${n}' in '${t}'`);return e}class ci{constructor(e,t){this.name=e,this.callback=t}}class ui{constructor(e,t,n){this.listeners=[],this.parent=null,this._debugContext=n,this.nativeNode=e,t&&t instanceof hi&&t.addChild(this)}get injector(){return this._debugContext.injector}get componentInstance(){return this._debugContext.component}get context(){return this._debugContext.context}get references(){return this._debugContext.references}get providerTokens(){return this._debugContext.providerTokens}}class hi extends ui{constructor(e,t,n){super(e,t,n),this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=e}addChild(e){e&&(this.childNodes.push(e),e.parent=this)}removeChild(e){const t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))}insertChildrenAfter(e,t){const n=this.childNodes.indexOf(e);-1!==n&&(this.childNodes.splice(n+1,0,...t),t.forEach(t=>{t.parent&&t.parent.removeChild(t),e.parent=this}))}insertBefore(e,t){const n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))}query(e){return this.queryAll(e)[0]||null}queryAll(e){const t=[];return function e(t,n,r){t.childNodes.forEach(t=>{t instanceof hi&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t}queryAllNodes(e){const t=[];return function e(t,n,r){t instanceof hi&&t.childNodes.forEach(t=>{n(t)&&r.push(t),t instanceof hi&&e(t,n,r)})}(this,e,t),t}get children(){return this.childNodes.filter(e=>e instanceof hi)}triggerEventHandler(e,t){this.listeners.forEach(n=>{n.name==e&&n.callback(t)})}}const di=new Map,pi=function(e){return di.get(e)||null};function fi(e){di.set(e.nativeNode,e)}const mi=Js(null,"core",[{provide:_s,useValue:"unknown"},{provide:ei,deps:[wt]},{provide:Qs,deps:[]},{provide:ws,deps:[]}]);function gi(){return gn}function yi(){return yn}function _i(e){return e||"en-US"}function vi(e){let t=[];return e.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(e){t.push(e)}}class wi{constructor(e){}}function bi(e,t,n,r,s,i){e|=1;const{matchedQueries:o,references:a,matchedQueryIds:l}=Zn(t);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:e,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:o,matchedQueryIds:l,references:a,ngContentIndex:n,childCount:r,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:i?Xn(i):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:s||On},provider:null,text:null,query:null,ngContent:null}}function Si(e,t,n,r,s,i,o=[],a,l,c,u,h){c||(c=On);const{matchedQueries:d,references:p,matchedQueryIds:f}=Zn(n);let m=null,g=null;i&&([m,g]=or(i)),a=a||[];const y=new Array(a.length);for(let w=0;w{const[n,r]=or(e);return[n,r,t]});return h=function(e){if(e&&"$$undefined"===e.id){const t=null!=e.encapsulation&&e.encapsulation!==De.None||e.styles.length||Object.keys(e.data).length;e.id=t?"c"+Ln++:"$$empty"}return e&&"$$empty"===e.id&&(e=null),e||null}(h),u&&(t|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:d,matchedQueryIds:f,references:p,ngContentIndex:r,childCount:s,bindings:y,bindingFlags:ar(y),outputs:_,element:{ns:m,name:g,attrs:v,template:null,componentProvider:null,componentView:u||null,componentRendererType:h,publicProviders:null,allProviders:null,handleEvent:c||On},provider:null,text:null,query:null,ngContent:null}}function Ei(e,t,n){const r=n.element,s=e.root.selectorOrNode,i=e.renderer;let o;if(e.parent||!s){o=r.name?i.createElement(r.name,r.ns):i.createComment("");const s=Yn(e,t,n);s&&i.appendChild(s,o)}else o=i.selectRootElement(s,!!r.componentRendererType&&r.componentRendererType.encapsulation===De.ShadowDom);if(r.attrs)for(let a=0;azn(e,t,n,r)}function Ti(e,t,n,r){if(!Un(e,t,n,r))return!1;const s=t.bindings[n],i=In(e,t.nodeIndex),o=i.renderElement,a=s.name;switch(15&s.flags){case 1:!function(e,t,n,r,s,i){const o=t.securityContext;let a=o?e.root.sanitizer.sanitize(o,i):i;a=null!=a?a.toString():null;const l=e.renderer;null!=i?l.setAttribute(n,s,a,r):l.removeAttribute(n,s,r)}(e,s,o,s.ns,a,r);break;case 2:!function(e,t,n,r){const s=e.renderer;r?s.addClass(t,n):s.removeClass(t,n)}(e,o,a,r);break;case 4:!function(e,t,n,r,s){let i=e.root.sanitizer.sanitize(ut.STYLE,s);if(null!=i){i=i.toString();const e=t.suffix;null!=e&&(i+=e)}else i=null;const o=e.renderer;null!=i?o.setStyle(n,r,i):o.removeStyle(n,r)}(e,s,o,a,r);break;case 8:!function(e,t,n,r,s){const i=t.securityContext;let o=i?e.root.sanitizer.sanitize(i,s):s;e.renderer.setProperty(n,r,o)}(33554432&t.flags&&32&s.flags?i.componentView:e,s,o,a,r)}return!0}function ki(e){const t=e.def.nodeMatchedQueries;for(;e.parent&&Wn(e);){let n=e.parentNodeDef;e=e.parent;const r=n.nodeIndex+n.childCount;for(let s=0;s<=r;s++){const r=e.def.nodes[s];67108864&r.flags&&536870912&r.flags&&(r.query.filterId&t)===r.query.filterId&&Rn(e,s).setDirty(),!(1&r.flags&&s+r.childCount0)c=e,Mi(e)||(u=e);else for(;c&&f===c.nodeIndex+c.childCount;){const e=c.parent;e&&(e.childFlags|=c.childFlags,e.childMatchedQueries|=c.childMatchedQueries),c=e,u=c&&Mi(c)?c.renderParent:c}}return{factory:null,nodeFlags:o,rootNodeFlags:a,nodeMatchedQueries:l,flags:e,nodes:t,updateDirectives:n||On,updateRenderer:r||On,handleEvent:(e,n,r,s)=>t[n].element.handleEvent(e,r,s),bindingCount:s,outputCount:i,lastRenderRootNode:p}}function Mi(e){return 0!=(1&e.flags)&&null===e.element.name}function Fi(e,t,n){const r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${t.nodeIndex}!`)}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${t.nodeIndex}!`);if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${t.nodeIndex}!`);if(134217728&t.flags&&e)throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${t.nodeIndex}!`)}if(t.childCount){const r=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=r&&t.nodeIndex+t.childCount>r)throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${t.nodeIndex}!`)}}function Li(e,t,n,r){const s=$i(e.root,e.renderer,e,t,n);return Vi(s,e.component,r),Hi(s),s}function ji(e,t,n){const r=$i(e,e.renderer,null,null,t);return Vi(r,n,n),Hi(r),r}function Ui(e,t,n,r){const s=t.element.componentRendererType;let i;return i=s?e.root.rendererFactory.createRenderer(r,s):e.root.renderer,$i(e.root,i,e,t.element.componentProvider,n)}function $i(e,t,n,r,s){const i=new Array(s.nodes.length),o=s.outputCount?new Array(s.outputCount):null;return{def:s,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:i,state:13,root:e,renderer:t,oldValues:new Array(s.bindingCount),disposables:o,initIndex:-1}}function Vi(e,t,n){e.component=t,e.context=n}function Hi(e){let t;Kn(e)&&(t=In(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);const n=e.def,r=e.nodes;for(let s=0;s0&&Ti(e,t,0,n)&&(p=!0),d>1&&Ti(e,t,1,r)&&(p=!0),d>2&&Ti(e,t,2,s)&&(p=!0),d>3&&Ti(e,t,3,i)&&(p=!0),d>4&&Ti(e,t,4,o)&&(p=!0),d>5&&Ti(e,t,5,a)&&(p=!0),d>6&&Ti(e,t,6,l)&&(p=!0),d>7&&Ti(e,t,7,c)&&(p=!0),d>8&&Ti(e,t,8,u)&&(p=!0),d>9&&Ti(e,t,9,h)&&(p=!0),p}(e,t,n,r,s,i,o,a,l,c,u,h);case 2:return function(e,t,n,r,s,i,o,a,l,c,u,h){let d=!1;const p=t.bindings,f=p.length;if(f>0&&Un(e,t,0,n)&&(d=!0),f>1&&Un(e,t,1,r)&&(d=!0),f>2&&Un(e,t,2,s)&&(d=!0),f>3&&Un(e,t,3,i)&&(d=!0),f>4&&Un(e,t,4,o)&&(d=!0),f>5&&Un(e,t,5,a)&&(d=!0),f>6&&Un(e,t,6,l)&&(d=!0),f>7&&Un(e,t,7,c)&&(d=!0),f>8&&Un(e,t,8,u)&&(d=!0),f>9&&Un(e,t,9,h)&&(d=!0),d){let d=t.text.prefix;f>0&&(d+=Oi(n,p[0])),f>1&&(d+=Oi(r,p[1])),f>2&&(d+=Oi(s,p[2])),f>3&&(d+=Oi(i,p[3])),f>4&&(d+=Oi(o,p[4])),f>5&&(d+=Oi(a,p[5])),f>6&&(d+=Oi(l,p[6])),f>7&&(d+=Oi(c,p[7])),f>8&&(d+=Oi(u,p[8])),f>9&&(d+=Oi(h,p[9]));const m=kn(e,t.nodeIndex).renderText;e.renderer.setValue(m,d)}return d}(e,t,n,r,s,i,o,a,l,c,u,h);case 16384:return function(e,t,n,r,s,i,o,a,l,c,u,h){const d=Nn(e,t.nodeIndex),p=d.instance;let f=!1,m=void 0;const g=t.bindings.length;return g>0&&jn(e,t,0,n)&&(f=!0,m=es(e,d,t,0,n,m)),g>1&&jn(e,t,1,r)&&(f=!0,m=es(e,d,t,1,r,m)),g>2&&jn(e,t,2,s)&&(f=!0,m=es(e,d,t,2,s,m)),g>3&&jn(e,t,3,i)&&(f=!0,m=es(e,d,t,3,i,m)),g>4&&jn(e,t,4,o)&&(f=!0,m=es(e,d,t,4,o,m)),g>5&&jn(e,t,5,a)&&(f=!0,m=es(e,d,t,5,a,m)),g>6&&jn(e,t,6,l)&&(f=!0,m=es(e,d,t,6,l,m)),g>7&&jn(e,t,7,c)&&(f=!0,m=es(e,d,t,7,c,m)),g>8&&jn(e,t,8,u)&&(f=!0,m=es(e,d,t,8,u,m)),g>9&&jn(e,t,9,h)&&(f=!0,m=es(e,d,t,9,h,m)),m&&p.ngOnChanges(m),65536&t.flags&&Tn(e,256,t.nodeIndex)&&p.ngOnInit(),262144&t.flags&&p.ngDoCheck(),f}(e,t,n,r,s,i,o,a,l,c,u,h);case 32:case 64:case 128:return function(e,t,n,r,s,i,o,a,l,c,u,h){const d=t.bindings;let p=!1;const f=d.length;if(f>0&&Un(e,t,0,n)&&(p=!0),f>1&&Un(e,t,1,r)&&(p=!0),f>2&&Un(e,t,2,s)&&(p=!0),f>3&&Un(e,t,3,i)&&(p=!0),f>4&&Un(e,t,4,o)&&(p=!0),f>5&&Un(e,t,5,a)&&(p=!0),f>6&&Un(e,t,6,l)&&(p=!0),f>7&&Un(e,t,7,c)&&(p=!0),f>8&&Un(e,t,8,u)&&(p=!0),f>9&&Un(e,t,9,h)&&(p=!0),p){const p=An(e,t.nodeIndex);let m;switch(201347067&t.flags){case 32:m=new Array(d.length),f>0&&(m[0]=n),f>1&&(m[1]=r),f>2&&(m[2]=s),f>3&&(m[3]=i),f>4&&(m[4]=o),f>5&&(m[5]=a),f>6&&(m[6]=l),f>7&&(m[7]=c),f>8&&(m[8]=u),f>9&&(m[9]=h);break;case 64:m={},f>0&&(m[d[0].name]=n),f>1&&(m[d[1].name]=r),f>2&&(m[d[2].name]=s),f>3&&(m[d[3].name]=i),f>4&&(m[d[4].name]=o),f>5&&(m[d[5].name]=a),f>6&&(m[d[6].name]=l),f>7&&(m[d[7].name]=c),f>8&&(m[d[8].name]=u),f>9&&(m[d[9].name]=h);break;case 128:const e=n;switch(f){case 1:m=e.transform(n);break;case 2:m=e.transform(r);break;case 3:m=e.transform(r,s);break;case 4:m=e.transform(r,s,i);break;case 5:m=e.transform(r,s,i,o);break;case 6:m=e.transform(r,s,i,o,a);break;case 7:m=e.transform(r,s,i,o,a,l);break;case 8:m=e.transform(r,s,i,o,a,l,c);break;case 9:m=e.transform(r,s,i,o,a,l,c,u);break;case 10:m=e.transform(r,s,i,o,a,l,c,u,h)}}p.value=m}return p}(e,t,n,r,s,i,o,a,l,c,u,h);default:throw"unreachable"}}(e,t,r,s,i,o,a,l,c,u,h,d):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){let r=!1;for(let s=0;s0&&$n(e,t,0,n),d>1&&$n(e,t,1,r),d>2&&$n(e,t,2,s),d>3&&$n(e,t,3,i),d>4&&$n(e,t,4,o),d>5&&$n(e,t,5,a),d>6&&$n(e,t,6,l),d>7&&$n(e,t,7,c),d>8&&$n(e,t,8,u),d>9&&$n(e,t,9,h)}(e,t,r,s,i,o,a,l,c,u,h,d):function(e,t,n){for(let r=0;r{const r=co.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),e.modules.forEach(e=>{uo.forEach((r,s)=>{ce(s).providedIn===e&&(t=!0,n=n||r.deprecatedBehavior)})})),{hasOverrides:t,hasDeprecatedOverrides:n}}(e);return t?(function(e){for(let t=0;t0){let t=new Set(e.modules);uo.forEach((r,s)=>{if(t.has(ce(s).providedIn)){let t={token:s,flags:r.flags|(n?4096:0),deps:Gn(r.deps),value:r.value,index:e.providers.length};e.providers.push(t),e.providersByKey[Mn(s)]=t}})}}(e=e.factory(()=>On)),e):e}(r))}const co=new Map,uo=new Map,ho=new Map;function po(e){let t;co.set(e.token,e),"function"==typeof e.token&&(t=ce(e.token))&&"function"==typeof t.providedIn&&uo.set(e.token,e)}function fo(e,t){const n=Xn(t.viewDefFactory),r=Xn(n.nodes[0].element.componentView);ho.set(e,r)}function mo(){co.clear(),uo.clear(),ho.clear()}function go(e){if(0===co.size)return e;const t=function(e){const t=[];let n=null;for(let r=0;rOn);for(let r=0;r"-"+e[1].toLowerCase()))]=mt(o))}const r=t.parent,o=In(e,r.nodeIndex).renderElement;if(r.element.name)for(let t in n){const r=n[t];null!=r?e.renderer.setAttribute(o,t,r):e.renderer.removeAttribute(o,t)}else e.renderer.setValue(o,"bindings="+JSON.stringify(n,null,2))}}var s}function Ro(e,t,n,r){Ki(e,t,n,...r)}function Po(e,t){for(let n=t;n(i++,i===s?e.error.bind(e,...t):On)),inew Do(e,t),handleEvent:ko,updateDirectives:Io,updateRenderer:No}:{setCurrentNode:()=>{},createRootView:ro,createEmbeddedView:Li,createComponentView:Ui,createNgModuleRef:Or,overrideProvider:On,overrideComponentView:On,clearOverrides:On,checkAndUpdateView:Bi,checkNoChangesView:zi,destroyView:Zi,createDebugContext:(e,t)=>new Do(e,t),handleEvent:(e,t,n,r)=>e.def.handleEvent(e,t,n,r),updateDirectives:(e,t)=>e.def.updateDirectives(0===t?yo:_o,e),updateRenderer:(e,t)=>e.def.updateRenderer(0===t?yo:_o,e)};Pn.setCurrentNode=e.setCurrentNode,Pn.createRootView=e.createRootView,Pn.createEmbeddedView=e.createEmbeddedView,Pn.createComponentView=e.createComponentView,Pn.createNgModuleRef=e.createNgModuleRef,Pn.overrideProvider=e.overrideProvider,Pn.overrideComponentView=e.overrideComponentView,Pn.clearOverrides=e.clearOverrides,Pn.checkAndUpdateView=e.checkAndUpdateView,Pn.checkNoChangesView=e.checkNoChangesView,Pn.destroyView=e.destroyView,Pn.resolveDep=Jr,Pn.createDebugContext=e.createDebugContext,Pn.handleEvent=e.handleEvent,Pn.updateDirectives=e.updateDirectives,Pn.updateRenderer=e.updateRenderer,Pn.dirtyParentQueries=ki}();const t=function(e){const t=Array.from(e.providers),n=Array.from(e.modules),r={};for(const s in e.providersByKey)r[s]=e.providersByKey[s];return{factory:e.factory,isRoot:e.isRoot,providers:t,modules:n,providersByKey:r}}(Xn(this._ngModuleDefFactory));return Pn.createNgModuleRef(this.moduleType,e||wt.NULL,this._bootstrapComponents,t)}}class Ho{}class zo{constructor(){this.title="angular-image-viewer",this.images=["https://sls-app-resources-bucket.s3.us-east-2.amazonaws.com/temp/1.2M.png?q=1","https://sls-app-resources-bucket.s3.us-east-2.amazonaws.com/temp/520K.png?q=2","https://sls-app-resources-bucket.s3.us-east-2.amazonaws.com/temp/43.6K.png?q=3","https://sls-app-resources-bucket.s3.us-east-2.amazonaws.com/temp/16M.jpg?q=4","https://i.ytimg.com/vi/nlYlNF30bVg/hqdefault.jpg","https://www.askideas.com/media/10/Funny-Goat-Closeup-Pouting-Face.jpg"],this.imageIndexOne=0,this.config={customBtns:[{name:"print",icon:"fa fa-print"},{name:"link",icon:"fa fa-link"}]}}handleEvent(e){switch(console.log(`${e.name} has been click on img ${e.imageIndex+1}`),e.name){case"print":console.log("run print logic")}}}class Bo{}const qo=new we("Location Initialized");class Qo{}const Ko=new we("appBaseHref");class Wo{constructor(e,t){this._subject=new cs,this._urlChangeListeners=[],this._platformStrategy=e;const n=this._platformStrategy.getBaseHref();this._platformLocation=t,this._baseHref=Wo.stripTrailingSlash(Zo(n)),this._platformStrategy.onPopState(e=>{this._subject.emit({url:this.path(!0),pop:!0,state:e.state,type:e.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+Wo.normalizeQueryParams(t))}normalize(e){return Wo.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Zo(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Wo.normalizeQueryParams(t)),n)}replaceState(e,t="",n=null){this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Wo.normalizeQueryParams(t)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(e){this._urlChangeListeners.push(e),this.subscribe(e=>{this._notifyUrlChangeListeners(e.url,e.state)})}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}static normalizeQueryParams(e){return e&&"?"!==e[0]?"?"+e:e}static joinWithSlash(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}static stripTrailingSlash(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}}function Zo(e){return e.replace(/\/index.html$/,"")}class Go extends Qo{constructor(e,t){super(),this._platformLocation=e,this._baseHref="",null!=t&&(this._baseHref=t)}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}path(e=!1){let t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}prepareExternalUrl(e){const t=Wo.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t}pushState(e,t,n,r){let s=this.prepareExternalUrl(n+Wo.normalizeQueryParams(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,t,s)}replaceState(e,t,n,r){let s=this.prepareExternalUrl(n+Wo.normalizeQueryParams(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}class Yo extends Qo{constructor(e,t){if(super(),this._platformLocation=e,null==t&&(t=this._platformLocation.getBaseHrefFromDOM()),null==t)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=t}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Wo.joinWithSlash(this._baseHref,e)}path(e=!1){const t=this._platformLocation.pathname+Wo.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,r){const s=this.prepareExternalUrl(n+Wo.normalizeQueryParams(r));this._platformLocation.pushState(e,t,s)}replaceState(e,t,n,r){const s=this.prepareExternalUrl(n+Wo.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}const Jo=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),Xo=new we("UseV4Plurals");class ea{}class ta extends ea{constructor(e,t){super(),this.locale=e,this.deprecatedPluralFn=t}getPluralCategory(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){return function(e){const t=e.toLowerCase().replace(/_/g,"-");let n=is[t];if(n)return n;const r=t.split("-")[0];if(n=is[r],n)return n;if("en"===r)return ls;throw new Error(`Missing locale data for the locale "${e}".`)}(e)[os.PluralCase]}(t||this.locale)(e)){case Jo.Zero:return"zero";case Jo.One:return"one";case Jo.Two:return"two";case Jo.Few:return"few";case Jo.Many:return"many";default:return"other"}}}class na{constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}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}}class ra{constructor(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){He()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(e)}. See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.`),this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}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(t){throw new Error(`Cannot find a differ supporting object '${n}' of type '${e=n,e.name||typeof e}'. NgFor only supports binding to Iterables such as Arrays.`)}}var e;if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const t=[];e.forEachOperation((e,n,r)=>{if(null==e.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new na(null,this._ngForOf,-1,-1),null===r?void 0:r),s=new sa(e,n);t.push(s)}else if(null==r)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const s=this._viewContainer.get(n);this._viewContainer.move(s,r);const i=new sa(e,s);t.push(i)}});for(let n=0;n{this._viewContainer.get(e.currentIndex).context.$implicit=e.item})}_perViewChange(e,t){e.context.$implicit=t.item}static ngTemplateContextGuard(e,t){return!0}}class sa{constructor(e,t){this.record=e,this.view=t}}class ia{constructor(e,t){this._viewContainer=e,this._context=new oa,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){aa("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){aa("ngIfElse",e),this._elseTemplateRef=e,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)))}}class oa{constructor(){this.$implicit=null,this.ngIf=null}}function aa(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${he(t)}'.`)}class la{}class ca{constructor(e,t,n){this._ngEl=e,this._differs=t,this._renderer=n}getValue(){return null}setNgStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}applyChanges(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_applyChanges(e){e.forEachRemovedItem(e=>this._setStyle(e.key,null)),e.forEachAddedItem(e=>this._setStyle(e.key,e.currentValue)),e.forEachChangedItem(e=>this._setStyle(e.key,e.currentValue))}_setStyle(e,t){const[n,r]=e.split(".");null!=(t=null!=t&&r?`${t}${r}`:t)?this._renderer.setStyle(this._ngEl.nativeElement,n,t):this._renderer.removeStyle(this._ngEl.nativeElement,n)}}let ua=(()=>{class e{constructor(e){this._delegate=e}getValue(){return this._delegate.getValue()}}return e.ngDirectiveDef=void 0,e})();class ha extends ua{constructor(e){super(e)}set ngStyle(e){this._delegate.setNgStyle(e)}ngDoCheck(){this._delegate.applyChanges()}}class da{}const pa=new we("DocumentToken");let fa=(()=>{class e{}return e.ngInjectableDef=le({token:e,providedIn:"root",factory:()=>new ma(ke(pa),window,ke(Ue))}),e})();class ma{constructor(e,t,n){this.document=e,this.window=t,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(e){this.supportScrollRestoration()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(this.supportScrollRestoration()){e=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(e):e.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{const t=this.document.querySelector("#"+e);if(t)return void this.scrollToElement(t);const n=this.document.querySelector(`[name='${e}']`);if(n)return void this.scrollToElement(n)}catch(t){this.errorHandler.handleError(t)}}}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}supportScrollRestoration(){try{return!!this.window&&!!this.window.scrollTo}catch(e){return!1}}}function ga(...e){let t=e[e.length-1];return k(t)?(e.pop(),$(e,t)):K(e)}class ya extends x{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new S;return this._value}next(e){super.next(this._value=e)}}const _a=(()=>{function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e})(),va={};class wa{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new ba(e,this.resultSelector))}}class ba extends F{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(va),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let n=0;ne.complete());function Ea(e){return e?function(e){return new w(t=>e.schedule(()=>t.complete()))}(e):Sa}function Ca(e){return new w(t=>{let n;try{n=e()}catch(r){return void t.error(r)}return(n?V(n):Ea()).subscribe(t)})}function xa(){return Q(1)}function Ta(e,t){return function(n){return n.lift(new ka(e,t))}}class ka{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new Ia(e,this.predicate,this.thisArg))}}class Ia extends f{constructor(e,t,n){super(e),this.predicate=t,this.thisArg=n,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}const Na=(()=>{function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e})();function Aa(e){return function(t){return 0===e?Ea():t.lift(new Ra(e))}}class Ra{constructor(e){if(this.total=e,this.total<0)throw new Na}call(e,t){return t.subscribe(new Pa(e,this.total))}}class Pa extends f{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,n=this.total,r=this.count++;t.length0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;st.lift(new Da(e))}class Da{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new Ma(e,this.errorFactory))}}class Ma extends f{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function Fa(){return new _a}function La(e=null){return t=>t.lift(new ja(e))}class ja{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new Ua(e,this.defaultValue))}}class Ua extends f{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function $a(e,t){const n=arguments.length>=2;return r=>r.pipe(e?Ta((t,n)=>e(t,n,r)):q,Aa(1),n?La(t):Oa(()=>new _a))}function Va(e){return function(t){const n=new Ha(e),r=t.lift(n);return n.caught=r}}class Ha{constructor(e){this.selector=e}call(e,t){return t.subscribe(new za(e,this.selector,this.caught))}}class za extends F{constructor(e,t,n){super(e),this.selector=t,this.caught=n}error(e){if(!this.isStopped){let n;try{n=this.selector(e,this.caught)}catch(t){return void super.error(t)}this._unsubscribeAndRecycle();const r=new I(this,void 0,void 0);this.add(r);const s=M(this,n,void 0,void 0,r);s!==r&&this.add(s)}}}function Ba(e){return t=>0===e?Ea():t.lift(new qa(e))}class qa{constructor(e){if(this.total=e,this.total<0)throw new Na}call(e,t){return t.subscribe(new Qa(e,this.total))}}class Qa extends f{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}function Ka(e,t){const n=arguments.length>=2;return r=>r.pipe(e?Ta((t,n)=>e(t,n,r)):q,Ba(1),n?La(t):Oa(()=>new _a))}class Wa{constructor(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}call(e,t){return t.subscribe(new Za(e,this.predicate,this.thisArg,this.source))}}class Za extends f{constructor(e,t,n,r){super(e),this.predicate=t,this.thisArg=n,this.source=r,this.index=0,this.thisArg=n||this}notifyComplete(e){this.destination.next(e),this.destination.complete()}_next(e){let t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t||this.notifyComplete(!1)}_complete(){this.notifyComplete(!0)}}function Ga(e,t){return"function"==typeof t?n=>n.pipe(Ga((n,r)=>V(e(n,r)).pipe(L((e,s)=>t(n,e,r,s))))):t=>t.lift(new Ya(e))}class Ya{constructor(e){this.project=e}call(e,t){return t.subscribe(new Ja(e,this.project))}}class Ja extends F{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this._innerSub(t,e,n)}_innerSub(e,t,n){const r=this.innerSubscription;r&&r.unsubscribe();const s=new I(this,t,n),i=this.destination;i.add(s),this.innerSubscription=M(this,e,void 0,void 0,s),this.innerSubscription!==s&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;e&&!e.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(e,t,n,r,s){this.destination.next(t)}}function Xa(...e){return xa()(ga(...e))}function el(e,t){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new tl(e,t,n))}}class tl{constructor(e,t,n=!1){this.accumulator=e,this.seed=t,this.hasSeed=n}call(e,t){return t.subscribe(new nl(e,this.accumulator,this.seed,this.hasSeed))}}class nl extends f{constructor(e,t,n,r){super(e),this.accumulator=t,this._seed=n,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let n;try{n=this.accumulator(this.seed,e,t)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)}}function rl(e,t){return H(e,t,1)}function sl(e,t,n){return function(r){return r.lift(new il(e,t,n))}}class il{constructor(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}call(e,t){return t.subscribe(new ol(e,this.nextOrObserver,this.error,this.complete))}}class ol extends f{constructor(e,t,n,s){super(e),this._tapNext=y,this._tapError=y,this._tapComplete=y,this._tapError=n||y,this._tapComplete=s||y,r(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||y,this._tapError=t.error||y,this._tapComplete=t.complete||y)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}class al{constructor(e){this.callback=e}call(e,t){return t.subscribe(new ll(e,this.callback))}}class ll extends f{constructor(e,t){super(e),this.add(new h(t))}}let cl=null;function ul(){return cl}const hl={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},dl={"\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"},pl={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"},fl=(()=>{if(ve.Node)return ve.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))}})();class ml extends class extends class{constructor(){this.resourceLoaderType=null}get attrToPropMap(){return this._attrToPropMap}set attrToPropMap(e){this._attrToPropMap=e}}{constructor(){super(),this._animationPrefix=null,this._transitionEnd=null;try{const e=this.createElement("div",document);if(null!=this.getStyle(e,"animationName"))this._animationPrefix="";else{const t=["Webkit","Moz","O","ms"];for(let n=0;n{null!=this.getStyle(e,n)&&(this._transitionEnd=t[n])})}catch(e){this._animationPrefix=null,this._transitionEnd=null}}getDistributedNodes(e){return e.getDistributedNodes()}resolveAndSetHref(e,t,n){e.href=null==n?t:t+"/../"+n}supportsDOMEvents(){return!0}supportsNativeShadowDOM(){return"function"==typeof document.body.createShadowRoot}getAnimationPrefix(){return this._animationPrefix?this._animationPrefix:""}getTransitionEnd(){return this._transitionEnd?this._transitionEnd:""}supportsAnimation(){return null!=this._animationPrefix&&null!=this._transitionEnd}}{parse(e){throw new Error("parse not implemented")}static makeCurrent(){var e;e=new ml,cl||(cl=e)}hasProperty(e,t){return t in e}setProperty(e,t,n){e[t]=n}getProperty(e,t){return e[t]}invoke(e,t,n){e[t](...n)}logError(e){window.console&&(console.error?console.error(e):console.log(e))}log(e){window.console&&window.console.log&&window.console.log(e)}logGroup(e){window.console&&window.console.group&&window.console.group(e)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}get attrToPropMap(){return hl}contains(e,t){return fl.call(e,t)}querySelector(e,t){return e.querySelector(t)}querySelectorAll(e,t){return e.querySelectorAll(t)}on(e,t,n){e.addEventListener(t,n,!1)}onAndCancel(e,t,n){return e.addEventListener(t,n,!1),()=>{e.removeEventListener(t,n,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}createMouseEvent(e){const t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t}createEvent(e){const t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t}preventDefault(e){e.preventDefault(),e.returnValue=!1}isPrevented(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue}getInnerHTML(e){return e.innerHTML}getTemplateContent(e){return"content"in e&&this.isTemplateElement(e)?e.content:null}getOuterHTML(e){return e.outerHTML}nodeName(e){return e.nodeName}nodeValue(e){return e.nodeValue}type(e){return e.type}content(e){return this.hasProperty(e,"content")?e.content:e}firstChild(e){return e.firstChild}nextSibling(e){return e.nextSibling}parentElement(e){return e.parentNode}childNodes(e){return e.childNodes}childNodesAsList(e){const t=e.childNodes,n=new Array(t.length);for(let r=0;re.insertBefore(n,t))}insertAfter(e,t,n){e.insertBefore(n,t.nextSibling)}setInnerHTML(e,t){e.innerHTML=t}getText(e){return e.textContent}setText(e,t){e.textContent=t}getValue(e){return e.value}setValue(e,t){e.value=t}getChecked(e){return e.checked}setChecked(e,t){e.checked=t}createComment(e){return this.getDefaultDocument().createComment(e)}createTemplate(e){const t=this.getDefaultDocument().createElement("template");return t.innerHTML=e,t}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createElementNS(e,t,n){return(n=n||this.getDefaultDocument()).createElementNS(e,t)}createTextNode(e,t){return(t=t||this.getDefaultDocument()).createTextNode(e)}createScriptTag(e,t,n){const r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(e,t),r}createStyleElement(e,t){const n=(t=t||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(e,t)),n}createShadowRoot(e){return e.createShadowRoot()}getShadowRoot(e){return e.shadowRoot}getHost(e){return e.host}clone(e){return e.cloneNode(!0)}getElementsByClassName(e,t){return e.getElementsByClassName(t)}getElementsByTagName(e,t){return e.getElementsByTagName(t)}classList(e){return Array.prototype.slice.call(e.classList,0)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}hasClass(e,t){return e.classList.contains(t)}setStyle(e,t,n){e.style[t]=n}removeStyle(e,t){e.style[t]=""}getStyle(e,t){return e.style[t]}hasStyle(e,t,n){const r=this.getStyle(e,t)||"";return n?r==n:r.length>0}tagName(e){return e.tagName}attributeMap(e){const t=new Map,n=e.attributes;for(let r=0;r{n.get(ps).donePromise.then(()=>{const n=ul();Array.prototype.slice.apply(n.querySelectorAll(t,"style[ng-transition]")).filter(t=>n.getAttribute(t,"ng-transition")===e).forEach(e=>n.remove(e))})}},deps:[vl,pa,wt],multi:!0}];class bl{static init(){var e;e=new bl,Zs=e}addToWindow(e){ve.getAngularTestability=(t,n=!0)=>{const r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},ve.getAllAngularTestabilities=()=>e.getAllTestabilities(),ve.getAllAngularRootElements=()=>e.getAllRootElements(),ve.frameworkStabilizers||(ve.frameworkStabilizers=[]),ve.frameworkStabilizers.push(e=>{const t=ve.getAllAngularTestabilities();let n=t.length,r=!1;const s=function(t){r=r||t,n--,0==n&&e(r)};t.forEach((function(e){e.whenStable(s)}))})}findTestabilityInTree(e,t,n){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:n?ul().isShadowRoot(t)?this.findTestabilityInTree(e,ul().getHost(t),!0):this.findTestabilityInTree(e,ul().parentElement(t),!0):null}}function Sl(e,t){"undefined"!=typeof COMPILED&&COMPILED||((ve.ng=ve.ng||{})[e]=t)}const El=(()=>({ApplicationRef:ni,NgZone:js}))();function Cl(e){return pi(e)}const xl=new we("EventManagerPlugins");class Tl{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(e=>e.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}addGlobalEventListener(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}getZone(){return this._zone}_findPluginFor(e){const t=this._eventNameToPlugin.get(e);if(t)return t;const n=this._plugins;for(let r=0;r{this._stylesSet.has(e)||(this._stylesSet.add(e),t.add(e))}),this.onStylesAdded(t)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}class Nl extends Il{constructor(e){super(),this._doc=e,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(e.head)}_addStylesToHost(e,t){e.forEach(e=>{const n=this._doc.createElement("style");n.textContent=e,this._styleNodes.add(t.appendChild(n))})}addHost(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}removeHost(e){this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach(t=>this._addStylesToHost(e,t))}ngOnDestroy(){this._styleNodes.forEach(e=>ul().remove(e))}}const Al={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/"},Rl=/%COMP%/g;function Pl(e,t,n){for(let r=0;r{!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}class Dl{constructor(e,t,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Ml(e)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case De.Emulated:{let n=this.rendererByCompId.get(t.id);return n||(n=new jl(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n}case De.Native:case De.ShadowDom:return new Ul(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){const e=Pl(t.id,t.styles,[]);this.sharedStylesHost.addStyles(e),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}class Ml{constructor(e){this.eventManager=e,this.data=Object.create(null)}destroy(){}createElement(e,t){return t?document.createElementNS(Al[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,n){e&&e.insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error(`The selector "${e}" did not match any elements`);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;const s=Al[r];s?e.setAttributeNS(s,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){const r=Al[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&Yt.DashCase?e.style.setProperty(t,n,r&Yt.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Yt.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){Ll(t,"property"),e[t]=n}setValue(e,t){e.nodeValue=t}listen(e,t,n){return Ll(t,"listener"),"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Ol(n)):this.eventManager.addEventListener(e,t,Ol(n))}}const Fl=(()=>"@".charCodeAt(0))();function Ll(e,t){if(e.charCodeAt(0)===Fl)throw new Error(`Found the synthetic ${t} ${e}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`)}class jl extends Ml{constructor(e,t,n,r){super(e),this.component=n;const s=Pl(r+"-"+n.id,n.styles,[]);t.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(Rl,r+"-"+n.id),this.hostAttr=function(e){return"_nghost-%COMP%".replace(Rl,e)}(r+"-"+n.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}}class Ul extends Ml{constructor(e,t,n,r){super(e),this.sharedStylesHost=t,this.hostEl=n,this.component=r,this.shadowRoot=r.encapsulation===De.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=Pl(r.id,r.styles,[]);for(let i=0;i"undefined"!=typeof Zone&&Zone.__symbol__||function(e){return"__zone_symbol__"+e})(),Vl=$l("addEventListener"),Hl=$l("removeEventListener"),zl={},Bl="__zone_symbol__propagationStopped",ql=(()=>{const e="undefined"!=typeof Zone&&Zone[$l("BLACK_LISTED_EVENTS")];if(e){const t={};return e.forEach(e=>{t[e]=e}),t}})(),Ql=function(e){return!!ql&&ql.hasOwnProperty(e)},Kl=function(e){const t=zl[e.type];if(!t)return;const n=this[t];if(!n)return;const r=[e];if(1===n.length){const e=n[0];return e.zone!==Zone.current?e.zone.run(e.handler,this,r):e.handler.apply(this,r)}{const t=n.slice();for(let n=0;n0;s||(s=e[n]=[]);const o=Ql(t)?Zone.root:Zone.current;if(0===s.length)s.push({zone:o,handler:r});else{let e=!1;for(let t=0;tthis.removeEventListener(e,t,r)}removeEventListener(e,t,n){let r=e[Hl];if(!r)return e.removeEventListener.apply(e,[t,n,!1]);let s=zl[t],i=s&&e[s];if(!i)return e.removeEventListener.apply(e,[t,n,!1]);let o=!1;for(let a=0;a{r=!0};return this.loader().then(()=>{if(!window.Hammer)return this.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present."),void(s=()=>{});r||(s=this.addEventListener(e,t,n))}).catch(()=>{this.console.warn(`The "${t}" event cannot be bound because the custom Hammer.JS loader failed.`),s=()=>{}}),()=>{s()}}return r.runOutsideAngular(()=>{const s=this._config.buildHammer(e),i=function(e){r.runGuarded((function(){n(e)}))};return s.on(t,i),()=>{s.off(t,i),"function"==typeof s.destroy&&s.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}const ec=["alt","control","meta","shift"],tc={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};class nc extends kl{constructor(e){super(e)}supports(e){return null!=nc.parseEventName(e)}addEventListener(e,t,n){const r=nc.parseEventName(t),s=nc.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ul().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const t=e.toLowerCase().split("."),n=t.shift();if(0===t.length||"keydown"!==n&&"keyup"!==n)return null;const r=nc._normalizeKey(t.pop());let s="";if(ec.forEach(e=>{const n=t.indexOf(e);n>-1&&(t.splice(n,1),s+=e+".")}),s+=r,0!=t.length||0===r.length)return null;const i={};return i.domEventName=n,i.fullKey=s,i}static getEventFullKey(e){let t="",n=ul().getEventKey(e);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),ec.forEach(r=>{r!=n&&(0,tc[r])(e)&&(t+=r+".")}),t+=n,t}static eventCallback(e,t,n){return r=>{nc.getEventFullKey(r)===e&&n.runGuarded(()=>t(r))}}static _normalizeKey(e){switch(e){case"esc":return"escape";default:return e}}}class rc{}class sc extends rc{constructor(e){super(),this._doc=e}sanitize(e,t){if(null==t)return null;switch(e){case ut.NONE:return t;case ut.HTML:return t instanceof oc?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),function(e,t){let n=null;try{lt=lt||new ze(e);let r=t?String(t):"";n=lt.getInertBodyElement(r);let s=5,i=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=i,i=n.innerHTML,n=lt.getInertBodyElement(r)}while(r!==i);const o=new st,a=o.sanitizeChildren(ct(n)||n);return He()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const e=ct(n)||n;for(;e.firstChild;)e.removeChild(e.firstChild)}}}(this._doc,String(t)));case ut.STYLE:return t instanceof ac?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),function(e){if(!(e=String(e).trim()))return"";const t=e.match(pt);return t&&Qe(t[1])===t[1]||e.match(dt)&&function(e){let t=!0,n=!0;for(let r=0;re.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length0?e[e.length-1]:null}function Bc(e,t){for(const n in e)e.hasOwnProperty(n)&&t(e[n],n)}function qc(e){return Lt(e)?e:Ft(e)?V(Promise.resolve(e)):ga(e)}function Qc(e,t,n){return n?function(e,t){return Vc(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!Gc(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(const r in n.children){if(!t.children[r])return!1;if(!e(t.children[r],n.children[r]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>t[n]===e[n])}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,r,s){if(n.segments.length>s.length)return!!Gc(n.segments.slice(0,s.length),s)&&!r.hasChildren();if(n.segments.length===s.length){if(!Gc(n.segments,s))return!1;for(const t in r.children){if(!n.children[t])return!1;if(!e(n.children[t],r.children[t]))return!1}return!0}{const e=s.slice(0,n.segments.length),i=s.slice(n.segments.length);return!!Gc(n.segments,e)&&!!n.children.primary&&t(n.children.primary,r,i)}}(t,n,n.segments)}(e.root,t.root)}class Kc{constructor(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Oc(this.queryParams)),this._queryParamMap}toString(){return eu.serialize(this)}}class Wc{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Bc(t,(e,t)=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return tu(this)}}class Zc{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Oc(this.parameters)),this._parameterMap}toString(){return au(this)}}function Gc(e,t){return e.length===t.length&&e.every((e,n)=>e.path===t[n].path)}function Yc(e,t){let n=[];return Bc(e.children,(e,r)=>{"primary"===r&&(n=n.concat(t(e,r)))}),Bc(e.children,(e,r)=>{"primary"!==r&&(n=n.concat(t(e,r)))}),n}class Jc{}class Xc{parse(e){const t=new du(e);return new Kc(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){return`${"/"+function e(t,n){if(!t.hasChildren())return tu(t);if(n){const n=t.children.primary?e(t.children.primary,!1):"",r=[];return Bc(t.children,(t,n)=>{"primary"!==n&&r.push(`${n}:${e(t,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}{const n=Yc(t,(n,r)=>"primary"===r?[e(t.children.primary,!1)]:[`${r}:${e(n,!1)}`]);return`${tu(t)}/(${n.join("//")})`}}(e.root,!0)}${function(e){const t=Object.keys(e).map(t=>{const n=e[t];return Array.isArray(n)?n.map(e=>`${ru(t)}=${ru(e)}`).join("&"):`${ru(t)}=${ru(n)}`});return t.length?"?"+t.join("&"):""}(e.queryParams)}${"string"==typeof e.fragment?"#"+encodeURI(e.fragment):""}`}}const eu=new Xc;function tu(e){return e.segments.map(e=>au(e)).join("/")}function nu(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ru(e){return nu(e).replace(/%3B/gi,";")}function su(e){return nu(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function iu(e){return decodeURIComponent(e)}function ou(e){return iu(e.replace(/\+/g,"%20"))}function au(e){return`${su(e.path)}${t=e.parameters,Object.keys(t).map(e=>`;${su(e)}=${su(t[e])}`).join("")}`;var t}const lu=/^[^\/()?;=#]+/;function cu(e){const t=e.match(lu);return t?t[0]:""}const uu=/^[^=?]+/,hu=/^[^?]+/;class du{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Wc([],{}):new Wc([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new Wc(e,t)),n}parseSegment(){const e=cu(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new Zc(iu(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=cu(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=cu(this.remaining);e&&(n=e,this.capture(n))}e[iu(t)]=iu(n)}parseQueryParam(e){const t=function(e){const t=e.match(uu);return t?t[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=function(e){const t=e.match(hu);return t?t[0]:""}(this.remaining);e&&(n=e,this.capture(n))}const r=ou(t),s=ou(n);if(e.hasOwnProperty(r)){let t=e[r];Array.isArray(t)||(t=[t],e[r]=t),t.push(s)}else e[r]=s}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=cu(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s=void 0;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):e&&(s="primary");const i=this.parseChildren();t[s]=1===Object.keys(i).length?i.primary:new Wc([],i),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class pu{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=fu(e,this._root);return t?t.children.map(e=>e.value):[]}firstChild(e){const t=fu(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=mu(e,this._root);return t.length<2?[]:t[t.length-2].children.map(e=>e.value).filter(t=>t!==e)}pathFromRoot(e){return mu(e,this._root).map(e=>e.value)}}function fu(e,t){if(e===t.value)return t;for(const n of t.children){const t=fu(e,n);if(t)return t}return null}function mu(e,t){if(e===t.value)return[t];for(const n of t.children){const r=mu(e,n);if(r.length)return r.unshift(t),r}return[]}class gu{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function yu(e){const t={};return e&&e.children.forEach(e=>t[e.value.outlet]=e),t}class _u extends pu{constructor(e,t){super(e),this.snapshot=t,Cu(this,e)}toString(){return this.snapshot.toString()}}function vu(e,t){const n=function(e,t){const n=new Su([],{},{},"",{},"primary",t,null,e.root,-1,{});return new Eu("",new gu(n,[]))}(e,t),r=new ya([new Zc("",{})]),s=new ya({}),i=new ya({}),o=new ya({}),a=new ya(""),l=new wu(r,s,o,a,i,"primary",t,n.root);return l.snapshot=n.root,new _u(new gu(l,[]),n)}class wu{constructor(e,t,n,r,s,i,o,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(L(e=>Oc(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(L(e=>Oc(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function bu(e,t="emptyOnly"){const n=e.pathFromRoot;let r=0;if("always"!==t)for(r=n.length-1;r>=1;){const e=n[r],t=n[r-1];if(e.routeConfig&&""===e.routeConfig.path)r--;else{if(t.component)break;r--}}return function(e){return e.reduce((e,t)=>({params:Object.assign({},e.params,t.params),data:Object.assign({},e.data,t.data),resolve:Object.assign({},e.resolve,t._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(r))}class Su{constructor(e,t,n,r,s,i,o,a,l,c,u){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Oc(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Oc(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(e=>e.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Eu extends pu{constructor(e,t){super(t),this.url=e,Cu(this,t)}toString(){return xu(this._root)}}function Cu(e,t){t.value._routerState=e,t.children.forEach(t=>Cu(e,t))}function xu(e){const t=e.children.length>0?` { ${e.children.map(xu).join(", ")} } `:"";return`${e.value}${t}`}function Tu(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Vc(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),Vc(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(let n=0;nVc(e.parameters,r[t].parameters))&&!(!e.parent!=!t.parent)&&(!e.parent||ku(e.parent,t.parent))}function Iu(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function Nu(e,t,n,r,s){let i={};return r&&Bc(r,(e,t)=>{i[t]=Array.isArray(e)?e.map(e=>""+e):""+e}),new Kc(n.root===e?t:function e(t,n,r){const s={};return Bc(t.children,(t,i)=>{s[i]=t===n?r:e(t,n,r)}),new Wc(t.segments,s)}(n.root,e,t),i,s)}class Au{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&Iu(n[0]))throw new Error("Root segment cannot have matrix parameters");const r=n.find(e=>"object"==typeof e&&null!=e&&e.outlets);if(r&&r!==zc(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ru{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}}function Pu(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets.primary:""+e}function Ou(e,t,n){if(e||(e=new Wc([],{})),0===e.segments.length&&e.hasChildren())return Du(e,t,n);const r=function(e,t,n){let r=0,s=t;const i={match:!1,pathIndex:0,commandIndex:0};for(;s=n.length)return i;const t=e.segments[s],o=Pu(n[r]),a=r0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!ju(o,a,t))return i;r+=2}else{if(!ju(o,{},t))return i;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(e,t,n),s=n.slice(r.commandIndex);if(r.match&&r.pathIndex{null!==n&&(s[r]=Ou(e.children[r],t,n))}),Bc(e.children,(e,t)=>{void 0===r[t]&&(s[t]=e)}),new Wc(e.segments,s)}}function Mu(e,t,n){const r=e.segments.slice(0,t);let s=0;for(;s{null!==e&&(t[n]=Mu(new Wc([],{}),0,e))}),t}function Lu(e){const t={};return Bc(e,(e,n)=>t[n]=""+e),t}function ju(e,t,n){return e==n.path&&Vc(t,n.parameters)}class Uu{constructor(e,t,n,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r}activate(e){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),Tu(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){const r=yu(t);e.children.forEach(e=>{const t=e.value.outlet;this.deactivateRoutes(e,r[t],n),delete r[t]}),Bc(r,(e,t)=>{this.deactivateRouteAndItsChildren(e,n)})}deactivateRoutes(e,t,n){const r=e.value,s=t?t.value:null;if(r===s)if(r.component){const s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else s&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const n=t.getContext(e.value.outlet);if(n&&n.outlet){const t=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:t,route:e,contexts:r})}}deactivateRouteAndOutlet(e,t){const n=t.getContext(e.value.outlet);if(n){const r=yu(e),s=e.value.component?n.children:t;Bc(r,(e,t)=>this.deactivateRouteAndItsChildren(e,s)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(e,t,n){const r=yu(t);e.children.forEach(e=>{this.activateRoutes(e,r[e.value.outlet],n),this.forwardEvent(new Nc(e.value.snapshot))}),e.children.length&&this.forwardEvent(new kc(e.value.snapshot))}activateRoutes(e,t,n){const r=e.value,s=t?t.value:null;if(Tu(r),r===s)if(r.component){const s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){const t=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const e=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),t.children.onOutletReAttached(e.contexts),t.attachRef=e.componentRef,t.route=e.route.value,t.outlet&&t.outlet.attach(e.componentRef,e.route.value),$u(e.route)}else{const n=function(e){for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(r.snapshot),s=n?n.module.componentFactoryResolver:null;t.attachRef=null,t.route=r,t.resolver=s,t.outlet&&t.outlet.activateWith(r,s),this.activateChildRoutes(e,null,t.children)}}else this.activateChildRoutes(e,null,n)}}function $u(e){Tu(e.value),e.children.forEach($u)}function Vu(e){return"function"==typeof e}function Hu(e){return e instanceof Kc}class zu{constructor(e){this.segmentGroup=e||null}}class Bu{constructor(e){this.urlTree=e}}function qu(e){return new w(t=>t.error(new zu(e)))}function Qu(e){return new w(t=>t.error(new Bu(e)))}function Ku(e){return new w(t=>t.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${e}'`)))}class Wu{constructor(e,t,n,r,s){this.configLoader=t,this.urlSerializer=n,this.urlTree=r,this.config=s,this.allowRedirects=!0,this.ngModule=e.get(Ae)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(L(e=>this.createUrlTree(e,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Va(e=>{if(e instanceof Bu)return this.allowRedirects=!1,this.match(e.urlTree);if(e instanceof zu)throw this.noMatchError(e);throw e}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,"primary").pipe(L(t=>this.createUrlTree(t,e.queryParams,e.fragment))).pipe(Va(e=>{if(e instanceof zu)throw this.noMatchError(e);throw e}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,n){const r=e.segments.length>0?new Wc([],{primary:e}):e;return new Kc(r,t,n)}expandSegmentGroup(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(L(e=>new Wc([],e))):this.expandSegment(e,n,t,n.segments,r,!0)}expandChildren(e,t,n){return function(e,t){if(0===Object.keys(e).length)return ga({});const n=[],r=[],s={};return Bc(e,(e,i)=>{const o=t(i,e).pipe(L(e=>s[i]=e));"primary"===i?n.push(o):r.push(o)}),ga.apply(null,n.concat(r)).pipe(xa(),$a(),L(()=>s))}(n.children,(n,r)=>this.expandSegmentGroup(e,t,r,n))}expandSegment(e,t,n,r,s,i){return ga(...n).pipe(L(o=>this.expandSegmentAgainstRoute(e,t,n,o,r,s,i).pipe(Va(e=>{if(e instanceof zu)return ga(null);throw e}))),xa(),Ka(e=>!!e),Va((e,n)=>{if(e instanceof _a||"EmptyError"===e.name){if(this.noLeftoversInUrl(t,r,s))return ga(new Wc([],{}));throw new zu(t)}throw e}))}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}expandSegmentAgainstRoute(e,t,n,r,s,i,o){return Ju(r)!==i?qu(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,s,i):qu(t)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,s,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,s,i)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Qu(s):this.lineralizeSegments(n,s).pipe(H(n=>{const s=new Wc(n,{});return this.expandSegment(e,s,t,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,s,i){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Zu(t,r,s);if(!o)return qu(t);const u=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?Qu(u):this.lineralizeSegments(r,u).pipe(H(r=>this.expandSegment(e,t,n,r.concat(s.slice(l)),i,!1)))}matchSegmentAgainstRoute(e,t,n,r){if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(L(e=>(n._loadedConfig=e,new Wc(r,{})))):ga(new Wc(r,{}));const{matched:s,consumedSegments:i,lastChild:o}=Zu(t,n,r);if(!s)return qu(t);const a=r.slice(o);return this.getChildConfig(e,n,r).pipe(H(e=>{const n=e.module,r=e.routes,{segmentGroup:s,slicedSegments:o}=function(e,t,n,r){return n.length>0&&function(e,t,n){return n.some(n=>Yu(e,t,n)&&"primary"!==Ju(n))}(e,n,r)?{segmentGroup:Gu(new Wc(t,function(e,t){const n={};n.primary=t;for(const r of e)""===r.path&&"primary"!==Ju(r)&&(n[Ju(r)]=new Wc([],{}));return n}(r,new Wc(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(n=>Yu(e,t,n))}(e,n,r)?{segmentGroup:Gu(new Wc(e.segments,function(e,t,n,r){const s={};for(const i of n)Yu(e,t,i)&&!r[Ju(i)]&&(s[Ju(i)]=new Wc([],{}));return Object.assign({},r,s)}(e,n,r,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,i,a,r);return 0===o.length&&s.hasChildren()?this.expandChildren(n,r,s).pipe(L(e=>new Wc(i,e))):0===r.length&&0===o.length?ga(new Wc(i,{})):this.expandSegment(n,s,r,o,"primary",!0).pipe(L(e=>new Wc(i.concat(e.segments),e.children)))}))}getChildConfig(e,t,n){return t.children?ga(new Fc(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?ga(t._loadedConfig):function(e,t,n){const r=t.canLoad;return r&&0!==r.length?V(r).pipe(L(r=>{const s=e.get(r);let i;if(function(e){return e&&Vu(e.canLoad)}(s))i=s.canLoad(t,n);else{if(!Vu(s))throw new Error("Invalid CanLoad guard");i=s(t,n)}return qc(i)})).pipe(xa(),(s=e=>!0===e,e=>e.lift(new Wa(s,void 0,e)))):ga(!0);var s}(e.injector,t,n).pipe(H(n=>n?this.configLoader.load(e.injector,t).pipe(L(e=>(t._loadedConfig=e,e))):function(e){return new w(t=>t.error(Dc(`Cannot load children because the guard of the route "path: '${e.path}'" returned false`)))}(t))):ga(new Fc([],e))}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return ga(n);if(r.numberOfChildren>1||!r.children.primary)return Ku(e.redirectTo);r=r.children.primary}}applyRedirectCommands(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}applyRedirectCreatreUrlTree(e,t,n,r){const s=this.createSegmentGroup(e,t.root,n,r);return new Kc(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const n={};return Bc(e,(e,r)=>{if("string"==typeof e&&e.startsWith(":")){const s=e.substring(1);n[r]=t[s]}else n[r]=e}),n}createSegmentGroup(e,t,n,r){const s=this.createSegments(e,t.segments,n,r);let i={};return Bc(t.children,(t,s)=>{i[s]=this.createSegmentGroup(e,t,n,r)}),new Wc(s,i)}createSegments(e,t,n,r){return t.map(t=>t.path.startsWith(":")?this.findPosParam(e,t,r):this.findOrReturn(t,n))}findPosParam(e,t,n){const r=n[t.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return r}findOrReturn(e,t){let n=0;for(const r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}}function Zu(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const r=(t.matcher||Mc)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Gu(e){if(1===e.numberOfChildren&&e.children.primary){const t=e.children.primary;return new Wc(e.segments.concat(t.segments),t.children)}return e}function Yu(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Ju(e){return e.outlet||"primary"}class Xu{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class eh{constructor(e,t){this.component=e,this.route=t}}function th(e,t,n){const r=e._root;return function e(t,n,r,s,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=yu(n);return t.children.forEach(t=>{!function(t,n,r,s,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,a=n?n.value:null,l=r?r.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const c=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!Gc(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Gc(e.url,t.url)||!Vc(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ku(e,t)||!Vc(e.queryParams,t.queryParams);case"paramsChange":default:return!ku(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Xu(s)):(o.data=a.data,o._resolvedData=a._resolvedData),e(t,n,o.component?l?l.children:null:r,s,i),c&&i.canDeactivateChecks.push(new eh(l&&l.outlet&&l.outlet.component||null,a))}else a&&rh(n,l,i),i.canActivateChecks.push(new Xu(s)),e(t,null,o.component?l?l.children:null:r,s,i)}(t,o[t.value.outlet],r,s.concat([t.value]),i),delete o[t.value.outlet]}),Bc(o,(e,t)=>rh(e,r.getContext(t),i)),i}(r,t?t._root:null,n,[r.value])}function nh(e,t,n){const r=function(e){if(!e)return null;for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(t);return(r?r.module.injector:n).get(e)}function rh(e,t,n){const r=yu(e),s=e.value;Bc(r,(e,r)=>{rh(e,s.component?t?t.children.getContext(r):null:t,n)}),n.canDeactivateChecks.push(new eh(s.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,s))}const sh=Symbol("INITIAL_VALUE");function ih(){return Ga(e=>function(...e){let t=null,n=null;return k(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&l(e[0])&&(e=e[0]),K(e,n).lift(new wa(t))}(...e.map(e=>e.pipe(Ba(1),function(...e){const t=e[e.length-1];return k(t)?(e.pop(),n=>Xa(e,n,t)):t=>Xa(e,t)}(sh)))).pipe(el((e,t)=>{let n=!1;return t.reduce((e,r,s)=>{if(e!==sh)return e;if(r===sh&&(n=!0),!n){if(!1===r)return r;if(s===t.length-1||Hu(r))return r}return e},e)},sh),Ta(e=>e!==sh),L(e=>Hu(e)?e:!0===e),Ba(1)))}function oh(e,t){return null!==e&&t&&t(new Ic(e)),ga(!0)}function ah(e,t){return null!==e&&t&&t(new Tc(e)),ga(!0)}function lh(e,t,n){const r=t.routeConfig?t.routeConfig.canActivate:null;return r&&0!==r.length?ga(r.map(r=>Ca(()=>{const s=nh(r,t,n);let i;if(function(e){return e&&Vu(e.canActivate)}(s))i=qc(s.canActivate(t,e));else{if(!Vu(s))throw new Error("Invalid CanActivate guard");i=qc(s(t,e))}return i.pipe(Ka())}))).pipe(ih()):ga(!0)}function ch(e,t,n){const r=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(e=>function(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)).filter(e=>null!==e).map(t=>Ca(()=>ga(t.guards.map(s=>{const i=nh(s,t.node,n);let o;if(function(e){return e&&Vu(e.canActivateChild)}(i))o=qc(i.canActivateChild(r,e));else{if(!Vu(i))throw new Error("Invalid CanActivateChild guard");o=qc(i(r,e))}return o.pipe(Ka())})).pipe(ih())));return ga(s).pipe(ih())}class uh{}class hh{constructor(e,t,n,r,s,i){this.rootComponentType=e,this.config=t,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=i}recognize(){try{const e=fh(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new Su([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new gu(n,t),s=new Eu(this.url,r);return this.inheritParamsAndData(s._root),ga(s)}catch(e){return new w(t=>t.error(e))}}inheritParamsAndData(e){const t=e.value,n=bu(t,this.paramsInheritanceStrategy);t.params=Object.freeze(n.params),t.data=Object.freeze(n.data),e.children.forEach(e=>this.inheritParamsAndData(e))}processSegmentGroup(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}processChildren(e,t){const n=Yc(t,(t,n)=>this.processSegmentGroup(e,t,n));return function(e){const t={};e.forEach(e=>{const n=t[e.value.outlet];if(n){const t=n.url.map(e=>e.toString()).join("/"),r=e.value.url.map(e=>e.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${t}' and '${r}'.`)}t[e.value.outlet]=e.value})}(n),n.sort((e,t)=>"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)),n}processSegment(e,t,n,r){for(const i of e)try{return this.processSegmentAgainstRoute(i,t,n,r)}catch(s){if(!(s instanceof uh))throw s}if(this.noLeftoversInUrl(t,n,r))return[];throw new uh}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}processSegmentAgainstRoute(e,t,n,r){if(e.redirectTo)throw new uh;if((e.outlet||"primary")!==r)throw new uh;let s,i=[],o=[];if("**"===e.path){const i=n.length>0?zc(n).parameters:{};s=new Su(n,i,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,yh(e),r,e.component,e,dh(t),ph(t)+n.length,_h(e))}else{const a=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new uh;return{consumedSegments:[],lastChild:0,parameters:{}}}const r=(t.matcher||Mc)(n,e,t);if(!r)throw new uh;const s={};Bc(r.posParams,(e,t)=>{s[t]=e.path});const i=r.consumed.length>0?Object.assign({},s,r.consumed[r.consumed.length-1].parameters):s;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:i}}(t,e,n);i=a.consumedSegments,o=n.slice(a.lastChild),s=new Su(i,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,yh(e),r,e.component,e,dh(t),ph(t)+i.length,_h(e))}const a=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),{segmentGroup:l,slicedSegments:c}=fh(t,i,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const e=this.processChildren(a,l);return[new gu(s,e)]}if(0===a.length&&0===c.length)return[new gu(s,[])];const u=this.processSegment(a,l,c,"primary");return[new gu(s,u)]}}function dh(e){let t=e;for(;t._sourceSegment;)t=t._sourceSegment;return t}function ph(e){let t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;for(;t._sourceSegment;)t=t._sourceSegment,n+=t._segmentIndexShift?t._segmentIndexShift:0;return n-1}function fh(e,t,n,r,s){if(n.length>0&&function(e,t,n){return n.some(n=>mh(e,t,n)&&"primary"!==gh(n))}(e,n,r)){const s=new Wc(t,function(e,t,n,r){const s={};s.primary=r,r._sourceSegment=e,r._segmentIndexShift=t.length;for(const i of n)if(""===i.path&&"primary"!==gh(i)){const n=new Wc([],{});n._sourceSegment=e,n._segmentIndexShift=t.length,s[gh(i)]=n}return s}(e,t,r,new Wc(n,e.children)));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(n=>mh(e,t,n))}(e,n,r)){const i=new Wc(e.segments,function(e,t,n,r,s,i){const o={};for(const a of r)if(mh(e,n,a)&&!s[gh(a)]){const n=new Wc([],{});n._sourceSegment=e,n._segmentIndexShift="legacy"===i?e.segments.length:t.length,o[gh(a)]=n}return Object.assign({},s,o)}(e,t,n,r,e.children,s));return i._sourceSegment=e,i._segmentIndexShift=t.length,{segmentGroup:i,slicedSegments:n}}const i=new Wc(e.segments,e.children);return i._sourceSegment=e,i._segmentIndexShift=t.length,{segmentGroup:i,slicedSegments:n}}function mh(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function gh(e){return e.outlet||"primary"}function yh(e){return e.data||{}}function _h(e){return e.resolve||{}}function vh(e,t,n,r){const s=nh(e,t,r);return qc(s.resolve?s.resolve(t,n):s(t,n))}function wh(e){return function(t){return t.pipe(Ga(t=>{const n=e(t);return n?V(n).pipe(L(()=>t)):V([t])}))}}class bh{}class Sh{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}const Eh=new we("ROUTES");class Ch{constructor(e,t,n,r){this.loader=e,this.compiler=t,this.onLoadStartListener=n,this.onLoadEndListener=r}load(e,t){return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(L(n=>{this.onLoadEndListener&&this.onLoadEndListener(t);const r=n.create(e);return new Fc(Hc(r.injector.get(Eh)).map($c),r)}))}loadModuleFactory(e){return"string"==typeof e?V(this.loader.load(e)):qc(e()).pipe(H(e=>e instanceof Re?ga(e):V(this.compiler.compileModuleAsync(e))))}}class xh{}class Th{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function kh(e){throw e}function Ih(e,t,n){return t.parse("/")}function Nh(e,t){return ga(null)}class Ah{constructor(e,t,n,r,s,i,o,a){this.rootComponentType=e,this.urlSerializer=t,this.rootContexts=n,this.location=r,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new x,this.errorHandler=kh,this.malformedUriErrorHandler=Ih,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Nh,afterPreactivation:Nh},this.urlHandlingStrategy=new Th,this.routeReuseStrategy=new Sh,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(Ae),this.console=s.get(ws);const l=s.get(js);this.isNgZoneEnabled=l instanceof js,this.resetConfig(a),this.currentUrlTree=new Kc(new Wc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Ch(i,o,e=>this.triggerEvent(new Cc(e)),e=>this.triggerEvent(new xc(e))),this.routerState=vu(this.currentUrlTree,this.rootComponentType),this.transitions=new ya({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(e){const t=this.events;return e.pipe(Ta(e=>0!==e.id),L(e=>Object.assign({},e,{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl)})),Ga(e=>{let n=!1,r=!1;return ga(e).pipe(sl(e=>{this.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign({},this.lastSuccessfulNavigation,{previousNavigation:null}):null}}),Ga(e=>{const n=!this.navigated||e.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return ga(e).pipe(Ga(e=>{const n=this.transitions.getValue();return t.next(new mc(e.id,this.serializeUrl(e.extractedUrl),e.source,e.restoredState)),n!==this.transitions.getValue()?Sa:[e]}),Ga(e=>Promise.resolve(e)),(r=this.ngModule.injector,s=this.configLoader,i=this.urlSerializer,o=this.config,function(e){return e.pipe(Ga(e=>function(e,t,n,r,s){return new Wu(e,t,n,r,s).apply()}(r,s,i,e.extractedUrl,o).pipe(L(t=>Object.assign({},e,{urlAfterRedirects:t})))))}),sl(e=>{this.currentNavigation=Object.assign({},this.currentNavigation,{finalUrl:e.urlAfterRedirects})}),function(e,t,n,r,s){return function(i){return i.pipe(H(i=>function(e,t,n,r,s="emptyOnly",i="legacy"){return new hh(e,t,n,r,s,i).recognize()}(e,t,i.urlAfterRedirects,n(i.urlAfterRedirects),r,s).pipe(L(e=>Object.assign({},i,{targetSnapshot:e})))))}}(this.rootComponentType,this.config,e=>this.serializeUrl(e),this.paramsInheritanceStrategy,this.relativeLinkResolution),sl(e=>{"eager"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),sl(e=>{const n=new vc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.next(n)}));var r,s,i,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:s,restoredState:i,extras:o}=e,a=new mc(n,this.serializeUrl(r),s,i);t.next(a);const l=vu(r,this.rootComponentType).snapshot;return ga(Object.assign({},e,{targetSnapshot:l,urlAfterRedirects:r,extras:Object.assign({},o,{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=e.rawUrl,this.browserUrlTree=e.urlAfterRedirects,e.resolve(null),Sa}),wh(e=>{const{targetSnapshot:t,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=e;return this.hooks.beforePreactivation(t,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),sl(e=>{const t=new wc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),L(e=>Object.assign({},e,{guards:th(e.targetSnapshot,e.currentSnapshot,this.rootContexts)})),function(e,t){return function(n){return n.pipe(H(n=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return 0===o.length&&0===i.length?ga(Object.assign({},n,{guardsResult:!0})):function(e,t,n,r){return V(e).pipe(H(e=>function(e,t,n,r,s){const i=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return i&&0!==i.length?ga(i.map(i=>{const o=nh(i,t,s);let a;if(function(e){return e&&Vu(e.canDeactivate)}(o))a=qc(o.canDeactivate(e,t,n,r));else{if(!Vu(o))throw new Error("Invalid CanDeactivate guard");a=qc(o(e,t,n,r))}return a.pipe(Ka())})).pipe(ih()):ga(!0)}(e.component,e.route,n,t,r)),Ka(e=>!0!==e,!0))}(o,r,s,e).pipe(H(n=>n&&"boolean"==typeof n?function(e,t,n,r){return V(t).pipe(rl(t=>V([ah(t.route.parent,r),oh(t.route,r),ch(e,t.path,n),lh(e,t.route,n)]).pipe(xa(),Ka(e=>!0!==e,!0))),Ka(e=>!0!==e,!0))}(r,i,e,t):ga(n)),L(e=>Object.assign({},n,{guardsResult:e})))}))}}(this.ngModule.injector,e=>this.triggerEvent(e)),sl(e=>{if(Hu(e.guardsResult)){const t=Dc(`Redirecting to "${this.serializeUrl(e.guardsResult)}"`);throw t.url=e.guardsResult,t}}),sl(e=>{const t=new bc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);this.triggerEvent(t)}),Ta(e=>{if(!e.guardsResult){this.resetUrlToCurrentUrlTree();const n=new yc(e.id,this.serializeUrl(e.extractedUrl),"");return t.next(n),e.resolve(!1),!1}return!0}),wh(e=>{if(e.guards.canActivateChecks.length)return ga(e).pipe(sl(e=>{const t=new Sc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),(t=this.paramsInheritanceStrategy,n=this.ngModule.injector,function(e){return e.pipe(H(e=>{const{targetSnapshot:r,guards:{canActivateChecks:s}}=e;return s.length?V(s).pipe(rl(e=>function(e,t,n,r){return function(e,t,n,r){const s=Object.keys(e);if(0===s.length)return ga({});if(1===s.length){const i=s[0];return vh(e[i],t,n,r).pipe(L(e=>({[i]:e})))}const i={};return V(s).pipe(H(s=>vh(e[s],t,n,r).pipe(L(e=>(i[s]=e,e))))).pipe($a(),L(()=>i))}(e._resolve,e,t,r).pipe(L(t=>(e._resolvedData=t,e.data=Object.assign({},e.data,bu(e,n).resolve),null)))}(e.route,r,t,n)),function(e,t){return arguments.length>=2?function(n){return _(el(e,t),Aa(1),La(t))(n)}:function(t){return _(el((t,n,r)=>e(t,n,r+1)),Aa(1))(t)}}((e,t)=>e),L(t=>e)):ga(e)}))}),sl(e=>{const t=new Ec(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}));var t,n}),wh(e=>{const{targetSnapshot:t,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=e;return this.hooks.afterPreactivation(t,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),L(e=>{const t=function(e,t,n){const r=function e(t,n,r){if(r&&t.shouldReuseRoute(n.value,r.value.snapshot)){const s=r.value;s._futureSnapshot=n.value;const i=function(t,n,r){return n.children.map(n=>{for(const s of r.children)if(t.shouldReuseRoute(s.value.snapshot,n.value))return e(t,n,s);return e(t,n)})}(t,n,r);return new gu(s,i)}{const r=t.retrieve(n.value);if(r){const e=r.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(let r=0;re(t,n));return new gu(r,i)}}var s}(e,t._root,n?n._root:void 0);return new _u(r,t)}(this.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign({},e,{targetRouterState:t})}),sl(e=>{this.currentUrlTree=e.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl),this.routerState=e.targetRouterState,"deferred"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),(i=this.rootContexts,o=this.routeReuseStrategy,a=e=>this.triggerEvent(e),L(e=>(new Uu(o,e.targetRouterState,e.currentRouterState,a).activate(i),e))),sl({next(){n=!0},complete(){n=!0}}),(s=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new yc(e.id,this.serializeUrl(e.extractedUrl),`Navigation ID ${e.id} is not equal to the current navigation id ${this.navigationId}`);t.next(n),e.resolve(!1)}this.currentNavigation=null},e=>e.lift(new al(s))),Va(n=>{if(r=!0,(s=n)&&s.ngNavigationCancelingError){const r=Hu(n.url);r||(this.navigated=!0,this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));const s=new yc(e.id,this.serializeUrl(e.extractedUrl),n.message);t.next(s),e.resolve(!1),r&&this.navigateByUrl(n.url)}else{this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);const r=new _c(e.id,this.serializeUrl(e.extractedUrl),n);t.next(r);try{e.resolve(this.errorHandler(n))}catch(i){e.reject(i)}}var s;return Sa}));var s,i,o,a}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}getTransition(){const e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}setTransition(e){this.transitions.next(Object.assign({},this.getTransition(),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{let t=this.parseUrl(e.url);const n="popstate"===e.type?"popstate":"hashchange",r=e.state&&e.state.navigationId?e.state:null;setTimeout(()=>{this.scheduleNavigation(t,n,r,{replaceUrl:!0})},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){Lc(e),this.config=e.map($c),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}createUrlTree(e,t={}){const{relativeTo:n,queryParams:r,fragment:s,preserveQueryParams:i,queryParamsHandling:o,preserveFragment:a}=t;He()&&i&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,c=a?this.currentUrlTree.fragment:s;let u=null;if(o)switch(o){case"merge":u=Object.assign({},this.currentUrlTree.queryParams,r);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=r||null}else u=i?this.currentUrlTree.queryParams:r||null;return null!==u&&(u=this.removeEmptyProps(u)),function(e,t,n,r,s){if(0===n.length)return Nu(t.root,t.root,t,r,s);const i=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Au(!0,0,e);let t=0,n=!1;const r=e.reduce((e,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const t={};return Bc(r.outlets,(e,n)=>{t[n]="string"==typeof e?e.split("/"):e}),[...e,{outlets:t}]}if(r.segmentPath)return[...e,r.segmentPath]}return"string"!=typeof r?[...e,r]:0===s?(r.split("/").forEach((r,s)=>{0==s&&"."===r||(0==s&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):[...e,r]},[]);return new Au(n,t,r)}(n);if(i.toRoot())return Nu(t.root,new Wc([],{}),t,r,s);const o=function(e,t,n){if(e.isAbsolute)return new Ru(t.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new Ru(n.snapshot._urlSegment,!0,0);const r=Iu(e.commands[0])?0:1;return function(e,t,n){let r=e,s=t,i=n;for(;i>s;){if(i-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new Ru(r,!1,s-i)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,e.numberOfDoubleDots)}(i,t,e),a=o.processChildren?Du(o.segmentGroup,o.index,i.commands):Ou(o.segmentGroup,o.index,i.commands);return Nu(o.segmentGroup,a,t,r,s)}(l,this.currentUrlTree,e,u,c)}navigateByUrl(e,t={skipLocationChange:!1}){He()&&this.isNgZoneEnabled&&!js.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=Hu(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)}navigate(e,t={skipLocationChange:!1}){return function(e){for(let t=0;t{const r=e[n];return null!=r&&(t[n]=r),t},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.events.next(new gc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,e.resolve(!0)},e=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(e,t,n,r){const s=this.getTransition();if(s&&"imperative"!==t&&"imperative"===s.source&&s.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(s&&"hashchange"==t&&"popstate"===s.source&&s.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(s&&"popstate"==t&&"hashchange"===s.source&&s.rawUrl.toString()===e.toString())return Promise.resolve(!0);let i=null,o=null;const a=new Promise((e,t)=>{i=e,o=t}),l=++this.navigationId;return this.setTransition({id:l,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:r,resolve:i,reject:o,promise:a,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),a.catch(e=>Promise.reject(e))}setBrowserUrl(e,t,n,r){const s=this.urlSerializer.serialize(e);r=r||{},this.location.isCurrentPathEqualTo(s)||t?this.location.replaceState(s,"",Object.assign({},r,{navigationId:n})):this.location.go(s,"",Object.assign({},r,{navigationId:n}))}resetStateAndUrl(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}class Rh{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ph,this.attachRef=null}}class Ph{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new Rh,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}class Oh{constructor(e,t,n,r,s){this.parentContexts=e,this.location=t,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new cs,this.deactivateEvents=new cs,this.name=r||"primary",e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,e}attach(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,s=new Dh(e,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}class Dh{constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===wu?this.route:e===Ph?this.childContexts:this.parent.get(e,t)}}class Mh{}class Fh{preload(e,t){return t().pipe(Va(()=>ga(null)))}}class Lh{preload(e,t){return ga(null)}}class jh{constructor(e,t,n,r,s){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=new Ch(t,n,t=>e.triggerEvent(new Cc(t)),t=>e.triggerEvent(new xc(t)))}setUpPreloading(){this.subscription=this.router.events.pipe(Ta(e=>e instanceof gc),rl(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(Ae);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription.unsubscribe()}processRoutes(e,t){const n=[];for(const r of t)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const e=r._loadedConfig;n.push(this.processRoutes(e.module,e.routes))}else r.loadChildren&&!r.canLoad?n.push(this.preloadConfig(e,r)):r.children&&n.push(this.processRoutes(e,r.children));return V(n).pipe(Q(),L(e=>{}))}preloadConfig(e,t){return this.preloadingStrategy.preload(t,()=>this.loader.load(e.injector,t).pipe(H(e=>(t._loadedConfig=e,this.processRoutes(e.module,e.routes)))))}}class Uh{constructor(e,t,n={}){this.router=e,this.viewportScroller=t,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof mc?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof gc&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof Ac&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,t){this.router.triggerEvent(new Ac(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}const $h=new we("ROUTER_CONFIGURATION"),Vh=new we("ROUTER_FORROOT_GUARD"),Hh=[Wo,{provide:Jc,useClass:Xc},{provide:Ah,useFactory:Zh,deps:[ni,Jc,Ph,Wo,wt,si,ks,Eh,$h,[xh,new re],[bh,new re]]},Ph,{provide:wu,useFactory:Gh,deps:[Ah]},{provide:si,useClass:ai},jh,Lh,Fh,{provide:$h,useValue:{enableTracing:!1}}];function zh(){return new Ys("Router",Ah)}class Bh{constructor(e,t){}static forRoot(e,t){return{ngModule:Bh,providers:[Hh,Wh(e),{provide:Vh,useFactory:Kh,deps:[[Ah,new re,new ie]]},{provide:$h,useValue:t||{}},{provide:Qo,useFactory:Qh,deps:[Bo,[new ne(Ko),new re],$h]},{provide:Uh,useFactory:qh,deps:[Ah,fa,$h]},{provide:Mh,useExisting:t&&t.preloadingStrategy?t.preloadingStrategy:Lh},{provide:Ys,multi:!0,useFactory:zh},[Yh,{provide:ds,multi:!0,useFactory:Jh,deps:[Yh]},{provide:ed,useFactory:Xh,deps:[Yh]},{provide:vs,multi:!0,useExisting:ed}]]}}static forChild(e){return{ngModule:Bh,providers:[Wh(e)]}}}function qh(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new Uh(e,t,n)}function Qh(e,t,n={}){return n.useHash?new Go(e,t):new Yo(e,t)}function Kh(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Wh(e){return[{provide:It,multi:!0,useValue:e},{provide:Eh,multi:!0,useValue:e}]}function Zh(e,t,n,r,s,i,o,a,l={},c,u){const h=new Ah(null,t,n,r,s,i,o,Hc(a));if(c&&(h.urlHandlingStrategy=c),u&&(h.routeReuseStrategy=u),l.errorHandler&&(h.errorHandler=l.errorHandler),l.malformedUriErrorHandler&&(h.malformedUriErrorHandler=l.malformedUriErrorHandler),l.enableTracing){const e=ul();h.events.subscribe(t=>{e.logGroup("Router Event: "+t.constructor.name),e.log(t.toString()),e.log(t),e.logGroupEnd()})}return l.onSameUrlNavigation&&(h.onSameUrlNavigation=l.onSameUrlNavigation),l.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=l.paramsInheritanceStrategy),l.urlUpdateStrategy&&(h.urlUpdateStrategy=l.urlUpdateStrategy),l.relativeLinkResolution&&(h.relativeLinkResolution=l.relativeLinkResolution),h}function Gh(e){return e.routerState.root}class Yh{constructor(e){this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new x}appInitializer(){return this.injector.get(qo,Promise.resolve(null)).then(()=>{let e=null;const t=new Promise(t=>e=t),n=this.injector.get(Ah),r=this.injector.get($h);if(this.isLegacyDisabled(r)||this.isLegacyEnabled(r))e(!0);else if("disabled"===r.initialNavigation)n.setUpLocationChangeListener(),e(!0);else{if("enabled"!==r.initialNavigation)throw new Error(`Invalid initialNavigation options: '${r.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?ga(null):(this.initNavigation=!0,e(!0),this.resultOfPreactivationDone),n.initialNavigation()}return t})}bootstrapListener(e){const t=this.injector.get($h),n=this.injector.get(jh),r=this.injector.get(Uh),s=this.injector.get(Ah),i=this.injector.get(ni);e===i.components[0]&&(this.isLegacyEnabled(t)?s.initialNavigation():this.isLegacyDisabled(t)&&s.setUpLocationChangeListener(),n.setUpPreloading(),r.init(),s.resetRootComponentType(i.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation}isLegacyDisabled(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation}}function Jh(e){return e.appInitializer.bind(e)}function Xh(e){return e.bootstrapListener.bind(e)}const ed=new we("Router Initializer");var td=Fn({encapsulation:2,styles:[],data:{}});function nd(e){return Di(0,[(e()(),Si(0,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),zr(1,212992,null,0,Oh,[Ph,wn,zt,[8,null],gt],null,null)],(function(e,t){e(t,1,0)}),null)}function rd(e){return Di(0,[(e()(),Si(0,0,null,null,1,"ng-component",[],null,null,null,nd,td)),zr(1,49152,null,0,Rc,[],null,null)],null,null)}var sd=vr("ng-component",Rc,rd,{},{},[]);class id{constructor(e,t){this.name=e,this.imageIndex=t}}const od={btnClass:"default",zoomFactor:.1,containerBackgroundColor:"#ccc",wheelZoom:!1,allowFullscreen:!0,allowKeyboardNavigation:!0,btnShow:{zoomIn:!0,zoomOut:!0,rotateClockwise:!0,rotateCounterClockwise:!0,next:!0,prev:!0},btnIcons:{zoomIn:"fa fa-plus",zoomOut:"fa fa-minus",rotateClockwise:"fa fa-repeat",rotateCounterClockwise:"fa fa-undo",next:"fa fa-arrow-right",prev:"fa fa-arrow-left",fullscreen:"fa fa-arrows-alt"}};let ad=class{constructor(e,t){this.moduleConfig=e,this.sanitizer=t,this.index=0,this.indexChange=new cs,this.configChange=new cs,this.customImageEvent=new cs,this.styleHeight="98vh",this.style={transform:"",msTransform:"",oTransform:"",webkitTransform:""},this.fullscreen=!1,this.loading=!0,this.scale=1,this.rotation=0,this.translateX=0,this.translateY=0,this.hovered=!1}ngOnChanges(e){e.screenHeightOccupied&&(this.styleHeight="calc(98vh - "+this.screenHeightOccupied+"px)")}ngOnInit(){const e=this.mergeConfig(od,this.moduleConfig);this.config=this.mergeConfig(e,this.config),this.triggerConfigBinding()}nextImage(e){this.canNavigate(e)&&this.index0&&(this.loading=!0,this.index--,this.triggerIndexBinding(),this.reset())}zoomIn(){this.scale*=1+this.config.zoomFactor,this.updateStyle()}zoomOut(){this.scale>this.config.zoomFactor&&(this.scale/=1+this.config.zoomFactor),this.updateStyle()}scrollZoom(e){if(this.config.wheelZoom)return e.deltaY>0?this.zoomOut():this.zoomIn(),!1}rotateClockwise(){this.rotation+=90,this.updateStyle()}rotateCounterClockwise(){this.rotation-=90,this.updateStyle()}onLoad(e){this.loading=!1}onLoadStart(e){this.loading=!0}imageNotFound(e){}onDragOver(e){this.translateX+=e.clientX-this.prevX,this.translateY+=e.clientY-this.prevY,this.prevX=e.clientX,this.prevY=e.clientY,this.updateStyle()}onDragStart(e){e.dataTransfer&&e.dataTransfer.setDragImage&&e.dataTransfer.setDragImage(e.target.nextElementSibling,0,0),this.prevX=e.clientX,this.prevY=e.clientY}toggleFullscreen(){this.fullscreen=!this.fullscreen,this.fullscreen||this.reset()}triggerIndexBinding(){this.indexChange.emit(this.index)}triggerConfigBinding(){this.configChange.next(this.config)}fireCustomEvent(e,t){this.customImageEvent.emit(new id(e,t))}reset(){this.scale=1,this.rotation=0,this.translateX=0,this.translateY=0,this.updateStyle()}onMouseOver(){this.hovered=!0}onMouseLeave(){this.hovered=!1}canNavigate(e){return null==e||this.config.allowKeyboardNavigation&&this.hovered}updateStyle(){this.style.transform=`translate(${this.translateX}px, ${this.translateY}px) rotate(${this.rotation}deg) scale(${this.scale})`,this.style.msTransform=this.style.transform,this.style.webkitTransform=this.style.transform,this.style.oTransform=this.style.transform}mergeConfig(e,t){let n=Object.assign({},e);return t&&(n=Object.assign({},e,t),t.btnIcons&&(n.btnIcons=Object.assign({},e.btnIcons,t.btnIcons))),n}},ld=class{constructor(e){this.el=e}ngOnChanges(e){if(!e.fullscreenState.isFirstChange())if(this.fullscreenState){const e=this.el.nativeElement,t=e.requestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen;t?t.call(e):console.log("FullScreen Request Method Not Supported on this browser.")}else{const e=document,t=e.cancelFullscreen||e.webkitExitFullscreen||e.webkitCancelFullScreen||e.mozCancelFullScreen||e.msExitFullScreen;t?t.call(e):console.error("Angular Image Viewer: FullScreen Cancel Request Method Not Supported on this browser.")}}ngOnInit(){}},cd=class{};class ud{}function hd(e,t=null){return{type:2,steps:e,options:t}}function dd(e){return{type:6,styles:e,offset:null}}function pd(e){Promise.resolve(null).then(e)}class fd{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){pd(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){}setPosition(e){}getPosition(){return 0}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class md{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,r=0;const s=this.players.length;0==s?pd(()=>this._onFinish()):this.players.forEach(e=>{e.onDone(()=>{++t==s&&this._onFinish()}),e.onDestroy(()=>{++n==s&&this._onDestroy()}),e.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((e,t)=>Math.max(e,t.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(e=>{const n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let e=0;return this.players.forEach(t=>{const n=t.getPosition();e=Math.min(n,e)}),e}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}function gd(){return"undefined"!=typeof process}function yd(e){switch(e.length){case 0:return new fd;case 1:return e[0];default:return new md(e)}}function _d(e,t,n,r,s={},i={}){const o=[],a=[];let l=-1,c=null;if(r.forEach(e=>{const n=e.offset,r=n==l,u=r&&c||{};Object.keys(e).forEach(n=>{let r=n,a=e[n];if("offset"!==n)switch(r=t.normalizePropertyName(r,o),a){case"!":a=s[n];break;case"*":a=i[n];break;default:a=t.normalizeStyleValue(n,r,a,o)}u[r]=a}),r||a.push(u),c=u,l=n}),o.length){const e="\n - ";throw new Error(`Unable to animate due to the following errors:${e}${o.join(e)}`)}return a}function vd(e,t,n,r){switch(t){case"start":e.onStart(()=>r(n&&wd(n,"start",e)));break;case"done":e.onDone(()=>r(n&&wd(n,"done",e)));break;case"destroy":e.onDestroy(()=>r(n&&wd(n,"destroy",e)))}}function wd(e,t,n){const r=n.totalTime,s=bd(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),i=e._data;return null!=i&&(s._data=i),s}function bd(e,t,n,r,s="",i=0,o){return{element:e,triggerName:t,fromState:n,toState:r,phaseName:s,totalTime:i,disabled:!!o}}function Sd(e,t,n){let r;return e instanceof Map?(r=e.get(t),r||e.set(t,r=n)):(r=e[t],r||(r=e[t]=n)),r}function Ed(e){const t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}let Cd=(e,t)=>!1,xd=(e,t)=>!1,Td=(e,t,n)=>[];const kd=gd();(kd||"undefined"!=typeof Element)&&(Cd=(e,t)=>e.contains(t),xd=(()=>{if(kd||Element.prototype.matches)return(e,t)=>e.matches(t);{const e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?(e,n)=>t.apply(e,[n]):xd}})(),Td=(e,t,n)=>{let r=[];if(n)r.push(...e.querySelectorAll(t));else{const n=e.querySelector(t);n&&r.push(n)}return r});let Id=null,Nd=!1;function Ad(e){Id||(Id=("undefined"!=typeof document?document.body:null)||{},Nd=!!Id.style&&"WebkitAppearance"in Id.style);let t=!0;return Id.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in Id.style,!t&&Nd)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in Id.style),t}const Rd=xd,Pd=Cd,Od=Td;function Dd(e){const t={};return Object.keys(e).forEach(n=>{const r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}class Md{validateStyleProperty(e){return Ad(e)}matchesElement(e,t){return Rd(e,t)}containsElement(e,t){return Pd(e,t)}query(e,t,n){return Od(e,t,n)}computeStyle(e,t,n){return n||""}animate(e,t,n,r,s,i=[],o){return new fd(n,r)}}let Fd=(()=>{class e{}return e.NOOP=new Md,e})();function Ld(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:jd(parseFloat(t[1]),t[2])}function jd(e,t){switch(t){case"s":return 1e3*e;default:return e}}function Ud(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){let r,s=0,i="";if("string"==typeof e){const n=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return t.push(`The provided timing value "${e}" is invalid.`),{duration:0,delay:0,easing:""};r=jd(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(s=jd(parseFloat(o),n[4]));const a=n[5];a&&(i=a)}else r=e;if(!n){let n=!1,i=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(t.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&t.splice(i,0,`The provided timing value "${e}" is invalid.`)}return{duration:r,delay:s,easing:i}}(e,t,n)}function $d(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function Vd(e,t,n={}){if(t)for(let r in e)n[r]=e[r];else $d(e,n);return n}function Hd(e,t,n){return n?t+":"+n+";":""}function zd(e){let t="";for(let n=0;n{const s=Jd(r);n&&!n.hasOwnProperty(r)&&(n[r]=e.style[s]),e.style[s]=t[r]}),gd()&&zd(e))}function qd(e,t){e.style&&(Object.keys(t).forEach(t=>{const n=Jd(t);e.style[n]=""}),gd()&&zd(e))}function Qd(e){return Array.isArray(e)?1==e.length?e[0]:hd(e):e}const Kd=new RegExp("{{\\s*(.+?)\\s*}}","g");function Wd(e){let t=[];if("string"==typeof e){const n=e.toString();let r;for(;r=Kd.exec(n);)t.push(r[1]);Kd.lastIndex=0}return t}function Zd(e,t,n){const r=e.toString(),s=r.replace(Kd,(e,r)=>{let s=t[r];return t.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),s=""),s.toString()});return s==r?e:s}function Gd(e){const t=[];let n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}const Yd=/-+([a-z0-9])/g;function Jd(e){return e.replace(Yd,(...e)=>e[1].toUpperCase())}function Xd(e,t){return 0===e||0===t}function ep(e,t,n){const r=Object.keys(n);if(r.length&&t.length){let i=t[0],o=[];if(r.forEach(e=>{i.hasOwnProperty(e)||o.push(e),i[e]=n[e]}),o.length)for(var s=1;sfunction(e,t,n){if(":"==e[0]){const r=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t) *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}const r=e.match(/^(\*|[-\w]+)\s*([=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push(`The provided transition expression "${e}" is not supported`),t;const s=r[1],i=r[2],o=r[3];t.push(op(s,o)),"<"!=i[0]||"*"==s&&"*"==o||t.push(op(o,s))}(e,n,t)):n.push(e),n}const sp=new Set(["true","1"]),ip=new Set(["false","0"]);function op(e,t){const n=sp.has(e)||ip.has(e),r=sp.has(t)||ip.has(t);return(s,i)=>{let o="*"==e||e==s,a="*"==t||t==i;return!o&&n&&"boolean"==typeof s&&(o=s?sp.has(e):ip.has(e)),!a&&r&&"boolean"==typeof i&&(a=i?sp.has(t):ip.has(t)),o&&a}}const ap=new RegExp("s*:selfs*,?","g");function lp(e,t,n){return new cp(e).build(t,n)}class cp{constructor(e){this._driver=e}build(e,t){const n=new up(t);return this._resetContextStyleTimingState(n),tp(this,Qd(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,r=t.depCount=0;const s=[],i=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(e=>{if(this._resetContextStyleTimingState(t),0==e.type){const n=e,r=n.name;r.toString().split(/\s*,\s*/).forEach(e=>{n.name=e,s.push(this.visitState(n,t))}),n.name=r}else if(1==e.type){const s=this.visitTransition(e,t);n+=s.queryCount,r+=s.depCount,i.push(s)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:s,transitions:i,queryCount:n,depCount:r,options:null}}visitState(e,t){const n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){const s=new Set,i=r||{};if(n.styles.forEach(e=>{if(hp(e)){const t=e;Object.keys(t).forEach(e=>{Wd(t[e]).forEach(e=>{i.hasOwnProperty(e)||s.add(e)})})}}),s.size){const n=Gd(s.values());t.errors.push(`state("${e.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:e.name,style:n,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const n=tp(this,Qd(e.animation),t);return{type:1,matchers:rp(e.expr,t.errors),animation:n,queryCount:t.queryCount,depCount:t.depCount,options:dp(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(e=>tp(this,e,t)),options:dp(e.options)}}visitGroup(e,t){const n=t.currentTime;let r=0;const s=e.steps.map(e=>{t.currentTime=n;const s=tp(this,e,t);return r=Math.max(r,t.currentTime),s});return t.currentTime=r,{type:3,steps:s,options:dp(e.options)}}visitAnimate(e,t){const n=function(e,t){let n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return pp(Ud(e,t).duration,0,"");const r=e;if(r.split(/\s+/).some(e=>"{"==e.charAt(0)&&"{"==e.charAt(1))){const e=pp(0,0,"");return e.dynamic=!0,e.strValue=r,e}return n=n||Ud(r,t),pp(n.duration,n.delay,n.easing)}(e.timings,t.errors);let r;t.currentAnimateTimings=n;let s=e.styles?e.styles:dd({});if(5==s.type)r=this.visitKeyframes(s,t);else{let s=e.styles,i=!1;if(!s){i=!0;const e={};n.easing&&(e.easing=n.easing),s=dd(e)}t.currentTime+=n.duration+n.delay;const o=this.visitStyle(s,t);o.isEmptyStep=i,r=o}return t.currentAnimateTimings=null,{type:4,timings:n,style:r,options:null}}visitStyle(e,t){const n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){const n=[];Array.isArray(e.styles)?e.styles.forEach(e=>{"string"==typeof e?"*"==e?n.push(e):t.errors.push(`The provided style string value ${e} is not allowed.`):n.push(e)}):n.push(e.styles);let r=!1,s=null;return n.forEach(e=>{if(hp(e)){const t=e,n=t.easing;if(n&&(s=n,delete t.easing),!r)for(let e in t)if(t[e].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:s,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){const n=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),e.styles.forEach(e=>{"string"!=typeof e&&Object.keys(e).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void t.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const i=t.collectedStyles[t.currentQuerySelector],o=i[n];let a=!0;o&&(s!=r&&s>=o.startTime&&r<=o.endTime&&(t.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${r}ms"`),a=!1),s=o.startTime),a&&(i[n]={startTime:s,endTime:r}),t.options&&function(e,t,n){const r=t.params||{},s=Wd(e);s.length&&s.forEach(e=>{r.hasOwnProperty(e)||n.push(`Unable to resolve the local animation param ${e} in the given list of values`)})}(e[n],t.options,t.errors)})})}visitKeyframes(e,t){const n={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),n;let r=0;const s=[];let i=!1,o=!1,a=0;const l=e.steps.map(e=>{const n=this._makeStyleAst(e,t);let l=null!=n.offset?n.offset:function(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(e=>{if(hp(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}});else if(hp(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}return t}(n.styles),c=0;return null!=l&&(r++,c=n.offset=l),o=o||c<0||c>1,i=i||c0&&r{const i=u>0?r==h?1:u*r:s[r],o=i*f;t.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(e,t),e.offset=i,n.styles.push(e)}),n}visitReference(e,t){return{type:8,animation:tp(this,Qd(e.animation),t),options:dp(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:dp(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:dp(e.options)}}visitQuery(e,t){const n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[s,i]=function(e){const t=!!e.split(/\s*,\s*/).find(e=>":self"==e);return t&&(e=e.replace(ap,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,e=>".ng-trigger-"+e.substr(1)).replace(/:animating/g,".ng-animating"),t]}(e.selector);t.currentQuerySelector=n.length?n+" "+s:s,Sd(t.collectedStyles,t.currentQuerySelector,{});const o=tp(this,Qd(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:i,animation:o,originalSelector:e.selector,options:dp(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");const n="full"===e.timings?{duration:0,delay:0,easing:"full"}:Ud(e.timings,t.errors,!0);return{type:12,animation:tp(this,Qd(e.animation),t),timings:n,options:null}}}class up{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function hp(e){return!Array.isArray(e)&&"object"==typeof e}function dp(e){var t;return e?(e=$d(e)).params&&(e.params=(t=e.params)?$d(t):null):e={},e}function pp(e,t,n){return{duration:e,delay:t,easing:n}}function fp(e,t,n,r,s,i,o=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:s,delay:i,totalTime:s+i,easing:o,subTimeline:a}}class mp{constructor(){this._map=new Map}consume(e){let t=this._map.get(e);return t?this._map.delete(e):t=[],t}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const gp=new RegExp(":enter","g"),yp=new RegExp(":leave","g");function _p(e,t,n,r,s,i={},o={},a,l,c=[]){return(new vp).buildKeyframes(e,t,n,r,s,i,o,a,l,c)}class vp{buildKeyframes(e,t,n,r,s,i,o,a,l,c=[]){l=l||new mp;const u=new bp(e,t,l,r,s,c,[]);u.options=a,u.currentTimeline.setStyles([i],null,u.errors,a),tp(this,n,u);const h=u.timelines.filter(e=>e.containsAnimation());if(h.length&&Object.keys(o).length){const e=h[h.length-1];e.allowOnlyTimelineStyles()||e.setStyles([o],null,u.errors,a)}return h.length?h.map(e=>e.buildKeyframes()):[fp(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const n=t.subInstructions.consume(t.element);if(n){const r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,i=this._visitSubInstructions(n,r,r.options);s!=i&&t.transformIntoNewTimeline(i)}t.previousNode=e}visitAnimateRef(e,t){const n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime;const s=null!=n.duration?Ld(n.duration):null,i=null!=n.delay?Ld(n.delay):null;return 0!==s&&e.forEach(e=>{const n=t.appendInstructionToTimeline(e,s,i);r=Math.max(r,n.duration+n.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),tp(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const n=t.subContextCount;let r=t;const s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=wp);const e=Ld(s.delay);r.delayNextStep(e)}e.steps.length&&(e.steps.forEach(e=>tp(this,e,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const n=[];let r=t.currentTimeline.currentTime;const s=e.options&&e.options.delay?Ld(e.options.delay):0;e.steps.forEach(i=>{const o=t.createSubContext(e.options);s&&o.delayNextStep(s),tp(this,i,o),r=Math.max(r,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(e=>t.currentTimeline.mergeTimelineCollectedStyles(e)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const n=e.strValue;return Ud(t.params?Zd(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());const s=e.style;5==s.type?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(s):n.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const n=t.currentAnimateTimings,r=t.currentTimeline.duration,s=n.duration,i=t.createSubContext().currentTimeline;i.easing=n.easing,e.styles.forEach(e=>{i.forwardTime((e.offset||0)*s),i.setStyles(e.styles,e.easing,t.errors,t.options),i.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(i),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){const n=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?Ld(r.delay):0;s&&(6===t.previousNode.type||0==n&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=wp);let i=n;const o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=o.length;let a=null;o.forEach((n,r)=>{t.currentQueryIndex=r;const o=t.createSubContext(e.options,n);s&&o.delayNextStep(s),n===t.element&&(a=o.currentTimeline),tp(this,e.animation,o),o.currentTimeline.applyStylesToKeyframe(),i=Math.max(i,o.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(i),a&&(t.currentTimeline.mergeTimelineCollectedStyles(a),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const n=t.parentContext,r=t.currentTimeline,s=e.timings,i=Math.abs(s.duration),o=i*(t.currentQueryTotal-1);let a=i*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=t.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;tp(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-c+(r.startTime-n.currentTimeline.startTime)}}const wp={};class bp{constructor(e,t,n,r,s,i,o,a){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=i,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=wp,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new Sp(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const n=e;let r=this.options;null!=n.duration&&(r.duration=Ld(n.duration)),null!=n.delay&&(r.delay=Ld(n.delay));const s=n.params;if(s){let e=r.params;e||(e=this.options.params={}),Object.keys(s).forEach(n=>{t&&e.hasOwnProperty(n)||(e[n]=Zd(s[n],e,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const n=e.params={};Object.keys(t).forEach(e=>{n[e]=t[e]})}}return e}createSubContext(e=null,t,n){const r=t||this.element,s=new bp(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=wp,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){const r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},s=new Ep(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,r,s,i){let o=[];if(r&&o.push(this.element),e.length>0){e=(e=e.replace(gp,"."+this._enterClassName)).replace(yp,"."+this._leaveClassName);let t=this._driver.query(this.element,e,1!=n);0!==n&&(t=n<0?t.slice(t.length+n,t.length):t.slice(0,n)),o.push(...t)}return s||0!=o.length||i.push(`\`query("${t}")\` returned zero elements. (Use \`query("${t}", { optional: true })\` if you wish to allow this.)`),o}}class Sp{constructor(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new Sp(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||"*",this._currentKeyframe[e]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,r){t&&(this._previousKeyframe.easing=t);const s=r&&r.params||{},i=function(e,t){const n={};let r;return e.forEach(e=>{"*"===e?(r=r||Object.keys(t),r.forEach(e=>{n[e]="*"})):Vd(e,!1,n)}),n}(e,this._globalTimelineStyles);Object.keys(i).forEach(e=>{const t=Zd(i[e],s,n);this._pendingStyles[e]=t,this._localTimelineStyles.hasOwnProperty(e)||(this._backFill[e]=this._globalTimelineStyles.hasOwnProperty(e)?this._globalTimelineStyles[e]:"*"),this._updateStyle(e,t)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(t=>{this._currentKeyframe[t]=e[t]}),Object.keys(this._localTimelineStyles).forEach(e=>{this._currentKeyframe.hasOwnProperty(e)||(this._currentKeyframe[e]=this._localTimelineStyles[e])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const n=this._styleSummary[t],r=e._styleSummary[t];(!n||r.time>n.time)&&this._updateStyle(t,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((s,i)=>{const o=Vd(s,!0);Object.keys(o).forEach(n=>{const r=o[n];"!"==r?e.add(n):"*"==r&&t.add(n)}),n||(o.offset=i/this.duration),r.push(o)});const s=e.size?Gd(e.values()):[],i=t.size?Gd(t.values()):[];if(n){const e=r[0],t=$d(e);e.offset=0,t.offset=1,r=[e,t]}return fp(this.element,r,s,i,this.duration,this.startTime,this.easing,!1)}}class Ep extends Sp{constructor(e,t,n,r,s,i,o=!1){super(e,t,i.delay),this.element=t,this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:i.duration,delay:i.delay,easing:i.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],i=n+t,o=t/i,a=Vd(e[0],!1);a.offset=0,s.push(a);const l=Vd(e[0],!1);l.offset=Cp(o),s.push(l);const c=e.length-1;for(let r=1;r<=c;r++){let o=Vd(e[r],!1);o.offset=Cp((t+o.offset*n)/i),s.push(o)}n=i,t=0,r="",e=s}return fp(this.element,e,this.preStyleProps,this.postStyleProps,n,t,r,!0)}}function Cp(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}class xp{}class Tp extends xp{normalizePropertyName(e,t){return Jd(e)}normalizeStyleValue(e,t,n,r){let s="";const i=n.toString().trim();if(kp[t]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const t=n.match(/^[+-]?[\d\.]+([a-z]*)$/);t&&0==t[1].length&&r.push(`Please provide a CSS unit value for ${e}:${n}`)}return i+s}}const kp=(()=>function(e){const t={};return e.forEach(e=>t[e]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Ip(e,t,n,r,s,i,o,a,l,c,u,h,d){return{type:0,element:e,triggerName:t,isRemovalTransition:s,fromState:n,fromStyles:i,toState:r,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Np={};class Ap{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,r){return function(e,t,n,r,s){return e.some(e=>e(t,n,r,s))}(this.ast.matchers,e,t,n,r)}buildStyles(e,t,n){const r=this._stateStyles["*"],s=this._stateStyles[e],i=r?r.buildStyles(t,n):{};return s?s.buildStyles(t,n):i}build(e,t,n,r,s,i,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Np,d=this.buildStyles(n,o&&o.params||Np,u),p=a&&a.params||Np,f=this.buildStyles(r,p,u),m=new Set,g=new Map,y=new Map,_="void"===r,v={params:Object.assign({},h,p)},w=c?[]:_p(e,t,this.ast.animation,s,i,d,f,v,l,u);let b=0;if(w.forEach(e=>{b=Math.max(e.duration+e.delay,b)}),u.length)return Ip(t,this._triggerName,n,r,_,d,f,[],[],g,y,b,u);w.forEach(e=>{const n=e.element,r=Sd(g,n,{});e.preStyleProps.forEach(e=>r[e]=!0);const s=Sd(y,n,{});e.postStyleProps.forEach(e=>s[e]=!0),n!==t&&m.add(n)});const S=Gd(m.values());return Ip(t,this._triggerName,n,r,_,d,f,w,S,g,y,b)}}class Rp{constructor(e,t){this.styles=e,this.defaultParams=t}buildStyles(e,t){const n={},r=$d(this.defaultParams);return Object.keys(e).forEach(t=>{const n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(e=>{if("string"!=typeof e){const s=e;Object.keys(s).forEach(e=>{let i=s[e];i.length>1&&(i=Zd(i,r,t)),n[e]=i})}}),n}}class Pp{constructor(e,t){this.name=e,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(e=>{this.states[e.name]=new Rp(e.style,e.options&&e.options.params||{})}),Op(this.states,"true","1"),Op(this.states,"false","0"),t.transitions.forEach(t=>{this.transitionFactories.push(new Ap(e,t,this.states))}),this.fallbackTransition=new Ap(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[(e,t)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,r){return this.transitionFactories.find(s=>s.match(e,t,n,r))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}}function Op(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}const Dp=new mp;class Mp{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(e,t){const n=[],r=lp(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r}_buildPlayer(e,t,n){const r=e.element,s=_d(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){const r=[],s=this._animations[e];let i;const o=new Map;if(s?(i=_p(this._driver,t,s,"ng-enter","ng-leave",{},{},n,Dp,r),i.forEach(e=>{const t=Sd(o,e.element,{});e.postStyleProps.forEach(e=>t[e]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),i=[]),r.length)throw new Error("Unable to create the animation due to the following errors: "+r.join("\n"));o.forEach((e,t)=>{Object.keys(e).forEach(n=>{e[n]=this._driver.computeStyle(t,n,"*")})});const a=yd(i.map(e=>{const t=o.get(e.element);return this._buildPlayer(e,{},t)}));return this._playersById[e]=a,a.onDestroy(()=>this.destroy(e)),this.players.push(a),a}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}listen(e,t,n,r){const s=bd(t,"","","");return vd(this._getPlayer(e),n,s,r),()=>{}}command(e,t,n,r){if("register"==n)return void this.register(e,r[0]);if("create"==n)return void this.create(e,t,r[0]||{});const s=this._getPlayer(e);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const Fp=[],Lp={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jp={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class Up{constructor(e,t=""){this.namespaceId=t;const n=e&&e.hasOwnProperty("value");if(this.value=null!=(r=n?e.value:e)?r:null,n){const t=$d(e);delete t.value,this.options=t}else this.options={};var r;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const e=this.options.params;Object.keys(t).forEach(n=>{null==e[n]&&(e[n]=t[n])})}}}const $p=new Up("void");class Vp{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Wp(t,this._hostClassName)}listen(e,t,n,r){if(!this._triggers.hasOwnProperty(t))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${t}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${t}" because the provided event is undefined!`);if("start"!=(s=n)&&"done"!=s)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${t}" is not supported!`);var s;const i=Sd(this._elementListeners,e,[]),o={name:t,phase:n,callback:r};i.push(o);const a=Sd(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(Wp(e,"ng-trigger"),Wp(e,"ng-trigger-"+t),a[t]=$p),()=>{this._engine.afterFlush(()=>{const e=i.indexOf(o);e>=0&&i.splice(e,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw new Error(`The provided animation trigger "${e}" has not been registered!`);return t}trigger(e,t,n,r=!0){const s=this._getTrigger(t),i=new zp(this.id,t,e);let o=this._engine.statesByElement.get(e);o||(Wp(e,"ng-trigger"),Wp(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,o={}));let a=o[t];const l=new Up(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[t]=l,a||(a=$p),"void"!==l.value&&a.value===l.value){if(!function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(let s=0;s{qd(e,n),Bd(e,r)})}return}const c=Sd(this._engine.playersByElement,e,[]);c.forEach(e=>{e.namespaceId==this.id&&e.triggerName==t&&e.queued&&e.destroy()});let u=s.matchTransition(a.value,l.value,e,l.params),h=!1;if(!u){if(!r)return;u=s.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:u,fromState:a,toState:l,player:i,isFallbackTransition:h}),h||(Wp(e,"ng-animate-queued"),i.onStart(()=>{Zp(e,"ng-animate-queued")})),i.onDone(()=>{let t=this.players.indexOf(i);t>=0&&this.players.splice(t,1);const n=this._engine.playersByElement.get(e);if(n){let e=n.indexOf(i);e>=0&&n.splice(e,1)}}),this.players.push(i),c.push(i),i}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,n)=>{delete t[e]}),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(t=>t.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(e=>e.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t,n=!1){this._engine.driver.query(e,".ng-trigger",!0).forEach(e=>{if(e.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(e);n.size?n.forEach(n=>n.triggerLeaveAnimation(e,t,!1,!0)):this.clearElementCache(e)})}triggerLeaveAnimation(e,t,n,r){const s=this._engine.statesByElement.get(e);if(s){const i=[];if(Object.keys(s).forEach(t=>{if(this._triggers[t]){const n=this.trigger(e,t,"void",r);n&&i.push(n)}}),i.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&yd(i).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e);if(t){const n=new Set;t.forEach(t=>{const r=t.name;if(n.has(r))return;n.add(r);const s=this._triggers[r].fallbackTransition,i=this._engine.statesByElement.get(e)[r]||$p,o=new Up("void"),a=new zp(this.id,r,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:s,fromState:i,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(e,t){const n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t,!0),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(n.totalAnimations){const t=n.players.length?n.playersByQueriedElement.get(e):[];if(t&&t.length)r=!0;else{let t=e;for(;t=t.parentNode;)if(n.statesByElement.get(t)){r=!0;break}}}this.prepareLeaveAnimationListeners(e),r?n.markElementAsRemoved(this.id,e,!1,t):(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}insertNode(e,t){Wp(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,i=this._elementListeners.get(s);i&&i.forEach(t=>{if(t.name==n.triggerName){const r=bd(s,n.triggerName,n.fromState.value,n.toState.value);r._data=e,vd(n.player,t.phase,r,t.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((e,t)=>{const n=e.transition.ast.depCount,r=t.transition.ast.depCount;return 0==n||0==r?n-r:this._engine.driver.containsElement(e.element,t.element)?1:-1})}destroy(e){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(t=>t.element===e)||t,t}}class Hp{constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(e,t)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,t){const n=new Vp(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){const n=this._namespaceList.length-1;if(n>=0){let r=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,t)){this._namespaceList.splice(s+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}destroy(e,t){if(!e)return;const n=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[e];const t=this._namespaceList.indexOf(n);t>=0&&this._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(()=>n.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,n=this.statesByElement.get(e);if(n){const e=Object.keys(n);for(let r=0;r=0&&this.collectedLeaveElements.splice(e,1)}if(e){const r=this._fetchNamespace(e);r&&r.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Wp(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Zp(e,"ng-animate-disabled"))}removeNode(e,t,n,r){if(Bp(t)){const s=e?this._fetchNamespace(e):null;if(s?s.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),n){const n=this.namespacesByHostElement.get(t);n&&n.id!==e&&n.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,n,r){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}listen(e,t,n,r,s){return Bp(t)?this._fetchNamespace(e).listen(t,n,r,s):()=>{}}_buildInstruction(e,t,n,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,".ng-trigger",!0);t.forEach(e=>this.destroyActiveAnimationsForElement(e)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,".ng-animating",!0),t.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return yd(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e.__ng_removed;if(t&&t.setForRemoval){if(e.__ng_removed=Lp,t.namespaceId){this.destroyInnerAnimations(e);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,t)=>this._balanceNamespaceList(e,t)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;ne()),this._flushFns=[],this._whenQuietFns.length){const e=this._whenQuietFns;this._whenQuietFns=[],t.length?yd(t).onDone(()=>{e.forEach(e=>e())}):e.forEach(e=>e())}}reportError(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}_flushAnimations(e,t){const n=new mp,r=[],s=new Map,i=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(e=>{c.add(e);const t=this.driver.query(e,".ng-animate-queued",!0);for(let n=0;n{const n="ng-enter"+f++;p.set(t,n),e.forEach(e=>Wp(e,n))});const m=[],g=new Set,y=new Set;for(let A=0;Ag.add(e)):y.add(e))}const _=new Map,v=Kp(h,Array.from(g));v.forEach((e,t)=>{const n="ng-leave"+f++;_.set(t,n),e.forEach(e=>Wp(e,n))}),e.push(()=>{d.forEach((e,t)=>{const n=p.get(t);e.forEach(e=>Zp(e,n))}),v.forEach((e,t)=>{const n=_.get(t);e.forEach(e=>Zp(e,n))}),m.forEach(e=>{this.processLeaveNode(e)})});const w=[],b=[];for(let A=this._namespaceList.length-1;A>=0;A--)this._namespaceList[A].drainQueuedTransitions(t).forEach(e=>{const t=e.player,s=e.element;if(w.push(t),this.collectedEnterElements.length){const e=s.__ng_removed;if(e&&e.setForMove)return void t.destroy()}const c=!u||!this.driver.containsElement(u,s),h=_.get(s),d=p.get(s),f=this._buildInstruction(e,n,d,h,c);if(f.errors&&f.errors.length)b.push(f);else{if(c)return t.onStart(()=>qd(s,f.fromStyles)),t.onDestroy(()=>Bd(s,f.toStyles)),void r.push(t);if(e.isFallbackTransition)return t.onStart(()=>qd(s,f.fromStyles)),t.onDestroy(()=>Bd(s,f.toStyles)),void r.push(t);f.timelines.forEach(e=>e.stretchStartingKeyframe=!0),n.append(s,f.timelines),i.push({instruction:f,player:t,element:s}),f.queriedElements.forEach(e=>Sd(o,e,[]).push(t)),f.preStyleProps.forEach((e,t)=>{const n=Object.keys(e);if(n.length){let e=a.get(t);e||a.set(t,e=new Set),n.forEach(t=>e.add(t))}}),f.postStyleProps.forEach((e,t)=>{const n=Object.keys(e);let r=l.get(t);r||l.set(t,r=new Set),n.forEach(e=>r.add(e))})}});if(b.length){const e=[];b.forEach(t=>{e.push(`@${t.triggerName} has failed due to:\n`),t.errors.forEach(t=>e.push(`- ${t}\n`))}),w.forEach(e=>e.destroy()),this.reportError(e)}const S=new Map,E=new Map;i.forEach(e=>{const t=e.element;n.has(t)&&(E.set(t,t),this._beforeAnimationBuild(e.player.namespaceId,e.instruction,S))}),r.forEach(e=>{const t=e.element;this._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(e=>{Sd(S,t,[]).push(e),e.destroy()})});const C=m.filter(e=>Yp(e,a,l)),x=new Map;Qp(x,this.driver,y,l,"*").forEach(e=>{Yp(e,a,l)&&C.push(e)});const T=new Map;d.forEach((e,t)=>{Qp(T,this.driver,new Set(e),a,"!")}),C.forEach(e=>{const t=x.get(e),n=T.get(e);x.set(e,Object.assign({},t,n))});const k=[],I=[],N={};i.forEach(e=>{const{element:t,player:i,instruction:o}=e;if(n.has(t)){if(c.has(t))return i.onDestroy(()=>Bd(t,o.toStyles)),i.disabled=!0,i.overrideTotalTime(o.totalTime),void r.push(i);let e=N;if(E.size>1){let n=t;const r=[];for(;n=n.parentNode;){const t=E.get(n);if(t){e=t;break}r.push(n)}r.forEach(t=>E.set(t,e))}const n=this._buildAnimation(i.namespaceId,o,S,s,T,x);if(i.setRealPlayer(n),e===N)k.push(i);else{const t=this.playersByElement.get(e);t&&t.length&&(i.parentPlayer=yd(t)),r.push(i)}}else qd(t,o.fromStyles),i.onDestroy(()=>Bd(t,o.toStyles)),I.push(i),c.has(t)&&r.push(i)}),I.forEach(e=>{const t=s.get(e.element);if(t&&t.length){const n=yd(t);e.setRealPlayer(n)}}),r.forEach(e=>{e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(let A=0;A!e.destroyed);r.length?Gp(this,e,r):this.processLeaveNode(e)}return m.length=0,k.forEach(e=>{this.players.push(e),e.onDone(()=>{e.destroy();const t=this.players.indexOf(e);this.players.splice(t,1)}),e.play()}),k}elementContainsData(e,t){let n=!1;const r=t.__ng_removed;return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,r,s){let i=[];if(t){const t=this.playersByQueriedElement.get(e);t&&(i=t)}else{const t=this.playersByElement.get(e);if(t){const e=!s||"void"==s;t.forEach(t=>{t.queued||(e||t.triggerName==r)&&i.push(t)})}}return(n||r)&&(i=i.filter(e=>!(n&&n!=e.namespaceId||r&&r!=e.triggerName))),i}_beforeAnimationBuild(e,t,n){const r=t.element,s=t.isRemovalTransition?void 0:e,i=t.isRemovalTransition?void 0:t.triggerName;for(const o of t.timelines){const e=o.element,a=e!==r,l=Sd(n,e,[]);this._getPreviousPlayers(e,a,s,i,t.toState).forEach(e=>{const t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),l.push(e)})}qd(r,t.fromStyles)}_buildAnimation(e,t,n,r,s,i){const o=t.triggerName,a=t.element,l=[],c=new Set,u=new Set,h=t.timelines.map(t=>{const h=t.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new fd(t.duration,t.delay);const p=h!==a,f=function(e){const t=[];return function e(t,n){for(let r=0;re.getRealPlayer())).filter(e=>!!e.element&&e.element===h),m=s.get(h),g=i.get(h),y=_d(0,this._normalizer,0,t.keyframes,m,g),_=this._buildPlayer(t,y,f);if(t.subTimeline&&r&&u.add(h),p){const t=new zp(e,o,h);t.setRealPlayer(_),l.push(t)}return _});l.forEach(e=>{Sd(this.playersByQueriedElement,e.element,[]).push(e),e.onDone(()=>function(e,t,n){let r;if(e instanceof Map){if(r=e.get(t),r){if(r.length){const e=r.indexOf(n);r.splice(e,1)}0==r.length&&e.delete(t)}}else if(r=e[t],r){if(r.length){const e=r.indexOf(n);r.splice(e,1)}0==r.length&&delete e[t]}return r}(this.playersByQueriedElement,e.element,e))}),c.forEach(e=>Wp(e,"ng-animating"));const d=yd(h);return d.onDestroy(()=>{c.forEach(e=>Zp(e,"ng-animating")),Bd(a,t.toStyles)}),u.forEach(e=>{Sd(r,e,[]).push(d)}),d}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new fd(e.duration,e.delay)}}class zp{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new fd,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(n=>vd(e,t,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){Sd(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Bp(e){return e&&1===e.nodeType}function qp(e,t){const n=e.style.display;return e.style.display=null!=t?t:"none",n}function Qp(e,t,n,r,s){const i=[];n.forEach(e=>i.push(qp(e)));const o=[];r.forEach((n,r)=>{const i={};n.forEach(e=>{const n=i[e]=t.computeStyle(r,e,s);n&&0!=n.length||(r.__ng_removed=jp,o.push(r))}),e.set(r,i)});let a=0;return n.forEach(e=>qp(e,i[a++])),o}function Kp(e,t){const n=new Map;if(e.forEach(e=>n.set(e,[])),0==t.length)return n;const r=new Set(t),s=new Map;return t.forEach(e=>{const t=function e(t){if(!t)return 1;let i=s.get(t);if(i)return i;const o=t.parentNode;return i=n.has(o)?o:r.has(o)?1:e(o),s.set(t,i),i}(e);1!==t&&n.get(t).push(e)}),n}function Wp(e,t){if(e.classList)e.classList.add(t);else{let n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Zp(e,t){if(e.classList)e.classList.remove(t);else{let n=e.$$classes;n&&delete n[t]}}function Gp(e,t,n){yd(n).onDone(()=>e.processLeaveNode(t))}function Yp(e,t,n){const r=n.get(e);if(!r)return!1;let s=t.get(e);return s?r.forEach(e=>s.add(e)):t.set(e,r),n.delete(e),!0}class Jp{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._triggerCache={},this.onRemovalComplete=(e,t)=>{},this._transitionEngine=new Hp(e,t,n),this._timelineEngine=new Mp(e,t,n),this._transitionEngine.onRemovalComplete=(e,t)=>this.onRemovalComplete(e,t)}registerTrigger(e,t,n,r,s){const i=e+"-"+r;let o=this._triggerCache[i];if(!o){const e=[],t=lp(this._driver,s,e);if(e.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${e.join("\n - ")}`);o=function(e,t){return new Pp(e,t)}(r,t),this._triggerCache[i]=o}this._transitionEngine.registerTrigger(t,r,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}onRemove(e,t,n,r){this._transitionEngine.removeNode(e,t,r||!1,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,r){if("@"==n.charAt(0)){const[e,s]=Ed(n);this._timelineEngine.command(e,t,s,r)}else this._transitionEngine.trigger(e,t,n,r)}listen(e,t,n,r,s){if("@"==n.charAt(0)){const[e,r]=Ed(n);return this._timelineEngine.listen(e,t,r,s)}return this._transitionEngine.listen(e,t,n,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Xp(e,t){let n=null,r=null;return Array.isArray(t)&&t.length?(n=tf(t[0]),t.length>1&&(r=tf(t[t.length-1]))):t&&(n=tf(t)),n||r?new ef(e,n,r):null}let ef=(()=>{class e{constructor(t,n,r){this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;let s=e.initialStylesByElement.get(t);s||e.initialStylesByElement.set(t,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Bd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Bd(this._element,this._initialStyles),this._endStyles&&(Bd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(qd(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(qd(this._element,this._endStyles),this._endStyles=null),Bd(this._element,this._initialStyles),this._state=3)}}return e.initialStylesByElement=new WeakMap,e})();function tf(e){let t=null;const n=Object.keys(e);for(let r=0;rthis._handleCallback(e)}apply(){!function(e,t){const n=uf(e,"").trim();n.length&&(function(e,t){let n=0;for(let r=0;r=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),lf(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(e,t){const n=uf(e,"").split(","),r=af(n,t);r>=0&&(n.splice(r,1),cf(e,"",n.join(",")))}(this._element,this._name))}}function sf(e,t,n){cf(e,"PlayState",n,of(e,t))}function of(e,t){const n=uf(e,"");return n.indexOf(",")>0?af(n.split(","),t):af([n],t)}function af(e,t){for(let n=0;n=0)return n;return-1}function lf(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function cf(e,t,n,r){const s="animation"+t;if(null!=r){const t=e.style[s];if(t.length){const e=t.split(",");e[r]=n,n=e.join(",")}}e.style[s]=n}function uf(e,t){return e.style["animation"+t]}class hf{constructor(e,t,n,r,s,i,o,a){this.element=e,this.keyframes=t,this.animationName=n,this._duration=r,this._delay=s,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=i||"linear",this.totalTime=r+s,this._buildStyler()}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(e){this._styler.setPosition(e)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new rf(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}beforeDestroy(){this.init();const e={};if(this.hasStarted()){const t=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(e[n]=t?this._finalStyles[n]:np(this.element,n))})}this.currentSnapshot=e}}class df extends fd{constructor(e,t){super(),this.element=e,this._startingStyles={},this.__initialized=!1,this._styles=Dd(t)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(e=>{this._startingStyles[e]=this.element.style[e]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(e=>this.element.style.setProperty(e,this._styles[e])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(e=>{const t=this._startingStyles[e];t?this.element.style.setProperty(e,t):this.element.style.removeProperty(e)}),this._startingStyles=null,super.destroy())}}class pf{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(e){return Ad(e)}matchesElement(e,t){return Rd(e,t)}containsElement(e,t){return Pd(e,t)}query(e,t,n){return Od(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}buildKeyframeElement(e,t,n){n=n.map(e=>Dd(e));let r=`@keyframes ${t} {\n`,s="";n.forEach(e=>{s=" ";const t=parseFloat(e.offset);r+=`${s}${100*t}% {\n`,s+=" ",Object.keys(e).forEach(t=>{const n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+=`${s}animation-timing-function: ${n};\n`));default:return void(r+=`${s}${t}: ${n};\n`)}}),r+=s+"}\n"}),r+="}\n";const i=document.createElement("style");return i.innerHTML=r,i}animate(e,t,n,r,s,i=[],o){o&&this._notifyFaultyScrubber();const a=i.filter(e=>e instanceof hf),l={};Xd(n,r)&&a.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>l[e]=t[e])});const c=function(e){let t={};return e&&(Array.isArray(e)?e:[e]).forEach(e=>{Object.keys(e).forEach(n=>{"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=ep(e,t,l));if(0==n)return new df(e,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(e,u,t);document.querySelector("head").appendChild(h);const d=Xp(e,t),p=new hf(e,t,u,n,r,s,c,d);return p.onDestroy(()=>{var e;(e=h).parentNode.removeChild(e)}),p}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class ff{constructor(e,t,n,r){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,n){return e.animate(t,n)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(t=>{"offset"!=t&&(e[t]=this._finished?this._finalKeyframe[t]:np(this.element,t))}),this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class mf{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(gf().toString()),this._cssKeyframesDriver=new pf}validateStyleProperty(e){return Ad(e)}matchesElement(e,t){return Rd(e,t)}containsElement(e,t){return Pd(e,t)}query(e,t,n){return Od(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}overrideWebAnimationsSupport(e){this._isNativeImpl=e}animate(e,t,n,r,s,i=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,r,s,i);const a={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(a.easing=s);const l={},c=i.filter(e=>e instanceof ff);Xd(n,r)&&c.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>l[e]=t[e])});const u=Xp(e,t=ep(e,t=t.map(e=>Vd(e,!1)),l));return new ff(e,t,a,u)}}function gf(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}class yf extends ud{constructor(e,t){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(t.body,{id:"0",encapsulation:De.None,styles:[],data:{animation:[]}})}build(e){const t=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(e)?hd(e):e;return wf(this._renderer,null,t,"register",[n]),new _f(t,this._renderer)}}class _f extends class{}{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new vf(this._id,e,t||{},this._renderer)}}class vf{constructor(e,t,n,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return wf(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(e){this._command("setPosition",e)}getPosition(){return 0}}function wf(e,t,n,r,s){return e.setProperty(t,`@@${n}:${r}`,s)}class bf{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),t.onRemovalComplete=(e,t)=>{t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}createRenderer(e,t){const n=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){let e=this._rendererCache.get(n);return e||(e=new Sf("",n,this.engine),this._rendererCache.set(n,e)),e}const r=t.id,s=t.id+"-"+this._currentId;return this._currentId++,this.engine.register(s,e),t.data.animation.forEach(t=>this.engine.registerTrigger(r,s,e,t.name,t)),new Ef(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){e>=0&&et(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(e=>{const[t,n]=e;t(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([t,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}class Sf{constructor(e,t,n){this.namespaceId=e,this.delegate=t,this.engine=n,this.destroyNode=this.delegate.destroyNode?e=>t.destroyNode(e):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,!0)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,r){this.delegate.setStyle(e,t,n,r)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class Ef extends Sf{constructor(e,t,n,r){super(t,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if("@"==t.charAt(0)){const r=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e);let s=t.substr(1),i="";return"@"!=s.charAt(0)&&([s,i]=function(e){const t=e.indexOf(".");return[e.substring(0,t),e.substr(t+1)]}(s)),this.engine.listen(this.namespaceId,r,s,i,e=>{this.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}class Cf extends Jp{constructor(e,t,n){super(e.body,t,n)}}function xf(){return"function"==typeof gf()?new mf:new pf}function Tf(){return new Tp}function kf(e,t,n){return new bf(e,t,n)}const If=new we("AnimationModuleType");class Nf{}class Af{constructor(){this._accessors=[]}add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}const Rf=new we("NgFormSelectorWarning");class Pf{}class Of{static withConfig(e){return{ngModule:Of,providers:[{provide:Rf,useValue:e.warnOnDeprecatedNgFormSelector}]}}}var Df=Fn({encapsulation:0,styles:[".img-container[_ngcontent-%COMP%]{width:100%;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;overflow:hidden}.img-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:95%}.img-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{z-index:99;position:absolute;right:15px}.img-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:disabled){cursor:pointer}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(1):not(#ngx-fs-btn){bottom:15px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(2):not(#ngx-fs-btn){bottom:65px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(3):not(#ngx-fs-btn){bottom:115px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(4):not(#ngx-fs-btn){bottom:165px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(5):not(#ngx-fs-btn){bottom:215px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(6):not(#ngx-fs-btn){bottom:265px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(7):not(#ngx-fs-btn){bottom:315px}#ngx-fs-btn[_ngcontent-%COMP%]{top:15px}button.default[_ngcontent-%COMP%]{height:40px;width:40px;border:1px solid #555;border-radius:50%;background-color:#fff;opacity:.7;-webkit-transition:opacity .2s;transition:opacity .2s}button.default[_ngcontent-%COMP%]:hover{opacity:1}button.default[_ngcontent-%COMP%]:disabled{opacity:.25}.nav-button-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{position:relative;right:0;margin:0 10px}.nav-button-container[_ngcontent-%COMP%]{text-align:center;position:absolute;z-index:98;bottom:10px;left:0;right:0}.spinner-container[_ngcontent-%COMP%]{position:absolute;left:0;right:0;top:0;bottom:0;width:60px;height:60px;margin:auto;padding:10px;background-color:rgba(0,0,0,.4);border-radius:25%}.spinner[_ngcontent-%COMP%]{border-width:7px;border-style:solid;border-color:#ccc #ccc #222;border-radius:50%;height:100%;width:100%;box-sizing:border-box;-webkit-animation:2s linear infinite rotation;animation:2s linear infinite rotation}@keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(359deg)}}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(359deg)}}"],data:{}});function Mf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"div",[["class","spinner-container"]],null,null,null,null,null)),(e()(),Si(1,0,null,null,0,"div",[["class","spinner"]],null,null,null,null,null))],null,null)}function Ff(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.rotateCounterClockwise()&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,0,0,n.config.btnClass),e(t,1,0,n.config.btnIcons.rotateCounterClockwise)}))}function Lf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.rotateClockwise()&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,0,0,n.config.btnClass),e(t,1,0,n.config.btnIcons.rotateClockwise)}))}function jf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.zoomOut()&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,0,0,n.config.btnClass),e(t,1,0,n.config.btnIcons.zoomOut)}))}function Uf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.zoomIn()&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,0,0,n.config.btnClass),e(t,1,0,n.config.btnIcons.zoomIn)}))}function $f(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0,s=e.component;return"click"===t&&(r=!1!==s.fireCustomEvent(e.context.$implicit.name,s.index)&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){e(t,0,0,t.component.config.btnClass),e(t,1,0,t.context.$implicit.icon)}))}function Vf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"button",[["id","ngx-fs-btn"],["type","button"]],[[8,"className",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.toggleFullscreen()&&r),r}),null,null)),(e()(),Si(1,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,0,0,n.config.btnClass),e(t,1,0,n.config.btnIcons.fullscreen)}))}function Hf(e){return Di(0,[(e()(),Si(0,0,null,null,4,"div",[["class","nav-button-container"]],null,null,null,null,null)),(e()(),Si(1,0,null,null,1,"button",[["type","button"]],[[8,"className",0],[8,"disabled",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.prevImage(n)&&r),r}),null,null)),(e()(),Si(2,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null)),(e()(),Si(3,0,null,null,1,"button",[["type","button"]],[[8,"className",0],[8,"disabled",0]],[[null,"click"]],(function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.nextImage(n)&&r),r}),null,null)),(e()(),Si(4,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null))],null,(function(e,t){var n=t.component;e(t,1,0,n.config.btnClass,0===n.index),e(t,2,0,n.config.btnIcons.prev),e(t,3,0,n.config.btnClass,n.index===n.src.length-1),e(t,4,0,n.config.btnIcons.next)}))}function zf(e){return Di(0,[(e()(),Si(0,0,null,null,21,"div",[["class","img-container"]],[[4,"backgroundColor",null]],[[null,"wheel"],[null,"dragover"]],(function(e,t,n){var r=!0,s=e.component;return"wheel"===t&&(r=!1!==s.scrollZoom(n)&&r),"dragover"===t&&(r=!1!==s.onDragOver(n)&&r),r}),null,null)),zr(1,606208,null,0,ld,[Kt],{fullscreenState:[0,"fullscreenState"]},null),(e()(),Si(2,0,null,null,2,"img",[["alt","Image not found..."]],[[8,"src",4]],[[null,"dragstart"],[null,"load"],[null,"error"],[null,"loadstart"]],(function(e,t,n){var r=!0,s=e.component;return"dragstart"===t&&(r=!1!==s.onDragStart(n)&&r),"load"===t&&(r=!1!==s.onLoad(s.src[s.index])&&r),"error"===t&&(r=!1!==s.imageNotFound(s.src[s.index])&&r),"loadstart"===t&&(r=!1!==s.onLoadStart(s.src[s.index])&&r),r}),null,null)),(t=la,n=ca,r=[Kt,fn,Jt],Br(-1,512,null,0,t,n,r)),zr(4,278528,null,0,ha,[la],{ngStyle:[0,"ngStyle"]},null),(e()(),Si(5,0,null,null,0,"div",[],null,null,null,null,null)),(e()(),bi(16777216,null,null,1,null,Mf)),zr(7,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,Ff)),zr(9,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,Lf)),zr(11,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,jf)),zr(13,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,Uf)),zr(15,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,$f)),zr(17,278528,null,0,ra,[wn,_n,pn],{ngForOf:[0,"ngForOf"]},null),(e()(),bi(16777216,null,null,1,null,Vf)),zr(19,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),bi(16777216,null,null,1,null,Hf)),zr(21,16384,null,0,ia,[wn,_n],{ngIf:[0,"ngIf"]},null)],(function(e,t){var n=t.component;e(t,1,0,n.fullscreen),e(t,4,0,n.style),e(t,7,0,n.loading),e(t,9,0,n.config.btnShow.rotateCounterClockwise),e(t,11,0,n.config.btnShow.rotateClockwise),e(t,13,0,n.config.btnShow.zoomOut),e(t,15,0,n.config.btnShow.zoomIn),e(t,17,0,n.config.customBtns),e(t,19,0,n.config.allowFullscreen),e(t,21,0,n.src.length>1)}),(function(e,t){var n=t.component;e(t,0,0,n.config.containerBackgroundColor),e(t,2,0,n.src[n.index])}));var t,n,r}var Bf=Fn({encapsulation:0,styles:[[".container[_ngcontent-%COMP%]{height:600px;width:600px;border:1px solid #666;position:relative}"]],data:{}});function qf(e){return Di(0,[(e()(),Si(0,0,null,null,2,"div",[["class","container"]],null,null,null,null,null)),(e()(),Si(1,0,null,null,1,"angular-image-viewer",[],null,[[null,"configChange"],[null,"indexChange"],[null,"customImageEvent"],["window","keyup.ArrowRight"],["window","keyup.ArrowLeft"],[null,"mouseover"],[null,"mouseleave"]],(function(e,t,n){var r=!0,s=e.component;return"window:keyup.ArrowRight"===t&&(r=!1!==Ar(e,2).nextImage(n)&&r),"window:keyup.ArrowLeft"===t&&(r=!1!==Ar(e,2).prevImage(n)&&r),"mouseover"===t&&(r=!1!==Ar(e,2).onMouseOver()&&r),"mouseleave"===t&&(r=!1!==Ar(e,2).onMouseLeave()&&r),"configChange"===t&&(r=!1!==(s.config=n)&&r),"indexChange"===t&&(r=!1!==(s.imageIndexOne=n)&&r),"customImageEvent"===t&&(r=!1!==s.handleEvent(n)&&r),r}),zf,Df)),zr(2,638976,null,0,ad,[[2,"config"],rc],{src:[0,"src"],screenHeightOccupied:[1,"screenHeightOccupied"],index:[2,"index"],config:[3,"config"]},{indexChange:"indexChange",configChange:"configChange",customImageEvent:"customImageEvent"})],(function(e,t){var n=t.component;e(t,2,0,n.images,0,n.imageIndexOne,n.config)}),null)}function Qf(e){return Di(0,[(e()(),Si(0,0,null,null,1,"app-root",[],null,null,null,qf,Bf)),zr(1,49152,null,0,zo,[],null,null)],null,null)}var Kf=vr("app-root",zo,Qf,{},{},[]);class Wf{}var Zf=$o(Ho,[zo],(function(e){return function(e){const t={},n=[];let r=!1;for(let s=0;s(e[t.name]=t.token,e),{}))),()=>Cl),Jh(t)];var n}),[[2,Ys],Yh]),dr(512,ps,ps,[[2,ds]]),dr(131584,ni,ni,[js,ws,wt,Ue,zt,ps]),dr(1073742336,wi,wi,[ni]),dr(1073742336,pc,pc,[[3,pc]]),dr(1024,Vh,Kh,[[3,Ah]]),dr(512,Jc,Xc,[]),dr(512,Ph,Ph,[]),dr(256,$h,{},[]),dr(1024,Qo,Qh,[Bo,[2,Ko],$h]),dr(512,Wo,Wo,[Qo,Bo]),dr(512,ks,ks,[]),dr(512,si,ai,[ks,[2,ii]]),dr(1024,Eh,(function(){return[[]]}),[]),dr(1024,Ah,Zh,[ni,Jc,Ph,Wo,wt,si,ks,Eh,$h,[2,xh],[2,bh]]),dr(1073742336,Bh,Bh,[[2,Vh],[2,Ah]]),dr(1073742336,Wf,Wf,[]),dr(1073742336,Pf,Pf,[]),dr(1073742336,Of,Of,[]),dr(1073742336,Nf,Nf,[]),dr(1073742336,cd,cd,[]),dr(1073742336,Ho,Ho,[]),dr(256,_t,!0,[]),dr(256,If,"BrowserAnimations",[])])}));(function(){if(Ve)throw new Error("Cannot enable prod mode after platform setup.");$e=!1})(),hc().bootstrapModuleFactory(Zf).catch(e=>console.error(e))},zn8P:function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"}},[[0,0]]]);
\ No newline at end of file
diff --git a/docs/main-es2015.664f3166d4c0d53a6087.js.LICENSE.txt b/docs/main-es2015.664f3166d4c0d53a6087.js.LICENSE.txt
deleted file mode 100644
index 0065ecb..0000000
--- a/docs/main-es2015.664f3166d4c0d53a6087.js.LICENSE.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- * @param {?} cb
- * @return {?}
- */
-
-/**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- * @type {?}
- */
-
-/**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-/**
- * @license Angular v8.2.14
- * (c) 2010-2019 Google LLC. https://angular.io/
- * License: MIT
- */
diff --git a/docs/main-es5.664f3166d4c0d53a6087.js b/docs/main-es5.664f3166d4c0d53a6087.js
deleted file mode 100644
index 6dcfa26..0000000
--- a/docs/main-es5.664f3166d4c0d53a6087.js
+++ /dev/null
@@ -1 +0,0 @@
-function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n4&&void 0!==arguments[4]?arguments[4]:new N(e,n,r);if(!i.closed)return t instanceof w?t.subscribe(i):M(t)(i)}var j=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(p);function U(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new V(e,t))}}var V=function(){function e(t,n){_classCallCheck(this,e),this.project=t,this.thisArg=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new H(e,this.project,this.thisArg))}}]),e}(),H=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,i){var a;return _classCallCheck(this,n),(a=t.call(this,e)).project=r,a.count=0,a.thisArg=i||_assertThisInitialized(a),a}return _createClass(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(p);function z(e,t){return new w((function(n){var r=new f,i=0;return r.add(t.schedule((function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function B(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[g]}(e))return function(e,t){return new w((function(n){var r=new f;return r.add(t.schedule((function(){var i=e[g]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(F(e))return function(e,t){return new w((function(n){var r=new f;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}(e,t);if(D(e))return z(e,t);if(function(e){return e&&"function"==typeof e[O]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new w((function(n){var r,i=new f;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(t.schedule((function(){r=e[O](),i.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(a){return void n.error(a)}t?n.complete():(n.next(e),this.schedule())}})))}))),i}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof w?e:new w(M(e))}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(r){return r.pipe(q((function(n,r){return B(e(n,r)).pipe(U((function(e,i){return t(n,e,r,i)})))}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new Q(e,n))})}var Q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;_classCallCheck(this,e),this.project=t,this.concurrent=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new K(e,this.project,this.concurrent))}}]),e}(),K=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return _classCallCheck(this,n),(i=t.call(this,e)).project=r,i.concurrent=a,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return _createClass(n,[{key:"_next",value:function(e){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(j);function W(e){return e}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return q(W,e)}function G(e,t){return t?z(e,t):new w(R(e))}function $(){return function(e){return e.lift(new J(e))}}var Y,J=function(){function e(t){_classCallCheck(this,e),this.connectable=t}return _createClass(e,[{key:"call",value:function(e,t){var n=this.connectable;n._refCount++;var r=new X(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i}}]),e}(),X=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var i;return _classCallCheck(this,n),(i=t.call(this,e)).connectable=r,i}return _createClass(n,[{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}]),n}(p),ee={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(Y=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var i;return _classCallCheck(this,n),(i=t.call(this)).source=e,i.subjectFactory=r,i._refCount=0,i._isComplete=!1,i}return _createClass(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new f).add(this.source.subscribe(new te(this.getSubject(),this))),e.closed&&(this._connection=null,e=f.EMPTY)),e}},{key:"refCount",value:function(){return $()(this)}}]),n}(w).prototype)._subscribe},_isComplete:{value:Y._isComplete,writable:!0},getSubject:{value:Y.getSubject},connect:{value:Y.connect},refCount:{value:Y.refCount}},te=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var i;return _classCallCheck(this,n),(i=t.call(this,e)).connectable=r,i}return _createClass(n,[{key:"_error",value:function(e){this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(x);function ne(){return new A}function re(e,t,n){var r=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function i(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:ue.Default;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default;if(void 0===xe)throw new Error("inject() must be called from an injection context");return null===xe?function(e,t,n){var r=he(e);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&ue.Optional)return null;throw new Error("Injector: NOT_FOUND [".concat(de(e),"]"))}(e,0,t):xe.get(e,t&ue.Optional?null:void 0,t)}(e,t)}var Pe=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;if(t===Se){var n=new Error("NullInjectorError: No provider for ".concat(de(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}();function Ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var i=de(t);if(t instanceof Array)i=t.map(de).join(" -> ");else if("object"==typeof t){var a=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];a.push(o+":"+("string"==typeof s?JSON.stringify(s):de(s)))}i="{".concat(a.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(Ee,"\n "))}var Re=function e(){_classCallCheck(this,e)},Oe=function e(){_classCallCheck(this,e)};function De(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Fe(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}var Me=function(){var e={Emulated:0,Native:1,None:2,ShadowDom:3};return e[e.Emulated]="Emulated",e[e.Native]="Native",e[e.None]="None",e[e.ShadowDom]="ShadowDom",e}(),Le=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Ce);function je(e){return e.ngDebugContext}function Ue(e){return e.ngOriginalError}function Ve(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r ',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='