UNPKG

@veltdev/sdk

Version:

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.

1 lines 992 kB
import{a as Tt,b as Wa,c as Ya}from"./chunk-H34UA5UO.js";import{A as ye,B as Ga,C as Oe,a as Go,b as gr,c as vr,d as ur,e as fr,f as hr,g as Cr,h as _r,i as yr,j as Sr,k as xr,l as br,m as Ir,n as Pr,o as Er,p as Dr,q as Tr,r as Or,s as wr,t as kr,u as Wo,v as Yo,w as Rr,x as Mr,y as Vr,z as rt}from"./chunk-GJJML4YW.js";import"./chunk-RZ4WYBKV.js";import"./chunk-RRHXMXZH.js";import"./chunk-JP3HOBZL.js";import"./chunk-FHPKMTSO.js";import{b as Vo,c as dt,d as va}from"./chunk-KEET32BV.js";import"./chunk-ICCKJPGL.js";import"./chunk-BWEYL3QS.js";import"./chunk-6YXU2Y3T.js";import{a as ja}from"./chunk-JFNRCHYR.js";import{b as Ao,c as Fo,g as Bo,i as ya,l as Sa,m as xa,s as rn,u as Pa,v as Ea,w as Da,x as lt}from"./chunk-U4YN7DB7.js";import"./chunk-ZATQYC4Y.js";import{a as pt}from"./chunk-JDLRIKAZ.js";import{A as P,B as R,o as Zo,y as za}from"./chunk-3J52NZMN.js";import{a as Se,b as Na}from"./chunk-4ACOV475.js";import{b as W,c as Ha,d as Uo}from"./chunk-WTYACTR5.js";import{a as Ua}from"./chunk-6E3N35RF.js";import{a as Za}from"./chunk-KEM6PWSD.js";import{a as _a}from"./chunk-UJRDSNTY.js";import{A as on,F as ha,G as Ue,H as Je,I as Ca,Y as ba,ba as Ia,da as f,ea as Ie,fa as N,ga as Pe,r as ua,t as fa}from"./chunk-KU45CEXD.js";import{$ as Eo,$b as dr,Ab as $e,Ag as ka,Bb as Qe,Ca as ia,Da as oa,Db as Ee,E as Pt,Eb as De,Ec as Ro,Ee as Q,Fa as c,Fb as Te,Fc as Re,Fe as Oa,Ga as be,Gc as b,Hc as ut,Ib as re,Ic as ft,Ih as Ma,Ii as La,J as en,Jb as Be,Jc as Mo,Jh as Va,Kb as te,Kc as pa,Ke as mn,Kh as jo,Lc as Me,Lh as Aa,Ma as ra,Mb as To,Mh as Ho,Nb as ie,Nh as Fa,Oa as aa,Ob as ke,Of as No,Pa as d,Pb as ge,Pc as ga,Sb as Oo,T as ta,Ta as la,Tb as wo,Ua as x,Ub as ko,Va as ca,Vg as pr,Ya as k,_a as s,_b as F,_d as at,_g as Ra,a as h,aa as na,ac as Ve,b as _,bb as sa,bc as C,bi as an,ca as st,cc as D,ci as Ke,db as E,dc as ve,di as y,ec as qe,ei as Ba,fc as L,fh as We,g as Le,ga as Do,ha as O,ia as w,if as wa,ja as K,jf as Lo,k as sr,ka as Ae,kc as z,la as tn,lb as l,lc as j,li as Ne,mb as v,mi as mt,nb as u,ob as S,oe as Ta,pc as he,qa as ce,qg as zo,r as wt,sb as m,sc as ma,tb as p,tc as nn,ua as Fe,ub as we,v as ea,vb as Z,vh as de,wa as T,wb as da,xb as H,xc as Et,yi as Dt,zb as a,zg as mr}from"./chunk-GR3NESUB.js";var ht=(()=>{let o=class o{constructor(e,n,r,g){this.loggingService=e,this.recorderAnnotationService=n,this.recorderService=r,this.serviceBook=g,this.actionSubjects=new Map,this.subscriptions=[];try{this.serviceBook.set(jo,this),this.recorderAnnotationService.setRecorderActionsService(this),this.recorderService.setRecorderActionsService(this)}catch(I){this.loggingService.catch("Error in RecorderActionsService constructor: ",I)}}onTranscriptionDone(e){try{this.triggerAction(at.TRANSCRIPTION_DONE,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onTranscriptionDone: ",n)}}onRecordingDone(e){try{this.triggerAction(at.RECORDING_DONE,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingDone: ",n)}}onRecordingDoneLocal(e){try{this.triggerAction(at.RECORDING_DONE_LOCAL,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingDoneLocal: ",n)}}onRecordingEditDone(e){try{this.triggerAction(at.RECORDING_EDIT_DONE,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingEditDone: ",n)}}onRecordingStarted(e){try{this.triggerAction(at.RECORDING_STARTED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingStarted: ",n)}}onRecordingPaused(e){try{this.triggerAction(at.RECORDING_PAUSED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingPaused: ",n)}}onRecordingCancelled(e){try{this.triggerAction(at.RECORDING_CANCELLED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingCancelled: ",n)}}onRecordingStopped(e){try{this.triggerAction(at.RECORDING_STOPPED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingStopped: ",n)}}onRecordingResumed(e){try{this.triggerAction(at.RECORDING_RESUMED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingResumed: ",n)}}onDeleteRecording(e){try{this.triggerAction(at.DELETE_RECORDING,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onDeleteRecording: ",n)}}onError(e){try{this.triggerAction(at.ERROR,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onError: ",n)}}onRecordingSaveInitiated(e){try{this.triggerAction(at.RECORDING_SAVE_INITIATED,e)}catch(n){this.loggingService.catch("Error in RecorderActionsService onRecordingSaveInitiated: ",n)}}triggerAction(e,n){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new sr),this.actionSubjects.get(e)?.next(n)}catch(r){this.loggingService.catch("Error in RecorderActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new sr),this.actionSubjects.get(e)?.asObservable()}catch(n){return this.loggingService.catch("Error in RecorderActionsService onAction: ",n),wt(null)}}};o.\u0275fac=function(n){return new(n||o)(st(y),st(Oe),st(ye),st(an))},o.\u0275prov=Eo({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var me=class{constructor(){this.trackByAttachmentId=(o,i)=>i?.attachmentId,this.trackByMarkerPosition=(o,i)=>i?.position||o,this.trackByZoomOption=(o,i)=>i.value,this.trackByPreviewImage=(o,i)=>i||o,this.videoDuration=120,this.currentTime=0,this.currentTimeDisplay="00:00",this.timeMarkers=[],this.timelineWidth=0,this.isPlayingTrimPreview=!1,this.videoLoaded=!1,this.isLoading=!1,this.isDownloading=!1,this.recordingType="audio",this.isDraggingFromStart=!1,this.isDraggingFromEnd=!1,this.hasReachedEndOfTrimSections=!1,this.playbackOnPreviewClick=!0,this.timelineData={trim:{activeSectionIndex:-1,sections:[],initialSections:[],selectionStart:null,selectionEnd:null,isSelectingArea:!1,isDraggingForSelection:!1,selectionStarted:!1,hasChanges:!1,initialDragX:0,selectedSectionIndex:-1},scale:{activeSectionIndex:-1,sections:[],initialSections:[],selectionStart:null,selectionEnd:null,isSelectingArea:!1,isDraggingForSelection:!1,selectionStarted:!1,hasChanges:!1,initialDragX:0,selectedSectionIndex:-1}},this.playingSectionIndex=-1,this.trackByTrimSectionIndex=(o,i)=>o,this.trackByScaleSectionIndex=(o,i)=>o,this.isSelectionActive=!0,this.isDraggingPlayhead=!1,this.selectionMinDragDistance=Q.VIDEO_EDITOR.SELECTION_MIN_DRAG_DISTANCE,this.justCompletedDrag=!1,this.isZoomActive=-1,this.zoomOptions=Q.VIDEO_EDITOR.ZOOM_FACTOR_OPTIONS,this.showZoomDropdown={},this.currentZoomScale=1,this.zoomedVideoStyle={},this.onVideoLoaded=()=>{},this.onVideoTimeUpdate=()=>{},this.onTimelineClick=()=>{},this.onPlayheadMouseDown=()=>{},this.toggleEditPreview=()=>{},this.selectZoomOption=()=>{},this.onZoomRectDragEnded=o=>{},this.onZoomRectResizeEnded=()=>{},this.emitApplyEdit=()=>{},this.emitCloseEdit=()=>{},this.onAddButtonClick=()=>{},this.onDeleteButtonClick=()=>{},this.onTimelineMouseDown=()=>{},this.updateActiveSection=()=>{},this.handleDragStart=()=>{},this.addCut=()=>{},this.onDeleteSelectionClick=()=>{},this.findSectionIndexAtTime=()=>{},this.applyScalePreview=()=>{},this.updateZoomStyle=()=>{},this.resetZoom=()=>{},this.minDragArea=1e-4,this.maxZoomFactor=Q.VIDEO_EDITOR.MAX_ZOOM_FACTOR,this.setSectionActive=()=>{},this.activeScalingInPreviewIndex=-1,this.activeScalingOutPreviewIndex=-1,this.rectangleCornerDragging=!1,this.toggleZoomDropdown=()=>{},this.closeZoomDropdown=()=>{},this.setCustomZoomFactor=()=>{},this.downloadLatestEditedVideo=()=>{},this.onAddZoomButtonClick=()=>{},this.isCurrentTimeInZoomSection=!1,this.playheadActionsVisible=!1,this.showPlayheadActions=()=>{},this.hidePlayheadActions=()=>{},this.defaultZoomFactor=Q.VIDEO_EDITOR.DEFAULT_ZOOM_FACTOR,this.onboardingTooltipVisible=!1,this.showOnboardingTooltip=()=>{},this.hideOnboardingTooltip=()=>{},this.onTimelineTrimClick=()=>{},this.clearSelection=()=>{},this.isZoomCustomValue=!1,this.playheadPosition=0,this.retakeHandler=()=>{},this.showRetakeButton=!1,this.canVideoSupportZoom=!0,this.supportZoomHintVisible=!1,this.showSupportZoomHint=()=>{},this.hideSupportZoomHint=()=>{},this.getHintLeftPosition=()=>{},this.getHintTransform=()=>{},this.backspaceHintLeftPosition=0,this.backspaceHintTransform=""}};var Xa=t=>({componentConfigSignal:t}),ps=(t,o)=>({condition:t,data:o}),gs=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-apply-button-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function vs(t,o){if(t&1&&(m(0),v(1,"div",4),ie(2),u(),p()),t&2){let i=a(2).ngIf;c(2),ge(" ",i.isLoading?"Applying...":"Done"," ")}}function us(t,o){if(t&1){let i=Z();m(0),v(1,"div",2),H("click",function(){O(i);let n=a().ngIf;return w(n.emitApplyEdit())}),s(2,vs,3,1,"ng-container",3),u(),p()}if(t&2){let i=a().ngIf,e=a();c(),te("velt-video-editor-player--apply-disabled-control",i.isLoading||i.timelineData.trim.sections.length===0),c(),l("veltDynamicTemplate",L(5,gs,e.template,C(3,Xa,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function fs(t,o){if(t&1&&(m(0),s(1,us,3,11,"ng-container",1),p()),t&2){let i=a();c(),l("veltIf",D(3,ps,i.conditionSignal(),C(1,Xa,i.componentConfigSignal)))}}var pn=(()=>{let o=class o extends N{constructor(e,n,r){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.componentId="velt-video-editor-player-apply-button",super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerApplyButtonComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerApplyButtonComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerApplyButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-apply-button-internal"]],standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-video-editor-player--apply-button",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player--apply-button-text"]],template:function(n,r){n&1&&s(0,fs,2,6,"ng-container",0),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R],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%]:empty{display:none}.velt-video-editor-player--apply-button-text[_ngcontent-%COMP%]{cursor:pointer;display:flex;padding:0px var(--velt-spacing-lg);height:36px;justify-content:center;align-items:center;gap:var(--velt-spacing-sm);align-self:stretch;border-radius:var(--velt-border-radius-sm);background:var(--velt-text-0);color:var(--velt-background-0);font-size:var(--velt-font-size-sm);font-style:normal;font-weight:500;line-height:20px}.velt-video-editor-player--apply-button-text[_ngcontent-%COMP%]:hover{opacity:.8}.velt-video-editor-player--apply-disabled-control[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed}.velt-video-editor-player--apply-disabled-control[_ngcontent-%COMP%] .velt-video-editor-player--apply-button-text[_ngcontent-%COMP%]{opacity:.5}"],changeDetection:0});let t=o;return t})();var $a=t=>({componentConfigSignal:t}),Cs=(t,o)=>({condition:t,data:o}),_s=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-close-button-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function ys(t,o){t&1&&(m(0),v(1,"div",4),ie(2," Discard "),u(),p())}function Ss(t,o){if(t&1){let i=Z();m(0),v(1,"div",2),H("click",function(){O(i);let n=a().ngIf;return w(n.emitCloseEdit())}),s(2,ys,3,0,"ng-container",3),u(),p()}if(t&2){let i=a().ngIf,e=a();c(),te("velt-video-editor-player--close-disabled-control",i.isLoading),c(),l("veltDynamicTemplate",L(5,_s,e.template,C(3,$a,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function xs(t,o){if(t&1&&(m(0),s(1,Ss,3,11,"ng-container",1),p()),t&2){let i=a();c(),l("veltIf",D(3,Cs,i.conditionSignal(),C(1,$a,i.componentConfigSignal)))}}var gn=(()=>{let o=class o extends N{constructor(e,n,r){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.componentId="velt-video-editor-player-close-button",super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerCloseButtonComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerCloseButtonComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerCloseButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-close-button-internal"]],standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-video-editor-player--close-button",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player--close-button-text"]],template:function(n,r){n&1&&s(0,xs,2,6,"ng-container",0),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R],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%]:empty{display:none}.velt-video-editor-player--close-button-text[_ngcontent-%COMP%]{cursor:pointer;height:32px;display:flex;padding:0px var(--velt-spacing-lg);justify-content:center;align-items:center;gap:var(--velt-spacing-sm);align-self:stretch;border-radius:var(--velt-border-radius-sm);border:2px solid var(--velt-border-4);background:var(--velt-background-0);color:var(--velt-text-0);font-size:var(--velt-font-size-sm);font-style:normal;font-weight:500;line-height:20px}.velt-video-editor-player--close-button-text[_ngcontent-%COMP%]:hover{opacity:.8}.velt-video-editor-player--close-disabled-control[_ngcontent-%COMP%]{pointer-events:none}.velt-video-editor-player--close-disabled-control[_ngcontent-%COMP%] .velt-video-editor-player--close-button-text[_ngcontent-%COMP%]{opacity:.5}"],changeDetection:0});let t=o;return t})();var Qa=t=>({componentConfigSignal:t}),Is=(t,o)=>({condition:t,data:o}),Ps=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-preview-loading-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function Es(t,o){t&1&&(m(0),v(1,"div",3)(2,"div",4),S(3,"div",5),u()(),p())}function Ds(t,o){if(t&1&&(m(0),s(1,Es,4,0,"ng-container",2),p()),t&2){let i=a(2).ngIf,e=a();c(),l("veltDynamicTemplate",L(3,Ps,e.template,C(1,Qa,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function Ts(t,o){if(t&1&&(m(0),s(1,Ds,2,9,"ng-container",0),p()),t&2){let i=a().ngIf;c(),l("ngIf",!(i!=null&&i.videoLoaded))}}function Os(t,o){if(t&1&&(m(0),s(1,Ts,2,1,"ng-container",1),p()),t&2){let i=a();c(),l("veltIf",D(3,Is,i.conditionSignal(),C(1,Qa,i.componentConfigSignal)))}}var vn=(()=>{let o=class o extends N{constructor(e,n,r){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.componentId="velt-video-editor-player-preview-loading",super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewLoadingComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewLoadingComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewLoadingComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-preview-loading-internal"]],standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player-preview-loading-overlay"],[1,"velt-video-editor-player-preview-loading-spinner"],[1,"velt-video-editor-player-preview-loading-spinner-bar"]],template:function(n,r){n&1&&s(0,Os,2,6,"ng-container",0),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R],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%]:empty{display:none}.velt-video-editor-player-preview-loading-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:10}.velt-video-editor-player-preview-loading-overlay[_ngcontent-%COMP%] .velt-video-editor-player-preview-loading-spinner[_ngcontent-%COMP%]{width:50px;height:50px;display:flex;justify-content:center;align-items:center}.velt-video-editor-player-preview-loading-overlay[_ngcontent-%COMP%] .velt-video-editor-player-preview-loading-spinner[_ngcontent-%COMP%] .velt-video-editor-player-preview-loading-spinner-bar[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;border:3px solid var(--velt-background-0);border-top-color:var(--velt-warning);animation:_ngcontent-%COMP%_velt-video-editor-player-preview-loading-spin 1s linear infinite}@keyframes _ngcontent-%COMP%_velt-video-editor-player-preview-loading-spin{to{transform:rotate(360deg)}}"],changeDetection:0});let t=o;return t})();var ks=["videoElement"],qa=t=>({componentConfigSignal:t}),Rs=(t,o)=>({condition:t,data:o}),Ms=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-preview-video-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function Vs(t,o){if(t&1&&S(0,"source",10),t&2){let i=a(3).ngIf;l("src",i.blobUrl)}}function As(t,o){if(t&1&&S(0,"source",10),t&2){let i=a(3).ngIf;l("src",i.url)}}function Fs(t,o){if(t&1&&S(0,"source",10),t&2){let i=a(3).ngIf;l("src",!(i.annotation==null||i.annotation.attachment==null)&&i.annotation.attachment.thumbnail?i.annotation==null||i.annotation.attachment==null?null:i.annotation.attachment.url:(i.annotation==null||i.annotation.attachment==null?null:i.annotation.attachment.url)+"#t=0.001")}}function Bs(t,o){if(t&1&&S(0,"source",12),t&2){let i=o.$implicit;l("src",i==null?null:i.url)("type",(i==null?null:i.mimeType)||"video/mp4")}}function Ls(t,o){if(t&1&&(s(0,Bs,1,2,"source",11),z(1,"rearrangeMediaSource")),t&2){let i=a(3).ngIf;l("ngForOf",j(1,2,i.annotation==null?null:i.annotation.attachments))("ngForTrackBy",i.trackByAttachmentId)}}function Ns(t,o){if(t&1){let i=Z();v(0,"div",13)(1,"div",14),H("mousedown",function(n){O(i);let r=a(4);return w(r.onRectangleMouseDown(n))})("click",function(n){O(i);let r=a(4);return w(r.onRectangleClick(n))})("cdkDragStarted",function(n){O(i);let r=a(4);return w(r.onRectangleDragStarted(n))})("cdkDragMoved",function(n){O(i);let r=a(4);return w(r.onRectangleDragMoved(n))})("cdkDragEnded",function(n){O(i);let r=a(4);return w(r.onRectangleDragEnded(n))}),v(2,"div",15),H("mousedown",function(n){O(i);let r=a(4);return w(r.onResizeStart(n,"nw"))}),u(),v(3,"div",16),H("mousedown",function(n){O(i);let r=a(4);return w(r.onResizeStart(n,"ne"))}),u(),v(4,"div",17),H("mousedown",function(n){O(i);let r=a(4);return w(r.onResizeStart(n,"sw"))}),u(),v(5,"div",18),H("mousedown",function(n){O(i);let r=a(4);return w(r.onResizeStart(n,"se"))}),u(),S(6,"div",19),u()()}if(t&2){let i=a(3).ngIf,e=a();c(),Be("width",100/((i==null||i.timelineData==null||i.timelineData.scale==null||i.timelineData.scale.sections==null||i.timelineData.scale.sections[(i==null||i.timelineData==null||i.timelineData.scale==null?null:i.timelineData.scale.selectedSectionIndex)||0]==null?null:i.timelineData.scale.sections[(i==null||i.timelineData==null||i.timelineData.scale==null?null:i.timelineData.scale.selectedSectionIndex)||0].zoomFactor)||1),"%")("height",100/((i==null||i.timelineData==null||i.timelineData.scale==null||i.timelineData.scale.sections==null||i.timelineData.scale.sections[(i==null||i.timelineData==null||i.timelineData.scale==null?null:i.timelineData.scale.selectedSectionIndex)||0]==null?null:i.timelineData.scale.sections[(i==null||i.timelineData==null||i.timelineData.scale==null?null:i.timelineData.scale.selectedSectionIndex)||0].zoomFactor)||1),"%"),l("cdkDragBoundary",".velt-video-editor-player-zoom-overlay")("cdkDragFreeDragPosition",e.getRectanglePixelPosition())}}function zs(t,o){if(t&1){let i=Z();m(0),v(1,"div",4)(2,"div",5)(3,"video",6,0),H("click",function(n){O(i);let r=a(2).ngIf,g=a();return w(r.playbackOnPreviewClick?g.playOnPreviewClick(n):null)})("loadedmetadata",function(){O(i);let n=a(2).ngIf;return w(n.onVideoLoaded())})("timeupdate",function(){O(i);let n=a(2).ngIf;return w(n.onVideoTimeUpdate())}),s(5,Vs,1,1,"source",7)(6,As,1,1,"source",7)(7,Fs,1,1,"source",7)(8,Ls,2,4,"ng-template",8),u(),s(9,Ns,7,6,"div",9),u()(),p()}if(t&2){let i=a(2).ngIf;c(3),te("flip",i.recordingType===i.recorderModes.VIDEO),l("ngStyle",i.zoomedVideoStyle)("poster",i.type=="standalone"?"":(i.annotation==null||i.annotation.attachment==null?null:i.annotation.attachment.thumbnail)||(!(i.annotation==null||i.annotation.attachments==null)&&i.annotation.attachments.length?i.annotation==null?null:i.annotation.attachments[0].thumbnail:"")),c(2),l("ngIf",i.blobUrl&&i.type==="standalone"),c(),l("ngIf",i.url&&!i.blobUrl&&i.type==="standalone"),c(),l("ngIf",!(!(i.annotation==null||i.annotation.attachments==null)&&i.annotation.attachments.length)&&(i.annotation==null?null:i.annotation.attachment)&&i.type!=="standalone"),c(),l("ngIf",(i.annotation==null||i.annotation.attachments==null?null:i.annotation.attachments.length)&&i.type!=="standalone"),c(),l("ngIf",i.timelineData.scale.selectedSectionIndex!==-1&&!i.isPlayingTrimPreview)}}function js(t,o){if(t&1&&(m(0),s(1,zs,10,9,"ng-container",3),p()),t&2){let i=a().ngIf,e=a();c(),l("veltDynamicTemplate",L(3,Ms,e.template,C(1,qa,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function Hs(t,o){if(t&1&&(m(0),s(1,js,2,9,"ng-container",2),p()),t&2){let i=a();c(),l("veltIf",D(3,Rs,i.conditionSignal(),C(1,qa,i.componentConfigSignal)))}}var fn=(()=>{let o=class o extends N{constructor(e,n,r,g){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.cdr=g,this.componentId="velt-video-editor-player-preview-video",this.isDragging=!1,this.initialWidth=0,this.initialHeight=0,this.initialRectHeight=0,this.initialRectWidth=0,this.initialTopLeftX=0,this.initialTopLeftY=0,this.aspectRatio=1,this.currentHandle="",this.startMouseX=0,this.startMouseY=0,this.rectElement=null,this.containerSizeChangeCounter=0,this.isDraggingRectangle=!1,this.lastKnownPosition={x:0,y:0},this.calculateOptimalSize=()=>{try{let I=this.elementRef.nativeElement.querySelector(".velt-video-editor-player-preview-video-container-video"),B=this.videoElement?.nativeElement;if(!I||!B)return;let A=this.elementRef.nativeElement.querySelector(".velt-video-editor-player-preview-video-container");if(!A)return;let M=A.getBoundingClientRect(),V=M.width,Y=M.height,J=I.offsetWidth,ne=I.offsetHeight;if(B.videoWidth&&B.videoHeight){let oe=B.videoWidth/B.videoHeight,pe=V/Y,le,ae;oe>pe?(le=V,ae=V/oe):(ae=Y,le=Y*oe),I.style.width=le+"px",I.style.height=ae+"px",(J!==le||ne!==ae)&&(this.containerSizeChangeCounter++,this.cdr.detectChanges())}else I.style.width=V+"px",I.style.height=Y+"px",(J!==V||ne!==Y)&&(this.containerSizeChangeCounter++,this.cdr.detectChanges())}catch(I){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent calculateOptimalSize: ",I)}},this.onResizeMove=I=>{try{if(!this.isDragging||!this.rectElement)return;let B=this.componentConfigSignal();if(!B)return;let A=I.clientX-this.startMouseX,M=I.clientY-this.startMouseY,V=this.elementRef.nativeElement.querySelector(".velt-video-editor-player-zoom-overlay");if(!V)return;let Y=V.getBoundingClientRect(),J=100/Y.width,ne=100/Y.height,oe=this.initialWidth,pe=this.initialHeight,le=this.initialTopLeftX,ae=this.initialTopLeftY;if(this.rectElement=this.elementRef.nativeElement.querySelector(".velt-video-player-zoom-rectangle"),!this.rectElement)return;let ue=this.rectElement.getBoundingClientRect(),Xe=ue.height,tt=ue.width;switch(this.currentHandle){case"se":oe=this.initialWidth+A*J,pe=oe/this.aspectRatio;break;case"sw":oe=this.initialWidth-A*J,pe=oe/this.aspectRatio;let Ze=A*J;le=this.initialTopLeftX+Ze;break;case"ne":oe=this.initialWidth+A*J,pe=oe/this.aspectRatio;let ot=pe-this.initialHeight;ae=this.initialTopLeftY-ot;break;case"nw":oe=this.initialWidth-A*J,pe=oe/this.aspectRatio;let je=A*J;le=this.initialTopLeftX+je;let vt=pe-this.initialHeight;ae=this.initialTopLeftY-vt;break}let gt=5;oe=Math.max(gt,oe),pe=Math.max(gt,pe),le=Math.max(0,Math.min(100-oe,le)),ae=Math.max(0,Math.min(100-pe,ae));let ct=B.timelineData?.scale?.selectedSectionIndex||0;this.componentConfigSignal.update(Ze=>{if(Ze.timelineData?.scale?.sections?.[ct]){let ot=Math.round(100/oe*100)/100,je=Ze.maxZoomFactor||3;if(ot>je){if(oe=100/je,pe=oe/this.aspectRatio,this.currentHandle==="sw"||this.currentHandle==="nw"){let nt=this.initialTopLeftX+this.initialWidth;le=nt-oe,le<0&&(le=0,oe=nt)}if(this.currentHandle==="ne"||this.currentHandle==="nw"){let nt=this.initialTopLeftY+this.initialHeight;ae=nt-pe,ae<0&&(ae=0,pe=nt)}}let vt=Math.round(100/oe*100)/100;Ze.timelineData.scale.sections[ct].zoomFactor=vt,Ze.timelineData.scale.sections[ct].topLeftX=le,Ze.timelineData.scale.sections[ct].topLeftY=ae}return h({},Ze)})}catch(B){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onResizeMove: ",B)}},this.onResizeEnd=I=>{try{if(!this.isDragging)return;I.stopPropagation(),I.preventDefault(),this.rectElement&&this.rectElement.classList.remove("resizing");let B=this.componentConfigSignal();if(!B)return;setTimeout(()=>{this.isDragging=!1,this.componentConfigSignal.update(A=>(A=_(h({},A),{rectangleCornerDragging:!1}),A))},0),this.currentHandle="",this.rectElement=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd),B?.onZoomRectResizeEnded&&B.onZoomRectResizeEnded()}catch(B){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onResizeEnd: ",B)}},super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),window.removeEventListener("resize",this.calculateOptimalSize),this.videoElement?.nativeElement&&this.videoElement.nativeElement.removeEventListener("loadedmetadata",this.calculateOptimalSize),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{this.setVideoRef(),this.setupVideoSizeCalculation()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent ngAfterViewInit: ",e)}}setVideoRef(){try{setTimeout(()=>{this.componentConfigSignal()&&this.componentConfigSignal.update(e=>(e=_(h({},e),{videoElementRef:this.videoElement}),e))})}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent setVideoRef: ",e)}}setupVideoSizeCalculation(){try{if(this.videoElement?.nativeElement){this.videoElement.nativeElement.addEventListener("loadedmetadata",this.calculateOptimalSize),window.addEventListener("resize",this.calculateOptimalSize);let n=this.elementRef.nativeElement.querySelector(".velt-video-editor-player-preview-video-container");n&&"ResizeObserver"in window&&(this.resizeObserver=new ResizeObserver(r=>{for(let g of r)this.containerSizeChangeCounter++,this.cdr.detectChanges()}),this.resizeObserver.observe(n)),this.calculateOptimalSize()}}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent setupVideoSizeCalculation: ",e)}}getRectanglePixelPosition(){try{if(this.isDraggingRectangle)return this.lastKnownPosition;this.containerSizeChangeCounter;let e=this.componentConfigSignal();if(!e?.timelineData?.scale?.sections)return{x:0,y:0};let n=e.timelineData.scale.selectedSectionIndex||0,r=e.timelineData.scale.sections[n];if(!r)return{x:0,y:0};let g=this.elementRef.nativeElement.querySelector(".velt-video-editor-player-zoom-overlay");if(!g)return{x:0,y:0};let I=g.getBoundingClientRect(),B=(r.topLeftX||0)*I.width/100,A=(r.topLeftY||0)*I.height/100;return this.lastKnownPosition={x:B,y:A},{x:B,y:A}}catch(e){return this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent getRectanglePixelPosition: ",e),{x:0,y:0}}}onResizeStart(e,n){try{let r=this.componentConfigSignal();if(!r||(e.preventDefault(),e.stopPropagation(),this.rectElement=this.elementRef.nativeElement.querySelector(".velt-video-player-zoom-rectangle"),!this.rectElement))return;this.rectElement.classList.add("resizing");let g=this.rectElement.getBoundingClientRect();this.initialRectHeight=g.height,this.initialRectWidth=g.width,this.isDragging=!0,this.componentConfigSignal.update(A=>(A=_(h({},A),{rectangleCornerDragging:!0}),A)),this.currentHandle=n,this.startMouseX=e.clientX,this.startMouseY=e.clientY;let I=r.timelineData?.scale?.selectedSectionIndex||0,B=r.timelineData?.scale?.sections?.[I];if(!B)return;this.initialWidth=100/(B.zoomFactor||1),this.initialHeight=100/(B.zoomFactor||1),this.initialTopLeftX=B.topLeftX||0,this.initialTopLeftY=B.topLeftY||0,this.aspectRatio=this.initialWidth/this.initialHeight,document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd),this.componentConfigSignal.update(A=>(A=_(h({},A),{isZoomCustomValue:!0}),A))}catch(r){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onResizeStart: ",r)}}onRectangleMouseDown(e){try{e.stopPropagation()}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onRectangleMouseDown: ",n)}}onRectangleClick(e){try{e.stopPropagation(),this.isDraggingRectangle&&e.preventDefault()}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onRectangleClick: ",n)}}onRectangleDragStarted(e){try{let n=this.getRectanglePixelPosition();this.lastKnownPosition=n,this.isDraggingRectangle=!0,this.containerSizeChangeCounter=-1}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onRectangleDragStarted: ",n)}}onRectangleDragMoved(e){try{this.isDraggingRectangle=!0}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onRectangleDragMoved: ",n)}}onRectangleDragEnded(e){try{this.containerSizeChangeCounter++,this.isDraggingRectangle=!1;let n=this.componentConfigSignal();n?.onZoomRectDragEnded&&n.onZoomRectDragEnded(e),this.cdr.detectChanges()}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent onRectangleDragEnded: ",n)}}playOnPreviewClick(e){try{e.stopPropagation(),this.componentConfigSignal().updateActiveSection(),this.componentConfigSignal().toggleEditPreview()}catch(n){this.loggingService.catch("Error in VideoEditorPlayerPreviewVideoComponent playOnPreviewClick: ",n)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y),d(Et))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-preview-video-internal"]],viewQuery:function(n,r){if(n&1&&Ee(ks,5),n&2){let g;De(g=Te())&&(r.videoElement=g.first)}},standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[["videoElement",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player-preview-video-container"],[1,"velt-video-editor-player-preview-video-container-video"],["playsinline","",3,"click","loadedmetadata","timeupdate","ngStyle","poster"],["type","video/mp4",3,"src",4,"ngIf"],[3,"ngIf"],["class","velt-video-editor-player-zoom-overlay",4,"ngIf"],["type","video/mp4",3,"src"],[3,"src","type",4,"ngFor","ngForOf","ngForTrackBy"],[3,"src","type"],[1,"velt-video-editor-player-zoom-overlay"],["cdkDrag","",1,"velt-video-player-zoom-rectangle",3,"mousedown","click","cdkDragStarted","cdkDragMoved","cdkDragEnded","cdkDragBoundary","cdkDragFreeDragPosition"],[1,"velt-video-player-resize-handle","velt-video-player-resize-handle-nw",3,"mousedown"],[1,"velt-video-player-resize-handle","velt-video-player-resize-handle-ne",3,"mousedown"],[1,"velt-video-player-resize-handle","velt-video-player-resize-handle-sw",3,"mousedown"],[1,"velt-video-player-resize-handle","velt-video-player-resize-handle-se",3,"mousedown"],[1,"velt-video-player-resize-handle-center"]],template:function(n,r){n&1&&s(0,Hs,2,6,"ng-container",1),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[Re,b,pa,dt,P,R,Tt],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%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%]:empty{display:none}.velt-video-editor-player-preview-video-container[_ngcontent-%COMP%]{position:relative;height:100%;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center}.velt-video-editor-player-preview-video-container[_ngcontent-%COMP%] .velt-video-editor-player-zoom-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.velt-video-editor-player-preview-video-container[_ngcontent-%COMP%] .velt-video-editor-player-zoom-overlay.active[_ngcontent-%COMP%]{pointer-events:auto}.velt-video-editor-player-preview-video-container[_ngcontent-%COMP%] .velt-video-editor-player-zoom-overlay[_ngcontent-%COMP%] .velt-video-player-zoom-rectangle[_ngcontent-%COMP%]{box-shadow:28px -9px 0 2000px #00000061;-webkit-box-shadow:28px -9px 0px 2000px rgba(0,0,0,.38);-moz-box-shadow:28px -9px 0px 2000px rgba(0,0,0,.38);position:relative;outline:2px solid #fff;outline-offset:-2px;cursor:move;pointer-events:auto}.velt-video-editor-player-preview-video-container[_ngcontent-%COMP%] .velt-video-editor-player-zoom-overlay[_ngcontent-%COMP%] .velt-video-player-zoom-rectangle.resizing[_ngcontent-%COMP%]{transition:none!important}.velt-video-editor-player-preview-video-container-video[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;height:100%;border-radius:var(--velt-border-radius-xs)}.velt-video-editor-player-preview-video-container-video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;background-color:var(--velt-background-1);transition:transform .1s linear}.velt-video-editor-player-preview-video-container-video[_ngcontent-%COMP%] video.flip[_ngcontent-%COMP%]{transform:scaleX(-1)}.cdk-drag[_ngcontent-%COMP%]{transition:width .2s ease-out,height .2s ease-out}.cdk-drag.resizing[_ngcontent-%COMP%]{transition:none!important}.velt-video-player-resize-handle[_ngcontent-%COMP%]{position:absolute;width:12px;height:12px;background-color:#fff;border-radius:4px;z-index:10}.velt-video-player-resize-handle-nw[_ngcontent-%COMP%]{top:-6px;left:-6px;cursor:nw-resize}.velt-video-player-resize-handle-ne[_ngcontent-%COMP%]{top:-6px;right:-6px;cursor:ne-resize}.velt-video-player-resize-handle-sw[_ngcontent-%COMP%]{bottom:-6px;left:-6px;cursor:sw-resize}.velt-video-player-resize-handle-se[_ngcontent-%COMP%]{bottom:-6px;right:-6px;cursor:se-resize}.velt-video-player-resize-handle-center[_ngcontent-%COMP%]{position:absolute;width:6px;height:6px;border:2px solid white;box-shadow:0 0 2px #00000080;border-radius:8px;z-index:10;top:50%;left:50%;transform:translate(-50%,-50%);cursor:move}"],changeDetection:0});let t=o;return t})();var Ja=t=>({componentConfigSignal:t}),Us=(t,o)=>({condition:t,data:o}),Gs=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-preview-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function Ws(t,o){if(t&1&&(m(0),v(1,"div",4),S(2,"velt-video-editor-player-preview-loading-internal",5)(3,"velt-video-editor-player-preview-video-internal",5),u(),p()),t&2){let i=a(3);c(2),l("componentConfigSignal",i.componentConfigSignal),c(),l("componentConfigSignal",i.componentConfigSignal)}}function Ys(t,o){if(t&1&&(m(0),v(1,"div",2),s(2,Ws,4,2,"ng-container",3),u(),p()),t&2){let i=a().ngIf,e=a();c(2),l("veltDynamicTemplate",L(3,Gs,e.template,C(1,Ja,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function Xs(t,o){if(t&1&&(m(0),s(1,Ys,3,9,"ng-container",1),p()),t&2){let i=a();c(),l("veltIf",D(3,Us,i.conditionSignal(),C(1,Ja,i.componentConfigSignal)))}}var hn=(()=>{let o=class o extends N{constructor(e,n,r){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.componentId="velt-video-editor-player-preview",super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerPreviewComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-preview-internal"]],standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-video-editor-player--video-preview-container"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player--video-preview"],[3,"componentConfigSignal"]],template:function(n,r){n&1&&s(0,Xs,2,6,"ng-container",0),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R,vn,fn],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%]{display:flex;flex:1;width:100%;height:0px}[_nghost-%COMP%]:empty{display:none}.velt-video-editor-player--video-preview-container[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.velt-video-editor-player--video-preview[_ngcontent-%COMP%]{overflow:hidden;padding:var(--velt-spacing-2xl) var(--velt-spacing-sm);display:flex;justify-content:center;align-items:center;flex:1;background-color:var(--velt-background-3)}"],changeDetection:0});let t=o;return t})();var Ka=t=>({componentConfigSignal:t}),Qs=(t,o)=>({condition:t,data:o}),qs=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-zoom-button-options-input-wireframe",variant:i,setIfCondition:e,componentElementRef:n}),Js=()=>[1.2,1.5,1.7,2];function Ks(t,o){if(t&1){let i=Z();m(0),v(1,"li",4),H("click",function(n){return O(i),w(n.stopPropagation())}),v(2,"input",5,0),H("click",function(n){O(i);let r=re(3);return n.stopPropagation(),w(r.focus())})("focus",function(n){return O(i),w(n.stopPropagation())})("input",function(n){return O(i),w(n.stopPropagation())})("keydown",function(n){return O(i),w(n.stopPropagation())})("keypress",function(n){return O(i),w(n.stopPropagation())})("keyup",function(n){return O(i),w(n.stopPropagation())})("keyup.enter",function(n){O(i);let r=a(2).ngIf,g=a();return w(r.setCustomZoomFactor(n,g.index))})("blur",function(n){O(i);let r=a(2).ngIf,g=a();return w(r.setCustomZoomFactor(n,g.index))}),u()(),p()}if(t&2){let i=a(2).ngIf,e=a();c(2),l("max",i.maxZoomFactor)("value",i.isZoomCustomValue||!Ve(2,Js).includes(i.timelineData.scale.sections[e.index].zoomFactor||1.5)?i.timelineData.scale.sections[e.index].zoomFactor:"")}}function ed(t,o){if(t&1&&(m(0),s(1,Ks,4,3,"ng-container",3),p()),t&2){let i=a().ngIf,e=a();c(),l("veltDynamicTemplate",L(3,qs,e.template,C(1,Ka,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function td(t,o){if(t&1&&(m(0),s(1,ed,2,9,"ng-container",2),p()),t&2){let i=a();c(),l("veltIf",D(3,Qs,i.conditionSignal(),C(1,Ka,i.componentConfigSignal)))}}var Cn=(()=>{let o=class o extends N{constructor(e,n,r){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.componentId="velt-video-editor-player-zoom-button-options-input",this.index=0,super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsInputComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsInputComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsInputComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-zoom-button-options-input-internal"]],inputs:{index:"index"},standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[["customZoomInput",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player-custom-zoom-option",3,"click"],["placeholder","Custom Value...","value","","type","number","autocomplete","off","min","0.1","step","0.1",3,"click","focus","input","keydown","keypress","keyup","keyup.enter","blur","max","value"]],template:function(n,r){n&1&&s(0,td,2,6,"ng-container",1),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R],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%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-video-editor-player-custom-zoom-option[_ngcontent-%COMP%]{padding:var(--velt-spacing-xs) 0;pointer-events:auto;list-style:none}.velt-video-editor-player-custom-zoom-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;outline:none;box-sizing:border-box;cursor:text;pointer-events:auto;user-select:text;-webkit-user-select:text;display:flex;height:28px;padding:0px var(--velt-spacing-sm);justify-content:space-between;align-items:center;align-self:stretch;border-radius:var(--velt-border-radius-sm);border:1px solid var(--velt-border-4);background:var(--velt-background-0);color:var(--velt-text-8);font-size:13px;font-style:normal;font-weight:400;line-height:16px}.velt-video-editor-player-custom-zoom-option[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, .velt-video-editor-player-custom-zoom-option[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.velt-video-editor-player-custom-zoom-option[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield}"],changeDetection:0});let t=o;return t})();var el=t=>({componentConfigSignal:t}),id=(t,o)=>({condition:t,data:o}),od=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-zoom-button-options-list-item-wireframe",variant:i,setIfCondition:e,componentElementRef:n});function rd(t,o){if(t&1&&(m(0),v(1,"span",4),K(),v(2,"svg",5)(3,"g"),S(4,"path",6),u()(),ie(5),u(),p()),t&2){let i=a(3);c(5),ge(" ",i.option.label," ")}}function ad(t,o){if(t&1){let i=Z();m(0),v(1,"li",2),H("click",function(n){O(i);let r=a().ngIf,g=a();return w(r.selectZoomOption(n,g.option.value,g.index))}),s(2,rd,6,1,"ng-container",3),u(),p()}if(t&2){let i=a().ngIf,e=a();c(),te("velt-video-editor-player-zoom-button-options-list-item--selected",e.option.value===i.timelineData.scale.sections[e.index].zoomFactor),c(),l("veltDynamicTemplate",L(5,od,e.template,C(3,el,e.componentConfigSignal),i==null?null:i.variant,e.setIfCondition.bind(e),e.elementRef))}}function ld(t,o){if(t&1&&(m(0),s(1,ad,3,11,"ng-container",1),p()),t&2){let i=a();c(),l("veltIf",D(3,id,i.conditionSignal(),C(1,el,i.componentConfigSignal)))}}var _n=(()=>{let o=class o extends N{get itemTemplate(){return this._itemTemplate}set itemTemplate(e){this._itemTemplate=e,this.itemTemplate?this.template=this.domService.deepCloneElement(this.itemTemplate):this.template=null}constructor(e,n,r,g){super(e,n,r),this.elementRef=e,this.dynamicDataService=n,this.loggingService=r,this.domService=g,this.componentId="velt-video-editor-player-zoom-button-options-list-item",this.index=0,super.initializeComponentConfigSignal(new me)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsListItemComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsListItemComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorPlayerZoomButtonOptionsListItemComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(d(T),d(f),d(y),d(Ne))},o.\u0275cmp=x({type:o,selectors:[["velt-video-editor-player-zoom-button-options-list-item-internal"]],inputs:{option:"option",index:"index",itemTemplate:"itemTemplate"},standalone:!1,features:[F([f]),k],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-video-editor-player-zoom-button-options-list-item",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-video-editor-player-zoom-button-options-list-item-text"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.3333 4L6.33333 11.6667L3 8","stroke","#212121","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"]],template:function(n,r){n&1&&s(0,ld,2,6,"ng-container",0),n&2&&l("ngIf",r.componentConfigSignal())},dependencies:[b,P,R],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%]:empty{display:none}.velt-video-editor-player-zoom-button-options-list-item[_ngcontent-%COMP%]{display:flex}.velt-video-editor-player-zoom-button-options-list-item-text[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .2s;display:flex;height:28px;min-width:104px;width:100%;align-items:center;padding:0px var(--velt-spacing-sm);gap:var(--velt-spacing-sm);align-self:stretch;border-radius:var(--velt-border-radius-sm);background:var(--velt-background-0);color:var(--velt-text-0);font-size:13px;font-style:normal;font-weight:400;line-height:16px}.velt-video-editor-player-zoom-button-options-list-item-text[_ngcontent-%COMP%]:hover{background-color:var(--velt-background-4)}.velt-video-editor-player-zoom-button-options-list-item-text[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{opacity:0}.velt-video-editor-player-zoom-button-options-list-item--selected[_ngcontent-%COMP%] .velt-video-editor-player-zoom-button-options-list-item-text[_ngcontent-%COMP%]{background-color:var(--velt-background-5)}.velt-video-editor-player-zoom-button-options-list-item--selected[_ngcontent-%COMP%] .velt-video-editor-player-zoom-button-options-list-item-text[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0});let t=o;return t})();var tl=t=>({componentConfigSignal:t}),sd=(t,o)=>({condition:t,data:o}),dd=(t,o,i,e,n)=>({template:t,context:o,componentName:"velt-video-editor-player-zoom-button-options-list-wireframe",variant:i,setIfCondition:e,componentElementRef:n,replaceTemplate:!1});function md(t,o){if(t&1&&(v(0,"div"),S(1,"velt-video-editor-player-zoom-button-options-list-item-internal",4),u()),t&2){let i=o.$implicit,e=a(4);c(),l("index",e.index)("componentConfigSignal",e.componentConfigSignal)("option",i)("itemTemplate",e.itemTemplate)}}function pd(t,o){if(t&1&&(m(0),s(1,md,2,4,"div",3),p()),t&2){l