@veltdev/sdk
Version:
Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.
35 lines (34 loc) • 318 kB
JavaScript
var SNIPPYLY_VERSION = '6.0.0-beta.14';
Promise.allSettled||(Promise.allSettled=function(t){return Promise.all(t.map(function(r){return Promise.resolve(r).then(function(e){return{status:"fulfilled",value:e}}).catch(function(e){return{status:"rejected",reason:e}})}))});
import{a as Ms}from"./chunk-LCAQRCEE.js";import{d as T}from"./chunk-H34UA5UO.js";import{a as Ps}from"./chunk-7V6EXNCB.js";import{b as Oo,d as re}from"./chunk-FX3FOBZV.js";import"./chunk-RRHXMXZH.js";import{a as qo,d as Bo}from"./chunk-JP3HOBZL.js";import"./chunk-IN7LJXNX.js";import"./chunk-FHPKMTSO.js";import{d as So}from"./chunk-KEET32BV.js";import{d as Yo}from"./chunk-BDHZZGJO.js";import"./chunk-BWEYL3QS.js";import"./chunk-6YXU2Y3T.js";import"./chunk-O76AOF76.js";import{b as As,c as Rs,j as ks,q as di,t as xs}from"./chunk-BACKCNIG.js";import"./chunk-JFNRCHYR.js";import{l as Vo,m as Go,o as $o,r as Qo,s as Xo,u as Jo,v as Zo,w as es}from"./chunk-U4YN7DB7.js";import{a as ui}from"./chunk-ZATQYC4Y.js";import{a as Ds}from"./chunk-3HGEDPEP.js";import"./chunk-JDLRIKAZ.js";import{A as xe,B as Se,a as Ye,b as si,c as fs,d as ct,e as vs,f as ai,g as li,h as ci,i as Rt,j as ys,k as _s,l as Cs,m as bs,n as Es,t as Ss,u as Ts,v as Os,w as Is,x as Pr}from"./chunk-3J52NZMN.js";import{a as gs}from"./chunk-4ACOV475.js";import{a as Ke,b as De,c as kt,d as hi}from"./chunk-WTYACTR5.js";import{a as Pe}from"./chunk-6E3N35RF.js";import{a as dt}from"./chunk-KEM6PWSD.js";import{a as xr}from"./chunk-UJRDSNTY.js";import{I as ii,M as Wo,S as Et,ba as Ko,ca as Z,ea as At,l as Co,o as bo,p as Eo,v as To,y as Dr}from"./chunk-KU45CEXD.js";import{$ as le,$b as ke,Aa as lo,Ab as Ve,Af as ns,Bb as Ge,Bd as Do,Bi as ms,Ca as co,Cd as xo,Cf as ni,Da as ho,Db as Kt,Dd as Po,E as to,Eb as Xt,Ee as A,Fa as X,Fb as Jt,Fc as Zt,Fi as ps,Ga as uo,Gc as $e,Gd as Mo,Ha as Er,Hd as No,Ib as Tr,Id as wo,Ie as ri,J as io,Je as rs,Kb as _t,Kd as Lo,Ke as Tt,L as ro,Lc as bt,Na as mo,Nb as je,Ob as Or,Pa as R,Pb as Ct,Pd as Fo,Qc as ei,Qd as zo,Rc as fo,Rd as Uo,Sc as vo,Tc as ti,Td as jo,Ua as j,Ud as Ho,Va as Re,Vc as yo,Vd as St,Wc as _o,Wd as Qe,Ya as Sr,Z as I,_a as ge,_b as Ir,a as k,aa as Ae,ac as po,b as G,ba as no,be as ts,c as Kn,ca as U,cc as Ar,ci as Ot,d as ml,da as Fe,db as Ue,di as l,e as jt,ei as B,f as Xn,fb as qe,fi as as,g as L,gb as Be,gi as ls,ha as st,i as Wt,ia as at,ig as os,ja as Ht,ji as oi,kc as We,l as Jn,la as be,lb as W,lc as He,li as fe,m as M,ma as Cr,mb as $,md as Io,mi as ie,nb as te,oa as oo,ob as J,oe as C,pc as Rr,qa as so,qc as go,r as x,re as is,rh as ss,sb as Qt,tb as Yt,ua as $t,ui as cs,v as Zn,va as ao,vb as lt,vh as g,vi as ds,w as eo,wa as ze,wi as hs,xb as Ee,xc as kr,xd as Ao,xi as us,yd as Ro,yi as D,za as br,zb as q,zd as ko,zi as It}from"./chunk-GR3NESUB.js";var jn=ml((fv,Gn)=>{"use strict";var p={};p.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};p.localCName=p.generateIdentifier();p.splitLines=function(r){return r.trim().split(`
`).map(e=>e.trim())};p.splitSections=function(r){return r.split(`
m=`).map((t,i)=>(i>0?"m="+t:t).trim()+`\r
`)};p.getDescription=function(r){let e=p.splitSections(r);return e&&e[0]};p.getMediaSections=function(r){let e=p.splitSections(r);return e.shift(),e};p.matchPrefix=function(r,e){return p.splitLines(r).filter(t=>t.indexOf(e)===0)};p.parseCandidate=function(r){let e;r.indexOf("a=candidate:")===0?e=r.substring(12).split(" "):e=r.substring(10).split(" ");let t={foundation:e[0],component:{1:"rtp",2:"rtcp"}[e[1]]||e[1],protocol:e[2].toLowerCase(),priority:parseInt(e[3],10),ip:e[4],address:e[4],port:parseInt(e[5],10),type:e[7]};for(let i=8;i<e.length;i+=2)switch(e[i]){case"raddr":t.relatedAddress=e[i+1];break;case"rport":t.relatedPort=parseInt(e[i+1],10);break;case"tcptype":t.tcpType=e[i+1];break;case"ufrag":t.ufrag=e[i+1],t.usernameFragment=e[i+1];break;default:t[e[i]]===void 0&&(t[e[i]]=e[i+1]);break}return t};p.writeCandidate=function(r){let e=[];e.push(r.foundation);let t=r.component;t==="rtp"?e.push(1):t==="rtcp"?e.push(2):e.push(t),e.push(r.protocol.toUpperCase()),e.push(r.priority),e.push(r.address||r.ip),e.push(r.port);let i=r.type;return e.push("typ"),e.push(i),i!=="host"&&r.relatedAddress&&r.relatedPort&&(e.push("raddr"),e.push(r.relatedAddress),e.push("rport"),e.push(r.relatedPort)),r.tcpType&&r.protocol.toLowerCase()==="tcp"&&(e.push("tcptype"),e.push(r.tcpType)),(r.usernameFragment||r.ufrag)&&(e.push("ufrag"),e.push(r.usernameFragment||r.ufrag)),"candidate:"+e.join(" ")};p.parseIceOptions=function(r){return r.substring(14).split(" ")};p.parseRtpMap=function(r){let e=r.substring(9).split(" "),t={payloadType:parseInt(e.shift(),10)};return e=e[0].split("/"),t.name=e[0],t.clockRate=parseInt(e[1],10),t.channels=e.length===3?parseInt(e[2],10):1,t.numChannels=t.channels,t};p.writeRtpMap=function(r){let e=r.payloadType;r.preferredPayloadType!==void 0&&(e=r.preferredPayloadType);let t=r.channels||r.numChannels||1;return"a=rtpmap:"+e+" "+r.name+"/"+r.clockRate+(t!==1?"/"+t:"")+`\r
`};p.parseExtmap=function(r){let e=r.substring(9).split(" ");return{id:parseInt(e[0],10),direction:e[0].indexOf("/")>0?e[0].split("/")[1]:"sendrecv",uri:e[1],attributes:e.slice(2).join(" ")}};p.writeExtmap=function(r){return"a=extmap:"+(r.id||r.preferredId)+(r.direction&&r.direction!=="sendrecv"?"/"+r.direction:"")+" "+r.uri+(r.attributes?" "+r.attributes:"")+`\r
`};p.parseFmtp=function(r){let e={},t,i=r.substring(r.indexOf(" ")+1).split(";");for(let n=0;n<i.length;n++)t=i[n].trim().split("="),e[t[0].trim()]=t[1];return e};p.writeFmtp=function(r){let e="",t=r.payloadType;if(r.preferredPayloadType!==void 0&&(t=r.preferredPayloadType),r.parameters&&Object.keys(r.parameters).length){let i=[];Object.keys(r.parameters).forEach(n=>{r.parameters[n]!==void 0?i.push(n+"="+r.parameters[n]):i.push(n)}),e+="a=fmtp:"+t+" "+i.join(";")+`\r
`}return e};p.parseRtcpFb=function(r){let e=r.substring(r.indexOf(" ")+1).split(" ");return{type:e.shift(),parameter:e.join(" ")}};p.writeRtcpFb=function(r){let e="",t=r.payloadType;return r.preferredPayloadType!==void 0&&(t=r.preferredPayloadType),r.rtcpFeedback&&r.rtcpFeedback.length&&r.rtcpFeedback.forEach(i=>{e+="a=rtcp-fb:"+t+" "+i.type+(i.parameter&&i.parameter.length?" "+i.parameter:"")+`\r
`}),e};p.parseSsrcMedia=function(r){let e=r.indexOf(" "),t={ssrc:parseInt(r.substring(7,e),10)},i=r.indexOf(":",e);return i>-1?(t.attribute=r.substring(e+1,i),t.value=r.substring(i+1)):t.attribute=r.substring(e+1),t};p.parseSsrcGroup=function(r){let e=r.substring(13).split(" ");return{semantics:e.shift(),ssrcs:e.map(t=>parseInt(t,10))}};p.getMid=function(r){let e=p.matchPrefix(r,"a=mid:")[0];if(e)return e.substring(6)};p.parseFingerprint=function(r){let e=r.substring(14).split(" ");return{algorithm:e[0].toLowerCase(),value:e[1].toUpperCase()}};p.getDtlsParameters=function(r,e){return{role:"auto",fingerprints:p.matchPrefix(r+e,"a=fingerprint:").map(p.parseFingerprint)}};p.writeDtlsParameters=function(r,e){let t="a=setup:"+e+`\r
`;return r.fingerprints.forEach(i=>{t+="a=fingerprint:"+i.algorithm+" "+i.value+`\r
`}),t};p.parseCryptoLine=function(r){let e=r.substring(9).split(" ");return{tag:parseInt(e[0],10),cryptoSuite:e[1],keyParams:e[2],sessionParams:e.slice(3)}};p.writeCryptoLine=function(r){return"a=crypto:"+r.tag+" "+r.cryptoSuite+" "+(typeof r.keyParams=="object"?p.writeCryptoKeyParams(r.keyParams):r.keyParams)+(r.sessionParams?" "+r.sessionParams.join(" "):"")+`\r
`};p.parseCryptoKeyParams=function(r){if(r.indexOf("inline:")!==0)return null;let e=r.substring(7).split("|");return{keyMethod:"inline",keySalt:e[0],lifeTime:e[1],mkiValue:e[2]?e[2].split(":")[0]:void 0,mkiLength:e[2]?e[2].split(":")[1]:void 0}};p.writeCryptoKeyParams=function(r){return r.keyMethod+":"+r.keySalt+(r.lifeTime?"|"+r.lifeTime:"")+(r.mkiValue&&r.mkiLength?"|"+r.mkiValue+":"+r.mkiLength:"")};p.getCryptoParameters=function(r,e){return p.matchPrefix(r+e,"a=crypto:").map(p.parseCryptoLine)};p.getIceParameters=function(r,e){let t=p.matchPrefix(r+e,"a=ice-ufrag:")[0],i=p.matchPrefix(r+e,"a=ice-pwd:")[0];return t&&i?{usernameFragment:t.substring(12),password:i.substring(10)}:null};p.writeIceParameters=function(r){let e="a=ice-ufrag:"+r.usernameFragment+`\r
a=ice-pwd:`+r.password+`\r
`;return r.iceLite&&(e+=`a=ice-lite\r
`),e};p.parseRtpParameters=function(r){let e={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=p.splitLines(r)[0].split(" ");e.profile=i[2];for(let o=3;o<i.length;o++){let s=i[o],a=p.matchPrefix(r,"a=rtpmap:"+s+" ")[0];if(a){let c=p.parseRtpMap(a),d=p.matchPrefix(r,"a=fmtp:"+s+" ");switch(c.parameters=d.length?p.parseFmtp(d[0]):{},c.rtcpFeedback=p.matchPrefix(r,"a=rtcp-fb:"+s+" ").map(p.parseRtcpFb),e.codecs.push(c),c.name.toUpperCase()){case"RED":case"ULPFEC":e.fecMechanisms.push(c.name.toUpperCase());break;default:break}}}p.matchPrefix(r,"a=extmap:").forEach(o=>{e.headerExtensions.push(p.parseExtmap(o))});let n=p.matchPrefix(r,"a=rtcp-fb:* ").map(p.parseRtcpFb);return e.codecs.forEach(o=>{n.forEach(s=>{o.rtcpFeedback.find(c=>c.type===s.type&&c.parameter===s.parameter)||o.rtcpFeedback.push(s)})}),e};p.writeRtpDescription=function(r,e){let t="";t+="m="+r+" ",t+=e.codecs.length>0?"9":"0",t+=" "+(e.profile||"UDP/TLS/RTP/SAVPF")+" ",t+=e.codecs.map(n=>n.preferredPayloadType!==void 0?n.preferredPayloadType:n.payloadType).join(" ")+`\r
`,t+=`c=IN IP4 0.0.0.0\r
`,t+=`a=rtcp:9 IN IP4 0.0.0.0\r
`,e.codecs.forEach(n=>{t+=p.writeRtpMap(n),t+=p.writeFmtp(n),t+=p.writeRtcpFb(n)});let i=0;return e.codecs.forEach(n=>{n.maxptime>i&&(i=n.maxptime)}),i>0&&(t+="a=maxptime:"+i+`\r
`),e.headerExtensions&&e.headerExtensions.forEach(n=>{t+=p.writeExtmap(n)}),t};p.parseRtpEncodingParameters=function(r){let e=[],t=p.parseRtpParameters(r),i=t.fecMechanisms.indexOf("RED")!==-1,n=t.fecMechanisms.indexOf("ULPFEC")!==-1,o=p.matchPrefix(r,"a=ssrc:").map(h=>p.parseSsrcMedia(h)).filter(h=>h.attribute==="cname"),s=o.length>0&&o[0].ssrc,a,c=p.matchPrefix(r,"a=ssrc-group:FID").map(h=>h.substring(17).split(" ").map(m=>parseInt(m,10)));c.length>0&&c[0].length>1&&c[0][0]===s&&(a=c[0][1]),t.codecs.forEach(h=>{if(h.name.toUpperCase()==="RTX"&&h.parameters.apt){let u={ssrc:s,codecPayloadType:parseInt(h.parameters.apt,10)};s&&a&&(u.rtx={ssrc:a}),e.push(u),i&&(u=JSON.parse(JSON.stringify(u)),u.fec={ssrc:s,mechanism:n?"red+ulpfec":"red"},e.push(u))}}),e.length===0&&s&&e.push({ssrc:s});let d=p.matchPrefix(r,"b=");return d.length&&(d[0].indexOf("b=TIAS:")===0?d=parseInt(d[0].substring(7),10):d[0].indexOf("b=AS:")===0?d=parseInt(d[0].substring(5),10)*1e3*.95-2e3*8:d=void 0,e.forEach(h=>{h.maxBitrate=d})),e};p.parseRtcpParameters=function(r){let e={},t=p.matchPrefix(r,"a=ssrc:").map(o=>p.parseSsrcMedia(o)).filter(o=>o.attribute==="cname")[0];t&&(e.cname=t.value,e.ssrc=t.ssrc);let i=p.matchPrefix(r,"a=rtcp-rsize");e.reducedSize=i.length>0,e.compound=i.length===0;let n=p.matchPrefix(r,"a=rtcp-mux");return e.mux=n.length>0,e};p.writeRtcpParameters=function(r){let e="";return r.reducedSize&&(e+=`a=rtcp-rsize\r
`),r.mux&&(e+=`a=rtcp-mux\r
`),r.ssrc!==void 0&&r.cname&&(e+="a=ssrc:"+r.ssrc+" cname:"+r.cname+`\r
`),e};p.parseMsid=function(r){let e,t=p.matchPrefix(r,"a=msid:");if(t.length===1)return e=t[0].substring(7).split(" "),{stream:e[0],track:e[1]};let i=p.matchPrefix(r,"a=ssrc:").map(n=>p.parseSsrcMedia(n)).filter(n=>n.attribute==="msid");if(i.length>0)return e=i[0].value.split(" "),{stream:e[0],track:e[1]}};p.parseSctpDescription=function(r){let e=p.parseMLine(r),t=p.matchPrefix(r,"a=max-message-size:"),i;t.length>0&&(i=parseInt(t[0].substring(19),10)),isNaN(i)&&(i=65536);let n=p.matchPrefix(r,"a=sctp-port:");if(n.length>0)return{port:parseInt(n[0].substring(12),10),protocol:e.fmt,maxMessageSize:i};let o=p.matchPrefix(r,"a=sctpmap:");if(o.length>0){let s=o[0].substring(10).split(" ");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:i}}};p.writeSctpDescription=function(r,e){let t=[];return r.protocol!=="DTLS/SCTP"?t=["m="+r.kind+" 9 "+r.protocol+" "+e.protocol+`\r
`,`c=IN IP4 0.0.0.0\r
`,"a=sctp-port:"+e.port+`\r
`]:t=["m="+r.kind+" 9 "+r.protocol+" "+e.port+`\r
`,`c=IN IP4 0.0.0.0\r
`,"a=sctpmap:"+e.port+" "+e.protocol+` 65535\r
`],e.maxMessageSize!==void 0&&t.push("a=max-message-size:"+e.maxMessageSize+`\r
`),t.join("")};p.generateSessionId=function(){return Math.random().toString().substr(2,22)};p.writeSessionBoilerplate=function(r,e,t){let i,n=e!==void 0?e:2;return r?i=r:i=p.generateSessionId(),`v=0\r
o=`+(t||"thisisadapterortc")+" "+i+" "+n+` IN IP4 127.0.0.1\r
s=-\r
t=0 0\r
`};p.getDirection=function(r,e){let t=p.splitLines(r);for(let i=0;i<t.length;i++)switch(t[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return t[i].substring(2);default:}return e?p.getDirection(e):"sendrecv"};p.getKind=function(r){return p.splitLines(r)[0].split(" ")[0].substring(2)};p.isRejected=function(r){return r.split(" ",2)[1]==="0"};p.parseMLine=function(r){let t=p.splitLines(r)[0].substring(2).split(" ");return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}};p.parseOLine=function(r){let t=p.matchPrefix(r,"o=")[0].substring(2).split(" ");return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}};p.isValidSDP=function(r){if(typeof r!="string"||r.length===0)return!1;let e=p.splitLines(r);for(let t=0;t<e.length;t++)if(e[t].length<2||e[t].charAt(1)!=="=")return!1;return!0};typeof Gn=="object"&&(Gn.exports=p)});var Ns=20;var pl=new no("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let r=Fe(be);return()=>Dr(r,{scrollThrottle:Ns})}});function gl(r){let e=Fe(be);return()=>Dr(e,{scrollThrottle:Ns})}var ws={provide:pl,deps:[],useFactory:gl};var Mr=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=Re({type:r});static \u0275inj=Ae({providers:[ws],imports:[Wo,ii,Et,Et,bo]})}return r})();var S=(function(r){return r[r.State=0]="State",r[r.Transition=1]="Transition",r[r.Sequence=2]="Sequence",r[r.Group=3]="Group",r[r.Animate=4]="Animate",r[r.Keyframes=5]="Keyframes",r[r.Style=6]="Style",r[r.Trigger=7]="Trigger",r[r.Reference=8]="Reference",r[r.AnimateChild=9]="AnimateChild",r[r.AnimateRef=10]="AnimateRef",r[r.Query=11]="Query",r[r.Stagger=12]="Stagger",r})(S||{}),ce="*";function Nr(r,e){return{type:S.Trigger,name:r,definitions:e,options:{}}}function mi(r,e=null){return{type:S.Animate,styles:e,timings:r}}function Ls(r,e=null){return{type:S.Sequence,steps:r,options:e}}function ye(r){return{type:S.Style,styles:r,offset:null}}function pi(r,e,t){return{type:S.State,name:r,styles:e,options:t}}function gi(r,e,t=null){return{type:S.Transition,expr:r,animation:e,options:t}}var ve=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}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)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>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(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Xe=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,i=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.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){let t=e*this.totalTime;this.players.forEach(i=>{let n=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(n)})}getPosition(){let e=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},ht="!";function Fs(r){return new I(3e3,!1)}function fl(){return new I(3100,!1)}function vl(){return new I(3101,!1)}function yl(r){return new I(3001,!1)}function _l(r){return new I(3003,!1)}function Cl(r){return new I(3004,!1)}function Us(r,e){return new I(3005,!1)}function qs(){return new I(3006,!1)}function Bs(){return new I(3007,!1)}function Vs(r,e){return new I(3008,!1)}function Gs(r){return new I(3002,!1)}function js(r,e,t,i,n){return new I(3010,!1)}function Ws(){return new I(3011,!1)}function Hs(){return new I(3012,!1)}function $s(){return new I(3200,!1)}function Qs(){return new I(3202,!1)}function Ys(){return new I(3013,!1)}function Ks(r){return new I(3014,!1)}function Xs(r){return new I(3015,!1)}function Js(r){return new I(3016,!1)}function Zs(r,e){return new I(3404,!1)}function bl(r){return new I(3502,!1)}function ea(r){return new I(3503,!1)}function ta(){return new I(3300,!1)}function ia(r){return new I(3504,!1)}function ra(r){return new I(3301,!1)}function na(r,e){return new I(3302,!1)}function oa(r){return new I(3303,!1)}function sa(r,e){return new I(3400,!1)}function aa(r){return new I(3401,!1)}function la(r){return new I(3402,!1)}function ca(r,e){return new I(3505,!1)}function Te(r){switch(r.length){case 0:return new ve;case 1:return r[0];default:return new Xe(r)}}function zr(r,e,t=new Map,i=new Map){let n=[],o=[],s=-1,a=null;if(e.forEach(c=>{let d=c.get("offset"),h=d==s,u=h&&a||new Map;c.forEach((m,v)=>{let f=v,y=m;if(v!=="offset")switch(f=r.normalizePropertyName(f,n),y){case ht:y=t.get(v);break;case ce:y=i.get(v);break;default:y=r.normalizeStyleValue(v,f,y,n);break}u.set(f,y)}),h||o.push(u),a=u,s=d}),n.length)throw bl(n);return o}function fi(r,e,t,i){switch(e){case"start":r.onStart(()=>i(t&&wr(t,"start",r)));break;case"done":r.onDone(()=>i(t&&wr(t,"done",r)));break;case"destroy":r.onDestroy(()=>i(t&&wr(t,"destroy",r)));break}}function wr(r,e,t){let i=t.totalTime,n=!!t.disabled,o=vi(r.element,r.triggerName,r.fromState,r.toState,e||r.phaseName,i??r.totalTime,n),s=r._data;return s!=null&&(o._data=s),o}function vi(r,e,t,i,n="",o=0,s){return{element:r,triggerName:e,fromState:t,toState:i,phaseName:n,totalTime:o,disabled:!!s}}function ne(r,e,t){let i=r.get(e);return i||r.set(e,i=t),i}function Ur(r){let e=r.indexOf(":"),t=r.substring(1,e),i=r.slice(e+1);return[t,i]}var El=typeof document>"u"?null:document.documentElement;function yi(r){let e=r.parentNode||r.host||null;return e===El?null:e}function Sl(r){return r.substring(1,6)=="ebkit"}var Je=null,zs=!1;function da(r){Je||(Je=Tl()||{},zs=Je.style?"WebkitAppearance"in Je.style:!1);let e=!0;return Je.style&&!Sl(r)&&(e=r in Je.style,!e&&zs&&(e="Webkit"+r.charAt(0).toUpperCase()+r.slice(1)in Je.style)),e}function Tl(){return typeof document<"u"?document.body:null}function qr(r,e){for(;e;){if(e===r)return!0;e=yi(e)}return!1}function Br(r,e,t){if(t)return Array.from(r.querySelectorAll(e));let i=r.querySelector(e);return i?[i]:[]}var Ol=1e3,Vr="{{",Il="}}",Gr="ng-enter",_i="ng-leave",Dt="ng-trigger",xt=".ng-trigger",jr="ng-animating",Ci=".ng-animating";function _e(r){if(typeof r=="number")return r;let e=r.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Lr(parseFloat(e[1]),e[2])}function Lr(r,e){return e==="s"?r*Ol:r}function Pt(r,e,t){return r.hasOwnProperty("duration")?r:Rl(r,e,t)}var Al=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function Rl(r,e,t){let i,n=0,o="";if(typeof r=="string"){let s=r.match(Al);if(s===null)return e.push(Fs(r)),{duration:0,delay:0,easing:""};i=Lr(parseFloat(s[1]),s[2]);let a=s[3];a!=null&&(n=Lr(parseFloat(a),s[4]));let c=s[5];c&&(o=c)}else i=r;if(!t){let s=!1,a=e.length;i<0&&(e.push(fl()),s=!0),n<0&&(e.push(vl()),s=!0),s&&e.splice(a,0,Fs(r))}return{duration:i,delay:n,easing:o}}function ha(r){return r.length?r[0]instanceof Map?r:r.map(e=>new Map(Object.entries(e))):[]}function he(r,e,t){e.forEach((i,n)=>{let o=bi(n);t&&!t.has(n)&&t.set(n,r.style[o]),r.style[o]=i})}function Me(r,e){e.forEach((t,i)=>{let n=bi(i);r.style[n]=""})}function ut(r){return Array.isArray(r)?r.length==1?r[0]:Ls(r):r}function ua(r,e,t){let i=e.params||{},n=Wr(r);n.length&&n.forEach(o=>{i.hasOwnProperty(o)||t.push(yl(o))})}var Fr=new RegExp(`${Vr}\\s*(.+?)\\s*${Il}`,"g");function Wr(r){let e=[];if(typeof r=="string"){let t;for(;t=Fr.exec(r);)e.push(t[1]);Fr.lastIndex=0}return e}function mt(r,e,t){let i=`${r}`,n=i.replace(Fr,(o,s)=>{let a=e[s];return a==null&&(t.push(_l(s)),a=""),a.toString()});return n==i?r:n}var kl=/-+([a-z0-9])/g;function bi(r){return r.replace(kl,(...e)=>e[1].toUpperCase())}function ma(r,e){return r===0||e===0}function pa(r,e,t){if(t.size&&e.length){let i=e[0],n=[];if(t.forEach((o,s)=>{i.has(s)||n.push(s),i.set(s,o)}),n.length)for(let o=1;o<e.length;o++){let s=e[o];n.forEach(a=>s.set(a,Ei(r,a)))}}return e}function oe(r,e,t){switch(e.type){case S.Trigger:return r.visitTrigger(e,t);case S.State:return r.visitState(e,t);case S.Transition:return r.visitTransition(e,t);case S.Sequence:return r.visitSequence(e,t);case S.Group:return r.visitGroup(e,t);case S.Animate:return r.visitAnimate(e,t);case S.Keyframes:return r.visitKeyframes(e,t);case S.Style:return r.visitStyle(e,t);case S.Reference:return r.visitReference(e,t);case S.AnimateChild:return r.visitAnimateChild(e,t);case S.AnimateRef:return r.visitAnimateRef(e,t);case S.Query:return r.visitQuery(e,t);case S.Stagger:return r.visitStagger(e,t);default:throw Cl(e.type)}}function Ei(r,e){return window.getComputedStyle(r)[e]}var cn=(()=>{class r{validateStyleProperty(t){return da(t)}containsElement(t,i){return qr(t,i)}getParentElement(t){return yi(t)}query(t,i,n){return Br(t,i,n)}computeStyle(t,i,n){return n||""}animate(t,i,n,o,s,a=[],c){return new ve(n,o)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=le({token:r,factory:r.\u0275fac})}return r})(),et=class{static NOOP=new cn},tt=class{};var Dl=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"]),Ai=class extends tt{normalizePropertyName(e,t){return bi(e)}normalizeStyleValue(e,t,i,n){let o="",s=i.toString().trim();if(Dl.has(t)&&i!==0&&i!=="0")if(typeof i=="number")o="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&n.push(Us(e,i))}return s+o}};var Ri="*";function xl(r,e){let t=[];return typeof r=="string"?r.split(/\s*,\s*/).forEach(i=>Pl(i,t,e)):t.push(r),t}function Pl(r,e,t){if(r[0]==":"){let c=Ml(r,t);if(typeof c=="function"){e.push(c);return}r=c}let i=r.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(Xs(r)),e;let n=i[1],o=i[2],s=i[3];e.push(ga(n,s));let a=n==Ri&&s==Ri;o[0]=="<"&&!a&&e.push(ga(s,n))}function Ml(r,e){switch(r){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(Js(r)),"* => *"}}var Si=new Set(["true","1"]),Ti=new Set(["false","0"]);function ga(r,e){let t=Si.has(r)||Ti.has(r),i=Si.has(e)||Ti.has(e);return(n,o)=>{let s=r==Ri||r==n,a=e==Ri||e==o;return!s&&t&&typeof n=="boolean"&&(s=n?Si.has(r):Ti.has(r)),!a&&i&&typeof o=="boolean"&&(a=o?Si.has(e):Ti.has(e)),s&&a}}var Oa=":self",Nl=new RegExp(`s*${Oa}s*,?`,"g");function Ia(r,e,t,i){return new Xr(r).build(e,t,i)}var fa="",Xr=class{_driver;constructor(e){this._driver=e}build(e,t,i){let n=new Jr(t);return this._resetContextStyleTimingState(n),oe(this,ut(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=fa,e.collectedStyles=new Map,e.collectedStyles.set(fa,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&t.errors.push(qs()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let c=a,d=c.name;d.toString().split(/\s*,\s*/).forEach(h=>{c.name=h,o.push(this.visitState(c,t))}),c.name=d}else if(a.type==S.Transition){let c=this.visitTransition(a,t);i+=c.queryCount,n+=c.depCount,s.push(c)}else t.errors.push(Bs())}),{type:S.Trigger,name:e.name,states:o,transitions:s,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let o=new Set,s=n||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{Wr(c).forEach(d=>{s.hasOwnProperty(d)||o.add(d)})})}),o.size&&t.errors.push(Vs(e.name,[...o.values()]))}return{type:S.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=oe(this,ut(e.animation),t),n=xl(e.expr,t.errors);return{type:S.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Ze(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(i=>oe(this,i,t)),options:Ze(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,o=e.steps.map(s=>{t.currentTime=i;let a=oe(this,s,t);return n=Math.max(n,t.currentTime),a});return t.currentTime=n,{type:S.Group,steps:o,options:Ze(e.options)}}visitAnimate(e,t){let i=zl(e.timings,t.errors);t.currentAnimateTimings=i;let n,o=e.styles?e.styles:ye({});if(o.type==S.Keyframes)n=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;let d={};i.easing&&(d.easing=i.easing),s=ye(d)}t.currentTime+=i.duration+i.delay;let c=this.visitStyle(s,t);c.isEmptyStep=a,n=c}return t.currentAnimateTimings=null,{type:S.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of n)typeof a=="string"?a===ce?i.push(a):t.errors.push(Gs(a)):i.push(new Map(Object.entries(a)));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(Vr)>=0){o=!0;break}}}),{type:S.Style,styles:i,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,o=t.currentTime;i&&o>0&&(o-=i.duration+i.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let d=t.collectedStyles.get(t.currentQuerySelector),h=d.get(c),u=!0;h&&(o!=n&&o>=h.startTime&&n<=h.endTime&&(t.errors.push(js(c,h.startTime,h.endTime,o,n)),u=!1),o=h.startTime),u&&d.set(c,{startTime:o,endTime:n}),t.options&&ua(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Ws()),i;let n=1,o=0,s=[],a=!1,c=!1,d=0,h=e.steps.map(w=>{let F=this._makeStyleAst(w,t),Y=F.offset!=null?F.offset:Fl(F.styles),V=0;return Y!=null&&(o++,V=F.offset=Y),c=c||V<0||V>1,a=a||V<d,d=V,s.push(V),F});c&&t.errors.push(Hs()),a&&t.errors.push($s());let u=e.steps.length,m=0;o>0&&o<u?t.errors.push(Qs()):o==0&&(m=n/(u-1));let v=u-1,f=t.currentTime,y=t.currentAnimateTimings,P=y.duration;return h.forEach((w,F)=>{let Y=m>0?F==v?1:m*F:s[F],V=Y*P;t.currentTime=f+y.delay+V,y.duration=V,this._validateStyleAst(w,t),w.offset=Y,i.styles.push(w)}),i}visitReference(e,t){return{type:S.Reference,animation:oe(this,ut(e.animation),t),options:Ze(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:Ze(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:Ze(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[o,s]=wl(e.selector);t.currentQuerySelector=i.length?i+" "+o:o,ne(t.collectedStyles,t.currentQuerySelector,new Map);let a=oe(this,ut(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:S.Query,selector:o,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:Ze(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ys());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Pt(e.timings,t.errors,!0);return{type:S.Stagger,animation:oe(this,ut(e.animation),t),timings:i,options:null}}};function wl(r){let e=!!r.split(/\s*,\s*/).find(t=>t==Oa);return e&&(r=r.replace(Nl,"")),r=r.replace(/@\*/g,xt).replace(/@\w+/g,t=>xt+"-"+t.slice(1)).replace(/:animating/g,Ci),[r,e]}function Ll(r){return r?k({},r):null}var Jr=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Fl(r){if(typeof r=="string")return null;let e=null;if(Array.isArray(r))r.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(r instanceof Map&&r.has("offset")){let t=r;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function zl(r,e){if(r.hasOwnProperty("duration"))return r;if(typeof r=="number"){let o=Pt(r,e).duration;return Hr(o,0,"")}let t=r;if(t.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=Hr(0,0,"");return o.dynamic=!0,o.strValue=t,o}let n=Pt(t,e);return Hr(n.duration,n.delay,n.easing)}function Ze(r){return r?(r=k({},r),r.params&&(r.params=Ll(r.params))):r={},r}function Hr(r,e,t){return{duration:r,delay:e,easing:t}}function dn(r,e,t,i,n,o,s=null,a=!1){return{type:1,element:r,keyframes:e,preStyleProps:t,postStyleProps:i,duration:n,delay:o,totalTime:n+o,easing:s,subTimeline:a}}var Nt=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ul=1,ql=":enter",Bl=new RegExp(ql,"g"),Vl=":leave",Gl=new RegExp(Vl,"g");function Aa(r,e,t,i,n,o=new Map,s=new Map,a,c,d=[]){return new Zr().buildKeyframes(r,e,t,i,n,o,s,a,c,d)}var Zr=class{buildKeyframes(e,t,i,n,o,s,a,c,d,h=[]){d=d||new Nt;let u=new en(e,t,d,n,o,h,[]);u.options=c;let m=c.delay?_e(c.delay):0;u.currentTimeline.delayNextStep(m),u.currentTimeline.setStyles([s],null,u.errors,c),oe(this,i,u);let v=u.timelines.filter(f=>f.containsAnimation());if(v.length&&a.size){let f;for(let y=v.length-1;y>=0;y--){let P=v[y];if(P.element===t){f=P;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,c)}return v.length?v.map(f=>f.buildKeyframes()):[dn(t,[],[],[],0,m,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let o=n?.delay;if(o){let s=typeof o=="number"?o:_e(mt(o,n?.params??{},t.errors));i.delayNextStep(s)}}}_visitSubInstructions(e,t,i){let o=t.currentTimeline.currentTime,s=i.duration!=null?_e(i.duration):null,a=i.delay!=null?_e(i.delay):null;return s!==0&&e.forEach(c=>{let d=t.appendInstructionToTimeline(c,s,a);o=Math.max(o,d.duration+d.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),oe(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,o=e.options;if(o&&(o.params||o.delay)&&(n=t.createSubContext(o),n.transformIntoNewTimeline(),o.delay!=null)){n.previousNode.type==S.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ki);let s=_e(o.delay);n.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>oe(this,s,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,o=e.options&&e.options.delay?_e(e.options.delay):0;e.steps.forEach(s=>{let a=t.createSubContext(e.options);o&&a.delayNextStep(o),oe(this,s,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,n=t.params?mt(i,t.params,t.errors):i;return Pt(n,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let o=e.style;o.type==S.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(i.duration),this.visitStyle(o,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let o=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(o):i.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,o=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(c=>{let d=c.offset||0;a.forwardTime(d*o),a.setStyles(c.styles,c.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(n+o),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},o=n.delay?_e(n.delay):0;o&&(t.previousNode.type===S.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ki);let s=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let c=null;a.forEach((d,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,d);o&&u.delayNextStep(o),d===t.element&&(c=u.currentTimeline),oe(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let m=u.currentTimeline.currentTime;s=Math.max(s,m)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),c&&(t.currentTimeline.mergeTimelineCollectedStyles(c),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1),c=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=i.currentStaggerTime;break}let h=t.currentTimeline;c&&h.delayNextStep(c);let u=h.currentTime;oe(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-u+(n.startTime-i.currentTimeline.startTime)}},ki={},en=class r{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=ki;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,n,o,s,a,c){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=o,this.errors=s,this.timelines=a,this.currentTimeline=c||new Di(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;i.duration!=null&&(n.duration=_e(i.duration)),i.delay!=null&&(n.delay=_e(i.delay));let o=i.params;if(o){let s=n.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=mt(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(n=>{i[n]=t[n]})}}return e}createSubContext(e=null,t,i){let n=t||this.element,o=new r(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=ki,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},o=new tn(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(o),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,o,s){let a=[];if(n&&a.push(this.element),e.length>0){e=e.replace(Bl,"."+this._enterClassName),e=e.replace(Gl,"."+this._leaveClassName);let c=i!=1,d=this._driver.query(this.element,e,c);i!==0&&(d=i<0?d.slice(d.length+i,d.length):d.slice(0,i)),a.push(...d)}return!o&&a.length==0&&s.push(Ks(t)),a}},Di=class r{_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,i,n){this._driver=e,this.element=t,this.startTime=i,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){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new r(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+=Ul,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,i]of this._globalTimelineStyles)this._backFill.set(t,i||ce),this._currentKeyframe.set(t,ce);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let o=n&&n.params||{},s=jl(e,this._globalTimelineStyles);for(let[a,c]of s){let d=mt(c,o,i);this._pendingStyles.set(a,d),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??ce),this._updateStyle(a,d)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(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(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let n=this._styleSummary.get(i);(!n||t.time>n.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((a,c)=>{let d=new Map([...this._backFill,...a]);d.forEach((h,u)=>{h===ht?e.add(u):h===ce&&t.add(u)}),i||d.set("offset",c/this.duration),n.push(d)});let o=[...e.values()],s=[...t.values()];if(i){let a=n[0],c=new Map(a);a.set("offset",0),c.set("offset",1),n=[a,c]}return dn(this.element,n,o,s,this.duration,this.startTime,this.easing,!1)}},tn=class extends Di{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,n,o,s,a=!1){super(e,t,s.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let o=[],s=i+t,a=t/s,c=new Map(e[0]);c.set("offset",0),o.push(c);let d=new Map(e[0]);d.set("offset",va(a)),o.push(d);let h=e.length-1;for(let u=1;u<=h;u++){let m=new Map(e[u]),v=m.get("offset"),f=t+v*i;m.set("offset",va(f/s)),o.push(m)}i=s,t=0,n="",e=o}return dn(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function va(r,e=3){let t=Math.pow(10,e-1);return Math.round(r*t)/t}function jl(r,e){let t=new Map,i;return r.forEach(n=>{if(n==="*"){i??=e.keys();for(let o of i)t.set(o,ce)}else for(let[o,s]of n)t.set(o,s)}),t}function ya(r,e,t,i,n,o,s,a,c,d,h,u,m){return{type:0,element:r,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:c,preStyleProps:d,postStyleProps:h,totalTime:u,errors:m}}var $r={},xi=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return Wl(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,o,s,a,c,d,h){let u=[],m=this.ast.options&&this.ast.options.params||$r,v=a&&a.params||$r,f=this.buildStyles(i,v,u),y=c&&c.params||$r,P=this.buildStyles(n,y,u),w=new Set,F=new Map,Y=new Map,V=n==="void",nt={params:Ra(y,m),delay:this.ast.options?.delay},me=h?[]:Aa(e,t,this.ast.animation,o,s,f,P,nt,d,u),K=0;return me.forEach(ee=>{K=Math.max(ee.duration+ee.delay,K)}),u.length?ya(t,this._triggerName,i,n,V,f,P,[],[],F,Y,K,u):(me.forEach(ee=>{let Ne=ee.element,ot=ne(F,Ne,new Set);ee.preStyleProps.forEach(we=>ot.add(we));let Hn=ne(Y,Ne,new Set);ee.postStyleProps.forEach(we=>Hn.add(we)),Ne!==t&&w.add(Ne)}),ya(t,this._triggerName,i,n,V,f,P,me,[...w.values()],F,Y,K))}};function Wl(r,e,t,i,n){return r.some(o=>o(e,t,i,n))}function Ra(r,e){let t=k({},e);return Object.entries(r).forEach(([i,n])=>{n!=null&&(t[i]=n)}),t}var rn=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=Ra(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=mt(s,n,t));let c=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,c,s,t),i.set(a,s)})}),i}};function Hl(r,e,t){return new nn(r,e,t)}var nn=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(n=>{let o=n.options&&n.options.params||{};this.states.set(n.name,new rn(n.style,o,i))}),_a(this.states,"true","1"),_a(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new xi(e,n,this.states))}),this.fallbackTransition=$l(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find(s=>s.match(e,t,i,n))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function $l(r,e,t){let i=[(s,a)=>!0],n={type:S.Sequence,steps:[],options:null},o={type:S.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new xi(r,o,e)}function _a(r,e,t){r.has(e)?r.has(t)||r.set(t,r.get(e)):r.has(t)&&r.set(e,r.get(t))}var Ql=new Nt,on=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],n=[],o=Ia(this._driver,t,i,n);if(i.length)throw ea(i);this._animations.set(e,o)}_buildPlayer(e,t,i){let n=e.element,o=zr(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n=[],o=this._animations.get(e),s,a=new Map;if(o?(s=Aa(this._driver,t,o,Gr,_i,new Map,new Map,i,Ql,n),s.forEach(h=>{let u=ne(a,h.element,new Map);h.postStyleProps.forEach(m=>u.set(m,null))})):(n.push(ta()),s=[]),n.length)throw ia(n);a.forEach((h,u)=>{h.forEach((m,v)=>{h.set(v,this._driver.computeStyle(u,v,ce))})});let c=s.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),d=Te(c);return this._playersById.set(e,d),d.onDestroy(()=>this.destroy(e)),this.players.push(d),d}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw ra(e);return t}listen(e,t,i,n){let o=vi(t,"","","");return fi(this._getPlayer(e),i,o,n),()=>{}}command(e,t,i,n){if(i=="register"){this.register(e,n[0]);return}if(i=="create"){let s=n[0]||{};this.create(e,t,s);return}let o=this._getPlayer(e);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},Ca="ng-animate-queued",Yl=".ng-animate-queued",Qr="ng-animate-disabled",Kl=".ng-animate-disabled",Xl="ng-star-inserted",Jl=".ng-star-inserted",Zl=[],ka={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ec={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ue="__ng_removed",wt=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=ic(n),i){let o=e,{value:s}=o,a=Kn(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(n=>{i[n]==null&&(i[n]=t[n])})}}},Mt="void",Yr=new wt(Mt),sn=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,de(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw na(i,t);if(i==null||i.length==0)throw oa(t);if(!rc(i))throw sa(i,t);let o=ne(this._elementListeners,e,[]),s={name:t,phase:i,callback:n};o.push(s);let a=ne(this._engine.statesByElement,e,new Map);return a.has(t)||(de(e,Dt),de(e,Dt+"-"+t),a.set(t,Yr)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw aa(e);return t}trigger(e,t,i,n=!0){let o=this._getTrigger(t),s=new Lt(this.id,t,e),a=this._engine.statesByElement.get(e);a||(de(e,Dt),de(e,Dt+"-"+t),this._engine.statesByElement.set(e,a=new Map));let c=a.get(t),d=new wt(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&c&&d.absorbOptions(c.options),a.set(t,d),c||(c=Yr),!(d.value===Mt)&&c.value===d.value){if(!sc(c.params,d.params)){let y=[],P=o.matchStyles(c.value,c.params,y),w=o.matchStyles(d.value,d.params,y);y.length?this._engine.reportError(y):this._engine.afterFlush(()=>{Me(e,P),he(e,w)})}return}let m=ne(this._engine.playersByElement,e,[]);m.forEach(y=>{y.namespaceId==this.id&&