1import{R as Gt,d as gt,w as zt,x as Nt,af as Lt,a7 as Vt,h as mt,y as Y,a3 as Et,aH as jt,c as Me,r as i,aV as Bt,a8 as Fe,V as Ot,a9 as Rt,bL as Pt,L as Qt,aN as Yt,_ as ut,a as r,b as a,e as s,f as S,t as m,g as d,n as u,E as U,F as $,p as ee,s as M,q as De,o as n}from"./index-DKueJ56C.js";import{U as Ft}from"./UiPageLoader-BfEqk5AZ.js";import{c as Wt,A as Jt,e as qt,C as Zt,d as Ht,f as Xt,P as Kt,S as $t,b as ea}from"./SaveTemplate-DOVZvqwk.js";import{I as ta}from"./CaptionReplaceWord-FNd35bVg.js";import{D as aa}from"./DynamicText-3FWHxppz.js";import{U as la}from"./UiToggle-C2y38EVh.js";import{U as oa}from"./UiDropdown-BTMuH8wV.js";import{L as ia}from"./layers-DE3vFB_v.js";import{U as na}from"./user-x-DKmPe8hL.js";import{S as sa}from"./star-BvNtmnwX.js";import{C as ra}from"./chevron-down-Cv72UE4P.js";import{L as da}from"./loader-Cp4of_w2.js";import{C as ca}from"./video-off-yobXKW5b.js";import{I as ga}from"./image-wvLpwYnP.js";import{U as ma}from"./user-BQWLh0Ij.js";import{L as ua}from"./layout-template-DJl3lCYs.js";import"./pencil-BubuoIeh.js";import"./RecordVideo-BQXc9n_K.js";import"./wand-sparkles-DoRl9SLG.js";import"./rewind-CEadBpY6.js";import"./circle-dot-BjuNO7ns.js";import"./timer-Dh0rQH77.js";import"./headphones-BLOu_976.js";import"./camera-Cr2Nf9vy.js";import"./rotate-ccw-BsGAZL3l.js";import"./pause-BgAu-haJ.js";import"./film-ByocqT5L.js";import"./ellipsis-Cl43hUwk.js";import"./cloud-download-CkvfoL7v.js";import"./VideoCaptions-ZRzeBj-O.js";import"./circle-alert-k0D78Cqj.js";import"./heyreach-BfNjVk8u.js";import"./vuedraggable.umd-CgfCZ7UE.js";import"./_commonjsHelpers-BosuxZz1.js";import"./volume-x-_WwCRhTC.js";import"./arrow-left-B5JPKvKM.js";import"./CTA-D8Y1ff7Y.js";import"./UiTextField-ROeT5wsN.js";import"./SelectColor-CvSZbrIH.js";import"./DisplayVideo-Bf7i25kH.js";/** 2 * @license @lucide/vue v1.18.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const va=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_a=Gt("wrench",va),fa=gt({__name:"CampaignData",props:{pre_data:{type:Object,required:!1,default:()=>({})},is_clone_video:{type:Boolean,required:!1,default:!1},is_get_data:{type:Boolean,required:!1,default:!1},platform:{type:String,required:!1,default:""},is_block_lead_linkedin:{type:Boolean,required:!1,default:!1}},emits:["back","update"],setup(de,{expose:t,emit:g}){const e=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDkuMS1jMDAxIDc5LmE4ZDQ3NTM0OSwgMjAyMy8wMy8yMy0xMzowNTo0NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYW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lnrweMfZhwP9s/9/4GVQU1/u7L94taqnqqvYnHtHwlHrW/Ctqg8x1Ms/7wvxjwADAOPJPdGyC6g0AAAAAElFTkSuQmCC",import.meta.url).href,F=new URL("/assets/meta-int-Cf7SSpH1.png",import.meta.url).href,O=new URL("/assets/tagmgr-int-1m7iAQXt.png",import.meta.url).href,l=new URL("/assets/ga4-int-C83jwJnS.png",import.meta.url).href,z="https://irfaneasynote.s3-eu-west-1.amazonaws.com/callendo/clients/",ce=[{field:"firstName",text:"James"},{field:"email",text:"[email protected]"},{field:"company",text:"Weezly"},{field:"jobTitle",text:"Manager"},{field:"website",text:"weezly.com"}],b=de,te=g,ae=zt(),be=Nt(),D=Lt(),{upgradeWall:N}=jt(),le=Me(()=>be.me||{}),oe=i(null),L=i(null),v=i(null),p=i(null),T=i(null),V=i(null),E=i(null),xe=i(null),j=i(null),Se=i(null),We=i(null),Je=i(!1),W=i(!1),I=i(!1),vt=i(!1),P=i(0),J=i(""),we=i(!1),qe=i(!1),Ie=i(""),_t=i(""),Ze=i(!1),Ge=i(!1),ge=i(!1),q=i(!1),me=i([]),R=i([]),ie=i("single"),He=i(null),ue=i({size:20,padding:10,position:"bottom-left"}),he=i(!1),ft=i(!1),ke=i({name:"Check this out",link:"https://example.com",button_color:"#0090FF",text_color:"#FFF",corner_style:"rounded",position:"below-video"}),ze=i(!1),ve=i(!1),Z=i(!1),Ne=i([]),Le=i(!1),_e=i(!1),H=i(!1),Ve=i([]),Ee=i(!1),fe=i(!1),X=i(!1),je=i([]),ne=i(!1),Xe=i([]),se=i(!1),Be=i(null),pe=i(!1),Oe=i(!1),B=i(null),Re=i(!1),Ke=i(null),pt=Me(()=>{let o="";return B.value&&JSON.parse(B.value).forEach(x=>{let _=x.text;if(x.tag_field){const A=ce.find(k=>k.field==x.tag_field);A?_=A.text:_=x.tag_fallback||x.text}o+=_+" "}),o}),yt=Me(()=>R.value.find(o=>o.id==P.value&&o.type==J.value));Vt(()=>b.pre_data,()=>{var o;b.pre_data.mapping&&(b.pre_data.mapping.website?ie.value="single":b.pre_data.mapping.linkedin_profile&&(ie.value="linkedin"),(o=oe.value)==null||o.reset()),b.pre_data.overlay_id&&tt(b.pre_data.overlay_id)},{deep:!0,immediate:!0}),mt(async()=>{const o=await Y("GET","users/userSettings/get?name=enable_proxy");if(o&&o.data.value=="on"){const k=await Y("GET","users/proxy/get");if(k&&k.data.length){me.value=k.data,Ge.value=!0;const c=me.value.find(y=>y.is_default);c?(q.value=c,ge.value=!0):q.value=me.value[0]}}const h=await Y("GET","video/getEvents");h&&(R.value=h.data,R.value.length>0&&(P.value=R.value[0].id,J.value=R.value[0].type));let x=await Y("GET","integrations/getTrackingCodes");if(x){const A=x.data,k=A.filter(w=>w.platform=="fpixel"&&w.status);if(k.length){Ne.value=k,ze.value=!0;const w=k.find(Q=>Q.is_default);w?(ve.value=!0,Z.value=w):Z.value=k[0]}const c=A.filter(w=>w.platform=="gtag"&&w.status);if(c.length){Ve.value=c,Le.value=!0;const w=c.find(Q=>Q.is_default);w?(_e.value=!0,H.value=w):H.value=c[0]}const y=A.filter(w=>w.platform=="ga4"&&w.status);if(y.length){je.value=y,Ee.value=!0;const w=y.find(Q=>Q.is_default);w?(fe.value=!0,X.value=w):X.value=y[0]}}const _=await Y("GET","clients");_&&_.data&&_.data.length&&(Xe.value=_.data)});async function $e(o){if(o=="multi"&&!await N("multi-background"))return!1;ie.value=o}function et(o){I.value=!0,P.value=o.id,J.value=o.type}function bt(){I.value?I.value=!1:(I.value=!0,ne.value=!1,R.value.length>0&&P.value==0&&et(R.value[0]))}async function xt(){if(!await N("clients"))return!1;ne.value=!ne.value,I.value=!1,ne.value||(se.value=!1)}async function tt(o){if(o==Be.value)return!1;Be.value=o,B.value=null,Oe.value=!1,Re.value=!0;const h=await Y("GET","dynamic/getOverlays?id="+o);if(h){let x=h.data.captions||null;if(x){const _=JSON.parse(x);_.length>1&&["strawberry","watermelon"].includes(_[1].text.trim().toLowerCase())&&(_[1].tag_field="firstName",_[1].tag_fallback="there",x=JSON.stringify(_))}else pe.value=!1;B.value=x}Re.value=!1}function wt(o){B.value=o.captions,o.need_close&&(Oe.value=!1)}async function Pe(o="build"){var rt,dt;if(W.value)return!1;const h=qe.value?((rt=We.value)==null?void 0:rt.getText())??"":"",x=we.value?((dt=Se.value)==null?void 0:dt.getText())??"":"",_=q.value&&ge.value?q.value.id:null;let A=null,k=null,c=null;if(ie.value=="linkedin"&&(A=[{id:Bt(),second:0,type:"lead_linkedin",autoscroll:!1}]),ie.value=="multi"){const C=oe.value.getMultiData();if(!C)return D.alert("Let fix your multi motion builder first!","error"),!1;if(C&&C.error)return D.alert(C.error,"error"),!1;if(C&&(C.multi&&C.multi.length>0&&(A=C.multi),C.start&&C.start.length>0&&(k=C.start),C.end&&C.end.length>0&&(c=C.end)),!A)return D.alert("Let fix your multi motion builder first!","error"),!1}let y=null;b.is_clone_video||(y=L.value?L.value.getData():{...ue.value});const w=he.value?ke.value:null;let Q=null;Z.value&&ve.value&&(Q=Z.value.id);let it=null;H.value&&_e.value&&(it=H.value.id);let nt=null;X.value&&fe.value&&(nt=X.value.id);let Qe={};if(ne.value&&j.value&&(Qe=j.value.getData(),Qe===!1))return W.value=!1,!1;let st={};pe.value&&B.value&&(st={captions_enable:1,captions_transcript:B.value});const Ye={list:[],multi:A,start_part:k,end_part:c,campaign_name:b.pre_data.campaign_name,overlay:b.pre_data.overlay,show_booking:I.value,event_id:I.value?P.value:null,event_type:I.value?J.value:null,video_title:x,text_content:h,autoscroll:Je.value,proxy_id:_,custom_camera:y,cta:w,fpixel:Q,gtag:it,ga4:nt,...Qe,...st};if(o=="template")return Ye;o=="build"&&(W.value=!0);const Ut=b.pre_data.total||b.pre_data.list.length;if(le.value.plan_type&&le.value.plan_type.endsWith("trial")&&200-parseInt(le.value.used_videos_trial)<Ut)return D.alert("You plan has reached limit of videos!","error"),W.value=!1,!1;if(b.is_get_data)te("update",Ye);else{const Mt=b.pre_data.list.length,Dt=Math.ceil(Mt/5e3),St=Array.from({length:Dt},(Ae,f)=>
6f+1);let Ce="",ct=!1;for(const Ae of St){const f=(Ae-1)*5e3,Te=b.pre_data.list.slice(f,f+5e3),Ue=await Y("POST",`dynamic/prepareBuildCampaign?session_id=${Ce}`,{...Ye,list:Te});if(Ue)Ce=Ue.data.session_id;else{ct=!0;break}}if(!Ce||ct==!0)return D.alert("Got error on building campaign!","error"),W.value=!1,!1;const ye=new EventSource(`https://app.weezly.com/api/v1/dynamic/buildCampaignSync?session_id=${Ce}`);ye.onmessage=Ae=>{const f=JSON.parse(Ae.data);if(f.status=="running")He.value=Math.round(f.imported/f.total*100);else if(f.status=="success")D.alert("Your campaign is being processed!"),ae.push("/dynamic-videos/campaigns/"+f.data.id),ye.close();else if(f.status=="error"&&(D.alert(f.message,"error"),ye.close(),W.value=!1,f.message=="You have reached your video limit")){const Te=f.used/(f.used+f.using)*100,Ue=100-Te,It=f.total/(f.used+f.using)*100;Ze.value={total:f.total,used:f.used,using:f.using,total_percent:It,used_percent:Te,using_percent:Ue}}},ye.onerror=()=>{ye.close()}}}async function ht(o){var _;const h=await Pe("template");if(!h)return!1;await Y("POST","dynamic/templates/create",{...h,template_name:o})?(D.alert("Template saved successfully!"),(_=v.value)==null||_.close()):D.alert("Failed to save template!","error")}async function at(o){if(Ke.value=o,o.captions_enable?(pe.value=!0,B.value=o.captions_transcript):(pe.value=!1,B.value=null),o.cta?(he.value=!0,ke.value=typeof o.cta=="string"?JSON.parse(o.cta):o.cta):(he.value=!1,ke.value={name:"Check this out",link:"https://example.com",button_color:"#0090FF",text_color:"#FFF",corner_style:"rounded",position:"below-video"}),o.custom_camera){const c=typeof o.custom_camera=="string"?JSON.parse(o.custom_camera):o.custom_camera;ue.value={size:c.size??20,padding:c.padding??10,position:c.position??"bottom-left"},L.value&&L.value.setTemplateOptions(c)}else ue.value={size:20,padding:10,position:"bottom-left"},L.value&&L.value.setTemplateOptions(ue.value);let h=!1;if(o.event_id&&o.event_type){const c=R.value.find(y=>y.id==o.event_id&&y.type==o.event_type);c&&(I.value=!0,P.value=c.id,J.value=c.type,h=!0)}h||(I.value=!1,P.value=0,J.value="");let x=!1;if(o.fpixel&&ze.value){const c=Ne.value.find(y=>y.id==o.fpixel);c&&(ve.value=!0,Z.value=c,x=!0)}x||(ve.value=!1,Z.value=!1);let _=!1;if(o.gtag&&Le.value){const c=Ve.value.find(y=>y.id==o.gtag);c&&(_e.value=!0,H.value=c,_=!0)}_||(_e.value=!1,H.value=!1);let A=!1;if(o.ga4&&Ee.value){const c=je.value.find(y=>y.id==o.ga4);c&&(fe.value=!0,X.value=c,A=!0)}A||(fe.value=!1,X.value=!1);let k=!1;if(o.proxy_id&&Ge.value){const c=me.value.find(y=>y.id==o.proxy_id);c&&(q.value=c,ge.value=!0,k=!0)}k||(q.value=!1,ge.value=!1),o.video_title?(we.value=!0,Ie.value=o.video_title,Fe(()=>{var c;return(c=Se.value)==null?void 0:c.setText(o.video_title)})):(we.value=!1,Ie.value=""),o.multi&&(await $e("multi"),Fe(()=>{var c;(c=oe.value)==null||c.setMultiData(o.multi,o.start_part,o.end_part)}))}const lt=i(null),G=i(null),K=i(!1),re=i(0),kt=Me(()=>{let o=[];return G.value&&G.value.viewed_video_recipients&&(o=G.value.viewed_video_recipients.split(",")),o});function Ct(){const o={client_id:null,client_event_id:null};if(G.value&&(o.client_id=G.value.id,K.value)){if(G.value.meetings_page.length&&!re.value)return D.alert("Please select a booking page from the client","error"),!1;o.client_event_id=re.value||null}return o}function At(o){var h;G.value=o,(h=lt.value)==null||h.close(),G.value&&G.value.meetings_page.length?(K.value=!0,re.value=G.value.meetings_page[0].id,se.value=!0):(re.value=0,K.value=!1,se.value=!1)}function Tt(o){K.value=!K.value,K.value&&re.value?se.value=!0:se.value=!1}t({setTemplateOptions:at,generate:Pe});const ot={linkedinIcon:e,fbPixelIcon:F,gtagIcon:O,ga4Icon:l,CLIENT_LOGO_URL:z,automated_example_fields:ce,props:b,emit:te,router:ae,userStore:be,toast:D,upgradeWall:N,me:le,preview:oe,customCamera:L,saveTemplateRef:v,ddCamera:p,ddProxy:T,ddPixel:V,ddGtag:E,ddGa4:xe,clientRef:j,titleEditorRef:Se,captionEditorRef:We,autoscroll:Je,building:W,show_booking:I,open_meetings_page:vt,event_id:P,event_type:J,show_title:we,show_name:qe,title:Ie,caption:_t,reached_limit:Ze,enable_proxy:Ge,on_proxy:ge,the_proxy:q,proxies:me,events:R,website_type:ie,imported_progress:He,camera:ue,show_cta:he,open_edit_cta:ft,cta:ke,pixel_enable:ze,pixel_on:ve,pixel_data:Z,pixel_list:Ne,gtag_enable:Le,gtag_on:_e,gtag_data:H,gtag_list:Ve,ga4_enable:Ee,ga4_on:fe,ga4_data:X,ga4_list:je,show_client:ne,clients:Xe,show_client_booking:se,overlay_i
6d:Be,captions_enable:pe,open_edit_captions:Oe,raw_captions:B,loading_captions:Re,template:Ke,preview_caption:pt,meeting_page:yt,selectWebsiteType:$e,selectEvent:et,toggleBooking:bt,showClient:xt,getCaption:tt,updateCaptions:wt,generate:Pe,saveTemplate:ht,setTemplateOptions:at,ddConnectClient:lt,selected_client:G,client_enable_booking:K,client_event_id:re,client_video_recipients:kt,clientGetData:Ct,selectClient:At,clientEnableBooking:Tt,get UserCircle(){return ca},get ChevronLeft(){return Yt},get Loader(){return da},get ChevronDown(){return ra},get Loader2(){return Qt},get Star(){return sa},get UserX(){return na},get Wrench(){return _a},get ShoppingCart(){return Pt},get Globe(){return Rt},get Layers(){return ia},get VideoIcon(){return Ot},IncludeEvent:ta,PreviewAutomated:Kt,CustomCamera:Xt,AddCTA:Ht,CTAButton:Zt,AddCaptions:qt,AddMeetingsPage:Jt,SaveTemplate:Wt,DynamicText:aa,UiToggle:la,UiDropdown:oa,UiModal:Et};return Object.defineProperty(ot,"__isScriptSetup",{enumerable:!1,value:!0}),ot}}),pa={class:"create-dynamic-wrapper flex flex-col h-full"},ya={class:"dynamic-wrapper flex-1 flex overflow-y-auto"},ba={class:"w-full md:w-[420px] shrink-0 relative"},xa={class:"h-full overflow-y-auto px-5"},wa={class:"pt-7 pb-5"},ha={class:"inline-flex items-center gap-1.5 rounded-full bg-blue-50 text-blue-700 px-2.5 py-1 text-[11px] font-semibold"},ka={class:"font-bold mt-2.5 mb-0 text-gray-900 text-lg"},Ca={key:0,class:"grid grid-cols-2 gap-2 mb-5"},Aa={class:"flex items-center gap-1.5"},Ta={class:"flex items-center gap-1.5"},Ua=["src"],Ma={class:"flex items-center gap-1.5"},Da={key:1,class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Sa={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Ia={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Ga={class:"flex items-center gap-3"},za={class:"text-gray-400 flex items-center"},Na={key:0,class:"flex-1 whitespace-nowrap overflow-hidden text-ellipsis text-sm mx-2.5"},La={key:1,class:"flex-1 whitespace-nowrap overflow-hidden text-ellipsis text-sm text-gray-400 mx-2.5"},Va={key:4},Ea={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},ja={class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},Ba={class:"overflow-hidden whitespace-nowrap"},Oa={class:"mb-0 text-sm text-gray-900"},Ra={class:"text-sm text-gray-400"},Pa=["onClick"],Qa={class:"ml-1.5 px-1.5"},Ya={class:"mb-0 text-sm text-gray-900"},Fa={class:"text-sm text-gray-400"},Wa={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Ja={class:"flex items-center gap-3"},qa={key:0,class:"border border-gray-200 rounded p-2.5 text-sm"},Za={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Ha={class:"flex items-center gap-3"},Xa={key:5},Ka={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},$a=["src"],el={class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},tl={class:"overflow-hidden whitespace-nowrap"},al={class:"mb-0 text-sm text-gray-900"},ll={class:"text-sm text-gray-400"},ol=["onClick"],il={class:"ml-1.5 px-1.5"},nl={class:"mb-0 text-sm text-gray-900"},sl={class:"text-sm text-gray-400"},rl={key:6},dl={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},cl=["src"],gl={class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},ml={class:"overflow-hidden whitespace-nowrap"},ul={class:"mb-0 text-sm text-gray-900"},vl={class:"text-sm text-gray-400"},_l=["onClick"],fl={class:"ml-1.5 px-1.5"},pl={class:"mb-0 text-sm text-gray-900"},yl={class:"text-sm text-gray-400"},bl={key:7},xl={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},wl=["src"],hl={class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},kl={class:"overflow-hidden whitespace-nowrap"},Cl={class:"mb-0 text-sm text-gray-900"},Al={class:"text-sm text-gray-400"},Tl=["onClick"],Ul={class:"ml-1.5 px-1.5"},Ml={class:"mb-0 text-sm text-gray-900"},Dl={class:"text-sm text-gray-400"},Sl={class:"flex items-center justify-between py-3.5 border-t border-gray-100"},Il={key:8,class:"mb-5"},Gl={class:"my-5"},zl={key:0,class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},Nl={style:{width:"50px",height:"30px"},class:"border border-gray-200 text-center p-1.5 rounded mr-2.5 text-gray-400"},Ll={key:1,class:"flex items-center border border-gray-300 rounded-lg pl-2.5 py-2 cursor-pointer"},Vl={style:{"background-color":"#fff",width:"50px",height:"30px"},class:"text-center p-1.5 rounded mr-2.5"},El=["src"],jl={class:"overflow-hidden whitespace-nowrap"},Bl={class:"mb-0 text-sm text-gray-900"},Ol={style:{width:"50px",height:"30px"},class:"border border-gray-200 text-center p-1.5 rounded mr-2.5 text-gray-400"},Rl=["onClick"],Pl={style:{"background-color":"#fff",width:"50px",height:"30px"},class:"text-center p-1.5 rounded mr-2.5"},Ql=["src"],Yl={class:"pr-4"},Fl={class:"mb-0 text-sm text-gray-900"},Wl={key:0},Jl={class:"mb-5"},ql={key:0,class:"text-gray-400 text-sm"},Zl={key:1,class:"border border-gray-200 rounded p-2.5"},Hl={class:"flex items-center mb-1.5"},Xl={key:0},Kl={key:0,class:"text-gray-400 text-sm"},$l={class:"mt-1.5"},eo=["checked","onChange"],to={class:"flex-1 mb-2.5"},ao={class:"mb-1.5 text-gray-900"},lo={class:"text-gray-400 text-sm mb-0"},oo={class:"flex-1 hidden md:flex flex-col"},io={class:"flex items-center py-8"},no={class:"inline-flex items-center border border-gray-300 bg-white px-5 py-3 rounded-lg font-medium text-gray-700 hover:bg-gray-50"},so={key:0,class:"inline-flex items-center"},ro={key:1},co={class:"text-center text-gray-700"},go={key:0,class:"limit-progress"},mo={class:"progress-wrapper"},uo={class:"flex items-center justify-center whitespace-nowrap mt-1.5"},vo={class:"border rounded px-2.5 py-1.5 mx-1.5",style:{"border-color":"#ff8c00"}},_o={class:"border rounded px-2.5 py-1.5 mx-1.5",style:{"border-color":"#22c55e"}},fo={class:"border rounded px-2.5 py-1.5 mx-1.5",style:{"border-color":"#2563eb"}},po={class:"text-center my-5"},yo={class:"text-center p-5"},bo={class:"progress bg-gray-100 rounded-full overflow-hidden",style:{height:"8px"}};function xo(de,t,g,e,F,O){return n(),r("div",pa,[a("div",ya,[a("div",ba,[a("div",xa,[a("div",wa,[a("span",ha,[s(e.VideoIcon,{size:12}),t[40]||(t[40]=S(" Automated videos campaign ",-1))]),a("h5",ka,m(g.is_get_data?"Customize video & landing page":"Customize your video"),
61)]),d(" Single/Multi motion website "),g.pre_data.overlay_seconds?(n(),r("div",Ca,[!g.pre_data.mapping||g.pre_data.mapping&&g.pre_data.mapping.website?(n(),r("button",{key:0,type:"button",class:u(["rounded-xl border p-3 text-left transition-all",e.website_type=="single"?"border-blue-500 bg-blue-50/60 ring-1 ring-blue-500":"border-gray-200 bg-white hover:border-gray-300"]),onClick:t[0]||(t[0]=l=>e.selectWebsiteType("single"))},[a("div",Aa,[s(e.Globe,{size:15,class:u(e.website_type=="single"?"text-blue-600":"text-gray-500")},null,8,["class"]),a("span",{class:u(["text-sm font-semibold",e.website_type=="single"?"text-blue-700":"text-gray-800"])},"Lead's website",2)]),t[41]||(t[41]=a("p",{class:"text-[11px] text-gray-500 leading-snug mt-1"},"The lead's own website scrolling behind your camera.",-1))],2)):d("v-if",!0),!g.is_block_lead_linkedin&&(["heyreach","lagrowthmachine","replyio","salesforge","outreach"].includes(g.platform)||g.pre_data.mapping&&g.pre_data.mapping.linkedin_profile)?(n(),r("button",{key:1,type:"button",class:u(["rounded-xl border p-3 text-left transition-all",e.website_type=="linkedin"?"border-blue-500 bg-blue-50/60 ring-1 ring-blue-500":"border-gray-200 bg-white hover:border-gray-300"]),onClick:t[1]||(t[1]=l=>e.website_type="linkedin")},[a("div",Ta,[a("img",{src:e.linkedinIcon,class:"w-4 h-4 object-contain"},null,8,Ua),a("span",{class:u(["text-sm font-semibold",e.website_type=="linkedin"?"text-blue-700":"text-gray-800"])},"Lead's Linkedin",2)]),t[42]||(t[42]=a("p",{class:"text-[11px] text-gray-500 leading-snug mt-1"},"The lead's LinkedIn profile.",-1))],2)):d("v-if",!0),a("button",{type:"button",class:u(["rounded-xl border p-3 text-left transition-all",e.website_type=="multi"?"border-blue-500 bg-blue-50/60 ring-1 ring-blue-500":"border-gray-200 bg-white hover:border-gray-300"]),onClick:t[2]||(t[2]=l=>e.selectWebsiteType("multi"))},[a("div",Ma,[s(e.Layers,{size:15,class:u(e.website_type=="multi"?"text-blue-600":"text-gray-500")},null,8,["class"]),a("span",{class:u(["text-sm font-semibold",e.website_type=="multi"?"text-blue-700":"text-gray-800"])},"Multi motion",2)]),t[43]||(t[43]=a("p",{class:"text-[11px] text-gray-500 leading-snug mt-1"},"A sequence of scenes (LinkedIn to site to ...).",-1))],2)])):d("v-if",!0),d(" Auto scroll "),e.website_type=="single"?(n(),r("div",Da,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:t[3]||(t[3]=l=>e.autoscroll=!e.autoscroll)},"Autoscroll Website"),a("div",{class:"cursor-pointer",onClick:t[4]||(t[4]=l=>e.autoscroll=!e.autoscroll)},[s(e.UiToggle,{"model-value":e.autoscroll,"onUpdate:modelValue":()=>{}},null,8,["model-value"])])])):d("v-if",!0),d(" Video Title "),a("div",Sa,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:t[5]||(t[5]=l=>e.show_title=!e.show_title)},"Video Title"),a("div",{class:"cursor-pointer",onClick:t[6]||(t[6]=l=>e.show_title=!e.show_title)},[s(e.UiToggle,{"model-value":e.show_title,"onUpdate:modelValue":()=>{}},null,8,["model-value"])])]),a("div",{class:u(["mb-5",{hidden:!e.show_title}])},[s(e.DynamicText,{ref:"titleEditorRef",placeholder:"Title",onUpdate:t[7]||(t[7]=l=>e.title=l)},null,512)],2),d(` Message (text_content) merge-tag editor: DISABLED in the old source 7 (commented out in weezly-master CampaignData.vue), campaigns have no 8 Message option. show_name stays false; text_content goes out as "". 9 <div class="flex items-center justify-between py-3.5 border-t border-gray-100"> 10 <span class="text-sm font-medium text-gray-800 cursor-pointer" @click="show_name = !show_name">Message</span> 11 <div class="cursor-pointer" @click="show_name = !show_name"><UiToggle :model-value="show_name" @update:model-value="() => {}" /></div> 12 </div> 13 <div class="mb-5" :class="{ hidden: !show_name }"> 14 <DynamicText 15 ref="captionEditorRef" 16 placeholder="Message" 17 :is_caption="true" 18 @update="(text) => (caption = text)" 19 /> 20 </div> 21 `),d(" Video captions "),a("div",Ia,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:t[8]||(t[8]=()=>{e.captions_enable=!e.captions_enable,e.captions_enable&&!e.loading_captions&&!e.raw_captions&&(e.open_edit_captions=!0)})},"Captions"),a("div",Ga,[e.captions_enable?(n(),r("button",{key:0,class:"text-xs font-semibold text-blue-600 hover:underline",onClick:t[9]||(t[9]=l=>e.open_edit_captions=!0)}," Edit ")):d("v-if",!0),a("div",{class:"cursor-pointer",onClick:t[10
21]||(t[10]=()=>{e.captions_enable=!e.captions_enable,e.captions_enable&&!e.loading_captions&&!e.raw_captions&&(e.open_edit_captions=!0)})},[s(e.UiToggle,{"model-value":e.captions_enable,"onUpdate:modelValue":()=>{}},null,8,["model-value"])])])]),e.loading_captions?(n(),r("div",{key:2,class:u(["mb-5 flex items-center border border-gray-200 justify-center rounded p-1.5",{hidden:!e.captions_enable}])},[a("div",za,[s(e.Loader2,{size:18,class:"animate-spin mr-1.5"}),t[44]||(t[44]=S(" Loading...",-1))])],2)):(n(),r("div",{key:3,class:u(["mb-5 flex items-center border border-gray-200 rounded px-1.5 py-2.5",{hidden:!e.captions_enable}])},[e.preview_caption?(n(),r("div",Na,m(e.preview_caption),1)):(n(),r("div",La,"No caption"))],2)),d(" Proxy "),e.enable_proxy?(n(),r("div",Va,[a("div",Ea,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:t[11]||(t[11]=l=>e.on_proxy=!e.on_proxy)},"Use Proxy"),a("div",{class:"cursor-pointer",onClick:t[13]||(t[13]=l=>e.on_proxy=!e.on_proxy)},[s(e.UiToggle,{"model-value":e.on_proxy,"onUpdate:modelValue":t[12]||(t[12]=l=>e.on_proxy=l)},null,8,["model-value"])])]),a("div",{class:u(["mb-4",{hidden:!e.on_proxy}])},[s(e.UiDropdown,{class:"block",ref:"ddProxy",position:"top-left",width:"100%"},{toggle:U(()=>[a("div",ja,[a("div",Ba,[a("p",Oa,m(e.the_proxy.name),1),a("span",Ra,m(e.the_proxy.host)+":"+m(e.the_proxy.port),1)]),t[45]||(t[45]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})])]),default:U(()=>[(n(!0),r($,null,ee(e.proxies,l=>(n(),r("div",{key:l.id,class:u([{"bg-blue-50":e.the_proxy&&e.the_proxy.id==l.id},"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50"]),onClick:z=>{e.the_proxy=l,e.ddProxy.close()}},[l.is_default?(n(),M(e.Star,{key:0,size:18,class:"text-yellow-400"})):(n(),M(e.Star,{key:1,size:18,class:"text-gray-300"})),a("div",Qa,[a("p",Ya,m(l.name),1),a("span",Fa,m(l.host)+":"+m(l.port),1)])],10,Pa))),128))]),_:1},512)],2)])):d("v-if",!0),d(" Booking page "),a("div",Wa,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:e.toggleBooking},"Meetings Page"),a("div",Ja,[e.show_booking?(n(),r("button",{key:0,class:"text-xs font-semibold text-blue-600 hover:underline",onClick:t[14]||(t[14]=l=>e.open_meetings_page=!0)},"Edit")):d("v-if",!0),a("div",{class:"cursor-pointer",onClick:e.toggleBooking},[s(e.UiToggle,{"model-value":e.show_booking,"onUpdate:modelValue":()=>{}},null,8,["model-value"])])])]),a("div",{class:u(["mb-5",{hidden:!e.show_booking}
21])},[e.meeting_page?(n(),M(e.IncludeEvent,{key:1,event:e.meeting_page,event_id:e.event_id,event_type:e.event_type,class:"small"},null,8,["event","event_id","event_type"])):(n(),r("div",qa,[...t[46]||(t[46]=[a("span",{class:"text-gray-400"},"No Meetings Page",-1)])]))],2),d(" Call-To-Action button "),a("div",Za,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:t[15]||(t[15]=l=>e.show_cta=!e.show_cta)},"Call-To-Action"),a("div",Ha,[e.show_cta?(n(),r("button",{key:0,class:"text-xs font-semibold text-blue-600 hover:underline",onClick:t[16]||(t[16]=l=>e.open_edit_cta=!0)},"Edit")):d("v-if",!0),a("div",{class:"cursor-pointer",onClick:t[18]||(t[18]=l=>e.show_cta=!e.show_cta)},[s(e.UiToggle,{"model-value":e.show_cta,"onUpdate:modelValue":t[17]||(t[17]=l=>e.show_cta=l)},null,8,["model-value"])])])]),a("div",{class:u(["mb-5 flex items-center border border-gray-200 rounded p-1.5",{hidden:!e.show_cta}])},[t[47]||(t[47]=a("span",{class:"text-gray-400 flex-1 text-sm mx-1.5"},"Preview button",-1)),s(e.CTAButton,{cta:e.cta,class:"px-2.5",style:{"font-size":"13px"}},null,8,["cta"])],2),d(" Tracking - Facebook Pixel "),e.pixel_enable?(n(),r("div",Xa,[a("div",Ka,[a("span",{class:"flex items-center gap-2 text-sm font-medium text-gray-800 cursor-pointer",onClick:t[19]||(t[19]=l=>e.pixel_on=!e.pixel_on)},[a("img",{src:e.fbPixelIcon,width:"18"},null,8,$a),t[48]||(t[48]=S(" Facebook Pixel ",-1))]),a("div",{class:"cursor-pointer",onClick:t[21]||(t[21]=l=>e.pixel_on=!e.pixel_on)},[s(e.UiToggle,{"model-value":e.pixel_on,"onUpdate:modelValue":t[20]||(t[20]=l=>e.pixel_on=l)},null,8,["model-value"])])]),a("div",{class:u(["mb-4",{hidden:!e.pixel_on}])},[s(e.UiDropdown,{class:"block",ref:"ddPixel",position:"top-left",width:"100%"},{toggle:U(()=>[a("div",el,[a("div",tl,[a("p",al,m(e.pixel_data.name),1),a("span",ll,m(e.pixel_data.code),1)]),t[49]||(t[49]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})])]),default:U(()=>[(n(!0),r($,null,ee(e.pixel_list,l=>(n(),r("div",{key:l.id,class:u([{"bg-blue-50":e.pixel_data&&e.pixel_data.id==l.id},"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50"]),onClick:z=>{e.pixel_data=l,e.ddPixel.close()}},[l.is_default?(n(),M(e.Star,{key:0,size:18,class:"text-yellow-400"})):(n(),M(e.Star,{key:1,size:18,class:"text-gray-300"})),a("div",il,[a("p",nl,m(l.name),1),a("span",sl,m(l.code),1)])],10,ol))),128))]),_:1},512)],2)])):d("v-if",!0),d(" Tracking - Google Tag Manager "),e.gtag_enable?(n(),r("div",rl,[a("div",dl,[a("span",{class:"flex items-center gap-2 text-sm font-medium text-gray-800 cursor-pointer",onClick:t[22]||(t[22]=l=>e.gtag_on=!e.gtag_on)},[a("img",{src:e.gtagIcon,width:"18"},null,8,cl),t[50]||(t[50]=S(" Google Tag Manager ",-1))]),a("div",{class:"cursor-pointer",onClick:t[24]||(t[24]=l=>e.gtag_on=!e.gtag_on)},[s(e.UiToggle,{"model-value":e.gtag_on,"onUpdate:modelValue":t[23]||(t[23]=l=>e.gtag_on=l)},null,8,["model-value"])])]),a("div",{class:u(["mb-4",{hidden:!e.gtag_on}])},[s(e.UiDropdown,{class:"block",ref:"ddGtag",position:"top-left",width:"100%"},{toggle:U(()=>[a("div",gl,[a("div",ml,[a("p",ul,m(e.gtag_data.name),1),a("span",vl,m(e.gtag_data.code),1)]),t[51]||(t[51]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})])]),default:U(()=>[(n(!0),r($,null,ee(e.gtag_list,l=>(n(),r("div",{key:l.id,class:u([{"bg-blue-50":e.gtag_data&&e.gtag_data.id==l.id},"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50"]),onClick:z=>{e.gtag_data=l,e.ddGtag.close()}},[l.is_default?(n(),M(e.Star,{key:0,size:18,class:"text-yellow-400"})):(n(),M(e.Star,{key:1,size:18,class:"text-gray-300"})),a("div",fl,[a("p",pl,m(l.name),1),a("span",yl,m(l.code),1)])],10,_l))),128))]),_:1},512)],2)])):d("v-if",!0),d(" Tracking - Google Analytics 4 "),e.ga4_enable?(n(),r("div",bl,[a("div",xl,[a("span",{class:"flex items-center gap-2 text-sm font-medium text-gray-800 cursor-pointer",onClick:t[25]||(t[25]=l=>e.ga4_on=!e.ga4_on)},[a("img",{src:e.ga4Icon,width:"18"},null,8,wl),t[52]||(t[52]=S(" Google Analytics 4 ",-1))]),a("div",{class:"cursor-pointer",onClick:t[27]||
21(t[27]=l=>e.ga4_on=!e.ga4_on)},[s(e.UiToggle,{"model-value":e.ga4_on,"onUpdate:modelValue":t[26]||(t[26]=l=>e.ga4_on=l)},null,8,["model-value"])])]),a("div",{class:u(["mb-4",{hidden:!e.ga4_on}])},[s(e.UiDropdown,{class:"block",ref:"ddGa4",position:"top-left",width:"100%"},{toggle:U(()=>[a("div",hl,[a("div",kl,[a("p",Cl,m(e.ga4_data.name),1),a("span",Al,m(e.ga4_data.code),1)]),t[53]||(t[53]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})])]),default:U(()=>[(n(!0),r($,null,ee(e.ga4_list,l=>(n(),r("div",{key:l.id,class:u([{"bg-blue-50":e.ga4_data&&e.ga4_data.id==l.id},"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50"]),onClick:z=>{e.ga4_data=l,e.ddGa4.close()}},[l.is_default?(n(),M(e.Star,{key:0,size:18,class:"text-yellow-400"})):(n(),M(e.Star,{key:1,size:18,class:"text-gray-300"})),a("div",Ul,[a("p",Ml,m(l.name),1),a("span",Dl,m(l.code),1)])],10,Tl))),128))]),_:1},512)],2)])):d("v-if",!0),d(" Connect to a Client "),a("div",Sl,[a("span",{class:"text-sm font-medium text-gray-800 cursor-pointer",onClick:e.showClient},"Connect To A Client"),a("div",{class:"cursor-pointer",onClick:e.showClient},[s(e.UiToggle,{"model-value":e.show_client,"onUpdate:modelValue":()=>{}},null,8,["model-value"])])]),d(" ConnectClient (inlined) "),e.show_client?(n(),r("div",Il,[a("div",Gl,[d(" Select client "),s(e.UiDropdown,{class:"block mb-5",ref:"ddConnectClient",position:"top-left",width:"100%"},{toggle:U(()=>[e.selected_client?(n(),r("div",Ll,[a("div",Vl,[a("img",{src:e.CLIENT_LOGO_URL+e.selected_client.logo,alt:"",class:"max-w-full max-h-full"},null,8,El)]),a("div",jl,[a("p",Bl,m(e.selected_client.name),1)]),t[56]||(t[56]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})])):(n(),r("div",zl,[a("div",Nl,[s(e.UserX,{size:16})]),t[54]||(t[54]=a("div",{class:"pr-4 text-gray-400"},[a("p",{class:"mb-0 text-sm"},"No client selected")],-1)),t[55]||(t[55]=a("div",{class:"flex-1"},null,-1)),s(e.ChevronDown,{size:16,class:"mr-2.5"})]))]),default:U(()=>[a("div",{class:"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50",onClick:t[28]||(t[28]=l=>e.selectClient(null))},[a("div",Ol,[s(e.UserX,{size:16})]),t[57]||(t[57]=a("div",{class:"pr-4 text-gray-400"},[a("p",{class:"mb-0 text-sm"},"No client selected")],-1))]),(n(!0),r($,null,ee(e.clients,l=>(n(),r("div",{key:l.id,class:u([{"bg-blue-50":e.selected_client&&e.selected_client.id==l.id},"flex items-center px-2.5 py-2 rounded cursor-pointer hover:bg-gray-50"]),onClick:z=>e.selectClient(l)},[a("div",Pl,[a("img",{src:e.CLIENT_LOGO_URL+l.logo,alt:"",class:"max-w-full max-h-full"},null,8,Ql)]),a("div",Yl,[a("p",Fl,m(l.name),1)])],10,Rl))),128))]),_:1},512),e.selected_client?(n(),r("div",Wl,[a("div",Jl,[t[58]||(t[58]=a("h6",{class:"font-bold mb-1.5 text-gray-900"},"Video notifications",-1)),e.client_video_recipients.length==0?(n(),r("p",ql,"No email added")):(n(),r("div",Zl,[(n(!0),r($,null,ee(e.client_video_recipients,l=>(n(),r("p",{key:l,class:"text-sm mb-0"},m(l),1))),128))]))]),a("div",Hl,[t[59]||(t[59]=a("h6",{class:"font-bold mb-0 flex-1 text-gray-900"},"Booking page",-1)),s(e.UiToggle,{"model-value":e.client_enable_booking,"onUpdate:modelValue":e.clientEnableBooking},null,8,["model-value"])]),e.client_enable_booking?(n(),r("div",Xl,[e.selected_client.meetings_page.length==0?(n(),r("p",Kl,"No booking page")):d("v-if",!0),(n(!0),r($,null,ee(e.selected_client.meetings_page,l=>(n(),r("div",{key:l.id,class:"flex"},[a("div",$l,[a("input",{type:"radio",name:"booking_page",class:"mr-2.5",checked:e.client_event_id==l.id,onChange:z=>e.client_event_id=l.id},null,40,eo)]),a("div",to,[a("h6",ao,m(l.name),1),a("p",lo,m(l.client_calendar?l.client_calendar.email:"Use default setting"),1)])]))),128))])):d("v-if",!0)])):d("v-if",!0)])])):d("v-if",!0)]),e.open_edit_captions?(n(),M(e.AddCaptions,{key:0,onClose:t[29]||(t[29]=()=>{e.open_edit_captions=!1,e.raw_captions||(e.captions_enable=!1)}),video_id:g.pre_data.overlay_id,raw_captions:e.raw_captions,onUpdate:e.updateCaptions},null,8,["video_id","raw_captions"])):d("v-if",!0),e.open_edit_cta?(n(),M(e.AddCTA,{key:1,pre_data:e.cta,show_booking:e.show_booking,onClose:t[30]||(t[30]=l=>e.open_edit_cta=!1),onUpdate:t[31]||(t[31]=l=>e.cta=l)},null,8,["pre_data","show_booking"])):d("v-if",!0),e.open_meetings_page?(n(),M(e.AddMeetingsPage,{key:2,events:e.events,event_id:e.event_id,event_type:e.event_type,onClose:t[32]||(t[32]=l=>e.open_meetings_page=!1),onUpdate:t[33]||(t[33]=l=>{e.show_booking=!0,e.event_id=l.id,e.event_type=l.type,e.open_meetings_page=!1})},null,8,["events","event_id","event_type"])):d("v-if",!0)]),a("div",oo,[s(e.PreviewAutomated,{class:"flex-1",ref:"preview",camera:e.camera,cta:e.cta,show_cta:e.show_cta,overlay:g.pre_data.overlay,overlay_seconds:g.pre_data.overlay_seconds,pre_data:g.pre_data,autoscroll:e.autoscroll,show_title:e.show_title,title:e.title,is_campaign:!0,show_caption:e.show_name,caption:e.caption,show_booking:e.show_booking||e.show_client_booking,platform:g.platform,is_block_lead_linkedin:g.is_block_lead_linkedin,website_type:e.website_type,raw_captions:e.captions_enable?e.raw_captions:null,is_clone_video:g.is_clone_video},null,8,["camera","cta","show_cta","overlay","overlay_seconds","pre_data","autoscroll","show_title","title","show_caption","caption","show_booking","platform","is_block_lead_linkedin","website_type","raw_captions","is_clone_video"])])]),a("div",io,[t[63]||(t[63]=a("div",{class:"w-[420px]"},null,-1)),g.is_clone_video?d("v-if",!0):(n(),M(e.UiDropdown,{key:0,position:"top-right",class:"custom-camera-dropdown",ref:"ddCamera"},{toggle:U(()=>[a("button",no,[s(e.UserCircle,{size:18,class:"mr-2.5"}),t[60]||(t[60]=S("Camera ",-1))])]),default:U(()=>[s(e.CustomCamera,{ref:"customCamera",initial:e.camera,style:{width:"380px",height:"calc(100vh - 100px)"},onUpdate:t[34]||(t[34]=l=>e.camera=l),onClose:t[35]||(t[35]=l=>e.ddCamera.close())},null,8,["initial"])]),_:1},512)),t[64]||(t[64]=a("div",{class:"flex-1"},null,-1)),a("button",{class:"inline-flex items-center border border-gray-300 bg-white px-5 py-3 rounded-lg font-medium text-gray-700 hover:bg-gray-50",onClick:t[36]||(t[36]=l=>de.$emit("back"))},[s(e.ChevronLeft,{size:18,class:"mr-1.5"}),t[61]||(t[61]=S("Previous ",-1))]),s(e.SaveTemplate,{class:"mx-2.5",onSaveTemplate:e.s
21aveTemplate,ref:"saveTemplateRef"},null,512),a("button",{class:"inline-flex items-center bg-blue-600 text-white px-5 py-3 rounded-lg font-medium hover:bg-blue-700",onClick:t[37]||(t[37]=l=>e.generate())},[g.platform=="outreach"?(n(),r("span",so,[s(e.Wrench,{size:18,class:"mr-1.5"}),t[62]||(t[62]=S(" Save Configuration",-1))])):(n(),r("span",ro,"Create "+m(g.pre_data.total||g.pre_data.list.length)+" automated videos",1)),e.building?(n(),M(e.Loader,{key:2,size:18,class:"ml-2.5 animate-spin"})):d("v-if",!0)]),t[65]||(t[65]=a("div",{class:"mx-4"},null,-1))]),d(" Reached limit of dynamic minutes "),s(e.UiModal,{open:!!e.reached_limit,"max-width":"max-w-2xl",onClose:t[39]||(t[39]=l=>e.reached_limit=!1)},{default:U(()=>[t[71]||(t[71]=a("h5",{class:"text-center font-bold my-5 text-lg"},"You have reached your video limit",-1)),a("h6",co,[S(m(e.me.userName)+", your subscription on Weezly includes "+m(e.reached_limit.total)+" videos",1),t[66]||(t[66]=a("br",null,null,-1)),t[67]||(t[67]=S(" and you have reached your limit.",-1)),t[68]||(t[68]=a("br",null,null,-1)),t[69]||(t[69]=S("To finish the campaign, please purchase more video minutes ",-1))]),t[72]||(t[72]=a("br",null,null,-1)),e.reached_limit.total?(n(),r("div",go,[a("div",mo,[a("div",{class:"bg-green-500",style:De(`width: ${e.reached_limit.used_percent}%`)},null,4),a("span",{class:"limit",style:De(`left: ${e.reached_limit.total_percent}%`)},null,4),a("div",{class:"bg-blue-600",style:De(`width: ${e.reached_limit.using_percent}%`)},null,4)])])):d("v-if",!0),a("div",uo,[a("div",vo,"Your limit: "+m(e.reached_limit.total)+" mins",1),a("div",_o,"Used: "+m(Math.round(e.reached_limit.used))+" mins",1),a("div",fo,"Your campaign: "+m(Math.round(e.reached_limit.using))+" mins",1)]),t[73]||(t[73]=a("br",null,null,-1)),t[74]||(t[74]=a("br",null,null,-1)),a("div",po,[a("button",{class:"inline-flex items-center bg-blue-600 text-white text-lg font-bold py-2.5 px-5 rounded-lg hover:bg-blue-700",onClick:t[38]||(t[38]=l=>e.reached_limit=!1)},[t[70]||(t[70]=S(" Purchase more minutes ",-1)),s(e.ShoppingCart,{size:24,class:"ml-1.5"})])])]),_:1},8,["open"]),d(" Imported progress "),s(e.UiModal,{open:e.imported_progress!=null,"max-width":"max-w-md",onClose:()=>{}},{default:U(()=>[a("div",yo,[t[75]||(t[75]=a("h6",{class:"mb-5 text-gray-900 font-medium"},"Importing data, please wait...",-1)),a("div",bo,[a("div",{class:"progress-bar bg-blue-600 h-full",style:De(`width: ${e.imported_progress}%`)},null,4)])])]),_:1},8,["open"]),d(" Insert Tag modal is handled internally by each <DynamicText> component ")])}const wo=ut(fa,[["render",xo],["__scopeId","data-v-d3f1cec8"],["__file","/home/gitlab-runner/weezly-v3/callendo-frontend-v3/src/components/dynamic/campaign/CampaignData.vue"]]),ho=gt({__name:"ExternalDynamicCampaignView",setup(de,{expose:t}){t();const g=i({campaign_name:"",overlay_id:null,overlay:"",seconds:0,list:[]}),e=i(!1),F=i(!1),O=i(0),l=i([{class:"",position:0},{class:"hide",position:1},{class:"hide",position:2}]),z=i(""),ce=i(!1),b=i(!1),te=i(null),ae=i(null);mt(()=>{window.addEventListener("message",async v=>{var p,T;if(v.data&&v.data.type=="weezly-authorization"){const V=localStorage.getItem("token"),E=v.data.token;if(E&&E!=V)localStorage.setItem("token",E),location.reload();else if((E==V||v.data.platform=="outreach")&&(z.value=v.data.platform,g.value.total=v.data.total,v.data.is_block_lead_linkedin&&(ce.value=!0),g.value.heyreach_custom_fields=v.data.heyreach_custom_fields||[],document.body.classList.remove("loading"),e.value=!0,await Fe(),setTimeout(()=>{window.parent.postMessage("dynamic-video-ready","*")},1e3),v.data.configData)){const xe=v.data.configData;F.value=!0;const j=await((p=te.value)==null?void 0:p.selectVideoFromTemplate(xe.overlay));if(F.value=!1,!j)return!1;g.value.overlay_id=j.overlay_id,g.value.overlay=j.overlay,g.value.overlay_seconds=j.seconds?j.seconds:0,b.value=j.is_clone_video,(T=ae.value)==null||T.setTemplateOptions(xe),N(2)}}});try{window.parent.postMessage("dynamic-video-loaded","*")}catch{}});function be(v,p=""){p=="message"&&(g.value.overlay_id=v.overlay_id,g.value.overlay=v.overlay,g.value.overlay_seconds=v.seconds?v.seconds:0),N(O.value+1)}function D(){N(O.value-1)}function N(v){const p=l.value.find(E=>E.position==O.value),T=l.value.find(E=>E.position==v);if(!p||!T||p.position==T.position)return!1;const V=p.position<T.position?"Up":"Down";O.value=T.position,p.class=`animated slideOut${V} faster`,T.class=`animated slideIn${V} faster`,setTimeout(()=>{p.class="hide",T.class=""},500)}async function le(v){var T,V;if(!v){N(1);return}const p=await((T=te.value)==null?void 0:T.selectVideoFromTemplate(v.video_message_url));if(!p)return!1;
21g.value.overlay_id=p.overlay_id,g.value.overlay=p.overlay,g.value.overlay_seconds=p.seconds?p.seconds:0,b.value=p.is_clone_video,(V=ae.value)==null||V.setTemplateOptions(v),N(2)}function oe(v){try{window.parent.postMessage({type:"campaign-data",data:JSON.stringify(v)},"*")}catch(p){console.log("ERRORRR",p)}}const L={pre_data:g,loaded:e,loading:F,tab_position:O,animates:l,platform:z,is_block_lead_linkedin:ce,is_clone_video:b,campaignMessage:te,campaignData:ae,goNext:be,goBack:D,goToTab:N,onSelectTemplate:le,update:oe,get LayoutTemplate(){return ua},get User(){return ma},get ImageIcon(){return ga},UiPageLoader:Ft,SelectTemplate:ea,SelectOverlay:$t,CampaignData:wo};return Object.defineProperty(L,"__isScriptSetup",{enumerable:!1,value:!0}),L}}),ko={class:"external-dynamic-video"},Co={key:0,class:"absolute inset-0 z-40 bg-white flex overflow-hidden"},Ao={class:"shrink-0 w-16 bg-gray-50 border-r border-gray-200 flex flex-col items-center py-6 gap-4"},To={class:"flex-1 relative overflow-hidden"},Uo={key:1,class:"absolute inset-0 z-50 flex items-center justify-center bg-white/70"};function Mo(de,t,g,e,F,O){return n(),r("div",ko,[e.loaded?(n(),r("div",Co,[d(" Left rail: step tabs (light, same style as the in-app create wizards) "),a("div",Ao,[a("div",{class:u(["w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e.tab_position==0?"bg-blue-600 text-white shadow-sm":e.tab_position>0?"bg-blue-100 text-blue-600":"text-gray-400"]),title:"Select template"},[s(e.LayoutTemplate,{size:20})],2),a("div",{class:u(["w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e.tab_position==1?"bg-blue-600 text-white shadow-sm":e.tab_position>1?"bg-blue-100 text-blue-600":"text-gray-400"]),title:"Video message"},[s(e.User,{size:20})],2),a("div",{class:u(["w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e.tab_position==2?"bg-blue-600 text-white shadow-sm":"text-gray-400"]),title:"Videos & landingpage"},[s(e.ImageIcon,{size:20})],2)]),d(" Main content: the 3 steps, cross-faded via the same animation classes "),a("div",To,[s(e.SelectTemplate,{class:u(["absolute inset-0",e.animates[0].class]),tab_position:0,onNext:e.onSelectTemplate},null,8,["class"]),s(e.SelectOverlay,{ref:"campaignMessage",class:u(["absolute inset-0",e.animates[1].class]),tab_position:1,onNext:t[0]||(t[0]=l=>e.goNext(l,"message")),onBack:e.goBack},null,8,["class"]),s(e.CampaignData,{ref:"campaignData",class:u(["absolute inset-0",e.animates[2].class]),is_get_data:!0,platform:e.platform,pre_data:e.pre_data,is_block_lead_linkedin:e.is_block_lead_linkedin,onBack:e.goBack,onUpdate:e.update},null,8,["class","platform","pre_data","is_block_lead_linkedin"])])])):d("v-if",!0),d(' Loading overlay (old `v-if="loading"`) '),e.loading?(n(),r("div",Uo,[s(e.UiPageLoader)])):d("v-if",!0)])}const _i=ut(ho,[["render",Mo],["__scopeId","data-v-d5be74e6"],["__file","/home/gitlab-runner/weezly-v3/callendo-frontend-v3/src/views/dynamic/ExternalDynamicCampaignView.vue"]]);export{_i as default};
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.