PageSourceSearch

https://desk.bigvu.tv/chunk-HHCEPDGF.js

js bigvu.tv collected 2026-10-01 10:26:12 UTC 33,525 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c33f1517-221a-5fb4-a8ac-fda23d66efb4")}catch(e){}}();
3import{na as et,oa as tt,pa as it,qa as nt}from"./chunk-FZQKIFV4.js";import"./chunk-TXDY4RPP.js";import{a as V,b as Ze}from"./chunk-QIJBDBXA.js";import{a as Qe}from"./chunk-TI22TATI.js";import"./chunk-NK35ORBW.js";import{a as Z}from"./chunk-2N6NZDPD.js";import{a as Je}from"./chunk-6Q54STSQ.js";import{a as le}from"./chunk-KATJSNDL.js";import"./chunk-RYPSEP4C.js";import{g as We,h as Xe,k as de}from"./chunk-JARC4VEB.js";import"./chunk-HXMI2QMR.js";import"./chunk-C6EGUEMF.js";import{b as qe}from"./chunk-I7CHTL7G.js";import"./chunk-CZ6C6B4U.js";import"./chunk-G6V4EC3J.js";import"./chunk-LYWBHDNF.js";import"./chunk-D2NYEW4J.js";import"./chunk-ILB5B4RS.js";import{a as H}from"./chunk-G7QIRMNQ.js";import{b as ae}from"./chunk-H3D2HL7Q.js";import{a as ce}from"./chunk-IP7HYHUR.js";import"./chunk-W7VYE7BD.js";import"./chunk-RVGQBOW4.js";import"./chunk-35O4R4YN.js";import"./chunk-I4M76G4S.js";import"./chunk-WCSLZPNH.js";import"./chunk-LVL7DOC5.js";import"./chunk-R2JMUQ77.js";import"./chunk-ITQWMIEL.js";import"./chunk-5YM3O5I6.js";import"./chunk-ZZG5IPKY.js";import"./chunk-2SRUAFBD.js";import{P as J,d as X,ea as $e,fa as Q}from"./chunk-KRNZR6YH.js";import"./chunk-VKKAQZP5.js";import"./chunk-26TGM6QC.js";import"./chunk-PWTDXLFQ.js";import"./chunk-NU27DJEQ.js";import"./chunk-6MIUUXBY.js";import"./chunk-IDEEGTYH.js";import"./chunk-JU73QFWT.js";import"./chunk-N3LX3THL.js";import"./chunk-FEYFR4YX.js";import"./chunk-E6YGJNAQ.js";import"./chunk-VZCLJPEW.js";import"./chunk-P4U5MZI6.js";import{a as Ye}from"./chunk-6FL5NH35.js";import"./chunk-KYKGDHNG.js";import"./chunk-CGOHAIKO.js";import"./chunk-J6TAHOQ5.js";import{a as m}from"./chunk-ZNBR7H42.js";import"./chunk-2B2LYKQP.js";import"./chunk-LG75LMIH.js";import"./chunk-XLFNES36.js";import"./chunk-MTX4XYDT.js";import{C as Ct,Fd as Le,Gd as Pt,Hd as je,Id as wt,Md as Ve,Nd as Nt,Yb as He,Zb as Bt,Zd as Ke,_d as Mt,aa as Te,be as ze,ce as Ut,db as Ge,ea as xt,eb as Ot,fa as se,ia as Et,l as Pe,m as we,n as Ne,vd as Fe,wd as At,z as oe}from"./chunk-EHJF6UKK.js";import{U as De,V as yt,ba as Re,ca as It,d as Ae,e as _t}from"./chunk-7XEC5R2G.js";import{k as xe,n as Ee,q as Oe,r as Be}from"./chunk-OV4F6N7I.js";import"./chunk-J5NV6OCA.js";import"./chunk-PF63PJ47.js";import{Eb as Me,_b as Ue,vc as kt}from"./chunk-4MUTHA5V.js";import{D as j,i as R,k as T,l as G,r as ye,u as Ie,y as W}from"./chunk-W7MJW6UT.js";import{$c as q,Bb as B,Ca as fe,Ib as o,Ja as N,Jb as l,Ka as ve,Lc as I,Nc as h,Va as S,Wa as _,Zb as $,Zc as x,Zd as D,_c as Y,ec as k,fb as Se,fd as Ce,gd as M,hc as c,id as U,lc as _e,od as L,pd as re,qd as ke,tc as d,uc as p,vc as g,xa as me,ya as be,zc as A}from"./chunk-7RQO36LL.js";import"./chunk-IGDKMAHN.js";import"./chunk-2EFPAZRG.js";import"./chunk-XHJ7RZ2T.js";import"./chunk-DMQT3QOG.js";import"./chunk-43G5BLPL.js";import"./chunk-GCEDPD4V.js";import"./chunk-YUF7ANVY.js";import{a as ne,m as C}from"./chunk-7Q6MBNO6.js";Be();var ii=new V(J.Pixabay,m.PIXABAY,Qe),rt=new V("assets",m.ASSETS,de,[{key:"assetSidebarType",value:J.Library},{key:"sidebarHeader",value:"Content Bank"}]),ot=new V("assets-uploads",m.MY_UPLOADS,de,[{key:"assetSidebarType",value:J.Uploads},{key:"sidebarHeader",value:"Media Library"}]),st=new V("ai-generate-image",m.AI_GENERATE_IMAGE,nt,[{key:"title",value:et.Background},{key:"generatingTitle",value:tt.Background}]);var at=[rt.clone().addInput("itemsAddable",!0).addInput("addButtonBackground","#00d096").addInput("closeable",!1).addInput("subTypes","background").addInput("useMediaTypeService",!0),ot.clone().addInput("showGenerateAISection",!0).addInput("itemsAddable",!0).addInput("addButtonBackground","#00d096").addInput("closeable",!1).addInput("subTypes","background").addInput("useMediaTypeService",!0).changeOpenOnComponentMount(!0),st.clone().addInput("featureSource",We.bgChange).addInput("subTypes",["background"])];var E=function(t){return t.NO_BACKGROUND_SELECTED="No background was selected",t.PLAN_DETAILS_LOAD_FAILED="Failed to load your plan details",t.MISSING_STORY_DETAILS="Story details are missing",t.STORY_LOAD_FAILED="Failed to load your story",t.BACKGROUND_CHANGE_FAILED="Failed to change the background",t.CHANGE_APPLY_FAILED="Failed to apply your changes. Please refresh the page and try again",t.MISSING_TAKE="Missing take data",t}(E||{}),pe=function(t){return t.PROCESSING="Processing take for background change",t}(pe||{}),ue="script-story",b=function(t){return t.BACKGROUND_URL="backgroundUrl",t.USE_BLUR="useBlur",t.USE_GREEN_SCREEN="greenScreen",t}(b||{}),P=function(t){return t.STORY_ID="storyId",t.TAKE_ID="takeId",t}(P||{});_t();Ne();D();j();D();var Dt=t=>({"sidebar-option-title":!0,"active-sidebar-option-title":t});function Rt(t,f){t&1&&g(0,"div",7)}function Tt(t,f){if(t&1){let n=A();d(0,"div",2)(1,"div",3),I("click",function(){let r=S(n).index,a=h();return _(a.onOptionSelected(r))}),k(2,Rt,1,0,"div",4),g(3,"img",5),d(4,"div",6),x(5),p()()()}if(t&2){let n=f.$implicit,e=h();o(),_e("sidebar-option "+(n==null?null:n.style)),o(),c("ngIf",!e.isMenuClosed&&n.id===e.selectedOptionIndex),o(),c("src",!e.isMenuClosed&&n.id===e.selectedOptionIndex?n.activeIconUrl:n.iconUrl,B),o(),c("ngClass",U(6,Dt,!e.isMenuClosed&&n.id===e.selectedOptionIndex)),o(),q(" ",n.title," ")}}var dt=(()=>{class t{constructor(n){this.navigationHelperService=n,this.keepOpened=!1,this.setShownBarChangeListener=()=>{this.shownBarSubscription=this.navigationHelperService.shownBar.subscribe(e=>{if(e===""&&!this.optionClicked)this.isMenuClosed=!0,this.selectedOptionIndex=-1;else if(e!==""&&!this.isInitialized){let r=this.findSelectedOptionIndex(e);r>-1&&(this.setIsMenuClosed(r),this.setSelectedOptionIndex(r))}this.isInitialized=!0})},this.findSelectedOptionIndex=e=>(this.sideBarOptions||[]).findIndex(r=>r.action===e),this.toggleBar=e=>{this.navigationHelperService.toggleMediaSidebar(e,!0)},this.onOptionSelected=e=>{if(e===this.selectedOptionIndex&&this.keepOpened)return;this.optionClicked=!0;let r=this.sideBarOptions[e];this.toggleBar(r.action),this.setIsMenuClosed(e),this.setSelectedOptionIndex(e),this.optionClicked=!1},this.setSelectedOptionIndex=e=>{this.selectedOptionIndex=e===this.selectedOptionIndex&&!this.keepOpened?-1:e},this.setIsMenuClosed=e=>{this.isMenuClosed=!this.keepOpened&&e===this.selectedOptionIndex},this.isMenuClosed=!0,this.selectedOptionIndex=-1,this.isInitialized=!1}ngOnInit(){this.setShownBarChangeListener()}ngOnDestroy(){this.shownBarSubscription.unsubscribe()}static{this.\u0275fac=function(e){return new(e||t)(l(H))}}static{this.\u0275cmp=N({type:t,selectors:[["library-sidebar-menu"]],inputs:{sideBarOptions:"sideBarOptions",keepOpened:"keepOpened"},standalone:!0,features:[M],decls:2,vars:1,consts:[[1,"library-sidebar-component"],["class","library-sidebar-option-container",4,"ngFor","ngForOf"],[1,"library-sidebar-option-container"],[3,"click"],["class","selected-option-background",4,"ngIf"],["alt","image",3,"src"],[3,"ngClass"],[1,"selected-option-background"]],template:function(e,r){e&1&&(d(0,"div",0),k(1,Tt,6,8,"div",1),p()),e&2&&(o(),c("ngForOf",r.sideBarOptions))}
3,dependencies:[T,G,R],styles:['.library-sidebar-component[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.library-sidebar-option-container[_ngcontent-%COMP%]{position:relative}.sidebar-option[_ngcontent-%COMP%]{margin:22px 12px;cursor:pointer;z-index:2;position:relative;display:flex;justify-content:center;flex-direction:column;align-items:center;width:24px;height:24px}.sidebar-option[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;object-position:center}.sidebar-option-title[_ngcontent-%COMP%]{font-size:9px;font-weight:700;text-align:center;color:#253658}.active-sidebar-option-title[_ngcontent-%COMP%]{color:#4481fd;font-weight:400}.selected-option-background[_ngcontent-%COMP%]{position:absolute;width:51px;height:34px;z-index:0;opacity:.1;top:calc(50% - 26px);border-radius:22px;padding:28px;transform:rotate(-75deg);left:calc(50% - 28px);background-color:#7b8db1}.selected-option-shadow[_ngcontent-%COMP%]{content:"";width:16px;height:5px;border-radius:1px;-webkit-filter:blur(6px);filter:blur(6px);background-color:#4481fd;position:absolute;inset:0;margin:auto}']})}}return t})();Bt();j();D();var Gt=t=>({"active-sidebar-option-title":t});function Ht(t,f){t&1&&g(0,"div",13)}function Ft(t,f){t&1&&g(0,"div",14)}function Lt(t,f){if(t&1){let n=A();d(0,"div",7)(1,"div",8),I("click",function(){let r=S(n).index,a=h().$implicit,v=h();return _(v.selectOption(a.key,r))}),k(2,Ht,1,0,"div",9)(3,Ft,1,0,"div",10),g(4,"img",11),d(5,"div",12),x(6),p()()()}if(t&2){let n=f.$implicit,e=h(2);o(2),c("ngIf",!e.isMenuClosed&&n.action===e.selectedOption.action),o(),c("ngIf",!e.isMenuClosed&&n.action===e.selectedOption.action),o(),c("src",!e.isMenuClosed&&n.action===e.selectedOption.action?n.activeIconUrl:n.iconUrl,B),o(),c("ngClass",U(5,Gt,!e.isMenuClosed&&n.action===e.selectedOption.action)),o(),q(" ",n.title," ")}}function jt(t,f){if(t&1&&(d(0,"div",3)(1,"div",4),x(2),p(),d(3,"div",5),k(4,Lt,7,7,"div",6),p()()),t&2){let n=f.$implicit;o(2),Y(n.key),o(2),c("ngForOf",n.value)}}var lt=(()=>{class t extends dt{get keepOriginalOrder(){return He}constructor(n){super(n),this.navigationHelperService=n,this.ignoreInitialized=!1,this.sidebarOpened=new Se,this.setShownBarChangeListener=()=>{this.shownBarSubscription=this.navigationHelperService.shownBar.subscribe(e=>{this.ignoreInitialized?this.withoutInitialized(e):this.withInitialized(e)})},this.withInitialized=e=>{if(e===""&&!this.optionClicked)this.isMenuClosed=!0,this.selectedOptionIndex=-1;else if(e!==""&&!this.isInitialized){let r=this.findSelectedOption(e);r&&(this.selectedOption=r,this.isMenuClosed=!1)}this.isInitialized=!0},this.withoutInitialized=e=>{if(e!==""&&!this.optionClicked){let r=this.getSelectedOptionKeyAndIndex(e);if(r){let a=this.sidebarSections[r.key][r.index];this.isMenuClosed=!1,this.selectedOption=a}}},this.findSelectedOption=e=>{let r,a=Object.keys(this.sidebarSections);for(let v=0;v<a.length;v++){let u=a[v];r=this.sidebarSections[u].find(w=>w.action===e)}return r},this.getSelectedOptionKeyAndIndex=e=>{let r,a,v,u=Object.keys(this.sidebarSections);for(let O=0;O<u.length;O++){let w=u[O],z=this.sidebarSections[w];r=z.find(ie=>ie.action===e),r&&(a=w,v=z.indexOf(r))}return{key:a,index:v}},this.selectOption=(e,r)=>{let a=this.sidebarSections[e][r];a===this.selectedOption&&this.keepOpened||(this.optionClicked=!0,this.toggleBar(a.action),this.isMenuClosed=this.selectedOption&&a.action===this.selectedOption.action,this.selectedOption=this.selectedOption===a?void 0:a,this.optionClicked=!1,(a.action===m.AI_REWRITE||a.action===m.WHITEBOARD||a.action===m.AI_CHECKER_V2||a.action===m.MY_VIDEO_UPLOADS)&&this.sidebarOpened.emit({sidebar:a.action,opened:!0}))}}ngOnInit(){this.setShownBarChangeListener()}ngOnDestroy(){this.shownBarSubscription.unsubscribe()}static{this.\u0275fac=function(e){return new(e||t)(l(H))}}static{this.\u0275cmp=N({type:t,selectors:[["sectionable-sidebar"]],inputs:{sidebarSections:"sidebarSections",ignoreInitialized:"ignoreInitialized"},outputs:{sidebarOpened:"sidebarOpened"},standalone:!0,features:[$,M],decls:4,vars:4,consts:[[1,"sectionable-sidebar-component"],[1,"sidebar-sections-container"],["class","section-container",4,"ngFor","ngForOf"],[1,"section-container"],[1,"section-header"],[1,"options-container"],["class","sidebar-option-container",4,"ngFor","ngForOf"],[1,"sidebar-option-container"],[1,"section-sidebar-option",3,"click"],["class","selected-option-background",4,"ngIf"],["class","selected-option-shadow",4,"ngIf"],["alt","image",3,"src"],[1,"sidebar-option-title",3,"ngClass"],[1,"selected-option-background"],[1,"selected-option-shadow"]],template:function(e,r){e&1&&(d(0,"div",0)(1,"div",1),k(2,jt,5,2,"div",2),L(3,"keyvalue"),p()()),e&2&&(o(2),c("ngForOf",ke(3,1,r.sidebarSections,r.keepOriginalOrder)))},dependencies:[T,G,R,Ie],styles:[".section-container[_ngcontent-%COMP%]{padding:10px;border-radius:10px;background-color:#fff;margin-bottom:25px}.section-header[_ngcontent-%COMP%]{color:#4481fd;font-size:11px;width:100%;text-align:center}.options-container[_ngcontent-%COMP%]{margin-top:15px;
3display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.section-sidebar-option[_ngcontent-%COMP%]{cursor:pointer;z-index:2;position:relative;display:flex;justify-content:center;flex-direction:column;align-items:center;width:48px;height:48px;margin:0 6px 8px}.section-sidebar-option[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:40%;height:40%;object-fit:contain;object-position:center}.sidebar-option-title[_ngcontent-%COMP%]{color:#7b8db1!important;margin-top:5px!important}",'.library-sidebar-component[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.library-sidebar-option-container[_ngcontent-%COMP%]{position:relative}.sidebar-option[_ngcontent-%COMP%]{margin:22px 12px;cursor:pointer;z-index:2;position:relative;display:flex;justify-content:center;flex-direction:column;align-items:center;width:24px;height:24px}.sidebar-option[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;object-position:center}.sidebar-option-title[_ngcontent-%COMP%]{font-size:9px;font-weight:700;text-align:center;color:#253658}.active-sidebar-option-title[_ngcontent-%COMP%]{color:#4481fd;font-weight:400}.selected-option-background[_ngcontent-%COMP%]{position:absolute;width:51px;height:34px;z-index:0;opacity:.1;top:calc(50% - 26px);border-radius:22px;padding:28px;transform:rotate(-75deg);left:calc(50% - 28px);background-color:#7b8db1}.selected-option-shadow[_ngcontent-%COMP%]{content:"";width:16px;height:5px;border-radius:1px;-webkit-filter:blur(6px);filter:blur(6px);background-color:#4481fd;position:absolute;inset:0;margin:auto}']})}}return t})();kt();j();Ct();var K=function(t){return t[t.none=0]="none",t[t.blur=1]="blur",t}(K||{});function pt(){return[new oe(K.none,"None","","/img/background-change/none.svg"),new oe(K.blur,"Blur","","/img/background-change/blur.svg")]}xt();Et();D();It();Mt();Be();Ot();Ut();D();var te=(()=>{class t{constructor(n){this.serverlessApiService=n,this._SET_BACKGROUND_URL="image/chromakey",this._BASE64_IMAGE_URL_PREFIX="data:image/png;base64,",this.setBackground=(e,r,a,v)=>C(this,null,function*(){try{let u={type:"url",img:e};v?(u.blur=!0,u.greenScreen=!1):a?(u.blur=!1,u.bgUrl=r,u.greenScreen=!0):(u.bgUrl=r,u.blur=!1,u.greenScreen=!1);let O=yield this.serverlessApiService.post(this._SET_BACKGROUND_URL,u);return this._formatImageUrl(O.content)}catch(u){throw u}}),this._formatImageUrl=e=>this._BASE64_IMAGE_URL_PREFIX+e}static{this.\u0275fac=function(e){return new(e||t)(fe(Ye))}}static{this.\u0275prov=me({token:t,factory:t.\u0275fac})}}return t})();Pt();Nt();yt();At();wt();j();Ne();var Kt=t=>({"selected-btn":t});function zt(t,f){if(t&1&&(d(0,"div",22),g(1,"img",9),p()),t&2){let n=h(2);o(),c("src",n.selectedAssetUrl,B)}}function $t(t,f){if(t&1){let n=A();d(0,"div",23)(1,"button",24),I("click",function(){let r=S(n).$implicit,a=h(2);return _(a.onActionBtnClick(r))}),g(2,"img",25),p(),d(3,"div",26),x(4),p()()}if(t&2){let n=f.$implicit,e=h(2);o(),c("ngClass",U(3,Kt,(e.selectedActionButton==null?null:e.selectedActionButton.value)===n.value)),o(),c("src",n.sideIconClass,B),o(2),Y(n.name)}}function Yt(t,f){if(t&1){let n=A();d(0,"div",1)(1,"lib-header-workspace",2),L(2,"async"),L(3,"async"),I("backClick",function(){S(n);let r=h();return _(r.onBackClick())})("undoClick",function(){S(n);let r=h();return _(r.undo())})("redoClick",function(){S(n);let r=h();return _(r.redo())})("saveClick",function(){S(n);let r=h();return _(r.onHeaderButtonClick())}),d(4,"div",3)(5,"lib-button-icon",4),I("clicked",function(){S(n);let r=h();return _(r.toggleFullscreen())}),p()()(),d(6,"div",5)(7,"div",6),g(8,"sectionable-sidebar",7),p(),d(9,"main")(10,"div",8),g(11,"img",9),k(12,zt,2,1,"div",10),d(13,"ngx-spinner",11),g(14,"lottie-loader"),p()(),d(15,"div",12)(16,"div",13),I("click",function(){S(n);let r=h();return _(r.setUseGreenScreen(!r.useGreenScreen))}),d(17,"div",14),g(18,"div",15),p(),d(19,"div",16),x(20," I have a green screen"),p()(),d(21,"div",17),k(22,$t,5,5,"div",18),p()(),d(23,"div",19),x(24," This is only a preliminary view, the final product will be more accurate "),p(),d(25,"ngx-spinner",11),g(26,"lottie-loader"),p()()(),d(27,"div",20),g(28,"sidebar-menu",21),p()()}if(t&2){let n=h();o(),c("showBackButton",!0)("projectTitle","Change Green Screen")("editableTitle",!1)("showUndoButton",!0)("undoDisabled",!re(2,21,n.undoable$))("showRedoButton",!0)("redoDisabled",!re(3,23,n.redoable$))("showAIButton",!1)("showSaveButton",!0),o(4),c("iconContent",n.isFullscreen?n.exitFullscreenIconUrl:n.fullScreenIconUrl),o(3),c("sidebarSections",n.librarySidebarSections)("keepOpened",!0)("ignoreInitialized",!0),o(3),c("src",n.backgroundPreviewUrl,B),o(),c("ngIf",n.selectedAssetUrl),o(),c("name",n.BACKGROUND_CHANGE_SPINNER_ID),o(5),c("hidden",!n.useGreenScreen),o(4),c("ngForOf",n.actionButtons),o(3),c("name",n.SPINNER_ID),o(3),c("sidebars",n.sidebars)("openingSide","from-left-sections")}}var ut=function(t){return t.IMAGES="Images",t}(ut||{}),he=(()=>{class t extends Je{get undoable$(){return this.historyService.undoable$}get redoable$(){return this.historyService.redoable$}constructor(n,e,r,a,v,u,O,w,z,ie,ht,gt,mt,ge,bt,ft,vt,St){super(ge),this.adminRequestsService=n,this.planHelperService=e,this.route=r,this.spinnerService=a,this.storyHelperService=v,this.eventsService=u,this.assetEventNotificationService=O,this.assetsHelperService=w,this.backgroundChangeService=z,this.navigationHelperService=ie,this.router=ht,this.historyService=gt,this.premiumPlanService=mt,this.dialogHelperService=ge,this.notifier=bt,this.paymentService=ft,this.mediaSidebarComunicationService=vt,this.creditsService=St,this._BACKGROUND_CHANGE_EVENT_NAME=this.eventsService.events.background,this.SPINNER_ID="background-editor-spinner",this.BACKGROUND_CHANGE_SPINNER_ID="background-change-spinner",this.fullScreenIconUrl="/img/icons/icons-full-screen-enter-black.svg",this.exitFullscreenIconUrl="/img/icons/icons-full-screen-exit-black.svg",this.isFullscreen=!1,this.useBlur=!1,this.useGreenScreen=!1,this.checkBackgroun
3dChangePermission=()=>C(this,null,function*(){try{let i=yield this.planHelperService.getOrganizationPlansDetails(),s=this.planHelperService.isStarterPlan(i.display?.name),y=this.planHelperService.isProPlan(i.display?.name)||this.planHelperService.isTeamPlan(i.display?.name)||this.planHelperService.isAIMaxPlan(i.display?.name);if(this.take.duration/60<=59&&y||this.take.duration/60<=9&&s||this.planHelperService.isFreePlan(i.genericName))return!0;if(this.take.duration/60>9&&s)return this.openPremDialog(se.backgroundChangePro),!1;this.notifier.error("At this stage, videos longer than 59 minutes can not be processed for background change")}catch{this.notifier.error("An error occurred, please try again")}}),this.setEventListeners=()=>{this.eventListeners=[this.assetEventNotificationService.assetAdded$.subscribe(this.onBackgroundAssetSelection),this.mediaSidebarComunicationService.observeButtonEventClicked().subscribe(i=>{i&&this.sendButtonAssetBarEvent(i)})]},this.setRouteParams=()=>{let i=this.route.snapshot.paramMap;this.storyId=i.get(P.STORY_ID)||"",this.takeId=i.get(P.TAKE_ID)||""},this.setInitialHistoryState=()=>{this.historyService.setInitialState({[b.BACKGROUND_URL]:null,[b.USE_BLUR]:this.useBlur,[b.USE_GREEN_SCREEN]:this.useGreenScreen})},this.loadStoryDetails=()=>C(this,null,function*(){try{let i=this.storyHelperService.getStory();if(!i||i.storyId!=this.storyId)if(!this.storyId||!this.takeId)this.showMissingTakeDetailsNotification(),this.navigateBack();else{this.spinnerService.spin(this.SPINNER_ID,!0);let s=yield this.adminRequestsService.getStoryById(this.storyId);this.storyHelperService.setStory(s)}if(this.take=this.storyHelperService.getTakeByMediaId(this.takeId),!this.take)throw new Error(E.MISSING_TAKE);this.mediaSidebarComunicationService.setTake(this.take)}catch{this.notifier.error(E.STORY_LOAD_FAILED)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.setSidebarOptions=()=>{this.librarySidebarSections={[ut.IMAGES]:[{action:m.MY_UPLOADS,title:"Library",iconUrl:"/img/upload-sidebar-icon.svg",activeIconUrl:"/img/upload-sidebar-icon-blue.svg"},{action:m.ASSETS,title:"Content Bank",iconUrl:"/img/media-library-sidebar-icon.svg",activeIconUrl:"/img/media-library-sidebar-icon-blue.svg"},{action:m.AI_GENERATE_IMAGE,title:"AI Visuals",iconUrl:"/img/ai-rewrite-black.svg",activeIconUrl:"/img/ai-rewrite.svg"}]}},this.setSidebars=()=>{this.sidebars=at},this.updateSidebars=()=>{this.storyId&&this.takeId?this.sidebars.find(i=>i.id==="assets-uploads")?.addInput("upsellPath",`background/${this.storyId}/${this.takeId}`):this.sidebars.find(i=>i.id==="assets-uploads")?.addInput("upsellPath","background")},this.setUserPlanVideoFeatures=()=>C(this,null,function*(){try{this.spinnerService.spin(this.SPINNER_ID,!0),this.userPlan=yield this.planHelperService.getOrganizationPlansDetails()}catch{this.notifier.error(E.PLAN_DETAILS_LOAD_FAILED)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.onBackgroundAssetSelection=i=>C(this,null,function*(){if(i!==null){let s=this.assetsHelperService.getAssetUrl(i);this.selectedActionButton=null;try{yield this.setBackground(s,this.useGreenScreen,!1),this.selectedBackgroundAsset=i,this.useBlur=!1;let y={assetType:i.fileType};this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundAssetAdd,y),this.setHasChanges(!0),this.recordChange(b.BACKGROUND_URL,this.selectedAssetUrl),this.recordChange(b.USE_BLUR,this.useBlur)}finally{this.assetEventNotificationService.clearAssetAdded()}}}),this.setBackground=(i,s,y)=>C(this,null,function*(){try{this.spinnerService.spin(this.BACKGROUND_CHANGE_SPINNER_ID,!0);let F=yield this.backgroundChangeService.setBackground(this.greenBackgroundUrl,i,s,y);this.setBackgroundPreviewUrl(F),i&&this.setSelectedAssetUrl(i)}catch(F){console.error(F),this.notifier.error(E.BACKGROUND_CHANGE_FAILED)}finally{this.spinnerService.stop(this.BACKGROUND_CHANGE_SPINNER_ID)}}),this.setSelectedAssetUrl=i=>{this.selectedAssetUrl=i===this.greenBackgroundUrl?null:i},this.recordChange=(i,s)=>{this.historyService.recordAction(y=>{y[i]=s})},this.undo=()=>{let i=this.historyService.undo();this.updateStateOnHistoryAction(i)},this.redo=()=>{let i=this.historyService.redo();this.updateStateOnHistoryAction(i)},this.updateStateOnHistoryAction=i=>
3{let s=i[b.BACKGROUND_URL]||this.greenBackgroundUrl;this.useBlur=i[b.USE_BLUR],this.useGreenScreen=i[b.USE_GREEN_SCREEN],this.setBackground(s,this.useGreenScreen,this.useBlur),this.setHasChanges(!0)},this.setHasChanges=i=>{this.hasChanges=!!i},this.setBackgroundPreviewUrl=i=>{this.backgroundPreviewUrl=i||this.greenBackgroundUrl},this.setGreenBackgroundUrl=()=>{this.greenBackgroundUrl=this.take.thumbnails&&this.take.thumbnails.length>0?this.take.thumbnails[0].url:null},this.onHeaderButtonClick=()=>{if((!this.selectedBackgroundAsset||!this.selectedBackgroundAsset.assetId)&&!this.useBlur){this.showNoBackgroundSelectedNotification();return}if(this.useBlur&&!this.planHelperService.isProPlan(this.userPlan.genericName)&&!this.planHelperService.isTeamPlan(this.userPlan.genericName)&&!this.planHelperService.isAIMaxPlan(this.userPlan.genericName)){this.openPremDialog(se.backgroundChangePro);return}this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundScreenClick,{button:"apply"}),this.applySelectedBackground()},this.applySelectedBackground=()=>C(this,null,function*(){let s={storyId:this.storyHelperService.getStory().storyId,groupId:this.take.groupId,templateIds:[],sourceVideoId:this.take.mediaId};this.useBlur?(s.options={actions:[{type:"videoEffects",value:{blur:!0}}]},this.sendBackgroundChangeEvent("blur")):this.useGreenScreen?(s.options={actions:[{type:"chromaKey",value:{assetId:this.selectedBackgroundAsset.assetId}}]},this.sendBackgroundChangeEvent(this.selectedBackgroundAsset?.fileType)):(s.options={actions:[{type:"videoEffects",value:{assetId:this.selectedBackgroundAsset.assetId}}]},this.sendBackgroundChangeEvent(this.selectedBackgroundAsset?.fileType));try{this.spinnerService.spin(this.SPINNER_ID,!0),yield this.adminRequestsService.generateVideo(s),this.notifier.info(pe.PROCESSING),this.setHasChanges(!1),this.navigateBack()}catch(y){if(this.creditsService.handleCreditError(y))return;this.notifier.error(E.CHANGE_APPLY_FAILED)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.sendBackgroundChangeEvent=i=>{let s={backgroundType:i,isGreenScreen:this.useGreenScreen};this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundApply,s)},this.showNoBackgroundSelectedNotification=()=>{this.notifier.error(E.NO_BACKGROUND_SELECTED)},this.showMissingTakeDetailsNotification=()=>{this.notifier.error(E.MISSING_STORY_DETAILS)},this.navigateBack=()=>{let i=[ue];this.storyId&&i.push(this.storyId),this.router.navigate(i)},this.onConfirmation=()=>C(this,null,function*(){this.dialogHelperService.close();let i=!0;(!this.selectedBackgroundAsset||!this.selectedBackgroundAsset.assetId)&&!this.useBlur&&(i=!1),this.useBlur&&!this.planHelperService.isProPlan(this.userPlan.genericName)&&(i=!1);try{i&&(yield this.applySelectedBackground()),this.confirm()}catch(s){this.notifier.error(s.responseJSON.msg)}}),this.sendButtonAssetBarEvent=i=>{this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundScreenClick,{button:i})},this.sendEvent=(i,s)=>{let F={storyId:this.storyHelperService.getStory().storyId,takeId:this.take.mediaId};this.eventsService.log(i,ne(ne({},F),s))},this.setUseGreenScreen=i=>{this.useGreenScreen=i,this.selectedAssetUrl&&this.setBackground(this.selectedAssetUrl,this.useGreenScreen,this.useBlur),this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundScreenClick,{button:i?"green add":"green remove"}),this.setHasChanges(!0),this.recordChange(b.USE_GREEN_SCREEN,this.useGreenScreen)},this.onActionBtnClick=i=>{this.selectedActionButton=i;let s={};i.value===K.blur?(this.setUseBlur(),s.button="blur"):(this.setNone(),s.button="none"),this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundScreenClick,s),this.setBackground(this.greenBackgroundUrl,this.useGreenScreen,this.useBlur)},this.setUseBlur=()=>{this.useBlur=!0,this.setHasChanges(!0),this.selectedAssetUrl=null,this.recordChange(b.USE_BLUR,this.useBlur),this.recordChange(b.BACKGROUND_URL,null)},this.setNone=()=>{this.setHasChanges(!1),this.selectedAssetUrl=null,this.useBlur=!1,this.useGreenScreen=!1,this.setInitialHistoryState()},this.backEvent=()=>{this.sendEvent(this._BACKGROUND_CHANGE_EVENT_NAME.backgroundScreenClick,{button:"back"})},this.onBackClick=()=>{this.backEvent(),this.router.navigate([ue,this.storyId])},this.handleFullscreenChange=()=>{this.isFullscreen=!!document.fullscreenElement},this.toggleFullscreen=()=>{let i=document.documentElement;this.isFullscreen?document.exitFullscreen():(i.requestFullscreen||i.webkitRequestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen).call(i)},this.openPremDialog=i=>{let s=this.storyId&&this.takeId?`background/${this.storyId}/${this.takeId}`:"background";this.premiumPlanService.openPricingDialog(Te.PRO,s,s,i)},this.navigationHelperService.setShownBar(m.MY_UPLOADS),this.actionButtons=pt(),this.selectedActionButton=this.actionButtons[0]}ngOnInit(){return C(this,null,function*(){document.addEventListener("fullscreenchange",this.handleFullscreenChange),this.setRouteParam
3s(),yield this.paymentService.checkForSuccessPayment(this.route.snapshot.queryParams),yield this.loadStoryDetails(),this.hasBackgroundChangePermission=yield this.checkBackgroundChangePermission(),this.hasBackgroundChangePermission?(this.setGreenBackgroundUrl(),this.setBackgroundPreviewUrl(),this.mediaSidebarComunicationService.setAssetTypes([X.image,X.video,X.imageAndVideo]),this.setSidebarOptions(),this.setSidebars(),this.updateSidebars(),this.setUserPlanVideoFeatures(),this.setEventListeners(),this.setInitialHistoryState()):this.navigateBack()})}ngOnDestroy(){document.removeEventListener("fullscreenchange",this.handleFullscreenChange),this.eventListeners&&this.eventListeners.forEach(n=>n.unsubscribe()),this.mediaSidebarComunicationService.clear(),this.navigationHelperService.setShownBar(m.NONE)}static{this.\u0275fac=function(e){return new(e||t)(l(Re),l(Ke),l(xe),l(Ge),l(qe),l(ze),l($e),l(Q),l(te),l(H),l(Ee),l(Z),l(Le),l(Ve),l(De),l(Fe),l(Xe),l(je))}}static{this.\u0275cmp=N({type:t,selectors:[["background-editor"]],standalone:!0,features:[Ce([it]),$,M],decls:1,vars:1,consts:[["class","background-editor-component",4,"ngIf"],[1,"background-editor-component"],["undoButtonStyle","tertiary","redoButtonStyle","tertiary","saveButtonText","Apply","saveButtonStyle","secondary",1,"header-background",3,"backClick","undoClick","redoClick","saveClick","showBackButton","projectTitle","editableTitle","showUndoButton","undoDisabled","showRedoButton","redoDisabled","showAIButton","showSaveButton"],["slot","right",1,"header-right-actions"],["size","md","variant","secondary",3,"clicked","iconContent"],[1,"editor-screen-container"],[1,"library-sidebar-container"],[3,"sidebarSections","keepOpened","ignoreInitialized"],[1,"background-previewer-container"],["alt","image",3,"src"],["class","background-sample-container",4,"ngIf"],[3,"name"],[1,"controls"],[1,"blog-toogle-input",3,"click"],[1,"checkbox-container-big"],[1,"checkmark-blue",3,"hidden"],[1,"blog-check-txt"],[1,"buttons-control"],["class","button-contr",4,"ngFor","ngForOf"],[1,"info-box"],[1,"media-sidebar-container"],[3,"sidebars","openingSide"],[1,"background-sample-container"],[1,"button-contr"],[3,"click","ngClass"],["alt","btn-image",3,"src"],[1,"btn-text"]],template:function(e,r){e&1&&k(0,Yt,29,25,"div",0),e&2&&c("ngIf",r.hasBackgroundChangePermission)},dependencies:[W,R,T,G,ye,Ue,Me,lt,we,Pe,Ae,Ze],styles:[".header-background[_ngcontent-%COMP%]{display:block;border-bottom:1px solid #e1e7f0}.header-right-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.editor-screen-container[_ngcontent-%COMP%]{background-color:#7b8db12e;display:flex;justify-content:space-between;height:calc(100vh - 67px)}.library-sidebar-container[_ngcontent-%COMP%]{width:90px;z-index:30;position:relative}main[_ngcontent-%COMP%]{transform:translate(40%);position:relative;top:0;bottom:0;margin:auto;display:flex;align-items:center;flex-direction:column;gap:24px;width:759px}.background-previewer-container[_ngcontent-%COMP%]{background-color:#000;border-radius:10px;overflow:hidden;max-width:100%;width:min(46vw,100%);max-height:min(426px,100%);height:auto;aspect-ratio:16/9;object-fit:contain}.background-previewer-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain;object-position:center}.background-sample-container[_ngcontent-%COMP%]{position:absolute;width:142px;height:97px;left:20px;bottom:190px;border-radius:10px;border:2px solid #00abfe;overflow:hidden}.background-sample-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.controls[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:24px;justify-content:flex-start;align-items:center}.blog-toogle-input[_ngcontent-%COMP%]{width:200px;display:flex;align-items:center;gap:4px;cursor:pointer}.blog-toogle-input[_ngcontent-%COMP%]   .checkbox-container-big[_ngcontent-%COMP%]{width:24px;height:24px;margin:2px 8px 2px 0;border:1px solid #979797;position:relative;border-radius:50%}.blog-toogle-input[_ngcontent-%COMP%]   .checkbox-container-big[_ng
3content-%COMP%]   .checkmark-blue[_ngcontent-%COMP%]{border-radius:50%;background-color:#4481fd;width:80%;height:80%;position:absolute;left:0;right:0;margin:2px auto}.blog-check-txt[_ngcontent-%COMP%]{color:#253658;font-size:14px;font-weight:400;cursor:pointer}.selected-btn[_ngcontent-%COMP%]{border:2px solid #4481FD;pointer-events:none;cursor:none}.buttons-control[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px}.button-contr[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:4px}.button-contr[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:10px;padding:0}.button-contr[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-position:center;object-fit:cover}  sidebar-menu .sidebar-aside{height:calc(90vh - 150px)!important}  .options-container{flex-direction:column}  .library-sidebar-container .section-container{height:calc(100vh - 67px);border-radius:unset!important}  aside.sidebar-aside{top:100px!important;left:-570px!important;height:calc(90vh - 150px)!important;border-radius:20px}"]})}}return t})();j();D();var qt=[{path:"",component:he,canActivate:[ae,ce],canDeactivate:[le],data:{title:"Background Editor"}},{path:`:${P.STORY_ID}/:${P.TAKE_ID}`,component:he,canActivate:[ae,ce],canDeactivate:[le],data:{title:"Background Editor"}}],gn=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275mod=ve({type:t})}static{this.\u0275inj=be({providers:[Q,Z,te],imports:[W,Oe.forChild(qt)]})}}return t})();export{gn as BackgroundEditorModule,qt as routes};
4/**i18n:a22416d48d5d315853b2ff30dd429c3cf66bb88014970864ad6c2ff7ea890e29*/
5
6//# debugId=c33f1517-221a-5fb4-a8ac-fda23d66efb4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.