-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8.90c3496cbc4405b1.js
1 lines (1 loc) · 62.8 KB
/
8.90c3496cbc4405b1.js
1
"use strict";(self.webpackChunkph_encyclopedia=self.webpackChunkph_encyclopedia||[]).push([[8],{8008:(gn,We,se)=>{se.r(We),se.d(We,{AnimationDriver:()=>fs,NoopAnimationDriver:()=>ve,\u0275Animation:()=>hn,\u0275AnimationEngine:()=>Be,\u0275AnimationRenderer:()=>wt,\u0275AnimationRendererFactory:()=>mn,\u0275AnimationStyleNormalizer:()=>Ze,\u0275BaseAnimationRenderer:()=>$e,\u0275NoopAnimationStyleNormalizer:()=>Je,\u0275WebAnimationsDriver:()=>Tt,\u0275WebAnimationsPlayer:()=>Qe,\u0275WebAnimationsStyleNormalizer:()=>rt,\u0275allowPreviousPlayerStylesMerge:()=>it,\u0275camelCaseToDashCase:()=>_s,\u0275containsElement:()=>Ee,\u0275createEngine:()=>cn,\u0275getParentElement:()=>ne,\u0275invokeQuery:()=>Te,\u0275normalizeKeyframes:()=>tt,\u0275validateStyleProperty:()=>Ye,\u0275validateWebAnimatableStyleProperty:()=>cs});var d=se(9969),E=se(4438);function je(i){return new E.wOt(3e3,!1)}const os=new Set(["-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-ms-grid-columns","-ms-grid-rows","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","accent-color","all","backdrop-filter","background","background-color","background-position","background-size","block-size","border","border-block-end","border-block-end-color","border-block-end-width","border-block-start","border-block-start-color","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width","border-color","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-slice","border-image-width","border-inline-end","border-inline-end-color","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-width","border-left","border-left-color","border-left-width","border-radius","border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width","border-width","bottom","box-shadow","caret-color","clip","clip-path","color","column-count","column-gap","column-rule","column-rule-color","column-rule-width","column-width","columns","filter","flex","flex-basis","flex-grow","flex-shrink","font","font-size","font-size-adjust","font-stretch","font-variation-settings","font-weight","gap","grid-column-gap","grid-gap","grid-row-gap","grid-template-columns","grid-template-rows","height","inline-size","input-security","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","outline","outline-color","outline-offset","outline-width","padding","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","perspective","perspective-origin","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-coordinate","scroll-snap-destination","scrollbar-color","shape-image-threshold","shape-margin","shape-outside","tab-size","text-decoration","text-decoration-color","text-decoration-thickness","text-emphasis","text-emphasis-color","text-indent","text-shadow","text-underline-offset","top","transform","transform-origin","translate","vertical-align","visibility","width","word-spacing","z-index","zoom"]);function $(i){switch(i.length){case 0:return new d.sf;case 1:return i[0];default:return new d.ui(i)}}function Ge(i,e,t=new Map,s=new Map){const n=[],r=[];let a=-1,o=null;if(e.forEach(l=>{const u=l.get("offset"),c=u==a,h=c&&o||new Map;l.forEach((S,_)=>{let m=_,y=S;if("offset"!==_)switch(m=i.normalizePropertyName(m,n),y){case d.FX:y=t.get(_);break;case d.kp:y=s.get(_);break;default:y=i.normalizeStyleValue(_,m,y,n)}h.set(m,y)}),c||r.push(h),o=h,a=u}),n.length)throw function Yt(){return new E.wOt(3502,!1)}();return r}function ye(i,e,t,s){switch(e){case"start":i.onStart(()=>s(t&&_e(t,"start",i)));break;case"done":i.onDone(()=>s(t&&_e(t,"done",i)));break;case"destroy":i.onDestroy(()=>s(t&&_e(t,"destroy",i)))}}function _e(i,e,t){const r=Se(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,t.totalTime??i.totalTime,!!t.disabled),a=i._data;return null!=a&&(r._data=a),r}function Se(i,e,t,s,n="",r=0,a){return{element:i,triggerName:e,fromState:t,toState:s,phaseName:n,totalTime:r,disabled:!!a}}function O(i,e,t){let s=i.get(e);return s||i.set(e,s=t),s}function He(i){const e=i.indexOf(":");return[i.substring(1,e),i.slice(e+1)]}const ls=typeof document>"u"?null:document.documentElement;function ne(i){const e=i.parentNode||i.host||null;return e===ls?null:e}let U=null,Xe=!1;function Ye(i){U||(U=function hs(){return typeof document<"u"?document.body:null}()||{},Xe=!!U.style&&"WebkitAppearance"in U.style);let e=!0;return U.style&&!function us(i){return"ebkit"==i.substring(1,6)}(i)&&(e=i in U.style,!e&&Xe&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in U.style)),e}function cs(i){return os.has(i)}function Ee(i,e){for(;e;){if(e===i)return!0;e=ne(e)}return!1}function Te(i,e,t){if(t)return Array.from(i.querySelectorAll(e));const s=i.querySelector(e);return s?[s]:[]}let ve=(()=>{class i{validateStyleProperty(t){return Ye(t)}containsElement(t,s){return Ee(t,s)}getParentElement(t){return ne(t)}query(t,s,n){return Te(t,s,n)}computeStyle(t,s,n){return n||""}animate(t,s,n,r,a,o=[],l){return new d.sf(n,r)}static \u0275fac=function(s){return new(s||i)};static \u0275prov=E.jDH({token:i,factory:i.\u0275fac})}return i})();class fs{static NOOP=new ve}class Ze{}class Je{normalizePropertyName(e,t){return e}normalizeStyleValue(e,t,s,n){return s}}const we="ng-enter",ie="ng-leave",re="ng-trigger",ae=".ng-trigger",et="ng-animating",be=".ng-animating";function Q(i){if("number"==typeof i)return i;const e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ae(parseFloat(e[1]),e[2])}function Ae(i,e){return"s"===e?1e3*i:i}function oe(i,e,t){return i.hasOwnProperty("duration")?i:function ps(i,e,t){let n,r=0,a="";if("string"==typeof i){const o=i.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===o)return e.push(je()),{duration:0,delay:0,easing:""};n=Ae(parseFloat(o[1]),o[2]);const l=o[3];null!=l&&(r=Ae(parseFloat(l),o[4]));const u=o[5];u&&(a=u)}else n=i;if(!t){let o=!1,l=e.length;n<0&&(e.push(function Mt(){return new E.wOt(3100,!1)}()),o=!0),r<0&&(e.push(function Ct(){return new E.wOt(3101,!1)}()),o=!0),o&&e.splice(l,0,je())}return{duration:n,delay:r,easing:a}}(i,e,t)}function tt(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function st(i){return Array.isArray(i)?new Map(...i):new Map(i)}function K(i,e,t){e.forEach((s,n)=>{const r=Ne(n);t&&!t.has(n)&&t.set(n,i.style[r]),i.style[r]=s})}function W(i,e){e.forEach((t,s)=>{const n=Ne(s);i.style[n]=""})}function x(i){return Array.isArray(i)?1==i.length?i[0]:(0,d.K2)(i):i}const Pe=new RegExp("{{\\s*(.+?)\\s*}}","g");function nt(i){let e=[];if("string"==typeof i){let t;for(;t=Pe.exec(i);)e.push(t[1]);Pe.lastIndex=0}return e}function ee(i,e,t){const s=`${i}`,n=s.replace(Pe,(r,a)=>{let o=e[a];return null==o&&(t.push(function Dt(){return new E.wOt(3003,!1)}()),o=""),o.toString()});return n==s?i:n}const ys=/-+([a-z0-9])/g;function Ne(i){return i.replace(ys,(...e)=>e[1].toUpperCase())}function _s(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function it(i,e){return 0===i||0===e}function I(i,e,t){switch(e.type){case d.If.Trigger:return i.visitTrigger(e,t);case d.If.State:return i.visitState(e,t);case d.If.Transition:return i.visitTransition(e,t);case d.If.Sequence:return i.visitSequence(e,t);case d.If.Group:return i.visitGroup(e,t);case d.If.Animate:return i.visitAnimate(e,t);case d.If.Keyframes:return i.visitKeyframes(e,t);case d.If.Style:return i.visitStyle(e,t);case d.If.Reference:return i.visitReference(e,t);case d.If.AnimateChild:return i.visitAnimateChild(e,t);case d.If.AnimateRef:return i.visitAnimateRef(e,t);case d.If.Query:return i.visitQuery(e,t);case d.If.Stagger:return i.visitStagger(e,t);default:throw function Ot(){return new E.wOt(3004,!1)}()}}function Me(i,e){return window.getComputedStyle(i)[e]}const Es=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class rt extends Ze{normalizePropertyName(e,t){return Ne(e)}normalizeStyleValue(e,t,s,n){let r="";const a=s.toString().trim();if(Es.has(t)&&0!==s&&"0"!==s)if("number"==typeof s)r="px";else{const o=s.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&n.push(function It(){return new E.wOt(3005,!1)}())}return a+r}}const ue=new Set(["true","1"]),ce=new Set(["false","0"]);function at(i,e){const t=ue.has(i)||ce.has(i),s=ue.has(e)||ce.has(e);return(n,r)=>{let a="*"==i||i==n,o="*"==e||e==r;return!a&&t&&"boolean"==typeof n&&(a=n?ue.has(i):ce.has(i)),!o&&s&&"boolean"==typeof r&&(o=r?ue.has(e):ce.has(e)),a&&o}}const bs=new RegExp("s*:selfs*,?","g");function Ce(i,e,t,s){return new As(i).build(e,t,s)}class As{_driver;constructor(e){this._driver=e}build(e,t,s){const n=new Ms(t);return this._resetContextStyleTimingState(n),I(this,x(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,n=t.depCount=0;const r=[],a=[];return"@"==e.name.charAt(0)&&t.errors.push(function Rt(){return new E.wOt(3006,!1)}()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==d.If.State){const l=o,u=l.name;u.toString().split(/\s*,\s*/).forEach(c=>{l.name=c,r.push(this.visitState(l,t))}),l.name=u}else if(o.type==d.If.Transition){const l=this.visitTransition(o,t);s+=l.queryCount,n+=l.depCount,a.push(l)}else t.errors.push(function Ft(){return new E.wOt(3007,!1)}())}),{type:d.If.Trigger,name:e.name,states:r,transitions:a,queryCount:s,depCount:n,options:null}}visitState(e,t){const s=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(s.containsDynamicStyles){const r=new Set,a=n||{};s.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{nt(l).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&t.errors.push(function Lt(){return new E.wOt(3008,!1)}(0,r.values()))}return{type:d.If.State,name:e.name,style:s,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const s=I(this,x(e.animation),t),n=function Ts(i,e){const t=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(s=>function vs(i,e,t){if(":"==i[0]){const l=function ws(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s)<parseFloat(t);default:return e.push(function jt(){return new E.wOt(3016,!1)}()),"* => *"}}(i,t);if("function"==typeof l)return void e.push(l);i=l}const s=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==s||s.length<4)return t.push(function Wt(){return new E.wOt(3015,!1)}()),e;const n=s[1],r=s[2],a=s[3];e.push(at(n,a)),"<"==r[0]&&("*"!=n||"*"!=a)&&e.push(at(a,n))}(s,t,e)):t.push(i),t}(e.expr,t.errors);return{type:d.If.Transition,matchers:n,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:j(e.options)}}visitSequence(e,t){return{type:d.If.Sequence,steps:e.steps.map(s=>I(this,s,t)),options:j(e.options)}}visitGroup(e,t){const s=t.currentTime;let n=0;const r=e.steps.map(a=>{t.currentTime=s;const o=I(this,a,t);return n=Math.max(n,t.currentTime),o});return t.currentTime=n,{type:d.If.Group,steps:r,options:j(e.options)}}visitAnimate(e,t){const s=function ks(i,e){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return ke(oe(i,e).duration,0,"");const t=i;if(t.split(/\s+/).some(r=>"{"==r.charAt(0)&&"{"==r.charAt(1))){const r=ke(0,0,"");return r.dynamic=!0,r.strValue=t,r}const n=oe(t,e);return ke(n.duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=s;let n,r=e.styles?e.styles:(0,d.iF)({});if(r.type==d.If.Keyframes)n=this.visitKeyframes(r,t);else{let a=e.styles,o=!1;if(!a){o=!0;const u={};s.easing&&(u.easing=s.easing),a=(0,d.iF)(u)}t.currentTime+=s.duration+s.delay;const l=this.visitStyle(a,t);l.isEmptyStep=o,n=l}return t.currentAnimateTimings=null,{type:d.If.Animate,timings:s,style:n,options:null}}visitStyle(e,t){const s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){const s=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of n)"string"==typeof o?o===d.kp?s.push(o):t.errors.push(new E.wOt(3002,!1)):s.push(new Map(Object.entries(o)));let r=!1,a=null;return s.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!r))for(let l of o.values())if(l.toString().indexOf("{{")>=0){r=!0;break}}),{type:d.If.Style,styles:s,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){const s=t.currentAnimateTimings;let n=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(a=>{"string"!=typeof a&&a.forEach((o,l)=>{const u=t.collectedStyles.get(t.currentQuerySelector),c=u.get(l);let h=!0;c&&(r!=n&&r>=c.startTime&&n<=c.endTime&&(t.errors.push(function Kt(){return new E.wOt(3010,!1)}()),h=!1),r=c.startTime),h&&u.set(l,{startTime:r,endTime:n}),t.options&&function gs(i,e,t){const s=e.params||{},n=nt(i);n.length&&n.forEach(r=>{s.hasOwnProperty(r)||t.push(function kt(){return new E.wOt(3001,!1)}())})}(o,t.options,t.errors)})})}visitKeyframes(e,t){const s={type:d.If.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function Bt(){return new E.wOt(3011,!1)}()),s;let r=0;const a=[];let o=!1,l=!1,u=0;const c=e.steps.map(b=>{const A=this._makeStyleAst(b,t);let C=null!=A.offset?A.offset:function Cs(i){if("string"==typeof i)return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){const s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(i instanceof Map&&i.has("offset")){const t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}(A.styles),N=0;return null!=C&&(r++,N=A.offset=C),l=l||N<0||N>1,o=o||N<u,u=N,a.push(N),A});l&&t.errors.push(function qt(){return new E.wOt(3012,!1)}()),o&&t.errors.push(function Qt(){return new E.wOt(3200,!1)}());const h=e.steps.length;let S=0;r>0&&r<h?t.errors.push(function $t(){return new E.wOt(3202,!1)}()):0==r&&(S=1/(h-1));const _=h-1,m=t.currentTime,y=t.currentAnimateTimings,v=y.duration;return c.forEach((b,A)=>{const C=S>0?A==_?1:S*A:a[A],N=C*v;t.currentTime=m+y.delay+N,y.duration=N,this._validateStyleAst(b,t),b.offset=C,s.styles.push(b)}),s}visitReference(e,t){return{type:d.If.Reference,animation:I(this,x(e.animation),t),options:j(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:d.If.AnimateChild,options:j(e.options)}}visitAnimateRef(e,t){return{type:d.If.AnimateRef,animation:this.visitReference(e.animation,t),options:j(e.options)}}visitQuery(e,t){const s=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;const[r,a]=function Ps(i){const e=!!i.split(/\s*,\s*/).find(t=>":self"==t);return e&&(i=i.replace(bs,"")),i=i.replace(/@\*/g,ae).replace(/@\w+/g,t=>ae+"-"+t.slice(1)).replace(/:animating/g,be),[i,e]}(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);const o=I(this,x(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:d.If.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:j(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function Vt(){return new E.wOt(3013,!1)}());const s="full"===e.timings?{duration:0,delay:0,easing:"full"}:oe(e.timings,t.errors,!0);return{type:d.If.Stagger,animation:I(this,x(e.animation),t),timings:s,options:null}}}class Ms{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}}function j(i){return i?(i={...i}).params&&(i.params=function Ns(i){return i?{...i}:null}(i.params)):i={},i}function ke(i,e,t){return{duration:i,delay:e,easing:t}}function De(i,e,t,s,n,r,a=null,o=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:s,duration:n,delay:r,totalTime:n+r,easing:a,subTimeline:o}}class he{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const Is=new RegExp(":enter","g"),Fs=new RegExp(":leave","g");function Oe(i,e,t,s,n,r=new Map,a=new Map,o,l,u=[]){return(new Ls).buildKeyframes(i,e,t,s,n,r,a,o,l,u)}class Ls{buildKeyframes(e,t,s,n,r,a,o,l,u,c=[]){u=u||new he;const h=new Ie(e,t,u,n,r,c,[]);h.options=l;const S=l.delay?Q(l.delay):0;h.currentTimeline.delayNextStep(S),h.currentTimeline.setStyles([a],null,h.errors,l),I(this,s,h);const _=h.timelines.filter(m=>m.containsAnimation());if(_.length&&o.size){let m;for(let y=_.length-1;y>=0;y--){const v=_[y];if(v.element===t){m=v;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([o],null,h.errors,l)}return _.length?_.map(m=>m.buildKeyframes()):[De(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const s=t.subInstructions.get(t.element);if(s){const n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(s,n,n.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}visitAnimateRef(e,t){const s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(const n of e){const r=n?.delay;if(r){const a="number"==typeof r?r:Q(ee(r,n?.params??{},t.errors));s.delayNextStep(a)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime;const a=null!=s.duration?Q(s.duration):null,o=null!=s.delay?Q(s.delay):null;return 0!==a&&e.forEach(l=>{const u=t.appendInstructionToTimeline(l,a,o);r=Math.max(r,u.duration+u.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),I(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const s=t.subContextCount;let n=t;const r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),null!=r.delay)){n.previousNode.type==d.If.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=fe);const a=Q(r.delay);n.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>I(this,a,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>s&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const s=[];let n=t.currentTimeline.currentTime;const r=e.options&&e.options.delay?Q(e.options.delay):0;e.steps.forEach(a=>{const o=t.createSubContext(e.options);r&&o.delayNextStep(r),I(this,a,o),n=Math.max(n,o.currentTimeline.currentTime),s.push(o.currentTimeline)}),s.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const s=e.strValue;return oe(t.params?ee(s,t.params,t.errors):s,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const s=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),n.snapshotCurrentStyles());const r=e.style;r.type==d.If.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const s=t.currentTimeline,n=t.currentAnimateTimings;!n&&s.hasCurrentStyleProperties()&&s.forwardFrame();const r=n&&n.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const s=t.currentAnimateTimings,n=t.currentTimeline.duration,r=s.duration,o=t.createSubContext().currentTimeline;o.easing=s.easing,e.styles.forEach(l=>{o.forwardTime((l.offset||0)*r),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){const s=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?Q(n.delay):0;r&&(t.previousNode.type===d.If.Style||0==s&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=fe);let a=s;const o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((u,c)=>{t.currentQueryIndex=c;const h=t.createSubContext(e.options,u);r&&h.delayNextStep(r),u===t.element&&(l=h.currentTimeline),I(this,e.animation,h),h.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,h.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const s=t.parentContext,n=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1);let l=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=o-l;break;case"full":l=s.currentStaggerTime}const c=t.currentTimeline;l&&c.delayNextStep(l);const h=c.currentTime;I(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=n.currentTime-h+(n.startTime-s.currentTimeline.startTime)}}const fe={};class Ie{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=fe;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,s,n,r,a,o,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=n,this._leaveClassName=r,this.errors=a,this.timelines=o,this.currentTimeline=l||new de(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const s=e;let n=this.options;null!=s.duration&&(n.duration=Q(s.duration)),null!=s.delay&&(n.delay=Q(s.delay));const r=s.params;if(r){let a=n.params;a||(a=this.options.params={}),Object.keys(r).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=ee(r[o],a,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const s=e.params={};Object.keys(t).forEach(n=>{s[n]=t[n]})}}return e}createSubContext(e=null,t,s){const n=t||this.element,r=new Ie(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=fe,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){const n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new zs(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,n,r,a){let o=[];if(n&&o.push(this.element),e.length>0){e=(e=e.replace(Is,"."+this._enterClassName)).replace(Fs,"."+this._leaveClassName);let u=this._driver.query(this.element,e,1!=s);0!==s&&(u=s<0?u.slice(u.length+s,u.length):u.slice(0,s)),o.push(...u)}return!r&&0==o.length&&a.push(function Ut(){return new E.wOt(3014,!1)}()),o}}class de{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,s,n){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),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.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new de(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=new Map,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.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||d.kp),this._currentKeyframe.set(t,d.kp);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,n){t&&this._previousKeyframe.set("easing",t);const r=n&&n.params||{},a=function Ks(i,e){const t=new Map;let s;return i.forEach(n=>{if("*"===n){s??=e.keys();for(let r of s)t.set(r,d.kp)}else for(let[r,a]of n)t.set(r,a)}),t}(e,this._globalTimelineStyles);for(let[o,l]of a){const u=ee(l,r,s);this._pendingStyles.set(o,u),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??d.kp),this._updateStyle(o,u)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(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){e._styleSummary.forEach((t,s)=>{const n=this._styleSummary.get(s);(!n||t.time>n.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,s=1===this._keyframes.size&&0===this.duration;let n=[];this._keyframes.forEach((o,l)=>{const u=new Map([...this._backFill,...o]);u.forEach((c,h)=>{c===d.FX?e.add(h):c===d.kp&&t.add(h)}),s||u.set("offset",l/this.duration),n.push(u)});const r=[...e.values()],a=[...t.values()];if(s){const o=n[0],l=new Map(o);o.set("offset",0),l.set("offset",1),n=[o,l]}return De(this.element,n,r,a,this.duration,this.startTime,this.easing,!1)}}class zs extends de{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,s,n,r,a,o=!1){super(e,t,a.delay),this.keyframes=s,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){const r=[],a=s+t,o=t/a,l=new Map(e[0]);l.set("offset",0),r.push(l);const u=new Map(e[0]);u.set("offset",ut(o)),r.push(u);const c=e.length-1;for(let h=1;h<=c;h++){let S=new Map(e[h]);const _=S.get("offset");S.set("offset",ut((t+_*s)/a)),r.push(S)}s=a,t=0,n="",e=r}return De(this.element,e,this.preStyleProps,this.postStyleProps,s,t,n,!0)}}function ut(i,e=3){const t=Math.pow(10,e-1);return Math.round(i*t)/t}function ct(i,e,t,s,n,r,a,o,l,u,c,h,S){return{type:0,element:i,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:r,toState:s,toStyles:a,timelines:o,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:S}}const Re={};class ht{_triggerName;ast;_stateStyles;constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,n){return function Bs(i,e,t,s,n){return i.some(r=>r(e,t,s,n))}(this.ast.matchers,e,t,s,n)}buildStyles(e,t,s){let n=this._stateStyles.get("*");return void 0!==e&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,s):new Map}build(e,t,s,n,r,a,o,l,u,c){const h=[],S=this.ast.options&&this.ast.options.params||Re,m=this.buildStyles(s,o&&o.params||Re,h),y=l&&l.params||Re,v=this.buildStyles(n,y,h),b=new Set,A=new Map,C=new Map,N="void"===n,Z={params:ft(y,S),delay:this.ast.options?.delay},B=c?[]:Oe(e,t,this.ast.animation,r,a,m,v,Z,u,h);let k=0;return B.forEach(D=>{k=Math.max(D.duration+D.delay,k)}),h.length?ct(t,this._triggerName,s,n,N,m,v,[],[],A,C,k,h):(B.forEach(D=>{const G=D.element,J=O(A,G,new Set);D.preStyleProps.forEach(H=>J.add(H));const bt=O(C,G,new Set);D.postStyleProps.forEach(H=>bt.add(H)),G!==t&&b.add(G)}),ct(t,this._triggerName,s,n,N,m,v,B,[...b.values()],A,C,k))}}function ft(i,e){const t={...e};return Object.entries(i).forEach(([s,n])=>{null!=n&&(t[s]=n)}),t}class qs{styles;defaultParams;normalizer;constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){const s=new Map,n=ft(e,this.defaultParams);return this.styles.styles.forEach(r=>{"string"!=typeof r&&r.forEach((a,o)=>{a&&(a=ee(a,n,t));const l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),s.set(o,a)})}),s}}class $s{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,t.states.forEach(n=>{this.states.set(n.name,new qs(n.style,n.options&&n.options.params||{},s))}),dt(this.states,"true","1"),dt(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new ht(e,n,this.states))}),this.fallbackTransition=function Vs(i,e){return new ht(i,{type:d.If.Transition,animation:{type:d.If.Sequence,steps:[],options:null},matchers:[(a,o)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,n){return this.transitionFactories.find(a=>a.match(e,t,s,n))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}}function dt(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}const Us=new he;class Ws{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s}register(e,t){const s=[],r=Ce(this._driver,t,s,[]);if(s.length)throw function Zt(){return new E.wOt(3503,!1)}();this._animations.set(e,r)}_buildPlayer(e,t,s){const n=e.element,r=Ge(this._normalizer,e.keyframes,t,s);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){const n=[],r=this._animations.get(e);let a;const o=new Map;if(r?(a=Oe(this._driver,t,r,we,ie,new Map,new Map,s,Us,n),a.forEach(c=>{const h=O(o,c.element,new Map);c.postStyleProps.forEach(S=>h.set(S,null))})):(n.push(function Jt(){return new E.wOt(3300,!1)}()),a=[]),n.length)throw function xt(){return new E.wOt(3504,!1)}();o.forEach((c,h)=>{c.forEach((S,_)=>{c.set(_,this._driver.computeStyle(h,_,d.kp))})});const u=$(a.map(c=>{const h=o.get(c.element);return this._buildPlayer(c,new Map,h)}));return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){const t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);const s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){const t=this._playersById.get(e);if(!t)throw function es(){return new E.wOt(3301,!1)}();return t}listen(e,t,s,n){const r=Se(t,"","","");return ye(this._getPlayer(e),s,r,n),()=>{}}command(e,t,s,n){if("register"==s)return void this.register(e,n[0]);if("create"==s)return void this.create(e,t,n[0]||{});const r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e)}}}const mt="ng-animate-queued",Fe="ng-animate-disabled",Ys=[],pt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Zs={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},z="__ng_removed";class Le{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;const s=e&&e.hasOwnProperty("value");if(this.value=function tn(i){return i??null}(s?e.value:e),s){const{value:r,...a}=e;this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){const t=e.params;if(t){const s=this.options.params;Object.keys(t).forEach(n=>{null==s[n]&&(s[n]=t[n])})}}}const te="void",ze=new Le(te);class Js{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this._hostClassName="ng-tns-"+e,F(t,this._hostClassName)}listen(e,t,s,n){if(!this._triggers.has(t))throw function ts(){return new E.wOt(3302,!1)}();if(null==s||0==s.length)throw function ss(){return new E.wOt(3303,!1)}();if(!function sn(i){return"start"==i||"done"==i}(s))throw function ns(){return new E.wOt(3400,!1)}();const r=O(this._elementListeners,e,[]),a={name:t,phase:s,callback:n};r.push(a);const o=O(this._engine.statesByElement,e,new Map);return o.has(t)||(F(e,re),F(e,re+"-"+t),o.set(t,ze)),()=>{this._engine.afterFlush(()=>{const l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(t)||o.delete(t)})}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){const t=this._triggers.get(e);if(!t)throw function is(){return new E.wOt(3401,!1)}();return t}trigger(e,t,s,n=!0){const r=this._getTrigger(t),a=new Ke(this.id,t,e);let o=this._engine.statesByElement.get(e);o||(F(e,re),F(e,re+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t);const u=new Le(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),o.set(t,u),l||(l=ze),u.value!==te&&l.value===u.value){if(!function an(i,e){const t=Object.keys(i),s=Object.keys(e);if(t.length!=s.length)return!1;for(let n=0;n<t.length;n++){const r=t[n];if(!e.hasOwnProperty(r)||i[r]!==e[r])return!1}return!0}(l.params,u.params)){const y=[],v=r.matchStyles(l.value,l.params,y),b=r.matchStyles(u.value,u.params,y);y.length?this._engine.reportError(y):this._engine.afterFlush(()=>{W(e,v),K(e,b)})}return}const S=O(this._engine.playersByElement,e,[]);S.forEach(y=>{y.namespaceId==this.id&&y.triggerName==t&&y.queued&&y.destroy()});let _=r.matchTransition(l.value,u.value,e,u.params),m=!1;if(!_){if(!n)return;_=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:_,fromState:l,toState:u,player:a,isFallbackTransition:m}),m||(F(e,mt),a.onStart(()=>{Y(e,mt)})),a.onDone(()=>{let y=this.players.indexOf(a);y>=0&&this.players.splice(y,1);const v=this._engine.playersByElement.get(e);if(v){let b=v.indexOf(a);b>=0&&v.splice(b,1)}}),this.players.push(a),S.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const s=this._engine.driver.query(e,ae,!0);s.forEach(n=>{if(n[z])return;const r=this._engine.fetchNamespacesByElement(n);r.size?r.forEach(a=>a.triggerLeaveAnimation(n,t,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,t,s,n){const r=this._engine.statesByElement.get(e),a=new Map;if(r){const o=[];if(r.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){const c=this.trigger(e,u,te,n);c&&o.push(c)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,a),s&&$(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){const n=new Set;t.forEach(r=>{const a=r.name;if(n.has(a))return;n.add(a);const l=this._triggers.get(a).fallbackTransition,u=s.get(a)||ze,c=new Le(te),h=new Ke(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:u,toState:c,player:h,isFallbackTransition:!0})})}}removeNode(e,t){const s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(s.totalAnimations){const r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)n=!0;else{let a=e;for(;a=a.parentNode;)if(s.statesByElement.get(a)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)s.markElementAsRemoved(this.id,e,!1,t);else{const r=e[z];(!r||r===pt)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){F(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(s=>{const n=s.player;if(n.destroyed)return;const r=s.element,a=this._elementListeners.get(r);a&&a.forEach(o=>{if(o.name==s.triggerName){const l=Se(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,ye(s.player,o.phase,l,o.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):t.push(s)}),this._queue=[],t.sort((s,n)=>{const r=s.transition.ast.depCount,a=n.transition.ast.depCount;return 0==r||0==a?r-a:this._engine.driver.containsElement(s.element,n.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}}class xs{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){const s=new Js(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){const s=this._namespaceList,n=this.namespacesByHostElement;if(s.length-1>=0){let a=!1,o=this.driver.getParentElement(t);for(;o;){const l=n.get(o);if(l){const u=s.indexOf(l);s.splice(u+1,0,e),a=!0;break}o=this.driver.getParentElement(o)}a||s.unshift(e)}else s.push(e);return n.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let n=this._namespaceLookup[e];n&&n.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);const n=this._namespaceList.indexOf(s);n>=0&&this._namespaceList.splice(n,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,s=this.statesByElement.get(e);if(s)for(let n of s.values())if(n.namespaceId){const r=this._fetchNamespace(n.namespaceId);r&&t.add(r)}return t}trigger(e,t,s,n){if(me(t)){const r=this._fetchNamespace(e);if(r)return r.trigger(t,s,n),!0}return!1}insertNode(e,t,s,n){if(!me(t))return;const r=t[z];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){const a=this._fetchNamespace(e);a&&a.insertNode(t,s)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),F(e,Fe)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Y(e,Fe))}removeNode(e,t,s){if(me(t)){const n=e?this._fetchNamespace(e):null;n?n.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);const r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,n,r){this.collectedLeaveElements.push(t),t[z]={namespaceId:e,setForRemoval:n,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,n,r){return me(t)?this._fetchNamespace(e).listen(t,s,n,r):()=>{}}_buildInstruction(e,t,s,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,ae,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,be,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return $(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[z];if(t&&t.setForRemoval){if(e[z]=pt,t.namespaceId){this.destroyInnerAnimations(e);const s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Fe)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,n)=>this._balanceNamespaceList(s,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;s<this.collectedEnterElements.length;s++)F(this.collectedEnterElements[s],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const s=[];try{t=this._flushAnimations(s,e)}finally{for(let n=0;n<s.length;n++)s[n]()}}else for(let s=0;s<this.collectedLeaveElements.length;s++)this.processLeaveNode(this.collectedLeaveElements[s]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(s=>s()),this._flushFns=[],this._whenQuietFns.length){const s=this._whenQuietFns;this._whenQuietFns=[],t.length?$(t).onDone(()=>{s.forEach(n=>n())}):s.forEach(n=>n())}}reportError(e){throw function rs(){return new E.wOt(3402,!1)}()}_flushAnimations(e,t){const s=new he,n=[],r=new Map,a=[],o=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach(f=>{c.add(f);const p=this.driver.query(f,".ng-animate-queued",!0);for(let g=0;g<p.length;g++)c.add(p[g])});const h=this.bodyNode,S=Array.from(this.statesByElement.keys()),_=_t(S,this.collectedEnterElements),m=new Map;let y=0;_.forEach((f,p)=>{const g=we+y++;m.set(p,g),f.forEach(T=>F(T,g))});const v=[],b=new Set,A=new Set;for(let f=0;f<this.collectedLeaveElements.length;f++){const p=this.collectedLeaveElements[f],g=p[z];g&&g.setForRemoval&&(v.push(p),b.add(p),g.hasAnimation?this.driver.query(p,".ng-star-inserted",!0).forEach(T=>b.add(T)):A.add(p))}const C=new Map,N=_t(S,Array.from(b));N.forEach((f,p)=>{const g=ie+y++;C.set(p,g),f.forEach(T=>F(T,g))}),e.push(()=>{_.forEach((f,p)=>{const g=m.get(p);f.forEach(T=>Y(T,g))}),N.forEach((f,p)=>{const g=C.get(p);f.forEach(T=>Y(T,g))}),v.forEach(f=>{this.processLeaveNode(f)})});const Z=[],B=[];for(let f=this._namespaceList.length-1;f>=0;f--)this._namespaceList[f].drainQueuedTransitions(t).forEach(g=>{const T=g.player,P=g.element;if(Z.push(T),this.collectedEnterElements.length){const M=P[z];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(g.triggerName)){const X=M.previousTriggersValues.get(g.triggerName),L=this.statesByElement.get(g.element);if(L&&L.has(g.triggerName)){const ge=L.get(g.triggerName);ge.value=X,L.set(g.triggerName,ge)}}return void T.destroy()}}const q=!h||!this.driver.containsElement(h,P),R=C.get(P),V=m.get(P),w=this._buildInstruction(g,s,V,R,q);if(w.errors&&w.errors.length)return void B.push(w);if(q)return T.onStart(()=>W(P,w.fromStyles)),T.onDestroy(()=>K(P,w.toStyles)),void n.push(T);if(g.isFallbackTransition)return T.onStart(()=>W(P,w.fromStyles)),T.onDestroy(()=>K(P,w.toStyles)),void n.push(T);const Nt=[];w.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||Nt.push(M)}),w.timelines=Nt,s.append(P,w.timelines),a.push({instruction:w,player:T,element:P}),w.queriedElements.forEach(M=>O(o,M,[]).push(T)),w.preStyleProps.forEach((M,X)=>{if(M.size){let L=l.get(X);L||l.set(X,L=new Set),M.forEach((ge,Ue)=>L.add(Ue))}}),w.postStyleProps.forEach((M,X)=>{let L=u.get(X);L||u.set(X,L=new Set),M.forEach((ge,Ue)=>L.add(Ue))})});if(B.length){const f=[];B.forEach(p=>{f.push(function as(){return new E.wOt(3505,!1)}())}),Z.forEach(p=>p.destroy()),this.reportError(f)}const k=new Map,D=new Map;a.forEach(f=>{const p=f.element;s.has(p)&&(D.set(p,p),this._beforeAnimationBuild(f.player.namespaceId,f.instruction,k))}),n.forEach(f=>{const p=f.element;this._getPreviousPlayers(p,!1,f.namespaceId,f.triggerName,null).forEach(T=>{O(k,p,[]).push(T),T.destroy()})});const G=v.filter(f=>Et(f,l,u)),J=new Map;yt(J,this.driver,A,u,d.kp).forEach(f=>{Et(f,l,u)&&G.push(f)});const H=new Map;_.forEach((f,p)=>{yt(H,this.driver,new Set(f),l,d.FX)}),G.forEach(f=>{const p=J.get(f),g=H.get(f);J.set(f,new Map([...p?.entries()??[],...g?.entries()??[]]))});const Ve=[],At=[],Pt={};a.forEach(f=>{const{element:p,player:g,instruction:T}=f;if(s.has(p)){if(c.has(p))return g.onDestroy(()=>K(p,T.toStyles)),g.disabled=!0,g.overrideTotalTime(T.totalTime),void n.push(g);let P=Pt;if(D.size>1){let R=p;const V=[];for(;R=R.parentNode;){const w=D.get(R);if(w){P=w;break}V.push(R)}V.forEach(w=>D.set(w,P))}const q=this._buildAnimation(g.namespaceId,T,k,r,H,J);if(g.setRealPlayer(q),P===Pt)Ve.push(g);else{const R=this.playersByElement.get(P);R&&R.length&&(g.parentPlayer=$(R)),n.push(g)}}else W(p,T.fromStyles),g.onDestroy(()=>K(p,T.toStyles)),At.push(g),c.has(p)&&n.push(g)}),At.forEach(f=>{const p=r.get(f.element);if(p&&p.length){const g=$(p);f.setRealPlayer(g)}}),n.forEach(f=>{f.parentPlayer?f.syncPlayerEvents(f.parentPlayer):f.destroy()});for(let f=0;f<v.length;f++){const p=v[f],g=p[z];if(Y(p,ie),g&&g.hasAnimation)continue;let T=[];if(o.size){let q=o.get(p);q&&q.length&&T.push(...q);let R=this.driver.query(p,be,!0);for(let V=0;V<R.length;V++){let w=o.get(R[V]);w&&w.length&&T.push(...w)}}const P=T.filter(q=>!q.destroyed);P.length?nn(this,p,P):this.processLeaveNode(p)}return v.length=0,Ve.forEach(f=>{this.players.push(f),f.onDone(()=>{f.destroy();const p=this.players.indexOf(f);this.players.splice(p,1)}),f.play()}),Ve}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,n,r){let a=[];if(t){const o=this.playersByQueriedElement.get(e);o&&(a=o)}else{const o=this.playersByElement.get(e);if(o){const l=!r||r==te;o.forEach(u=>{u.queued||!l&&u.triggerName!=n||a.push(u)})}}return(s||n)&&(a=a.filter(o=>!(s&&s!=o.namespaceId||n&&n!=o.triggerName))),a}_beforeAnimationBuild(e,t,s){const r=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const u=l.element,c=u!==r,h=O(s,u,[]);this._getPreviousPlayers(u,c,a,o,t.toState).forEach(_=>{const m=_.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),_.destroy(),h.push(_)})}W(r,t.fromStyles)}_buildAnimation(e,t,s,n,r,a){const o=t.triggerName,l=t.element,u=[],c=new Set,h=new Set,S=t.timelines.map(m=>{const y=m.element;c.add(y);const v=y[z];if(v&&v.removedBeforeQueried)return new d.sf(m.duration,m.delay);const b=y!==l,A=function rn(i){const e=[];return St(i,e),e}((s.get(y)||Ys).map(k=>k.getRealPlayer())).filter(k=>!!k.element&&k.element===y),C=r.get(y),N=a.get(y),Z=Ge(this._normalizer,m.keyframes,C,N),B=this._buildPlayer(m,Z,A);if(m.subTimeline&&n&&h.add(y),b){const k=new Ke(e,o,y);k.setRealPlayer(B),u.push(k)}return B});u.forEach(m=>{O(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function en(i,e,t){let s=i.get(e);if(s){if(s.length){const n=s.indexOf(t);s.splice(n,1)}0==s.length&&i.delete(e)}return s}(this.playersByQueriedElement,m.element,m))}),c.forEach(m=>F(m,et));const _=$(S);return _.onDestroy(()=>{c.forEach(m=>Y(m,et)),K(l,t.toStyles)}),h.forEach(m=>{O(n,m,[]).push(_)}),_}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new d.sf(e.duration,e.delay)}}class Ke{namespaceId;triggerName;element;_player=new d.sf;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(n=>ye(e,s,void 0,n))}),this._queuedCallbacks.clear(),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){O(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 me(i){return i&&1===i.nodeType}function gt(i,e){const t=i.style.display;return i.style.display=e??"none",t}function yt(i,e,t,s,n){const r=[];t.forEach(l=>r.push(gt(l)));const a=[];s.forEach((l,u)=>{const c=new Map;l.forEach(h=>{const S=e.computeStyle(u,h,n);c.set(h,S),(!S||0==S.length)&&(u[z]=Zs,a.push(u))}),i.set(u,c)});let o=0;return t.forEach(l=>gt(l,r[o++])),a}function _t(i,e){const t=new Map;if(i.forEach(o=>t.set(o,[])),0==e.length)return t;const n=new Set(e),r=new Map;function a(o){if(!o)return 1;let l=r.get(o);if(l)return l;const u=o.parentNode;return l=t.has(u)?u:n.has(u)?1:a(u),r.set(o,l),l}return e.forEach(o=>{const l=a(o);1!==l&&t.get(l).push(o)}),t}function F(i,e){i.classList?.add(e)}function Y(i,e){i.classList?.remove(e)}function nn(i,e,t){$(t).onDone(()=>i.processLeaveNode(e))}function St(i,e){for(let t=0;t<i.length;t++){const s=i[t];s instanceof d.ui?St(s.players,e):e.push(s)}}function Et(i,e,t){const s=t.get(i);if(!s)return!1;let n=e.get(i);return n?s.forEach(r=>n.add(r)):e.set(i,s),t.delete(i),!0}class Be{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,s){this._driver=t,this._normalizer=s,this._transitionEngine=new xs(e.body,t,s),this._timelineEngine=new Ws(e.body,t,s),this._transitionEngine.onRemovalComplete=(n,r)=>this.onRemovalComplete(n,r)}registerTrigger(e,t,s,n,r){const a=e+"-"+n;let o=this._triggerCache[a];if(!o){const l=[],c=Ce(this._driver,r,l,[]);if(l.length)throw function Xt(){return new E.wOt(3404,!1)}();o=function Qs(i,e,t){return new $s(i,e,t)}(n,c,this._normalizer),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,n,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,n){this._transitionEngine.insertNode(e,t,s,n)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,n){if("@"==s.charAt(0)){const[r,a]=He(s);this._timelineEngine.command(r,t,a,n)}else this._transitionEngine.trigger(e,t,s,n)}listen(e,t,s,n,r){if("@"==s.charAt(0)){const[a,o]=He(s);return this._timelineEngine.listen(a,t,o,r)}return this._transitionEngine.listen(e,t,s,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}}let ln=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,s,n){this._element=t,this._startStyles=s,this._endStyles=n;let r=i.initialStylesByElement.get(t);r||i.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&K(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(K(this._element,this._initialStyles),this._endStyles&&(K(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),K(this._element,this._initialStyles),this._state=3)}}return i})();function qe(i){let e=null;return i.forEach((t,s)=>{(function un(i){return"display"===i||"position"===i})(s)&&(e=e||new Map,e.set(s,t))}),e}class Qe{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,s,n){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=n,this._duration=s.duration,this._delay=s.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]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){const t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){return e.animate(this._convertKeyframesToObject(t),s)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(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,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_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){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,n)=>{"offset"!==n&&e.set(n,this._finished?s:Me(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){const t="start"===e?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}}class Tt{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Ee(e,t)}getParentElement(e){return ne(e)}query(e,t,s){return Te(e,t,s)}computeStyle(e,t,s){return Me(e,t)}animate(e,t,s,n,r,a=[]){const l={duration:s,delay:n,fill:0==n?"both":"forwards"};r&&(l.easing=r);const u=new Map,c=a.filter(_=>_ instanceof Qe);it(s,n)&&c.forEach(_=>{_.currentSnapshot.forEach((m,y)=>u.set(y,m))});let h=tt(t).map(_=>new Map(_));h=function Ss(i,e,t){if(t.size&&e.length){let s=e[0],n=[];if(t.forEach((r,a)=>{s.has(a)||n.push(a),s.set(a,r)}),n.length)for(let r=1;r<e.length;r++){let a=e[r];n.forEach(o=>a.set(o,Me(i,o)))}}return e}(e,h,u);const S=function on(i,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=qe(e[0]),e.length>1&&(s=qe(e[e.length-1]))):e instanceof Map&&(t=qe(e)),t||s?new ln(i,t,s):null}(e,h);return new Qe(e,h,l,S)}}function cn(i,e){return"noop"===i?new Be(e,new ve,new Je):new Be(e,new Tt,new rt)}class hn{_driver;_animationAst;constructor(e,t){this._driver=e;const s=[],r=Ce(e,t,s,[]);if(s.length)throw function Gt(){return new E.wOt(3500,!1)}();this._animationAst=r}buildTimelines(e,t,s,n,r){const a=Array.isArray(t)?st(t):t,o=Array.isArray(s)?st(s):s,l=[];r=r||new he;const u=Oe(this._driver,e,this._animationAst,we,ie,a,o,n,r,l);if(l.length)throw function Ht(){return new E.wOt(3501,!1)}();return u}}const vt="@.disabled";class $e{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,s,n){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}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,s,n=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,s){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}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,s,n){this.delegate.setAttribute(e,t,s,n)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,n){this.delegate.setStyle(e,t,s,n)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){"@"==t.charAt(0)&&t==vt?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s){return this.delegate.listen(e,t,s)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class wt extends $e{factory;constructor(e,t,s,n,r){super(t,s,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){"@"==t.charAt(0)?"."==t.charAt(1)&&t==vt?this.disableAnimations(e,s=void 0===s||!!s):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s){if("@"==t.charAt(0)){const n=function fn(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}(e);let r=t.slice(1),a="";return"@"!=r.charAt(0)&&([r,a]=function dn(i){const e=i.indexOf(".");return[i.substring(0,e),i.slice(e+1)]}(r)),this.engine.listen(this.namespaceId,n,r,a,o=>{this.factory.scheduleListenerCallback(o._data||-1,s,o)})}return this.delegate.listen(e,t,s)}}class mn{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,t.onRemovalComplete=(n,r)=>{r?.removeChild(null,n)}}createRenderer(e,t){const n=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){const u=this._rendererCache;let c=u.get(n);return c||(c=new $e("",n,this.engine,()=>u.delete(n)),u.set(n,c)),c}const r=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const o=u=>{Array.isArray(u)?u.forEach(o):this.engine.registerTrigger(r,a,e,u.name,u)};return t.data.animation.forEach(o),new wt(this,a,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&e<this._microtaskId)return void this._zone.run(()=>t(s));const n=this._animationCallbacksBuffer;0==n.length&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(r=>{const[a,o]=r;a(o)}),this._animationCallbacksBuffer=[]})}),n.push([t,s])}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()}componentReplaced(e){this.delegate.componentReplaced?.(e)}}}}]);