@veltdev/sdk-staging 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/utils/constants.d.ts +8 -0
- package/{chunk-LKDAYDYI.js → chunk-2Q3745J2.js} +1 -1
- package/{chunk-6MGKRXSY.js → chunk-2WE6CG7F.js} +1 -1
- package/{chunk-3KJ764UT.js → chunk-2ZGVZZFS.js} +1 -1
- package/{chunk-NWDWX5YO.js → chunk-4FUBGV7B.js} +1 -1
- package/{chunk-3TJCSNIG.js → chunk-5CFN76GI.js} +1 -1
- package/{chunk-QLVK345H.js → chunk-6VMBIKMK.js} +1 -1
- package/{chunk-NQSBOFK2.js → chunk-75Z7SIQI.js} +1 -1
- package/{chunk-Q3SFRIYZ.js → chunk-7UFH2MQ5.js} +1 -1
- package/{chunk-BP5ABAKN.js → chunk-BCDJ35DN.js} +1 -1
- package/{chunk-4OLGZSM5.js → chunk-DF5SLQUS.js} +1 -1
- package/{chunk-536OCMB3.js → chunk-DZB424JF.js} +1 -1
- package/{chunk-UCT7W636.js → chunk-FJ6CN2HK.js} +1 -1
- package/{chunk-JWDFDPX4.js → chunk-FR7BEDQT.js} +1 -1
- package/{chunk-7M7HPFJW.js → chunk-FRPQQ7DI.js} +1 -1
- package/{chunk-QYUV5PXV.js → chunk-GDRY5OGH.js} +1 -1
- package/{chunk-6TG2BTZY.js → chunk-HGFGZISK.js} +1 -1
- package/{chunk-QGKMKI54.js → chunk-HS6LFYOH.js} +1 -1
- package/{chunk-KB66VPFE.js → chunk-HVJ4WKTL.js} +1 -1
- package/{chunk-3YCIOKO7.js → chunk-KWXZADQY.js} +22 -22
- package/{chunk-KPEMFTQE.js → chunk-LTCLU4T3.js} +1 -1
- package/{chunk-YBCNVNZM.js → chunk-N72BHERH.js} +1 -1
- package/{chunk-6HE33JU6.js → chunk-O6NHFZMD.js} +1 -1
- package/{chunk-DBLFIQJV.js → chunk-OXX7MHHB.js} +1 -1
- package/{chunk-WQRY6Y6C.js → chunk-PB5PWSQS.js} +1 -1
- package/{chunk-JMH4W4CX.js → chunk-PHNGEVKT.js} +1 -1
- package/{chunk-PNALREKY.js → chunk-PLGVZJ6T.js} +1 -1
- package/{chunk-422EVUH5.js → chunk-TBVR7DMN.js} +1 -1
- package/{chunk-IT6QBRIR.js → chunk-UBHG5AQX.js} +1 -1
- package/{chunk-4D5FVVNP.js → chunk-XJT64ZXP.js} +1 -1
- package/{chunk-AGIFYNBC.js → chunk-XVEAFTH3.js} +1 -1
- package/{chunk-WW7AGQRC.js → chunk-YJ5BCVP3.js} +1 -1
- package/{chunk-IZDLUJV7.js → chunk-Z6E2ZIIQ.js} +1 -1
- package/{chunk-QU324LV6.js → chunk-ZFEUGJVC.js} +1 -1
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +1 -1
- package/velt-comment.js +5 -5
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +1 -1
- package/velt-huddle.js +1 -1
- package/velt-live-state-sync.js +1 -1
- package/velt-notification.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +1 -1
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +1 -1
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +1 -1
- package/velt.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as $}from"./chunk-YBCNVNZM.js";import{$ as D,Db as Z,Eb as A,Fa as m,Fb as q,Fc as z,Ga as C,Gc as G,Ib as f,Kb as b,Ke as U,Nb as T,Ob as N,Pa as S,Pb as I,Ua as H,Xa as k,_a as v,ca as B,db as L,ha as l,ia as c,ja as w,ji as Q,kc as M,ki as O,la as F,lb as p,lc as E,mb as u,nb as d,ob as y,vb as _,xb as g,zb as a}from"./chunk-3YCIOKO7.js";var W=(()=>{let r=class r{transform(t,i,...o){try{let s=t&&t?.slice?t?.slice():[];return s?.length&&new U().getBrowserName()?.toLocaleLowerCase()==="safari"&&(s=s.sort((V,x)=>V.type==="mp4"&&x.type!=="mp4"?-1:V.type!=="mp4"&&x.type==="mp4"?1:0)),s}catch{return t}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275pipe=k({name:"rearrangeMediaSource",type:r,pure:!0});let n=r;return n})();var J=(()=>{let r=class r{constructor(t,i){this.injector=t,this.loggingService=i,this.arrowPromise=null,this.commentPromise=null,this.cursorPromise=null,this.huddlePromise=null,this.notificationPromise=null,this.presencePromise=null,this.reactionPromise=null,this.recorderPromise=null,this.tagPromise=null,this.rewriterPromise=null,this.selectionPromise=null,this.areaPromise=null,this.activityLogPromise=null,this.viewPromise=null,this.userInvitePromise=null,this.userRequestPromise=null,this.videoPlayerPromise=null,this.crdtPromise=null,this.liveStateSyncPromise=null,this.loggingService.log("%c[WB] Creating CLASS: ChunkLoaderService","color: blue;")}ensureArrowChunk(){return this.arrowPromise||(this.arrowPromise=import("./velt-arrow.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading arrow chunk: ",t),this.arrowPromise=null,t})),this.arrowPromise}ensureCommentChunk(){return this.commentPromise||(this.commentPromise=import("./velt-comment.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading comment chunk: ",t),this.commentPromise=null,t})),this.commentPromise}ensureCursorChunk(){return this.cursorPromise||(this.cursorPromise=import("./velt-cursor.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading cursor chunk: ",t),this.cursorPromise=null,t})),this.cursorPromise}ensureHuddleChunk(){return this.huddlePromise||(this.huddlePromise=import("./velt-huddle.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading huddle chunk: ",t),this.huddlePromise=null,t})),this.huddlePromise}ensureNotificationChunk(){return this.notificationPromise||(this.notificationPromise=import("./velt-notification.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading notification chunk: ",t),this.notificationPromise=null,t})),this.notificationPromise}ensurePresenceChunk(){return this.presencePromise||(this.presencePromise=import("./velt-presence.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading presence chunk: ",t),this.presencePromise=null,t})),this.presencePromise}ensureReactionChunk(){return this.reactionPromise||(this.reactionPromise=import("./velt-reaction.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading reaction chunk: ",t),this.reactionPromise=null,t})),this.reactionPromise}ensureRecorderChunk(){return this.recorderPromise||(this.recorderPromise=import("./velt-recorder.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading recorder chunk: ",t),this.recorderPromise=null,t})),this.recorderPromise}ensureTagChunk(){return this.tagPromise||(this.tagPromise=import("./velt-tag.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading tag chunk: ",t),this.tagPromise=null,t})),this.tagPromise}ensureRewriterChunk(){return this.rewriterPromise||(this.rewriterPromise=import("./velt-rewriter.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading rewriter chunk: ",t),this.rewriterPromise=null,t})),this.rewriterPromise}ensureSelectionChunk(){return this.selectionPromise||(this.selectionPromise=import("./velt-selection.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading selection chunk: ",t),this.selectionPromise=null,t})),this.selectionPromise}ensureAreaChunk(){return this.areaPromise||(this.areaPromise=import("./velt-area.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading area chunk: ",t),this.areaPromise=null,t})),this.areaPromise}ensureActivityLogChunk(){return this.activityLogPromise||(this.activityLogPromise=import("./velt-activity-log.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading activity-log chunk: ",t),this.activityLogPromise=null,t})),this.activityLogPromise}ensureViewChunk(){return this.viewPromise||(this.viewPromise=import("./velt-views.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading view chunk: ",t),this.viewPromise=null,t})),this.viewPromise}ensureUserInviteChunk(){return this.userInvitePromise||(this.userInvitePromise=import("./velt-user-invite.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading user-invite chunk: ",t),this.userInvitePromise=null,t})),this.userInvitePromise}ensureUserRequestChunk(){return this.userRequestPromise||(this.userRequestPromise=import("./velt-user-request.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading user-request chunk: ",t),this.userRequestPromise=null,t})),this.userRequestPromise}ensureVideoPlayerChunk(){return this.videoPlayerPromise||(this.videoPlayerPromise=import("./velt-video-player.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading video-player chunk: ",t),this.videoPlayerPromise=null,t})),this.videoPlayerPromise}ensureCrdtChunk(){return this.crdtPromise||(this.crdtPromise=import("./velt-crdt.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading crdt chunk: ",t),this.crdtPromise=null,t})),this.crdtPromise}ensureLiveStateSyncChunk(){return this.liveStateSyncPromise||(this.liveStateSyncPromise=import("./velt-live-state-sync.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading live-state-sync chunk: ",t),this.liveStateSyncPromise=null,t})),this.liveStateSyncPromise}};r.\u0275fac=function(i){return new(i||r)(B(F),B(O))},r.\u0275prov=D({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var et=["videoRef"];function it(n,r){if(n&1&&y(0,"source",10),n&2){let e=a();p("src",!(e.annotation==null||e.annotation.attachment==null)&&e.annotation.attachment.thumbnail?e.annotation==null||e.annotation.attachment==null?null:e.annotation.attachment.url:(e.annotation==null||e.annotation.attachment==null?null:e.annotation.attachment.url)+"#t=0.001")}}function nt(n,r){if(n&1&&y(0,"source",12),n&2){let e=r.$implicit;p("src",e==null?null:e.url)("type",(e==null?null:e.mimeType)||"video/mp4")}}function ot(n,r){if(n&1&&(v(0,nt,1,2,"source",11),M(1,"rearrangeMediaSource")),n&2){let e=a();p("ngForOf",E(1,2,e.annotation==null?null:e.annotation.attachments))("ngForTrackBy",e.trackByAttachmentId)}}function rt(n,r){if(n&1){let e=_();u(0,"div",13)(1,"div",14)(2,"snippyly-subtitles-embed",15,1),g("subtitlesButtonClick",function(){l(e);let i=a();return c(i.onSubtitlesButtonClick())}),d()()()}if(n&2){let e,t=f(3),i=a(),o=f(3);b("hide",(t==null?null:t.componentConfigSignal)&&(t==null||(e=t.componentConfigSignal())==null?null:e.highlightedTextIndex)<0),m(2),p("transcription",i.annotation==null?null:i.annotation.transcription)("timeToRead",(o==null?null:o.currentTime)||0)("mode","embed")}}function at(n,r){if(n&1){let e=_();u(0,"input",28),g("input",function(i){l(e);let o=a(2);return c(o.onDurationChange(i))}),d()}if(n&2){let e=a(2),t=f(3);p("value",(t==null?null:t.currentTime)*1e3/((e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.duration)||0))}}function st(n,r){if(n&1){let e=_();w(),u(0,"svg",29),g("click",function(){l(e);let i=a(2);return c(i.toggleVideo())}),y(1,"path",30),d()}}function lt(n,r){if(n&1){let e=_();w(),u(0,"svg",31),g("click",function(){l(e);let i=a(2);return c(i.toggleVideo())}),y(1,"path",32)(2,"path",33),d()}}function ct(n,r){n&1&&(u(0,"span",38),T(1),M(2,"translate"),d()),n&2&&(m(),I(" ",E(2,1,"Subtitles not available")," "))}function pt(n,r){if(n&1){let e=_();u(0,"div",34),v(1,ct,3,3,"span",35),w(),u(2,"svg",36),g("click",function(){l(e);let i=a(2);return c(!(i.annotation==null||i.annotation.transcription==null)&&i.annotation.transcription.transcriptedText?i.onSubtitlesButtonClick(!0):null)}),y(3,"path",37),d()()}if(n&2){let e=a(2);b("disabled",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText)),m(),p("ngIf",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText))}}function mt(n,r){n&1&&(u(0,"span",38),T(1),M(2,"translate"),d()),n&2&&(m(),I(" ",E(2,1,"Transcription not available")))}function ut(n,r){if(n&1){let e=_();u(0,"div",39),g("click",function(){l(e);let i=a(2);return c(!(i.annotation==null||i.annotation.transcription==null)&&i.annotation.transcription.transcriptedText?i.onTranscriptionButtonClick(!0):null)}),v(1,mt,3,3,"span",35),w(),u(2,"svg",40),y(3,"path",41),d()()}if(n&2){let e=a(2);b("disabled",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText)),m(),p("ngIf",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText))}}function dt(n,r){if(n&1){let e=_();u(0,"snippyly-transcription-embed",42),g("transcriptionButtonClick",function(){l(e);let i=a(2);return c(i.onTranscriptionButtonClick())})("transcriptionSummaryCopy",function(){l(e);let i=a(2);return c(i.onTranscriptionSummaryCopy())})("seekTo",function(i){l(e);let o=a(2),s=f(3);return c(o.onSeekToVideo(i,s))})("transcriptionPanelDragged",function(){l(e);let i=a(2);return c(i.onTranscriptionPanelDragged())}),d()}if(n&2){let e=a(2),t=f(3);p("transcription",e.annotation==null?null:e.annotation.transcription)("timeToRead",(t==null?null:t.currentTime)||0)}}function ht(n,r){if(n&1){let e=_();w(),u(0,"svg",43),g("click",function(){l(e);let i=a(2);return c(i.onDelete())}),y(1,"path",44)(2,"path",45)(3,"path",46)(4,"path",47),d()}}function gt(n,r){if(n&1&&(u(0,"div",16)(1,"div",17),v(2,at,1,1,"input",18),d(),u(3,"div",19)(4,"div",20),v(5,st,2,0,"svg",21)(6,lt,3,0,"svg",22),u(7,"span"),T(8),d()(),u(9,"div",23),v(10,pt,4,3,"div",24)(11,ut,4,3,"div",25)(12,dt,1,2,"snippyly-transcription-embed",26)(13,ht,5,0,"svg",27),d()()()),n&2){let e=a();m(2),p("ngIf",e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.duration),m(3),p("ngIf",!e.playing),m(),p("ngIf",e.playing),m(2),N(e.currentTime||(e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.display)||"00:00"),m(2),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.showSubtitlesButton),m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.transcriptionMode==="embed"),m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.transcriptionMode==="floating"&&e.showTranscriptionButton),m(),p("ngIf",e.showDeleteButton)}}function _t(n,r){if(n&1){let e=_();u(0,"snippyly-transcription-embed",50),g("seekTo",function(i){l(e);let o=a(2),s=f(3);return c(o.onSeekToVideo(i,s))})("close",function(){l(e);let i=a(2);return c(i.toggleTranscription())})("transcriptionSummaryCopy",function(){l(e);let i=a(2);return c(i.onTranscriptionSummaryCopy())})("transcriptionPanelDragged",function(){l(e);let i=a(2);return c(i.onTranscriptionPanelDragged())}),d()}if(n&2){let e=a(2),t=f(3);p("transcription",e.annotation==null?null:e.annotation.transcription)("timeToRead",(t==null?null:t.currentTime)||0)("mode",e.transcriptionMode)("visible",!0)}}function vt(n,r){if(n&1){let e=_();u(0,"div",48),g("click",function(i){return l(e),c(i.stopPropagation())})("pointerdown",function(i){return l(e),c(i.stopPropagation())})("pointerup",function(i){return l(e),c(i.stopPropagation())}),v(1,_t,1,4,"snippyly-transcription-embed",49),d()}if(n&2){let e=a();m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.showTranscriptionButton)}}var Ot=(()=>{let r=class r{constructor(t,i,o){this.analyticsService=t,this.loggingService=i,this.chunkLoaderService=o,this.showControls=!0,this.showSubtitlesButton=!0,this.showTranscriptionButton=!0,this.transcriptionMode="floating",this.play=new C,this.pause=new C,this.delete=new C,this.transcriptionButtonClick=new C,this.transcriptionSummaryCopy=new C,this.subtitlesButtonClick=new C,this.transcriptionTimestampClick=new C,this.transcriptionPanelDragged=new C,this.playing=!1,this.currentTime="",this.showSubtitles=!1,this.transcriptionVisible=!1,this.veltElement=!0}ngOnInit(){this.annotation?.transcription&&this.ensureRecorderChunkForEmbeds()}ensureRecorderChunkForEmbeds(){this.chunkLoaderService.ensureRecorderChunk().catch(t=>{this.loggingService.catch("Error in VideoPlayerComponent ensureRecorderChunkForEmbeds: ",t)})}trackByAttachmentId(t,i){return i?.attachmentId}toggleVideo(){try{if(this.videoRef?.nativeElement){let t=this.videoRef?.nativeElement;t&&(t.duration>0&&!t.paused?(t.pause(),this.playing=!1,this.pause.emit()):(t.play(),this.playing=!0,this.play.emit()))}}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleVideo: ",t)}}toggleSubtitles(){try{this.ensureRecorderChunkForEmbeds(),this.showSubtitles=!this.showSubtitles}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleSubtitles: ",t)}}toggleTranscription(){try{this.ensureRecorderChunkForEmbeds(),this.transcriptionVisible=!this.transcriptionVisible}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleTranscription: ",t)}}onTranscriptionButtonClick(t){try{this.transcriptionButtonClick.emit(),t&&this.toggleTranscription()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionButtonClick: ",i)}}onTranscriptionSummaryCopy(){try{this.transcriptionSummaryCopy.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionSummaryCopy: ",t)}}onSubtitlesButtonClick(t){try{this.subtitlesButtonClick.emit(),t&&this.toggleSubtitles()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onSubtitlesButtonClick: ",i)}}onDurationChange(t){try{t?.target?.value>=0&&this.videoRef&&(this.videoRef.nativeElement.currentTime=t.target.value*(this.annotation?.recordedTime?.duration||0)/1e3),this.playing||this.toggleVideo()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onDurationChange: ",i)}}timeUpdate(t){try{this.currentTime=this.formatSecondsAsTime(t)}catch(i){this.loggingService.catch("Error in VideoPlayerComponent timeUpdate: ",i)}}formatSecondsAsTime(t){try{let i=Math.floor(t/3600),o=Math.floor((t-i*3600)/60),s=Math.floor(t-i*3600-o*60);return i&&i<10&&(i="0"+i),o<10&&(o="0"+o),s<10&&(s="0"+s),(i?i+":":"")+o+":"+s}catch(i){return this.loggingService.catch("Error in VideoPlayerComponent formatSecondsAsTime: ",i),""}}onSeekToVideo(t,i){try{i&&(i.currentTime=t),this.playing||this.toggleVideo(),this.onTranscriptionTimestampClick(t)}catch(o){this.loggingService.catch("Error in VideoPlayerComponent onSeekToVideo: ",o)}}onTranscriptionTimestampClick(t){try{this.transcriptionTimestampClick.emit(t)}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionTimestampClick: ",i)}}onTranscriptionPanelDragged(){try{this.transcriptionPanelDragged.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionPanelDragged: ",t)}}onDelete(){try{this.delete?.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onDelete: ",t)}}};r.\u0275fac=function(i){return new(i||r)(S(Q),S(O),S(J))},r.\u0275cmp=H({type:r,selectors:[["snippyly-video-player"]],viewQuery:function(i,o){if(i&1&&Z(et,5),i&2){let s;A(s=q())&&(o.videoRef=s.first)}},hostVars:1,hostBindings:function(i,o){i&2&&L("data-velt-element",o.veltElement)},inputs:{annotation:"annotation",showControls:"showControls",showSubtitlesButton:"showSubtitlesButton",showTranscriptionButton:"showTranscriptionButton",showDeleteButton:"showDeleteButton",transcriptionMode:"transcriptionMode"},outputs:{play:"play",pause:"pause",delete:"delete",transcriptionButtonClick:"transcriptionButtonClick",transcriptionSummaryCopy:"transcriptionSummaryCopy",subtitlesButtonClick:"subtitlesButtonClick",transcriptionTimestampClick:"transcriptionTimestampClick",transcriptionPanelDragged:"transcriptionPanelDragged"},standalone:!1,decls:9,vars:8,consts:[["videoRef",""],["subtitlesRef",""],[1,"s-video-player-container"],[1,"s-video-player",3,"click","pointerdown","pointerup"],["playsinline","",3,"timeupdate","pointerdown","poster"],["type","video/mp4",3,"src",4,"ngIf"],[3,"ngIf"],["class","s-video-subtitles-wrap",3,"hide",4,"ngIf"],["class","s-video-controls-wrap",4,"ngIf"],["class","s-video-transcription",3,"click","pointerdown","pointerup",4,"ngIf"],["type","video/mp4",3,"src"],[3,"src","type",4,"ngFor","ngForOf","ngForTrackBy"],[3,"src","type"],[1,"s-video-subtitles-wrap"],[1,"subtitles"],[3,"subtitlesButtonClick","transcription","timeToRead","mode"],[1,"s-video-controls-wrap"],[1,"s-video-progress-bar"],["type","range","min","0","max","1","step","0.01",3,"value","input",4,"ngIf"],[1,"s-video-controls"],[1,"s-video-controls-left"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],[1,"s-video-controls-right"],["class","s-video-subtitles-btn s-tooltip",3,"disabled",4,"ngIf"],["class","s-video-transcription-btn s-tooltip",3,"disabled","click",4,"ngIf"],[3,"transcription","timeToRead","transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged",4,"ngIf"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","class","delete-btn",3,"click",4,"ngIf"],["type","range","min","0","max","1","step","0.01",3,"input","value"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M3.08337 3.65485C3.08337 1.69607 5.23378 0.498172 6.89926 1.52918L17.1496 7.87464C18.7284 8.852 18.7284 11.1486 17.1496 12.126L6.89926 18.4714C5.23378 19.5024 3.08337 18.3045 3.08337 16.3458V3.65485Z","fill","white"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M1.33203 2.66536C1.33203 1.92899 1.92898 1.33203 2.66536 1.33203H5.33203C6.06841 1.33203 6.66536 1.92898 6.66536 2.66536V13.332C6.66536 14.0684 6.06841 14.6654 5.33203 14.6654H2.66536C1.92898 14.6654 1.33203 14.0684 1.33203 13.332V2.66536Z","fill","white"],["d","M9.33203 2.66536C9.33203 1.92899 9.92899 1.33203 10.6654 1.33203H13.332C14.0684 1.33203 14.6654 1.92898 14.6654 2.66536V13.332C14.6654 14.0684 14.0684 14.6654 13.332 14.6654H10.6654C9.92899 14.6654 9.33203 14.0684 9.33203 13.332V2.66536Z","fill","white"],[1,"s-video-subtitles-btn","s-tooltip"],["class","s-tooltiptext top",4,"ngIf"],["width","20","height","21","viewBox","0 0 20 21","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M11.47 7.62875C11.893 7.41764 12.3718 7.34543 12.8382 7.42242C13.3046 7.49941 13.7348 7.72166 14.0675 8.0575C14.1849 8.17486 14.2508 8.33403 14.2508 8.5C14.2508 8.66597 14.1849 8.82514 14.0675 8.9425C13.9501 9.05986 13.791 9.12579 13.625 9.12579C13.459 9.12579 13.2999 9.05986 13.1825 8.9425C13.0358 8.79219 12.8452 8.69223 12.6382 8.65697C12.4311 8.62171 12.2182 8.65297 12.03 8.74625C11.6712 8.92625 11.25 9.41875 11.25 10.5C11.25 11.5813 11.6712 12.075 12.03 12.2537C12.2182 12.347 12.4311 12.3783 12.6382 12.343C12.8452 12.3078 13.0358 12.2078 13.1825 12.0575C13.2999 11.9401 13.459 11.8742 13.625 11.8742C13.791 11.8742 13.9501 11.9401 14.0675 12.0575C14.1849 12.1749 14.2508 12.334 14.2508 12.5C14.2508 12.666 14.1849 12.8251 14.0675 12.9425C13.38 13.63 12.34 13.8062 11.47 13.3713C10.5787 12.9262 10 11.9187 10 10.5C10 9.08125 10.5787 8.075 11.47 7.62875ZM9.0675 8.0575C8.73492 7.72149 8.3047 7.49913 7.83824 7.42213C7.37178 7.34514 6.89292 7.41745 6.47 7.62875C5.57875 8.07375 5 9.08125 5 10.5C5 11.9187 5.57875 12.925 6.47 13.3713C6.89292 13.5826 7.37178 13.6549 7.83824 13.5779C8.3047 13.5009 8.73492 13.2785 9.0675 12.9425C9.12561 12.8844 9.1717 12.8154 9.20315 12.7395C9.2346 12.6636 9.25079 12.5822 9.25079 12.5C9.25079 12.4178 9.2346 12.3364 9.20315 12.2605C9.1717 12.1846 9.12561 12.1156 9.0675 12.0575C9.00939 11.9994 8.9404 11.9533 8.86448 11.9218C8.78855 11.8904 8.70718 11.8742 8.625 11.8742C8.54282 11.8742 8.46144 11.8904 8.38552 11.9218C8.3096 11.9533 8.24061 11.9994 8.1825 12.0575C8.03568 12.2076 7.84513 12.3075 7.63811 12.3427C7.4311 12.378 7.21823 12.3468 7.03 12.2537C6.67125 12.0738 6.25 11.5813 6.25 10.5C6.25 9.41875 6.67125 8.925 7.03 8.74625C7.21823 8.65316 7.4311 8.62201 7.63811 8.65726C7.84513 8.69251 8.03568 8.79236 8.1825 8.9425C8.29986 9.05986 8.45903 9.12579 8.625 9.12579C8.79097 9.12579 8.95014 9.05986 9.0675 8.9425C9.18486 8.82514 9.25079 8.66597 9.25079 8.5C9.25079 8.33403 9.18486 8.17486 9.0675 8.0575ZM1.25 7.375C1.25 6.5462 1.57924 5.75134 2.16529 5.16529C2.75134 4.57924 3.5462 4.25 4.375 4.25H15.625C16.4538 4.25 17.2487 4.57924 17.8347 5.16529C18.4208 5.75134 18.75 6.5462 18.75 7.375V13.625C18.75 14.4538 18.4208 15.2487 17.8347 15.8347C17.2487 16.4208 16.4538 16.75 15.625 16.75H4.375C3.5462 16.75 2.75134 16.4208 2.16529 15.8347C1.57924 15.2487 1.25 14.4538 1.25 13.625V7.375ZM4.375 5.5C3.87772 5.5 3.40081 5.69754 3.04917 6.04917C2.69754 6.40081 2.5 6.87772 2.5 7.375V13.625C2.5 14.1223 2.69754 14.5992 3.04917 14.9508C3.40081 15.3025 3.87772 15.5 4.375 15.5H15.625C16.1223 15.5 16.5992 15.3025 16.9508 14.9508C17.3025 14.5992 17.5 14.1223 17.5 13.625V7.375C17.5 6.87772 17.3025 6.40081 16.9508 6.04917C16.5992 5.69754 16.1223 5.5 15.625 5.5H4.375Z","fill","white"],[1,"s-tooltiptext","top"],[1,"s-video-transcription-btn","s-tooltip",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.49997 10.8332C9.34164 10.8332 10.8333 9.3415 10.8333 7.49984C10.8333 5.65817 9.34164 4.1665 7.49997 4.1665C5.65831 4.1665 4.16664 5.65817 4.16664 7.49984C4.16664 9.3415 5.65831 10.8332 7.49997 10.8332ZM7.49997 5.83317C8.41664 5.83317 9.16664 6.58317 9.16664 7.49984C9.16664 8.4165 8.41664 9.1665 7.49997 9.1665C6.58331 9.1665 5.83331 8.4165 5.83331 7.49984C5.83331 6.58317 6.58331 5.83317 7.49997 5.83317ZM12.825 12.9665C11.425 12.2498 9.60831 11.6665 7.49997 11.6665C5.39164 11.6665 3.57497 12.2498 2.17497 12.9665C1.76835 13.1759 1.42772 13.4939 1.19089 13.8852C0.954055 14.2765 0.830281 14.7258 0.833306 15.1832V17.4998H14.1666V15.1832C14.1666 14.2498 13.6583 13.3915 12.825 12.9665ZM12.5 15.8332H2.49997V15.1832C2.49997 14.8665 2.66664 14.5832 2.93331 14.4498C3.92497 13.9415 5.52497 13.3332 7.49997 13.3332C9.47497 13.3332 11.075 13.9415 12.0666 14.4498C12.3333 14.5832 12.5 14.8665 12.5 15.1832V15.8332ZM14.9416 13.3332L16.3 11.9748C13.9916 9.45817 13.9916 5.67484 16.3 3.02484L14.9416 1.6665C11.6916 4.90817 11.6833 9.95817 14.9416 13.3332ZM19.1 9.12484C18.7587 8.65332 18.5749 8.08609 18.5749 7.504C18.5749 6.92192 18.7587 6.35469 19.1 5.88317L17.7 4.47484C16.0166 6.15817 16.0166 8.69984 17.7 10.5332L19.1 9.12484Z","fill","white"],[3,"transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged","transcription","timeToRead"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",1,"delete-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.28702 4.66602V12.2851C4.28702 13.1266 5.01189 13.8089 5.90606 13.8089H10.7632C11.6574 13.8089 12.3823 13.1266 12.3823 12.2851V4.66602H14.0013V12.2851C14.0013 13.9682 12.5516 15.3327 10.7632 15.3327H5.90606C4.11771 15.3327 2.66797 13.9682 2.66797 12.2851V4.66602H4.28702Z","fill","#FF7162"],["d","M6.77778 6.66602C6.34822 6.66602 6 7.06398 6 7.5549V11.1105C6 11.6014 6.34822 11.9993 6.77778 11.9993C7.20733 11.9993 7.55556 11.6014 7.55556 11.1105V7.5549C7.55556 7.06398 7.20733 6.66602 6.77778 6.66602Z","fill","#FF7162"],["d","M9.88889 6.66602C9.45933 6.66602 9.11111 7.06398 9.11111 7.5549V11.1105C9.11111 11.6014 9.45933 11.9993 9.88889 11.9993C10.3184 11.9993 10.6667 11.6014 10.6667 11.1105V7.5549C10.6667 7.06398 10.3184 6.66602 9.88889 6.66602Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.16667 3.11111V2.33333C5.16667 1.04467 6.22999 0 7.54167 0H9.125C10.4367 0 11.5 1.04467 11.5 2.33333V3.11111H13.875C14.3122 3.11111 14.6667 3.45933 14.6667 3.88889C14.6667 4.31844 14.3122 4.66667 13.875 4.66667H2.79167C2.35444 4.66667 2 4.31844 2 3.88889C2 3.45933 2.35444 3.11111 2.79167 3.11111H5.16667ZM6.75 2.33333C6.75 1.90378 7.10444 1.55556 7.54167 1.55556H9.125C9.56223 1.55556 9.91667 1.90378 9.91667 2.33333V3.11111H6.75V2.33333Z","fill","#FF7162"],[1,"s-video-transcription",3,"click","pointerdown","pointerup"],[3,"transcription","timeToRead","mode","visible","seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged",4,"ngIf"],[3,"seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged","transcription","timeToRead","mode","visible"]],template:function(i,o){if(i&1){let s=_();u(0,"div",2)(1,"div",3),g("click",function(h){return l(s),c(h.stopPropagation())})("pointerdown",function(h){return l(s),c(h.stopPropagation())})("pointerup",function(h){return l(s),c(h.stopPropagation())}),u(2,"video",4,0),g("timeupdate",function(){l(s);let h=f(3);return c(o.timeUpdate(h==null?null:h.currentTime))})("pointerdown",function(){return l(s),c(o.toggleVideo())}),v(4,it,1,1,"source",5)(5,ot,2,4,"ng-template",6),d(),v(6,rt,4,5,"div",7)(7,gt,14,8,"div",8),d(),v(8,vt,2,1,"div",9),d()}i&2&&(m(2),b("flip",(o.annotation==null?null:o.annotation.recordingType)==="video"),p("poster",(o.annotation==null||o.annotation.attachment==null?null:o.annotation.attachment.thumbnail)||(!(o.annotation==null||o.annotation.attachments==null)&&o.annotation.attachments.length?o.annotation==null||o.annotation.attachments[0]==null?null:o.annotation.attachments[0].thumbnail:"")),m(2),p("ngIf",!(!(o.annotation==null||o.annotation.attachments==null)&&o.annotation.attachments.length)&&(o.annotation==null?null:o.annotation.attachment)),m(),p("ngIf",o.annotation==null||o.annotation.attachments==null?null:o.annotation.attachments.length),m(),p("ngIf",o.showSubtitles),m(),p("ngIf",o.showControls),m(),p("ngIf",o.transcriptionVisible))},dependencies:[z,G,$,W],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#fff!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-video-player[_ngcontent-%COMP%]{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;background-color:#d3d3d3!important}.s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;height:100%!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important}.controls-wrap[_ngcontent-%COMP%]{position:absolute!important;bottom:0!important;display:flex!important;justify-content:space-between!important;align-items:center!important;width:80%!important;padding:1em!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#fff!important}.controls[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.line[_ngcontent-%COMP%]{position:absolute!important;bottom:100%!important;width:90%!important;display:flex!important;align-items:center!important}.line[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important}.s-video-subtitles-wrap[_ngcontent-%COMP%]{position:absolute;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;max-width:90%!important;bottom:10%!important;left:50%!important;transform:translate(-50%)!important;transition:bottom .3s!important}.s-video-subtitles-wrap[_ngcontent-%COMP%] .subtitles[_ngcontent-%COMP%]{background:#141416!important;border-radius:calc((.6rem + 0px) * var(--velt-base-rem-unit))!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;text-align:center!important}.s-video-subtitles-wrap.hide[_ngcontent-%COMP%]{display:none!important}svg[_ngcontent-%COMP%]{cursor:pointer!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-subtitles-wrap[_ngcontent-%COMP%]{bottom:calc(10% + 80px)!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-controls-wrap[_ngcontent-%COMP%]{opacity:1!important}.s-video-controls-wrap[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;position:absolute!important;z-index:10!important;bottom:0!important;width:100%!important;border-bottom-left-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-bottom-right-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;overflow:hidden!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;opacity:0!important;transition:opacity .3s!important;background:#141416!important;background:linear-gradient(0deg,#141416,#37373700)!important;padding-top:calc((5rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-progress-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important;accent-color:#625DF5!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-left[_ngcontent-%COMP%]{display:flex!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-right[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-player-container[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box!important;display:flex!important;gap:2rem!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%]{flex:1 1 100%!important;height:100%!important;background-color:#141416!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-transcription[_ngcontent-%COMP%]{flex:0 0 auto!important;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;height:100%!important;overflow:hidden!important}.s-video-subtitles-btn[_ngcontent-%COMP%], .s-video-transcription-btn[_ngcontent-%COMP%]{display:flex!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{cursor:not-allowed!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#80808a!important}"],changeDetection:0});let n=r;return n})();var It=(()=>{let r=class r{transform(t){try{if(!t||t<0||!isFinite(t))return"00:00:00";let i=Math.floor(t/1e3),o=Math.floor(i/3600),s=Math.floor(i%3600/60),P=i%60,h=j=>isNaN(j)?"00":j.toString().padStart(2,"0"),V=h(o),x=h(s),K=h(P);return`${V}:${x}:${K}`}catch(i){return console.error("Error in hourMinSecTimeDisplay pipe:",i),null}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275pipe=k({name:"hourMinSecTimeDisplay",type:r,pure:!0});let n=r;return n})();export{W as a,Ot as b,It as c,J as d};
|
|
1
|
+
import{b as $}from"./chunk-N72BHERH.js";import{$ as D,Db as Z,Eb as A,Fa as m,Fb as q,Fc as z,Ga as C,Gc as G,Ib as f,Kb as b,Ke as U,Nb as T,Ob as N,Pa as S,Pb as I,Ua as H,Xa as k,_a as v,ca as B,db as L,ha as l,ia as c,ja as w,ji as Q,kc as M,ki as O,la as F,lb as p,lc as E,mb as u,nb as d,ob as y,vb as _,xb as g,zb as a}from"./chunk-KWXZADQY.js";var W=(()=>{let r=class r{transform(t,i,...o){try{let s=t&&t?.slice?t?.slice():[];return s?.length&&new U().getBrowserName()?.toLocaleLowerCase()==="safari"&&(s=s.sort((V,x)=>V.type==="mp4"&&x.type!=="mp4"?-1:V.type!=="mp4"&&x.type==="mp4"?1:0)),s}catch{return t}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275pipe=k({name:"rearrangeMediaSource",type:r,pure:!0});let n=r;return n})();var J=(()=>{let r=class r{constructor(t,i){this.injector=t,this.loggingService=i,this.arrowPromise=null,this.commentPromise=null,this.cursorPromise=null,this.huddlePromise=null,this.notificationPromise=null,this.presencePromise=null,this.reactionPromise=null,this.recorderPromise=null,this.tagPromise=null,this.rewriterPromise=null,this.selectionPromise=null,this.areaPromise=null,this.activityLogPromise=null,this.viewPromise=null,this.userInvitePromise=null,this.userRequestPromise=null,this.videoPlayerPromise=null,this.crdtPromise=null,this.liveStateSyncPromise=null,this.loggingService.log("%c[WB] Creating CLASS: ChunkLoaderService","color: blue;")}ensureArrowChunk(){return this.arrowPromise||(this.arrowPromise=import("./velt-arrow.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading arrow chunk: ",t),this.arrowPromise=null,t})),this.arrowPromise}ensureCommentChunk(){return this.commentPromise||(this.commentPromise=import("./velt-comment.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading comment chunk: ",t),this.commentPromise=null,t})),this.commentPromise}ensureCursorChunk(){return this.cursorPromise||(this.cursorPromise=import("./velt-cursor.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading cursor chunk: ",t),this.cursorPromise=null,t})),this.cursorPromise}ensureHuddleChunk(){return this.huddlePromise||(this.huddlePromise=import("./velt-huddle.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading huddle chunk: ",t),this.huddlePromise=null,t})),this.huddlePromise}ensureNotificationChunk(){return this.notificationPromise||(this.notificationPromise=import("./velt-notification.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading notification chunk: ",t),this.notificationPromise=null,t})),this.notificationPromise}ensurePresenceChunk(){return this.presencePromise||(this.presencePromise=import("./velt-presence.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading presence chunk: ",t),this.presencePromise=null,t})),this.presencePromise}ensureReactionChunk(){return this.reactionPromise||(this.reactionPromise=import("./velt-reaction.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading reaction chunk: ",t),this.reactionPromise=null,t})),this.reactionPromise}ensureRecorderChunk(){return this.recorderPromise||(this.recorderPromise=import("./velt-recorder.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading recorder chunk: ",t),this.recorderPromise=null,t})),this.recorderPromise}ensureTagChunk(){return this.tagPromise||(this.tagPromise=import("./velt-tag.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading tag chunk: ",t),this.tagPromise=null,t})),this.tagPromise}ensureRewriterChunk(){return this.rewriterPromise||(this.rewriterPromise=import("./velt-rewriter.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading rewriter chunk: ",t),this.rewriterPromise=null,t})),this.rewriterPromise}ensureSelectionChunk(){return this.selectionPromise||(this.selectionPromise=import("./velt-selection.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading selection chunk: ",t),this.selectionPromise=null,t})),this.selectionPromise}ensureAreaChunk(){return this.areaPromise||(this.areaPromise=import("./velt-area.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading area chunk: ",t),this.areaPromise=null,t})),this.areaPromise}ensureActivityLogChunk(){return this.activityLogPromise||(this.activityLogPromise=import("./velt-activity-log.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading activity-log chunk: ",t),this.activityLogPromise=null,t})),this.activityLogPromise}ensureViewChunk(){return this.viewPromise||(this.viewPromise=import("./velt-views.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading view chunk: ",t),this.viewPromise=null,t})),this.viewPromise}ensureUserInviteChunk(){return this.userInvitePromise||(this.userInvitePromise=import("./velt-user-invite.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading user-invite chunk: ",t),this.userInvitePromise=null,t})),this.userInvitePromise}ensureUserRequestChunk(){return this.userRequestPromise||(this.userRequestPromise=import("./velt-user-request.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading user-request chunk: ",t),this.userRequestPromise=null,t})),this.userRequestPromise}ensureVideoPlayerChunk(){return this.videoPlayerPromise||(this.videoPlayerPromise=import("./velt-video-player.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading video-player chunk: ",t),this.videoPlayerPromise=null,t})),this.videoPlayerPromise}ensureCrdtChunk(){return this.crdtPromise||(this.crdtPromise=import("./velt-crdt.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading crdt chunk: ",t),this.crdtPromise=null,t})),this.crdtPromise}ensureLiveStateSyncChunk(){return this.liveStateSyncPromise||(this.liveStateSyncPromise=import("./velt-live-state-sync.js").then(t=>t.default(this.injector)).catch(t=>{throw this.loggingService.catch("Error loading live-state-sync chunk: ",t),this.liveStateSyncPromise=null,t})),this.liveStateSyncPromise}};r.\u0275fac=function(i){return new(i||r)(B(F),B(O))},r.\u0275prov=D({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var et=["videoRef"];function it(n,r){if(n&1&&y(0,"source",10),n&2){let e=a();p("src",!(e.annotation==null||e.annotation.attachment==null)&&e.annotation.attachment.thumbnail?e.annotation==null||e.annotation.attachment==null?null:e.annotation.attachment.url:(e.annotation==null||e.annotation.attachment==null?null:e.annotation.attachment.url)+"#t=0.001")}}function nt(n,r){if(n&1&&y(0,"source",12),n&2){let e=r.$implicit;p("src",e==null?null:e.url)("type",(e==null?null:e.mimeType)||"video/mp4")}}function ot(n,r){if(n&1&&(v(0,nt,1,2,"source",11),M(1,"rearrangeMediaSource")),n&2){let e=a();p("ngForOf",E(1,2,e.annotation==null?null:e.annotation.attachments))("ngForTrackBy",e.trackByAttachmentId)}}function rt(n,r){if(n&1){let e=_();u(0,"div",13)(1,"div",14)(2,"snippyly-subtitles-embed",15,1),g("subtitlesButtonClick",function(){l(e);let i=a();return c(i.onSubtitlesButtonClick())}),d()()()}if(n&2){let e,t=f(3),i=a(),o=f(3);b("hide",(t==null?null:t.componentConfigSignal)&&(t==null||(e=t.componentConfigSignal())==null?null:e.highlightedTextIndex)<0),m(2),p("transcription",i.annotation==null?null:i.annotation.transcription)("timeToRead",(o==null?null:o.currentTime)||0)("mode","embed")}}function at(n,r){if(n&1){let e=_();u(0,"input",28),g("input",function(i){l(e);let o=a(2);return c(o.onDurationChange(i))}),d()}if(n&2){let e=a(2),t=f(3);p("value",(t==null?null:t.currentTime)*1e3/((e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.duration)||0))}}function st(n,r){if(n&1){let e=_();w(),u(0,"svg",29),g("click",function(){l(e);let i=a(2);return c(i.toggleVideo())}),y(1,"path",30),d()}}function lt(n,r){if(n&1){let e=_();w(),u(0,"svg",31),g("click",function(){l(e);let i=a(2);return c(i.toggleVideo())}),y(1,"path",32)(2,"path",33),d()}}function ct(n,r){n&1&&(u(0,"span",38),T(1),M(2,"translate"),d()),n&2&&(m(),I(" ",E(2,1,"Subtitles not available")," "))}function pt(n,r){if(n&1){let e=_();u(0,"div",34),v(1,ct,3,3,"span",35),w(),u(2,"svg",36),g("click",function(){l(e);let i=a(2);return c(!(i.annotation==null||i.annotation.transcription==null)&&i.annotation.transcription.transcriptedText?i.onSubtitlesButtonClick(!0):null)}),y(3,"path",37),d()()}if(n&2){let e=a(2);b("disabled",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText)),m(),p("ngIf",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText))}}function mt(n,r){n&1&&(u(0,"span",38),T(1),M(2,"translate"),d()),n&2&&(m(),I(" ",E(2,1,"Transcription not available")))}function ut(n,r){if(n&1){let e=_();u(0,"div",39),g("click",function(){l(e);let i=a(2);return c(!(i.annotation==null||i.annotation.transcription==null)&&i.annotation.transcription.transcriptedText?i.onTranscriptionButtonClick(!0):null)}),v(1,mt,3,3,"span",35),w(),u(2,"svg",40),y(3,"path",41),d()()}if(n&2){let e=a(2);b("disabled",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText)),m(),p("ngIf",!(!(e.annotation==null||e.annotation.transcription==null)&&e.annotation.transcription.transcriptedText))}}function dt(n,r){if(n&1){let e=_();u(0,"snippyly-transcription-embed",42),g("transcriptionButtonClick",function(){l(e);let i=a(2);return c(i.onTranscriptionButtonClick())})("transcriptionSummaryCopy",function(){l(e);let i=a(2);return c(i.onTranscriptionSummaryCopy())})("seekTo",function(i){l(e);let o=a(2),s=f(3);return c(o.onSeekToVideo(i,s))})("transcriptionPanelDragged",function(){l(e);let i=a(2);return c(i.onTranscriptionPanelDragged())}),d()}if(n&2){let e=a(2),t=f(3);p("transcription",e.annotation==null?null:e.annotation.transcription)("timeToRead",(t==null?null:t.currentTime)||0)}}function ht(n,r){if(n&1){let e=_();w(),u(0,"svg",43),g("click",function(){l(e);let i=a(2);return c(i.onDelete())}),y(1,"path",44)(2,"path",45)(3,"path",46)(4,"path",47),d()}}function gt(n,r){if(n&1&&(u(0,"div",16)(1,"div",17),v(2,at,1,1,"input",18),d(),u(3,"div",19)(4,"div",20),v(5,st,2,0,"svg",21)(6,lt,3,0,"svg",22),u(7,"span"),T(8),d()(),u(9,"div",23),v(10,pt,4,3,"div",24)(11,ut,4,3,"div",25)(12,dt,1,2,"snippyly-transcription-embed",26)(13,ht,5,0,"svg",27),d()()()),n&2){let e=a();m(2),p("ngIf",e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.duration),m(3),p("ngIf",!e.playing),m(),p("ngIf",e.playing),m(2),N(e.currentTime||(e.annotation==null||e.annotation.recordedTime==null?null:e.annotation.recordedTime.display)||"00:00"),m(2),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.showSubtitlesButton),m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.transcriptionMode==="embed"),m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.transcriptionMode==="floating"&&e.showTranscriptionButton),m(),p("ngIf",e.showDeleteButton)}}function _t(n,r){if(n&1){let e=_();u(0,"snippyly-transcription-embed",50),g("seekTo",function(i){l(e);let o=a(2),s=f(3);return c(o.onSeekToVideo(i,s))})("close",function(){l(e);let i=a(2);return c(i.toggleTranscription())})("transcriptionSummaryCopy",function(){l(e);let i=a(2);return c(i.onTranscriptionSummaryCopy())})("transcriptionPanelDragged",function(){l(e);let i=a(2);return c(i.onTranscriptionPanelDragged())}),d()}if(n&2){let e=a(2),t=f(3);p("transcription",e.annotation==null?null:e.annotation.transcription)("timeToRead",(t==null?null:t.currentTime)||0)("mode",e.transcriptionMode)("visible",!0)}}function vt(n,r){if(n&1){let e=_();u(0,"div",48),g("click",function(i){return l(e),c(i.stopPropagation())})("pointerdown",function(i){return l(e),c(i.stopPropagation())})("pointerup",function(i){return l(e),c(i.stopPropagation())}),v(1,_t,1,4,"snippyly-transcription-embed",49),d()}if(n&2){let e=a();m(),p("ngIf",(e.annotation==null?null:e.annotation.transcription)&&e.showTranscriptionButton)}}var Ot=(()=>{let r=class r{constructor(t,i,o){this.analyticsService=t,this.loggingService=i,this.chunkLoaderService=o,this.showControls=!0,this.showSubtitlesButton=!0,this.showTranscriptionButton=!0,this.transcriptionMode="floating",this.play=new C,this.pause=new C,this.delete=new C,this.transcriptionButtonClick=new C,this.transcriptionSummaryCopy=new C,this.subtitlesButtonClick=new C,this.transcriptionTimestampClick=new C,this.transcriptionPanelDragged=new C,this.playing=!1,this.currentTime="",this.showSubtitles=!1,this.transcriptionVisible=!1,this.veltElement=!0}ngOnInit(){this.annotation?.transcription&&this.ensureRecorderChunkForEmbeds()}ensureRecorderChunkForEmbeds(){this.chunkLoaderService.ensureRecorderChunk().catch(t=>{this.loggingService.catch("Error in VideoPlayerComponent ensureRecorderChunkForEmbeds: ",t)})}trackByAttachmentId(t,i){return i?.attachmentId}toggleVideo(){try{if(this.videoRef?.nativeElement){let t=this.videoRef?.nativeElement;t&&(t.duration>0&&!t.paused?(t.pause(),this.playing=!1,this.pause.emit()):(t.play(),this.playing=!0,this.play.emit()))}}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleVideo: ",t)}}toggleSubtitles(){try{this.ensureRecorderChunkForEmbeds(),this.showSubtitles=!this.showSubtitles}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleSubtitles: ",t)}}toggleTranscription(){try{this.ensureRecorderChunkForEmbeds(),this.transcriptionVisible=!this.transcriptionVisible}catch(t){this.loggingService.catch("Error in VideoPlayerComponent toggleTranscription: ",t)}}onTranscriptionButtonClick(t){try{this.transcriptionButtonClick.emit(),t&&this.toggleTranscription()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionButtonClick: ",i)}}onTranscriptionSummaryCopy(){try{this.transcriptionSummaryCopy.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionSummaryCopy: ",t)}}onSubtitlesButtonClick(t){try{this.subtitlesButtonClick.emit(),t&&this.toggleSubtitles()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onSubtitlesButtonClick: ",i)}}onDurationChange(t){try{t?.target?.value>=0&&this.videoRef&&(this.videoRef.nativeElement.currentTime=t.target.value*(this.annotation?.recordedTime?.duration||0)/1e3),this.playing||this.toggleVideo()}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onDurationChange: ",i)}}timeUpdate(t){try{this.currentTime=this.formatSecondsAsTime(t)}catch(i){this.loggingService.catch("Error in VideoPlayerComponent timeUpdate: ",i)}}formatSecondsAsTime(t){try{let i=Math.floor(t/3600),o=Math.floor((t-i*3600)/60),s=Math.floor(t-i*3600-o*60);return i&&i<10&&(i="0"+i),o<10&&(o="0"+o),s<10&&(s="0"+s),(i?i+":":"")+o+":"+s}catch(i){return this.loggingService.catch("Error in VideoPlayerComponent formatSecondsAsTime: ",i),""}}onSeekToVideo(t,i){try{i&&(i.currentTime=t),this.playing||this.toggleVideo(),this.onTranscriptionTimestampClick(t)}catch(o){this.loggingService.catch("Error in VideoPlayerComponent onSeekToVideo: ",o)}}onTranscriptionTimestampClick(t){try{this.transcriptionTimestampClick.emit(t)}catch(i){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionTimestampClick: ",i)}}onTranscriptionPanelDragged(){try{this.transcriptionPanelDragged.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionPanelDragged: ",t)}}onDelete(){try{this.delete?.emit()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onDelete: ",t)}}};r.\u0275fac=function(i){return new(i||r)(S(Q),S(O),S(J))},r.\u0275cmp=H({type:r,selectors:[["snippyly-video-player"]],viewQuery:function(i,o){if(i&1&&Z(et,5),i&2){let s;A(s=q())&&(o.videoRef=s.first)}},hostVars:1,hostBindings:function(i,o){i&2&&L("data-velt-element",o.veltElement)},inputs:{annotation:"annotation",showControls:"showControls",showSubtitlesButton:"showSubtitlesButton",showTranscriptionButton:"showTranscriptionButton",showDeleteButton:"showDeleteButton",transcriptionMode:"transcriptionMode"},outputs:{play:"play",pause:"pause",delete:"delete",transcriptionButtonClick:"transcriptionButtonClick",transcriptionSummaryCopy:"transcriptionSummaryCopy",subtitlesButtonClick:"subtitlesButtonClick",transcriptionTimestampClick:"transcriptionTimestampClick",transcriptionPanelDragged:"transcriptionPanelDragged"},standalone:!1,decls:9,vars:8,consts:[["videoRef",""],["subtitlesRef",""],[1,"s-video-player-container"],[1,"s-video-player",3,"click","pointerdown","pointerup"],["playsinline","",3,"timeupdate","pointerdown","poster"],["type","video/mp4",3,"src",4,"ngIf"],[3,"ngIf"],["class","s-video-subtitles-wrap",3,"hide",4,"ngIf"],["class","s-video-controls-wrap",4,"ngIf"],["class","s-video-transcription",3,"click","pointerdown","pointerup",4,"ngIf"],["type","video/mp4",3,"src"],[3,"src","type",4,"ngFor","ngForOf","ngForTrackBy"],[3,"src","type"],[1,"s-video-subtitles-wrap"],[1,"subtitles"],[3,"subtitlesButtonClick","transcription","timeToRead","mode"],[1,"s-video-controls-wrap"],[1,"s-video-progress-bar"],["type","range","min","0","max","1","step","0.01",3,"value","input",4,"ngIf"],[1,"s-video-controls"],[1,"s-video-controls-left"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],[1,"s-video-controls-right"],["class","s-video-subtitles-btn s-tooltip",3,"disabled",4,"ngIf"],["class","s-video-transcription-btn s-tooltip",3,"disabled","click",4,"ngIf"],[3,"transcription","timeToRead","transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged",4,"ngIf"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","class","delete-btn",3,"click",4,"ngIf"],["type","range","min","0","max","1","step","0.01",3,"input","value"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M3.08337 3.65485C3.08337 1.69607 5.23378 0.498172 6.89926 1.52918L17.1496 7.87464C18.7284 8.852 18.7284 11.1486 17.1496 12.126L6.89926 18.4714C5.23378 19.5024 3.08337 18.3045 3.08337 16.3458V3.65485Z","fill","white"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M1.33203 2.66536C1.33203 1.92899 1.92898 1.33203 2.66536 1.33203H5.33203C6.06841 1.33203 6.66536 1.92898 6.66536 2.66536V13.332C6.66536 14.0684 6.06841 14.6654 5.33203 14.6654H2.66536C1.92898 14.6654 1.33203 14.0684 1.33203 13.332V2.66536Z","fill","white"],["d","M9.33203 2.66536C9.33203 1.92899 9.92899 1.33203 10.6654 1.33203H13.332C14.0684 1.33203 14.6654 1.92898 14.6654 2.66536V13.332C14.6654 14.0684 14.0684 14.6654 13.332 14.6654H10.6654C9.92899 14.6654 9.33203 14.0684 9.33203 13.332V2.66536Z","fill","white"],[1,"s-video-subtitles-btn","s-tooltip"],["class","s-tooltiptext top",4,"ngIf"],["width","20","height","21","viewBox","0 0 20 21","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M11.47 7.62875C11.893 7.41764 12.3718 7.34543 12.8382 7.42242C13.3046 7.49941 13.7348 7.72166 14.0675 8.0575C14.1849 8.17486 14.2508 8.33403 14.2508 8.5C14.2508 8.66597 14.1849 8.82514 14.0675 8.9425C13.9501 9.05986 13.791 9.12579 13.625 9.12579C13.459 9.12579 13.2999 9.05986 13.1825 8.9425C13.0358 8.79219 12.8452 8.69223 12.6382 8.65697C12.4311 8.62171 12.2182 8.65297 12.03 8.74625C11.6712 8.92625 11.25 9.41875 11.25 10.5C11.25 11.5813 11.6712 12.075 12.03 12.2537C12.2182 12.347 12.4311 12.3783 12.6382 12.343C12.8452 12.3078 13.0358 12.2078 13.1825 12.0575C13.2999 11.9401 13.459 11.8742 13.625 11.8742C13.791 11.8742 13.9501 11.9401 14.0675 12.0575C14.1849 12.1749 14.2508 12.334 14.2508 12.5C14.2508 12.666 14.1849 12.8251 14.0675 12.9425C13.38 13.63 12.34 13.8062 11.47 13.3713C10.5787 12.9262 10 11.9187 10 10.5C10 9.08125 10.5787 8.075 11.47 7.62875ZM9.0675 8.0575C8.73492 7.72149 8.3047 7.49913 7.83824 7.42213C7.37178 7.34514 6.89292 7.41745 6.47 7.62875C5.57875 8.07375 5 9.08125 5 10.5C5 11.9187 5.57875 12.925 6.47 13.3713C6.89292 13.5826 7.37178 13.6549 7.83824 13.5779C8.3047 13.5009 8.73492 13.2785 9.0675 12.9425C9.12561 12.8844 9.1717 12.8154 9.20315 12.7395C9.2346 12.6636 9.25079 12.5822 9.25079 12.5C9.25079 12.4178 9.2346 12.3364 9.20315 12.2605C9.1717 12.1846 9.12561 12.1156 9.0675 12.0575C9.00939 11.9994 8.9404 11.9533 8.86448 11.9218C8.78855 11.8904 8.70718 11.8742 8.625 11.8742C8.54282 11.8742 8.46144 11.8904 8.38552 11.9218C8.3096 11.9533 8.24061 11.9994 8.1825 12.0575C8.03568 12.2076 7.84513 12.3075 7.63811 12.3427C7.4311 12.378 7.21823 12.3468 7.03 12.2537C6.67125 12.0738 6.25 11.5813 6.25 10.5C6.25 9.41875 6.67125 8.925 7.03 8.74625C7.21823 8.65316 7.4311 8.62201 7.63811 8.65726C7.84513 8.69251 8.03568 8.79236 8.1825 8.9425C8.29986 9.05986 8.45903 9.12579 8.625 9.12579C8.79097 9.12579 8.95014 9.05986 9.0675 8.9425C9.18486 8.82514 9.25079 8.66597 9.25079 8.5C9.25079 8.33403 9.18486 8.17486 9.0675 8.0575ZM1.25 7.375C1.25 6.5462 1.57924 5.75134 2.16529 5.16529C2.75134 4.57924 3.5462 4.25 4.375 4.25H15.625C16.4538 4.25 17.2487 4.57924 17.8347 5.16529C18.4208 5.75134 18.75 6.5462 18.75 7.375V13.625C18.75 14.4538 18.4208 15.2487 17.8347 15.8347C17.2487 16.4208 16.4538 16.75 15.625 16.75H4.375C3.5462 16.75 2.75134 16.4208 2.16529 15.8347C1.57924 15.2487 1.25 14.4538 1.25 13.625V7.375ZM4.375 5.5C3.87772 5.5 3.40081 5.69754 3.04917 6.04917C2.69754 6.40081 2.5 6.87772 2.5 7.375V13.625C2.5 14.1223 2.69754 14.5992 3.04917 14.9508C3.40081 15.3025 3.87772 15.5 4.375 15.5H15.625C16.1223 15.5 16.5992 15.3025 16.9508 14.9508C17.3025 14.5992 17.5 14.1223 17.5 13.625V7.375C17.5 6.87772 17.3025 6.40081 16.9508 6.04917C16.5992 5.69754 16.1223 5.5 15.625 5.5H4.375Z","fill","white"],[1,"s-tooltiptext","top"],[1,"s-video-transcription-btn","s-tooltip",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.49997 10.8332C9.34164 10.8332 10.8333 9.3415 10.8333 7.49984C10.8333 5.65817 9.34164 4.1665 7.49997 4.1665C5.65831 4.1665 4.16664 5.65817 4.16664 7.49984C4.16664 9.3415 5.65831 10.8332 7.49997 10.8332ZM7.49997 5.83317C8.41664 5.83317 9.16664 6.58317 9.16664 7.49984C9.16664 8.4165 8.41664 9.1665 7.49997 9.1665C6.58331 9.1665 5.83331 8.4165 5.83331 7.49984C5.83331 6.58317 6.58331 5.83317 7.49997 5.83317ZM12.825 12.9665C11.425 12.2498 9.60831 11.6665 7.49997 11.6665C5.39164 11.6665 3.57497 12.2498 2.17497 12.9665C1.76835 13.1759 1.42772 13.4939 1.19089 13.8852C0.954055 14.2765 0.830281 14.7258 0.833306 15.1832V17.4998H14.1666V15.1832C14.1666 14.2498 13.6583 13.3915 12.825 12.9665ZM12.5 15.8332H2.49997V15.1832C2.49997 14.8665 2.66664 14.5832 2.93331 14.4498C3.92497 13.9415 5.52497 13.3332 7.49997 13.3332C9.47497 13.3332 11.075 13.9415 12.0666 14.4498C12.3333 14.5832 12.5 14.8665 12.5 15.1832V15.8332ZM14.9416 13.3332L16.3 11.9748C13.9916 9.45817 13.9916 5.67484 16.3 3.02484L14.9416 1.6665C11.6916 4.90817 11.6833 9.95817 14.9416 13.3332ZM19.1 9.12484C18.7587 8.65332 18.5749 8.08609 18.5749 7.504C18.5749 6.92192 18.7587 6.35469 19.1 5.88317L17.7 4.47484C16.0166 6.15817 16.0166 8.69984 17.7 10.5332L19.1 9.12484Z","fill","white"],[3,"transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged","transcription","timeToRead"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",1,"delete-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.28702 4.66602V12.2851C4.28702 13.1266 5.01189 13.8089 5.90606 13.8089H10.7632C11.6574 13.8089 12.3823 13.1266 12.3823 12.2851V4.66602H14.0013V12.2851C14.0013 13.9682 12.5516 15.3327 10.7632 15.3327H5.90606C4.11771 15.3327 2.66797 13.9682 2.66797 12.2851V4.66602H4.28702Z","fill","#FF7162"],["d","M6.77778 6.66602C6.34822 6.66602 6 7.06398 6 7.5549V11.1105C6 11.6014 6.34822 11.9993 6.77778 11.9993C7.20733 11.9993 7.55556 11.6014 7.55556 11.1105V7.5549C7.55556 7.06398 7.20733 6.66602 6.77778 6.66602Z","fill","#FF7162"],["d","M9.88889 6.66602C9.45933 6.66602 9.11111 7.06398 9.11111 7.5549V11.1105C9.11111 11.6014 9.45933 11.9993 9.88889 11.9993C10.3184 11.9993 10.6667 11.6014 10.6667 11.1105V7.5549C10.6667 7.06398 10.3184 6.66602 9.88889 6.66602Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.16667 3.11111V2.33333C5.16667 1.04467 6.22999 0 7.54167 0H9.125C10.4367 0 11.5 1.04467 11.5 2.33333V3.11111H13.875C14.3122 3.11111 14.6667 3.45933 14.6667 3.88889C14.6667 4.31844 14.3122 4.66667 13.875 4.66667H2.79167C2.35444 4.66667 2 4.31844 2 3.88889C2 3.45933 2.35444 3.11111 2.79167 3.11111H5.16667ZM6.75 2.33333C6.75 1.90378 7.10444 1.55556 7.54167 1.55556H9.125C9.56223 1.55556 9.91667 1.90378 9.91667 2.33333V3.11111H6.75V2.33333Z","fill","#FF7162"],[1,"s-video-transcription",3,"click","pointerdown","pointerup"],[3,"transcription","timeToRead","mode","visible","seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged",4,"ngIf"],[3,"seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged","transcription","timeToRead","mode","visible"]],template:function(i,o){if(i&1){let s=_();u(0,"div",2)(1,"div",3),g("click",function(h){return l(s),c(h.stopPropagation())})("pointerdown",function(h){return l(s),c(h.stopPropagation())})("pointerup",function(h){return l(s),c(h.stopPropagation())}),u(2,"video",4,0),g("timeupdate",function(){l(s);let h=f(3);return c(o.timeUpdate(h==null?null:h.currentTime))})("pointerdown",function(){return l(s),c(o.toggleVideo())}),v(4,it,1,1,"source",5)(5,ot,2,4,"ng-template",6),d(),v(6,rt,4,5,"div",7)(7,gt,14,8,"div",8),d(),v(8,vt,2,1,"div",9),d()}i&2&&(m(2),b("flip",(o.annotation==null?null:o.annotation.recordingType)==="video"),p("poster",(o.annotation==null||o.annotation.attachment==null?null:o.annotation.attachment.thumbnail)||(!(o.annotation==null||o.annotation.attachments==null)&&o.annotation.attachments.length?o.annotation==null||o.annotation.attachments[0]==null?null:o.annotation.attachments[0].thumbnail:"")),m(2),p("ngIf",!(!(o.annotation==null||o.annotation.attachments==null)&&o.annotation.attachments.length)&&(o.annotation==null?null:o.annotation.attachment)),m(),p("ngIf",o.annotation==null||o.annotation.attachments==null?null:o.annotation.attachments.length),m(),p("ngIf",o.showSubtitles),m(),p("ngIf",o.showControls),m(),p("ngIf",o.transcriptionVisible))},dependencies:[z,G,$,W],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#fff!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-video-player[_ngcontent-%COMP%]{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;background-color:#d3d3d3!important}.s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;height:100%!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important}.controls-wrap[_ngcontent-%COMP%]{position:absolute!important;bottom:0!important;display:flex!important;justify-content:space-between!important;align-items:center!important;width:80%!important;padding:1em!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#fff!important}.controls[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.line[_ngcontent-%COMP%]{position:absolute!important;bottom:100%!important;width:90%!important;display:flex!important;align-items:center!important}.line[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important}.s-video-subtitles-wrap[_ngcontent-%COMP%]{position:absolute;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;max-width:90%!important;bottom:10%!important;left:50%!important;transform:translate(-50%)!important;transition:bottom .3s!important}.s-video-subtitles-wrap[_ngcontent-%COMP%] .subtitles[_ngcontent-%COMP%]{background:#141416!important;border-radius:calc((.6rem + 0px) * var(--velt-base-rem-unit))!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;text-align:center!important}.s-video-subtitles-wrap.hide[_ngcontent-%COMP%]{display:none!important}svg[_ngcontent-%COMP%]{cursor:pointer!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-subtitles-wrap[_ngcontent-%COMP%]{bottom:calc(10% + 80px)!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-controls-wrap[_ngcontent-%COMP%]{opacity:1!important}.s-video-controls-wrap[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;position:absolute!important;z-index:10!important;bottom:0!important;width:100%!important;border-bottom-left-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-bottom-right-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;overflow:hidden!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;opacity:0!important;transition:opacity .3s!important;background:#141416!important;background:linear-gradient(0deg,#141416,#37373700)!important;padding-top:calc((5rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-progress-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important;accent-color:#625DF5!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-left[_ngcontent-%COMP%]{display:flex!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-right[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-player-container[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box!important;display:flex!important;gap:2rem!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%]{flex:1 1 100%!important;height:100%!important;background-color:#141416!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-transcription[_ngcontent-%COMP%]{flex:0 0 auto!important;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;height:100%!important;overflow:hidden!important}.s-video-subtitles-btn[_ngcontent-%COMP%], .s-video-transcription-btn[_ngcontent-%COMP%]{display:flex!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{cursor:not-allowed!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#80808a!important}"],changeDetection:0});let n=r;return n})();var It=(()=>{let r=class r{transform(t){try{if(!t||t<0||!isFinite(t))return"00:00:00";let i=Math.floor(t/1e3),o=Math.floor(i/3600),s=Math.floor(i%3600/60),P=i%60,h=j=>isNaN(j)?"00":j.toString().padStart(2,"0"),V=h(o),x=h(s),K=h(P);return`${V}:${x}:${K}`}catch(i){return console.error("Error in hourMinSecTimeDisplay pipe:",i),null}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275pipe=k({name:"hourMinSecTimeDisplay",type:r,pure:!0});let n=r;return n})();export{W as a,Ot as b,It as c,J as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as B,X as F,da as k,ea as Z,ga as A}from"./chunk-QLVK345H.js";import{$ as D,Fa as c,Ib as P,Pa as g,Ua as T,Ya as j,_a as p,_b as H,a as x,bc as M,ca as E,cc as R,db as C,fc as L,ki as b,l as _,lb as d,mb as y,nb as S,ob as w,qa as O,sb as f,tb as u,v as I,wa as W,zb as s}from"./chunk-3YCIOKO7.js";var N=(()=>{let o=class o{constructor(e){this.loggingService=e,this.wireframeMap=new _(new Map);try{this.loggingService.log("%c[WB] Creating CLASS: WireframeService","color: blue;")}catch(t){this.loggingService.catch("Error in WireframeService constructor: ",t)}}setWireframe(e,t){try{let r=this.wireframeMap.value,a=r.get(e),i=t.children.length>0||t.innerHTML?.trim()?.length>0,v=a&&(a.children.length>0||a.innerHTML?.trim()?.length>0);(!a||i&&!v)&&(r.set(e,t),this.wireframeMap.next(r))}catch(r){this.loggingService.catch("Error in WireframeService setWireframe: ",r)}}setWireframeMap(e){try{let t=this.wireframeMap.value;e.forEach((r,a)=>{let i=t.get(a),v=r.children.length>0||r.innerHTML?.trim()?.length>0,h=i&&(i.children.length>0||i.innerHTML?.trim()?.length>0);(!i||v&&!h)&&t.set(a,r)}),this.wireframeMap.next(t)}catch(t){this.loggingService.catch("Error in WireframeService setWireframeMap: ",t)}}getWireframe(e,t=!0){try{let r=this.wireframeMap.value,a=r.get(e);if(!a&&t){let i=e?.split("---")[0];i&&(a=r.get(i))}return a&&(a?.children?.length>0||a?.innerHTML?.trim()?.length>0)?a:void 0}catch(r){this.loggingService.catch("Error in WireframeService getWireframe: ",r);return}}getConditionElement(e,t=!0){try{let r=this.wireframeMap.value,a=r.get(e);if(!a&&t){let i=e?.split("---")[0];i&&(a=r.get(i))}return a}catch(r){this.loggingService.catch("Error in WireframeService getConditionElement: ",r);return}}getWireframe$(e,t=!0){return this.wireframeMap.asObservable().pipe(I(r=>this.getWireframe(e,t)))}setChildren(e){try{this.wireframeMap.next(e)}catch(t){this.loggingService.catch("Error in WireframeService setChildren: ",t)}}getWireframeMap(){return this.wireframeMap.value}};o.\u0275fac=function(t){return new(t||o)(E(b))},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let n=o;return n})();var V=n=>({componentConfigSignal:n}),U=(n,o)=>({condition:n,data:o}),q=(n,o,l,e,t)=>({template:n,context:o,componentName:"velt-confirm-dialog-wireframe",variant:l,setIfCondition:e,componentElementRef:t});function J(n,o){if(n&1&&(f(0),w(1,"app-confirm-dialog-title",5)(2,"app-confirm-dialog-message",5),y(3,"div",6),w(4,"app-confirm-dialog-reject",5)(5,"app-confirm-dialog-approve",5),S(),u()),n&2){let l=s(3);c(),d("componentConfigSignal",l.componentConfigSignal),c(),d("componentConfigSignal",l.componentConfigSignal),c(2),d("componentConfigSignal",l.componentConfigSignal),c(),d("componentConfigSignal",l.componentConfigSignal)}}function K(n,o){if(n&1&&(f(0),p(1,J,6,4,"ng-container",4),u()),n&2){let l=s().ngIf,e=s();c(),d("veltDynamicTemplate",L(3,q,e.template,M(1,V,e.componentConfigSignal),l==null?null:l.variant,e.setIfCondition.bind(e),e.elementRef))}}function Q(n,o){if(n&1&&(f(0),p(1,K,2,9,"ng-container",3),u()),n&2){let l=s();c(),d("veltIf",R(3,U,l.conditionSignal(),M(1,V,l.componentConfigSignal)))}}var pe=(()=>{let o=class o extends A{constructor(e,t,r,a,i,v,h){super(i,a,void 0,void 0,void 0,h,e),this.loggingService=e,this.dialogRef=t,this.wireframeService=r,this.themeService=a,this.elementRef=i,this.dynamicDataService=h,this.subscriptions=[],this.componentConfigSignal=O({title:"",message:"",yesButton:"",noButton:"",variant:"",type:"",closeDialog:this.closeDialog.bind(this)}),this.componentId="velt-confirm-dialog",this.veltElement=!0;try{v&&(this.componentConfigSignal.update(m=>(m=x(x({},m),v),m)),v?.darkMode&&[!0,!1].includes(v?.darkMode)&&super.setComponentDarkMode(v?.darkMode)),this.setZIndex()}catch(m){this.loggingService.catch("Error in ConfirmDialogComponent constructor: ",m)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;");let e="velt-confirm-dialog-wireframe";super.ngOnInit(),this.componentConfigSignal()?.variant&&(e+=`---${this.componentConfigSignal()?.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent OnInit: ",e)}}ngOnDestroy(){super.ngOnDestroy();try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent OnDestroy: ",e)}}setZIndex(){try{if(this.dialogRef){let e=this.dialogRef._overlayRef;e&&(e.backdropElement&&(e.backdropElement.style.zIndex="2147483647"),e.hostElement&&(e.hostElement.style.zIndex="2147483647"))}}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent setZIndex: ",e)}}closeDialog(e){try{this.dialogRef.close(e)}catch(t){this.loggingService.catch("Error in ConfirmDialogComponent closeDialog: ",t)}}get variantClass(){return X(this.componentConfigSignal()?.type)}};o.\u0275fac=function(t){return new(t||o)(g(b),g(B),g(N),g(Z),g(W),g(F,8),g(k))},o.\u0275cmp=T({type:o,selectors:[["snippyly-confirm-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&C("data-velt-element",r.veltElement)},standalone:!1,features:[H([k]),j],decls:3,vars:6,consts:[["floatingConfirmationRef",""],[1,"velt-confirm-dialog",3,"ngClass","snippylyOverlay","snippylyOverlayZIndex","snippylyOverlayBackdropZIndex"],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"],["mat-dialog-actions","",1,"velt-confirm-dialog-actions"]],template:function(t,r){if(t&1&&(y(0,"div",1,0),p(2,Q,2,6,"ng-container",2),S()),t&2){let a=P(1);d("ngClass",r.variantClass)("snippylyOverlay",a)("snippylyOverlayZIndex",1200)("snippylyOverlayBackdropZIndex",1100),C("data-testid",r.componentId),c(2),d("ngIf",r.componentConfigSignal())}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%] *[_ngcontent-%COMP%]{outline:0}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-confirm-dialog[_ngcontent-%COMP%]{width:455px;padding:40px;display:block;box-sizing:border-box;background-color:var(--velt-background-0)}.velt-confirm-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between;gap:var(--velt-spacing-md);min-height:auto} .velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface:has(snippyly-confirm-dialog){border-radius:var(--velt-border-radius-xl);padding:0}@media(max-width:768px){.velt-confirm-dialog[_ngcontent-%COMP%]{width:auto;max-width:455px;padding:24px}}"],changeDetection:0});let n=o;return n})();function X(n){return n?`velt-confirm-dialog--${n}`:""}export{N as a,pe as b};
|
|
1
|
+
import{W as B,X as F,da as k,ea as Z,ga as A}from"./chunk-6VMBIKMK.js";import{$ as D,Fa as c,Ib as P,Pa as g,Ua as T,Ya as j,_a as p,_b as H,a as x,bc as M,ca as E,cc as R,db as C,fc as L,ki as b,l as _,lb as d,mb as y,nb as S,ob as w,qa as O,sb as f,tb as u,v as I,wa as W,zb as s}from"./chunk-KWXZADQY.js";var N=(()=>{let o=class o{constructor(e){this.loggingService=e,this.wireframeMap=new _(new Map);try{this.loggingService.log("%c[WB] Creating CLASS: WireframeService","color: blue;")}catch(t){this.loggingService.catch("Error in WireframeService constructor: ",t)}}setWireframe(e,t){try{let r=this.wireframeMap.value,a=r.get(e),i=t.children.length>0||t.innerHTML?.trim()?.length>0,v=a&&(a.children.length>0||a.innerHTML?.trim()?.length>0);(!a||i&&!v)&&(r.set(e,t),this.wireframeMap.next(r))}catch(r){this.loggingService.catch("Error in WireframeService setWireframe: ",r)}}setWireframeMap(e){try{let t=this.wireframeMap.value;e.forEach((r,a)=>{let i=t.get(a),v=r.children.length>0||r.innerHTML?.trim()?.length>0,h=i&&(i.children.length>0||i.innerHTML?.trim()?.length>0);(!i||v&&!h)&&t.set(a,r)}),this.wireframeMap.next(t)}catch(t){this.loggingService.catch("Error in WireframeService setWireframeMap: ",t)}}getWireframe(e,t=!0){try{let r=this.wireframeMap.value,a=r.get(e);if(!a&&t){let i=e?.split("---")[0];i&&(a=r.get(i))}return a&&(a?.children?.length>0||a?.innerHTML?.trim()?.length>0)?a:void 0}catch(r){this.loggingService.catch("Error in WireframeService getWireframe: ",r);return}}getConditionElement(e,t=!0){try{let r=this.wireframeMap.value,a=r.get(e);if(!a&&t){let i=e?.split("---")[0];i&&(a=r.get(i))}return a}catch(r){this.loggingService.catch("Error in WireframeService getConditionElement: ",r);return}}getWireframe$(e,t=!0){return this.wireframeMap.asObservable().pipe(I(r=>this.getWireframe(e,t)))}setChildren(e){try{this.wireframeMap.next(e)}catch(t){this.loggingService.catch("Error in WireframeService setChildren: ",t)}}getWireframeMap(){return this.wireframeMap.value}};o.\u0275fac=function(t){return new(t||o)(E(b))},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let n=o;return n})();var V=n=>({componentConfigSignal:n}),U=(n,o)=>({condition:n,data:o}),q=(n,o,l,e,t)=>({template:n,context:o,componentName:"velt-confirm-dialog-wireframe",variant:l,setIfCondition:e,componentElementRef:t});function J(n,o){if(n&1&&(f(0),w(1,"app-confirm-dialog-title",5)(2,"app-confirm-dialog-message",5),y(3,"div",6),w(4,"app-confirm-dialog-reject",5)(5,"app-confirm-dialog-approve",5),S(),u()),n&2){let l=s(3);c(),d("componentConfigSignal",l.componentConfigSignal),c(),d("componentConfigSignal",l.componentConfigSignal),c(2),d("componentConfigSignal",l.componentConfigSignal),c(),d("componentConfigSignal",l.componentConfigSignal)}}function K(n,o){if(n&1&&(f(0),p(1,J,6,4,"ng-container",4),u()),n&2){let l=s().ngIf,e=s();c(),d("veltDynamicTemplate",L(3,q,e.template,M(1,V,e.componentConfigSignal),l==null?null:l.variant,e.setIfCondition.bind(e),e.elementRef))}}function Q(n,o){if(n&1&&(f(0),p(1,K,2,9,"ng-container",3),u()),n&2){let l=s();c(),d("veltIf",R(3,U,l.conditionSignal(),M(1,V,l.componentConfigSignal)))}}var pe=(()=>{let o=class o extends A{constructor(e,t,r,a,i,v,h){super(i,a,void 0,void 0,void 0,h,e),this.loggingService=e,this.dialogRef=t,this.wireframeService=r,this.themeService=a,this.elementRef=i,this.dynamicDataService=h,this.subscriptions=[],this.componentConfigSignal=O({title:"",message:"",yesButton:"",noButton:"",variant:"",type:"",closeDialog:this.closeDialog.bind(this)}),this.componentId="velt-confirm-dialog",this.veltElement=!0;try{v&&(this.componentConfigSignal.update(m=>(m=x(x({},m),v),m)),v?.darkMode&&[!0,!1].includes(v?.darkMode)&&super.setComponentDarkMode(v?.darkMode)),this.setZIndex()}catch(m){this.loggingService.catch("Error in ConfirmDialogComponent constructor: ",m)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;");let e="velt-confirm-dialog-wireframe";super.ngOnInit(),this.componentConfigSignal()?.variant&&(e+=`---${this.componentConfigSignal()?.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent OnInit: ",e)}}ngOnDestroy(){super.ngOnDestroy();try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent OnDestroy: ",e)}}setZIndex(){try{if(this.dialogRef){let e=this.dialogRef._overlayRef;e&&(e.backdropElement&&(e.backdropElement.style.zIndex="2147483647"),e.hostElement&&(e.hostElement.style.zIndex="2147483647"))}}catch(e){this.loggingService.catch("Error in ConfirmDialogComponent setZIndex: ",e)}}closeDialog(e){try{this.dialogRef.close(e)}catch(t){this.loggingService.catch("Error in ConfirmDialogComponent closeDialog: ",t)}}get variantClass(){return X(this.componentConfigSignal()?.type)}};o.\u0275fac=function(t){return new(t||o)(g(b),g(B),g(N),g(Z),g(W),g(F,8),g(k))},o.\u0275cmp=T({type:o,selectors:[["snippyly-confirm-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&C("data-velt-element",r.veltElement)},standalone:!1,features:[H([k]),j],decls:3,vars:6,consts:[["floatingConfirmationRef",""],[1,"velt-confirm-dialog",3,"ngClass","snippylyOverlay","snippylyOverlayZIndex","snippylyOverlayBackdropZIndex"],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"],["mat-dialog-actions","",1,"velt-confirm-dialog-actions"]],template:function(t,r){if(t&1&&(y(0,"div",1,0),p(2,Q,2,6,"ng-container",2),S()),t&2){let a=P(1);d("ngClass",r.variantClass)("snippylyOverlay",a)("snippylyOverlayZIndex",1200)("snippylyOverlayBackdropZIndex",1100),C("data-testid",r.componentId),c(2),d("ngIf",r.componentConfigSignal())}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%] *[_ngcontent-%COMP%]{outline:0}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-confirm-dialog[_ngcontent-%COMP%]{width:455px;padding:40px;display:block;box-sizing:border-box;background-color:var(--velt-background-0)}.velt-confirm-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between;gap:var(--velt-spacing-md);min-height:auto} .velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface:has(snippyly-confirm-dialog){border-radius:var(--velt-border-radius-xl);padding:0}@media(max-width:768px){.velt-confirm-dialog[_ngcontent-%COMP%]{width:auto;max-width:455px;padding:24px}}"],changeDetection:0});let n=o;return n})();function X(n){return n?`velt-confirm-dialog--${n}`:""}export{N as a,pe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-422EVUH5.js";import{$ as v,Ai as B,E as P,Ee as m,Fi as J,G as x,I as C,J as f,Ma as j,Oi as K,Pi as W,Sg as V,Tg as L,Ug as H,Vf as $,Vg as z,Wg as R,Xg as F,bb as X,ca as a,ki as g,l as p,la as M,lg as T,qg as k,r as A,si as G,ti as b,w as D,z as y}from"./chunk-3YCIOKO7.js";var h=(function(l){return l.CLICK="click",l.HOVER="hover",l.SCROLL="scroll",l.NAVIGATE="navigate",l})(h||{}),u=class{constructor(){this.type=h.HOVER,this.data=null,this.pageInfo=k(),this.timestamp=Date.now()}},U=class{constructor(n,w){this.targetXpath=n,this.xpath=w}};var E=class{constructor(){this.sessionId=null,this.isLeader=!1,this.lastProcessedActionTimestamp=null}};var S=class{constructor(n){this.snippylyId=n,this.joinTimestamp=Date.now()}};var I=class{constructor(n,w,e){this.followers=[],this.actionStack=[],this.id=$(),this.leaderId=n,this.leaderName=w,this.followers.push(new S(e))}};var Q=(()=>{let n=class n{constructor(e,t,r,i,o,s){this.databaseService=e,this.docService=t,this.loggingService=r,this.authService=i,this.commonDbService=o,this.realtimeAdapter=s,this.currentUser$=new p(null),this.currentSession$=new p(null);try{this.databaseService.getDb().pipe(P(c=>!!c),f(1)).subscribe(c=>{c&&(this.db=c)},c=>{this.loggingService.catch("Error in FlockSessionService getDb subscription: ",c)}),this.authService.getUser$().subscribe(c=>{c&&c.userSnippylyId&&(this.user=c)})}catch(c){this.loggingService.catch("Error in FlockSessionService constructor: ",c)}}startCurrentFlockUserSubscription(e){try{this.currentUserSub?.unsubscribe(),e&&e.userSnippylyId&&(this.user=e,this.subscribeToCurrentFlockUser(e?.userSnippylyId))}catch(t){this.loggingService.catch("Error in FlockSessionService startCurrentFlockUserSubscription: ",t)}}stopCurrentFlockUserSubscription(){try{this.currentUserSub?.unsubscribe()}catch(e){this.loggingService.catch("Error in FlockSessionService stopCurrentFlockUserSubscription: ",e)}}provisionFlockSession(e,t,r){try{let i=this.docService.getDocumentPaths();i&&this.db&&this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:i?.documentId,organizationId:i?.organizationId,id:e,skipFirestore:!0}}).pipe(f(1)).subscribe(o=>{o?.data&&o?.data?.sessionId?this.subscribeToCurrentSession(o?.data?.sessionId,r):this.createFlockSession(e,t,r)})}catch(i){this.loggingService.catch("Error in FlockSessionService provisionFlockSession: ",i)}return null}swapLeader(e,t,r){try{if(this.updateRemoteFlockUser(e,{isLeader:!1}),this.updateRemoteFlockUser(t,{isLeader:!0}),this.currentSession){this.currentSession.leaderId=t,this.currentSession.leaderName=r,this.currentSession.followers.push(new S(e));let i=this.currentSession.followers.findIndex(o=>o.snippylyId===t);i>-1&&this.currentSession.followers.splice(i,1),this.updateSession(this.currentSession.id,this.currentSession)}}catch(i){this.loggingService.catch("Error in FlockSessionService swapLeader: ",i)}}createFlockSession(e,t,r){try{let i=new I(e,t,r);return this.updateRemoteFlockUser(e,{snippylyId:e,sessionId:i.id,isLeader:!0}),this.updateSession(i.id,i),this.subscribeToCurrentSession(i.id),i.id}catch(i){this.loggingService.catch("Error in FlockSessionService createFlockSession: ",i)}return null}removeFollowerFromCurrentSession(e){try{if(this.currentSession){this.updateRemoteFlockUser(e,{sessionId:null,lastProcessedActionTimestamp:null});let t=this.currentSession.followers.findIndex(r=>r.snippylyId===e);if(t>-1){if(this.currentSession.followers.splice(t,1),this.currentSession.followers.length===0){this.deleteSession(this.currentSession.id);return}this.updateSession(this.currentSession.id,this.currentSession),this.user&&this.user.userSnippylyId&&this.user.userSnippylyId===e&&(this.sessionSub?.unsubscribe(),this.currentSession=void 0,this.currentSession$?.next(null))}}}catch(t){this.loggingService.catch("Error in FlockSessionService removeFollowerFromSession: ",t)}}updateRemoteFlockUser(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockUser",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateRemoteFlockUser: ",r)}}subscribeToCurrentSession(e,t=void 0){try{let r=this.docService.getDocumentPaths();r&&this.db&&(this.sessionSub&&this.sessionSub.unsubscribe(),this.sessionSub=this.commonDbService.dbListener({feature:"flockSession",properties:{documentId:r?.documentId,organizationId:r?.organizationId,id:e,skipFirestore:!0}}).subscribe(i=>{i?.data&&typeof i?.data=="object"&&Object.keys(i?.data)?.length>0?(this.currentSession=i?.data,t!==void 0&&this.currentSession?.followers.findIndex(o=>o.snippylyId===t)===-1&&(this.currentSession.followers.push(new S(t)),this.updateSession(this.currentSession.id,this.currentSession)),this.currentSession$.next(this.currentSession??null)):(this.currentSession=void 0,this.currentSession$.next(null))}))}catch(r){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentSession: ",r)}}subscribeToCurrentFlockUser(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.currentUserSub&&this.currentUserSub.unsubscribe(),this.currentUserSub=this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,id:e,skipFirestore:!0}}).pipe(x(r=>(this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",r),A(null)))).subscribe(r=>{r?.data&&typeof r?.data=="object"&&Object.keys(r?.data)?.length>0&&(this.currentUser$.next(r?.data),r?.data?.sessionId&&this.subscribeToCurrentSession(r?.data?.sessionId))},r=>{this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser subscription: ",r)}))}catch(t){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",t)}}updateSession(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockSession",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateSession: ",r)}}deleteSession(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.commonDbService.deleteData({feature:"flockSession",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:e,skipFirestore:!0}}),this.currentSession&&e===this.currentSession.id&&(this.updateRemoteFlockUser(this.currentSession.leaderId,{sessionId:null,isLeader:!1,lastProcessedActionTimestamp:null}),this.currentSession.followers.forEach(r=>{this.updateRemoteFlockUser(r.snippylyId,{sessionId:null,lastProcessedActionTimestamp:null})}),this.currentSession=void 0,this.currentSession$.next(null),this.sessionSub?.unsubscribe()))}catch(t){this.loggingService.catch("Error in FlockSessionService deleteSession: ",t)}}addActionToStack(e,t){try{t=t&&JSON.parse(JSON.stringify(t));let r=this.docService.getDocumentPaths();if(r&&this.db&&e){let i=this.realtimeAdapter.rtdbRef(this.db,`${r.flock}/sessions/${e}/actionStack`);this.realtimeAdapter.rtdbRunTransaction("flockSession",i,o=>o?(o.unshift(t),o.slice(0,5)):[t]),t.type===h.NAVIGATE&&this.updateSession(e,{pageInfo:t.pageInfo})}}catch(r){this.loggingService.catch("Error in FlockSessionService addActionToStack: ",r)}}};n.\u0275fac=function(t){return new(t||n)(a(B),a(J),a(g),a(b),a(W),a(K))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Z=(()=>{let n=class n{constructor(e,t,r,i){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=r,this.loggingService=i,this.darkMode=!1}createFollowOverlay(e,t){try{let i=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);i.instance.setLeaderName(e),i.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),t()}),this.applicationRef.attachView(i.hostView),this.overlayRef=i,this.overlayRef.instance.darkMode=this.darkMode;let o=this.overlayRef.location.nativeElement;o.id="snippyly-follow-overlay",o.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(o)}catch(r){this.loggingService.catch("Error in FlockOverlayService createFollowOverlay: ",r)}}createLeaderOverlay(e){let r=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);r.instance.setType("leading"),r.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),e()}),this.applicationRef.attachView(r.hostView),this.overlayRef=r,this.overlayRef.instance.darkMode=this.darkMode;let i=this.overlayRef.location.nativeElement;i.id="snippyly-follow-overlay",i.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(i)}changeLeaderName(e){this.overlayRef&&this.overlayRef.instance.setLeaderName(e)}getLeaderName(){return this.overlayRef?this.overlayRef.instance.getLeaderName():null}removeOverlay(){if(this.overlayRef){let e=this.overlayRef.location.nativeElement;this.applicationRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),e.shadowRoot&&e.shadowRoot.removeChild(e.shadowRoot.childNodes[0]),e.remove(),this.overlayRef=void 0}}setDarkMode(e){try{this.darkMode=e,this.overlayRef&&(this.overlayRef.instance.darkMode=e)}catch(t){this.loggingService.catch("Error in FlockOverlayService setDarkMode: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(j),a(X),a(M),a(g))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Ce=(()=>{let n=class n{constructor(e,t,r,i,o){this.authService=e,this.domService=t,this.loggingService=r,this.flockSessionService=i,this.flockOverlayService=o,this.flockLeader$=new p({userId:"",name:""}),this.flockMode$=new p(!1),this.currentFlockUser=null,this.localScrollData=[],this.domSubscriptions=[],this.followOverlayCreated=!1,this.leaderOverlayCreated=!1,this.windowFocused=!0,this.tabFocused=!0,this.useHistoryAPI=!0,this.disableDefaultNavigation=!1;try{this.flockLeader$.subscribe(s=>{let{userId:c,name:d}=s,O=c;if(this.provisionFollowUser(),O&&this.currentFlockUser&&this.currentFlockUser.snippylyId)if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,O,d);return}this.removeCurrentUserFromSession()}else this.flockSessionService.provisionFlockSession(O,d,this.currentFlockUser.snippylyId)},s=>{this.loggingService.catch("Error in FlockService flockLeader$ subscription: ",s)}),this.flockSessionService.currentSession$.subscribe(s=>{if(s!==null){if(this.currentFlockUser&&(this.currentFlockUser.sessionId===null||this.currentFlockUser.sessionId===void 0)&&this.currentFlockUser.snippylyId&&(this.currentFlockUser.sessionId=s.id,this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,this.currentFlockUser)),this.currentFlockUser&&!this.currentFlockUser.isLeader&&!this.followOverlayCreated&&(this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.followOverlayCreated=!0,this.flockOverlayService.createFollowOverlay(s.leaderName,()=>{this.removeCurrentUserFromSession(),this.followOverlayCreated=!1})),this.currentFlockUser&&this.currentFlockUser.isLeader&&!this.leaderOverlayCreated&&(this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1),this.leaderOverlayCreated=!0,this.flockOverlayService.createLeaderOverlay(()=>{this.removeCurrentUserFromSession(),this.leaderOverlayCreated=!1})),this.currentFlockUser&&!this.currentFlockUser.isLeader&&s.actionStack){let c=s.actionStack[0];c&&this.currentFlockUser.lastProcessedActionTimestamp!==c.timestamp&&this.processAction(c)}if(this.currentFlockUser&&!this.currentFlockUser.isLeader&&this.followOverlayCreated&&this.flockOverlayService.getLeaderName()!==null&&s.leaderName!==this.flockOverlayService.getLeaderName()&&this.flockOverlayService.changeLeaderName(s.leaderName),this.currentFlockUser&&this.currentFlockUser.isLeader){let c=k();if(s.pageInfo){if(c&&c.url!==s.pageInfo.url){let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}else{this.flockSessionService.updateSession(s.id,{pageInfo:c});let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}}else this.currentFlockUser&&this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.currentFlockUser&&this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1)}),this.flockSessionService.currentUser$.subscribe(s=>{if(s!==null&&(this.currentFlockUser&&this.currentFlockUser.isLeader!==s.isLeader&&(this.domSubscriptions.forEach(c=>c.unsubscribe()),this.domSubscriptions=[]),this.currentFlockUser=s,s.sessionId&&this.domSubscriptions.length===0))if(s.isLeader){if(!this.tabFocused||!this.windowFocused)return;this.subscribeToLeaderDOMEvents()}else this.subscribeToFollowerDOMEvents()}),D([this.authService.getUser$(),this.getFlockMode$()]).subscribe(([s,c])=>{s&&s.userSnippylyId&&c?this.flockSessionService.startCurrentFlockUserSubscription(s):this.flockSessionService.stopCurrentFlockUserSubscription()})}catch(s){this.loggingService.catch("Error in FlockService constructor: ",s)}}provisionFollowUser(){try{if(this.currentFlockUser===null){let e=this.authService.getUser();e&&e.userSnippylyId&&(this.currentFlockUser=new E,this.currentFlockUser.snippylyId=e.userSnippylyId)}}catch(e){this.loggingService.catch("Error in FlockService provisionFollowUser: ",e)}}startFollowingUser(e,t){try{if(this.provisionFollowUser(),e&&this.currentFlockUser&&this.currentFlockUser.snippylyId){if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,e,t);return}this.removeCurrentUserFromSession()}this.flockSessionService.provisionFlockSession(e,t,this.currentFlockUser.snippylyId)}}catch(r){this.loggingService.catch("Error in FlockService startFollowingUser: ",r)}}stopFollowingUser(){try{this.removeCurrentUserFromSession()}catch(e){this.loggingService.catch("Error in FlockService stopFollowingUser: ",e)}}subscribeToUrlChanges(){try{if(this.useHistoryAPI){let e=window.history.pushState,t=window.history.replaceState;window.history.pushState=(...r)=>{e.apply(window.history,r),this.onUrlChange()},window.history.replaceState=(...r)=>{t.apply(window.history,r),this.onUrlChange()},this.domSubscriptions.push({unsubscribe:()=>{window.history.pushState=e,window.history.replaceState=t}}),this.domSubscriptions.push(y(window,"popstate").subscribe(()=>{this.onUrlChange()}))}}catch(e){this.loggingService.catch("Error in FlockService subscribeToUrlChanges: ",e)}}onUrlChange(){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader){let e=new u;e.type=h.NAVIGATE,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,e)}}catch(e){this.loggingService.catch("Error in FlockService onUrlChange: ",e)}}processAction(e){try{switch(e.type){case h.CLICK:this.clickUserElement(e.data);break;case h.HOVER:this.scrollToHoveredElement(e.data);break;case h.SCROLL:this.scrollToFollowedUser(e.data);break;case h.NAVIGATE:this.checkMatchingUrl(e.pageInfo);break}this.currentFlockUser&&this.currentFlockUser.snippylyId&&this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,{lastProcessedActionTimestamp:e.timestamp})}catch(t){this.loggingService.catch("Error in FlockService processAction: ",t)}}subscribeToLeaderDOMEvents(){try{this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[]),this.domSubscriptions.push(y(window,"mouseover").pipe(C(500)).subscribe(e=>{let t=e?.target;if(t){let r=window.getComputedStyle(t);if(r.position==="fixed"||r.position==="sticky"||t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;t=L(t,{x:e.clientX,y:e.clientY}),this.updateHoveredElement(t)}})),this.domSubscriptions.push(this.domService.onWindowClick$().subscribe(e=>{let t=e?.target;if(t){if(t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;this.updateClickedElement(t)}})),this.subscribeToUrlChanges(),this.subscribeToScrollables()}catch(e){this.loggingService.catch("Error in FlockService subscribeToLeaderDOMEvents: ",e)}}subscribeToFollowerDOMEvents(){}updateClickedElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.CLICK,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateClickedElement: ",t)}}updateHoveredElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.HOVER,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateHoveredElement: ",t)}}subscribeToScrollables(){try{let e=V();e.push(document),e?.forEach(t=>{this.domSubscriptions.push(y(t,"scroll").pipe(C(100)).subscribe(r=>{this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader&&this.updateScrollPositionOfElement(t)}))})}catch(e){this.loggingService.catch("Error in FlockService getScrollableElements: ",e)}}updateScrollPositionOfElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=new U("","");if(e===document){let o=z();if(o){let s=L(o);s&&(t.targetXpath=this.domService.getXPath(s))}t.xpath=""}else{let o=H(e);t.targetXpath=this.domService.getXPath(o),t.xpath=this.domService.getXPath(e)}let r=!1,i=!1;if(this.localScrollData.forEach((o,s)=>{o.xpath===o.xpath&&(t.targetXpath!==o.targetXpath&&(r=!0),this.localScrollData[s]=Object.assign(o,t),i=!0)}),i||this.localScrollData.push(t),r||!i){let o=new u;o.type=h.SCROLL,o.data=t,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,o)}}}catch(t){this.loggingService.catch("Error in FlockService calculateScrollPositionOfAnElement: ",t)}}enableFlockMode(e){try{if(this.flockMode$.next(!0),e){let{useHistoryAPI:t,onNavigate:r,disableDefaultNavigation:i,darkMode:o}=e;t!==void 0&&(this.useHistoryAPI=t),r!==void 0&&typeof r=="function"&&(this.onNavigate=r),i!==void 0&&(this.disableDefaultNavigation=i),this.flockOverlayService.setDarkMode(o)}}catch(t){this.loggingService.catch("Error in FlockService enableFlockMode: ",t)}}disableFlockMode(){try{this.flockMode$.next(!1),this.onNavigateEmitter=void 0,this.useHistoryAPI=!0,this.onNavigate=void 0}catch(e){this.loggingService.catch("Error in FlockService disableFlockMode: ",e)}}setDisableFlockNavigation(e){try{this.disableDefaultNavigation=e}catch(t){this.loggingService.catch("Error in FlockService setDisableFlockNavigation: ",t)}}getFlockMode$(){return this.flockMode$.asObservable()}getFlockMode(){return this.flockMode$.value}setNavigateEmitter(e){try{this.onNavigateEmitter=e}catch(t){this.loggingService.catch("Error in FlockService setNavigateEmitter: ",t)}}setTabFocused(e){try{if(this.tabFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.tabFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.tabFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setTabFocused: ",t)}}setWindowFocused(e){try{if(this.windowFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.windowFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.windowFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setWindowFocused: ",t)}}setFlockLeader(e,t){try{this.flockLeader$.next({userId:e,name:t})}catch(r){this.loggingService.catch("Error in FlockService setFlockLeader: ",r)}}isInSession(){try{return!!(this.currentFlockUser&&this.currentFlockUser.sessionId)}catch(e){this.loggingService.catch("Error in FlockService isFollowing: ",e)}return!1}removeCurrentUserFromSession(){try{this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[],this.currentFlockUser&&(this.currentFlockUser.isLeader?this.currentFlockUser.sessionId&&this.flockSessionService.deleteSession(this.currentFlockUser.sessionId):this.currentFlockUser.snippylyId&&this.flockSessionService.removeFollowerFromCurrentSession(this.currentFlockUser.snippylyId))}catch(e){this.loggingService.catch("Error in FlockService removeCurrentUserFromSession: ",e)}}checkMatchingUrl(e){try{let r=k()?.url,i=e.url;if(r!==i&&i!==void 0){let{url:o,path:s,baseUrl:c}=e;if(this.onNavigate!==void 0&&typeof this.onNavigate=="function"){this.onNavigate({url:o,path:s,baseUrl:c});return}if(this.onNavigateEmitter&&this.onNavigateEmitter.emit({url:o,path:s,baseUrl:c}),this.disableDefaultNavigation)return;window.location.href=i}}catch(t){this.loggingService.catch("Error in FlockService checkMatchingUrl: ",t)}}scrollToFollowedUser(e){try{if(e.xpath===""){let t=this.domService.getElementFromXPath(e.targetXpath);t&&F(t)}else{let t=this.domService.getElementFromXPath(e.xpath),r=this.domService.getElementFromXPath(e.targetXpath);t&&r&&(F(t),R(t,r))}}catch(t){this.loggingService.catch("Error in FlockService scrollToFollowedUser: ",t)}}clickUserElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);t&&this.lastClickedElement?.id!==e.id&&(t?.click(),this.lastClickedElement=e)}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}scrollToHoveredElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);if(t&&e.parentXpath)if(e.parentXpath==="/html")F(t);else{let r=this.domService.getElementFromXPath(e.parentXpath);r&&R(r,t,!0)}}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(b),a(G),a(g),a(Q),a(Z))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();export{Ce as a};
|
|
1
|
+
import{a as N}from"./chunk-TBVR7DMN.js";import{$ as v,Ai as B,E as P,Ee as m,Fi as J,G as x,I as C,J as f,Ma as j,Oi as K,Pi as W,Sg as V,Tg as L,Ug as H,Vf as $,Vg as z,Wg as R,Xg as F,bb as X,ca as a,ki as g,l as p,la as M,lg as T,qg as k,r as A,si as G,ti as b,w as D,z as y}from"./chunk-KWXZADQY.js";var h=(function(l){return l.CLICK="click",l.HOVER="hover",l.SCROLL="scroll",l.NAVIGATE="navigate",l})(h||{}),u=class{constructor(){this.type=h.HOVER,this.data=null,this.pageInfo=k(),this.timestamp=Date.now()}},U=class{constructor(n,w){this.targetXpath=n,this.xpath=w}};var E=class{constructor(){this.sessionId=null,this.isLeader=!1,this.lastProcessedActionTimestamp=null}};var S=class{constructor(n){this.snippylyId=n,this.joinTimestamp=Date.now()}};var I=class{constructor(n,w,e){this.followers=[],this.actionStack=[],this.id=$(),this.leaderId=n,this.leaderName=w,this.followers.push(new S(e))}};var Q=(()=>{let n=class n{constructor(e,t,r,i,o,s){this.databaseService=e,this.docService=t,this.loggingService=r,this.authService=i,this.commonDbService=o,this.realtimeAdapter=s,this.currentUser$=new p(null),this.currentSession$=new p(null);try{this.databaseService.getDb().pipe(P(c=>!!c),f(1)).subscribe(c=>{c&&(this.db=c)},c=>{this.loggingService.catch("Error in FlockSessionService getDb subscription: ",c)}),this.authService.getUser$().subscribe(c=>{c&&c.userSnippylyId&&(this.user=c)})}catch(c){this.loggingService.catch("Error in FlockSessionService constructor: ",c)}}startCurrentFlockUserSubscription(e){try{this.currentUserSub?.unsubscribe(),e&&e.userSnippylyId&&(this.user=e,this.subscribeToCurrentFlockUser(e?.userSnippylyId))}catch(t){this.loggingService.catch("Error in FlockSessionService startCurrentFlockUserSubscription: ",t)}}stopCurrentFlockUserSubscription(){try{this.currentUserSub?.unsubscribe()}catch(e){this.loggingService.catch("Error in FlockSessionService stopCurrentFlockUserSubscription: ",e)}}provisionFlockSession(e,t,r){try{let i=this.docService.getDocumentPaths();i&&this.db&&this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:i?.documentId,organizationId:i?.organizationId,id:e,skipFirestore:!0}}).pipe(f(1)).subscribe(o=>{o?.data&&o?.data?.sessionId?this.subscribeToCurrentSession(o?.data?.sessionId,r):this.createFlockSession(e,t,r)})}catch(i){this.loggingService.catch("Error in FlockSessionService provisionFlockSession: ",i)}return null}swapLeader(e,t,r){try{if(this.updateRemoteFlockUser(e,{isLeader:!1}),this.updateRemoteFlockUser(t,{isLeader:!0}),this.currentSession){this.currentSession.leaderId=t,this.currentSession.leaderName=r,this.currentSession.followers.push(new S(e));let i=this.currentSession.followers.findIndex(o=>o.snippylyId===t);i>-1&&this.currentSession.followers.splice(i,1),this.updateSession(this.currentSession.id,this.currentSession)}}catch(i){this.loggingService.catch("Error in FlockSessionService swapLeader: ",i)}}createFlockSession(e,t,r){try{let i=new I(e,t,r);return this.updateRemoteFlockUser(e,{snippylyId:e,sessionId:i.id,isLeader:!0}),this.updateSession(i.id,i),this.subscribeToCurrentSession(i.id),i.id}catch(i){this.loggingService.catch("Error in FlockSessionService createFlockSession: ",i)}return null}removeFollowerFromCurrentSession(e){try{if(this.currentSession){this.updateRemoteFlockUser(e,{sessionId:null,lastProcessedActionTimestamp:null});let t=this.currentSession.followers.findIndex(r=>r.snippylyId===e);if(t>-1){if(this.currentSession.followers.splice(t,1),this.currentSession.followers.length===0){this.deleteSession(this.currentSession.id);return}this.updateSession(this.currentSession.id,this.currentSession),this.user&&this.user.userSnippylyId&&this.user.userSnippylyId===e&&(this.sessionSub?.unsubscribe(),this.currentSession=void 0,this.currentSession$?.next(null))}}}catch(t){this.loggingService.catch("Error in FlockSessionService removeFollowerFromSession: ",t)}}updateRemoteFlockUser(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockUser",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateRemoteFlockUser: ",r)}}subscribeToCurrentSession(e,t=void 0){try{let r=this.docService.getDocumentPaths();r&&this.db&&(this.sessionSub&&this.sessionSub.unsubscribe(),this.sessionSub=this.commonDbService.dbListener({feature:"flockSession",properties:{documentId:r?.documentId,organizationId:r?.organizationId,id:e,skipFirestore:!0}}).subscribe(i=>{i?.data&&typeof i?.data=="object"&&Object.keys(i?.data)?.length>0?(this.currentSession=i?.data,t!==void 0&&this.currentSession?.followers.findIndex(o=>o.snippylyId===t)===-1&&(this.currentSession.followers.push(new S(t)),this.updateSession(this.currentSession.id,this.currentSession)),this.currentSession$.next(this.currentSession??null)):(this.currentSession=void 0,this.currentSession$.next(null))}))}catch(r){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentSession: ",r)}}subscribeToCurrentFlockUser(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.currentUserSub&&this.currentUserSub.unsubscribe(),this.currentUserSub=this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,id:e,skipFirestore:!0}}).pipe(x(r=>(this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",r),A(null)))).subscribe(r=>{r?.data&&typeof r?.data=="object"&&Object.keys(r?.data)?.length>0&&(this.currentUser$.next(r?.data),r?.data?.sessionId&&this.subscribeToCurrentSession(r?.data?.sessionId))},r=>{this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser subscription: ",r)}))}catch(t){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",t)}}updateSession(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockSession",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateSession: ",r)}}deleteSession(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.commonDbService.deleteData({feature:"flockSession",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:e,skipFirestore:!0}}),this.currentSession&&e===this.currentSession.id&&(this.updateRemoteFlockUser(this.currentSession.leaderId,{sessionId:null,isLeader:!1,lastProcessedActionTimestamp:null}),this.currentSession.followers.forEach(r=>{this.updateRemoteFlockUser(r.snippylyId,{sessionId:null,lastProcessedActionTimestamp:null})}),this.currentSession=void 0,this.currentSession$.next(null),this.sessionSub?.unsubscribe()))}catch(t){this.loggingService.catch("Error in FlockSessionService deleteSession: ",t)}}addActionToStack(e,t){try{t=t&&JSON.parse(JSON.stringify(t));let r=this.docService.getDocumentPaths();if(r&&this.db&&e){let i=this.realtimeAdapter.rtdbRef(this.db,`${r.flock}/sessions/${e}/actionStack`);this.realtimeAdapter.rtdbRunTransaction("flockSession",i,o=>o?(o.unshift(t),o.slice(0,5)):[t]),t.type===h.NAVIGATE&&this.updateSession(e,{pageInfo:t.pageInfo})}}catch(r){this.loggingService.catch("Error in FlockSessionService addActionToStack: ",r)}}};n.\u0275fac=function(t){return new(t||n)(a(B),a(J),a(g),a(b),a(W),a(K))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Z=(()=>{let n=class n{constructor(e,t,r,i){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=r,this.loggingService=i,this.darkMode=!1}createFollowOverlay(e,t){try{let i=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);i.instance.setLeaderName(e),i.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),t()}),this.applicationRef.attachView(i.hostView),this.overlayRef=i,this.overlayRef.instance.darkMode=this.darkMode;let o=this.overlayRef.location.nativeElement;o.id="snippyly-follow-overlay",o.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(o)}catch(r){this.loggingService.catch("Error in FlockOverlayService createFollowOverlay: ",r)}}createLeaderOverlay(e){let r=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);r.instance.setType("leading"),r.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),e()}),this.applicationRef.attachView(r.hostView),this.overlayRef=r,this.overlayRef.instance.darkMode=this.darkMode;let i=this.overlayRef.location.nativeElement;i.id="snippyly-follow-overlay",i.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(i)}changeLeaderName(e){this.overlayRef&&this.overlayRef.instance.setLeaderName(e)}getLeaderName(){return this.overlayRef?this.overlayRef.instance.getLeaderName():null}removeOverlay(){if(this.overlayRef){let e=this.overlayRef.location.nativeElement;this.applicationRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),e.shadowRoot&&e.shadowRoot.removeChild(e.shadowRoot.childNodes[0]),e.remove(),this.overlayRef=void 0}}setDarkMode(e){try{this.darkMode=e,this.overlayRef&&(this.overlayRef.instance.darkMode=e)}catch(t){this.loggingService.catch("Error in FlockOverlayService setDarkMode: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(j),a(X),a(M),a(g))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Ce=(()=>{let n=class n{constructor(e,t,r,i,o){this.authService=e,this.domService=t,this.loggingService=r,this.flockSessionService=i,this.flockOverlayService=o,this.flockLeader$=new p({userId:"",name:""}),this.flockMode$=new p(!1),this.currentFlockUser=null,this.localScrollData=[],this.domSubscriptions=[],this.followOverlayCreated=!1,this.leaderOverlayCreated=!1,this.windowFocused=!0,this.tabFocused=!0,this.useHistoryAPI=!0,this.disableDefaultNavigation=!1;try{this.flockLeader$.subscribe(s=>{let{userId:c,name:d}=s,O=c;if(this.provisionFollowUser(),O&&this.currentFlockUser&&this.currentFlockUser.snippylyId)if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,O,d);return}this.removeCurrentUserFromSession()}else this.flockSessionService.provisionFlockSession(O,d,this.currentFlockUser.snippylyId)},s=>{this.loggingService.catch("Error in FlockService flockLeader$ subscription: ",s)}),this.flockSessionService.currentSession$.subscribe(s=>{if(s!==null){if(this.currentFlockUser&&(this.currentFlockUser.sessionId===null||this.currentFlockUser.sessionId===void 0)&&this.currentFlockUser.snippylyId&&(this.currentFlockUser.sessionId=s.id,this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,this.currentFlockUser)),this.currentFlockUser&&!this.currentFlockUser.isLeader&&!this.followOverlayCreated&&(this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.followOverlayCreated=!0,this.flockOverlayService.createFollowOverlay(s.leaderName,()=>{this.removeCurrentUserFromSession(),this.followOverlayCreated=!1})),this.currentFlockUser&&this.currentFlockUser.isLeader&&!this.leaderOverlayCreated&&(this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1),this.leaderOverlayCreated=!0,this.flockOverlayService.createLeaderOverlay(()=>{this.removeCurrentUserFromSession(),this.leaderOverlayCreated=!1})),this.currentFlockUser&&!this.currentFlockUser.isLeader&&s.actionStack){let c=s.actionStack[0];c&&this.currentFlockUser.lastProcessedActionTimestamp!==c.timestamp&&this.processAction(c)}if(this.currentFlockUser&&!this.currentFlockUser.isLeader&&this.followOverlayCreated&&this.flockOverlayService.getLeaderName()!==null&&s.leaderName!==this.flockOverlayService.getLeaderName()&&this.flockOverlayService.changeLeaderName(s.leaderName),this.currentFlockUser&&this.currentFlockUser.isLeader){let c=k();if(s.pageInfo){if(c&&c.url!==s.pageInfo.url){let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}else{this.flockSessionService.updateSession(s.id,{pageInfo:c});let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}}else this.currentFlockUser&&this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.currentFlockUser&&this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1)}),this.flockSessionService.currentUser$.subscribe(s=>{if(s!==null&&(this.currentFlockUser&&this.currentFlockUser.isLeader!==s.isLeader&&(this.domSubscriptions.forEach(c=>c.unsubscribe()),this.domSubscriptions=[]),this.currentFlockUser=s,s.sessionId&&this.domSubscriptions.length===0))if(s.isLeader){if(!this.tabFocused||!this.windowFocused)return;this.subscribeToLeaderDOMEvents()}else this.subscribeToFollowerDOMEvents()}),D([this.authService.getUser$(),this.getFlockMode$()]).subscribe(([s,c])=>{s&&s.userSnippylyId&&c?this.flockSessionService.startCurrentFlockUserSubscription(s):this.flockSessionService.stopCurrentFlockUserSubscription()})}catch(s){this.loggingService.catch("Error in FlockService constructor: ",s)}}provisionFollowUser(){try{if(this.currentFlockUser===null){let e=this.authService.getUser();e&&e.userSnippylyId&&(this.currentFlockUser=new E,this.currentFlockUser.snippylyId=e.userSnippylyId)}}catch(e){this.loggingService.catch("Error in FlockService provisionFollowUser: ",e)}}startFollowingUser(e,t){try{if(this.provisionFollowUser(),e&&this.currentFlockUser&&this.currentFlockUser.snippylyId){if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,e,t);return}this.removeCurrentUserFromSession()}this.flockSessionService.provisionFlockSession(e,t,this.currentFlockUser.snippylyId)}}catch(r){this.loggingService.catch("Error in FlockService startFollowingUser: ",r)}}stopFollowingUser(){try{this.removeCurrentUserFromSession()}catch(e){this.loggingService.catch("Error in FlockService stopFollowingUser: ",e)}}subscribeToUrlChanges(){try{if(this.useHistoryAPI){let e=window.history.pushState,t=window.history.replaceState;window.history.pushState=(...r)=>{e.apply(window.history,r),this.onUrlChange()},window.history.replaceState=(...r)=>{t.apply(window.history,r),this.onUrlChange()},this.domSubscriptions.push({unsubscribe:()=>{window.history.pushState=e,window.history.replaceState=t}}),this.domSubscriptions.push(y(window,"popstate").subscribe(()=>{this.onUrlChange()}))}}catch(e){this.loggingService.catch("Error in FlockService subscribeToUrlChanges: ",e)}}onUrlChange(){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader){let e=new u;e.type=h.NAVIGATE,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,e)}}catch(e){this.loggingService.catch("Error in FlockService onUrlChange: ",e)}}processAction(e){try{switch(e.type){case h.CLICK:this.clickUserElement(e.data);break;case h.HOVER:this.scrollToHoveredElement(e.data);break;case h.SCROLL:this.scrollToFollowedUser(e.data);break;case h.NAVIGATE:this.checkMatchingUrl(e.pageInfo);break}this.currentFlockUser&&this.currentFlockUser.snippylyId&&this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,{lastProcessedActionTimestamp:e.timestamp})}catch(t){this.loggingService.catch("Error in FlockService processAction: ",t)}}subscribeToLeaderDOMEvents(){try{this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[]),this.domSubscriptions.push(y(window,"mouseover").pipe(C(500)).subscribe(e=>{let t=e?.target;if(t){let r=window.getComputedStyle(t);if(r.position==="fixed"||r.position==="sticky"||t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;t=L(t,{x:e.clientX,y:e.clientY}),this.updateHoveredElement(t)}})),this.domSubscriptions.push(this.domService.onWindowClick$().subscribe(e=>{let t=e?.target;if(t){if(t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;this.updateClickedElement(t)}})),this.subscribeToUrlChanges(),this.subscribeToScrollables()}catch(e){this.loggingService.catch("Error in FlockService subscribeToLeaderDOMEvents: ",e)}}subscribeToFollowerDOMEvents(){}updateClickedElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.CLICK,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateClickedElement: ",t)}}updateHoveredElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.HOVER,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateHoveredElement: ",t)}}subscribeToScrollables(){try{let e=V();e.push(document),e?.forEach(t=>{this.domSubscriptions.push(y(t,"scroll").pipe(C(100)).subscribe(r=>{this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader&&this.updateScrollPositionOfElement(t)}))})}catch(e){this.loggingService.catch("Error in FlockService getScrollableElements: ",e)}}updateScrollPositionOfElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=new U("","");if(e===document){let o=z();if(o){let s=L(o);s&&(t.targetXpath=this.domService.getXPath(s))}t.xpath=""}else{let o=H(e);t.targetXpath=this.domService.getXPath(o),t.xpath=this.domService.getXPath(e)}let r=!1,i=!1;if(this.localScrollData.forEach((o,s)=>{o.xpath===o.xpath&&(t.targetXpath!==o.targetXpath&&(r=!0),this.localScrollData[s]=Object.assign(o,t),i=!0)}),i||this.localScrollData.push(t),r||!i){let o=new u;o.type=h.SCROLL,o.data=t,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,o)}}}catch(t){this.loggingService.catch("Error in FlockService calculateScrollPositionOfAnElement: ",t)}}enableFlockMode(e){try{if(this.flockMode$.next(!0),e){let{useHistoryAPI:t,onNavigate:r,disableDefaultNavigation:i,darkMode:o}=e;t!==void 0&&(this.useHistoryAPI=t),r!==void 0&&typeof r=="function"&&(this.onNavigate=r),i!==void 0&&(this.disableDefaultNavigation=i),this.flockOverlayService.setDarkMode(o)}}catch(t){this.loggingService.catch("Error in FlockService enableFlockMode: ",t)}}disableFlockMode(){try{this.flockMode$.next(!1),this.onNavigateEmitter=void 0,this.useHistoryAPI=!0,this.onNavigate=void 0}catch(e){this.loggingService.catch("Error in FlockService disableFlockMode: ",e)}}setDisableFlockNavigation(e){try{this.disableDefaultNavigation=e}catch(t){this.loggingService.catch("Error in FlockService setDisableFlockNavigation: ",t)}}getFlockMode$(){return this.flockMode$.asObservable()}getFlockMode(){return this.flockMode$.value}setNavigateEmitter(e){try{this.onNavigateEmitter=e}catch(t){this.loggingService.catch("Error in FlockService setNavigateEmitter: ",t)}}setTabFocused(e){try{if(this.tabFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.tabFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.tabFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setTabFocused: ",t)}}setWindowFocused(e){try{if(this.windowFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.windowFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.windowFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setWindowFocused: ",t)}}setFlockLeader(e,t){try{this.flockLeader$.next({userId:e,name:t})}catch(r){this.loggingService.catch("Error in FlockService setFlockLeader: ",r)}}isInSession(){try{return!!(this.currentFlockUser&&this.currentFlockUser.sessionId)}catch(e){this.loggingService.catch("Error in FlockService isFollowing: ",e)}return!1}removeCurrentUserFromSession(){try{this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[],this.currentFlockUser&&(this.currentFlockUser.isLeader?this.currentFlockUser.sessionId&&this.flockSessionService.deleteSession(this.currentFlockUser.sessionId):this.currentFlockUser.snippylyId&&this.flockSessionService.removeFollowerFromCurrentSession(this.currentFlockUser.snippylyId))}catch(e){this.loggingService.catch("Error in FlockService removeCurrentUserFromSession: ",e)}}checkMatchingUrl(e){try{let r=k()?.url,i=e.url;if(r!==i&&i!==void 0){let{url:o,path:s,baseUrl:c}=e;if(this.onNavigate!==void 0&&typeof this.onNavigate=="function"){this.onNavigate({url:o,path:s,baseUrl:c});return}if(this.onNavigateEmitter&&this.onNavigateEmitter.emit({url:o,path:s,baseUrl:c}),this.disableDefaultNavigation)return;window.location.href=i}}catch(t){this.loggingService.catch("Error in FlockService checkMatchingUrl: ",t)}}scrollToFollowedUser(e){try{if(e.xpath===""){let t=this.domService.getElementFromXPath(e.targetXpath);t&&F(t)}else{let t=this.domService.getElementFromXPath(e.xpath),r=this.domService.getElementFromXPath(e.targetXpath);t&&r&&(F(t),R(t,r))}}catch(t){this.loggingService.catch("Error in FlockService scrollToFollowedUser: ",t)}}clickUserElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);t&&this.lastClickedElement?.id!==e.id&&(t?.click(),this.lastClickedElement=e)}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}scrollToHoveredElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);if(t&&e.parentXpath)if(e.parentXpath==="/html")F(t);else{let r=this.domService.getElementFromXPath(e.parentXpath);r&&R(r,t,!0)}}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(b),a(G),a(g),a(Q),a(Z))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();export{Ce as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pa as s,Xa as a,Xc as c,si as n}from"./chunk-
|
|
1
|
+
import{Pa as s,Xa as a,Xc as c,si as n}from"./chunk-KWXZADQY.js";var f=(()=>{let i=class i{constructor(t,r){this.domService=t,this.sanitizer=r}transform(t,r=!0){try{let o=r?this.domService.sanitizeHtml(t):t;return this.sanitizer.bypassSecurityTrustHtml(o)}catch{return t}}};i.\u0275fac=function(r){return new(r||i)(s(n,16),s(c,16))},i.\u0275pipe=a({name:"safeHtml",type:i,pure:!0});let e=i;return e})();export{f as a};
|